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
Application can not listen
private LifecycleHolder get(Context context) { if (context == null) { throw new IllegalArgumentException("You cannot start a load on a null Context"); } else if (!isOnMainThread() && !(context instanceof Application)) { if (context instanceof FragmentActivity) { return get((FragmentActivity) context); } else if (context instanceof Activity) { return get((Activity) context); } else if (context instanceof ContextWrapper) { return get(((ContextWrapper) context).getBaseContext()); } } return getApplicationLifecycle(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startListening();", "@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}", "private void listen() {\n try {\n this.console.println(MapControl.checkListen(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic boolean IsListening() {\n\t\treturn listening;\n\t}", "private void createAndListen() {\n\n\t\t\n\t}", "public void startListeningForConnection() {\n startInsecureListeningThread();\n }", "public void startListening() {\r\n\t\tlisten.startListening();\r\n\t}", "void onListeningStarted();", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlisten();\n\t\t\t\t}", "private void listen() {\n //Grap port/ip from UI\n String ip = m_ipField.getText().trim();\n try {\n ip = InetAddress.getByName(ip).getHostAddress(); //Validate IP Address\n } catch (UnknownHostException ex) {\n Logger.getLogger(StreamRecorderDisplay.class.getName()).log(Level.SEVERE, \"Poorly formatted IP Address: \" + m_ipField.getText(), ex);\n }\n int port = Integer.valueOf(m_portField.getText().trim());\n\n //Start detector\n m_dataDetector = new MulticastDataDetector(ip, port);\n m_dataDetector.addMulticastDataDetectionListener(this);\n new Thread(m_dataDetector).start();\n }", "private void startListen() {\n try {\n listeningSocket = new ServerSocket(listeningPort);\n } catch (IOException e) {\n throw new RuntimeException(\"Cannot open listeningPort \" + listeningPort, e);\n }\n }", "public void listen() {\n DeviceManager cpuUsage = new CPUUsageManager();\n cpuUsage.printStatus();\n \n }", "public void listen()\n {\n service = new BService (this.classroom, \"tcp\");\n service.register();\n service.setListener(this);\n }", "public void notifyServerListening() {\r\n nui.notifyHostListening();\r\n }", "public void listen() throws IOException {\n listen(Thread.currentThread());\n }", "private void onUnavailable() {\n // TODO: broadcast\n }", "public void listen() throws Exception {\n if (serverSocket != null) {\n try {\n serverSocket.setSoTimeout(0);\n } catch (SocketException sx) {\n sx.printStackTrace();\n }\n }\n }", "public abstract void listen(ServiceConfig serviceConfig) throws IOException;", "public synchronized boolean isListening() {\n\t\treturn isListening;\n\t}", "public void listen() {\n Thread listenThread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n DatagramSocket socket;\n try {\n\n socket = new DatagramSocket(BROADCAST_PORT);\n }\n catch (SocketException e) {\n\n return;\n }\n byte[] buffer = new byte[BROADCAST_BUF_SIZE];\n\n while(LISTEN) {\n\n listen(socket, buffer);\n }\n socket.disconnect();\n socket.close();\n return;\n }\n\n public void listen(DatagramSocket socket, byte[] buffer) {\n\n try {\n // Esperando o bebê\n DatagramPacket packet = new DatagramPacket(buffer, BROADCAST_BUF_SIZE);\n socket.setSoTimeout(15000);\n socket.receive(packet);\n String data = new String(buffer, 0, packet.getLength());\n String action = data.substring(0, 4);\n if(action.equals(\"ONL:\")) {\n addBaby(data.substring(4, data.length()), packet.getAddress());\n }\n else if(action.equals(\"BYE:\")) {\n removeBaby(data.substring(4, data.length()));\n }\n\n }\n catch(SocketTimeoutException e) {\n\n if(LISTEN) {\n\n listen(socket, buffer);\n }\n return;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n });\n listenThread.start();\n }", "private void listen() {\n\t\ttry {\n\t\t\tServerSocket servSocket = new ServerSocket(PORT);\n\t\t\tSocket clientSocket;\n\t\t\twhile(true) {\n\t\t\t\tclientSocket = servSocket.accept();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error - Could not open connection\");\n\t\t}\n\t\t\n\t}", "void startListening()\n {\n if (outstanding_accept != null || open_connection != null) {\n return;\n }\n \n outstanding_accept = new AcceptThread(bt_adapter, handler);\n outstanding_accept.start();\n }", "public void startListening() {\n if (Util.isDebugBuild()) {\n Log.d(TAG, \"mAcceptThread: \" + mAcceptThread);\n }\n\n // Start the AcceptThread which listens for incoming connection requests\n if (mAcceptThread == null) {\n mAcceptThread = new AcceptThread(mContext, mHandler, services, this);\n }\n\n if (Util.isDebugBuild()) {\n Log.d(TAG, \"mAcceptThread.isAlive(): \" + mAcceptThread.isAlive());\n }\n\n if (!mAcceptThread.isAlive()) {\n mAcceptThread.start();\n }\n }", "private void listen() {\n System.out.println(\"launch listen task\");\n listenTask = new AsyncTask<Void, String, IOException>() {\n @Override\n protected IOException doInBackground(Void... params) {\n try (BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {\n String line;\n while ((line = in.readLine()) != null) {\n System.out.println(\"receive \" + line);\n publishProgress(line);\n }\n } catch (SocketException e) {\n if (e.toString().equals(\"java.net.SocketException: Socket closed\")) {\n //that's what will happen when task.cancel() is called.\n System.out.println(\"listening is stopped as socket is closed\");\n return null;\n } else {\n e.printStackTrace();\n return e;\n }\n } catch (IOException e) {\n e.printStackTrace();\n return e;\n }\n return null;\n }\n\n @Override\n protected void onProgressUpdate(String... values) {\n handler.accept(new Message(MsgType.SERVER, values[0]));\n }\n\n @Override\n protected void onPostExecute(IOException e) {\n if (e == null) {\n handler.accept(new Message(MsgType.INFO, \"listening finished\"));\n } else {\n handler.accept(new Message(MsgType.ERROR,\n \"exception while listening\" + \"\\n\" + e.toString()));\n }\n }\n\n @Override\n protected void onCancelled() {\n super.onCancelled();\n }\n };\n //the listen task will last for a quite long time (blocking) and thus should run in a parallel pool.\n listenTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "public String listen(){\t\n\t\tSystem.out.println(\"Server lauscht.\");\n\t\treturn receiveString();\n\t}", "@Override\n\tpublic boolean listen(DrumPoint drum, int begin, int end) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean listen(Track tracks, int begin, int end) {\n\t\treturn false;\n\t}", "public synchronized void listen() {\n// synchronized (this) {\n try {\n String input;\n if ((input = in.readLine()) != null) {\n parseCommand(input);\n }\n } catch (IOException ex) {\n Logger.getLogger(ClientIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n// }\n }", "private void m22002a() {\n if (!this.f23836h) {\n this.f23835g = mo24758a(this.f23833e);\n try {\n this.f23833e.registerReceiver(this.f23837i, new IntentFilter(\"android.net.conn.CONNECTIVITY_CHANGE\"));\n this.f23836h = true;\n } catch (SecurityException e) {\n String str = \"ConnectivityMonitor\";\n if (Log.isLoggable(str, 5)) {\n Log.w(str, \"Failed to register\", e);\n }\n }\n }\n }", "@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }", "public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }", "void onListeningFinished();", "protected void listen(int backlog) throws IOException {\n return;\n }", "public void Listen() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//reconstruct byte array for receiving\r\n\t\t\treceiveData = new byte[5192];\r\n\t\t\t\r\n\t\t\t//receive a packet!\r\n\t\t\tserverSocket.receive(packet = new DatagramPacket(receiveData, receiveData.length));\r\n\t\t\t\r\n\t\t\t//translate into a string and print to console\r\n\t\t\tString output = new String(packet.getData());\r\n\t\t\t//address = serverSocket.getInetAddress();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tNetConsole.window.addText(output, false);\r\n\t\t\t\r\n\t\t\t//deconstruct array so remnants of last commands don't get shown. \r\n\t\t\treceiveData = null;\r\n\t\t\tpacket = null;\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\treturn;\r\n\t\t\r\n\t}", "protected void registerListener() {\r\n\t\t// do nothing\r\n\t}", "private void resumeListening() {\n Thread listener = new Thread() {\n @Override\n public void run() {\n try {\n mListenerSocket = new ServerSocket();\n mListenerSocket.setReuseAddress(true);\n mListenerSocket.bind(new InetSocketAddress(LOCAL_PORT));\n while (true) {\n Socket connSocket = mListenerSocket.accept();\n Scanner sc = new Scanner(connSocket.getInputStream());\n String encMsg = sc.nextLine();\n connSocket.close();\n sc.close();\n Message msg = mHandler.obtainMessage();\n msg.obj = encMsg;\n mHandler.sendMessage(msg);\n }\n } catch (IOException e) {\n Log.d(\"LANConnection\", \"Stopping listener thread due to error\", e);\n }\n }\n };\n listener.start();\n }", "@Override\n public int appEarlyNotResponding(String processName, int pid, String annotation) throws RemoteException {\n Log.i(TAG, String.format(\"Early warning about application %s (pid %d) not responding: %s\", processName, pid, annotation));\n return 0;\n }", "@Override\n\tpublic boolean canConnect() {\n return false;\n }", "@Test\n public void testListen_int() throws Exception {\n System.out.println(\"listen\");\n int p = 4000;\n instance.listen(p);\n }", "public int listen() {\n\t \n\t \n\tconditionLock.acquire();\n\t\t\n\t\tint aux=0;\n\t \n\t\twhile(listenerReady == true){\n\t\t\tcondLock.sleep();\n\t\t}\n\t\t//~ else{\n\t\t\tlistenerReady = true;\n\t\t\tcondLock.wakeAll();\n\t\t\t\n\t\t\taux = data;\n\t\t\n\t\twhile(speakerReady == false){\n\t\t\t\n\t\t\tcondLock.sleep();\n\t\t}\t\n\t\t\n\t\taux = data;\n\t\tspeakerReady = false;\n\t\tcondLock.wakeAll();\n\t\t\n\t\t//~ if(speakerReady){\n\t\t\t\t\n\t\t\t\t//~ aux = data;\n\t\t\t\t//~ speakerReady = false;\n\t\t\t\t\n\t\t\t\t//~ condLock.wakeAll();\n\t\t\t//~ }\n\t\t\t//~ else{\n\t\t\t\t//~ condLock.sleep();\n\t\t\t\t\n\t\t\t\t//~ aux = data;\n\t\t\t\t//~ speakerReady = false;\n\t\t\t\t//~ condLock.wakeAll();\n\t\t\t\t\n\t\t\t//~ }\n\t\t//~ }\n\t\n\t\n\tlistenerReady = false; \n\tconditionLock.release();\n\t \n\treturn aux;\n }", "public final boolean isListening() {\n return mIsListening;\n }", "protected void onDiscoveryFailed() {\n logAndShowSnackbar(\"Could not subscribe.\");\n }", "public static void startChatServer() {\n\t\tbyte[] buffer = new byte[1024];\n\t\tStreamConnectionNotifier cn = null;\n\t\ttry {\n\t\t\tLocalDevice local = LocalDevice.getLocalDevice();\n\t\t\tlocal.setDiscoverable(DiscoveryAgent.GIAC);\n\t\t\tcn = (StreamConnectionNotifier) Connector.open(INSECURE_URL);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\twhile (true) {\n\t\t\tOutputThread t = null;\n\t\t\tStreamConnection sock = null;\n\t\t\tInputStream is = null;\n\t\t\tOutputStream os = null;\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting connection:\");\n\t\t\t\tsock = cn.acceptAndOpen();\n\t\t\t\tSystem.out.println(\"accept!: \" + Charset.defaultCharset());\n\t\t\t\tis = sock.openInputStream();\n\t\t\t\tos = sock.openOutputStream();\n\n\t\t\t\tt = new OutputThread(os);\n\t\t\t\tt.start();\n\n\t\t\t\twhile (t.isAlive()) {\n\t\t\t\t\t//TODO: use timeout read?\n\t\t\t\t\tint len = is.read(buffer);\n\t\t\t\t\t// printAsHex(buffer, len);\n\t\t\t\t\tif (len > 0) {\n\t\t\t\t\t\tSystem.out.println(\"received message(\" + len + \"): \" + new String(buffer, 0, len));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//TODO: check connection is live or not,\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tt.interrupt();\n\t\t\t\tt = null;\n\t\t\t\ttry {\n\t\t\t\t\tsock.close();\n\t\t\t\t\tcn.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void StopListening()\n\t{\n\t\t\n\t}", "@Test\n public void testListen_0args() throws Exception {\n System.out.println(\"listen\");\n instance.listen();\n }", "private void listen() {\n\t\tString message;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tmessage = input.readLine();\n\t\t\t\tif (message == null) continue;\n\n\t\t\t\tif(message.equals(\"disconnect\")){\n\t\t\t\t\tThread t = new Thread(this::disconnect);\n\t\t\t\t\tt.start();\n\t\t\t\t\treturn;\n\t\t\t\t} else if(message.contains(\"PUSH\")) {\n\t\t\t\t\tparseMessage(message);\n\t\t\t\t} else if (message.equals(\"pong\")){\n\t\t\t\t\tponged = true;\n\t\t\t\t} else if(!validResponse) {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tresponse = message;\n\t\t\t\t\t\tvalidResponse = true;\n\t\t\t\t\t\tnotifyAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tThread t = new Thread(this::disconnect);\n\t\t\t\tt.start();\n\t\t\t\ttry {\n\t\t\t\t\tt.join();\n\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tsynchronized (this) {\n\t\t\t\t\tresponse = null;\n\t\t\t\t\tvalidResponse = true;\n\t\t\t\t\tnotifyAll();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "protected void bindListener() {\n locationManager= TencentLocationManager.getInstance(this);\n int error = locationManager\n .requestLocationUpdates(\n TencentLocationRequest\n .create().setInterval(3000)\n .setRequestLevel(\n TencentLocationRequest.REQUEST_LEVEL_ADMIN_AREA), this);\n\n switch (error) {\n case 0:\n Log.e(\"location\", \"成功注册监听器\");\n break;\n case 1:\n Log.e(\"location\", \"设备缺少使用腾讯定位服务需要的基本条件\");\n break;\n case 2:\n Log.e(\"location\", \"manifest 中配置的 key 不正确\");\n break;\n case 3:\n Log.e(\"location\", \"自动加载libtencentloc.so失败\");\n break;\n\n default:\n break;\n }\n }", "public String listen() {\n\n\t\ttry {\n\n\t\t\treturn serverio.listen();\n\n\t\t} catch (IOException ioe) {\n\n\t\t\t// <2> Incoming data was corrupted and is being thrown away.\n\t\t\tSystem.out.println(\"<2>\");\n\t\t\treturn \"<2> Incoming data was corrupted and is being thrown away.\";\n\n\t\t}\n\t}", "public void mo34037a() {\n if (this.f30043c == 0) {\n this.f30042b.registerReceiver(this, new IntentFilter(\"android.net.conn.CONNECTIVITY_CHANGE\"));\n }\n this.f30043c++;\n }", "@Deprecated\n public final void startListen() {\n startListening();\n }", "public void listen() {\n\t\tthread(\"NetworkClientInput\", () -> {\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\tString str = in.readLine();\n\t\t\t\t\t\n\t\t\t\t\tif (str == null)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"[CLIENT] Received: \" + str);\n\t\t\t\t\ttry {\n\t\t\t\t\t\thandle(str);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.err.println(\"[Client] Error handling input\");\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(\"[Client] Disconnected.\");\n\t\t\t\t\tconnected = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tconnected = false;\n\t\t\texecutor.shutdown();\n\t\t\tsocket.close();\n\t\t});\n\t}", "public void listen() throws IOException {\n\t\twhile(true){\n\t\t\tserverReader = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n\t\t\tString responseFromServer = serverReader.readLine();\n\t\t\tJOptionPane.showMessageDialog(null, responseFromServer);\n\t\t}\n\t}", "void initAndListen() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t// Startuje nowy watek z odbieraniem wiadomosci.\n\t\t\t\tnew ClientHandler(clientSocket, this);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Accept failed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic boolean listen(ArrayList<Track> tracks, int begin, int end) {\n\t\treturn false;\n\t}", "@Override\n public int appNotResponding(String processName, int pid, String processStats) throws RemoteException {\n Log.i(TAG, String.format(\"Application %s (pid %s) is not responding: %s\", processName, pid, processStats));\n return 1;\n }", "@Override\n public int systemNotResponding(String msg) throws RemoteException {\n Log.i(TAG, String.format(\"System is not responding: %s\", msg));\n return 1;\n }", "protected abstract void startListener();", "@Override\n\tpublic boolean canReceive() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void onConnCreate() {\n\t\tapp.start();\n setEnabled( false );\n\t}", "@Override\n\tpublic void canSpeak() {\n\t\t\n\t}", "public void startListener() throws BindException, Exception{ // NOPMD by luke on 5/26/07 11:10 AM\n\t\tsynchronized (httpServerMutex){\n\t\t\t// 1 -- Shutdown the previous instances to prevent multiple listeners\n\t\t\tif( webServer != null )\n\t\t\t\twebServer.shutdownServer();\n\t\t\t\n\t\t\t// 2 -- Spawn the appropriate listener\n\t\t\twebServer = new HttpServer();\n\t\t\t\n\t\t\t// 3 -- Start the listener\n\t\t\twebServer.startServer( serverPort, sslEnabled);\n\t\t}\n\t}", "public void stopListening() \n {\n keepListening = false;\n }", "public void startListening() {\n\twhile (true) {\n\t try {\n\t\tSocket s = socket.accept();\n\n\t\tnew TCPSessionClient(s, this.clients);\n\t } // end of try\n\n\t catch (IOException e) {\n\t\te.printStackTrace();\n\t } // end of catch\n\t} // end of while\n }", "public void readyToReceive()\n { ua.printLog(\"WAITING FOR INCOMING CALL\");\n if (!ua.ua_profile.audio && !ua.ua_profile.video) ua.printLog(\"ONLY SIGNALING, NO MEDIA\"); \n //ua.listen();\n changeStatus(UA_IDLE);\n printOut(\"digit the callee's URL to make a call or press 'enter' to exit\");\n }", "public static void start() {\n enableIncomingMessages(true);\n }", "@Override\n public void run() {\n Log.d(\"Flask Server\",\"Failed to connect to server\");\n }", "@Override\n public void startListening() {\n //Download proj upon connection response from cs\n RxBus.INSTANCE\n .listen(DownloadProjectUseCase.Request.class)\n .subscribe(request -> {\n this.projectForDownload = request.projectForDownload;\n downloadProject(request.projectForDownload);\n });\n\n //Retry download proj when there is a problem\n RxBus.INSTANCE\n .listen(RetryCacheProblemUseCase.Request.class)\n .subscribe(request -> {\n downloadProject(projectForDownload);\n });\n\n }", "public void startListening()\n {\n if (!listening) {\n sensorManager.requestTriggerSensor(listener, motion);\n listening = true;\n }\n }", "@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }", "public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "@Override\r\n\tpublic boolean listenAt(int port) {\n\t\ttry {\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t\tsocket = serverSocket.accept();\r\n\t\t\toutStreamServer = socket.getOutputStream();\r\n\t\t\tinStreamServer = socket.getInputStream();\r\n\t\t\treturn true;\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t}\r\n\t}", "public void listen() {\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\tDatagramPacket packet = new DatagramPacket(recieveData, MAX_SIZE);\n\t\t\tint available = 0;\n\t\t\t\n\t\t\ttry {\n\t\t\t\t//The 'receive(...)' method fills up the buffer of the packet we passed into it with the data received\n\t\t\t\tmainSocket.receive(packet);\n\t\t\t\t//available = packet.getLength();\n\t\t\t\tbyte[] data = packet.getData();\n\t\t\t\t\n\t\t\t\tif(data[0] == HEADER && data[1] == CONNECTION)\n\t\t\t\t\tif(askUser(packet, available))\n\t\t\t\t\t\tmakeClientThread();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\tcatch(PortUnreachableException ex) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"PortUnreachableException caught in server side.\\n Unable to recieve packet\\n\");\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\tcatch (IOException ex) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"1. IOException Caught in server side.\\n Unable to vertify user\\n\");\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public abstract void Listen() throws TransportLayerException;", "public void listen() throws IOException, InterruptedException{\n\t\tString response;\n\t\twhile (!serverSoc.isClosed() && (response = fromServer.readLine()) != null){\n\t\t\tif (gui != null){\n\t\t\t\tgui.giveResponse(response);\n\t\t\t}\n\t\t\tSystem.out.println(response);\n\t\t\tbotAction(response);\n\t\t}\n\t\tqueue.add(\"\");\n\t\tgameOver = true;\n\t}", "private void listenForConnection() throws IOException {\n\twhile(true) {\n System.out.println(\"Waiting for connection...\");\n // Wait for client to connect\n Socket cli = server.accept();\n if(connlist.size() < MAX_CONN) {\n\t\t// if numCli is less then 100\n initConnection(cli);\n }\n\t}\n }", "public synchronized void alertOK() {\n\t\ttry {\n\t\t\tvListen.sendOK();\n\t\t} catch (IOException exc) {\n\t\t\terrorIOError();\n\t\t}\n\t}", "public boolean canReceiveMessages()\n {\n return true;\n }", "private void listenVoiceCall() {\n final String username = MyAccount.getInstance().getName();\n final String topic = String.format(\"voice/%s\", username);\n new Subscriber(topic, username)\n .setNewMessageListener(new SubscribedTopicListener() {\n @Override\n public void onReceive(DataTransfer message) {\n String action = message.data.toString();\n switch (action) {\n case Constants.VOICE_REQUEST:\n onReceiveVoiceRequest(message);\n break;\n\n case Constants.VOICE_ACCEPT:\n hideCallingPane();\n onReceiveVoiceAccept(message);\n break;\n\n case Constants.VOICE_REJECT:\n hideCallingPane();\n onReceiveVoiceReject(message);\n break;\n\n case Constants.VOICE_QUIT:\n onReceiveVoiceQuit(message);\n\n }\n }\n })\n .listen();\n }", "public void listen(Boolean enable)\n {\n if (mEnable) {\n Log.d(LOGTAG,\"Enable listening: \" + Boolean.toString(enable));\n if (enable) mBS.listen();\n else mBS.disconnect();\n }\n }", "public boolean isListenerRunning(){\n\t\tsynchronized (httpServerMutex) {\n\t\t\tif( webServer == null )\n\t\t\t\treturn false;\n\t\t\telse{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "private void startNonBlockingListen() throws Exception {\n nioServer = new NioServer(null,8880);\n serverThread = (new Thread(nioServer));\n serverThread.setName(\"Server Thread\");\n serverThread.setDaemon(true);\n serverThread.start();\n }", "protected void checkOpen() throws IOException {\n if (this.stopRequested.get() || this.abortRequested) {\n throw new IOException(\"Server not running\");\n }\n if (!fsOk) {\n throw new IOException(\"File system not available\");\n }\n }", "public void notifyStartup();", "private static void checkConfiguration() {\n try {\n ClientManager.rebuildSocket();\n ClientManager.closeSocket();\n } catch (IOException e) {\n new NetworkNotAvailableErrorStarter(NetworkNotAvailableError.class, null);\n }\n }", "public void stopListening() {\n\t\tkeepListening = false;\n\t}", "@Override\n protected void startListener(){\n Socket socket = null;\n while (isRunning()){\n socket = acceptSocket();\n if (socket == null) {\n continue;\n }\n \n try {\n handleConnection(socket);\n } catch (Throwable ex) {\n getLogger().log(Level.FINE, \n \"selectorThread.handleConnectionException\",\n ex);\n try {\n socket.close(); \n } catch (IOException ioe){\n // Do nothing\n }\n continue;\n }\n } \n }", "private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed\r\n try {\r\n\r\n if (isServing) {\r\n isServing = false;\r\n connection.listen(false);\r\n jButton5.setEnabled(true);\r\n jButton4.setText(\"Enable Server\");\r\n setTitle(\"ChatRSA \");\r\n ChatWindow.log(\"GRAY\", \"[ Server] - Closed\");\r\n } else {\r\n isServing = true;\r\n connection.listen(true);\r\n jButton5.setEnabled(false);\r\n jButton4.setText(\"Disable Server\");\r\n setTitle(\"ChatRSA - Server\");\r\n ChatWindow.log(\"GRAY\", \"[ Server] - Waiting for Connection ...\");\r\n }\r\n\r\n } catch (IOException ex) {\r\n ChatWindow.log(\"GRAY\", \"[ Error] - Maybe another server is already connected \");\r\n }\r\n }", "protected void onConnect() {}", "public static void startServer() {\n clientListener.startListener();\n }", "public int listen() {\n \tlock.acquire();\n \tif (status!= s_waitL) {\n \t\twaitingL++;\n \t\t//System.out.println(KThread.currentThread() + \" Listener slept, state = \" + status);\n \t\tcondListen.sleep();\n \t\t//System.out.println(KThread.currentThread() + \" Listener arrives\");\n \t\twaitingL--;\n \t}\n \telse ;//System.out.println(KThread.currentThread() + \" Listener arrives without sleep\");\n \t\n \t\n \t\n \tLib.assertTrue(status == s_waitL || status == s_waitLq);\n \t\n \t//System.out.println(KThread.currentThread() + \" Wake up a returner\");\n \t\n \tint ret = msg;\n \tcondRet.wake();\n \tstatus = s_waitR;\n \tlock.release();\n \treturn ret;\n }", "private void check_displaysListening() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_listening)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_listening)));\n // No hint should be visible\n onView(withId(R.id.hint))\n .check(matches(withEffectiveVisibility(ViewMatchers.Visibility.INVISIBLE)));\n }", "@Override\n public void onFeedbackServerStopped() {\n }", "private void handleRegisterSocketEvent(RegisterSocketEvent event) throws AppiaException {\n \t\tif(event.getDir() == Direction.DOWN){\n \t\t\tSystem.err.println(\"VsProxySession - No one should be above \" +\n \t\t\t\"me sending a RSE Event\");\n \t\t}\n \n \t\t//Create the matchers to find out what is the channel (For group or clients)\n \t\tMatcher listenMatcher = textPattern.matcher(event.getChannel().getChannelID());\n \t\tMatcher vsMatcher = drawPattern.matcher(event.getChannel().getChannelID());\n \n \t\tif(listenMatcher.matches()){\n \t\t\tlistenAddress = (InetSocketAddress) event.getLocalSocketAddress();\n \t\t\tSystem.out.println(\"listenAddress Registered at: \" + listenAddress);\n \n \t\t\t//We may now launch our pong manager\n \t\t\tlaunchPongManagerThread();\n \t\t}\n \n \t\telse if(vsMatcher.matches()){\n \t\t\tvsAddress = (InetSocketAddress) event.getLocalSocketAddress();\n \t\t\tSystem.out.println(\"vsAddress Registered at: \" + vsAddress);\n \t\t\t//Create a Virtual Sinchrony channel for the servers\n \t\t\tsendGroupInit();\t\n \t\t}\n \n \t\tevent.go();\n \t}", "@Override\n\tpublic void listenerStarted(ConnectionListenerEvent evt) {\n\t\t\n\t}", "@Override\n\tpublic void onCreate() \n\t{\n\t\tconManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);\n\n\t\t// Timer is used to get info every UPDATE_TIME_PERIOD;\n\t\ttimer = new Timer(); \n\n\n\n\t\tThread thread = new Thread()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void run() {\t\t\t\n\n\t\t\t\tRandom random = new Random();\n\t\t\t\tint tryCount = 0;\n\t\t\t\twhile (socketOperator.startListening(10000 + random.nextInt(20000) ) == 0 )\n\t\t\t\t{\t\t\n\t\t\t\t\ttryCount++; \n\t\t\t\t\tif (tryCount > 10)\n\t\t\t\t\t{\n\t\t\t\t\t\t// if it can't listen a port after trying 10 times, give up...\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\t\t\n\t\tthread.start();\n\t}", "private SecurityListener(){\n Bukkit.getPluginManager().registerEvents(this, SteveSus.getInstance());\n }", "public void run() {\n Intent in = new Intent(activity, serverconnectionerror.class);\n in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(in);\n }", "@Override\n\tpublic void run() {\n\t\trespond();\n\t\tlisten();\n\t}", "boolean shouldAutoSubscribe();", "public void startRunning(){\n\t\ttry{\n\t\t\tserver = new ServerSocket(6789, 100);\n\t\t\t//int Port Number int 100 connections max (backlog / queue link)\n\t\t\twhile(true){\n\t\t\t\ttry{\n\t\t\t\t\twaitForConnection();\n\t\t\t\t\tsetupStreams();\n\t\t\t\t\twhileChatting();\n\t\t\t\t\t//connect and have conversation\n\t\t\t\t}catch(EOFException eofe){\n\t\t\t\t\tshowMessage(\"\\n Punk Ass Bitch.\");\n\t\t\t\t}finally{\n\t\t\t\t\tcloseChat();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(IOException ioe){\n\t\t\tioe.printStackTrace();\n\t\t\t\n\t\t}\n\t}" ]
[ "0.6943607", "0.6936647", "0.6933208", "0.6662501", "0.6655727", "0.6605857", "0.6587566", "0.6584963", "0.64100957", "0.6393049", "0.639235", "0.63312733", "0.62380016", "0.61833787", "0.61393285", "0.61330014", "0.6068632", "0.60483927", "0.6018158", "0.6011453", "0.6006346", "0.59756655", "0.59652925", "0.58334124", "0.5826638", "0.58245426", "0.58137673", "0.57975537", "0.57841784", "0.5762619", "0.5761913", "0.576108", "0.57568157", "0.57395816", "0.5735724", "0.5731418", "0.57297796", "0.57142454", "0.5711451", "0.5710307", "0.5687169", "0.56861424", "0.5647356", "0.56394833", "0.563762", "0.5629407", "0.5622945", "0.5611728", "0.5604023", "0.5603333", "0.56016266", "0.55981153", "0.55966276", "0.559647", "0.55870086", "0.5582176", "0.5581833", "0.55784255", "0.5571033", "0.556963", "0.5566486", "0.55594695", "0.55557483", "0.5542654", "0.55389625", "0.55308867", "0.553028", "0.5529433", "0.55165315", "0.5513392", "0.5510216", "0.5498632", "0.54962647", "0.54938835", "0.54803085", "0.54776365", "0.54769415", "0.547229", "0.5465381", "0.54638827", "0.54394627", "0.5439416", "0.5435473", "0.54319125", "0.54297906", "0.5429736", "0.5426175", "0.5425323", "0.53942156", "0.5394059", "0.53923625", "0.53923535", "0.53819716", "0.53753036", "0.53646684", "0.5355299", "0.5344675", "0.5331621", "0.53195727", "0.53178966", "0.5315819" ]
0.0
-1
Either an application context or we're on a background thread.
public LifecycleHolder getApplicationLifecycle() { if (applicationLifecycle == null) { synchronized (this) { if (applicationLifecycle == null) { // Normally pause/resume is taken care of by the fragment we add to the fragment or activity. // However, in this case since the manager attached to the application will not receive lifecycle // events, applicationLifecycle = new LifecycleHolder(true); } } } return applicationLifecycle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Context getContextAsync() {\n return getActivity() == null ? IotSensorsApplication.getApplication().getApplicationContext() : getActivity();\n }", "public static boolean isApplicationInBackground(Context context) {\r\n ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\r\n List<RunningTaskInfo> taskList = am.getRunningTasks(1);\r\n if (taskList != null && !taskList.isEmpty()) {\r\n ComponentName topActivity = taskList.get(0).topActivity;\r\n if (topActivity != null && !topActivity.getPackageName().equals(context.getPackageName())) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public static Context getApplicationContext() { return mApplicationContext; }", "public Context getApplicationContext();", "public abstract boolean isMainThread();", "private Context getApplicationContext() {\n\t\treturn this.cordova.getActivity().getApplicationContext();\n\t}", "private Context getApplicationContext() {\n\t\treturn this.cordova.getActivity().getApplicationContext();\n\t}", "public boolean isStreamCurrentContextThreadCurrentContext() {\n return contexts.get(currentContext)\n .equals(TransactionalContext.getCurrentContext());\n }", "@Override\n\t\tprotected Void doInBackground(Void... params)\n\t\t{\n\t\t\t//Get the current thread's token\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tMyApplication app = (MyApplication) getApplication();\n\t\t\t\twhile(app.getSyncStatus());\n\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic AsyncContext getAsyncContext() {\n\t\treturn null;\n\t}", "long getCurrentContext();", "public static boolean isAppIsInBackground(Context context) {\n boolean isInBackground = true;\n ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT_WATCH) {\n List <ActivityManager.RunningAppProcessInfo> runningProcesses = am.getRunningAppProcesses();\n for (ActivityManager.RunningAppProcessInfo processInfo : runningProcesses) {\n if (processInfo.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {\n for (String activeProcess : processInfo.pkgList) {\n if (activeProcess.equals(context.getPackageName())) {\n isInBackground = false;\n }\n }\n }\n }\n } else {\n List <ActivityManager.RunningTaskInfo> taskInfo = am.getRunningTasks(1);\n ComponentName componentInfo = taskInfo.get(0).topActivity;\n if (componentInfo.getPackageName().equals(context.getPackageName())) {\n isInBackground = false;\n }\n }\n \n return isInBackground;\n }", "@Override\n\tprotected Application doInBackground() throws Exception {\n\t\treturn null;\n\t}", "public boolean needContext() {\n\t\treturn false;\n\t}", "public static boolean isAppIsInBackground(Context context) {\n boolean isInBackground = true;\n ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) {\n List<ActivityManager.RunningAppProcessInfo> runningProcesses = am.getRunningAppProcesses();\n for (ActivityManager.RunningAppProcessInfo processInfo : runningProcesses) {\n if (processInfo.importance == ActivityManager.RunningAppProcessInfo.IMPORTANCE_FOREGROUND) {\n for (String activeProcess : processInfo.pkgList) {\n if (activeProcess.equals(context.getPackageName())) {\n isInBackground = false;\n }\n }\n }\n }\n } else {\n List<ActivityManager.RunningTaskInfo> taskInfo = am.getRunningTasks(1);\n ComponentName componentInfo = taskInfo.get(0).topActivity;\n if (componentInfo.getPackageName().equals(context.getPackageName())) {\n isInBackground = false;\n }\n }\n\n return isInBackground;\n }", "boolean isThreadedAsyncMode();", "public static boolean isMainThread() {\n if (!initialized)\n return true; // always return true if the app is not initialized\n // properly\n if (thread_ref != null)\n return thread_ref.get() == Thread.currentThread();\n return false;\n }", "public static Context getContext(){\n return appContext;\n }", "static synchronized Context getContext() {\n checkState();\n return sInstance.mContext;\n }", "@Override\n public Context getApplicationContext() {\n return mView.get().getApplicationContext();\n }", "ApplicationContext getAppCtx();", "private static boolean m61442b() {\n if (Looper.getMainLooper().getThread() == Thread.currentThread()) {\n return true;\n }\n return false;\n }", "public static ApplicationContext getApplicationContext() {\r\n\t\treturn applicationContext;\r\n\t}", "public static ApplicationContext getApplicationContext() {\n return appContext;\n }", "static Application getContext() {\n if (ctx == null)\n // TODO: 2019/6/18\n// throw new RuntimeException(\"please init LogXixi\");\n return null;\n else\n return ctx;\n }", "boolean hasContext();", "boolean hasContext();", "@Override\n public Context getContext() {\n return this.getApplicationContext();\n }", "public static boolean isRunning()\n {\n synchronized( Lifecycle.class ) {\n return context != null;\n }\n }", "public ApplicationContext getApplicationContext() {\n return applicationContext;\n }", "public ApplicationContext getApplicationContext()\n {\n return this.applicationContext;\n }", "<T> T runWithContext(WebApplication application, Callable<T> callable) throws Exception;", "public boolean isStreamForThisThread() {\n return contexts.get(0)\n .equals(TransactionalContext.getRootContext());\n }", "public static boolean zzcz(Context context) {\n synchronized (zzbhd.class) {\n Context context2 = context.getApplicationContext();\n if (zzgfe != null && zzgff != null && zzgfe == context2) {\n return zzgff;\n }\n zzgff = null;\n if (zzq.isAtLeastO()) {\n zzgff = context2.getPackageManager().isInstantApp();\n } else {\n try {\n context.getClassLoader().loadClass(\"com.google.android.instantapps.supervisor.InstantAppsRuntime\");\n zzgff = true;\n }\n catch (ClassNotFoundException classNotFoundException) {\n zzgff = false;\n }\n }\n zzgfe = context2;\n return zzgff;\n }\n }", "private SingletonApp( Context context ) {\n mMB = MessageBroker.getInstance( context );\n }", "<T> T runWithContext(String applicationName, Callable<T> callable) throws Exception;", "@Context\r\npublic interface ThreadContext\r\n{\r\n /**\r\n * Get the minimum thread level.\r\n *\r\n * @param min the default minimum value\r\n * @return the minimum thread level\r\n */\r\n int getMin( int min );\r\n \r\n /**\r\n * Return maximum thread level.\r\n *\r\n * @param max the default maximum value\r\n * @return the maximum thread level\r\n */\r\n int getMax( int max );\r\n \r\n /**\r\n * Return the deamon flag.\r\n *\r\n * @param flag true if a damon thread \r\n * @return the deamon thread policy\r\n */\r\n boolean getDaemon( boolean flag );\r\n \r\n /**\r\n * Get the thread pool name.\r\n *\r\n * @param name the pool name\r\n * @return the name\r\n */\r\n String getName( String name );\r\n \r\n /**\r\n * Get the thread pool priority.\r\n *\r\n * @param priority the thread pool priority\r\n * @return the priority\r\n */\r\n int getPriority( int priority );\r\n \r\n /**\r\n * Get the maximum idle time.\r\n *\r\n * @param idle the default maximum idle time\r\n * @return the maximum idle time in milliseconds\r\n */\r\n int getIdle( int idle );\r\n \r\n}", "public abstract ApplicationLoader.Context context();", "public static final boolean isRunning(Context context){\r\n \t\tmIsRunning = MainPipeline.isEnabled(context);\r\n \t\treturn mIsRunning;\r\n \t}", "private Context getContext() {\n return mContext;\n }", "private Context getContext() {\n return mContext;\n }", "public static Context getAppContext() {\n return _BaseApplication.context;\n }", "<T> T runWithContext(String applicationName, Callable<T> callable, Locale locale) throws Exception;", "public static void initApplicationContext(Context appContext) {\n // Conceding that occasionally in tests, native is loaded before the browser process is\n // started, in which case the browser process re-sets the application context.\n assert mApplicationContext == null || mApplicationContext == appContext ||\n ((ContextWrapper)mApplicationContext).getBaseContext() == appContext;\n initJavaSideApplicationContext(appContext);\n }", "<T> T runWithContext(WebApplication application, Callable<T> callable, Locale locale) throws Exception;", "public boolean usesAniThread() {\r\n\t\treturn false;\r\n\t}", "public ExecutionContext getContext();", "@Override\n\tpublic AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse)\n\t\t\tthrows IllegalStateException {\n\t\treturn null;\n\t}", "@Provides\n @Singleton\n @ApplicationScope\n public Context provideApplicationContext() {\n return mApp.getApplicationContext();\n }", "Context getContext() {\n Context context = mContextRef.get();\n return context != null ? context : AppUtil.getAppContext();\n }", "public static Context getAppContext() {\n return mContext;\n }", "public static void startWorker(Context context) {\n if (Application.workHandler != null && Application.worker != null && Application.worker.getState() != Thread.State.TERMINATED) {\n // Clear any instance of tickerRunnable to avoid duplicate\n // and initialize to make sure ticker is running as intended.\n if (Application.workHandler != null) {\n Application.workHandler.removeCallbacks(Application.tickerRunnable);\n }\n Application.tickerRunnable = null;\n Application.tickerRunnable = new TickerRunnable(context, Application.workHandler);\n Application.tickerRunnable.tick();\n return;\n }\n Application.worker = new WorkerThread();\n Application.worker.start();\n\n Application.workHandler = Application.worker.getHandler();\n\n Application.tickerRunnable = new TickerRunnable(context, Application.workHandler);\n Application.tickerRunnable.tick();\n }", "@Override\n\tpublic void onMessageBackgroundThread(Object arg0) {\n\t\t\n\t}", "public static void checkUiThread() {\n if(Looper.getMainLooper() != Looper.myLooper()) {\n throw new IllegalStateException(\"Must be called from the Main Thread. Current Thread was :\"+ Thread.currentThread());\n }\n }", "private LifecycleHolder get(Context context) {\n if (context == null) {\n throw new IllegalArgumentException(\"You cannot start a load on a null Context\");\n } else if (!isOnMainThread() && !(context instanceof Application)) {\n if (context instanceof FragmentActivity) {\n return get((FragmentActivity) context);\n } else if (context instanceof Activity) {\n return get((Activity) context);\n } else if (context instanceof ContextWrapper) {\n return get(((ContextWrapper) context).getBaseContext());\n }\n }\n\n return getApplicationLifecycle();\n }", "@Override\r\n\tpublic Context getContext()\r\n\t{\n\t\treturn this.getActivity().getApplicationContext();\r\n\t}", "protected BackendContext getBackendContext() {\n assertActivityNotNull();\n return mActivity.getBackendContext();\n }", "private Context getThreadContext() throws NamingException {\n final ThreadContext threadContext = ThreadContext.getThreadContext();\n if (skipEjbContext(threadContext)) {\n return ContextBindings.getClassLoader();\n }\n final Context context = threadContext.getBeanContext().getJndiEnc();\n return context;\n }", "public boolean canGetCurrent (CallContext context);", "public boolean isInBackground(){\n return isInBackground;\n }", "public static final boolean inMessagingApp(Context context) {\r\n \t\t// TODO: move these to static strings somewhere\r\n \t\tfinal String PACKAGE_NAME = \"com.android.mms\";\r\n \t\t// final String COMPOSE_CLASS_NAME =\r\n \t\t// \"com.android.mms.ui.ComposeMessageActivity\";\r\n \t\tfinal String CONVO_CLASS_NAME = \"com.android.mms.ui.ConversationList\";\r\n \r\n \t\tActivityManager mAM = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\r\n \r\n \t\tList<RunningTaskInfo> mRunningTaskList = mAM.getRunningTasks(1);\r\n \t\tIterator<RunningTaskInfo> mIterator = mRunningTaskList.iterator();\r\n \t\tif (mIterator.hasNext()) {\r\n \t\t\tRunningTaskInfo mRunningTask = mIterator.next();\r\n \t\t\tif (mRunningTask != null) {\r\n \t\t\t\tComponentName runningTaskComponent = mRunningTask.baseActivity;\r\n \r\n \t\t\t\t// //Log.v(\"baseActivity = \" +\r\n \t\t\t\t// mRunningTask.baseActivity.toString());\r\n \t\t\t\t// //Log.v(\"topActivity = \" +\r\n \t\t\t\t// mRunningTask.topActivity.toString());\r\n \r\n \t\t\t\tif (PACKAGE_NAME.equals(runningTaskComponent.getPackageName())\r\n \t\t\t\t\t\t&& CONVO_CLASS_NAME.equals(runningTaskComponent.getClassName())) {\r\n \t\t\t\t\t// Log.v(\"User in messaging app - from running task\");\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 \r\n \t\t/*\r\n \t\t * List<RecentTaskInfo> mActivityList = mAM.getRecentTasks(1, 0);\r\n \t\t * Iterator<RecentTaskInfo> mIterator = mActivityList.iterator();\r\n \t\t * \r\n \t\t * if (mIterator.hasNext()) { RecentTaskInfo mRecentTask =\r\n \t\t * (RecentTaskInfo) mIterator.next(); Intent recentTaskIntent =\r\n \t\t * mRecentTask.baseIntent;\r\n \t\t * \r\n \t\t * if (recentTaskIntent != null) { ComponentName recentTaskComponentName\r\n \t\t * = recentTaskIntent.getComponent(); if (recentTaskComponentName !=\r\n \t\t * null) { String recentTaskClassName =\r\n \t\t * recentTaskComponentName.getClassName(); if\r\n \t\t * (PACKAGE_NAME.equals(recentTaskComponentName.getPackageName()) &&\r\n \t\t * (COMPOSE_CLASS_NAME.equals(recentTaskClassName) ||\r\n \t\t * CONVO_CLASS_NAME.equals(recentTaskClassName))) {\r\n \t\t * //Log.v(\"User in messaging app\"); return true; } } } }\r\n \t\t */\r\n \r\n \t\t/*\r\n \t\t * These appear to be the 2 main intents that mean the user is using the\r\n \t\t * messaging app\r\n \t\t * \r\n \t\t * action \"android.intent.action.MAIN\" data null class\r\n \t\t * \"com.android.mms.ui.ConversationList\" package \"com.android.mms\"\r\n \t\t * \r\n \t\t * action \"android.intent.action.VIEW\" data\r\n \t\t * \"content://mms-sms/threadID/3\" class\r\n \t\t * \"com.android.mms.ui.ComposeMessageActivity\" package \"com.android.mms\"\r\n \t\t */\r\n \r\n \t\treturn false;\r\n \t}", "public void mo34864a(Context context) {\n boolean[] c = m45633c();\n Thread thread = new Thread(new C9781a(this, context));\n c[47] = true;\n thread.start();\n c[48] = true;\n }", "public void mo34870b(Context context) {\n boolean[] c = m45633c();\n Thread thread = new Thread(new C9782b(this, context));\n c[49] = true;\n thread.start();\n c[50] = true;\n }", "Context getContext();", "@Override\n public CallContext getCallContext() {\n return this.context;\n }", "@Override\n\tpublic boolean allowMultithreading()\n\t{\n\t\treturn true;\n\t}", "public static boolean isRenderQueueThread() {\n/* 111 */ return (Thread.currentThread() == rqThread);\n/* */ }", "@Override\n\tpublic AsyncContext startAsync() throws IllegalStateException {\n\t\treturn null;\n\t}", "public static boolean m18371b() {\n return Thread.currentThread() == Looper.getMainLooper().getThread();\n }", "private void backgroundExecution() {\n // This moves the time consuming operation to a child thread.\n Thread thread=new Thread(null, doBackgroundThreadProcessing, \"Background\");\n thread.start();\n }", "public static EndlessScrollApplication getInstance(Context context) {\n return (EndlessScrollApplication) context.getApplicationContext();\n }", "Context context();", "Context context();", "public static void m13811b(Context context, String applicationId) {\n m13822l().execute(new C6786q(context.getApplicationContext(), applicationId));\n }", "public interface AppScheduler {\n Scheduler getNewThread();\n Scheduler getMainThread();\n}", "boolean inStaticContext();", "public synchronized void waitUntilApplicationContextIsReady() {\n // if we are in the same thread, waiting probably doesn't make sense, so we have to check\n // this.\n if (Thread.currentThread().getId() != this.m_creatorThreadId) {\n // access from another thread -> wait\n while (!this.m_applicationContextIsReady) {\n try {\n DefaultDaoRegistry.s_logger\n .debug(\"Waiting for Spring context to be fully initialized.\");\n this.wait();\n } catch (final InterruptedException e) {\n DefaultDaoRegistry.s_logger\n .debug(\"Interrupted: Application context might be ready now.\");\n }\n }\n }\n // context might be ready but caller got the contextRefreshed-event earlier than we did.\n if (!this.m_applicationContextIsReady) {\n if (this.m_applicationContext instanceof RefreshableModuleApplicationContext) {\n final RefreshableModuleApplicationContext context = (RefreshableModuleApplicationContext) this.m_applicationContext;\n this.m_applicationContextIsReady = context.isRefreshed();\n }\n }\n if (!this.m_applicationContextIsReady) {\n CoreNotificationHelper\n .notifyMisconfiguration(\"Trying to get DAOs before Spring context is \"\n + \"fully initialized. Some DAOs might not be found. \"\n + \"Implement ch.vd.seven.semis.dao.el4j.core.context.ModuleApplicationListener to get notified as soon \"\n + \"Spring context is fully initialized\");\n }\n }", "public boolean isActive()\n {\n return fetcherThread.isActive();\n }", "public static boolean isUiThread() {\n\t\treturn Looper.myLooper() == Looper.getMainLooper();\n\t}", "private void setWSClientToKeepSeparateContextPerThread() {\n ((BindingProvider) movilizerCloud).getRequestContext()\n .put(THREAD_LOCAL_CONTEXT_KEY, \"true\");\n }", "public abstract Context context();", "public static void setApplicationContext( ApplicationContext context ){\n\t\t\tctx = context;\n//\t\telse{\n//\t\t\tSystem.out.println(\"Error, ApplicationContext already has been set\");\n//\t\t}\n\t}", "public final Context getContext() {\n return mContext;\n }", "private static void assertContextInjected() {\n if (applicationContext == null) {\n throw new IllegalStateException(\"applicaitonContext attribute is not injected, please enter applicationContext\" +\n \"Define SpringContextHolder in .xml or register SpringContextHolder in SpringBoot startup class.\");\n }\n }", "static public RenderingContext getCurrentInstance()\r\n {\r\n return _CURRENT_CONTEXT.get();\r\n }", "public static void init(@NonNull final Context context) {\n BlankjUtils.sApplication = (Application) context.getApplicationContext();\n }", "Application getApplication();", "public Context getContext() {\n return mContext;\n }", "private void sendAppOpen(final Context context)\n\t{\n\t\tHandler handler = new Handler(context.getMainLooper());\n\t\thandler.post(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tAsyncTask<Void, Void, Void> task = new WorkerTask(context)\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void doWork(Context context)\n\t\t\t\t\t{\n\t\t\t\t\t\tDeviceFeature2_5.sendAppOpen(context);\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tExecutorHelper.executeAsyncTask(task);\n\t\t\t}\n\t\t});\n\t}", "BackgroundWorker (String page, String email, String username, String password, int appversion, Context context) {this.page=page; this.context=context; this.username=username; this.password=password; this.email=email; this.appversion=appversion; flag=6;}", "public OnMainThread() {\n new AsyncTask<Void, Void, Void>() {\n\n @Override\n protected Void doInBackground(Void... params) {\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n run();\n }\n }.execute();\n }", "@VisibleForTesting\n boolean isHeartBeatThreadAlive() {\n return scheduler != null && !scheduler.isShutdown();\n }", "boolean hasThreadId();", "private AppContext()\n {\n }", "public void checkHandler()\n {\n ContextManager.checkHandlerIsRunning();\n }", "public <T> T executeInApplicationScope(Callable<T> op) throws Exception {\n return manager.executeInApplicationContext(op);\n }", "public static boolean isSystemApplication(){\n return isSystemApplication(getContext().getPackageName());\n }", "public static Context getContext() {\n\t\treturn context;\n\t}", "public static Context getContext() {\n\t\treturn context;\n\t}", "public void setApplicationContext(final ApplicationContext inApplicationContext)\n {\n ctx = inApplicationContext;\n }", "@Override\n\t<T> T runWithContext(Callable<T> callable) throws Exception;" ]
[ "0.63830185", "0.6266079", "0.6231408", "0.6229734", "0.6032006", "0.6016281", "0.6016281", "0.6007229", "0.59580034", "0.5900199", "0.58748627", "0.58478236", "0.58143705", "0.5796511", "0.5757604", "0.56827253", "0.5677225", "0.56554604", "0.564171", "0.56337494", "0.56085646", "0.5599685", "0.5591987", "0.5590502", "0.5580642", "0.55764323", "0.55764323", "0.5570489", "0.5560273", "0.555552", "0.55321664", "0.5531604", "0.550901", "0.55007803", "0.5498178", "0.54927206", "0.5482111", "0.54698145", "0.540722", "0.534909", "0.534909", "0.534872", "0.53328407", "0.532805", "0.5325869", "0.5297543", "0.5277608", "0.5274335", "0.5262003", "0.5252554", "0.5244769", "0.5234148", "0.5232986", "0.521805", "0.52148", "0.5205987", "0.51754194", "0.5173434", "0.51706535", "0.51633817", "0.51513964", "0.51324874", "0.51263666", "0.5122252", "0.51138324", "0.5110211", "0.511014", "0.5101217", "0.5091824", "0.5088941", "0.5083459", "0.5076086", "0.5076086", "0.5055633", "0.5055311", "0.50490457", "0.50361353", "0.5027152", "0.50251937", "0.50193244", "0.50106406", "0.50100595", "0.5009087", "0.5006173", "0.5001408", "0.49943975", "0.49881616", "0.49821922", "0.49810746", "0.49732426", "0.49665615", "0.49664164", "0.49661976", "0.49661636", "0.49585995", "0.49563265", "0.49517512", "0.49310267", "0.49310267", "0.49249285", "0.4918039" ]
0.0
-1
public static final String utsSwitchPortExtModuleId = "utsSwitchPortExtModuleId"; public static final String utsSwitchPortExtPortId = "utsSwitchPortExtPortId"; public static final String utsSwitchPortExtLAGId = "utsSwitchPortExtLAGId"; public static final String utsSwitchPortExtPortType = "utsSwitchPortExtPortType";
public BBS4000PortMibBean(ISnmpProxy aSnmpProxy) { super(aSnmpProxy); init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface EnumsKeyConstants {\n\n /*客户状态*/\n static final String CSTM_STATE = \"CSTM_STATE\";\n\n interface CSTMSTATE {\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*正常*/\n static final String NORMAL = \"01\";\n\n /*停用*/\n static final String BLOCKUP = \"02\";\n\n /*冻结*/\n static final String FROZEN = \"03\";\n }\n\n /*短信类型*/\n static final String SMS_TYPE = \"SMS_TYPE\";\n\n interface SMSTYPE {\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*验证码*/\n static final String VERCODE = \"01\";\n\n /*通知*/\n static final String NOTICE = \"02\";\n\n /*营销*/\n static final String MARKETING = \"03\";\n\n /*未知*/\n static final String UNKNOWN = \"04\";\n }\n\n /*模板类型*/\n static final String SMODEL_TYPE = \"SMODEL_TYPE\";\n\n interface SMODELTYPE {\n /*验证码*/\n static final String VERCODE = \"01\";\n\n /*通知&订单*/\n static final String NOTICE = \"02\";\n }\n\n /*审核状态*/\n static final String AUDIT_STATE = \"AUDIT_STATE\";\n\n interface AUDITSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*审核中*/\n static final String ING = \"01\";\n\n /*审核通过*/\n static final String ED = \"02\";\n\n /*审核驳回*/\n static final String DF = \"03\";\n\n }\n\n /*运营商类型*/\n static final String OPERATOR_TYPE = \"OPERATOR_TYPE\";\n\n interface OPERATORTYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*移动*/\n static final String MOBILE = \"01\";\n\n /*电信*/\n static final String TELECOM = \"02\";\n\n /*联通*/\n static final String UNICOM = \"03\";\n }\n\n /*通道状态*/\n static final String CHANNEL_STATE = \"CHANNEL_STATE\";\n\n interface CHANNELSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*可用*/\n static final String ENABLE = \"01\";\n\n /*禁用*/\n static final String DISABLE = \"02\";\n }\n\n /*短信发送状态*/\n static final String SMSSEND_STATE = \"SMSSEND_STATE\";\n\n interface SMSSENDSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*成功*/\n static final String SUCCESS = \"01\";\n\n /*失败*/\n static final String FAILURE = \"02\";\n\n /*未知*/\n static final String UNKNOWN = \"03\";\n\n /*无效*/\n static final String INVALID = \"04\";\n\n /*其他*/\n static final String OTHER = \"05\";\n }\n\n /*短息接收状态*/\n static final String SMSDELIV_STATE = \"SMSDELIV_STATE\";\n\n interface SMSDELIVSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*收到*/\n static final String DELIV = \"01\";\n\n /*未收到*/\n static final String UNDELIV = \"02\";\n }\n\n /*批次单状态*/\n static final String BATCH_STATE = \"BATCH_STATE\";\n\n interface BATCHSTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*等待发送*/\n static final String WAIT = \"01\";\n\n /*发送中*/\n static final String ING = \"02\";\n\n /*完成*/\n static final String FINISH = \"03\";\n\n /*已撤回*/\n static final String REVOKE = \"04\";\n\n /*已驳回*/\n static final String REJECT = \"05\";\n }\n\n /*适用范围类型*/\n static final String USEAGE_TYPE = \"USEAGE_TYPE\";\n\n interface USEAGETYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*通用*/\n static final String PUB = \"01\";\n\n /*个人*/\n static final String PRI = \"02\";\n }\n\n /*是否发送*/\n static final String SMSSEND_CODE = \"SMSSEND_CODE\";\n\n interface SMSSENDCODE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*发送*/\n static final String SEND = \"01\";\n\n /*不发送*/\n static final String DESEND = \"02\";\n }\n\n /*短信数量增减类型*/\n static final String ACCOUNT_TYPE = \"ACCOUNT_TYPE\";\n\n interface ACCNTTYPE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*充值*/\n static final String ADDITION = \"01\";\n\n /*消费*/\n static final String SUBTRACTION = \"02\";\n\n }\n\n /*充值单审核状态*/\n static final String RECHARGE_STATE = \"RECHARGE_STATE\";\n\n interface RECHARGESTATE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*成功*/\n static final String SUCCESS = \"01\";\n\n /*失败*/\n static final String FAILURE = \"02\";\n\n /*确认中*/\n static final String COMFIRM = \"03\";\n\n /*已取消*/\n static final String CANCEL = \"04\";\n\n }\n\n /*手机号是否在黑名单中*/\n static final String REPLY_BLACK = \"REPLY_BLACK\";\n\n interface REPLYBLACK{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*不在黑名单中*/\n static final String NOTINT = \"01\";\n\n /*在黑名单中*/\n static final String INT = \"02\";\n\n\n }\n /*逻辑删除enable*/\n static final String DELETE_ENABLE = \"DELETE_ENABLE\";\n\n interface DELETEENABLE{\n\n /*已删除*/\n static final Integer DELETE = 0;\n\n /*未删除*/\n static final Integer UNDELE = 1;\n\n\n }\n /*适用范围 模板 通用,个人*/\n static final String SUIT_RANGE = \"SUIT_RANGE\";\n\n interface SUITRANGE{\n\n /*初始化状态*/\n static final String INIT = \"00\";\n\n /*通用*/\n static final String COMMON = \"01\";\n\n /*个人*/\n static final String PERSONAL = \"02\";\n\n\n }\n\n /*使用場景 01 平台 , 02 接口*/\n static final String USE_TYPE = \"USE_TYPE\";\n\n interface USETYPE{\n\n /*平台*/\n static final String PLTFC = \"01\";\n\n /*接口*/\n static final String INTFC = \"02\";\n }\n\n /* 提醒类型 */\n static final String REMIND_TYPE = \"REMIND_TYPE\";\n\n interface REMINDTYPE{\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 短信数量 */\n static final String SMS_NUM = \"01\";\n /* 发送频率*/\n static final String SEND_RATE = \"02\";\n }\n\n /* 阈值类型 */\n static final String THRESHOLD_TYPE = \"THRESHOLD_TYPE\";\n\n interface THRESHOLDTYPE {\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 小于 */\n static final String LESS_THAN = \"01\";\n /* 等于*/\n static final String EQUAL = \"02\";\n /* 大于*/\n static final String GREATER_THAN = \"03\";\n }\n\n /* 客户类型 */\n static final String CSTM_TYPE = \"CSTM_TYPE\";\n\n interface CSTMTYPE{\n /* 未知 */\n static final String UNKNOWN = \"00\";\n /* 个人 */\n static final String PERSON = \"01\";\n /* 企业*/\n static final String COMPANY = \"02\";\n }\n\n /* 支付状态 */\n static final String PAY_TYPE = \"PAY_TYPE\";\n\n interface PAYTYPE{\n /* 审核中 */\n static final String UNPAY = \"01\";\n /* 通过 */\n static final String PAY = \"02\";\n /* 驳回 */\n static final String REJECT = \"03\";\n /* 已取消 */\n static final String CANCEL = \"04\";\n }\n\n /* 任务状态 */\n static final String TASK_STATE = \"TASK_STATE\";\n\n interface TASKSTATE{\n /* 待发送 */\n static final String WAIT_SEND = \"01\";\n /* 已发送 */\n static final String SEND = \"02\";\n /* 成功 */\n static final String SUCCESS = \"03\";\n /* 失败 */\n static final String FAIL = \"04\";\n }\n\n /* 收款账户 */\n static final String PAY_ACCOUNT = \"PAY_ACCOUNT\";\n\n interface PAYACCOUNT{\n /* 个人账户 */\n static final String PRIVATE = \"01\";\n /* 对公账户 */\n static final String PUBLIC = \"02\";\n }\n\n}", "public interface Constants {\n String NA = \"NA\";\n String ARG_USERS=\"user\";\n String SENDER_ID =\"fro9SbG2Eic:APA91bHzUBA35xjcDP7TXu5uG3JetLMENHfJpfKnRjS02-y8W4n1ZonIn9HYNAwjV8F3uiOAV2gXparORINEEps3t0kCZHI2rutU33DaUlDeGJYrKDK_fG9HCdXAq1gNHtfmfqHGDBve\" ;\n}", "public interface Constant {\n\n String ACCESSIBILITY_SERVICE = \"github.hellocsl.smartmonitor/github.hellocsl.smartmonitor.VideoAccessibilityService\";\n\n String QQ_PKG = \"com.tencent.mobileqq\";\n\n String QQ_NUMBER = \"929371293\";\n\n String DIALER = \"com.google.android.dialer\";\n\n String MONITOR_CMD_VIDEO = \"monitor_cmd_video\";\n\n String MONITOR_TAG = \"WaterMonitor\";\n\n String MONITOR_CMD_RESET = \"110\";\n\n String MEIZU_IN_CALL_PKG = \"com.android.incallui\";\n\n //NEXUS 5\n String N5_MODEL = \"Nexus 5\";\n\n //MEIZU\n String MX_MODEL = \"mx\";\n\n\n}", "public interface UUCConstants {\n\t\n\n\tpublic String SERVICE_NAME = \"uuc.service.name\";\n\t\n\tpublic String SERVICE_ID = \"uuc.service.id\";\n\t\n\tpublic String SERVICE_URI = \"uuc.service.url\";\n\n\tpublic String USER_ID = \"uuc.user.id\";\n\t\n\tpublic String USER_NAME = \"uuc.user.name\";\n\t\n\tpublic String USER_EMAIL = \"uuc.user.email\";\n\t\n\tpublic String USER_GROUP=\"uuc.user.group\";\n\t\n\tpublic String USER_TITLE = \"uuc.user.title\";\n\t\n\tpublic String USER_LEVEL = \"uuc.user.level\";\n\t\n\tpublic String USER_PHOTO = \"uuc.user.photo\";\n\t\n\tpublic String USER_PHONE = \"uuc.user.phone\";\n\t\n\tpublic String USER_PASSWORD=\"uuc.user.password\";\n\t\n\tpublic String USER_EMPLOYEE_ID = \"uuc.user.employeeid\";\n}", "public interface Constants {\n int SERVER_PORT = 6001;\n String LOCALHOST = \"127.0.0.1\";\n\n String DEFAULT_PHONE_NUMBER = \"+380965354234\";\n\n}", "public interface Constants {\n /**\n * String representation for the name of the preferences object storing\n * the Parabank connection settings.\n */\n String PREFS_PARABANK = \"parabankConnectionSettings\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the protocol for the HTTP requests.\n */\n @Deprecated\n String PREFS_PARABANK_PROTOCOL = \"protocol\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the host for the HTTP requests.\n */\n String PREFS_PARABANK_HOST = \"host\";\n\n /**\n * String representation for the key within the Parabank preferences\n * object which stores the port for the HTTP requests.\n */\n String PREFS_PARABANK_PORT = \"port\";\n\n /**\n * String representation for key within the {@link android.content.Intent}\n * object which stores the {@link com.parabank.parasoft.app.android.adts.User}\n * object data.\n */\n String INTENT_USER = \"user\";\n String INTENT_PARABANK_URI = \"parabankConnection\";\n}", "public HashMap<String,SLR1_automat.State> get_switches();", "public static String[] commonPortsListNames(){\n String[] portNames = {\n \"File Transfer Protocol (FTP) Data Transfer\"\n ,\"File Transfer Protocol (FTP) Command Control\"\n ,\"Secure Shell (SSH) Secure Login\"\n ,\"Telnet remote login service, unencrypted text messages\"\n ,\"Simple Mail Transfer Protocol (SMTP) E-mail routing\"\n ,\"Domain Name System (DNS) service\"\n ,\"Hypertext Transfer Protocol (HTTP) used in World Wide Web\"\n ,\"Protocol standard for a NetBIOS service on a TCP/UDP transport: Concepts and methods\"\n ,\"HTTP Secure (HTTPS) HTTP over TLS/SSL\"\n ,\"MS Networking access\"\n ,\"Microsoft SQL Server database management system (MSSQL) server\"\n ,\"Microsoft SQL Server database management system (MSSQL) monitor\"\n ,\"MySQL database system\"\n ,\"Microsoft Terminal Server (RDP) officially registered as Windows Based Terminal (WBT)\"\n ,\" Alternative port for HTTP\"};\n return portNames;\n }", "String getSwstatus();", "public interface WebConstants {\n\n String REQUEST_ATTR_ORIGIN_IP = \"ORIGIN_IP\";\n\n String USER_LOGIN_STATUS = \"USER_LOGIN_STATUS\";\n}", "public interface SpConstant {\n\n //------------------------sp file name-----------------\n String DEFAULT_SP_FILE = \"default_sharePreferences\"; // 默认sp\n\n String CUR_USER_VIDEO_DATA = \"CUR_USER_VIDEO_DATA\";\n}", "public interface PaperDbConstants {\n String UNIVERSAL_TYPE = \"universal_flavor_type\";\n String PAPER_ACCESS_TOKEN = \"paper_access_token\";\n\n\n String LIVE = \"LIVE\";\n String DEV = \"DEV\";\n\n String LOGIN_CREDENTIALS = \"logininfo\";\n\n}", "public interface MyConstants {\n String ISPROCTECTED =\"isProctected\";\n String SAFENUMBER = \"safenumber\";\n String SIMNUMBER = \"simnumber\";\n String SPFILE = \"config\";\n String PASSWORD = \"password\";\n String ISSETUP = \"isSetup\";\n}", "public void setSWDES(int param) {\r\n this.localSWDES = param;\r\n }", "public interface SSOURLDefineList {\r\n String SYNC_CHANGES_URL = \"/servlet/com.sino.ams.synchronize.servlet.AssetsUpdateServlet?action=\" + WebActionConstant.QUERY_ACTION;//资产直接变动同步\r\n String SYNC_TRANS_IN_COMP_URL = \"/servlet/com.sino.ams.synchronize.servlet.AssetsCommitServlet?transferType=BTW_COMP&action=\" + WebActionConstant.QUERY_ACTION;// 公司间调拨同步\r\n String SYNC_TRANS_RESULT_URL = \"/servlet/com.sino.ams.synchronize.servlet.AssetsCommitServlet?transferType=P&action=\" + WebActionConstant.QUERY_ACTION;// 调拨结果直接同步\r\n String ASSETS_CONFIRM_INFO_URL = \"/servlet/com.sino.ams.newasset.servlet.AmsAssetsConfirmHeaderServlet?action=\" + WebActionConstant.QUERY_ACTION;// 资产确认信息\r\n}", "public interface IActivityConstants {\n\n public static final int ADD_UNIT_REQ_CODE = 1;\n\n public static final String METRIC_KEY = \"METRIC\";\n\n public static final String KNOT_KEY = \"KNOT\";\n\n public static final String BEUA_KEY = \"BEUAFORT\";\n\n public static final String INPUT_KEY = \"INPUT\";\n\n}", "default public int getCodeToDevicePort()\t\t\t\t{ return 2225; }", "public interface Constants {\n String PATH_SEPARATOR = \"/\";\n String ROOT_DIRECTORY_SYMBOL = \"/\";\n String COMMAND_OPTION_PREFIX = \"-\";\n String SESSION_CLEAR = \"session clear\";\n}", "public interface Const {\n String SERVER_NAME = \"http://xxx.kenit.net/\";\n String SERVER_PATH = \"http://xxx.kenit.net/androidpart/\";\n String GET_PRODUCT_FILE = \"getproduct.php\";\n}", "public interface UserServiceInformationBase extends ISUPParameter {\n \t\n \t//for parameters list see ITU-T Q.763 (12/1999) 3.57\n \t//Recommendation Q.931 (05/98) Table 4-6/Q.931 Bearer capability information element\n \t//Dialogic User Service Information structure : http://www.dialogic.com/webhelp/NASignaling/Release%205.1/NA_ISUP_Layer_Dev_Ref_Manual/user_service_information.htm\n\n \t//LAYER IDENTIFIERS\n \tpublic static final int _LAYER1_IDENTIFIER=0x1;\n\n \tpublic static final int _LAYER2_IDENTIFIER=0x2;\n\n\tpublic static final int _LAYER3_IDENTIFIER=0x3;\n\n \t//CODING STANDART OPTIONS\n \tpublic static final int _CS_CCITT=0;\n \t\n \tpublic static final int _CS_INTERNATIONAL=1;\n \t\n \tpublic static final int _CS_NATIONAL=2;\n \t\n \tpublic static final int _CS_NETWORK=3;\n \t\n \t//INFORMATION TRANSFER CAPABILITIES OPTIONS\n \tpublic static final int _ITS_SPEECH=0;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL=8;\n \t\n \tpublic static final int _ITS_RESTRICTED_DIGITAL=9;\n \t\n \tpublic static final int _ITS_3_1_KHZ=16;\n \t\n \tpublic static final int _ITS_UNRESTRICTED_DIGITAL_WITH_TONES=17;\n \t\n \tpublic static final int _ITS_VIDEO=24;\n \t\n \t//TRANSFER MODE OPTIONS\n \tpublic static final int _TM_CIRCUIT=0;\n \t\n \tpublic static final int _TM_PACKET=2;\n \t\n \t//INFORMATION TRANSFER RATE OPTIONS\n \tpublic static final int _ITR_PACKET_MODE=0;\n \t\n \tpublic static final int _ITR_64=16;\n \t\n \tpublic static final int _ITR_64x2=17;\n \t\n \tpublic static final int _ITR_384=19;\n \t\n \tpublic static final int _ITR_1536=21;\n \t\n \tpublic static final int _ITR_1920=23;\n \t\n \tpublic static final int _ITR_MULTIRATE=24;\n \t\n \t//SYNC/ASYNC OPTIONS\n \tpublic static final int _SA_SYNC=0;\n \t\n \tpublic static final int _SA_ASYNC=1;\n \t\n \t//NEGOTIATION OPTIONS\t\t\n \tpublic static final int _NG_INBAND_NOT_POSSIBLE=0;\n \t\n \tpublic static final int _NG_INBAND_POSSIBLE=1;\n \t\n \t//USER RATE OPTIONS\n \tpublic static final int _UR_EBITS=0;\n \t\n \tpublic static final int _UR_0_6=1;\n \t\n \tpublic static final int _UR_1_2=2;\n \t\n \tpublic static final int _UR_2_4=3;\n \t\n \tpublic static final int _UR_3_6=4;\n \t\n \tpublic static final int _UR_4_8=5;\n \t\n \tpublic static final int _UR_7_2=6;\n \t\n \tpublic static final int _UR_8_0=7;\n \t\n \tpublic static final int _UR_9_6=8;\n \t\n \tpublic static final int _UR_14_4=9;\n \t\n \tpublic static final int _UR_16_0=10;\n \t\n \tpublic static final int _UR_19_2=11;\n \t\n \tpublic static final int _UR_32_0=12;\n \t\n \tpublic static final int _UR_38_4=13;\n \t\n \tpublic static final int _UR_48_0=14;\n \t\n \tpublic static final int _UR_56_0=15;\n \t\n \tpublic static final int _UR_57_6=18;\n \t\n \tpublic static final int _UR_28_8=19;\n \t\n \tpublic static final int _UR_24_0=20;\n \t\n \tpublic static final int _UR_0_1345=21;\n \t\n \tpublic static final int _UR_0_1=22;\n \t\n \tpublic static final int _UR_0_075_ON_1_2=23;\n \t\n \tpublic static final int _UR_1_2_ON_0_075=24;\n \t\n \tpublic static final int _UR_0_050=25;\n \t\n \tpublic static final int _UR_0_075=26;\n \t\n \tpublic static final int _UR_0_110=27;\n \t\n \tpublic static final int _UR_0_150=28;\n \t\n \tpublic static final int _UR_0_200=29;\n \t\n \tpublic static final int _UR_0_300=30;\n \t\n \tpublic static final int _UR_12_0=31;\n \t\n \t//INTERMEDIATE RATE OPTIONS\n \tpublic static final int _IR_NOT_USED=0;\n \t\n \tpublic static final int _IR_8_0=1;\n \t\n \tpublic static final int _IR_16_0=2;\n \t\n \tpublic static final int _IR_32_0=3;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON TX\n \tpublic static final int _NICTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _NICTX_REQUIRED=1;\n \t\n \t//NETWORK INDEPENDENT CLOCK ON RX\n \tpublic static final int _NICRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _NICRX_CAN_ACCEPT=1;\n \t\n \t//FLOW CONTROL ON TX\n \tpublic static final int _FCTX_NOT_REQUIRED=0;\n \t\n \tpublic static final int _FCTX_REQUIRED=1;\n \t\n \t//FLOW CONTROL ON RX\n \tpublic static final int _FCRX_CANNOT_ACCEPT=0;\n \t\n \tpublic static final int _FCRX_CAN_ACCEPT=1;\n \t\n \t//RATE ADAPTATION HEADER OPTIONS\n \tpublic static final int _HDR_INCLUDED=0;\n \t\n \tpublic static final int _HDR_NOT_INCLUDED=1;\n \t\n \t//MULTIFRAME OPTIONS\n \tpublic static final int _MF_NOT_SUPPORTED=0;\n \t\n \tpublic static final int _MF_SUPPORTED=1;\n \t\n \t//MODE OPTIONS\n \tpublic static final int _MODE_BIT_TRANSPARENT=0;\n \t\n \tpublic static final int _MODE_PROTOCOL_SENSITIVE=1;\n \t\n \t//LOGICAL LINK IDENTIFIER OPTIONS\n \tpublic static final int _LLI_256=0;\n \t\n \tpublic static final int _LLI_FULL_NEGOTIATION=1;\n \t\n \t//ASSIGNOR / ASSIGNEE OPTIONS\n \tpublic static final int _ASS_DEFAULT_ASSIGNEE=0;\n \t\n \tpublic static final int _ASS_ASSIGNOR_ONLY=1;\n \t\n \t//INBAND/OUT OF BAND NEGOTIATION OPTIONS\n \tpublic static final int _NEG_USER_INFORMATION=0;\n \t\t\n \tpublic static final int _NEG_INBAND=1;\n \t\t\n \t//STOP BITS OPTIONS\n \tpublic static final int _SB_NOT_USED=0;\n \t\n \tpublic static final int _SB_1BIT=1;\n \t\n \tpublic static final int _SB_1_5BITS=2;\n \t\n \tpublic static final int _SB_2BITS=3;\n \t\n \t//DATA BITS OPTIONS\n \tpublic static final int _DB_NOT_USED=0;\n \t\t\n \tpublic static final int _DB_5BITS=1;\n \t\t\n \tpublic static final int _DB_7BITS=2;\n \t\t\n \tpublic static final int _DB_8BITS=3;\n \t\t\n \t//PARITY INFORMATION\n \tpublic static final int _PAR_ODD=0;\n \t\t\t\n \tpublic static final int _PAR_EVEN=2;\n \t\t\t\n \tpublic static final int _PAR_NONE=3;\n \t\t\n \tpublic static final int _PAR_FORCED_0=4;\n \t\t\n \tpublic static final int _PAR_FORCED_1=5;\n \t\n \t//DUPLEX INFORMATION\n \tpublic static final int _DUP_HALF=0;\n \t\n \tpublic static final int _DUP_FULL=1;\n \t\t\t\n \t//MODEM TYPE INFORMATION\n \tpublic static final int _MODEM_V21=17;\n \t\n \tpublic static final int _MODEM_V22=18;\n \t\n \tpublic static final int _MODEM_V22_BIS=19;\n \t\n \tpublic static final int _MODEM_V23=20;\n \t\n \tpublic static final int _MODEM_V26=21;\n \t\n \tpublic static final int _MODEM_V26_BIS=22;\n \t\n \tpublic static final int _MODEM_V26_TER=23;\n \t\n \tpublic static final int _MODEM_V27=24;\n \t\n \tpublic static final int _MODEM_V27_BIS=25;\n \t\n \tpublic static final int _MODEM_V27_TER=26;\n \t\n \tpublic static final int _MODEM_V29=27;\n \t\n \tpublic static final int _MODEM_V32=29;\n \t\n \tpublic static final int _MODEM_V34=30;\n \t\n \t//LAYER 1 USER INFORMATION OPTIONS\n \tpublic static final int _L1_ITUT_110=1;\n \t\n \tpublic static final int _L1_G11_MU=2;\n \t\n \tpublic static final int _L1_G711_A=3;\n \t\n \tpublic static final int _L1_G721_ADPCM=4;\n \t\t\n \tpublic static final int _L1_G722_G725=5;\n \t\n \tpublic static final int _L1_H261=6;\n \t\n \tpublic static final int _L1_NON_ITUT=7;\n \t\n \tpublic static final int _L1_ITUT_120=8;\n \t\n \tpublic static final int _L1_ITUT_X31=9;\n \t\n \t//LAYER 2 USER INFORMATION OPTIONS\n \tpublic static final int _L2_BASIC=1;\n \t\n \tpublic static final int _L2_Q921=2;\n \t\n \tpublic static final int _L2_X25_SLP=6;\n \t\n \tpublic static final int _L2_X25_MLP=7;\n \t\n \tpublic static final int _L2_T71=8;\n \t\n \tpublic static final int _L2_HDLC_ARM=9;\n \t\n \tpublic static final int _L2_HDLC_NRM=10;\n \t\n \tpublic static final int _L2_HDLC_ABM=11;\n \t\n \tpublic static final int _L2_LAN_LLC=12;\n \t\n \tpublic static final int _L2_X75_SLP=13;\n \t\n \tpublic static final int _L2_Q922=14;\n \t\n \tpublic static final int _L2_USR_SPEC=16;\n \t\n \tpublic static final int _L2_T90=17;\n \t\n \t\n \t//LAYER 3 USER INFORMATION OPTIONS\n \tpublic static final int _L3_Q931=2;\n \t\n \tpublic static final int _L3_T90=5;\n \t\n \tpublic static final int _L3_X25_PLP=6;\n \t\n \tpublic static final int _L3_ISO_8208=7;\n \t\n \tpublic static final int _L3_ISO_8348=8;\n \t\n \tpublic static final int _L3_ISO_8473=9;\n \t\n \tpublic static final int _L3_T70=10;\n \t\n \tpublic static final int _L3_ISO_9577=11;\n \t\n \tpublic static final int _L3_USR_SPEC=16;\n \t\n \t\n \t//LAYER 3 PROTOCOL OPTIONS;\n \tpublic static final int _L3_PROT_IP=204;\n \t\n \tpublic static final int _L3_PROT_P2P=207;\n \t\n \tpublic int getCodingStandart();\n \n \tpublic void setCodingStandart(int codingStandart);\n \t\n \tpublic int getInformationTransferCapability();\n \n \tpublic void setInformationTransferCapability(int informationTransferCapability);\n \n \tpublic int getTransferMode();\n \n \tpublic void setTransferMode(int transferMode);\n \t\n \tpublic int getInformationTransferRate();\n \n \tpublic void setInformationTransferRate(int informationTransferRate);\n \t\n \t//custom rate in 64Kbps units\n \tpublic int getCustomInformationTransferRate();\n \t\n \tpublic void setCustomInformationTransferRate(int informationTransferRate);\n \t\n \t//TO CLEAR USER INFORMATION ON EACH LAYER SET IT TO 0\n \tpublic int getL1UserInformation();\n \n \tpublic void setL1UserInformation(int l1UserInformation);\n \t\n \tpublic int getL2UserInformation();\n \n \tpublic void setL2UserInformation(int l2UserInformation);\n \t\n \tpublic int getL3UserInformation();\n \n \tpublic void setL3UserInformation(int l3UserInformation);\n \t\n \tpublic int getSyncMode();\n \n \tpublic void setSyncMode(int syncMode);\n \t\n \tpublic int getNegotiation();\n \n \tpublic void setNegotiation(int negotiation);\n \t\n \tpublic int getUserRate();\n \n \tpublic void setUserRate(int userRate);\n \t\n \tpublic int getIntermediateRate();\n \n \tpublic void setIntermediateRate(int intermediateRate);\n \t\n \tpublic int getNicOnTx();\n \n \tpublic void setNicOnTx(int nicOnTx);\n \t\n \tpublic int getNicOnRx();\n \n \tpublic void setNicOnRx(int nicOnRx);\n \t\n \tpublic int getFlowControlOnTx();\n \n \tpublic void setFlowControlOnTx(int fcOnTx);\n \t\n \tpublic int getFlowControlOnRx();\n \n \tpublic void setFlowControlOnRx(int fcOnRx);\n \t\n \tpublic int getHDR();\n \n \tpublic void setHDR(int hdr);\n \t\n \tpublic int getMultiframe();\n \n \tpublic void setMultiframe(int multiframe);\n \t\n \tpublic int getMode();\n \n \tpublic void setMode(int mode);\n \t\n \tpublic int getLLINegotiation();\n \n \tpublic void setLLINegotiation(int lli);\n \t\n \tpublic int getAssignor();\n \n \tpublic void setAssignor(int assignor);\n \t\n \tpublic int getInBandNegotiation();\n \n \tpublic void setInBandNegotiation(int inBandNegotiation);\n \t\n \tpublic int getStopBits();\n \n \tpublic void setStopBits(int stopBits);\n \t\n \tpublic int getDataBits();\n \n \tpublic void setDataBits(int dataBits);\n \t\n \tpublic int getParity();\n \n \tpublic void setParity(int parity);\n \t\n \tpublic int getDuplexMode();\n \n \tpublic void setDuplexMode(int duplexMode);\n \t\n \tpublic int getModemType();\n \n \tpublic void setModemType(int modemType);\n \t\n \tpublic int getL3Protocol();\n \n \tpublic void setL3Protocol(int l3Protocol);\n \n }", "public short getPortId(){\n\t\treturn portId;\n\t}", "private static String m128157b(int i) {\n StringBuilder sb = new StringBuilder(\"android:switcher:\");\n sb.append(R.id.edp);\n sb.append(\":\");\n sb.append(i);\n return sb.toString();\n }", "public interface IntConstant {\n /***\n * 调用系统相机\n */\n int CAMERA = 10001;\n /***\n * 调用系统相册\n */\n int PICTURE = 10006;\n /***\n * 跳转 视频选择\n */\n int VIDEO = 10007;\n /**\n *跳转到裁剪界面的 裁剪类型 0: 头像 1:个人背景图\n */\n int CLIPIMAGETYPE_ICON = 0 ;\n int CLIPIMAGETYPE_USERMSGBG = 1 ;\n /**\n * 跳转到 commonWebView 界面 链接类型 0:直接展示 1:订单详情界面 2:显示标题带返回按钮,如果不手动设置title默认读取网页中title\n */\n int WEBVIEWURL_TYPE_NORMAL = 0;\n int WEBVIEWURL_TYPE_SHOWTITLE = 1;\n /**\n * 跳转到任务列表界面 展示的页面\n */\n int TO_TASKLIS_SHOW_JOIN = 0;\n int TO_TASKLIS_SHOW_COLLECTION = 1;\n /**\n * 修改个人信息的请求类型\n */\n int MODIFYUSERINFO_ALL = 2;\n int MODIFYUSERINFO_BASEINFO = 0;\n int MODIFYUSERINFO_IMAGEINFO = 1;\n\n /**您的性别不符合要求*/\n int ERROR_SEX = 29191164;\n /**您尚未绑定社交媒体,是否立刻绑定?*/\n int ERROR_UNBIND = 29191165;\n /**您尚未完善资料,是否立刻填写?*/\n int ERROR_UNCOMPLETED = 29191166;\n /**您的微博粉丝数量与商家的要求不符,是否继续报名?*/\n int ERROR_FANS = 29191167;\n\n}", "public interface AMParams {\r\n static final String RM_WEB = \"rm.web\";\r\n static final String APP_ID = \"app.id\";\r\n static final String JOB_ID = \"job.id\";\r\n static final String TASK_ID = \"task.id\";\r\n static final String TASK_TYPE = \"task.type\";\r\n static final String ATTEMPT_STATE = \"attempt.state\";\r\n static final String COUNTER_GROUP = \"counter.group\";\r\n static final String COUNTER_NAME = \"counter.name\";\r\n}", "int getSnPort();", "int getSnPort();", "public abstract void setSwitchType(String switchType);", "public interface BugRegisterInfor {\n String APP_ID = \"6b82b51788\";\n String APP_KEY = \"09872b4e-8da9-442c-b1ac-4e904829e2d8\";\n}", "default public int getControlToDevicePort()\t\t\t\t{ return 2226; }", "int getS1Port();", "public interface AppConstant {\n\n String BASE_URL = \"https://www.wanandroid.com\";\n\n\n String WEB_SITE_LOGIN = \"user/login\";\n String WEB_SITE_REGISTER = \"user/register\";\n String WEB_SITE_COLLECTIONS = \"lg/collect\";\n String WEB_SITE_UNCOLLECTIONS = \"lg/uncollect\";\n String WEB_SITE_ARTICLE = \"article\";\n\n\n public interface LoginParamsKey {\n String SET_COOKIE_KEY = \"set-cookie\";\n String SET_COOKIE_NAME = \"Cookie\";\n String USER_NAME = \"username\";\n String PASSWORD = \"password\";\n String REPASSWORD = \"repassword\";\n }\n}", "public void setSwitch(String Switch) {\n this.Switch = Switch;\n }", "public void setSwitch(String Switch) {\n this.Switch = Switch;\n }", "public int getPort(){\r\n return localPort;\r\n }", "public int getPort(){\r\n return localPort;\r\n }", "public interface ActivityConstants {\n public static final int SCAN_ACTIVITY = 1001;\n public static final int PREVIOUS_ORDERS_ACTIVITY = 1002;\n public static final String PREFS_NAME = \"LoginData\";\n public static final String PREFS_LOGGED = \"LoggedIn\";\n}", "public interface JpsubsitesSystemConstants {\r\n\t\r\n\t/**\r\n\t * The name of the Spring bean mapping the Subsite Manager.\r\n\t */\r\n\tpublic static final String SUBSITE_MANAGER = \"jpsubsitesSubsiteManager\";\r\n\t\r\n\t/**\r\n\t * The name of the configuration item containing the Subsites Configuration.\r\n\t */\r\n\tpublic static final String SUBSITE_CONFIG_ITEM = \"jpsubsites_subsiteConfig\";\r\n\t\r\n\t/**\r\n\t * The name of the request parameter containing the current subsite.\r\n\t */\r\n\tpublic static final String REQUEST_PARAM_CURRENT_SUBSITE = \"jpsubsites_currentSubsite\";\r\n\t\r\n\tpublic static final String CONTENT_LIST_HELPER = \"jpsubsitesContentListHelper\";\r\n\t\r\n\tpublic static final String BREADCRUMBS_NAVIGATION_PARSER = \"jpsubsitesBreadcrumbsNavigatorParser\";\r\n \r\n public static final String SUBSITE_SUFFIX_SEPARATOR = \"@\";\r\n \r\n public static final String SUBSITE_GROUP_PREFIX = \"subsite\";\r\n \r\n public static final String SESSION_PAR_CURRENT_SUBSITE = \"currentSubsite\";\r\n\t\r\n}", "public interface JNDINames {\n\n /** System configuration JNDI name. */\n public static final String SYS_CONFIG = \n \"hb.Config\";\n\n \n\n /**\n * Map<url, securityMode> related to pages migrated from old traffic system with custom security logic inside the old pages.\n * This Security-Mode will be used by security filter to apply the custome security logic on such URLs for backword\n * compatability\n */\n public static final String SEC_ROLE_SECURITY_MODE = \n \"hb.security.Role.SecurityMode\";\n}", "public interface ServiceConstants {\n\n String TASK_JSON = \"TASK_JSON\";\n String TASK_IDENTIFIER = \"TASK\";\n String TRIGGER_IDENTIFIER = \"TRIGGER\";\n String DEFAULT_GROUP_ID = \"DEFAULT_GROUP\";\n String TASK_ID = \"TASK_ID\";\n String TOPIC_NAME_CACHE_PROPERTY = \"topic_name_by_task_type\";\n String PRODUCER_PROPERTIES_CACHE = \"kafka_producer_properties\";\n String REQUEST_CONSUMER_PROPERTIES_CACHE = \"request_consumer_properties_cache\";\n}", "public interface Constants\n{\n\tString EMAIL = \"email\";\n\tString RECORD_ID = \"_id\";\n\tString ENTRY_DATE = \"entryDate\";\n\tString DATE_FORMAT = \"yyyy-MM-dd'T'HH:mm:ssXXX\";\n\tString LEADS = \"leads\";\n}", "public final String mo14929c() {\n return \"service_monitor\";\n }", "public interface ExtraConstant {\n\n String SERVER_CONFIG = \"server_config\"; // 需要服务器配置的数据\n /********************* 图片预览 ********************/\n String PREVIEW_IMAGE_DATA = \"preview_image_data\";//图片预览\n String PREVIEW_IMAGE_POSITION = \"preview_image_position\";//图片预览默认的显示位置\n String IS_ACTIVITY_INIT = \"is_activity_init\"; // 是否初始化\n String ACTIVITY_CONFIG = \"activity_config\";\n String TOKEN_ENTITY = \"token_entity\"; // 登录标识\n String USER_INFO = \"user_bean\"; // 用户信息\n String WEB_URL = \"web_url\"; // 网页地址\n String WEB_IS_ANALYSIS = \"web_is_analysis\"; // 是否统计\n String RIGHT_CUSTOM_TYPE = \"right_custom_type\"; // 右上角显示在线客服类型\n String CUSTOMDIALOG_TYPE = \"customdialog_type\"; // 自定义弹窗类型\n String EXTRA_VERSION = \"extra_version\";//版本\n String NEED_UPDATE = \"need_update\"; // 是否需要更新\n\n String REPAYMENT_TYPE = \"repayment_type\"; // 代偿模式\n\n}", "public String getSwitch() {\n return this.Switch;\n }", "public String getSwitch() {\n return this.Switch;\n }", "public interface UserConstants {\n String TYPE_AUTH_QQ = \"qq\";\n String TYPE_AUTH_WX = \"wx\";\n String TYPE_AUTH_WB = \"wb\";\n String REG_ILLEGAL = \"[`~!@#$^&*()=|{}':;',\\\\[\\\\].<>/?~!@#¥……&*()—|{}【】‘;:”“'。,、?]\";\n\n String NCODE = \"86\";\n\n String FROM = \"whaleyVR\";\n\n\n int THIRD_ERROR = 1097;\n\n int THIRD_CANCEL = 2889;\n int THIRD_INSTALL = 3054;\n int THIRD_WEIBO = 5650;\n //====================================event====================================//\n String EVENT_LOGIN_SUCCESS = \"login_success\";\n String EVENT_SIGN_OUT = \"sign_out\";\n String EVENT_UPATE_NAME = \"update_name\";\n String EVENT_UPATE_AVATAR = \"update_avatar\";\n String EVENT_LOGIN_CANCEL = \"login_cancel\";\n}", "public interface STConstant {\n\n /** The base resource path for this application. */\n String BASE_RES_PATH = \"/com/sandy/stocktracker/\" ;\n\n /** The date format used for NSE EOD dates in the CSV files. */\n SimpleDateFormat DATE_FMT = new SimpleDateFormat( \"dd-MMM-yyyy\" ) ;\n\n /** The time format used for ITD title displays and general time displays. */\n SimpleDateFormat TIME_FMT = new SimpleDateFormat( \"HH:mm:ss\" ) ;\n\n /** The the expanded time format. */\n SimpleDateFormat DATE_TIME_FMT = new SimpleDateFormat( \"dd-MMM-yyyy HH:mm:ss\" ) ;\n\n /** The prefix for drop values indicating the drop value as scrip name. */\n String DROP_VAL_SCRIP = \"SCRIP:\" ;\n\n /** The application config key against which the install directory is specified. */\n String CFG_KEY_INSTALL_DIR = \"pluto.install.dir\" ;\n\n /** The application config key against which biz start hour is specified. */\n String CFG_KEY_NSE_BIZ_START_HR = \"nse.business.start.time\" ;\n\n /** The application config key against which biz end hour is specified. */\n String CFG_KEY_NSE_BIZ_END_HR = \"nse.business.end.time\" ;\n\n /** The number of days for which to show old news. */\n String CFG_KEY_NUM_OLD_DAYS_NEWS = \"news.display.num.days\" ;\n}", "void mo7356d(C1655s sVar);", "public interface IPSBrandCodeConstants\n{\n public static final int REPOSITORY = 1;\n public static final int SERVER = 2;\n public static final int PUBLISHER = 4;\n public static final int DEVELOPMENT_TOOLS = 8;\n public static final int DATABASE_PUBLISHER = 16;\n public static final int BEA_ACCELERATOR = 32;\n public static final int MULTI_SERVER_MANANGER = 64;\n public static final int CONTENT_CONNECTOR = 128;\n public static final int WORD = 256;\n public static final int INLINE_EDITING = 512;\n public static final int SPRINTA = 1024;\n public static final int APPLICATION_SERVER = 2048;\n public static final int WEB_SERVICES_LISTENER = 4096;\n public static final int DOCUMENT_ASSEMBLER = 8192;\n public static final int WEBSPHERE_ACCELERATOR = 16384;\n public static final int CONVERA_SEARCH = 32768;\n public static final int EKTRON_WEP_XML = 65536;\n public static final int EKTRON_WEBIMAGEFX = 131072;\n\n \n /**\n * Represents types of servers for which codes can be generated.\n */\n public enum ServerTypes\n {\n /**\n * Development server\n */\n DEVELOPMENT(0, \"Development\"),\n \n /**\n * Production server\n */\n PRODUCTION(1, \"Production\"),\n \n /**\n * Test server\n */\n TEST(2, \"Test\"),\n \n /**\n * Failover server\n */\n FAIL0VER(3, \"Fail Over\"),\n \n /**\n * Disaster Recovery server\n */\n DISATER_RECOVERY(4, \"Disaster Recovery\"),\n \n /**\n * Publishing Hub\n */\n PUBLISHING_HUB(5, \"Publishing Hub\");\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private ServerTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this server type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedServerType()\n {\n return mi_value > PRODUCTION.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static ServerTypes valueOf(int s) throws IllegalArgumentException\n {\n ServerTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * Gets list of server types sorted on display name ascending \n * case-insensitive.\n * \n * @return The list, never <code>null</code> or empty.\n */\n public static List<ServerTypes> getSortedValues()\n {\n List<ServerTypes> sortedTypes = new ArrayList<ServerTypes>();\n for (ServerTypes serverTypes : values())\n sortedTypes.add(serverTypes);\n \n Collections.sort(sortedTypes, new Comparator<ServerTypes>() {\n\n public int compare(ServerTypes t1, ServerTypes t2)\n {\n return t1.mi_name.toLowerCase().compareTo(\n t2.mi_name.toLowerCase());\n }});\n \n return sortedTypes;\n }\n \n\n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n }\n \n \n /**\n * Represents types of evals for which codes can be generated.\n */\n public enum EvalTypes\n {\n /**\n * Development server\n */\n NOT_EVAL(0, \"Non-Eval\"),\n \n /**\n * Production server\n */\n M30_DAY(1, \"30 Day Eval\"),\n \n /**\n * Test server\n */\n M60_DAY(2, \"60 Day Eval\"),\n \n /**\n * Failover server\n */\n M90_DAY(3, \"90 Day Eval\"),\n \n /**\n * Disaster Recovery server\n */\n TERM(4, \"Term License\");\n\n \n /**\n * Constructor\n * \n * @param value The integer representation of this type. \n * \n * @param displayName The display name, assumed not <code>null</code> or \n * empty.\n */\n private EvalTypes(int value, String displayName)\n {\n mi_value = value;\n mi_name = displayName;\n }\n \n /**\n * Get the integer value of this eval type\n * \n * @return The value\n */\n public int getValue()\n {\n return mi_value;\n }\n \n /**\n * Returns the display name of this type\n * \n * @return The name, never <code>null</code> or empty.\n */\n @Override\n public String toString()\n {\n return mi_name;\n }\n \n /**\n * Determine if this type is an extended server type. These are types\n * that are not available for codes that don't support extended product\n * info.\n * \n * @return <code>true</code> if it is extended, <code>false</code>\n * otherwise.\n */\n public boolean isExtendedEvalType()\n {\n return mi_value > M90_DAY.mi_value;\n }\n \n /**\n * Lookup enum value by ordinal. Ordinals should be unique. If they are\n * not unique, then the first enum value with a matching ordinal is\n * returned.\n * \n * @param s The enum value\n * \n * @return an enumerated value, never <code>null</code>.\n * \n * @throws IllegalArgumentException if the value does not match\n */\n public static EvalTypes valueOf(int s) throws IllegalArgumentException\n {\n EvalTypes types[] = values();\n for (int i = 0; i < types.length; i++)\n {\n if (types[i].getValue() == s)\n return types[i];\n }\n throw new IllegalArgumentException(\"No match for value: \" + s);\n } \n \n /**\n * The value supplied during construction, immutable.\n */\n private int mi_value;\n \n /**\n * The display name supplied during construction, immutable.\n */\n private String mi_name;\n } \n}", "public interface KeyValueConstants {\n String HARDWARE_NAME = \"hardwareName\";\n String HARDWARE_TYPE = \"HardwareType\";\n String SOFTWARE_ID = \"SoftwareId\";\n String SOFTWARE_COUNT = \"SoftwareCount\";\n String SOFTWARE_DETAILS = \"SoftwareDetails\";\n String HARDWARE_TYPE_ID = \"Type\";\n String HARDWARE_TYPE_NAME = \"HardwareType\";\n String RESOURCE_NAME = \"ResourceName\";\n String RESOURCE_TYPE = \"ResourceType\";\n String ADMIN_NAME = \"AdminName\";\n String REQUESTED_ON=\"RequestedOn\";\n String REQUESTED_TILL=\"RequestedTill\";\n String MAC_ID = \"MacId\";\n String HARDWARE_BRAND = \"HardwareBrand\";\n String AVAILABILITY = \"Availablity\";\n String DESCRIPTION = \"Description\";\n String REQUESTED_BY = \"RequestedBy\";\n String USER_ID = \"UserId\";\n String REQUEST_ID = \"RequestId\";\n String HARDWARE_PENDING_REQUEST_OBJECT = \"hardwarePendingRequestObject\";\n String BRAND = \"Brand\";\n String MODEL = \"Model\";\n String HARDWARE_DETAILS = \"HardwareDetails\";\n String HARDWARE_ID = \"HardwareId\";\n String FIRST_NAME = \"FirstName\";\n String USER_NAME = \"UserName\";\n String FULLNAME = \"FullNAme\";\n String COUNT = \"Count\";\n String RESOURCE_CATEGORY = \"ResourceCategory\";\n String RESOURCE_CATEGORY_ID = \"ResourceCategoryId\";\n String REQUESTED_RESOURCE = \"RequestedResource\";\n String ASSIGNED_TO = \"AssignedTo\";\n String ASSIGNED_FROM_DATE = \"AssignedFromDate\";\n String ASSIGNED_TO_DATE = \"AssignedToDate\";\n String RESOURCE_TITLE = \"RequestTitle\";\n String REQUEST_STATUS = \"RequestStatus\";\n String LICENCE_KEY = \"LicenceKey\";\n String SOFTWARE_KEY_ID = \"SoftwareKeyId\";\n String ASSIGNED_BY = \"AssignedBy\";\n String RESOURCE_ID = \"ResourceId\";\n String ASSIGNED_ON = \"AssignedOn\";\n String SOFTWARE_TYPE = \"SoftwareType\";\n}", "protected void do_switch() {\n {\n bind(OPC.CONST_0); iparmNone();\n pre(FLOW_NEXT); do_const(0); post();\n bind(OPC.CONST_1); iparmNone();\n pre(FLOW_NEXT); do_const(1); post();\n bind(OPC.CONST_2); iparmNone();\n pre(FLOW_NEXT); do_const(2); post();\n bind(OPC.CONST_3); iparmNone();\n pre(FLOW_NEXT); do_const(3); post();\n bind(OPC.CONST_4); iparmNone();\n pre(FLOW_NEXT); do_const(4); post();\n bind(OPC.CONST_5); iparmNone();\n pre(FLOW_NEXT); do_const(5); post();\n bind(OPC.CONST_6); iparmNone();\n pre(FLOW_NEXT); do_const(6); post();\n bind(OPC.CONST_7); iparmNone();\n pre(FLOW_NEXT); do_const(7); post();\n bind(OPC.CONST_8); iparmNone();\n pre(FLOW_NEXT); do_const(8); post();\n bind(OPC.CONST_9); iparmNone();\n pre(FLOW_NEXT); do_const(9); post();\n bind(OPC.CONST_10); iparmNone();\n pre(FLOW_NEXT); do_const(10); post();\n bind(OPC.CONST_11); iparmNone();\n pre(FLOW_NEXT); do_const(11); post();\n bind(OPC.CONST_12); iparmNone();\n pre(FLOW_NEXT); do_const(12); post();\n bind(OPC.CONST_13); iparmNone();\n pre(FLOW_NEXT); do_const(13); post();\n bind(OPC.CONST_14); iparmNone();\n pre(FLOW_NEXT); do_const(14); post();\n bind(OPC.CONST_15); iparmNone();\n pre(FLOW_NEXT); do_const(15); post();\n bind(OPC.OBJECT_0); iparmNone();\n pre(FLOW_NEXT); do_object(0); post();\n bind(OPC.OBJECT_1); iparmNone();\n pre(FLOW_NEXT); do_object(1); post();\n bind(OPC.OBJECT_2); iparmNone();\n pre(FLOW_NEXT); do_object(2); post();\n bind(OPC.OBJECT_3); iparmNone();\n pre(FLOW_NEXT); do_object(3); post();\n bind(OPC.OBJECT_4); iparmNone();\n pre(FLOW_NEXT); do_object(4); post();\n bind(OPC.OBJECT_5); iparmNone();\n pre(FLOW_NEXT); do_object(5); post();\n bind(OPC.OBJECT_6); iparmNone();\n pre(FLOW_NEXT); do_object(6); post();\n bind(OPC.OBJECT_7); iparmNone();\n pre(FLOW_NEXT); do_object(7); post();\n bind(OPC.OBJECT_8); iparmNone();\n pre(FLOW_NEXT); do_object(8); post();\n bind(OPC.OBJECT_9); iparmNone();\n pre(FLOW_NEXT); do_object(9); post();\n bind(OPC.OBJECT_10); iparmNone();\n pre(FLOW_NEXT); do_object(10); post();\n bind(OPC.OBJECT_11); iparmNone();\n pre(FLOW_NEXT); do_object(11); post();\n bind(OPC.OBJECT_12); iparmNone();\n pre(FLOW_NEXT); do_object(12); post();\n bind(OPC.OBJECT_13); iparmNone();\n pre(FLOW_NEXT); do_object(13); post();\n bind(OPC.OBJECT_14); iparmNone();\n pre(FLOW_NEXT); do_object(14); post();\n bind(OPC.OBJECT_15); iparmNone();\n pre(FLOW_NEXT); do_object(15); post();\n bind(OPC.LOAD_0); iparmNone();\n pre(FLOW_NEXT); do_load(0); post();\n bind(OPC.LOAD_1); iparmNone();\n pre(FLOW_NEXT); do_load(1); post();\n bind(OPC.LOAD_2); iparmNone();\n pre(FLOW_NEXT); do_load(2); post();\n bind(OPC.LOAD_3); iparmNone();\n pre(FLOW_NEXT); do_load(3); post();\n bind(OPC.LOAD_4); iparmNone();\n pre(FLOW_NEXT); do_load(4); post();\n bind(OPC.LOAD_5); iparmNone();\n pre(FLOW_NEXT); do_load(5); post();\n bind(OPC.LOAD_6); iparmNone();\n pre(FLOW_NEXT); do_load(6); post();\n bind(OPC.LOAD_7); iparmNone();\n pre(FLOW_NEXT); do_load(7); post();\n bind(OPC.LOAD_8); iparmNone();\n pre(FLOW_NEXT); do_load(8); post();\n bind(OPC.LOAD_9); iparmNone();\n pre(FLOW_NEXT); do_load(9); post();\n bind(OPC.LOAD_10); iparmNone();\n pre(FLOW_NEXT); do_load(10); post();\n bind(OPC.LOAD_11); iparmNone();\n pre(FLOW_NEXT); do_load(11); post();\n bind(OPC.LOAD_12); iparmNone();\n pre(FLOW_NEXT); do_load(12); post();\n bind(OPC.LOAD_13); iparmNone();\n pre(FLOW_NEXT); do_load(13); post();\n bind(OPC.LOAD_14); iparmNone();\n pre(FLOW_NEXT); do_load(14); post();\n bind(OPC.LOAD_15); iparmNone();\n pre(FLOW_NEXT); do_load(15); post();\n bind(OPC.STORE_0); iparmNone();\n pre(FLOW_NEXT); do_store(0); post();\n bind(OPC.STORE_1); iparmNone();\n pre(FLOW_NEXT); do_store(1); post();\n bind(OPC.STORE_2); iparmNone();\n pre(FLOW_NEXT); do_store(2); post();\n bind(OPC.STORE_3); iparmNone();\n pre(FLOW_NEXT); do_store(3); post();\n bind(OPC.STORE_4); iparmNone();\n pre(FLOW_NEXT); do_store(4); post();\n bind(OPC.STORE_5); iparmNone();\n pre(FLOW_NEXT); do_store(5); post();\n bind(OPC.STORE_6); iparmNone();\n pre(FLOW_NEXT); do_store(6); post();\n bind(OPC.STORE_7); iparmNone();\n pre(FLOW_NEXT); do_store(7); post();\n bind(OPC.STORE_8); iparmNone();\n pre(FLOW_NEXT); do_store(8); post();\n bind(OPC.STORE_9); iparmNone();\n pre(FLOW_NEXT); do_store(9); post();\n bind(OPC.STORE_10); iparmNone();\n pre(FLOW_NEXT); do_store(10); post();\n bind(OPC.STORE_11); iparmNone();\n pre(FLOW_NEXT); do_store(11); post();\n bind(OPC.STORE_12); iparmNone();\n pre(FLOW_NEXT); do_store(12); post();\n bind(OPC.STORE_13); iparmNone();\n pre(FLOW_NEXT); do_store(13); post();\n bind(OPC.STORE_14); iparmNone();\n pre(FLOW_NEXT); do_store(14); post();\n bind(OPC.STORE_15); iparmNone();\n pre(FLOW_NEXT); do_store(15); post();\n bind(OPC.LOADPARM_0); iparmNone();\n pre(FLOW_NEXT); do_loadparm(0); post();\n bind(OPC.LOADPARM_1); iparmNone();\n pre(FLOW_NEXT); do_loadparm(1); post();\n bind(OPC.LOADPARM_2); iparmNone();\n pre(FLOW_NEXT); do_loadparm(2); post();\n bind(OPC.LOADPARM_3); iparmNone();\n pre(FLOW_NEXT); do_loadparm(3); post();\n bind(OPC.LOADPARM_4); iparmNone();\n pre(FLOW_NEXT); do_loadparm(4); post();\n bind(OPC.LOADPARM_5); iparmNone();\n pre(FLOW_NEXT); do_loadparm(5); post();\n bind(OPC.LOADPARM_6); iparmNone();\n pre(FLOW_NEXT); do_loadparm(6); post();\n bind(OPC.LOADPARM_7); iparmNone();\n pre(FLOW_NEXT); do_loadparm(7); post();\n bind(OPC.WIDE_M1); iparmNone();\n pre(FLOW_CHANGE); do_wide(-1); post();\n bind(OPC.WIDE_0); iparmNone();\n pre(FLOW_CHANGE); do_wide(0); post();\n bind(OPC.WIDE_1); iparmNone();\n pre(FLOW_CHANGE); do_wide(1); post();\n bind(OPC.WIDE_SHORT); iparmNone();\n pre(FLOW_CHANGE); do_wide_short(); post();\n bind(OPC.WIDE_INT); iparmNone();\n pre(FLOW_CHANGE); do_wide_int(); post();\n bind(OPC.ESCAPE); iparmNone();\n pre(FLOW_CHANGE); do_escape(); post();\n bind(OPC.ESCAPE_WIDE_M1); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(-1); post();\n bind(OPC.ESCAPE_WIDE_0); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(0); post();\n bind(OPC.ESCAPE_WIDE_1); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide(1); post();\n bind(OPC.ESCAPE_WIDE_SHORT); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide_short(); post();\n bind(OPC.ESCAPE_WIDE_INT); iparmNone();\n pre(FLOW_CHANGE); do_escape_wide_int(); post();\n bind(OPC.CATCH); iparmNone();\n pre(FLOW_NEXT); do_catch(); post();\n bind(OPC.CONST_NULL); iparmNone();\n pre(FLOW_NEXT); do_const_null(); post();\n bind(OPC.CONST_M1); iparmNone();\n pre(FLOW_NEXT); do_const(-1); post();\n bind(OPC.CONST_BYTE); iparmNone();\n pre(FLOW_NEXT); do_const_byte(); post();\n bind(OPC.CONST_SHORT); iparmNone();\n pre(FLOW_NEXT); do_const_short(); post();\n bind(OPC.CONST_CHAR); iparmNone();\n pre(FLOW_NEXT); do_const_char(); post();\n bind(OPC.CONST_INT); iparmNone();\n pre(FLOW_NEXT); do_const_int(); post();\n bind(OPC.CONST_LONG); iparmNone();\n pre(FLOW_NEXT); do_const_long(); post();\n bind(OPC.OBJECT); iparmUByte();\n bind(OPC.OBJECT_WIDE); pre(FLOW_NEXT); do_object(); post();\n bind(OPC.LOAD); iparmUByte();\n bind(OPC.LOAD_WIDE); pre(FLOW_NEXT); do_load(); post(); \n bind(OPC.LOAD_I2); iparmUByte();\n bind(OPC.LOAD_I2_WIDE); pre(FLOW_NEXT); do_load_i2(); post();\n bind(OPC.STORE); iparmUByte();\n bind(OPC.STORE_WIDE); pre(FLOW_NEXT); do_store(); post();\n bind(OPC.STORE_I2); iparmUByte();\n bind(OPC.STORE_I2_WIDE); pre(FLOW_NEXT); do_store_i2(); post();\n bind(OPC.LOADPARM); iparmUByte();\n bind(OPC.LOADPARM_WIDE); pre(FLOW_NEXT); do_loadparm(); post();\n bind(OPC.LOADPARM_I2); iparmUByte();\n bind(OPC.LOADPARM_I2_WIDE); pre(FLOW_NEXT); do_loadparm_i2(); post();\n bind(OPC.STOREPARM); iparmUByte();\n bind(OPC.STOREPARM_WIDE); pre(FLOW_NEXT); do_storeparm(); post();\n bind(OPC.STOREPARM_I2); iparmUByte();\n bind(OPC.STOREPARM_I2_WIDE); pre(FLOW_NEXT); do_storeparm_i2(); post();\n bind(OPC.INC); iparmUByte();\n bind(OPC.INC_WIDE); pre(FLOW_NEXT); do_inc(); post(); \n bind(OPC.DEC); iparmUByte();\n bind(OPC.DEC_WIDE); pre(FLOW_NEXT); do_dec(); post(); \n bind(OPC.INCPARM); iparmUByte();\n bind(OPC.INCPARM_WIDE); pre(FLOW_NEXT); do_incparm(); post();\n bind(OPC.DECPARM); iparmUByte();\n bind(OPC.DECPARM_WIDE); pre(FLOW_NEXT); do_decparm(); post();\n bind(OPC.GOTO); iparmByte();\n bind(OPC.GOTO_WIDE); pre(FLOW_CHANGE); do_goto(); post();\n bind(OPC.IF_EQ_O); iparmByte();\n bind(OPC.IF_EQ_O_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, OOP); post();\n bind(OPC.IF_NE_O); iparmByte();\n bind(OPC.IF_NE_O_WIDE); pre(FLOW_CHANGE); do_if(1, NE, OOP); post();\n bind(OPC.IF_CMPEQ_O); iparmByte();\n bind(OPC.IF_CMPEQ_O_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, OOP); post();\n bind(OPC.IF_CMPNE_O); iparmByte();\n bind(OPC.IF_CMPNE_O_WIDE); pre(FLOW_CHANGE); do_if(2, NE, OOP); post();\n bind(OPC.IF_EQ_I); iparmByte();\n bind(OPC.IF_EQ_I_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, INT); post();\n bind(OPC.IF_NE_I); iparmByte();\n bind(OPC.IF_NE_I_WIDE); pre(FLOW_CHANGE); do_if(1, NE, INT); post();\n bind(OPC.IF_LT_I); iparmByte();\n bind(OPC.IF_LT_I_WIDE); pre(FLOW_CHANGE); do_if(1, LT, INT); post();\n bind(OPC.IF_LE_I); iparmByte();\n bind(OPC.IF_LE_I_WIDE); pre(FLOW_CHANGE); do_if(1, LE, INT); post();\n bind(OPC.IF_GT_I); iparmByte();\n bind(OPC.IF_GT_I_WIDE); pre(FLOW_CHANGE); do_if(1, GT, INT); post();\n bind(OPC.IF_GE_I); iparmByte();\n bind(OPC.IF_GE_I_WIDE); pre(FLOW_CHANGE); do_if(1, GE, INT); post();\n bind(OPC.IF_CMPEQ_I); iparmByte();\n bind(OPC.IF_CMPEQ_I_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, INT); post();\n bind(OPC.IF_CMPNE_I); iparmByte();\n bind(OPC.IF_CMPNE_I_WIDE); pre(FLOW_CHANGE); do_if(2, NE, INT); post();\n bind(OPC.IF_CMPLT_I); iparmByte();\n bind(OPC.IF_CMPLT_I_WIDE); pre(FLOW_CHANGE); do_if(2, LT, INT); post();\n bind(OPC.IF_CMPLE_I); iparmByte();\n bind(OPC.IF_CMPLE_I_WIDE); pre(FLOW_CHANGE); do_if(2, LE, INT); post();\n bind(OPC.IF_CMPGT_I); iparmByte();\n bind(OPC.IF_CMPGT_I_WIDE); pre(FLOW_CHANGE); do_if(2, GT, INT); post();\n bind(OPC.IF_CMPGE_I); iparmByte();\n bind(OPC.IF_CMPGE_I_WIDE); pre(FLOW_CHANGE); do_if(2, GE, INT); post();\n bind(OPC.IF_EQ_L); iparmByte();\n bind(OPC.IF_EQ_L_WIDE); pre(FLOW_CHANGE); do_if(1, EQ, LONG); post();\n bind(OPC.IF_NE_L); iparmByte();\n bind(OPC.IF_NE_L_WIDE); pre(FLOW_CHANGE); do_if(1, NE, LONG); post();\n bind(OPC.IF_LT_L); iparmByte();\n bind(OPC.IF_LT_L_WIDE); pre(FLOW_CHANGE); do_if(1, LT, LONG); post();\n bind(OPC.IF_LE_L); iparmByte();\n bind(OPC.IF_LE_L_WIDE); pre(FLOW_CHANGE); do_if(1, LE, LONG); post();\n bind(OPC.IF_GT_L); iparmByte();\n bind(OPC.IF_GT_L_WIDE); pre(FLOW_CHANGE); do_if(1, GT, LONG); post();\n bind(OPC.IF_GE_L); iparmByte();\n bind(OPC.IF_GE_L_WIDE); pre(FLOW_CHANGE); do_if(1, GE, LONG); post();\n bind(OPC.IF_CMPEQ_L); iparmByte();\n bind(OPC.IF_CMPEQ_L_WIDE); pre(FLOW_CHANGE); do_if(2, EQ, LONG); post();\n bind(OPC.IF_CMPNE_L); iparmByte();\n bind(OPC.IF_CMPNE_L_WIDE); pre(FLOW_CHANGE); do_if(2, NE, LONG); post();\n bind(OPC.IF_CMPLT_L); iparmByte();\n bind(OPC.IF_CMPLT_L_WIDE); pre(FLOW_CHANGE); do_if(2, LT, LONG); post();\n bind(OPC.IF_CMPLE_L); iparmByte();\n bind(OPC.IF_CMPLE_L_WIDE); pre(FLOW_CHANGE); do_if(2, LE, LONG); post();\n bind(OPC.IF_CMPGT_L); iparmByte();\n bind(OPC.IF_CMPGT_L_WIDE); pre(FLOW_CHANGE); do_if(2, GT, LONG); post();\n bind(OPC.IF_CMPGE_L); iparmByte();\n bind(OPC.IF_CMPGE_L_WIDE); pre(FLOW_CHANGE); do_if(2, GE, LONG); post();\n bind(OPC.GETSTATIC_I); iparmUByte();\n bind(OPC.GETSTATIC_I_WIDE); pre(FLOW_CALL); do_getstatic(INT); post();\n bind(OPC.GETSTATIC_O); iparmUByte();\n bind(OPC.GETSTATIC_O_WIDE); pre(FLOW_CALL); do_getstatic(OOP); post();\n bind(OPC.GETSTATIC_L); iparmUByte();\n bind(OPC.GETSTATIC_L_WIDE); pre(FLOW_CALL); do_getstatic(LONG); post();\n bind(OPC.CLASS_GETSTATIC_I); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_I_WIDE); pre(FLOW_CALL); do_class_getstatic(INT); post();\n bind(OPC.CLASS_GETSTATIC_O); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_O_WIDE); pre(FLOW_CALL); do_class_getstatic(OOP); post();\n bind(OPC.CLASS_GETSTATIC_L); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_L_WIDE); pre(FLOW_CALL); do_class_getstatic(LONG); post();\n bind(OPC.PUTSTATIC_I); iparmUByte();\n bind(OPC.PUTSTATIC_I_WIDE); pre(FLOW_CALL); do_putstatic(INT); post();\n bind(OPC.PUTSTATIC_O); iparmUByte();\n bind(OPC.PUTSTATIC_O_WIDE); pre(FLOW_CALL); do_putstatic(OOP); post();\n bind(OPC.PUTSTATIC_L); iparmUByte();\n bind(OPC.PUTSTATIC_L_WIDE); pre(FLOW_CALL); do_putstatic(LONG); post();\n bind(OPC.CLASS_PUTSTATIC_I); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_I_WIDE); pre(FLOW_CALL); do_class_putstatic(INT); post();\n bind(OPC.CLASS_PUTSTATIC_O); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_O_WIDE); pre(FLOW_CALL); do_class_putstatic(OOP); post();\n bind(OPC.CLASS_PUTSTATIC_L); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_L_WIDE); pre(FLOW_CALL); do_class_putstatic(LONG); post();\n bind(OPC.GETFIELD_I); iparmUByte();\n bind(OPC.GETFIELD_I_WIDE); pre(FLOW_CALL); do_getfield(INT); post();\n bind(OPC.GETFIELD_B); iparmUByte();\n bind(OPC.GETFIELD_B_WIDE); pre(FLOW_CALL); do_getfield(BYTE); post();\n bind(OPC.GETFIELD_S); iparmUByte();\n bind(OPC.GETFIELD_S_WIDE); pre(FLOW_CALL); do_getfield(SHORT); post();\n bind(OPC.GETFIELD_C); iparmUByte();\n bind(OPC.GETFIELD_C_WIDE); pre(FLOW_CALL); do_getfield(USHORT); post();\n bind(OPC.GETFIELD_O); iparmUByte();\n bind(OPC.GETFIELD_O_WIDE); pre(FLOW_CALL); do_getfield(OOP); post();\n bind(OPC.GETFIELD_L); iparmUByte();\n bind(OPC.GETFIELD_L_WIDE); pre(FLOW_CALL); do_getfield(LONG); post();\n bind(OPC.GETFIELD0_I); iparmUByte();\n bind(OPC.GETFIELD0_I_WIDE); pre(FLOW_NEXT); do_getfield0(INT); post();\n bind(OPC.GETFIELD0_B); iparmUByte();\n bind(OPC.GETFIELD0_B_WIDE); pre(FLOW_NEXT); do_getfield0(BYTE); post();\n bind(OPC.GETFIELD0_S); iparmUByte();\n bind(OPC.GETFIELD0_S_WIDE); pre(FLOW_NEXT); do_getfield0(SHORT); post();\n bind(OPC.GETFIELD0_C); iparmUByte();\n bind(OPC.GETFIELD0_C_WIDE); pre(FLOW_NEXT); do_getfield0(USHORT); post();\n bind(OPC.GETFIELD0_O); iparmUByte();\n bind(OPC.GETFIELD0_O_WIDE); pre(FLOW_NEXT); do_getfield0(OOP); post();\n bind(OPC.GETFIELD0_L); iparmUByte();\n bind(OPC.GETFIELD0_L_WIDE); pre(FLOW_NEXT); do_getfield0(LONG); post();\n bind(OPC.PUTFIELD_I); iparmUByte();\n bind(OPC.PUTFIELD_I_WIDE); pre(FLOW_CALL); do_putfield(INT); post();\n bind(OPC.PUTFIELD_B); iparmUByte();\n bind(OPC.PUTFIELD_B_WIDE); pre(FLOW_CALL); do_putfield(BYTE); post();\n bind(OPC.PUTFIELD_S); iparmUByte();\n bind(OPC.PUTFIELD_S_WIDE); pre(FLOW_CALL); do_putfield(SHORT); post();\n bind(OPC.PUTFIELD_O); iparmUByte();\n bind(OPC.PUTFIELD_O_WIDE); pre(FLOW_CALL); do_putfield(OOP); post();\n bind(OPC.PUTFIELD_L); iparmUByte();\n bind(OPC.PUTFIELD_L_WIDE); pre(FLOW_CALL); do_putfield(LONG); post();\n bind(OPC.PUTFIELD0_I); iparmUByte();\n bind(OPC.PUTFIELD0_I_WIDE); pre(FLOW_NEXT); do_putfield0(INT); post();\n bind(OPC.PUTFIELD0_B); iparmUByte();\n bind(OPC.PUTFIELD0_B_WIDE); pre(FLOW_NEXT); do_putfield0(BYTE); post();\n bind(OPC.PUTFIELD0_S); iparmUByte();\n bind(OPC.PUTFIELD0_S_WIDE); pre(FLOW_NEXT); do_putfield0(SHORT); post();\n bind(OPC.PUTFIELD0_O); iparmUByte();\n bind(OPC.PUTFIELD0_O_WIDE); pre(FLOW_NEXT); do_putfield0(OOP); post();\n bind(OPC.PUTFIELD0_L); iparmUByte();\n bind(OPC.PUTFIELD0_L_WIDE); pre(FLOW_NEXT); do_putfield0(LONG); post();\n bind(OPC.INVOKEVIRTUAL_I); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_I_WIDE); pre(FLOW_CALL); do_invokevirtual(INT); post();\n bind(OPC.INVOKEVIRTUAL_V); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_V_WIDE); pre(FLOW_CALL); do_invokevirtual(VOID); post();\n bind(OPC.INVOKEVIRTUAL_L); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_L_WIDE); pre(FLOW_CALL); do_invokevirtual(LONG); post();\n bind(OPC.INVOKEVIRTUAL_O); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_O_WIDE); pre(FLOW_CALL); do_invokevirtual(OOP); post();\n bind(OPC.INVOKESTATIC_I); iparmUByte();\n bind(OPC.INVOKESTATIC_I_WIDE); pre(FLOW_CALL); do_invokestatic(INT); post();\n bind(OPC.INVOKESTATIC_V); iparmUByte();\n bind(OPC.INVOKESTATIC_V_WIDE); pre(FLOW_CALL); do_invokestatic(VOID); post();\n bind(OPC.INVOKESTATIC_L); iparmUByte();\n bind(OPC.INVOKESTATIC_L_WIDE); pre(FLOW_CALL); do_invokestatic(LONG); post();\n bind(OPC.INVOKESTATIC_O); iparmUByte();\n bind(OPC.INVOKESTATIC_O_WIDE); pre(FLOW_CALL); do_invokestatic(OOP); post();\n bind(OPC.INVOKESUPER_I); iparmUByte();\n bind(OPC.INVOKESUPER_I_WIDE); pre(FLOW_CALL); do_invokesuper(INT); post();\n bind(OPC.INVOKESUPER_V); iparmUByte();\n bind(OPC.INVOKESUPER_V_WIDE); pre(FLOW_CALL); do_invokesuper(VOID); post();\n bind(OPC.INVOKESUPER_L); iparmUByte();\n bind(OPC.INVOKESUPER_L_WIDE); pre(FLOW_CALL); do_invokesuper(LONG); post();\n bind(OPC.INVOKESUPER_O); iparmUByte();\n bind(OPC.INVOKESUPER_O_WIDE); pre(FLOW_CALL); do_invokesuper(OOP); post();\n bind(OPC.INVOKENATIVE_I); iparmUByte();\n bind(OPC.INVOKENATIVE_I_WIDE); pre(FLOW_CALL); do_invokenative(INT); post();\n bind(OPC.INVOKENATIVE_V); iparmUByte();\n bind(OPC.INVOKENATIVE_V_WIDE); pre(FLOW_CALL); do_invokenative(VOID); post();\n bind(OPC.INVOKENATIVE_L); iparmUByte();\n bind(OPC.INVOKENATIVE_L_WIDE); pre(FLOW_CALL); do_invokenative(LONG); post();\n bind(OPC.INVOKENATIVE_O); iparmUByte();\n bind(OPC.INVOKENATIVE_O_WIDE); pre(FLOW_CALL); do_invokenative(OOP); post();\n bind(OPC.FINDSLOT); iparmUByte();\n bind(OPC.FINDSLOT_WIDE); pre(FLOW_CALL); do_findslot(); post();\n bind(OPC.EXTEND); iparmUByte();\n bind(OPC.EXTEND_WIDE); pre(FLOW_NEXT); do_extend(); post();\n bind(OPC.INVOKESLOT_I); iparmNone();\n pre(FLOW_CALL); do_invokeslot(INT); post();\n bind(OPC.INVOKESLOT_V); iparmNone();\n pre(FLOW_CALL); do_invokeslot(VOID); post();\n bind(OPC.INVOKESLOT_L); iparmNone();\n pre(FLOW_CALL); do_invokeslot(LONG); post();\n bind(OPC.INVOKESLOT_O); iparmNone();\n pre(FLOW_CALL); do_invokeslot(OOP); post();\n bind(OPC.RETURN_V); iparmNone();\n pre(FLOW_CHANGE); do_return(VOID); post();\n bind(OPC.RETURN_I); iparmNone();\n pre(FLOW_CHANGE); do_return(INT); post();\n bind(OPC.RETURN_L); iparmNone();\n pre(FLOW_CHANGE); do_return(LONG); post();\n bind(OPC.RETURN_O); iparmNone();\n pre(FLOW_CHANGE); do_return(OOP); post();\n bind(OPC.TABLESWITCH_I); iparmNone();\n pre(FLOW_CHANGE); do_tableswitch(INT); post();\n bind(OPC.TABLESWITCH_S); iparmNone();\n pre(FLOW_CHANGE); do_tableswitch(SHORT); post();\n bind(OPC.EXTEND0); iparmNone();\n pre(FLOW_NEXT); do_extend0(); post();\n bind(OPC.ADD_I); iparmNone();\n pre(FLOW_NEXT); do_add(INT); post();\n bind(OPC.SUB_I); iparmNone();\n pre(FLOW_NEXT); do_sub(INT); post();\n bind(OPC.AND_I); iparmNone();\n pre(FLOW_NEXT); do_and(INT); post();\n bind(OPC.OR_I); iparmNone();\n pre(FLOW_NEXT); do_or(INT); post();\n bind(OPC.XOR_I); iparmNone();\n pre(FLOW_NEXT); do_xor(INT); post();\n bind(OPC.SHL_I); iparmNone();\n pre(FLOW_NEXT); do_shl(INT); post();\n bind(OPC.SHR_I); iparmNone();\n pre(FLOW_NEXT); do_shr(INT); post();\n bind(OPC.USHR_I); iparmNone();\n pre(FLOW_NEXT); do_ushr(INT); post();\n bind(OPC.MUL_I); iparmNone();\n pre(FLOW_NEXT); do_mul(INT); post();\n bind(OPC.DIV_I); iparmNone();\n pre(FLOW_CALL); do_div(INT); post();\n bind(OPC.REM_I); iparmNone();\n pre(FLOW_CALL); do_rem(INT); post();\n bind(OPC.NEG_I); iparmNone();\n pre(FLOW_NEXT); do_neg(INT); post();\n bind(OPC.I2B); iparmNone();\n pre(FLOW_NEXT); do_i2b(); post(); \n bind(OPC.I2S); iparmNone();\n pre(FLOW_NEXT); do_i2s(); post(); \n bind(OPC.I2C); iparmNone();\n pre(FLOW_NEXT); do_i2c(); post(); \n bind(OPC.ADD_L); iparmNone();\n pre(FLOW_NEXT); do_add(LONG); post();\n bind(OPC.SUB_L); iparmNone();\n pre(FLOW_NEXT); do_sub(LONG); post();\n bind(OPC.MUL_L); iparmNone();\n pre(FLOW_NEXT); do_mul(LONG); post();\n bind(OPC.DIV_L); iparmNone();\n pre(FLOW_CALL); do_div(LONG); post();\n bind(OPC.REM_L); iparmNone();\n pre(FLOW_CALL); do_rem(LONG); post();\n bind(OPC.AND_L); iparmNone();\n pre(FLOW_NEXT); do_and(LONG); post();\n bind(OPC.OR_L); iparmNone();\n pre(FLOW_NEXT); do_or(LONG); post();\n bind(OPC.XOR_L); iparmNone();\n pre(FLOW_NEXT); do_xor(LONG); post();\n bind(OPC.NEG_L); iparmNone();\n pre(FLOW_NEXT); do_neg(LONG); post();\n bind(OPC.SHL_L); iparmNone();\n pre(FLOW_NEXT); do_shl(LONG); post();\n bind(OPC.SHR_L); iparmNone();\n pre(FLOW_NEXT); do_shr(LONG); post();\n bind(OPC.USHR_L); iparmNone();\n pre(FLOW_NEXT); do_ushr(LONG); post();\n bind(OPC.L2I); iparmNone();\n pre(FLOW_NEXT); do_l2i(); post(); \n bind(OPC.I2L); iparmNone();\n pre(FLOW_NEXT); do_i2l(); post(); \n bind(OPC.THROW); iparmNone();\n pre(FLOW_CALL); do_throw(); post();\n bind(OPC.POP_1); iparmNone();\n pre(FLOW_NEXT); do_pop(1); post(); \n bind(OPC.POP_2); iparmNone();\n pre(FLOW_NEXT); do_pop(2); post(); \n bind(OPC.MONITORENTER); iparmNone();\n pre(FLOW_CALL); do_monitorenter(); post();\n bind(OPC.MONITOREXIT); iparmNone();\n pre(FLOW_CALL); do_monitorexit(); post();\n bind(OPC.CLASS_MONITORENTER); iparmNone();\n pre(FLOW_CALL); do_class_monitorenter(); post();\n bind(OPC.CLASS_MONITOREXIT); iparmNone();\n pre(FLOW_CALL); do_class_monitorexit(); post();\n bind(OPC.ARRAYLENGTH); iparmNone();\n pre(FLOW_CALL); do_arraylength(); post();\n bind(OPC.NEW); iparmNone();\n pre(FLOW_CALL); do_new(); post(); \n bind(OPC.NEWARRAY); iparmNone();\n pre(FLOW_CALL); do_newarray(); post();\n bind(OPC.NEWDIMENSION); iparmNone();\n pre(FLOW_CALL); do_newdimension(); post();\n bind(OPC.CLASS_CLINIT); iparmNone();\n pre(FLOW_CALL); do_class_clinit(); post();\n bind(OPC.BBTARGET_SYS); iparmNone();\n pre(FLOW_NEXT); do_bbtarget_sys(); post();\n bind(OPC.BBTARGET_APP); iparmNone();\n pre(FLOW_CALL); do_bbtarget_app(); post();\n bind(OPC.INSTANCEOF); iparmNone();\n pre(FLOW_CALL); do_instanceof(); post();\n bind(OPC.CHECKCAST); iparmNone();\n pre(FLOW_CALL); do_checkcast(); post();\n bind(OPC.ALOAD_I); iparmNone();\n pre(FLOW_CALL); do_aload(INT); post();\n bind(OPC.ALOAD_B); iparmNone();\n pre(FLOW_CALL); do_aload(BYTE); post();\n bind(OPC.ALOAD_S); iparmNone();\n pre(FLOW_CALL); do_aload(SHORT); post();\n bind(OPC.ALOAD_C); iparmNone();\n pre(FLOW_CALL); do_aload(USHORT); post();\n bind(OPC.ALOAD_O); iparmNone();\n pre(FLOW_CALL); do_aload(OOP); post();\n bind(OPC.ALOAD_L); iparmNone();\n pre(FLOW_CALL); do_aload(LONG); post();\n bind(OPC.ASTORE_I); iparmNone();\n pre(FLOW_CALL); do_astore(INT); post();\n bind(OPC.ASTORE_B); iparmNone();\n pre(FLOW_CALL); do_astore(BYTE); post();\n bind(OPC.ASTORE_S); iparmNone();\n pre(FLOW_CALL); do_astore(SHORT); post();\n bind(OPC.ASTORE_O); iparmNone();\n pre(FLOW_CALL); do_astore(OOP); post();\n bind(OPC.ASTORE_L); iparmNone();\n pre(FLOW_CALL); do_astore(LONG); post();\n bind(OPC.LOOKUP_I); iparmNone();\n pre(FLOW_CALL); do_lookup(INT); post();\n bind(OPC.LOOKUP_B); iparmNone();\n pre(FLOW_CALL); do_lookup(BYTE); post();\n bind(OPC.LOOKUP_S); iparmNone();\n pre(FLOW_CALL); do_lookup(SHORT); post();\n bind(OPC.PAUSE); iparmNone();\n pre(FLOW_NEXT); do_pause(); post();\n\n/*if[FLOATS]*/\n bind(OPC.FCMPL); iparmNone();\n pre(FLOW_NEXT); do_fcmpl(); post();\n bind(OPC.FCMPG); iparmNone();\n pre(FLOW_NEXT); do_fcmpg(); post();\n bind(OPC.DCMPL); iparmNone();\n pre(FLOW_NEXT); do_dcmpl(); post();\n bind(OPC.DCMPG); iparmNone();\n pre(FLOW_NEXT); do_dcmpg(); post();\n bind(OPC.GETSTATIC_F); iparmUByte();\n bind(OPC.GETSTATIC_F_WIDE); pre(FLOW_CALL); do_getstatic(FLOAT); post();\n bind(OPC.GETSTATIC_D); iparmUByte();\n bind(OPC.GETSTATIC_D_WIDE); pre(FLOW_CALL); do_getstatic(DOUBLE); post();\n bind(OPC.CLASS_GETSTATIC_F); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_F_WIDE); pre(FLOW_CALL); do_class_getstatic(FLOAT); post();\n bind(OPC.CLASS_GETSTATIC_D); iparmUByte();\n bind(OPC.CLASS_GETSTATIC_D_WIDE); pre(FLOW_CALL); do_class_getstatic(DOUBLE); post();\n bind(OPC.PUTSTATIC_F); iparmUByte();\n bind(OPC.PUTSTATIC_F_WIDE); pre(FLOW_CALL); do_putstatic(FLOAT); post();\n bind(OPC.PUTSTATIC_D); iparmUByte();\n bind(OPC.PUTSTATIC_D_WIDE); pre(FLOW_CALL); do_putstatic(DOUBLE); post();\n bind(OPC.CLASS_PUTSTATIC_F); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_F_WIDE); pre(FLOW_CALL); do_class_putstatic(FLOAT); post();\n bind(OPC.CLASS_PUTSTATIC_D); iparmUByte();\n bind(OPC.CLASS_PUTSTATIC_D_WIDE); pre(FLOW_CALL); do_class_putstatic(DOUBLE); post();\n bind(OPC.GETFIELD_F); iparmUByte();\n bind(OPC.GETFIELD_F_WIDE); pre(FLOW_CALL); do_getfield(FLOAT); post();\n bind(OPC.GETFIELD_D); iparmUByte();\n bind(OPC.GETFIELD_D_WIDE); pre(FLOW_CALL); do_getfield(DOUBLE); post();\n bind(OPC.GETFIELD0_F); iparmUByte();\n bind(OPC.GETFIELD0_F_WIDE); pre(FLOW_NEXT); do_getfield0(FLOAT); post();\n bind(OPC.GETFIELD0_D); iparmUByte();\n bind(OPC.GETFIELD0_D_WIDE); pre(FLOW_NEXT); do_getfield0(DOUBLE); post();\n bind(OPC.PUTFIELD_F); iparmUByte();\n bind(OPC.PUTFIELD_F_WIDE); pre(FLOW_CALL); do_putfield(FLOAT); post();\n bind(OPC.PUTFIELD_D); iparmUByte();\n bind(OPC.PUTFIELD_D_WIDE); pre(FLOW_CALL); do_putfield(DOUBLE); post();\n bind(OPC.PUTFIELD0_F); iparmUByte();\n bind(OPC.PUTFIELD0_F_WIDE); pre(FLOW_NEXT); do_putfield0(FLOAT); post();\n bind(OPC.PUTFIELD0_D); iparmUByte();\n bind(OPC.PUTFIELD0_D_WIDE); pre(FLOW_NEXT); do_putfield0(DOUBLE); post();\n bind(OPC.INVOKEVIRTUAL_F); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_F_WIDE); pre(FLOW_CALL); do_invokevirtual(FLOAT); post();\n bind(OPC.INVOKEVIRTUAL_D); iparmUByte();\n bind(OPC.INVOKEVIRTUAL_D_WIDE); pre(FLOW_CALL); do_invokevirtual(DOUBLE); post();\n bind(OPC.INVOKESTATIC_F); iparmUByte();\n bind(OPC.INVOKESTATIC_F_WIDE); pre(FLOW_CALL); do_invokestatic(FLOAT); post();\n bind(OPC.INVOKESTATIC_D); iparmUByte();\n bind(OPC.INVOKESTATIC_D_WIDE); pre(FLOW_CALL); do_invokestatic(DOUBLE); post();\n bind(OPC.INVOKESUPER_F); iparmUByte();\n bind(OPC.INVOKESUPER_F_WIDE); pre(FLOW_CALL); do_invokesuper(FLOAT); post();\n bind(OPC.INVOKESUPER_D); iparmUByte();\n bind(OPC.INVOKESUPER_D_WIDE); pre(FLOW_CALL); do_invokesuper(DOUBLE); post();\n bind(OPC.INVOKENATIVE_F); iparmUByte();\n bind(OPC.INVOKENATIVE_F_WIDE); pre(FLOW_CALL); do_invokenative(FLOAT); post();\n bind(OPC.INVOKENATIVE_D); iparmUByte();\n bind(OPC.INVOKENATIVE_D_WIDE); pre(FLOW_CALL); do_invokenative(DOUBLE); post();\n bind(OPC.INVOKESLOT_F); iparmNone();\n pre(FLOW_CALL); do_invokeslot(FLOAT); post();\n bind(OPC.INVOKESLOT_D); iparmNone();\n pre(FLOW_CALL); do_invokeslot(DOUBLE); post();\n bind(OPC.RETURN_F); iparmNone();\n pre(FLOW_CHANGE); do_return(FLOAT); post();\n bind(OPC.RETURN_D); iparmNone();\n pre(FLOW_CHANGE); do_return(DOUBLE); post();\n bind(OPC.CONST_FLOAT); iparmNone();\n pre(FLOW_CHANGE); do_const_float(); post();\n bind(OPC.CONST_DOUBLE); iparmNone();\n pre(FLOW_CHANGE); do_const_double(); post();\n bind(OPC.ADD_F); iparmNone();\n pre(FLOW_NEXT); do_add(FLOAT); post();\n bind(OPC.SUB_F); iparmNone();\n pre(FLOW_NEXT); do_sub(FLOAT); post();\n bind(OPC.MUL_F); iparmNone();\n pre(FLOW_NEXT); do_mul(FLOAT); post();\n bind(OPC.DIV_F); iparmNone();\n pre(FLOW_NEXT); do_div(FLOAT); post();\n bind(OPC.REM_F); iparmNone();\n pre(FLOW_NEXT); do_rem(FLOAT); post();\n bind(OPC.NEG_F); iparmNone();\n pre(FLOW_NEXT); do_neg(FLOAT); post();\n bind(OPC.ADD_D); iparmNone();\n pre(FLOW_NEXT); do_add(DOUBLE); post();\n bind(OPC.SUB_D); iparmNone();\n pre(FLOW_NEXT); do_sub(DOUBLE); post();\n bind(OPC.MUL_D); iparmNone();\n pre(FLOW_NEXT); do_mul(DOUBLE); post();\n bind(OPC.DIV_D); iparmNone();\n pre(FLOW_NEXT); do_div(DOUBLE); post();\n bind(OPC.REM_D); iparmNone();\n pre(FLOW_NEXT); do_rem(DOUBLE); post();\n bind(OPC.NEG_D); iparmNone();\n pre(FLOW_NEXT); do_neg(DOUBLE); post();\n bind(OPC.I2F); iparmNone();\n pre(FLOW_NEXT); do_i2f(); post(); \n bind(OPC.L2F); iparmNone();\n pre(FLOW_NEXT); do_l2f(); post(); \n bind(OPC.F2I); iparmNone();\n pre(FLOW_NEXT); do_f2i(); post(); \n bind(OPC.F2L); iparmNone();\n pre(FLOW_NEXT); do_f2l(); post(); \n bind(OPC.I2D); iparmNone();\n pre(FLOW_NEXT); do_i2d(); post(); \n bind(OPC.L2D); iparmNone();\n pre(FLOW_NEXT); do_l2d(); post(); \n bind(OPC.F2D); iparmNone();\n pre(FLOW_NEXT); do_f2d(); post(); \n bind(OPC.D2I); iparmNone();\n pre(FLOW_NEXT); do_d2i(); post(); \n bind(OPC.D2L); iparmNone();\n pre(FLOW_NEXT); do_d2l(); post(); \n bind(OPC.D2F); iparmNone();\n pre(FLOW_NEXT); do_d2f(); post(); \n bind(OPC.ALOAD_F); iparmNone();\n pre(FLOW_CALL); do_aload(FLOAT); post();\n bind(OPC.ALOAD_D); iparmNone();\n pre(FLOW_CALL); do_aload(DOUBLE); post();\n bind(OPC.ASTORE_F); iparmNone();\n pre(FLOW_CALL); do_astore(FLOAT); post();\n bind(OPC.ASTORE_D); iparmNone();\n pre(FLOW_CALL); do_astore(DOUBLE); post();\n/*end[FLOATS]*/\n }\n }", "void mo7355c(C1655s sVar);", "public interface MainHandlerConstant {\n int PRINT = 100;\n int UI_CHANGE_INPUT_TEXT_SELECTION = 102;\n int UI_CHANGE_SYNTHES_TEXT_SELECTION = 103;\n int INIT_SUCCESS = 101;\n}", "public abstract String getPeripheralStaticName();", "String getPort();", "public String getSoftwareDriverId();", "public final String getDevicePort(){\n return peripheralPort;\n }", "default public int getStatusFromDevicePort()\t\t\t{ return 2223; }", "void mo7351a(C1655s sVar);", "void mo7354b(C1655s sVar);", "public static String[] portListVul(){\n String [] infoVuln = {\"\"}; \n return infoVuln;\n }", "public interface IssueConstants {\n static final String VIEW_ID = \"net.refractions.udig.issues.view.issues\"; //$NON-NLS-1$\n static final String ISSUES_LIST_EXTENSION_ID = \"net.refractions.udig.issues.issuesList\"; //$NON-NLS-1$\n static final String ISSUES_EXTENSION_ID = \"net.refractions.udig.issues.issue\"; //$NON-NLS-1$\n static final String EXTENSION_CLASS_ATTR = \"class\"; //$NON-NLS-1$\n\n}", "void mo7357e(C1655s sVar);", "public interface Constants {\n public static final short NET_MASK_MAX_LENGTH = 32;\n}", "public interface Constants {\n\n /*TODO KEY VALUE 参数*/\n String BUNDLE = \"bundle\";\n\n /*TODO APP 渠道*/\n String APP_SHANXI = \"SHANXI\";\n}", "public interface IAeProcessTaskConstants\r\n{\r\n public static final String B4P_MANAGER_KEY = \"BPEL4PeopleManager\"; //$NON-NLS-1$\r\n \r\n /** Task ref urn format prefix. Eg: urn:aeb4p:task:[ProcessId] */\r\n public static final String TASK_ID_URN_PREFIX = \"urn:b4p:\"; //$NON-NLS-1$\r\n /** Notification ref urn format prefix. Eg: urn:aeb4p:notification:[ProcessId] */\r\n public static final String NOTIFICATION_ID_URN_PREFIX = \"urn:b4pn:\"; //$NON-NLS-1$\r\n \r\n /** namespaces used in processTaskRequest root element of request to life cycle process */\r\n public static final String TASK_LIFECYCLE_WSDL_NS = \"http://www.activebpel.org/b4p/2007/10/wshumantask/taskLifecycle.wsdl\"; //$NON-NLS-1$\r\n public static final String TASK_LIFECYCLE_NS = \"http://schemas.active-endpoints.com/b4p/wshumantask/2007/10/aeb4p-task-lifecycle-wsdl.xsd\"; //$NON-NLS-1$\r\n public static final String NOTIFICATION_LIFECYCLE_WSDL_NS = \"http://www.activebpel.org/b4p/2007/12/wshumantask/aeb4p-task-notification.wsdl\"; //$NON-NLS-1$\r\n public static final String NOTIFICATION_LIFICYCLE_NS = \"http://schemas.active-endpoints.com/b4p/wshumantask/2007/12/aeb4p-task-notifications-wsdl.xsd\"; //$NON-NLS-1$\r\n public static final String WSHT_NS = IAeWSHTConstants.WSHT_NAMESPACE;\r\n public static final String WSHT_PROTOCOL_NS = \"http://www.example.org/WS-HT/protocol\"; //$NON-NLS-1$\r\n public static final String WSHT_API_NS = \"http://www.example.org/WS-HT/api\"; //$NON-NLS-1$\r\n //fixme (pj) : check with PP/MF - why does TASK_LC_PROCESS_NS = test_people_activity? Use TASK_LIFECYCLE_WSDL_NS instead.\r\n public static final String TASK_LC_PROCESS_NAMESPACE = \"http://www.active-endpoints.com/wsdl/test/test_people_activity\"; //$NON-NLS-1$\r\n public static final String TASK_STATE_WSDL_NS = \"http://schemas.active-endpoints.com/b4p/wshumantask/2007/10/aeb4p-task-state-wsdl.xsd\"; //$NON-NLS-1$\r\n\r\n /** task response status constants */\r\n public static final String SUCCESS_RESPONSE = \"COMPLETED\"; //$NON-NLS-1$\r\n public static final String FAULT_RESPONSE = \"FAILED\"; //$NON-NLS-1$\r\n public static final String SKIPPED_RESPONSE = \"OBSOLETE\"; //$NON-NLS-1$\r\n public static final String TERMINATED_RESPONSE = \"EXITED\"; //$NON-NLS-1$\r\n\r\n \r\n /** task lifecycle request and response messages */\r\n public static final String TASK_REQUEST_PART_NAME = \"processTaskRequest\"; //$NON-NLS-1$\r\n public static final String TASK_RESPONSE_PART_NAME = \"processTaskResponse\"; //$NON-NLS-1$\r\n\r\n /** Notification request part name */\r\n public static final String NOTIFICATION_REQUEST_PART_NAME = \"processNotificationRequest\"; //$NON-NLS-1$\r\n\r\n /** Task request message type qname */\r\n public static final QName PROC_TASK_REQ_MSG = new QName(TASK_LIFECYCLE_WSDL_NS, \"processTaskRequestMessage\"); //$NON-NLS-1$\r\n /** Notification request message type qname */\r\n public static final QName PROC_NOTIFICATION_REQ_MSG = new QName(NOTIFICATION_LIFECYCLE_WSDL_NS, \"processNotificationRequest\"); //$NON-NLS-1$\r\n /** Task cancellation request message type qname */\r\n public static final QName CANCEL_TASK_REQ_MSG = new QName(TASK_LIFECYCLE_WSDL_NS, \"cancelMessage\"); //$NON-NLS-1$\r\n \r\n // Task Attachments Constants */ \r\n public static final String ATTACHMENTS_FROM_ALL = \"all\"; //$NON-NLS-1$\r\n public static final String ATTACHMENTS_FROM_NEW_ONLY = \"newOnly\"; //$NON-NLS-1$\r\n}", "int getIntegPort();", "default public int getClockSynchPort()\t\t\t\t\t{ return 2224; }", "public interface UnionpayConfig {\n String CHARSET = \"UTF-8\";\n String TIME_PATTERN = \"YYYYMMDDhhmmss\";\n\n String getMerId();\n\n String getFrontReturnUrl();\n\n String getBackNotifyUrl();\n\n boolean isEncrypted();\n\n String getTrId();\n}", "Switch getHostSwitch();", "SoftSwitches(SoftSwitch softswitch) {\n this.softswitch = softswitch;\n }", "public interface Constants {\n\tpublic interface Paths { \n\t\tfinal String ELASTIC_PUSH_CONTROLLER_PATH = \"/elastic\" ; \n\t\tfinal String SAVE_TRANSACTION = \"/save\"; \n\t\tfinal String SAVE_TARGETS = \"/saveTargets\";\n\t\tfinal String SAVE_FEEDBACK = \"/saveFeedback\"; \n\t\tfinal String SAVE_FEEDBACK_RESPONSE = \"/v1/saveFeedback\"; \n\t}\n\t\n\tpublic static String SUCCESS= \"success\";\n\tpublic static int UNAUTHORIZED_ID = 401;\n\tpublic static int SUCCESS_ID = 200;\n\tpublic static int FAILURE_ID = 320;\n\tpublic static String UNAUTHORIZED = \"Invalid credentials. Please try again.\";\n\tpublic static String PROCESS_FAIL = \"Process failed, Please try again.\";\n\n}", "public interface WebConstants {\n String SESSION_USER = \"user\";\n}", "String getService_id();", "public interface RouterParamKey {\n\n String NAME = \"name\";\n String VALUE = \"value\";\n String KEY = \"key\";\n String PHONE = \"phone\";\n String USERNAME = \"username\";\n String PASSWORD = \"password\";\n String ID = \"id\";\n String USER_INFO = \"user_info\";\n String PATH = \"path\";\n String PARAM_DATA = \"param_data\";\n\n}", "public interface Constants {\n\n public static final String ACTION_BIND = \"com.avoscloud.beijing.push.demo.keepalive.ACTION_BIND\";\n\n public static final String START_SESSION = \"START_SESSION\";\n public static final int START_SESSION_CODE = 1;\n\n public static final String SEND_MESSAGE = \"SEND_MESSAGE\";\n public static final int SEND_MESSAGE_CODE = 2;\n\n public static final String CLOSE_SESSION = \"CLOSE_SESSION\";\n public static final int CLOSE_SESSION_CODE = 3;\n\n public static final String SEND_MESSAGE_MESSAGE = \"SEND_MESSAGE_message\";\n\n public static final String SEND_MESSAGE_RECEIVERS = \"SEND_MESSAGE_receivers\";\n\n public static final String SESSION_UPDATE = \"SESSION_UPDATE\";\n\n public static final String SESSION_PAUSED = \"SESSION_PAUSED\";\n\n public static final String SESSION_RESUMED = \"SESSION_RESUMED\";\n\n public static final String SESSION_UPDATE_CONTENT = \"SESSION_UPDATE_content\";\n\n public static final String SESSION_UPDATE_TYPE = \"SESSION_UPDATE_type\";\n\n public static final String SESSION_UPDATE_TYPE_NORMAL = \"SESSION_UPDATE_type_normal\";\n\n public static final String SESSION_UPDATE_TYPE_CONTROL = \"SESSION_UPDATE_type_control\";\n\n public static final String SESSION_SHOW_ONLINE = \"SESSION_SHOW_ONLINE\";\n public static final int SESSION_SHOW_ONLINE_CODE = 4;\n\n public static final String SESSION_TRIGGER_PUSH = \"SESSION_TRIGGER_PUSH\";\n public static final int SESSION_TRIGGER_PUSH_CODE = 5;\n}", "public interface TwilioService {\n String ACCOUNT_ID_TEST = \"ACCXXXX\";\n String ACCOUNT_TOKEN_TEST = \"ACXXX\";\n String FROM = \"XXXXX\";\n\n}", "private USBConstant() {\r\n\r\n\t}", "public final String mo14928b() {\n return \"service_monitor\";\n }", "public interface ITLCLaunchUIConstants \n{\n public final static String TAB_MAIN_NAME\t\t\t= \"Main\";\n public final static String TAB_ARGUMENTS_NAME\t\t\t= \"Arguments\";\n \n public final static String TAB_MAIN_ICON_NAME \t\t= \"icons/full/obj16/tlc_launch_main_tab.gif\";\n public final static String TAB_ARGUMENTS_ICON_NAME \t= \"icons/full/obj16/tlc_launch_arguments_tab.gif\";\n}", "public interface TelephonyProperties\n{\n // Fields\n\n public static final java.lang.String PROPERTY_BASEBAND_VERSION = \"gsm.version.baseband\";\n\n public static final java.lang.String PROPERTY_RIL_IMPL = \"gsm.version.ril-impl\";\n\n public static final java.lang.String PROPERTY_OPERATOR_ALPHA = \"gsm.operator.alpha\";\n\n public static final java.lang.String PROPERTY_OPERATOR_NUMERIC = \"gsm.operator.numeric\";\n\n public static final java.lang.String PROPERTY_OPERATOR_ISMANUAL = \"operator.ismanual\";\n\n public static final java.lang.String PROPERTY_OPERATOR_ISROAMING = \"gsm.operator.isroaming\";\n\n public static final java.lang.String PROPERTY_OPERATOR_ISO_COUNTRY = \"gsm.operator.iso-country\";\n\n public static final java.lang.String PROPERTY_LTE_ON_CDMA_PRODUCT_TYPE = \"telephony.lteOnCdmaProductType\";\n\n public static final java.lang.String PROPERTY_LTE_ON_CDMA_DEVICE = \"telephony.lteOnCdmaDevice\";\n\n public static final java.lang.String CURRENT_ACTIVE_PHONE = \"gsm.current.phone-type\";\n\n public static final java.lang.String PROPERTY_SIM_STATE = \"gsm.sim.state\";\n\n public static final java.lang.String PROPERTY_ICC_OPERATOR_NUMERIC = \"gsm.sim.operator.numeric\";\n\n public static final java.lang.String PROPERTY_ICC_OPERATOR_ALPHA = \"gsm.sim.operator.alpha\";\n\n public static final java.lang.String PROPERTY_ICC_OPERATOR_ISO_COUNTRY = \"gsm.sim.operator.iso-country\";\n\n public static final java.lang.String PROPERTY_DATA_NETWORK_TYPE = \"gsm.network.type\";\n\n public static final java.lang.String PROPERTY_INECM_MODE = \"ril.cdma.inecmmode\";\n\n public static final java.lang.String PROPERTY_ECM_EXIT_TIMER = \"ro.cdma.ecmexittimer\";\n\n public static final java.lang.String PROPERTY_IDP_STRING = \"ro.cdma.idpstring\";\n\n public static final java.lang.String PROPERTY_OTASP_NUM_SCHEMA = \"ro.cdma.otaspnumschema\";\n\n public static final java.lang.String PROPERTY_DISABLE_CALL = \"ro.telephony.disable-call\";\n\n public static final java.lang.String PROPERTY_RIL_SENDS_MULTIPLE_CALL_RING = \"ro.telephony.call_ring.multiple\";\n\n public static final java.lang.String PROPERTY_CALL_RING_DELAY = \"ro.telephony.call_ring.delay\";\n\n public static final java.lang.String PROPERTY_CDMA_MSG_ID = \"persist.radio.cdma.msgid\";\n\n public static final java.lang.String PROPERTY_WAKE_LOCK_TIMEOUT = \"ro.ril.wake_lock_timeout\";\n\n public static final java.lang.String PROPERTY_RESET_ON_RADIO_TECH_CHANGE = \"persist.radio.reset_on_switch\";\n\n public static final java.lang.String PROPERTY_SMS_RECEIVE = \"telephony.sms.receive\";\n\n public static final java.lang.String PROPERTY_SMS_SEND = \"telephony.sms.send\";\n\n public static final java.lang.String PROPERTY_TEST_CSIM = \"persist.radio.test-csim\";\n\n}", "public String mo33121a() {\n return \"secure\";\n }", "public interface Constants {\n String LIEPIN_HOST =\"https://h.liepin.com\";\n String SEARCH_URL =\"https://h.liepin.com/cvsearch/soResume/\";\n //String WORK_EXPERIENCE_URL =\"https://h.liepin.com/resume/showresumedetail/showresumeworkexps/\";\n String WORK_EXPERIENCE_URL =\"https://h.liepin.com/resume/showresumedetail/showworkexps/\";\n String ANCHOR_TAG =\"<div class=\\\"resume-work\\\" id=\\\"workexp_anchor\\\">\";\n String GET_METHOD =\"GET\";\n String POST_METHOD =\"POST\";\n}", "@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_LEGO_NXT_SENSOR_PORT,\n defaultValue = DEFAULT_SENSOR_PORT)\n @SimpleProperty(userVisible = false)\n public void SensorPort(String sensorPortLetter) {\n setSensorPort(sensorPortLetter);\n }", "public interface Constants {\r\n public static final String APPLE_PRODUCT_CODE = \"APP1456\";\r\n public static final String ORANGE_PRODUCT_CODE = \"ORG3456\";\r\n public static final Double APPLE_PRODUCT_PRICE = 0.60;\r\n public static final Double ORANGE_PRODUCT_PRICE = 0.25;\r\n public static final int MAGIC_NUMBER_ZERO = 0;\r\n public static final int MAGIC_NUMBER_TWO = 2;\r\n public static final int MAGIC_NUMBER_THREE = 3;\r\n public static final int MAGIC_NUMBER_FIVE = 5;\r\n public static final int MAGIC_NUMBER_SEVEN = 7;\r\n public static final int MAGIC_NUMBER_NINE = 9;\r\n}", "public interface Constants {\n\n final public static String TAG = \"[PracticalTest02Var04]\";\n\n final public static boolean DEBUG = true;\n\n final public static String EMPTY_STRING = \"\";\n\n final public static String QUERY_ATTRIBUTE = \"query\";\n\n final public static String SCRIPT_TAG = \"script\";\n final public static String SEARCH_KEY = \"wui.api_data =\\n\";\n\n final public static String CURRENT_OBSERVATION = \"current_observation\";\n\n}", "private int get_sreg() { return get_ioreg(SREG); }", "int getServicePort();", "private void _getUpdatedSettings() {\n TextView sw1Label = findViewById(R.id.labelSwitch1);\n TextView sw2Label = findViewById(R.id.labelSwitch2);\n TextView sw3Label = findViewById(R.id.labelSwitch3);\n TextView sw4Label = findViewById(R.id.labelSwitch4);\n TextView sw5Label = findViewById(R.id.labelSwitch5);\n TextView sw6Label = findViewById(R.id.labelSwitch6);\n TextView sw7Label = findViewById(R.id.labelSwitch7);\n TextView sw8Label = findViewById(R.id.labelSwitch8);\n\n sw1Label.setText(homeAutomation.settings.switch1Alias);\n sw2Label.setText(homeAutomation.settings.switch2Alias);\n sw3Label.setText(homeAutomation.settings.switch3Alias);\n sw4Label.setText(homeAutomation.settings.switch4Alias);\n sw5Label.setText(homeAutomation.settings.switch5Alias);\n sw6Label.setText(homeAutomation.settings.switch6Alias);\n sw7Label.setText(homeAutomation.settings.switch7Alias);\n sw8Label.setText(homeAutomation.settings.switch8Alias);\n }", "private USI_TRLT() {}", "int getServiceNum();", "public interface Props {\n public final static String HTTP=\"http://\";\n public final static String SEP=\":\";\n public final static String POST_TYPE_JSON=\"application/json\";\n}", "public static int getPort(){\n return catalogue.port;\n }", "public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }", "public void setPort(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localPortTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localPort=param;\r\n \r\n\r\n }", "public interface Constant {\n int TIME_OUT = 30000;\n\n String POST = \"POST\";\n\n String GET = \"GET\";\n}", "public String getSystemID()\n/* */ {\n/* 1299 */ return this.systemID;\n/* */ }", "public void setWebKey(String s)\n {\n ScDecoder x = new ScDecoder(s);\n _firstFlightId = (Integer)x.get();\n _secondFlightId = (Integer)x.get();\n _thirdFlightId = (Integer)x.get();\n _fourthFlightId = (Integer)x.get();\n _fifthFlightId = (Integer)x.get();\n _consignmentNumber = (String)x.get();\n _consignmentExpectedDestinationAirportCode = (String)x.get();\n _upuTagOriginCountryCode = (String)x.get();\n _upuTagOriginLocationCode = (String)x.get();\n _upuTagOriginOfficeOfExchangeQualifier = (String)x.get();\n _upuTagDestinationCountryCode = (String)x.get();\n _upuTagDestinationLocationCode = (String)x.get();\n _upuTagDestinationOfficeOfExchangeQualifier = (String)x.get();\n _upuTagMailCategoryCode = (String)x.get();\n _upuTagMailSubClassCode = (String)x.get();\n _upuTagMailClassCode = (String)x.get();\n _upuTagDispatchYear = (String)x.get();\n _upuTagDispatchSerialNumber = (String)x.get();\n _upuTagReceptacleSerialNumber = (String)x.get();\n _upuTagHighestNumberedReceptacleIndicator = (String)x.get();\n _upuTagInsuredOrRegisteredIndicator = (String)x.get();\n _upuTagWeight = (JwKilogram)x.get();\n }", "java.lang.String getPort();", "java.lang.String getPort();", "public interface Constants {\n final public static String TAG = \"[PracticalTest02Var03]\";\n\n final public static boolean DEBUG = true;\n\n final public static String WEB_SERVICE_ADDRESS = \"http://services.aonaware.com/DictService/DictService.asmx/Define\";\n\n final public static String EMPTY_STRING = \"\";\n\n final public static String QUERY_ATTRIBUTE = \"word\";\n\n final public static String SCRIPT_TAG = \"WordDefinition\";\n final public static String SEARCH_KEY = \"wui.api_data =\\n\";\n\n final public static String CURRENT_OBSERVATION = \"current_observation\";\n}", "public interface Constant {\n //api 说明\n //\n String API= \"/api\";\n\n String AJAXLOGIN =\"ajaxLogin\";\n\n String SAVE = \"register\";\n\n String FORGOT = \"forgot\";\n\n String SUCCESS = \"操作成功\";\n\n String FAIL = \"操作失败\";\n\n //说明\n String LOGIN_SUCCESS = \"登陆成功\";\n\n String PARMS_ERROR = \"参数错误\";\n\n String LOGIN_ERROR= \"账号或密码错误\";\n\n String SAVE_SUCCESS= \"保存成功\";\n\n String SAVE_ERROR= \"保存失败\";\n\n String GET_SUCCESS = \"获取详情成功\";\n\n String GET_ERROR = \"获取详情失败\";\n\n String REGISTER_SUCCESS= \"注册成功\";\n\n String REGISTER_ERROR= \"注册失败\";\n\n}" ]
[ "0.55559576", "0.5546021", "0.5541434", "0.5478411", "0.54016006", "0.5373539", "0.53687817", "0.53582466", "0.53328747", "0.53135103", "0.530407", "0.528886", "0.5274599", "0.5256924", "0.52248764", "0.52210134", "0.52117145", "0.5190957", "0.5183524", "0.5160207", "0.51578933", "0.51503325", "0.51457286", "0.5096799", "0.5084383", "0.5084383", "0.5082473", "0.50806016", "0.5070145", "0.5068188", "0.5064305", "0.5063022", "0.5063022", "0.50580615", "0.50580615", "0.5056773", "0.505111", "0.50425035", "0.50346506", "0.5031382", "0.5029411", "0.50285083", "0.50247204", "0.50247204", "0.50108755", "0.50096875", "0.50077313", "0.4992581", "0.49823216", "0.4969514", "0.4946063", "0.49319828", "0.49319467", "0.4930938", "0.49292535", "0.49249184", "0.4922808", "0.4918074", "0.49175116", "0.49172407", "0.4907845", "0.49052688", "0.48983052", "0.48910657", "0.488294", "0.487163", "0.48675394", "0.48569667", "0.48497087", "0.48423538", "0.48419613", "0.48373675", "0.48291802", "0.48194203", "0.48187807", "0.4808187", "0.47864634", "0.47792155", "0.47728473", "0.4770102", "0.47680697", "0.47634327", "0.4760357", "0.47528177", "0.47513846", "0.47497988", "0.4747492", "0.47465837", "0.47464353", "0.47421587", "0.4741842", "0.47375232", "0.47365063", "0.47365063", "0.4734208", "0.47320125", "0.47282434", "0.47269157", "0.47269157", "0.47229907", "0.47226036" ]
0.0
-1
Increase Team V Score By 3
public void addThreeForTeamV (View v) { vScore = vScore +3; displayForTeamV(vScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void addThreeForTeamA(View v) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void addThreeForTeamK (View v) {\n kScore = kScore +3;\n displayForTeamK(kScore);\n }", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void addThreeForTeamB(View v) {\n scoreTeamB = scoreTeamB + 3;\n displayForTeamB(scoreTeamB);\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void addThreePointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 3;\n displayTeamBScore(scoreTeamB);\n }", "public void addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\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 displayForpoint_three(View view){\n score = score + 3;\n displayForTeamA(score);\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void addTwoForTeamK (View v) {\n kScore = kScore +2;\n displayForTeamK(kScore);\n }", "public void incrementScore(int val) {\n score += val;\n }", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "public void addScore()\n {\n score += 1;\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 }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void addPenaltyA(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void setScore(int score) { this.score = score; }", "public void setScore(int score) {this.score = score;}", "public void displayForpoint_three2(View view){\n score2 = score2 + 3;\n displayForTeamA2(score2);\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\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 incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void addOneForTeamV (View v) {\n vScore = vScore +1;\n displayForTeamV(vScore);\n }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public void addScore(int score);", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "void setScore(long score);", "public void addScore(int score) {\n currentScore += score;\n }", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public void setBonusScore() {\r\n count = count+50;\r\n }", "@Override\n public void onClick (View view){\n\n switch (view.getId()){\n case R.id.btn_3Points:\n mScore += 3;\n break;\n case R.id.btn_2Points:\n mScore += 2;\n break;\n case R.id.btn_FreeThrow:\n mScore += 1;\n break;\n }\n m_tv_TeamScore.setText(String.valueOf(mScore));\n\n }", "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 void add_to_score(int num){\n score+=num;\n }", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void setAwayScore(int a);", "public void testScoreboardCaseThree () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (first Yes counts only Min.Pts)\n \"3,1,A,5,No\", // 20\n \"4,1,A,7,Yes\", // 20 (all runs count!)\n \"5,1,A,9,No\", // 20\n\n \"6,1,B,11,No\", // zero (not solved)\n \"7,1,B,13,No\", // zero (not solved)\n\n \"8,2,A,30,Yes\", // 30\n\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 3 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// String [] rankData = {\n// \"1,team2,1,30\"\n// \"2,team1,1,83\",\n// };\n \n scoreboardTest (2, runsData, rankData);\n }", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "public void setScore(int paScore) {\n this.score = paScore;\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 }", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "void setScoreValue(int scoreValue);", "public void addOneForTeamK (View v) {\n kScore = kScore +1;\n displayForTeamK(kScore);\n }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void setScore(java.lang.Integer value);", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addSixForTeamB(View v) {\n scoreTeamB = scoreTeamB + 6;\n displayForTeamB(scoreTeamB);\n }", "public void aFieldGoal(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void bonusForTeamA(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamA = scoreTeamA + 5;\n displayForTeamA(scoreTeamA);\n }\n\n\n if (questionNumber == 20) {\n endOfRound = \"true\";\n }\n }", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "public void setScore(int v1, int v2, int v3, int v4) {\n mScore[0] = v1;\n mScore[1] = v2;\n mScore[2] = v3;\n mScore[3] = v4;\n }", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }", "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "public void addTwoPointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 2;\n displayTeamBScore(scoreTeamB);\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void addPointForTeamA(View view) {\n teamA_score = teamA_score + 1;\n if (ADVANTAGE == 1) {\n advantageMode(teamA_score, teamB_score);\n } else\n checkScore(teamA_score, teamB_score);\n }", "float getScore();", "float getScore();", "public void setScore(int score)\n {\n this.score = score;\n }", "protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}", "public void addTwoForTeamB(View v) {\n scoreTeamB = scoreTeamB + 2;\n displayForTeamB(scoreTeamB);\n }", "public void give_score(int n){\n final_score=0.25*(n-m.get_m()+1)+0.2*(n-h.get_h()+1)+0.25*(n-l.get_l()+1)+0.3*(n-a.get_a()+1);\r\n }", "void setBestScore(double bestScore);", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "long getScore();" ]
[ "0.7557836", "0.75149953", "0.7470683", "0.7430356", "0.7365886", "0.7287613", "0.727331", "0.7144939", "0.71023005", "0.7042746", "0.7017643", "0.7017251", "0.69536734", "0.69446766", "0.69413215", "0.6895945", "0.6851393", "0.6845216", "0.68254924", "0.68082047", "0.68042386", "0.6784413", "0.67625797", "0.6762495", "0.67567205", "0.6733259", "0.67204106", "0.6717798", "0.67089504", "0.67088175", "0.67019737", "0.6694512", "0.66937554", "0.6692244", "0.6688211", "0.6673139", "0.66597456", "0.66259396", "0.6617306", "0.66162527", "0.6612513", "0.6610069", "0.6593063", "0.6569983", "0.65594023", "0.65529853", "0.6548242", "0.65306246", "0.6525572", "0.6518642", "0.65180033", "0.65133345", "0.650845", "0.65016866", "0.6493168", "0.6484607", "0.6466766", "0.6461953", "0.64457834", "0.6444436", "0.64360625", "0.643148", "0.6422691", "0.64214873", "0.64057887", "0.6398674", "0.6398674", "0.63972706", "0.6386407", "0.6384456", "0.63809305", "0.6378579", "0.6377025", "0.63703156", "0.6370276", "0.63681346", "0.6367192", "0.6357382", "0.63475883", "0.6347445", "0.63313276", "0.6319657", "0.63118756", "0.6294718", "0.625637", "0.6254934", "0.62535626", "0.6253426", "0.62436634", "0.62436634", "0.6238655", "0.62370753", "0.62370753", "0.62289596", "0.62243116", "0.62216055", "0.6215606", "0.620792", "0.6202505", "0.61991537" ]
0.7726774
0
Increase Team V Score By 2
public void addTwoForTeamV (View v) { vScore = vScore +2; displayForTeamV(vScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "public void addTwoForTeamK (View v) {\n kScore = kScore +2;\n displayForTeamK(kScore);\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "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 addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\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 updateScore(int score){ bot.updateScore(score); }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public void addScore()\n {\n score += 1;\n }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void addTwoForTeamB(View v) {\n scoreTeamB = scoreTeamB + 2;\n displayForTeamB(scoreTeamB);\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void addTwoPointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 2;\n displayTeamBScore(scoreTeamB);\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void addToScore(int score)\n {\n this.score += score;\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 }", "public void incrementScore(int val) {\n score += val;\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void addScore(int score);", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public void setScore(int score) { this.score = score; }", "public void setScore(int score) {this.score = score;}", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "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 setAwayScore(int a);", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "private void scoregain() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1+2;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2+2;\n }\n }", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public void addOneForTeamV (View v) {\n vScore = vScore +1;\n displayForTeamV(vScore);\n }", "void setScore(long score);", "public void addThreeForTeamV (View v) {\n vScore = vScore +3;\n displayForTeamV(vScore);\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void add_to_score(int num){\n score+=num;\n }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\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 }", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "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 void incrementScore(int increment) {\n score = score + increment;\n }", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "public void setBonusScore() {\r\n count = count+50;\r\n }", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "public void displayForpoint_two2(View view){\n score2 = score2 + 2;\n displayForTeamA2(score2);\n }", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void raiseScoreSecondRightNeighbor(int value) {\n\t\tplayers.get((players.indexOf(current)+2)%players.size()).raiseScore(value);\n\t}", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "void setScoreValue(int scoreValue);", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "protected double newCompundScore(double score, double score2) {\n return score + score2;\n }", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "public boolean addScoreTeamTwo(int points) throws ByeMatchException\r\n\t{\r\n\t\tif (isByeMatch)\r\n\t\t{\r\n\t\t\tthrow new ByeMatchException();\r\n\t\t}\r\n\t\tscore2 = score2 + points;\r\n\t\treturn true;\r\n\t}", "public void displayForpoint_one2(View view){\n score2 = score2 + 1;\n displayForTeamA2(score2);\n }", "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void setScore(java.lang.Integer value);", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void updateScoreBoard() {\n Player player1 = playerManager.getPlayer(1);\n Player player2 = playerManager.getPlayer(2);\n MainActivity mainActivity = (MainActivity) this.getContext();\n\n mainActivity.updateScoreBoard(player1, player2);\n }", "public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "void setBestScore(double bestScore);", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void addThreePointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 3;\n displayTeamBScore(scoreTeamB);\n }", "public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }", "public void addThreeForTeamA(View v) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void addSixForTeamB(View v) {\n scoreTeamB = scoreTeamB + 6;\n displayForTeamB(scoreTeamB);\n }", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "@Override\npublic void update(int score) {\n\t\n}", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "public boolean setScoreTeamTwo(int score)\r\n\t{\r\n\t\tif (!editableMatch)\r\n\t\t\treturn false;\r\n\t\tscore2 = score;\r\n\t\treturn true;\r\n\t}", "void addPointsToScore(int points) {\n score += points;\n }", "int getScore();", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }" ]
[ "0.76546687", "0.74993724", "0.7415725", "0.730533", "0.72675717", "0.72644615", "0.7244122", "0.71880424", "0.7182534", "0.7160598", "0.71425194", "0.71363515", "0.7123729", "0.70771706", "0.7072868", "0.70678425", "0.7025957", "0.7014315", "0.7007146", "0.6948292", "0.69441867", "0.692805", "0.6925755", "0.69149077", "0.69072837", "0.68878686", "0.6884991", "0.68793416", "0.6823308", "0.68220305", "0.6819571", "0.6788513", "0.6778653", "0.67774487", "0.6758733", "0.6749763", "0.67375416", "0.6726826", "0.6723705", "0.6717054", "0.6716542", "0.6715653", "0.671021", "0.6700404", "0.66949725", "0.6683709", "0.6660751", "0.6659272", "0.6654978", "0.6647645", "0.6645336", "0.66383094", "0.66267854", "0.6615294", "0.6613775", "0.6608749", "0.6597976", "0.6596857", "0.65938765", "0.65908027", "0.6584337", "0.6571911", "0.65689623", "0.6558182", "0.65309584", "0.6530403", "0.6529429", "0.65275747", "0.6527483", "0.6516852", "0.6508378", "0.6505898", "0.65043783", "0.6474572", "0.64717895", "0.64594936", "0.6455479", "0.6443739", "0.643589", "0.643589", "0.64297307", "0.6424146", "0.6423", "0.6421482", "0.64214134", "0.6419933", "0.6418754", "0.6415044", "0.6414274", "0.6413088", "0.6405692", "0.6403093", "0.6395057", "0.63904905", "0.6380756", "0.6378203", "0.6377986", "0.637648", "0.6374248", "0.6373345" ]
0.7703156
0
Increase Team V Score By 1
public void addOneForTeamV (View v) { vScore = vScore +1; displayForTeamV(vScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "public void addScore()\n {\n score += 1;\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\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 updateScore(int score){ bot.updateScore(score); }", "public void incrementScore(int val) {\n score += val;\n }", "public void addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\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 updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "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 addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void addScore(int score) {\n currentScore += score;\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 }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addScore(int score);", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "public void setScore(int score) {this.score = score;}", "public void setScore(int score) { this.score = score; }", "public void add_to_score(int num){\n score+=num;\n }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "public void addThreeForTeamV (View v) {\n vScore = vScore +3;\n displayForTeamV(vScore);\n }", "public void addOneForTeamK (View v) {\n kScore = kScore +1;\n displayForTeamK(kScore);\n }", "public void addTwoForTeamK (View v) {\n kScore = kScore +2;\n displayForTeamK(kScore);\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "void setScore(long score);", "public void addScore(int s) {\n setScore(getScore() + s);\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 }", "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 }", "void setScoreValue(int scoreValue);", "public void setBonusScore() {\r\n count = count+50;\r\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public static void incrementActivityScore() {\n\t\tmActivityScore++;\n\t\tsaveScore();\n\t}", "public void setAwayScore(int a);", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public void updateScore()\n {\n nextPipe = pipes.get(score);\n if(CHARACTER_X > nextPipe.getPipeCapX() + 35)\n {\n score++;\n }\n if(score > highScore)\n {\n highScore = score;\n }\n }", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }", "public void setScore(java.lang.Integer value);", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void addThreeForTeamA(View v) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "@Override\n public void onClick (View view){\n\n switch (view.getId()){\n case R.id.btn_3Points:\n mScore += 3;\n break;\n case R.id.btn_2Points:\n mScore += 2;\n break;\n case R.id.btn_FreeThrow:\n mScore += 1;\n break;\n }\n m_tv_TeamScore.setText(String.valueOf(mScore));\n\n }", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "public void addOnePointToTeamA(View view)\n {\n scoreTeamA++;\n displayTeamAScore(scoreTeamA);\n }", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "public void addPointForTeamA(View view) {\n teamA_score = teamA_score + 1;\n if (ADVANTAGE == 1) {\n advantageMode(teamA_score, teamB_score);\n } else\n checkScore(teamA_score, teamB_score);\n }", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\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}", "@Override\npublic void update(int score) {\n\t\n}", "public void awardPoints(int points)\n {\n score += points ;\n }", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }", "public void addOneForTeamB(View v) {\n scoreTeamB = scoreTeamB + 1;\n displayForTeamB(scoreTeamB);\n }", "public void addThreeForTeamK (View v) {\n kScore = kScore +3;\n displayForTeamK(kScore);\n }", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "void addPointsToScore(int points) {\n score += points;\n }", "public void resetScoreA(View v) {\n scoreTeamA = 0;\n\n displayForTeamA(scoreTeamA);\n\n\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void addToScore(int ammount){\n\t\tscore+=ammount;\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 }", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public void addPenaltyA(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\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 scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}" ]
[ "0.78866446", "0.76938444", "0.75961345", "0.7561192", "0.7523265", "0.7437026", "0.7390469", "0.7382073", "0.7337693", "0.7292935", "0.7228853", "0.7197394", "0.7184954", "0.7163608", "0.71063465", "0.70946294", "0.7060881", "0.705336", "0.7052486", "0.70512635", "0.70510846", "0.70466435", "0.70396215", "0.70368624", "0.70368624", "0.7019372", "0.7005371", "0.69987035", "0.6986143", "0.69778234", "0.6976704", "0.6968851", "0.69520926", "0.6939815", "0.69304395", "0.69298506", "0.692251", "0.68974227", "0.68771815", "0.68637115", "0.6843781", "0.68183005", "0.68179893", "0.6816359", "0.6800804", "0.6791593", "0.6772686", "0.67697084", "0.6757563", "0.674705", "0.6743481", "0.6741481", "0.6738278", "0.67150027", "0.66778857", "0.667075", "0.66608334", "0.66603553", "0.6653173", "0.66486895", "0.6635793", "0.6632695", "0.6627439", "0.6621085", "0.66027755", "0.66027755", "0.6585654", "0.65822446", "0.6573959", "0.6569287", "0.6568379", "0.6566777", "0.6566317", "0.65662163", "0.6562157", "0.6561587", "0.65559393", "0.655318", "0.6550585", "0.6547371", "0.65397954", "0.65393335", "0.65370566", "0.6526485", "0.6526485", "0.6525576", "0.6523028", "0.65194523", "0.6505886", "0.649891", "0.6498103", "0.6492758", "0.6492758", "0.64842093", "0.64813787", "0.64792246", "0.64747185", "0.6470419", "0.64667386", "0.64662343" ]
0.734796
8
Displays the given score for Team V.
public void displayForTeamV(int score) { TextView scoreView = (TextView) findViewById(R.id.team_v_score); scoreView.setText(String.valueOf(score)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamB(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "private void printScore() {\r\n View.print(score);\r\n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "public void displayVisitorScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.visitor_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "private void displayTeamBScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamBScore);\n scoreTextView.setText(num +\"\");\n }", "public void displayForpoint_one(View view){\n score = score + 1;\n displayForTeamA(score);\n }", "public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void displayForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_lpool);\n scoreView.setText(String.valueOf(score));\n }", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "public void displayFoulForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.foul_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForpoint_three(View view){\n score = score + 3;\n displayForTeamA(score);\n }", "public void displayForpoint_three2(View view){\n score2 = score2 + 3;\n displayForTeamA2(score2);\n }", "public void displayYcardForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yellow_card_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForpoint_one2(View view){\n score2 = score2 + 1;\n displayForTeamA2(score2);\n }", "public void displayForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_madrid);\n scoreView.setText(String.valueOf(score));\n\n }", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "public void displayForPlayerB(int score) {\n scoreViewPlayerB.setText(String.valueOf(score));\n }", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public void displayRcardForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.red_card_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void displayFoulForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.foul_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void displayYelowCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowCardAtext);\n scoreView.setText(String.valueOf(score));\n }", "public void displayY_CardForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yellow_card_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "public static void displayScore(final Quiz quiz) {\n // write your code here\n // to display the score\n // report using quiz object.\n if (getflag()) {\n return;\n }\n System.out.println(quiz.showReport());\n }", "private void displayScore(int score) {\n\n String strScore = String.valueOf (score);\n String message = getString (R.string.yourScoreIs) + strScore + getString (R.string.outOf6);\n\n if (score == 0) message += getString (R.string.score_zero);\n\n if (score == 1 || score == 2 || score == 3) message += getString (R.string.score_low);\n\n if (score == 4 || score == 5) message += getString (R.string.score_notBad);\n\n if (score == 6) message += getString (R.string.score_six);\n\n Toast.makeText (getApplicationContext (), message, Toast.LENGTH_LONG).show ();\n\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void displayYelowCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "@Override\n\tpublic void printScore() {\n\n\t}", "public void displayForpoint_two2(View view){\n score2 = score2 + 2;\n displayForTeamA2(score2);\n }", "public void displayRedCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardAtext);\n scoreView.setText(String.valueOf(score));\n }", "public void displayHomeScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.home_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "@SuppressLint(\"SetTextI18n\")\r\n private void displayScore() {\r\n\r\n\r\n mFinalScore.setText(\"Final score: \" + mScore);\r\n mQuestionView.setVisibility(View.GONE);\r\n mOption1.setVisibility(View.GONE);\r\n mOption2.setVisibility(View.GONE);\r\n mOption3.setVisibility(View.GONE);\r\n mNext.setVisibility(View.GONE);\r\n mTimer.setVisibility(View.GONE);\r\n mScoreView.setVisibility(View.GONE);\r\n mTimerLabel.setVisibility(View.GONE);\r\n mBackToStart.setVisibility(View.VISIBLE);\r\n\r\n }", "public void addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public void displayRedCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "public static List<String> getScoreDetails(final Match match){\n\t\tArrayList<String> scoreList = new ArrayList<String>(2);\n\t\tString scoreDisplay = \"\";\n\t\t\t\t\n\t\t// If a game has been played, get the card information\n\t\tif(match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tString strScoreDetails = \"\";\n\t\t\t// Check if the match went to penalties\n\t\t\tif(match.isPenalties()){\n\t\t\t\tstrScoreDetails = \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\n\t\t\t\t\"<b>(</b>\" + Escaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b>\";\n\t\t\t}else{\n\t\t\t\tstrScoreDetails = Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Writing the actual score\n\t\tif(match.getCurrentStatus() == MatchStatus.NOT_YET_PLAYED)\n\t\t{\t\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\"> Vs </td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\";\n\t\t\n\t\t\t// If the match went to penalties, then display it in the score\n\t\t\tif(match.isPenalties()){\n\t\t\t\tscoreDisplay = scoreDisplay + \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" + \n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"<b>(</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b></td>\";\n\t\t\t}else{\n\t\t\t\tscoreDisplay = scoreDisplay + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\"</td>\";\t\t\n\t\t\t}\n\t\t}else if (match.getCurrentStatus() == MatchStatus.CANCELLED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">CANCELLED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.POSTPONED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">POSTPONED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"*</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.DOUBLE_FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"**</td>\";\n\t\t}\n\t\t\n\t\t// Populate the array with the tooltip and the score\n\t\tscoreList.add(scoreDisplay);\n\t\treturn scoreList;\n\t}", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "public void displayR_CardForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.red_card_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "private void scoreDialog() {\n JPanel jp = new JPanel();\n \n Box verticalBox = Box.createVerticalBox();\n \n JLabel scoreTitle = new JLabel(\"<html><font size=13><center>Score: \" + challengeModel.getChallenge().getScore().getScorePoints() + \"</center></font></html>\");\n scoreTitle.setAlignmentX(CENTER_ALIGNMENT);\n verticalBox.add(scoreTitle);\n \n Box horizontalBox = Box.createHorizontalBox();\n String scoreResult = \"\" + challengeModel.getChallenge().getScore().getGold() + challengeModel.getChallenge().getScore().getSilver() + challengeModel.getChallenge().getScore().getBronze();\n switch(Integer.parseInt(scoreResult)) {\n case 111: // Gold, Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalGold()));\n case 11: // Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalSilver()));\n case 1: // Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalBronze()));\n break;\n default:\n break;\n }\n \n verticalBox.add(horizontalBox);\n \n jp.add(verticalBox);\n \n int value = JOptionPane.showOptionDialog(null, jp, \"Fim do desafio\", JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, new String[] {\"Novo Desafio\"}, 1);\n \n hideAnswerResult(false);\n \n if (value == 0)\n challengeModel.newGame();\n }", "public void addOneForTeamV (View v) {\n vScore = vScore +1;\n displayForTeamV(vScore);\n }", "public void printScore(PrintWriter out) {\n out.format(\"SCORE OF %d PLAYERS%n\", players.size());\n out.println(\"ID\\tCASH\\tTYPE\");\n \t\n // Cria uma lista com os jogadores\n \tList<Competitor> score = new ArrayList<Competitor>(players.keySet());\n\n \t// Ordena os jogadores com base no total de cash\n \tCollections.sort(score, new PlayerComparator());\n\n \t// Imprime os resultados\n \tfor(Competitor c : score) {\n \t\tout.format(\"%d.%d\\t%.2f\\t(%s)%n\", players.get(c).Type,\n players.get(c).Id, c.getTotalCash(),\n c.getClass().getSimpleName());\n \t}\n out.flush();\n }", "public void updateHighestScoreDisplay(int score){\n this.score.setText(\"Highest Score: \"+score);\n }", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void displayTriesForPlayerA(int score) {\n triesViewPlayerA.setText(String.valueOf(score));\n }", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "void setScore(int score) {\n lblScore.setText(String.valueOf(score));\n }", "public void setMyScoreDisplay(String score) {\n myScoreDisplay.setText(score);\n }", "private String getScore(){\n return whiteName + \" : \" + blackName + \" - \" + whiteScore + \" : \" + blackScore;\n }", "public float displayScore(float score) {\n score = Math.round(score / 10f * 100f);\n return score;\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "private void showSpecificWobblyScore(MessageChannel channel) {\n int index = 0;\n try {\n index = Integer.parseInt(matchId) - 1;\n }\n catch(NumberFormatException e) {\n e.printStackTrace();\n }\n if(index < 0 || index > leaderboard.size() - 1) {\n channel.sendMessage(\"That's not a rank!\").queue();\n return;\n }\n WobblyScore score = leaderboard.get(index);\n Map map = score.getMap();\n\n EmbedBuilder entryEmbedBuilder = new EmbedBuilder()\n .setTitle(codManager.getGameName() + \" Wobbly Rank #\" + (index + 1))\n .setThumbnail(thumbnail)\n .setDescription(\"Use **\" + getTrigger() + \" wobblies** to view the full leaderboard.\")\n .addField(\"Name\", score.getPlayerName(), true)\n .addField(\"Date\", score.getDateString(), true)\n .addBlankField(true)\n .addField(\"Wobblies\", MatchPlayer.formatDistance(score.getWobblies(), \"wobblies\"), true)\n .addField(\"Metres\", MatchPlayer.formatDistance(score.getMetres(), \"metres\"), true)\n .addBlankField(true)\n .addField(\"Map\", score.getMap().getName(), true)\n .addField(\"Mode\", score.getMode().getName(), true)\n .addBlankField(true)\n .addField(\"Match ID\", score.getMatchId(), true)\n .setColor(EmbedHelper.PURPLE);\n\n if(map.hasImageUrl()) {\n entryEmbedBuilder.setImage(map.getImageUrl());\n }\n channel.sendMessage(entryEmbedBuilder.build()).queue();\n }", "public void addThreeForTeamV (View v) {\n vScore = vScore +3;\n displayForTeamV(vScore);\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void setScore(int score) { this.score = score; }", "private void displayTeams() {\n SwapTeamMembersController.calculateTeamConstraints();\n System.out.println(\"\\nTeams formed are:\");\n for (Team team: Team.allTeams) {\n System.out.println(Constraint.ANSI_GREEN + \"\\nThe team ID\\t\\t\\t\\t: \" + team.getTeamID() + Constraint.ANSI_RESET +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectId() + \": \" + team.getProjectAssigned().getProjectTitle() +\n \"\\nThe team's fitness is\\t: \" + team.getTeamFitness());\n System.out.print(\"\\nThe Students IDs of students in this team are: \\n\");\n for (Student student: team.getStudentsInTeam()) {\n System.out.print(student.getId() + \"\\tName: \" + student.getFirstName() + \"\\t\\tGender : \" + student.getGender() + \"\\t\\tExperience : \" + student.getExperience() + \" years\\n\");\n }\n int j = 1;\n System.out.println(\"\\nConstraints met are (with weightage):\");\n for (Constraint c: team.getConstraintsMet()) {\n System.out.println(j + \". \" + c.getConstraintDescription() + \"\\t: \" + c.getWeightAge());\n j++;\n }\n }\n }", "private void show() {\n System.out.println(team.toString());\n }", "void showRanking(String winner, String rank);", "public void home_score(int score1){\n homeSore.setText(String.valueOf(score1));\n }", "public void displayTriesForPlayerB(int score) {\n triesViewPlayerB.setText(String.valueOf(score));\n }", "public void setScoreStitok() {\n this.scoreStitok.setText(\"Score \" + this.score);\n }", "protected void printScore(int score) {\n System.out.println();\n String dollars = Float.toString((float)score / 100) + \"$\";\n System.out.println(\"Score is: \" + dollars);\n }", "public void viewScoreboard(){\n\n Intent intent = new Intent(this, DisplayScoreBoard.class);\n startActivity(intent);\n }", "public void displayScore(String username, int score){\n\t\tfloat rating = ((float)score)/2;\n\t\tTextView user = new TextView(this);\n\t\tuser.setText(\"\\n\"+username);\n\t\tRatingBar rb = new RatingBar(this,null,android.R.attr.ratingBarStyleSmall);\n\t\trb.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n\t\trb.setNumStars(5);\n\t\trb.setRating(rating);\n\t\ths.addView(user);\n\t\ths.addView(rb);\n\t}", "public static String getScoreboard(List<Player> players) {\n // Team Rock Adam Points: 20\n // Team Paper Eve Points: 10\n // Team Scissors Abel Points: 5 DEAD\n\n throw new RuntimeException(\"Method not implemented!\");\n }", "public static void editScores(League theLeague, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Edit Scores---\");\r\n\t\tfor (int x = 0; x < theLeague.getNumTeams(); x++) {\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\ttheLeague.getTeam(x).teamManNameToString();\r\n\t\t\tSystem.out.println(\"Current score: \" + theLeague.getTeam(x).getScore());\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"Enter a score for \" + theLeague.getTeam(x).getTeamName() + \": (max 512)\");\r\n\t\t\tSystem.out.println(\"0 - Return to Team Menu\");\r\n\t\t\t\r\n\t\t\tint newScore = Input.validInt(0, 512, keyboard);\r\n\t\t\tif (newScore == 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttheLeague.getTeam(x).setScore(newScore);\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***Scores Updated***\");\r\n\t}" ]
[ "0.7828768", "0.78026146", "0.78026146", "0.7757637", "0.7757637", "0.7757637", "0.7757637", "0.7757637", "0.77084017", "0.76572275", "0.7500022", "0.7500022", "0.7460499", "0.7460499", "0.7460499", "0.7460499", "0.74281496", "0.7415543", "0.7411", "0.73882425", "0.7331133", "0.72510713", "0.72393537", "0.7231967", "0.7224633", "0.72170025", "0.7188012", "0.71816796", "0.71792066", "0.71744794", "0.70900244", "0.70841426", "0.6940933", "0.69390625", "0.6925782", "0.6918171", "0.68627614", "0.6816716", "0.6798185", "0.6793215", "0.67813444", "0.677468", "0.6764344", "0.6757157", "0.6735749", "0.6695854", "0.6674087", "0.66518974", "0.6649844", "0.6619531", "0.6602192", "0.6600236", "0.658288", "0.6567002", "0.6559312", "0.6552854", "0.65494865", "0.65385294", "0.65376854", "0.65117985", "0.64888614", "0.64739037", "0.6444454", "0.63844186", "0.63738203", "0.6349912", "0.6328176", "0.63253206", "0.632335", "0.6318189", "0.63162816", "0.6287913", "0.6285109", "0.6283835", "0.62836254", "0.6283252", "0.62811935", "0.6273183", "0.6270959", "0.62387645", "0.62307745", "0.6216241", "0.6211993", "0.61970204", "0.6189263", "0.6178608", "0.6178068", "0.6177883", "0.6161275", "0.6160547", "0.6158154", "0.61426055", "0.6142263", "0.6137052", "0.613389", "0.6114736", "0.6113704", "0.61127603", "0.6096614", "0.60894316" ]
0.83653986
0
Increase Team K Score By 3
public void addThreeForTeamK (View v) { kScore = kScore +3; displayForTeamK(kScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void addTwoForTeamK (View v) {\n kScore = kScore +2;\n displayForTeamK(kScore);\n }", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "public void addThreeForTeamA(View v) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void addThreeForTeamV (View v) {\n vScore = vScore +3;\n displayForTeamV(vScore);\n }", "public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void addOneForTeamK (View v) {\n kScore = kScore +1;\n displayForTeamK(kScore);\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 ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void addThreePointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 3;\n displayTeamBScore(scoreTeamB);\n }", "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 addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void displayForpoint_three(View view){\n score = score + 3;\n displayForTeamA(score);\n }", "public void addThreeForTeamB(View v) {\n scoreTeamB = scoreTeamB + 3;\n displayForTeamB(scoreTeamB);\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void incrementScore(int val) {\n score += val;\n }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\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 }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "public void addScore()\n {\n score += 1;\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void testScoreboardCaseThree () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (first Yes counts only Min.Pts)\n \"3,1,A,5,No\", // 20\n \"4,1,A,7,Yes\", // 20 (all runs count!)\n \"5,1,A,9,No\", // 20\n\n \"6,1,B,11,No\", // zero (not solved)\n \"7,1,B,13,No\", // zero (not solved)\n\n \"8,2,A,30,Yes\", // 30\n\n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 3 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// String [] rankData = {\n// \"1,team2,1,30\"\n// \"2,team1,1,83\",\n// };\n \n scoreboardTest (2, runsData, rankData);\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void addOneToScore() {\r\n score++;\r\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void displayForpoint_three2(View view){\n score2 = score2 + 3;\n displayForTeamA2(score2);\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "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 void setBonusScore() {\r\n count = count+50;\r\n }", "public void setScore(int score) { this.score = score; }", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void addPenaltyA(View view) {\n scoreTeamA = scoreTeamA + 3;\n displayForTeamA(scoreTeamA);\n }", "public void setScore(int score) {this.score = score;}", "public void add_to_score(int num){\n score+=num;\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 }", "public void setScore (int newScore)\n {\n this.score = newScore;\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 synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void addToScore(int score)\n {\n this.score += score;\n }", "void setScore(long score);", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void give_score(int n){\n final_score=0.25*(n-m.get_m()+1)+0.2*(n-h.get_h()+1)+0.25*(n-l.get_l()+1)+0.3*(n-a.get_a()+1);\r\n }", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\n }", "public void addScore(int score);", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "@Override\n public void onClick (View view){\n\n switch (view.getId()){\n case R.id.btn_3Points:\n mScore += 3;\n break;\n case R.id.btn_2Points:\n mScore += 2;\n break;\n case R.id.btn_FreeThrow:\n mScore += 1;\n break;\n }\n m_tv_TeamScore.setText(String.valueOf(mScore));\n\n }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "@Test\r\n public void calculateScore() {\r\n board3.swapTiles(0,0,1,1);\r\n board3.getSlidingScoreBoard().setTime(2);\r\n board3.getSlidingScoreBoard().calculateScore();\r\n assertEquals(496, board3.getSlidingScoreBoard().getScore());\r\n }", "public void add_prev_rounds_score(int prevScore) {\n prev_rounds_score += prevScore;\n }", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "float getScore();", "float getScore();", "int getScore();", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "int increaseScoreThisJump() {\n if (myScoreThisJump == 0) {\n myScoreThisJump++;\n } else {\n myScoreThisJump *= 2;\n }\n return (myScoreThisJump);\n }", "@Test\n public void scoreExample3() {\n MarbleSolitaireModel exampleBoard = new TriangleSolitaireModelImpl(7);\n assertEquals(27, exampleBoard.getScore());\n }", "public void setAwayScore(int a);", "public void setScore(java.lang.Integer value);", "void setScoreValue(int scoreValue);", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}", "public void addSixForTeamB(View v) {\n scoreTeamB = scoreTeamB + 6;\n displayForTeamB(scoreTeamB);\n }", "void setBestScore(double bestScore);", "@Test\n public void scoreExample3() {\n MarbleSolitaireModel exampleBoard = new MarbleSolitaireModelImpl(5);\n assertEquals(104, exampleBoard.getScore());\n }", "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 void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn;\r\n \t}\r\n \tif (gamemode ==2 ) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() - set.size()));\r\n \t}\r\n \tif (gamemode ==3) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() -set.size()));\r\n \t}\r\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public int getPlayerScore();", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}" ]
[ "0.71473724", "0.70623344", "0.7057628", "0.6927527", "0.6918688", "0.6867383", "0.6826507", "0.6802056", "0.6800535", "0.6691305", "0.6672203", "0.6640529", "0.6621764", "0.66117865", "0.6609157", "0.66079706", "0.6594116", "0.65410763", "0.6524088", "0.6510996", "0.65073514", "0.64613104", "0.6444099", "0.64179", "0.6415023", "0.6402017", "0.63887936", "0.63881564", "0.6388132", "0.6379374", "0.63749593", "0.6342038", "0.6330314", "0.6310793", "0.6307889", "0.63010466", "0.62924254", "0.6289795", "0.6286888", "0.6284713", "0.6275707", "0.62539625", "0.62274736", "0.62093735", "0.62051207", "0.62027067", "0.6194237", "0.6192717", "0.61844504", "0.6183854", "0.6153793", "0.6137333", "0.61257464", "0.6124437", "0.6122639", "0.61134297", "0.6113144", "0.6110232", "0.6110232", "0.6110232", "0.6110232", "0.61092794", "0.61055636", "0.6105164", "0.61031884", "0.6102438", "0.60943836", "0.60921293", "0.6079396", "0.6078226", "0.6077478", "0.60729194", "0.60661423", "0.60611045", "0.606083", "0.6059047", "0.6059047", "0.6048393", "0.6047489", "0.6038767", "0.60352594", "0.602864", "0.6027929", "0.60125136", "0.60113585", "0.6009915", "0.60069627", "0.5993492", "0.5987515", "0.59739465", "0.59710145", "0.59624046", "0.5952354", "0.59493446", "0.5947998", "0.59463817", "0.594533", "0.593573", "0.5934338", "0.5924581" ]
0.7786093
0
Increase Team K Score By 2
public void addTwoForTeamK (View v) { kScore = kScore +2; displayForTeamK(kScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "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 addOneForTeamK (View v) {\n kScore = kScore +1;\n displayForTeamK(kScore);\n }", "public void addThreeForTeamK (View v) {\n kScore = kScore +3;\n displayForTeamK(kScore);\n }", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "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 addScore()\n {\n score += 1;\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 addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\n }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "public void addOneToScore() {\r\n score++;\r\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 }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void incrementScore(int val) {\n score += val;\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void Team_B_2_Points(View v) {\n teamBScore = teamBScore + 2;\n displayForTeamB(teamBScore);\n }", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void Team_A_2_Points(View v) {\n teamAScore = teamAScore + 2;\n displayForTeamA(teamAScore);\n }", "public static void update_scoreboard2(){\n\t\t//Update score\n\tif(check_if_wicket2){\n\t\t\n\t\twicket_2++;\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\telse{\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\ttempshot2=PlayArena2.usershot2;\n\t\tteam_score_2=team_score_2+PlayArena2.usershot2;\n\t\treq=req-tempshot2;\n\t\t}\n\t\telse{\n\t\t\ttempshot2=PlayArena2.compshot2;\n\t\t\tteam_score_2=team_score_2+PlayArena2.compshot2;\n\t\t\treq=req-tempshot2;\n\t\t\t}\n\t\tif(req<0)\n\t\t{\treq=0;}\n\t\t\n\t\tupdate_score2.setText(\"\"+team_score_2+\"/\"+wicket_2);\n\t}\n\t// Overs update\n\tif(over_ball_2==5){\n\t\tover_ball_2=0;\n\t\tover_overs_2++;\n\t\tover_totalballs_2--;\n\t}\n\telse{\n\t\tover_ball_2++;\n\tover_totalballs_2--;}\n\tupdate_overs2.setText(\"\"+over_overs_2+\".\"+over_ball_2+\" (\"+PlayMode.overs+\")\");\n\t\n\t//Check if_first_inning_over\n\tif(over_overs_2==Integer.parseInt(PlayMode.overs) || wicket_2==3 || PlayBrain1.team_score_1<team_score_2)\n\t\t\t{\n\t\tif_second_inning_over=true;\n\t\treference2.add(PlayArena2.viewscore2);\n\t\t\t}\n\t\n\t\n\t//Needed update\n\t\t\tupdate_runrate2.setText(\"<html>NEED<br>\"+req+\"<br>OFF<br>\"+over_totalballs_2+\" <br>BALLS</html>\");\n\t\t}", "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 }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void add_to_score(int num){\n score+=num;\n }", "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 void incrementScore(int increment) {\n score = score + increment;\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void setScore(int score) { this.score = score; }", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void setBonusScore() {\r\n count = count+50;\r\n }", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "public void setScore(int score) {this.score = score;}", "public void addScore(int score);", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void addTwoPointsToTeamB(View view)\n {\n scoreTeamB = scoreTeamB + 2;\n displayTeamBScore(scoreTeamB);\n }", "private void scoregain() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1+2;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2+2;\n }\n }", "public void addScore(int score) {\n currentScore += score;\n }", "int increaseScoreThisJump() {\n if (myScoreThisJump == 0) {\n myScoreThisJump++;\n } else {\n myScoreThisJump *= 2;\n }\n return (myScoreThisJump);\n }", "public void addTwoForTeamB(View v) {\n scoreTeamB = scoreTeamB + 2;\n displayForTeamB(scoreTeamB);\n }", "void setScore(long score);", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "@Override\n\tpublic void updateScoreAfterTest(Score score2) {\n\t\tscoreDao.updateScoreAfterTest(score2);\n\t}", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public void setAwayScore(int a);", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "int getScore();", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "protected double newCompundScore(double score, double score2) {\n return score + score2;\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}", "@Test\r\n public void calculateScore() {\r\n board3.swapTiles(0,0,1,1);\r\n board3.getSlidingScoreBoard().setTime(2);\r\n board3.getSlidingScoreBoard().calculateScore();\r\n assertEquals(496, board3.getSlidingScoreBoard().getScore());\r\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "public void tossUpForTeamB(View v) {\n\n if (questionNumber <= 19) {\n scoreTeamB = scoreTeamB + 10;\n questionNumber = questionNumber + 1;\n displayQuestionNumber(questionNumber);\n displayForTeamB(scoreTeamB);\n }\n\n if (questionNumber == 20) {\n Toast.makeText(getApplicationContext(), \"Game Over!\", Toast.LENGTH_SHORT).show();\n\n }\n\n }", "public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}", "void setBestScore(double bestScore);", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "public void displayForpoint_two2(View view){\n score2 = score2 + 2;\n displayForTeamA2(score2);\n }", "public void awardPoints(int points)\n {\n score += points ;\n }", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "public void rightScored()\n\t{\n\t\tscoreR++;\n\t}", "public void displayForpoint_one2(View view){\n score2 = score2 + 1;\n displayForTeamA2(score2);\n }", "float getScore();", "float getScore();", "void setScoreValue(int scoreValue);", "public void raiseScoreSecondRightNeighbor(int value) {\n\t\tplayers.get((players.indexOf(current)+2)%players.size()).raiseScore(value);\n\t}", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void incGamesPlayed() {\n gamesPlayed++;\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 playGame () {\n int rank1 = team1.getSeed();\n int rank2 = team2.getSeed();\n double s1 = Math.random();\n System.out.println(s1);\n double s2 = Math.random();\n System.out.println(s2);\n \n if(rank1 < rank2){\n\t double one = (s1*10)+1;\n\t score1 = (int)one;//gives a slight advantage to the person with a higher seed\n\t double two = (s2*10); \n\t score2 = (int)two;\n\t if(score1 == score2){\n\t score1 = score1+1; //gives the game to the higher seed if there is a tie\n }\n else if(rank2 < rank1){\n\t double r = (s2*10)+1;\n\t score2 = (int)r;\n\t double t = (s1*10); \n\t score1 = (int)t;\n\t if(score1 == score2){\n\t score2 = score2+1;\n\t }}}}", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void setScore(java.lang.Integer value);", "public void updateScores(double attempt) {\r\n \tif(previousScore == 0){\r\n \t\tpreviousScore = currentScore;\r\n \t}else{\r\n \t\tbeforePreviousScore = previousScore;\r\n \t\tpreviousScore = currentScore;\r\n \t}\r\n this.currentScore = 100*(attempt \r\n\t\t\t\t- (benchmark - (maximumMark - benchmark)/NUMBEROFLEVEL))\r\n\t\t\t\t/(((maximumMark - benchmark)/NUMBEROFLEVEL)*2);\r\n }", "@Override\npublic void update(int score) {\n\t\n}", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }" ]
[ "0.7261271", "0.7095342", "0.69957316", "0.69048315", "0.68579614", "0.6849314", "0.68043697", "0.67581564", "0.67407477", "0.67151815", "0.6691131", "0.66872984", "0.6685358", "0.66687703", "0.66540337", "0.66464853", "0.6634632", "0.66327304", "0.6623233", "0.6619502", "0.661827", "0.6613694", "0.66028", "0.658148", "0.6570664", "0.65663576", "0.65299356", "0.6525783", "0.6518798", "0.6499708", "0.6484049", "0.648236", "0.6482186", "0.6479202", "0.644726", "0.6442945", "0.643815", "0.6434318", "0.6432144", "0.6419461", "0.64182746", "0.6408309", "0.64053553", "0.6404314", "0.638416", "0.637804", "0.63728476", "0.63640857", "0.6358855", "0.63545436", "0.63453984", "0.6335927", "0.63261867", "0.63061816", "0.62943596", "0.6293979", "0.6293979", "0.6293979", "0.6293979", "0.6285407", "0.628266", "0.62805045", "0.62675714", "0.6249306", "0.6248862", "0.6243041", "0.62384677", "0.6233185", "0.62320304", "0.62193036", "0.62080616", "0.62011814", "0.6194848", "0.61857593", "0.6182873", "0.61808914", "0.6178531", "0.6177057", "0.6176639", "0.61749244", "0.61582166", "0.61568755", "0.6156835", "0.61539996", "0.61539996", "0.6149815", "0.6137858", "0.61366934", "0.6131228", "0.6129066", "0.611212", "0.610393", "0.6098588", "0.609451", "0.6088517", "0.60870206", "0.60804117", "0.60790676", "0.6076599", "0.6069771" ]
0.7673222
0
Increase Team K Score By 1
public void addOneForTeamK (View v) { kScore = kScore +1; displayForTeamK(kScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public void increaseScore(){\n this.inc.seekTo(0);\n this.inc.start();\n this.currentScore++;\n }", "public void addTwoForTeamK (View v) {\n kScore = kScore +2;\n displayForTeamK(kScore);\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void addThreeForTeamK (View v) {\n kScore = kScore +3;\n displayForTeamK(kScore);\n }", "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 addScore()\n {\n score += 1;\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public void incrementScore(int val) {\n score += val;\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 ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "public void incrementScore(int increment) {\n score = score + increment;\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\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 }", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public void add_to_score(int num){\n score+=num;\n }", "public void updateScore(int score){ bot.updateScore(score); }", "public void incrementScore(int amount){\n\t\tthis.score += amount;\n\t}", "public synchronized void setScore(Integer score) {\n this.score += score;\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "@Override\n\tpublic void homeTeamScored(int points) {\n\t\t\n\t}", "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 }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public void addToScore(int score)\n {\n this.score += score;\n }", "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 void setBonusScore() {\r\n count = count+50;\r\n }", "public void increase(String nickname) {\n\t\tint oldValue = this.getScore(nickname);\n\t\tscoreboard.replace(nickname, oldValue, oldValue + 1);\n\t}", "public void setScore(int score) { this.score = score; }", "public void incGamesPlayed() {\n gamesPlayed++;\n }", "public void setScore(int score) {this.score = score;}", "public void addScore(int score) {\n currentScore += score;\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "public void addScore(int score);", "public void increaseScore(final int score) {\n setChanged();\n notifyObservers(new Pair<>(\"increaseScore\", score));\n }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void incrementKills() {\n stats.put(killsKey, (Integer)stats.get(killsKey)+1);\n }", "int increaseScoreThisJump() {\n if (myScoreThisJump == 0) {\n myScoreThisJump++;\n } else {\n myScoreThisJump *= 2;\n }\n return (myScoreThisJump);\n }", "public void plusOneTeamA (View view) {\r\n scoreA++;\r\n displayScoreForTeamA(scoreA);\r\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}", "void setScore(long score);", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public static void incrementActivityScore() {\n\t\tmActivityScore++;\n\t\tsaveScore();\n\t}", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "public void incrementTimesPlayed() {\r\n\t\ttimesPlayed++;\r\n\t}", "public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\n }", "private int scoreCounter(int result) {\n result +=1;\n return result;\n }", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void awardPoints(int points)\n {\n score += points ;\n }", "public void modifyScore(int modAmount)\r\n\t{\r\n\t\tscore += modAmount;\r\n\t}", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public void scoringTrick(){\n wizardRule();\n winner.tricksWon++;\n winner = new Player();\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\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 }", "@Test\r\n\tpublic void incrementScoretest() \r\n\t{\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(1, scoreBehavior.score());\r\n\t\t\r\n\t\tscoreBehavior.incrementScore();\r\n\t\tassertEquals(2, scoreBehavior.score());\r\n\t}", "void setScoreValue(int scoreValue);", "public void setScore(java.lang.Integer value);", "public void addOneForTeamV (View v) {\n vScore = vScore +1;\n displayForTeamV(vScore);\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}", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "public void Team_B_3_Points(View v) {\n teamBScore = teamBScore + 3;\n displayForTeamB(teamBScore);\n }", "protected void setScore(int s)\r\n\t{\r\n\t\tGame.score = s;\r\n\t}", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "public void add_prev_rounds_score(int prevScore) {\n prev_rounds_score += prevScore;\n }", "public void resetScore (View v) {\n vScore = 0;\n kScore = 0;\n displayForTeamK(kScore);\n displayForTeamV(vScore);\n }", "int getScore();", "public void raiseScoreOfEveryPlayer(int value) {\n\t\tfor(Player p:players) {\n\t\t\tp.raiseScore(value);\n\t\t}\n\t}", "@Test\n void updateScore() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setTurn(true);\n p.updateScore(3);\n assertTrue(p.getScore()==3);\n\n p = new RealPlayer('b', \"ciccia\");\n p.updateScore(-1);\n assertTrue(p.getScore()==0);\n }", "public static void addScore(int _value){\n scoreCount += _value;\n scoreHUD.setText(String.format(Locale.getDefault(),\"%06d\", scoreCount));\n }", "public void plusOneTeamB (View view) {\r\n scoreB++;\r\n displayScoreForTeamB(scoreB);\r\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "public void addOneForTeamA(View v) {\n scoreTeamA = scoreTeamA + 1;\n displayForTeamA(scoreTeamA);\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\n }", "public void setAwayScore(int a);", "public void setScore(int score)\n {\n this.score = score;\n }", "@Override\npublic void update(int score) {\n\t\n}", "public void resetScore();", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "void addPointsToScore(int points) {\n score += points;\n }", "public void setScoreOfTeam(Team team, int newScore) {\n\t\tteamScore.put(team.getTeamId(), newScore);\n\t}", "public void addTwoForTeamA(View v) {\n scoreTeamA = scoreTeamA + 2;\n displayForTeamA(scoreTeamA);\n }", "public void Team_A_3_Points(View v) {\n teamAScore = teamAScore + 3;\n displayForTeamA(teamAScore);\n }", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "@Override\n public void onClick (View view){\n\n switch (view.getId()){\n case R.id.btn_3Points:\n mScore += 3;\n break;\n case R.id.btn_2Points:\n mScore += 2;\n break;\n case R.id.btn_FreeThrow:\n mScore += 1;\n break;\n }\n m_tv_TeamScore.setText(String.valueOf(mScore));\n\n }", "public void setScore(int score) {\n this.score = score;\n }" ]
[ "0.7405242", "0.7383285", "0.7186641", "0.718542", "0.7026828", "0.7004455", "0.6999941", "0.6953495", "0.6950967", "0.6901526", "0.6822736", "0.68205893", "0.6812645", "0.6795266", "0.678906", "0.6780342", "0.675533", "0.67229927", "0.6719887", "0.6689062", "0.6669073", "0.6666654", "0.6648179", "0.6638696", "0.66308874", "0.6624468", "0.65781355", "0.65588546", "0.65407664", "0.65387726", "0.6534465", "0.6531751", "0.6511561", "0.65096533", "0.64981854", "0.64846", "0.64736617", "0.6466042", "0.64614755", "0.64599013", "0.64510185", "0.6444378", "0.6433874", "0.6423218", "0.64201075", "0.640193", "0.63862216", "0.6384956", "0.63672936", "0.63654083", "0.63446563", "0.6324753", "0.63061535", "0.6294525", "0.62847114", "0.6282758", "0.62811697", "0.6278509", "0.62691355", "0.6256645", "0.6255249", "0.624957", "0.62461334", "0.6244424", "0.6241358", "0.6204757", "0.61796564", "0.6177248", "0.6164689", "0.6164689", "0.6164689", "0.6164689", "0.61630076", "0.61627764", "0.6161624", "0.61612576", "0.61572534", "0.6156698", "0.61532533", "0.61524034", "0.6148234", "0.6146415", "0.6141574", "0.6141574", "0.6141041", "0.61398685", "0.61262286", "0.6124929", "0.61189604", "0.61129504", "0.6112769", "0.61125004", "0.6105199", "0.6104963", "0.6097826", "0.60899884", "0.60893196", "0.60893196", "0.60873544", "0.60825056" ]
0.7365483
2
Displays the given score for Team V.
public void displayForTeamK(int score) { TextView scoreView = (TextView) findViewById(R.id.team_k_score); scoreView.setText(String.valueOf(score)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayScoreForTeamB(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "private void printScore() {\r\n View.print(score);\r\n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "public void displayVisitorScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.visitor_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void displayForTeamA(int scoreA) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(scoreA));\r\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "private void displayTeamBScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamBScore);\n scoreTextView.setText(num +\"\");\n }", "public void displayForpoint_one(View view){\n score = score + 1;\n displayForTeamA(score);\n }", "public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }", "public void displayForpoint_two(View view){\n score = score + 2;\n displayForTeamA(score);\n }", "public void displayForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_lpool);\n scoreView.setText(String.valueOf(score));\n }", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "public void displayFoulForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.foul_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForpoint_three(View view){\n score = score + 3;\n displayForTeamA(score);\n }", "public void displayForpoint_three2(View view){\n score2 = score2 + 3;\n displayForTeamA2(score2);\n }", "public void displayYcardForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yellow_card_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForpoint_one2(View view){\n score2 = score2 + 1;\n displayForTeamA2(score2);\n }", "public void displayForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_madrid);\n scoreView.setText(String.valueOf(score));\n\n }", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "public void displayForPlayerB(int score) {\n scoreViewPlayerB.setText(String.valueOf(score));\n }", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public void displayRcardForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.red_card_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void displayFoulForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.foul_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "public void addScoreForTeamA(View v) {\n scoreTeamA += 1;\n updateText(scoreTeamA, v);\n }", "public void displayYelowCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowCardAtext);\n scoreView.setText(String.valueOf(score));\n }", "public void displayY_CardForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yellow_card_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "public static void displayScore(final Quiz quiz) {\n // write your code here\n // to display the score\n // report using quiz object.\n if (getflag()) {\n return;\n }\n System.out.println(quiz.showReport());\n }", "private void displayScore(int score) {\n\n String strScore = String.valueOf (score);\n String message = getString (R.string.yourScoreIs) + strScore + getString (R.string.outOf6);\n\n if (score == 0) message += getString (R.string.score_zero);\n\n if (score == 1 || score == 2 || score == 3) message += getString (R.string.score_low);\n\n if (score == 4 || score == 5) message += getString (R.string.score_notBad);\n\n if (score == 6) message += getString (R.string.score_six);\n\n Toast.makeText (getApplicationContext (), message, Toast.LENGTH_LONG).show ();\n\n }", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void displayYelowCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "@Override\n\tpublic void printScore() {\n\n\t}", "public void displayForpoint_two2(View view){\n score2 = score2 + 2;\n displayForTeamA2(score2);\n }", "public void displayRedCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardAtext);\n scoreView.setText(String.valueOf(score));\n }", "public void displayHomeScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.home_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "@SuppressLint(\"SetTextI18n\")\r\n private void displayScore() {\r\n\r\n\r\n mFinalScore.setText(\"Final score: \" + mScore);\r\n mQuestionView.setVisibility(View.GONE);\r\n mOption1.setVisibility(View.GONE);\r\n mOption2.setVisibility(View.GONE);\r\n mOption3.setVisibility(View.GONE);\r\n mNext.setVisibility(View.GONE);\r\n mTimer.setVisibility(View.GONE);\r\n mScoreView.setVisibility(View.GONE);\r\n mTimerLabel.setVisibility(View.GONE);\r\n mBackToStart.setVisibility(View.VISIBLE);\r\n\r\n }", "public void addTwoForTeamV (View v) {\n vScore = vScore +2;\n displayForTeamV(vScore);\n }", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "public void displayRedCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.redcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "public static List<String> getScoreDetails(final Match match){\n\t\tArrayList<String> scoreList = new ArrayList<String>(2);\n\t\tString scoreDisplay = \"\";\n\t\t\t\t\n\t\t// If a game has been played, get the card information\n\t\tif(match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tString strScoreDetails = \"\";\n\t\t\t// Check if the match went to penalties\n\t\t\tif(match.isPenalties()){\n\t\t\t\tstrScoreDetails = \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\n\t\t\t\t\"<b>(</b>\" + Escaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b>\";\n\t\t\t}else{\n\t\t\t\tstrScoreDetails = Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Writing the actual score\n\t\tif(match.getCurrentStatus() == MatchStatus.NOT_YET_PLAYED)\n\t\t{\t\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\"> Vs </td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.PLAYED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\";\n\t\t\n\t\t\t// If the match went to penalties, then display it in the score\n\t\t\tif(match.isPenalties()){\n\t\t\t\tscoreDisplay = scoreDisplay + \"<b>(</b>\" + Escaper.htmlEscape(match.getHomeTeamPenalties()) + \"<b>)</b>\" + \n\t\t\t\tEscaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"<b>(</b>\" +\n\t\t\t\tEscaper.htmlEscape(match.getAwayTeamPenalties()) + \"<b>)</b></td>\";\n\t\t\t}else{\n\t\t\t\tscoreDisplay = scoreDisplay + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) +\"</td>\";\t\t\n\t\t\t}\n\t\t}else if (match.getCurrentStatus() == MatchStatus.CANCELLED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">CANCELLED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.POSTPONED){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">POSTPONED</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"*</td>\";\n\t\t}else if (match.getCurrentStatus() == MatchStatus.DOUBLE_FORFEIT){\n\t\t\tscoreDisplay = \"<td class=\\\"c3\\\">\" + Escaper.htmlEscape(match.getHomeTeamScore()) + \"-\" + Escaper.htmlEscape(match.getAwayTeamScore()) + \"**</td>\";\n\t\t}\n\t\t\n\t\t// Populate the array with the tooltip and the score\n\t\tscoreList.add(scoreDisplay);\n\t\treturn scoreList;\n\t}", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public String toString () {\n return team1 + \" vs. \" + team2 + \": \" + score1 + \" to \" + score2;\n }", "public void displayR_CardForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.red_card_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "private void scoreDialog() {\n JPanel jp = new JPanel();\n \n Box verticalBox = Box.createVerticalBox();\n \n JLabel scoreTitle = new JLabel(\"<html><font size=13><center>Score: \" + challengeModel.getChallenge().getScore().getScorePoints() + \"</center></font></html>\");\n scoreTitle.setAlignmentX(CENTER_ALIGNMENT);\n verticalBox.add(scoreTitle);\n \n Box horizontalBox = Box.createHorizontalBox();\n String scoreResult = \"\" + challengeModel.getChallenge().getScore().getGold() + challengeModel.getChallenge().getScore().getSilver() + challengeModel.getChallenge().getScore().getBronze();\n switch(Integer.parseInt(scoreResult)) {\n case 111: // Gold, Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalGold()));\n case 11: // Silver, Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalSilver()));\n case 1: // Bronze\n horizontalBox.add(new JLabel(Resources.getImageMedalBronze()));\n break;\n default:\n break;\n }\n \n verticalBox.add(horizontalBox);\n \n jp.add(verticalBox);\n \n int value = JOptionPane.showOptionDialog(null, jp, \"Fim do desafio\", JOptionPane.NO_OPTION, JOptionPane.PLAIN_MESSAGE, null, new String[] {\"Novo Desafio\"}, 1);\n \n hideAnswerResult(false);\n \n if (value == 0)\n challengeModel.newGame();\n }", "public void addOneForTeamV (View v) {\n vScore = vScore +1;\n displayForTeamV(vScore);\n }", "public void printScore(PrintWriter out) {\n out.format(\"SCORE OF %d PLAYERS%n\", players.size());\n out.println(\"ID\\tCASH\\tTYPE\");\n \t\n // Cria uma lista com os jogadores\n \tList<Competitor> score = new ArrayList<Competitor>(players.keySet());\n\n \t// Ordena os jogadores com base no total de cash\n \tCollections.sort(score, new PlayerComparator());\n\n \t// Imprime os resultados\n \tfor(Competitor c : score) {\n \t\tout.format(\"%d.%d\\t%.2f\\t(%s)%n\", players.get(c).Type,\n players.get(c).Id, c.getTotalCash(),\n c.getClass().getSimpleName());\n \t}\n out.flush();\n }", "public void updateHighestScoreDisplay(int score){\n this.score.setText(\"Highest Score: \"+score);\n }", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "public void ScoreTeamB(View view) {\n scoreteamB = scoreteamB +1;\n displayScoreB(scoreteamB);\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "public void bonusForTeamB(View v) {\n\n if (questionNumber <= 19) {\n\n scoreTeamB = scoreTeamB + 5;\n displayForTeamB(scoreTeamB);\n }\n\n\n }", "public void displayTriesForPlayerA(int score) {\n triesViewPlayerA.setText(String.valueOf(score));\n }", "public void displayRoundScore() {\n\n System.out.println(\"Round stats: \");\n System.out.println(\"Par: \" + parTotal);\n System.out.println(\"Strokes: \" + strokesTotal);\n\n if(strokesTotal > parTotal) {\n System.out.println(strokesTotal-parTotal + \" over par\\n\");\n } \n else if (strokesTotal < parTotal) {\n System.out.println(parTotal-strokesTotal + \" under par\\n\");\n }\n else {\n System.out.println(\"Making par\\n\");\n }\n }", "void setScore(int score) {\n lblScore.setText(String.valueOf(score));\n }", "public void setMyScoreDisplay(String score) {\n myScoreDisplay.setText(score);\n }", "private String getScore(){\n return whiteName + \" : \" + blackName + \" - \" + whiteScore + \" : \" + blackScore;\n }", "public float displayScore(float score) {\n score = Math.round(score / 10f * 100f);\n return score;\n }", "public void addScoreForTeamB(View v) {\n scoreTeamB += 1;\n updateText(scoreTeamB, v);\n }", "private void showSpecificWobblyScore(MessageChannel channel) {\n int index = 0;\n try {\n index = Integer.parseInt(matchId) - 1;\n }\n catch(NumberFormatException e) {\n e.printStackTrace();\n }\n if(index < 0 || index > leaderboard.size() - 1) {\n channel.sendMessage(\"That's not a rank!\").queue();\n return;\n }\n WobblyScore score = leaderboard.get(index);\n Map map = score.getMap();\n\n EmbedBuilder entryEmbedBuilder = new EmbedBuilder()\n .setTitle(codManager.getGameName() + \" Wobbly Rank #\" + (index + 1))\n .setThumbnail(thumbnail)\n .setDescription(\"Use **\" + getTrigger() + \" wobblies** to view the full leaderboard.\")\n .addField(\"Name\", score.getPlayerName(), true)\n .addField(\"Date\", score.getDateString(), true)\n .addBlankField(true)\n .addField(\"Wobblies\", MatchPlayer.formatDistance(score.getWobblies(), \"wobblies\"), true)\n .addField(\"Metres\", MatchPlayer.formatDistance(score.getMetres(), \"metres\"), true)\n .addBlankField(true)\n .addField(\"Map\", score.getMap().getName(), true)\n .addField(\"Mode\", score.getMode().getName(), true)\n .addBlankField(true)\n .addField(\"Match ID\", score.getMatchId(), true)\n .setColor(EmbedHelper.PURPLE);\n\n if(map.hasImageUrl()) {\n entryEmbedBuilder.setImage(map.getImageUrl());\n }\n channel.sendMessage(entryEmbedBuilder.build()).queue();\n }", "public void addThreeForTeamV (View v) {\n vScore = vScore +3;\n displayForTeamV(vScore);\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "public void setScore(int score) { this.score = score; }", "private void displayTeams() {\n SwapTeamMembersController.calculateTeamConstraints();\n System.out.println(\"\\nTeams formed are:\");\n for (Team team: Team.allTeams) {\n System.out.println(Constraint.ANSI_GREEN + \"\\nThe team ID\\t\\t\\t\\t: \" + team.getTeamID() + Constraint.ANSI_RESET +\n \"\\nThe Project Assigned\\t: \" + team.getProjectAssigned().getProjectId() + \": \" + team.getProjectAssigned().getProjectTitle() +\n \"\\nThe team's fitness is\\t: \" + team.getTeamFitness());\n System.out.print(\"\\nThe Students IDs of students in this team are: \\n\");\n for (Student student: team.getStudentsInTeam()) {\n System.out.print(student.getId() + \"\\tName: \" + student.getFirstName() + \"\\t\\tGender : \" + student.getGender() + \"\\t\\tExperience : \" + student.getExperience() + \" years\\n\");\n }\n int j = 1;\n System.out.println(\"\\nConstraints met are (with weightage):\");\n for (Constraint c: team.getConstraintsMet()) {\n System.out.println(j + \". \" + c.getConstraintDescription() + \"\\t: \" + c.getWeightAge());\n j++;\n }\n }\n }", "private void show() {\n System.out.println(team.toString());\n }", "void showRanking(String winner, String rank);", "public void home_score(int score1){\n homeSore.setText(String.valueOf(score1));\n }", "public void displayTriesForPlayerB(int score) {\n triesViewPlayerB.setText(String.valueOf(score));\n }", "public void setScoreStitok() {\n this.scoreStitok.setText(\"Score \" + this.score);\n }", "protected void printScore(int score) {\n System.out.println();\n String dollars = Float.toString((float)score / 100) + \"$\";\n System.out.println(\"Score is: \" + dollars);\n }", "public void viewScoreboard(){\n\n Intent intent = new Intent(this, DisplayScoreBoard.class);\n startActivity(intent);\n }", "public void displayScore(String username, int score){\n\t\tfloat rating = ((float)score)/2;\n\t\tTextView user = new TextView(this);\n\t\tuser.setText(\"\\n\"+username);\n\t\tRatingBar rb = new RatingBar(this,null,android.R.attr.ratingBarStyleSmall);\n\t\trb.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n\t\trb.setNumStars(5);\n\t\trb.setRating(rating);\n\t\ths.addView(user);\n\t\ths.addView(rb);\n\t}", "public static String getScoreboard(List<Player> players) {\n // Team Rock Adam Points: 20\n // Team Paper Eve Points: 10\n // Team Scissors Abel Points: 5 DEAD\n\n throw new RuntimeException(\"Method not implemented!\");\n }", "public static void editScores(League theLeague, Scanner keyboard) {\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"---Edit Scores---\");\r\n\t\tfor (int x = 0; x < theLeague.getNumTeams(); x++) {\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\ttheLeague.getTeam(x).teamManNameToString();\r\n\t\t\tSystem.out.println(\"Current score: \" + theLeague.getTeam(x).getScore());\r\n\t\t\tSystem.out.println(\"\");\r\n\t\t\tSystem.out.println(\"Enter a score for \" + theLeague.getTeam(x).getTeamName() + \": (max 512)\");\r\n\t\t\tSystem.out.println(\"0 - Return to Team Menu\");\r\n\t\t\t\r\n\t\t\tint newScore = Input.validInt(0, 512, keyboard);\r\n\t\t\tif (newScore == 0) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttheLeague.getTeam(x).setScore(newScore);\r\n\t\t}\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"***Scores Updated***\");\r\n\t}" ]
[ "0.83653986", "0.78026146", "0.78026146", "0.7757637", "0.7757637", "0.7757637", "0.7757637", "0.7757637", "0.77084017", "0.76572275", "0.7500022", "0.7500022", "0.7460499", "0.7460499", "0.7460499", "0.7460499", "0.74281496", "0.7415543", "0.7411", "0.73882425", "0.7331133", "0.72510713", "0.72393537", "0.7231967", "0.7224633", "0.72170025", "0.7188012", "0.71816796", "0.71792066", "0.71744794", "0.70900244", "0.70841426", "0.6940933", "0.69390625", "0.6925782", "0.6918171", "0.68627614", "0.6816716", "0.6798185", "0.6793215", "0.67813444", "0.677468", "0.6764344", "0.6757157", "0.6735749", "0.6695854", "0.6674087", "0.66518974", "0.6649844", "0.6619531", "0.6602192", "0.6600236", "0.658288", "0.6567002", "0.6559312", "0.6552854", "0.65494865", "0.65385294", "0.65376854", "0.65117985", "0.64888614", "0.64739037", "0.6444454", "0.63844186", "0.63738203", "0.6349912", "0.6328176", "0.63253206", "0.632335", "0.6318189", "0.63162816", "0.6287913", "0.6285109", "0.6283835", "0.62836254", "0.6283252", "0.62811935", "0.6273183", "0.6270959", "0.62387645", "0.62307745", "0.6216241", "0.6211993", "0.61970204", "0.6189263", "0.6178608", "0.6178068", "0.6177883", "0.6161275", "0.6160547", "0.6158154", "0.61426055", "0.6142263", "0.6137052", "0.613389", "0.6114736", "0.6113704", "0.61127603", "0.6096614", "0.60894316" ]
0.7828768
1
Reset Team Scores to Zero
public void resetScore (View v) { vScore = 0; kScore = 0; displayForTeamK(kScore); displayForTeamV(vScore); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetScore() {\n\t\tthis.score = 0;\n\t}", "private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }", "public void resetScore();", "public void reset()\n {\n currentScore = 0;\n }", "public void resetScore(View view) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(0);\n displayForTeamB(0);\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void resetScore(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n displayForTeamA(scoreTeamA);\n displayForTeamB(scoreTeamB);\n }", "public void reset() {\n\t\tscore = 0;\n\t}", "public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }", "public void resetScore() {\n this.myCurrentScoreInt = 0;\n this.myScoreLabel.setText(Integer.toString(this.myCurrentScoreInt));\n }", "public void resetAllScores(View view) {\n teamA_score = 0;\n teamB_score = 0;\n ADVANTAGE = 0;\n enableScoreView();\n unSetWinnerImage();\n displayTeamA_score(teamA_score);\n displayTeamB_score(teamB_score);\n\n }", "public void resetScoreA(View v) {\n scoreTeamA = 0;\n\n displayForTeamA(scoreTeamA);\n\n\n }", "public void initScore(@Nonnull Team team){\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}", "public synchronized void resetScore() {\n score = 0;\n char2Type = -1;\n setScore();\n }", "public void initScore(@Nonnull Team team){\r\n\r\n\t\t\tif(this.scores.containsKey(team)){\r\n\t\t\t\tscores.put(team, Integer.valueOf(0));\r\n\t\t\t}\r\n\t\t}", "public void deleteScore() {\n\t\tthis.score = 0;\n\t}", "public void resetScoreB(View v) {\n scoreTeamB = 0;\n\n displayForTeamB(scoreTeamB);\n\n\n }", "public void resetTheGame(){\n\t\tfjCount = 0;\n\t\tquestionAnsweredCount = 0;\n\t\tfor(int i = 0 ; i< 5; i++){\n\t\t\tfor(int j = 0 ; j < 5 ; j++){\n\t\t\t\tboard[i][j].reset();\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0 ; i < teamNum; i ++){\n\t\t\tteams[i].reset();\n\t\t\tbets[i] = 0; \n\t\t}\n\t}", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void displayReset(View view) {\r\n\r\n scoreA = 0;\r\n scoreB = 0;\r\n displayForTeamA(scoreA);\r\n displayForTeamB(scoreB);\r\n }", "public void resetAllScores(View v) {\n scorePlayerB = 0;\n scorePlayerA = 0;\n triesPlayerA = 0;\n triesPlayerB = 0;\n displayForPlayerA(scorePlayerA);\n displayForPlayerB(scorePlayerB);\n displayTriesForPlayerA(triesPlayerA);\n displayTriesForPlayerB(triesPlayerB);\n }", "@Test\n public void testResetStats() {\n System.out.println(\"resetStats\");\n Team team = new Team();\n team.setGamesPlayed(10);\n team.setGamesWon(10);\n team.setSetsPlayed(10);\n assertEquals(team.getGamesPlayed(), 10);\n assertEquals(team.getGamesWon(), 10);\n assertEquals(team.getSetsPlayed(), 10);\n assertEquals(team.getGamesPlayed(), 10);\n team.resetStats();\n assertEquals(team.getGamesPlayed(), 0);\n assertEquals(team.getGamesWon(), 0);\n assertEquals(team.getSetsPlayed(), 0);\n assertEquals(team.getGamesPlayed(), 0);\n }", "public void newScore()\n {\n score.clear();\n }", "public void reset(View view) {\r\n scoreA = 0;\r\n scoreB = 0;\r\n foulsA = 0;\r\n foulsB = 0;\r\n displayScoreForTeamA(scoreA);\r\n displayFoulsForTeamA(foulsA);\r\n displayScoreForTeamB(scoreB);\r\n displayFoulsForTeamB(foulsB);\r\n }", "private void resetGame() {\n game.resetGame();\n round_score = 0;\n\n // Reset values in views\n player_tot_view.setText(String.valueOf(game.getPlayer_total()));\n bank_tot_view.setText(String.valueOf(game.getBank_total()));\n round_score_view.setText(String.valueOf(round_score));\n String begin_label = \"Round \" + game.getRound() + \" - Player's Turn\";\n round_label.setText(begin_label);\n\n getTargetScore();\n }", "public void resetAll(View v) {\n scoreTeamA = 0;\n scoreTeamB = 0;\n faultsTeamA = 0;\n faultsTeamB = 0;\n\n teamAScoreTextView.setText(getString(R.string.zero));\n teamBScoreTextView.setText(getString(R.string.zero));\n teamAFaultTextView.setText(getString(R.string.zero));\n teamBFaultTextView.setText(getString(R.string.zero));\n }", "void reset() {\n myManager.reset();\n myScore = 0;\n myGameOver = false;\n myGameTicks = myInitialGameTicks;\n myOldGameTicks = myInitialGameTicks;\n repaint();\n }", "private void resetBoard() {\n\t\tGameScores.ResetScores();\n\t\tgameTime = SystemClock.elapsedRealtime();\n\t\t\n\t}", "public void decrementTotalScore(){\n totalScore -= 1;\n }", "public void reset(View v) {\n scoreTeamB = 0;\n displayForTeamB(scoreTeamB);\n scoreTeamA = 0;\n displayForTeamA(scoreTeamA);\n questionNumber = 0;\n displayQuestionNumber(questionNumber);\n }", "void resetMyTeam();", "private void reset(){\n getPrefs().setEasyHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setMediumHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n getPrefs().setHardHighScore(new HighScore(\"Player\", 99 * 60 + 59));\n easyData.setText(formatHighScore(getPrefs().getEasyHighScore()));\n mediumData.setText(formatHighScore(getPrefs().getMediumHighScore()));\n hardData.setText(formatHighScore(getPrefs().getHardHighScore()));\n }", "protected void clearUpdateScores() {\n\t\tupdateScore.clear();\n\t}", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }", "public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}", "public void setScoreZero() {\n this.points = 10000;\n }", "void resetMyTeam(Team team);", "void unsetScoreAnalysis();", "public Builder clearScore() {\n \n score_ = 0L;\n onChanged();\n return this;\n }", "public Builder clearScore() {\n \n score_ = 0L;\n onChanged();\n return this;\n }", "private void resetGame() {\r\n SCORE = 0;\r\n defaultState();\r\n System.arraycopy(WordCollection.WORD, 0, tempWord, 0, WordCollection.WORD.length);\r\n }", "public void resetGame() {\r\n\r\n\t\tplayerScore = 0;\r\n\t\tframe.setVisible(false);\r\n\t\tgame = new Game();\r\n\r\n\t}", "public synchronized void resetScore() {\n\t\twhile (true) {\n\t\t\tint existingValueW = getCaught();\n\t\t\tint existingValueG = getScore();\n\t\t\tint existingValueM = getMissed();\n\t\t\tint newValueW = 0;\n\t\t\tint newValueG = 0;\n\t\t\tint newValueM = 0;\n\t\t\tif (caughtWords.compareAndSet(existingValueW, newValueW)\n\t\t\t\t\t&& gameScore.compareAndSet(existingValueG, newValueG)\n\t\t\t\t\t&& missedWords.compareAndSet(existingValueM, newValueM)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void reset(View view) {\r\n homeScore = 0;\r\n visitorScore = 0;\r\n displayHomeScore(homeScore);\r\n displayVisitorScore(visitorScore);\r\n }", "public void resetForBothTeams(View view) {\n scoreForR_madrid = 0;\n scoreForL_pool = 0;\n\n foulCountRmadrid = 0;\n y_cardCountRmadrid = 0;\n r_cardCountRmadrid = 0;\n\n foulCountLpool = 0;\n y_cardCountLpool = 0;\n r_cardCountLpool = 0;\n\n displayForRmadrid(scoreForR_madrid);\n displayForLpool(scoreForL_pool);\n\n displayFoulForRmadrid(foulCountRmadrid);\n displayY_CardForRmadrid(y_cardCountRmadrid);\n displayR_CardForRmadrid(r_cardCountRmadrid);\n\n displayFoulForLpool(foulCountLpool);\n displayYcardForLpool(y_cardCountLpool);\n displayRcardForLpool(r_cardCountLpool);\n\n }", "public static void checkForScoreReset() {\n\t\tif (mActivityScoreDate != null) {\n\t\t\tTime now = new Time();\n\t\t\tnow.setToNow();\n\n\t\t\t// this is the easiest way to check for a day being different, there\n\t\t\t// is a downfall\n\t\t\t// in that when a new year starts, the previous week's data will be\n\t\t\t// cleared.\n\t\t\tif (now.yearDay != mActivityScoreDate.yearDay) {\n\t\t\t\tshiftScores(now.yearDay - mActivityScoreDate.yearDay);\n\t\t\t}\n\t\t} else {\n\t\t\tmActivityScoreDate = new Time();\n\t\t}\n\t\tmActivityScoreDate.setToNow();\n\t\tsaveScore();\n\n\t}", "public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }", "public TennisScoreSystem() {\n scoreA = 0;\n scoreB = 0;\n }", "private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}", "public ScoreManager() {\n\t\tscore = 0;\n\t}", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "public void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn;\r\n \t}\r\n \tif (gamemode ==2 ) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() - set.size()));\r\n \t}\r\n \tif (gamemode ==3) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() -set.size()));\r\n \t}\r\n }", "public void Reset(View view) {\n\n displayFoulA(0);\n displayScoreA(0);\n displayScoreB(0);\n displayFoulb(0);\n\n }", "public void reset() {\r\n active.clear();\r\n missioncontrollpieces = GameConstants.PIECES_SET;\r\n rolled = 0;\r\n phase = 0;\r\n round = 0;\r\n action = 0;\r\n }", "public void resetTally() {\n won_stayed = 0;\n won_switched = 0;\n total_stayed = 0;\n total_switched = 0;\n }", "private void resetGame() {\n game.resetScores();\n this.dialogFlag = false;\n rollButton.setDisable(false);\n undoButton.setDisable(true);\n resetButton.setDisable(true);\n setDefault(\"player\");\n setDefault(\"computer\");\n }", "public static void resetDieScore()\n {\n value_from_die = 0;\n }", "private void resetStats() {\n }", "public void setScore(int score) { this.score = score; }", "public void resetQuizStats(Quiz quiz){\n \t\tString id = quiz.getQuizId();\n \t\tString query = \"DELETE FROM results WHERE quiz_id = '\" + id + \"';\";\n \t\tsqlUpdate(query);\n \t}", "public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}", "public void setScore(int score) {\r\n\t\tif(score >=0) {\r\n\t\t\tthis.score = score;\r\n\t\t}\r\n\t\t\r\n\t}", "public static void decrementActivityScore() {\n\t\tmActivityScore--;\n\t\tsaveScore();\n\t}", "public Builder clearScores() {\n if (scoresBuilder_ == null) {\n scores_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n } else {\n scoresBuilder_.clear();\n }\n return this;\n }", "public void setScore(int score) {this.score = score;}", "@Override\n public void clear() {\n GameObject.clearAll();\n Scene.score = 0;\n\n }", "public void deductScore(int s) {\n setScore(getScore() - s);\n }", "public Scores(int score) {\r\n this.score = score;\r\n }", "public void resetGame() {\r\n\t\tfor(Player p : players) {\r\n\t\t\tp.reset();\r\n\t\t}\r\n\t\tstate.reset();\r\n\t}", "public void resetValues() {\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(CUREDIFFICULTY, null);\n editor.putInt(CURETARGETSCORE, 0);\n editor.putInt(CURRSCOREFINDCURE, 0);\n editor.apply();\n System.out.println(sharedPreferences.getAll());\n\n }", "private void reset() // reset the game so another game can be played.\n\t{\n\t\tenableControls(); // enable the controls again..\n\n\t\tfor (MutablePocket thisMutPocket: playerPockets) // Reset the pockets to their initial values.\n\t\t{\n\t\t\tthisMutPocket.setDiamondCount(3);\n\t\t}\n\n\t\tfor(ImmutablePocket thisImmPocket: goalPockets)\n\t\t{\n\t\t\tthisImmPocket.setDiamondCount(0);\n\t\t}\n\n\t\tfor(Player thisPlayer: players) // Same for the player..\n\t\t{\n\t\t\tthisPlayer.resetPlayer();\n\t\t}\n\n\t\tupdatePlayerList(); // Update the player list.\n\n\t}", "public void setScore(int score)\n {\n this.score = score;\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "@Override\n\tpublic int countTeam() {\n\t\treturn 0;\n\t}", "public void loadScore() {\n for (int i = 0; i < 4; i++) {\n int[] enemyTankNum = CollisionUtility.getEnemyTankNum();\n tankNumList[i] = enemyTankNum[i];\n }\n for (int i = 0; i < 4; i++) {\n tankScoreList[i] = tankNumList[i] * 100 * (i + 1);\n }\n for (Integer score : tankScoreList) {\n totalScore += score;\n }\n for (Integer num : tankNumList) {\n totalTankNum += num;\n }\n }", "public void effacerScore() {\r\n\t\tthis.meilleursScores = new MeilleursScores();\r\n\t\tthis.notifyObservateur();\r\n\t}", "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 newGame() {\n\t\tplayer1Score = 0;\r\n\t\tplayer2Score = 0;\r\n\t\tif (score != null) {\r\n\t\t\tdrawScore();\r\n\t\t}\r\n\t\treset();\r\n\t}", "public void resetHP(){\r\n this.currHP = this.maxHP;\r\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public void ScoreTeamA(View view) {\n scoreteamA = scoreteamA +1;\n displayScoreA(scoreteamA);\n }", "public void reset()\r\n {\r\n gameBoard.reset();\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard.reset();\r\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void resetNodeTeams()\n\t{\n\t\tfor (Node node : nodes.values())\n\t\t{\n\t\t\tnode.team = null;\n\t\t}\n\t}", "public void resetWinRecord()\n{\n gamesWon = 0;\n}", "private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }", "public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}", "public void restartGame() {\n game.level = 1;\n game.overallMoves = 0;\n f.score.setText(\"Overall Score: 0\");\n restartLevel();\n }", "public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public void setScore(int score){\n\t\tthis.score = score;\n\t}", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void setScoreStitok() {\n this.scoreStitok.setText(\"Score \" + this.score);\n }", "private void saveInitialTotalScore() {\n\t\thelper.insertTotalScoreData(TotalScoretableName, totalScoreID, \"0\");\n\t}" ]
[ "0.82038623", "0.8194666", "0.81093144", "0.8023396", "0.79292595", "0.78297275", "0.78297275", "0.77704316", "0.7739159", "0.76323265", "0.75826263", "0.7523728", "0.7427869", "0.73822975", "0.73192626", "0.7284089", "0.7149649", "0.71411496", "0.71298724", "0.7065846", "0.7041872", "0.7033412", "0.70305806", "0.7025836", "0.6986593", "0.6961743", "0.6909966", "0.69085073", "0.6897887", "0.6850315", "0.68090594", "0.6787473", "0.67575943", "0.67460287", "0.6742843", "0.67085564", "0.6623457", "0.6604312", "0.65906113", "0.65850174", "0.65809715", "0.65809715", "0.6531486", "0.6526688", "0.6513375", "0.6495874", "0.6495607", "0.64892507", "0.6483807", "0.6470241", "0.64474005", "0.63775253", "0.6350686", "0.6305779", "0.63055056", "0.6275194", "0.62629426", "0.62518203", "0.6245828", "0.6233016", "0.6225952", "0.6218241", "0.61893606", "0.61737317", "0.6168423", "0.6160516", "0.6158702", "0.6152053", "0.6130951", "0.6129299", "0.6124424", "0.6123712", "0.6123161", "0.6116426", "0.61109555", "0.61109555", "0.6107896", "0.60808426", "0.60756755", "0.6068064", "0.6068064", "0.6068064", "0.6068064", "0.6064198", "0.6060592", "0.60596883", "0.6059025", "0.60580975", "0.6057727", "0.6052735", "0.6041122", "0.60393685", "0.60306305", "0.60300595", "0.6029539", "0.6029149", "0.60253173", "0.6019525", "0.60138565", "0.60105044" ]
0.741464
13
Returns a list of all the crimes
public List<Crime> getCrimes() { List<Crime> crimes = new ArrayList<>(); CrimeCursorWrapper cursor = queryCrimes(null, null); try { cursor.moveToFirst(); while (!cursor.isAfterLast()) { crimes.add(cursor.getCrime()); cursor.moveToNext(); } } finally { cursor.close(); } return crimes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Crime> getCrimes() {\n return mCrimes;\n }", "public void setCrimes(List<Crime> crimes) {\n mCrimes = crimes;\n }", "@Override\r\n\tpublic List<CabinCrew> getAllCabinCrew() {\r\n\t\tList<CabinCrew> cloned = new ArrayList<>(cabinCrew);\r\n\t\treturn cloned;\r\n\t}", "public void addDefaultCrimes() {\n for (int i = 0; i < 100; i++) {\n Crime crime = new Crime();\n crime.setTitle(\"Crime #\" + i);\n crime.setSolved(i % 2 ==0);\n mCrimes.add(crime);\n }\n }", "public ArrayList<CrimeCase> getCrimeCases()\n\t{\n\t\treturn CrimeList;\n\t}", "public List<Consultor> getConsultores()\n\t{\n\t\tList<Consultor> nombres = new ArrayList<Consultor>();\n\t\tLinkedList<Consultor> tb = Consultor.findAll();\n\t\tfor(Consultor c : tb)\n\t\t{\n\t\t\tnombres.add(c);\n\t\t}\n\t\treturn nombres;\t\n\t}", "@Override\r\n\tpublic List<Crew> getAllCrew() {\r\n\t\tList<Crew> crew = new ArrayList<>();\r\n\t\tcrew.addAll(pilots);\r\n\t\tcrew.addAll(cabinCrew);\r\n\t\treturn crew;\r\n\t}", "public List<FacturaCabecera> list(){ \n\t\t\treturn em.createQuery(\"SELECT c from FacturaCabecera c\", FacturaCabecera.class).getResultList();\n\t\t}", "@GetMapping(\"/conto-contabiles\")\n @Timed\n public List<ContoContabile> getAllContoContabiles() {\n log.debug(\"REST request to get all ContoContabiles\");\n return contoContabileService.findAll();\n }", "@Override\n\tpublic List<Ciclo> listarCiclos() {\n\t\treturn repository.findAll();\n\t}", "private CrimeLab(Context context) {\n mCrimes = new ArrayList<>();\n }", "@GET\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic List<CohabitRequestInfo> listAllCohabitRequests(){\r\n\t\t\r\n\t\tEntityManager em = getEntityManager();\r\n\t\tManageRequestService service = new ManageRequestService(em);\r\n\t\tList<CohabitRequest> cohabitRequests = service.viewAllRequests();\r\n\t\tList<CohabitRequestInfo> requests = CohabitRequestInfo.wrap(cohabitRequests);\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn requests;\r\n\t}", "@GetMapping(path = \"/assignedCab/cabs\")\r\n\tpublic ResponseEntity<List<TripCabInfo>> findAll() {\r\n\r\n\t\tList<TripCabInfo> trip = this.bl.findAll();\r\n\t\treturn ResponseEntity.status(HttpStatus.OK).body(trip);\r\n\t}", "public ArrayList< Card > getCheat() {\r\n ArrayList< Card > faces = new ArrayList<>();\r\n\r\n for ( Card card : cards ) {\r\n Card copy = new Card( card );\r\n copy.setFaceUp();\r\n faces.add( copy );\r\n }\r\n return faces;\r\n }", "public String[] imprimeCursos() {\n\t\tString[] st = new String[CURSOS.size()];\n\n\t\tfor (int i = 0; i < st.length; i++) {\n\n\t\t\tst[i] = CURSOS.get(i).getNomeCurso();\n\t\t}\n\n\t\treturn st;\n\t}", "public static Cancha[] getAll() {\n ArrayList<Cancha> canchas = new ArrayList<>();\n // Segundo, todos los ids de los registros\n Integer[] ids = ConexionBD.getAllIds(\"cancha\", \"id_cancha\");\n for (Integer id : ids) {\n canchas.add( new Cancha(id) );\n }\n return canchas.toArray(new Cancha[canchas.size()]);\n }", "public List<Composite> getComposites() {\r\n\t\treturn _composites;\r\n\t}", "private CreatureList creaturesInFaction(Game game){\n CreatureList facCreats = new CreatureList();\n\n for (Creature creat : game.getCreatures()){\n if (fFaction.getName().equals(creat.getFaction())){\n facCreats.addElement(creat);\n }\n }\n return facCreats;\n }", "public void setCrimes(List<Crime> crimes) {\n DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CrimeDiffCallback(crimes, mCrimes));\n diffResult.dispatchUpdatesTo(this);\n\n // Swap out list of crimes displayed for new list\n mCrimes = crimes;\n }", "@Override\r\n\tpublic List<Famille> listCompetences() {\n\t\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n \t\tsession.beginTransaction();\r\n \t\t//on crée une requête\r\n \t\tQuery req=session.createQuery(\"select C from FamilleComp C\");\r\n \t\tList<Famille> famillecomp=req.list();\r\n session.getTransaction().commit();\r\n \t\treturn famillecomp;\r\n\t\t\r\n\t}", "private void removeBadCrimes(){\n for(Crime badCrime: mBadCrimesList){\n mCrimesList.remove(badCrime);\n Log.i(TAG, \"bad crime removed\");\n }\n }", "public java.util.List<org.oep.usermgt.model.Citizen> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "@Override\n\tpublic List<CiclosCarreras> listar() {\n\t\treturn repoCiclos.findAll();\n\t}", "@Override\n\t\tpublic List<Carrera> getAll() {\n\t\t\t\treturn null;\n\t\t}", "private void mostrarCoches() {\n int i = 0;\n for (Coche unCoche : coches) {\n System.out.println((i + 1) + \"º \" + coches.get(i));\n ++i;\n }\n }", "public List<String> getAllCAs(){\n return myDatabase.getAllCAs();\n }", "public ArrayList<BigInteger> getAll() {\n\t\treturn primes;\n\t}", "public ConcurrentHashMap<String, Color> getCouleurs() {\n return couleurs;\n }", "@Override\n\tpublic List<Cours> allCours() {\n\t\tQuery q = em.createQuery(\"FROM Cours\");\n\t\treturn q.getResultList();\n\t}", "private String[] obtenerColores(List<Categoria> listaCategorias) {\n\t\tString[] colores = new String[listaCategorias.size()];\n\t\tRandom obj = new Random();\n\t\tfor (int i = 0; i < listaCategorias.size(); i++) {\n\t\t\tint rand_num = obj.nextInt(0xffffff + 1);\n\t\t\tcolores[i] = String.format(\"#%06x\", rand_num);\n\t\t}\n\t\treturn colores;\n\t}", "public List <reclamation> findall(){\n\t\tList<reclamation> a = reclamationRepository.findAll();\n\t\t\n\t\tfor(reclamation reclamations : a)\n\t\t{\n\t\t\tL.info(\"reclamations :\"+ reclamations);\n\t\t\t\n\t\t}\n\t\treturn a;\n\t\t}", "@Override\n\tpublic List<Comprobante> findAll() throws Exception {\n\t\treturn comproRepository.findAll();\n\t}", "public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }", "public static void mostrarPrimeraListaDeEmpleados()\r\n\t{\r\n\t\tfor(Empleado empleado: listaDeEmpleados)\r\n\t\t{\r\n\t\t\tSystem.out.println(empleado);\r\n\t\t}\r\n\t}", "public int get_crimeid() {\r\n return _crimeid;\r\n }", "public List<String> getCcs() {\r\n\t\treturn ccs;\r\n\t}", "public Crime() {\n mId = UUID.randomUUID();\n mDate = new Date();\n }", "public List<Compte> findAll() {\n\t\treturn dao.findAll();\n\t}", "public void ListarVehiculosCiatCasaCiat() throws GWorkException {\r\n\t\ttry {\r\n\t\t\tDate dtFechaInicio;\r\n\t\t\tDate dtFechaFin;\r\n\t\t\tLong idPeriodo = 1L;\r\n\r\n\t\t\tdtFechaInicio = ManipulacionFechas\r\n\t\t\t\t\t.getMesAnterior(ManipulacionFechas.getFechaActual());\r\n\r\n\t\t\t// Integer mes = Integer.valueOf(ManipulacionFechas\r\n\t\t\t// .getMes(ManipulacionFechas.getFechaActual()));\r\n\t\t\tCalendar calendario = Calendar.getInstance();\r\n\r\n\t\t\tcalendario.setTime(dtFechaInicio);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 5);\r\n\t\t\t// calendario.set(Calendar.MONTH, mes - 2);\r\n\r\n\t\t\tdtFechaInicio = calendario.getTime();\r\n\r\n\t\t\tdtFechaFin = ManipulacionFechas.getFechaActual();\r\n\t\t\tcalendario.setTime(dtFechaFin);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 4);\r\n\r\n\t\t\tdtFechaFin = calendario.getTime();\r\n\r\n\t\t\tList<BillingAccountVO> vehiculos = listVehiclesFlatFileCiatCasaCiat(\r\n\t\t\t\t\tdtFechaInicio, dtFechaFin);\r\n\r\n\t\t\tReporteCobroCiatCasaCiat(vehiculos, idPeriodo);\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().begin();\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().commit();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",re);\r\n\t\t\tthrow new GworkRuntimeException(\"[INFO] - \" + re.getMessage(), re);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",e);\r\n\t\t\tthrow new GWorkException(\r\n\t\t\t\t\t\"No se pudo generar el comprobante [ERROR] - \"\r\n\t\t\t\t\t\t\t+ e.getMessage(), e);\r\n\r\n\t\t}\r\n\t}", "List<CE> findAll();", "private List<List<XGraph.XVertex>> getComponents() {\n scc = new SCC(graph);\n int componentCount = scc.findSSC();\n List<List<XGraph.XVertex>> components = new ArrayList<>();\n for (int i = 0; i < componentCount; i++) {\n components.add(new ArrayList<>());\n }\n for (Graph.Vertex vertex : graph) {\n CC.CCVertex component = scc.getCCVertex(vertex);\n components.get(component.cno - 1).add((XGraph.XVertex) vertex);\n }\n return components;\n }", "public static ArrayList<Course> getAllCorsiMateria() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_COURSES;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Course> lista = (ArrayList<Course>) rp1.parameters[0];\n\t\t\tfor (Course m : lista) {\n\t\t\t\n\t\t\t}\n\t\t\treturn lista;\n\t\t} catch (Exception e) {\n\t\t\tLogger.WriteError(e, \"ClientConnection\", \"GET_ALL_COURSES\");\n\t\t}\n\t\treturn new ArrayList<Course>();\n\t}", "@Nonnull\n public List<C> getConstituents() {\n return constituents;\n }", "public HashSet<OWLClass> getCycleCausingNames(){\n\t\tHashSet<OWLClass> cycleCausing = new HashSet<>();\n\t\t//Belongs to SCC > 1 in size...\n\t\ttarj.getStronglyConnectComponents()\n\t\t\t\t.stream()\n\t\t\t\t.filter(components -> components.size() > 1)\n\t\t\t\t.forEach(cycleCausing::addAll);\n\n\t\t//...or defined in terms of self\n\t\tfor(GraphBuilder.Vertex v : g.values()){\n\t\t\tif(v.joinedToSelf){\n\t\t\t\tcycleCausing.add(v.value);\n\t\t\t}\n\t\t}\n\t\treturn cycleCausing;\n\t}", "public ArrayList<Project> getClients() {\n try {\n ArrayList<Project> clients = new ArrayList<Project>();\n String selectClients = \"SELECT NAME, CLIENT_ID FROM CLIENTS\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectClients);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String client = rs.getString(\"NAME\");\n String clientId = rs.getString(\"CLIENT_ID\");\n Project p = new Project(client, clientId);\n clients.add(p);\n }\n rs.close();\n ps.close();\n return clients;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }", "public List<Container> findAll() {\n\t\tSession currentSession = em.unwrap(Session.class);\n\t\t\n\t\t//create the query\n\t\tQuery<Container> query = currentSession.createQuery(\"from Container\", Container.class);\n\t\t\n\t\t//execute query and get result list\n\t\tList<Container> containers = query.getResultList();\n\t\t//System.out.println(containers);\n\t\t//return the results\n\t\treturn containers;\n\t}", "public List<City> getCities(){\n waitFor(visibilityOfAllElements(cities));\n return cities.stream().map(City::new).collect(toList());\n }", "public List<Carona> getCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario UsuarioTemp : listaDeUsuarios) {\r\n\t\t\tretorno.addAll(UsuarioTemp.getCaronas());\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public List<PrimeNr> getAllPrimeNrs(){\n Cursor cursor = database.query(PrimeNrBaseHelper.TABLE,null, null, null, null\n , null, PrimeNrBaseHelper.PRIME_NR);\n\n List<PrimeNr> primeNrList = new ArrayList<>();\n\n try {\n cursor.moveToFirst();\n while(!cursor.isAfterLast()){\n Long pnr = cursor.getLong(cursor.getColumnIndex(PrimeNrBaseHelper.PRIME_NR));\n String foundOn = cursor.getString(cursor.getColumnIndex(PrimeNrBaseHelper.FOUND_ON));\n primeNrList.add(new PrimeNr(pnr, foundOn));\n cursor.moveToNext();\n }\n } finally {\n cursor.close();\n }\n\n return primeNrList;\n }", "public List<String> retornaDatasComprasDeClientes () {\n return this.contasClientes\n .values()\n .stream()\n .flatMap((Conta conta) -> conta.retornaDatasDasCompras().stream())\n .collect(Collectors.toList());\n }", "public List<Jogo> getListaDeJogosComprados() {\r\n\t\treturn listaDeJogosComprados;\r\n\t}", "public SortedSet<Concert> getActiveConcerts()//\t\t--> Returnerer alle aktive konserter registrert på dette lokalet.\n\t{\n\t\tGregorianCalendar calender = (GregorianCalendar)Calendar.getInstance();\n\t\tcalender = Utilities.getCleanDate(calender);\n\n\t\tConcert c = new Concert(calender);\n\t\tSortedSet<Concert> active = concerts.tailSet(c);\n\n\t\tif(active.isEmpty())\n\t\t\treturn null;\n\n\t\treturn active;\n\t}", "public String[] contatos() {\n\t\treturn null;\r\n\t}", "public static List<CentroDeCusto> readAll() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto\");\n return query.list();\n }", "public List<CuentaContableDimensionContable> getListaCuentaContables()\r\n/* 329: */ {\r\n/* 330:391 */ List<CuentaContableDimensionContable> lista = new ArrayList();\r\n/* 331:392 */ for (CuentaContableDimensionContable cuentaContableDimensionContable : getDimensionContable().getListaCuentaContableDimensionContable()) {\r\n/* 332:393 */ if (!cuentaContableDimensionContable.isEliminado()) {\r\n/* 333:394 */ lista.add(cuentaContableDimensionContable);\r\n/* 334: */ }\r\n/* 335: */ }\r\n/* 336:396 */ return lista;\r\n/* 337: */ }", "private static ArrayList<MyAbstractContainer> variousBBC_concurrency() {\n ArrayList<MyAbstractContainer> result = new ArrayList<MyAbstractContainer>();\n for (ByteBuffer bb : variousBB_concurrency(CONCURRENCY_TEST_SIZE)) {\n result.add(new MyBBContainer(bb));\n }\n return result;\n }", "public List<AccesorioBicicletaEntity> getAccesorioBici() {\r\n LOGGER.info(\"Inicia proceso de consultar todas las Bicicletaes\");\r\n // Note que, por medio de la inyección de dependencias se llama al método \"findAll()\" que se encuentra en la persistencia.\r\n List<AccesorioBicicletaEntity> acc = persistence.findAll();\r\n LOGGER.info(\"Termina proceso de consultar todas las Bicicletaes\");\r\n return acc;\r\n }", "private boolean[] markAllComposites(int initial) {\n boolean[] primes = new boolean[initial + 1];\n //Mark all indexes as true initially\n Arrays.fill(primes, true);\n\n //Start marking the array indexes as false if divisible by the number in iteration, starting from 2\n IntStream.rangeClosed(2, (int) Math.sqrt(initial))\n .filter(num -> primes[num])\n .forEach(num -> {\n //Mark multiples of num as false as this number will be composite.\n //i.e. all the multiples of 2, 3, 4 and so on in the iteration will be marked false if not already marked\n //All the indexes which are not marked at the end of loop will be primes\n for (int i = num * 2; i <= initial; i += num) {\n primes[i] = false;\n }\n });\n return primes;\n }", "@Override\n\tpublic List<Celebrite> recupererToutesLesCelebrites() {\n\t\tQuery req=em.createQuery(\"select c from Celebrite c \");\n\t\treturn req.getResultList();\n\t}", "List<Corretor> findAll();", "public ArrayList<Cre> get_all_cre() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<Cre> Cre_list;\n\n\t\t\tCre_list = Cre_Default_Activity_dao.get_all_cre();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn Cre_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "public java.util.List<teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil> getCazuriList() {\n return cazuri_;\n }", "@Override\n public List<ClarifaiProcessDTO> findAll() {\n log.debug(\"Request to get all ClarifaiProcesses\");\n return clarifaiProcessRepository.findAll().stream()\n .map(clarifaiProcessMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public List<String> retornaComprasCliente (String cpfCliente) {\n Consistencia.consisteCpf(cpfCliente);\n if (!this.existeContaCliente(cpfCliente)) {\n throw new IllegalArgumentException(\"cliente nao tem compras com fornecedor.\");\n }\n\n return this.contasClientes.get(cpfCliente).retornaCompras();\n }", "public List<CompradorEntity> findAll() {\r\n TypedQuery<CompradorEntity> query = em.createQuery(\"select u from CompradorEntity u\", CompradorEntity.class);\r\n return query.getResultList();\r\n }", "public List<BusinessAccount> searchAllContractors() {\n\t\tfactory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);\n\t\tEntityManager em = factory.createEntityManager();\t\n\t\n\t\t\tem.getTransaction().begin();\n\t\t\tQuery myQuery = em.createQuery(\"SELECT b FROM BusinessAccount b\");\n\t\t\tcontractorList=myQuery.getResultList();\n\t\t em.getTransaction().commit();\n\t\t em.close();\n\t\t\t\n\t\t\treturn contractorList;\n\t\t}", "public List<ProgressionCourrier> getAllUsers() {\n Query q = getEntityManager().createQuery(\"select U from ProgressionCourrier U order by U.nomPrenoms\");\n // set parameters\n List<ProgressionCourrier> suggestions = q.getResultList();\n\n // avoid returing null to managed beans\n if (suggestions == null) {\n suggestions = new ArrayList<>();\n }\n\n // return the suggestions\n return suggestions;\n\n }", "private ArrayList<ArrayList<Coord>> findCircles() {\n\t\tArrayList<ArrayList<Coord>> circs = new ArrayList<ArrayList<Coord>>();\n\t\twhile(currentLevel.size()>0) {\n\t\t\tcurrentCircle.add(currentLevel.remove(0));\n\t\t\trecurseCircle(currentCircle.get(0));\n\t\t\tArrayList<Coord> adds = new ArrayList<Coord>();\n\t\t\tfor(Coord c:currentCircle){\n\t\t\t\tadds.add(c);\n\t\t\t}\n\t\t\tcircs.add(adds);\n\t\t\tcurrentLevel.removeAll(currentCircle);\n\t\t\tcurrentCircle.clear();\n\t\t}\n\t\treturn circs;\n\t}", "public ArrayList<CandidatoBean> listarCandidatos() {\r\n\r\n Query query = em.createNamedQuery(\"Candidato.findAll\");\r\n ArrayList<CandidatoBean> listCandidatos = new ArrayList<>();\r\n\r\n for (Candidato candidato : (List<Candidato>) query.getResultList()) {\r\n listCandidatos.add(modelMapper.map(candidato, CandidatoBean.class));\r\n }\r\n em.close();\r\n em = null;\r\n return listCandidatos;\r\n }", "@Override\r\n\tpublic List<CrewVO> crew_sel_list(Criteria cri, String mid) throws Exception {\n\t\treturn session.selectList(NAMESPACE+\".crew_sel_list\", mid);\r\n\t}", "public void listarCarpetas() {\n\t\tFile ruta = new File(\"C:\" + File.separator + \"Users\" + File.separator + \"ram\" + File.separator + \"Desktop\" + File.separator+\"leyendo_creando\");\n\t\t\n\t\t\n\t\tSystem.out.println(ruta.getAbsolutePath());\n\t\t\n\t\tString[] nombre_archivos = ruta.list();\n\t\t\n\t\tfor (int i=0; i<nombre_archivos.length;i++) {\n\t\t\t\n\t\t\tSystem.out.println(nombre_archivos[i]);\n\t\t\t\n\t\t\tFile f = new File (ruta.getAbsoluteFile(), nombre_archivos[i]);//SE ALMACENA LA RUTA ABSOLUTA DE LOS ARCHIVOS QUE HAY DENTRO DE LA CARPTEA\n\t\t\t\n\t\t\tif(f.isDirectory()) {\n\t\t\t\tString[] archivos_subcarpeta = f.list();\n\t\t\t\tfor (int j=0; j<archivos_subcarpeta.length;j++) {\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(archivos_subcarpeta[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public java.util.List<Campus> findAll();", "public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }", "public List<Jogo> jogosComJogabilidadeComum(Jogabilidade jogabilidade) {\r\n\t\tList<Jogo> listaDeJogosComMesmaJogabilidade = new ArrayList<Jogo>();\r\n\r\n\t\tfor (Jogo jogo : listaDeJogosComprados) {\r\n\t\t\tif (jogo.getJogabilidades().contains(jogabilidade)) {\r\n\t\t\t\tlistaDeJogosComMesmaJogabilidade.add(jogo);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn listaDeJogosComMesmaJogabilidade;\r\n\t}", "public List<String> verCarrito(){\n\t\treturn this.compras;\n\t}", "public ArrayList<String> getClasesIzquierda() {\n ArrayList<String> clasesIzquierda = new ArrayList<String>();\n\n for (int i = 0; i < clasesLista.getModel().getSize(); i++) {\n clasesIzquierda.add(clasesLista.getModel().getElementAt(i).toString());\n }\n return clasesIzquierda;\n }", "public List<Carona> getTodasAsCaronas() {\r\n\t\tList<Carona> retorno = new LinkedList<Carona>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tfor (Carona caronaTemp : usuario.getCaronas()) {\r\n\t\t\t\tretorno.add(caronaTemp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retorno;\r\n\t}", "public List<CompactionInfo> getCompactions() {\n List<CompactionInfo> compactions = new ArrayList<>();\n for (Map<String, String> compaction : this.nodeProbe.getCompactionManagerProxy().getCompactions()) {\n compactions.add(new CompactionInfo(Long.parseLong(compaction.get(\"total\")),\n Long.parseLong(compaction.get(\"completed\")), compaction.get(\"unit\"), compaction.get(\"taskType\"),\n compaction.get(\"keyspace\"), compaction.get(\"columnfamily\"), null));\n }\n return compactions;\n }", "public static ArrayList<Paciente> BuscarPacientesConConvenios(Empresa emp) {\n Session sesion;\n Transaction tr = null;\n ArrayList<Paciente> lis = null;\n String hql;\n try{ \n sesion = NewHibernateUtil.getSessionFactory().openSession();\n tr = sesion.beginTransaction();\n hql = \"SELECT DISTINCT c.paciente FROM Convenio c WHERE c.estado = 'Activo' AND c.empresa = \"+emp.getIdempresa();\n Query query = sesion.createQuery(hql); \n Iterator<Paciente> it = query.iterate();\n if(it.hasNext()){\n lis = new ArrayList();\n while(it.hasNext()){\n lis.add(it.next());\n }\n }\n }catch(HibernateException ex){\n JOptionPane.showMessageDialog(null, \"Error al conectarse con Base de Datos\", \"Convenio Controlador\", JOptionPane.INFORMATION_MESSAGE);\n }\n return lis;\n }", "List<Chofer> findAll();", "public List<CompetencyProcess> getLastCreatedCompetencyProcesses() {\r\n\t\treturn lastCreatedCompetencyProcesses;\r\n\t}", "public java.util.List<teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil> getCazuriList() {\n if (cazuriBuilder_ == null) {\n return java.util.Collections.unmodifiableList(cazuri_);\n } else {\n return cazuriBuilder_.getMessageList();\n }\n }", "List<Curso> obtenerCursos();", "public List<List<CruciCasillas>> cargar(){\r\n\t\t\r\n\t\tList<List<CruciCasillas>> palabras = new ArrayList<List<CruciCasillas>>(manejadorArchivos.cargar());\r\n\t\t\r\n\t\treturn palabras;\r\n\t}", "@Override\n public List<Cours> afficherTousLesCours() {\n return coursRepo.findAll();\n }", "List<Cemetery> findAll();", "public LinkedList getAllProcessingContainers() {\n LinkedList all = new LinkedList();\n all.addAll(annotatorList);\n all.addAll(consumerList);\n return all;\n }", "public List<CatCurso> consultarCatCurso()throws NSJPNegocioException;", "@Override\r\n\tpublic List<Compte> getComptesByClient(Long codeCli) {\n\t\treturn dao.getComptesByClient(codeCli);\r\n\t}", "@Override\n\tpublic List<Historico> findAll() {\n\t\treturn null;\n\t}", "public Block[] getCannons() {\n\t\tArrayList<Block> cannons = new ArrayList<Block>();\n\t\tfor (int i = 0; i < this.blocks.length; i++) {\n\t\t\tif (blocks[i].getType().equals(Material.DISPENSER))\n\t\t\t\tcannons.add(blocks[i]);\n\t\t}\n\t\treturn cannons.toArray(new Block[0]);\n\t}", "public PairVector getCCs(){\r\n\t\treturn mccabe.getCCs(javaclass);\r\n\t}", "@GetMapping(\"/cargos\")\n @Timed\n public List<Cargo> getAllCargos() {\n log.debug(\"REST request to get all Cargos\");\n return cargoRepository.findAll();\n }", "@Override\n\tpublic List<Cozinha> listar() { /* Cria uma Lista para buscar elementos da tabela Cozinha no banco */\n\t\treturn manager.createQuery(\"from Cozinha\", Cozinha.class) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Esta criando uma consulta com todo os elementos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * que tem dentro de Cozinha\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t.getResultList(); /* Está me retornando os Resultados da Lista Cozinha */\n\t}", "public ClosableIterator<org.ontoware.rdf2go.model.node.Node> getAllConductor_asNode() {\r\n\t\treturn Base.getAll_asNode(this.model, this.getResource(), CONDUCTOR);\r\n\t}", "@Override\n\tpublic List<Cours> listOfNonAssignedCours() {\n\t\tQuery q = em.createQuery(\"FROM Cours c where c.enseignant IS EMPTY\");\n\t\treturn q.getResultList();\n\t}", "public List<CardImage> readAll() {\n List<CardImage> cards = new ArrayList<CardImage>();\n for (String colour : this.colours) {\n for (String number : this.numbers) {\n for (String darkLight : this.darkLight) {\n cards\n .add(\n new CardImage(colour, number, darkLight,\n new Image(getClass().getResource(\n \"cards/\" + colour + seperator + number + seperator + darkLight + \".png\")\n .toExternalForm())));\n }\n }\n }\n return cards;\n }", "public List<FacturaEntity> getFacturas() {\n LOGGER.info(\"Inicia proceso de consultar todos los facturas\");\n List<FacturaEntity> factura = facturaPersistence.findAll();\n LOGGER.info(\"Termina proceso de consultar todos los facturas\");\n return factura;\n }", "public FormeContainer() {\n\t\tthis.formes = new ArrayList<Forme>();\n\t}", "@Override\n public List<BaiseeClazz> findAllClazzInfo() {\n return claMapper.findAllClazzInfo();\n }" ]
[ "0.6683008", "0.635064", "0.62037367", "0.59980655", "0.5899794", "0.5804712", "0.5764889", "0.5669769", "0.55935705", "0.559062", "0.5588574", "0.5581447", "0.5560362", "0.549363", "0.5433775", "0.5408585", "0.5387411", "0.53812873", "0.5350618", "0.5338082", "0.5336873", "0.533538", "0.53340703", "0.53112227", "0.53003454", "0.52995706", "0.52927804", "0.52543926", "0.52443683", "0.5235836", "0.5226197", "0.5191362", "0.51646054", "0.5157651", "0.5147209", "0.5129843", "0.5124609", "0.51243764", "0.51229465", "0.5117065", "0.51119614", "0.5108237", "0.5084025", "0.5078937", "0.5077841", "0.50746375", "0.50674754", "0.5067371", "0.50636375", "0.5057693", "0.50569147", "0.5056859", "0.50551355", "0.5050501", "0.5046491", "0.5045123", "0.5035708", "0.5035573", "0.5031433", "0.50288224", "0.501979", "0.5019623", "0.5018282", "0.50105125", "0.50076544", "0.5007651", "0.50037634", "0.5003497", "0.50008935", "0.49978486", "0.4988608", "0.4980859", "0.49796864", "0.49777853", "0.49758697", "0.49730954", "0.49693277", "0.49685308", "0.49635497", "0.4956701", "0.49538636", "0.49525782", "0.49520183", "0.49489918", "0.49479878", "0.494772", "0.4946299", "0.49454847", "0.49396726", "0.4939609", "0.49337834", "0.4931941", "0.4920602", "0.49186254", "0.49107474", "0.49107146", "0.49103668", "0.49097016", "0.49093404", "0.4907718" ]
0.75394905
0
Returns the crime with the given id if it exists
public Crime getCrime(UUID id) { CrimeCursorWrapper cursor = queryCrimes(CrimeTable.Cols.UUID + " = ?", new String[] {id.toString() } ); try { if(cursor.getCount() == 0){ return null; } cursor.moveToFirst(); return cursor.getCrime(); } finally { cursor.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Crime getCrime(UUID id) {\n for (Crime crime : mCrimes) {\n if (crime.getId().equals(id)) {\n return crime;\n }\n }\n return null;\n }", "@Override\r\n\tpublic Candidat findOne(String id) {\n\t\treturn null;\r\n\t}", "public Chore findChoreId(int id){\n //Checking All chore Lists\n\n //Unassigned List\n Iterator<Chore> choreIterator = unassignedChores.iterator();\n while (choreIterator.hasNext()){\n Chore chore = choreIterator.next();\n if(chore.getChoreId() == id){\n return chore;\n }\n\n }\n\n\n //FINISHED Chores\n choreIterator = finishedChores.iterator();\n while (choreIterator.hasNext()){\n Chore chore = choreIterator.next();\n if(chore.getChoreId() == id){\n return chore;\n }\n\n }\n\n //Checking all users\n for (int i = 0; i < regUsers.size(); i++){\n regUsers.get(i).getChoreFromId(id);\n }\n\n for (int i = 0; i < adminUsers.size(); i++){\n adminUsers.get(i).getChoreFromId(id);\n }\n return null;\n }", "public Paciente get( Long id ) {\r\n\t\t\tlogger.debug(\"Retrieving codigo with id: \" + id);\r\n\t\t\t\r\n\t\t\t/*for (Paciente paciente:codigos) {\r\n\t\t\t\tif (paciente.getId().longValue() == id.longValue()) {\r\n\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\treturn paciente;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tlogger.debug(\"No records found\");\r\n\t\t\treturn null;\r\n\t\t}", "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 Optional<Coach> findById(Long id) {\n\t\treturn Optional.ofNullable(get(id));\n\t}", "@Override\n public Complaint getComplaintById(int id) {\n DataConnection db = new DataConnection();\n Connection conn = db.getConnection();\n\n String query = \"SELECT * FROM Complaint WHERE id = ?\";\n ResultSet rs = null;\n try {\n PreparedStatement ps = conn.prepareStatement(query);\n ps.setInt(1, id);\n rs = ps.executeQuery();\n if (rs.next()) {\n return this.createComplaintObj(rs);\n }\n } catch (SQLException ex) {\n Logger.getLogger(DefaultComplaintsManagements.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public Candidat getUserByid(int id) {\n Candidat candidat = StaticVars.currentCandidat;\n String url = StaticVars.baseURL + \"/userbyid\";\n ConnectionRequest req = new ConnectionRequest();\n req.setUrl(url);\n req.setPost(false);\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n }\n\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return candidat;\n\n }", "@Override\r\n\tpublic CreditCard findByID(int id) {\n\t\treturn null;\r\n\t}", "public Curso find(Long id) {\n\t\tfor (Curso curso : cursos) {\n\t\t\tif(curso.getId() == id) {\n\t\t\t\treturn curso;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Personne find(int id) {\n\t\tPersonne p= null;\n\t\ttry {\n\t\t\t\tString req = \"SELECT id,nom, prenom, evaluation FROM PERSONNE_1 WHERE ID=?\";\n\t\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\t\tps.setInt(1, id);\n\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\tp =new Personne (id, rs.getString(1),rs.getString(2));\n\t\t\t}catch (SQLException e) {e.printStackTrace();}\n\t\t\t\t\n\t\treturn p;\n\t\t\n\t}", "@Override\n\tpublic Campus getCampusById(Long id) {\n\t\tEntityManager em=emf.createEntityManager();\n\t\ttry {\n\t\t\treturn (Campus)em.find(Campus.class, id);\n\t\t\t\n\t\t}catch(NoResultException e){\n\t\t\treturn null;\t\n\t\t}\n\t\tfinally {\n\t\t\t// TODO: handle finally clause\n\t\t\tem.close();\n\t\t}\n\t\t\n\t}", "@Override\n\t\tpublic Carrera get(int id) {\n\t\t\t\treturn null;\n\t\t}", "@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "@GetMapping(\"/citizens/{id}\")\n @Timed\n public ResponseEntity<Citizen> getCitizen(@PathVariable Long id) {\n log.debug(\"REST request to get Citizen : {}\", id);\n Citizen citizen = citizenService.findOne(id);\n return Optional.ofNullable(citizen)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "@Override\n\tpublic DataResult<CurriculumVitae> getById(int id) {\n\t\treturn null;\n\t}", "@Override\n public HorseRace findById(Integer id) throws PersistentException {\n if (id != null) {\n HorseRaceDao dao = factory.createDao(HorseRaceDao.class);\n HorseRace horseRace = dao.read(id);\n buildHorseRace(horseRace);\n return horseRace;\n }\n return null;\n }", "@Override\n\tpublic Campagne getCampagneById(int id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Factura findById(Integer id) {\n\t\treturn facturaRepository.findById(id).orElse(null);\n\t}", "protected CompaniesContactsEntity findById(int id) {\n log.info(\"CompaniesContact => method : findById()\");\n\n FacesMessage msg;\n\n if (id == 0) {\n log.error(\"CompaniesContact ID is null\");\n msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"note.notExist\"), null);\n FacesContext.getCurrentInstance().addMessage(null, msg);\n throw new EntityNotFoundException(\n \"L ID de la note est incorrect\",\n ErrorCodes.COMPANY_NOT_FOUND\n );\n }\n\n EntityManager em = EMF.getEM();\n Optional<CompaniesContactsEntity> optionalCompaniesContactsEntity;\n try {\n optionalCompaniesContactsEntity = companiesContactsDao.findById(em, id);\n } finally {\n em.clear();\n em.close();\n }\n return optionalCompaniesContactsEntity.orElseThrow(() ->\n new EntityNotFoundException(\n \"Aucune Note avec l ID \" + id + \" n a ete trouvee dans la BDD\",\n ErrorCodes.CONTACT_NOT_FOUND\n ));\n }", "@Override\n\tpublic Cours getCours(long id) {\n\t\treturn em.find(Cours.class, id);\n\t}", "@SuppressWarnings(\"rawtypes\")\n\tpublic Census getById(String id) {\n\t\t\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tCensus census=new Census();\n\t\t\tcensus.setId(id);\n\t\t\tObjectSet result=DB.queryByExample(census);\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]\");\n\t\t\t\treturn (Census) result.next();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Census does not exist\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"[DB4O]ERROR:Census could not be retrieved\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\treturn null;\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "@Override\n\tpublic Optional<Comprobante> findById(Integer id) throws Exception {\n\t\treturn comproRepository.findById(id);\n\t}", "@Override\n\tpublic Classe getClasse(String id) {\n\t\treturn classeRepository.findById(id).get();\n\t}", "public Cd getById(int id) {\n\t\tString sql = \" from Cd where id=:id\";\n\t\tQuery query = HibernateUtil.getSession().createQuery(sql).setParameter(\"id\", id);\n\t\treturn (Cd)findOne(query);\n\t\t\n\t}", "@Override\n\tpublic CentreVisite getId(Long id) {\n\t\treturn CR.getOne(id);\n\t}", "private Course findCourseByName(String id) {\n for (Course course : mySchool.courses) {\n if (course.courseName.equals(id)) {\n return course;\n }\n }\n return null;\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<AcademicExperience> findOne(Long id) {\n log.debug(\"Request to get AcademicExperience : {}\", id);\n return academicExperienceRepository.findById(id);\n }", "@Override\r\n\tpublic Personne find(int id) {\n\t\treturn null;\r\n\t}", "@Override\n Optional<Complaint> findById(Integer id);", "public Proveedor buscarPorId(Integer id) {\r\n\r\n if (id != 22 && id < 123) {\r\n\r\n return ServiceLocator.getInstanceProveedorDAO().find(id);\r\n }\r\n return null;\r\n\r\n }", "public Carro getCarro(Long id){\n\t\t\n\t\ttry {\n\t\t\treturn db.getCarroById(id);\n\t\t\t\n\t\t} catch(SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\t\n\t}", "public Discipline getDisciplineById(int id) {\r\n for (Discipline discipline : disciplines) {\r\n if (discipline.getId() == id) {\r\n return discipline;\r\n }\r\n }\r\n return null;\r\n }", "@Ignore\n public Crime(UUID id) {\n mId = id;\n mDate = new Date();\n }", "@Override\n\tpublic BatimentoCardiaco get(long id) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Cat getById(Integer id) {\n\t\tOptional<Cat> cat = catRepository.findById(id);\n\t\tif(cat.isPresent()) {\n\t\t\treturn cat.get();\n\t\t} else {\n\t\t\tthrow new CatNotFoundException();\n\t\t}\n\t}", "public Person getPersonById(String id) {\n\t\tfor (Person person : persons) {\n\t\t\tif (person.getId().equals(id)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Cella cercaCella(int _idToFind) {\n\t\tfor (Cella cell : celle) {\n\t\t\tif (cell.getId() == _idToFind) {\n\t\t\t\treturn cell;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Carta getById(int id) {\r\n\r\n\t\tCarta c = new Carta();\r\n\t\tString sql = SQL_JOIN + \" WHERE id = ?; \";\r\n\r\n\t\ttry (Connection con = ConnectionHelper.getConnection(); PreparedStatement pst = con.prepareStatement(sql)) {\r\n\r\n\t\t\tpst.setInt(1, id);\r\n\t\t\ttry (ResultSet rs = pst.executeQuery()) {\r\n\r\n\t\t\t\twhile (rs.next()) { // hemos encontrado Participante por su ID\r\n\r\n\t\t\t\t\tc = mapper(rs);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn c;\r\n\t}", "@Transactional(readOnly = true)\n public Optional<CiviliteDTO> findOne(Long id) {\n log.debug(\"Request to get Civilite : {}\", id);\n return civiliteRepository.findById(id)\n .map(civiliteMapper::toDto);\n }", "public Conge find( Integer idConge ) ;", "@Transactional(readOnly = true)\n public Optional<Faculty> findOne(Long id) {\n log.debug(\"Request to get Faculty : {}\", id);\n return facultyRepository.findOneWithEagerRelationships(id);\n }", "public Conseiller getById(int id) {\n\t\treturn null;\r\n\t}", "public Aluno findById(Integer id){\n Aluno alunoEncontrado = this.alunos.stream()\n .filter(aluno -> aluno.getId().equals(id))\n .findFirst()\n .orElse(null);\n if(alunoEncontrado != null){\n return alunoEncontrado;\n }\n throw new AlunoInexistenteException();\n }", "public Cource getCource(int id) {\n Cource cource = null;\n SQLiteDatabase db = this.getReadableDatabase(); // On veut lire dans la BD\n Cursor cursor = db.query(TABLE_COURCE, new String[]{COURCE_ID,\n COURCE_ID_USER, COURCE_PAS, COURCE_CALORIES, COURCE_TEMPS, COURCE_DISTANCE,\n COURCE_TYPE, COURCE_DATE}, COURCE_ID + \"=?\",\n new String[]{String.valueOf(id)}, null, null, null, null);\n if (cursor != null && cursor.getCount()>0) {\n cursor.moveToFirst();\n cource = new Cource(cursor.getInt(0), cursor.getInt(1), cursor.getInt(2),\n cursor.getDouble(3), cursor.getString(4), cursor.getString(5),\n cursor.getString(6), cursor.getString(7));\n }\n cursor.close();\n db.close(); // Fermer la connexion\n// Retourner l'cource\n return cource;\n }", "public static Adage find(int id) {\n\tAdage adage = null;\n\tfor (Adage a : adages) {\n\t if (a.getId() == id) {\n\t\tadage = a;\n\t\tbreak;\n\t }\n\t}\t\n\treturn adage;\n }", "public Employee get(int id) {\n\n\t\t\tfor (Employee c : employees) {\n\t\t\t\tif (c.getId()==(id)) {\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\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 Individual getIndividual(int id){\n for(Individual individual : individuals){\n if(individual.getId() == id){\n return individual;\n }\n }\n return null;\n }", "public Optional<Memberr> findById(int id) {\n\t\treturn memberrepo.findById(id);\n\t}", "@Override\n public Mechanic getEmployee(Long id) {\n LOGGER.info(\"Get Mechanic with id {}\", id);\n return mechanicRepository.findById(id)\n .orElseThrow(() -> new NotFoundException(Entity.MECHANIC.toString(), id, HttpStatus.NOT_FOUND));\n }", "public Professionnel chercherProfessionnel(String id) {\r\n Professionnel p = null;\r\n int i=0;\r\n boolean stop=false;\r\n while( i < listePro.getListePro().size()&&(!stop)) {\r\n \r\n if (listePro.getListePro().get(i).getId_pro().equals(id)) {\r\n p = listePro.getListePro().get(i);\r\n stop=true;\r\n }\r\n i++;\r\n }\r\n return p;\r\n }", "@Override\r\n\tpublic CabDto findCabById(int id) throws CabNotFoundException {\r\n\t\tOptional<Cab> cab = cabRepository.findById(id);\r\n\r\n\t\tif (cab.isPresent()) {\r\n\r\n\t\t\treturn Convertor.convertCabEntitytoDTO(cab.get());\r\n\t\t}\r\n\t\tthrow new CabNotFoundException(\"Cab not found with id: \" + id);\r\n\t}", "public Citas getCita(int id) {\n Citas c = new Citas();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM paciente WHERE id_paciente=?\";\n pstm = con.prepareStatement(query);\n pstm.setInt(1, id);\n rs = pstm.executeQuery();\n while (rs.next()) {\n c.setId(rs.getInt(\"id_paciente\"));\n c.setName(rs.getString(\"name\"));\n c.setDoctor(rs.getString(\"doctor\"));\n c.setFecha(rs.getString(\"fecha\"));\n c.setHora(rs.getString(\"hora\"));\n c.setTel(rs.getString(\"tel\"));\n c.setCorreo(rs.getString(\"correo\"));\n c.setGenero(rs.getString(\"genero\"));\n c.setMotivo(rs.getString(\"motivo\"));\n c.setSintomas(rs.getString(\"sintomas\"));\n } \n }catch (SQLException ex) {\n ex.printStackTrace();\n }\n return c;\n }", "public Course getCourse(String id) {\n\t\treturn courseRepo.findById(id).orElse(new Course());\n\t\t\n\t}", "@Override\n\tpublic Facture findById(int id) {\n\t\treturn null ;\n\t}", "public Person findPerson(Long id) {\n\t\treturn personRepository.findById(id).orElse(null); \n\t}", "@Override\n\tpublic Person findPersonById(long id){\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p WHERE p.id = :id\");\n\t\tq.setParameter(\"id\", id);\n\t\t\n\t\tList<Person> persons = q.getResultList();\n\t\t\n\t\tif(persons.size() == 1)\n\t\t\treturn persons.get(0);\n\t\telse return null;\n\t}", "@Transactional(readOnly = true)\n public Optional<CentreCompositionDTO> findOne(Long id) {\n log.debug(\"Request to get CentreComposition : {}\", id);\n return centreCompositionRepository.findById(id)\n .map(centreCompositionMapper::toDto);\n }", "@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}", "@Transactional(readOnly = true) \n public Clinic findOne(Long id) {\n log.debug(\"Request to get Clinic : {}\", id);\n Clinic clinic = clinicRepository.findOne(id);\n return clinic;\n }", "public Optional<CheckingAcc> find(Long id){\n if (checkingAccRepository.findById(id).isPresent()){\n return checkingAccRepository.findById(id);\n } else {\n throw new ResponseStatusException(HttpStatus.NOT_FOUND, \"There is no account with the provided id\");\n }\n }", "@Override\n\tpublic Optional<Fournisseur> findById(int id) {\n\t\treturn null;\n\t}", "public Fournisseur find(long id) {\n\t\tFournisseur fournisseur = (Fournisseur) this.sessionFactory.getCurrentSession().load(Fournisseur.class, id);\r\n\t\tif(null != fournisseur){\r\n\t\t\tthis.sessionFactory.getCurrentSession().find(Fournisseur.class, fournisseur.getCode());\r\n\t\t\t\r\n\t\t}\r\n\t\treturn this.sessionFactory.getCurrentSession().find(Fournisseur.class, fournisseur.getCode());\r\n\t}", "public boolean exists( Integer idConge ) ;", "@Cacheable(value=\"contacts\")\r\n\tOptional<Contact> find(Long id) {\r\n\t\treturn repo.findById(id);\r\n\t}", "@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }", "public Pessoa find(Long id){\n\t\treturn db.findOne(id);\n\t}", "public Money find(long id) {\n\t\tif (treeMap.containsKey(id))\n\t\t\treturn treeMap.get(id).price;\n\t\treturn new Money();\n\t}", "public Person getPerson(String id) throws DataAccessException {\n Person person;\n ResultSet rs = null;\n String sql = \"SELECT * FROM persons WHERE person_id = ?;\";\n try(PreparedStatement stmt = conn.prepareStatement(sql)) {\n stmt.setString(1, id);\n rs = stmt.executeQuery();\n if (rs.next()) {\n person = new Person(rs.getString(\"person_id\"), rs.getString(\"assoc_username\"),\n rs.getString(\"first_name\"), rs.getString(\"last_name\"),\n rs.getString(\"gender\"), rs.getString(\"father_id\"),\n rs.getString(\"mother_id\"), rs.getString(\"spouse_id\"));\n return person;\n }\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Error encountered while finding person\");\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "Boolean findExistsCampania(GestionPrecioID id) ;", "public ClanPaket findById(Long id) {\n\r\n\t\tClanPaket clanPaket = clanPaketDao.findById(id)\r\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"ClanPaket\", \"id\", id));\r\n\r\n\t\treturn clanPaket;\r\n\r\n\t}", "@Transactional(readOnly = true)\n public Optional<CandidatoDTO> findOne(Long id) {\n log.debug(\"Request to get Candidato : {}\", id);\n return candidatoRepository.findById(id).map(candidatoMapper::toDto);\n }", "public Vacuna findById(Long id) {\n\t\tVacuna vacuna = vacunaRepository.findById(id).orElseThrow(() -> new RuntimeException(\"La vacuna no existe...\"));\n\t\treturn vacuna;\n\t}", "CounselorBiographyTemp findById( Integer id ) ;", "public Optional<Contact> findById(int id){\n return contactRepository.findById(id);\n }", "Optional<Contact> getContact(long id);", "public Pais findById(int id) throws NoResultException {\r\n return EM.createNamedQuery(Pais.FIND_BY_ID, Pais.class)\r\n .setParameter(\"p2\", id)\r\n .setParameter(\"p3\", Estados.ACTIVO)\r\n .getSingleResult();\r\n }", "@Override\n\tpublic Optional<Chitietdonhang> findById(Integer id) {\n\t\treturn chiTietDonHangRepository.findById(id);\n\t}", "RiceCooker getById(long id);", "@Override\r\n\tpublic Factura findById(Long id) {\n\t\treturn facturaDao.findById(id);\r\n\t}", "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 public Optional<Compte> getById(Long idCompte) {\n Session session = entityManager.unwrap(Session.class);\n return Optional.of(session.get(Compte.class, idCompte));\n }", "@Override\n\tpublic DataResult<CvDetail> findByCandidateId(int id) {\n\t\treturn new SuccessDataResult<CvDetail>(this.cvDetailDao.findByCandidateId(id));\n\t}", "public Account getAccount(Integer id) {\n if (!accounts.containsKey(id)) {\n throw new NotFoundException(\"Not found\");\n }\n\n AccountEntry entry = accounts.get(id);\n if (entry == null) {\n throw new NotFoundException(\"Not found\");\n }\n\n // concurrency: optimistic, entry may already be excluded from accounts\n Lock itemLock = entry.lock.readLock();\n try {\n itemLock.lock();\n return entry.data;\n } finally {\n itemLock.unlock();\n }\n }", "public Car findCarById(int id) {\r\n return repository.findById(id).orElse(null);\r\n }", "public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }", "public Person getOne(Integer id) {\n\t\tPerson person = personRepository.getOne(id);\n\t\treturn person;\n\t}", "@Override\n\tpublic Account getAccount(Integer id) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\treturn account;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public Optional<Course> getCourse(String id) {\n//\t\treturn topics.stream().filter(t -> t.getId().equals(id)).findFirst().get();\n\t\treturn courseRepository.findById(id);\n\t}", "@Override\n\tpublic Person get(int id) {\n\t\treturn null;\n\t}", "Cemetery findOne(Long id);", "@Override\r\n\tpublic Amigo getById(int id) {\n\t\treturn null;\r\n\t}", "@Override\n @Transactional(readOnly = true)\n public Optional<HabilitationDTO> findOne(Long id) {\n log.debug(\"Request to get Habilitation : {}\", id);\n return habilitationRepository.findById(id)\n .map(habilitationMapper::toDto);\n }", "@GetMapping(\"/conto-contabiles/{id}\")\n @Timed\n public ResponseEntity<ContoContabile> getContoContabile(@PathVariable Long id) {\n log.debug(\"REST request to get ContoContabile : {}\", id);\n ContoContabile contoContabile = contoContabileService.findOne(id);\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(contoContabile));\n }", "public CyPoj findById(Integer id) {\n\t\treturn d.findById(id);\r\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 }", "@GetMapping(\"/getCandidate/{id}\")\n\tpublic Optional<JobProcessDetails> getCandidate(@PathVariable Long id){\n\t\t\n\t\treturn jobProcessRepo.findById(id);\n\t\n\t}", "protected Contest getContest(int id) {\n\t\treturn contests.get(id);\n\t}" ]
[ "0.8168619", "0.6862899", "0.67144275", "0.660758", "0.64685494", "0.640704", "0.638888", "0.6351354", "0.6321259", "0.62837577", "0.62682414", "0.62451607", "0.62061554", "0.6196257", "0.6189266", "0.61867887", "0.6169593", "0.616832", "0.615289", "0.61438215", "0.6140351", "0.6138939", "0.61288524", "0.6106092", "0.60983723", "0.60886586", "0.6087206", "0.6085764", "0.6071297", "0.6061124", "0.6052841", "0.6046541", "0.6046448", "0.60440594", "0.60431576", "0.60111153", "0.600892", "0.60008675", "0.5976367", "0.59621036", "0.59521735", "0.5924383", "0.5923336", "0.591475", "0.58901876", "0.58875966", "0.58859766", "0.5879854", "0.5876914", "0.5875516", "0.5861696", "0.58608943", "0.5859976", "0.58467835", "0.58318824", "0.58274055", "0.5826851", "0.58113277", "0.5808144", "0.57984746", "0.57955813", "0.5789068", "0.5783531", "0.57775724", "0.5768845", "0.5763869", "0.57626", "0.5756272", "0.5754843", "0.5753288", "0.5750627", "0.57470274", "0.57463545", "0.5745922", "0.5733288", "0.57321584", "0.5731829", "0.57318014", "0.5731317", "0.5726085", "0.572184", "0.5718108", "0.5716527", "0.57103425", "0.56980556", "0.5680083", "0.5677032", "0.5677016", "0.56768095", "0.5668718", "0.56684315", "0.56667805", "0.5664913", "0.5664278", "0.56614137", "0.5656114", "0.56544816", "0.56503826", "0.5650288", "0.5647129" ]
0.8069395
1
Inserts the crime into the database
public void addCrime(Crime c) { ContentValues values = getContentValues(c); mDatabase.insert(CrimeTable.NAME, null, values); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert() throws SQLException {\n String sql = \"INSERT INTO course (courseDept, courseNum, courseName, credit, info) \"\n + \" values ('\"\n + this.courseDept + \"', '\"\n + this.courseNum + \"', '\"\n + this.courseName + \"', \"\n + this.credit + \", '\"\n + this.info + \"')\";\n\n DatabaseConnector.updateQuery(sql);\n }", "public void insert() {\n String sqlquery = \"insert into SCORE (NICKNAME, LEVELS,HIGHSCORE, NUMBERKILL) values(?, ?, ?,?)\";\n try {\n ps = connect.prepareStatement(sqlquery);\n ps.setString(1, this.nickname);\n ps.setInt(2, this.level);\n ps.setInt(3, this.highscore);\n ps.setInt(4, this.numofKill);\n ps.executeUpdate();\n //JOptionPane.showMessageDialog(null, \"Saved\", \"Insert Successfully\", JOptionPane.INFORMATION_MESSAGE);\n System.out.println(\"Insert Successfully!\");\n ps.close();\n connect.close();\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null, e.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n }", "public void insertPrisoners (String fname,String sname,String ag,String crime,String pisid){\r\n String q=\"INSERT INTO prisoners(Firstname,Secondname,Age,Crime,Prisonerid)VALUES (?,?,?,?,?)\";\r\n \r\n \r\n try{\r\n int k=0;\r\n PreparedStatement st=getConnection().prepareStatement(q);\r\n st.setString(1,fname);\r\n st.setString(2,sname);\r\n st.setString(3,ag);\r\n st.setString(4,crime);\r\n st.setString(5,pisid);\r\n \r\n if(st.executeUpdate()>k){\r\n JOptionPane.showMessageDialog(null,pisid+\"registered susccessfully\");\r\n }\r\n }\r\n \r\n catch(SQLException x){\r\n JOptionPane.showMessageDialog(null, x.getMessage());\r\n}\r\n }", "void insert(CTipoComprobante record) throws SQLException;", "public void insert(){\r\n\t\tString query = \"INSERT INTO liveStock(name, eyeColor, sex, type, breed, \"\r\n\t\t\t\t+ \"height, weight, age, furColor, vetNumber) \"\r\n\t\t\t\t+ \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) \";\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement prepareStatement = conn.prepareStatement(query);\r\n\t\t\t\r\n\t\t\tprepareStatement.setString(1, liveStock.getName());\r\n\t\t\tprepareStatement.setString(2, liveStock.getEyeColor());\r\n\t\t\tprepareStatement.setString(3, liveStock.getSex());\r\n\t\t\tprepareStatement.setString(4, liveStock.getAnimalType());\r\n\t\t\tprepareStatement.setString(5, liveStock.getAnimalBreed());\r\n\t\t\tprepareStatement.setString(6, liveStock.getHeight());\r\n\t\t\tprepareStatement.setString(7, liveStock.getWeight());\r\n\t\t\tprepareStatement.setInt(8, liveStock.getAge());\r\n\t\t\tprepareStatement.setString(9, liveStock.getFurColor());\r\n\t\t\tprepareStatement.setInt(10, liveStock.getVetNumber());\r\n\t\t\t\r\n\t\t\tprepareStatement.execute();\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void insert(long primeNr){\n database.insert(PrimeNrBaseHelper.TABLE, null, getContentValues(primeNr));\n }", "@Override\n\tpublic boolean insert() {\n\t\tif(num==null||name==null||email==null||phone==null||project==0||school==0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tString format=\"INSERT INTO tc_student(num,name,email,phone,degree,project,school,is_cap) values ('%s','%s','%s','%s',%d,%d,%d,%d)\";\n\t\tString sql=String.format(format, num,name,email,phone,degree,project,school,is_cap);\n\t\t//System.out.println(sql);\n\t\treturn mysql.execute(sql);\n\t\t}", "public int create(Candidato c) {\r\n\t\t Connection con = null;\r\n\t\t String sql = \"INSERT INTO candidato(cpf, nome, cargo) VALUES(?,?,?)\";\r\n\t\t PreparedStatement stmt = null;\r\n\t\t con = ConnectionFactory.getConnection();\r\n\t\t try {\r\n\t\t\t stmt = con.prepareStatement(sql);\r\n\t\t\t stmt.setString(1, c.getCpf());\r\n\t\t\t stmt.setString(2, c.getNome());\r\n\t\t\t stmt.setString(3, c.getCargo());\r\n\t\t\t stmt.execute();\r\n\t\t\t return 1;\r\n\t\t } catch(SQLException e) {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Erro ao cadastrar no banco de dados!\"+e.getMessage(), \"Erro\", 2);\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\tfinally {\r\n\t\t\t\tConnectionFactory.closeConnection(con,stmt);\r\n\t\t\t}\r\n\t }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "void insert(CTipoPersona record) throws SQLException;", "int insert(Commodity record);", "int insert(CGcontractCredit record);", "int insert(ReEducation record);", "public void insert() throws SQLException;", "@Override\n\tpublic void insert(Connection c, Genre v) throws SQLException {\n\n\t}", "public void insert(Connection db) throws SQLException {\n this.insert(db, this.questionId);\n }", "public void addClaim(claim c){\n boolean successful = false;\r\n String stmt = \"insert into claim (incident_id, claim_type, claimant, description, amount) values (?, ?, ?, ?, ?)\";\r\n try {\r\n //Get connection from DatabaseConnectionManager\r\n conn = DatabaseConnectionManager.getConnection();\r\n\r\n //Prepare SQL statement\r\n pstmt = conn.prepareStatement(stmt);\r\n\r\n //Set parameters into prepared statement\r\n pstmt.setInt(1, c.getAccidentID());\r\n pstmt.setString(2, c.getClaimType());\r\n pstmt.setString(3, c.getClaimant());\r\n pstmt.setString(4, c.getDescription());\r\n pstmt.setInt(5, c.getAmount());\r\n //Execute query (retrieve)\r\n int result = pstmt.executeUpdate();\r\n\r\n //If there is a result\r\n if (result != 0) {\r\n successful = true;\r\n System.out.println(\"updated!!!\");\r\n }\r\n\r\n //If result set is not null, close it\r\n if (rs != null) {\r\n rs.close();\r\n }\r\n //If prepared statement is not null, close it.\r\n if (pstmt != null) {\r\n pstmt.close();\r\n }\r\n } catch (SQLException e) {\r\n //Prints out SQLException - good for debugging if sql statement is buggy or constraints that may be causing issues \r\n System.out.println(\"Failed to retrieve incident:\" + e);\r\n } finally {\r\n //Close the connection \r\n DatabaseConnectionManager.closeConnection(conn);\r\n }\r\n \r\n if(successful){\r\n policyDAO dao = new policyDAO();\r\n dao.updatePolicy(c);\r\n }\r\n }", "public void insertCitation(Citation citation) {\n citationRepo_.save(citation);\n }", "int insert(Cargo record);", "int insert(Course record);", "int insert(Course record);", "int insert(courses record);", "int insert(CommunityInform record);", "@Override\n\tpublic void insert(Categoria cat) throws SQLException {\n\t\t\n\t}", "public void add (String frist_name, String lastName, String nationality, \n int age, Date commingDate, Date checkOutDate){\n \n String insertTransaction = \"INSERT INTO customer \"+\n \"(First_name, Last_name, nationality, age, coming_date, check_out_date) \"\n +\"values ('\"+frist_name+\"','\"+lastName+\"','\"\n +nationality+\"',\"+age+\",'\"+\n commingDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\n \"', '\"+checkOutDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\"')\";\n try {\n statement.executeUpdate(insertTransaction);//insert into the DB\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n setQuery(DEFUALT_QUERY);\n }\n }", "int insert(ActivityHongbaoPrize record);", "int insert(Commet record);", "int insert(TrainingCourse record);", "public void insertPersonIntoDatabase(Person currentPerson)\n\t{\n\t\ttry\n\t\t{\n\t\t\tStatement insertPersonStatement = databaseConnection.createStatement();\n\t\t\tint databaseIsMarried, databaseHasChildren;\n\t\t\tif (currentPerson.isMarried())\n\t\t\t{\n\t\t\t\tdatabaseIsMarried = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdatabaseIsMarried = 0;\n\t\t\t}\n\t\t\tif (currentPerson.isHasChildren())\n\t\t\t{\n\t\t\t\tdatabaseHasChildren = 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tdatabaseHasChildren = 0;\n\t\t\t}\n\t\t\tString insertString = \"INSERT INTO `graveyard`.`people` ( `person_name`,`person_death_date`,`person_birth_date`,`person_is_married`,`person_has_children`,`person_age`)\"\n\t\t\t\t\t+ \"VALUES \"\n\t\t\t\t\t+ \"('\"\n\t\t\t\t\t+ currentPerson.getName()\n\t\t\t\t\t+ \"', '\"\n\t\t\t\t\t+ currentPerson.getDeathDate()\n\t\t\t\t\t+ \"', '\"\n\t\t\t\t\t+ currentPerson.getBirthDate()\n\t\t\t\t\t+ \"', '\"\n\t\t\t\t\t+ databaseIsMarried\n\t\t\t\t\t+ \"', '\"\n\t\t\t\t\t+ databaseHasChildren\n\t\t\t\t\t+ \"', '\"\n\t\t\t\t\t+ currentPerson.getAge() + \"' );\";\n\t\t\t\n\t\t\tint result = insertPersonStatement.executeUpdate(insertString);\n\t\t\tJOptionPane.showMessageDialog(null, \"successfully inserted \" + result + \" rows.\");\n\t\t}\n\t\tcatch (SQLException currentSQLError)\n\t\t{\n\t\t\tdisplaySQLErrors(currentSQLError);\n\t\t}\n\t}", "public boolean insertCourtyard(Courtyard courtyard) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.insert(courtyard);\n\t\tSystem.out.println(\"--Into Dao Method of insertCourtyard!!!--\");\n\t\treturn true;\n\t}", "void insertSelective(CTipoComprobante record) throws SQLException;", "public static void insertFournisseur(Fournisseur unFournisseur ) {\n Bdd uneBdd = new Bdd(\"localhost\", \"paruline \", \"root\", \"\");\n\n String checkVille = \"CALL checkExistsCity('\" + unFournisseur.getVille() + \"','\" + unFournisseur.getCp() + \"');\";\n try {\n uneBdd.seConnecter();\n Statement unStat = uneBdd.getMaConnection().createStatement();\n\n ResultSet unRes = unStat.executeQuery(checkVille);\n\n int nb = unRes.getInt(\"nb\");\n\n if (nb == 0) {\n String ajoutVille = \"CALL InsertCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"');\";\n\n try {\n Statement unStatAjout = uneBdd.getMaConnection().createStatement();\n\n unStatAjout.executeQuery(ajoutVille);\n unStatAjout.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + ajoutVille);\n }\n }\n\n String id = \"CALL GetCity('\" + unFournisseur.getVille() + \"', '\" + unFournisseur.getCp() + \"')\";\n\n try {\n Statement unStatId = uneBdd.getMaConnection().createStatement();\n\n ResultSet unResId = unStatId.executeQuery(id);\n\n int id_city = unResId.getInt(\"id_city\");\n\n\n\n String insertFournisseur = \"INSERT INTO fournisseur(id_city, name_f, adresse_f, phoneFour) VALUES (\" + id_city + \", '\" + unFournisseur.getNom() + \"', \" +\n \"'\" + unFournisseur.getAdresse() + \"', '\" + unFournisseur.getTelephone() + \"')\";\n\n try {\n Statement unStatFourn = uneBdd.getMaConnection().createStatement();\n unStatFourn.executeQuery(insertFournisseur);\n\n unStatFourn.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + insertFournisseur);\n }\n\n unResId.close();\n unStatId.close();\n }\n catch (SQLException e) {\n System.out.println(\"Erreur : \" + id);\n }\n\n unRes.close();\n unStat.close();\n uneBdd.seDeConnecter();\n } catch (SQLException exp) {\n System.out.println(\"Erreur : \" + checkVille);\n }\n }", "public void databaseinsert() {\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tSite site = new Site(Sid.getText().toString().trim(), Scou.getText().toString().trim());\n\t\tlong rowId = dbHlp.insertDB(site);\n\t\tif (rowId != -1) {\n\t\t\tsb.append(getString(R.string.insert_success));\n\n\t\t} else {\n\n\t\t\tsb.append(getString(R.string.insert_fail));\n\t\t}\n\t\tToast.makeText(Stu_state.this, sb, Toast.LENGTH_SHORT).show();\n\t}", "public void insere(Pessoa pessoa){\n\t\tdb.save(pessoa);\n\t}", "public void inserir(Comentario c);", "public void newConcert(DatabaseHandler dbh) throws SQLException {\n\t\tString query = \"INSERT INTO concert VALUES \" +\n\t\t\t\t\"(DEFAULT, ?, 5, ?, 0, ?, ?, ?)\";\n\t\tPreparedStatement prepStatement = dbh.prepareQuery(query);\n\t\tprepStatement.setObject(1, this.startDate, Types.DATE);\n\t\tprepStatement.setInt(2, this.ticketPrice);\n\t\tprepStatement.setInt(3, this.artistID);\n\t\tprepStatement.setInt(4, this.offerID);\n\t\tprepStatement.setInt(5, this.stageID);\n\n\t\tprepStatement.executeUpdate();\n\t}", "public void insert(Calificar c){\n Session session = sessionFactory.openSession();\n \n Transaction tx = null;\n \n try{\n tx = session.beginTransaction();\n \n session.persist(c);\n tx.commit();\n }\n catch(Exception e){\n if(tx != null){ tx.rollback(); }\n e.printStackTrace();\n }\n finally { session.close(); }\n }", "int insert(TrainCourse record);", "public void insertData() throws SQLException, URISyntaxException, FileNotFoundException {\n\t \t\t//On vide la base en premier\n\t \t\tdropDB();\n\t \t\t\n\t \t\t//Fichier contenant les jeux de test\n\t \t\tBufferedReader br = new BufferedReader(new FileReader(\"./data.txt\"));\n\t \t \n\t \t PreparedStatement pstmt = null;\n\t \t Connection conn = null;\n\t \t int id;\n\t \t String lastname, firstname, cardNumber, expirationMonth, expirationYear, cvv, query;\n\t \t try {\n\t \t conn = this.connectToBDD();\n\t \t \n\t \t String line = null;\n\t \t \n\t \t //On lit le fichier data.txt pour inserer en base\n\t \t while((line=br.readLine()) != null) {\n\t \t \t String tmp[]=line.split(\",\");\n\t \t \t id=Integer.parseInt(tmp[0]);\n\t\t\t \t lastname=tmp[1];\n\t\t\t \t firstname=tmp[2];\n\t\t\t \t cardNumber=tmp[3];\n\t\t\t \t expirationMonth=tmp[4];\n\t\t\t \t expirationYear=tmp[5];\n\t\t\t \t cvv=tmp[6];\n\t\t\t \t \n\t\t\t \t //Insertion des clients\n\t\t\t \t query = \"INSERT INTO consumer VALUES(\"+ id + \",'\" +firstname+\"','\"+lastname+\"')\";\n\t\t\t \t \n\t\t\t \t pstmt = conn.prepareStatement(query);\n\t\t\t \t pstmt.executeUpdate();\n\t\t\t \t \n\t\t\t \t \n\t\t\t \t //Insertion des comptes\n\t\t\t \t query = \"INSERT INTO account (card_number, expiration_month, expiration_year, cvv, remain_balance, consumer_id) \"\n\t\t \t\t\t\t+ \"VALUES ('\"+cardNumber+\"','\"+expirationMonth+\"','\"+expirationYear+\"','\"+cvv+\"',300,\"+id+\")\";\n\t\t\t \t\n\t\t\t \t pstmt = conn.prepareStatement(query);\n\t\t\t \t pstmt.executeUpdate();\n\t \t }\n\t \t \n\t \t \n\t \t } catch (Exception e) {\n\t \t System.err.println(\"Error: \" + e.getMessage());\n\t \t e.printStackTrace();\n\t \t }\n\t \t }", "void insert(CusBankAccount record);", "int insert(PrefecturesMt record);", "public void insertCourse(){\n \n }", "int insert(ClinicalData record);", "public void newCrayon(Crayon cr) {\r\n\tem.getTransaction( ).begin( );\r\n em.persist(cr);\r\n em.getTransaction().commit();\r\n }", "int insert(SalGrade record);", "int insert(SpecialCircumstance record);", "public int insertarCRN(SicaCRN crn) {\n if (conectado) {\n\n try {\n PreparedStatement p = Conexion.prepareStatement(\n \"INSERT INTO `crn`(`usuario`, `materia`, `crn`, `anio`, `ciclo`) \"\n + \"VALUES ( ?, ?, ?, YEAR(NOW()), CURRENT_CICLO() ) \"\n );\n\n p.setInt(1, crn.getUsuario());\n p.setString(2, crn.getMateria());\n p.setInt(3, crn.getCrn());\n\n Logy.m(\"Se insertara el CRN: \" + crn.getCrn());\n Logy.m(p.toString());\n\n int r = p.executeUpdate();\n return r;\n } catch (SQLException e) {\n Logy.me(\"\" + e.getLocalizedMessage() + \" \" + e.getMessage());\n Sincronizador.setOk(false);\n Sincronizador.setDetalles(Sincronizador.getDetalles() + \"error insertar CRN en DB, \");\n return 0;\n }\n } else {\n Logy.me(\"Error!!! no ha establecido previamente una conexion a la DB\");\n return 0;\n }\n }", "public void insert(Connection c, String name, String chap, int bookid, int id, int parid) {\n\t\tString query = \"insert into Text-to-game values('\" + name + \"', \" + id + \", '\" + chap + \"', NULL)\";\r\n\t\t\r\n\t\t Statement stmt = null;\r\n\t\t try {\r\n\t\t stmt = c.createStatement();\r\n\t\t stmt.executeUpdate(query);\r\n\t\t } catch (SQLException e) {\r\n\t\t e.printStackTrace();\r\n\t\t } \r\n\t\t\r\n\t}", "int insert(WstatTeachingClasshourTeacher record);", "protected void insertResult(String ime, int rezultat){\t\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"HH:mm yyyy-MM-dd\");\r\n\r\n\t\tLog.w(\"baza\",\"zapis v bazo\");\r\n\t\tContentValues cv = new ContentValues();\r\n\t\tcv.put(DatabaseHelper.USERNAME, ime);\r\n\t\tcv.put(DatabaseHelper.SCORE, rezultat);\t\r\n\t\tcv.put(DatabaseHelper.DATE, sdf.format(cal.getTime()));\t\r\n\t\tdb.insert(\"highscore\", DatabaseHelper.USERNAME, cv);\t\t\r\n\t}", "private void insertTupel(Connection c) {\n try {\n String query = \"INSERT INTO \" + getEntityName() + \" VALUES (null,?,?,?,?,?);\";\n PreparedStatement ps = c.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);\n ps.setString(1, getAnlagedatum());\n ps.setString(2, getText());\n ps.setString(3, getBild());\n ps.setString(4, getPolizist());\n ps.setString(5, getFall());\n ps.executeUpdate();\n ResultSet rs = ps.getGeneratedKeys();\n rs.next();\n setID(rs.getString(1));\n getPk().setValue(getID());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "int insert(TycCompanyCheckCrawler record);", "int insert(UserGift record);", "private void insert() {//将数据录入数据库\n\t\tUser eb = new User();\n\t\tUserDao ed = new UserDao();\n\t\teb.setUsername(username.getText().toString().trim());\n\t\tString pass = new String(this.pass.getPassword());\n\t\teb.setPassword(pass);\n\t\teb.setName(name.getText().toString().trim());\n\t\teb.setSex(sex1.isSelected() ? sex1.getText().toString().trim(): sex2.getText().toString().trim());\t\n\t\teb.setAddress(addr.getText().toString().trim());\n\t\teb.setTel(tel.getText().toString().trim());\n\t\teb.setType(role.getSelectedIndex()+\"\");\n\t\teb.setState(\"1\");\n\t\t\n\t\tif (ed.addUser(eb) == 1) {\n\t\t\teb=ed.queryUserone(eb);\n\t\t\tJOptionPane.showMessageDialog(null, \"帐号为\" + eb.getUsername()\n\t\t\t\t\t+ \"的客户信息,录入成功\");\n\t\t\tclear();\n\t\t}\n\n\t}", "public void insertVote(String name1, String name2, String name3, String name4, String name5, String name6, int ID, Date prepDate, int CanteenNo)\r\n {\r\n try \r\n {\r\n stmt = con.createStatement();\r\n stmt.execute(\"INSERT INTO voteresult(NSBMID,PrepDate,CanteenNo,\"+name1+\",\"+name2+\",\"+name3+\",\"+name4+\",\"+name5+\",\"+name6+\") VALUES(\"+ID+\",'\"+prepDate+\"',\"+CanteenNo+\",1,1,1,1,1,1)\");\r\n\r\n } \r\n catch (SQLException ex) \r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid Entry\\n(\" + ex + \")\");\r\n }\r\n \r\n }", "int insert(TycCompanyExecutiveCrawler record);", "int insert(ParkCurrent record);", "void insert(TResearchTeach record);", "@Override\r\n\tpublic int insert(FarmerCredit record) {\n\t\treturn farmerCreditDao.insert(record);\r\n\t}", "public static void inserttea() {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"insert into teacher values ('\"+teaid+\"','\"+teaname+\"','\"+teabirth+\"','\"+protitle+\"','\"+cno+\"')\");\n\t\t\tSystem.out.println(\"cno:\"+cno);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch (Exception e){\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据添加异常!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void insert(){\n Connection conn = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n \n try{\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConnection(\n \"jdbc:mysql://localhost:3306/process_checkout\",\"root\",\"\"\n );\n \n String query = \"INSERT INTO area (name) VALUES (?)\";\n \n PreparedStatement preparedStmt = conn.prepareStatement(query);\n preparedStmt.setString(1, name);\n preparedStmt.execute();\n \n }catch(SQLException e){\n \n } catch (ClassNotFoundException ex) {\n \n }finally{\n try {\n if(rs != null)rs.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(ps != null)ps.close();\n } catch (SQLException e) {\n /* ignored */ }\n try {\n if(conn != null)conn.close();\n } catch (SQLException e) {\n /* ignored */ }\n }\n \n }", "int insert(NeeqCompanyAccountingFirmOnline record);", "protected void activitySaveInDb(CustomApplicationInfo cai) {\n\t\tinitDb();\n\t\tdbAccess.insert(cai);\n\t}", "int insert(Computer record);", "void insert(BnesBrowsingHis record) throws SQLException;", "int insert(CityDO record);", "@Override\n public void save(String[] params) throws SQLException {\n String query = \"INSERT INTO coach(user_name,team,pageID,training,job,name)\" + \"values(?,?,?,?,?,?);\";\n Connection conn = dBconnector.getConnection();\n if (conn != null) {\n PreparedStatement stmt = null;\n try {\n conn.setCatalog(\"manageteams\");\n stmt = conn.prepareStatement(query);\n stmt.setString(1, params[0]);\n stmt.setString(2, params[1]);\n stmt.setInt(3, Integer.valueOf(params[2]));\n stmt.setString(4, params[3]);\n stmt.setString(5, params[4]);\n stmt.setString(6, params[5]);\n stmt.execute();\n stmt.close();\n conn.close();\n logger.info(\"coach \" + params[0] + \"successfuly saved\");\n }\n catch (SQLException e)\n {\n logger.error(e.getMessage());\n throw new SQLException(DaoSql.getException(e.getMessage()));\n }\n }\n }", "int insert(WizardValuationHistoryEntity record);", "public int insert(person p){\n\t\t\treturn j.update(\" insert into person (id,name,location,birthdate) \"+ \" values(?,?,?,?) \", new Object[] {p.getId(),p.getName(),p.getLocation(),new Timestamp(p.getDate().getTime())});\r\n\t\t\r\n\t}", "int insert(InspectionAgency record);", "int insert(Teacher record);", "@Override\n public void registerComplaint(final Complaint complaint) {\n String INSERT =\n \"INSERT INTO complaints (user_id,userName,roomId,message,dateOfComplaint,typeOfComplaint)\" +\n \" VALUES(?,?,?,?,?,?)\";\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = new Date();\n\n complaint.setDateOfComplaint(format.format(date.getTime()));\n\n jdbcTemplate.update(INSERT, new PreparedStatementSetter() {\n @Override\n public void setValues(PreparedStatement preparedStatement) throws SQLException {\n preparedStatement.setInt(1, complaint.getUserId());\n preparedStatement.setString(2, complaint.getUserName());\n preparedStatement.setString(3, complaint.getRoomId());\n preparedStatement.setString(4, complaint.getMessage());\n preparedStatement.setString(5, complaint.getDateOfComplaint());\n preparedStatement.setString(6, complaint.getType());\n }\n });\n\n logger.info(\"New Complaint By user \" + complaint.getUserName());\n\n }", "private void InsertCurriculum(Curriculum cur) {\n cuMng.createCurriculum(cur);\r\n }", "int insert(FinanceAccount record);", "int insert(BankUserInfo record);", "int insert(BankUserInfo record);", "public void create(PessoasEspacosDeCafe pec) {\n\n Connection con = ConnectionFactory.getConnection();\n PreparedStatement stmt = null;\n\n try {\n stmt = con.prepareStatement(\"INSERT INTO PessoasEspacosDeCafe (pessoasIdPessoas, espacosDeCafeIdEspacosDeCafe)VALUES(?, ?)\");\n\n stmt.setInt(1, pec.getPessoasIdPessoas());\n stmt.setInt(2, pec.getEspacosDeCafeIdEspacosDeCafe());\n\n stmt.executeUpdate();\n\n JOptionPane.showMessageDialog(null, \"Salvo com Sucesso!\");\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Erro ao Salvar: \" + ex);\n } finally {\n ConnectionFactory.closeConnection(con, stmt);\n }\n }", "public void insertPractice(PracticeEntry entry) {\n\t\tpatchMissingDefaults(entry);\n\t\tContentValues entryValues = sanitizeColumns(entry);\n\t\tlong columnId;\n\t\tif ((columnId = db.insert(PRACTICE_TABLE_NAME, null, entryValues)) == -1) {\n\t\t\tthrow new SQLException(\"There was an error inserting new row.\");\n\t\t}\n\n\t\tentry.getValues().put(BaseColumns._ID, columnId);\n\n\t\tupdatePractice(entry);\n\t}", "int insert(FinancialManagement record);", "void insertSelective(CTipoPersona record) throws SQLException;", "int insert(CmsVoteTitle record);", "int insert(Promo record);", "void insertCustomer() {\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tString call = \"call insert_customer (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tcs = conn.prepareCall(call);\t\t\t\n\t\t\tArrayList <String> param = new ArrayList<String>(); \n\t\t\tparam.add(genderBox.getSelectedItem().toString());\n\t\t\tparam.add(titleBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldFirstName.getText());\t\t\t\n\t\t\tparam.add(fieldMidName.getText());\n\t\t\tparam.add(fieldLastName.getText());\n\t\t\tparam.add(fieldAddress.getText());\n\t\t\tparam.add(fieldCity.getText());\n\t\t\tparam.add(fieldState.getText());\n\t\t\tparam.add(fieldZipcode.getText());\n\t\t\tparam.add(fieldEmail.getText());\t\t\t\n\t\t\tparam.add(fieldUsername.getText());\n\t\t\tparam.add(fieldPassword.getText());\n\t\t\tparam.add(fieldTelephone.getText());\n\t\t\tparam.add(fieldMaidenName.getText());\n\t\t\tparam.add(fieldBirthday.getText());\n\t\t\tparam.add(cctypeBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldCCnumber.getText());\n\t\t\tparam.add(fieldCCV.getText());\n\t\t\tparam.add(fieldExpirDate.getText());\n\t\t\tparam.add(fieldSocialSecurity.getText() + \" \");\n\t\t\t\n\t\t\tfor (int i = 0; i < 20; i++) {\n\t\t\t\tcs.setString(i+1, param.get(i));\n\t\t\t}\n\t\t\tcs.executeUpdate();\n\t\t\tconn.commit();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Exception caught: \" + e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(this, \"User, \" + fieldUsername.getText() +\" already exists.\");\n\t\t} finally {\n\t\t\t\n\t\t}\n\t}", "public static void insertcou(String cno2, String cname2, double stucredit2) {\n\t\ttry{\n\t\t\tps = conn.prepareStatement(\"insert into course values ('\"+ cno2 +\"','\"+ cname2 +\"','\"+stucredit2+\"')\");\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息添加成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null, \"课程信息添加失败!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}\n\t}", "public void insertDB() {\n //defines Connection con as null\n Connection con = MainWindow.dbConnection();\n try {\n //tries to create a SQL statement to insert values of a User object into the database\n String query = \"INSERT INTO User VALUES ('\" + userID + \"','\" + password + \"','\" + firstName + \"','\" +\n lastName + \"');\";\n Statement statement = con.createStatement();\n statement.executeUpdate(query);\n //shows a message that a new user has been added successfully\n System.out.println(\"new user has been added into the data base successfully\");\n } catch (Exception e) {\n //catches exceptions and show message about them\n System.out.println(e.getMessage());\n Message errorMessage = new Message(\"Error\", \"Something wrong happened, when there was a attempt to add user into the database. Try again later.\");\n }//end try/catch\n //checks if Connection con is equaled null or not and closes it.\n MainWindow.closeConnection(con);\n }", "public void salvarCandidato(CandidatoBean candidato) {\r\n Candidato destObject = modelMapper.map(candidato, Candidato.class);\r\n em.getTransaction().begin();\r\n em.persist(destObject);\r\n em.getTransaction().commit();\r\n em.close();\r\n em = null;\r\n }", "int insertSelective(CGcontractCredit record);", "int insert(Assist_table record);", "int insert(Prueba record);", "int insert(DO_Merchants record);", "public void insert() throws SQLException {\r\n\t\t//SQL-Statement\r\n\r\n\t\tString sql = \"INSERT INTO \" + table +\" VALUES (\" + seq_genreID +\".nextval, ?)\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setString(1, this.getGenre());\r\n\r\n\t\tint roswInserted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \" +roswInserted+ \"Zeilen hinzugefügt\");\r\n\r\n\t\tsql = \"SELECT \"+seq_genreID+\".currval FROM DUAL\";\r\n\t\tstmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tResultSet rs = stmt.executeQuery();\r\n\t\tif(rs.next())this.setGenreID(rs.getInt(1));\r\n\t\trs.close();\r\n\t\tstmt.close();\r\n\t}", "int insert(PcQualificationInfo record);", "public void insertProblema() {\n \n \n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n \n this.equipo.setEstado(true);\n this.prob = new ReporteProblema(equipo, this.problema, true,fecha);\n f.registrarReporte(this.prob);\n \n }", "@Override\n\tpublic boolean insert(Seats seat) \n\t{\n\t\tgetSession().saveOrUpdate(seat);\n\t\tSystem.out.println(\"admin \" + seat.getTime()+\" stored in the DB !!!\");\n\t\treturn true;\n\t}", "int insertao(Author_of ao){\r\n int res=0;\r\n \r\n String a = \"INSERT INTO author_of VALUES(?,?);\";\r\n try {\r\n PreparedStatement statement = this.connection.prepareStatement(a);\r\n statement.setString(1, ao.getIsbn());\r\n statement.setInt(2, ao.getAuthor_id());\r\n res = statement.executeUpdate();\r\n statement.close(); //close\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n return res;\r\n }", "int insert(PmPost record);", "int insert(UserPonumberGoods record);", "@Override\n\tpublic void insert() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 등록을 하다.\");\n\t}", "public void addCustomer(int Id, String name, String dob, String gender, String number, String email, String address, String password, Boolean promo, Integer reward, Boolean reg) throws SQLException { //code for add-operation \n st.executeUpdate(\"INSERT INTO IOTBAY.CUSTOMER \" + \"VALUES ('\" \n + Id + \"','\" + name + \"', '\" + dob + \"', '\" \n + gender + \"', '\" + number + \"', '\" \n + email + \"', '\" + address + \"', '\" \n + password + \"', '\" + promo + \"', '\"+ reward + \"', '\"+ reg \n + \"')\");\n\n }", "int insert(Nutrition record);" ]
[ "0.6565317", "0.6410313", "0.6284367", "0.6265058", "0.62210506", "0.6180989", "0.61459965", "0.61057395", "0.60962534", "0.60925335", "0.60755813", "0.60561335", "0.6045197", "0.6019841", "0.6011684", "0.59929156", "0.5989399", "0.5984046", "0.5966864", "0.59663385", "0.59663385", "0.59593236", "0.59428906", "0.5934407", "0.59236705", "0.5920908", "0.5919247", "0.5906757", "0.5906208", "0.59050137", "0.59049433", "0.5871077", "0.587016", "0.58689386", "0.58664286", "0.5865144", "0.5864075", "0.5863312", "0.58413815", "0.583653", "0.5830796", "0.58295393", "0.58273804", "0.58263534", "0.5813891", "0.58093", "0.5808089", "0.57998884", "0.5798936", "0.57969284", "0.5792265", "0.57920516", "0.5790455", "0.5789696", "0.57889193", "0.5770429", "0.57690924", "0.5765919", "0.57655185", "0.57642466", "0.5755459", "0.57552886", "0.57541", "0.5746047", "0.5744348", "0.57323205", "0.57283944", "0.5723831", "0.5713283", "0.5710197", "0.5709976", "0.57088953", "0.5708077", "0.57021797", "0.56931484", "0.56931484", "0.56901294", "0.567775", "0.56743485", "0.56721264", "0.56620276", "0.5661991", "0.5661364", "0.5660503", "0.56602365", "0.5659283", "0.5657688", "0.5651908", "0.5640538", "0.56402564", "0.5639309", "0.5636988", "0.5633715", "0.5629507", "0.56262493", "0.5626155", "0.56249285", "0.56231004", "0.56195635", "0.5619384" ]
0.70655596
0
Allows updating of a crime already in the database
public void updateCrime(Crime crime) { String uuidString = crime.getmId().toString(); ContentValues values = getContentValues(crime); // WUUUTTTTT>???? mDatabase.update(CrimeTable.NAME, values, CrimeTable.Cols.UUID + " = ?", new String[]{ uuidString }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean updateSickPerson(SickPerson sickPerson) throws SQLException;", "@Override\n public void onCrimeUpdated(Crime crime) {\n }", "int updateByPrimaryKey(SpecialCircumstance record);", "CounselorBiographyTemp update(CounselorBiographyTemp entity);", "int updateByPrimaryKey(ReEducation record);", "public void addCrime(Crime c) {\n ContentValues values = getContentValues(c);\n mDatabase.insert(CrimeTable.NAME, null, values);\n }", "public void update() {\n\t\tPreparedStatement stmt;\n\t\ttry {\n\t\t\tstmt = cn.prepareStatement(\n\t\t\t\t\t\"UPDATE Metal SET metalDissolvedBy = ?, molesOfAcidToDissolve = ? WHERE metalID = ?\");\n\t\t\tstmt.setInt(1, dissolvedBy);\n\t\t\tstmt.setDouble(2, molesOfAcidToDissolve);\n\t\t\tstmt.setInt(3, ID);\n\t\t\tstmt.execute();\n\t\t} catch (Exception e) {\n\t\t\tDatabaseException.detectError(e);\n\t\t}\n\t}", "int updateByPrimaryKeySelective(SpecialCircumstance record);", "int updateByPrimaryKey(CTipoComprobante record) throws SQLException;", "@Override\n public CerereDePrietenie update(CerereDePrietenie c ){\n String SQL = \"UPDATE cerereDePrietenie \"\n + \"SET status = ? \"\n + \"WHERE id = ?\";\n\n int affectedrows = 0;\n\n try (Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(SQL)) {\n\n\n pstmt.setString(1, c.getStatus());\n pstmt.setInt(2, Math.toIntExact(c.getId()));\n\n affectedrows = pstmt.executeUpdate();\n\n } catch (SQLException ex) {\n System.out.println(ex.getMessage());\n }\n return c;\n\n }", "int updateByPrimaryKey(CGcontractCredit record);", "int updateByPrimaryKeySelective(ReEducation record);", "public void update(Pessoa p) {\n\t\tdb.save(p);\t\t\n\t}", "@Override\r\n\tpublic void updateFamille(Famille C) {\n\t\r\n\t\tSession session=HibernateUtil.getSessionFactory().getCurrentSession();\r\n\t \tsession.beginTransaction();\r\n\t \tsession.update(C);\r\n\t \tsession.getTransaction().commit();\r\n\t}", "@Override\n\tpublic Result update(CurriculumVitae entity) {\n\t\treturn null;\n\t}", "int updateByPrimaryKeySelective(CGcontractCredit record);", "@Override\n\t/**\n\t * Actualizo un empleado.\n\t */\n\tpublic boolean update(Object c) {\n\t\treturn false;\n\t}", "int updateByPrimaryKey(Cargo record);", "void update(Employee nurse);", "int updateByPrimaryKey(courses record);", "E update(E entiry);", "int updateByPrimaryKey(TycCompanyCheckCrawler record);", "int updateByPrimaryKey(CTipoPersona record) throws SQLException;", "int updateByPrimaryKey(Course record);", "int updateByPrimaryKey(Course record);", "private void updateDB() {\n }", "public boolean editBike(Bike bike){//Edits the desired bike with matching bikeId\n if(!findBike(bike.getBikeId())){\n return false;\n //Bike_ID not registered in database, can't edit what's not there\n }else{\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(EDIT)){\n \n ps.setDate(1, bike.getSqlDate());\n ps.setDouble(2, bike.getPrice());\n ps.setString(3, bike.getMake());\n ps.setInt(4,bike.getTypeId());\n if(bike.getStationId() == 0){\n ps.setNull(5, INTEGER);\n }else{\n ps.setInt(5, bike.getStationId());\n }\n ps.setInt(6, bike.getBikeId());\n ps.executeUpdate();\n return true;\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n }\n return false;\n }", "int updateByPrimaryKey(ExamRoom record);", "int updateByPrimaryKey(Commet record);", "int updateByPrimaryKey(PrefecturesMt record);", "Patient update(Patient patient);", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "int updateByPrimaryKey(Computer record);", "int updateByPrimaryKey(NeeqCompanyAccountingFirmOnline record);", "int updateByPrimaryKey(CityDO record);", "int updateByPrimaryKey(TrainCourse record);", "public int modificarPresidente(int idpresi,int idcam,int idequipo, String nombre, String paterno,String materno,String dni,String fecNac,String fechaDirect,String telefono){\n sql=\"UPDATE presidente set idCampeonato='\"+idcam+\"', idEquipo='\"+idequipo+\"',Nombre_pres='\"+nombre+\"',Ap_presidente='\"+paterno+\"',Am_presidente='\"+materno+\"',Dni='\"+dni+\"',Fec_Nac='\"+fecNac+\"',Fecha_presidente='\"+fechaDirect+\"',Telefono='\"+telefono+\"' WHERE idPresidente='\"+idpresi+\"'\";\r\n \r\n try {\r\n cx = Conexion.coneccion();\r\n st = cx.createStatement();\r\n res = st.executeUpdate(sql);\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Error: \"+e);\r\n }\r\n return res;\r\n }", "int updateByPrimaryKey(TrainingCourse record);", "int updateByPrimaryKeySelective(CTipoPersona record) throws SQLException;", "public void update() throws ModelException {\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = DataSource.getConnection();\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\n \" UPDATE carrera nombre = ? WHERE codigo = ?\");\n\t\t\tpstmt.setString(2, this.nombre);\n\t\t\tpstmt.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ModelException(\"Error de acceso a datos\", e);\n\t\t} finally {\n \t\t\tDataSource.closeConnection(conn);\n\t\t}\n\t}", "public void update() throws SQLException {\n DatabaseConnector.updateQuery(\"UPDATE course SET \"\n + \"courseDept='\" + this.courseDept + \"', \"\n + \"courseNum='\" + this.courseNum + \"', \"\n + \"courseName='\" + this.courseName + \"', \"\n + \"info='\" + this.info + \"', \"\n + \"credit=\" + this.credit);\n }", "public void updateCustomerAge(Connection connection, int CID) throws SQLException {\n\n Scanner scan = new Scanner(System.in);\n\n DatabaseMetaData dmd = connection.getMetaData();\n ResultSet rs = dmd.getTables(null, null, \"CUSTOMER\", null);\n\n if (rs.next()){\n\n String sql = \"UPDATE Customer SET age = ? WHERE c_ID = ?\";\n PreparedStatement pStmt = connection.prepareStatement(sql);\n pStmt.clearParameters();\n\n System.out.print(\"Please provide a new age: \");\n setAge(Integer.parseInt(scan.nextLine()));\n pStmt.setInt(1, getAge());\n\n setCID(CID);\n pStmt.setInt(2, getCID());\n\n try { pStmt.executeUpdate(); }\n catch (SQLException e) { throw e; }\n finally {\n pStmt.close();\n rs.close();\n }\n }\n else {\n System.out.println(\"ERROR: Error loading CUSTOMER Table.\");\n }\n }", "int updateByPrimaryKeySelective(NeeqCompanyAccountingFirmOnline record);", "public int Editcomp(Long comp_id, String compname, String address, String city,\r\n\t\tString state, Long offno, Long faxno, String website, String e_mail) throws SQLException {\nint i =DbConnect.getStatement().executeUpdate(\"update company set address='\"+address+\"',city='\"+city+\"',state='\"+state+\"',offno=\"+offno+\",faxno=\"+faxno+\",website='\"+website+\"',email='\"+e_mail+\"'where comp_id=\"+comp_id+\" \");\r\n\treturn i;\r\n}", "int updateByPrimaryKeySelective(courses record);", "int updateByPrimaryKeySelective(TycCompanyCheckCrawler record);", "int updateByPrimaryKey(ClinicalData record);", "int updateByPrimaryKey(TycCompanyExecutiveCrawler record);", "public void attemptToUpdate();", "@Override\n @Transactional\n public void update(Surname changedSurname) {\n \n }", "int updateByPrimaryKeySelective(Course record);", "@Override\n\tpublic void update_in_DB() throws CouponSiteMsg \n\t{\n\t\t\n\t}", "int updateByPrimaryKey(DrpCommissionRule record);", "public static void updateContractor(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects\" +\r\n \" SET contract_name = ?, contract_tel = ?, contract_email = ?, contract_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.contract_name);\r\n pstmt.setString(2, NewProject.contract_tel);\r\n pstmt.setString(3, NewProject.contract_email);\r\n pstmt.setString(4, NewProject.contract_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "int updateByPrimaryKeySelective(PrefecturesMt record);", "public void editCommissionAccounts(CommissionAccount commissionAccount);", "int updateByPrimaryKey(County record);", "public void updateInsurance(Insurance insurance) throws DataAccessException;", "void edit(Price Price);", "int updateByPrimaryKey(Prueba record);", "int updateByPrimaryKeySelective(Commet record);", "int updateByPrimaryKey(FctWorkguide record);", "int updateByPrimaryKey(TResearchTeach record);", "@Test\n public void testUpdate() {\n int resultInt = disciplineDao.insert(disciplineTest);\n \n boolean result = false;\n \n if(resultInt > 0){\n disciplineTest.setId(resultInt);\n \n disciplineTest.setName(\"matiere_test2\");\n \n result = disciplineDao.update(disciplineTest);\n \n disciplineDao.delete(disciplineTest);\n }\n \n assertTrue(result);\n }", "void update(EmployeeDetail detail) throws DBException;", "int updateByPrimaryKey(LawPerson record);", "int updateByPrimaryKey(UserGift record);", "@Override\r\n\tpublic void update() throws SQLException {\n\r\n\t}", "@Override\r\n\tpublic void update(Connection connection, Long id, Salary salary) throws SQLException {\n\r\n\t}", "@Override\r\n\tpublic void updateCourse(Course c) {\n\t\t\r\n\t\tint cid1 = c.getCid();\r\n\t\ttry\r\n\t\t{\r\n\t\tConnection connection=DBConnection.getConnection();\r\n\t\tString sqlQuery=\"update \"+TABLECourse+\" set \"+COLcname+\" = ?, \"+COLduration+\" = ?, \"+COLfees+\"=? where \"+COLcid+\" =\"+cid1;\r\n\t\t\r\n\t\tPreparedStatement pst = connection.prepareStatement(sqlQuery);\r\n\t\tpst.setString(1, c.getCname());\r\n\t\tpst.setInt(2, c.getCduration());\r\n\t\tpst.setInt(3, c.getCfees());\r\n\t\t\r\n\t\tpst.executeUpdate();\r\n\r\n\t\t\r\n\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "int updateByPrimaryKey(ProEmployee record);", "public static void update(int id, String nome, String cognome, String email, String citta, Date dataNascita, String username, String password, int ruolo, Date dataSignup ) {\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n \r\n \tmap.put(\"nome\", nome);\r\n \tmap.put(\"cognome\", cognome);\r\n \tmap.put(\"email\", email);\r\n \tmap.put(\"citta\", citta);\r\n \tmap.put(\"dataNascita\", dataNascita);\r\n \tmap.put(\"username\", username);\r\n \tmap.put(\"password\", crypt(password));\r\n \tmap.put(\"ruolo\", ruolo); // ruolo dell'utente normale \r\n \tmap.put(\"dataSignup\", dataSignup);\r\n\t\ttry {\r\n\t\t\tDatabase.connect();\r\n \t\tDatabase.updateRecord(\"utente\", map, \"utente.id=\"+id);\r\n \t\tDatabase.close(); \t\t\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\r\n\t}", "@Override\r\n\tpublic void update(Cidade obj) {\n\r\n\t}", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "@Override\n\tpublic boolean update(String sql) {\n\t\treturn false;\n\t}", "public boolean atualizarSocio(Socio socio) {\n System.out.println(\"altualizarSocio\");\n // inicia a conexao com o Banco de dados chamando\n // a classe Conexao\n connection = BancoDados.getInstance().getConnection();\n System.out.println(\"conectado e preparando para inserir\");\n Statement stmt = null;\n try {\n stmt = connection.createStatement();\n\n //Inserir dados na tabela SOCIO!\n String sql = \"UPDATE socio SET cpfSocio = '\" + socio.getCpf() +\"',rgSocio = '\" + socio.getRg()\n +\"',matSocio = '\" + socio.getMatricula() +\"',sexoSocio = '\" + socio.getSexo() +\"',diaNascSocio = '\" + socio.getDia()\n +\"',mesNascSocio = '\" + socio.getMes() +\"',anoNascSocio = '\" + socio.getAno() +\"',enderecoSocio = '\" + socio.getEndereco()\n +\"',numEndSocio = '\" + socio.getNumEndereco() +\"',bairroSocio = '\" + socio.getBairro() +\"',cidadeSocio = '\" + socio.getCidade()\n +\"',estadoSocio = '\" + socio.getEstado() +\"',foneSocio = '\" + socio.getFone() +\"',celSocio = '\" + socio.getCel() +\"',emailSocio = '\" + socio.getEmail()\n +\"',blocoSocio = '\" + socio.getBloco() +\"',funcaoSocio = '\" + socio.getFuncao() +\"' WHERE nomeSocio = '\" + socio.getNome() + \"'\";\n\n System.out.println(\"SQL: \" + sql);\n System.out.println(\"Dados do Socio alterados com sucesso\");\n stmt.executeUpdate(sql);\n\n String sql2 = \"UPDATE socio SET nomeSocio = '\" + socio.getNome() +\"' WHERE cpfSocio = '\" + socio.getCpf() + \"'\";\n System.out.println(\"SQL: \" + sql);\n System.out.println(\"Nome do socio alterado com sucesso\");\n stmt.executeUpdate(sql2);\n\n return true;\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n return false;\n } finally {\n // este bloco finally sempre executa na instrução try para\n // fechar a conexão a cada conexão aberta\n try {\n stmt.close();\n connection.close();\n } catch (SQLException e) {\n System.out.println(\"Erro ao desconectar\" + e.getMessage());\n }\n }\n }", "int updateByPrimaryKey(TbCities record);", "public boolean modificarRegistro(int codigoCiclo, int codigoPlan, int codigoMeta, int codigoObjetivo, String descripcion, String justificacion, double valorMeta, double valorMinimo, double valorMaximo, String tipoMedicion, String estado, String fuenteDato, String aplicaEn, String unidadMedida, String tipoGrafica, String mes01, String mes02, String mes03, String mes04, String mes05, String mes06, String mes07, String mes08, String mes09, String mes10, String mes11, String mes12, Collection arrResponsables, Collection arrRecursos, String usuarioModificacion) {\n/* */ try {\n/* 810 */ String s = \"update cal_plan_metas set codigo_objetivo=\" + codigoObjetivo + \",\" + \" descripcion='\" + descripcion + \"',\" + \" justificacion='\" + justificacion + \"',\" + \" valor_meta=\" + valorMeta + \",\" + \" valor_minimo=\" + valorMinimo + \",\" + \" valor_maximo=\" + valorMaximo + \",\" + \" tipo_medicion='\" + tipoMedicion + \"',\" + \" estado='\" + estado + \"',\" + \" fuente_dato='\" + fuenteDato + \"',\" + \" aplica_en='\" + aplicaEn + \"',\" + \" unidad_medida='\" + unidadMedida + \"',\" + \" tipo_grafica='\" + tipoGrafica + \"',\" + \" mes01='\" + mes01 + \"',\" + \" mes02='\" + mes02 + \"',\" + \" mes03='\" + mes03 + \"',\" + \" mes04='\" + mes04 + \"',\" + \" mes05='\" + mes05 + \"',\" + \" mes06='\" + mes06 + \"',\" + \" mes07='\" + mes07 + \"',\" + \" mes08='\" + mes08 + \"',\" + \" mes09='\" + mes09 + \"',\" + \" mes10='\" + mes10 + \"',\" + \" mes11='\" + mes11 + \"',\" + \" mes12='\" + mes12 + \"',\" + \" fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where\" + \" codigo_meta=\" + codigoMeta + \" and codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 842 */ boolean rta = this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* */ \n/* 846 */ if (rta) {\n/* */ \n/* 848 */ s = \"update cal_plan_recursos_meta set estado='X', fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where\" + \" codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 857 */ this.dat.executeUpdate(s);\n/* 858 */ Iterator iterator = arrRecursos.iterator();\n/* 859 */ while (iterator.hasNext()) {\n/* 860 */ Integer codigo = (Integer)iterator.next();\n/* 861 */ crearRecurso(codigoCiclo, codigoPlan, codigoMeta, codigo.intValue(), \"A\", usuarioModificacion);\n/* */ } \n/* */ \n/* 864 */ s = \"delete from cal_plan_recursos_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and estado='X'\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 870 */ this.dat.executeUpdate(s);\n/* */ \n/* 872 */ s = \"update cal_plan_responsables_meta set estado='X', fecha_modificacion=\" + Utilidades.getFechaBD() + \",\" + \" usuario_modificacion='\" + usuarioModificacion + \"'\" + \" where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 880 */ this.dat.executeUpdate(s);\n/* */ \n/* 882 */ Iterator iterator2 = arrResponsables.iterator();\n/* 883 */ while (iterator2.hasNext()) {\n/* 884 */ Integer codigo = (Integer)iterator2.next();\n/* 885 */ crearResponsable(codigoCiclo, codigoPlan, codigoMeta, codigo.intValue(), \"A\", usuarioModificacion);\n/* */ } \n/* */ \n/* 888 */ s = \"delete from cal_plan_responsables_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + codigoMeta + \" and estado='X'\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 895 */ this.dat.executeUpdate(s);\n/* */ } \n/* */ \n/* */ \n/* 899 */ return rta;\n/* */ }\n/* 901 */ catch (Exception e) {\n/* 902 */ e.printStackTrace();\n/* 903 */ Utilidades.writeError(\"CalMetasDAO:modificarRegistro \", e);\n/* */ \n/* 905 */ return false;\n/* */ } \n/* */ }", "int editHabit(Habit oldHabit, Habit newHabit);", "@Override\n\t\tpublic boolean update(Carrera entity, int id) {\n\t\t\t\treturn false;\n\t\t}", "int updateByPrimaryKey(Online record);", "public void updateJoueurs();", "void update(User user) throws SQLException;", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "@Transactional\n\t@Modifying(clearAutomatically = true)\n\t@Query(\"UPDATE Users t SET t.university =:newUniversity WHERE t.id =:currentUser\")\n void editUniversity(@Param(\"newUniversity\") String newUniversity, @Param(\"currentUser\") Integer currentUser);", "int updateByPrimaryKeySelective(Computer record);", "public boolean EditUser(String lastCMND, User u){\n String sql = \"SELECT * FROM user WHERE cmnd=\"+lastCMND;\n ConnectDB c = new ConnectDB();\n conn = c.getConnection();\n try {\n Statement stmt = conn.createStatement(\n ResultSet.TYPE_SCROLL_INSENSITIVE,\n ResultSet.CONCUR_UPDATABLE);\n// ps = conn.prepareStatement(sql);\n// ps.setString(1, u.getCmnd());\n// ps.setString(2, u.getFullName());\n// ps.setInt(3, u.getPhone());\n// ps.setString(4, u.getAddress());\n// ps.setString(5, u.getAvt());\n// ps.setString(6, lastCMND);\n rs = stmt.executeQuery(sql);\n System.err.println(rs);\n while(rs.next()){\n rs.updateString(\"cmnd\", u.getCmnd());\n rs.updateString(\"fullname\", u.getFullName());\n rs.updateInt(\"phone\", u.getPhone());\n rs.updateString(\"address\", u.getAddress());\n rs.updateString(\"avt\", u.getAvt());\n rs.updateRow();\n \n }\n return true;\n// if (ps.executeUpdate() > 0) {\n// return true;\n// } else {\n// return false;\n// }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n \n }", "int updateByPrimaryKeySelective(Cargo record);", "int updateByPrimaryKeySelective(TrainingCourse record);", "public void updateByEntity(Paciente paciente) {\n\t\n}", "int updateByPrimaryKeySelective(TrainCourse record);", "int updateByPrimaryKey(Dress record);", "public boolean updateCourse(Course c) {\n\t\treturn false;\n\t}", "public void update(Expence expence)\r\n/* 169: */ {\r\n/* 170:174 */ this.expenceDao.update(expence);\r\n/* 171: */ }", "int updateByPrimaryKey(Dormitory record);", "int updateByPrimaryKey(TCpyYearCheck record);", "int updateByPrimaryKey(ChronicCheck record);", "public boolean updateCelebrity(Celebrity c) {\n\t\tentityManager.merge(c);\n\t\t\n\t\treturn true;\n\t}", "int updateByPrimaryKey(Dish record);", "int updateByPrimaryKey(SelectUserRecruit record);" ]
[ "0.6314713", "0.628876", "0.6239071", "0.6144299", "0.60726357", "0.59923816", "0.59683967", "0.59560513", "0.59542215", "0.59429085", "0.59412336", "0.5929048", "0.5922717", "0.5911218", "0.59103596", "0.58458215", "0.58456844", "0.58350694", "0.5828772", "0.58089066", "0.58003926", "0.57997066", "0.57983106", "0.57976234", "0.57976234", "0.57851905", "0.57681817", "0.57659173", "0.5761311", "0.576026", "0.5745141", "0.5736361", "0.57318693", "0.57304674", "0.57098794", "0.57005906", "0.5691267", "0.5689569", "0.5675561", "0.5670775", "0.56686306", "0.56669", "0.5661841", "0.56524134", "0.5650912", "0.5647176", "0.56355935", "0.5622188", "0.5620715", "0.56199574", "0.5615424", "0.5614324", "0.5612402", "0.55954486", "0.5595125", "0.55941415", "0.5590554", "0.5575561", "0.5563057", "0.5560756", "0.5554572", "0.55476254", "0.55461675", "0.5543853", "0.5542591", "0.55416125", "0.5539082", "0.5538443", "0.553834", "0.5537286", "0.5536212", "0.55361724", "0.55353904", "0.55316055", "0.5522721", "0.55221015", "0.55177975", "0.5517749", "0.5514674", "0.55056393", "0.5505093", "0.5499909", "0.54979014", "0.5493662", "0.54936105", "0.5492746", "0.54919267", "0.54905695", "0.5490342", "0.5490019", "0.5487999", "0.5487633", "0.548561", "0.5483434", "0.5479705", "0.5478456", "0.54731363", "0.5469657", "0.5469426", "0.5464486" ]
0.70232266
0
Deletes a new Crime based on the id passed in
public void deleteCrime(UUID id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteCours(long id) {\n\t\tem.remove(getCours(id));\n\t}", "public void delete(int id);", "public void delete(Long id) {\n log.debug(\"Request to delete Candidato : {}\", id);\n candidatoRepository.deleteById(id);\n }", "void deleteMataKuliah (int id);", "public void eliminarCajeros(int id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(Integer id);", "public void delete(Integer id) {\n\t\t\t\t\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\n\t\tPerson person=(Person)session.get(Person.class, id);\n\t\t\n\t\tSet<CreditCard> creditCards =person.getCreditCards();\n\t\t\n\t\t// Delete person\n\t\tsession.delete(person);\n\t\t\n\t\t// Delete associated credit cards\n\t\tfor (CreditCard creditCard: creditCards) {\n\t\t\tsession.delete(creditCard);\n\t\t}\n\t}", "void delete(Integer id);", "void delete(Integer id);", "@DeleteMapping(\"/citizens/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCitizen(@PathVariable Long id) {\n log.debug(\"REST request to delete Citizen : {}\", id);\n citizenService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"citizen\", id.toString())).build();\n }", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(String id);", "public void delete(int id) {\n\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete AcademicExperience : {}\", id);\n academicExperienceRepository.deleteById(id);\n }", "void delete( Integer id );", "void delete(ID id);", "void deleteChallengeById(int id);", "public String deleteResearcher(int id);", "@SuppressWarnings(\"rawtypes\")\n\tpublic void deleteById(String id)\n\t{\n\t\topen();\n\t\ttry\n\t\t{\n\t\t\tCensus census= new Census();\n\t\t\tcensus.setId(id);\n\t\t\tObjectSet result=DB.queryByExample(census);\n\t\t\t\n\t\t\tif(result.hasNext())\n\t\t\t{\n\t\t\t\tDB.delete((Census)result.next());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]Census does not exist in database\");\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}", "Integer delete(int id);", "@Override\r\n\tpublic Result delete(int id) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void deleteClasse(String id) {\n\t\tclasseRepo.deleteById(id);\n\t}", "@Override\n public void delete(int id) {\n repr.delete(id);\n }", "public int delete( Integer idConge ) ;", "void delete(int id);", "void delete(int id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "public void deleteCita(int id){\n try {\n PreparedStatement preparedStatement = con.prepareStatement(\"DELETE FROM paciente WHERE id_paciente=?;\");\n preparedStatement.setInt(1,id);\n preparedStatement.executeUpdate();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void remove(int id){\n\t\ttry {\n\t\t\tcon = ConexaoSingleton.getInstance();\n\t\t\tpst = con.prepareStatement(\"DELETE FROM Medicamento WHERE IDMEDC=?\");\n\t\t\tpst.setInt(1, id);\n\t\t\tpst.execute();\n\t\t}catch(SQLException e) {\n\t\t\t\n\t\t}\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete CentreComposition : {}\", id); centreCompositionRepository.deleteById(id);\n }", "public void delete(int id) throws Exception {\n\n\t}", "@Override\n\tpublic void deleteCateogry(int id) {\n\t\tcategoryRepository.deleteById(id);\n\t\t\n\t}", "@Override\r\n\tpublic void DeleteCitizen(int cin) {\n\r\n\t\tem.remove(em.find(Citizen.class, cin));\r\n\r\n\t}", "void deletePersonById( final Long id );", "void deleteById(int id);", "public void delete(K id);", "public void delete(Integer id) {\n\r\n\t}", "@Override\n public Mechanic deleteEmployee(Long id) {\n LOGGER.info(\"Delete Mechanic with id {}\", id);\n Mechanic mechanic = getEmployee(id);\n mechanicRepository.delete(mechanic);\n return mechanic;\n }", "@Override\n\tpublic void deletebyid(Integer id) {\n\t\t\n\t}", "void deleteElective(Long id);", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(int id) {\n\t\t\n\t}", "@DeleteMapping(\"/programmes/{id}\")\n public ResponseEntity<Void> deleteProgramme(@PathVariable Long id) {\n log.debug(\"REST request to delete Programme : {}\", id);\n programmeService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "void DeleteCompteUser(int id);", "public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }", "@Override\n\tpublic void delete(int id) {\n\t}", "public void delete(Integer id) {\n\t\tpersonRepository.delete(id);\n\t}", "@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}", "public void delete(Long id) {\n log.debug(\"Request to delete Clinic : {}\", id);\n clinicRepository.delete(id);\n }", "@Override\n public void delete(int id) {\n }", "@Override\n\tpublic void delete(Integer id) {\n\n\t}", "@Override\r\n\tpublic int delete(int id) {\n\t\treturn jdbcTemplate.update(\"call PKG_ESTADO_CIVIL.PR_DEL_ESTADO_CIVIL(?)\", id);\r\n\t}", "@Override\n\tpublic void deleteVille(Long id) {\n\t\tOptional<Ville> ville = villeRepository.findById(id);\n\t\t\n\t\tif(ville==null)\n\t\t\tthrow new EntityNotFoundException(\"No ville with id \"+id+\" is founded\");\n\t\telse\n\t\t\tvilleRepository.delete(ville.get());\n\t\t\n\t}", "@Override\n\tpublic void deleteById(Integer id) throws Exception {\n\t\tcomproRepository.deleteById(id);\n\t}", "@Override\n\tpublic void delete(Integer id) {\n\t\t\n\t}", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "@Override\r\n\tpublic void del(Integer id) {\n\t\t\r\n\t}", "public void delete(Long id);", "public void delete(Long id);", "public void delete(Long id);", "public void delete(Long id);", "public void delete(Long id);", "public boolean delete(String id);", "public boolean delete(String id);", "public void delete (long id ){\n\t\treclamationRepository.deleteById(id);}", "boolean delete(ID id);", "public static void delete(int id){\n\t\tfind.byId(id).delete();\n\t}", "public void deleteById(String id);", "public void delete(Long id) {\n log.debug(\"Request to delete Civilite : {}\", id);\n civiliteRepository.deleteById(id);\n }", "@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete MFPortfolio : {}\", id);\n mFPortfolioRepository.delete(id);\n }", "public void deleteObject(String id) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(int id) {\n\t\tconsigMetalDtRepository.delete(id);\r\n\t\t\r\n\t}", "void deleteById(Integer id);", "void deleteById(Integer id);", "@Override\n\tpublic void delete(String id) {\n\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\t\n\t}", "@Override\n\tpublic void deleteProfessor(int id) {\n\t\tprofessorDao.delete(Professor.class, id);\n\t}", "@Override\r\n\tpublic void delete(Long id) {\n\t\t\r\n\t}", "void delete( Long id );", "public void DeleteCust(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);", "void deleteById(String id);" ]
[ "0.6570113", "0.65627635", "0.6525714", "0.65215695", "0.64966714", "0.6454035", "0.6454035", "0.6454035", "0.64284056", "0.6411592", "0.6411592", "0.6403889", "0.64029694", "0.64029694", "0.64029694", "0.64029694", "0.64029694", "0.63916737", "0.636154", "0.635222", "0.6340727", "0.63290536", "0.6320485", "0.631006", "0.63026917", "0.62942904", "0.62938684", "0.62847596", "0.6282924", "0.62705046", "0.6259422", "0.6259422", "0.62558055", "0.62558055", "0.62558055", "0.62558055", "0.62558055", "0.62558055", "0.625257", "0.6248735", "0.62177277", "0.62176335", "0.6213609", "0.6209892", "0.6207323", "0.6205667", "0.6187696", "0.6186156", "0.61767095", "0.61760986", "0.6173165", "0.6171339", "0.6171339", "0.6171339", "0.6171339", "0.6171245", "0.6169893", "0.6168851", "0.61595875", "0.61574787", "0.615497", "0.61511296", "0.6148252", "0.6146346", "0.61403096", "0.6137739", "0.61365247", "0.6132338", "0.612936", "0.61269444", "0.6108614", "0.6108614", "0.6108614", "0.6108614", "0.6108614", "0.61067075", "0.61067075", "0.6099061", "0.6088347", "0.6082432", "0.6074595", "0.607044", "0.60667044", "0.6066661", "0.6059238", "0.6058619", "0.6049798", "0.6049798", "0.60448647", "0.60397977", "0.60397977", "0.60392284", "0.6029968", "0.6027955", "0.6026916", "0.60210586", "0.60210586", "0.60210586", "0.60210586", "0.60210586" ]
0.8245051
0
BufferedReader f = new BufferedReader(new FileReader("/Users/spencersharp/Desktop/input.txt"));
public static void main(String[] args) throws IOException { BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); PrintWriter writer = new PrintWriter(new BufferedOutputStream(System.out)); String output = ""; //Write all output to this string //Code here int numLevels = Integer.parseInt(f.readLine()); int[] nums = new int[numLevels]; String line = f.readLine(); StringTokenizer st = new StringTokenizer(line); int numLevelsX = Integer.parseInt(st.nextToken()); for(int i = 0; i < numLevelsX; i++) { int n = Integer.parseInt(st.nextToken()); nums[n-1]++; } line = f.readLine(); st = new StringTokenizer(line); int numLevelsY = Integer.parseInt(st.nextToken()); for(int i = 0; i < numLevelsY; i++) { int n = Integer.parseInt(st.nextToken()); nums[n-1]++; } boolean isBeatable = true; for(int i = 0; i < numLevels; i++) { if(nums[i]==0) isBeatable = false; } output = isBeatable?"I become the guy.":"Oh, my keyboard!"; //Code here //out.println(output); writer.println(output); writer.close(); System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void openInput(String file)\r\n\t{\n\t\ttry{\r\n\t\t\tfstream = new FileInputStream(file);\r\n\t\t\tin = new DataInputStream(fstream);\r\n\t\t\tis = new BufferedReader(new InputStreamReader(in));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.err.println(e);\r\n\t\t}\r\n\r\n\t}", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "String input() {\n\n try {\n\n FileReader reader = new FileReader(\"the text.txt\");\n BufferedReader bufferedReader = new BufferedReader(reader);\n StringBuilder builder = new StringBuilder();\n String line;\n\n while ((line = bufferedReader.readLine()) != null)\n builder.append(line);\n\n return builder.toString();\n\n } catch (IOException e) {\n\n System.out.println(\"Input Failure\");\n return null;\n }\n }", "public void readFile();", "private void ReadTextFile(String FilePath) {\n\t\t\n\t\t\n\t}", "public static void reading(String fileName)\n {\n\n }", "public void textFile(String path){\n\t\tBufferedReader br;\r\n\t\ttry {\r\n\t\t\tbr = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tnew FileInputStream(path),Charset.forName(\"gbk\")));\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new IllegalArgumentException(e);\r\n\t\t}\r\n\t\tLineBufferReader myReader=new LineBufferReader(br);\r\n\t}", "String readText(FsPath path);", "void citire(FileReader f);", "public void readFromFile() {\n\n\t}", "public String readFile(){\r\n StringBuffer str = new StringBuffer(); //StringBuffer is a mutable string\r\n Charset charset = Charset.forName(\"UTF-8\"); //UTF-8 character encoding\r\n Path file = Paths.get(filename + \".txt\");\r\n try (BufferedReader reader = Files.newBufferedReader(file, charset)) { // Buffer: a memory area that buffered streams read\r\n String line = null;\r\n while ((line = reader.readLine()) != null) { //Readers and writers are on top of streams and converts bytes to characters and back, using a character encoding\r\n str.append(line + \"\\n\");\r\n }\r\n }\r\n catch (IOException x) {\r\n System.err.format(\"IOException: %s%n\", x);\r\n }\r\n return str.toString();\r\n }", "private static String readInput() {\n String kbString = \"\";\n File kbFile = new File(\"kb.txt\");\n if(kbFile.canRead()){\n try {\n FileInputStream fileInputStream = new FileInputStream(kbFile);\n\n int c;\n while((c = fileInputStream.read()) != -1){\n kbString += (char) c;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return kbString;\n }", "public static void main(String[] args) throws IOException {\n\t\t FileInputStream file=new FileInputStream(\"C:\\\\Users\\\\DELL\\\\Desktop\\\\test.txt\");\r\n Scanner scan=new Scanner(file);\r\n while(scan.hasNextLine()){\r\n \t System.out.println(scan.nextLine());\r\n }\r\n \r\n file.close();\r\n\t}", "public static void main(String[] args){\n\t\ttry{\n\t\t\tFileReader fr=new FileReader(\"C:\\\\Users\\\\bharathi\\\\Desktop\\\\Hello\\\\new.txt\");\n\t\t\tbr = new BufferedReader(fr);\n\t\t\tSystem.out.println(\"reading lins from the file.... \"+br.readLine());\n\t\t}catch(Exception e){}\n\t}", "public void processInput(String theFile){processInput(new File(theFile));}", "public static void main (String[] args) throws IOException\n {\n Scanner fileScan, lineScan;\n String fileName;\n\n Scanner scan = new Scanner(System.in);\n\n System.out.print (\"Enter the name of the input file: \");\n fileName = scan.nextLine();\n fileScan = new Scanner(new File(fileName));\n\n // Read and process each line of the file\n\n\n\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\r\n\t\tFile filename = new File(\"D://normal.txt\");\r\n\t\tFileInputStream fstream = new FileInputStream(filename);\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\t\r\n\t}", "private static BufferedReader getFileContents(String path) throws FileNotFoundException{\n\t\tFile file = new File(path);\n\t\treturn new BufferedReader(new FileReader(file));\t\n\t}", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "private void readFile() {\r\n\t\tScanner sc = null; \r\n\t\ttry {\r\n\t\t\tsc = new Scanner(inputFile);\t\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tgrade.add(sc.nextLine());\r\n\t } \r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tsc.close();\r\n\t\t}\t\t\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n Scanner scanner = new Scanner(new FileInputStream(\"/Users/guoziren/IdeaProjects/剑指offer for Java/src/main/java/com/ustc/leetcode/algorithmidea/dynamicprogramming/input.txt\"));\n }", "private void readFileByLines(String inputName){\n File file = new File(inputName);\n BufferedReader reader = null;\n\n try {\n reader = new BufferedReader(new FileReader(file));\n\n String tempString = null;\n this.inputContent = new StringBuilder();\n\n while((tempString = reader.readLine()) != null){\n this.inputContent.append(tempString);\n this.inputContent.append(\" \");\n }\n\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }\n }", "public void readTextFile(String path) throws IOException {\n FileReader fileReader=new FileReader(path);\n BufferedReader bufferedReader=new BufferedReader(fileReader);\n String value=null;\n while((value=bufferedReader.readLine())!=null){\n System.out.println(value);\n }\n }", "public static void main(String[] args) throws Exception {\n FileReader fr = new FileReader(\"data/text.txt\");\n\n int i;\n while ((i=fr.read()) != -1)\n System.out.print((char)i);\n\n }", "public void readDataFromFile() {\n System.out.println(\"Enter address book name: \");\n String addressBookFile = sc.nextLine();\n Path filePath = Paths.get(\"C:\\\\Users\\\\Muthyala Aishwarya\\\\git\" + addressBookFile + \".txt\");\n try {\n Files.lines(filePath).map(line -> line.trim()).forEach(line -> System.out.println(line));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException{\n\t\t\t\n\t\t\t FileReader fs = new FileReader(\"C:\\\\Users\\\\rk\\\\Desktop\\\\Test1.txt\");\n\t\t\t BufferedReader br = new BufferedReader(fs);\n\t\t\t \n\t\t\t String i=null;\n\t\t\t while((i=br.readLine())!=null){\n\t\t\t\t System.out.println(i);\n\t\t\t }\n\t\t\t \n \n\t\t}", "private void ReadInputFile(String filePath){\n String line;\n\n try{\n BufferedReader br = new BufferedReader(new FileReader(filePath));\n while((line = br.readLine()) != null){\n //add a return at each index\n inputFile.add(line + \"\\r\");\n }\n\n\n }catch(IOException ex){\n System.out.print(ex);\n }\n\n }", "public static void main(String[] args)throws IOException {\n\t\tFileReader fr= new FileReader(\"D:\\\\Test1.txt\");\r\n\t\tBufferedReader br= new BufferedReader(fr);\r\n\t\tString line=null;\r\n\t\twhile((line=br.readLine())!=null) {\r\n\t\t\tSystem.out.println(line);\r\n\t\t}\r\n//\t\tint ch=0;\r\n//\t\twhile( (ch=fr.read())!=-1) {\r\n//\t\t\tSystem.out.print((char)ch);\r\n//\t\t}\r\n\t\tfr.close();\r\n\t\t}", "public String readTextFromFile()\n\t{\n\t\tString fileText = \"\";\n\t\tString filePath = \"/Users/zcon5199/Documents/\";\n\t\tString fileName = filePath + \"saved text.txt\";\n\t\tFile inputFile = new File(fileName);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tScanner fileScanner = new Scanner(inputFile);\n\t\t\twhile(fileScanner.hasNext())\n\t\t\t{\n\t\t\t\tfileText += fileScanner.nextLine() + \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tfileScanner.close();\n\t\t\t\n\t\t}\n\t\tcatch(FileNotFoundException fileException)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(baseFrame, \"the file is not here :/\");\n\t\t}\n\t\t\n\t\treturn fileText;\n\t}", "public void readFile(String name) {\n\t\tString filename = this.path + name;\n\t\tFile file = new File(filename);\n\t\t\n\t\t\n\t\ttry {\t\t \n\t\t\tScanner reader = new Scanner(file);\n\t\t\t\n\t\t\twhile (reader.hasNextLine()) {\n\t\t\t\tString data = reader.nextLine();\n\t\t System.out.println(data);\n\t\t\t}\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t System.out.println(\"File not found!\");\n\t\t} \n\t}", "private static String readFile(String path) throws IOException {\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(path)))) {\n\t\t\tStringBuilder input = new StringBuilder();\n\t\t\tString tmp; while ((tmp = br.readLine()) != null) input.append(tmp+\"\\n\");\n\t\t\treturn input.toString();\n\t\t}\n\t}", "public static Scanner openInput(String fname){\n\t Scanner infile = null;\n\t try {\n\t infile = new Scanner(new File(fname));\n\t } catch(FileNotFoundException e) {\n\t System.out.printf(\"Cannot open file '%s' for input\\n\", fname);\n\t System.exit(0);\n\t }\n\t return infile;\n\t }", "List readFile(String pathToFile);", "public static BufferedReader Reader(String path) throws IOException\n\t{\n\t\treturn new BufferedReader(new InputStreamReader(new FileInputStream(path),\"UTF-8\"));\n\t}", "public TextFile(Scanner input) {\n \tSystem.out.println(\"Enter your Textfile name: \");\n \tString textfilename = input.nextLine(); \n \ttextFile = new File(textfilename);\n \tthis.checkFile();\n }", "private static void readFile() throws IOException\r\n\t{\r\n\t\tString s1;\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\tSystem.out.println(\"\\ndbs3.txt File\");\r\n\t\twhile ((s1 = br.readLine())!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(s1);\r\n\t\t}//end while loop to read files\r\n\t\t\r\n\t\tbr.close();//close the buffered reader\r\n\t}", "private static String readFile(String file) throws IOException { //Doesn't work - possible error with FileReader\n //BufferedReader reader = new BufferedReader(new FileReader(file));\n //FileReader reader=new FileReader(file);\n\n\n FileReader file2 = new FileReader(file);\n System.out.println(\"Inside readFile\");\n BufferedReader buffer = new BufferedReader(file2);\n\n\n\n //String line = null;\n String line=\"\";\n\n StringBuilder stringBuilder = new StringBuilder();\n String ls = System.getProperty(\"line.separator\");\n try {\n while ((line = buffer.readLine()) != null) {\n System.out.println(line);\n stringBuilder.append(line);\n stringBuilder.append(ls);\n }\n return stringBuilder.toString();\n\n }finally{\n buffer.close();//https://stackoverflow.com/questions/326390/how-do-i-create-a-java-string-from-the-contents-of-a-file\n }\n /*Scanner scanner = null;\n scanner = new Scanner(file);\n StringBuilder stringBuilder = new StringBuilder();\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n stringBuilder.append(line);\n\n System.out.println(\"line: \"+line);\n }\n return stringBuilder.toString();*/\n\n }", "@SuppressWarnings(\"unused\")\n private String readFile(File f) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(f));\n String line = reader.readLine();\n StringBuilder builder = new StringBuilder();\n while (line != null) {\n builder.append(line).append('\\n');\n line = reader.readLine();\n }\n reader.close();\n return builder.toString();\n }", "public static void readMyFile() throws IOException {\n\n List<String> allLines = Files.readAllLines(Paths.get(\"src/ErfansInputFile\"));\n System.out.println(\"allLines = \" + allLines);\n System.out.println(\"Reading the file in my computer. \");\n\n throw new FileNotFoundException(\"Kaboom, file is not found!!!\");\n }", "private void takeInFile() {\n System.out.println(\"Taking in file...\");\n //Reads the file\n String fileName = \"messages.txt\";\n String line = null;\n try {\n FileReader fileReader = new FileReader(fileName);\n \n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n //Adds each line to the ArrayList\n int i = 0;\n while ((line = bufferedReader.readLine()) != null) {\n lines.add(line);\n //System.out.println(line);\n i++;\n }\n \n bufferedReader.close();\n } catch (FileNotFoundException ex) {\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n } catch (IOException ex) {\n System.out.println(\"Error reading file '\" + fileName + \"'\");\n }\n System.out.println(\"Done taking in file...\");\n }", "public static String readFile() {\n\t\tFileReader file;\n\t\tString textFile = \"\";\n\n\t\ttry {\n\t\t\tfile = new FileReader(path);\n\n\t\t\t// Output string.\n\t\t\ttextFile = new String();\n\n\t\t\tBufferedReader bfr = new BufferedReader(file);\n\n\t\t\ttextFile= bfr.readLine();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error reading the file\");\n\t\t}\n\t\treturn textFile;\n\n\t}", "public void readInFile(String filename) {\r\n String lineOfData = new String (\"\");\r\n boolean done = false;\r\n //set up the BufferedReader\r\n BufferedReader fin = null;\r\n\ttry {\r\n fin = new BufferedReader(new InputStreamReader(new FileInputStream(filename)));\r\n lineOfData = fin.readLine();\r\n\t}\r\n catch(Exception c) {\r\n System.out.println(\"ERROR: Input read failed!\");\r\n }\r\n\r\n //read in additional strings until the file is empty\r\n while (done != true){\r\n String temp[] = lineOfData.split(\" \");\r\n graph.add(new Edge(temp[0], temp[1], Integer.parseInt(temp[2]))); //add current string to graph\r\n try {\r\n lineOfData = fin.readLine();\r\n if (lineOfData == null){\r\n done = true;\r\n }\r\n }\r\n catch(IOException ioe){\r\n System.out.println(\"ERROR: Input read failed!\");\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tFileInputStream inputFile = new FileInputStream(\"C:\\\\Users\\\\lenovo\\\\Desktop\\\\input.txt.txt\");\r\n\r\n\t\t\twhile (inputFile.available() > 0) {\r\n\t\t\t\tint i = inputFile.read();\r\n\t\t\t\tSystem.out.println((char) i);\r\n\t\t\t\tinputFile.close();\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "public static String read(String filename) throws IOException {\n // Reading input by lines:\n BufferedReader in = new BufferedReader(new FileReader(filename));\n// BufferedInputStream in2 = new BufferedInputStream(new FileInputStream(filename));\n String s;\n int s2;\n StringBuilder sb = new StringBuilder();\n while((s = in.readLine())!= null)\n sb.append( s + \"\\n\");\n// sb.append((char) s2);\n in.close();\n return sb.toString();\n }", "public static void readfile() {\r\n\t\t// read input file\r\n\t\ttry {\r\n\t\t File inputObj = new File(\"input.txt\");\r\n\t\t Scanner inputReader = new Scanner(inputObj);\r\n\t\t int i = 0;\r\n\t\t while (inputReader.hasNextLine()) {\r\n\t\t String str = inputReader.nextLine();\r\n\t\t str = str.trim();\r\n\t\t if(i == 0) {\r\n\t\t \tnumQ = Integer.parseInt(str);\r\n\t\t \torign_queries = new String[numQ];\r\n\t\t \t//queries = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(i == numQ + 1) {\r\n\t\t \tnumKB = Integer.parseInt(str);\r\n\t\t \torign_sentences = new String[numKB];\r\n\t\t \t//sentences = new ArrayList<ArrayList<String>>();\r\n\t\t }\r\n\t\t else if(0 < i && i< numQ + 1) {\t\r\n\t\t \torign_queries[i-1] = str;\r\n\t\t \t//queries.add(toCNF(str));\r\n\t\t }\r\n\t\t else {\r\n\t\t \torign_sentences[i-2-numQ] = str;\r\n\t\t \t//sentences.add(toCNF(str));\r\n\t\t }\t\t \r\n\t\t i++;\r\n\t\t }\r\n\t\t inputReader.close();\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t System.out.println(\"An error occurred when opening the input file.\");\r\n\t\t }\r\n\t}", "public void openFile(String file) {\n try {\n FileReader fr = new FileReader(file);\n in = new BufferedReader(fr);\n } catch (IOException e) {\n System.out.println(\"Filen kan ikke åbnes\");\n }\n }", "public String readFileBufferedReader() {\n String result = \"\";\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(new File(ALICE_PATH)));\n\n for (String x = in.readLine(); x != null; x = in.readLine()) {\n result = result + x + '\\n';\n }\n\n } catch (IOException e) {\n }\n\n if(in != null)try {\n in.close();\n } catch (IOException e) {\n }\n\n return result;\n }", "public static void main(String[] args)throws IOException {\n\t\tFileReader file = new FileReader(\"D:\\\\stream\\\\hello.txt\");\n\t\tBufferedReader buffer = new BufferedReader(file);\n\t//\tint k =buffer.read();\n\t//\tSystem.out.println(k);\n\t//\tString s = buffer.readLine();\n\t//\tSystem.out.println(s);\n\t\tint k;\n\t\twhile((k=buffer.read())!=-1) {\n\t\t\t\n\t\t\tSystem.out.print((char)k);\n\t\t}\n\t\tbuffer.close();\n\t\tfile.close();\n\t\t\n\t}", "private void load(FileInputStream input) {\n\t\t\r\n\t}", "private static String loadFile(String path){\n try {\n\n BufferedReader reader = new BufferedReader(new FileReader(path));\n StringBuilder sb = new StringBuilder();\n\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append('\\n');\n }\n\n reader.close();\n return sb.toString();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}", "public static void readFile() {\n\t\tbufferedReader = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"/home/bridgeit/Desktop/number.txt\");\n\t\t\tbufferedReader = new BufferedReader(fileReader);\n\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tString[] strings = line.split(\" \");\n\t\t\t\tfor (String integers : strings) {\n\t\t\t\t\thl.add(Integer.parseInt(integers));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File Not Found...\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\tbufferedReader.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n byte[] content = null;\n try {\n content = Files.readAllBytes(new File(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\diemkhang\\\\test reader\\\\introduce.txt\").toPath());\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(new String(content));\n }", "File openFile();", "public void fileRead(String filename) throws IOException;", "private void printInputMessage() {\n System.out.println(\"Printing the input message:\");\n try(BufferedReader inputBuffer = Files.newBufferedReader(inputPath)) {\n String inputLine;\n while((inputLine = inputBuffer.readLine()) != null) {\n System.out.print(inputLine+\"\\n\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"testeArquivo.txt\");\n\t\tfile.createNewFile();\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Arquivo criado\");\n\t\twriter.flush();\n\t\twriter.close();\n\t\tFileReader fr = new FileReader(file); \n\t char [] a = new char[50];\n\t fr.read(a); \n\t for(char c : a){\n\t \tSystem.out.println(c);\n\t }\n\t fr.close();\n\t}", "public static File readFile(String inputName) throws IOException\r\n {\r\n String fileName = inputName; \r\n File file = new File(fileName);\r\n if (!file.canRead())\r\n {\r\n System.err.println(file.getCanonicalPath() + \": cannot be read\"); \r\n }\r\n return file; \r\n }", "public static void main(String[] args) {\n try {\n readHouseTxt();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n\n\n\n }", "public InputFileReader(String fileName) throws IOException{\n\t\t\n\t\tthis.contentsByLine = new ArrayList<>();\n\t\t\n\t\ttry {\n\t\t\tStream<String> stream = Files.lines(Paths.get(fileName));\n\t\t\tcontentsByLine = stream.collect(Collectors.toList());\n\t\t\tstream.close();\n\t\t} catch(IOException e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "private String readFile(File file){\n StringBuilder stringBuffer = new StringBuilder();\n BufferedReader bufferedReader = null;\n\n try {\n\n bufferedReader = new BufferedReader(new FileReader(file));\n\n String text;\n while ((text = bufferedReader.readLine()) != null) {\n stringBuffer.append(text.replaceAll(\"\\t\", miTab) + \"\\n\");\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n try {\n bufferedReader.close();\n } catch (IOException ex) {\n Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n\n return stringBuffer.toString();\n }", "private static void ReadText(String path) {\n\t\t//reads the file, throws an error if there is no file to open\n\t\ttry {\n\t\t\tinput = new Scanner(new File(path));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error opening file...\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\tString line; //stores the string of text from the .txt file\n\t\tString parsedWord; //Stores the word of the parsed word\n\t\tint wordLength; //Stores the length of the word\n\t\tint lineNum = 1; //Stores the number of line\n\t\ttry {\n\t\t\t//loops while there is still a new line in the .txt file\n\t\t\twhile ((line = input.nextLine()) != null) {\n\t\t\t\t//separates the lines by words\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\t\t//loops while there are still more words in the line\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tparsedWord = st.nextToken();\n\t\t\t\t\twordLength = parsedWord.length();\n\t\t\t\t\t//Regex gets rid of all punctuation\n\t\t\t\t\tif (parsedWord.matches(\".*\\\\p{Punct}\")) {\n\t\t\t\t\t\tparsedWord = parsedWord.substring(0, wordLength - 1);\n\t\t\t\t\t}\n\t\t\t\t\t//add the word to the list\n\t\t\t\t\twordList.add(parsedWord);\n\t\t\t\t\tlineList.add(lineNum);\n\t\t\t\t}\n\t\t\t\tlineNum++;\n\t\t\t}\n\t\t} catch (NoSuchElementException e) {\n\t\t\t//Do nothing\n\t\t}\n\t\tinput.close();\n\t}", "public void readFile(File file){\n try{\n scan = new Scanner(file);\n while(scan.hasNextLine()){\n String line = scan.nextLine();\n if(line.startsWith(\"//\")){\n continue;\n }\n process(line);\n }\n }catch(IOException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n }catch(NullPointerException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n \n }\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "private static String readFile(File file) {\n String result = \"\";\n\n try (BufferedReader bufferedReader = new BufferedReader(\n new FileReader(file))) {\n result = bufferedReader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }", "public String readFileIntoString(String filepath) throws IOException;", "public static void main(String[] args) throws IOException {\n\n FileInputStream in = new FileInputStream(\"d:\\\\cztst.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n String s = reader.readLine();\n System.out.println(s);\n }", "private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n return contentBuilder.toString();\n }", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "String[] readFile(String path) {\n ArrayList<String> list = new ArrayList<>();\n String[] output = null;\n Scanner reader;\n File file;\n\n try {\n file = new File(path);\n reader = new Scanner(file);\n while (reader.hasNextLine()) {\n list.add(reader.nextLine());\n }\n output = new String[list.size()];\n for (int i = 0; i < list.size(); i++) output[i] = list.get(i);\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found exception\");\n }\n return output;\n }", "private String fileReadOneLine(String fname) {\n BufferedReader br;\n String line = null;\n\n try {\n br = new BufferedReader(new FileReader(fname), 512);\n try {\n line = br.readLine();\n } finally {\n br.close();\n }\n } catch (Exception e) {\n Log.e(TAG, \"Exception when reading /sys/* file\", e);\n }\n return line;\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 }", "void open(String fileName);", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n\n return contentBuilder.toString();\n }", "public String readFile(String filename)\n {\n StringBuilder texts = new StringBuilder();\n \n try \n {\n FileReader inputFile = new FileReader(filename);\n Scanner parser = new Scanner(inputFile);\n \n while (parser.hasNextLine())\n {\n String line = parser.nextLine();\n texts.append(line + \";\");\n }\n \n inputFile.close();\n parser.close();\n return texts.toString();\n \n }\n \n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n return error;\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n return error;\n } \n }", "public void readData(String infile) throws Exception {\r\n \t\tScanner in = new Scanner(new FileReader(infile));\r\n \t}", "private static String loadFile(File file) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\treturn br.readLine();\n\t}", "private String readFile(String source) throws IOException {\n StringBuilder contentBuilder = new StringBuilder();\n\n try (Stream<String> stream = Files.lines(Paths.get(source), StandardCharsets.UTF_8)) {\n stream.forEach(s -> contentBuilder.append(s));\n }\n\n return contentBuilder.toString();\n }", "protected abstract Object readFile(BufferedReader buf) throws IOException, FileParseException;", "public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t BufferedWriter(new FileWriter(\"output.in\")));\r\n\r\n\t\t// Your code goes Here\r\n\r\n\t\tpw.flush();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString x = sc.nextLine();\r\n\r\n\t\tSystem.out.println(\"hello world \" + x);\r\n\t}", "private static String readFile(String file) throws IOException {\n\n\t\tString line = null;\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tString ls = System.getProperty(\"line.separator\");\n\n\t\ttry (BufferedReader reader = new BufferedReader(new FileReader(file))) {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tstringBuilder.append(line);\n\t\t\t\tstringBuilder.append(ls);\n\t\t\t}\n\t\t}\n\n\t\treturn stringBuilder.toString();\n\t}", "public static void main(String[] args) {\n\n try {\n FileInputStream inputStream = new FileInputStream(\"fichier1.txt\");\n\n int data = inputStream.read();\n\n while(data != -1) {\n System.out.print((char)data);\n\n data = inputStream.read();\n }\n\n inputStream.close();\n\n }catch(Exception e) {\n System.out.println(e.toString());\n }\n\n }", "static void experiment2Day1Part1() {\n\n File file = new File(\"src/main/java/weekone/input01.txt\");\n FileInputStream fis = null;\n\n try {\n fis = new FileInputStream(file);\n\n System.out.println(\"Total file size to read (in bytes) : \"\n + fis.available());\n\n int content;\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n char converted = (char) content;\n System.out.print(converted);\n\n\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n\n }", "public static void main(String[] args) {\n\t\ttry{\r\n\t\t\tInputStreamReader isr=new InputStreamReader\r\n\t\t\t\t\t(new FileInputStream(\"FileToScr.txt\"));\r\n\t\t\tchar c[]=new char[512];\r\n\t\t\tint n=isr.read(c);\r\n\t\t\tSystem.out.println(new String(c,0,n));\r\n\t\t isr.close();\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(e);\r\n\t\t}\r\n\t}", "static Stream<String> readIn(File file) \r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn Files.readAllLines(file.toPath()).stream();\r\n\t\t} \r\n\t\tcatch (IOException ioe) \r\n\t\t{\r\n\t\t\tthrow new UncheckedIOException(ioe);\r\n\t\t}\r\n\t}", "private String readFile() {\n try {\n BufferedReader in = new BufferedReader(new FileReader(\"C:\\\\Users\"\n + \"\\\\MohammadLoqman\\\\cs61b\\\\sp19-s1547\"\n + \"\\\\proj3\\\\byow\\\\Core\\\\previousGame.txt\"));\n StringBuilder sb = new StringBuilder();\n String toLoad;\n try {\n toLoad = in.readLine();\n while (toLoad != null) {\n sb.append(toLoad);\n sb.append(System.lineSeparator());\n toLoad = in.readLine();\n }\n String everything = sb.toString();\n return everything;\n } catch (IOException E) {\n System.out.println(\"do nothin\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"file not found\");\n }\n return null;\n\n }", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "private static String readLine(String filename) throws IOException {\n\t\ttry (BufferedReader reader = new BufferedReader(\n\t\t\t\tnew FileReader(filename), 256)) {\n\t\t\treturn reader.readLine();\n\t\t}\n\t}", "protected abstract void readFile();", "private static Scanner openFile(){\n\n System.out.println(\"Enter the input file name: \");\n Scanner kb = new Scanner(System.in);\n String fileName = kb.nextLine();\n try{\n return new Scanner(new File(fileName));\n }\n catch (Exception e){\n System.out.printf(\"Open Failed: \\n%s\\n\", e.toString());\n System.out.println(\"Please re-enter the filename.\");\n return openFile();\n }\n }", "axiom Object readLine(Object BufferedReader(FileReaderr f)) {\n\treturn f.get(0);\n }", "private static String ReadFile(String filePath) {\n StringBuilder sb = new StringBuilder();\n try {\n BufferedReader r = new BufferedReader(new FileReader(filePath));\n String line;\n while ((line = r.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n System.out.println(e.getStackTrace());\n }\n return sb.toString();\n\n }", "static String readFile(String path) throws IOException{\n\t\tFileInputStream fs = new FileInputStream(path);\n\t\tStringBuffer sb = new StringBuffer();\n\t\t// read a file\n\t\tint singleByte = fs.read(); // read singleByte\n\t\twhile(singleByte!=-1){\n\t\t\tsb.append((char)singleByte);\n\t\t\t///System.out.print((char)singleByte);\n\t\t\tsingleByte = fs.read();\n\t\t}\n\t\tfs.close(); // close the file\n\t\treturn sb.toString();\n\t}", "public abstract void open(BufferedReader br) throws IOException;", "private static String readTextFile(File file) throws IOException {\n return Files.lines(file.toPath()).collect(Collectors.joining(\"\\n\"));\n }", "public File openInputFile() throws Exception{\n\t\t// Open the input file\n\t\tinputFile = new File(PLEIADEAN_FILE);\n\t\t\n\t\t// return to the caller\n\t\treturn(inputFile);\n\t}", "public void openFile() {\n try {\n x = new Formatter(\"DistanceTraveled.txt\");\n }\n catch (Exception e) {\n System.out.println(\"You have an error.\");\n }\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tFileInputStream fileInputStream=new FileInputStream(\"src/test.txt\");\n\t\t\tInputStreamReader inputStreamReader=new InputStreamReader(fileInputStream);\n\t\t\tchar[] chars=new char[97];\n\t\t\tString str=\"\";\n//\t\t\tint i;\n\t\t\twhile (inputStreamReader.read(chars)!=-1) {\n\t\t\t\tstr+=new String(chars);\n\t\t\t}\n\t\t\tSystem.out.println(str);\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.67409223", "0.6662775", "0.6652346", "0.6591429", "0.64444876", "0.6421531", "0.63825786", "0.6328159", "0.63246936", "0.6303827", "0.6244736", "0.6243049", "0.6238238", "0.6231553", "0.61934763", "0.6160194", "0.6101872", "0.607797", "0.6050397", "0.6050204", "0.60316336", "0.60307735", "0.6006421", "0.60056657", "0.59916824", "0.59824324", "0.5976581", "0.5974938", "0.5961299", "0.5956549", "0.5946896", "0.59458333", "0.5941234", "0.59062946", "0.59056324", "0.5902867", "0.5897627", "0.5873985", "0.5861569", "0.5860155", "0.58596176", "0.58569455", "0.58478504", "0.58466864", "0.5844098", "0.5841803", "0.58377576", "0.5832725", "0.5827689", "0.58276725", "0.5825319", "0.58219725", "0.5807863", "0.5806589", "0.5801881", "0.5799241", "0.5793502", "0.57912046", "0.5773916", "0.5737853", "0.57233584", "0.57154953", "0.57053095", "0.5702703", "0.5695108", "0.5688719", "0.56880146", "0.56793755", "0.5677557", "0.5674799", "0.5674799", "0.5674208", "0.56558216", "0.56514645", "0.5651409", "0.56454074", "0.56444484", "0.563294", "0.56282353", "0.5627643", "0.5625873", "0.56244475", "0.56147546", "0.56137043", "0.56088805", "0.5608598", "0.5606013", "0.5602151", "0.5599264", "0.55986094", "0.55931395", "0.5592277", "0.5588169", "0.55879754", "0.5587624", "0.5587258", "0.55806786", "0.5579709", "0.5578437", "0.55771863", "0.5575368" ]
0.0
-1
The container in which the content claim lives.
public String getContentClaimContainer() { return contentClaimContainer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContainer() {\n return this.container;\n }", "public String container() {\n return this.container;\n }", "public Container getContainer() {\r\n return container;\r\n }", "public Container getContainer();", "protected Container getContainer()\r\n {\n return _xarSource.getXarContext().getContainer();\r\n }", "public Node getContainer() {\n return container;\n }", "public String getContainerId() {\n return containerId;\n }", "public final Element getContainer() {\n\t\treturn impl.getContainer();\n }", "public IPSDocument getContainer();", "public String containerName() {\n return this.containerName;\n }", "public static GameContainer getContainer() {\r\n return container;\r\n }", "public Container getContent() {\n return this;\n }", "public ObjectContainer getObjectContainer()\n {\n return container;\n }", "public String getContainerUser() {\n return containerUser;\n }", "public String getContainerUri() {\n return this.containerUri;\n }", "public String getContainerName() {\n return containerName;\n }", "public final ContainerInfo getContainerInfo()\n\t{\n\t\treturn containerInfo;\n\t}", "public String getContentClaimIdentifier() {\n return contentClaimIdentifier;\n }", "public ContainerPolicy getContainerPolicy() {\n return containerPolicy;\n }", "public String getContainerName() {\n return this.containerName;\n }", "private static CloudBlobContainer getContainer() throws Exception {\n\r\n CloudStorageAccount storageAccount = CloudStorageAccount\r\n .parse(storageConnectionString);\r\n\r\n // Create the blob client.\r\n CloudBlobClient blobClient = storageAccount.createCloudBlobClient();\r\n\r\n // Get a reference to a container.\r\n // The container name must be lower case\r\n CloudBlobContainer container = blobClient.getContainerReference(CONTAINER_NAME.toLowerCase());\r\n\r\n return container;\r\n }", "private static CloudBlobContainer getContainer() throws Exception {\n\n CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);\n\n // Create the blob client.\n CloudBlobClient blobClient = storageAccount.createCloudBlobClient();\n // Get a reference to a container.\n // The container name must be lower case\n CloudBlobContainer container = blobClient.getContainerReference(\"sparshdevmobileapp\");\n\n return container;\n }", "public String getContainerName() {\n return name;\n }", "public String getContentClaimSection() {\n return contentClaimSection;\n }", "public List<String> containerList() {\n return this.containerList;\n }", "public GenericContainer<?> applicationContainer() {\n return applicationContainer;\n }", "public DockContainer getContainer() {\n return container;\n }", "protected String getContainerName() {\r\n\t\treturn CONTAINER_NAME;\r\n\t}", "public List<String> containers() {\n return this.containers;\n }", "public Container getContainer() {\n return editor;\n }", "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "public PersistentDataContainer getPersistentDataContainer ( ) {\n\t\treturn extract ( handle -> handle.getPersistentDataContainer ( ) );\n\t}", "public ViewGroup getContainer() {\n return mContainer;\n }", "public IContentContext getContentContext(\n )\n {return contents.getContentContext();}", "protected String getContainerType() {\r\n\t\treturn CONTAINER_TYPE;\r\n\t}", "@Override\n public String getContainerData()\n {\n return null;\n }", "public EscherContainerRecord getEscherContainer() {\n \tfor(Iterator<EscherRecord> it = escherRecords.iterator(); it.hasNext();) {\n \t\tEscherRecord er = it.next();\n \t\tif(er instanceof EscherContainerRecord) {\n \t\t\treturn (EscherContainerRecord)er;\n \t\t}\n \t}\n \treturn null;\n }", "public static ContainerWrapper getContainer(HttpServletRequest request) throws Exception {\r\n\t\tContainerFinderImp scf = new ContainerFinderImp();\r\n\t\tServletContext sc = request.getSession().getServletContext();\r\n\t\treturn scf.findContainer(new ServletContextWrapper(sc));\r\n\t}", "@Column(length = 500, name = \"CONTAINER_NAME\")\r\n public String getContainerName() {\r\n return this.containerName == null ? null : this.containerName.substring(this.containerName.lastIndexOf(File.separator) + 1);\r\n }", "public Container getContentPane() {\n return myUserContentPane;\n }", "public String getContainerDb() {\n return containerDb;\n }", "public FlowFileDTOBuilder setContentClaimContainer(final String contentClaimContainer) {\n this.contentClaimContainer = contentClaimContainer;\n return this;\n }", "BaseContainerType getBaseContainer();", "@Override\n\t\tpublic InJarResourceImpl getContainer(InJarResourceImpl serializationArtefact) {\n\t\t\tResource container = serializationArtefact.getContainer();\n\t\t\tif (container instanceof InJarResourceImpl) {\n\t\t\t\treturn (InJarResourceImpl) container;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public Container getViewerPanel() {\n\t\treturn null;\n\t}", "public Container newContainer();", "public JLayeredPane getContainer(){\n\t\treturn contentPane;\n\t}", "public Object getContent() {\n return null;\n }", "private InsuranceContainerViewData getInsuranceContainerViewData()\r\n {\r\n return (InsuranceContainerViewData) sessionService.getAttribute(\"insuranceContainerViewData\");\r\n }", "private ISearchPageContainer getContainer() {\n return searchPageContainer;\n }", "public UIContainer getDefinitionContainer() {\n\t\treturn uiDefinition;\n\t}", "public String getDataStoreContainerId() {\n return dataStoreContainerId;\n }", "protected final LWContainerPeer<?, ?> getContainerPeer() {\n return containerPeer;\n }", "public int getCont() {\n\t\tint cont = 0;\n\t\tsynchronized (store) {\n\t\t\tStorage storage = (Storage) store.getContents();\n\t\t\tif (storage != null)\n\t\t\t\tcont = storage.cont;\n\t\t}\n\t\treturn cont;\n\t}", "public String getRemoteContainerId()\n {\n return remoteContainerId;\n }", "@Override\r\n\tpublic Control getControl() {\r\n\t\treturn container;\r\n\t}", "protected static Container getDomainContainer(Container c)\r\n {\n return c.getProject();\r\n }", "public JComponent getPodContent() {\r\n return this;\r\n }", "public boolean isContainer();", "public PortletContainer getPortletContainer() {\n return this.portletContainer; \n }", "public void setContainer(String container) {\n this.container = container;\n }", "public static ExternalRegisterContainer retrieveFromRequest() {\r\n HttpServletRequest httpServletRequest = GrouperUiFilter.retrieveHttpServletRequest();\r\n \r\n ExternalRegisterContainer externalRegisterContainer = (ExternalRegisterContainer)httpServletRequest\r\n .getAttribute(\"inviteExternalSubjectsContainer\");\r\n if (externalRegisterContainer == null) {\r\n throw new NoSessionException(GrouperUiUtils.message(\"inviteExternalSubjects.noContainer\"));\r\n }\r\n return externalRegisterContainer;\r\n }", "Reference owner();", "Container getContainer(ContentType type, List<Element> elements);", "public interface ContainerHolder extends MetaHolder {\n\n /**\n * Returns the root container in this containers\n * current hierarchy.\n *\n * @param <T> the container type\n * @return the container\n */\n @NonNull <T extends ContainerHolder> Optional<T> root();\n\n /**\n * Returns the parent container in this containers\n * current hierarchy.\n *\n * @param <T> the container type\n * @return the container\n */\n @NonNull <T extends ContainerHolder> Optional<T> parent();\n\n /**\n * Sets the parent container of this container in\n * the current hierarchy and returns it.\n *\n * @param parent the parent container\n * @param <T> the parent container type\n * @return the parent container\n */\n @Nullable <T extends ContainerHolder> T setParent(@Nullable T parent);\n\n /**\n * Clears this containers inherited tags and pulls\n * them again from its parent to update them.\n */\n void updateTags();\n\n /**\n * Returns {@code true} if this container, contains\n * other containers and {@code false} if it does not.\n *\n * @return true if this container has children\n */\n boolean hasChildren();\n\n /**\n * Returns the size of the elements and containers\n * contained inside this container.\n *\n * @return the container items size\n */\n int size();\n\n /**\n * Clears the items from this container.\n */\n void clear();\n\n}", "public static AnchorPane getContentBox(){\n return MainUIController.contentBox;\n }", "abstract public Container<?> getParent();", "String getContainmentReference();", "public JPanel getContent() {\r\n\t\treturn this.content;\r\n\t}", "public GameContainer getGameContainer() {\r\n\t\treturn this;\r\n\t}", "private Id getViewContainerID() {\n if (semantic == null) {\n return Id.invalid();\n }\n return new Id(RefreshIDFactory.getOrCreateID(viewContainer));\n }", "Container createContainer();", "public IPartitionType getParentContainerType()\n\t{\n\t\treturn parentContainerType;\n\t}", "public long generateContainerId() {\n return this.containerIdCounter.incrementAndGet();\n }", "public String getParentContainerXPath()\n\t{\n\t\treturn this.parentContainerXPath;\n\t}", "@NonNull <T extends ContainerHolder> Optional<T> parent();", "private Container Load() {\n return null;\r\n }", "public RouteContainer getNodeContainer() {\r\n\t\tif (nodeContainer == null && selectedNode != null) {\r\n\t\t\tnodeContainer = selectedNode.getParent();\r\n\t\t}\r\n\t\treturn nodeContainer;\r\n\t}", "public boolean getIsContainer()\n {\n return standardDefs.isContainer(root.getType());\n }", "public ZFrame getContent ()\n {\n return content;\n }", "public ZFrame getContent ()\n {\n return content;\n }", "@Override\npublic VirtualContainer getParentContainer() {\n\treturn null;\n}", "private CFComponent getOwner() {\n\t\treturn owner;\n\t}", "protected Container createContainer() {\n\treturn new EditorContainer();\n }", "public boolean isContainerType()\n/* */ {\n/* 174 */ return true;\n/* */ }", "public LinkedList getProcessingContainers() {\n return annotatorList;\n }", "private org.gwtproject.user.client.ui.SimplePanel get_contentContainer() {\n return build_contentContainer();\n }", "public StackPane getPane() {\n return this.container;\n }", "public JPanel GetPanel() {\n\t\treturn JPprincipal;\n\t}", "public boolean isContainerType()\n/* */ {\n/* 169 */ return true;\n/* */ }", "public List<SpecialContainer> getSpecialContainers(){\n return this.specialContainers;\n }", "public GenericContainer<?> exporterContainer() {\n return exporterContainer;\n }", "public int getContainerSize() {\n\t\treturn 27;\n\t}", "T createContainer();", "public Content getContent() {\n return this.content;\n }", "public gov.ucore.ucore._2_0.ContentMetadataType getMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.ContentMetadataType target = null;\n target = (gov.ucore.ucore._2_0.ContentMetadataType)get_store().find_element_user(METADATA$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "Optional<AgentContainer> findAgentContainer(String containerName);", "@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}", "public void setContainerName(String name) {\n this.name = name;\n }", "public ContentManager getManager() {\r\n\t\treturn manager;\r\n\t}" ]
[ "0.7132313", "0.7124885", "0.6935373", "0.68975824", "0.6683423", "0.6521855", "0.63892776", "0.631672", "0.63098526", "0.62563074", "0.6239778", "0.6228557", "0.6212556", "0.62016207", "0.6178902", "0.6137122", "0.61356515", "0.6092582", "0.60735965", "0.6038366", "0.6027537", "0.6015572", "0.59957194", "0.5982446", "0.5966087", "0.5935263", "0.589717", "0.5893964", "0.5887514", "0.58820695", "0.58739", "0.58123106", "0.5803387", "0.5788032", "0.57423747", "0.5722267", "0.56679577", "0.5618897", "0.5612924", "0.5602097", "0.559148", "0.5576584", "0.5566923", "0.55502915", "0.5530956", "0.5484285", "0.5472381", "0.5470175", "0.546724", "0.54538566", "0.54495406", "0.5441156", "0.54296935", "0.5427383", "0.5410752", "0.5396013", "0.53894395", "0.5386015", "0.53858775", "0.5376053", "0.53555757", "0.5353523", "0.5353243", "0.534033", "0.53215563", "0.5274278", "0.5269165", "0.5266137", "0.52622896", "0.52451235", "0.5234142", "0.5230926", "0.522988", "0.5226688", "0.52197534", "0.5170383", "0.51700664", "0.51696163", "0.5159513", "0.51330215", "0.51330215", "0.5129556", "0.5117503", "0.51071477", "0.5097846", "0.5091453", "0.5087822", "0.5084408", "0.50739247", "0.5072925", "0.5053901", "0.50514066", "0.5046605", "0.50410694", "0.5033797", "0.50303143", "0.5029412", "0.5028325", "0.50253296", "0.5013479" ]
0.80557454
0
The container in which the content claim lives.
public FlowFileDTOBuilder setContentClaimContainer(final String contentClaimContainer) { this.contentClaimContainer = contentClaimContainer; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContentClaimContainer() {\n return contentClaimContainer;\n }", "public String getContainer() {\n return this.container;\n }", "public String container() {\n return this.container;\n }", "public Container getContainer() {\r\n return container;\r\n }", "public Container getContainer();", "protected Container getContainer()\r\n {\n return _xarSource.getXarContext().getContainer();\r\n }", "public Node getContainer() {\n return container;\n }", "public String getContainerId() {\n return containerId;\n }", "public final Element getContainer() {\n\t\treturn impl.getContainer();\n }", "public IPSDocument getContainer();", "public String containerName() {\n return this.containerName;\n }", "public static GameContainer getContainer() {\r\n return container;\r\n }", "public Container getContent() {\n return this;\n }", "public ObjectContainer getObjectContainer()\n {\n return container;\n }", "public String getContainerUser() {\n return containerUser;\n }", "public String getContainerUri() {\n return this.containerUri;\n }", "public String getContainerName() {\n return containerName;\n }", "public final ContainerInfo getContainerInfo()\n\t{\n\t\treturn containerInfo;\n\t}", "public String getContentClaimIdentifier() {\n return contentClaimIdentifier;\n }", "public ContainerPolicy getContainerPolicy() {\n return containerPolicy;\n }", "public String getContainerName() {\n return this.containerName;\n }", "private static CloudBlobContainer getContainer() throws Exception {\n\r\n CloudStorageAccount storageAccount = CloudStorageAccount\r\n .parse(storageConnectionString);\r\n\r\n // Create the blob client.\r\n CloudBlobClient blobClient = storageAccount.createCloudBlobClient();\r\n\r\n // Get a reference to a container.\r\n // The container name must be lower case\r\n CloudBlobContainer container = blobClient.getContainerReference(CONTAINER_NAME.toLowerCase());\r\n\r\n return container;\r\n }", "private static CloudBlobContainer getContainer() throws Exception {\n\n CloudStorageAccount storageAccount = CloudStorageAccount.parse(storageConnectionString);\n\n // Create the blob client.\n CloudBlobClient blobClient = storageAccount.createCloudBlobClient();\n // Get a reference to a container.\n // The container name must be lower case\n CloudBlobContainer container = blobClient.getContainerReference(\"sparshdevmobileapp\");\n\n return container;\n }", "public String getContainerName() {\n return name;\n }", "public String getContentClaimSection() {\n return contentClaimSection;\n }", "public List<String> containerList() {\n return this.containerList;\n }", "public GenericContainer<?> applicationContainer() {\n return applicationContainer;\n }", "public DockContainer getContainer() {\n return container;\n }", "protected String getContainerName() {\r\n\t\treturn CONTAINER_NAME;\r\n\t}", "public List<String> containers() {\n return this.containers;\n }", "public Container getContainer() {\n return editor;\n }", "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "public PersistentDataContainer getPersistentDataContainer ( ) {\n\t\treturn extract ( handle -> handle.getPersistentDataContainer ( ) );\n\t}", "public ViewGroup getContainer() {\n return mContainer;\n }", "public IContentContext getContentContext(\n )\n {return contents.getContentContext();}", "protected String getContainerType() {\r\n\t\treturn CONTAINER_TYPE;\r\n\t}", "@Override\n public String getContainerData()\n {\n return null;\n }", "public EscherContainerRecord getEscherContainer() {\n \tfor(Iterator<EscherRecord> it = escherRecords.iterator(); it.hasNext();) {\n \t\tEscherRecord er = it.next();\n \t\tif(er instanceof EscherContainerRecord) {\n \t\t\treturn (EscherContainerRecord)er;\n \t\t}\n \t}\n \treturn null;\n }", "public static ContainerWrapper getContainer(HttpServletRequest request) throws Exception {\r\n\t\tContainerFinderImp scf = new ContainerFinderImp();\r\n\t\tServletContext sc = request.getSession().getServletContext();\r\n\t\treturn scf.findContainer(new ServletContextWrapper(sc));\r\n\t}", "@Column(length = 500, name = \"CONTAINER_NAME\")\r\n public String getContainerName() {\r\n return this.containerName == null ? null : this.containerName.substring(this.containerName.lastIndexOf(File.separator) + 1);\r\n }", "public Container getContentPane() {\n return myUserContentPane;\n }", "public String getContainerDb() {\n return containerDb;\n }", "BaseContainerType getBaseContainer();", "@Override\n\t\tpublic InJarResourceImpl getContainer(InJarResourceImpl serializationArtefact) {\n\t\t\tResource container = serializationArtefact.getContainer();\n\t\t\tif (container instanceof InJarResourceImpl) {\n\t\t\t\treturn (InJarResourceImpl) container;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public Container getViewerPanel() {\n\t\treturn null;\n\t}", "public Container newContainer();", "public JLayeredPane getContainer(){\n\t\treturn contentPane;\n\t}", "public Object getContent() {\n return null;\n }", "private InsuranceContainerViewData getInsuranceContainerViewData()\r\n {\r\n return (InsuranceContainerViewData) sessionService.getAttribute(\"insuranceContainerViewData\");\r\n }", "private ISearchPageContainer getContainer() {\n return searchPageContainer;\n }", "public UIContainer getDefinitionContainer() {\n\t\treturn uiDefinition;\n\t}", "public String getDataStoreContainerId() {\n return dataStoreContainerId;\n }", "protected final LWContainerPeer<?, ?> getContainerPeer() {\n return containerPeer;\n }", "public int getCont() {\n\t\tint cont = 0;\n\t\tsynchronized (store) {\n\t\t\tStorage storage = (Storage) store.getContents();\n\t\t\tif (storage != null)\n\t\t\t\tcont = storage.cont;\n\t\t}\n\t\treturn cont;\n\t}", "public String getRemoteContainerId()\n {\n return remoteContainerId;\n }", "@Override\r\n\tpublic Control getControl() {\r\n\t\treturn container;\r\n\t}", "protected static Container getDomainContainer(Container c)\r\n {\n return c.getProject();\r\n }", "public boolean isContainer();", "public JComponent getPodContent() {\r\n return this;\r\n }", "public PortletContainer getPortletContainer() {\n return this.portletContainer; \n }", "public void setContainer(String container) {\n this.container = container;\n }", "public static ExternalRegisterContainer retrieveFromRequest() {\r\n HttpServletRequest httpServletRequest = GrouperUiFilter.retrieveHttpServletRequest();\r\n \r\n ExternalRegisterContainer externalRegisterContainer = (ExternalRegisterContainer)httpServletRequest\r\n .getAttribute(\"inviteExternalSubjectsContainer\");\r\n if (externalRegisterContainer == null) {\r\n throw new NoSessionException(GrouperUiUtils.message(\"inviteExternalSubjects.noContainer\"));\r\n }\r\n return externalRegisterContainer;\r\n }", "Reference owner();", "Container getContainer(ContentType type, List<Element> elements);", "public interface ContainerHolder extends MetaHolder {\n\n /**\n * Returns the root container in this containers\n * current hierarchy.\n *\n * @param <T> the container type\n * @return the container\n */\n @NonNull <T extends ContainerHolder> Optional<T> root();\n\n /**\n * Returns the parent container in this containers\n * current hierarchy.\n *\n * @param <T> the container type\n * @return the container\n */\n @NonNull <T extends ContainerHolder> Optional<T> parent();\n\n /**\n * Sets the parent container of this container in\n * the current hierarchy and returns it.\n *\n * @param parent the parent container\n * @param <T> the parent container type\n * @return the parent container\n */\n @Nullable <T extends ContainerHolder> T setParent(@Nullable T parent);\n\n /**\n * Clears this containers inherited tags and pulls\n * them again from its parent to update them.\n */\n void updateTags();\n\n /**\n * Returns {@code true} if this container, contains\n * other containers and {@code false} if it does not.\n *\n * @return true if this container has children\n */\n boolean hasChildren();\n\n /**\n * Returns the size of the elements and containers\n * contained inside this container.\n *\n * @return the container items size\n */\n int size();\n\n /**\n * Clears the items from this container.\n */\n void clear();\n\n}", "public static AnchorPane getContentBox(){\n return MainUIController.contentBox;\n }", "abstract public Container<?> getParent();", "String getContainmentReference();", "public JPanel getContent() {\r\n\t\treturn this.content;\r\n\t}", "public GameContainer getGameContainer() {\r\n\t\treturn this;\r\n\t}", "private Id getViewContainerID() {\n if (semantic == null) {\n return Id.invalid();\n }\n return new Id(RefreshIDFactory.getOrCreateID(viewContainer));\n }", "Container createContainer();", "public IPartitionType getParentContainerType()\n\t{\n\t\treturn parentContainerType;\n\t}", "public long generateContainerId() {\n return this.containerIdCounter.incrementAndGet();\n }", "public String getParentContainerXPath()\n\t{\n\t\treturn this.parentContainerXPath;\n\t}", "@NonNull <T extends ContainerHolder> Optional<T> parent();", "public RouteContainer getNodeContainer() {\r\n\t\tif (nodeContainer == null && selectedNode != null) {\r\n\t\t\tnodeContainer = selectedNode.getParent();\r\n\t\t}\r\n\t\treturn nodeContainer;\r\n\t}", "private Container Load() {\n return null;\r\n }", "public boolean getIsContainer()\n {\n return standardDefs.isContainer(root.getType());\n }", "public ZFrame getContent ()\n {\n return content;\n }", "public ZFrame getContent ()\n {\n return content;\n }", "@Override\npublic VirtualContainer getParentContainer() {\n\treturn null;\n}", "private CFComponent getOwner() {\n\t\treturn owner;\n\t}", "protected Container createContainer() {\n\treturn new EditorContainer();\n }", "public boolean isContainerType()\n/* */ {\n/* 174 */ return true;\n/* */ }", "public LinkedList getProcessingContainers() {\n return annotatorList;\n }", "private org.gwtproject.user.client.ui.SimplePanel get_contentContainer() {\n return build_contentContainer();\n }", "public StackPane getPane() {\n return this.container;\n }", "public JPanel GetPanel() {\n\t\treturn JPprincipal;\n\t}", "public boolean isContainerType()\n/* */ {\n/* 169 */ return true;\n/* */ }", "public List<SpecialContainer> getSpecialContainers(){\n return this.specialContainers;\n }", "public GenericContainer<?> exporterContainer() {\n return exporterContainer;\n }", "public int getContainerSize() {\n\t\treturn 27;\n\t}", "T createContainer();", "public Content getContent() {\n return this.content;\n }", "public gov.ucore.ucore._2_0.ContentMetadataType getMetadata()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.ContentMetadataType target = null;\n target = (gov.ucore.ucore._2_0.ContentMetadataType)get_store().find_element_user(METADATA$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "Optional<AgentContainer> findAgentContainer(String containerName);", "@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}", "public void setContainerName(String name) {\n this.name = name;\n }", "public ContentManager getManager() {\r\n\t\treturn manager;\r\n\t}" ]
[ "0.80558914", "0.71334916", "0.71260124", "0.693624", "0.6898443", "0.66831356", "0.65228176", "0.6389615", "0.6317126", "0.63100195", "0.6256302", "0.6241127", "0.6228654", "0.62127787", "0.62019783", "0.6179905", "0.6137123", "0.613602", "0.6092", "0.6073517", "0.6038284", "0.60278606", "0.60157853", "0.59950197", "0.5982082", "0.5966175", "0.5934679", "0.5898892", "0.5893453", "0.5887281", "0.5883906", "0.587271", "0.58121383", "0.58043164", "0.5787315", "0.57431334", "0.57215977", "0.5668242", "0.56193453", "0.5612983", "0.56021816", "0.55918354", "0.55671066", "0.55509", "0.553128", "0.54847467", "0.5473059", "0.5469544", "0.5467294", "0.54537433", "0.5450416", "0.5440317", "0.5429915", "0.5426852", "0.54110545", "0.53970844", "0.53907835", "0.53862566", "0.53860337", "0.5376794", "0.53569126", "0.5354386", "0.53528863", "0.5340878", "0.53214425", "0.52745813", "0.5269382", "0.52663034", "0.52621806", "0.52463084", "0.52338517", "0.52308285", "0.5230499", "0.52262753", "0.52196205", "0.5171197", "0.5170429", "0.51694274", "0.516007", "0.5132265", "0.5132265", "0.5128377", "0.5117463", "0.5107287", "0.5097931", "0.5091485", "0.5087775", "0.5084954", "0.5074668", "0.5072996", "0.50529987", "0.5052177", "0.5044772", "0.50410086", "0.5033502", "0.503077", "0.5030203", "0.5028564", "0.50244355", "0.501385" ]
0.5577741
42
The file size of the content claim formatted.
public String getContentClaimFileSize() { return contentClaimFileSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long size() {\n return this.filePage.getSizeInfile();\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "public long size() {\n return file.length();\n }", "public long getSize() {\r\n return mFile.getSize();\r\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public long getFileSize() {\n return fileSize_;\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public String getFileSize() {\n return fileSize;\n }", "public long getFileSize() {\r\n return fileSize;\r\n }", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public long getFileSize();", "public long getFileSize();", "public long getFileSize() {\n return fileSize_;\n }", "public String getSize() {\r\n return size;\r\n }", "public long length() {\n return _file.length();\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getFileLength() {\n\n return fileLength;\n\n }", "@NotPersistent\n public String getSize() {\n return size;\n }", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public float getFileSize() {\n return fileSize_;\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public float getFileSize() {\n return fileSize_;\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public long getFileSize() {\n return this.originalFileSize;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "long sizeInBytes() throws IOException;", "public long getSize() {\r\n return size;\r\n }", "@Element \n public String getSize() {\n return size;\n }", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "long getFileSize();", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "public final long getSize() { return size; }", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public String getSize() {\n return fullPhoto.getSize();\n }", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public long getSize();", "@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }", "public long getSize() {\n return size.get();\n }", "public void determineFileSize() {\n \t//Creating scanner object\n \tScanner scan = new Scanner(System.in);\n \tSystem.out.println(\"Please enter the path of the file you'd like to determint the size of\");\n \t\n \t//Capturing file path as filePath variable\n \tString filePath = scan.next();\n \t//using Java Nio\n \tPath path = Paths.get(filePath);\n\t\t\n \ttry {\n\t\t\tLong fileSize = Files.size(path);\n\t\t\tSystem.out.println(String.format(\"%s, bytes\", fileSize));\n\t\t\tSystem.out.println(String.format(\"%s, kilobytes\", fileSize/1024));\n\n\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tscan.close();\n \t\n }", "public String getSize() {\n return \"size: \" + movieData.size();\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "long getSize() throws IOException;", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public long getSize() {\n return mSize;\n }", "long getSize();", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "@Override\n\tpublic long contentLength() throws IOException {\n\t\treturn Files.size(this.path);\n\t}", "public int getSize() {\n\t\treturn smilFiles.size();\n\t}", "public long getTotalSize() {\n return totalSize;\n }", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "public long size() {\n\t\treturn size;\n\t}", "public long getByteCount() {\n return byteCount;\n }", "public int size() {\n return bytes.length;\n }", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public final long length() throws IOException {\r\n\t\treturn f.length();\r\n\t}", "public int getLength() {\n return mySize.getLength();\n }", "public int serializedSizeInBytes() {\n\t\treturn this.sizeInBytes() + 3 * 4;\n\t}", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "@JsonProperty(\"contentLength\")\n public String getContentLength() {\n return contentLength;\n }", "public static int totalSize_infos_metadata() {\n return (16 / 8);\n }", "public int TotalBytes()\n {\n int totalBytes = request.getContentLength();\n if (totalBytes == -1) return 0;\n return totalBytes;\n }", "public String getSizeMessage() {\n\t\treturn sizeMessage;\n\t}", "public int getSize() {\n\t\treturn _size;\n\t}", "public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }", "public static byte getSize() {\n return SIZE;\n }", "public static long getFileSize(String filePath) {\n\t\treturn new File(filePath).length();\n\t}", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public int getSize(){\n //To be written by student\n return localSize;\n }", "@ApiModelProperty(required = true, value = \"Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\\\"local\\\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\\\"not available\\\")\")\n\n public Long getSize() {\n return size;\n }", "public int GetSize() {\n\t\tif(this.V == 0) {\n\t\t\t\n\t\t\t// Read from settings file\n\t\t\ttry {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"settings.txt\"));\n\t\t\t\tString line;\n\t\t\t\tif((line = br.readLine()) != null) {\n\t\t\t\t\tthis.V = Integer.parseInt(line.split(\" \")[1]);\n\t\t\t\t}\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn this.V;\n\t}", "public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}", "public int actualSize(final Context<BTree, BTreeLeaf> context)\n\t{\n\t\treturn SIEntry.size(context.fileFormat);\n\t}", "public int getSize() {\r\n return _size;\r\n }", "public long getRecordSize ( ) {\r\n\t\treturn 113;\r\n\t}" ]
[ "0.75286746", "0.7513347", "0.74679023", "0.72687435", "0.7223561", "0.7196065", "0.7177652", "0.7159526", "0.7132557", "0.7117567", "0.70622164", "0.7036673", "0.70230126", "0.7016938", "0.7008097", "0.6995843", "0.6995843", "0.69887936", "0.69887936", "0.69835347", "0.6951425", "0.6936638", "0.69354904", "0.69272554", "0.69085586", "0.6905541", "0.6894773", "0.68914545", "0.68665266", "0.685682", "0.6844241", "0.6841716", "0.6833326", "0.68318534", "0.6821165", "0.68143076", "0.6810078", "0.6801816", "0.6801131", "0.67973584", "0.67891455", "0.67891455", "0.67891455", "0.67891455", "0.6779467", "0.67776483", "0.6751535", "0.675105", "0.6730716", "0.6721958", "0.6720717", "0.6713242", "0.66960806", "0.66958636", "0.6695436", "0.66935176", "0.66516364", "0.66459614", "0.6644874", "0.66094637", "0.6605995", "0.6605098", "0.6604901", "0.6593272", "0.65595794", "0.6549834", "0.6545627", "0.6517156", "0.6512908", "0.65007746", "0.6487964", "0.6484861", "0.64811903", "0.648065", "0.6479703", "0.6474917", "0.6466922", "0.6464735", "0.6455134", "0.64486456", "0.6442107", "0.6436118", "0.64225024", "0.64212835", "0.6408117", "0.63913363", "0.6387422", "0.6375965", "0.63743407", "0.6367559", "0.63659424", "0.63650703", "0.6360516", "0.6357756", "0.6354299", "0.63483405", "0.6345013", "0.63405097", "0.63307434", "0.632679" ]
0.8045024
0
The file size of the content claim formatted.
public FlowFileDTOBuilder setContentClaimFileSize(final String contentClaimFileSize) { this.contentClaimFileSize = contentClaimFileSize; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "public long size() {\n return file.length();\n }", "public long getSize() {\r\n return mFile.getSize();\r\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public long getFileSize() {\n return fileSize_;\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public String getFileSize() {\n return fileSize;\n }", "public long getFileSize() {\r\n return fileSize;\r\n }", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public long getFileSize();", "public long getFileSize();", "public long getFileSize() {\n return fileSize_;\n }", "public String getSize() {\r\n return size;\r\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public long length() {\n return _file.length();\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getFileLength() {\n\n return fileLength;\n\n }", "@NotPersistent\n public String getSize() {\n return size;\n }", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public float getFileSize() {\n return fileSize_;\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public float getFileSize() {\n return fileSize_;\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public long getFileSize() {\n return this.originalFileSize;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "public long getSize() {\r\n return size;\r\n }", "long sizeInBytes() throws IOException;", "@Element \n public String getSize() {\n return size;\n }", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "long getFileSize();", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "public final long getSize() { return size; }", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public String getSize() {\n return fullPhoto.getSize();\n }", "public long getSize() {\n\t\treturn this.payloadSize; // UTF-16 => 2 bytes per character\n\t}", "public long getSize();", "@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }", "public void determineFileSize() {\n \t//Creating scanner object\n \tScanner scan = new Scanner(System.in);\n \tSystem.out.println(\"Please enter the path of the file you'd like to determint the size of\");\n \t\n \t//Capturing file path as filePath variable\n \tString filePath = scan.next();\n \t//using Java Nio\n \tPath path = Paths.get(filePath);\n\t\t\n \ttry {\n\t\t\tLong fileSize = Files.size(path);\n\t\t\tSystem.out.println(String.format(\"%s, bytes\", fileSize));\n\t\t\tSystem.out.println(String.format(\"%s, kilobytes\", fileSize/1024));\n\n\t\t\t\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n \tscan.close();\n \t\n }", "public long getSize() {\n return size.get();\n }", "public String getSize() {\n return \"size: \" + movieData.size();\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "long getSize() throws IOException;", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "public long getSize() {\n return mSize;\n }", "long getSize();", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "@Override\n\tpublic long contentLength() throws IOException {\n\t\treturn Files.size(this.path);\n\t}", "public int getSize() {\n\t\treturn smilFiles.size();\n\t}", "public long getTotalSize() {\n return totalSize;\n }", "public int size() {\n return 4 + value.length + BufferUtil.paddingLength(value.length, 4);\n }", "public long size() {\n\t\treturn size;\n\t}", "public long getByteCount() {\n return byteCount;\n }", "public int size() {\n return bytes.length;\n }", "public int getLength() {\n/* 301 */ return this.stream.getInt(COSName.LENGTH, 0);\n/* */ }", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public final long length() throws IOException {\r\n\t\treturn f.length();\r\n\t}", "public int getLength() {\n return mySize.getLength();\n }", "public int serializedSizeInBytes() {\n\t\treturn this.sizeInBytes() + 3 * 4;\n\t}", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "@JsonProperty(\"contentLength\")\n public String getContentLength() {\n return contentLength;\n }", "public static int totalSize_infos_metadata() {\n return (16 / 8);\n }", "public int TotalBytes()\n {\n int totalBytes = request.getContentLength();\n if (totalBytes == -1) return 0;\n return totalBytes;\n }", "public String getSizeMessage() {\n\t\treturn sizeMessage;\n\t}", "public int getSize() {\n\t\treturn _size;\n\t}", "public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }", "public static byte getSize() {\n return SIZE;\n }", "public static long getFileSize(String filePath) {\n\t\treturn new File(filePath).length();\n\t}", "public int getSize() {\n int size = 5; // 1 (code) + 2 (data length) + 2 (# of constants)\n try {\n for (Iterator<String> i = constants.iterator(); i.hasNext();) {\n size += (i.next().getBytes(\"UTF-8\").length + 1); // Unicode, null-terminated\n }\n } catch (UnsupportedEncodingException e) {\n // UTF-8 should be available..\n }\n return size;\n }", "public int getSize(){\n //To be written by student\n return localSize;\n }", "@ApiModelProperty(required = true, value = \"Amount of disk space used by the volume (in bytes). This information is only available for volumes created with the `\\\"local\\\"` volume driver. For volumes created with other volume drivers, this field is set to `-1` (\\\"not available\\\")\")\n\n public Long getSize() {\n return size;\n }", "public int GetSize() {\n\t\tif(this.V == 0) {\n\t\t\t\n\t\t\t// Read from settings file\n\t\t\ttry {\n\t\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"settings.txt\"));\n\t\t\t\tString line;\n\t\t\t\tif((line = br.readLine()) != null) {\n\t\t\t\t\tthis.V = Integer.parseInt(line.split(\" \")[1]);\n\t\t\t\t}\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn this.V;\n\t}", "public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}", "public int actualSize(final Context<BTree, BTreeLeaf> context)\n\t{\n\t\treturn SIEntry.size(context.fileFormat);\n\t}", "public int getSize() {\r\n return _size;\r\n }", "public long getRecordSize ( ) {\r\n\t\treturn 113;\r\n\t}" ]
[ "0.80435383", "0.75288814", "0.7513547", "0.7466952", "0.7268487", "0.7223598", "0.7196658", "0.7178555", "0.71606416", "0.71335125", "0.7118796", "0.7062469", "0.70372546", "0.70231247", "0.7017243", "0.70088446", "0.69966274", "0.69966274", "0.6989249", "0.6989249", "0.6983791", "0.6952261", "0.6936668", "0.69354373", "0.69287217", "0.6909322", "0.69069177", "0.6895", "0.68919545", "0.6865738", "0.6857358", "0.6843649", "0.6841468", "0.6834142", "0.68314433", "0.6822647", "0.68141395", "0.6811606", "0.68028224", "0.68021137", "0.67975664", "0.67904353", "0.67904353", "0.67904353", "0.67904353", "0.67807084", "0.67780316", "0.67523855", "0.67522454", "0.6731658", "0.6721903", "0.67215985", "0.6713523", "0.66977894", "0.66968966", "0.6696863", "0.6694929", "0.6651642", "0.66467935", "0.66461986", "0.6611063", "0.66075516", "0.6607044", "0.66059136", "0.6593346", "0.6560536", "0.6549839", "0.65470904", "0.6518417", "0.6514403", "0.6500444", "0.6489446", "0.6486042", "0.64832413", "0.6482188", "0.64805603", "0.64760494", "0.6466833", "0.6465245", "0.6456573", "0.64478946", "0.64436245", "0.64370316", "0.6422518", "0.64222085", "0.6406881", "0.6392113", "0.63872725", "0.63771766", "0.6375863", "0.6369369", "0.6367647", "0.6366953", "0.63626635", "0.635925", "0.6356006", "0.63500136", "0.63469476", "0.6341782", "0.6332201", "0.6327894" ]
0.0
-1
The file size of the content claim in bytes.
public Long getContentClaimFileSizeBytes() { return contentClaimFileSizeBytes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public long size() {\n return file.length();\n }", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public long getSize() {\r\n return mFile.getSize();\r\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public long getFileSize() {\r\n return fileSize;\r\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public long getFileSize();", "public long getFileSize();", "@Override\n\tpublic long contentLength() throws IOException {\n\t\treturn Files.size(this.path);\n\t}", "public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }", "public long getFileLength() {\n\n return fileLength;\n\n }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public long length() {\n return _file.length();\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "long sizeInBytes() throws IOException;", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public String getFileSize() {\n return fileSize;\n }", "public int TotalBytes()\n {\n int totalBytes = request.getContentLength();\n if (totalBytes == -1) return 0;\n return totalBytes;\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getSize() {\n return size;\n }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getSize() {\r\n return size;\r\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public long getByteCount() {\n return byteCount;\n }", "public final long getSize() { return size; }", "public long getSize() {\n return size.get();\n }", "public Long getContentLength() {\n\t\treturn Numbers.toLong(header.getString(HttpHeader.CONTENT_LENGTH));\n\t}", "public int size() {\n return bytes.length;\n }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "long getFileSize();", "@NotPersistent\n public String getSize() {\n return size;\n }", "public int contentLength();", "public long getFileSize() {\n return this.originalFileSize;\n }", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "@JsonProperty(\"contentLength\")\n public String getContentLength() {\n return contentLength;\n }", "public int getContentLength() {\n return this.contentLength;\n }", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public long getContentLength() {\n return contentLength;\n }", "public long getContentSize() {\n return (long) (getVersion() == 1 ? 12 : 8);\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public long size() {\n\t\treturn size;\n\t}", "public String getSize() {\r\n return size;\r\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }", "public long getSize() {\n return mSize;\n }", "public long getSize();", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "public long getContentLength() {\n return contentLength;\n }", "@Override\n\tpublic int getSize() {\n\t\treturn contents.length;\n\t}", "public synchronized long size() {\n\t\treturn size;\n\t}", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "abstract Long getContentLength();", "public static byte getSize() {\n return SIZE;\n }", "public int length() {\n return content.length();\n }", "public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }", "int getContentLength();", "public long getTotalSize() {\n return totalSize;\n }", "int getByteCount() {\n\t\treturn byteCount;\n\t}", "public long getContentLength()\r\n/* 180: */ {\r\n/* 181:269 */ String value = getFirst(\"Content-Length\");\r\n/* 182:270 */ return value != null ? Long.parseLong(value) : -1L;\r\n/* 183: */ }", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "long getSize() throws IOException;", "public static long getDownloadingFileSize() {\n\t\treturn downloadingFileSize;\n\t}", "public final int getSize() {\n return size;\n }", "@Element \n public String getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn _size;\n\t}", "long getSize();", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "public final long length() throws IOException {\r\n\t\treturn f.length();\r\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "Long diskSizeBytes();", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "public int getContentSize() {\n return content.size();\n }", "public long size(String path);", "public int getSize() {\r\n return _size;\r\n }", "@Override\n\tpublic long size() {\n\t\t\n\t\treturn mySize;\n\t}" ]
[ "0.8471188", "0.75219905", "0.7484952", "0.7353258", "0.7302634", "0.72620547", "0.7185232", "0.7147336", "0.7105694", "0.7091977", "0.7091783", "0.7090172", "0.7085799", "0.7075489", "0.7048129", "0.7048129", "0.70443743", "0.7036915", "0.7023766", "0.70227766", "0.7015911", "0.7013092", "0.6977234", "0.6971433", "0.69580144", "0.6950184", "0.69143987", "0.68828386", "0.6876733", "0.6871109", "0.6871109", "0.6871109", "0.6871109", "0.6864872", "0.6863846", "0.686201", "0.6859465", "0.68573517", "0.6853946", "0.6847724", "0.68420666", "0.6835016", "0.6823102", "0.6818945", "0.68091685", "0.6786349", "0.6785048", "0.678438", "0.6780008", "0.67687845", "0.6757006", "0.6752397", "0.6713888", "0.67099357", "0.6706075", "0.6705857", "0.67044413", "0.6702359", "0.66823506", "0.66823506", "0.66806126", "0.6659399", "0.6659352", "0.6641373", "0.6637951", "0.6627602", "0.6625284", "0.6624473", "0.6621704", "0.66212064", "0.6581579", "0.65769684", "0.6568493", "0.656558", "0.65619856", "0.65579265", "0.65559477", "0.6552761", "0.6543457", "0.65386546", "0.65366405", "0.6535465", "0.6517895", "0.65167356", "0.6516463", "0.6479928", "0.6476028", "0.6464495", "0.64578545", "0.64404386", "0.6439019", "0.6435203", "0.64319396", "0.64225763", "0.6421213", "0.6413355", "0.6395343", "0.6392022", "0.6390475", "0.6374717" ]
0.8288193
1
The file size of the content claim in bytes.
public FlowFileDTOBuilder setContentClaimFileSizeBytes(final Long contentClaimFileSizeBytes) { this.contentClaimFileSizeBytes = contentClaimFileSizeBytes; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return this.filePage.getSizeInfile();\n }", "public long size() {\n return file.length();\n }", "@Override\n\tpublic long getSize()\n\t{\n\t\tif (size >= 0)\n\t\t{\n\t\t\treturn size;\n\t\t}\n\t\telse if (cachedContent != null)\n\t\t{\n\t\t\treturn cachedContent.length;\n\t\t}\n\t\telse if (dfos.isInMemory())\n\t\t{\n\t\t\treturn dfos.getData().length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn dfos.getFile().length();\n\t\t}\n\t}", "public long getSize() {\r\n return mFile.getSize();\r\n }", "private Long getFileSize() {\n\t\t// retornamos el tamano del fichero\n\t\treturn this.fileSize;\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "@ManagedAttribute(description = \"Size in bytes\")\n\tpublic long getSizeInBytes() {\n\t\ttry {\n\t\t\treturn store.estimateSize().bytes();\n\t\t} catch (IOException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public long getFileSize() {\r\n return fileSize;\r\n }", "public Long sizeInKB() {\n return this.sizeInKB;\n }", "public final long getFileSize() {\n\t\treturn m_info.getSize();\n\t}", "public long getFileSize() {\n return fileSize_;\n }", "public int getFileSize(){\n\t\treturn fileSize;\n\t}", "public long getFileSize();", "public long getFileSize();", "@Override\n\tpublic long contentLength() throws IOException {\n\t\treturn Files.size(this.path);\n\t}", "public long getSize() {\n // a char is two bytes\n int size = (key.length() * 2) + 4;\n\n if (id != null) {\n size += ((id.length() * 2) + 4);\n }\n\n if (content != null) {\n if (content.getClass() == String.class) {\n size += ((content.toString().length() * 2) + 4);\n } else if (content instanceof CacheContent) {\n size += ((CacheContent) content).getSize();\n } else {\n return -1;\n }\n\n //add created, lastUpdate, and wasFlushed field sizes (1, 8, and 8)\n return size + 17;\n } else {\n return -1;\n }\n }", "public long getFileLength() {\n\n return fileLength;\n\n }", "public int getSize()\n\t{\n\t\treturn bytes.length;\n\t}", "public long getFileSize() {\r\n\t\treturn dFileSize;\r\n\t}", "public Long sizeInBytes() {\n return this.sizeInBytes;\n }", "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getFileSize() {\n\t\treturn mFileSize;\n\t}", "public long length() {\n return _file.length();\n }", "@Schema(example = \"2186\", description = \"Size of the image in bytes.\")\n public Long getSize() {\n return size;\n }", "public long getFileSize(){\n\t return new File(outputFileName).length();\n }", "public long getSize() {\n\t\treturn size;\n\t}", "public long getFileSize()\r\n {\r\n return lFileSize;\r\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\n return size;\n }", "public long getSize() {\r\n\t\treturn size;\r\n\t}", "long sizeInBytes() throws IOException;", "@XmlElement\n public long getFileSize() {\n return this.fileSize;\n }", "public String getFileSize() {\n return fileSize;\n }", "public int TotalBytes()\n {\n int totalBytes = request.getContentLength();\n if (totalBytes == -1) return 0;\n return totalBytes;\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getSize() {\n return size;\n }", "public long getSize()\n {\n return getLong(\"Size\");\n }", "public float getFileSize() {\n return fileSize_;\n }", "public long getSize() {\r\n return size;\r\n }", "public int getLengthInBytes()\n {\n return lengthInBytes;\n }", "public long getByteCount() {\n return byteCount;\n }", "public final long getSize() { return size; }", "public long getSize() {\n return size.get();\n }", "public Long getContentLength() {\n\t\treturn Numbers.toLong(header.getString(HttpHeader.CONTENT_LENGTH));\n\t}", "public int size() {\n return bytes.length;\n }", "public long size() {\n try {\n return Files.size(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to get the size of staged document!\", e);\n }\n }", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "long getFileSize();", "@NotPersistent\n public String getSize() {\n return size;\n }", "public int contentLength();", "public long getFileSize() {\n return this.originalFileSize;\n }", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "@JsonProperty(\"contentLength\")\n public String getContentLength() {\n return contentLength;\n }", "public int getContentLength() {\n return this.contentLength;\n }", "public String getSize() {\n return size;\n }", "public String getSize() {\n return size;\n }", "public long getContentLength() {\n return contentLength;\n }", "public long getContentSize() {\n return (long) (getVersion() == 1 ? 12 : 8);\n }", "public TSizeInBytes getSize() {\n\n\t\treturn size;\n\t}", "public long getBodySize() {\n\t\t\tif (this.headers.containsKey(\"content-length\")) {\n\t\t\t\treturn Long.parseLong(this.headers.get(\"content-length\"));\n\t\t\t} else if (this.splitbyte < this.rlen) {\n\t\t\t\treturn this.rlen - this.splitbyte;\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public long size() {\n\t\treturn size;\n\t}", "public String getSize() {\r\n return size;\r\n }", "@Override\n public long size() {\n if (!isRegularFile()) {\n throw new IllegalStateException(\"not a regular file!\");\n }\n return this.fileSize;\n }", "@ApiModelProperty(example = \"3615\", value = \"Numeric value in bytes\")\n /**\n * Numeric value in bytes\n *\n * @return size Integer\n */\n public Integer getSize() {\n return size;\n }", "public long getSize();", "public long getSize() {\n return mSize;\n }", "long getSize() throws IOException {\n return fileRWAccessSize.get();\n }", "public long getContentLength() {\n return contentLength;\n }", "@Override\n\tpublic int getSize() {\n\t\treturn contents.length;\n\t}", "public synchronized long size() {\n\t\treturn size;\n\t}", "public int getLength()\n {\n return stream.getInt(COSName.LENGTH, 0);\n }", "abstract Long getContentLength();", "public static byte getSize() {\n return SIZE;\n }", "public int length() {\n return content.length();\n }", "public int getSizeBytes() {\n if (getDataType() == DataType.SEQUENCE)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRING)\n return getDataType().getSize();\n else if (getDataType() == DataType.STRUCTURE)\n return size * members.getStructureSize();\n // else if (this.isVariableLength())\n // return 0; // do not know\n else\n return size * getDataType().getSize();\n }", "int getContentLength();", "public long getTotalSize() {\n return totalSize;\n }", "int getByteCount() {\n\t\treturn byteCount;\n\t}", "long getSize() throws IOException;", "public long getContentLength()\r\n/* 180: */ {\r\n/* 181:269 */ String value = getFirst(\"Content-Length\");\r\n/* 182:270 */ return value != null ? Long.parseLong(value) : -1L;\r\n/* 183: */ }", "public long getFileSize(String filename) {\n\t\treturn 0;\n\t}", "public static long getDownloadingFileSize() {\n\t\treturn downloadingFileSize;\n\t}", "public final int getSize() {\n return size;\n }", "@Element \n public String getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn _size;\n\t}", "long getSize();", "public long getSizeFromFile(File file) {\n\t\tlong size = 0;\n\t\tif (file != null) {\n\t\t\tsize = file.length();\n\t\t}\n\t\treturn size;\n\t}", "public final long length() throws IOException {\r\n\t\treturn f.length();\r\n\t}", "@MavlinkFieldInfo(\n position = 2,\n unitSize = 4,\n description = \"total data size (set on ACK only).\"\n )\n public final long size() {\n return this.size;\n }", "public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }", "Long diskSizeBytes();", "public long getInstrumentedFileSize() {\n if (this.rewrittenFile != null) return this.rewrittenFile.length();\n else return -1;\n }", "public int getContentSize() {\n return content.size();\n }", "public long size(String path);", "public int getSize() {\r\n return _size;\r\n }", "@Override\n\tpublic long size() {\n\t\t\n\t\treturn mySize;\n\t}" ]
[ "0.84707963", "0.8287091", "0.75240767", "0.7487202", "0.73548937", "0.7303862", "0.7263963", "0.7187046", "0.71486676", "0.71056557", "0.70932865", "0.70917535", "0.70916706", "0.70871234", "0.7076936", "0.7050175", "0.7050175", "0.7045856", "0.703692", "0.702456", "0.70234877", "0.70172834", "0.7013497", "0.69783324", "0.69727534", "0.6959565", "0.69508994", "0.6916038", "0.6884019", "0.68783134", "0.6872262", "0.6872262", "0.6872262", "0.6872262", "0.68660825", "0.6865591", "0.68633366", "0.68609387", "0.6856874", "0.68552405", "0.6848914", "0.684317", "0.683641", "0.68243194", "0.68190527", "0.6808792", "0.6788253", "0.67862177", "0.67840993", "0.67802864", "0.67698973", "0.67571145", "0.6754766", "0.67149204", "0.67113113", "0.6708172", "0.6707231", "0.67040074", "0.6703041", "0.6683483", "0.6683483", "0.66805184", "0.66602445", "0.66599596", "0.6641692", "0.66388834", "0.6628816", "0.6627175", "0.6624575", "0.6623104", "0.6622571", "0.65826255", "0.6576859", "0.6570988", "0.65666395", "0.65612906", "0.65596974", "0.65562737", "0.6553253", "0.6542579", "0.6540347", "0.65369886", "0.65354884", "0.6519325", "0.65189296", "0.6518532", "0.6481551", "0.6477287", "0.64655066", "0.64589334", "0.6442476", "0.6440644", "0.6437162", "0.64317554", "0.6422682", "0.64215", "0.6415495", "0.63961947", "0.63938135", "0.6391632", "0.6376068" ]
0.0
-1
The identifier of the content claim.
public String getContentClaimIdentifier() { return contentClaimIdentifier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final ASN1Identifier getIdentifier()\n {\n return content.getIdentifier();\n }", "public int getClaimid() {\n\t\treturn claimid;\n\t}", "java.lang.String getContentId();", "String getContentGeneratorId();", "public String getContentId() {\n\n String as[] = getMimeHeader(\"Content-Id\");\n\n if (as != null && as.length > 0) {\n return as[0];\n } else {\n return null;\n }\n }", "String getIdentityId();", "public String getContentClaimContainer() {\n return contentClaimContainer;\n }", "@Override\n public String getIdentifier() {\n return myIdentity.getIdentifier();\n }", "public java.lang.String getClaimNo() {\n return claimNo;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getClaimCenterUID();", "public String getIdentity();", "public String getClaimNumber(){\n\t\treturn this.claimNumber;\n\t}", "public String getContentClaimSection() {\n return contentClaimSection;\n }", "java.lang.String getIdentifier();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getClaimNumber();", "@NonNull String identifier();", "public String getIdentifier();", "public String getIdentifier();", "public final String getIdentity() {\n return this.identity;\n }", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "public String getIdentifierString();", "public byte[] getIdentifier() {\n return identifier;\n }", "public String getIdentity() { \n\t\treturn getIdentityElement().getValue();\n\t}", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "ManifestIdentifier getIdentifier();", "public String getIdentity() {\n\t\treturn identity;\n\t}", "int getContentId();", "java.lang.String getSubjectKeyID();", "java.lang.String getSubjectKeyID();", "public int getIdentifier();", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier()\n {\n return identifier;\n }", "private String getUniqueId(JCas jCas) {\n return ConsumerUtils.getExternalId(getDocumentAnnotation(jCas), contentHashAsId);\n }", "Identifier getId();", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "@Nullable\n public String getIdentifier()\n {\n return identifier;\n }", "java.lang.String getConceptId();", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\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 identifier_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n identifier_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "java.lang.String getRecognitionId();", "com.google.protobuf.ByteString getIdentity();", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "@Test\n public void testClaimClaimId() {\n new ClaimFieldTester()\n .verifyBase64FieldCopiedCorrectly(\n FissClaim.Builder::setRdaClaimKey, RdaFissClaim::getClaimId, \"claimId\", 32);\n }", "public String getIdentifier() {\r\n\t\treturn this.identifier;\r\n\t}", "public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\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 }", "public String getMaternalID();", "public String getIdentifier() {\n\t\treturn identifier;\n\t}", "java.lang.String getID();", "com.google.protobuf.ByteString\n getContentIdBytes();", "public int getId() {\n return oid ;\n }", "@NotNull\n public String getIdentifier() {\n return this.identifier;\n }", "public int getIdentifier()\n {\n return identifier;\n }", "@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 }", "org.hl7.fhir.Identifier getIdentifier();", "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 }", "public java.lang.String getIdMedication() {\n java.lang.Object ref = idMedication_;\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 idMedication_ = s;\n return s;\n }\n }", "public java.lang.String getIdMedication() {\n java.lang.Object ref = idMedication_;\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 idMedication_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getClaimType(){\n\t\treturn this.claimType;\n\t}", "public Object getIdentifier() {\n return identifier;\n }", "public String getIdentifier()\n\t{\n\t\treturn mIdentifier;\n\t}", "public String getIdentifier(){\n return identifier;\n }", "public String getId()\n\t\t{\n\t\t\treturn mediaElement.getAttribute(ID_ATTR_NAME);\n\t\t}", "public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@ApiModelProperty(value = \"Identifier for the issuer object.\")\n public String getId() {\n return id;\n }", "public String getID() {\n return tokenString_ID != null ? tokenString_ID : \"\";\n }", "int getIdentifier();", "public String getContentId() {\n\t\treturn _contentId;\n\t}", "public int getIdentity(){\r\n\t\treturn identity;\r\n\t}", "public String claimNo() {\r\n sleep(2000);\r\n String profileNoLable = pageHeaderForClaimFolder.getAttribute(\"innerHTML\");\r\n String[] portfolioNo = profileNoLable.split(\" \", 3);\r\n return portfolioNo[2];\r\n }", "String getCreatorId();", "@Nullable\n public String getIdToken() {\n return idToken;\n }", "long getCaptureFestivalId();", "public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }", "public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getIdentifierBytes();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();" ]
[ "0.69780374", "0.6934113", "0.67996037", "0.67875266", "0.6711059", "0.6708656", "0.6667043", "0.6658083", "0.6587768", "0.6580747", "0.6546356", "0.6534315", "0.6490618", "0.6452356", "0.6445162", "0.6395565", "0.63808936", "0.63808936", "0.63555455", "0.62979484", "0.62940866", "0.6268802", "0.6267352", "0.6264647", "0.6264647", "0.6264647", "0.6264647", "0.6264647", "0.6264647", "0.6264647", "0.62582", "0.62323594", "0.6215607", "0.6212951", "0.6160674", "0.6160674", "0.6150196", "0.6148824", "0.61446863", "0.61367667", "0.611614", "0.61129385", "0.61129385", "0.61129385", "0.61129385", "0.61129385", "0.61129385", "0.61129385", "0.61129385", "0.61112505", "0.6101392", "0.6098342", "0.6095684", "0.60934764", "0.6077722", "0.60764474", "0.6068984", "0.60647595", "0.6063796", "0.6060344", "0.60515594", "0.6044555", "0.6031951", "0.6025861", "0.6017508", "0.6003996", "0.5999264", "0.5992197", "0.5989703", "0.59799993", "0.59780115", "0.5977939", "0.5972571", "0.59686005", "0.5954063", "0.59474444", "0.5942965", "0.5941571", "0.59399325", "0.5924667", "0.5915524", "0.590477", "0.58957094", "0.58916706", "0.58896095", "0.5889414", "0.5885987", "0.5876687", "0.5873568", "0.5865361", "0.5854577", "0.5853191", "0.5853117", "0.5853117", "0.5853117", "0.5853117", "0.5853117", "0.5853117", "0.5853117", "0.5853117" ]
0.812805
0
The identifier of the content claim.
public FlowFileDTOBuilder setContentClaimIdentifier(final String contentClaimIdentifier) { this.contentClaimIdentifier = contentClaimIdentifier; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContentClaimIdentifier() {\n return contentClaimIdentifier;\n }", "public final ASN1Identifier getIdentifier()\n {\n return content.getIdentifier();\n }", "public int getClaimid() {\n\t\treturn claimid;\n\t}", "java.lang.String getContentId();", "String getContentGeneratorId();", "public String getContentId() {\n\n String as[] = getMimeHeader(\"Content-Id\");\n\n if (as != null && as.length > 0) {\n return as[0];\n } else {\n return null;\n }\n }", "String getIdentityId();", "public String getContentClaimContainer() {\n return contentClaimContainer;\n }", "@Override\n public String getIdentifier() {\n return myIdentity.getIdentifier();\n }", "public java.lang.String getClaimNo() {\n return claimNo;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getClaimCenterUID();", "public String getIdentity();", "public String getClaimNumber(){\n\t\treturn this.claimNumber;\n\t}", "public String getContentClaimSection() {\n return contentClaimSection;\n }", "java.lang.String getIdentifier();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getClaimNumber();", "@NonNull String identifier();", "public String getIdentifier();", "public String getIdentifier();", "public final String getIdentity() {\n return this.identity;\n }", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "public String getIdentifierString();", "public byte[] getIdentifier() {\n return identifier;\n }", "public String getIdentity() { \n\t\treturn getIdentityElement().getValue();\n\t}", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "ManifestIdentifier getIdentifier();", "public String getIdentity() {\n\t\treturn identity;\n\t}", "int getContentId();", "java.lang.String getSubjectKeyID();", "java.lang.String getSubjectKeyID();", "public int getIdentifier();", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier()\n {\n return identifier;\n }", "private String getUniqueId(JCas jCas) {\n return ConsumerUtils.getExternalId(getDocumentAnnotation(jCas), contentHashAsId);\n }", "Identifier getId();", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "public String getIdentifier() {\n return identifier;\n }", "@Nullable\n public String getIdentifier()\n {\n return identifier;\n }", "java.lang.String getConceptId();", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\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 identifier_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIdentifier() {\n java.lang.Object ref = identifier_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n identifier_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "java.lang.String getRecognitionId();", "com.google.protobuf.ByteString getIdentity();", "@NonNull\n public String getIdentifier() {\n return mProto.id;\n }", "@Test\n public void testClaimClaimId() {\n new ClaimFieldTester()\n .verifyBase64FieldCopiedCorrectly(\n FissClaim.Builder::setRdaClaimKey, RdaFissClaim::getClaimId, \"claimId\", 32);\n }", "public String getIdentifier() {\r\n\t\treturn this.identifier;\r\n\t}", "public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\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 }", "public String getMaternalID();", "public String getIdentifier() {\n\t\treturn identifier;\n\t}", "java.lang.String getID();", "com.google.protobuf.ByteString\n getContentIdBytes();", "public int getId() {\n return oid ;\n }", "@NotNull\n public String getIdentifier() {\n return this.identifier;\n }", "public int getIdentifier()\n {\n return identifier;\n }", "@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 }", "org.hl7.fhir.Identifier getIdentifier();", "public java.lang.String getIdMedication() {\n java.lang.Object ref = idMedication_;\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 idMedication_ = s;\n return s;\n }\n }", "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 }", "public java.lang.String getIdMedication() {\n java.lang.Object ref = idMedication_;\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 idMedication_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getClaimType(){\n\t\treturn this.claimType;\n\t}", "public Object getIdentifier() {\n return identifier;\n }", "public String getIdentifier()\n\t{\n\t\treturn mIdentifier;\n\t}", "public String getIdentifier(){\n return identifier;\n }", "public String getId()\n\t\t{\n\t\t\treturn mediaElement.getAttribute(ID_ATTR_NAME);\n\t\t}", "public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@ApiModelProperty(value = \"Identifier for the issuer object.\")\n public String getId() {\n return id;\n }", "public String getID() {\n return tokenString_ID != null ? tokenString_ID : \"\";\n }", "int getIdentifier();", "public String getContentId() {\n\t\treturn _contentId;\n\t}", "public int getIdentity(){\r\n\t\treturn identity;\r\n\t}", "String getCreatorId();", "public String claimNo() {\r\n sleep(2000);\r\n String profileNoLable = pageHeaderForClaimFolder.getAttribute(\"innerHTML\");\r\n String[] portfolioNo = profileNoLable.split(\" \", 3);\r\n return portfolioNo[2];\r\n }", "@Nullable\n public String getIdToken() {\n return idToken;\n }", "long getCaptureFestivalId();", "public String getIdentifier() {\n try {\n return keyAlias + \"-\" + toHexString(\n MessageDigest.getInstance(\"SHA1\").digest(keyStoreManager.getIdentifierKey(keyAlias).getEncoded()));\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }", "public com.google.protobuf.ByteString\n getIdentifierBytes() {\n java.lang.Object ref = identifier_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n identifier_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getIdentifierBytes();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();" ]
[ "0.81294274", "0.69779855", "0.69335777", "0.68017346", "0.67889273", "0.6712137", "0.6708545", "0.66680324", "0.665792", "0.65867376", "0.6580018", "0.654581", "0.65335536", "0.64918035", "0.645226", "0.6443904", "0.6394622", "0.63804424", "0.63804424", "0.63553464", "0.62976867", "0.62940025", "0.6269351", "0.6266707", "0.6264455", "0.6264455", "0.6264455", "0.6264455", "0.6264455", "0.6264455", "0.6264455", "0.62587684", "0.623152", "0.6215185", "0.62141514", "0.61614937", "0.61614937", "0.6149766", "0.6148342", "0.614414", "0.6136094", "0.61163056", "0.61124414", "0.61124414", "0.61124414", "0.61124414", "0.61124414", "0.61124414", "0.61124414", "0.61124414", "0.6110164", "0.6101095", "0.6097794", "0.60953057", "0.6092115", "0.6078263", "0.60766166", "0.6069688", "0.60640854", "0.6063304", "0.6060674", "0.6050098", "0.6043868", "0.6031279", "0.6026691", "0.60205984", "0.60036963", "0.5998152", "0.599181", "0.5989752", "0.5978375", "0.59772587", "0.5975875", "0.59718055", "0.5967861", "0.59537", "0.59467494", "0.59426385", "0.59408563", "0.59401643", "0.5923947", "0.59154844", "0.5904336", "0.5897885", "0.5891018", "0.58890265", "0.5888036", "0.58857733", "0.587469", "0.58730644", "0.5865039", "0.5854744", "0.58540356", "0.5853674", "0.5853674", "0.5853674", "0.5853674", "0.5853674", "0.5853674", "0.5853674", "0.5853674" ]
0.0
-1
The offset into the content claim where the flowfile's content begins.
public Long getContentClaimOffset() { return contentClaimOffset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFileOffset();", "long getFileOffset();", "public long offset() {\n return offset;\n }", "@Override\n public long position() throws IOException {\n return _backing.getFilePointer() - _head.offset;\n }", "public int getStartOffset() {\n return startOffset;\n }", "public int getOffset() {\r\n return offset;\r\n }", "public long getCurrentOffset() {\n return (long)current_chunk * (long)chunksize;\n }", "public int getOffset() {\n return offset_;\n }", "public int getOffset() {\n return offset_;\n }", "public int getOffset() {\r\n\t\treturn offset;\r\n\t}", "public int getOffset() {\n return offset;\n }", "public int getOffset() {\n return offset;\n }", "public abstract long getStartOffset();", "public int getOffset() {\n return offset;\n }", "int getOffset();", "int getOffset();", "int getOffset();", "public int getOffset() {\r\n return this.offset;\r\n }", "public int getOffset() {\r\n\t\treturn this.offset;\r\n\t}", "public int offendingHeaderOffset()\n {\n return offset() + OFFENDING_HDR_OFFSET;\n }", "public int getOffset() \n {\n return offset;\n }", "public int startOffset();", "public int getOffset() {\n return this.offset;\n }", "public long getStartOffset() {\n return mStartOffset;\n }", "@Override\n\tpublic int getStartOffset() {\n\t\treturn 0;\n\t}", "public final int startOffset() {\n return startOffset;\n }", "public final int endOffset() {\n return endOffset;\n }", "public int getOffset() {\n\t\treturn this.offset;\n\t}", "public int getOffset() {\r\n\t\t\t\tint offset = pageCount * (currentPage - 1);\r\n\t\t\t\treturn offset < 0 ? 0 : offset;\r\n\t\t\t}", "public long getOffset() {\n return offset;\n }", "public int getStartOffset() {\n return startPosition.getOffset();\n }", "@Nonnegative\n @CheckReturnValue\n public int getOffset() {\n return offset;\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public Integer getBeginOffset() {\n return this.beginOffset;\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public long getOffset() {\n return this.offset;\n }", "public int getEndOffset() {\n return endOffset;\n }", "@Override\n public long getOffset() {\n return offset;\n }", "public int getOffset()\n {\n if (m_bufferOffset_ != -1) {\n if (m_isForwards_) {\n return m_FCDLimit_;\n }\n return m_FCDStart_;\n }\n return m_source_.getIndex();\n }", "public long getOffset() throws IOException {\n\t\treturn offset;\n\t}", "public static int offset_reading() {\n return (32 / 8);\n }", "public Integer getOffset();", "public long getOffset () {\n\treturn offset;\n }", "public Integer getOffset() {\n return offset;\n }", "public static int offset_seqnum() {\n return (264 / 8);\n }", "@Override\n\tpublic long getPosition()\n\t{\n\t\treturn inputStream.Position;\n\t}", "public Integer getOffset() {\n return this.offset;\n }", "public Integer getOffset() {\n return this.offset;\n }", "public int getStart() {\r\n\t\treturn this.offset;\r\n\t}", "private int getLineNumber(@NonNull String contents, int offset) {\n String preContents = contents.substring(0, offset);\n String remContents = preContents.replaceAll(\"\\n\", \"\");\n return preContents.length() - remContents.length();\n }", "private int getInclusiveTopIndexStartOffset() {\n \n \t\tif (fTextWidget != null && !fTextWidget.isDisposed()) {\n \t\t\tint top= -1;\n \t\t\tif (fSourceViewer instanceof ITextViewerExtension5) {\n \t\t\t\ttop= fTextWidget.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t\tITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;\n \t\t\t\ttop= extension.widgetLine2ModelLine(top);\n \t\t\t} else {\n \t\t\t\ttop= fSourceViewer.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t}\n \n \t\t\ttry {\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\treturn document.getLineOffset(top);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}", "public abstract long getStreamSegmentOffset();", "@Override\n public long getFilePointer() {\n return this.fileOffset + this.bufferPointer.bufferOffset;\n }", "@DISPID(-2147417104)\n @PropGet\n int offsetLeft();", "public java.lang.Long getOffset() {\n return offset;\n }", "@Override\r\n \tpublic final int getOffset() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getStartPos();\r\n \t}", "public java.lang.Long getOffset() {\n return offset;\n }", "public long getNextIFDOffset() {\n return nextIFDOffset;\n }", "public int getOffset() {\r\n\t\treturn offSet;\r\n\t}", "public long getIFDOffset() {\n return ifdOffset;\n }", "public Position getOffset() {\r\n return offset;\r\n }", "public int getStartOffset() {\n if (view != null) {\n return view.getStartOffset();\n }\n return getElement().getStartOffset();\n }", "private int getCurrentOffset(){\n\t\treturn this.OFFSET;\n\t}", "@DISPID(-2147417103)\n @PropGet\n int offsetTop();", "@Override\n\t\tpublic long getPos() throws IOException {\n\t\t\treturn 0;\n\t\t}", "public Long getOffset() {\n return this.Offset;\n }", "public Long getOffset() {\n return this.Offset;\n }", "Constant getStartOffsetConstant();", "public OptionalInt getStartOffset() {\n return startOffset >= 0 ? OptionalInt.of(startOffset) : OptionalInt.empty();\n }", "public static int offset_source() {\n return (256 / 8);\n }", "public int getStartPosition() {\n return startPosition_;\n }", "public int getOffsetInSource() {\n if (SourceDocumentInformation_Type.featOkTst\n && ((SourceDocumentInformation_Type) jcasType).casFeat_offsetInSource == null)\n this.jcasType.jcas.throwFeatMissing(\"offsetInSource\", \"org.apache.uima.examples.SourceDocumentInformation\");\n return jcasType.ll_cas.ll_getIntValue(addr,\n ((SourceDocumentInformation_Type) jcasType).casFeatCode_offsetInSource);\n }", "public int getOffset() {\n\t\treturn OFFSET_MASK & dataOffset;\n\t}", "public double getOffset() {\r\n\t\treturn offset;\r\n\t}", "public Location getOffset() {\n\t\treturn pos;\n\t}", "public int getBytePosition() {\n return bytePosition;\n }", "int getRawOffset();", "public long getOffset() {\n return cGetOffset(this.cObject);\n }", "public double getOffset() {\n return offset;\n }", "public int getProcessedDataOffset() { return 0; }", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public int getStartPosition() {\n return startPosition_;\n }", "public int getImageOffset() {\n\n\t\tif (isGated()) {\n\n\t\t\tif (isReconstruction()) {\n\n\t\t\t\t// Must have a gated reconstruction. For each gated interval\n\t\t\t\t// there is an extra 128 byte header (beginning \"adac01\") block\n\t\t\t\t// starting at the normal image offset location. Add this to the\n\t\t\t\t// offset:\n\t\t\t\treturn ADACDictionary.IM_OFFSET + getNumberOfGatedIntervals() * 128;\n\n\t\t\t} else {\n\n\t\t\t\t// Gated SPECT data set. For each azimuth there is an additional\n\t\t\t\t// 1664 byte header (beginning \"adac01\") at the normal image\n\t\t\t\t// offset location. Add this to the image offset.\n\t\t\t\treturn ADACDictionary.IM_OFFSET + getNumberOfGatedIntervals() * 1664;\n\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Non gated data - simplest case\n\t\t\treturn ADACDictionary.IM_OFFSET;\n\t\t}\n\n\t}", "public synchronized long size() {\n return IDX_START_OF_CONTENT + (slots * bytesPerSlot);\n }", "public int value() {\n\t\treturn offset;\n\t}", "@Generated\n @Selector(\"contentOffset\")\n @ByValue\n CGPoint contentOffset();", "public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }", "public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }", "long getStreamPosition() throws IOException {\n return (iis.getStreamPosition()-bufAvail);\n }", "public abstract int getRawOffset();", "public abstract int getRawOffset();", "public static int offset_infos_seq_num() {\n return (64 / 8);\n }", "public final double getOffset() {\n\t\treturn offset;\n\t}", "public FlowFileDTOBuilder setContentClaimOffset(final Long contentClaimOffset) {\n this.contentClaimOffset = contentClaimOffset;\n return this;\n }", "GlobalVariable getStartOffsetCounterVariable();", "@Override\n\tpublic int getEndOffset() {\n\t\treturn 0;\n\t}", "public long getContentFlowno() {\n return contentFlowno;\n }", "public int getWordOffset() {\n\t\treturn wordOffset;\n\t}", "double getOffset();", "public long getLastStreamSegmentOffset() {\n return getStreamSegmentOffset() + getLength();\n }" ]
[ "0.68647367", "0.6642136", "0.65903866", "0.65705085", "0.6555796", "0.6541502", "0.65170825", "0.6506138", "0.6503693", "0.6501901", "0.6490136", "0.6490136", "0.64691985", "0.64573264", "0.64466256", "0.64466256", "0.64466256", "0.6405523", "0.6399479", "0.6398279", "0.6390221", "0.638688", "0.6386022", "0.63755465", "0.6360989", "0.6356274", "0.63437855", "0.633701", "0.63333243", "0.633098", "0.6311603", "0.63015515", "0.6289887", "0.6288378", "0.6284642", "0.62547415", "0.6208193", "0.6205688", "0.61843246", "0.61777323", "0.6174915", "0.6158288", "0.61445045", "0.61366314", "0.6133083", "0.61213374", "0.6103815", "0.6103815", "0.6087732", "0.60585946", "0.6044226", "0.6040934", "0.60355926", "0.60334885", "0.6011565", "0.6011297", "0.601039", "0.5961846", "0.5947591", "0.59443974", "0.59286386", "0.592517", "0.5907932", "0.5876521", "0.58693767", "0.5867972", "0.5867972", "0.58679634", "0.5849997", "0.583858", "0.58107793", "0.58046013", "0.58040243", "0.58006907", "0.58001", "0.57971615", "0.5795527", "0.5787139", "0.5785335", "0.5783621", "0.57780665", "0.5765247", "0.57465667", "0.57448745", "0.5738978", "0.57117975", "0.57082754", "0.57082754", "0.57043225", "0.57040894", "0.57040894", "0.5692421", "0.5685021", "0.5676988", "0.56715137", "0.5661498", "0.56533676", "0.56474394", "0.5646448", "0.5642008" ]
0.7572517
0
The offset into the content claim where the flowfile's content begins.
public FlowFileDTOBuilder setContentClaimOffset(final Long contentClaimOffset) { this.contentClaimOffset = contentClaimOffset; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "public long getFileOffset();", "long getFileOffset();", "public long offset() {\n return offset;\n }", "@Override\n public long position() throws IOException {\n return _backing.getFilePointer() - _head.offset;\n }", "public int getStartOffset() {\n return startOffset;\n }", "public int getOffset() {\r\n return offset;\r\n }", "public long getCurrentOffset() {\n return (long)current_chunk * (long)chunksize;\n }", "public int getOffset() {\n return offset_;\n }", "public int getOffset() {\n return offset_;\n }", "public int getOffset() {\r\n\t\treturn offset;\r\n\t}", "public int getOffset() {\n return offset;\n }", "public int getOffset() {\n return offset;\n }", "public abstract long getStartOffset();", "public int getOffset() {\n return offset;\n }", "int getOffset();", "int getOffset();", "int getOffset();", "public int getOffset() {\r\n return this.offset;\r\n }", "public int getOffset() {\r\n\t\treturn this.offset;\r\n\t}", "public int offendingHeaderOffset()\n {\n return offset() + OFFENDING_HDR_OFFSET;\n }", "public int getOffset() \n {\n return offset;\n }", "public int startOffset();", "public int getOffset() {\n return this.offset;\n }", "public long getStartOffset() {\n return mStartOffset;\n }", "@Override\n\tpublic int getStartOffset() {\n\t\treturn 0;\n\t}", "public final int startOffset() {\n return startOffset;\n }", "public final int endOffset() {\n return endOffset;\n }", "public int getOffset() {\n\t\treturn this.offset;\n\t}", "public int getOffset() {\r\n\t\t\t\tint offset = pageCount * (currentPage - 1);\r\n\t\t\t\treturn offset < 0 ? 0 : offset;\r\n\t\t\t}", "public long getOffset() {\n return offset;\n }", "public int getStartOffset() {\n return startPosition.getOffset();\n }", "@Nonnegative\n @CheckReturnValue\n public int getOffset() {\n return offset;\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public Integer getBeginOffset() {\n return this.beginOffset;\n }", "public java.lang.Integer getOffset() {\n return offset;\n }", "public long getOffset() {\n return this.offset;\n }", "public int getEndOffset() {\n return endOffset;\n }", "@Override\n public long getOffset() {\n return offset;\n }", "public int getOffset()\n {\n if (m_bufferOffset_ != -1) {\n if (m_isForwards_) {\n return m_FCDLimit_;\n }\n return m_FCDStart_;\n }\n return m_source_.getIndex();\n }", "public long getOffset() throws IOException {\n\t\treturn offset;\n\t}", "public static int offset_reading() {\n return (32 / 8);\n }", "public Integer getOffset();", "public long getOffset () {\n\treturn offset;\n }", "public Integer getOffset() {\n return offset;\n }", "public static int offset_seqnum() {\n return (264 / 8);\n }", "@Override\n\tpublic long getPosition()\n\t{\n\t\treturn inputStream.Position;\n\t}", "public Integer getOffset() {\n return this.offset;\n }", "public Integer getOffset() {\n return this.offset;\n }", "public int getStart() {\r\n\t\treturn this.offset;\r\n\t}", "private int getLineNumber(@NonNull String contents, int offset) {\n String preContents = contents.substring(0, offset);\n String remContents = preContents.replaceAll(\"\\n\", \"\");\n return preContents.length() - remContents.length();\n }", "private int getInclusiveTopIndexStartOffset() {\n \n \t\tif (fTextWidget != null && !fTextWidget.isDisposed()) {\n \t\t\tint top= -1;\n \t\t\tif (fSourceViewer instanceof ITextViewerExtension5) {\n \t\t\t\ttop= fTextWidget.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t\tITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer;\n \t\t\t\ttop= extension.widgetLine2ModelLine(top);\n \t\t\t} else {\n \t\t\t\ttop= fSourceViewer.getTopIndex();\n \t\t\t\tif ((fTextWidget.getTopPixel() % fTextWidget.getLineHeight()) != 0)\n \t\t\t\t\ttop--;\n \t\t\t}\n \n \t\t\ttry {\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \t\t\t\treturn document.getLineOffset(top);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}", "public abstract long getStreamSegmentOffset();", "@Override\n public long getFilePointer() {\n return this.fileOffset + this.bufferPointer.bufferOffset;\n }", "@DISPID(-2147417104)\n @PropGet\n int offsetLeft();", "@Override\r\n \tpublic final int getOffset() {\r\n \t\tAssert.isTrue(hasSourceRangeInfo());\r\n \t\treturn getStartPos();\r\n \t}", "public java.lang.Long getOffset() {\n return offset;\n }", "public java.lang.Long getOffset() {\n return offset;\n }", "public long getNextIFDOffset() {\n return nextIFDOffset;\n }", "public int getOffset() {\r\n\t\treturn offSet;\r\n\t}", "public long getIFDOffset() {\n return ifdOffset;\n }", "public Position getOffset() {\r\n return offset;\r\n }", "public int getStartOffset() {\n if (view != null) {\n return view.getStartOffset();\n }\n return getElement().getStartOffset();\n }", "private int getCurrentOffset(){\n\t\treturn this.OFFSET;\n\t}", "@DISPID(-2147417103)\n @PropGet\n int offsetTop();", "@Override\n\t\tpublic long getPos() throws IOException {\n\t\t\treturn 0;\n\t\t}", "Constant getStartOffsetConstant();", "public Long getOffset() {\n return this.Offset;\n }", "public Long getOffset() {\n return this.Offset;\n }", "public OptionalInt getStartOffset() {\n return startOffset >= 0 ? OptionalInt.of(startOffset) : OptionalInt.empty();\n }", "public static int offset_source() {\n return (256 / 8);\n }", "public int getStartPosition() {\n return startPosition_;\n }", "public int getOffsetInSource() {\n if (SourceDocumentInformation_Type.featOkTst\n && ((SourceDocumentInformation_Type) jcasType).casFeat_offsetInSource == null)\n this.jcasType.jcas.throwFeatMissing(\"offsetInSource\", \"org.apache.uima.examples.SourceDocumentInformation\");\n return jcasType.ll_cas.ll_getIntValue(addr,\n ((SourceDocumentInformation_Type) jcasType).casFeatCode_offsetInSource);\n }", "public int getOffset() {\n\t\treturn OFFSET_MASK & dataOffset;\n\t}", "public double getOffset() {\r\n\t\treturn offset;\r\n\t}", "public Location getOffset() {\n\t\treturn pos;\n\t}", "public int getBytePosition() {\n return bytePosition;\n }", "int getRawOffset();", "public long getOffset() {\n return cGetOffset(this.cObject);\n }", "public double getOffset() {\n return offset;\n }", "public int getProcessedDataOffset() { return 0; }", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "public int getStartPosition() {\n return startPosition_;\n }", "public int getImageOffset() {\n\n\t\tif (isGated()) {\n\n\t\t\tif (isReconstruction()) {\n\n\t\t\t\t// Must have a gated reconstruction. For each gated interval\n\t\t\t\t// there is an extra 128 byte header (beginning \"adac01\") block\n\t\t\t\t// starting at the normal image offset location. Add this to the\n\t\t\t\t// offset:\n\t\t\t\treturn ADACDictionary.IM_OFFSET + getNumberOfGatedIntervals() * 128;\n\n\t\t\t} else {\n\n\t\t\t\t// Gated SPECT data set. For each azimuth there is an additional\n\t\t\t\t// 1664 byte header (beginning \"adac01\") at the normal image\n\t\t\t\t// offset location. Add this to the image offset.\n\t\t\t\treturn ADACDictionary.IM_OFFSET + getNumberOfGatedIntervals() * 1664;\n\n\t\t\t}\n\n\t\t} else {\n\t\t\t// Non gated data - simplest case\n\t\t\treturn ADACDictionary.IM_OFFSET;\n\t\t}\n\n\t}", "public synchronized long size() {\n return IDX_START_OF_CONTENT + (slots * bytesPerSlot);\n }", "public int value() {\n\t\treturn offset;\n\t}", "@Generated\n @Selector(\"contentOffset\")\n @ByValue\n CGPoint contentOffset();", "public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }", "public char first_message_offset_GET()\n { return (char)((char) get_bytes(data, 5, 1)); }", "public abstract int getRawOffset();", "public abstract int getRawOffset();", "long getStreamPosition() throws IOException {\n return (iis.getStreamPosition()-bufAvail);\n }", "public static int offset_infos_seq_num() {\n return (64 / 8);\n }", "public final double getOffset() {\n\t\treturn offset;\n\t}", "GlobalVariable getStartOffsetCounterVariable();", "@Override\n\tpublic int getEndOffset() {\n\t\treturn 0;\n\t}", "public long getContentFlowno() {\n return contentFlowno;\n }", "double getOffset();", "public int getWordOffset() {\n\t\treturn wordOffset;\n\t}", "public long getLastStreamSegmentOffset() {\n return getStreamSegmentOffset() + getLength();\n }" ]
[ "0.75709784", "0.68652594", "0.66428304", "0.6589907", "0.6571143", "0.65573", "0.65413475", "0.65171677", "0.6505655", "0.65034646", "0.65015805", "0.6489904", "0.6489904", "0.6470996", "0.64571", "0.64471036", "0.64471036", "0.64471036", "0.64052385", "0.63990706", "0.63988966", "0.63902634", "0.6388619", "0.63856405", "0.6376483", "0.6362912", "0.63573825", "0.6343862", "0.63365", "0.63327867", "0.63303715", "0.6312325", "0.6301333", "0.62896526", "0.6289246", "0.62843645", "0.62540257", "0.62087625", "0.6205714", "0.61837685", "0.61773324", "0.61748105", "0.61584294", "0.6144218", "0.6136226", "0.613292", "0.612106", "0.6103287", "0.6103287", "0.6088507", "0.6057794", "0.6044392", "0.6041121", "0.6035832", "0.6034396", "0.601213", "0.60108095", "0.6009611", "0.5962411", "0.59478986", "0.5944112", "0.59281194", "0.5924972", "0.5908182", "0.5876929", "0.58700097", "0.5869385", "0.58671194", "0.58671194", "0.5850921", "0.58390623", "0.58113265", "0.58040947", "0.580332", "0.5800748", "0.5799306", "0.5796972", "0.57960916", "0.57862", "0.5785413", "0.5784243", "0.5777597", "0.5765722", "0.5747268", "0.57461965", "0.57383484", "0.5711318", "0.5707699", "0.5707699", "0.5704709", "0.5704709", "0.57044345", "0.56933045", "0.56849897", "0.5673499", "0.5662482", "0.5650985", "0.5647297", "0.56465393", "0.5642413" ]
0.56763476
94
The section in which the content claim lives.
public String getContentClaimSection() { return contentClaimSection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getSection() {\n return section;\n }", "public String getSection() {\n return section;\n }", "public Section getSection() {\n return _section;\n }", "Section getSection();", "public String getSection(){\n return mSection;\n }", "String getSection() {\n\t\treturn this.mSection;\n\t}", "public String getSection(){\n return sectionsText;\n }", "public GraphSection getSection() {\r\n\t\treturn section;\r\n\t}", "public Section getSection() {\n\treturn belongedSection.clone();\n }", "public int getSectionCode() {\n return sectionCode;\n }", "public String getContentClaimContainer() {\n return contentClaimContainer;\n }", "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "@Override\n\tpublic Object[] getSections() {\n\t\treturn sections;\n\t}", "public String getSectionName() {\r\n\t\treturn this.sectionName;\r\n\t}", "public String getContentClaimIdentifier() {\n return contentClaimIdentifier;\n }", "@Override\n public Object[] getSections() {\n return null;\n }", "public String getSectionName() {\n return mSectionName;\n }", "public String getSectionName() {\n return mSectionName;\n }", "@Kroll.getProperty\n\tpublic int getSectionCount()\n\t{\n\t\treturn getSections().length;\n\t}", "@Override\n public Object[] getSections() {\n return sectionHeaders;\n }", "protected int getSectionLevel() {\n return this.headingLevel;\n }", "public String getClaimSite(){\n\t\treturn this.claimSite;\n\t}", "@Override\n\tpublic int getSectionForPosition(final int arg0) {\n\t\treturn 0;\n\t}", "public String getSectionTitle() {\n return sectionTitle;\n }", "public int getMaximumSectionNumber ( )\r\n\t{\r\n\t\tTwoDDisplayContin dis = ( TwoDDisplayContin ) listOfOtherContins.last ( );\r\n\r\n\t\treturn dis.getSectionNumber ( );\r\n\t}", "public String getPurchasesectioncode() {\n return purchasesectioncode;\n }", "public int getCont() {\n\t\tint cont = 0;\n\t\tsynchronized (store) {\n\t\t\tStorage storage = (Storage) store.getContents();\n\t\t\tif (storage != null)\n\t\t\t\tcont = storage.cont;\n\t\t}\n\t\treturn cont;\n\t}", "public String getSectionType() {\n\treturn sectionType;\n }", "String getContainmentReference();", "public CrossSectionElement getCse() {\r\n\t\treturn crossSectionElement;\r\n\t}", "public final String section() throws RecognitionException {\r\n String section = null;\r\n\r\n\r\n Token STRING39=null;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:183:5: ( SECTION STRING )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:183:7: SECTION STRING\r\n {\r\n match(input,SECTION,FOLLOW_SECTION_in_section894); \r\n\r\n STRING39=(Token)match(input,STRING,FOLLOW_STRING_in_section896); \r\n\r\n section = (STRING39!=null?STRING39.getText():null);\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return section;\r\n }", "@Override\n public Object[] getSections () {\n return alphaIndexer.getSections();\n }", "public boolean isSectionMode ()\r\n {\r\n return sectionMode;\r\n }", "public String getOwningPart() {\n return this.owningPart;\n }", "public native int getSectionCount() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\treturn jso.sectionCount;\n }-*/;", "@Override\n public String getContig() {\n return feature.getContig();\n }", "private int getIndexOfSection(TableViewSectionProxy section)\n\t{\n\t\treturn this.sections.indexOf(section);\n\t}", "public int getMinimumSectionNumber ( )\r\n\t{\r\n\t\tTwoDDisplayContin dis = ( TwoDDisplayContin ) listOfOtherContins.first ( );\r\n\r\n\t\treturn dis.getSectionNumber ( );\r\n\t}", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "@Override protected String getSection(final String param) {\n return getBrowser().getDrbdXML().getSection(param);\n }", "@Override\r\n public final @Nonnull List<Section> getSections() {\r\n return ImmutableList.copyOf(sections);\r\n }", "Section(BufferedReader in) throws IOException, ReloadFault {\n String line = in.readLine();\n // find top of section and process it\n while (line != null) {\n if (line.startsWith(JTR_V2_SECTION)) {\n title = extractSlice(line, 0, \":\", null);\n break;\n } else\n // don't know what this line is, may be empty\n {\n line = in.readLine();\n }\n }\n\n if (title == null) {\n throw new ReloadFault(i18n, \"rslt.noSectionTitle\");\n }\n\n if (title.equals(MSG_SECTION_NAME)) {\n // use standard internal copy of string\n title = MSG_SECTION_NAME;\n }\n\n while ((line = in.readLine()).startsWith(JTR_V2_SECTSTREAM)) {\n OutputBuffer b = new FixedOutputBuffer(line, in);\n buffers = DynamicArray.append(buffers, b);\n }\n\n // if not in the message section, line should have the section result\n if (!Objects.equals(title, MSG_SECTION_NAME)) {\n if (line != null) {\n if (line.startsWith(JTR_V2_SECTRESULT)) {\n result = Status.parse(line.substring(JTR_V2_SECTRESULT.length()));\n } else {\n throw new ReloadFault(i18n, \"rslt.badLine\", line);\n }\n }\n if (result == null)\n // no test result\n {\n throw new ReloadFault(i18n, \"rslt.noSectionResult\");\n }\n }\n }", "public abstract Collection<String> getSections();", "@Override\n public String getScopeContent()\n {\n\treturn scopeName;\n }", "public List<String> getSections(){\n return new ArrayList<>(Arrays.asList(lab, tutorial, discussion));\n }", "@Override\n\t\tpublic Object[] getSections()\n\t\t{\n\t\t\treturn mAlphabetIndexer.getSections();\n\t\t}", "public Composite getComposite() {\n return (Composite) _section.getClient();\n }", "public ArrayList<HashMap<String, String>> getIniContent() {\n return this.sections;\n }", "float getSectionHeaderHeight(int section);", "public String getCartSection() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(cartSection);\n\t\treturn cartSection.getText();\n\t}", "@Override\n\tpublic List<IRange> getSectionRanges() {\n\t\treturn null;\n\t}", "public Vector getSection(String sectionName)\n {\n Vector v = (Vector)sections.get(sectionName.toUpperCase());\n if (v == null)\n {\n return new Vector();\n }\n\n return v;\n }", "public String getIntroduction() {\n return introduction;\n }", "public java.lang.String getPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public IMAGE_SECTION_HEADER[] getSectionHeader() { return peFileSections; }", "@Override\n\t\tpublic int getPositionForSection(int arg0) {\n\t\t\treturn 0;\n\t\t}", "public String[] getAuthorizedSections(Section sec) {\n\t\tString[] lst = authorizedSections.get(sec);\n\t\treturn lst != null ? lst : authorizedSections.get(BROWSE_SECTION);\n\t}", "public int getSegmentReference() {\n return segmentReference;\n }", "public synchronized int getSectionCount() {\n if (sections != null) {\n return sections.length;\n } else if (PropertyArray.get(props, SECTIONS) != null) {\n return parseSectionCount(PropertyArray.get(props, SECTIONS));\n } else {\n // hum, test props are never discarded, so we have no sections\n return 0;\n }\n }", "@Override\n\tpublic Object visitSection(Section section) {\n\t\treturn null;\n\t}", "public String getCourseArea() {\n return courseArea;\n }", "@Override\n\tpublic IDataItem getSection(List<IRange> section)\n\t\t\tthrows InvalidRangeException {\n\t\treturn null;\n\t}", "public String getAcontent() {\n return acontent;\n }", "public int getSectionAlignment()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt32(relpos(Offsets.SECTION_ALIGNMENT.position));\n }", "String getDisabledBiometricsParentConsentContent();", "public JsonSectionInput getSection(Class<? extends JsonSectionInput> aClass){\n return sections.get(aClass.getName());\n }", "public Account getContinuationAccount() {\n return continuationAccount;\n }", "public ImportSectionElements getImportSectionAccess() {\r\n\t\treturn pImportSection;\r\n\t}", "public interface NonhumanSubjectDataDocumentSection extends org.eclipse.mdht.uml.cda.Section {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionTemplateId'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.templateId->exists(id : datatypes::II | id.root = \\'2.16.840.1.113883.10.20.23.14\\')'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionTemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionClassCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.classCode=vocab::ActClass::DOCSECT'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionClassCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionMoodCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.moodCode=vocab::ActMood::EVN'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionMoodCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionCodeP'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionCodeP(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and \\nlet value : datatypes::CE = self.code.oclAsType(datatypes::CE) in \\nvalue.code = \\'NHStbd\\' and value.codeSystem = \\'2.16.840.1.113883.3.26.1.1\\')'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionText'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='not self.text.oclIsUndefined()'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionText(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionTitle'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.title.oclIsUndefined() or self.title.isNullFlavorUndefined()) implies (not self.title.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionTitle(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Subject Demographics'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->one(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(sdtm::NonhumanSubjectDemographics) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanSubjectDemographics(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Disposition'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->one(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(sdtm::NonhumanDisposition) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanDisposition(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionSubject Element'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(sdtm::SubjectElement) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionSubjectElement(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Exposure'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(sdtm::NonhumanExposure) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanExposure(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionBody Weight'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::BodyWeight) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionBodyWeight(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionBody Weight Gain'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::BodyWeightGain) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionBodyWeightGain(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionClinical Observation'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::ClinicalObservation) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionClinicalObservation(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionDeath Diagnosis'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->one(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::DeathDiagnosis) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionDeathDiagnosis(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionFood and Water Consumption'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::FoodandWaterConsumption) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionFoodandWaterConsumption(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Laboratory Test Result'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::NonhumanLaboratoryTestResult) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanLaboratoryTestResult(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionMacroscopic Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::MacroscopicFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionMacroscopicFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionMicroscopic Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::MicroscopicFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionMicroscopicFindings(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionOrgan Measurement'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::OrganMeasurement) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionOrganMeasurement(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionPalpable Mass'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::PalpableMass) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionPalpableMass(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionPharmacokinetic Concentration Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::PharmacokineticConcentrationFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionPharmacokineticConcentrationFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionSubject Characteristic'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::SubjectCharacteristic) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionSubjectCharacteristic(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionTumor Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::TumorFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionTumorFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionVital Sign'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::VitalSign) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionVitalSign(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionECG Test Result'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::ECGTestResult) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionECGTestResult(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionStudy Subject Event'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::StudySubjectEvent) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionStudySubjectEvent(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionStudy Subject Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::StudySubjectFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionStudySubjectFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionStudy Subject Intervention'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(sdtm::StudySubjectIntervention) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionStudySubjectIntervention(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionComment'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::Comment) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionComment(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionPharmacokinetic Parameter Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::PharmacokineticParameterFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionPharmacokineticParameterFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Subject Demographics'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getActs()->select(act : cda::Act | not act.oclIsUndefined() and act.oclIsKindOf(sdtm::NonhumanSubjectDemographics))->asSequence()->any(true).oclAsType(sdtm::NonhumanSubjectDemographics)'\"\n\t * @generated\n\t */\n\tNonhumanSubjectDemographics getNonhumanSubjectDemographics();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Disposition'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getActs()->select(act : cda::Act | not act.oclIsUndefined() and act.oclIsKindOf(sdtm::NonhumanDisposition))->asSequence()->any(true).oclAsType(sdtm::NonhumanDisposition)'\"\n\t * @generated\n\t */\n\tNonhumanDisposition getNonhumanDisposition();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getSubject Elements'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getActs()->select(act : cda::Act | not act.oclIsUndefined() and act.oclIsKindOf(sdtm::SubjectElement)).oclAsType(sdtm::SubjectElement)'\"\n\t * @generated\n\t */\n\tEList<SubjectElement> getSubjectElements();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Exposures'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getSubstanceAdministrations()->select(substanceAdministration : cda::SubstanceAdministration | not substanceAdministration.oclIsUndefined() and substanceAdministration.oclIsKindOf(sdtm::NonhumanExposure)).oclAsType(sdtm::NonhumanExposure)'\"\n\t * @generated\n\t */\n\tEList<NonhumanExposure> getNonhumanExposures();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getBody Weights'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::BodyWeight)).oclAsType(sdtm::BodyWeight)'\"\n\t * @generated\n\t */\n\tEList<BodyWeight> getBodyWeights();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getBody Weight Gains'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::BodyWeightGain)).oclAsType(sdtm::BodyWeightGain)'\"\n\t * @generated\n\t */\n\tEList<BodyWeightGain> getBodyWeightGains();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getClinical Observations'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::ClinicalObservation)).oclAsType(sdtm::ClinicalObservation)'\"\n\t * @generated\n\t */\n\tEList<ClinicalObservation> getClinicalObservations();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getDeath Diagnosis'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::DeathDiagnosis))->asSequence()->any(true).oclAsType(sdtm::DeathDiagnosis)'\"\n\t * @generated\n\t */\n\tDeathDiagnosis getDeathDiagnosis();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getFood and Water Consumptions'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::FoodandWaterConsumption)).oclAsType(sdtm::FoodandWaterConsumption)'\"\n\t * @generated\n\t */\n\tEList<FoodandWaterConsumption> getFoodandWaterConsumptions();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Laboratory Test Results'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::NonhumanLaboratoryTestResult)).oclAsType(sdtm::NonhumanLaboratoryTestResult)'\"\n\t * @generated\n\t */\n\tEList<NonhumanLaboratoryTestResult> getNonhumanLaboratoryTestResults();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getMacroscopic Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::MacroscopicFinding)).oclAsType(sdtm::MacroscopicFinding)'\"\n\t * @generated\n\t */\n\tEList<MacroscopicFinding> getMacroscopicFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getMicroscopic Findingss'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::MicroscopicFinding)).oclAsType(sdtm::MicroscopicFinding)'\"\n\t * @generated\n\t */\n\tEList<MicroscopicFinding> getMicroscopicFindingss();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getOrgan Measurements'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::OrganMeasurement)).oclAsType(sdtm::OrganMeasurement)'\"\n\t * @generated\n\t */\n\tEList<OrganMeasurement> getOrganMeasurements();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getPalpable Masss'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::PalpableMass)).oclAsType(sdtm::PalpableMass)'\"\n\t * @generated\n\t */\n\tEList<PalpableMass> getPalpableMasss();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getPharmacokinetic Concentration Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::PharmacokineticConcentrationFinding)).oclAsType(sdtm::PharmacokineticConcentrationFinding)'\"\n\t * @generated\n\t */\n\tEList<PharmacokineticConcentrationFinding> getPharmacokineticConcentrationFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getSubject Characteristics'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::SubjectCharacteristic)).oclAsType(sdtm::SubjectCharacteristic)'\"\n\t * @generated\n\t */\n\tEList<SubjectCharacteristic> getSubjectCharacteristics();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getTumor Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::TumorFinding)).oclAsType(sdtm::TumorFinding)'\"\n\t * @generated\n\t */\n\tEList<TumorFinding> getTumorFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getVital Signs'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::VitalSign)).oclAsType(sdtm::VitalSign)'\"\n\t * @generated\n\t */\n\tEList<VitalSign> getVitalSigns();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getECG Test Results'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::ECGTestResult)).oclAsType(sdtm::ECGTestResult)'\"\n\t * @generated\n\t */\n\tEList<ECGTestResult> getECGTestResults();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getStudy Subject Events'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::StudySubjectEvent)).oclAsType(sdtm::StudySubjectEvent)'\"\n\t * @generated\n\t */\n\tEList<StudySubjectEvent> getStudySubjectEvents();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getStudy Subject Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::StudySubjectFinding)).oclAsType(sdtm::StudySubjectFinding)'\"\n\t * @generated\n\t */\n\tEList<StudySubjectFinding> getStudySubjectFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getStudy Subject Interventions'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getSubstanceAdministrations()->select(substanceAdministration : cda::SubstanceAdministration | not substanceAdministration.oclIsUndefined() and substanceAdministration.oclIsKindOf(sdtm::StudySubjectIntervention)).oclAsType(sdtm::StudySubjectIntervention)'\"\n\t * @generated\n\t */\n\tEList<StudySubjectIntervention> getStudySubjectInterventions();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::Comment)).oclAsType(sdtm::Comment)'\"\n\t * @generated\n\t */\n\tEList<Comment> getComments();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getPharmacokinetic Parameter Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::PharmacokineticParameterFinding)).oclAsType(sdtm::PharmacokineticParameterFinding)'\"\n\t * @generated\n\t */\n\tEList<PharmacokineticParameterFinding> getPharmacokineticParameterFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic NonhumanSubjectDataDocumentSection init();\n /**\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n public NonhumanSubjectDataDocumentSection init(Iterable<? extends org.eclipse.mdht.emf.runtime.util.Initializer<? extends EObject>> initializers);\n}", "public int getLeaseDocument() {\n\treturn leaseDocument;\n}", "public FlowFileDTOBuilder setContentClaimSection(final String contentClaimSection) {\n this.contentClaimSection = contentClaimSection;\n return this;\n }", "public boolean isSection(String key)\n {\n return getSection(key) != null;\n }", "public static int getSectionVacancy(String courseCode, String sectionCode) {\n return 0/*vacancy*/;\n }", "public boolean isAllowedEnterSection(String section)\r\n {\r\n Identity userIdentity = securityService.findLoggedInIdentity();\r\n if (section.equals(SECTION_PILOT)) return rolesContainRole(userIdentity, \"PILOT\");\r\n if (section.equals(SECTION_GENERAL)) return rolesContainRole(userIdentity, \"GENERAL\");\r\n if (section.equals(SECTION_ADMIN)) return rolesContainRole(userIdentity, \"ADMIN\");\r\n return false;\r\n }", "protected NodePart getHelmetMoreDetails() {\n\t\treturn instance.nodes.get(0).parts.get(0);\n\t}", "public String getContentId() {\n\n String as[] = getMimeHeader(\"Content-Id\");\n\n if (as != null && as.length > 0) {\n return as[0];\n } else {\n return null;\n }\n }", "public int getHeading()\n\t{\n\t\treturn heading;\n\t}", "public String getPartyLifecycleRequiredDocumentation() {\n return partyLifecycleRequiredDocumentation;\n }", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public String getClaimNumber(){\n\t\treturn this.claimNumber;\n\t}", "public String getLine() {\r\n\t\treturn content;\r\n\t}", "public Part getPart() {\n if ( isZombie( part ) ) {\n Part part = segment.getDefaultPart();\n getCommander().requestLockOn( part );\n return part;\n } else {\n return part;\n }\n }", "@Kroll.getProperty\n\tpublic Object[] getData()\n\t// clang-format on\n\t{\n\t\treturn this.sections.toArray();\n\t}", "@Kroll.getProperty\n\tpublic TableViewSectionProxy[] getSections()\n\t{\n\t\treturn this.sections.toArray(new TableViewSectionProxy[0]);\n\t}", "public Contentspan getContentSpan() {\n\t\treturn content;\n\t}", "public String getContentLocation() {\n\n String as[] = getMimeHeader(\"Content-Location\");\n\n if (as != null && as.length > 0) {\n return as[0];\n } else {\n return null;\n }\n }", "private RoutingInput getSectionInput() {\n\t\treturn routingInput;\n\t}", "public BlockStmt\ngetInitiationPart();", "public String getContents() {\n\t\treturn contents;\n\t}", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "private String getDemoPartitionValue() {\n return cognitoIdentityId;\n }", "public Integer getStartSoc() {\n return startSoc;\n }", "public int intValue() {\n\t\treturn getSection().intValue();\n\t}", "public String getAuthorizedArea() {\n return (String)getAttributeInternal(AUTHORIZEDAREA);\n }", "public Long getContentAreaId() {\n\t\treturn contentAreaId;\n\t}", "Section createSection();", "public Object getContent() {\n return null;\n }", "@Override\n\tpublic int getGroupCount() {\n\t\treturn sections.size();\n\t}", "public long getCas() {\n return casValue.getCas();\n }", "public abstract int getGuideExtraContent();" ]
[ "0.70080924", "0.70080924", "0.6864526", "0.67588323", "0.6599018", "0.65745467", "0.6448259", "0.62657255", "0.625863", "0.609287", "0.60128355", "0.5958962", "0.59035116", "0.5822837", "0.58091754", "0.5793695", "0.5720562", "0.5720562", "0.5641577", "0.55908597", "0.557567", "0.5569902", "0.54984546", "0.54903436", "0.5477294", "0.5471707", "0.544303", "0.5422651", "0.5410246", "0.5399725", "0.5395181", "0.5384805", "0.534878", "0.53462255", "0.5324178", "0.5308033", "0.52958655", "0.5294661", "0.52608293", "0.5256513", "0.5221524", "0.51936674", "0.5166677", "0.51639366", "0.514385", "0.51426804", "0.5137768", "0.513575", "0.5122925", "0.5121925", "0.5105927", "0.5105722", "0.5097425", "0.5095764", "0.50794363", "0.5071191", "0.50541055", "0.5044351", "0.5040314", "0.5024142", "0.50118786", "0.50075346", "0.5005065", "0.5002603", "0.50003713", "0.49998215", "0.49785346", "0.49596524", "0.49525836", "0.49485382", "0.49436986", "0.49425083", "0.49391207", "0.49282032", "0.49174333", "0.49130964", "0.49074507", "0.48971912", "0.48909575", "0.48898908", "0.488229", "0.4880601", "0.48705682", "0.48701403", "0.4865633", "0.4863004", "0.48628563", "0.48545194", "0.48535863", "0.48512232", "0.48445588", "0.48429602", "0.4842387", "0.48345864", "0.4834284", "0.4832769", "0.4832564", "0.4832094", "0.4831668", "0.48289442" ]
0.7834142
0
The section in which the content claim lives.
public FlowFileDTOBuilder setContentClaimSection(final String contentClaimSection) { this.contentClaimSection = contentClaimSection; return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getContentClaimSection() {\n return contentClaimSection;\n }", "public String getSection() {\n return section;\n }", "public String getSection() {\n return section;\n }", "public Section getSection() {\n return _section;\n }", "Section getSection();", "public String getSection(){\n return mSection;\n }", "String getSection() {\n\t\treturn this.mSection;\n\t}", "public String getSection(){\n return sectionsText;\n }", "public GraphSection getSection() {\r\n\t\treturn section;\r\n\t}", "public Section getSection() {\n\treturn belongedSection.clone();\n }", "public int getSectionCode() {\n return sectionCode;\n }", "public String getContentClaimContainer() {\n return contentClaimContainer;\n }", "public Long getContentClaimOffset() {\n return contentClaimOffset;\n }", "@Override\n\tpublic Object[] getSections() {\n\t\treturn sections;\n\t}", "public String getSectionName() {\r\n\t\treturn this.sectionName;\r\n\t}", "public String getContentClaimIdentifier() {\n return contentClaimIdentifier;\n }", "@Override\n public Object[] getSections() {\n return null;\n }", "public String getSectionName() {\n return mSectionName;\n }", "public String getSectionName() {\n return mSectionName;\n }", "@Kroll.getProperty\n\tpublic int getSectionCount()\n\t{\n\t\treturn getSections().length;\n\t}", "@Override\n public Object[] getSections() {\n return sectionHeaders;\n }", "protected int getSectionLevel() {\n return this.headingLevel;\n }", "public String getClaimSite(){\n\t\treturn this.claimSite;\n\t}", "@Override\n\tpublic int getSectionForPosition(final int arg0) {\n\t\treturn 0;\n\t}", "public String getSectionTitle() {\n return sectionTitle;\n }", "public int getMaximumSectionNumber ( )\r\n\t{\r\n\t\tTwoDDisplayContin dis = ( TwoDDisplayContin ) listOfOtherContins.last ( );\r\n\r\n\t\treturn dis.getSectionNumber ( );\r\n\t}", "public String getPurchasesectioncode() {\n return purchasesectioncode;\n }", "public int getCont() {\n\t\tint cont = 0;\n\t\tsynchronized (store) {\n\t\t\tStorage storage = (Storage) store.getContents();\n\t\t\tif (storage != null)\n\t\t\t\tcont = storage.cont;\n\t\t}\n\t\treturn cont;\n\t}", "public String getSectionType() {\n\treturn sectionType;\n }", "String getContainmentReference();", "public CrossSectionElement getCse() {\r\n\t\treturn crossSectionElement;\r\n\t}", "public final String section() throws RecognitionException {\r\n String section = null;\r\n\r\n\r\n Token STRING39=null;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:183:5: ( SECTION STRING )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:183:7: SECTION STRING\r\n {\r\n match(input,SECTION,FOLLOW_SECTION_in_section894); \r\n\r\n STRING39=(Token)match(input,STRING,FOLLOW_STRING_in_section896); \r\n\r\n section = (STRING39!=null?STRING39.getText():null);\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return section;\r\n }", "@Override\n public Object[] getSections () {\n return alphaIndexer.getSections();\n }", "public boolean isSectionMode ()\r\n {\r\n return sectionMode;\r\n }", "public String getOwningPart() {\n return this.owningPart;\n }", "public native int getSectionCount() /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\treturn jso.sectionCount;\n }-*/;", "@Override\n public String getContig() {\n return feature.getContig();\n }", "private int getIndexOfSection(TableViewSectionProxy section)\n\t{\n\t\treturn this.sections.indexOf(section);\n\t}", "public int getMinimumSectionNumber ( )\r\n\t{\r\n\t\tTwoDDisplayContin dis = ( TwoDDisplayContin ) listOfOtherContins.first ( );\r\n\r\n\t\treturn dis.getSectionNumber ( );\r\n\t}", "public String getContentClaimFileSize() {\n return contentClaimFileSize;\n }", "@Override protected String getSection(final String param) {\n return getBrowser().getDrbdXML().getSection(param);\n }", "@Override\r\n public final @Nonnull List<Section> getSections() {\r\n return ImmutableList.copyOf(sections);\r\n }", "Section(BufferedReader in) throws IOException, ReloadFault {\n String line = in.readLine();\n // find top of section and process it\n while (line != null) {\n if (line.startsWith(JTR_V2_SECTION)) {\n title = extractSlice(line, 0, \":\", null);\n break;\n } else\n // don't know what this line is, may be empty\n {\n line = in.readLine();\n }\n }\n\n if (title == null) {\n throw new ReloadFault(i18n, \"rslt.noSectionTitle\");\n }\n\n if (title.equals(MSG_SECTION_NAME)) {\n // use standard internal copy of string\n title = MSG_SECTION_NAME;\n }\n\n while ((line = in.readLine()).startsWith(JTR_V2_SECTSTREAM)) {\n OutputBuffer b = new FixedOutputBuffer(line, in);\n buffers = DynamicArray.append(buffers, b);\n }\n\n // if not in the message section, line should have the section result\n if (!Objects.equals(title, MSG_SECTION_NAME)) {\n if (line != null) {\n if (line.startsWith(JTR_V2_SECTRESULT)) {\n result = Status.parse(line.substring(JTR_V2_SECTRESULT.length()));\n } else {\n throw new ReloadFault(i18n, \"rslt.badLine\", line);\n }\n }\n if (result == null)\n // no test result\n {\n throw new ReloadFault(i18n, \"rslt.noSectionResult\");\n }\n }\n }", "public abstract Collection<String> getSections();", "@Override\n public String getScopeContent()\n {\n\treturn scopeName;\n }", "public List<String> getSections(){\n return new ArrayList<>(Arrays.asList(lab, tutorial, discussion));\n }", "@Override\n\t\tpublic Object[] getSections()\n\t\t{\n\t\t\treturn mAlphabetIndexer.getSections();\n\t\t}", "public Composite getComposite() {\n return (Composite) _section.getClient();\n }", "public ArrayList<HashMap<String, String>> getIniContent() {\n return this.sections;\n }", "float getSectionHeaderHeight(int section);", "public String getCartSection() throws InterruptedException\n\t{\n\t\tThread.sleep(2000);\n\t\twaitForVisibility(cartSection);\n\t\treturn cartSection.getText();\n\t}", "@Override\n\tpublic List<IRange> getSectionRanges() {\n\t\treturn null;\n\t}", "public Vector getSection(String sectionName)\n {\n Vector v = (Vector)sections.get(sectionName.toUpperCase());\n if (v == null)\n {\n return new Vector();\n }\n\n return v;\n }", "public java.lang.String getPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getIntroduction() {\n return introduction;\n }", "public IMAGE_SECTION_HEADER[] getSectionHeader() { return peFileSections; }", "@Override\n\t\tpublic int getPositionForSection(int arg0) {\n\t\t\treturn 0;\n\t\t}", "public String[] getAuthorizedSections(Section sec) {\n\t\tString[] lst = authorizedSections.get(sec);\n\t\treturn lst != null ? lst : authorizedSections.get(BROWSE_SECTION);\n\t}", "public int getSegmentReference() {\n return segmentReference;\n }", "public synchronized int getSectionCount() {\n if (sections != null) {\n return sections.length;\n } else if (PropertyArray.get(props, SECTIONS) != null) {\n return parseSectionCount(PropertyArray.get(props, SECTIONS));\n } else {\n // hum, test props are never discarded, so we have no sections\n return 0;\n }\n }", "@Override\n\tpublic Object visitSection(Section section) {\n\t\treturn null;\n\t}", "public String getCourseArea() {\n return courseArea;\n }", "@Override\n\tpublic IDataItem getSection(List<IRange> section)\n\t\t\tthrows InvalidRangeException {\n\t\treturn null;\n\t}", "public int getSectionAlignment()\n throws IOException, EndOfStreamException\n {\n return peFile_.readInt32(relpos(Offsets.SECTION_ALIGNMENT.position));\n }", "public String getAcontent() {\n return acontent;\n }", "String getDisabledBiometricsParentConsentContent();", "public JsonSectionInput getSection(Class<? extends JsonSectionInput> aClass){\n return sections.get(aClass.getName());\n }", "public Account getContinuationAccount() {\n return continuationAccount;\n }", "public ImportSectionElements getImportSectionAccess() {\r\n\t\treturn pImportSection;\r\n\t}", "public interface NonhumanSubjectDataDocumentSection extends org.eclipse.mdht.uml.cda.Section {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionTemplateId'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.templateId->exists(id : datatypes::II | id.root = \\'2.16.840.1.113883.10.20.23.14\\')'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionTemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionClassCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.classCode=vocab::ActClass::DOCSECT'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionClassCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionMoodCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.moodCode=vocab::ActMood::EVN'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionMoodCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionCodeP'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionCodeP(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CE) and \\nlet value : datatypes::CE = self.code.oclAsType(datatypes::CE) in \\nvalue.code = \\'NHStbd\\' and value.codeSystem = \\'2.16.840.1.113883.3.26.1.1\\')'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionText'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='not self.text.oclIsUndefined()'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionText(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionTitle'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.title.oclIsUndefined() or self.title.isNullFlavorUndefined()) implies (not self.title.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionTitle(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Subject Demographics'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->one(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(sdtm::NonhumanSubjectDemographics) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanSubjectDemographics(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Disposition'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->one(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(sdtm::NonhumanDisposition) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanDisposition(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionSubject Element'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.act.oclIsUndefined() and entry.act.oclIsKindOf(sdtm::SubjectElement) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionSubjectElement(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Exposure'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(sdtm::NonhumanExposure) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanExposure(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionBody Weight'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::BodyWeight) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionBodyWeight(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionBody Weight Gain'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::BodyWeightGain) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionBodyWeightGain(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionClinical Observation'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::ClinicalObservation) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionClinicalObservation(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionDeath Diagnosis'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->one(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::DeathDiagnosis) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionDeathDiagnosis(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionFood and Water Consumption'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::FoodandWaterConsumption) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionFoodandWaterConsumption(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionNon-human Laboratory Test Result'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::NonhumanLaboratoryTestResult) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionNonhumanLaboratoryTestResult(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionMacroscopic Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::MacroscopicFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionMacroscopicFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionMicroscopic Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::MicroscopicFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionMicroscopicFindings(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionOrgan Measurement'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::OrganMeasurement) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionOrganMeasurement(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionPalpable Mass'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::PalpableMass) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionPalpableMass(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionPharmacokinetic Concentration Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::PharmacokineticConcentrationFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionPharmacokineticConcentrationFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionSubject Characteristic'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::SubjectCharacteristic) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionSubjectCharacteristic(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionTumor Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::TumorFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionTumorFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionVital Sign'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::VitalSign) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionVitalSign(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionECG Test Result'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::ECGTestResult) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionECGTestResult(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionStudy Subject Event'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::StudySubjectEvent) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionStudySubjectEvent(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionStudy Subject Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::StudySubjectFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionStudySubjectFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionStudy Subject Intervention'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.substanceAdministration.oclIsUndefined() and entry.substanceAdministration.oclIsKindOf(sdtm::StudySubjectIntervention) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionStudySubjectIntervention(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionComment'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::Comment) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionComment(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Non-human Subject Data Document SectionPharmacokinetic Parameter Finding'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.nullFlavor <> vocab::NullFlavor::NI implies entry->exists(entry : cda::Entry | not entry.observation.oclIsUndefined() and entry.observation.oclIsKindOf(sdtm::PharmacokineticParameterFinding) and entry.typeCode = vocab::x_ActRelationshipEntry::COMP)'\"\n\t * @generated\n\t */\n\tboolean validateNonhumanSubjectDataDocumentSectionPharmacokineticParameterFinding(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Subject Demographics'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getActs()->select(act : cda::Act | not act.oclIsUndefined() and act.oclIsKindOf(sdtm::NonhumanSubjectDemographics))->asSequence()->any(true).oclAsType(sdtm::NonhumanSubjectDemographics)'\"\n\t * @generated\n\t */\n\tNonhumanSubjectDemographics getNonhumanSubjectDemographics();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Disposition'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getActs()->select(act : cda::Act | not act.oclIsUndefined() and act.oclIsKindOf(sdtm::NonhumanDisposition))->asSequence()->any(true).oclAsType(sdtm::NonhumanDisposition)'\"\n\t * @generated\n\t */\n\tNonhumanDisposition getNonhumanDisposition();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getSubject Elements'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getActs()->select(act : cda::Act | not act.oclIsUndefined() and act.oclIsKindOf(sdtm::SubjectElement)).oclAsType(sdtm::SubjectElement)'\"\n\t * @generated\n\t */\n\tEList<SubjectElement> getSubjectElements();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Exposures'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getSubstanceAdministrations()->select(substanceAdministration : cda::SubstanceAdministration | not substanceAdministration.oclIsUndefined() and substanceAdministration.oclIsKindOf(sdtm::NonhumanExposure)).oclAsType(sdtm::NonhumanExposure)'\"\n\t * @generated\n\t */\n\tEList<NonhumanExposure> getNonhumanExposures();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getBody Weights'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::BodyWeight)).oclAsType(sdtm::BodyWeight)'\"\n\t * @generated\n\t */\n\tEList<BodyWeight> getBodyWeights();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getBody Weight Gains'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::BodyWeightGain)).oclAsType(sdtm::BodyWeightGain)'\"\n\t * @generated\n\t */\n\tEList<BodyWeightGain> getBodyWeightGains();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getClinical Observations'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::ClinicalObservation)).oclAsType(sdtm::ClinicalObservation)'\"\n\t * @generated\n\t */\n\tEList<ClinicalObservation> getClinicalObservations();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getDeath Diagnosis'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::DeathDiagnosis))->asSequence()->any(true).oclAsType(sdtm::DeathDiagnosis)'\"\n\t * @generated\n\t */\n\tDeathDiagnosis getDeathDiagnosis();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getFood and Water Consumptions'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::FoodandWaterConsumption)).oclAsType(sdtm::FoodandWaterConsumption)'\"\n\t * @generated\n\t */\n\tEList<FoodandWaterConsumption> getFoodandWaterConsumptions();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getNon-human Laboratory Test Results'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::NonhumanLaboratoryTestResult)).oclAsType(sdtm::NonhumanLaboratoryTestResult)'\"\n\t * @generated\n\t */\n\tEList<NonhumanLaboratoryTestResult> getNonhumanLaboratoryTestResults();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getMacroscopic Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::MacroscopicFinding)).oclAsType(sdtm::MacroscopicFinding)'\"\n\t * @generated\n\t */\n\tEList<MacroscopicFinding> getMacroscopicFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getMicroscopic Findingss'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::MicroscopicFinding)).oclAsType(sdtm::MicroscopicFinding)'\"\n\t * @generated\n\t */\n\tEList<MicroscopicFinding> getMicroscopicFindingss();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getOrgan Measurements'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::OrganMeasurement)).oclAsType(sdtm::OrganMeasurement)'\"\n\t * @generated\n\t */\n\tEList<OrganMeasurement> getOrganMeasurements();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getPalpable Masss'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::PalpableMass)).oclAsType(sdtm::PalpableMass)'\"\n\t * @generated\n\t */\n\tEList<PalpableMass> getPalpableMasss();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getPharmacokinetic Concentration Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::PharmacokineticConcentrationFinding)).oclAsType(sdtm::PharmacokineticConcentrationFinding)'\"\n\t * @generated\n\t */\n\tEList<PharmacokineticConcentrationFinding> getPharmacokineticConcentrationFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getSubject Characteristics'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::SubjectCharacteristic)).oclAsType(sdtm::SubjectCharacteristic)'\"\n\t * @generated\n\t */\n\tEList<SubjectCharacteristic> getSubjectCharacteristics();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getTumor Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::TumorFinding)).oclAsType(sdtm::TumorFinding)'\"\n\t * @generated\n\t */\n\tEList<TumorFinding> getTumorFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getVital Signs'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::VitalSign)).oclAsType(sdtm::VitalSign)'\"\n\t * @generated\n\t */\n\tEList<VitalSign> getVitalSigns();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getECG Test Results'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::ECGTestResult)).oclAsType(sdtm::ECGTestResult)'\"\n\t * @generated\n\t */\n\tEList<ECGTestResult> getECGTestResults();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getStudy Subject Events'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::StudySubjectEvent)).oclAsType(sdtm::StudySubjectEvent)'\"\n\t * @generated\n\t */\n\tEList<StudySubjectEvent> getStudySubjectEvents();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getStudy Subject Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::StudySubjectFinding)).oclAsType(sdtm::StudySubjectFinding)'\"\n\t * @generated\n\t */\n\tEList<StudySubjectFinding> getStudySubjectFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getStudy Subject Interventions'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getSubstanceAdministrations()->select(substanceAdministration : cda::SubstanceAdministration | not substanceAdministration.oclIsUndefined() and substanceAdministration.oclIsKindOf(sdtm::StudySubjectIntervention)).oclAsType(sdtm::StudySubjectIntervention)'\"\n\t * @generated\n\t */\n\tEList<StudySubjectIntervention> getStudySubjectInterventions();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::Comment)).oclAsType(sdtm::Comment)'\"\n\t * @generated\n\t */\n\tEList<Comment> getComments();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='getPharmacokinetic Parameter Findings'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getObservations()->select(observation : cda::Observation | not observation.oclIsUndefined() and observation.oclIsKindOf(sdtm::PharmacokineticParameterFinding)).oclAsType(sdtm::PharmacokineticParameterFinding)'\"\n\t * @generated\n\t */\n\tEList<PharmacokineticParameterFinding> getPharmacokineticParameterFindings();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic NonhumanSubjectDataDocumentSection init();\n /**\n * <!-- begin-user-doc -->\n * <!-- end-user-doc -->\n * @generated\n */\n public NonhumanSubjectDataDocumentSection init(Iterable<? extends org.eclipse.mdht.emf.runtime.util.Initializer<? extends EObject>> initializers);\n}", "public int getLeaseDocument() {\n\treturn leaseDocument;\n}", "public boolean isSection(String key)\n {\n return getSection(key) != null;\n }", "public static int getSectionVacancy(String courseCode, String sectionCode) {\n return 0/*vacancy*/;\n }", "public boolean isAllowedEnterSection(String section)\r\n {\r\n Identity userIdentity = securityService.findLoggedInIdentity();\r\n if (section.equals(SECTION_PILOT)) return rolesContainRole(userIdentity, \"PILOT\");\r\n if (section.equals(SECTION_GENERAL)) return rolesContainRole(userIdentity, \"GENERAL\");\r\n if (section.equals(SECTION_ADMIN)) return rolesContainRole(userIdentity, \"ADMIN\");\r\n return false;\r\n }", "protected NodePart getHelmetMoreDetails() {\n\t\treturn instance.nodes.get(0).parts.get(0);\n\t}", "public String getContentId() {\n\n String as[] = getMimeHeader(\"Content-Id\");\n\n if (as != null && as.length > 0) {\n return as[0];\n } else {\n return null;\n }\n }", "public int getHeading()\n\t{\n\t\treturn heading;\n\t}", "public String getPartyLifecycleRequiredDocumentation() {\n return partyLifecycleRequiredDocumentation;\n }", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "public String getClaimNumber(){\n\t\treturn this.claimNumber;\n\t}", "public String getLine() {\r\n\t\treturn content;\r\n\t}", "public Part getPart() {\n if ( isZombie( part ) ) {\n Part part = segment.getDefaultPart();\n getCommander().requestLockOn( part );\n return part;\n } else {\n return part;\n }\n }", "@Kroll.getProperty\n\tpublic Object[] getData()\n\t// clang-format on\n\t{\n\t\treturn this.sections.toArray();\n\t}", "@Kroll.getProperty\n\tpublic TableViewSectionProxy[] getSections()\n\t{\n\t\treturn this.sections.toArray(new TableViewSectionProxy[0]);\n\t}", "public Contentspan getContentSpan() {\n\t\treturn content;\n\t}", "private RoutingInput getSectionInput() {\n\t\treturn routingInput;\n\t}", "public String getContentLocation() {\n\n String as[] = getMimeHeader(\"Content-Location\");\n\n if (as != null && as.length > 0) {\n return as[0];\n } else {\n return null;\n }\n }", "public BlockStmt\ngetInitiationPart();", "public String getContents() {\n\t\treturn contents;\n\t}", "public Long getContentClaimFileSizeBytes() {\n return contentClaimFileSizeBytes;\n }", "private String getDemoPartitionValue() {\n return cognitoIdentityId;\n }", "public Integer getStartSoc() {\n return startSoc;\n }", "public int intValue() {\n\t\treturn getSection().intValue();\n\t}", "public String getAuthorizedArea() {\n return (String)getAttributeInternal(AUTHORIZEDAREA);\n }", "public Long getContentAreaId() {\n\t\treturn contentAreaId;\n\t}", "@Override\n\tpublic int getGroupCount() {\n\t\treturn sections.size();\n\t}", "public long getCas() {\n return casValue.getCas();\n }", "Section createSection();", "public Object getContent() {\n return null;\n }", "public abstract int getGuideExtraContent();" ]
[ "0.7832968", "0.7010094", "0.7010094", "0.6865614", "0.676001", "0.66003615", "0.65762585", "0.64501214", "0.62679505", "0.6259106", "0.6094703", "0.6010809", "0.5958842", "0.5904077", "0.5826025", "0.58076704", "0.5794621", "0.5723703", "0.5723703", "0.56441987", "0.5591292", "0.55773324", "0.557014", "0.5501219", "0.5492787", "0.5479028", "0.54721576", "0.5443681", "0.54240775", "0.5410992", "0.5401076", "0.53965694", "0.53855675", "0.535009", "0.53474116", "0.53254384", "0.53106385", "0.5297816", "0.5297184", "0.5259874", "0.5258424", "0.52207416", "0.5191932", "0.51659656", "0.5165742", "0.51439685", "0.51438767", "0.51370615", "0.5135737", "0.5124723", "0.5123727", "0.51079094", "0.510785", "0.5098765", "0.5097832", "0.5080051", "0.50748426", "0.50526184", "0.50461614", "0.50433177", "0.5024945", "0.50134784", "0.50090784", "0.50059813", "0.50041974", "0.5000397", "0.5000386", "0.49787024", "0.49609262", "0.49504837", "0.49491972", "0.49421772", "0.49400204", "0.4928172", "0.49186587", "0.4912862", "0.490909", "0.4898373", "0.489361", "0.48899513", "0.48843017", "0.48822805", "0.4871723", "0.48705366", "0.48659134", "0.4864533", "0.48643285", "0.4856157", "0.48523927", "0.48501515", "0.4846743", "0.48453018", "0.48442388", "0.48367214", "0.48347417", "0.48336765", "0.4832214", "0.48317063", "0.48312527", "0.48289397" ]
0.49408284
72
among invoices converted/ not converted get the largest+1
public Long getInvoiceNumber(String companyId) throws EntityException { Datastore ds = null; Company cmp = null; InwardEntity invoice = null; ObjectId oid = null; Long number = null; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); Query<InwardEntity> invoiceQuery = ds.find(InwardEntity.class).filter("company",cmp).filter("isInvoice", true).order("-invoiceSerialId"); invoice = invoiceQuery .get(); if(invoice == null) number = Long.valueOf(1); else number = invoice.getInvoiceSerialId() + 1; } catch(EntityException e){ throw e; } catch(Exception e ) { throw new EntityException(500, null, e.getMessage(), null); } return number; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int maxNoteValue();", "public int getbestline() {\n\t\tint i=0;\n\t\tint biggest=0;\n\t\tint keep_track=0;\n\t\twhile(i < amount.length) {\n\t\t\tif(Faucets.amount[i] > biggest) {\n\t\t\t\tbiggest = Faucets.amount[i];\n\t\t\t\tkeep_track = i;\n\t\t\t}\n\t\t\ti+=1;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Keep_Track = \\\"\" + keep_track + \"\\\"\");\n\t\treturn keep_track;\n\t\t\n\t}", "double getArchiveMaxInt();", "public int compare(ArrayList<Object> obj1, ArrayList<Object> obj2) {\n if (obj1.get(0).equals(obj2.get(0))) {\n return (int) Math.ceil((Double) obj1.get(1) - (Double) obj2.get(1));\n }\n // higher BV first\n return (int) Math.ceil((Double) obj2.get(0) - (Double) obj1.get(0));\n }", "@Override\r\n\tpublic Integer getMaxInvSrno() {\n\t\tQStnLooseMt qStnLooseMt = QStnLooseMt.stnLooseMt;\r\n\t\tJPAQuery query = new JPAQuery(entityManager);\r\n\t\tInteger retVal = -1;\r\n\t\t\r\n\t\tCalendar date = new GregorianCalendar();\r\n\t\t\r\n\t\tList<Integer> maxSrno = query\r\n\t\t\t.from(qStnLooseMt)\r\n\t\t\t.where(qStnLooseMt.invDate.year().eq(date.get(Calendar.YEAR))).list(qStnLooseMt.srNo.max());\r\n\t\t\r\n\t\tfor (Integer srno : maxSrno) {\r\n\t\t\tretVal = (srno == null ? 0 : srno);\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\treturn retVal;\r\n\t}", "public int getconvertcounter() {\n\t\treturn convertcounter;\r\n\t}", "long buscarUltimo();", "public Long getLastConversion()\n {\n return _lastConversion;\n }", "long getMaxItemFindings();", "private <T extends Number> T computeMax(final Collection<T> inputCollection) {\n\r\n\t\tT res = null;\r\n\r\n\t\tif (!inputCollection.isEmpty())\r\n\t\t\tfor (final T t : inputCollection)\r\n\t\t\t\tif (res == null || res.longValue() < t.longValue())\r\n\t\t\t\t\tres = t;\r\n\r\n\t\treturn res;\r\n\t}", "public int getMaximumOrder() {\n\t\treturn 999;\n\t}", "public void converted() {\n conversions++;\n }", "private int getNextResNum() {\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the \"reservationNumber\" of the beanBag in the \"stockList\"\r\n // is greater than the \"nextReservationNum\" global integer.\r\n if (((BeanBag) stockList.get(i)).getReservationNumber() > nextReservationNum) {\r\n // Set the global integer \"nextReservationNum\" to the value of the current\r\n // Reservation number of the beanBag in the \"stockList\".\r\n nextReservationNum = ((BeanBag) stockList.get(i)).getReservationNumber();\r\n }\r\n }\r\n // Increment the \"nextReservationNum\" integer by 1.\r\n nextReservationNum = nextReservationNum + 1;\r\n // Return the value of the \"nextReservationNum\" integer variable.\r\n return nextReservationNum;\r\n }", "private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }", "public Contenedor getContenedorMaximo()\n {\n Contenedor maxCont = null;\n int maxPeso ;\n\n maxPeso = 0;\n\n for (Contenedor c : this.losContenedores){\n if (c.peso > maxPeso)\n {\n maxPeso = c.peso;\n maxCont = c;\n }\n }\n\n return maxCont;\n }", "@Override\n\tpublic int compare(Cabina o1, Cabina o2) {\n\t\treturn o1.getNumero()-o2.getNumero();\n\t}", "private synchronized int determineLastSaleQuantity(HashMap<String, FillMessage> fills) throws InvalidDataException {\n\t\tif (fills == null) throw new InvalidDataException(\"Fills cannot be null.\");\n\t\tArrayList<FillMessage> msgs = new ArrayList<FillMessage>(fills.values()); \n\t\t//Collections.sort(msgs);\n\t\tCollections.sort(msgs);\n\t\tCollections.reverse(msgs);\n\t\treturn msgs.get(0).getVolume();\n\t}", "private int convertToBase() {\n if (numResultsPerPage == 100) {\n return pageNumber;\n } else {\n return (pageNumber - 1) * numResultsPerPage / 100 + 1;\n }\n }", "@Override\r\n\t\t\t\t\t\t\t\t\tpublic int compare(GoodsSpecification gs1,\r\n\t\t\t\t\t\t\t\t\t\t\tGoodsSpecification gs2) {\n\t\t\t\t\t\t\t\t\t\treturn gs1.getSequence()\r\n\t\t\t\t\t\t\t\t\t\t\t\t- gs2.getSequence();\r\n\t\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\tpublic int compare(GoodsSpecification gs1,\r\n\t\t\t\t\t\t\t\t\tGoodsSpecification gs2) {\n\t\t\t\t\t\t\t\treturn gs1.getSequence() - gs2.getSequence();\r\n\t\t\t\t\t\t\t}", "@Override\r\n public int getMaxSimultanPremiumDownloadNum() {\r\n return maxPrem.get();\r\n }", "public int getCurrRuptures();", "String getMaximumRedeliveries();", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "@Override\r\n\tpublic Exchange aggregate(Exchange oldExchange, Exchange newExchange) {\n\t\tInteger oldBid=0;\r\n\t\tif(oldExchange!=null){\r\n\t\t\toldBid = oldExchange.getIn().getHeader(\"Bid\", Integer.class);\r\n\t\t}\r\n\t\tInteger newBid = newExchange.getIn().getHeader(\"Bid\", Integer.class);\r\n return (newBid > oldBid) ? newExchange : oldExchange;\r\n\t}", "public VariantType getLargestVariantType(VariantType notThis) {\n VariantType[] values = { VariantType.SNP_A, VariantType.SNP_C, VariantType.SNP_G, VariantType.SNP_T, VariantType.DELETION, VariantType.INSERTION, VariantType.OTHER };\n\n VariantType snpNuc = null;\n\n for (VariantType n : values) {\n if (n != notThis) {\n if (getCoverage(n, null) > 0 && (snpNuc == null || getCoverage(n, null) > getCoverage(snpNuc, null))){\n snpNuc = n;\n }\n }\n }\n\n return snpNuc;\n }", "@Override\n\t\tpublic int compare(Pecosa a, Pecosa b) {\n\t\t\tLong numa=a.getId().getPecnro();\n\t\t\tLong numb=b.getId().getPecnro();\n\t\t\treturn (int)(numa-numb);\n\t\t}", "int getConversionsNumber() throws SQLException;", "public int compare(ClienteQuant c1,ClienteQuant c2){\n if(c1.getUnid()>=c2.getUnid()) return -1;\n\n return 1;\n }", "@Override\r\n\t\t\t\t\t\t\tpublic int compare(GoodsSpecification gs1, GoodsSpecification gs2) {\n\t\t\t\t\t\t\t\treturn gs1.getSequence() - gs2.getSequence();\r\n\t\t\t\t\t\t\t}", "org.apache.xmlbeans.XmlDecimal xgetMaximum();", "public BigDecimal getPriceLastInv();", "org.apache.xmlbeans.XmlDecimal xgetWBMaximum();", "Integer getMaximumResults();", "private static int getMax(int[] original) {\n int max = original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] > max) max = original[i];\n }\n return max;\n }", "public static int retourneMaxNumber() {\n int tmp = 0;\n try {\n String requete = \"SELECT Max(eleve.id_el) AS Maxeleve FROM eleve\";\n ResultSet rs = Connector1.statement.executeQuery(requete);\n while (rs.next()) {\n tmp = rs.getInt(1);\n\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n return tmp;\n }", "public Number getMaximum() {\n return ((ADocument) getDocument()).max;\n }", "@Override\n //TODO lambda\n public int lastFieldLine() {\n int max = -1;\n for (int i : lineToField.keySet()) {\n if (i > max) {\n max = i;\n }\n }\n return max;\n }", "public int getHighestChromID();", "String getMax_res();", "public int getMaximun(){\n int highGrade = grades[0]; //assumi que grades[0] é a maior nota\n //faz o loop pelo array de notas\n for(int grade: grades){\n //se a nota for maior que highGrade. atribui essa nota a highGrade\n if(grade > highGrade){\n highGrade = grade; //nota mais alta\n }\n }\n \n return highGrade;\n }", "@Override\r\n\t\t\tpublic int compare(Integer a, Integer b) {\n\t\t\t\treturn -1 * a.compareTo(b);\r\n\t\t\t}", "protected int getHighestInnovation() {\n\t\treturn highest;\n\t}", "private int convertIncreasingName(int cbindex) // convertIncreasingName method start\n\t\t\t\t{\n\t\t\t\t\tswitch(cbindex)\n\t\t\t\t\t{\n\t\t\t\t\tcase 0: return 0;\n\t\t\t\t\tcase 1: return 2;\n\t\t\t\t\tcase 2: return 5;\n\t\t\t\t\tcase 3: return 7;\n\t\t\t\t\tcase 4: return 8;\n\t\t\t\t\tcase 5: return 10;\n\t\t\t\t\tcase 6: return 11;\n\t\t\t\t\tcase 7: return 13;\n\t\t\t\t\tcase 8: return 14;\n\t\t\t\t\tcase 9: return 15;\n\t\t\t\t\tcase 10: return 16;\n\t\t\t\t\tcase 11: return 17;\n\t\t\t\t\tcase 12: return 19;\n\t\t\t\t\tcase 13: return 20;\n\t\t\t\t\tcase 14: return 22;\n\t\t\t\t\tcase 15: return 24;\n\t\t\t\t\tcase 16: return 25;\n\t\t\t\t\tcase 17: return 26;\n\t\t\t\t\tcase 18: return 28;\n\t\t\t\t\tcase 19: return 30;\n\t\t\t\t\tcase 20: return 31;\n\t\t\t\t\tcase 21: return 32;\n\t\t\t\t\tcase 22: return 33;\n\t\t\t\t\tcase 23: return 38;\n\t\t\t\t\tcase 24: return 40;\n\t\t\t\t\tcase 25: return 41;\n\t\t\t\t\tcase 26: return 42;\n\t\t\t\t\tcase 27: return 43;\n\t\t\t\t\tcase 28: return 45;\n\t\t\t\t\tcase 29: return 47;\n\t\t\t\t\tcase 30: return 48;\n\t\t\t\t\tcase 31: return 50;\n\t\t\t\t\tcase 32: return 52;\n\t\t\t\t\tcase 33: return 53;\n\t\t\t\t\tcase 34: return 56;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t} // end switch\n\t\t\t\t}", "abstract public int maxDoc();", "int getValueMaxRessource(TypeRessource type);", "public BigDecimal getPriceLastOrd();", "public static JwComparator<AcUspsInternationalClaim> getSubTotalComparator()\n {\n return AcUspsInternationalClaimTools.instance.getSubTotalComparator();\n }", "private int convertDecreasingName(int cbindex) // convertDecreasingName method start\n\t\t\t\t{\n\t\t\t\t\tswitch(cbindex)\n\t\t\t\t\t{\n\t\t\t\t\tcase 0: return 0;\n\t\t\t\t\tcase 1: return 1;\n\t\t\t\t\tcase 2: return 3;\n\t\t\t\t\tcase 3: return 4;\n\t\t\t\t\tcase 4: return 6;\n\t\t\t\t\tcase 5: return 9;\n\t\t\t\t\tcase 6: return 12;\n\t\t\t\t\tcase 7: return 18;\n\t\t\t\t\tcase 8: return 21;\n\t\t\t\t\tcase 9: return 23;\n\t\t\t\t\tcase 10: return 27;\n\t\t\t\t\tcase 11: return 29;\n\t\t\t\t\tcase 12: return 34;\n\t\t\t\t\tcase 13: return 35;\n\t\t\t\t\tcase 14: return 36;\n\t\t\t\t\tcase 15: return 37;\n\t\t\t\t\tcase 16: return 39;\n\t\t\t\t\tcase 17: return 44;\n\t\t\t\t\tcase 18: return 46;\n\t\t\t\t\tcase 19: return 49;\n\t\t\t\t\tcase 20: return 51;\n\t\t\t\t\tcase 21: return 54;\n\t\t\t\t\tcase 22: return 55;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t} // end switch\n\t\t\t\t}", "public long getPropertyBalanceMax();", "final int calculateTypeConstraintMaxDiff(){\n int result=0;\n for(int i=0;i<MaximumNumberOfVerticesOfTypeZ.length;i++){\n result+=MaximumNumberOfVerticesOfTypeZ[i];\n }\n return result;\n }", "@Override\n\t\tpublic int compareTo(X o) {\n\t\t\treturn o.number - this.number; // 내림차순\n\t\t}", "E getBestIncoming();", "private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }", "public static FileAttente fileAttenteGrande(){\n \n FileAttente bonneFile = (FileAttente) Main.allListAttente.get(0);\n for(Object fileAttente : Main.allListAttente.values())\n {\n FileAttente laFile = (FileAttente) fileAttente;\n int i = bonneFile.getNombreVoiture();\n \n if(((FileAttente) fileAttente).getNombreVoiture()>bonneFile.getNombreVoiture())\n {\n bonneFile = (FileAttente) fileAttente;\n }\n } \n return bonneFile;\n \n }", "protected final int getMax() {\n\treturn(this.max);\n }", "@Override\n public int compare(Object mMailPersonItem1, Object mMailPersonItem2) {\n Conversation tem1 = (Conversation) mMailPersonItem1;\n Conversation tem2 = (Conversation) mMailPersonItem2;\n String[] array = new String[2];\n int cr = 0;\n int a = tem2.mPriority - tem1.mPriority;\n if (a != 0) {\n cr = (a > 0) ? 2 : -1;\n } else {\n //按薪水降序排列\n array[0] = ((Conversation) mMailPersonItem1).mTime;\n array[1] = ((Conversation) mMailPersonItem2).mTime;\n if (array[0].equals(array[1])) {\n cr = 0;\n }\n Arrays.sort(array);\n if (array[0].equals(((Conversation) mMailPersonItem1).mTime)) {\n cr = -2;\n } else if (array[0].equals(((Conversation) mMailPersonItem2).mTime)) {\n cr = 1;\n }\n }\n return cr;\n }", "@Override\n public int compare(Chapter t, Chapter t1) {\n //return Long.valueOf(t.getDate()).compareTo(t1.getDate());\n return Integer.valueOf(t1.getNumber()).compareTo(t.getNumber());\n }", "int getMindestvertragslaufzeit();", "private int convertIncreasingName(int cbindex) // convertIncreasingName method start\n\t\t{\n\t\t\tswitch(cbindex)\n\t\t\t{\n\t\t\tcase 0: return 0;\n\t\t\tcase 1: return 2;\n\t\t\tcase 2: return 5;\n\t\t\tcase 3: return 7;\n\t\t\tcase 4: return 8;\n\t\t\tcase 5: return 10;\n\t\t\tcase 6: return 11;\n\t\t\tcase 7: return 13;\n\t\t\tcase 8: return 14;\n\t\t\tcase 9: return 15;\n\t\t\tcase 10: return 16;\n\t\t\tcase 11: return 17;\n\t\t\tcase 12: return 19;\n\t\t\tcase 13: return 20;\n\t\t\tcase 14: return 22;\n\t\t\tcase 15: return 24;\n\t\t\tcase 16: return 25;\n\t\t\tcase 17: return 26;\n\t\t\tcase 18: return 28;\n\t\t\tcase 19: return 30;\n\t\t\tcase 20: return 31;\n\t\t\tcase 21: return 32;\n\t\t\tcase 22: return 33;\n\t\t\tcase 23: return 38;\n\t\t\tcase 24: return 40;\n\t\t\tcase 25: return 41;\n\t\t\tcase 26: return 42;\n\t\t\tcase 27: return 43;\n\t\t\tcase 28: return 45;\n\t\t\tcase 29: return 47;\n\t\t\tcase 30: return 48;\n\t\t\tcase 31: return 50;\n\t\t\tcase 32: return 52;\n\t\t\tcase 33: return 53;\n\t\t\tcase 34: return 56;\n\t\t\tdefault: return 0;\n\t\t\t} // end switch\n\t\t}", "public int maxNumber(){\n int highest = 0;\n ArrayList<String> currentFileList = null;\n for (String word : hashWords.keySet()) {\n currentFileList= hashWords.get(word);\n int currentNum = currentFileList.size();\n if (currentNum > highest) {\n highest = currentNum;\n }\n // System.out.println(\"currentFileList \" + currentFileList +\"highest num = \"+ highest );\n }\n \n return highest;\n /*for (ArrayList s : hashWords.values()){\n if (s.size() > maxSize) {\n maxSize = s.size();\n }\n }\n return maxSize;*/\n }", "public int getIntialSortedColumn()\n { \n return 0; \n }", "int getMaximum();", "@Override\n public int size() {\n if (date2 != Long.MIN_VALUE) return 2;\n if (date1 != Long.MIN_VALUE) return 1;\n return 0;\n }", "private int convertDecreasingName(int cbindex) // convertDecreasingName method start\n\t\t{\n\t\t\tswitch(cbindex)\n\t\t\t{\n\t\t\tcase 0: return 0;\n\t\t\tcase 1: return 1;\n\t\t\tcase 2: return 3;\n\t\t\tcase 3: return 4;\n\t\t\tcase 4: return 6;\n\t\t\tcase 5: return 9;\n\t\t\tcase 6: return 12;\n\t\t\tcase 7: return 18;\n\t\t\tcase 8: return 21;\n\t\t\tcase 9: return 23;\n\t\t\tcase 10: return 27;\n\t\t\tcase 11: return 29;\n\t\t\tcase 12: return 34;\n\t\t\tcase 13: return 35;\n\t\t\tcase 14: return 36;\n\t\t\tcase 15: return 37;\n\t\t\tcase 16: return 39;\n\t\t\tcase 17: return 44;\n\t\t\tcase 18: return 46;\n\t\t\tcase 19: return 49;\n\t\t\tcase 20: return 51;\n\t\t\tcase 21: return 54;\n\t\t\tcase 22: return 55;\n\t\t\tdefault: return 0;\n\t\t\t} // end switch\n\t\t}", "public String add_if_max(Olders olders) {\n\t\t\t try {\n\t\t\t\t CompareOlders comp = new CompareOlders();\n\t\t\t \tOlders olderMax = Collections.max(collectionsOlders);\n\t\t\t\t\t for(Olders op : collectionsOlders) {\n\t\t\t\t\t\t if (!collectionsOlders.contains(olders)) {\n\t\t\t\t\t\t\t if (comp.compare( olders, olderMax) > 0) {\n\t\t\t\t\t\t\t\t InsertInStream insertInStream = (st, element) -> {\n\t\t\t\t\t\t\t\t\t List<Olders> list = (List<Olders>) st.collect(Collectors.toList());\n\t\t\t\t\t\t\t\t\t list.add(element);\n\t\t\t\t\t\t\t\t\t return list.stream();\n\t\t\t\t\t\t\t\t };\n\n\t\t\t\t\t\t\t\t return \"Обьект добавлен в коллекцию\";\n\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t return \"Данный обьект не максимальный!\";\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\treturn \"Данный обьект уже существует в коллекции! Попробуйте еще раз\";\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\n\t\t\t\t }catch(ArrayStoreException e){\n\t\t\t\t\t return \"Обьект данного типа не может быть добавлен в коллекцию\";\n\t\t\t\t }\n\t\t\t\t return null;\n\t\t\t }", "private int proximo_sequencia(int atual){\n if (atual + Utils.tamanho_util_pacote > Utils.numero_max_seq) return (atual + Utils.tamanho_util_pacote) - Utils.numero_max_seq;\n else return atual + Utils.tamanho_util_pacote;\n\n }", "protected int compareNumbers(Number n1, Number n2) {\n BigDecimal bd1 = new BigDecimal(n1.toString());\n BigDecimal bd2 = new BigDecimal(n2.toString());\n return bd1.compareTo(bd2);\n }", "public int compare(IntegerLastTriple<Integer, Semester> a, IntegerLastTriple<Integer, Semester> b) {\n if(!a.type1.equals(b.type1)) return a.type1.intValue()-b.type1.intValue();\n \n return a.type2.ordinal()-b.type2.ordinal();\n }", "public String getIterationSurMax() { return (actuelIteration + 1) + \"/\" + totalIteration; }", "@Override\r\n\tpublic Integer getMaxCkno(String dhnoAndLine) {\n\t\tInteger i = (Integer) dao.getUnique(\"select max(ckno) from ZpngTp where dhno=?\", dhnoAndLine);\r\n\t\tif (i == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn i;\r\n\t}", "@Override\n\tpublic int compare(Inventariable<T> o1, Inventariable<T> o2) {\n\t\treturn o1.getCodigo()-o2.getCodigo();\n\t}", "private int getLastIDRisposte() {\n\n\t\tArrayList<Integer> risposteIdList = new ArrayList<>();\n\t\trisposteIdList.add(0);\n\t\tDB db = getDB();\t\t\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\t\n\t\tfor(Map.Entry<Long, Risposta> risposta : risposte.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta)\n\t\t\t\trisposteIdList.add(risposta.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(risposteIdList);\n\t\treturn id;\n\t}", "public int solve(String infile) {\r\n\r\n\t\ttry {\r\n\t\t\treadData(infile);\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t//A temporary object array of bids\r\n\t\tBids[] numBids = populateBids();\r\n\t\t//A temporary integer array to hold the maximum value\r\n\t\tint[] storeMaxRev = new int[numBids.length];\r\n\t\t//A temporary variable for the maximum revenue that will be updated in the main loop.\r\n\t\tint maxRev = 0;\r\n\t\t\r\n\t\t//Invokes the comparator method defined earlier\r\n\t\tLotComparator compareFinishTimes = new LotComparator();\r\n\t\tArrays.sort(numBids,compareFinishTimes);\r\n\t\t\r\n\t\t\r\n\t\t//Edge case check if the number of bids is less than 0\r\n\t\tif(numBids.length <= 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\t//Choose the first bid in the object array.\r\n\t\tstoreMaxRev[0] = numBids[0].priceOfLot;\r\n\t\t\r\n\t\t//From the second element of the object array, iterate through the array and store the price\r\n\t\t//of the element that is larger than the previous element\r\n\t\tfor(int i = 1; i < numBids.length; i++) {\r\n\t\t\tstoreMaxRev[i] = Math.max(numBids[i].priceOfLot, storeMaxRev[i - 1]);\r\n\t\t\t\r\n\t\t\t//Iterating backwards from the second last element relative to i, check if the current element is compatible.\r\n\t\t\t//A compatible bid is when the ending lot number is less than the starting lot number of the next bid.\r\n\t\t\t//If it is an compatible bid, add the price of the current bid to the previous bid and take the maximum price out of the two.\r\n\t\t\tfor(int j = i - 1; j >= 0; j--) {\r\n\t\t\t\tif(numBids[j].endLot < numBids[i].beginningLot) {\r\n\t\t\t\t\tstoreMaxRev[i] = Math.max(storeMaxRev[i], numBids[i].priceOfLot + storeMaxRev[j]);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//Once all of the bids in numBid object array is processed, we get an integer array that will contain the maximum revenue.\r\n\t\t//This loop iterates through storeMaxRev and selects the largest integer which is then set to the variable maxRev and returned as the answer\r\n\t\tfor(int priceIdx = 0; priceIdx < storeMaxRev.length; priceIdx++) {\r\n\t\t\tif(maxRev < storeMaxRev[priceIdx]) {\r\n\t\t\t\tmaxRev = storeMaxRev[priceIdx];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maxRev;\r\n\t}", "public void updateCurrentOrderNumber() {\n\n this.currentOrderNumber = orderMap.keySet()\n .stream()\n .mapToInt(n\n -> Integer.parseInt(n)).max().getAsInt();\n }", "@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2-o1;\n\t\t\t}", "private static int orderingType(){\n return ((SubjectControl.subjNumber + 3) % NUM_ORDER_TYPES) + 1;\n }", "@Override\n public int compare(Score o1, Score o2) {\n\n return o1.getSentId() - o2.getSentId();\n }", "int findGreaterNumber(ArrayList<Integer> inArrList)\r\n {\r\n//\t for(int i=0;i<inArrList.size();i++)\r\n//\t {\r\n\t\t\r\n\t//\t greaterNumbr = (ArrayList<Integer>) Collections.max(inArrList);\r\n\t // Exceed length problem:IndexOutOfBoundException.\r\n\t // Index value of Arraylist is always 0. \r\n\t int i=0;\r\n\t\t\t if(inArrList.get(i) > inArrList.get(i+1))\r\n\t\t\t {\r\n\t\t\t\t// inArrList.add(i);\r\n\t\t\t return inArrList.get(i);\r\n\t\t\t }\r\n\t\t\t else\r\n\t\t\t {\r\n\t\t\t\t return inArrList.get(i+1);\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t\r\n\t\t\r\n//\t\t }\r\n//\t System.out.println(\" \"+inArrList);\r\n//\treturn -1;\r\n\t\r\n\t \r\n }", "@Override\n\t\t\t\t\tpublic int compare(messagewrapper lhs, messagewrapper rhs) {\n\t\t\t\t\t\treturn rhs.get_id()-lhs.get_id();\n\t\t\t\t\t}", "@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2 - o1;\n\t\t\t}", "@In Integer max();", "@In Integer max();", "public int getMaxFromCurrency(String currency) {\n System.out.println(\"hej\");\n return 1;\n \n //return 1;\n }", "public int nEigenOneOrGreater(){\n if(!this.pcaDone)this.pca();\n return this.greaterThanOneLimit;\n }", "@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o2-o1;\n\t\t\t\t}", "public void biggestPalindromeNumber() {\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < palindromeNumbers.size(); i++) {\n\t\t\tfor (int j = 1; j < palindromeNumbers.size(); j++) {\n\t\t\t\tif (palindromeNumbers.get(j) > palindromeNumbers.get(i)) {\n\t\t\t\t\ttemp = palindromeNumbers.get(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Largest Palindrome : \" + temp);\n\t}", "public long bilanz() {\n long biilanz = -gesamtKosten();\n\n for (int i = 0; i < neueLinien; i++) {\n biilanz += linien[i].getGewinn();\n }\n bilanz = biilanz;\n return bilanz;\n }", "@Override\n\tpublic int compareTo(Object o) {\n\t\tDatum od=(Datum)o;\n\t\tdouble dif=size-od.size;\n\t\tif(dif != 0)\n\t\t\treturn (int)Math.signum(dif);\n\t\treturn id-od.id;\n\t}", "@Override\r\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o2-o1;\r\n\t\t\t\t}", "int getMaxRecords();", "@Override\n\tpublic int getNextOperacionDetalle() {\n\t\treturn 0;\n\t}", "private BigDecimal calcolaTotaleImportoPreDocumenti(List<PreDocumentoEntrata> preDocs) {\n\t\tBigDecimal result = BigDecimal.ZERO;\t\n\t\tfor(PreDocumentoEntrata preDoc : preDocs){\n\t\t\tresult = result.add(preDoc.getImportoNotNull());\n\t\t}\n\t\treturn result;\n\t}", "E maxVal();", "private Integer getSequence() {\r\n\t\t\tInteger seq;\r\n\t\t\tString sql = \"select MAX(vendorid)from vendorTable\";\r\n\t\t\tseq = template.queryForObject(sql, new Object[] {}, Integer.class);\r\n\t\t\treturn seq;\r\n\t\t}", "protected final int calculateInterst1(int pr){\n\t\t return pr*10*1/100;\n\t }", "public void determineOrderNumber(Order currentOrder) {\n Integer maxNumber = 0;\n try {\n List<Order> orders = dao.getOrdersByDate(date);\n for (int i = 0; i < orders.size(); i++) {\n if (orders.get(i).getOrderNumber() > maxNumber) {\n maxNumber = orders.get(i).getOrderNumber();\n }\n\n }\n currentOrder.setOrderNumber(maxNumber + 1);\n\n } catch (FlooringMasteryDaoException e) {\n currentOrder.setOrderNumber(1001);\n }\n }", "double getArchiveMinInt();", "private int postprocess() {\n // Index with highest probability\n int maxIndex = -1;\n float maxProb = 0.0f;\n for (int i = 0; i < outputArray[0].length; i++) {\n if (outputArray[0][i] > maxProb) {\n maxProb = outputArray[0][i];\n maxIndex = i;\n }\n }\n return maxIndex;\n }", "public static ArrayList<Individuo> ordInd(ArrayList<Individuo> gen){\n Individuo aux;\n ArrayList<Individuo> genaux = gen;\n for(int i=0;i<genaux.size();i++){\n for(int j=i;j<genaux.size();j++){\n if(genaux.get(i).getFenotipo() > genaux.get(j).getFenotipo()){\n aux = genaux.get(i);\n genaux.set(i, genaux.get(j));\n genaux.set(j, aux);\n }\n }\n }\n return genaux;\n }", "@Override\n\t\t\tpublic int compare(Arco o1, Arco o2) {\n\t\t\t\treturn o2.getW()-o1.getW();\n\t\t\t}" ]
[ "0.5683852", "0.5575398", "0.55673945", "0.54338396", "0.5376621", "0.5374593", "0.53466034", "0.5329695", "0.53124666", "0.530996", "0.530177", "0.5274194", "0.5252451", "0.5238729", "0.5237124", "0.52210146", "0.5203025", "0.51997423", "0.5167528", "0.51507163", "0.51403874", "0.51274085", "0.5125486", "0.51225036", "0.51196706", "0.5119276", "0.51177883", "0.5100067", "0.50960064", "0.50736064", "0.50612825", "0.50610197", "0.50544494", "0.5053624", "0.5049965", "0.5041857", "0.50361013", "0.50340796", "0.50335556", "0.5022042", "0.501551", "0.50139356", "0.5010399", "0.50098455", "0.50054", "0.49983048", "0.4993694", "0.49924985", "0.49910566", "0.49767157", "0.49756595", "0.49753743", "0.49695107", "0.49593058", "0.4958456", "0.49526", "0.49459553", "0.4945305", "0.49443853", "0.49438757", "0.49400148", "0.49343225", "0.4932602", "0.49227804", "0.49186528", "0.49165365", "0.4914762", "0.4913762", "0.4902274", "0.49005577", "0.48929507", "0.48883083", "0.48853776", "0.48847592", "0.48838997", "0.4883642", "0.48782322", "0.48712623", "0.4869823", "0.48660022", "0.48653486", "0.48631603", "0.48631603", "0.48604318", "0.48567003", "0.4856549", "0.48557934", "0.48557785", "0.48543102", "0.48538762", "0.48528934", "0.48519337", "0.48513705", "0.48501068", "0.48448244", "0.48429143", "0.48417443", "0.48398677", "0.48328236", "0.48292154", "0.482549" ]
0.0
-1
fetch relevant estimate and make changes to it
public InwardEntity createEstimateInvoice(InwardEntity invoice, String companyId, String newcustomerId) throws EntityException { Datastore ds = null; Company cmp = null; BusinessPlayers customer = null; Products prod = null; Tax tax = null; Key<InwardEntity> key = null; ObjectId oid = null; ObjectId customerOid = null; ObjectId prodOid = null; ObjectId taxOid = null; InwardEntity estimate = null; InwardEntity existingInvoice = null; boolean customerChange = false; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); // check if estimate exists Query<InwardEntity> equery = ds.find(InwardEntity.class).filter("company",cmp).filter("isEstimate", true).filter("isInvoice", false).field("estimateNumber").equal(invoice.getEstimateNumber()); estimate = equery.get(); if(estimate == null) throw new EntityException(512, "estimate not found", null, null); //check if customer changed, if yes then see if he exists if(!(estimate.getCustomer().getId().toString().equals(newcustomerId))) { customerChange = true; customerOid = new ObjectId(newcustomerId); Query<BusinessPlayers> bpquery = ds.createQuery(BusinessPlayers.class).field("company").equal(cmp).field("id").equal(customerOid).field("isCustomer").equal(true).field("isDeleted").equal(false); customer = bpquery.get(); if(customer == null) throw new EntityException(513, "customer not found", null, null); } //check if invoice with this serial number exists equery = ds.createQuery(InwardEntity.class).filter("company",cmp).field("isInvoice").equal(true).field("invoiceSerialId").equal(invoice.getInvoiceSerialId()); existingInvoice = equery.get(); if(existingInvoice != null) throw new EntityException(514, "invoice number found", null, null); //collect new invoice details - can have deleted entries (2 queries per product) List<OrderDetails> invoiceDetails = invoice.getInvoiceDetails(); for(OrderDetails detail : invoiceDetails) { if(detail.getTax().getId() != null && detail.getTax().isDeleted() == false) { taxOid = new ObjectId(detail.getTax().getId().toString()); Query<Tax> taxquery = ds.createQuery(Tax.class).field("company").equal(cmp).field("id").equal(taxOid).field("isDeleted").equal(false); tax = taxquery.get(); if(tax == null) throw new EntityException(513, "tax not found", null, null); //has been deleted in due course } //check tax exists, if deleted if(detail.getTax().getId() != null && detail.getTax().isDeleted() == true) { taxOid = new ObjectId(detail.getTax().getId().toString()); Query<Tax> taxquery = ds.createQuery(Tax.class).field("company").equal(cmp).field("id").equal(taxOid).field("isDeleted").equal(true); tax = taxquery.get(); if(tax == null) throw new EntityException(513, "tax not found", null, null); //tax doesn't exists / may not be deleted } if(detail.getProduct().isDeleted() == false) //product cant be null { prodOid = new ObjectId(detail.getProduct().getId().toString()); Query<Products> prodquery = ds.createQuery(Products.class).field("company").equal(cmp).field("id").equal(prodOid).field("isDeleted").equal(false); prod = prodquery.get(); if(prod == null) throw new EntityException(514, "product not found", null, null); //has been deleted in due course } if(detail.getProduct().isDeleted() == true) { prodOid = new ObjectId(detail.getProduct().getId().toString()); Query<Products> prodquery = ds.createQuery(Products.class).field("company").equal(cmp).field("id").equal(prodOid).field("isDeleted").equal(true); prod = prodquery.get(); if(prod == null) throw new EntityException(514, "product not found", null, null); //product doesn't exists / may not be deleted } //each pod needs Id detail.setId(new ObjectId()); detail.setTax(tax); detail.setProduct(prod); tax = null; taxOid = null; prod = null; prodOid = null; } estimate.setisInvoice(true); if(customerChange == true) estimate.setCustomer(customer); estimate.setInvoiceNumber(invoice.getInvoiceNumber()); estimate.setInvoiceDate(invoice.getInvoiceDate()); estimate.setInvoiceDueinterval(invoice.getInvoiceDueinterval()); estimate.setInvoiceDuedate(invoice.getInvoiceDuedate()); estimate.setInvoiceSubtotal(invoice.getInvoiceSubtotal()); estimate.setInvoiceTaxtotal(invoice.getInvoiceTaxtotal()); estimate.setInvoiceGrandtotal(invoice.getInvoiceGrandtotal()); estimate.setisInvoicedeleted(false); estimate.setInvoiceDetails(invoiceDetails); estimate.setInvoiceSerialId(invoice.getInvoiceSerialId()); estimate.setInvoiceNotes(invoice.getInvoiceNotes()); java.math.BigDecimal invoiceAdvance = estimate.getEstimateAdvancetotal(); estimate.setInvoiceAdvancetotal(invoiceAdvance); estimate.setInvoiceBalance(invoice.getInvoiceGrandtotal().subtract(invoiceAdvance)); key = ds.merge(estimate); if(key == null) throw new EntityException(515, "could not update", null, null); } catch(EntityException e) { throw e; } catch(Exception e) { throw new EntityException(500, null , e.getMessage(), null); } return estimate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double updateEstimates(long sleep) {\r\n \t\t// Prune datasets\r\n \t\twhile (startupTimeHistory.size() > poolConfig.averageCount) {\r\n \t\t\tstartupTimeHistory.remove(0);\r\n \t\t}\r\n \t\twhile (requestTimeHistory.size() > poolConfig.averageCount) {\r\n \t\t\trequestTimeHistory.remove(0);\r\n \t\t}\r\n \r\n \t\t// Do estimates\r\n \t\tlong totalTime = 0;\r\n \t\tfor (long t : startupTimeHistory) {\r\n \t\t\ttotalTime += t;\r\n \t\t}\r\n \t\tstartupTimeEstimate = totalTime / startupTimeHistory.size();\r\n \r\n \t\t// Math.max(..., 1) to avoid divide by zeros.\r\n \t\tdemandEstimate = requestTimeHistory.size()\r\n \t\t\t\t/ Math.max(System.currentTimeMillis() - requestTimeHistory.get(0), 1.0);\r\n \r\n \t\t// Guestimate demand for N\r\n \t\tdouble estimate = demandEstimate * poolConfig.safetyMultiplier * sleep;\r\n \t\treturn Math.min(Math.max(estimate, poolConfig.poolMin), poolConfig.poolMax);\r\n \t}", "void setNewEstimates(double[] estimates);", "public ChangeStoryEstimate(Story story, Integer newEstimate)\n {\n this.story = story;\n this.newEstimate = newEstimate;\n this.oldEstimate = story.getEstimate();\n this.ready = story.getReadiness();\n }", "private void update(IApproximator approx) {\r\n approx.update(param, value, measured);\r\n }", "double setEstimatedCost(double cost);", "@Override\n public void redo()\n {\n story.setEstimate(newEstimate);\n }", "public EstimateIncome(){\n\t\tcalculateSlopesAndIntercepts();\n\t}", "public String getEstimate() {\n\t\treturn estimate;\n\t}", "private void updateGoldMineEstimate() {\n\t\tint x = currentState.getXExtent() - PEASANT_RANGE;\n\t int y = PEASANT_RANGE;\n\t\tfor (int range = 1; range < Math.max(currentState.getXExtent(), currentState.getYExtent()); range++) {\n\t\t\tfor (int i = x - range; i <= x + range; i++) {\n\t\t\t\tfor (int j = y - range; j <= y + range; j++) {\n\t\t\t\t\tif (currentState.inBounds(i, j) && !board.getSeen(i, j)) {\n\t\t\t\t\t\testGoldMineLocation = new Pair<Integer, Integer>(i, j);\n\t\t\t\t\t\tSystem.out.printf(\"New gold mine estimate at %d,%d\\n\", estGoldMineLocation.getX(), estGoldMineLocation.getY());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract MetricTransformation2D estimate() throws LockedException,\n NotReadyException, RobustEstimatorException;", "public abstract Quadric estimate() throws LockedException, \n NotReadyException, RobustEstimatorException;", "void updateInterest() {\n // FIXME: Currently unimplemented\n }", "abstract int estimationParameter1();", "private void learn() {\n\t\tupdateValues();\n\t\tif(CFG.isUpdatedPerformanceHistory()){\n\t\t\tupdateHistory();\n\t\t}\n\t\tif(CFG.isEvaluated()) evaluate();\n\t}", "public void handle(UpdateEstimate c) throws Exception {\n try {\n Estimate estimate = this._handleUpdateInvoice(c.updateInvoiceProto);\n if (estimate != null) {\n// if (c.isCommittable()) {\n// HibernateUtils.commitTransaction(trx);\n// }\n c.setObject(estimate);\n }\n } catch (Exception ex) {\n\n throw ex;\n\n\n }\n }", "com.google.wireless.android.sdk.stats.PercentileEstimator getEstimator();", "@Override\n\tpublic void calculate(systemSelection selection) {\n\t\t\n\t\t// Get selection parameters\n\t\tVector<String> viewers = selection.getSelectedViewers();\n\t\t\t\t\n\t\t// Create Result Object\n\t\tResultObject result = new ResultObject();\n\t\t\n\t\t// Create viewers (stored in this.viewers)\n\t\tthis.setViewers(viewers);\n\t\t\t\t\n\t\t// Set Analysis Name\n\t\tresult.setName(selection.getSelectedAnalysis());\n\t\t\t\t\n\t\tfor (ConcreteViewer viewer : this.viewers) {\n\t\t\tresult.attach(viewer);\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t// Package data from World Bank API\n\t\t\n\t\t// Our reader\n\t\tDataReader dr = new DataReader(selection);\n\t\t\t\t\n\t\t// Retrieve cost of education\n\t\tDataObject educationCost = dr.getData(\"SE.XPD.TOTL.GD.ZS\");\n\t\tArrayList<Double> educationCostData = educationCost.getData();\n\t\t\t\t\n\t\t// Retrieve cost of healthcare\n\t\tDataObject healthCost = dr.getData(\"SH.XPD.CHEX.GD.ZS\");\n\t\tArrayList<Double> healthCostData = healthCost.getData();\n\t\t\t\t\t\n\t\t//new ArrayList holds values of the calculation\n\t\tArrayList<Double> ratioEducationHealth = new ArrayList<Double>();\n\t\t\t\t\n\t\t//perform calculation\n\t\tint maxIndex = selection.getSelectedYears()[1] - selection.getSelectedYears()[0];\n\t\tboolean allZero = true;\n\t\tfor(int i=0;i<=maxIndex;i++) {\n\t\t\tdouble ratio = educationCostData.get(i)/healthCostData.get(i);\n\t\t\tratioEducationHealth.add(ratio);\n\t\t\t\n\t\t\tif(ratio!=0 && Double.isNaN(ratio)==false) {\n\t\t\t\tallZero = false;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\tif(!allZero) {\n\t\t\t\t\n\t\t\tArrayList<ArrayList<Double>> dataList = new ArrayList<ArrayList<Double>>();\n\t\t\tdataList.add(ratioEducationHealth);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\n\t\t\t// Set Analysis Name\n\t\t\tresult.setName(selection.getSelectedAnalysis());\n\t\t\t\t\t\n\t\t\t// Set years\n\t\t\tresult.setYears(selection.getSelectedYears());\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\tArrayList<String> dataNames = new ArrayList<String>();\n\t\t\tdataNames.add(\"Ratio of Government expenditure on education \"\n\t\t\t\t\t\t\t+ \"vs Current health expenditure\");\n\t\t\t\t\t\n\t\t\tresult.setDataNames(dataNames);\n\t\t\t\n\t\t\t// Set Panel that viewers will belong to\n\t\t\tSystem.out.println(\"Setting Viewer Panel\");\n\t\t\tresult.setPanel(this.viewerPanel);\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"Sending Data to Result Object.\");\n\t\t\tSystem.out.println(dataList);\n\t\t\tresult.setResult(dataList);\n\t\t\ttry {\n\t\t\t\tMainUI.getInstance().errorLabel.setText(\"\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tMainUI.getInstance().errorLabel.setText(\"All data is 0!\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void prediction() {\n\t\txPriorEstimate = xPreviousEstimate;\n\t\tpPriorCovarianceError = pPreviousCovarianceError;\n\t}", "public void updateInterest(){\n //Caculate when all fields are available\n String amountStr = amountInput.getText().toString();\n String yieldStr = annualizedYieldInput.getText().toString();\n String bankStr = bankInput.getText().toString();\n\n if (mStartDate!=null && mEndDate!=null\n && !Utils.isNullOrEmpty(amountStr)\n && !Utils.isNullOrEmpty(yieldStr)\n && !Utils.isNullOrEmpty(bankStr)){\n\n float days = Utils.getDiffDays(mStartDate,mEndDate);\n mAmount = Float.valueOf(amountStr);\n mYield = Float.valueOf(yieldStr);\n\n //Caculate the value\n mInterest = mAmount * (mYield/100)*(days/ Constants.DAYS_OF_ONE_YEAR);\n mInterest = Utils.roundFloat(mInterest);\n //Update the interest in UI\n expectedInterestInput.setText(Utils.formatFloat(mInterest));\n Log.d(Constants.LOG_TAG, \"start = \" + mStartDate.toString() + \"\\nend = \" + mEndDate.toString()\n + \"\\ndays = \" + days + \"\\namount = \" + mAmount + \"\\nyield = \" + mYield + \"\\ninterest = \" + mInterest);\n }\n }", "@Override\n public void estimate() throws RadioSourceEstimationException, NotReadyException,\n LockedException {\n if (isLocked()) {\n throw new LockedException();\n }\n if (!isReady()) {\n throw new NotReadyException();\n }\n\n try {\n mLocked = true;\n\n if (mListener != null) {\n mListener.onEstimateStart(this);\n }\n\n createInnerEstimatorsIfNeeded();\n\n final List<RangingReadingLocated<S, P>> rangingReadings = new ArrayList<>();\n final List<RssiReadingLocated<S, P>> rssiReadings = new ArrayList<>();\n for (final ReadingLocated<P> reading : mReadings) {\n if (reading instanceof RangingReadingLocated) {\n rangingReadings.add((RangingReadingLocated<S, P>) reading);\n\n } else if (reading instanceof RssiReadingLocated) {\n rssiReadings.add((RssiReadingLocated<S, P>) reading);\n\n } else if (reading instanceof RangingAndRssiReadingLocated) {\n rangingReadings.add(createRangingReading(\n (RangingAndRssiReadingLocated<S, P>) reading));\n rssiReadings.add(createRssiReading(\n (RangingAndRssiReadingLocated<S, P>) reading));\n }\n }\n\n //estimate position using ranging data, if possible\n P estimatedPosition = null;\n if (!mRssiPositionEnabled) {\n mRangingInnerEstimator.setUseReadingPositionCovariances(\n mUseReadingPositionCovariances);\n mRangingInnerEstimator.setHomogeneousLinearSolverUsed(\n mUseHomogeneousRangingLinearSolver);\n mRangingInnerEstimator.setReadings(rangingReadings);\n mRangingInnerEstimator.setInitialPosition(mInitialPosition);\n\n mRangingInnerEstimator.estimate();\n\n mEstimatedPositionCoordinates =\n mRangingInnerEstimator.getEstimatedPositionCoordinates();\n mEstimatedPositionCovariance =\n mRangingInnerEstimator.getEstimatedPositionCovariance();\n estimatedPosition = mRangingInnerEstimator.getEstimatedPosition();\n }\n\n //estimate transmitted power and/or pathloss if enabled\n if (mTransmittedPowerEstimationEnabled || mPathLossEstimationEnabled || mRssiPositionEnabled) {\n mRssiInnerEstimator.setPositionEstimationEnabled(mRssiPositionEnabled);\n mRssiInnerEstimator.setInitialPosition(estimatedPosition);\n\n mRssiInnerEstimator.setTransmittedPowerEstimationEnabled(\n mTransmittedPowerEstimationEnabled);\n mRssiInnerEstimator.setInitialTransmittedPowerdBm(\n mInitialTransmittedPowerdBm);\n\n mRssiInnerEstimator.setPathLossEstimationEnabled(\n mPathLossEstimationEnabled);\n mRssiInnerEstimator.setInitialPathLossExponent(\n mInitialPathLossExponent);\n\n mRssiInnerEstimator.setReadings(rssiReadings);\n\n mRssiInnerEstimator.estimate();\n\n if (mRssiPositionEnabled) {\n mEstimatedPositionCoordinates =\n mRssiInnerEstimator.getEstimatedPositionCoordinates();\n mEstimatedPositionCovariance =\n mRssiInnerEstimator.getEstimatedPositionCovariance();\n }\n\n if (mTransmittedPowerEstimationEnabled) {\n //transmitted power estimation enabled\n mEstimatedTransmittedPowerdBm =\n mRssiInnerEstimator.getEstimatedTransmittedPowerdBm();\n mEstimatedTransmittedPowerVariance =\n mRssiInnerEstimator.getEstimatedTransmittedPowerVariance();\n } else {\n //transmitted power estimation disabled\n mEstimatedTransmittedPowerdBm = mInitialTransmittedPowerdBm;\n mEstimatedTransmittedPowerVariance = null;\n }\n\n if (mPathLossEstimationEnabled) {\n //pathloss exponent estimation enabled\n mEstimatedPathLossExponent =\n mRssiInnerEstimator.getEstimatedPathLossExponent();\n mEstimatedPathLossExponentVariance =\n mRssiInnerEstimator.getEstimatedPathLossExponentVariance();\n } else {\n //pathloss exponent estimation disabled\n mEstimatedPathLossExponent = mInitialPathLossExponent;\n mEstimatedPathLossExponentVariance = null;\n }\n\n //build covariance matrix\n if (mRssiPositionEnabled) {\n //if only RSSI estimation is done, we use directly the available estimated covariance\n mEstimatedCovariance = mRssiInnerEstimator.getEstimatedCovariance();\n\n } else {\n //if both ranging and RSSI data is used, we build covariance matrix by setting\n //position covariance estimated by ranging estimator into top-left corner, and then\n //adding covariance terms related to pathloss exponent and transmitted power\n final Matrix rssiCov = mRssiInnerEstimator.getEstimatedCovariance();\n if (mEstimatedPositionCovariance != null && rssiCov != null) {\n final int dims = getNumberOfDimensions();\n int n = dims;\n if (mTransmittedPowerEstimationEnabled) {\n n++;\n }\n if (mPathLossEstimationEnabled) {\n n++;\n }\n\n final int dimsMinus1 = dims - 1;\n final int nMinus1 = n - 1;\n mEstimatedCovariance = new Matrix(n, n);\n mEstimatedCovariance.setSubmatrix(0, 0,\n dimsMinus1, dimsMinus1,\n mEstimatedPositionCovariance);\n mEstimatedCovariance.setSubmatrix(dims, dims,\n nMinus1, nMinus1, rssiCov);\n } else {\n mEstimatedCovariance = null;\n }\n }\n\n } else {\n mEstimatedCovariance = mEstimatedPositionCovariance;\n mEstimatedTransmittedPowerdBm = mInitialTransmittedPowerdBm;\n mEstimatedTransmittedPowerVariance = null;\n\n mEstimatedPathLossExponent = mInitialPathLossExponent;\n mEstimatedPathLossExponentVariance = null;\n }\n\n if (mListener != null) {\n mListener.onEstimateEnd(this);\n }\n\n } catch (final AlgebraException e) {\n throw new RadioSourceEstimationException(e);\n } finally {\n mLocked = false;\n }\n }", "@Override\r\n\tpublic void update(Interest model, InterestEntity entity) {\n\r\n\t}", "private void updateActualAndDisplayedResult() {\n\t\tresultTipValue = calculateTip( amountValue, percentValue, splitValue);\n\t\ttvResult.setText( \"Tip: $\" + String.format(\"%.2f\", resultTipValue) + \" per person.\" );\t\n\t}", "void recompute () {\n current_part.t_Cl = current_part.t_Cd = current_part.t_Cm = null;\n computeFlowAndRegenPlot();\n }", "public void updateFitness ( ) {\n\n KozaFitness f = ((KozaFitness)program.fitness);\n\n f.setStandardizedFitness(param.Parameters.STATE, this.fit);\n\n }", "private void getCostAndEta() {\n\n GetVehiclesData vehiclesData = RetrofitClientInstance.getRetrofitInstance().create(GetVehiclesData.class);\n getVehicles.getVehiclesData(vehiclesData);\n setCostToLabel(getVehicles.getCost());\n setETAToLabel(getVehicles.getETA());\n\n }", "public void recalc() {\n\t\tMapping mapping = getConsumerProductMatrix();\n\t\tif (mapping == null) {\n\t\t\treturn; // there is nobody to calculate recommendation for\n\t\t}\n\t\tSparseMatrix<Float64> Ct = makeC(mapping.matrix).transpose();\n\t\tSparseMatrix<Float64> B = makeB(mapping.matrix);\n\t\tSparseMatrix<Float64> CR0 = makeCR0(mapping.matrix.getNumberOfRows());\n\n\t\tSparseMatrix<Float64> PR = null;\n\t\tSparseMatrix<Float64> CR = CR0;\n\n\t\tint iterations =\n\t\t\tConfigService.CONFIG_SERVICE.getConfig(\n\t\t\t\tServerConfigKey.RECOMMENDATION_ITERATIONS).get();\n\t\tfor (int i = 0; i < iterations; i++) {\n\t\t\tPR = CR.times(B);\n\t\t\tCR = PR.times(Ct).plus(CR0);\n\t\t}\n\n\t\tsaveRecommendations(mapping, PR);\n\t}", "public int getEstimation(Tile<T> current, Tile<T> target);", "public abstract List<Double> updatePopulations();", "private void updatePriceStats(double newPrice) {\n this.currentPrice = newPrice;\n this.currentAvgPrice = Double.parseDouble(decimalFormat.format(computeSMA(newPrice, currentAvgPrice, priceHistory)));\n this.priceChangePCT = Double.parseDouble(decimalFormat.format(computeDifferentialPCT(newPrice, currentAvgPrice)));\n }", "public void setNewPrediction()\n\t{\n\t\tfor (int i=0;i<NUM_GOODS;i++)\n\t\t{\n\t\t\tfor (int j=0;j<VALUE_UPPER_BOUND+1;j++)\n\t\t\t{\n\t\t\t\tcumulPrediction[i][j] = 0;\n\t\t\t\t//System.out.println(pricePrediction[i][j]);\n\t\t\t\tprevPrediction[i][j] = pricePrediction[i][j];\n\t\t\t\t// 0.1 corresponds infestismal amount mentioned in the paper.\n\t\t\t\tpricePrediction[i][j] = priceObservation[i][j] + 0.1;\n\t\t\t\tcumulPrediction[i][j] += pricePrediction[i][j];\n\t\t\t\tif (j>0)\n\t\t\t\t{\n\t\t\t\t\tcumulPrediction[i][j] += cumulPrediction[i][j-1];\n\t\t\t\t}\n\t\t\t\tpriceObservation[i][j] = 0; \n\t\t\t}\n\t\t}\n\t\tthis.observationCount = 0;\n\t\tthis.isPricePredicting = true;\n\t\t//buildCumulativeDist();\n\t}", "public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}", "ShipmentCostEstimate createShipmentCostEstimate();", "public void applyInterest()\n {\n deposit( (getBalance()* getInterestRate()) /12);\n }", "@Override\r\n public void updateModel(Bid opponentBid, double time) {\r\n if (negotiationSession.getOpponentBidHistory().size() < 2) {\r\n return;\r\n }\r\n int numberOfUnchanged = 0;\r\n // get the current bid of the opponent\r\n BidDetails oppBid = negotiationSession.getOpponentBidHistory().getHistory()\r\n .get(negotiationSession.getOpponentBidHistory().size() - 1);\r\n // get the previous bid of the opponent\r\n BidDetails prevOppBid = negotiationSession.getOpponentBidHistory().getHistory()\r\n .get(negotiationSession.getOpponentBidHistory().size() - 2);\r\n HashMap<Integer, Integer> diffSet = determineDifference(prevOppBid, oppBid);\r\n\r\n // count the number of unchanged issues in value\r\n for (Integer i : diffSet.keySet()) {\r\n if (diffSet.get(i) == 0)\r\n numberOfUnchanged++;\r\n }\r\n\r\n // This is the value to be added to weights of unchanged issues before normalization.\r\n // Also the value that is taken as the minimum possible weight,\r\n // (therefore defining the maximum possible also).\r\n double goldenValue = learnCoef / (double) amountOfIssues;\r\n // The total sum of weights before normalization.\r\n double totalSum = 1D + goldenValue * (double) numberOfUnchanged;\r\n // The maximum possible weight\r\n double maximumWeight = 1D - ((double) amountOfIssues) * goldenValue / totalSum;\r\n\r\n // re-weighing issues while making sure that the sum remains 1\r\n for (Integer i : diffSet.keySet()) {\r\n if (diffSet.get(i) == 0 && opponentUtilitySpace.getWeight(i) < maximumWeight)\r\n opponentUtilitySpace.setWeight(opponentUtilitySpace.getDomain().getObjectives().get(i),\r\n (opponentUtilitySpace.getWeight(i) + goldenValue) / totalSum);\r\n else\r\n opponentUtilitySpace.setWeight(opponentUtilitySpace.getDomain().getObjectives().get(i),\r\n opponentUtilitySpace.getWeight(i) / totalSum);\r\n }\r\n\r\n // Then for each issue value that has been offered last time, a constant\r\n // value is added to its corresponding ValueDiscrete.\r\n try {\r\n for (Entry<Objective, Evaluator> e : opponentUtilitySpace.getEvaluators()) {\r\n // cast issue to discrete and retrieve value. Next, add constant\r\n // learnValueAddition to the current preference of the value to\r\n // make it more important\r\n ((EvaluatorDiscrete) e.getValue()).setEvaluation(\r\n oppBid.getBid().getValue(((IssueDiscrete) e.getKey()).getNumber()),\r\n (learnValueAddition + ((EvaluatorDiscrete) e.getValue()).getEvaluationNotNormalized(\r\n ((ValueDiscrete) oppBid.getBid().getValue(((IssueDiscrete) e.getKey()).getNumber())))));\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }", "public abstract void recalc();", "public double get(RatingMatrixEntry pref) {\n return estimates[pref.getIndex()];\n }", "public void setMontoCatalogoEstimado(double param){\n \n this.localMontoCatalogoEstimado=param;\n \n\n }", "public int getEstValue(){\r\n return this.estValue;\r\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testScoreUpdate() {\n try {\n final BestEvalScore score = new BestEvalScore(\"thjtrfwaw\");\n double expected = 0;\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n final Evaluation eval = new Evaluation(2);\n eval.eval(0,1);\n eval.eval(1,1);\n\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(0,1);\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n eval.eval(1,1);\n eval.eval(1,1);\n expected = eval.accuracy();\n score.accept(eval);\n assertEquals(\"Incorrect score!\", expected , score.get(), 1e-10);\n\n\n\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to create instance!\", e);\n }\n\n\n }", "void compute() {\n\n if (random.nextBoolean()) {\n value = value + random.nextInt(variation);\n ask = value + random.nextInt(variation / 2);\n bid = value + random.nextInt(variation / 2);\n } else {\n value = value - random.nextInt(variation);\n ask = value - random.nextInt(variation / 2);\n bid = value - random.nextInt(variation / 2);\n }\n\n if (value <= 0) {\n value = 1.0;\n }\n if (ask <= 0) {\n ask = 1.0;\n }\n if (bid <= 0) {\n bid = 1.0;\n }\n\n if (random.nextBoolean()) {\n // Adjust share\n int shareVariation = random.nextInt(100);\n if (shareVariation > 0 && share + shareVariation < stocks) {\n share += shareVariation;\n } else if (shareVariation < 0 && share + shareVariation > 0) {\n share += shareVariation;\n }\n }\n }", "private void determinationImpostRate(Vehicle vehicle) {\n serviceForDeterminationImpostRate.determinationImpostRateByOwner(vehicle);\n }", "@Test\n public void testMakeChange() {\n\n //setting a variable for the amount of change the user should get back\n BigDecimal changeDue = new BigDecimal(\"3.19\");\n\n //creating map to store the results of the makeChange() method\n Map<Coin, BigDecimal> changeReturned = new HashMap<>();\n\n changeReturned = dao.makeChange(changeDue);\n\n //creating a variable to store the amount returned from the makeChange()\n // as a BigDecimal\n BigDecimal changeReturnedAsBigDecimal = BigDecimal.ZERO;\n\n BigDecimal quarter = new BigDecimal(\"0.25\");\n BigDecimal dime = new BigDecimal(\"0.10\");\n BigDecimal nickel = new BigDecimal(\"0.05\");\n BigDecimal penny = new BigDecimal(\"0.01\");\n\n BigDecimal numberOfQuarters;\n BigDecimal numberOfDimes;\n BigDecimal numberOfNickels;\n BigDecimal numberOfPennies;\n\n BigDecimal valueOfQuartersDispensed;\n BigDecimal valueOfDimesDispensed;\n BigDecimal valueOfNickelsDispensed;\n BigDecimal valueOfPenniesDispensed; \n\n //calculating the number of quarters that should be returned\n numberOfQuarters = changeDue.divide(quarter);\n //calculating the value of the quarters returned\n valueOfQuartersDispensed = numberOfQuarters.setScale(0, RoundingMode.DOWN).multiply(quarter);\n //calculating how much change is left to be dispensed after quarters\n BigDecimal changeAfterQuarters = changeDue.subtract(valueOfQuartersDispensed);\n \n //adding the value of the quarters returned\n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfQuartersDispensed);\n\n //dimes\n numberOfDimes = changeAfterQuarters.divide(dime);\n valueOfDimesDispensed = numberOfDimes.setScale(0, RoundingMode.DOWN).multiply(dime);\n\n BigDecimal changeAfterDimes = changeAfterQuarters.subtract(valueOfDimesDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfDimesDispensed);\n \n //nickels\n numberOfNickels = changeAfterDimes.divide(nickel);\n valueOfNickelsDispensed = numberOfNickels.setScale(0, RoundingMode.DOWN).multiply(nickel);\n\n BigDecimal changeAfterNickels = changeAfterDimes.subtract(valueOfNickelsDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfNickelsDispensed);\n \n //pennies\n numberOfPennies = changeAfterNickels.divide(penny);\n valueOfPenniesDispensed = numberOfPennies.setScale(0, RoundingMode.DOWN).multiply(penny);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfPenniesDispensed);\n\n //testing if the amount of change returnes equals the amount of change that is due\n assertEquals(changeDue, changeReturnedAsBigDecimal);\n }", "@Override\n\tpublic void getResultat() {\n\t\tcalcul();\n\t}", "public void recalculateStats(){\n weight = .25f * (shaftMat.getParameter(\"Density\") * length + headMat.getParameter(\"Density\") * .4f);\n sharpness = headMat.getParameter(\"Malleability\") + 1f / headMat.getParameter(\"Durability\"); //Malleable objects can be sharp, as can fragile objects\n// fragility = 1f / (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n durability = (shaftMat.getParameter(\"Durability\") * .5f + headMat.getParameter(\"Durability\") * .5f);\n trueness = shaftMat.getParameter(\"Regularity\") + headMat.getParameter(\"Regularity\");\n// length = 2f;\n }", "@Override\r\n public void update() {\r\n this.highestRevenueRestaurant = findHighestRevenueRestaurant();\r\n this.total = calculateTotal();\r\n }", "@Override\n public double computeProfitUsingRisk() {\n return (getVehiclePerformance() / getVehiclePrice()) * evaluateRisk();\n }", "public void update(Runnable onChange) {\n HashMap<String, Double> newExchangeRates = new HashMap<>(networkEnterprise.getAllExchangeRates());\n if (allExchangeRates != null && newExchangeRates.toString().equals(allExchangeRates.toString()))\n return;\n\n Log.d(\"cache\", \"OLD: \" + allExchangeRates);\n Log.d(\"cache\", \"NEW: \" + newExchangeRates);\n allExchangeRates = newExchangeRates;\n\n if (onChange != null)\n onChange.run();\n }", "public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public double getInterest(){return this.interest_rate;}", "@Override\n public GetPositionEstimateResult getPositionEstimate(GetPositionEstimateRequest request) {\n request = beforeClientExecution(request);\n return executeGetPositionEstimate(request);\n }", "private void updateGeneralEvaluation(Evaluation ev, double learnRatio) {\n\t\tgeneralEvaluation = (1-learnRatio)*generalEvaluation + learnRatio *ev.getGrade();\n\t}", "public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}", "public abstract double evaluateFitness();", "public abstract void updateFitness();", "public void priceUpdate(){\n \n double attractionPrices = 0;\n Attraction attraction;\n for(int i=0; i< getAttractionsList().size();i++)\n {\n attraction = (Attraction) getAttractionsList().get(i);\n attractionPrices += attraction.getPrice();\n }\n hotelPrice = diff(getEndDate(), getStartDate());\n price = getTravel().getPrice() + getHotel().getPrice()*(hotelPrice) \n + getTransport().getPrice()*getTravel().getDistance()\n + attractionPrices;\n }", "public static final void testRetire (\n double desiredSavingsInterestIncome,\n double savingsInterestRate,\n double inflationRate,\n double taxRate,\n double investmentInterestRate,\n double yearsOfSaving )\n //////////////////////////////////////////////////////////////////////\n {\n \n double savings\n = desiredSavingsInterestIncome * ( 1.0 + inflationRate )\n / ( savingsInterestRate * ( 1.0 - taxRate ) - inflationRate );\n\n double futureValueSavings\n = savings * Math.pow ( 1.0 + inflationRate, yearsOfSaving );\n\n double annualSavings = annualSavingsNeeded (\n futureValueSavings, investmentInterestRate, yearsOfSaving );\n\n System.out.println ( savings );\n System.out.println ( futureValueSavings );\n System.out.println ( annualSavings );\n System.out.println ( futureValueAnnuity (\n annualSavings, investmentInterestRate, yearsOfSaving ) );\n System.out.println ( presentValueAnnuity (\n annualSavings, investmentInterestRate, yearsOfSaving ) );\n }", "public void doOfflineComputation() {\n\t\toptimalPolicy = policyIteration();\n\n\t}", "private void analyze() {\n\t\tdouble org = 0;\n\t\tdouble avgIndPerDoc = 0;\n\t\tdouble avgTotalPerDoc = 0;\n\n\t\tfor (Instance instance : instanceProvider.getInstances()) {\n\n\t\t\tint g = 0;\n\t\t\tSet<AbstractAnnotation> orgM = new HashSet<>();\n\n//\t\t\torgM.addAll(instance.getGoldAnnotations().getAnnotations());\n//\t\t\tg += instance.getGoldAnnotations().getAnnotations().size();\n\n\t\t\tfor (AbstractAnnotation instance2 : instance.getGoldAnnotations().getAnnotations()) {\n\n\t\t\t\tResult r = new Result(instance2);\n\n\t\t\t\t{\n////\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getTrend());\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(r.getInvestigationMethod());\n////\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(\n////\t\t\t\t\t\t\tr.getDefinedExperimentalGroups().stream().map(a -> a.get()).collect(Collectors.toList()));\n//\n//\t\t\t\t\torgM.addAll(aa);\n//\t\t\t\t\tg += aa.size();\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t/**\n\t\t\t\t\t * props of exp\n\t\t\t\t\t */\n\t\t\t\t\tfor (DefinedExperimentalGroup instance3 : r.getDefinedExperimentalGroups()) {\n\n//\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getOrganismModel());\n//\t\t\t\t\tList<AbstractAnnotation> aa = new ArrayList<>(instance3.getTreatments());\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> ab = Arrays.asList(instance3.getInjury());\n\n\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getDeliveryMethods().stream())\n\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n\t\t\t\t\t\taa.addAll(instance3.getTreatments().stream().filter(i -> i != null)\n\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Treatment(et))\n\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getDeliveryMethod()).filter(i -> i != null)\n\t\t\t\t\t\t\t\t.collect(Collectors.toList()));\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).flatMap(i -> i.getAnaesthetics().stream())\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).collect(Collectors.toList());\n\n//\t\t\t\t\t\tList<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryDevice()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\t// List<AbstractAnnotation> aa = ab.stream().filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.map(et -> et.asInstanceOfEntityTemplate()).map(et -> new Injury(et))\n//\t\t\t\t\t\t\t\t.filter(i -> i != null).map(i -> i.getInjuryLocation()).filter(i -> i != null)\n//\t\t\t\t\t\t\t\t.collect(Collectors.toList());\n\n\t\t\t\t\t\torgM.addAll(aa);\n\t\t\t\t\t\tg += aa.size();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tavgIndPerDoc += orgM.size();\n\t\t\tavgTotalPerDoc += g;\n\n\t\t\torg += ((double) orgM.size()) / (g == 0 ? 1 : g);\n//\t\t\tSystem.out.println(((double) orgM.size()) / g);\n\n\t\t}\n\t\tSystem.out.println(\"avgTotalPerDoc = \" + avgTotalPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"avgIndPerDoc = \" + avgIndPerDoc / instanceProvider.getInstances().size());\n\t\tSystem.out.println(\"org = \" + org);\n\t\tSystem.out.println(\"avg. org = \" + (org / instanceProvider.getInstances().size()));\n\t\tSystem.out.println(new DecimalFormat(\"0.00\").format(avgTotalPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(avgIndPerDoc / instanceProvider.getInstances().size())\n\t\t\t\t+ \" & \" + new DecimalFormat(\"0.00\").format(org / instanceProvider.getInstances().size()));\n\t\tSystem.exit(1);\n\n\t\tStats.countVariables(0, instanceProvider.getInstances());\n\n\t\tint count = 0;\n\t\tfor (SlotType slotType : EntityType.get(\"Result\").getSlots()) {\n\n\t\t\tif (slotType.isExcluded())\n\t\t\t\tcontinue;\n\t\t\tcount++;\n\t\t\tSystem.out.println(slotType.name);\n\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.exit(1);\n\t}", "@TaDaMethod(variablesToTrack = {\"ssn\", \"weekWage\", \"workWeeks\", \"ssn2\",\n\t\t\t\"capitalGains\", \"capitalLosses\", \"stockDividends\"}, \n\t\t\tcorrespondingDatabaseAttribute = {\"job.ssn\", \"job.WEEKWAGE\", \"job.WORKWEEKS\", \"investment.ssn\",\n\t\t\t\"investment.CAPITALGAINS\", \"investment.CAPITALLOSSES\", \"investment.STOCKDIVIDENDS\"})\n\tprivate void calculateSlopesAndIntercepts(){\n\t\tHashMap<Integer, Integer> ssnWeekWage = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnWorkWeeks = new HashMap<Integer, Integer>();\n\t\tHashMap<Integer, Integer> ssnInvestmentIncome = new HashMap<Integer, Integer>();\n\t\t\n\t\ttry {\n\t\t\tstatement = Factory.getConnection().createStatement();\n\t results = statement.executeQuery(\"SELECT SSN, WEEKWAGE, WORKWEEKS from job\"); \n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"WEEKWAGE\") == null || results.getString(\"WORKWEEKS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn = results.getInt(\"SSN\");\n\t \tint weekWage = results.getInt(\"WEEKWAGE\");\n\t \tint workWeeks = results.getInt(\"WORKWEEKS\");\n\t \t\n\t \tssnWeekWage.put(ssn, weekWage);\n\t \tssnWorkWeeks.put(ssn, workWeeks);\n\t }\n\t \n\t results = statement.executeQuery(\"SELECT SSN, CAPITALGAINS, CAPITALLOSSES, STOCKDIVIDENDS from investment\");\n\t while(results.next()){\n\t \tif(results.getString(\"SSN\") == null || results.getString(\"CAPITALGAINS\") == null || results.getString(\"CAPITALLOSSES\") == null || results.getString(\"STOCKDIVIDENDS\") == null){\n\t \t\tcontinue;\n\t \t}\n\t \tint ssn2 = results.getInt(\"SSN\");\n\t \tint capitalGains = results.getInt(\"CAPITALGAINS\");\n\t \tint capitalLosses = results.getInt(\"CAPITALLOSSES\");\n\t \tint stockDividends = results.getInt(\"STOCKDIVIDENDS\");\n\t \tint investmentIncome = capitalGains + stockDividends + capitalLosses;\n\t \t\n\t \tssnInvestmentIncome.put(ssn2, investmentIncome);\n\t }\n\t \n\t // Calculate Cofficients\n\t // Build an array list of Work Weeks and an array list of Income;\n\t ArrayList<Integer> workWeeksList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeList = new ArrayList<Integer>();\n\t ArrayList<Integer> weeklyWageList = new ArrayList<Integer>();\n\t ArrayList<Integer> investmentList = new ArrayList<Integer>();\n\t ArrayList<Integer> incomeListForInvestment = new ArrayList<Integer>();\n\t \n\t for (Iterator<Integer> i = ssnWorkWeeks.keySet().iterator(); i.hasNext();){\n\t \tint SSNkey = (Integer) i.next();\n\t \tif(ssnWorkWeeks.get(SSNkey) != null && ssnWeekWage.get(SSNkey) != null){\n\t\t \tint workWeeks = (Integer) ssnWorkWeeks.get(SSNkey);\n\t\t \tint weekWage = (Integer) ssnWeekWage.get(SSNkey);\n\t\t \tif(workWeeks > 0 && weekWage > 0){\n\t\t \t\tworkWeeksList.add(workWeeks);\n\t\t\t \tincomeList.add(workWeeks * weekWage);\n\t\t\t \tweeklyWageList.add(weekWage);\n\t\t\t \tif(ssnInvestmentIncome.get(SSNkey) != null && ssnInvestmentIncome.get(SSNkey) != null){\n\t\t\t \t\tint investmentIncome = (Integer) ssnInvestmentIncome.get(SSNkey);\n\t\t\t \t\tinvestmentList.add(investmentIncome);\n\t\t\t \t\tincomeListForInvestment.add(workWeeks * weekWage);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t }\n\t \n\t // Set the member variable for the cofficients for given Work Weeks find Income\n\t workWeeksFindIncome = new CalculateRegression().calculateRegressionNumbers(workWeeksList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given Weekly Wage find Income\n\t weeklyWageFindIncome = new CalculateRegression().calculateRegressionNumbers(weeklyWageList,incomeList);\n\t \n\t // Set the member variable for the cofficients for given InvestmentIncome find Income \n\t investmentIncomeFindIncome = new CalculateRegression().calculateRegressionNumbers(investmentList,incomeListForInvestment);\n\t \n\t\t} catch (SQLException e) {\n\t while (e != null)\n\t {\n\t System.err.println(\"\\n----- SQLException -----\");\n\t System.err.println(\" SQL State: \" + e.getSQLState());\n\t System.err.println(\" Error Code: \" + e.getErrorCode());\n\t System.err.println(\" Message: \" + e.getMessage());\n\t // for stack traces, refer to derby.log or uncomment this:\n\t //e.printStackTrace(System.err);\n\t e = e.getNextException();\n\t }\n\t\t}\t\n\t\t\n\t}", "public List<Vector<Double>> calculateModel()\n {\n List<Vector<Double>> yModel = new LinkedList<>();\n yModel.add(this.initialValues());\n for (int j = 0; j < this.tSpan; j++)\n {\n yModel.add(this.calculateStep());\n }\n\n this.etatPopulation = yModel;\n return yModel;\n }", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "public void updateModel(Bid bid, double time) {\n\t\tif (bid != null) {\n\t\t\t// We receiveMessage each issueEvaluation with the value that has\n\t\t\t// been offered in the bid.\n\t\t\tList<Issue> issues = negotiationSession.getUtilitySpace().getDomain().getIssues();\n\t\t\tfor (Issue issue : issues) {\n\t\t\t\ttry {\n\t\t\t\t\tint issueID = issue.getNumber();\n\t\t\t\t\tValue offeredValue = bid.getValue(issueID);\n\t\t\t\t\tthis.issueEvaluationList.updateIssueEvaluation(issueID, offeredValue);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t// After all issueEvaluations have been updated, we can calculate\n\t\t\t// the new\n\t\t\t// estimated weights for the issues themselves.\n\t\t\tthis.issueEvaluationList.updateIssueWeightMap();\n\t\t}\n\t}", "public void calcInterest() {\n\t\tbalance = balance + (interestPct*balance);\n\t\t}", "void optimiseSetPointProfile()\n\t{\n\t\tif (this.owner.storageHeater != null)\n\t\t{\n\t\t\toptimiseStorageHeater(this.owner.storageHeater);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"WattboxController:: optimise set point called for agent \" + this.owner.getAgentName());\n\t\t}\n\n\t\t// Initialise optimisation\n\t\tdouble[] localSetPointArray = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\tthis.optimisedSetPointProfile = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\tdouble[] deltaT = ArrayUtils.add(this.setPointProfile, ArrayUtils.negate(this.priorDayExternalTempProfile));\n\t\tdouble[] localDemandProfile = this.calculateEstimatedSpaceHeatPumpDemand(this.setPointProfile);\n\t\tdouble leastCost = this.evaluateCost(localDemandProfile);\n\t\tdouble newCost = leastCost;\n\t\tdouble maxRecoveryPerTick = 0.5d\n\t\t\t\t* Consts.DOMESTIC_COP_DEGRADATION_FOR_TEMP_INCREASE\n\t\t\t\t* ((this.owner.getBuildingHeatLossRate() / Consts.KWH_TO_JOULE_CONVERSION_FACTOR)\n\t\t\t\t\t\t* (Consts.SECONDS_PER_DAY / this.ticksPerDay) * ArrayUtils.max(deltaT)); // i.e.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can't\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recover\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// more\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 50%\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// heat\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// loss\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// at\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 90%\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// COP.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Need\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// code\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// better\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// later\n\n\t\tfor (int i = 0; i < localSetPointArray.length; i++)\n\t\t{\n\t\t\t// Start each evaluation from the basepoint of the original (user\n\t\t\t// specified) set point profile\n\t\t\tlocalSetPointArray = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\t\tdouble totalTempLoss = 0;\n\t\t\tdouble[] otherPrices = Arrays.copyOf(this.dayPredictedCostSignal, this.dayPredictedCostSignal.length);\n\n\t\t\tfor (int j = 0; (j < Consts.HEAT_PUMP_MAX_SWITCHOFF && (i + j < this.ticksPerDay)); j++)\n\t\t\t{\n\t\t\t\tdouble tempLoss = (((this.owner.getBuildingHeatLossRate() / Consts.KWH_TO_JOULE_CONVERSION_FACTOR)\n\t\t\t\t\t\t* (Consts.SECONDS_PER_DAY / this.ticksPerDay) * Math\n\t\t\t\t\t\t.max(0, (localSetPointArray[i + j] - this.priorDayExternalTempProfile[i + j]))) / this.owner\n\t\t\t\t\t\t.getBuildingThermalMass());\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\"Temp loss in tick \" + (i + j) + \" = \" + tempLoss);\n\t\t\t\t}\n\t\t\t\ttotalTempLoss += tempLoss;\n\n\t\t\t\tfor (int k = i + j; k < localSetPointArray.length; k++)\n\t\t\t\t{\n\t\t\t\t\tlocalSetPointArray[k] = this.setPointProfile[k] - totalTempLoss;\n\t\t\t\t\t// availableHeatRecoveryTicks++;\n\t\t\t\t}\n\t\t\t\tdouble availableHeatRecoveryTicks = localSetPointArray.length - j;\n\n\t\t\t\t// Sort out where to regain the temperature (if possible)\n\t\t\t\tint n = (int) Math.ceil((totalTempLoss * this.owner.getBuildingThermalMass()) / maxRecoveryPerTick);\n\t\t\t\t// Take this slot out of the potential cheap slots to recover\n\t\t\t\t// temp in.\n\t\t\t\totherPrices[i + j] = Double.POSITIVE_INFINITY;\n\n\t\t\t\tif (n < availableHeatRecoveryTicks && n > 0)\n\t\t\t\t{\n\t\t\t\t\t// We know it's possible to recover the temperature lost\n\t\t\t\t\t// in switch off period under the constraints set.\n\t\t\t\t\tdouble tempToRecover = (totalTempLoss / n);\n\n\t\t\t\t\t// Find the cheapest timeslots in which to recover the\n\t\t\t\t\t// temperature\n\t\t\t\t\t// If this selection results in a tie, the slot is chosen\n\t\t\t\t\t// randomly\n\t\t\t\t\tint[] recoveryIndices = ArrayUtils.findNSmallestIndices(otherPrices, n);\n\n\t\t\t\t\t// Add on temperature in each temperature recovery slot and\n\t\t\t\t\t// all subsequent slots - thus building an optimised\n\t\t\t\t\t// profile.\n\t\t\t\t\tfor (int l : recoveryIndices)\n\t\t\t\t\t{\n\t\t\t\t\t\tfor (int m = l; m < this.ticksPerDay; m++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlocalSetPointArray[m] += tempToRecover;\nif (\t\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Adding \" + tempToRecover + \" at index \" + m + \" to counter temp loss at tick \"\n\t\t\t\t\t\t\t\t\t+ (i + j + 1));\n}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((i + j) == 0)\n\t\t\t\t\t\t{\nif (\t\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Evaluating switchoff for tick zero, set point array = \"\n\t\t\t\t\t\t\t\t\t+ Arrays.toString(localSetPointArray));\n}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"In here, adding temp \" + tempToRecover + \" from index \" + l);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"With result \" + Arrays.toString(localSetPointArray));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tdouble[] tempDifference = ArrayUtils.add(this.setPointProfile, ArrayUtils.negate(localSetPointArray));\n\n\t\t\t\t\tif (ArrayUtils.max(ArrayUtils.add(ArrayUtils.absoluteValues(tempDifference), ArrayUtils\n\t\t\t\t\t\t\t.negate(Consts.MAX_PERMITTED_TEMP_DROPS))) > Consts.FLOATING_POINT_TOLERANCE)\n\t\t\t\t\t{\n\t\t\t\t\t\t// if the temperature drop, or rise, is too great, this\n\t\t\t\t\t\t// profile is unfeasible and we return null\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// calculate energy implications and cost for this\n\t\t\t\t\t\t// candidate setPointProfile\n\t\t\t\t\t\tlocalDemandProfile = this.calculateEstimatedSpaceHeatPumpDemand(localSetPointArray);\n\t\t\t\t\t\tif ((i + j) == 0)\n\t\t\t\t\t\t{\nif (\t\t\t\t\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Calculated demand for set point array turning off at tick \" + i + \" for \"\n\t\t\t\t\t\t\t\t\t+ (j + 1) + \" ticks \" + Arrays.toString(localSetPointArray));\n}\n\t\t\t\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tthis.mainContext.logger.trace(\"Demand = \" + Arrays.toString(localDemandProfile));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (localDemandProfile != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// in here if the set point profile is achievable\n\t\t\t\t\t\t\tnewCost = this.evaluateCost(localDemandProfile);\n\n\t\t\t\t\t\t\t// Decide whether to swap the new profile with the\n\t\t\t\t\t\t\t// current best one\n\t\t\t\t\t\t\t// based on cost.\n\t\t\t\t\t\t\t// Many strategies are available - here we give two\n\t\t\t\t\t\t\t// options\n\t\t\t\t\t\t\t// Either the new cost must be better by an amount\n\t\t\t\t\t\t\t// greater than some decision threshold\n\t\t\t\t\t\t\t// held in Consts.COST_DECISION_THRESHOLD\n\t\t\t\t\t\t\t// OR (currently used) the cost must simply be\n\t\t\t\t\t\t\t// better, with a tie in cost\n\t\t\t\t\t\t\t// being decided by a \"coin toss\".\n\n\t\t\t\t\t\t\t// if((newCost - leastCost) < (0 -\n\t\t\t\t\t\t\t// Consts.COST_DECISION_THRESHOLD))\n\t\t\t\t\t\t\tif (newCost < leastCost || (newCost == leastCost && RandomHelper.nextIntFromTo(0, 1) == 1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tleastCost = newCost;\n\t\t\t\t\t\t\t\tthis.optimisedSetPointProfile = Arrays.copyOf(localSetPointArray, localSetPointArray.length);\n\t\t\t\t\t\t\t\tthis.heatPumpDemandProfile = ArrayUtils\n\t\t\t\t\t\t\t\t\t\t.multiply(localDemandProfile, (1 / Consts.DOMESTIC_HEAT_PUMP_SPACE_COP));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Impossible to recover heat within heat pump\n\t\t\t\t\t\t\t// limits - discard this attempt.\n\t\t\t\t\t\t\tif (this.owner.getAgentID() == 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.err.println(\"WattboxController: Can't recover heat with \" + availableHeatRecoveryTicks\n\t\t\t\t\t\t\t\t\t\t+ \" ticks, need \" + n);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.expectedNextDaySpaceHeatCost = leastCost;\n\t}", "public scala.Option<org.apache.spark.sql.catalyst.plans.logical.Statistics> estimate (org.apache.spark.sql.catalyst.plans.logical.Aggregate agg) { throw new RuntimeException(); }", "@Override\n public int computeProfit() {\n return getVehiclePerformance() / getVehiclePrice();\n }", "Map<Modification, Double> estimateModificationRate(Map<Modification, Integer> usedModifications, SpectrumAnnotatorResult spectrumAnnotatorResult, double aFixedModificationThreshold);", "public static void setPrice() {\n double summe = 0.0;\n for (Object obj : dlm.getDisplayedArtikel()) {\n if (obj instanceof Article) {\n Article art = (Article) obj;\n if (!art.isIsAbfrage()) {\n if (((art.isJugendSchutz() && art.isJugendSchutzOk())) || !art.isJugendSchutz()) {\n if (art.isEloadingAmmountOk() && !art.isPriceZero()) {\n summe += ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n }\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe += card.getAufladung() / 100;\n }\n }\n for (Object obj : dlm.getRemovedObjects()) {\n if (obj instanceof Article) {\n if (!((Article) ((obj))).isStorno_error()) {\n summe -= ((Article) ((obj))).getPreis() * ((Article) ((obj))).getAmount();\n }\n } else if (obj instanceof Karte) {\n Karte card = (Karte) obj;\n summe -= card.getAufladung() / 100;\n }\n }\n if (Math.round(summe) == 0) {\n summe = 0;\n }\n if (GUIOperations.isTraining()) {\n summe += 1000;\n }\n tfSumme.setText(String.format(\"%.2f\", summe));\n }", "@Override\n\tpublic double GetValue() {\n\t\tdouble spot = inputs.getSpot();\n\t\tdouble strike = inputs.getStrike();\n\t\tdouble vol = inputs.getVol();\n\t\tint noSteps=inputs.getNoSteps();\n\t\tdouble expiry=inputs.getExpiry();\n\t OptionType type=inputs.getType();\n\t ExerciseType exercise=inputs.getExercise();\n\t InterestRate interestRate=inputs.getR();\n\t\t\n\t double timestep = expiry/noSteps;\n\t double DF = Math.exp(-interestRate.GetRate(1.)*timestep);\n\t double temp1 = Math.exp((interestRate.GetRate(1.) + vol * vol)*timestep);\n\t double temp2 = 0.5 * (DF + temp1);\n\t double up = temp2 + Math.sqrt(temp2*temp2 - 1);\n\t double down = 1/ up;\n\t double probaUp = (Math.exp(interestRate.GetRate(1.) * timestep) - down)/(up -down) ;\n\t double probaDown = 1 - probaUp;\n\n\t //stock price tree\n\t\tstockPrice[0][0]=spot;\n\t for (int n = 1; n <= noSteps; n ++) {\n for (int j = n; j > 0; j--){\n \tstockPrice[j][n] = up * stockPrice[j-1][n-1];\n }\n \t\tstockPrice[0][n] = down * stockPrice[0][n-1];\n }\n\t \n\t //last column set payoffs\n\t\tfor (int j = 0; j <= noSteps; j++) {\n\t\t\t\tif(type.equals(OptionType.CALL)) {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(this.stockPrice[j][noSteps] - strike, .0);\n\t\t\t\t}else {\n\t\t\t\t\tpayOff[j][noSteps] = Math.max(strike - this.stockPrice[j][noSteps], .0);\n\t\t\t\t}\n\t\t}\n\n\t\t\n\t //payoff tree in backwardation\n\t \n\t for (int i = noSteps ; i >= 1; i--) {\n for (int j = 0; j <= i-1; j++) {\n\t \tif(exercise.equals(ExerciseType.AMERICAN)) { \n\t //American\t\n\t \t\tif(type.equals(OptionType.CALL)) {\n\t \t\t\t\tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(this.stockPrice[j][i-1] - strike, .0));\n\t \t\t\t\n\t \t\t}else \tpayOff[j][i-1] = Math.max(DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]) ,\n\t \t\t\t\tMath.max(strike - this.stockPrice[j][i-1] , .0));\n\t \t}else { \n\t \t\t\t//European put and call option\n\t \t\t\t\tpayOff[j][i-1] = DF * (probaUp * payOff[j+1][i] + probaDown * payOff[j][i]);\n\t }\n }\n }\n\t \n\t double deltaUp = (payOff[0][2]-payOff[1][2])/(stockPrice[0][2]-stockPrice[1][2]);\n\t double deltaDown = (payOff[1][2]-payOff[2][2])/(stockPrice[1][2]-stockPrice[2][2]);\n\t delta = (deltaUp + deltaDown) /2;\n\t gamma = (deltaUp-deltaDown)/((stockPrice[0][2]-stockPrice[2][2])/2);\n\t theta = (payOff[1][2]-payOff[0][0])/(365*2*timestep);//time in days\n\t \n\t long rounded = Math.round(payOff[0][0]*10000);\n\t return rounded/10000.0;\n\t}", "protected double calculateChange(double currentValue, double baselineValue) {\n return (currentValue - baselineValue) / baselineValue;\n }", "@Override\n\tpublic void update(int timeStep)\n\t{\n\t\tthis.checkForNewAppliancesAndUpdateConstants();\n\n\t\tdouble[] ownersCostSignal = this.owner.getPredictedCostSignal();\n\t\tthis.dayPredictedCostSignal = Arrays.copyOfRange(ownersCostSignal, timeStep % ownersCostSignal.length, timeStep\n\t\t\t\t% ownersCostSignal.length + this.ticksPerDay);\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"update\");\n\t\t}\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"dayPredictedCostSignal: \" + Arrays.toString(this.dayPredictedCostSignal));\n\t\t}\n\n\t\tthis.dayPredictedCostSignal = ArrayUtils\n\t\t\t\t.offset(ArrayUtils.multiply(this.dayPredictedCostSignal, this.predictedCostToRealCostA), this.realCostOffsetb);\n\n\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t{\n\t\t\tthis.mainContext.logger.trace(\"afterOffset dayPredictedCostSignal: \" + Arrays.toString(this.dayPredictedCostSignal));\n\t\t}\n\n\t\tif (this.owner.isHasElectricalSpaceHeat())\n\t\t{\n\t\t\tthis.setPointProfile = Arrays.copyOf(this.owner.getSetPointProfile(), this.owner.getSetPointProfile().length);\n\t\t\tthis.optimisedSetPointProfile = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\t\tthis.currentTempProfile = Arrays.copyOf(this.setPointProfile, this.setPointProfile.length);\n\t\t\tthis.heatPumpDemandProfile = this.calculateEstimatedSpaceHeatPumpDemand(this.setPointProfile);\n\t\t\t// (20/01/12) Check if sum of <heatPumpDemandProfile> is consistent\n\t\t\t// at end day\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger\n\t\t\t\t\t\t.trace(\"Sum(Wattbox estimated heatPumpDemandProfile): \" + ArrayUtils.sum(this.heatPumpDemandProfile));\n\t\t\t}\nif (\t\t\tthis.mainContext.logger.isTraceEnabled()) {\n\t\t\tthis.mainContext.logger.trace(\"Sum(Wattbox estimated heatPumpDemandProfile): \"\n\t\t\t\t\t+ ArrayUtils.sum(this.calculateEstimatedSpaceHeatPumpDemand(this.optimisedSetPointProfile)));\n}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.heatPumpDemandProfile = Arrays.copyOf(this.noElecHeatingDemand, this.noElecHeatingDemand.length);\n\t\t}\n\n\t\tif (this.owner.isHasElectricalWaterHeat())\n\t\t{\n\t\t\tthis.hotWaterVolumeDemandProfile = Arrays.copyOfRange(this.owner.getBaselineHotWaterVolumeProfile(), (timeStep % this.owner\n\t\t\t\t\t.getBaselineHotWaterVolumeProfile().length), (timeStep % this.owner.getBaselineHotWaterVolumeProfile().length)\n\t\t\t\t\t+ this.ticksPerDay);\n\t\t\tthis.waterHeatDemandProfile = ArrayUtils.multiply(this.hotWaterVolumeDemandProfile, Consts.WATER_SPECIFIC_HEAT_CAPACITY\n\t\t\t\t\t/ Consts.KWH_TO_JOULE_CONVERSION_FACTOR\n\t\t\t\t\t* (this.owner.waterSetPoint - ArrayUtils.min(Consts.MONTHLY_MAINS_WATER_TEMP) / Consts.DOMESTIC_HEAT_PUMP_WATER_COP));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthis.waterHeatDemandProfile = Arrays.copyOf(this.noElecHeatingDemand, this.noElecHeatingDemand.length);\n\t\t}\n\n\t\tif (this.coldAppliancesControlled && this.owner.isHasColdAppliances())\n\t\t{\n\t\t\tthis.optimiseColdProfile(timeStep);\n\t\t}\n\n\t\tif (this.wetAppliancesControlled && this.owner.isHasWetAppliances())\n\t\t{\n\t\t\tthis.optimiseWetProfile(timeStep);\n\t\t}\n\n\t\t// Note - optimise space heating first. This is so that we can look for\n\t\t// absolute\n\t\t// heat pump limit and add the cost of using immersion heater (COP 0.9)\n\t\t// to top\n\t\t// up water heating if the heat pump is too great\n\t\tif (this.spaceHeatingControlled && this.owner.isHasElectricalSpaceHeat())\n\t\t{\n\t\t\tif (this.owner.hasStorageHeater)\n\t\t\t{\n\t\t\t\tthis.optimiseStorageChargeProfile();\n\t\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t\t{\n\t\t\t\t\tthis.mainContext.logger.trace(\"Optimised storage heater profile = \" + Arrays.toString(this.heatPumpOnOffProfile));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tthis.optimiseSetPointProfile();\n\t\t\tif (this.mainContext.logger.isTraceEnabled())\n\t\t\t{\n\t\t\t\tthis.mainContext.logger.trace(\"Optimised set point profile = \" + Arrays.toString(this.heatPumpOnOffProfile));\n\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.waterHeatingControlled && this.owner.isHasElectricalWaterHeat())\n\t\t{\n\t\t\tthis.optimiseWaterHeatProfileWithSpreading();\n\t\t}\n\n\t\tif (this.eVehicleControlled && this.owner.isHasElectricVehicle())\n\t\t{\n\t\t\tthis.optimiseEVProfile();\n\t\t}\n\n\t\t// At the end of the step, set the temperature profile for today's\n\t\t// (which will be yesterday's when it is used)\n\t\tthis.priorDayExternalTempProfile = this.owner.getContext().getAirTemperature(timeStep, this.ticksPerDay);\n\t}", "public void updateVectorModel()\n\t{\n\t\t\n\t\tdouble [] newVectorModel = new double[this.rewardList.size()];\n\t\tfor(int i = 0;i < this.rewardList.size();i++)\n\t\t{\n\t\t\tdouble[] rewards = this.rewardList.get(i);\n\t\t\tif (rewards.length > 1)\n\t\t\t{\n\t\t\t\tdouble average = 0;\n\t\t\t\tfor(int j = 0; j< rewards.length;j++)\n\t\t\t\t{\n\t\t\t\t\taverage += rewards[j];\n\t\t\t\t}\n\t\t\t\taverage /= rewards.length;\n\t\t\t\tnewVectorModel[i] = average;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tnewVectorModel[i] = rewards[0];\n\t\t\t}\n\t\t}\n\t\tthis.vectorModel = newVectorModel;\n\t}", "@Override\n public double calculate(double measurement, double setpoint) {\n // Set setpoint to provided value\n setSetpoint(setpoint);\n return calculate(measurement);\n }", "@Override\n\tpublic List<Double> getCurrentBest() {\n\t\treturn null;\n\t}", "public void addToEstimate(double CO2Addition) {\n this.CO2 += CO2Addition;\n }", "Solution computeChange(Cash cashAvailable, int changeAmount);", "public void updateTime(){\r\n\t\tBlock selectedBlock = experiment.getBlocking().getSelectedBlockStructure();\r\n\t\testimatedTimeTotal.setText(secondsToString(estimateTime()));\r\n\t\testimatedTimeSubject.setText(secondsToString((long)(estimateTime()/selectedBlock.get(0).getReplications())));\r\n\t}", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "public double getFitness(){\n return averageFitness;\n }", "@Override\n public void undo()\n {\n story.setEstimate(oldEstimate);\n\n if (ready) {\n story.setReadinessToReady();\n }\n }", "protected void saveStateAsLowestEnergy() {\n\tbestEverPoints = getPoints();\n\tbestEverStateEnergy = currentStateEnergy;\n }", "protected ProbNet step (PNEdit bestEdition) throws NormalizeNullVectorException {\n\n /* If there have been any improvements on the score, we update\n * the learnedNet. */\n try{\n probNet.doEdit(bestEdition);\n } catch (ConstraintViolationException ex){\n /* If the edition was not allowed (ModelNetworkconstraint)\n * the algorithm just goes through the next iteration of the\n * loop, asking the cache for the next best edition.\n */\n }\n catch (Exception exception){\n exception.printStackTrace();\n }\n return probNet;\n }", "@Override\r\n\t\t\tpublic void populationUpdate(PopulationData<? extends Solution> data) {\n//\t\t\t\tbuffer.append(data.getPopulationSize());\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tdouble fit = data.getBestCandidateFitness();\r\n//\t\t\t\tSystem.out.println(fit);\r\n\t\t\t\tbuffer.delete(0, buffer.length());\r\n\t\t\t\tbuffer.append(fit);\r\n//\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tif (Run10FastExternalizer.initialFitness.getDbl() == -1.0) {\r\n\t\t\t\t\tRun10FastExternalizer.initialFitness.setDbl(fit);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (fit == 0.0){\r\n\t\t\t\t\tArrayList<Student> studentsCopy = new ArrayList<>();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: students){\r\n\t\t\t\t\t\tstudentsCopy.add(student.clone());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\t\t\r\n\t\t\t\t\tfor (Student student: studentsCopy){\r\n\t\t\t\t\t\tstudent.register(data.getBestCandidate().getBlocks());\r\n//\t\t\t\t\t\tSystem.out.println(student.getSchedule());\r\n//\t\t\t\t\t\tbuffer.append(student.getSchedule().toString());\r\n//\t\t\t\t\t\tbuffer.append(\"\\n\");\r\n\t\t\t\t\t\tsb.append(student.getSchedule().toString());\r\n\t\t\t\t\t\tsb.append(\"\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tsuperValue = sb.toString();\r\n\t\t\t\t}\r\n\t\t\t}", "private void estadoInicial(){\n double referencias[] = new double[sigmas.length];\n for(int i=0;i<sigmas.length;i++){\n referencias[i] = (ppl.limiteSuperiorR(i+1)+ppl.limiteInferiorR(i+1))/2;\n System.out.printf(\"limS:%g, limI:%g, Referencias[%d] = %g\\n\",ppl.limiteSuperiorR(i+1),ppl.limiteInferiorR(i+1),i,referencias[i]);\n }\n\n double Zc = ppl.Z(referencias[0],referencias[1]);\n TActual = Zc*0.2;\n System.out.printf(\"TActual:T%g \\n\",TActual);\n\n estadoMejor = new Estado(\n iteracionActual, \n TActual, \n referencias,\n Zc);\n\n calcularSoluciones(estadoMejor);\n calcularProbabilidadAceptacion(estadoMejor);\n\n historialEstados.add(estadoMejor);\n }", "@Override\r\n\tpublic void registEstimateDetail(List<EstimateTO> estimateList, List<EstimateDetailTO> estimateDetailList) {\n\t\tSystem.out.println(\"b\");\r\n\t\testimateApplicationService.batchEstimate(estimateList,estimateDetailList);\r\n\t}", "public void setMontoEstimado(double param){\n \n this.localMontoEstimado=param;\n \n\n }", "private void update(Instance instance) throws Exception {\n\n if (instance.classIsMissing()) {\n return;\n }\n\n instance.replaceMissingValues(m_MissingVector);\n m_Train.add(instance);\n\n /* Update the minimum and maximum for all the attributes */\n updateMinMax(instance);\n\n /* update the mutual information datas */\n updateMI(instance);\n\n /* Nearest Exemplar */\n Exemplar nearest = nearestExemplar(instance);\n\t\n /* Adjust */\n if(nearest == null){\n Exemplar newEx = new Exemplar(this, m_Train, 10, instance.classValue());\n newEx.generalise(instance);\n initWeight(newEx);\n addExemplar(newEx);\n return;\n }\n adjust(instance, nearest);\n\n /* Generalise */\n generalise(instance);\n }", "public double getMontoCatalogoEstimado(){\n return localMontoCatalogoEstimado;\n }", "public void calcObjective() {\n double obj;\n double objectives[];\n\n for (int i = 0; i < population.getPopulationSize(); i++) { //300\n objectives = population.getObjectiveValues(i);\n obj = evaluateAll(population.getSingleChromosome(i)); //evaluateAll(chromosome chromosome1)\n objectives[indexOfObjective] = obj;\n population.setObjectiveValue(i, objectives);\n }\n }", "protected void setStateToLowestEnergy() {\n\tpoints = bestEverPoints;\n\n\t// make a copy of the best points\n\tbestEverPoints = getPoints();\n\n\tbuildEnergyMatrix();\n\tstateEnergy();\n }", "@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}", "abstract double calculateCurrentDiscountRate();", "TrainingEstimator(RatingMatrix snap, BiasModel baseline, PreferenceDomain dom) {\n ratings = snap.getRatings();\n domain = dom;\n estimates = new double[ratings.size()];\n\n final LongCollection userIds = snap.getUserIds();\n LongIterator userIter = userIds.iterator();\n double global = baseline.getIntercept();\n\n for (RatingMatrixEntry r: snap.getRatings()) {\n double userBias = baseline.getUserBias(r.getUserId());\n double itemBias = baseline.getItemBias(r.getItemId());\n estimates[r.getIndex()] = global + userBias + itemBias;\n }\n }", "private void refreshTableForUpdate()\n {\n //Was updating the values but don't believe this is necessary, as like budget items\n //a loss amount will stay the same unless changed by the user (later on it might be the\n //case that it can increase/decrease by a percentage but not now...)\n /*\n BadBudgetData bbd = ((BadBudgetApplication) this.getApplication()).getBadBudgetUserData();\n for (MoneyLoss loss : bbd.getLosses())\n {\n TextView valueView = valueViews.get(loss.expenseDescription());\n valueView.setText(BadBudgetApplication.roundedDoubleBB(loss.lossAmount()));\n }\n */\n }", "public Double getChange();", "public void notifyAlgoUpdateCurrentValue() {\n this.mHwGradualBrightnessAlgo.updateTargetAndRate(this.mTargetValue, this.mRate);\n this.mHwGradualBrightnessAlgo.updateCurrentBrightnessValue((float) this.mCurrentValue);\n }", "public void updateResults() {\n\t\t// Do not update when there is no amount entered\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\"\"))\n\t\t\treturn;\n\t\t\n\t\t// Transform .42 to 0.42\n\t\tif (amountEdit.getText().toString().equalsIgnoreCase(\".\")) {\n\t\t\tamountEdit.setText(\"0.\");\n\t\t\tamountEdit.setSelection(amountEdit.getText().length());\n\t\t}\n\t\t\t\n\t\tint from = (int) fromSpinner.getSelectedItemId();\n\t\tint to = (int) toSpinner.getSelectedItemId();\n\t\tDouble amount = Double.parseDouble(amountEdit.getText().toString());\n\t\tDouble result = exchangeRates.convert(from, to, amount);\n\t\t\n\t\t// Build results string and update the view\n\t\tString text = \"\";\n\t\ttext += exchangeRates.getCurrency(from) + \" \";\n\t\ttext += amount + \"\\n\";\n\t\ttext += exchangeRates.getCurrency(to) + \" \";\n\t\ttext += result.toString();\n\t\tresultsText.setText(text);\n\t}", "@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }", "private double calc_gain_ratio(String attrb,int partitonElem,HashMap<Integer, WeatherData> trainDataXMap,HashMap<Integer, WeatherData> trainDataYMap,double information_gain_System,int total_count_in_train)\n\t{\n\t\t\n\t\tHashMap<Integer,Integer> X_Train_attrb_part1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,Integer> X_Train_attrb_part2 = new HashMap<Integer,Integer>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part1 = new HashMap<Integer,WeatherData>();\n\t\tHashMap<Integer,WeatherData> Y_Train_attrb_part2 = new HashMap<Integer,WeatherData>();\n\t\t//System.out.println(\"the partition elem is\"+partitonElem);\n\t\tfor(int i=1;i<=trainDataXMap.size();i++)\n\t\t{\n\t\t\tWeatherData wd = trainDataXMap.get(i);\n\t\t\t\n\t\t\tfor(Feature f: wd.getFeatures())\n\t\t\t{\n\t\t\t\tif(f.getName().contains(attrb))\n\t\t\t\t{\n\t\t\t\t\tint attrb_val = Integer.parseInt(f.getValues().get(0).toString());\n\t\t\t\t\tint xTRainKey = getKey(wd);\n\t\t\t\t\tif(attrb_val <= partitonElem)\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part1.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part1.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tX_Train_attrb_part2.put(xTRainKey,attrb_val);\n\t\t\t\t\t\tY_Train_attrb_part2.put(xTRainKey, trainDataYMap.get(xTRainKey));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Size of first partition\n\t\tint Total_Count_attr_part1 = X_Train_attrb_part1.size();\n\t\t//System.out.println(\"the size of X first partition\"+Total_Count_attr_part1);\n\t\t//System.out.println(\"the size of Y first partition\"+Y_Train_attrb_part1.size());\n\t\t\n\t\t//Size of second partition\n\t\tint Total_Count_attr_part2 = X_Train_attrb_part2.size();\n\t\t//System.out.println(\"the size of X second partition\"+Total_Count_attr_part2);\n\t\t//System.out.println(\"the size of Y second partition\"+Y_Train_attrb_part2.size());\n\t\t\n\t\t//No of records in first partition where EVENT = RAIN \n\t\tint count_rain_yes_part1 = getCountsOfRain(Y_Train_attrb_part1,true,Total_Count_attr_part1);\n\t\t//System.out.println(\"count of rain in first part1\"+count_rain_yes_part1);\n\t\t\n\t\t//No of records in first partition where EVENT != RAIN Y_Train_attrb_part1\n\t\tint count_rain_no_part1 = getCountsOfRain(Y_Train_attrb_part1,false,Total_Count_attr_part1);\t\t\n\t\t//System.out.println(\"count of no rain in first part1\"+count_rain_no_part1);\n\t\t\n\t\t//Compute the Information Gain in first partition\n\t\t\n\t\tdouble prob_yes_rain_part1 = 0.0;\n\t\tdouble prob_no_rain_part1 = 0.0;\n\t\tdouble prob_yes_rain_part2 = 0.0;\n\t\tdouble prob_no_rain_part2 = 0.0;\n\t\tdouble getInfoGain_part1 = 0.0;\n\t double getInfoGain_part2 = 0.0;\n\t double gain_ratio_partition = 0.0;\n\t\tif(Total_Count_attr_part1!=0){\n\t\t\tprob_yes_rain_part1 = (count_rain_yes_part1/(double)Total_Count_attr_part1);\n\t\t\tprob_no_rain_part1 = (count_rain_no_part1/(double)Total_Count_attr_part1);\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part1!=0.0) && (prob_no_rain_part1!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part1 = getInformationGain(prob_yes_rain_part1,prob_no_rain_part1);\n\t\t}\t\t\n\t\t\n\t\t//System.out.println(\"the info gain from part1\"+getInfoGain_part1);\n\t\t//No of records in second partition where EVENT = RAIN \n int count_rain_yes_part2 = getCountsOfRain(Y_Train_attrb_part2,true,Total_Count_attr_part2);\n\t\t\n //No of records in first partition where EVENT != RAIN\n\t\tint count_rain_no_part2 = getCountsOfRain(Y_Train_attrb_part2,false,Total_Count_attr_part2);\t\n\t\t\n\t\t//Compute the Information Gain in second partition\n\t\tif(Total_Count_attr_part2!=0)\n\t\t{\n\t\t\tprob_yes_rain_part2 = (count_rain_yes_part2/(double)Total_Count_attr_part2);\n\t\t\tprob_no_rain_part2 = (count_rain_no_part2/(double)Total_Count_attr_part2);\n\t\t\t\n\t\t}\n\t\tif((prob_yes_rain_part2!=0.0) && (prob_no_rain_part2!=0.0))\n\t\t{\n\t\t\tgetInfoGain_part2 = getInformationGain(prob_yes_rain_part2,prob_no_rain_part2);\n\t\t}\n\t\t//System.out.println(\"the info gain from part2\"+getInfoGain_part2);\n\t\t\n\t\t//Total Information from both partitions\n\t\tdouble infoGainFrom_Partition = getInfoGain_part1 + getInfoGain_part2;\n\t\t\n\t\t//Gain from the Partition\n\t\tdouble Gain_from_partition = information_gain_System - infoGainFrom_Partition;\n\t\t//System.out.println(\"The inf gain from system\"+information_gain_System);\n\t\t//System.out.println(\"The inf gain from part\"+infoGainFrom_Partition);\n\t\t//System.out.println(\"The gain from part\"+Gain_from_partition);\n\t\t\n\t\t//Split information of partition\n\t\tif((Total_Count_attr_part1!=0) && (Total_Count_attr_part2!=0))\n\t\t{\n\t\n\t\t\tdouble splitInfoFromPartition = getInformationGain(((double)Total_Count_attr_part1/total_count_in_train),\n ((double)Total_Count_attr_part2/total_count_in_train));\n\t\t\t\n\t\t\t//System.out.println(\"The split info from partition\"+splitInfoFromPartition);\n \n\t\t\t//Gain ratio of Partition\n gain_ratio_partition = Gain_from_partition/splitInfoFromPartition;\n\t\t}\n\t\t//System.out.println(\"The gain ratio info from partition\"+gain_ratio_partition);\n\t\treturn gain_ratio_partition;\n\t}", "public void setRate(double annualRate) {\nmonthlyInterestRate = annualRate / 100.0 / MONTHS;\n}" ]
[ "0.6746512", "0.621343", "0.61255234", "0.60225207", "0.5950659", "0.5876928", "0.58575547", "0.5849525", "0.5716986", "0.57151514", "0.56409985", "0.56258345", "0.55909574", "0.5588462", "0.554238", "0.55368125", "0.5485723", "0.5477342", "0.54598594", "0.5456874", "0.54540884", "0.5406106", "0.5376648", "0.53491634", "0.5344134", "0.5340582", "0.5340472", "0.5335329", "0.53225416", "0.53201354", "0.52887243", "0.52420276", "0.5227221", "0.5212812", "0.51922643", "0.51833385", "0.5178789", "0.517873", "0.51666456", "0.5163368", "0.5159245", "0.51590437", "0.5145038", "0.5143417", "0.5132031", "0.5121003", "0.51183134", "0.5117847", "0.5115632", "0.5098738", "0.5093462", "0.50918764", "0.50864285", "0.50801915", "0.50737846", "0.50698656", "0.50694776", "0.50691855", "0.5055987", "0.50553536", "0.5053024", "0.5049026", "0.5046941", "0.5043041", "0.50428224", "0.5036646", "0.50341576", "0.5033377", "0.50271404", "0.5023923", "0.5015788", "0.5004453", "0.49999112", "0.49975765", "0.49958813", "0.49947166", "0.4993562", "0.49858913", "0.49847448", "0.49837977", "0.4982879", "0.49795586", "0.4977732", "0.49776676", "0.49775568", "0.4973455", "0.49707916", "0.49595636", "0.49554724", "0.49554363", "0.49534303", "0.49521703", "0.49447665", "0.494452", "0.49409506", "0.49401546", "0.49375132", "0.49368548", "0.49337327", "0.49245203", "0.49219215" ]
0.0
-1
make changes in estimate payment list, update poadv total and biladvtotal and bill balance
public OrderPayments updateAdvPayment(OrderPayments payment, String companyId , String invoiceNo ) throws EntityException { Datastore ds = null; Company cmp = null; InwardEntity invoice = null; ObjectId oid = null; ObjectId invoiceOid = null; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); //po and bill must be true invoiceOid = new ObjectId(invoiceNo); Query<InwardEntity> iQuery = ds.find(InwardEntity.class).filter("company",cmp).filter("isEstimate", true).filter("isInvoice", true) .filter("id", invoiceOid); invoice = iQuery.get(); if(invoice == null) throw new EntityException(512, "converted invoice not found", null, null); //we need to sub old amt, and add new amt, so get old amt java.math.BigDecimal prevAmt = null; boolean match = false; //all deleted in between - there are no adv payments now if(invoice.getEstimatePayments() == null) throw new EntityException(513, "payment not found", null, null); for(OrderPayments pay : invoice.getEstimatePayments()) { if(pay.getId().toString().equals(payment.getId().toString())) { match = true; prevAmt = pay.getPaymentAmount(); break; } } if(match == false) throw new EntityException(513, "payment not found", null, null); java.math.BigDecimal advanceTotal = invoice.getEstimateAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount()); java.math.BigDecimal invoiceAdvance =invoice.getInvoiceAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount()); //as PO is converted, change only bill balance , PO balance does not get affected java.math.BigDecimal balance = invoice.getInvoiceBalance().add(prevAmt).subtract(payment.getPaymentAmount()); //if null then 0 if(payment.getTdsRate() == null) payment.setTdsRate(new BigDecimal(0)); if(payment.getTdsAmount() == null) payment.setTdsAmount(new BigDecimal(0)); //search for nested payment in the list iQuery = ds.createQuery(InwardEntity.class).disableValidation().filter("id", invoiceOid).filter("estimatePayments.id", new ObjectId(payment.getId().toString())); UpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class) .set("estimatePayments.$.paymentDate", payment.getPaymentDate()) .set("estimatePayments.$.paymentAmount", payment.getPaymentAmount()) .set("estimatePayments.$.purposeTitle", payment.getPurposeTitle()) .set("estimatePayments.$.purposeDescription", payment.getPurposeDescription()) .set("estimatePayments.$.paymentMode", payment.getPaymentMode()) .set("estimatePayments.$.paymentAccount", payment.getPaymentAccount()) .set("estimatePayments.$.tdsRate", payment.getTdsRate()) .set("estimatePayments.$.tdsAmount", payment.getTdsAmount()) .set("estimatePayments.$.isTdsReceived", payment.isTdsReceived()) .set("estimateAdvancetotal",advanceTotal) .set("invoiceAdvancetotal", invoiceAdvance) .set("invoiceBalance", balance); UpdateResults result = ds.update(iQuery, ops, false); if(result.getUpdatedCount() == 0) throw new EntityException(512, "update failed", null, null); } catch(EntityException e) { throw e; } catch(Exception e) { throw new EntityException(500, null, e.getMessage(), null); } return payment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "private void PayBill() {\r\n Cursor crsrBillDetail = dbBillScreen.getBillDetailByCustomer(iCustId, 2, Float.parseFloat(tvBillAmount.getText().toString()));\r\n if (crsrBillDetail.moveToFirst()) {\r\n strPaymentStatus = \"Paid\";\r\n PrintNewBill(businessDate, 1);\r\n } else {\r\n if (strPaymentStatus== null || strPaymentStatus.equals(\"\"))\r\n strPaymentStatus = \"CashOnDelivery\";\r\n\r\n\r\n ArrayList<AddedItemsToOrderTableClass> orderItemList = new ArrayList<>();\r\n int taxType =0;\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n int menuCode =0;\r\n String itemName= \"\";\r\n double quantity=0.00;\r\n double rate=0.00;\r\n double igstRate=0.00;\r\n double igstAmt=0.00;\r\n double cgstRate=0.00;\r\n double cgstAmt=0.00;\r\n double sgstRate=0.00;\r\n double sgstAmt=0.00;\r\n double cessRate=0.00;\r\n double cessAmt=0.00;\r\n double subtotal=0.00;\r\n double billamount=0.00;\r\n double discountamount=0.00;\r\n\r\n TableRow RowBillItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n\r\n // Item Number\r\n if (RowBillItem.getChildAt(0) != null) {\r\n CheckBox ItemNumber = (CheckBox) RowBillItem.getChildAt(0);\r\n menuCode = (Integer.parseInt(ItemNumber.getText().toString()));\r\n }\r\n\r\n // Item Name\r\n if (RowBillItem.getChildAt(1) != null) {\r\n TextView ItemName = (TextView) RowBillItem.getChildAt(1);\r\n itemName = (ItemName.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Quantity\r\n if (RowBillItem.getChildAt(3) != null) {\r\n EditText Quantity = (EditText) RowBillItem.getChildAt(3);\r\n String qty_str = Quantity.getText().toString();\r\n double qty_d = 0.00;\r\n if(qty_str==null || qty_str.equals(\"\"))\r\n {\r\n Quantity.setText(\"0.00\");\r\n }else\r\n {\r\n qty_d = Double.parseDouble(qty_str);\r\n }\r\n quantity = (Double.parseDouble(String.format(\"%.2f\",qty_d)));\r\n\r\n }\r\n\r\n // Rate\r\n if (RowBillItem.getChildAt(4) != null) {\r\n EditText Rate = (EditText) RowBillItem.getChildAt(4);\r\n String rate_str = Rate.getText().toString();\r\n double rate_d = 0.00;\r\n if((rate_str==null || rate_str.equals(\"\")))\r\n {\r\n Rate.setText(\"0.00\");\r\n }else\r\n {\r\n rate_d = Double.parseDouble(rate_str);\r\n }\r\n rate = (Double.parseDouble(String.format(\"%.2f\",rate_d)));\r\n\r\n }\r\n\r\n\r\n // Service Tax Percent\r\n\r\n if(chk_interstate.isChecked()) // IGST\r\n {\r\n cgstRate =0;\r\n cgstAmt =0;\r\n sgstRate =0;\r\n sgstAmt =0;\r\n if (RowBillItem.getChildAt(23) != null) {\r\n TextView iRate = (TextView) RowBillItem.getChildAt(23);\r\n igstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iRate.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(24) != null) {\r\n TextView iAmt = (TextView) RowBillItem.getChildAt(24);\r\n igstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iAmt.getText().toString())));\r\n }\r\n\r\n\r\n }else // CGST+SGST\r\n {\r\n igstRate =0;\r\n igstAmt =0;\r\n if (RowBillItem.getChildAt(15) != null) {\r\n TextView ServiceTaxPercent = (TextView) RowBillItem.getChildAt(15);\r\n sgstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxPercent.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(16) != null) {\r\n TextView ServiceTaxAmount = (TextView) RowBillItem.getChildAt(16);\r\n sgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxAmount.getText().toString())));\r\n }\r\n\r\n // Sales Tax %\r\n if (RowBillItem.getChildAt(6) != null) {\r\n TextView SalesTaxPercent = (TextView) RowBillItem.getChildAt(6);\r\n cgstRate = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxPercent.getText().toString())));\r\n }\r\n // Sales Tax Amount\r\n if (RowBillItem.getChildAt(7) != null) {\r\n TextView SalesTaxAmount = (TextView) RowBillItem.getChildAt(7);\r\n cgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxAmount.getText().toString())));\r\n }\r\n }\r\n if (RowBillItem.getChildAt(25) != null) {\r\n TextView cessRt = (TextView)RowBillItem.getChildAt(25);\r\n if(!cessRt.getText().toString().equals(\"\"))\r\n cessRate = Double.parseDouble(cessRt.getText().toString());\r\n }\r\n if (RowBillItem.getChildAt(26) != null) {\r\n TextView cessAt = (TextView)RowBillItem.getChildAt(26);\r\n if(!cessAt.getText().toString().equals(\"\"))\r\n cessAmt = Double.parseDouble(cessAt.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Tax Type\r\n if (RowBillItem.getChildAt(13) != null) {\r\n TextView TaxType = (TextView) RowBillItem.getChildAt(13);\r\n taxType = (Integer.parseInt(TaxType.getText().toString()));\r\n }\r\n // subtotal\r\n subtotal = (rate*quantity) + igstAmt+cgstAmt+sgstAmt;\r\n\r\n AddedItemsToOrderTableClass orderItem = new AddedItemsToOrderTableClass( menuCode, itemName, quantity, rate,\r\n igstRate,igstAmt, cgstRate, cgstAmt, sgstRate,sgstAmt, rate*quantity,subtotal, billamount,cessRate,cessAmt,discountamount);\r\n orderItemList.add(orderItem);\r\n }\r\n\r\n Bundle bundle = new Bundle();\r\n bundle.putDouble(Constants.TOTALBILLAMOUNT, Double.parseDouble(tvBillAmount.getText().toString()));\r\n bundle.putDouble(Constants.TAXABLEVALUE, Double.parseDouble(tvSubTotal.getText().toString()));\r\n\r\n// bundle.putDouble(Constants.ROUNDOFFAMOUNT, Double.parseDouble(edtRoundOff.getText().toString()));\r\n if (tvOthercharges.getText().toString().isEmpty()) {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n } else {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n }\r\n bundle.putDouble(Constants.DISCOUNTAMOUNT, Double.parseDouble(tvDiscountAmount.getText().toString()));\r\n bundle.putInt(Constants.TAXTYPE, isForwardTaxEnabled);\r\n //bundle.putInt(CUSTID, Integer.parseInt(tvCustId.getText().toString()));\r\n bundle.putString(Constants.PHONENO, edtCustPhoneNo.getText().toString());\r\n bundle.putParcelableArrayList(Constants.ORDERLIST, orderItemList);\r\n if (chk_interstate.isChecked()) {\r\n double igstAmount = Double.parseDouble(tvIGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, igstAmount + cessAmount);\r\n } else {\r\n double sgstAmount = Double.parseDouble(tvSGSTValue.getText().toString());\r\n double cgstAmount = Double.parseDouble(tvCGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, cgstAmount + sgstAmount + cessAmount);\r\n }\r\n\r\n fm = getSupportFragmentManager();\r\n proceedToPayBillingFragment = new PayBillFragment();\r\n proceedToPayBillingFragment.initProceedToPayListener(this);\r\n proceedToPayBillingFragment.setArguments(bundle);\r\n proceedToPayBillingFragment.show(fm, \"Proceed To Pay\");\r\n\r\n /* Intent intentTender = new Intent(myContext, PayBillActivity.class);\r\n intentTender.putExtra(\"TotalAmount\", tvBillAmount.getText().toString());\r\n intentTender.putExtra(\"CustId\", edtCustId.getText().toString());\r\n intentTender.putExtra(\"phone\", edtCustPhoneNo.getText().toString());\r\n intentTender.putExtra(\"USER_NAME\", strUserName);\r\n intentTender.putExtra(\"BaseValue\", Float.parseFloat(tvSubTotal.getText().toString()));\r\n intentTender.putExtra(\"ORDER_DELIVERED\", strOrderDelivered);\r\n intentTender.putExtra(\"OtherCharges\", Double.parseDouble(tvOthercharges.getText().toString()));\r\n intentTender.putExtra(\"TaxType\", taxType);// forward/reverse\r\n intentTender.putParcelableArrayListExtra(\"OrderList\", orderItemList);\r\n startActivityForResult(intentTender, 1);*/\r\n //mSaveBillData(2, true);\r\n //PrintNewBill();\r\n }\r\n\r\n /*int iResult = dbBillScreen.deleteKOTItems(iCustId, String.valueOf(jBillingMode));\r\n Log.d(\"Delivery:\", \"Items deleted from pending KOT:\" + iResult);*/\r\n\r\n //ClearAll();\r\n //Close(null);\r\n }", "public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }", "public void changeDownPayment() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\t//modify down-payment\n\t\tdouble dwnpymnt = 1200.00;\n\t\tnew_page.findElement(By.name(\"downpayment\")).clear();\n\t\tnew_page.findElement(By.name(\"downpayment\")).sendKeys(\"1200.00\");\n\t\t\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\tint year = Integer.valueOf(new_page.findElement(By.name(\"year\")).getAttribute(\"value\"));\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "private void updateTotal() {\n int total = table.getTotal();\n vip.setConsumption(total);\n if (total > 0)\n payBtn.setText(PAY + RMB + total);\n else if (total == 0)\n payBtn.setText(PAY);\n }", "@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}", "private void updateFields(){\n\n updateTotalPay();\n updateTotalTip();\n updateTotalPayPerPerson();\n }", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "public void totalBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\t\r\n\t\tBigDecimal runningSum = new BigDecimal(\"0\");\r\n\t\tBigDecimal runningTaxSum = new BigDecimal(\"0\");\r\n\t\t\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\t\r\n\t\t\trunningTaxSum = BigDecimal.valueOf(0);\r\n\t\t\t\r\n\t\t\tBigDecimal totalBeforeTax = new BigDecimal(String.valueOf(this.ItemsList.get(i).getPrice()));\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(totalBeforeTax);\r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isSalesTaxable()){\r\n\t\t\t\r\n\t\t\t BigDecimal salesTaxPercent = new BigDecimal(\".10\");\r\n\t\t\t BigDecimal salesTax = salesTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t salesTax = round(salesTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(salesTax);\r\n\t\t\t \r\n \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isImportedTaxable()){\r\n\r\n\t\t\t BigDecimal importTaxPercent = new BigDecimal(\".05\");\r\n\t\t\t BigDecimal importTax = importTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t importTax = round(importTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(importTax);\r\n\t\t\t \r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tItemsList.get(i).setPrice(runningTaxSum.floatValue() + ItemsList.get(i).getPrice());\r\n\t\t\r\n\t\t\ttaxTotal += runningTaxSum.doubleValue();\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(runningTaxSum);\r\n\t\t}\r\n\t\t\ttaxTotal = roundTwoDecimals(taxTotal);\r\n\t\t\ttotal = runningSum.doubleValue();\r\n\t}", "private void makeDeductionsfromPayments(int walletid, int due,int bal,ArrayList<Integer> l) {\n\t\tArrayList<Integer> l1=l;\n\t\tint toPay=due;\n\t\tint pocket=bal;\n\t\tint id=walletid;\n\t\tint deduction=pocket-toPay;\n\t\tString str=\"update wallet set balance=\"+deduction+\" where walletId=\"+id;\n\t\ttry {\n\t\t\tint count=stmt.executeUpdate(str);\n\t\t\n\t\t\t\tupdateOrders(id,l1);\n\t\t\t\tupdatePayments(id,toPay);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "@Override\n public void calculatePayment()\n {\n this.paymentAmount = annualSalary / SALARY_PERIOD;\n }", "public void payFees(int fees) {\n feesPaid += fees;\n School.updateTotalMoneyEarned(feesPaid);\n }", "@Override\r\n\tpublic double depositDao(double money) throws EwalletException {\n\t\ttemp.setCustBal(temp.getCustBal()+money);\r\n\t\ttry {\r\n\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Depsoited Amount :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\treturn temp.getCustBal();\r\n\t\t\r\n\t}", "private static void updateTotals()\r\n\t{\r\n\t\ttaxAmount = Math.round(subtotalAmount * salesTax / 100.0);\r\n\t\ttotalAmount = subtotalAmount + taxAmount;\r\n\t}", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text.setText(CURR + discount.toString());\n\t\tthis.toPay.text.setText(CURR+subtotal.toString());\n\t}", "@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}", "public static void updateManualEncumAppAmt(EscmProposalMgmt proposalmgmt, Boolean iscancel) {\n\n try {\n EscmProposalMgmt baseProposalObj = proposalmgmt.getEscmBaseproposal();\n OBContext.setAdminMode();\n List<EscmProposalmgmtLine> prolineList = proposalmgmt.getEscmProposalmgmtLineList();\n // checking with propsal line\n if (baseProposalObj == null) {\n for (EscmProposalmgmtLine proposalline : prolineList) {\n if (!proposalline.isSummary()) {\n EfinBudgetManencumlines encline = proposalline.getEfinBudgmanencumline();\n if (encline != null) {\n if (\"PAWD\".equals(proposalmgmt.getProposalstatus())) {\n encline.setAPPAmt(encline.getAPPAmt().subtract(proposalline.getAwardedamount()));\n } else {\n encline.setAPPAmt(encline.getAPPAmt().subtract(proposalline.getLineTotal()));\n }\n OBDal.getInstance().save(encline);\n }\n if (iscancel) {\n // BidManagementDAO.insertEncumbranceModification(encline,\n // proposalline.getLineTotal().negate(), null, \"PRO\", null, null);\n } else {\n proposalline.setEfinBudgmanencumline(null);\n OBDal.getInstance().save(proposalline);\n }\n }\n }\n } else if (baseProposalObj != null) {\n for (EscmProposalmgmtLine lines : prolineList) {\n if (!lines.isSummary()) {\n if (lines.getStatus() == null) {\n EfinBudgetManencumlines encline = lines.getEscmOldProposalline()\n .getEfinBudgmanencumline();\n // if reserved then consider new proposal line total\n BigDecimal amountDiffernce = lines.getEscmOldProposalline().getLineTotal()\n .subtract(lines.getLineTotal());\n\n // update in remaining amount\n EfinBudgetManencumlines encumLn = Utility.getObject(EfinBudgetManencumlines.class,\n encline.getId());\n encumLn.setAPPAmt(encumLn.getAPPAmt().add(amountDiffernce));\n encumLn.setRemainingAmount(encumLn.getRemainingAmount().subtract(amountDiffernce));\n OBDal.getInstance().save(encumLn);\n } else if (lines.getStatus() != null && lines.getEscmOldProposalline() != null\n && lines.getEscmOldProposalline().getStatus() == null) {\n EfinBudgetManencumlines encline = lines.getEscmOldProposalline()\n .getEfinBudgmanencumline();\n // if reserved then consider new proposal line total\n BigDecimal amountDiffernce = lines.getEscmOldProposalline().getLineTotal();\n\n // update in remaining amount\n EfinBudgetManencumlines encumLn = Utility.getObject(EfinBudgetManencumlines.class,\n encline.getId());\n encumLn.setAPPAmt(encumLn.getAPPAmt().add(amountDiffernce));\n encumLn.setRemainingAmount(encumLn.getRemainingAmount().subtract(amountDiffernce));\n OBDal.getInstance().save(encumLn);\n }\n }\n }\n }\n\n } catch (final Exception e) {\n log.error(\"Exception in updateManualEncumAppAmt after Reject : \", e);\n } finally {\n OBContext.restorePreviousMode();\n }\n }", "public void setBalance(double bal){\n balance = bal;\r\n }", "void updateBalance(int amount){ \n\t\tbalance = amount;\n\t}", "public void updateDisplay(View view) {\n if(!EditText_isEmpty(total_bill) && !EditText_isEmpty(tip)) {\n float total_bill_value = Float.valueOf(total_bill.getText().toString());\n float tip_value = Float.valueOf(tip.getText().toString());\n float total_to_pay_value = total_bill_value * (1+tip_value/100);\n total_to_pay.setText(\"$\" + String.format(\"%.2f\", total_to_pay_value));\n\n float total_tip_value = total_bill_value * (tip_value/100);\n total_tip.setText(\"$\" + String.format(\"%.2f\", total_tip_value));\n\n if(!EditText_isEmpty(split_bill)) {\n float split_bill_value = Float.valueOf(split_bill.getText().toString());\n float total_per_person_value = total_to_pay_value/split_bill_value;\n total_per_person.setText(\"$\" + String.format(\"%.2f\", total_per_person_value));\n }\n }\n else {\n total_to_pay.setText(\"\");\n total_tip.setText(\"\");\n total_per_person.setText(\"\");\n }\n }", "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}", "public void calculatePayment() {}", "public void sumWholeBill(Bill bill) {\n if (bill.getProducts().isEmpty()) {\n throw new IllegalStateException(\"Bill does not have products\");\n }\n billSumFacade.saveNewBillSum(bill);\n logger.info(\"sum for bill id = \" + bill.getId_bill() + \" updated\");\n //:TODO update accounts balances\n //\n accountService.updateAccount(bill.getAccount().getId_account(),bill);\n var sum = billSumFacade.getSumBy(bill);\n accountRepository.updateAccountBalance(sum, bill.getAccount().getId_account());\n }", "private void billing_calculate() {\r\n\r\n // need to search patient before calculating amount due\r\n if (billing_fullNameField.equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"Must search for a patient first!\\nGo to the Search Tab.\",\r\n \"Need to Search Patient\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n if (MainGUI.pimsSystem.lookUpAppointmentDate(currentPatient).equals(\"\")){\r\n JOptionPane.showMessageDialog(this, \"No Appointment to pay for!\\nGo to Appointment Tab to make one.\",\r\n \"Nothing to pay for\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n\r\n // patient has been searched - get info from patient info panel\r\n else {\r\n\r\n currentPatient = MainGUI.pimsSystem.patient_details\r\n (pInfo_lastNameTextField.getText(), Integer.parseInt(pInfo_ssnTextField.getText()));\r\n // patient has a policy, amount due is copay: $50\r\n // no policy, amount due is cost amount\r\n double toPay = MainGUI.pimsSystem.calculate_charge(currentPatient, billing_codeCB.getSelectedItem().toString());\r\n billing_amtDueField.setText(\"$\" + doubleToDecimalString(toPay));\r\n\r\n\r\n\r\n JOptionPane.showMessageDialog(this, \"Amount Due Calculated.\\nClick \\\"Ok\\\" to go to Payment Form\",\r\n \"Calculate\", JOptionPane.DEFAULT_OPTION);\r\n\r\n paymentDialog.setVisible(true);\r\n }\r\n\r\n }", "private void updateTotal()\n {\n if(saleItems != null)\n {\n double tempVal = 0;\n\n for(int i = 0; i < saleItems.size(); i++)\n {\n if(saleItems.get(i) != null)\n {\n tempVal += saleItems.get(i).getPrice() * saleItems.get(i).getQuantity();\n }\n }\n totalText.setText(moneyFormat(String.valueOf(tempVal)));\n }\n }", "public void deposit(BigDecimal deposit){\n balance = balance.add(deposit);\n }", "public void spendAllMoney() {\n\t\tcurrentBalance = 0;\n\t}", "@Override\n\tpublic void update(BillDTO billDTO) {\n\t\tBill bill = billDao.get(billDTO.getId());\n\t\tif(bill != null) {\n\t\t\tbill.setPriceTotal(billDTO.getPriceTotal());\n\t\t\tbill.setDiscountPersent(billDTO.getDiscountPercent());\n\t\t\tbill.setStatus(billDTO.getStatus());\n\t\t\tbill.setPay(billDTO.getPay());\n\t\t\t\n\t\t\tbillDao.update(bill);\n\t\t}\n\t}", "@Override\n public void notifyUpdate() {\n Update();\n //Invia all'activity di questo frammento il totale speso per aggiornare la sezione di controllo del budget\n onSendTotSpent.ReceiveTotSpent(contactGiftAdapter.totSpent());\n }", "public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }", "public void calculatePayment() {\n\t\tdouble pay = this.annualSalary / NUM_PAY_PERIODS;\n\t\tsuper.setPayment(pay);\n\t}", "void payBills();", "public void updateModeloPagoLaboratorio() throws Exception{\n ArrayList<Pago> pgAbono = PagoDB.listarPagosDePlanTratamientoLab(tratamientotoSelected.getIdPlanTratamiento());\n \n \n int m = this.columnasNombrePagoLab.length;\n ArrayList<Object []> objetos = new ArrayList<Object []>();\n String aux = this.costoAbono.getText();\n int total = Integer.parseInt(aux.substring(1, aux.length()));\n for(Pago pagAbn : pgAbono){\n\n String tipoPago = pagAbn.getTipoPago();\n String detalle = pagAbn.getDetalle();\n String fecha = girarFecha(pagAbn.getFecha());\n String valor = pagAbn.getAbono()+\"\";\n int numBoleta = pagAbn.getNumBoleta();\n total = total + pagAbn.getAbono();\n Object [] fila = new Object [] {new Item (tipoPago,pagAbn.getIdPago()), detalle, fecha, \"$\"+valor, numBoleta+\"\"};\n objetos.add(fila);\n \n }\n costoAbono.setText(\"$\"+total);\n int id = tratamientotoSelected.getIdPlanTratamiento();\n PlanTratamiento planTrat = PlanTratamientoDB.getPlanTratamiento(id);\n planTrat.setTotalAbonos(total);\n //calculando el porcentaje de abance\n int cosTotal=tratamientotoSelected.getCostoTotal();\n int avance= total*100/cosTotal;\n planTrat.setAvance(avance);\n \n PlanTratamientoDB.editarPlanTratamiento(planTrat);\n //System.out.println(\"total 1:\"+total+\"id:\"+id);\n \n this.filasPagoLab = new Object [objetos.size()][m];\n int i = 0;\n for(Object [] o : objetos){\n this.filasPagoLab[i] = o;\n i++;\n }\n \n this.modeloPagoLab = new DefaultTableModel(this.filasPagoLab, this.columnasNombrePagoLab) {\n Class[] types = new Class [] {\n String.class, Item.class, String.class, String.class, String.class\n };\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n };\n \n this.tablaPagoLaboratorio.setModel(modeloPagoLab);\n \n this.iniciarTablaPlanesTratamientos();\n //habilitarBoton();\n }", "public void add_bet_money(List<coins> bet,List<coins> currentmoney){\n\t\tfor(int i=0;i<currentmoney.size();i++) {\n\t\t\tcurrentmoney.get(i).qtt+=bet.get(i).qtt;\n\t\t}\n }", "public void updateAccount() {\r\n\t\t\r\n\t\t//update all totals\r\n\t\ttotalYouOwe = 0.0;\r\n\t\ttotalOwedToYou = 0.0;\r\n\t\tbalance = 0.0;\r\n\t\tnetBalance = 0.0;\r\n\t\t\r\n\t\t//totalYouOwe and totalOwedToYou\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.isParticipantByGID(GID)) {\r\n\t\t\t\tif (e.getParticipantByGID(GID).getBalance() > 0) {\r\n\t\t\t\t\ttotalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); \r\n\t\t\t\t} else {\r\n\t\t\t\t\ttotalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//netBalance/balance - the same in current implementation\r\n\t\tnetBalance = totalOwedToYou - totalYouOwe;\r\n\t\tbalance = totalOwedToYou - totalYouOwe;\r\n\t\t\r\n\t\tupdatePastRelations();\r\n\t}", "public static void deposit(){\n TOTALCMONEY = TOTALCMONEY + BALANCEDEPOSIT; //the cashier money equals the cashier money plus the amount that is being deposited\r\n BALANCE = BALANCE + BALANCEDEPOSIT; //the user balance equals the user balance plus the amount that is being deposited\r\n }", "public static void updatePayment(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects SET tot_paid = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setDouble(1, NewProject.tot_paid);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void setPayAmt (BigDecimal PayAmt);", "public MaintenanceRequest applyMarkUp(MaintenanceRequest po, BigDecimal markUp){\t\t\n\t\tBigDecimal lineMarkUp;\n\t\tBigDecimal lineRechargeTotal;\n\t\tList<MaintenanceRequestTask> allLines;\n\t\tList<MaintenanceRequestTask> rechargeableLines = new ArrayList<MaintenanceRequestTask>();\n\t\t\n\t\tallLines = po.getMaintenanceRequestTasks();\n\t\tfor(MaintenanceRequestTask line : allLines){\n\t\t\tif(MALUtilities.convertYNToBoolean(line.getRechargeFlag())){\n\t\t\t\trechargeableLines.add(line);\n\t\t\t} else {\n\t\t\t\tline.setMarkUpAmount(null);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(MaintenanceRequestTask line : rechargeableLines){\n\t\t\tlineMarkUp = markUp.divide(new BigDecimal(rechargeableLines.size()), 2, BigDecimal.ROUND_HALF_UP);\n\t\t\t\n\t\t\tif((rechargeableLines.indexOf(line) == rechargeableLines.size() - 1)){\n\t\t\t\tlineMarkUp = lineMarkUp.add(markUp.subtract(lineMarkUp.multiply(new BigDecimal(rechargeableLines.size()))));\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tline.setMarkUpAmount(lineMarkUp);\t\t\t\n\t\t\tline.setRechargeUnitCost(line.getUnitCost());\n\t\t\tline.setRechargeQty(line.getTaskQty());\n\t\t\t\n\t\t\tlineRechargeTotal = line.getRechargeUnitCost();\n\t\t\tlineRechargeTotal = lineRechargeTotal.multiply(line.getRechargeQty()).setScale(2, BigDecimal.ROUND_HALF_UP);\n\t\t\tlineRechargeTotal = lineRechargeTotal.add(lineMarkUp);\n\t\t\tline.setRechargeTotalCost(lineRechargeTotal);\n\t\t\t\n\t\t}\t\t\t\n\t\t\n\t\treturn po;\n\t}", "public void applyInterest()\n {\n deposit( (getBalance()* getInterestRate()) /12);\n }", "private void fillPoDet(String[][] oldItmList, String[][] newItmList){\n \tpoDet=new inventorycontroller.function.PurchaseOrderProcessor(dbInterface1)\n \t .preparePO(oldItmList, newItmList);\n \t\n \tjTable3.setModel(new javax.swing.table.DefaultTableModel(\n poDet,\n new String [] {\n \"Sl No.\", \"Item\", \"Qty.\", \"Rate\", \"Amount\", \n \"Discount (Rs.)\", \"Discount (%)\", \n \"Surcharge (Rs.)\", \"Surcharge (%)\", \n \"Excise Duty (Rs.)\", \"Excise Duty (%)\", \n \"VAT (Rs.)\", \"VAT (%)\", \"CST (Rs.)\", \"CST (%)\", \n \"Freight / Insurance (Rs.)\", \"Freight / Insurance (%)\", \n \"Net Amount\"\n }\n ) {\n public Class getColumnClass(int columnIndex) {\n //return poDetType[columnIndex];\n return java.lang.String.class;\n }\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return poDetEditable[columnIndex];\n }\n });\n jTable3.getModel().addTableModelListener(new javax.swing.event.TableModelListener(){\n \tpublic void tableChanged(javax.swing.event.TableModelEvent evt){\n \t\tjTable3.getModel().removeTableModelListener(this);\n \t\tpoTableEdited(evt);\n \t\tjTable3.getModel().addTableModelListener(this);\n \t}\n });\n for (int i = 0; i<oldItmList.length; i++){\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][2]), i, 3);\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][3]), i, 5);\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][4]), i, 7);\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][5]), i, 9);\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][6]), i, 11);\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][7]), i, 13);\n \tjTable3.getModel().setValueAt(new String(oldItmList[i][8]), i, 15);\n \t\n }\n }", "private void release() {\n int index = claimClientNameCombobox.getSelectionModel().getSelectedIndex();\n String lastNameInput = clientName.get(index).getName();\n setSelectedJobID(clientName.get(index).getJobID());\n\n// Regular expression that splits the name into last name and first name by removing the punctuation.\n// Documentation reference: https://docs.oracle.com/javase/8/docs/api/\n String[] lastName = lastNameInput.split(\"[\\\\p{P}{1}]\");\n Double amountPaidBefore = 0.0, amountPaidCurrent = 0.0;\n\n try {\n amountPaidCurrent = Double.parseDouble(amountPaidTextfield.getText());\n\n } catch (NumberFormatException e) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(\"Invalid Input\");\n alert.setContentText(\"Please settle your balance first before releasing your order\");\n alert.showAndWait();\n return;\n }\n\n StringBuilder stringBuilder = new StringBuilder();\n Formatter formatter = new Formatter(stringBuilder);\n\n// use trim method to remove leading whitespace from the split method earlier\n formatter.format(\"SELECT transaction_records.amountPaid FROM transaction_records JOIN customer_records ON transaction_records.customerID = customer_records.customerID WHERE customer_records.lastname='%s' AND customer_records.firstname='%s' AND transaction_records.status='for claiming' AND transaction_records.jobID=%d\", lastName[0].trim(), lastName[1].trim(), getSelectedJobID());\n\n try {\n rs = conn.select(stringBuilder.toString());\n\n while (rs.next()) {\n amountPaidBefore = rs.getDouble(\"amountPaid\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n Double totalAmountPaid = amountPaidBefore + amountPaidCurrent;\n\n stringBuilder = new StringBuilder();\n formatter = new Formatter(stringBuilder);\n formatter.format(\"UPDATE transaction_records JOIN customer_records ON transaction_records.customerID=customer_records.customerID SET transaction_records.status='claimed', transaction_records.amountPaid=%f, transaction_records.balance = 0 WHERE customer_records.lastname='%s' AND customer_records.firstname='%s' AND transaction_records.status='for claiming' AND transaction_records.jobID=%d\", totalAmountPaid, lastName[0].trim(), lastName[1].trim(), getSelectedJobID());\n\n\n try {\n conn.update(stringBuilder.toString());\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n homeController.fillObservableList();\n\n orderInformationArea.setText(\"Job successfully released...\");\n orderInformationArea.appendText(\"\\nTransaction saved...\");\n remainingBalance = 0;\n }", "public void updateStudentFees(double fees){\n feesPaid+=fees;\n school.updateMoneyEarned(feesPaid);\n }", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "@Override\r\n\tpublic void registEstimateDetail(List<EstimateTO> estimateList, List<EstimateDetailTO> estimateDetailList) {\n\t\tSystem.out.println(\"b\");\r\n\t\testimateApplicationService.batchEstimate(estimateList,estimateDetailList);\r\n\t}", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "@Override\r\n\tpublic int modify(PaymentPO po) {\n\t\treturn 0;\r\n\t}", "private void update() {\n\n\t\tfloat shopping = Float.parseFloat(label_2.getText());\n\t\tfloat giveing = Float.parseFloat(label_5.getText());\n\t\tfloat companyDemand = Float.parseFloat(label_7.getText());\n\n\t\ttry {\n\t\t\tPreparedStatement statement = DBConnection.connection\n\t\t\t\t\t.prepareStatement(\"update customer_list set Shopping_Account = \"\n\t\t\t\t\t\t\t+ shopping\n\t\t\t\t\t\t\t+ \" , Giving_Money_Account = \"\n\t\t\t\t\t\t\t+ giveing\n\t\t\t\t\t\t\t+ \", Company_demand = \"\n\t\t\t\t\t\t\t+ companyDemand\n\t\t\t\t\t\t\t+ \" where Name = '\"\n\t\t\t\t\t\t\t+ name\n\t\t\t\t\t\t\t+ \"' And Last_Name = '\"\n\t\t\t\t\t\t\t+ lastName + \"' \");\n\t\t\tstatement.execute();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "private void updateStandard(){\n\n // calculate bill total with a ten percent tip\n double tenPercentTip = currentBillTotal * .1;\n double tenPercentTotal = currentBillTotal + tenPercentTip;\n // set tip10EditText's text to tenPercentTip\n tip10EditText.setText(String.format(getString(R.string.two_dec_float), tenPercentTip));\n //set total10EditText's text to tenPercentTotal\n total10EditText.setText(String.format(getString(R.string.two_dec_float), tenPercentTotal));\n\n // calculate bill total with a fifteen percent tip\n double fifteenPercentTip = currentBillTotal * .15;\n double fifteenPercentTotal = currentBillTotal + fifteenPercentTip;\n // set tip15EditText's text to fifteenPercentTip\n tip15EditText.setText(String.format(getString(R.string.two_dec_float), fifteenPercentTip));\n //set total15EditText's text to fifteenPercentTotal\n total15EditText.setText(String.format(getString(R.string.two_dec_float), fifteenPercentTotal));\n\n // calculate bill total with a twenty percent tip\n double twentyPercentTip = currentBillTotal * .20;\n double twentyPercentTotal = currentBillTotal + twentyPercentTip;\n // set tip20EditText's text to twentyPercentTip\n tip20EditText.setText(String.format(getString(R.string.two_dec_float), twentyPercentTip));\n //set total20EditText's text to twentyPercentTotal\n total20EditText.setText(String.format(getString(R.string.two_dec_float), twentyPercentTotal));\n\n }", "int updateBalance(CardVO cv) throws RemoteException;", "public double getTotalPayments(){return this.total;}", "public void updateModel()\n {\n if (beanModel instanceof EnterTillPayrollPayOutBeanModel)\n {\n EnterTillPayrollPayOutBeanModel model = (EnterTillPayrollPayOutBeanModel) beanModel;\n model.setAmount(amountField.getText());\n model.setSelectedReasonCode(reasonCodeField.getSelectedIndex());\n model.setPaidTo(paidToField.getText());\n model.setEmployeeID(employeeIDField.getText());\n model.setAddressLine(0, addressLine1Field.getText());\n model.setAddressLine(1, addressLine2Field.getText());\n model.setAddressLine(2, addressLine3Field.getText());\n model.setSelectedApprovalCodeIndex(approvalCodeField.getSelectedIndex());\n model.setComment(commentField.getText());\n }\n }", "private void calculate() {\n Log.d(\"MainActivity\", \"inside calculate method\");\n\n try {\n if (billAmount == 0.0);\n throw new Exception(\"\");\n }\n catch (Exception e){\n Log.d(\"MainActivity\", \"bill amount cannot be zero\");\n }\n // format percent and display in percentTextView\n textViewPercent.setText(percentFormat.format(percent));\n\n if (roundOption == 2) {\n tip = Math.ceil(billAmount * percent);\n total = billAmount + tip;\n }\n else if (roundOption == 3){\n tip = billAmount * percent;\n total = Math.ceil(billAmount + tip);\n }\n else {\n // calculate the tip and total\n tip = billAmount * percent;\n\n //use the tip example to do the same for the Total\n total = billAmount + tip;\n }\n\n // display tip and total formatted as currency\n //user currencyFormat instead of percentFormat to set the textViewTip\n tipAmount.setText(currencyFormat.format(tip));\n\n //use the tip example to do the same for the Total\n totalAmount.setText(currencyFormat.format(total));\n\n double person = total/nPeople;\n perPerson.setText(currencyFormat.format(person));\n }", "public double pay(double amountPaid,String currency){\n \n saleDTO = sale.createSaleDTO();\n paymentDTO = new PaymentDTO(amountPaid,currency);\n double change = Math.round((paymentDTO.getAmountPaid() - saleDTO.getTotalPrice()) * 100.0) / 100.0;\n\n cashRegister.updateAmountInRegister(amountPaid - change);\n return change;\n\n }", "public void update() {\n suggestions = model.getDebtRepaymentSuggestions();\n }", "@Test\n\tpublic void negativeDwnPymnt() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\t//modify down-payment\n\t\tdouble dwnpymnt = -1200.00;\n\t\tnew_page.findElement(By.name(\"downpayment\")).clear();\n\t\tnew_page.findElement(By.name(\"downpayment\")).sendKeys(\"-1200.00\");\n\t\t\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\tint year = Integer.valueOf(new_page.findElement(By.name(\"year\")).getAttribute(\"value\"));\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "public void setPriceListOld (BigDecimal PriceListOld);", "private void updateTaxAmount(BigDecimal newAmount, DemandDetailAndCollection latestDetailInfo) {\n\t\tBigDecimal diff = newAmount.subtract(latestDetailInfo.getTaxAmountForTaxHead());\n\t\tBigDecimal newTaxAmountForLatestDemandDetail = latestDetailInfo.getLatestDemandDetail().getTaxAmount()\n\t\t\t\t.add(diff);\n\t\tlatestDetailInfo.getLatestDemandDetail().setTaxAmount(newTaxAmountForLatestDemandDetail);\n\t}", "@Override\r\n\tpublic List<CoinsResponse> billsToCoinstRef(List<BillToExchange> lstBillToExchange) throws ExchangeMachineException {\n\t\t\r\n\t\tDouble dTotal = 0.0;\r\n\t\tList<CoinsResponse> lstCoinsResponse = new ArrayList<CoinsResponse>();\r\n\t\tString erroMessage = null;\r\n\t\t\r\n\t\tfor(BillToExchange billToExchange : lstBillToExchange) {\r\n\t\t\tdTotal = dTotal + (billToExchange.getBillQuantity() * billToExchange.getBillAmount().doubleValue());\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\t//Iterate over coins denomination for calculation\r\n\t\t\tcoinExchangeWrapper.setTotal(new BigDecimal(dTotal).setScale(2, RoundingMode.FLOOR));\r\n\t\t\tfor(CoinsDTO coins : coinsDispenser.getCoinsDispenser() ) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"Coin id : \" + coins.getId() + \" Denomination : \" + coins.getCoinDenomination() + \" Quantity : \" + coins.getCoinQuantity());\r\n\t\t\t\t\r\n\t\t\t\tif(coins.getCoinQuantity() > 0) {\r\n\t\t\t\t\tcoinExchangeWrapper.setCurrentCoinDenomination(coins.getCoinDenomination());\r\n\t\t\t\t\tcoinExchangeWrapper.setCurrentCoinQuantity(coins.getCoinQuantity());\r\n\t\t\t\t\tcoinExchangeWrapper.setMaxCoinQuantity(coins.getCoinMaxQuantity());\r\n\t\t\t\t\tgetCoinsCalculation(coinExchangeWrapper, lstCoinsResponse);\r\n\t\t\t\t\tcoins.setCoinQuantity(coinExchangeWrapper.getCurrentCoinQuantity());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Total Remain for Calculation : \" + coinExchangeWrapper.getTotal());\r\n\t\t\t\t\r\n\t\t\t\tif(coinExchangeWrapper.getTotal().compareTo(BigDecimal.ZERO) == 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Amount still not completed, needs to raise error\r\n\t\t\tif(coinExchangeWrapper.getTotal().compareTo(BigDecimal.ZERO) != 0) {\r\n\t\t\t\t//Raise exception\r\n\t\t\t\terroMessage = \"Not Enough coins to complete exchange\";\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tif(erroMessage != null) {\r\n\t\t\t\tthrow getExchangeMachineException(erroMessage, e);\r\n\t\t\t}else {\r\n\t\t\t\tthrow getExchangeMachineException(e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn lstCoinsResponse;\r\n\t}", "public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}", "public void deposit(double value){\r\n balance += value;\r\n}", "@Test\n\tpublic void changeNumYears() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tdouble dwnpymnt = Double.valueOf(new_page.findElement(By.name(\"downpayment\")).getAttribute(\"value\"));\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\t\n\t\t// modify number of payment years\n\t\tint year = 5;\n\t\tnew_page.findElement(By.name(\"year\")).clear();\n\t\tnew_page.findElement(By.name(\"year\")).sendKeys(\"5\");\n\t\t\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "@Override\r\n\tpublic double withdrawlDao(double money) throws EwalletException {\n\t\tif(money<temp.getCustBal()) {\r\n\t\t\ttemp.setCustBal(temp.getCustBal()-money);\r\n\t\t\ttry {\r\n\t\t\t\ttemp.settDetails(\"Date :\"+tDate+\" Amount Withdrawn :\"+money+\" Total Balance :\"+temp.getCustBal());\r\n\t\t\t} catch (Exception 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\tdao.updatedetails(temp.getAccNum(),temp);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\" Low Balance :( \");\r\n\t\t\treturn temp.getCustBal();\r\n\t}", "@Override\r\n public void update() {\r\n this.highestRevenueRestaurant = findHighestRevenueRestaurant();\r\n this.total = calculateTotal();\r\n }", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "private void updateCustomerCredit(BusinessPartner businessPartner, BigDecimal amount, boolean add) {\n OBDal.getInstance().refresh(businessPartner);\n BigDecimal creditUsed = businessPartner.getCreditUsed();\n if (add) {\n creditUsed = creditUsed.add(amount);\n } else {\n creditUsed = creditUsed.subtract(amount);\n }\n businessPartner.setCreditUsed(creditUsed);\n OBDal.getInstance().save(businessPartner);\n OBDal.getInstance().flush();\n }", "public void deposit(double depAmnt){\n try {\n String queryStr = \"update dummybank set amount = ? where accountNo = ?\";\n ps = con.prepareStatement(queryStr);\n ps.setDouble(1,this.amnt + depAmnt );\n ps.setString(2, accNo);\n ps.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(BankDBConnector.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }", "public void calculate(View v) {\n EditText inputBill = findViewById(R.id.inputBill);\n EditText inputTipPercent = findViewById(R.id.inputTipPercent);\n String num1Str = inputBill.getText().toString();\n String num2Str = inputTipPercent.getText().toString();\n\n // multiply Bill by Tip to get Tip in dollars\n double num1 = Double.parseDouble(num1Str);\n double num2 = Double.parseDouble(num2Str);\n double tipInDollar = num1 * (num2 / 100);\n double total = num1 + tipInDollar;\n\n // show tip in dollars\n TextView lblTipAmount = findViewById(R.id.lblTipAmount);\n lblTipAmount.setText(String.valueOf(tipInDollar));\n\n // show total price with tip included\n TextView lblTotalAmount = findViewById(R.id.lblTotalAmount);\n lblTotalAmount.setText(String.valueOf(total));\n }", "public void adjustPay(double percentage){\r\n this.commission = getCommission() + getCommission() * percentage;\r\n }", "public void setBalance(){\n balance.setBalance();\n }", "public void updateFeesPaid(int feesPaid) {\r\n\t\tthis.feesPaid += feesPaid;\r\n\t\tSchool.updateTotalMoneyEarned(feesPaid);\r\n\t}", "@Override\n public void updateBudgetPassed() {\n }", "private void CalculateTotalAmount() {\r\n\r\n double dSubTotal = 0, dTaxTotal = 0, dModifierAmt = 0, dServiceTaxAmt = 0, dOtherCharges = 0, dTaxAmt = 0, dSerTaxAmt = 0, dIGSTAmt=0, dcessAmt=0, dblDiscount = 0;\r\n float dTaxPercent = 0, dSerTaxPercent = 0;\r\n\r\n // Item wise tax calculation ----------------------------\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n TableRow RowItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n if (RowItem.getChildAt(0) != null) {\r\n\r\n TextView ColTaxType = (TextView) RowItem.getChildAt(13);\r\n TextView ColAmount = (TextView) RowItem.getChildAt(5);\r\n TextView ColDisc = (TextView) RowItem.getChildAt(9);\r\n TextView ColTax = (TextView) RowItem.getChildAt(7);\r\n TextView ColModifierAmount = (TextView) RowItem.getChildAt(14);\r\n TextView ColServiceTaxAmount = (TextView) RowItem.getChildAt(16);\r\n TextView ColIGSTAmount = (TextView) RowItem.getChildAt(24);\r\n TextView ColcessAmount = (TextView) RowItem.getChildAt(26);\r\n TextView ColAdditionalCessAmt = (TextView) RowItem.getChildAt(29);\r\n TextView ColTotalCessAmount = (TextView) RowItem.getChildAt(30);\r\n dblDiscount += Double.parseDouble(ColDisc.getText().toString());\r\n dTaxTotal += Double.parseDouble(ColTax.getText().toString());\r\n dServiceTaxAmt += Double.parseDouble(ColServiceTaxAmount.getText().toString());\r\n dIGSTAmt += Double.parseDouble(ColIGSTAmount.getText().toString());\r\n// dcessAmt += Double.parseDouble(ColcessAmount.getText().toString()) + Double.parseDouble(ColAdditionalCessAmt.getText().toString());\r\n dcessAmt += Double.parseDouble(ColTotalCessAmount.getText().toString());\r\n dSubTotal += Double.parseDouble(ColAmount.getText().toString());\r\n\r\n }\r\n }\r\n // ------------------------------------------\r\n\r\n // Bill wise tax Calculation -------------------------------\r\n Cursor crsrtax = dbBillScreen.getTaxConfig(1);\r\n if (crsrtax.moveToFirst()) {\r\n dTaxPercent = crsrtax.getFloat(crsrtax.getColumnIndex(\"TotalPercentage\"));\r\n dTaxAmt += dSubTotal * (dTaxPercent / 100);\r\n }\r\n Cursor crsrtax1 = dbBillScreen.getTaxConfig(2);\r\n if (crsrtax1.moveToFirst()) {\r\n dSerTaxPercent = crsrtax1.getFloat(crsrtax1.getColumnIndex(\"TotalPercentage\"));\r\n dSerTaxAmt += dSubTotal * (dSerTaxPercent / 100);\r\n }\r\n // -------------------------------------------------\r\n\r\n dOtherCharges = Double.valueOf(tvOthercharges.getText().toString());\r\n //String strTax = crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\"));\r\n if (crsrSettings.moveToFirst()) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"Tax\")).equalsIgnoreCase(\"1\")) {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxTotal + dServiceTaxAmt + dOtherCharges+dcessAmt));\r\n } else {\r\n\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dTaxAmt + dSerTaxAmt + dOtherCharges+dcessAmt));\r\n }\r\n } else {\r\n if (crsrSettings.getString(crsrSettings.getColumnIndex(\"TaxType\")).equalsIgnoreCase(\"1\")) {\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n\r\n } else {\r\n tvSubTotal.setText(String.format(\"%.2f\", dSubTotal));\r\n tvIGSTValue.setText(String.format(\"%.2f\", dIGSTAmt));\r\n tvCGSTValue.setText(String.format(\"%.2f\", dTaxTotal));\r\n tvSGSTValue.setText(String.format(\"%.2f\", dServiceTaxAmt));\r\n tvcessValue.setText(String.format(\"%.2f\",dcessAmt));\r\n\r\n\r\n if (chk_interstate.isChecked()) // interstate\r\n {\r\n tvIGSTValue.setTextColor(Color.WHITE);\r\n tvCGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvSGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n } else {\r\n tvIGSTValue.setTextColor(getResources().getColor(R.color.colorPrimaryLight));\r\n tvCGSTValue.setTextColor(Color.WHITE);\r\n tvSGSTValue.setTextColor(Color.WHITE);\r\n }\r\n tvBillAmount.setText(String.format(\"%.2f\", dSubTotal + dOtherCharges));\r\n }\r\n }\r\n tvDiscountAmount.setText(String.format(\"%.2f\", dblDiscount));\r\n }\r\n }", "void updateCoefficientForBets(ArrayList<Bet> bets) throws DAOException;", "private void processOnLoanData(long phAwal, long premiAmountSumUpCurrentValue){\n long count = phAwal+premiAmountSumUpCurrentValue;\n //LogUtility.logging(TAG,LogUtility.infoLog,\"processOnLoanData\",\"count\",count+\"\");\n pokokHutang.add(count);\n }", "public void deposit(double amount) {\n balance += amount;\n \n try {\n \n Class.forName(\"net.ucanaccess.jdbc.UcanaccessDriver\");\n \n // Load Driver\n String connURL=\"jdbc:ucanaccess://c:/Users/Ellen/Documents/CIST2373/ChattBankMDB.mdb\";\n \n // Get Connection\n Connection con = DriverManager.getConnection(connURL);\n \n // Create Statement\n Statement stmt = con.createStatement();\n \n // Create sql string \n String sql = \"Update Accounts set Balance = \"+getBalance()+ \n \" where AcctNo='\"+getAcctNo()+\"'\";\n \n // Check for properly formed sql\n System.out.println(sql);\n \n // Execute Statement\n int n = stmt.executeUpdate(sql);\n if (n == 1)\n System.out.println(\"Update was successful!\");\n else\n System.out.println(\"Update failed!\"); \n \n // Close Connection\n con.close(); \n } //end try\n \n catch (Exception err) {\n System.out.println(\"Error: \" + err);\n } //end catch\n }", "public static void main(String[] args) {\n SavingsAccount saver1=new SavingsAccount(2000);\n SavingsAccount saver2=new SavingsAccount(3000);\n int b,i;\n SavingsAccount.modifyInterestRate(4);//Enter this as a percentage number e.g 4 percent or 3.5 as oppposed to .04 or .035\n System.out.println(\"Here is the balance sheet for Saver 1: 4% Interest Rate\\n\");\n for(i=1;i<=12;i++) {//This is the list for saver 1\n\t saver1.calculateMonthlyInterest();\n\t System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver1.getSavingBalance()));\n }\n System.out.println(\"\\nHere is the balance sheet for saver 2: 4% Interest Rate\\n\");\n for(i=1;i<=12;i++) {\n\t saver2.calculateMonthlyInterest();\n System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver2.getSavingBalance()));\n }\n \n SavingsAccount.modifyInterestRate(5);//from here just copy and paste the saver1 and saver 2 loops\n System.out.println(\"Here is new balance sheet for Saver 1: 5% Interest Rate\\n\");\n for(i=1;i<=12;i++) {//This is the list for saver 1\n\t saver1.calculateMonthlyInterest();\n\t System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver1.getSavingBalance()));\n }\n System.out.println(\"\\nHere is new balance sheet for Saver 1: 5% Interest Rate\\\\n\");\n for(i=1;i<=12;i++) {\n\t saver2.calculateMonthlyInterest();\n System.out.println(\"Month\\t\"+i+String.format(\"\\t%2f\",saver2.getSavingBalance()));\n }\n \n \n\t}", "protected void setTotalBalance(double balance)\r\n {\r\n totalBalance = balance;\r\n }", "private void updateTotalPayment(BarcodedItem barcodedItem, int quantity) {\n\n\t\tBigDecimal price = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(barcodedItem.getBarcode())\n\t\t\t\t.getPrice().multiply(new BigDecimal(quantity));\n\t\n\t\t\n\t\tprice = price.setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\n\t\t\t\t\t\t\n\t\ttotalPayment = totalPayment.add(price);\n\t\t\n\t\tSystem.out.println(\"Total Payment = \" + totalPayment.toString());\n\t\n\t}", "public void updateMoney()\n\t\t{\n\t\t\t\n\t\t\tFPlayer p1 = this.viewer;\n\t\t\tFPlayer p2 = (p1.equals(this.t.p1)) ? this.t.p2 : this.t.p1;\n\t\t\t\n\t\t\tItemStack om = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tItemMeta it = om.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p1)),\"\",\"Click to add/remove money from trade\"}));\n\t\t\tom.setItemMeta(it);\n\t\t\t\n\t\t\tif (this.canAdd()) super.contents.put(0,new ItemSwapMenu(this,om,new MenuMoney(super.viewer,this.t)));\n\t\t\telse super.contents.put(0,new ItemDummy(this,om));\n\t\t\t\n\t\t\t// Trader money in trade\n\t\t\tItemStack tm = new ItemStack(Material.GREEN_WOOL,1);\n\t\t\tit = tm.getItemMeta();\n\t\t\tit.setDisplayName(ChatColor.DARK_GREEN+ChatColor.BOLD.toString()+\"Money in trade:\");\n\t\t\tit.setLore(Arrays.asList(new String[] {\"\",Util.getMoney(this.t.getMoneyTraded(p2))}));\n\t\t\ttm.setItemMeta(it);\n\t\t\tsuper.contents.put(8,new ItemDummy(this,tm));\n\t\t\tthis.composeInv();\n\t\t}", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "public void updateRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tTEMPLATE_ID = params.get(\"templateID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREB_EXPR = params.get(\"expr\");\n\t\tREB_CYCLES = params.get(\"cycles\");\n\t\tREB_AMOUNT = params.get(\"rebillAmount\");\n\t\tNEXT_AMOUNT = params.get(\"nextAmount\");\n\t\tAPI = \"bp20rebadmin\";\n\t}", "@Override\n public void newSale(double payment) {\n calculateTotalRevenue(payment);\n showTotalRevenue();\n }", "private static void recalculateSummary(Sheet sheet, Payment payment) {\r\n BigDecimal income =(BigDecimal) sheet.getCellAt(\"B1\").getValue();\r\n BigDecimal expense = (BigDecimal) sheet.getCellAt(\"B2\").getValue();\r\n BigDecimal sum = (BigDecimal) sheet.getCellAt(\"B3\").getValue();\r\n \r\n if (payment.getType() == PaymentType.INCOME){\r\n sum = sum.add(payment.getAmount());\r\n income = income.add(payment.getAmount());\r\n } else if (payment.getType() == PaymentType.EXPENSE){\r\n sum = sum.subtract(payment.getAmount());\r\n expense = expense.add(payment.getAmount());\r\n }\r\n \r\n sheet.getCellAt(\"B1\").setValue(income);\r\n sheet.getCellAt(\"B2\").setValue(expense);\r\n sheet.getCellAt(\"B3\").setValue(sum);\r\n }", "@Test\n\tpublic void defaultValues() {\n\t\tWebElement new_page = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tdouble dwnpymnt = Double.valueOf(new_page.findElement(By.name(\"downpayment\")).getAttribute(\"value\"));\n\t\tdouble interest = Double.valueOf(new_page.findElement(By.name(\"interest\")).getAttribute(\"value\"));\n\t\tint year = Integer.valueOf(new_page.findElement(By.name(\"year\")).getAttribute(\"value\"));\n\t\tdouble price_tax = Double.valueOf(new_page.findElement(By.name(\"price_with_taxes\")).getAttribute(\"value\"));\n\t\t\n\t\tdouble price_interest = priceWithInterest(price_tax, dwnpymnt, interest, year);\n\t\tint nMnths = numMonths(year);\n\t\tdouble ttl = totalPrice(price_interest, dwnpymnt);\n\t\tdouble ttl_per_mnth = totalPricePerMonth(price_interest, nMnths);\n\t\t\n\t\t// click calculate button\n\t\tnew_page.findElement(By.name(\"calculate_payment_button\")).click();\n\t\twait(2);\n\t\t\n\t\tWebElement solutions = wdriver.findElement(By.name(\"payment_form\"));\n\t\t\n\t\tDecimalFormat twoDForm = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertEquals(Double.valueOf(twoDForm.format(dwnpymnt)), Double.valueOf(solutions.findElement(By.id(\"total_downpayment\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl_per_mnth)), Double.valueOf(solutions.findElement(By.id(\"total_price_per_month\")).getAttribute(\"value\")));\n\t\tassertEquals(Integer.valueOf(nMnths), Integer.valueOf(solutions.findElement(By.id(\"n_of_months\")).getAttribute(\"value\")));\n\t\tassertEquals(Double.valueOf(twoDForm.format(ttl)), Double.valueOf(solutions.findElement(By.id(\"total_price\")).getAttribute(\"value\")));\n\t}", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "public void updatePrice(){\n\t\tprice = 0;\n\t\tfor (ParseObject selectedItem : selectedItems){\n\t\t\tprice += selectedItem.getInt(\"price\");\n\t\t}\n\n\t\tTextView orderTotal = (TextView) findViewById(R.id.orderTotal);\n\t\torderTotal.setText(\"$\" + price + \".00\");\n\t}", "private void calculateBill() {\n\t\tif (unit <= 100) {\r\n\t\t\tbill = unit * 5;\r\n\t\t}else if(unit<=200){\r\n\t\t\tbill=((unit-100)*7+500);\r\n\t\t}else if(unit<=300){\r\n\t\t\tbill=((unit-200)*10+1200);\r\n\t\t}else if(unit>300){\r\n\t\t\tbill=((unit-300)*15+2200);\r\n\t\t}\r\n\t\tSystem.out.println(\"EB amount is :\"+bill);\r\n\t}", "void setNewEstimates(double[] estimates);", "void updateCustomerDDPay(CustomerDDPay cddp);", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}" ]
[ "0.6348784", "0.6321908", "0.6321475", "0.63119197", "0.6299465", "0.62988275", "0.62988204", "0.62442505", "0.62217015", "0.6200442", "0.61923313", "0.61454755", "0.61300236", "0.6045736", "0.6030244", "0.59477854", "0.59386164", "0.5908328", "0.59067005", "0.59059197", "0.58968014", "0.5867693", "0.583022", "0.5823374", "0.5808217", "0.58052605", "0.57948637", "0.57695025", "0.57633126", "0.5756058", "0.5743983", "0.5731785", "0.5702068", "0.5698955", "0.5682237", "0.5680569", "0.5675427", "0.5667302", "0.565937", "0.5657956", "0.5653977", "0.56413245", "0.5636982", "0.5631305", "0.562453", "0.56201595", "0.56172186", "0.55944526", "0.5583119", "0.5580663", "0.55785024", "0.55778587", "0.55750406", "0.55720675", "0.55697864", "0.55651355", "0.55617064", "0.55600184", "0.55535126", "0.55527496", "0.55417764", "0.55399823", "0.55331343", "0.55319595", "0.5529712", "0.5527651", "0.5524907", "0.55232257", "0.55184495", "0.55132025", "0.55018747", "0.55013245", "0.55004406", "0.5492432", "0.5492325", "0.54887956", "0.54835516", "0.54776895", "0.5474963", "0.5471411", "0.5465451", "0.54652405", "0.54650676", "0.54649746", "0.5463415", "0.54593176", "0.54445285", "0.54411036", "0.54341745", "0.54327244", "0.54306597", "0.5430449", "0.54250944", "0.54230165", "0.5422686", "0.54189986", "0.5417437", "0.54160243", "0.54104656", "0.5409117" ]
0.58119875
24
/make changes in bill payment list, biladvtotal applies to both kind of bills
public OrderPayments updateInvoicePayment(OrderPayments payment, String invoiceNo, String companyId) throws EntityException { Datastore ds = null; Company cmp = null; InwardEntity invoice = null; ObjectId oid = null; ObjectId invoiceOid = null; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); invoiceOid = new ObjectId(invoiceNo); Query<InwardEntity> iQuery = ds.find(InwardEntity.class).filter("company",cmp).filter("isInvoice", true) .filter("id", invoiceOid); invoice = iQuery.get(); if(invoice == null) throw new EntityException(512, " invoice not found", null, null); //we need to sub old amt, and add new amt, so get old amt java.math.BigDecimal prevAmt = null; boolean match = false; //all deleted in between if(invoice.getInvoicePayments() == null) throw new EntityException(513, "payment not found", null, null); //always fetch payment prev amt from db, it may have changed in between for(OrderPayments pay : invoice.getInvoicePayments()) { if(pay.getId().toString().equals(payment.getId().toString())) { match = true; prevAmt = pay.getPaymentAmount(); break; } } if(match == false) throw new EntityException(513, "payment not found", null, null); //payment towards a bill, PO not affected in any way java.math.BigDecimal invoiceAdvance = invoice.getInvoiceAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount()); java.math.BigDecimal balance = invoice.getInvoiceBalance().add(prevAmt).subtract(payment.getPaymentAmount()); // or grand total - just set advance //if null then 0 if(payment.getTdsRate() == null) payment.setTdsRate(new BigDecimal(0)); if(payment.getTdsAmount() == null) payment.setTdsAmount(new BigDecimal(0)); //search for nested payment in the list iQuery = ds.createQuery(InwardEntity.class).disableValidation().filter("id", invoiceOid).filter("invoicePayments.id", new ObjectId(payment.getId().toString())); UpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class) .set("invoicePayments.$.paymentDate", payment.getPaymentDate()) .set("invoicePayments.$.paymentAmount", payment.getPaymentAmount()) .set("invoicePayments.$.purposeTitle", payment.getPurposeTitle()) .set("invoicePayments.$.purposeDescription", payment.getPurposeDescription()) .set("invoicePayments.$.paymentMode", payment.getPaymentMode()) .set("invoicePayments.$.paymentAccount", payment.getPaymentAccount()) .set("invoicePayments.$.tdsRate", payment.getTdsRate()) .set("invoicePayments.$.tdsAmount", payment.getTdsAmount()) .set("invoicePayments.$.isTdsReceived", payment.isTdsReceived()) .set("invoiceAdvancetotal", invoiceAdvance) .set("invoiceBalance", balance); UpdateResults result = ds.update(iQuery, ops, false); if(result.getUpdatedCount() == 0) throw new EntityException(512, "update failed", null, null); } catch(EntityException e) { throw e; } catch(Exception e) { throw new EntityException(500, null, e.getMessage(), null); } return payment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void totalBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\t\r\n\t\tBigDecimal runningSum = new BigDecimal(\"0\");\r\n\t\tBigDecimal runningTaxSum = new BigDecimal(\"0\");\r\n\t\t\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\t\r\n\t\t\trunningTaxSum = BigDecimal.valueOf(0);\r\n\t\t\t\r\n\t\t\tBigDecimal totalBeforeTax = new BigDecimal(String.valueOf(this.ItemsList.get(i).getPrice()));\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(totalBeforeTax);\r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isSalesTaxable()){\r\n\t\t\t\r\n\t\t\t BigDecimal salesTaxPercent = new BigDecimal(\".10\");\r\n\t\t\t BigDecimal salesTax = salesTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t salesTax = round(salesTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(salesTax);\r\n\t\t\t \r\n \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\tif(ItemsList.get(i).isImportedTaxable()){\r\n\r\n\t\t\t BigDecimal importTaxPercent = new BigDecimal(\".05\");\r\n\t\t\t BigDecimal importTax = importTaxPercent.multiply(totalBeforeTax);\r\n\t\t\t \r\n\t\t\t importTax = round(importTax, BigDecimal.valueOf(0.05), RoundingMode.UP);\r\n\t\t\t runningTaxSum = runningTaxSum.add(importTax);\r\n\t\t\t \r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tItemsList.get(i).setPrice(runningTaxSum.floatValue() + ItemsList.get(i).getPrice());\r\n\t\t\r\n\t\t\ttaxTotal += runningTaxSum.doubleValue();\r\n\t\t\t\r\n\t\t\trunningSum = runningSum.add(runningTaxSum);\r\n\t\t}\r\n\t\t\ttaxTotal = roundTwoDecimals(taxTotal);\r\n\t\t\ttotal = runningSum.doubleValue();\r\n\t}", "private void PayBill() {\r\n Cursor crsrBillDetail = dbBillScreen.getBillDetailByCustomer(iCustId, 2, Float.parseFloat(tvBillAmount.getText().toString()));\r\n if (crsrBillDetail.moveToFirst()) {\r\n strPaymentStatus = \"Paid\";\r\n PrintNewBill(businessDate, 1);\r\n } else {\r\n if (strPaymentStatus== null || strPaymentStatus.equals(\"\"))\r\n strPaymentStatus = \"CashOnDelivery\";\r\n\r\n\r\n ArrayList<AddedItemsToOrderTableClass> orderItemList = new ArrayList<>();\r\n int taxType =0;\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n int menuCode =0;\r\n String itemName= \"\";\r\n double quantity=0.00;\r\n double rate=0.00;\r\n double igstRate=0.00;\r\n double igstAmt=0.00;\r\n double cgstRate=0.00;\r\n double cgstAmt=0.00;\r\n double sgstRate=0.00;\r\n double sgstAmt=0.00;\r\n double cessRate=0.00;\r\n double cessAmt=0.00;\r\n double subtotal=0.00;\r\n double billamount=0.00;\r\n double discountamount=0.00;\r\n\r\n TableRow RowBillItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n\r\n // Item Number\r\n if (RowBillItem.getChildAt(0) != null) {\r\n CheckBox ItemNumber = (CheckBox) RowBillItem.getChildAt(0);\r\n menuCode = (Integer.parseInt(ItemNumber.getText().toString()));\r\n }\r\n\r\n // Item Name\r\n if (RowBillItem.getChildAt(1) != null) {\r\n TextView ItemName = (TextView) RowBillItem.getChildAt(1);\r\n itemName = (ItemName.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Quantity\r\n if (RowBillItem.getChildAt(3) != null) {\r\n EditText Quantity = (EditText) RowBillItem.getChildAt(3);\r\n String qty_str = Quantity.getText().toString();\r\n double qty_d = 0.00;\r\n if(qty_str==null || qty_str.equals(\"\"))\r\n {\r\n Quantity.setText(\"0.00\");\r\n }else\r\n {\r\n qty_d = Double.parseDouble(qty_str);\r\n }\r\n quantity = (Double.parseDouble(String.format(\"%.2f\",qty_d)));\r\n\r\n }\r\n\r\n // Rate\r\n if (RowBillItem.getChildAt(4) != null) {\r\n EditText Rate = (EditText) RowBillItem.getChildAt(4);\r\n String rate_str = Rate.getText().toString();\r\n double rate_d = 0.00;\r\n if((rate_str==null || rate_str.equals(\"\")))\r\n {\r\n Rate.setText(\"0.00\");\r\n }else\r\n {\r\n rate_d = Double.parseDouble(rate_str);\r\n }\r\n rate = (Double.parseDouble(String.format(\"%.2f\",rate_d)));\r\n\r\n }\r\n\r\n\r\n // Service Tax Percent\r\n\r\n if(chk_interstate.isChecked()) // IGST\r\n {\r\n cgstRate =0;\r\n cgstAmt =0;\r\n sgstRate =0;\r\n sgstAmt =0;\r\n if (RowBillItem.getChildAt(23) != null) {\r\n TextView iRate = (TextView) RowBillItem.getChildAt(23);\r\n igstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iRate.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(24) != null) {\r\n TextView iAmt = (TextView) RowBillItem.getChildAt(24);\r\n igstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iAmt.getText().toString())));\r\n }\r\n\r\n\r\n }else // CGST+SGST\r\n {\r\n igstRate =0;\r\n igstAmt =0;\r\n if (RowBillItem.getChildAt(15) != null) {\r\n TextView ServiceTaxPercent = (TextView) RowBillItem.getChildAt(15);\r\n sgstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxPercent.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(16) != null) {\r\n TextView ServiceTaxAmount = (TextView) RowBillItem.getChildAt(16);\r\n sgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxAmount.getText().toString())));\r\n }\r\n\r\n // Sales Tax %\r\n if (RowBillItem.getChildAt(6) != null) {\r\n TextView SalesTaxPercent = (TextView) RowBillItem.getChildAt(6);\r\n cgstRate = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxPercent.getText().toString())));\r\n }\r\n // Sales Tax Amount\r\n if (RowBillItem.getChildAt(7) != null) {\r\n TextView SalesTaxAmount = (TextView) RowBillItem.getChildAt(7);\r\n cgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxAmount.getText().toString())));\r\n }\r\n }\r\n if (RowBillItem.getChildAt(25) != null) {\r\n TextView cessRt = (TextView)RowBillItem.getChildAt(25);\r\n if(!cessRt.getText().toString().equals(\"\"))\r\n cessRate = Double.parseDouble(cessRt.getText().toString());\r\n }\r\n if (RowBillItem.getChildAt(26) != null) {\r\n TextView cessAt = (TextView)RowBillItem.getChildAt(26);\r\n if(!cessAt.getText().toString().equals(\"\"))\r\n cessAmt = Double.parseDouble(cessAt.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Tax Type\r\n if (RowBillItem.getChildAt(13) != null) {\r\n TextView TaxType = (TextView) RowBillItem.getChildAt(13);\r\n taxType = (Integer.parseInt(TaxType.getText().toString()));\r\n }\r\n // subtotal\r\n subtotal = (rate*quantity) + igstAmt+cgstAmt+sgstAmt;\r\n\r\n AddedItemsToOrderTableClass orderItem = new AddedItemsToOrderTableClass( menuCode, itemName, quantity, rate,\r\n igstRate,igstAmt, cgstRate, cgstAmt, sgstRate,sgstAmt, rate*quantity,subtotal, billamount,cessRate,cessAmt,discountamount);\r\n orderItemList.add(orderItem);\r\n }\r\n\r\n Bundle bundle = new Bundle();\r\n bundle.putDouble(Constants.TOTALBILLAMOUNT, Double.parseDouble(tvBillAmount.getText().toString()));\r\n bundle.putDouble(Constants.TAXABLEVALUE, Double.parseDouble(tvSubTotal.getText().toString()));\r\n\r\n// bundle.putDouble(Constants.ROUNDOFFAMOUNT, Double.parseDouble(edtRoundOff.getText().toString()));\r\n if (tvOthercharges.getText().toString().isEmpty()) {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n } else {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n }\r\n bundle.putDouble(Constants.DISCOUNTAMOUNT, Double.parseDouble(tvDiscountAmount.getText().toString()));\r\n bundle.putInt(Constants.TAXTYPE, isForwardTaxEnabled);\r\n //bundle.putInt(CUSTID, Integer.parseInt(tvCustId.getText().toString()));\r\n bundle.putString(Constants.PHONENO, edtCustPhoneNo.getText().toString());\r\n bundle.putParcelableArrayList(Constants.ORDERLIST, orderItemList);\r\n if (chk_interstate.isChecked()) {\r\n double igstAmount = Double.parseDouble(tvIGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, igstAmount + cessAmount);\r\n } else {\r\n double sgstAmount = Double.parseDouble(tvSGSTValue.getText().toString());\r\n double cgstAmount = Double.parseDouble(tvCGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, cgstAmount + sgstAmount + cessAmount);\r\n }\r\n\r\n fm = getSupportFragmentManager();\r\n proceedToPayBillingFragment = new PayBillFragment();\r\n proceedToPayBillingFragment.initProceedToPayListener(this);\r\n proceedToPayBillingFragment.setArguments(bundle);\r\n proceedToPayBillingFragment.show(fm, \"Proceed To Pay\");\r\n\r\n /* Intent intentTender = new Intent(myContext, PayBillActivity.class);\r\n intentTender.putExtra(\"TotalAmount\", tvBillAmount.getText().toString());\r\n intentTender.putExtra(\"CustId\", edtCustId.getText().toString());\r\n intentTender.putExtra(\"phone\", edtCustPhoneNo.getText().toString());\r\n intentTender.putExtra(\"USER_NAME\", strUserName);\r\n intentTender.putExtra(\"BaseValue\", Float.parseFloat(tvSubTotal.getText().toString()));\r\n intentTender.putExtra(\"ORDER_DELIVERED\", strOrderDelivered);\r\n intentTender.putExtra(\"OtherCharges\", Double.parseDouble(tvOthercharges.getText().toString()));\r\n intentTender.putExtra(\"TaxType\", taxType);// forward/reverse\r\n intentTender.putParcelableArrayListExtra(\"OrderList\", orderItemList);\r\n startActivityForResult(intentTender, 1);*/\r\n //mSaveBillData(2, true);\r\n //PrintNewBill();\r\n }\r\n\r\n /*int iResult = dbBillScreen.deleteKOTItems(iCustId, String.valueOf(jBillingMode));\r\n Log.d(\"Delivery:\", \"Items deleted from pending KOT:\" + iResult);*/\r\n\r\n //ClearAll();\r\n //Close(null);\r\n }", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "public void calculateMonthBills() {\r\n\t\tdouble sum = 0;\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\r\n\t\t\tsum += invoiceInfo[i].getAmount();\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\\nTotal monthly bills: \" + sum);\r\n\t}", "private void calcBills() {\n\t\tint changeDueRemaining = (int) this.changeDue;\n\n\t\tif (changeDueRemaining >= 20) {\n\t\t\tthis.twenty += changeDueRemaining / 20;\n\t\t\tchangeDueRemaining = changeDueRemaining % 20;\n\t\t}\n\t\tif (changeDueRemaining >= 10) {\n\t\t\tthis.ten += changeDueRemaining / 10;\n\t\t\tchangeDueRemaining = changeDueRemaining % 10;\n\t\t}\n\t\tif (changeDueRemaining >= 5) {\n\t\t\tthis.five += changeDueRemaining / 5;\n\t\t\tchangeDueRemaining = changeDueRemaining % 5;\n\t\t}\n\t\tif (changeDueRemaining >= 1) {\n\t\t\tthis.one += changeDueRemaining;\n\t\t}\n\t}", "void payBills();", "public void sumWholeBill(Bill bill) {\n if (bill.getProducts().isEmpty()) {\n throw new IllegalStateException(\"Bill does not have products\");\n }\n billSumFacade.saveNewBillSum(bill);\n logger.info(\"sum for bill id = \" + bill.getId_bill() + \" updated\");\n //:TODO update accounts balances\n //\n accountService.updateAccount(bill.getAccount().getId_account(),bill);\n var sum = billSumFacade.getSumBy(bill);\n accountRepository.updateAccountBalance(sum, bill.getAccount().getId_account());\n }", "private void calculateBill() {\n\t\tif (unit <= 100) {\r\n\t\t\tbill = unit * 5;\r\n\t\t}else if(unit<=200){\r\n\t\t\tbill=((unit-100)*7+500);\r\n\t\t}else if(unit<=300){\r\n\t\t\tbill=((unit-200)*10+1200);\r\n\t\t}else if(unit>300){\r\n\t\t\tbill=((unit-300)*15+2200);\r\n\t\t}\r\n\t\tSystem.out.println(\"EB amount is :\"+bill);\r\n\t}", "public void addToBill(int newBill){\n Bill = Bill + newBill;\n }", "public static String payCurrentBill(String account){\n return \"update current_bills set cb_paid = 1 where cb_account = '\"+account+\"'\";\n }", "private void makeDeductionsfromPayments(int walletid, int due,int bal,ArrayList<Integer> l) {\n\t\tArrayList<Integer> l1=l;\n\t\tint toPay=due;\n\t\tint pocket=bal;\n\t\tint id=walletid;\n\t\tint deduction=pocket-toPay;\n\t\tString str=\"update wallet set balance=\"+deduction+\" where walletId=\"+id;\n\t\ttry {\n\t\t\tint count=stmt.executeUpdate(str);\n\t\t\n\t\t\t\tupdateOrders(id,l1);\n\t\t\t\tupdatePayments(id,toPay);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void generateBill(){\n System.out.println(\" Supermercado la 33 \");\n System.out.println(getName());\n System.out.println(getId());\n System.out.println(LocalDate.now() + \" -- \" +LocalTime.now());\n //System.out.println(\"Cantidad Denominacion nombre precio \");\n for (int i=0; i<bill.getProducts().size(); i++){\n Product temporal = bill.getProducts().get(i);\n System.out.println(temporal.getAvailableQuantity().getAmount() + \" \" + temporal.getAvailableQuantity().getProductDenomination() + \" \"\n + temporal.getName() + \" \" + temporal.getAvailableQuantity().getAmount() * temporal.getPrice());\n }\n System.out.println(\"Total : \" + bill.calculateTotal());\n System.out.println(\" Gracias por su compra vuelva pronto \");\n\n }", "@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}", "public void addBill(UtilityBill bill) {\n getBills().add(bill);\n Collections.sort(bills);\n }", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "public int balup(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "private void calculateLoanPayment() {\n double interest =\n Double.parseDouble(tfAnnualInterestRate.getText());\n int year = Integer.parseInt(tfNumberOfYears.getText());\n double loanAmount =\n Double.parseDouble(tfLoanAmount.getText());\n\n // Create a loan object. Loan defined in Listing 10.2\n loan lloan = new loan(interest, year, loanAmount);\n\n // Display monthly payment and total payment\n tfMonthlyPayment.setText(String.format(\"$%.2f\",\n lloan.getMonthlyPayment()));\n tfTotalPayment.setText(String.format(\"$%.2f\",\n lloan.getTotalPayment()));\n }", "private void updateTotal() {\n int total = table.getTotal();\n vip.setConsumption(total);\n if (total > 0)\n payBtn.setText(PAY + RMB + total);\n else if (total == 0)\n payBtn.setText(PAY);\n }", "public static void calculateLoanPayment() {\n\t\t//get values from text fields\n\t\tdouble interest = \n\t\t\t\tDouble.parseDouble(tfAnnualInterestRate.getText());\n\t\tint year = Integer.parseInt(tfNumberOfYears.getText());\n\t\tdouble loanAmount =\n\t\t\t\tDouble.parseDouble(tfLoanAmount.getText());\n\t\t\n\t\t//crate a loan object\n\t\t Loan loan = new Loan(interest, year, loanAmount);\n\t\t \n\t\t //Display monthly payment and total payment\n\t\t tfMonthlyPayment.setText(String.format(\"$%.2f\", loan.getMonthlyPayment()));\n\t\t tfTotalPayment.setText(String.format(\"$%.2f\", loan.getTotalPayment()));\n\t}", "public int baldown(double newbalance, Long accountno, Long broaccno, Double bramt) throws Exception{\n\tint j=DbConnect.getStatement().executeUpdate(\"update account set balance=\"+newbalance+\" where accno=\"+accountno+\"\");\r\n\tint i=DbConnect.getStatement().executeUpdate(\"update account set balance=balance+\"+bramt+\" where accno=\"+broaccno+\"\");\r\n\treturn i;\r\n}", "@Override\n\tpublic Double discountsAppliedOnTotalBill(Double billCost) {\n\t\tlogger.info(\"Bill Amount Beofre Final Discount is : \" + billCost);\n\t\t// Logic For Decreasing 5 for each 100\n\t\tretailCustomerUserBill.setTotalBillCost(billCost - Math.floor(Math.floor(billCost) / 100) * 5);\n\t\tlogger.info(\"Bill Amount After Final Discount is : \" + retailCustomerUserBill.getTotalBillCost());\n\t\treturn retailCustomerUserBill.getTotalBillCost();\n\t}", "public static String addBill(String account, String amount, String duedate){\n return \"insert into current_bills(cb_account,cb_bill,cb_duedate,cb_paid,cb_late) values('\"+account+\"'\"+\",'\"+amount+\"'\"+\",'\"+duedate+\"',0,0)\";\n }", "@Override\n public void calculatePayment()\n {\n this.paymentAmount = annualSalary / SALARY_PERIOD;\n }", "public void Deposit(double ammount){\n abal = ammount + abal;\n UpdateDB();\n }", "public void calculatePayment() {}", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "public void addindbpayment(){\n \n \n double tot = calculateTotal();\n Payment pms = new Payment(0,getLoggedcustid(),tot);\n \n System.out.println(\"NI Payment \"+getLoggedcustid()+\" \"+pms.getPaymentid()+\" \"+pms.getTotalprice());\n session = NewHibernateUtil.getSessionFactory().openSession();\n session.beginTransaction();\n session.save(pms);\n try \n {\n session.getTransaction().commit();\n session.close();\n } catch(HibernateException e) {\n session.getTransaction().rollback();\n session.close();\n }\n clear();\n setBookcart(null);\n test.clear();\n itemdb.clear();\n \n \n try{\n FacesContext.getCurrentInstance().getExternalContext().redirect(\"/BookStorePelikSangat/faces/index.xhtml\");\n } \n catch (IOException e) {}\n \n\t}", "public void processBills() {\r\n \r\n System.out.printf(\"%nHow many bills are there to process? \");\r\n int numBills = input.nextInt(); //local variable captures int from user.\r\n \r\n cableBills = new Invoice[numBills];\r\n billingStmts = new String[numBills];\r\n \r\n for(int i=0; i < numBills; i++) {\r\n cableBills[i] = new Invoice();\r\n cableBills[i].setCustNm(i);\r\n cableBills[i].determineCableSrv(i);\r\n cableBills[i].setMoviesPurchased(i);\r\n \r\n double total = cableBills[i].getMoviePurchased() + cableBills[i].getCableSrv(); //local variable calculates the total/\r\n double movieCharges = cableBills[i].getMoviePurchased(); //local variable calculates the movie charges.\r\n \r\n billingStmts[i] = String.format(\"%nCustomer: %S\"\r\n + \"%n%nCable Service: %20c%,10.2f\"\r\n + \"%nMovies-On-Demand-HD: %14c%,10.2f\"\r\n + \"%n%nTOTAL DUE: %24c%,10.2f%n\",\r\n cableBills[i].getCustNm(), '$',\r\n cableBills[i].getCableSrv(), ' ', movieCharges, '$', total);\r\n }\r\n }", "private void updateTotalPayment(BarcodedItem barcodedItem, int quantity) {\n\n\t\tBigDecimal price = ProductDatabases.BARCODED_PRODUCT_DATABASE.get(barcodedItem.getBarcode())\n\t\t\t\t.getPrice().multiply(new BigDecimal(quantity));\n\t\n\t\t\n\t\tprice = price.setScale(2, BigDecimal.ROUND_HALF_UP); \n\t\n\t\t\t\t\t\t\n\t\ttotalPayment = totalPayment.add(price);\n\t\t\n\t\tSystem.out.println(\"Total Payment = \" + totalPayment.toString());\n\t\n\t}", "private void updatePayments(int id, int toPay) {\n\t\tint customer_id=id;\n\t\tint payment=toPay;\n\t\ttry {\n\t\t\tPreparedStatement pstmt=con.prepareStatement(\"insert into payments(customerNumber,payments) values(?,?)\");\n\t\t\tpstmt.setInt(1, customer_id);\n\t\t\tpstmt.setInt(2, payment);\n\t\t\tint rowseffected=pstmt.executeUpdate();\n\t\t\tif(rowseffected>0) {\n\t\t\t\tSystem.out.println(\"--------------------------------ORDER PLACED--------------------------------\");\n\t\t\t\tuserTasks();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }", "@Override\r\n\tpublic void calculateLoanPayments() {\r\n\t\t\r\n\t\tBigDecimal numInstall = getNumberOfInstallments(this.numberOfInstallments);\r\n\t\tBigDecimal principle = this.loanAmount;\r\n\t\tBigDecimal duration = this.duration;\r\n\t\tBigDecimal totalInterest = getTotalInterest(principle, duration,\r\n\t\t\t\tthis.interestRate);\r\n\t\tBigDecimal totalRepayment = totalInterest.add(principle);\r\n\t\tBigDecimal repaymentPerInstallment = getRepaymentPerInstallment(\r\n\t\t\t\ttotalRepayment, numInstall);\r\n\t\tBigDecimal interestPerInstallment = getInterestPerInstallment(\r\n\t\t\t\ttotalInterest, numInstall);\r\n\t\tBigDecimal principlePerInstallment = getPrinciplePerInstallment(\r\n\t\t\t\trepaymentPerInstallment, interestPerInstallment, numInstall);\r\n\t\tBigDecimal principleLastInstallment = getPrincipleLastInstallment(\r\n\t\t\t\tprinciple, principlePerInstallment, numInstall);\r\n\t\tBigDecimal interestLastInstallment = getInterestLastInstallment(\r\n\t\t\t\ttotalInterest, interestPerInstallment, numInstall);\t\r\n\t\t\r\n\t\tfor(int i=0; i<this.numberOfInstallments-1;i++) {\r\n\t\t\tthis.principalPerInstallment.add(principlePerInstallment);\r\n\t\t\tthis.interestPerInstallment.add(interestPerInstallment);\r\n\t\t}\r\n\t\tthis.principalPerInstallment.add(principleLastInstallment);\r\n\t\tthis.interestPerInstallment.add(interestLastInstallment);\r\n\t}", "public void printBill(){\r\n\t\tint numOfItems = ItemsList.size();\r\n\t\tfor(int i = 0;i<numOfItems;i++){\r\n\t\t\tSystem.out.println(\"1\" + ItemsList.get(i).getName() + \"at \" + ItemsList.get(i).getPrice());\r\n\t\t}\r\n\t\tSystem.out.printf(\"Sales Tax: %.2f\\n\", taxTotal);\r\n\t\tSystem.out.println(\"Total: \" + total);\r\n\t}", "public void add_bet_money(List<coins> bet,List<coins> currentmoney){\n\t\tfor(int i=0;i<currentmoney.size();i++) {\n\t\t\tcurrentmoney.get(i).qtt+=bet.get(i).qtt;\n\t\t}\n }", "private void mSaveBillData(int TenderType) { // TenderType:\r\n // 1=PayCash\r\n // 2=PayBill\r\n\r\n // Insert all bill items to database\r\n InsertBillItems();\r\n\r\n // Insert bill details to database\r\n InsertBillDetail(TenderType);\r\n\r\n updateMeteringData();\r\n\r\n /*if (isPrintBill) {\r\n // Print bill\r\n PrintBill();\r\n }*/\r\n }", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "public void updateBal(int value) {\r\n bal = bal + value;\r\n }", "public void companyPayRoll(){\n calcTotalSal();\n updateBalance();\n resetHoursWorked();\n topBudget();\n }", "@Override\n public void printBill() {\n System.out.println(\"BILL FOR TABLE #\" + id);\n for (MenuItem item : bill.getItems()) {\n if (item.getPrice() == 0.0) {\n System.out.println(item.getQuantity() + \" \" + item.getName() + \": $\" + String.format(\"%.2f\", item.getTotal()) + \" Sent back because: \" + item.getComment() + \".\");\n } else {\n System.out.println(item.getQuantity() + \" \" + item.getName() + \": $\" + String.format(\"%.2f\", item.getTotal()));\n }\n for (Ingredient addedIng : item.getExtraIngredients()) {\n System.out.println(\"add \" + item.getQuantity() + \" \" + addedIng.getName() + \": $\" + String.format(\"%.2f\", addedIng.getPrice() * item.getQuantity()));\n }\n for (Ingredient removedIng : item.getRemovedIngredients()) {\n System.out.println(\"remove \" + item.getQuantity() + \" \" + removedIng.getName() + \": -$\" + String.format(\"%.2f\", removedIng.getPrice() * item.getQuantity()));\n }\n\n }\n System.out.println(\"Total: $\" + getBillPrice() + \"\\n\");\n }", "@Override\r\n\tpublic List<CoinsResponse> billsToCoinstRef(List<BillToExchange> lstBillToExchange) throws ExchangeMachineException {\n\t\t\r\n\t\tDouble dTotal = 0.0;\r\n\t\tList<CoinsResponse> lstCoinsResponse = new ArrayList<CoinsResponse>();\r\n\t\tString erroMessage = null;\r\n\t\t\r\n\t\tfor(BillToExchange billToExchange : lstBillToExchange) {\r\n\t\t\tdTotal = dTotal + (billToExchange.getBillQuantity() * billToExchange.getBillAmount().doubleValue());\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\t//Iterate over coins denomination for calculation\r\n\t\t\tcoinExchangeWrapper.setTotal(new BigDecimal(dTotal).setScale(2, RoundingMode.FLOOR));\r\n\t\t\tfor(CoinsDTO coins : coinsDispenser.getCoinsDispenser() ) {\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"Coin id : \" + coins.getId() + \" Denomination : \" + coins.getCoinDenomination() + \" Quantity : \" + coins.getCoinQuantity());\r\n\t\t\t\t\r\n\t\t\t\tif(coins.getCoinQuantity() > 0) {\r\n\t\t\t\t\tcoinExchangeWrapper.setCurrentCoinDenomination(coins.getCoinDenomination());\r\n\t\t\t\t\tcoinExchangeWrapper.setCurrentCoinQuantity(coins.getCoinQuantity());\r\n\t\t\t\t\tcoinExchangeWrapper.setMaxCoinQuantity(coins.getCoinMaxQuantity());\r\n\t\t\t\t\tgetCoinsCalculation(coinExchangeWrapper, lstCoinsResponse);\r\n\t\t\t\t\tcoins.setCoinQuantity(coinExchangeWrapper.getCurrentCoinQuantity());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Total Remain for Calculation : \" + coinExchangeWrapper.getTotal());\r\n\t\t\t\t\r\n\t\t\t\tif(coinExchangeWrapper.getTotal().compareTo(BigDecimal.ZERO) == 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//Amount still not completed, needs to raise error\r\n\t\t\tif(coinExchangeWrapper.getTotal().compareTo(BigDecimal.ZERO) != 0) {\r\n\t\t\t\t//Raise exception\r\n\t\t\t\terroMessage = \"Not Enough coins to complete exchange\";\r\n\t\t\t\tthrow new Exception();\r\n\t\t\t}\r\n\t\t\r\n\t\t}catch(Exception e) {\r\n\t\t\tif(erroMessage != null) {\r\n\t\t\t\tthrow getExchangeMachineException(erroMessage, e);\r\n\t\t\t}else {\r\n\t\t\t\tthrow getExchangeMachineException(e.getMessage(), e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn lstCoinsResponse;\r\n\t}", "@Override\n\tpublic void update(BillDTO billDTO) {\n\t\tBill bill = billDao.get(billDTO.getId());\n\t\tif(bill != null) {\n\t\t\tbill.setPriceTotal(billDTO.getPriceTotal());\n\t\t\tbill.setDiscountPersent(billDTO.getDiscountPercent());\n\t\t\tbill.setStatus(billDTO.getStatus());\n\t\t\tbill.setPay(billDTO.getPay());\n\t\t\t\n\t\t\tbillDao.update(bill);\n\t\t}\n\t}", "private void updateTotalPayment(PLUCodedItem pluCodedItem, int quantity) {\n\n\t\tdouble weight = pluCodedItem.getWeight() / 1000;\n\t\t\n\t\tBigDecimal price = ProductDatabases.PLU_PRODUCT_DATABASE.get(pluCodedItem.getPLUCode())\n\t\t\t\t.getPrice().multiply(new BigDecimal(quantity)).multiply(new BigDecimal(weight));\n\t\t\n\n\t\n\t\t\n\t\tprice = price.setScale(2, BigDecimal.ROUND_HALF_UP);\n\t\t\t\t\t\t\n\t\ttotalPayment = totalPayment.add(price);\n\t\t\n\t\tString description = ProductDatabases.PLU_PRODUCT_DATABASE.get(pluCodedItem.getPLUCode()).getDescription();\n\t\t\n\t\tSystem.out.println(\"Subtotal of \" + description + \" is: \" + totalPayment.toString());\n\t\n\t}", "@Override\n\tpublic void businessMoney() {\n\n\t}", "private void automaticPayment(String accountName, String reciever, String billName, final int amount, String date) {\n Log.d(TAG, \"makeTransaction: Has been called\");\n final DocumentReference senderDocRef = db.collection(\"users\").document(user.getEmail())\n .collection(\"accounts\").document(accountName);\n\n final DocumentReference recieverDocRef = db.collection(\"companies\").document(reciever);\n\n final DocumentReference billDocRef = db.collection(\"companies\").document(reciever).collection(\"customer\")\n .document(user.getEmail()).collection(\"bills\").document(billName);\n\n db.runTransaction(new Transaction.Function<Void>() {\n @Override\n public Void apply(Transaction transaction) throws FirebaseFirestoreException {\n DocumentSnapshot sender = transaction.get(senderDocRef);\n DocumentSnapshot reciever = transaction.get(recieverDocRef);\n\n\n int senderBalance = sender.getLong(\"balance\").intValue();\n int recieverBalance = reciever.getLong(\"amount\").intValue();\n int transactionBalance = Math.abs(amount);\n\n if (senderBalance >= transactionBalance) {\n transaction.update(senderDocRef, \"balance\", senderBalance - transactionBalance);\n transaction.update(recieverDocRef, \"amount\", recieverBalance + transactionBalance);\n transaction.update(billDocRef, \"isPaid\", true);\n\n\n SimpleDateFormat dateformat = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date newDate = new Date();\n Calendar cal = Calendar.getInstance();\n cal.setTime(newDate);\n cal.add(Calendar.MONTH, 1);\n newDate = cal.getTime();\n transaction.update(billDocRef, \"recurring\", dateformat.format(newDate));\n } else {\n Log.d(TAG, \"apply: Transaction ikke fuldført\");\n }\n\n // Success\n return null;\n }\n }).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(TAG, \"Transaction success!\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Transaction failure.\", e);\n }\n });\n\n }", "public _179._6._235._119.cebwebservice.Bill billing_CalculateDetailMonthlyBill(java.lang.String accessToken, int tariff, int kwh) throws java.rmi.RemoteException;", "public void calculatePayment() {\n\t\tdouble pay = this.annualSalary / NUM_PAY_PERIODS;\n\t\tsuper.setPayment(pay);\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "@Override\n\tpublic String addBills(String bilnumber, Date d, double bilcost) {\n\t\treturn this.b.addBills(bilnumber, d, bilcost)?\"插入成功\":\"插入失败\";\n\t}", "public boolean updateBill(Bill bill){\n\t\tTraveller trav = bill.getItems().traveller();\n\t\twhile(trav.hasNext()){\n\t\t\tItem item = (Item) trav.next();\n\t\t\tString selectQuery = \"select qty from stock where item_name = ? and expire_date = ? and category = ?\"\n\t\t\t\t\t+ \" and price = ?;\";\n\t\t\ttry(PreparedStatement preStmt = connection.prepareStatement(selectQuery)){\n\t\t\t\tpreStmt.setString(1, item.getName());\n\t\t\t\tpreStmt.setDate(2, item.getExpireDate());\n\t\t\t\tpreStmt.setString(3, item.getCategory());\n\t\t\t\tpreStmt.setFloat(4, item.getPrice());\n\t\t\t\tResultSet result= preStmt.executeQuery(selectQuery);\n\t\t\t\tif(result.first()){\n\t\t\t\t\tint oldQty = result.getInt(1);\n\t\t\t\t\tItem itemClone = item.clone();\n\t\t\t\t\titemClone.setQuantity(oldQty - item.getQuantity());\n\t\t\t\t\tupdateDB(itemClone);\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"No item found on stock\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}catch(SQLException exp){\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error in Stock table processing: \"+exp.getMessage());\n\t\t\t\texp.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void payFees(int fees) {\n feesPaid += fees;\n School.updateTotalMoneyEarned(feesPaid);\n }", "public static double calculateMonthlyPaymentTotal(double amountLoan, double annualRateBank, double annualRateInsurance, int nbOfMonthlyPayment){\n double monthlyPaymentBank = calculateMonthlyPaymentBank(amountLoan, annualRateBank, nbOfMonthlyPayment);\n double monthlyPaymentInsurance = calculateMonthlyPaymentInsuranceOnly(amountLoan, annualRateInsurance);\n\n return monthlyPaymentBank + monthlyPaymentInsurance;\n }", "private void updateMoney() {\n balance = mysql.getMoney(customerNumber);\n balanceConverted = (float) balance / 100.00;\n }", "public void setBALLOON_PAYMENT(BigDecimal BALLOON_PAYMENT) {\r\n this.BALLOON_PAYMENT = BALLOON_PAYMENT;\r\n }", "public static double calculateMonthlyPaymentBank(double amountLoan, double annualRateBank, int nbOfMonthlyPayment){\n // Source : https://www.younited-credit.com/projets/pret-personnel/calculs/calculer-remboursement-pret\n double J = annualRateBank / 12; // Taux d'interet effectif = taux annuel / 12\n\n return amountLoan * (J / (1 - Math.pow(1 + J, - nbOfMonthlyPayment))); // Mensualité\n }", "public double getTotalPayments(){return this.total;}", "public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}", "public void splitCurrency(Collection FTC_receivables, String currencyCd, double exchangeRate, double amountToChange) throws FacadeException {\n FTC_ReceivablesController recCtrl = new FTC_ReceivablesController();\n Integer newRecId = null;\n\n try {\n int count = FTC_receivables.size();\n double tabSourceAmount = 0, tabDestAmount = 0, exchAmount = 0;\n double centValue = 0;\n\n FTC_CourierCashRecapTableVO courierRec = null;\n FTC_ReceivablesVO recNew = null;\n FTC_ReceivablesVO recOld = null;\n\n Iterator recIt = FTC_receivables.iterator();\n if (count == 1) {\n //If number of rec is 1 then use exchange rate value passed as parameter\n //Compute is different for count greater than 1\n while (recIt.hasNext()) {\n courierRec = (FTC_CourierCashRecapTableVO) recIt.next();\n recOld = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n recNew = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n tabSourceAmount = recOld.getCashPaymentAmt() + recOld.getOtherPaymentAmt();\n tabSourceAmount = tabSourceAmount - amountToChange;\n if (currencyCd.equals(\"USD\")) {\n tabDestAmount = amountToChange / exchangeRate;\n } else {\n tabDestAmount = amountToChange * exchangeRate;\n }\n\n if (recOld.getCashPaymentAmt() > 0) {\n recOld.setCashPaymentAmt(tabSourceAmount);\n recNew.setCashPaymentAmt(tabDestAmount);\n } else {\n recOld.setOtherPaymentAmt(tabSourceAmount);\n recNew.setOtherPaymentAmt(tabDestAmount);\n }\n\n //Set the receivables id in the object to produce the duality.\n recNew.setDualRecIdNbr(recOld.getRecId());\n //Insert the receivable new\n recNew.setRecId(null);\n recNew.setPaymentCurrency(currencyCd);\n recNew.setChkinAgentComment(\"Exchange rate\");\n recNew.setOtherComment(\"SPLT;\");\n recNew.setStatusId(1);\n newRecId = this.setFTC_Receivables(recNew);\n recNew.setRecId(newRecId);\n\n //Update receivable old\n recOld.setOtherComment((recOld.getOtherComment() == null ? \"\" : recOld.getOtherComment()) + \"SPLT;\");\n recOld.setChkinAgentComment(recOld.getChkinAgentComment() == null ? \"Exchange rate\" : recOld.getOtherComment() + \",Exchange rate\");\n recOld.setStatusId(1);\n recOld.setDualRecIdNbr(newRecId);\n recCtrl.updateFTC_Receivables(recOld);\n }//Close while\n } else if (count > 1) {\n //If number of rec greater than 1\n while (recIt.hasNext()) {\n courierRec = (FTC_CourierCashRecapTableVO) recIt.next();\n recOld = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n recNew = recCtrl.getFTC_Receivables(new Integer(courierRec.getRecId()));\n tabSourceAmount = recOld.getCashPaymentAmt() + recOld.getOtherPaymentAmt();\n centValue = 0;\n\n /*\n String totalAmt = new Double(tabSourceAmount).toString();\n String iPart = perl.substitute(\"s/\\\\..*$//\",totalAmt);\n String dPart = perl.substitute(\"s/^.*?\\\\.//\",totalAmt);\n\n if(dPart.trim().length() > 0)\n { centValue = Double.parseDouble(dPart);\n centValue /= 100;\n }\n if(iPart.trim().length() > 0)\n tabSourceAmount = Double.parseDouble(iPart);\n */\n\n int tabSourceAmountInt = new Double(tabSourceAmount).intValue();\n centValue = tabSourceAmount - tabSourceAmountInt;\n tabSourceAmount = tabSourceAmountInt;\n\n if (currencyCd.equals(\"USD\")) {\n if (centValue > 0) {\n tabDestAmount = centValue / exchangeRate;\n }\n } else\n tabDestAmount = centValue * exchangeRate;\n\n if (recOld.getCashPaymentAmt() > 0) {\n recOld.setCashPaymentAmt(tabSourceAmount);\n recNew.setCashPaymentAmt(tabDestAmount);\n } else {\n recOld.setOtherPaymentAmt(tabSourceAmount);\n recNew.setOtherPaymentAmt(tabDestAmount);\n }\n\n //Set the receivables id in the object to produce the duality.\n recNew.setDualRecIdNbr(recOld.getRecId());\n //Insert the receivable new\n recNew.setRecId(null);\n recNew.setPaymentCurrency(currencyCd);\n recNew.setChkinAgentComment(\"Exchange rate\");\n recNew.setOtherComment(\"SPLT;\");\n recNew.setStatusId(1);\n newRecId = this.setFTC_Receivables(recNew);\n recNew.setRecId(newRecId);\n\n //Update receivable old\n recOld.setOtherComment((recOld.getOtherComment() == null ? \"\" : recOld.getOtherComment()) + \"SPLT;\");\n recOld.setChkinAgentComment(recOld.getChkinAgentComment() == null ? \"Exchange rate\" : recOld.getOtherComment() + \",Exchange rate\");\n recOld.setStatusId(1);\n recOld.setDualRecIdNbr(newRecId);\n recCtrl.updateFTC_Receivables(recOld);\n\n }//close while\n\n }//Close if\n } catch (Exception e) {\n String errorMsg = \"Error occurred in splitCurrency(Collection receivables, String tabType, double exchangeRate, double amountToChange) method of FTCFacadeBean class\";\n throw new EJBException(errorMsg, e);\n }\n }", "public void updateAccountingSystem(Sale sale)\n {\n \n }", "@Override\n\tpublic int update(RotateBID record) {\n\t\tBigDecimal total = new BigDecimal(0);\n\t\tif(\"招标采购\".equals(record.getBidType())) {\n\t\t\tList<RotateBIDPurchase> purchaseList=record.getPurchaseList();\n\t\t\tfor(RotateBIDPurchase purchase:purchaseList) {\n\t\t\t\tif(null==purchase.getId()||\"\".equals(purchase.getId()))\n\t\t\t\t\tpurchase.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\ttotal = total.add(purchase.getQuantity());\n\t\t\t}\n\t\t}else {\n\t\t\tList<RotateBIDSale> saleList=record.getSaleList();\n\t\t\tfor(RotateBIDSale sale:saleList) {\n\t\t\t\tif(null==sale.getId()||\"\".equals(sale.getId()))\n\t\t\t\t\tsale.setId(UUID.randomUUID().toString().replaceAll(\"-\", \"\"));\n\t\t\t\ttotal= total.add(sale.getTotal());\n\t\t\t}\n\t\t}\n\t\trecord.setTotal(total);\n\t\trecord.setModifyDate(new Date());\n//\t\trecord.setModifier(TokenManager.getToken().getName());\n\t\treturn dao.update(record);\n\t}", "private void designBillTransactionInfo(CartReceiptResponse receiptResponse, final Document document, Locale locale)\n throws DocumentException, IOException {\n LOGGER.debug(\"Entered in designBillTransactionInfo() method\");\n SubmittedBill[] submittedBills = receiptResponse.getSubmittedBills();\n /* Start of Bill Submit Section */\n PdfPTable paymentSectionTable = new PdfPTable(3);\n paymentSectionTable.setWidths(new int[]{50, 150, 50});\n PdfPCell paymentSectionBlankSpaceCell = new PdfPCell(new Phrase(\" \", getFont(WHITE_COLOR, 8, Font.BOLD)));\n cellAlignment(paymentSectionBlankSpaceCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBlankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n BigDecimal totalBillAmount = new BigDecimal(0);\n BigDecimal totalFeeAmount = new BigDecimal(0);\n Boolean flag = true;\n\n if (submittedBills != null && receiptResponse.getReturnedItems().length != 0) {\n returnPaymentHeading(locale, paymentSectionTable);\n for (final SubmittedBill submittedBill : submittedBills) {\n final ReturnReceiptItem[] returnReceiptItems = receiptResponse.getReturnedItems();\n for (final ReturnReceiptItem returnReceiptItem : returnReceiptItems) {\n long cartId = returnReceiptItem.getCartItemId();\n if (cartId == submittedBill.getId() &&\n submittedBill.getStatus().name().equalsIgnoreCase(PdfConstants.RETURNED)) {\n designReturnHeaderBillSection(submittedBill,\n returnReceiptItem,\n locale,\n paymentSectionTable,\n paymentSectionBlankSpaceCell, receiptResponse);\n }\n }\n }\n }\n\n if (submittedBills != null) {\n for (final SubmittedBill submittedBill : submittedBills) {\n BigDecimal transactionFee = new BigDecimal(0);\n if (submittedBill.getFee() != null) {\n transactionFee = submittedBill.getFee();\n }\n if (flag.equals(true)) {\n setTableForCells(paymentSectionTable, locale);\n cellAlignment(paymentSectionBlankSpaceCell, Element.ALIGN_LEFT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBlankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n flag = false;\n }\n\n\t\t\t\t/* Paid Biller Details Start */\n if (getStatusForPaid(submittedBill.getStatus().name())) {\n designSubmittedBillsSection(submittedBill, locale, paymentSectionTable);\n totalBillAmount = totalBillAmount.add(submittedBill.getAmount());\n totalFeeAmount = totalFeeAmount.add(transactionFee);\n }\n /* End Paid Biller Details */\n\n\t\t\t\t/* Failed Biller Details Start */\n if (getStatusForRejected(submittedBill.getStatus().name())) {\n LOGGER.debug(\"Enterd in to REJECTED Related section after checking all status\");\n designFailedBillsSection(locale, paymentSectionTable,\n submittedBill);\n }\n /* End Failed Biller Details */\n\n if (submittedBill.getStatus().name().equalsIgnoreCase(PdfConstants.RETURNED)) {\n LOGGER.debug(\"Enterd in to RETURNED Related section after checking all status\");\n designReturnedBillsSection(locale, paymentSectionTable, paymentSectionBlankSpaceCell,\n submittedBill);\n totalBillAmount = totalBillAmount.add(submittedBill.getAmount());\n totalFeeAmount = totalFeeAmount.add(transactionFee);\n }\n }\n }\n\n\t\t/* add blank Space Start */\n cellAlignment(paymentSectionBlankSpaceCell, Element.ALIGN_LEFT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, paymentSectionBlankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n /* add blank space end */\n\n\t\t/* Calculating and displaying card service fee amount and service fee percent*/\n totalBillAmount = totalBillAmount.add(getCardServiceFeeAmount(receiptResponse, paymentSectionTable\n , paymentSectionBlankSpaceCell, locale));\n\t\t/* End of Card service fee */\n\n\t\t/* bill Total Paid start */\n drawTotalAmountCell(paymentSectionTable, paymentSectionBlankSpaceCell, locale, totalBillAmount, totalFeeAmount);\n /* bill Total Paid End */\n /* Add Line separator to the PDF document */\n addLineSeperator(paymentSectionTable, paymentSectionBlankSpaceCell);\n /* End of line separator */\n\n document.add(paymentSectionTable);\n LOGGER.debug(\"End pdfPaymentSection Table \");\n\n\n }", "@Override\n\t\tpublic Bill addBill(Bill bill) {\n\t\t\tOptional<Bill> opt = billDao.findById(bill.getBillId());\n\t\t\tif(opt.isPresent())\n\t\t\t{\n\t\t\t\tthrow new BillAlreadyExistsException(\"Bill with given id already exists : \" + bill.getBillId());\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t//bill.setTotalCost(billDao.totalCost());\n\t\t\t\treturn billDao.save(bill);\n\t\t\t}\n\t\t}", "public PodBanking billPaymentByDeposit(BillPaymentByDepositVo billPaymentByDepositVo,\n OnGetResponseListener onGetResponseListener)\n throws PodException {\n\n if (onGetResponseListener != null) {\n service.billPaymentByDeposit(billPaymentByDepositVo, onGetResponseListener);\n } else throw PodException.invalidParameter(MESSAGE);\n\n return this;\n }", "@Override\n public void newSale(double payment) {\n calculateTotalRevenue(payment);\n showTotalRevenue();\n }", "public void setBillNo(Long billNo) {\n this.billNo = billNo;\n }", "protected void processPaymentBundle(List<PaymentRequestDocument> paymentRequests, List<VendorCreditMemoDocument> creditMemos, Totals totals, List<String> preqsWithOutstandingCreditMemos, Person puser, Date processRunDate, Batch batch) {\r\n KualiDecimal paymentRequestAmount = KualiDecimal.ZERO;\r\n for (PaymentRequestDocument paymentRequestDocument : paymentRequests) {\r\n paymentRequestAmount = paymentRequestAmount.add(paymentRequestDocument.getGrandTotal());\r\n }\r\n\r\n KualiDecimal creditMemoAmount = KualiDecimal.ZERO;\r\n for (VendorCreditMemoDocument creditMemoDocument : creditMemos) {\r\n creditMemoAmount = creditMemoAmount.add(creditMemoDocument.getCreditMemoAmount());\r\n }\r\n\r\n // if payment amount greater than credit, create bundle\r\n boolean bundleCreated = false;\r\n if (paymentRequestAmount.compareTo(creditMemoAmount) >= 0) {\r\n PaymentGroup paymentGroup = buildPaymentGroup(paymentRequests, creditMemos, batch);\r\n\r\n if (validatePaymentGroup(paymentGroup)) {\r\n this.businessObjectService.save(paymentGroup);\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"Created PaymentGroup: \" + paymentGroup.getId());\r\n }\r\n\r\n totals.count++;\r\n totals.totalAmount = totals.totalAmount.add(paymentGroup.getNetPaymentAmount());\r\n\r\n // mark the CMs and PREQs as processed\r\n for (VendorCreditMemoDocument cm : creditMemos) {\r\n updateCreditMemo(cm, puser, processRunDate);\r\n }\r\n\r\n for (PaymentRequestDocument pr : paymentRequests) {\r\n updatePaymentRequest(pr, puser, processRunDate);\r\n }\r\n\r\n bundleCreated = true;\r\n }\r\n }\r\n\r\n if (!bundleCreated) {\r\n // add payment request doc numbers to list so they don't get picked up later\r\n for (PaymentRequestDocument doc : paymentRequests) {\r\n preqsWithOutstandingCreditMemos.add(doc.getDocumentNumber());\r\n }\r\n }\r\n }", "public void setInitilaCash(int noOfBills) throws java.lang.Exception;", "public double completeSale(double payment){\n \tsaleInfo.setAmountPaid(payment);\n \tnotifyObservers();\n \tdouble change = saleInfo.getChange();\n Map<ItemDTO, Integer> items = saleInfo.getItems();\n for (Map.Entry<ItemDTO, Integer> entry : items.entrySet()){\n //Doesn't handle case where cashier tries to remove more items than are in stock\n inventory.removeFromStock(entry.getKey().getItemIdentifier(), entry.getValue());\n }\n System.out.println(Printer.printReceipt(saleInfo));\n return change;\n }", "private String getBillPrice() {\n double cost = 0.00;\n\n for (MenuItem item : bill.getItems()) {\n cost += (item.getPrice() * item.getQuantity());\n cost += item.getExtraIngredientPrice();\n cost -= item.getRemovedIngredientsPrice();\n }\n\n return String.format(\"%.2f\", cost);\n }", "@Override\n\tpublic Bill updateBill(Bill bill) {\n\t\tOptional<Bill> opt = billDao.findById(bill.getBillId());\n\t\tif(opt.isPresent())\n\t\t{\n\t\t\tBill dbBill = opt.get();\n\t\t\tdbBill.setBillDate(bill.getBillDate());\n\t\t\tdbBill.setTotalItem(bill.getTotalItem());\n\t\t\tdbBill.setTotalCost(bill.getTotalCost());\n\t\t\t\n\t\t\tbillDao.save(dbBill);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new BillNotFoundException(\"Bill with given id not found : \" + bill.getBillId());\n\t\t}\n\t\treturn bill;\n\t}", "public int calculateBill() {\n\t\treturn chargeVehicle(); \n\t}", "@Override\n\tpublic void updateWaybill(WaybillEntity waybill) {\n\t\t\n\t}", "private static void updateTotals()\r\n\t{\r\n\t\ttaxAmount = Math.round(subtotalAmount * salesTax / 100.0);\r\n\t\ttotalAmount = subtotalAmount + taxAmount;\r\n\t}", "@Override\n public void getFee(ParkingBill parkingBill)\n {\n double hoursParked = parkingBill.getHoursParked();\n\n if(hoursParked <= 3)\n {\n parkingBill.setAmountDue(5.00);\n }\n else if(hoursParked > 3 && hoursParked <= 13)\n {\n parkingBill.setAmountDue(5.00 + (Math.ceil(hoursParked) - 3));\n }\n else\n {\n parkingBill.setAmountDue(15.00);\n }\n }", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "public void dispenseMoney(float withdrawAmount, float totalBills, int[] bill, int[] availableAmount) {\n\t\tint amount, remain;\n\t\tString plural;\n\t\tfor(int i = 0; i < bill.length; i++){\n\t\t\tif (withdrawAmount >= bill[i]){\n\t\t\t\tamount = (int) withdrawAmount / bill[i];\n\t\t\t\tremain = (int) withdrawAmount % (amount * bill[i]);\n\n\t\t\t\tavailableAmount[i] -= amount;\n\t\t\t\ttotalBills -= bill[i] * amount; \n\t\t\t\tplural = ((amount > 1) ? \"s\" : \"\");\n\t\t\t\tSystem.out.println(amount + \" bill\" + plural + \" $\" + bill[i]);\n\n\t\t\t\tif (remain == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\twithdrawAmount = remain;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}", "public double getBillTotal(){\n\t\treturn user_cart.getBillTotal();\n\t}", "public int TransBroBuy(Long userid,Long compid,Long newbalance,Double amount)throws SQLException {\n\t\tjava.util.Date d=new java.util.Date();\r\n\t\tSimpleDateFormat sd=new SimpleDateFormat(\"dd-MMM-yy\");\r\n\t\tString sdate=sd.format(d);\r\n\t\tResultSet rs1=DbConnect.getStatement().executeQuery(\"select * from transaction where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\"\");\r\n\t\tif(rs1.next()==true)\r\n\t\t{\r\n\t\t\tint l=DbConnect.getStatement().executeUpdate(\"update transaction set amount=amount+\"+amount+\",SHAREAMOUNT=SHAREAMOUNT+\"+newbalance+\" where type='purchase' and bywhom='broker' and comp_id=\"+compid+\" and DATEOFTRANS='\"+sdate+\"' and user_id=\"+userid+\" \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint i=DbConnect.getStatement().executeUpdate(\"Insert into transaction values(trans_seq.nextval,\"+userid+\",'\"+sdate+\"',\"+amount+\",'purchase','broker',\"+compid+\",\"+newbalance+\")\");\r\n\r\n\t\t}\r\n\t\t\tResultSet rss=DbConnect.getStatement().executeQuery(\"select * from FINALALLOCATION where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\r\n\t\tif(rss.next()==true)\r\n\t\t{\r\n\t\t\tint j=DbConnect.getStatement().executeUpdate(\"update FINALALLOCATION set no_share=no_share+\"+newbalance+\" where user_id=\"+userid+\" and comp_id=\"+compid+\" \");\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint k=DbConnect.getStatement().executeUpdate(\"insert into FINALALLOCATION values(\"+userid+\",\"+compid+\",\"+newbalance+\")\");\r\n\t\t}\r\n\t\treturn 1;\r\n\t}", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "public void updateTotalPrice(){\n\t\tBigDecimal discount = currentOrder.getDiscount();\n\t\tBigDecimal subtotal = currentOrder.getSubtotal();\n\t\tthis.subtotal.text.setText(CURR+subtotal.add(discount).toString());\n\t\tthis.discount.text.setText(CURR + discount.toString());\n\t\tthis.toPay.text.setText(CURR+subtotal.toString());\n\t}", "@Override\r\n\tpublic BigDecimal calculateFinalBill(BillingContext billingContext) {\n\t Discount discount = new Slab3Discount(new Slab2Discount(new Slab1Discount(new NoDiscount())));\r\n\t\treturn billingContext.getBillAmount().subtract((discount.calculate(billingContext.getBillAmount())));\r\n\t}", "@RequestMapping(value = \"createBankPayment\", method = RequestMethod.POST)\n public Invoice addBankPayment(@RequestParam(value = \"jobIdList\") ArrayList<Integer> jobIdList,\n @RequestParam(value = \"jobseekerId\") int jobseekerId,\n @RequestParam(value = \"adminFee\") int adminFee) {\n try {\n ArrayList<Job> jobs = new ArrayList<>();\n for (Integer id : jobIdList) {\n jobs.add(DatabaseJobPostgre.getJobById(id));\n }\n Invoice invoice = new BankPayment(DatabaseInvoicePostgre.getLastId() + 1,\n jobs,\n DatabaseJobseekerPostgre.getJobseekerById(jobseekerId),\n adminFee);\n invoice.setTotalFee();\n System.out.println(invoice.getTotalFee());\n DatabaseInvoicePostgre.insertInvoice(invoice);\n return invoice;\n } catch (OngoingInvoiceAlreadyExistsException e) {\n return null;\n }\n }", "public IBankTransfert payment();", "Payment(float bill, float balance, boolean premiumSubscription) {\n this.bill = bill;\n this.balance = balance;\n this.premiumSubscription = premiumSubscription;\n amount = balance;\n }", "public void enterPayment(int coinCount, Coin coinType)\n {\n balance = balance + coinType.getValue() * coinCount;\n // your code here\n \n }", "private void updateTotal()\n {\n if(saleItems != null)\n {\n double tempVal = 0;\n\n for(int i = 0; i < saleItems.size(); i++)\n {\n if(saleItems.get(i) != null)\n {\n tempVal += saleItems.get(i).getPrice() * saleItems.get(i).getQuantity();\n }\n }\n totalText.setText(moneyFormat(String.valueOf(tempVal)));\n }\n }", "public void DepositMoneyInBank() {\n\n for (int i = 0; i < commands.length; i++) {\n commands[i].execute();\n storage.push(commands[i]);\n }\n }", "@Override\r\n\tpublic ResponseDTO create(BillDTO bill) throws ServiceException {\r\n\t\tfloat netAmount=0;\r\n\t\t\r\n\t\tif(bill.getItem()!=null){\r\n\t\t\tnetAmount+=taxService.calItemTax(bill.getItem());\r\n\t\t}\r\n\t\tif(bill.getSupport()!=null){\r\n\t\t\tnetAmount+=taxService.calSupportTax(bill.getSupport());\r\n\t\t}\r\n\t\tif(bill.getBed()!=null){\r\n\t\t\tnetAmount+=taxService.calBedTax(bill.getBed());\r\n\t\t}\r\n\t\tbill.setGrandTotal(netAmount);\r\n\t\t\r\n\t\tif(bill.getDiscount()!=null){\r\n\t\t\t//find discount from discount module and set the values\r\n\r\n\t\t\tBillDiscountDetailsDTO\tdiscountDetails=discountService.calculateBillDiscount(bill.getDiscount(), netAmount);\r\n\t\t\tif(discountDetails!=null){\r\n\r\n\t\t\t\tbill.setDiscount(discountDetails.getBillDiscountList());\r\n\t\t\t\tbill.setBillAmount(discountDetails.getBillAmount());\r\n\t\t\t}\r\n\t\t}\r\n\t\tbillValidator.createBillValidator(bill);\r\n\r\n\t\ttry {\r\n\t\t\treturn billDao.create(bill);\r\n\t\t} catch (PersistenceException e) {\r\n\t\t\tthrow new ServiceException(e.getError(),e);\t\r\n\t\t}\r\n\t}", "private Paragraph createTableForOverallUnpaidBillAmount() throws BadElementException {\r\n\t\tCompanyDto companyDto = null;\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tSessionObject<String, CompanyDto> sessionObjectForCompany = Session.getInstance().getSessionObject();\r\n\t\tif (null != sessionObjectForCompany) {\r\n\t\t\tcompanyDto = sessionObjectForCompany.getComponent(Constants.COMPANY_DETAILS);\r\n\t\t}\r\n\t\tParagraph overallAmountParagraph = new Paragraph(\"Overall Amount\", subFont);\r\n\t\tParagraph paragraph = new Paragraph();\r\n\t\taddEmptyLine(paragraph, 2);\r\n\t\tPdfPTable table = new PdfPTable(3);\r\n\r\n\t\tPdfPCell c1 = new PdfPCell(new Phrase(\"Overall Bill\", tableHeaderRowFont));\r\n\t\tc1.setBackgroundColor(GrayColor.LIGHT_GRAY);\r\n\t\tc1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\ttable.addCell(c1);\r\n\r\n\t\tc1 = new PdfPCell(new Phrase(\"Overall Paid\", tableHeaderRowFont));\r\n\t\tc1.setBackgroundColor(GrayColor.LIGHT_GRAY);\r\n\t\tc1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\ttable.addCell(c1);\r\n\r\n\t\tc1 = new PdfPCell(new Phrase(\"Overall Balance\", tableHeaderRowFont));\r\n\t\tc1.setBackgroundColor(GrayColor.LIGHT_GRAY);\r\n\t\tc1.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\ttable.addCell(c1);\r\n\r\n\t\ttable.setHeaderRows(1);\r\n\r\n\t\tPdfPCell overallBillValue = new PdfPCell(\r\n\t\t\t\tnew Phrase(Util.getValueUpto2Decimal((float) totalBill), tableDataRowFont));\r\n\t\toverallBillValue.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\tPdfPCell overallPaidValue = new PdfPCell(\r\n\t\t\t\tnew Phrase(Util.getValueUpto2Decimal((float) totalPaid), tableDataRowFont));\r\n\t\toverallPaidValue.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\t\tPdfPCell overallBalanceValue = new PdfPCell(\r\n\t\t\t\tnew Phrase(Util.getValueUpto2Decimal((float) totalBalance), tableDataRowFont));\r\n\t\toverallBalanceValue.setHorizontalAlignment(Element.ALIGN_CENTER);\r\n\r\n\t\ttable.addCell(\r\n\t\t\t\tIConstants.WHITE_SPACE + companyDto.getBillingCurrency() + overallBillValue.getPhrase().getContent());\r\n\t\ttable.addCell(\r\n\t\t\t\tIConstants.WHITE_SPACE + companyDto.getBillingCurrency() + overallPaidValue.getPhrase().getContent());\r\n\t\ttable.addCell(IConstants.WHITE_SPACE + companyDto.getBillingCurrency()\r\n\t\t\t\t+ overallBalanceValue.getPhrase().getContent());\r\n\r\n\t\toverallAmountParagraph.add(table);\r\n\t\treturn overallAmountParagraph;\r\n\r\n\t}", "public void setBalance(double bal){\n balance = bal;\r\n }", "@Override\n public double payment(double amount) {\n return amount * 98 / 100 ;\n }", "public double pay(double amountPaid,String currency){\n \n saleDTO = sale.createSaleDTO();\n paymentDTO = new PaymentDTO(amountPaid,currency);\n double change = Math.round((paymentDTO.getAmountPaid() - saleDTO.getTotalPrice()) * 100.0) / 100.0;\n\n cashRegister.updateAmountInRegister(amountPaid - change);\n return change;\n\n }", "public void addSavingsBalance(BigDecimal toAdd) {\r\n setSavingsBalance(savingsBalance.add(toAdd));\r\n }", "public void anualTasks(){\n List<Unit> units = unitService.getUnits();\n for(Unit unit: units){\n double amount = 10000; //@TODO calculate amount based on unit type\n Payment payment = new Payment();\n payment.setPaymentMethod(PaymentMethod.Cash);\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.MONTH, 1);\n calendar.set(Calendar.DATE, 30);\n payment.setDate(LocalDate.now());\n TimeZone tz = calendar.getTimeZone();\n ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();\n payment.setAmount(amount);\n payment.setDueDate(LocalDateTime.ofInstant(calendar.toInstant(), zid).toLocalDate());\n payment.setClient(unit.getOwner());\n payment.setUnit(unit);\n payment.setRecurringInterval(365L);\n payment.setStatus(PaymentStatus.Pending);\n paymentService.savePayment(payment);\n }\n }", "public void updatebal(String cname, String amt1) {\nString countQuery = \"SELECT Balance FROM \" + DATABASE_TABLE1+\" WHERE Name='\"+cname+\"'\";\n\t \n\t Cursor cursor = ourDatabase.rawQuery(countQuery, null);\n\t int d=cursor.getColumnIndex(\"Balance\");\n\t\tString cbal=null;\n\t\tfor(cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()){\n\t\t\tcbal=cursor.getString(d);\n\t\t\t\n\t\t}\n\t\tint cur=Integer.parseInt(cbal);\n\t\tcur=cur+Integer.parseInt(amt1);\n\t ContentValues up=new ContentValues();\n\t up.put(Com_Balance, cur);\n\t\tourDatabase.update(DATABASE_TABLE1, up, Com_Name+\" = '\"+cname+\"'\", null);\n\t\t\n\t}", "protected PaymentDetail populatePaymentDetail(VendorCreditMemoDocument creditMemoDocument, Batch batch) {\r\n PaymentDetail paymentDetail = new PaymentDetail();\r\n if (creditMemoDocument.getCreditMemoNumber() != null) {\r\n String invoiceNumber = creditMemoDocument.getCreditMemoNumber();\r\n if (invoiceNumber.length() > 25) {\r\n invoiceNumber = invoiceNumber.substring(0, 25);\r\n } else {\r\n paymentDetail.setInvoiceNbr(invoiceNumber);\r\n }\r\n paymentDetail.setInvoiceNbr(invoiceNumber);\r\n } else {\r\n paymentDetail.setInvoiceNbr(\"\");\r\n }\r\n paymentDetail.setCustPaymentDocNbr(creditMemoDocument.getDocumentNumber());\r\n\r\n\r\n if (creditMemoDocument.getPurchaseOrderIdentifier() != null) {\r\n paymentDetail.setPurchaseOrderNbr(creditMemoDocument.getPurchaseOrderIdentifier().toString());\r\n }\r\n\r\n if (creditMemoDocument.getPurchaseOrderDocument() != null) {\r\n if (creditMemoDocument.getPurchaseOrderDocument().getRequisitionIdentifier() != null) {\r\n paymentDetail.setRequisitionNbr(creditMemoDocument.getPurchaseOrderDocument().getRequisitionIdentifier().toString());\r\n }\r\n\r\n if (creditMemoDocument.getDocumentHeader().getOrganizationDocumentNumber() != null) {\r\n paymentDetail.setOrganizationDocNbr(creditMemoDocument.getDocumentHeader().getOrganizationDocumentNumber());\r\n }\r\n }\r\n\r\n paymentDetail.setCustomerInstitutionNumber(StringUtils.defaultString(creditMemoDocument.getVendorCustomerNumber()));\r\n\r\n final String creditMemoDocType = getDataDictionaryService().getDocumentTypeNameByClass(creditMemoDocument.getClass());\r\n paymentDetail.setFinancialDocumentTypeCode(creditMemoDocType);\r\n paymentDetail.setFinancialSystemOriginCode(OLEConstants.ORIGIN_CODE_KUALI);\r\n\r\n paymentDetail.setInvoiceDate(creditMemoDocument.getCreditMemoDate());\r\n paymentDetail.setOrigInvoiceAmount(creditMemoDocument.getCreditMemoAmount().negated());\r\n paymentDetail.setNetPaymentAmount(creditMemoDocument.getFinancialSystemDocumentHeader().getFinancialDocumentTotalAmount().negated());\r\n\r\n KualiDecimal shippingAmount = KualiDecimal.ZERO;\r\n KualiDecimal discountAmount = KualiDecimal.ZERO;\r\n KualiDecimal creditAmount = KualiDecimal.ZERO;\r\n KualiDecimal debitAmount = KualiDecimal.ZERO;\r\n\r\n for (Iterator iter = creditMemoDocument.getItems().iterator(); iter.hasNext(); ) {\r\n CreditMemoItem item = (CreditMemoItem) iter.next();\r\n\r\n KualiDecimal itemAmount = KualiDecimal.ZERO;\r\n if (item.getExtendedPrice() != null) {\r\n itemAmount = item.getExtendedPrice();\r\n }\r\n if (PurapConstants.ItemTypeCodes.ITEM_TYPE_PMT_TERMS_DISCOUNT_CODE.equals(item.getItemTypeCode())) {\r\n discountAmount = discountAmount.subtract(itemAmount);\r\n } else if (PurapConstants.ItemTypeCodes.ITEM_TYPE_SHIP_AND_HAND_CODE.equals(item.getItemTypeCode())) {\r\n shippingAmount = shippingAmount.subtract(itemAmount);\r\n } else if (PurapConstants.ItemTypeCodes.ITEM_TYPE_FREIGHT_CODE.equals(item.getItemTypeCode())) {\r\n shippingAmount = shippingAmount.add(itemAmount);\r\n } else if (PurapConstants.ItemTypeCodes.ITEM_TYPE_MIN_ORDER_CODE.equals(item.getItemTypeCode())) {\r\n debitAmount = debitAmount.subtract(itemAmount);\r\n } else if (PurapConstants.ItemTypeCodes.ITEM_TYPE_MISC_CODE.equals(item.getItemTypeCode())) {\r\n if (itemAmount.isNegative()) {\r\n creditAmount = creditAmount.subtract(itemAmount);\r\n } else {\r\n debitAmount = debitAmount.subtract(itemAmount);\r\n }\r\n }\r\n }\r\n\r\n paymentDetail.setInvTotDiscountAmount(discountAmount);\r\n paymentDetail.setInvTotShipAmount(shippingAmount);\r\n paymentDetail.setInvTotOtherCreditAmount(creditAmount);\r\n paymentDetail.setInvTotOtherDebitAmount(debitAmount);\r\n\r\n paymentDetail.setPrimaryCancelledPayment(Boolean.FALSE);\r\n\r\n addAccounts(creditMemoDocument, paymentDetail, creditMemoDocType);\r\n addNotes(creditMemoDocument, paymentDetail);\r\n\r\n return paymentDetail;\r\n }", "@Override\n\tpublic void modifyBankingDetail(BankingDetail baningDetail) {\n\t\t\n\t}", "@Override\n\tpublic double amountall(String bilnumber) {\n\t\treturn this.b.amountall(bilnumber);\n\t}", "public void updateRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tTEMPLATE_ID = params.get(\"templateID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREB_EXPR = params.get(\"expr\");\n\t\tREB_CYCLES = params.get(\"cycles\");\n\t\tREB_AMOUNT = params.get(\"rebillAmount\");\n\t\tNEXT_AMOUNT = params.get(\"nextAmount\");\n\t\tAPI = \"bp20rebadmin\";\n\t}", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "void calculateReceivableByUIComponent() throws Exception{\t\t\n\t\tdouble receivableAmt = ConvertUtil.convertCTextToNumber(txtDueAmount).doubleValue();\t\n\t\tdouble receiveAmt = chkPayall.isSelected()?ConvertUtil.convertCTextToNumber(txtDueAmount).doubleValue()\n\t\t\t\t:ConvertUtil.convertCTextToNumber(txtReceiptAmount).doubleValue();\n\t\tdouble bfAmt = ConvertUtil.convertCTextToNumber(txtCustomerBF).doubleValue();\n\t\tdouble paidAmt = ConvertUtil.convertCTextToNumber(txtPaidAmount).doubleValue(); \n\t\tdouble cfAmt = bfAmt + receivableAmt - receiveAmt - paidAmt;\t\t\n\t\ttxtReceiptAmount.setText(SystemConfiguration.decfm.format(receiveAmt));\n\t\ttxtCustomerCfAmount.setText(SystemConfiguration.decfm.format(cfAmt));\t\n\t\ttxtReceiptAmount.selectAll();\n\t}" ]
[ "0.69609076", "0.69397897", "0.68227065", "0.67854744", "0.67373717", "0.66866124", "0.6612849", "0.6565977", "0.6516822", "0.64054585", "0.6376872", "0.62806064", "0.62670946", "0.6249947", "0.62307966", "0.62293607", "0.6136998", "0.6126537", "0.61095893", "0.6088904", "0.60787", "0.60637265", "0.6058103", "0.6050469", "0.6041945", "0.6032019", "0.6010829", "0.59943795", "0.59930974", "0.5984827", "0.5984353", "0.59737575", "0.59579647", "0.5956313", "0.5946464", "0.59462917", "0.59432936", "0.5942945", "0.5938256", "0.592824", "0.59101874", "0.58999515", "0.5884746", "0.58576244", "0.58397365", "0.5825526", "0.58212024", "0.5820334", "0.5816333", "0.5804343", "0.57972986", "0.5788149", "0.5781012", "0.57776916", "0.5774428", "0.57550764", "0.57533395", "0.5750979", "0.5746653", "0.5737786", "0.57259834", "0.57259697", "0.5722207", "0.57118565", "0.5707512", "0.5704482", "0.5700498", "0.5688767", "0.5686408", "0.5684776", "0.56762004", "0.56683207", "0.56671566", "0.5662403", "0.56620985", "0.56571007", "0.5644166", "0.5633581", "0.56311846", "0.56304467", "0.5624153", "0.562294", "0.5617891", "0.56121564", "0.56100833", "0.56069523", "0.55846405", "0.55783284", "0.55753845", "0.55718035", "0.5570738", "0.5568902", "0.55688804", "0.5563906", "0.5561984", "0.55544394", "0.5549748", "0.55487573", "0.55462426", "0.5543955", "0.5541707" ]
0.0
-1
deleted adv payment from PO, this affects poadvance , bil advance and bil balance
public String removeAdvPayment(String paymentId, String invoiceNo, String companyId) throws EntityException { Datastore ds = null; Company cmp = null; InwardEntity invoice = null; ObjectId oid = null; ObjectId invoiceOid = null; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); invoiceOid = new ObjectId(invoiceNo); Query<InwardEntity> iQuery = ds.find(InwardEntity.class).filter("company",cmp).filter("isEstimate", true).filter("isInvoice", true) .filter("id", invoiceOid); invoice = iQuery.get(); if(invoice == null) throw new EntityException(512, "converted invoice not found", null, null); //we need to sub old amt, and add new amt, so get old amt boolean match = false; OrderPayments pymnt = null; //all deleted in between - make sure there are adv payments to compare and update if(invoice.getEstimatePayments() == null) throw new EntityException(513, "payment not found", null, null); for(OrderPayments pay : invoice.getEstimatePayments()) { if(pay.getId().toString().equals(paymentId)) { match = true; pymnt = pay; break; } } if(match == false) throw new EntityException(513, "payment not found", null, null); //cant delete java.math.BigDecimal estimateAdvanceTotal = invoice.getEstimateAdvancetotal().subtract(pymnt.getPaymentAmount()); java.math.BigDecimal invoiceAdvanceTotal = invoice.getInvoiceAdvancetotal().subtract(pymnt.getPaymentAmount()); java.math.BigDecimal invoiceBalance = invoice.getInvoiceBalance().add(pymnt.getPaymentAmount()); //get Bill, remove particular element of list after fetching it iQuery = ds.createQuery(InwardEntity.class).disableValidation().filter("id", invoiceOid); UpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class) .removeAll("estimatePayments", pymnt) .set("estimateAdvancetotal",estimateAdvanceTotal) .set("invoiceAdvancetotal", invoiceAdvanceTotal) .set("invoiceBalance", invoiceBalance); UpdateResults result = ds.update(iQuery, ops, false); if(result.getUpdatedCount() == 0) throw new EntityException(512, "update failed", null, null); } catch(EntityException e) { throw e; } catch(Exception e) { throw new EntityException(500, null, e.getMessage(), null); } return "success"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int deletePaymentInfo(int no) {\n\t\treturn session.delete(\"payments.deletePayment\", no);\r\n\t}", "public String removeInvoicePayment(String paymentId, String invoiceNo, String companyId) throws EntityException\n\t\t\t{\n\n\t\t\t\tDatastore ds = null;\n\t\t\t\tCompany cmp = null;\n\t\t\t\tInwardEntity invoice = null;\n\t\t\t\tObjectId oid = null;\n\t\t\t\tObjectId invoiceOid = null;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\t\tcmp = query.get();\n\t\t\t\t\tif(cmp == null)\n\t\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true)\n\t\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\t\tinvoice = iQuery.get();\n\t\t\t\t\tif(invoice == null)\n\t\t\t\t\t\tthrow new EntityException(512, \"invoice not found\", null, null);\n\n\t\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\n\t\t\t\t\tboolean match = false;\n\t\t\t\t\tOrderPayments pymnt = null;\n\t\t\t\t\t\n\t\t\t\t\t//all deleted in between - make sure there are adv payments to compare and update\n\t\t\t\t\tif(invoice.getInvoicePayments() == null)\n\t\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\t\tfor(OrderPayments pay : invoice.getInvoicePayments())\n\t\t\t\t\t{\n\t\t\t\t\t\t//fetch that payment\n\t\t\t\t\t\tif(pay.getId().toString().equals(paymentId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tpymnt = pay;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif(match == false)\n\t\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null); //cant delete\n\n\n\t\t\t\t\tjava.math.BigDecimal invoiceAdvanceTotal = invoice.getInvoiceAdvancetotal().subtract(pymnt.getPaymentAmount());\n\t\t\t\t\tjava.math.BigDecimal invoiceBalance = invoice.getInvoiceBalance().add(pymnt.getPaymentAmount());\n\n\n\n\t\t\t\t\t//get Bill, remove particular element of list after fetching it\n\t\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid);\n\t\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\t\t\t\t\t\t\t.removeAll(\"invoicePayments\", pymnt)\n\t\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvanceTotal)\n\t\t\t\t\t\t\t.set(\"invoiceBalance\", invoiceBalance);\n\n\n\t\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\t\t\t\t}\n\t\t\t\tcatch(EntityException e)\n\t\t\t\t{\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t\t}\n\t\t\t\treturn \"success\";\n\t\t\t}", "public void deleteDAmtInvoValidAmount()\r\n {\r\n this._has_dAmtInvoValidAmount= false;\r\n }", "public OrderPayments updateAdvPayment(OrderPayments payment, String companyId , String invoiceNo ) throws EntityException\n\t\t{\n\n\t\t\tDatastore ds = null;\n\t\t\tCompany cmp = null;\n\t\t\tInwardEntity invoice = null;\n\t\t\tObjectId oid = null;\n\t\t\tObjectId invoiceOid = null;\n\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\tcmp = query.get();\n\t\t\t\tif(cmp == null)\n\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t\t//po and bill must be true\n\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isEstimate\", true).filter(\"isInvoice\", true)\n\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\tinvoice = iQuery.get();\n\t\t\t\tif(invoice == null)\n\t\t\t\t\tthrow new EntityException(512, \"converted invoice not found\", null, null);\n\n\n\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\t\t\t\tjava.math.BigDecimal prevAmt = null;\n\t\t\t\tboolean match = false;\n\t\t\t\t\n\t\t\t\t//all deleted in between - there are no adv payments now\n\t\t\t\tif(invoice.getEstimatePayments() == null)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\tfor(OrderPayments pay : invoice.getEstimatePayments())\n\t\t\t\t{\n\n\t\t\t\t\tif(pay.getId().toString().equals(payment.getId().toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\tprevAmt = pay.getPaymentAmount();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif(match == false)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\tjava.math.BigDecimal advanceTotal = invoice.getEstimateAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount());\n\t\t\t\tjava.math.BigDecimal invoiceAdvance =invoice.getInvoiceAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount());\n\n\t\t\t\t//as PO is converted, change only bill balance , PO balance does not get affected\n\n\t\t\t\tjava.math.BigDecimal balance = invoice.getInvoiceBalance().add(prevAmt).subtract(payment.getPaymentAmount());\n\n\n\t\t\t\t//if null then 0 \n\n\t\t\t\tif(payment.getTdsRate() == null)\n\t\t\t\t\tpayment.setTdsRate(new BigDecimal(0));\n\n\t\t\t\tif(payment.getTdsAmount() == null)\n\t\t\t\t\tpayment.setTdsAmount(new BigDecimal(0));\n\n\t\t\t\t//search for nested payment in the list\n\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid).filter(\"estimatePayments.id\", new ObjectId(payment.getId().toString()));\n\n\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentDate\", payment.getPaymentDate())\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentAmount\", payment.getPaymentAmount())\n\t\t\t\t\t\t.set(\"estimatePayments.$.purposeTitle\", payment.getPurposeTitle())\n\t\t\t\t\t\t.set(\"estimatePayments.$.purposeDescription\", payment.getPurposeDescription())\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentMode\", payment.getPaymentMode())\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentAccount\", payment.getPaymentAccount())\n\t\t\t\t\t\t.set(\"estimatePayments.$.tdsRate\", payment.getTdsRate())\n\t\t\t\t\t\t.set(\"estimatePayments.$.tdsAmount\", payment.getTdsAmount())\n\t\t\t\t\t\t.set(\"estimatePayments.$.isTdsReceived\", payment.isTdsReceived())\n\t\t\t\t\t\t.set(\"estimateAdvancetotal\",advanceTotal)\n\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvance)\n\t\t\t\t\t\t.set(\"invoiceBalance\", balance);\n\n\n\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\n\t\t\t}\n\t\t\tcatch(EntityException e)\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t}\n\t\t\treturn payment;\n\t\t}", "public static String deletePaidBills(){\n return \"delete from current_bills where cb_paid = 1\";\n }", "private void deAllocate() {\n if (getC_Order_ID() != 0) {\n setC_Order_ID(0);\n }\n //\tif (getC_Invoice_ID() == 0)\n //\t\treturn;\n //\tDe-Allocate all\n MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),\n getC_Payment_ID(), get_TrxName());\n log.fine(\"#\" + allocations.length);\n for (int i = 0; i < allocations.length; i++) {\n allocations[i].set_TrxName(get_TrxName());\n allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);\n allocations[i].processIt(DocAction.ACTION_Reverse_Correct);\n allocations[i].save();\n }\n\n // \tUnlink (in case allocation did not get it)\n if (getC_Invoice_ID() != 0) {\n //\tInvoice\n String sql = \"UPDATE C_Invoice \"\n + \"SET C_Payment_ID = NULL, IsPaid='N' \"\n + \"WHERE C_Invoice_ID=\" + getC_Invoice_ID()\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n int no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Invoice #\" + no);\n }\n //\tOrder\n sql = \"UPDATE C_Order o \"\n + \"SET C_Payment_ID = NULL \"\n + \"WHERE EXISTS (SELECT * FROM C_Invoice i \"\n + \"WHERE o.C_Order_ID=i.C_Order_ID AND i.C_Invoice_ID=\" + getC_Invoice_ID() + \")\"\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Order #\" + no);\n }\n }\n //\n setC_Invoice_ID(0);\n setIsAllocated(false);\n }", "public Integer deletePaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "void unsetCapitalPayed();", "int deleteByExample(RepaymentPlanInfoUnExample example);", "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "public void removePayment(PaymentMethod m){\n if(payment.remove(m)){\n totalPaid-=m.getAmount();\n }\n }", "public void clearPayments(){\n payment.clear();\n tips.clear();\n totalPaid = 0;\n }", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "public void delPay(String idi) {\n\t\tourDatabase.delete(DATABASE_TABLE3, Sales_Id + \"=\" +idi, null);\n\t}", "int deleteByExample(PaymentTradeExample example);", "@Override\n\tpublic boolean desposit(int accNo, double money) {\n\t\treturn false;\n\t}", "void unsetPaymentDelay();", "private void clearPayment() { payment_ = null;\n bitField0_ = (bitField0_ & ~0x00000001);\n }", "int deleteByExample(PurchasePaymentExample example);", "@Transactional\n\tpublic boolean deletePO(MaintenanceRequest mrq){\n\t\tif(mrq.getMaintReqStatus().equals(MalConstants.STATUS_COMPLETE_PO)){\n\t\t\treturn false;\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tList<Doc> docs = docDAO.findInvoiceForQuoteByDocTypeAndSourceCode(mrq.getMrqId(), MalConstants.DOC_TYPE_PORDER, MalConstants.DOC_SOURCE_CODE_FLMAINT);\n\t\t\t\tif(docs != null && docs.size() > 0){\n\t\t\t\t\tDoc doc = docs.get(0);\n\t\t\t\t\tdoc.setDocStatus(MalConstants.STATUS_CANCEL);\n\t\t\t\t\tList<Docl> docls = doc.getDocls();\n\t\t\t\t\tif(docls != null && docls.size() > 0){\n\t\t\t\t\t\tfor(Docl docl : docls){\n\t\t\t\t\t\t\tdocl.setLineStatus(MalConstants.STATUS_CANCEL);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdocDAO.save(doc);\n\t\t\t\t}\n\t\t\t\t// also remove the schedule interval record associated with this authorization code (coupon ref) if there is one.\n\t\t\t\tif(mrq != null && !MALUtilities.isEmpty(mrq.getCouponBookReference())){\n\t\t\t\t\tVehicleScheduleInterval vehicleScheduleInterval = null;\n\t\t\t\t\ttry{\n\t\t\t\t\t\tvehicleScheduleInterval = vehicleScheduleService.getVehicleScheduleIntervalForAuthNumber(mrq.getCouponBookReference());\n\t\t\t\t\t}catch(MalException ex){\n\t\t\t\t\t\tlogger.error(ex,\"Error occured while retrieving schedule interval for Authorization Number = \"+mrq.getCouponBookReference());\n\t\t\t\t\t}\n\t\t\t\t\tif(!MALUtilities.isEmpty(vehicleScheduleInterval)){\n\t\t\t\t\t\tvehicleScheduleService.deleteVehicleScheduleInterval(vehicleScheduleInterval);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlogBookService.deleteLogBook(mrq, LogBookTypeEnum.TYPE_ACTIVITY);\n\t\t\t\tmaintenanceRequestDAO.deleteById(mrq.getMrqId());\t\t\t\t\n\t\t\t}catch(Exception ex){\n\t\t\t\tthrow new MalException(\"generic.error.occured.while\", \n\t\t\t\t\t\tnew String[] { \"deleting maintenance po : \" + mrq.getJobNo()}, ex);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }", "void deleteBet(Account account, int id, BigDecimal amount) throws DAOException;", "@Override\r\n\tpublic int modify(PaymentPO po) {\n\t\treturn 0;\r\n\t}", "public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;", "void unsetAmount();", "public void deleteLoan() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString query = \"SELECT no_irregular_payments FROM loan\"\n\t\t\t\t\t\t+ \" WHERE client_id ='\"+this.client_id+\"' AND start_date ='\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\trs.next();\n\t\t\tint irrPayments = rs.getInt(1);\n\t\t\t\n\t\t\t// get the current date that will serve as an end date for the loan\n\t\t\tDate current_time = new Date();\n\t\t\t// MySQL date format\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t// Adapt the java data format to the mysql one\n\t\t\tString end_date = sdf.format(current_time);\n\t\t\t\n\t\t\tquery = \"INSERT INTO loan_history \"\n\t\t\t\t\t+ \"VALUES ('\"+this.client_id+\"', \"+this.principal_amount+\", '\"+this.start_date+\"', '\"+end_date+\"', \"+irrPayments+\")\";\n\t\t\tstat.executeUpdate(query);\n\t\t\t\n\t\t\t// delete the loan\n\t\t\tquery = \"DELETE FROM loan \"\n\t\t\t\t\t+ \"WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tstat.executeUpdate(query);\n\t\t\t\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "void actualizarItemVentaEliminada(DetalleVentaJPA dv);", "int deleteByPrimaryKey(String repaymentId);", "private void unDeleteValoresPago() {\n CQChangeStateVP( MVALORPAGO.ANULADO,MVALORPAGO.EMITIDO);\n }", "void deleteAllPaymentTerms() throws CommonManagementException;", "int deleteByExample(ProcRecInvoiceExample example);", "void deleteCustomerDDPayById(int id);", "public static void removeOnePayment(Payment pagamento) throws ClassNotFoundException{\r\n\t\t\r\n\t\t//Deletion occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"DELETE FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ? AND \"\r\n \t\t\t\t+ \"nomemetodo = ? AND \"\r\n \t\t\t\t+ \"credenziali = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, pagamento.getUserMailFromPayment());\r\n \t\t\tpst.setString(2, pagamento.getNomeMetodo());\r\n \t\t\tpst.setString(3, pagamento.getCredenziali());\r\n \t\t\t\r\n \t\t\tint n = pst.executeUpdate();\r\n \t\t\tSystem.out.println(\"Rimosse \" + n + \" righe da tabella \" + NOME_TABELLA + \": \" + pagamento.getUserMailFromPayment());\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante cancellazione dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n\t\t\r\n\t}", "Order removeInCharge(Order order, User user);", "public void declineTransaction(CommandOfService c) throws Exception {\n // We give back the points to the user\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 0){\n userDAO.addPoints(s.getCost(),u);\n }\n DAO.declineTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction declined!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been declined.\\n\";\n try {\n facadeNotification.createNotification(u.getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void deleteEntityObj(StdMilkRate e) {\n\t\t\n\t}", "public OrderPayments updateInvoicePayment(OrderPayments payment, String invoiceNo, String companyId) throws EntityException\n\t\t{\n\n\t\t\tDatastore ds = null;\n\t\t\tCompany cmp = null;\n\t\t\tInwardEntity invoice = null;\n\t\t\tObjectId oid = null;\n\t\t\tObjectId invoiceOid = null;\n\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\tcmp = query.get();\n\t\t\t\tif(cmp == null)\n\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\n\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true)\n\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\tinvoice = iQuery.get();\n\t\t\t\tif(invoice == null)\n\t\t\t\t\tthrow new EntityException(512, \" invoice not found\", null, null);\n\n\n\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\t\t\t\tjava.math.BigDecimal prevAmt = null;\n\t\t\t\tboolean match = false;\n\n\t\t\t\t//all deleted in between\n\t\t\t\tif(invoice.getInvoicePayments() == null)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\t\t\t\t\t\n\t\t\t\t\t//always fetch payment prev amt from db, it may have changed in between\t\n\t\t\t\tfor(OrderPayments pay : invoice.getInvoicePayments())\n\t\t\t\t{\n\n\t\t\t\t\tif(pay.getId().toString().equals(payment.getId().toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\tprevAmt = pay.getPaymentAmount();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif(match == false)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\n\t\t\t\t//payment towards a bill, PO not affected in any way\n\t\t\t\tjava.math.BigDecimal invoiceAdvance = invoice.getInvoiceAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount());\n\t\t\t\tjava.math.BigDecimal balance = invoice.getInvoiceBalance().add(prevAmt).subtract(payment.getPaymentAmount()); // or grand total - just set advance\n\n\n\t\t\t\t//if null then 0 \n\n\t\t\t\tif(payment.getTdsRate() == null)\n\t\t\t\t\tpayment.setTdsRate(new BigDecimal(0));\n\n\t\t\t\tif(payment.getTdsAmount() == null)\n\t\t\t\t\tpayment.setTdsAmount(new BigDecimal(0));\n\n\t\t\t\t//search for nested payment in the list\n\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid).filter(\"invoicePayments.id\", new ObjectId(payment.getId().toString()));\n\n\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentDate\", payment.getPaymentDate())\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentAmount\", payment.getPaymentAmount())\n\t\t\t\t\t\t.set(\"invoicePayments.$.purposeTitle\", payment.getPurposeTitle())\n\t\t\t\t\t\t.set(\"invoicePayments.$.purposeDescription\", payment.getPurposeDescription())\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentMode\", payment.getPaymentMode())\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentAccount\", payment.getPaymentAccount())\n\t\t\t\t\t\t.set(\"invoicePayments.$.tdsRate\", payment.getTdsRate())\n\t\t\t\t\t\t.set(\"invoicePayments.$.tdsAmount\", payment.getTdsAmount())\n\t\t\t\t\t\t.set(\"invoicePayments.$.isTdsReceived\", payment.isTdsReceived())\n\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvance)\n\t\t\t\t\t\t.set(\"invoiceBalance\", balance);\n\n\n\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\n\t\t\t}\n\t\t\tcatch(EntityException e)\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t}\n\t\t\treturn payment;\n\t\t}", "int delWayBillByIdTravel(Long id_travel);", "public Boolean deletePayment(Payment sm){\n\t\tTblPayment tblsm = new TblPayment();\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\ttblsm.convertToTable(sm);\n\t\t\ttx = session.beginTransaction();\n\t\t\tsession.delete(tblsm);\n\t\t\ttx.commit();\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\tif (tx!= null) tx.rollback();\n\t\t\te.printStackTrace();\n\t\t\tsession.close();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "public void delete(ReceiptFormPO po) throws RemoteException {\n\t\tSystem.out.println(\"Delete ReceiptFormPO Start!!\");\n\t\t\n\t\tif(po==null){\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tioHelper = new IOHelper();\n\t\tallReceiptForm = ioHelper.readFromFile(file);\n\t\tSystem.out.println(po.getNO() );\n\t\tallReceiptForm.remove(po.getNO());\n\t\tioHelper.writeToFile(allReceiptForm, file);\n\t}", "int deleteByExample(PayLogInfoPoExample example);", "@Override\n\tpublic void delete(int ShopLoyaltyCardId) {\n\t\t\n\t}", "boolean deposite(double amount);", "@Override\r\n\tpublic boolean deleteInvigilate(Integer no) {\n\t\tif(invigilateMapper.deleteByPrimaryKey(no)>0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static void deposite (double amount) {\n double resultDeposit = balance + amount;\r\n System.out.println(\"Deposit successful.\\nCurrent balance: \" + \"$\" + resultDeposit+ \".\");\r\n }", "int delWayBillById(Long id_wayBill) throws WayBillNotFoundException;", "void deleteDepositTransaction(int index, Ui ui, boolean isCardBill) throws TransactionException, BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "public static double getPaymentAmountDue(Payment payment, HashMap requestParams, accVendorPaymentDAO accVendorPaymentobj) throws ServiceException, ParseException {\n boolean isOpeningPayment = false;\n boolean isAdvancePaymentToVendor = false;\n boolean isRefundPaymentToCustomer = false;\n DateFormat df = (DateFormat) requestParams.get(GoodsReceiptCMNConstants.DATEFORMAT);\n if (df == null) {\n df = (DateFormat) requestParams.get(Constants.df);\n }\n String companyid = (String) requestParams.get(GoodsReceiptCMNConstants.COMPANYID);\n double paymentDueAmt = 0;\n if ((payment.getAdvanceDetails() != null && !payment.getAdvanceDetails().isEmpty()) || payment.isIsOpeningBalencePayment()) {\n double paymentAmt = 0;\n double linkedPaymentAmt = 0;\n if (payment.isIsOpeningBalencePayment()) {//opening payment\n isOpeningPayment = true;\n paymentAmt += payment.getDepositAmount();\n } else if (payment.getVendor() != null) {//advance payment against vendor\n isAdvancePaymentToVendor = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n paymentAmt += advanceDetail.getAmount();\n }\n } else if (payment.getCustomer() != null) {//Refund payment against customer\n isRefundPaymentToCustomer = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n if (advanceDetail.getReceiptAdvanceDetails() == null) {//Only such refunds can be due in which at the time of creation no document (no advance receipt) is selected \n paymentAmt += advanceDetail.getAmount();\n }\n }\n //In this case paymentAmt can be zero (if all refund have advance receipt documnet selected) so we need to retun amount due zero here\n if (paymentAmt == 0) {\n return 0;\n }\n }\n HashMap<String, Object> reqParams1 = new HashMap();\n reqParams1.put(\"paymentid\", payment.getID());\n reqParams1.put(\"companyid\", companyid);\n reqParams1.put(Constants.df, df);\n if (requestParams.containsKey(\"asofdate\") && requestParams.get(\"asofdate\") != null) {\n reqParams1.put(\"asofdate\", requestParams.get(\"asofdate\"));\n }\n if (isOpeningPayment || isAdvancePaymentToVendor) {\n KwlReturnObject result = accVendorPaymentobj.getLinkedDetailsPayment(reqParams1);\n List<LinkDetailPayment> linkedDetaisPayments = result.getEntityList();\n for (LinkDetailPayment ldp : linkedDetaisPayments) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getLinkDetailPaymentToCreditNote(reqParams1);\n List<LinkDetailPaymentToCreditNote> linkedDetaisPaymentsToCN = result.getEntityList();\n for (LinkDetailPaymentToCreditNote ldp : linkedDetaisPaymentsToCN) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getAdvanceReceiptDetailsByPayment(reqParams1);\n List<Object[]> list2 = result.getEntityList();\n for (Object obj[] : list2) {\n double revExchangeRate = 1.0;\n double amount = obj[1] != null ? Double.parseDouble(obj[1].toString()) : 0.0;\n double exchangeRate = obj[2] != null ? Double.parseDouble(obj[2].toString()) : 0.0;\n if (exchangeRate != 0.0) {\n revExchangeRate = 1 / exchangeRate;\n }\n linkedPaymentAmt += authHandler.round(revExchangeRate * amount, companyid);\n }\n result = accVendorPaymentobj.getLinkDetailReceiptToAdvancePayment(reqParams1);\n List<LinkDetailReceiptToAdvancePayment> linkDetailReceiptToAdvancePayment = result.getEntityList();\n for (LinkDetailReceiptToAdvancePayment ldp : linkDetailReceiptToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmountInPaymentCurrency();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n } else if (isRefundPaymentToCustomer) {\n KwlReturnObject result = accVendorPaymentobj.getLinkDetailAdvanceReceiptToRefundPayment(reqParams1);\n List<LinkDetailPaymentToAdvancePayment> linkDetailPaymentToAdvancePayment = result.getEntityList();\n for (LinkDetailPaymentToAdvancePayment ldp : linkDetailPaymentToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmount();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n }\n }\n paymentDueAmt = authHandler.round(paymentDueAmt, companyid);\n return paymentDueAmt;\n }", "public void deleteFromPoseOrder() { \n \ttry {\n\t\t\tthis.openDataBase();\n\t\t\tmyDataBase.execSQL(DeletePoses);\n\t\t\tthis.close();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLog.d(\"SQL Exception\", e.toString());\n\t\t}\n \t\n }", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public void delete(Privilege pri) throws Exception {\n\t\tCommandUpdatePrivilege com=new CommandUpdatePrivilege(AuthModel.getInstance().getUser(),pri);\r\n\t\tClient.getInstance().write(com);\r\n\t\tObject obj=Client.getInstance().read();\r\n\t\tif(obj instanceof Command){\r\n\t\t\tdirty=true;\r\n\t\t\tlist=this.get(cond);\r\n\t\t\tthis.fireModelChange(list);\r\n\t\t\treturn ;\r\n\t\t}\r\n\t\tthrow new Exception(\"Delete Customer failed...\"+list);\r\n\t}", "public void discharge() {\n\t\tstate = loanState.DISCHARGED; //changed 'StAtE' to 'state' and lOaN_sTaTe.DISCHARGED to loanState.DISCHARGED\r\n\t}", "public void debitBankAccount() {\n\t\tint beforeDebit = this.sender.getBankAccount().getAmount();\n\t\tthis.sender.getBankAccount().setAmount(beforeDebit - this.getCost());\n\t\tSystem.out.println(this.getCost() + \" euros is debited from \" + this.sender.getName()\n\t\t\t\t+ \" account whose balance is now \" + this.sender.getBankAccount().getAmount() + \" euros\");\n\t}", "public int modifyChkStorageForDeleteInBill(TicketStorageInBill vo);", "public void eliminar(Periodo periodo)\r\n/* 27: */ {\r\n/* 28: 53 */ this.periodoDao.eliminar(periodo);\r\n/* 29: */ }", "boolean removeVariableDiscount(int id,int acc_no);", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void PayPalTest() {\r\n\r\n\t\tpd.PayPal();\r\n\t\tpd.pm.deletePersistent(pd.pp1);\r\n\r\n\t}", "@Override\n\tpublic void delete(ExperTypeVO expertypeVO) {\n\n\t}", "@Override\n\tpublic int deleteUserReimbRecord(int reimbid) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void deposit(int money) {\n\t\t\n\t}", "public void deleteUniversalDeal() {\r\n/* 149 */ this._has_universalDeal = false;\r\n/* */ }", "Order removeInvoiceApprovedStatus(Order order, User user);", "public void debitar(int valor) throws SaldoInsuficienteException{\r\n this.contaCorrente.debitar(valor);\r\n }", "@Transactional\r\n\tpublic void delete(int billingid) {\n\t\t\r\n\t}", "public void decida(){\r\n int f=this.getFila();\r\n int c=this.getColumna();\r\n int cont=alRededor(f,c);\r\n if(this.isVivo()){\r\n if(cont==2 || cont==3){\r\n estadoSiguiente=VIVA;\r\n }else/* if(cont==1 || cont>3)*/{\r\n estadoSiguiente=MUERTA;\r\n }\r\n }else{\r\n if(cont==3){\r\n estadoSiguiente=VIVA;\r\n }else if(cont==1 || cont>3){\r\n estadoSiguiente=MUERTA;\r\n }\r\n }\r\n }", "public void editContestPayment(ContestPayment contestPayment) throws ContestManagementException {\n \r\n }", "public void editContestPayment(ContestPayment contestPayment) throws ContestManagementException {\n \r\n }", "void investmentDeleteBond(String bondName, Ui ui) throws BankException, BondException {\n throw new BankException(\"This account does not support this feature\");\n }", "@Override\r\n\tpublic void deposit(int amount) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int deletePurchase(PurchaseVo vo) {\n\t\treturn 0;\r\n\t}", "@Override\n public void delete(Promocion prm) {\n promocionRepository.delete(prm);\n }", "public void despegar(){\n if(this.posicion == 1){\n this.setPosicion(2);\n this.indicarEstado(\"Volando\");\n } else{\n System.out.println(\"No estoy preparado para el despegue\");\n }\n }", "@Override\r\n\tpublic boolean deletePostPaidAccount(int customerID, long mobileNo) {\n\t\treturn false;\r\n\t}", "int deleteByExample(SrmFundItemExample example);", "public boolean removeContestPayment(long contestPaymentId) throws ContestManagementException {\n return false;\r\n }", "public boolean removeContestPayment(long contestPaymentId) throws ContestManagementException {\n return false;\r\n }", "@Override //删除id\n\tpublic void deletePoInfoById(String poinid) throws Exception {\n\t\tdao.delete(\"PoInfoMapper.deletePoInfoById\", poinid);\n\t}", "public void terminate(Payroll pr){\n while(!pr.getList().isEmpty()){\n payroll.remove(pr.getList().removeFirst());\n }\n }", "public void removePayment(int n){\n assert(n <= payment.size());\n removePayment(payment.get(n));\n }", "@Override\r\n\tpublic boolean deopsit(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tbalance = (float) (balance + amount);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void del(Integer id) {\n\t\tsm.delete(\"com.lanzhou.entity.Longpay.del\", id);\n\t}", "void deductFromAmount(double amount) {\n this.currentAmount -= amount;\n }", "protected void reset(PaypalIpn dto)\r\n\t{\r\n\t}", "public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }", "private void makeDeductionsfromPayments(int walletid, int due,int bal,ArrayList<Integer> l) {\n\t\tArrayList<Integer> l1=l;\n\t\tint toPay=due;\n\t\tint pocket=bal;\n\t\tint id=walletid;\n\t\tint deduction=pocket-toPay;\n\t\tString str=\"update wallet set balance=\"+deduction+\" where walletId=\"+id;\n\t\ttry {\n\t\t\tint count=stmt.executeUpdate(str);\n\t\t\n\t\t\t\tupdateOrders(id,l1);\n\t\t\t\tupdatePayments(id,toPay);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void delete(Policy obj) throws SQLException {\t\t\n\t\tString deletePolicy = \"DELETE FROM Policies WHERE pID = ?\";\n\t\ttry \n\t {\n\t\t\tPreparedStatement preparedStatement = DBConnection.GetDBConnection().prepareStatement(deletePolicy);\n\t\t\tpreparedStatement.setString(1, obj.pID);\n\t\t\tpreparedStatement.executeUpdate();\n\t\t} \n\t catch (SQLException e) \n\t {\n\t \tLogger.GetInstance().log(e.getMessage());\n\t\t\tLogger.GetInstance().log(\"Unable to delete the Following Policy:\\n\"\n\t\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t\t+ \"ID: \"+obj.pID+\"\\n\"\n\t\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\t\t}\n\n\t\tLogger.GetInstance().log(\"Successfully deleted the Following Policy:\\n\"\n\t\t\t\t+ \"Policy ID: \"+obj.pID+\"\\n\"\n\t\t\t\t+ \"First name: \"+ obj.firstName+\"\\n\"\n\t\t\t\t+ \"Last name: \"+obj.lastName+\"\\n\"\n\t\t\t\t+ \"Insurance type: \"+obj.type+\"\\n\"\n\t\t\t\t+ \"Remarks: \"+obj.remarks+\"\\n\");\n\n\t}", "@DeleteMapping(\"/payments/{id}\")\n public ResponseEntity<Void> deletePayment(@PathVariable Long id) {\n log.debug(\"REST request to delete Payment : {}\", id);\n paymentRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "public void eliminarEnIndice(int indice){\n if(irAIndice(indice)){\n eliminarBodegaActual();\n }\n }", "public Builder clearPaid() {\n \n paid_ = 0D;\n onChanged();\n return this;\n }", "public void deleteIncome(Income income) {\n\t\t\n\t}", "int deleteByExample(CGcontractCreditExample example);", "boolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;", "@Override\r\n\tpublic void delete(TAdAddress account) {\n\r\n\t}", "public String deleteProductionBlock(ProductionBlock pb);", "@Override\n\tpublic void delete(MedioPago entidad) {\n\t\t\n\t}", "void deleteconBooking(int confirm_id) throws DataAccessException;", "public void deletePayment(int num) {\n \titems.remove(num);\n \t try {\n FileWriter fw = new FileWriter(jsonFile);\n PrintWriter pw = new PrintWriter(fw);\n String str[] = Data.toString().split(\",\");\n int i;\n for(i=0; i<str.length-1; i++) {\n pw.println(str[i]+\",\");\n }\n pw.println(str[i]);\n pw.close();\n fw.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }", "@Override\r\n\tpublic void ad_no_delete(int an_no) {\n\t\tadao.ad_no_Delete(an_no);\r\n\t}" ]
[ "0.6596164", "0.6505401", "0.6485378", "0.6205673", "0.618611", "0.6119692", "0.60894424", "0.6032682", "0.5977164", "0.59766227", "0.595042", "0.59437954", "0.58985", "0.5886868", "0.5874585", "0.5853593", "0.5843215", "0.58396465", "0.57977957", "0.5779437", "0.5779075", "0.5761841", "0.57616234", "0.5746917", "0.5734048", "0.5728481", "0.5726953", "0.57101196", "0.5709881", "0.56821895", "0.56599826", "0.5650333", "0.56452686", "0.5639807", "0.56349933", "0.563315", "0.5630419", "0.56160736", "0.5611465", "0.5565517", "0.5548976", "0.5538103", "0.5537539", "0.55280715", "0.5496623", "0.54949635", "0.54857135", "0.5482992", "0.54732025", "0.5471816", "0.54710704", "0.54708517", "0.5465673", "0.545882", "0.54527324", "0.54414487", "0.54353315", "0.54306483", "0.54262114", "0.5424041", "0.5421834", "0.5405867", "0.5402841", "0.53983533", "0.53845", "0.5380692", "0.5380135", "0.5378215", "0.5378215", "0.53781724", "0.5369966", "0.53652304", "0.53581184", "0.5351938", "0.5337077", "0.53362536", "0.53099906", "0.53099906", "0.5308994", "0.5306325", "0.5298676", "0.529639", "0.529208", "0.5288966", "0.5286538", "0.5286353", "0.5280913", "0.5269305", "0.52688193", "0.5267944", "0.5267603", "0.52663016", "0.52660817", "0.5254559", "0.52491456", "0.52451164", "0.5236383", "0.5235536", "0.5234528", "0.5227151" ]
0.7008256
0
both kinds of bill deleted bill payment , this affects bil advance and bil balance, not PO
public String removeInvoicePayment(String paymentId, String invoiceNo, String companyId) throws EntityException { Datastore ds = null; Company cmp = null; InwardEntity invoice = null; ObjectId oid = null; ObjectId invoiceOid = null; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); invoiceOid = new ObjectId(invoiceNo); Query<InwardEntity> iQuery = ds.find(InwardEntity.class).filter("company",cmp).filter("isInvoice", true) .filter("id", invoiceOid); invoice = iQuery.get(); if(invoice == null) throw new EntityException(512, "invoice not found", null, null); //we need to sub old amt, and add new amt, so get old amt boolean match = false; OrderPayments pymnt = null; //all deleted in between - make sure there are adv payments to compare and update if(invoice.getInvoicePayments() == null) throw new EntityException(513, "payment not found", null, null); for(OrderPayments pay : invoice.getInvoicePayments()) { //fetch that payment if(pay.getId().toString().equals(paymentId)) { match = true; pymnt = pay; break; } } if(match == false) throw new EntityException(513, "payment not found", null, null); //cant delete java.math.BigDecimal invoiceAdvanceTotal = invoice.getInvoiceAdvancetotal().subtract(pymnt.getPaymentAmount()); java.math.BigDecimal invoiceBalance = invoice.getInvoiceBalance().add(pymnt.getPaymentAmount()); //get Bill, remove particular element of list after fetching it iQuery = ds.createQuery(InwardEntity.class).disableValidation().filter("id", invoiceOid); UpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class) .removeAll("invoicePayments", pymnt) .set("invoiceAdvancetotal", invoiceAdvanceTotal) .set("invoiceBalance", invoiceBalance); UpdateResults result = ds.update(iQuery, ops, false); if(result.getUpdatedCount() == 0) throw new EntityException(512, "update failed", null, null); } catch(EntityException e) { throw e; } catch(Exception e) { throw new EntityException(500, null, e.getMessage(), null); } return "success"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n boolean isDebtValid = true;\n if(mDbHelper.getCategory(mTransaction.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n List<Debt> debts = mDbHelper.getAllDebts();\n\n Double repayment = 0.0, borrow = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) { // Repayment\n repayment += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) { // Borrow\n borrow += debt.getAmount();\n }\n }\n\n if(borrow - mTransaction.getAmount() < repayment) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_delete_invalid));\n }\n }\n\n if(isDebtValid) {\n mDbHelper.deleteTransaction(mTransaction.getId());\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n\n cleanup();\n\n // Return to FragmentListTransaction\n getFragmentManager().popBackStackImmediate();\n LogUtils.logLeaveFunction(Tag);\n }\n }", "private void handleConfirmBillPayment() {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\tPaymentBiller request = new PaymentBiller();\n\t\t\tObjectFactory f = new ObjectFactory();\n\t\t\tCommonParam2 commonParam = f.createCommonParam2();\n\t\t\t\n\t\t\tcommonParam.setProcessingCode(f.createCommonParam2ProcessingCode(\"100601\"));\n\t\t\tcommonParam.setChannelId(f.createCommonParam2ChannelId(\"6018\"));\n\t\t\tcommonParam.setChannelType(f.createCommonParam2ChannelType(\"PB\"));\n\t\t\tcommonParam.setNode(f.createCommonParam2Node(\"WOW_CHANNEL\"));\n\t\t\tcommonParam.setCurrencyAmount(f.createCommonParam2CurrencyAmount(\"IDR\"));\n\t\t\tcommonParam.setAmount(f.createCommonParam2Amount(String.valueOf(billPayBean.getBillAmount())));\n\t\t\tcommonParam.setCurrencyfee(f.createCommonParam2Currencyfee(billPayBean.getFeeCurrency()));\n\t\t\tcommonParam.setFee(f.createCommonParam2Fee(String.valueOf(billPayBean.getFeeAmount())));\n\t\t\tcommonParam.setTransmissionDateTime(f.createCommonParam2TransmissionDateTime(PortalUtils.getSaveXMLGregorianCalendar(Calendar.getInstance()).toXMLFormat()));\n\t\t\tcommonParam.setRequestId(f.createCommonParam2RequestId(MobiliserUtils.getExternalReferenceNo(isystemEndpoint)));\n\t\t\tcommonParam.setAcqId(f.createCommonParam2AcqId(\"213\"));\n\t\t\tcommonParam.setReferenceNo(f.createCommonParam2ReferenceNo(String.valueOf(billPayBean.getReferenceNumber())));\n\t\t\tcommonParam.setTerminalId(f.createCommonParam2TerminalId(\"WOW\"));\n\t\t\tcommonParam.setTerminalName(f.createCommonParam2TerminalName(\"WOW\"));\n\t\t\tcommonParam.setOriginal(f.createCommonParam2Original(billPayBean.getAdditionalData()));\n\t\t\t\n\t\t\trequest.setCommonParam(commonParam);\n\t\t\tPhoneNumber phone = new PhoneNumber(this.getMobiliserWebSession().getBtpnLoggedInCustomer().getUsername());\n\t\t\trequest.setAccountNo(phone.getNationalFormat());\n\t\t\trequest.setBillerCustNo( billPayBean.getSelectedBillerId().getId()); \n\t\t\trequest.setDebitType(\"0\");\n\t\t\trequest.setInstitutionCode(billPayBean.getBillerId());\n\t\t\trequest.setProductID(billPayBean.getProductId());\n\t\t\trequest.setUnitId(\"0901\");\n\t\t\trequest.setProcessingCodeBiller(\"501000\");\n\t\t\t\n\t\t\tString desc1=\"Bill Payment\";\n\t\t\tString desc2= billPayBean.getBillerId();\n\t\t\tString desc3=\"\";\n\t\t\t\n\t\t\trequest.setAdditionalData1(desc1);\n\t\t\trequest.setAdditionalData2(desc2);\n\t\t\trequest.setAdditionalData3(desc3);\n\t\t\t\n\t\t\tPaymentBillerResponse response = new PaymentBillerResponse();\n\t\t\t\n\t\t\tresponse = (PaymentBillerResponse) webServiceTemplete.marshalSendAndReceive(request, \n\t\t\t\t\tnew WebServiceMessageCallback() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void doWithMessage(WebServiceMessage message) throws IOException,\n\t\t\t\t\t\tTransformerException {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t((SoapMessage) message)\n\t\t\t\t\t.setSoapAction(\"com_btpn_biller_ws_provider_BtpnBillerWsTopup_Binder_paymentBiller\");\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\tif (response.getResponseCode().equals(\"00\")) {\n\t\t\t\tbillPayBean.setStatusMessage(getLocalizer().getString(\"success.perform.billpayment\", this));\n\t\t\t\tsetResponsePage(new BankBillPaymentStatusPage(billPayBean));\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(MobiliserUtils.errorMessage(response.getResponseCode(), response.getResponseDesc(), getLocalizer(), this));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\terror(getLocalizer().getString(\"error.exception\", this));\n\t\t\tLOG.error(\"An exception was thrown\", e);\n\t\t}\n\t}", "void deleteBet(Account account, int id, BigDecimal amount) throws DAOException;", "public static String deletePaidBills(){\n return \"delete from current_bills where cb_paid = 1\";\n }", "public int modifyChkStorageForDeleteInBill(TicketStorageInBill vo);", "public String removeAdvPayment(String paymentId, String invoiceNo, String companyId) throws EntityException\n\t\t{\n\n\t\t\tDatastore ds = null;\n\t\t\tCompany cmp = null;\n\t\t\tInwardEntity invoice = null;\n\t\t\tObjectId oid = null;\n\t\t\tObjectId invoiceOid = null;\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\tcmp = query.get();\n\t\t\t\tif(cmp == null)\n\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isEstimate\", true).filter(\"isInvoice\", true)\n\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\tinvoice = iQuery.get();\n\t\t\t\tif(invoice == null)\n\t\t\t\t\tthrow new EntityException(512, \"converted invoice not found\", null, null);\n\n\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\n\t\t\t\tboolean match = false;\n\t\t\t\tOrderPayments pymnt = null;\n\t\t\t\t\n\t\t\t\t//all deleted in between - make sure there are adv payments to compare and update\n\t\t\t\tif(invoice.getEstimatePayments() == null)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\tfor(OrderPayments pay : invoice.getEstimatePayments())\n\t\t\t\t{\n\n\t\t\t\t\tif(pay.getId().toString().equals(paymentId))\n\t\t\t\t\t{\n\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\tpymnt = pay;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif(match == false)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null); //cant delete\n\n\n\n\t\t\t\tjava.math.BigDecimal estimateAdvanceTotal = invoice.getEstimateAdvancetotal().subtract(pymnt.getPaymentAmount());\n\t\t\t\tjava.math.BigDecimal invoiceAdvanceTotal = invoice.getInvoiceAdvancetotal().subtract(pymnt.getPaymentAmount());\n\t\t\t\tjava.math.BigDecimal invoiceBalance = invoice.getInvoiceBalance().add(pymnt.getPaymentAmount());\n\n\n\n\t\t\t\t//get Bill, remove particular element of list after fetching it\n\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid);\n\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\t\t\t\t\t\t.removeAll(\"estimatePayments\", pymnt)\n\t\t\t\t\t\t.set(\"estimateAdvancetotal\",estimateAdvanceTotal)\n\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvanceTotal)\n\t\t\t\t\t\t.set(\"invoiceBalance\", invoiceBalance);\n\n\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\t\t\t}\n\t\t\tcatch(EntityException e)\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t}\n\t\t\treturn \"success\";\n\t\t}", "boolean debit(TransactionRequest transaction) throws ebank.InsufficientBalanceException,ebank.CardNumberException, SQLException, ClassNotFoundException;", "public void debitBankAccount() {\n\t\tint beforeDebit = this.sender.getBankAccount().getAmount();\n\t\tthis.sender.getBankAccount().setAmount(beforeDebit - this.getCost());\n\t\tSystem.out.println(this.getCost() + \" euros is debited from \" + this.sender.getName()\n\t\t\t\t+ \" account whose balance is now \" + this.sender.getBankAccount().getAmount() + \" euros\");\n\t}", "@Transactional\r\n\tpublic void delete(int billingid) {\n\t\t\r\n\t}", "@Override\r\n\tpublic int deletePaymentInfo(int no) {\n\t\treturn session.delete(\"payments.deletePayment\", no);\r\n\t}", "protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }", "public void deleteDAmtInvoValidAmount()\r\n {\r\n this._has_dAmtInvoValidAmount= false;\r\n }", "int delWayBillById(Long id_wayBill) throws WayBillNotFoundException;", "void deleteDepositTransaction(int index, Ui ui, boolean isCardBill) throws TransactionException, BankException {\n throw new BankException(\"This account does not support this feature\");\n }", "@Override\n\tpublic Double discountsAppliedOnTotalBill(Double billCost) {\n\t\tlogger.info(\"Bill Amount Beofre Final Discount is : \" + billCost);\n\t\t// Logic For Decreasing 5 for each 100\n\t\tretailCustomerUserBill.setTotalBillCost(billCost - Math.floor(Math.floor(billCost) / 100) * 5);\n\t\tlogger.info(\"Bill Amount After Final Discount is : \" + retailCustomerUserBill.getTotalBillCost());\n\t\treturn retailCustomerUserBill.getTotalBillCost();\n\t}", "Order removeInCharge(Order order, User user);", "public Integer deletePaymentType(PaymentTypeObject paymentTypeObject) throws AppException;", "public OrderPayments updateAdvPayment(OrderPayments payment, String companyId , String invoiceNo ) throws EntityException\n\t\t{\n\n\t\t\tDatastore ds = null;\n\t\t\tCompany cmp = null;\n\t\t\tInwardEntity invoice = null;\n\t\t\tObjectId oid = null;\n\t\t\tObjectId invoiceOid = null;\n\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\tcmp = query.get();\n\t\t\t\tif(cmp == null)\n\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t\t//po and bill must be true\n\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isEstimate\", true).filter(\"isInvoice\", true)\n\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\tinvoice = iQuery.get();\n\t\t\t\tif(invoice == null)\n\t\t\t\t\tthrow new EntityException(512, \"converted invoice not found\", null, null);\n\n\n\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\t\t\t\tjava.math.BigDecimal prevAmt = null;\n\t\t\t\tboolean match = false;\n\t\t\t\t\n\t\t\t\t//all deleted in between - there are no adv payments now\n\t\t\t\tif(invoice.getEstimatePayments() == null)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\tfor(OrderPayments pay : invoice.getEstimatePayments())\n\t\t\t\t{\n\n\t\t\t\t\tif(pay.getId().toString().equals(payment.getId().toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\tprevAmt = pay.getPaymentAmount();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif(match == false)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\tjava.math.BigDecimal advanceTotal = invoice.getEstimateAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount());\n\t\t\t\tjava.math.BigDecimal invoiceAdvance =invoice.getInvoiceAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount());\n\n\t\t\t\t//as PO is converted, change only bill balance , PO balance does not get affected\n\n\t\t\t\tjava.math.BigDecimal balance = invoice.getInvoiceBalance().add(prevAmt).subtract(payment.getPaymentAmount());\n\n\n\t\t\t\t//if null then 0 \n\n\t\t\t\tif(payment.getTdsRate() == null)\n\t\t\t\t\tpayment.setTdsRate(new BigDecimal(0));\n\n\t\t\t\tif(payment.getTdsAmount() == null)\n\t\t\t\t\tpayment.setTdsAmount(new BigDecimal(0));\n\n\t\t\t\t//search for nested payment in the list\n\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid).filter(\"estimatePayments.id\", new ObjectId(payment.getId().toString()));\n\n\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentDate\", payment.getPaymentDate())\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentAmount\", payment.getPaymentAmount())\n\t\t\t\t\t\t.set(\"estimatePayments.$.purposeTitle\", payment.getPurposeTitle())\n\t\t\t\t\t\t.set(\"estimatePayments.$.purposeDescription\", payment.getPurposeDescription())\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentMode\", payment.getPaymentMode())\n\t\t\t\t\t\t.set(\"estimatePayments.$.paymentAccount\", payment.getPaymentAccount())\n\t\t\t\t\t\t.set(\"estimatePayments.$.tdsRate\", payment.getTdsRate())\n\t\t\t\t\t\t.set(\"estimatePayments.$.tdsAmount\", payment.getTdsAmount())\n\t\t\t\t\t\t.set(\"estimatePayments.$.isTdsReceived\", payment.isTdsReceived())\n\t\t\t\t\t\t.set(\"estimateAdvancetotal\",advanceTotal)\n\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvance)\n\t\t\t\t\t\t.set(\"invoiceBalance\", balance);\n\n\n\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\n\t\t\t}\n\t\t\tcatch(EntityException e)\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t}\n\t\t\treturn payment;\n\t\t}", "@Override\n\tpublic int deleteUserReimbRecord(int reimbid) {\n\t\treturn 0;\n\t}", "public IBankTransfert payment();", "public OrderPayments updateInvoicePayment(OrderPayments payment, String invoiceNo, String companyId) throws EntityException\n\t\t{\n\n\t\t\tDatastore ds = null;\n\t\t\tCompany cmp = null;\n\t\t\tInwardEntity invoice = null;\n\t\t\tObjectId oid = null;\n\t\t\tObjectId invoiceOid = null;\n\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\tcmp = query.get();\n\t\t\t\tif(cmp == null)\n\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\n\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true)\n\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\tinvoice = iQuery.get();\n\t\t\t\tif(invoice == null)\n\t\t\t\t\tthrow new EntityException(512, \" invoice not found\", null, null);\n\n\n\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\t\t\t\tjava.math.BigDecimal prevAmt = null;\n\t\t\t\tboolean match = false;\n\n\t\t\t\t//all deleted in between\n\t\t\t\tif(invoice.getInvoicePayments() == null)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\t\t\t\t\t\n\t\t\t\t\t//always fetch payment prev amt from db, it may have changed in between\t\n\t\t\t\tfor(OrderPayments pay : invoice.getInvoicePayments())\n\t\t\t\t{\n\n\t\t\t\t\tif(pay.getId().toString().equals(payment.getId().toString()))\n\t\t\t\t\t{\n\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\tprevAmt = pay.getPaymentAmount();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif(match == false)\n\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\n\t\t\t\t//payment towards a bill, PO not affected in any way\n\t\t\t\tjava.math.BigDecimal invoiceAdvance = invoice.getInvoiceAdvancetotal().subtract(prevAmt).add(payment.getPaymentAmount());\n\t\t\t\tjava.math.BigDecimal balance = invoice.getInvoiceBalance().add(prevAmt).subtract(payment.getPaymentAmount()); // or grand total - just set advance\n\n\n\t\t\t\t//if null then 0 \n\n\t\t\t\tif(payment.getTdsRate() == null)\n\t\t\t\t\tpayment.setTdsRate(new BigDecimal(0));\n\n\t\t\t\tif(payment.getTdsAmount() == null)\n\t\t\t\t\tpayment.setTdsAmount(new BigDecimal(0));\n\n\t\t\t\t//search for nested payment in the list\n\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid).filter(\"invoicePayments.id\", new ObjectId(payment.getId().toString()));\n\n\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentDate\", payment.getPaymentDate())\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentAmount\", payment.getPaymentAmount())\n\t\t\t\t\t\t.set(\"invoicePayments.$.purposeTitle\", payment.getPurposeTitle())\n\t\t\t\t\t\t.set(\"invoicePayments.$.purposeDescription\", payment.getPurposeDescription())\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentMode\", payment.getPaymentMode())\n\t\t\t\t\t\t.set(\"invoicePayments.$.paymentAccount\", payment.getPaymentAccount())\n\t\t\t\t\t\t.set(\"invoicePayments.$.tdsRate\", payment.getTdsRate())\n\t\t\t\t\t\t.set(\"invoicePayments.$.tdsAmount\", payment.getTdsAmount())\n\t\t\t\t\t\t.set(\"invoicePayments.$.isTdsReceived\", payment.isTdsReceived())\n\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvance)\n\t\t\t\t\t\t.set(\"invoiceBalance\", balance);\n\n\n\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\n\t\t\t}\n\t\t\tcatch(EntityException e)\n\t\t\t{\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t}\n\t\t\treturn payment;\n\t\t}", "public Long getBillNo() {\n return billNo;\n }", "@Override\n\tpublic void deleteEntityObj(StdMilkRate e) {\n\t\t\n\t}", "int delWayBillByIdTravel(Long id_travel);", "@Override\n public void payment(BigDecimal amount, String reference) {\n System.out.println(\"Called payment() with following info: \\namount: \" + amount + \"\\nReference Nr:\" + reference);\n\n }", "public Masary_Error CheckBillType(String BTC, double CusAmount, String CustId, double serv_balance, double masry_balance, double billamount, double fees, Main_Provider provider, double deductedAmount) {\n Masary_Error Status = new Masary_Error();\n try {\n Masary_Bill_Type bill_type = MasaryManager.getInstance().getBTC(BTC);\n double trunccusamount = Math.floor(CusAmount);\n// double deductedAmount = MasaryManager.getInstance().GetDeductedAmount(Integer.parseInt(CustId), Integer.parseInt(BTC), CusAmount, provider.getPROVIDER_ID());\n if ((deductedAmount > serv_balance) || deductedAmount == -1) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-501\", provider);\n } else if (!bill_type.isIS_PART_ACC() && CusAmount < billamount) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-502\", provider);\n } else if (!bill_type.isIS_OVER_ACC() && CusAmount > billamount && billamount != 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-503\", provider);\n } else if (!bill_type.isIS_ADV_ACC() && billamount == 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-504\", provider);\n } else if (!bill_type.isIS_FRAC_ACC() && (CusAmount - trunccusamount) > 0) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-505\", provider);\n } else if ((CusAmount > masry_balance) || deductedAmount == -2 || deductedAmount == -3 || deductedAmount == -4) {\n Status = MasaryManager.getInstance().GETMasary_Error(\"-506\", provider);\n } else {\n Status = MasaryManager.getInstance().GETMasary_Error(\"200\", provider);\n }\n } catch (Exception ex) {\n\n MasaryManager.logger.error(\"Exception \" + ex.getMessage(), ex);\n }\n\n return Status;\n }", "@Override\n\tpublic void deposit(int money) {\n\t\t\n\t}", "int deleteByExample(PaymentTradeExample example);", "public boolean depositarB(Double monto) {\n if(paractual.cuentaB.getEstado() == \"Activo\" && paractual.cuentaA.getSaldo() > 0) {\n // Pasamos saldo a B\n paractual.setSaldoB(paractual.cuentaB.getSaldo() + monto);\n return true;\n }\n return false;\n }", "@Override\n\tpublic boolean desposit(int accNo, double money) {\n\t\treturn false;\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic boolean disapproveBenficiary(BigInteger accountNumber) throws IBSExceptions {\n\t\tboolean result = false;\r\n\t\tif (bankRepresentativeDAO.decliningBeneficiaryDetails(accountNumber)) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Test\n\tpublic void testPayBill() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(03, \"acc1\", 00000, 100.00, \"CC\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tif (outContent.toString().contains(\"Bills Paid\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"unable to pay bills\", testResult);\n\t}", "public void deleteBill()\n {\n tblOrderItems.removeAllViews();\n AlertDialog.Builder DineInTenderDialog = new AlertDialog.Builder(BillingCounterSalesActivity.this);\n LayoutInflater UserAuthorization = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n View vwAuthorization = UserAuthorization.inflate(R.layout.dinein_reprint, null);\n final ImageButton btnCal_reprint = (ImageButton) vwAuthorization.findViewById(R.id.btnCal_reprint);\n\n final EditText txtReprintBillNo = (EditText) vwAuthorization.findViewById(R.id.txtDineInReprintBillNumber);\n final TextView tv_inv_date = (TextView) vwAuthorization.findViewById(R.id.tv_inv_date);\n tv_inv_date.setText(tvDate.getText().toString());\n btnCal_reprint.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n DateSelection(tv_inv_date);\n }\n });\n\n DineInTenderDialog.setIcon(R.drawable.ic_launcher)\n .setTitle(\"Delete Bill\")\n /*.setMessage(\"Enter Bill Number\")*/\n .setView(vwAuthorization)\n .setNegativeButton(\"Cancel\", null)\n .setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n\n if (txtReprintBillNo.getText().toString().equalsIgnoreCase(\"\"))\n {\n messageDialog.Show(\"Warning\", \"Please enter Bill Number\");\n return;\n }\n else if (tv_inv_date.getText().toString().equalsIgnoreCase(\"\")) {\n messageDialog.Show(\"Warning\", \"Please enter Bill Date\");\n setInvoiceDate();\n return;\n } else {\n try {\n int InvoiceNo = Integer.valueOf(txtReprintBillNo.getText().toString());\n String date_reprint = tv_inv_date.getText().toString();\n tvDate.setText(date_reprint);\n Date date = new SimpleDateFormat(\"dd-MM-yyyy\").parse(date_reprint);\n Cursor result = db.getBillDetail_counter(InvoiceNo, String.valueOf(date.getTime()));\n if (result.moveToFirst()) {\n if (result.getInt(result.getColumnIndex(\"BillStatus\")) != 0) {\n VoidBill(InvoiceNo, String.valueOf(date.getTime()));\n } else {\n //Toast.makeText(BillingCounterSalesActivity.this, \"Bill is already voided\", Toast.LENGTH_SHORT).show();\n\n String msg = \"Bill Number \" + InvoiceNo + \" is already voided\";\n messageDialog.Show(\"Note\",msg);\n Log.d(\"VoidBill\", msg);\n }\n } else {\n //Toast.makeText(BillingCounterSalesActivity.this, \"No bill found with bill number \" + InvoiceNo, Toast.LENGTH_SHORT).show();\n String msg = \"No bill found with bill number \" + InvoiceNo;\n messageDialog.Show(\"Note\",msg);\n Log.d(\"VoidBill\", msg);\n }\n ClearAll();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }).show();\n }", "int deleteByExample(RepaymentPlanInfoUnExample example);", "void paymentOrder(long orderId);", "@Override\n public String getDescription() {\n return \"Ordinary payment\";\n }", "@Override\r\n\tpublic boolean deopsit(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tbalance = (float) (balance + amount);\r\n\t\t\t} else {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic void deposit(int amount) {\n\t\t\r\n\t}", "public void deleteLoan() throws SQLException{\n\t\tConnection conn = DataSource.getConnection();\n\t\ttry{\n\t\t\t\n\t\t\tString query = \"SELECT no_irregular_payments FROM loan\"\n\t\t\t\t\t\t+ \" WHERE client_id ='\"+this.client_id+\"' AND start_date ='\"+this.start_date+\"';\";\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(query);\n\t\t\trs.next();\n\t\t\tint irrPayments = rs.getInt(1);\n\t\t\t\n\t\t\t// get the current date that will serve as an end date for the loan\n\t\t\tDate current_time = new Date();\n\t\t\t// MySQL date format\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t// Adapt the java data format to the mysql one\n\t\t\tString end_date = sdf.format(current_time);\n\t\t\t\n\t\t\tquery = \"INSERT INTO loan_history \"\n\t\t\t\t\t+ \"VALUES ('\"+this.client_id+\"', \"+this.principal_amount+\", '\"+this.start_date+\"', '\"+end_date+\"', \"+irrPayments+\")\";\n\t\t\tstat.executeUpdate(query);\n\t\t\t\n\t\t\t// delete the loan\n\t\t\tquery = \"DELETE FROM loan \"\n\t\t\t\t\t+ \"WHERE client_id = '\"+this.client_id+\"' AND start_date = '\"+this.start_date+\"';\";\n\t\t\tstat.executeUpdate(query);\n\t\t\t\n\t\t}finally{\n\t\t\tconn.close();\n\t\t}\n\t}", "private void deAllocate() {\n if (getC_Order_ID() != 0) {\n setC_Order_ID(0);\n }\n //\tif (getC_Invoice_ID() == 0)\n //\t\treturn;\n //\tDe-Allocate all\n MAllocationHdr[] allocations = MAllocationHdr.getOfPayment(getCtx(),\n getC_Payment_ID(), get_TrxName());\n log.fine(\"#\" + allocations.length);\n for (int i = 0; i < allocations.length; i++) {\n allocations[i].set_TrxName(get_TrxName());\n allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct);\n allocations[i].processIt(DocAction.ACTION_Reverse_Correct);\n allocations[i].save();\n }\n\n // \tUnlink (in case allocation did not get it)\n if (getC_Invoice_ID() != 0) {\n //\tInvoice\n String sql = \"UPDATE C_Invoice \"\n + \"SET C_Payment_ID = NULL, IsPaid='N' \"\n + \"WHERE C_Invoice_ID=\" + getC_Invoice_ID()\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n int no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Invoice #\" + no);\n }\n //\tOrder\n sql = \"UPDATE C_Order o \"\n + \"SET C_Payment_ID = NULL \"\n + \"WHERE EXISTS (SELECT * FROM C_Invoice i \"\n + \"WHERE o.C_Order_ID=i.C_Order_ID AND i.C_Invoice_ID=\" + getC_Invoice_ID() + \")\"\n + \" AND C_Payment_ID=\" + getC_Payment_ID();\n no = DB.executeUpdate(sql, get_TrxName());\n if (no != 0) {\n log.fine(\"Unlink Order #\" + no);\n }\n }\n //\n setC_Invoice_ID(0);\n setIsAllocated(false);\n }", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "@Override\r\n\tpublic BigDecimal calculateFinalBill(BillingContext billingContext) {\n\t Discount discount = new Slab3Discount(new Slab2Discount(new Slab1Discount(new NoDiscount())));\r\n\t\treturn billingContext.getBillAmount().subtract((discount.calculate(billingContext.getBillAmount())));\r\n\t}", "public String uncheckedBill() {\n\t\tMap<String,Object> request = (Map) ActionContext.getContext().get(\"request\");\r\n\t\t\r\n\t\tSet uncheckedBill = creditCardManager.getUncheckedBill(creditCardID);\r\n\t\trequest.put(\"uncheckedBill\", uncheckedBill);\r\n\t\treturn \"uncheckedBill\";\r\n\t}", "private static void deposite (double amount) {\n double resultDeposit = balance + amount;\r\n System.out.println(\"Deposit successful.\\nCurrent balance: \" + \"$\" + resultDeposit+ \".\");\r\n }", "@Override\r\n\tpublic int modify(PaymentPO po) {\n\t\treturn 0;\r\n\t}", "CarPaymentMethod processHotDollars();", "public void changeBanksForPayment(){\n\t\t\tgetLocalBankListforIndicator();\n\t\t\tsetPaymentmodeId(null);\n\t\t\tif(getPaymentCode()!=null && getPaymentCode().equalsIgnoreCase(\"B\"))\n\t\t\t{\n\t\t\t\t\n\t\t\t\tsetBooChequePanel(true);\n\t\t\t\tsetBooCardPanel(false);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t\t//clearKnetDetails();\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsetBooChequePanel(false);\n\t\t\t\tsetBooCardPanel(true);\n\t\t\t\tsetRemitamount(null);\n\t\t\t\tBigDecimal PaymentId=placeOrderPendingTransctionService.toFetchPaymentId(getPaymentCode());\n\t\t\t\tsetPaymentmodeId(PaymentId);\n\t\t\t}\n\t\t\tsetBooRenderSaveOrExit(true);\n\t\t}", "void payBills();", "@Override\n public boolean deposit(Account account, BigDecimal amount) {\n return false;\n }", "private void PayBill() {\r\n Cursor crsrBillDetail = dbBillScreen.getBillDetailByCustomer(iCustId, 2, Float.parseFloat(tvBillAmount.getText().toString()));\r\n if (crsrBillDetail.moveToFirst()) {\r\n strPaymentStatus = \"Paid\";\r\n PrintNewBill(businessDate, 1);\r\n } else {\r\n if (strPaymentStatus== null || strPaymentStatus.equals(\"\"))\r\n strPaymentStatus = \"CashOnDelivery\";\r\n\r\n\r\n ArrayList<AddedItemsToOrderTableClass> orderItemList = new ArrayList<>();\r\n int taxType =0;\r\n for (int iRow = 0; iRow < tblOrderItems.getChildCount(); iRow++) {\r\n\r\n int menuCode =0;\r\n String itemName= \"\";\r\n double quantity=0.00;\r\n double rate=0.00;\r\n double igstRate=0.00;\r\n double igstAmt=0.00;\r\n double cgstRate=0.00;\r\n double cgstAmt=0.00;\r\n double sgstRate=0.00;\r\n double sgstAmt=0.00;\r\n double cessRate=0.00;\r\n double cessAmt=0.00;\r\n double subtotal=0.00;\r\n double billamount=0.00;\r\n double discountamount=0.00;\r\n\r\n TableRow RowBillItem = (TableRow) tblOrderItems.getChildAt(iRow);\r\n\r\n\r\n // Item Number\r\n if (RowBillItem.getChildAt(0) != null) {\r\n CheckBox ItemNumber = (CheckBox) RowBillItem.getChildAt(0);\r\n menuCode = (Integer.parseInt(ItemNumber.getText().toString()));\r\n }\r\n\r\n // Item Name\r\n if (RowBillItem.getChildAt(1) != null) {\r\n TextView ItemName = (TextView) RowBillItem.getChildAt(1);\r\n itemName = (ItemName.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Quantity\r\n if (RowBillItem.getChildAt(3) != null) {\r\n EditText Quantity = (EditText) RowBillItem.getChildAt(3);\r\n String qty_str = Quantity.getText().toString();\r\n double qty_d = 0.00;\r\n if(qty_str==null || qty_str.equals(\"\"))\r\n {\r\n Quantity.setText(\"0.00\");\r\n }else\r\n {\r\n qty_d = Double.parseDouble(qty_str);\r\n }\r\n quantity = (Double.parseDouble(String.format(\"%.2f\",qty_d)));\r\n\r\n }\r\n\r\n // Rate\r\n if (RowBillItem.getChildAt(4) != null) {\r\n EditText Rate = (EditText) RowBillItem.getChildAt(4);\r\n String rate_str = Rate.getText().toString();\r\n double rate_d = 0.00;\r\n if((rate_str==null || rate_str.equals(\"\")))\r\n {\r\n Rate.setText(\"0.00\");\r\n }else\r\n {\r\n rate_d = Double.parseDouble(rate_str);\r\n }\r\n rate = (Double.parseDouble(String.format(\"%.2f\",rate_d)));\r\n\r\n }\r\n\r\n\r\n // Service Tax Percent\r\n\r\n if(chk_interstate.isChecked()) // IGST\r\n {\r\n cgstRate =0;\r\n cgstAmt =0;\r\n sgstRate =0;\r\n sgstAmt =0;\r\n if (RowBillItem.getChildAt(23) != null) {\r\n TextView iRate = (TextView) RowBillItem.getChildAt(23);\r\n igstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iRate.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(24) != null) {\r\n TextView iAmt = (TextView) RowBillItem.getChildAt(24);\r\n igstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(iAmt.getText().toString())));\r\n }\r\n\r\n\r\n }else // CGST+SGST\r\n {\r\n igstRate =0;\r\n igstAmt =0;\r\n if (RowBillItem.getChildAt(15) != null) {\r\n TextView ServiceTaxPercent = (TextView) RowBillItem.getChildAt(15);\r\n sgstRate = (Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxPercent.getText().toString()))));\r\n }\r\n\r\n // Service Tax Amount\r\n if (RowBillItem.getChildAt(16) != null) {\r\n TextView ServiceTaxAmount = (TextView) RowBillItem.getChildAt(16);\r\n sgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(ServiceTaxAmount.getText().toString())));\r\n }\r\n\r\n // Sales Tax %\r\n if (RowBillItem.getChildAt(6) != null) {\r\n TextView SalesTaxPercent = (TextView) RowBillItem.getChildAt(6);\r\n cgstRate = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxPercent.getText().toString())));\r\n }\r\n // Sales Tax Amount\r\n if (RowBillItem.getChildAt(7) != null) {\r\n TextView SalesTaxAmount = (TextView) RowBillItem.getChildAt(7);\r\n cgstAmt = Double.parseDouble(String.format(\"%.2f\",\r\n Double.parseDouble(SalesTaxAmount.getText().toString())));\r\n }\r\n }\r\n if (RowBillItem.getChildAt(25) != null) {\r\n TextView cessRt = (TextView)RowBillItem.getChildAt(25);\r\n if(!cessRt.getText().toString().equals(\"\"))\r\n cessRate = Double.parseDouble(cessRt.getText().toString());\r\n }\r\n if (RowBillItem.getChildAt(26) != null) {\r\n TextView cessAt = (TextView)RowBillItem.getChildAt(26);\r\n if(!cessAt.getText().toString().equals(\"\"))\r\n cessAmt = Double.parseDouble(cessAt.getText().toString());\r\n }\r\n\r\n\r\n\r\n // Tax Type\r\n if (RowBillItem.getChildAt(13) != null) {\r\n TextView TaxType = (TextView) RowBillItem.getChildAt(13);\r\n taxType = (Integer.parseInt(TaxType.getText().toString()));\r\n }\r\n // subtotal\r\n subtotal = (rate*quantity) + igstAmt+cgstAmt+sgstAmt;\r\n\r\n AddedItemsToOrderTableClass orderItem = new AddedItemsToOrderTableClass( menuCode, itemName, quantity, rate,\r\n igstRate,igstAmt, cgstRate, cgstAmt, sgstRate,sgstAmt, rate*quantity,subtotal, billamount,cessRate,cessAmt,discountamount);\r\n orderItemList.add(orderItem);\r\n }\r\n\r\n Bundle bundle = new Bundle();\r\n bundle.putDouble(Constants.TOTALBILLAMOUNT, Double.parseDouble(tvBillAmount.getText().toString()));\r\n bundle.putDouble(Constants.TAXABLEVALUE, Double.parseDouble(tvSubTotal.getText().toString()));\r\n\r\n// bundle.putDouble(Constants.ROUNDOFFAMOUNT, Double.parseDouble(edtRoundOff.getText().toString()));\r\n if (tvOthercharges.getText().toString().isEmpty()) {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n } else {\r\n bundle.putDouble(Constants.OTHERCHARGES, Double.parseDouble(tvOthercharges.getText().toString()));\r\n }\r\n bundle.putDouble(Constants.DISCOUNTAMOUNT, Double.parseDouble(tvDiscountAmount.getText().toString()));\r\n bundle.putInt(Constants.TAXTYPE, isForwardTaxEnabled);\r\n //bundle.putInt(CUSTID, Integer.parseInt(tvCustId.getText().toString()));\r\n bundle.putString(Constants.PHONENO, edtCustPhoneNo.getText().toString());\r\n bundle.putParcelableArrayList(Constants.ORDERLIST, orderItemList);\r\n if (chk_interstate.isChecked()) {\r\n double igstAmount = Double.parseDouble(tvIGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, igstAmount + cessAmount);\r\n } else {\r\n double sgstAmount = Double.parseDouble(tvSGSTValue.getText().toString());\r\n double cgstAmount = Double.parseDouble(tvCGSTValue.getText().toString());\r\n double cessAmount = Double.parseDouble(tvcessValue.getText().toString());\r\n bundle.putDouble(Constants.TAXAMOUNT, cgstAmount + sgstAmount + cessAmount);\r\n }\r\n\r\n fm = getSupportFragmentManager();\r\n proceedToPayBillingFragment = new PayBillFragment();\r\n proceedToPayBillingFragment.initProceedToPayListener(this);\r\n proceedToPayBillingFragment.setArguments(bundle);\r\n proceedToPayBillingFragment.show(fm, \"Proceed To Pay\");\r\n\r\n /* Intent intentTender = new Intent(myContext, PayBillActivity.class);\r\n intentTender.putExtra(\"TotalAmount\", tvBillAmount.getText().toString());\r\n intentTender.putExtra(\"CustId\", edtCustId.getText().toString());\r\n intentTender.putExtra(\"phone\", edtCustPhoneNo.getText().toString());\r\n intentTender.putExtra(\"USER_NAME\", strUserName);\r\n intentTender.putExtra(\"BaseValue\", Float.parseFloat(tvSubTotal.getText().toString()));\r\n intentTender.putExtra(\"ORDER_DELIVERED\", strOrderDelivered);\r\n intentTender.putExtra(\"OtherCharges\", Double.parseDouble(tvOthercharges.getText().toString()));\r\n intentTender.putExtra(\"TaxType\", taxType);// forward/reverse\r\n intentTender.putParcelableArrayListExtra(\"OrderList\", orderItemList);\r\n startActivityForResult(intentTender, 1);*/\r\n //mSaveBillData(2, true);\r\n //PrintNewBill();\r\n }\r\n\r\n /*int iResult = dbBillScreen.deleteKOTItems(iCustId, String.valueOf(jBillingMode));\r\n Log.d(\"Delivery:\", \"Items deleted from pending KOT:\" + iResult);*/\r\n\r\n //ClearAll();\r\n //Close(null);\r\n }", "int deleteByExample(PurchasePaymentExample example);", "@Transactional(rollbackFor=PersistenceException.class)\n\tpublic void sendBillforAprobal(int billID) throws ServiceException{\n\t\tBill b;\n\t\ttry{\n\t\t\tb = daobill.load(billID);\n\t\t\tsystemRemoteFOSYGA.registerBill(b.getId(), b.getValue(), b.getIps().getId());\n\t\t}catch (PersistenceException e) {\n\t\t\tthrow new ServiceException(\"Error getting bill to dispatch\");\n\t\t} catch (RemoteSystemExcpetion e) {\n\t\t\tthrow new ServiceException(\"Error registering bill\");\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic Object delete(Map<String, Object> params) throws Exception {\n\t\treturn bankService.delete(params);\n\t}", "public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }", "@Override\r\n\tprotected void onBoDelete() throws Exception {\n\t\tsuper.onBoDelete();\r\n\t\t// 修改按钮属性\r\n\t\tif(myaddbuttun){\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\tmyaddbuttun=true;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}else{\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\tmyaddbuttun=false;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}\r\n\t}", "public Long getBillDtlNo() {\n return billDtlNo;\n }", "@Override\n\t@Transactional\n\tpublic void deleteBill(Long id) {\n\t\tbillDAO.deleteById(id);\n\t}", "@Override\r\n\tpublic void operateAmount(String AccountID, BigDecimal amount) {\n\r\n\t}", "public double deposit(double amount){\n double total=amount;\n if(type.equals(\"TMB\"));total=-0.5;\n currentBalance+=total;\n return currentBalance;\n }", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "@Override\n\tpublic boolean debit(Integer id, double amount) {\n\t\tfor(Account account:accountList) {\n\t\t\tif(id.compareTo(account.returnAccountNumber()) == 0 ) {\n\t\t\t\taccount.debit(amount);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "int deleteByExample(ProcRecInvoiceExample example);", "private void mSaveBillData(int TenderType) { // TenderType:\r\n // 1=PayCash\r\n // 2=PayBill\r\n\r\n // Insert all bill items to database\r\n InsertBillItems();\r\n\r\n // Insert bill details to database\r\n InsertBillDetail(TenderType);\r\n\r\n updateMeteringData();\r\n\r\n /*if (isPrintBill) {\r\n // Print bill\r\n PrintBill();\r\n }*/\r\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "public void addindbpayment(){\n \n \n double tot = calculateTotal();\n Payment pms = new Payment(0,getLoggedcustid(),tot);\n \n System.out.println(\"NI Payment \"+getLoggedcustid()+\" \"+pms.getPaymentid()+\" \"+pms.getTotalprice());\n session = NewHibernateUtil.getSessionFactory().openSession();\n session.beginTransaction();\n session.save(pms);\n try \n {\n session.getTransaction().commit();\n session.close();\n } catch(HibernateException e) {\n session.getTransaction().rollback();\n session.close();\n }\n clear();\n setBookcart(null);\n test.clear();\n itemdb.clear();\n \n \n try{\n FacesContext.getCurrentInstance().getExternalContext().redirect(\"/BookStorePelikSangat/faces/index.xhtml\");\n } \n catch (IOException e) {}\n \n\t}", "private boolean actualizarBPartner() {\n if (!isReceipt() && getC_BPartner_ID() != 0 && !isAllocated()) {\n MBPartner bp = new MBPartner(getCtx(), getC_BPartner_ID(), get_TrxName());\n BigDecimal previo = bp.getTotalOpenBalance();\n BigDecimal actual = Env.ZERO;\n\n BigDecimal monto = getAllocatedAmt();\n if (monto == null) {\n monto = Env.ZERO;\n }\n\n //\tSuma el monto no asignado del pago, al saldo del proveedor\n actual = previo.add(getPayAmt().add(monto));\n\n bp.setTotalOpenBalance(actual);\n return bp.save();\n }\n else\n return false;\n }", "public void deleteDrinkBills(Bill deleteDrink) {\n\tString sql =\"DELETE FROM bills WHERE Id_drink = ?\";\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tpreparedStatement.setInt(1, deleteDrink.getId());\n\t\tpreparedStatement.execute();\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n}", "@Override\n\tpublic int deleteTicket(Booking_ticket bt) {\n\t\treturn 0;\n\t}", "int deleteByExample(CGcontractCreditExample example);", "public static double getPaymentAmountDue(Payment payment, HashMap requestParams, accVendorPaymentDAO accVendorPaymentobj) throws ServiceException, ParseException {\n boolean isOpeningPayment = false;\n boolean isAdvancePaymentToVendor = false;\n boolean isRefundPaymentToCustomer = false;\n DateFormat df = (DateFormat) requestParams.get(GoodsReceiptCMNConstants.DATEFORMAT);\n if (df == null) {\n df = (DateFormat) requestParams.get(Constants.df);\n }\n String companyid = (String) requestParams.get(GoodsReceiptCMNConstants.COMPANYID);\n double paymentDueAmt = 0;\n if ((payment.getAdvanceDetails() != null && !payment.getAdvanceDetails().isEmpty()) || payment.isIsOpeningBalencePayment()) {\n double paymentAmt = 0;\n double linkedPaymentAmt = 0;\n if (payment.isIsOpeningBalencePayment()) {//opening payment\n isOpeningPayment = true;\n paymentAmt += payment.getDepositAmount();\n } else if (payment.getVendor() != null) {//advance payment against vendor\n isAdvancePaymentToVendor = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n paymentAmt += advanceDetail.getAmount();\n }\n } else if (payment.getCustomer() != null) {//Refund payment against customer\n isRefundPaymentToCustomer = true;\n for (AdvanceDetail advanceDetail : payment.getAdvanceDetails()) {\n if (advanceDetail.getReceiptAdvanceDetails() == null) {//Only such refunds can be due in which at the time of creation no document (no advance receipt) is selected \n paymentAmt += advanceDetail.getAmount();\n }\n }\n //In this case paymentAmt can be zero (if all refund have advance receipt documnet selected) so we need to retun amount due zero here\n if (paymentAmt == 0) {\n return 0;\n }\n }\n HashMap<String, Object> reqParams1 = new HashMap();\n reqParams1.put(\"paymentid\", payment.getID());\n reqParams1.put(\"companyid\", companyid);\n reqParams1.put(Constants.df, df);\n if (requestParams.containsKey(\"asofdate\") && requestParams.get(\"asofdate\") != null) {\n reqParams1.put(\"asofdate\", requestParams.get(\"asofdate\"));\n }\n if (isOpeningPayment || isAdvancePaymentToVendor) {\n KwlReturnObject result = accVendorPaymentobj.getLinkedDetailsPayment(reqParams1);\n List<LinkDetailPayment> linkedDetaisPayments = result.getEntityList();\n for (LinkDetailPayment ldp : linkedDetaisPayments) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getLinkDetailPaymentToCreditNote(reqParams1);\n List<LinkDetailPaymentToCreditNote> linkedDetaisPaymentsToCN = result.getEntityList();\n for (LinkDetailPaymentToCreditNote ldp : linkedDetaisPaymentsToCN) {\n linkedPaymentAmt += ldp.getAmount();\n }\n result = accVendorPaymentobj.getAdvanceReceiptDetailsByPayment(reqParams1);\n List<Object[]> list2 = result.getEntityList();\n for (Object obj[] : list2) {\n double revExchangeRate = 1.0;\n double amount = obj[1] != null ? Double.parseDouble(obj[1].toString()) : 0.0;\n double exchangeRate = obj[2] != null ? Double.parseDouble(obj[2].toString()) : 0.0;\n if (exchangeRate != 0.0) {\n revExchangeRate = 1 / exchangeRate;\n }\n linkedPaymentAmt += authHandler.round(revExchangeRate * amount, companyid);\n }\n result = accVendorPaymentobj.getLinkDetailReceiptToAdvancePayment(reqParams1);\n List<LinkDetailReceiptToAdvancePayment> linkDetailReceiptToAdvancePayment = result.getEntityList();\n for (LinkDetailReceiptToAdvancePayment ldp : linkDetailReceiptToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmountInPaymentCurrency();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n } else if (isRefundPaymentToCustomer) {\n KwlReturnObject result = accVendorPaymentobj.getLinkDetailAdvanceReceiptToRefundPayment(reqParams1);\n List<LinkDetailPaymentToAdvancePayment> linkDetailPaymentToAdvancePayment = result.getEntityList();\n for (LinkDetailPaymentToAdvancePayment ldp : linkDetailPaymentToAdvancePayment) {\n linkedPaymentAmt += ldp.getAmount();\n }\n paymentDueAmt = paymentAmt - linkedPaymentAmt;\n }\n }\n paymentDueAmt = authHandler.round(paymentDueAmt, companyid);\n return paymentDueAmt;\n }", "public Bill getBill() {\n return bill;\n }", "private void makeDeductionsfromPayments(int walletid, int due,int bal,ArrayList<Integer> l) {\n\t\tArrayList<Integer> l1=l;\n\t\tint toPay=due;\n\t\tint pocket=bal;\n\t\tint id=walletid;\n\t\tint deduction=pocket-toPay;\n\t\tString str=\"update wallet set balance=\"+deduction+\" where walletId=\"+id;\n\t\ttry {\n\t\t\tint count=stmt.executeUpdate(str);\n\t\t\n\t\t\t\tupdateOrders(id,l1);\n\t\t\t\tupdatePayments(id,toPay);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic Integer DeleteBoleto(int idTck2) throws Exception {\n\t\treturn null;\n\t}", "public Integer getBillId() {\n return billId;\n }", "private Account debitAmount(String accountNumber, BigDecimal amt) throws TransferServiceException\n\t{\n\t\tAccount account = repository.findByAccountNumber(accountNumber);\n\t\tisAccountValid(account);\n\t\taccount.setBalance(getBalance(accountNumber).subtract(amt));\n\t\treturn account;\n\t}", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Override\n public PaymentStatus processPayment(PaymentData pd) {\n return new PaymentStatus(1L,true, \"\", LocalDateTime.now(), pd.getSum());\n }", "public void discharge() {\n\t\tstate = loanState.DISCHARGED; //changed 'StAtE' to 'state' and lOaN_sTaTe.DISCHARGED to loanState.DISCHARGED\r\n\t}", "@Override\r\n\tpublic boolean deletePostPaidAccount(int customerID, long mobileNo) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic Integer udpateBillingFail() {\n\t\treturn 0;\n\t}", "public void setBillDtlNo(Long billDtlNo) {\n this.billDtlNo = billDtlNo;\n }", "public Boolean deletePayment(Payment sm){\n\t\tTblPayment tblsm = new TblPayment();\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\ttblsm.convertToTable(sm);\n\t\t\ttx = session.beginTransaction();\n\t\t\tsession.delete(tblsm);\n\t\t\ttx.commit();\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\tif (tx!= null) tx.rollback();\n\t\t\te.printStackTrace();\n\t\t\tsession.close();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn true;\n\t\t\n\t}", "@Override\n\tpublic void process(double amt) {\n\t\tSystem.out.println(\"Amt Deposited:\" +amt);\n\t\tb1.bal = b1.bal+amt;\n\t\tb1.getBal();\n\t\tSystem.out.println(\"Transaction completed\");\n\t}", "public void setBillNo(Long billNo) {\n this.billNo = billNo;\n }", "private static void checkArrivedOrderRemainder_RemoveArrivedOrder(\n StockDataBase dataBase, Order arrivedOrder) {\n if (arrivedOrder.getOrderDirection() == OrderDirection.BUY) {\n if (dataBase.getAwaitingBuyOrders().getCollection()\n .remove(arrivedOrder)) {\n MessagePrint.println(MessagePrint.Stream.OUT,\n Message.Out.StockDataBase\n .printOrderPerformedInItsEntirety());\n // FxDialogs.showInformation(\"INFO\", Message.Out.StockDataBase\n // .printOrderPerformedInItsEntirety());\n } else {\n MessagePrint.println(MessagePrint.Stream.ERR,\n new BuildError().getMessage() +\n Message.Err.Order.removeFail());\n FxDialogs.showError(\"ERROR\", new BuildError().getMessage() +\n Message.Err.Order.removeFail());\n }\n } else if (arrivedOrder.getOrderDirection() == OrderDirection.SELL) {\n\n if (dataBase.getAwaitingSellOrders().getCollection()\n .remove(arrivedOrder)) {\n MessagePrint.println(MessagePrint.Stream.OUT,\n Message.Out.StockDataBase\n .printOrderPerformedInItsEntirety());\n // FxDialogs.showInformation(\"INFO\", Message.Out.StockDataBase\n // .printOrderPerformedInItsEntirety());\n } else {\n MessagePrint.println(MessagePrint.Stream.ERR,\n new BuildError().getMessage() +\n Message.Err.Order.removeFail());\n FxDialogs.showError(\"ERROR\", new BuildError().getMessage() +\n Message.Err.Order.removeFail());\n }\n }\n }", "void deleteCustomerDDPayById(int id);", "@Override\r\n\tpublic void deposit() {\n\t\tSystem.out.println(\"This Deposit value is from Axisbank class\");\r\n\t\t//super.deposit();\r\n\t}", "Payment(float bill, float balance, boolean premiumSubscription) {\n this.bill = bill;\n this.balance = balance;\n this.premiumSubscription = premiumSubscription;\n amount = balance;\n }", "@Override\n public String getDescription() {\n return \"Balance leasing\";\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 }", "public void declineTransaction(CommandOfService c) throws Exception {\n // We give back the points to the user\n Service s = c.getService();\n User u = c.getOwner();\n if(s.getTypeService() == 0){\n userDAO.addPoints(s.getCost(),u);\n }\n DAO.declineTransaction(c);\n FacadeNotification facadeNotification = FacadeNotification.getInstance();\n String title = \"Transaction declined!\";\n String desc = \"Your command for: \"+s.getTitle()+\" has been declined.\\n\";\n try {\n facadeNotification.createNotification(u.getIdUser(),title,desc);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void removeOnePayment(Payment pagamento) throws ClassNotFoundException{\r\n\t\t\r\n\t\t//Deletion occurs in table \"metododipagamento\"\r\n \t//username:= postgres\r\n \t//password:= effe\r\n \t//Database name:=strumenti_database\r\n \t\r\n \tClass.forName(\"org.postgresql.Driver\");\r\n \t\r\n \ttry (Connection con = DriverManager.getConnection(JDBC_URL, JDBC_USERNAME, JDBC_PASSWORD)){\r\n \t\t\r\n \t\ttry (PreparedStatement pst = con.prepareStatement(\r\n \t\t\t\t\"DELETE FROM \" + NOME_TABELLA + \" \"\r\n \t\t\t\t+ \"WHERE cliente = ? AND \"\r\n \t\t\t\t+ \"nomemetodo = ? AND \"\r\n \t\t\t\t+ \"credenziali = ?\")) {\r\n \t\t\t\r\n \t\t\tpst.setString(1, pagamento.getUserMailFromPayment());\r\n \t\t\tpst.setString(2, pagamento.getNomeMetodo());\r\n \t\t\tpst.setString(3, pagamento.getCredenziali());\r\n \t\t\t\r\n \t\t\tint n = pst.executeUpdate();\r\n \t\t\tSystem.out.println(\"Rimosse \" + n + \" righe da tabella \" + NOME_TABELLA + \": \" + pagamento.getUserMailFromPayment());\r\n \t\t\t\r\n \t\t} catch (SQLException e) {\r\n \t\t\tSystem.out.println(\"Errore durante cancellazione dati: \" + e.getMessage());\r\n \t\t}\r\n \t\t\r\n \t} catch (SQLException e){\r\n \t\tSystem.out.println(\"Problema durante la connessione iniziale alla base di dati: \" + e.getMessage());\r\n \t}\r\n\t\t\r\n\t}", "public _179._6._235._119.cebwebservice.Bill billing_CalculateDetailMonthlyBill(java.lang.String accessToken, int tariff, int kwh) throws java.rmi.RemoteException;", "void investmentDeleteBond(String bondName, Ui ui) throws BankException, BondException {\n throw new BankException(\"This account does not support this feature\");\n }", "@Override\n public boolean isDebit(GeneralLedgerPendingEntrySourceDetail postable) {\n if (postable instanceof AccountingLine && TemConstants.TRAVEL_ADVANCE_ACCOUNTING_LINE_TYPE_CODE.equals(((AccountingLine)postable).getFinancialDocumentLineTypeCode())) {\n return true; // we're an advance accounting line? then we're debiting...\n }\n return false; // we're not an advance accounting line? then we should return false...\n }", "boolean delete(CustomerOrder customerOrder);", "public int deleteHistory(BigDecimal bankaccount_id){\n String deleteHistory = \"DELETE FROM history WHERE bankaccount_id = :bankaccount_id\";\n Map<String, Object> deleteHistoryMap = new HashMap<>();\n deleteHistoryMap.put(\"bankaccount_id\", bankaccount_id);\n return jdbcTemplate.update(deleteHistory, deleteHistoryMap);\n }", "public abstract void delete(CustomerOrder customerOrder);", "boolean deposite(double amount);", "boolean postReimbursementToDataBase(int amount, String description, int author, int statusId, int typeId);" ]
[ "0.63372165", "0.627815", "0.6235988", "0.6140746", "0.6108201", "0.6091447", "0.587861", "0.5824767", "0.581198", "0.5803753", "0.5762795", "0.5749066", "0.571168", "0.569406", "0.56845504", "0.5651437", "0.5650862", "0.5581612", "0.5579802", "0.5563615", "0.55389416", "0.5534855", "0.5533172", "0.55307734", "0.5511571", "0.5510192", "0.5493296", "0.54912496", "0.5473601", "0.5456581", "0.5453124", "0.54268575", "0.54259735", "0.54248875", "0.5423279", "0.54223233", "0.54219794", "0.5421783", "0.54082316", "0.5405274", "0.5396854", "0.5395072", "0.53919697", "0.5390804", "0.5386396", "0.53796804", "0.53763616", "0.53717244", "0.5364276", "0.5362338", "0.53527457", "0.5349977", "0.5342135", "0.5335107", "0.53276116", "0.53199327", "0.5309863", "0.5306026", "0.5303349", "0.53011006", "0.5298274", "0.52895594", "0.5286465", "0.5286385", "0.52828074", "0.5280065", "0.5278627", "0.5270662", "0.5268185", "0.5258083", "0.5252858", "0.5252182", "0.5247616", "0.52442414", "0.52437246", "0.5230423", "0.5225282", "0.5219714", "0.5217796", "0.5215518", "0.52147853", "0.5213805", "0.5211564", "0.52084994", "0.52074355", "0.52018887", "0.51997757", "0.51979846", "0.5190469", "0.51784706", "0.516899", "0.5166102", "0.51601255", "0.51599014", "0.51589465", "0.5154418", "0.5153171", "0.51502466", "0.51479524", "0.51476353" ]
0.6074
6
get id from invoice, no chng in invoice number, chk fr customer chng
public InwardEntity updateInvoice(InwardEntity entity , String companyId, String customerId) throws EntityException { Datastore ds = null; Company cmp = null; BusinessPlayers customer = null; Products prod = null; Tax tax = null; Key<InwardEntity> key = null; ObjectId oid = null; ObjectId customerOid = null; ObjectId prodOid = null; ObjectId taxOid = null; InwardEntity invoice = null; boolean customerChange = false; try { ds = Morphiacxn.getInstance().getMORPHIADB("test"); oid = new ObjectId(companyId); Query<Company> query = ds.createQuery(Company.class).field("id").equal(oid); cmp = query.get(); if(cmp == null) throw new EntityException(404, "cmp not found", null, null); //check if invoice exists with object id for update , fetch invoice, make changes to it Query<InwardEntity> iQuery = ds.find(InwardEntity.class).filter("company",cmp).filter("isInvoice", true). filter("id",entity.getId()); invoice = iQuery.get(); if(invoice == null) throw new EntityException(512, "invoice not found", null, null); //cant update /*check if vendor changed in update, if so then check if new vendor exists * if vendor hasnt changed bt was deleted - let it be */ if(!(customerId.equals(invoice.getCustomer().getId().toString()))) { customerChange = true; customerOid = new ObjectId(customerId); Query<BusinessPlayers> bpquery = ds.createQuery(BusinessPlayers.class).field("company").equal(cmp).field("isCustomer").equal(true).field("id").equal(customerOid).field("isDeleted").equal(false); customer = bpquery.get(); if(customer == null) throw new EntityException(512, "customer not found", null, null); } /*if bill number is editable, do check if there is new /old vendor + new/old bill number combo unique * if vendor hasnt changed and bill number hasnt chngd - no prob * if vendor/bill number has chngd do check */ // front end list cant be null List<OrderDetails> invoiceDetails = entity.getInvoiceDetails(); for(OrderDetails details : invoiceDetails) { //check tax exists, if not deleted if(details.getTax().getId() != null && details.getTax().isDeleted() == false) { taxOid = new ObjectId(details.getTax().getId().toString()); Query<Tax> taxquery = ds.createQuery(Tax.class).field("company").equal(cmp).field("id").equal(taxOid).field("isDeleted").equal(false); tax = taxquery.get(); if(tax == null) throw new EntityException(513, "tax not found", null, null); //has been deleted in due course } //check tax exists, if deleted if(details.getTax().getId() != null && details.getTax().isDeleted() == true) { taxOid = new ObjectId(details.getTax().getId().toString()); Query<Tax> taxquery = ds.createQuery(Tax.class).field("company").equal(cmp).field("id").equal(taxOid).field("isDeleted").equal(true); tax = taxquery.get(); if(tax == null) throw new EntityException(513, "tax not found", null, null); //tax doesn't exists / may not be deleted } if(details.getProduct().isDeleted() == false) { prodOid = new ObjectId(details.getProduct().getId().toString()); Query<Products> prodquery = ds.createQuery(Products.class).field("company").equal(cmp).field("id").equal(prodOid).field("isDeleted").equal(false); prod = prodquery.get(); if(prod == null) throw new EntityException(514, "product not found", null, null); //has been deleted in due course } if(details.getProduct().isDeleted() == true) { prodOid = new ObjectId(details.getProduct().getId().toString()); Query<Products> prodquery = ds.createQuery(Products.class).field("company").equal(cmp).field("id").equal(prodOid).field("isDeleted").equal(true); prod = prodquery.get(); if(prod == null) throw new EntityException(514, "product not found", null, null); //product doesn't exists / may not be deleted } details.setId(new ObjectId()); details.setTax(tax); details.setProduct(prod); tax = null; taxOid = null; prod = null; prodOid = null; } System.out.println("protax"); invoice.setInvoiceDetails(invoiceDetails); invoice.setCompany(cmp); if(customerChange == true) invoice.setCustomer(customer); //set only if vendor has changed invoice.setInvoiceDate(entity.getInvoiceDate()); invoice.setInvoiceDate(entity.getInvoiceDate()); invoice.setInvoiceDuedate(entity.getInvoiceDuedate()); invoice.setInvoiceGrandtotal(entity.getInvoiceGrandtotal()); invoice.setInvoiceSubtotal(entity.getInvoiceSubtotal()); invoice.setInvoiceTaxtotal(entity.getInvoiceTaxtotal()); java.math.BigDecimal balance = invoice.getInvoiceGrandtotal().subtract(invoice.getInvoiceAdvancetotal()); //grand total is just set, read prev advance invoice.setInvoiceBalance(balance); key = ds.merge(invoice); if(key == null) throw new EntityException(515, "could not update", null, null); } catch(EntityException e) { throw e; } catch(Exception e) { throw new EntityException(500, null , e.getMessage(), null); } return invoice; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getC_Invoice_ID();", "Long getInvoiceId();", "public int getUlIdInvoInvoice()\r\n {\r\n return this._ulIdInvoInvoice;\r\n }", "public void showInvoiceNo(){\n\t}", "public int getInvoiceID(){\n return invoiceID;\n }", "public int getInvoiceNumber() {\n return invoiceNumber;\n }", "public int getInvoiceNumber() {\n return invoiceNumber;\n }", "boolean hasInvoice();", "public Invoice findById(long id);", "Invoice getById(int invoiceId);", "public java.lang.String getInvoiceNo () {\n\t\treturn invoiceNo;\n\t}", "public String getInvoiceNumber() {\n return invoiceNumber;\n }", "String getReceiptId();", "Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoice getInvoice();", "public String getInvoice() {\n return invoice;\n }", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public void setInvoiceNumber(int invoicenum) {\n invoiceNumber = invoicenum;\n }", "public boolean invoiceNumberUnique(int id, ArrayList<Invoice> invoices){\n\t\t\tint count = 0;\n\t\t\tfor(Invoice i : invoices){\n\t\t\t\tif(i.getId()==id){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(count>=1)\n\t\t\t\treturn false;\n\t\t\telse \n\t\t\t\treturn true;\n\t\t\t\n\t\t}", "public String getInoId();", "String getCustomerID();", "public int getC_OrderLine_ID();", "public int getC_Payment_ID();", "public Guid getInvoiceRecipientId() {\r\n return invoiceRecipientId;\r\n }", "public void setInvoice(String invoice) {\n this.invoice = invoice;\n }", "void setInvoiceId(Long invoiceId);", "@Test\n public void getInvoiceWithNonExistentId() {\n InvoiceViewModel invoiceVM = invoiceService.getInvoice(500);\n assertNull(invoiceVM);\n }", "public java.lang.String getInvoice() {\r\n return invoice;\r\n }", "public int getC_Decoris_PreSalesLine_ID();", "private Integer obtainWarehouseId(Invoice invoice) {\r\n\t\ttry {\r\n\t\t\tIManagerBean invoiceDetailBean = BeanManager.getManagerBean(InvoiceDetail.class);\r\n\t\t\tCriteria criteria = new Criteria();\r\n\t\t\tcriteria.addEqualExpression(invoiceDetailBean.getFieldName(IFinanceAlias.INVOICE_DETAIL_INVOICE_ID), invoice.getId());\r\n\t\t\tcriteria.addEqualExpression(invoiceDetailBean.getFieldName(IFinanceAlias.INVOICE_DETAIL_SOURCE), InvoiceSource.DIRECT_PURCHASE);\r\n\t\t\tIterator iter = invoiceDetailBean.getList(criteria, 0, 1).iterator();\r\n\t\t\tIncomeDetail incomeDetail = null;\r\n\t\t\tif(iter.hasNext()){\r\n\t\t\t\tInvoiceDetail invoiceDetail = (InvoiceDetail)iter.next();\r\n\t\t\t\tincomeDetail = obtainIncomeDetail(invoiceDetail.getDeliveryDetail());\r\n\t\t\t}else{\r\n\t\t\t\tcriteria = new Criteria();\r\n\t\t\t\tcriteria.addEqualExpression(invoiceDetailBean.getFieldName(IFinanceAlias.INVOICE_DETAIL_INVOICE_ID), invoice.getId());\r\n\t\t\t\titer = invoiceDetailBean.getList(criteria, 0, 1).iterator();\r\n\t\t\t\tif(iter.hasNext()){\r\n\t\t\t\t\tInvoiceDetail invoiceDetail = (InvoiceDetail)iter.next();\r\n\t\t\t\t\tincomeDetail = obtainIncomeDetail(invoiceDetail.getDeliveryDetail());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(incomeDetail != null){\r\n\t\t\t\treturn incomeDetail.getWarehouse().getId();\r\n\t\t\t}\r\n\t\t} catch (ManagerBeanException e) {\r\n\t\t\tLOGGER.log(Level.SEVERE, \"Error obtaining warehouse for invoice with id= \" + invoice.getId(), e);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "InvoiceDTO fetchByID(int id);", "public InvoiceNotFoundException(int invoice_input)\n {\n super(\"Invoice ID: \");\n invoice_error = invoice_input;\n }", "public void setC_Invoice_ID (int C_Invoice_ID);", "private String getIdRequisitante(long numOrdem)\n\t{\n\t\treturn procBatchPOA.getUserIDRequisitante(numOrdem);\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public void findById() {\n String answer = view.input(message_get_id);\n if (answer != null){\n try{\n long id = Long.parseLong(answer);\n Customer c = model.findById(id);\n if(c!=null)\n view.showCustomerForm(c);\n else\n view.showMessage(not_found_error);\n }catch(NumberFormatException nfe){\n view.showMessage(\"ID must be number\");\n }\n }\n }", "@Override\n @Transactional(readOnly = true)\n public Optional<Invoice> findOne(Long id) {\n log.debug(\"Request to get Invoice : {}\", id);\n if (SecurityUtils.isCurrentUserInRole(AuthoritiesConstants.ADMIN)) {\n return invoiceRepository.findById(id);\n } else {\n return invoiceRepository.findOneByIdAndOrderCustomerUserLogin(id, SecurityUtils.getCurrentUserLogin().get() );\n }\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public String getDocumentNumberByPaymentRequestId(Integer id);", "public boolean hasUlIdInvoInvoice()\r\n {\r\n return this._has_ulIdInvoInvoice;\r\n }", "@RequestMapping(value = \"/{id}\", method = RequestMethod.GET)\n public Invoice getInvoiceById(@PathVariable int id) {\n return DatabaseInvoicePostgre.getInvoiceById(id);\n }", "public void setInvoice(java.lang.String invoice) {\r\n this.invoice = invoice;\r\n }", "public int getId()\r\n/* 75: */ {\r\n/* 76:110 */ return this.idAutorizacionDocumentoPuntoDeVentaAutoimpresorSRI;\r\n/* 77: */ }", "public int getCustomerID(int customer_id) {\n int id = 0;\n try {\n checkCustomerID.setInt(1, customer_id);\n ResultSet resultset = checkCustomerID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"customer_id\");\n System.out.println(\"Customer ID: \" + id);\n }\n try {\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Cannot close resultset!\");\n }\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "public void testSearchInvoiceAccuracy2() throws Exception {\n Invoice[] i =\n invoiceSessionBean.searchInvoices(InformixInvoiceFilterFactory.createInvoiceStatusIdFilter(1),\n InvoiceSearchDepth.INVOICE_ONLY);\n\n assertEquals(\"the returned valus is not as expected\", 1, i.length);\n assertEquals(\"the returned valus is not as expected\", 1, i[0].getId());\n }", "public void getCustomerID (){\n\t\t//gets the selected row \n\t\tint selectedRowIndex = listOfAccounts.getSelectedRow();\n\t\t//gets the value of the first element of the row which is the \n\t\t//customerID\n\t\tcustomerID = (String) listOfAccounts.getModel().getValueAt(selectedRowIndex, 0);\n\t\tcustomerName = (String) listOfAccounts.getModel().getValueAt(selectedRowIndex, 1);\n\t}", "int insertSelective(ProcRecInvoice record);", "public Integer getInvoiceDetailId() {\r\n return this.invoiceDetailId;\r\n }", "public void setUlIdInvoInvoice(int ulIdInvoInvoice)\r\n {\r\n this._ulIdInvoInvoice = ulIdInvoInvoice;\r\n this._has_ulIdInvoInvoice = true;\r\n }", "@Override\n public JSONObject viewFnInvoiceByDirector() {\n String username = null;\n return in_invoicedao.viewInvoiceByDirector(username);\n }", "public int getLBR_DocLine_ICMS_ID();", "public void testGetInvoiceStatusByIdAccuracy() throws Exception {\n InvoiceStatus invoiceStatus = invoiceSessionBean.getInvoiceStatus(1);\n\n assertEquals(\"The id of the returned value is not as expected\", 1, invoiceStatus.getId());\n }", "@GetMapping(\"/invoices/{id}\")\n\tpublic ResponseEntity<Invoice> getInvoice(@PathVariable Long id) {\n\t\tlog.debug(\"REST request to get Invoice : {}\", id);\n\t\tOptional<Invoice> invoice = invoiceService.findOne(id);\n\t\treturn ResponseEntity.of(invoice);\n\t}", "public int buscar_usuario_id(VOUsuario usu) throws RemoteException {\n int linea=-1;\n int id=Integer.parseInt(usu.getId());\n try {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n String s, texto=\"\";\n int n, num, l=0;\n boolean encontrado=false;\n while((s = entrada.readLine()) != null && !encontrado) {\n\n texto=s;\n n=texto.indexOf(\" \");\n texto=texto.substring(0, n);\n num=Integer.parseInt(texto);\n\n if(num==id) {\n encontrado=true;\n linea=l;\n }\n l++;\n }\n entrada.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n }\n return linea;\n }", "public int getC_BPartner_ID();", "private String getCustomerId(String xmlResponse) {\r\n\t\t\r\n\t\tString customerId = \"\"; \r\n\t\tElement root;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement data = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\t\r\n\t\t\t//sets the subscriber name\r\n\t\t\tElement customerInfo = DOMUtils.getElement(data, \"customer\", true);\r\n\t\t\tcustomerInfo = DOMUtils.getElement(customerInfo, \"id\", true);\r\n\t\t\r\n\t\t\tcustomerId = DOMUtils.getText(customerInfo).toString();\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\tthrow new ErrorMessageException(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t}\t\r\n\t\t\r\n\t\treturn customerId;\r\n\t\t\r\n\t}", "public Invoice getInvoiceByID(int invoiceID) throws SQLException {\n Invoice invoice;\n try (\n Connection conn = DriverManager.getConnection(Main.getDBPath());\n PreparedStatement stmt = conn.prepareStatement(\"SELECT * FROM invoice WHERE invoice_id = ?\");\n PreparedStatement productStmt = conn.prepareStatement(\"SELECT product FROM invoice_items WHERE invoice = ?\")\n ) {\n stmt.setInt(1, invoiceID);\n try (ResultSet result = stmt.executeQuery()) {\n\n //add result data to invoice object\n invoice = new Invoice(invoiceID, result.getInt(\"customer\"), result.getString(\"dato\"));\n //add all the product ids to the invoice\n productStmt.setInt(1, invoiceID);\n ResultSet productResult = productStmt.executeQuery();\n while (productResult.next()) {\n invoice.addProduct(productResult.getInt(\"product\"));\n }\n }\n }\n return invoice;\n }", "public Invoice getInvoice() {\n return invoice;\n }", "public void createInvoice() {\n\t}", "public FiAvailableInvoice getFiAvailableInvoice(final String id);", "@Override\n public Personn findById(Integer idCustomer) {\n return manager.find(Personn.class,idCustomer );\n //return findByCriteria(criteria);\n }", "public String getCustomerid() {\n return customerid;\n }", "public void testGetInvoiceAccuracy() throws Exception {\n Invoice invoice = invoiceSessionBean.getInvoice(3);\n\n assertEquals(\"The returned value is not as expected\", 3, invoice.getId());\n assertEquals(\"The returned value is not as expected\", 3, invoice.getInvoiceStatus().getId());\n\n }", "public int getLBR_NotaFiscal_ID();", "boolean edit(InvoiceDTO invoiceDTO);", "public int getAgentCustomers(int agent_id) {\n int id = 0;\n try {\n checkAgentCustomers.setInt(1, agent_id);\n ResultSet resultset = checkAgentCustomers.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"customer_id\");\n System.out.println(\"Customer ID is: \" + id + \"\\n\");\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Agent Doesn't Manage Any Customers Yet!\");\n }\n return id;\n }", "int getNumberPaymentReceipt();", "String getIdNumber();", "public int getCustomer_id() {\r\n\t\treturn customer_id;\r\n\t}", "public Invoice(){//String invoiceId, String customer, String invoiceIssuer, Timestamp invoicingDate, TimeStamp dueDate, BigDecimal netAmount, BigDecimal vat, BigDecimal totalAmount, String currency, String linkToInvoiceDocument, String linkToInvoiceDocumentCopy, String invoicingPeriod, BigDecimal gp, Event event, Timestamp paidDate, BigDecimal amountOpen, String revenueType, String originalInvoiceId) {\r\n }", "@Test\n public void getInvoiceByCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"[email protected]\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Verify it was added to the database\n Customer customerCopy = service.findCustomer(customer.getCustomerId());\n TestCase.assertEquals(customerCopy, customer);\n\n // Add an Item to the database\n Item item = new Item();\n item.setName(\"Drill\");\n item.setDescription(\"Power Tool\");\n item.setDaily_rate(new BigDecimal(\"24.99\"));\n item = service.saveItem(item);\n\n // Verify it was added\n Item itemCopy = service.findItem(item.getItem_id());\n TestCase.assertEquals(itemCopy, item);\n\n // Add an InvoiceItem to the database\n Invoice_Item invoiceItem = new Invoice_Item();\n invoiceItem.setItem_id(item.getItem_id());\n invoiceItem.setQuantity(42);\n invoiceItem.setUnit_rate(new BigDecimal(\"4.99\"));\n invoiceItem.setDiscount(new BigDecimal(\"0.99\"));\n\n // Collect all the InvoiceItems into a list\n List<Invoice_Item> invoiceItemList = new ArrayList<>();\n invoiceItemList.add(invoiceItem);\n\n // Create an InvoiceViewModel\n InvoiceViewModel invoiceViewModel = new InvoiceViewModel();\n invoiceViewModel.setCustomer_id(customer.getCustomerId());\n invoiceViewModel.setOrder_date(LocalDate.of(2000,1,1));\n invoiceViewModel.setPickup_date(LocalDate.of(2000,2,2));\n invoiceViewModel.setReturn_date(LocalDate.of(2000,3,3));\n invoiceViewModel.setLate_fee(new BigDecimal(\"4.99\"));\n invoiceViewModel.setInvoice_items(invoiceItemList);\n invoiceViewModel = service.createInvoiceViewModel(invoiceViewModel);\n\n // Get Invoice By Customer\n service.getInvoiceByCustomer(customer.getCustomerId());\n }", "public InwardEntity createEstimateInvoice(InwardEntity invoice, String companyId, String newcustomerId) throws EntityException\n\t{\n\n\t\tDatastore ds = null;\n\t\tCompany cmp = null;\n\t\tBusinessPlayers customer = null;\n\t\tProducts prod = null;\n\t\tTax tax = null;\n\t\tKey<InwardEntity> key = null;\n\t\tObjectId oid = null;\n\t\tObjectId customerOid = null;\n\t\tObjectId prodOid = null;\n\t\tObjectId taxOid = null;\n\t\tInwardEntity estimate = null;\n\t\tInwardEntity existingInvoice = null;\n\t\tboolean customerChange = false;\n\n\n\t\ttry\n\t\t{\n\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\toid = new ObjectId(companyId);\n\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\tcmp = query.get();\n\t\t\tif(cmp == null)\n\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t// check if estimate exists\n\n\t\t\tQuery<InwardEntity> equery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isEstimate\", true).filter(\"isInvoice\", false).field(\"estimateNumber\").equal(invoice.getEstimateNumber());\n\t\t\testimate = equery.get();\n\t\t\tif(estimate == null)\n\t\t\t\tthrow new EntityException(512, \"estimate not found\", null, null);\n\n\t\t\t//check if customer changed, if yes then see if he exists\n\n\t\t\tif(!(estimate.getCustomer().getId().toString().equals(newcustomerId)))\n\t\t\t{\n\t\t\t\tcustomerChange = true;\n\t\t\t\tcustomerOid = new ObjectId(newcustomerId);\n\t\t\t\tQuery<BusinessPlayers> bpquery = ds.createQuery(BusinessPlayers.class).field(\"company\").equal(cmp).field(\"id\").equal(customerOid).field(\"isCustomer\").equal(true).field(\"isDeleted\").equal(false);\n\t\t\t\tcustomer = bpquery.get();\n\t\t\t\tif(customer == null)\n\t\t\t\t\tthrow new EntityException(513, \"customer not found\", null, null);\n\t\t\t}\n\n\n\n\t\t\t//check if invoice with this serial number exists\n\n\t\t\tequery = ds.createQuery(InwardEntity.class).filter(\"company\",cmp).field(\"isInvoice\").equal(true).field(\"invoiceSerialId\").equal(invoice.getInvoiceSerialId());\n\t\t\texistingInvoice = equery.get();\n\t\t\tif(existingInvoice != null)\n\t\t\t\tthrow new EntityException(514, \"invoice number found\", null, null);\n\n\n\n\t\t\t//collect new invoice details - can have deleted entries (2 queries per product)\n\t\t\tList<OrderDetails> invoiceDetails = invoice.getInvoiceDetails();\n\n\t\t\tfor(OrderDetails detail : invoiceDetails)\n\t\t\t{\n\n\t\t\t\tif(detail.getTax().getId() != null && detail.getTax().isDeleted() == false)\n\t\t\t\t{\n\n\t\t\t\t\ttaxOid = new ObjectId(detail.getTax().getId().toString());\n\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //has been deleted in due course\n\t\t\t\t}\n\n\t\t\t\t//check tax exists, if deleted\n\t\t\t\tif(detail.getTax().getId() != null && detail.getTax().isDeleted() == true)\n\t\t\t\t{\n\n\t\t\t\t\ttaxOid = new ObjectId(detail.getTax().getId().toString());\n\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //tax doesn't exists / may not be deleted\n\t\t\t\t}\n\n\t\t\t\tif(detail.getProduct().isDeleted() == false) //product cant be null\n\t\t\t\t{\n\n\t\t\t\t\tprodOid = new ObjectId(detail.getProduct().getId().toString());\n\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //has been deleted in due course\n\t\t\t\t}\n\n\t\t\t\tif(detail.getProduct().isDeleted() == true)\n\t\t\t\t{\n\n\t\t\t\t\tprodOid = new ObjectId(detail.getProduct().getId().toString());\n\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //product doesn't exists / may not be deleted\n\t\t\t\t}\n\n\n\t\t\t\t//each pod needs Id\n\t\t\t\tdetail.setId(new ObjectId());\n\t\t\t\tdetail.setTax(tax);\n\t\t\t\tdetail.setProduct(prod);\n\n\t\t\t\ttax = null;\n\t\t\t\ttaxOid = null;\n\t\t\t\tprod = null;\n\t\t\t\tprodOid = null;\n\n\t\t\t}\n\n\n\t\t\testimate.setisInvoice(true);\n\t\t\tif(customerChange == true)\t\n\t\t\t\testimate.setCustomer(customer);\n\t\t\testimate.setInvoiceNumber(invoice.getInvoiceNumber());\n\t\t\testimate.setInvoiceDate(invoice.getInvoiceDate());\n\t\t\testimate.setInvoiceDueinterval(invoice.getInvoiceDueinterval());\n\t\t\testimate.setInvoiceDuedate(invoice.getInvoiceDuedate());\n\t\t\testimate.setInvoiceSubtotal(invoice.getInvoiceSubtotal());\n\t\t\testimate.setInvoiceTaxtotal(invoice.getInvoiceTaxtotal());\n\t\t\testimate.setInvoiceGrandtotal(invoice.getInvoiceGrandtotal());\n\t\t\testimate.setisInvoicedeleted(false);\n\t\t\testimate.setInvoiceDetails(invoiceDetails);\n\t\t\testimate.setInvoiceSerialId(invoice.getInvoiceSerialId());\n\t\t\testimate.setInvoiceNotes(invoice.getInvoiceNotes());\n\n\n\t\t\tjava.math.BigDecimal invoiceAdvance = estimate.getEstimateAdvancetotal();\n\n\t\t\testimate.setInvoiceAdvancetotal(invoiceAdvance);\n\n\t\t\testimate.setInvoiceBalance(invoice.getInvoiceGrandtotal().subtract(invoiceAdvance));\n\n\n\t\t\tkey = ds.merge(estimate);\n\t\t\tif(key == null)\n\t\t\t\tthrow new EntityException(515, \"could not update\", null, null);\n\n\t\t}\n\t\tcatch(EntityException e)\n\t\t{\n\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\n\t\t\tthrow new EntityException(500, null , e.getMessage(), null);\n\t\t}\n\t\treturn estimate;\n\n\t}", "private void generatorder_complete (MInvoice invoice)\r\n\t {\r\n\r\n\t\t trx.commit();\r\n\r\n\t\t // Switch Tabs\r\n\t\t tabbedPane.setSelectedIndex(1);\r\n\t\t //\r\n\t\t iTextInOutGenerated = new StringBuffer();\r\n\t\t iTextInOutGenerated.append(\"<br><br>\")\r\n\t\t .append(\"<b>NOTA DE CREDITO No. \")\r\n\t\t .append(invoice.getDocumentNo())\r\n\t\t .append(\"</b><br><br>\");\r\n\t\t MInvoiceLine[] fromLines = invoice.getLines();\r\n\t\t for (int i = 0; i < fromLines.length; i++)\r\n\t\t {\r\n\t\t\t MInvoiceLine line = fromLines[i];\r\n\t\t\t iTextInOutGenerated.append(line.getQtyInvoiced().setScale(2, BigDecimal.ROUND_HALF_UP));\t\t\t\t\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(MUOM.get(Env.getCtx(), line.getC_UOM_ID()).getName());\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(line.getName());\r\n\t\t\t iTextInOutGenerated.append(\" \");\r\n\t\t\t iTextInOutGenerated.append(line.getLineNetAmt().setScale(2, BigDecimal.ROUND_HALF_UP));\r\n\t\t\t iTextInOutGenerated.append(\"<br>\");\r\n\t\t }\r\n\t\t info.setText(iTextInOutGenerated.toString());\r\n\r\n\t\t //\tGet results\r\n\t }", "public void generateInvoice() throws InvoicePrintException {\n authInvoice = null;\n try {\n signedInvoice = signer.sign(xmlGenerate.generateXMLFile(getInvoice(), getCustomer(), issuer), issuer.getCertificate(), issuer.getPassword());\n final List<Autorizacion> authResponse = authorization.syncRequest(signedInvoice, ServiceEnvironment.TEST, 20);\n if (!authResponse.isEmpty()) {\n final Autorizacion autorizacion = authResponse.get(0);\n final String authorizationStatus = autorizacion.getEstado();\n LOG.info(String.format(\"Invoice status: %s\", authorizationStatus));\n FacesMessageHelper.addInfo(String.format(\"Factura %s\", authorizationStatus), null);\n FacesMessageHelper.addQueryMessages(autorizacion.getMensajes().getMensaje());\n\n if (AuthorizationState.AUTORIZADO.name().equals(authorizationStatus)) {\n authInvoice = autorizacion.getNumeroAutorizacion() == null ? null : autorizacion;\n List<Attachment> attachments = createAttachments(autorizacion);\n stroreDocument(AuthorizationState.AUTORIZADO);\n sendMailWithAttachments(attachments);\n }\n } else {\n FacesMessageHelper.addError(\"Existe Problemas con el Servicio de Rentas Internas \", \"\");\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n }\n\n } catch (ReturnedInvoiceException rie) {\n final Comprobante comprobante = rie.getComprobantes().get(0);\n FacesMessageHelper.addRequestMessages(comprobante.getMensajes().getMensaje());\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n } catch (SignerException e) {\n LOG.error(e, e);\n FacesMessageHelper.addError(String.format(\"Hubo un error al firmar el documento: %s\", e.getMessage()), \"\");\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n } catch (Exception e) {\n FacesMessageHelper.addError(\"Existe Problemas con el Servicio de Rentas Internas \", \"Reintente la facturacion\");\n stroreDocument(AuthorizationState.NO_AUTORIZADO);\n }\n }", "public void deleteInvoice(int id){\n invoiceService.deleteInvoice(id);\n }", "public int getCustomerNo() {\n\t\treturn this.customerNo;\r\n\t}", "public int getOverdueBill() {\n int customer_id = 0;\n try {\n ResultSet resultset = overdueBills.executeQuery();\n while (resultset.next()) {\n customer_id = resultset.getInt(\"customer_id\");\n System.out.println(\"Customer ID: \" + customer_id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Try Again!\");\n }\n return customer_id;\n }", "public Invoice createInvoice(Order order);", "public String removeInvoicePayment(String paymentId, String invoiceNo, String companyId) throws EntityException\n\t\t\t{\n\n\t\t\t\tDatastore ds = null;\n\t\t\t\tCompany cmp = null;\n\t\t\t\tInwardEntity invoice = null;\n\t\t\t\tObjectId oid = null;\n\t\t\t\tObjectId invoiceOid = null;\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\t\tcmp = query.get();\n\t\t\t\t\tif(cmp == null)\n\t\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\n\t\t\t\t\tinvoiceOid = new ObjectId(invoiceNo);\n\t\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true)\n\t\t\t\t\t\t\t.filter(\"id\", invoiceOid);\n\n\t\t\t\t\tinvoice = iQuery.get();\n\t\t\t\t\tif(invoice == null)\n\t\t\t\t\t\tthrow new EntityException(512, \"invoice not found\", null, null);\n\n\t\t\t\t\t//we need to sub old amt, and add new amt, so get old amt\n\n\n\t\t\t\t\tboolean match = false;\n\t\t\t\t\tOrderPayments pymnt = null;\n\t\t\t\t\t\n\t\t\t\t\t//all deleted in between - make sure there are adv payments to compare and update\n\t\t\t\t\tif(invoice.getInvoicePayments() == null)\n\t\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null);\n\n\t\t\t\t\tfor(OrderPayments pay : invoice.getInvoicePayments())\n\t\t\t\t\t{\n\t\t\t\t\t\t//fetch that payment\n\t\t\t\t\t\tif(pay.getId().toString().equals(paymentId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmatch = true;\n\t\t\t\t\t\t\tpymnt = pay;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif(match == false)\n\t\t\t\t\t\tthrow new EntityException(513, \"payment not found\", null, null); //cant delete\n\n\n\t\t\t\t\tjava.math.BigDecimal invoiceAdvanceTotal = invoice.getInvoiceAdvancetotal().subtract(pymnt.getPaymentAmount());\n\t\t\t\t\tjava.math.BigDecimal invoiceBalance = invoice.getInvoiceBalance().add(pymnt.getPaymentAmount());\n\n\n\n\t\t\t\t\t//get Bill, remove particular element of list after fetching it\n\t\t\t\t\tiQuery = ds.createQuery(InwardEntity.class).disableValidation().filter(\"id\", invoiceOid);\n\t\t\t\t\tUpdateOperations<InwardEntity> ops = ds.createUpdateOperations(InwardEntity.class)\n\t\t\t\t\t\t\t.removeAll(\"invoicePayments\", pymnt)\n\t\t\t\t\t\t\t.set(\"invoiceAdvancetotal\", invoiceAdvanceTotal)\n\t\t\t\t\t\t\t.set(\"invoiceBalance\", invoiceBalance);\n\n\n\t\t\t\t\tUpdateResults result = ds.update(iQuery, ops, false);\n\n\t\t\t\t\tif(result.getUpdatedCount() == 0)\n\t\t\t\t\t\tthrow new EntityException(512, \"update failed\", null, null);\n\n\n\t\t\t\t}\n\t\t\t\tcatch(EntityException e)\n\t\t\t\t{\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\tthrow new EntityException(500, null, e.getMessage(), null);\n\t\t\t\t}\n\t\t\t\treturn \"success\";\n\t\t\t}", "private String getCustomerId(String xmlResponse) {\r\n\t\t\r\n\t\tString customerId = \"\";\r\n\t\tElement root;\r\n\t\t\r\n\t\ttry {\r\n\t\t\troot = DOMUtils.openDocument(new ByteArrayInputStream(xmlResponse.getBytes()));\r\n\t\t\tElement element = DOMUtils.getElement(root, \"data\", true);\r\n\t\t\t\r\n\t\t\telement = DOMUtils.getElement(element, \"customer\", true);\r\n\t\t\t\r\n\t\t\telement = DOMUtils.getElement(element, \"id\", true);\r\n\t\t\t\r\n\t\t\tcustomerId = DOMUtils.getText(element).toString();\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tlog.error(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t\tthrow new ErrorMessageException(\"Erro encontrado no XML de resposta do Infobus.\", e);\r\n\t\t}\r\n\t\t\r\n\t\treturn customerId;\r\n\t\t\r\n\t}", "public lnrpc.Rpc.Invoice lookupInvoice(lnrpc.Rpc.PaymentHash request) {\n return blockingUnaryCall(\n getChannel(), getLookupInvoiceMethod(), getCallOptions(), request);\n }", "public int getCustomerID()\r\n\t{\r\n\t\treturn customerID;\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public int getId()\r\n/* 69: */ {\r\n/* 70:103 */ return this.idAutorizacionEmpresaSRI;\r\n/* 71: */ }", "public void searchInvoice() throws Exception{\n\t driver.findElement(By.xpath(\"//*[@id='payments_table_filter']/label/input\")).clear();\n\t driver.findElement(By.xpath(\"//*[@id='payments_table_filter']/label/input\")).sendKeys(searchInvoice);\n\t \n\t //wait = new WebDriverWait(driver, 15);\n\t //wait.until(ExpectedConditions.textToBe(By.xpath(\"//*[@id='payments_table_info']\"), \"Showing 1 to 1 of 1 entries\"));\n\t Thread.sleep(1000);\n\t \n\t //check if invoice search result is correct\n\t String invoice = driver.findElement(By.xpath(\"//*[@id='payments_table']/tbody/tr[1]/td[1]\")).getText();\n\t ss.assertEquals(invoice, searchInvoice);\n\t \n\t //log to the status to console\n\t if(invoice.equalsIgnoreCase(searchInvoice)){\n\t\t Reporter.log(\"Searching for \"+ searchInvoice + \" successfully found.\");\n\t }else{\n\t\t Reporter.log(\"Searching for \"+ searchInvoice + \" not found.\");\n\t }\n }", "public rules.engine.example.SalaryInvoice getInvoice()\n {\n return invoice;\n }", "Diadoc.Api.Proto.Recognition.RecognitionProtos.RecognizedInvoiceOrBuilder getInvoiceOrBuilder();", "public static void setInvoiceData (final InvoiceData id)\n {\n invoiceData = id;\n }", "OcCustContract selectByPrimaryKey(String contractNo);", "public void showDataInvoiceNo()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"SELECT `Sr_No`, `Products`, `Serial_No`, `Module_No`, `Rate_Rs`, `CGST(%)`, `CGST(Rs)`, `SGST(%)`, `SGST(Rs)`, `GST(%)`, `GST(Rs)`, `Actual_Price`, `Discount(%)`, `Discount(Rs)`, `Quantity`, `Discount_Price`, `Total` FROM `mundheelectronics1`.`productsdata` WHERE Invoice_No=?\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\tps.setString(1,txtInvoiceNo.getText());\n\t\t\trs=ps.executeQuery();\n\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }", "public int idEmpleado(int cui) throws SQLException{\n obtenerConexion();\n int id = 0;\n PreparedStatement declaracionId = cn.prepareStatement(ID_EMPLEADO);\n declaracionId.setInt(1, cui);\n ResultSet result = declaracionId.executeQuery();\n while(result.next()){\n id = result.getInt(\"id\");\n }\n login.Desconectar();\n return id;\n }", "public void testSearchInvoiceAccuracy1() throws Exception {\n Invoice[] i =\n invoiceSessionBean.searchInvoices(InformixInvoiceFilterFactory.createInvoiceStatusIdFilter(1),\n InvoiceSearchDepth.INVOICE_ALL);\n assertEquals(\"the returned valus is not as expected\", 0, i.length);\n\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}", "String selectNumeroManifiestoAeat(final Long srvcId);", "String getBusi_id();", "public int getCustomerID() {\n return customerID;\n }", "@Disabled\n @Test\n void invoice() throws IOException, MessagingException {\n Receipt r = receiptService.invoice(\"12345678\", sales, c);\n receiptService.delete(r.getId());\n }", "int getMoneyID();", "int getMoneyID();" ]
[ "0.7463424", "0.73284847", "0.6755811", "0.6618644", "0.6599757", "0.6422352", "0.6422352", "0.6384983", "0.6338315", "0.630638", "0.6212984", "0.6163658", "0.6137539", "0.6127757", "0.6101378", "0.60920966", "0.60920966", "0.60919285", "0.6037028", "0.6031249", "0.60224324", "0.5989244", "0.5963984", "0.5955172", "0.5934158", "0.59307015", "0.5913401", "0.5912804", "0.589423", "0.5865289", "0.5850267", "0.5807585", "0.58059937", "0.5786631", "0.574978", "0.5744288", "0.57213384", "0.57182306", "0.5707908", "0.56885105", "0.5687407", "0.5683733", "0.56834686", "0.5677632", "0.5655125", "0.56323224", "0.5629696", "0.5614724", "0.5612075", "0.5603907", "0.560352", "0.5589314", "0.5587506", "0.5585662", "0.55831814", "0.5578988", "0.5575253", "0.55715317", "0.55689466", "0.5566074", "0.555533", "0.5554019", "0.55499226", "0.55432445", "0.5537528", "0.55333984", "0.55267835", "0.5521988", "0.5520898", "0.5519192", "0.5517809", "0.5501746", "0.5490901", "0.54852825", "0.5484865", "0.5478988", "0.5473527", "0.54702884", "0.54702765", "0.5470127", "0.54584724", "0.54541236", "0.5447765", "0.5437352", "0.5434652", "0.54314065", "0.5430556", "0.54206306", "0.5419026", "0.5415585", "0.54090977", "0.54086155", "0.54004747", "0.539991", "0.5397185", "0.53918254", "0.53896266", "0.53826857", "0.5382594", "0.5382594" ]
0.5636439
45
Method called when permission is request to Location for example. User is prompted.
@Override public void onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults) { int index = 0; Map<String, Integer> PermissionsMap = new HashMap<String, Integer>(); for (String permission : permissions){ PermissionsMap.put(permission, grantResults[index]); index++; } if((PermissionsMap.get(Manifest.permission.ACCESS_FINE_LOCATION) != 0) || PermissionsMap.get(Manifest.permission.ACCESS_COARSE_LOCATION) != 0){ Toast.makeText((AppCompatActivity)getActivity(), "Location permission is a must", Toast.LENGTH_SHORT).show(); // finish(); } else { // this.ble.initializeBle((AppCompatActivity)getActivity()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getLocationPermission() {\n if (!isPermissionGranted())\n // get the location permission from user\n // this will prompt user a dialog to give the location permission\n requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n /*ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);*/\n }", "private void permissionLocationRequest() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int hasLocationPermission = checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION);\n if (hasLocationPermission != PackageManager.PERMISSION_GRANTED) {\n if (!shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)) {\n showMessageOKCancel(\"You need to allow access to Location\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n });\n }\n }\n\n }\n }", "private void requestLocationPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Permission needed\")\n .setMessage(\"Location Permission is needed to show your current location on the map\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(ScavengerHunt.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Toast.makeText(ScavengerHunt.this, \"Location Permission is needed to update the map\", Toast.LENGTH_SHORT).show();\n }\n })\n .create()\n .show();\n\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n }", "private void askPermission() {\n if (ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n Parameters.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n //request location permission\n ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION\n }, LOCATION_REQUEST_CODE);\n }\n fetchLastLocation();\n }", "private void requestLocationPermission() {\n Log.d(MainActivity.TAG,\"Requesting location permission.\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (shouldShowRequestPermissionRationale(\n android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(this, R.string.location_permission_request_rationale, Toast.LENGTH_SHORT).show();\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n }\n requestPermissions(new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void requestPermission() {\n boolean shouldProvideRationale = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n if (shouldProvideRationale) {\n Log.i(TAG, \"requestPermission: \" + \"Displaying the permission rationale\");\n // provide a way so that user can grant permission\n\n showSnackbar(R.string.warning_txt, android.R.string.ok, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n startLocationPermissionRequest();\n }\n });\n\n } else {\n startLocationPermissionRequest();\n }\n }", "public void askPermission() {\n if (ContextCompat.checkSelfPermission(getActivity()\n , android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n reqestLocationPermission);\n }\n }", "private void requestPermission() {\n if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(this.getResources().getString(R.string.request_location_permission_message))\n .setPositiveButton(this.getResources().getString(R.string.OK), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n } else {\n ActivityCompat.requestPermissions((Activity) mContext,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION, android.Manifest.permission.ACCESS_COARSE_LOCATION},\n REQUEST_LOCATION);\n }\n }", "private void getLocationPermission() {\n Log.wtf(TAG, \"getLocationPermission() has been instantiated\");\n\n Log.d(TAG, \"getLocationPermission: getting location permissions\");\n String[] permissions = {\n FINE_LOCATION,\n COARSE_LOCATION\n };\n\n if (ContextCompat.checkSelfPermission(getActivity(), FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(getActivity(), COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n Log.d(TAG, \"getLocationPermission: Permission granted\");\n initMap();\n\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n } else {\n Log.d(TAG, \"getLocationPermission: requesting permission\");\n requestPermissions(permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n Log.d(TAG, \"Permission Result\");\n String[] permissions = {ACCESS_FINE_LOCATION,\n ACCESS_COURSE_LOCATION};\n\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_FINE_LOCATION) == PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n ACCESS_COURSE_LOCATION) == PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);}\n } else{\n ActivityCompat.requestPermissions(this,\n permissions,\n LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void getLocation() {\n if(ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)){\n new AlertDialog.Builder(this)\n .setTitle(\"Location Permission Required\")\n .setMessage(\"This app needs permission to use your location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(RestaurantsActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n })\n .create()\n .show();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_LOCATIONS);\n }\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(activity.getApplicationContext(), android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(activity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n mLocationPermissionGranted = false;\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n mLocationPermissionGranted = false;\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission(){\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationAccess = true;\n } else {\n locationAccess = false;\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED)\n {\n mLocationPermissionGranted = true;\n } else {\n requestPermissions(\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION\n );\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void locationPermission() {\n if(Build.VERSION.SDK_INT<23){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n }else{\n if(checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationPermission = true;\n startService(new Intent(this, LocationService.class));\n return;\n }\n\n if(shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_COARSE_LOCATION) && shouldShowRequestPermissionRationale(Manifest.permission.ACCESS_FINE_LOCATION)){\n Snackbar.make(drawer,\"Location access is required to show your friend and questions on map.\",Snackbar.LENGTH_INDEFINITE)\n .setAction(\"OK\", new View.OnClickListener() {\n @TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View v) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n })\n .show();\n }else{\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.ACCESS_COARSE_LOCATION},LOCATION_PERMISSION_CODE);\n }\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void askForLocationPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n //this code will be executed on devices running on DONUT (NOT ICS) or later\n askForPermission(Manifest.permission.ACCESS_FINE_LOCATION, Extra.LOCATION);\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(mContext,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(mActivity,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void requestPermissionAccessLocation() {\n int permissionCheck = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\n\n Log.d(TAG, \"permissionCheck: \" + permissionCheck);\n\n if (permissionCheck == PackageManager.PERMISSION_GRANTED) {\n updateFragmentOnLocationSuccess();\n } else {\n ActivityCompat\n .requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_PERMISSION_LOCATION);\n }\n }", "public void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mLocationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission() {\n if (ContextCompat.checkSelfPermission(getActivity().getApplicationContext(),\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n\n } else {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "public void askForPermissionsGrant(){\n int res =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n int res2 =ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION);\n if (res!= PackageManager.PERMISSION_GRANTED || res2!= PackageManager.PERMISSION_GRANTED) {\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"We need to access your location\")\n .setMessage(\"We want to track every breath you take\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.READ_CONTACTS},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n builder.create().show();\n }\n else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n publishLastLocation();\n }\n\n }", "private void setupLocation() {\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted.\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION) &&\n ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)) {\n\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n } else {\n // Request the permission\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n LOCATION_PERMISSION_REQUEST);\n }\n } else {\n // Permission has already been granted\n }\n }", "private void getLocationPermission() {\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_FINE_LOCATION) == PERMISSION_GRANTED &&\n ContextCompat.checkSelfPermission(this.getApplicationContext(), ACCESS_COARSE_LOCATION) == PERMISSION_GRANTED) {\n locationPermissionGranted = true;\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{\n ACCESS_FINE_LOCATION,\n ACCESS_COARSE_LOCATION\n }, PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n }", "private void getLocationPermission(){\n Log.d(TAG, \"getLocationPermission: getting location permission.\");\n String[] permissions = {Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION};\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n if (ContextCompat.checkSelfPermission(this.getApplicationContext(),\n COURSE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mLocationPermissionGaranted = true;\n getDeviceLocation();\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }else{\n ActivityCompat.requestPermissions(this, permissions, LOCATION_PERMISSION_REQUEST_CODE);\n }\n }", "private void callPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\r\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\r\n != PackageManager.PERMISSION_GRANTED) {\r\n\r\n requestPermissions(\r\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\r\n PERMISSIONS_ACCESS_FINE_LOCATION);\r\n\r\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\r\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)\r\n != PackageManager.PERMISSION_GRANTED){\r\n\r\n requestPermissions(\r\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\r\n PERMISSIONS_ACCESS_COARSE_LOCATION);\r\n } else {\r\n isPermission = true;\r\n }\r\n }", "private void callPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n requestPermissions(\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_ACCESS_FINE_LOCATION);\n\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M\n && checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n\n requestPermissions(\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_ACCESS_COARSE_LOCATION);\n } else {\n isPermission = true;\n }\n }", "private void checkLocationPermission() {\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n //location permission required\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_FINE_LOCATION);\n\n }else{\n //location already granted\n checkCoarseAddress();\n }\n }", "@Override\n public void onClick(View view) {\n locationChecker.checkBeforeAsking(new PermissionChecker.CheckPermissionListener() {\n @Override\n public void onPermissionDenied() {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onPermissionGranted() {\n\n gm.requestLastLocation(new GeoManager.GeoDirectLocationListener() {\n @Override\n public void onLocationError(Throwable error) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, null, null);\n }\n\n @Override\n public void onLocationSuccess(double latitude, double longitude) {\n Navigator.fromAnyActivityToLocationPickerActivity(NewPubActivity.this, latitude, longitude);\n }\n });\n }\n });\n }", "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n new AlertDialog.Builder(getActivity())\n .setTitle(\"give permission\")\n .setMessage(\"give permission message\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n })\n .create()\n .show();\n }\n else{\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n }\n\n }", "private void askPermissionsAndShowMyLocation() {\n if (Build.VERSION.SDK_INT >= 23) {\n int accessCoarsePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_COARSE_LOCATION);\n int accessFinePermission\n = ContextCompat.checkSelfPermission(activity, android.Manifest.permission.ACCESS_FINE_LOCATION);\n\n\n if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n || accessFinePermission != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{android.Manifest.permission.ACCESS_COARSE_LOCATION,\n android.Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(activity, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n }\n\n // Show current location on Map.\n this.showMyLocation();\n }", "public void checkLocationPermission() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n 99);\n }\n\n }", "private void requestPermission(){\r\n ActivityCompat.requestPermissions(activity,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);\r\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AdminMap.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onGeolocationPermissionsShowPrompt(String origin,\n GeolocationPermissions.Callback callback) {\n String perm = Manifest.permission.ACCESS_FINE_LOCATION;\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M ||\n ContextCompat.checkSelfPermission(Main2Activity.this, perm) == PackageManager.PERMISSION_GRANTED) {\n // we're on SDK < 23 OR user has already granted permission\n callback.invoke(origin, true, false);\n } else {\n if (!ActivityCompat.shouldShowRequestPermissionRationale(Main2Activity.this, perm)) {\n // ask the user for permission\n ActivityCompat.requestPermissions(Main2Activity.this, new String[]{perm}, REQUEST_FINE_LOCATION);\n\n // we will use these when user responds\n mGeolocationOrigin = origin;\n mGeolocationCallback = callback;\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "private boolean checkPermissonLocationRequest(int requestCode) {\n if (Build.VERSION.SDK_INT >= 23) {\n if (checkSelfPermission(Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED\n && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n return true;\n } else {\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION}, requestCode);\n return false;\n }\n } else {\n return true;\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n\n final ProgressDialog progressDialog = new ProgressDialog(InfoActivity.this);\n progressDialog.setMessage(\"Getting your location...\");\n progressDialog.show();\n SmartLocation.with(InfoActivity.this).location().oneFix().start(new OnLocationUpdatedListener() {\n @Override\n public void onLocationUpdated(Location location) {\n latitudeStr = String.valueOf(location.getLatitude());\n longitudeStr = String.valueOf(location.getLongitude());\n progressDialog.dismiss();\n Toast.makeText(InfoActivity.this, location.getLatitude() + \" \" + location.getLongitude(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(OwnerMapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void askPermissionsAndShowMyLocation() {\n boolean isGPSEnabled = false;\n // flag for network status\n boolean isNetworkEnabled = false;\n // flag for GPS status\n boolean canGetLocation = false;\n LocationManager locationManager;\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n if (Build.VERSION.SDK_INT >= 23) {\n // flag for GPS status\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n// if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n// || accessFinePermission != PackageManager.PERMISSION_GRANTED)\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(this, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n this.showMyLocation();\n }\n\n } else {\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n this.showMyLocation();\n }\n\n\n }\n // Show current location on Map.\n }", "void requestPermissionAndPopulateDistance(){\n //Check and acquire COARSE location permissions, to calculate distance, if not already granted\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)){\n // show rationale\n }else{\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_CONS);\n }\n }else{\n //If the permission is already acquired, calculate the distance and update the view\n calculateAndPopulateDistance();\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(mapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(View view) {\n if (ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(IntroActivity.this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQCODELOCATION\n );\n } else {\n // caso contrario: obtener la ubicacion actual\n getCurrentLocation();\n }\n\n }", "private void fetchlocation() {\n if (ContextCompat.checkSelfPermission(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n // Permission is not granted\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(SelectService.this,\n Manifest.permission.ACCESS_COARSE_LOCATION)) {\n // Show an explanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n new AlertDialog.Builder(this)\n .setTitle(\"Required Location Permission\")\n .setMessage(\"You have to give permission to fetch your current location\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .create()\n .show();\n\n } else {\n // No explanation needed; request the permission\n ActivityCompat.requestPermissions(SelectService.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n } else {\n // Permission has already been granted\n fusedLocationClient.getLastLocation()\n .addOnSuccessListener(this, new OnSuccessListener<android.location.Location>() {\n @Override\n public void onSuccess(android.location.Location location) {\n // Got last known location. In some rare situations this can be null.\n if (location != null) {\n // Logic to handle location object\n latitude = location.getLatitude();\n longitude = location.getLongitude();\n }\n }\n });\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(WeatherByGPS.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n\n switch (requestCode) {\n case MY_LOCATION:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n gMap.setMyLocationEnabled(true);\n }\n } else {\n Toast.makeText(getActivity().getApplicationContext(), \"Bit Chat requires location permissions to be granted\", Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n break;\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(SearchActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "void askForPermissions();", "public void requestLocationPermision(){\n\n // Forma de actuar diferente si la versión del dispositivo en Marshmallow\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) {\n Log.d(TAG, \"Versión 23\");\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Si no tenemos permiso, lo pedimos\n\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"Show an expanation\");\n new AlertDialog.Builder(this)\n .setMessage(getString(R.string.show_explanation))\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[] {Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_CODE_ASK_PERMISSIONS);\n }\n }\n })\n .create()\n .show();\n\n } else{\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_CODE_ASK_PERMISSIONS);\n }\n } else{\n Log.d(TAG, \"Tenemos permiso\");\n\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n if (!provider.contains(\"gps\")) {\n //Si el GPS no esta activo, pedimos su iniciación\n AlertNoGps();\n }\n\n //Inicializacion de los providers\n for (String s : locationManager.getAllProviders()) {\n int minDistance = 2;\n int checkInterval = 2;\n locationManager.requestLocationUpdates(s, checkInterval,\n minDistance, this);\n Location actualLocation = locationManager.getLastKnownLocation(s);\n //Comprobamos si es una mejor localización\n if (actualLocation!=null){\n if (isBetterLocation(actualLocation)){\n Log.d(TAG, \"Mejor localización -> \" + s + \" - \"+ actualLocation);\n bestLocation = actualLocation;\n }\n }\n }\n\n mMap.setMyLocationEnabled(true);\n setLocation();\n }\n } else{\n //Comprobacion de permisos\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"Tenemos permiso\");\n\n String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);\n\n if (!provider.contains(\"gps\")) {\n //Si el GPS no esta activo, pedimos su iniciación\n AlertNoGps();\n }\n\n //Inicializacion de los providers\n for (String s : locationManager.getAllProviders()) {\n int minDistance = 2;\n int checkInterval = 2;\n locationManager.requestLocationUpdates(s, checkInterval,\n minDistance, this);\n Location actualLocation = locationManager.getLastKnownLocation(s);\n if (actualLocation!=null){\n if (isBetterLocation(actualLocation)){\n Log.d(TAG, \"Mejor localización -> \" + s + \" - \"+ actualLocation);\n bestLocation = actualLocation;\n }\n }\n }\n\n mMap.setMyLocationEnabled(true);\n setLocation();\n }\n }\n\n }", "private void startTrackingRoute(){\n if(ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n //Starts up alert dialog for getting permission\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOC_PERMISSION);\n }\n else{\n //Start the location updater listener\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, MIN_DISTANCE, this);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n getCurrentLocation();\n } else {\n Toast.makeText(this, \"Permision Denied\", Toast.LENGTH_SHORT).show();\n }\n }", "public static void checkLocationPermission() {\n globalContext.stopService(locationIntent);\n\n globalFragmentActivity.requestPermissions(\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void checkPermission(){\n // vérification de l'autorisation d'accéder à la position GPS\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n\n// // l'autorisation n'est pas acceptée\n// if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n// Manifest.permission.ACCESS_FINE_LOCATION)) {\n// // l'autorisation a été refusée précédemment, on peut prévenir l'utilisateur ici\n// } else {\n // l'autorisation n'a jamais été réclamée, on la demande à l'utilisateur\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n FINE_LOCATION_REQUEST);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n // }\n } else {\n // TODO : autorisation déjà acceptée, on peut faire une action ici\n initLocation();\n }\n }", "private void fetchPermissionsFromUser() {\n Log.d(TAG, \"in fetch permisssion s\");\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.READ_CONTACTS)) {\n\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION show request\");\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_COARSE_LOCATION with return request\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION\");\n // Should we show an explanation?\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION erequest\");\n // Show an expanation to the user *asynchronously* -- don't block\n // this thread waiting for the user's response! After the user\n // sees the explanation, try again to request the permission.\n\n } else {\n\n // No explanation needed, we can request the permission.\n Log.d(TAG, \"in fetch permisssion s ACCESS_FINE_LOCATION with return requet\");\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n\n // MY_PERMISSIONS_REQUEST_READ_CONTACTS is an\n // app-defined int constant. The callback method gets the\n // result of the request.\n }\n }\n\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "private void requestFineLocationPermission() {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_REQ);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults){\n switch (requestCode){\n case MY_PERMISSIONS_LOCATIONS: {\n if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED){\n mFusedClient.requestLocationUpdates(mLocationRequest,mLocationCallback, Looper.myLooper());\n }\n } else {\n Toast.makeText(this, \"permission denied\", Toast.LENGTH_LONG).show();\n }\n return;\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(ActivityLivetrackingRest.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,@NonNull int[] grantResults) {\n if (requestCode != PermissionUtils.REQUEST_CODE) {\n return;\n }\n if (PermissionUtils.isPermissionGranted(new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION}, grantResults)) {\n //If you have permission, go to the code to get the location value\n initGoogleMapLocation();\n } else {\n Toast.makeText(this, \"Stop apps without permission to use location information\", Toast.LENGTH_SHORT).show();\n //finish();\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "void configure_button(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n\n locationManager.requestLocationUpdates(\"gps\", 5000, 0, listener);\n\n }", "private void requestPermissions() {\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED\n ||\n ContextCompat.checkSelfPermission(this,\n Manifest.permission.READ_CONTACTS)\n != PackageManager.PERMISSION_GRANTED\n ) {\n\n //Request Permissions\n ActivityCompat.requestPermissions(this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.READ_CONTACTS\n }, REQUEST_CODE_PERMISSION);\n return;\n }\n\n locationManager.requestLocationUpdates(\n LocationManager.GPS_PROVIDER, 0, 0,\n this);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n switch (requestCode) {\n case 1:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n }\n\n } else {\n Toast.makeText(getContext(), \"This app needs location permission to be granted!,\",\n Toast.LENGTH_LONG).show();\n getActivity().finish();\n }\n break;\n }\n }", "@Override\n public void onExplanationNeeded(List <String> permissionsToExplain) {\n Toast.makeText(this, \"You have to enable location on your device to use the map navigation\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onRequestPermissionsResult(\n int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case PERMISSION_REQ:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n fineLocationPermissionGranted();\n }\n }\n }", "private void requestPermissions() {\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_ID);\n }", "private void requestPermissions() {\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_ID);\n }", "@Override\n public void onRequestPermissionsResult(int requestCode,\n @NonNull String permissions[], @NonNull int[] grantResults) {\n switch (requestCode) {\n case MainActivity.MY_PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if ((grantResults.length > 0)\n && (grantResults[0] == PackageManager.PERMISSION_GRANTED)) {\n Log.d(MainActivity.TAG,\"Location Permission Granted.\");\n if(checkGoogleApiAvailability()) {\n start();\n }\n } else {\n alertUserAboutError(getString(R.string.no_location_found_address),\"Open Settings?\",ForecastRetrievalServiceConstants.LOCATION_FAILURE_RESULT);\n }\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(Userhome.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_ACCESS_COURSE_LOCATION);\n }", "public void checkpermission()\n {\n permissionUtils.check_permission(permissions,\"Need GPS permission for getting your location\",1);\n }", "private boolean isLocationAllowed() {\n int result = ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION);\r\n\r\n //If permission is granted returning true\r\n if (result == PackageManager.PERMISSION_GRANTED)\r\n return true;\r\n\r\n //If permission is not granted returning false\r\n return false;\r\n }", "public void requestLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.INTERNET}, 12);\n }\n return;\n }\n //this line updates location\n mMap.setMyLocationEnabled(true);\n providerClient.requestLocationUpdates(locationRequest, locationCallback, getMainLooper());\n }", "private void startGettingLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n //should check if location is enabled\n\n initializeGoogleApiClient();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSION_ACCESS_LOCATION);\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {\n //switch\n switch (requestCode) {\n case ACCESS_REQUEST_LOCATION: {\n // If request is cancelled, the result arrays are empty.\n if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n // permission was granted.\n Log.i(getResources().getString(R.string.app_name),\n \"Location Permission granted by user.\");\n setLocationUpdateFunction();\n } else {\n // permission denied, boo! Disable the functionality that depends on this permission.\n Log.e(getResources().getString(R.string.app_name),\n \"No Location Permission granted by user.\");\n //toast message telling the user to enable location permissions\n Toast.makeText(this, \"You have not enabled Location services for this app, please enable them in this apps settings\", Toast.LENGTH_LONG);\n }\n return;\n }\n\n }\n }", "@Override\n public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n if(requestCode==REQUEST_location)\n if (Connectivity.Checkinternet(getActivity())) {\n if (requestCode == 100) {\n if (!PermissionUtils.isPermissionGranted(permissions, grantResults, Manifest.permission.ACCESS_FINE_LOCATION) &&\n !PermissionUtils.isPermissionGranted(permissions, grantResults, Manifest.permission.ACCESS_COARSE_LOCATION))\n setupmap();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }\n }", "@Override\n public void onRequestPermissionsResult(@NonNull int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {\n super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n if (permissions.length == 0) {\n return;\n }\n boolean allPermissionsGranted = true;\n if (grantResults.length > 0) {\n for (int grantResult : grantResults) {\n if (grantResult != PackageManager.PERMISSION_GRANTED) {\n allPermissionsGranted = false;\n break;\n }\n }\n }\n if (!allPermissionsGranted) {\n boolean somePermissionsForeverDenied = false;\n for (String permission : permissions) {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, permission)) {\n //denied\n } else {\n if (ActivityCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED\n && requestCode == Extra.LOCATION) {\n getLocation();\n } else {\n //set to never ask again\n somePermissionsForeverDenied = true;\n }\n }\n }\n if (somePermissionsForeverDenied) {\n final AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);\n alertDialogBuilder.setTitle(R.string.permissions_required)\n .setMessage(R.string.you_have_explicitly_denied_permissions_which_are_required_by_this_app_to_run_for_this_action_open_settings_go_to_permissions_and_allow_them)\n .setPositiveButton(R.string.settings, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS,\n Uri.fromParts(Extra.PACKAGE, getPackageName(), null));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n })\n .setCancelable(false)\n .create()\n .show();\n }\n } else if (requestCode == Extra.LOCATION) {\n getLocation();\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AddressBook_add.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@SuppressLint(\"NewApi\")\n @Override\n public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n switch (requestCode) {\n case 1340:\n if (grantResults[0] == PackageManager.PERMISSION_GRANTED && checkSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n mMap.setMyLocationEnabled(true);\n } else {\n Toast.makeText(this, \"Location cannot be obtained due to \" + \"missing permission.\", Toast.LENGTH_LONG).show();\n }\n break;\n }\n }", "private void checkPermissions(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this,Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n ActivityCompat.requestPermissions(this, new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION\n },PERMS_CALL_ID);\n\n }\n\n\n }", "@SuppressLint(\"MissingPermission\")\n private void requestLocationUpdate() {\n }", "private void askForPermission(String permission) {\n ActivityCompat.requestPermissions(\n this,\n new String[] {Manifest.permission.ACCESS_COARSE_LOCATION},\n PERM_REQUEST_CODE\n );\n }", "void configure_button(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n locButton.setOnClickListener(new View.OnClickListener() {\n @SuppressLint(\"MissingPermission\")\n @Override\n public void onClick(View view) {\n //noinspection MissingPermission\n switcher = true;\n locManager.requestLocationUpdates(\"gps\", 5000, 0, locListener);\n }\n });\n }" ]
[ "0.8358251", "0.8066278", "0.79877174", "0.7953386", "0.79212964", "0.7913512", "0.7844688", "0.7838377", "0.7793102", "0.778555", "0.7747893", "0.77356017", "0.77275705", "0.7725568", "0.77038896", "0.77038896", "0.7700222", "0.76954", "0.76954", "0.76948947", "0.7672095", "0.7665625", "0.7665625", "0.7659339", "0.7658623", "0.7657422", "0.76463586", "0.7623058", "0.76227146", "0.7597375", "0.7594134", "0.75810415", "0.75640625", "0.7504922", "0.7499741", "0.7487124", "0.7470392", "0.74701434", "0.7428471", "0.7350755", "0.7343631", "0.73056537", "0.7256907", "0.7255926", "0.7246379", "0.7225647", "0.7201528", "0.71805763", "0.71762025", "0.7173521", "0.71698755", "0.7167133", "0.7157536", "0.7098544", "0.70835245", "0.7067787", "0.706005", "0.70443726", "0.7041916", "0.70416033", "0.7032826", "0.7020445", "0.7015745", "0.70017105", "0.699465", "0.6986451", "0.697765", "0.6968318", "0.69663167", "0.69630265", "0.6960317", "0.6927484", "0.69177896", "0.69164157", "0.6913348", "0.6900602", "0.68955654", "0.68928325", "0.68910354", "0.6883928", "0.687424", "0.6855052", "0.68513834", "0.68474454", "0.68423253", "0.68423253", "0.6833907", "0.6830614", "0.6829484", "0.682638", "0.6815264", "0.67872685", "0.67811793", "0.6775831", "0.67705625", "0.6769773", "0.67606556", "0.6744815", "0.67225903", "0.671344", "0.6711326" ]
0.0
-1
Created by zhouxue on 2017/8/4.
public interface RecivMessageCallBack { public List<AppServerType> getServerType(); public void onRecivMessage(Channel ctx, NettyMessage message, String tag, JsonParser parser)throws UnsupportedEncodingException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\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 comer() {\n\t\t\n\t}", "private static void cajas() {\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 func_104112_b() {\n \n }", "@Override\n\tprotected void getExras() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void entrenar() {\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}", "private void poetries() {\n\n\t}", "@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\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void init() {\n }", "public void mo38117a() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void getExras() {\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\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void init() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {}", "@Override\n\tpublic void einkaufen() {\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}", "private Rekenhulp()\n\t{\n\t}", "private void strin() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@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}", "public void mo6081a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void initialize() { \n }", "private UsineJoueur() {}", "public void gored() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\n\tpublic void init() {\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n\n\n\n }", "private zza.zza()\n\t\t{\n\t\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "Constructor() {\r\n\t\t \r\n\t }" ]
[ "0.6181635", "0.609589", "0.5866964", "0.5866964", "0.58464247", "0.58448255", "0.5804839", "0.5721404", "0.57200533", "0.5712108", "0.5692469", "0.5677787", "0.5664517", "0.56503266", "0.56406945", "0.5624697", "0.5623651", "0.56148744", "0.56144893", "0.560989", "0.5600003", "0.5598039", "0.55975807", "0.55970293", "0.55808103", "0.5578075", "0.55528903", "0.5545243", "0.5544932", "0.55437386", "0.5525449", "0.5525449", "0.5525449", "0.5525449", "0.5525449", "0.5521742", "0.5521742", "0.5521742", "0.5521742", "0.5521742", "0.5521742", "0.552013", "0.552013", "0.5516035", "0.5502165", "0.5494871", "0.548747", "0.5471617", "0.5469468", "0.5469468", "0.54590225", "0.545844", "0.5450161", "0.5450161", "0.5450161", "0.54461706", "0.5420488", "0.54102916", "0.54090756", "0.5408032", "0.540632", "0.540632", "0.540632", "0.54039276", "0.5403185", "0.5401609", "0.5397696", "0.5397696", "0.5392939", "0.5392939", "0.5392939", "0.5392939", "0.5392939", "0.5392939", "0.5392939", "0.53921455", "0.53921455", "0.53921455", "0.5377675", "0.5369342", "0.53659433", "0.5361775", "0.53599155", "0.53482395", "0.53477305", "0.5343322", "0.5343217", "0.53363717", "0.5336252", "0.53295887", "0.532404", "0.53144115", "0.5312754", "0.53081995", "0.53010696", "0.5297847", "0.5296971", "0.5296971", "0.5296971", "0.5290421", "0.52817774" ]
0.0
-1
/ / Devuelve true si par_Number es un numero / / valor que se quiere saber si es un numero o no / verdadero en caso de que par_Number sea un numero, falso en otro caso
public static boolean IsNumber(int par_Numer) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean IsNumber(long par_Number) {\n return true;\n }", "public static boolean IsNumber(double par_Number) {\n return true;\n }", "public static boolean IsNumber(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^\\\\-?\\\\d*.?\\\\d+$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches() || IsInteger(par_Number);\n }", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public boolean hasNumber(){\n return (alg.hasNumber(input.getText().toString()));\n }", "boolean hasNumber();", "private boolean validar_numero(String numero) {\n boolean es_valido;\n es_valido = numero.charAt(0) != '0';\n return es_valido;\n }", "public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "static boolean blanco(int numero){\n\t\tboolean resultado; \n\t\tif (numero > 43){\n\t\t\tresultado = true;\n\t\t}else{\n\t\t\tresultado = false;\n\t\t}\n\t\treturn resultado;\t\n\t}", "public static boolean IsInteger(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^[\\\\d|\\\\-]\\\\d*$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches();\n\n }", "public static boolean verificarNumeros(String numero) {\n\t\ttry{\n\t\t\tInteger.parseInt(numero);\n\t\t\treturn true;\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t}", "public static void VerificarPar(){\n\t\tint numero;\n\t\tint resultado;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tresultado=(numero%2);\n\t\tif(resultado==0){\n\t\t\tSystem.out.println(\"Numero Par: \"+(numero*2));\n\t\t}else{\n\t\t\tSystem.out.println(\"Numero Impar: \"+(numero*3));\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "public default boolean hasNumber() {\n\t\treturn false;\n\t}", "private boolean numeroValido(int numero, int ren, int col){\n return verificaArea(numero,ren,col)&&verificaRenglon(numero,ren) && verificaColumna(numero,col);\n }", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "public boolean isSetNum() {\n return this.Num != null;\n }", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "public boolean validaNumero(int i, int j, int num) {\r\n\r\n return (comprovaFila(i, num) && comprovaColumna(j, num) && comprovaNumerosQuadrant(i - i % SRN, j - j % SRN, num));\r\n\r\n }", "private boolean isNumber(final String number) {\n try {\n Integer.parseInt(number);\n return true;\n } catch (Exception e) {\n LOGGER.error(\"Not a number \" + number, e);\n return false;\n }\n }", "public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "private boolean isNumber(String number){\n\t\ttry{\r\n\t\t\tFloat.parseFloat(number);\r\n\t\t}catch(Exception e){\r\n\t\t\treturn false;// if the user input is not number it throws flase\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "public boolean isNumber(String num)\t{\n\t\tfor(int i=0;i<13;i++)\t{\n\t\t\tif(Integer.parseInt(num)==i)\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "public boolean isSetNumPoliza() {\r\n return this.numPoliza != null;\r\n }", "private boolean checkForNumber(String field) {\n\n\t\tPattern p = Pattern.compile(\"[0-9].\");\n\t\tMatcher m = p.matcher(field);\n\n\t\treturn (m.find()) ? true : false;\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean isNumberValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_NUMBER);\n }", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public static boolean esPrimo (int num) {\n\t\tboolean primo = true;\n\t\tint i;\n\t\t\n\t\t// Bucle hasta la mitad - 1 de num (si no se ha podido dividir entre 2 los demas numeros despues de su mitad tampoco se podra\n\t\tfor (i = 2; i < (num / 2) && primo; i++) {\n\t\t\tif (num % i == 0) {\n\t\t\t\tprimo = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn primo;\n\t}", "public static boolean esPrimo(int numero) {\n int contador = 2;\n boolean primo = true;\n while ((primo) && (contador != numero)) {\n if (numero % contador == 0) {\n primo = false;\n }\n contador++;\n }\n\n return primo;\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "private static int isEntero(String palabra) {\n int resultado;//declaramos la variable a retornar\n\n try {\n Integer.parseInt(palabra);//convertimos la palabra a Integer\n resultado = 1;//Si no hay un error entonces es un numero y retornamos true\n } catch (NumberFormatException excepcion) {//de lo contrario es una palabra\n resultado = 0;\n }\n\n return resultado;//retornamos el valor\n }", "public void ingresar() \r\n\t{\r\n\r\n\t\tString numeroCasilla = JOptionPane.showInputDialog(this, \"Ingresar numero en la casilla \" + sudoku.darFilaActual() + \",\" +sudoku.darColumnaActual());\r\n\t\tif (numeroCasilla == null || numeroCasilla ==\"\")\r\n\t\t{}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\tint numeroCasillaInt = Integer.parseInt(numeroCasilla);\r\n\t\t\t\tif(numeroCasillaInt > sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona() || numeroCasillaInt < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog( this, \"El numero ingresado no es valido. Debe ser un valor entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog( this, \"Debe ingresar un valor numerico entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void ingresarNumero() {\n do {\r\n System.out.print(\"\\nIngrese un numero entre 0 y 100000: \");\r\n numero = teclado.nextInt();\r\n if (numero < 0 || numero > 100000){\r\n System.out.println(\"Error, rango invalido. Intentelo de nuevo.\");\r\n }\r\n } while(numero < 0 || numero > 100000);\r\n contarDigitos(numero); //el numero ingresado se manda como parametro al metodo\r\n menu();\r\n }", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public static void main(String[] args) {\nSystem.out.println(\"introduce un numero\");\r\nScanner entrada = new Scanner(System.in);\r\nint num = entrada.nextInt();\r\n\r\nboolean esPrimo = true; \r\nfor (int i=2;i<num;i++){\r\n\tif (num%i==0){\r\n\t\tesPrimo = false;\r\n\t}\r\n}\r\n\r\nif (esPrimo){\r\n\tSystem.out.println(\"El número es primo\");\r\n}else{\r\n\tSystem.out.println(\"El número no es primo\");\r\n}\r\n\t}", "public static boolean esPrimo(int numero) {\n\t\tint contador = 2;\n\t\tboolean primo = true;\n\t\twhile ((primo) && (contador != numero)) {\n\t\t\tif (numero % contador == 0)\n\t\t\t\tprimo = false;\n\t\t\tcontador++;\n\t\t}\n\t\treturn primo;\n\t}", "public void setNumeroParcelas(int numeroParcelas) {\n this.numeroParcelas = numeroParcelas;\n }", "public static String switchNumeriPosizioni(int numero, String pariOrDispari) {\n\t\tString valoreCorrispondente = \"\";\n\t\tswitch (numero) {\n\t\tcase 0:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"0\";\n\t\t\t} else valoreCorrispondente = \"1\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"1\";\n\t\t\t} else valoreCorrispondente = \"0\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"2\";\n\t\t\t} else valoreCorrispondente = \"5\";\n\t\t\tbreak;\n\t\tcase 3:\t\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"3\";\n\t\t\t} else valoreCorrispondente = \"7\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"4\";\n\t\t\t} else valoreCorrispondente = \"9\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"5\";\n\t\t\t} else valoreCorrispondente = \"13\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"6\";\n\t\t\t} else valoreCorrispondente = \"15\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"7\";\n\t\t\t} else valoreCorrispondente = \"17\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"8\";\n\t\t\t} else valoreCorrispondente = \"19\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"9\";\n\t\t\t} else valoreCorrispondente = \"21\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn valoreCorrispondente;\n\t}", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "@Test\n public void parseNumber_returnsSortCommand() {\n assertParseSuccess(PARAM_NUMBER);\n }", "public boolean isSetNumber() {\n return (this.number != null ? this.number.isSetValue() : false);\n }", "private boolean isNumberAhead() {\r\n\t\treturn Character.isDigit(expression[currentIndex]);\r\n\t}", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean validateVerticesNumber(int verticesNumber) {\n return verticesNumber < 1;\n }", "boolean hasNum1();", "private boolean isNumerico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isSetFromNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMNUMBER$2) != 0;\n }\n }", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "private boolean isResultadoDadoValido(int resultadoDado) throws Exception {\n if ((resultadoDado > 6) || (resultadoDado < 1)) {\n throw new Exception(\"Invalid die result\");\n }\n return true;\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 }", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "boolean isNumber(Formula pTt);", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "private boolean hasNumberThreshold() {\r\n return entity.getActualNumber() < entity.getTheoreticalNumber();\r\n }", "@Override\n\tpublic boolean number()\n\t{\n\t\treturn true;\n\t}", "public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }", "public boolean isValid(int number)", "public int pedirNIF(){\n int NIF = 0;\n boolean validado = false;\n do{\n System.out.println(\"Introduce la NIF:\");\n try {\n NIF = Integer.parseInt(lector.nextLine());\n validado = true;\n\n if(NIF <= 0){\n validado = false;\n System.out.println(\"El NIF no puede ser un numero negativo\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Por favor, introduce un numero.\");\n }\n\n }while(!validado);\n return NIF;\n }", "protected boolean puedeDisparar(int tamanoBala) {\n return municion >= tamanoBala;\n }", "public static boolean isNumeric(String value) {\n // Procedimiento para monitorear e informar sobre la excepcion\n try {\n //Se realiza asignacion de dato numerico\n Float.parseFloat(value);\n return true;\n\n }\n //Mostrar mensaje de error\n catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null,Constantes.TXT_Msg_Error,\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n\n return false;\n\n }\n\n }", "private boolean isThereSuchPage (int number) {\n\t\tif (number > 0 && number <= this.getPages().length) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"There isn't such page!\");\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }", "public static void afficherFactureParNumero() {\r\n int numeroFacture = checkInt();\r\n Facture.afficherFacture(numeroFacture);\r\n }", "public static boolean menosONo(){\n Scanner cifra = new Scanner(System.in);\n System.out.println(\"Задание №6. Введите любое число\");\n int number = cifra.nextInt();\n if (number < 0){\n System.out.println(\"Вы ввели отрицательное число.\");\n return true;\n }else\n System.out.println(\"Вы ввели положительное число.\");\n return false;\n }", "boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean isPrime(int myNumber) {\n for (int i = 2; i < myNumber/2; i++) {\n if (myNumber % i == 0) {\n System.out.println(myNumber + \" can be divided by \" + i);\n return false;\n }\n }\n return true;\n }", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }", "public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }", "public static boolean numbersCheck(String num)\r\n\t{\r\n\t\treturn num.matches(\"[0-9]+\");\r\n\t}", "public abstract boolean isNumeric();", "public boolean isNumeric(String cadena) {\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException nfe) {\r\n return false;\r\n }\r\n }", "public PrimosTest(Integer inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "public boolean isSetNumber() {\n return EncodingUtils.testBit(__isset_bitfield, __NUMBER_ISSET_ID);\n }", "public boolean isNumber(InputStream in) {\n boolean result = false;\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {\n int number = Integer.parseInt(reader.readLine());\n\n if (number % 2 == 0) {\n result = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public boolean validarLong(String numeroLong){\n boolean isLong = true;\n try {\n long num = Long.valueOf(numeroLong);\n } catch (NumberFormatException e) {\n isLong = false;\n } \n return isLong;\n }", "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 }", "private String isValid(String number)\n {\n\tif(number.matches(\"\\\\d+\")) return number;\n\treturn null;\n }", "private static boolean isNumber( char i ) {\n\t\tif ( Character.isDigit(i) ) return true; \n\t\tthrow new IllegalArgumentException(\"The weight of the route should be a number, now it's '\"+ i +\"'\");\n\t}", "private boolean isNumericoConFraccion(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tcase '.':\r\n\t\t\treturn dotCountValidate();\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isNumber(String in) \n\t{\n\t\ttry \n\t\t{\n\t\t\tInteger.parseInt(in);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.7879207", "0.7653526", "0.7287122", "0.68556035", "0.66749454", "0.6615559", "0.6608068", "0.6432769", "0.64250696", "0.63381946", "0.6314063", "0.6274899", "0.61918795", "0.6181443", "0.6149297", "0.6093655", "0.6080142", "0.60471165", "0.60114396", "0.5986755", "0.5986755", "0.5986755", "0.5917543", "0.5916661", "0.5891465", "0.5859138", "0.5838601", "0.58273554", "0.5826192", "0.58216375", "0.5809685", "0.58051085", "0.5754991", "0.57323015", "0.57226324", "0.5719086", "0.57018185", "0.56998646", "0.5679191", "0.5667171", "0.5643475", "0.5639058", "0.5628255", "0.56253594", "0.56222636", "0.56149876", "0.56089795", "0.56065214", "0.5605178", "0.5597248", "0.5576483", "0.5571113", "0.55675757", "0.55644244", "0.55595315", "0.55388933", "0.5531476", "0.5500889", "0.5491188", "0.54827756", "0.5473518", "0.54455554", "0.54372", "0.54356134", "0.53917015", "0.53800756", "0.5374593", "0.5373608", "0.5373153", "0.5370664", "0.53635687", "0.53591585", "0.5354241", "0.5349363", "0.5346824", "0.5346537", "0.53381467", "0.5335434", "0.5330998", "0.53106856", "0.5304384", "0.5303433", "0.52981496", "0.5297761", "0.5295383", "0.52886856", "0.52854794", "0.5281241", "0.5275117", "0.5274054", "0.5264792", "0.5247909", "0.52428234", "0.5238562", "0.5235453", "0.52163136", "0.5207588", "0.5207524", "0.5204954", "0.51973486" ]
0.82872975
0
/ / Devuelve true si par_Number es un numero / / valor que se quiere saber si es un numero o no / verdadero en caso de que par_Number sea un numero, falso en otro caso
public static boolean IsNumber(double par_Number) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean IsNumber(int par_Numer) {\n return true;\n }", "public static boolean IsNumber(long par_Number) {\n return true;\n }", "public static boolean IsNumber(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^\\\\-?\\\\d*.?\\\\d+$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches() || IsInteger(par_Number);\n }", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public boolean hasNumber(){\n return (alg.hasNumber(input.getText().toString()));\n }", "boolean hasNumber();", "private boolean validar_numero(String numero) {\n boolean es_valido;\n es_valido = numero.charAt(0) != '0';\n return es_valido;\n }", "public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "static boolean blanco(int numero){\n\t\tboolean resultado; \n\t\tif (numero > 43){\n\t\t\tresultado = true;\n\t\t}else{\n\t\t\tresultado = false;\n\t\t}\n\t\treturn resultado;\t\n\t}", "public static boolean IsInteger(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^[\\\\d|\\\\-]\\\\d*$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches();\n\n }", "public static boolean verificarNumeros(String numero) {\n\t\ttry{\n\t\t\tInteger.parseInt(numero);\n\t\t\treturn true;\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t}", "public static void VerificarPar(){\n\t\tint numero;\n\t\tint resultado;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tresultado=(numero%2);\n\t\tif(resultado==0){\n\t\t\tSystem.out.println(\"Numero Par: \"+(numero*2));\n\t\t}else{\n\t\t\tSystem.out.println(\"Numero Impar: \"+(numero*3));\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "public default boolean hasNumber() {\n\t\treturn false;\n\t}", "private boolean numeroValido(int numero, int ren, int col){\n return verificaArea(numero,ren,col)&&verificaRenglon(numero,ren) && verificaColumna(numero,col);\n }", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "public boolean isSetNum() {\n return this.Num != null;\n }", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "public boolean validaNumero(int i, int j, int num) {\r\n\r\n return (comprovaFila(i, num) && comprovaColumna(j, num) && comprovaNumerosQuadrant(i - i % SRN, j - j % SRN, num));\r\n\r\n }", "private boolean isNumber(final String number) {\n try {\n Integer.parseInt(number);\n return true;\n } catch (Exception e) {\n LOGGER.error(\"Not a number \" + number, e);\n return false;\n }\n }", "public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "private boolean isNumber(String number){\n\t\ttry{\r\n\t\t\tFloat.parseFloat(number);\r\n\t\t}catch(Exception e){\r\n\t\t\treturn false;// if the user input is not number it throws flase\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "public boolean isNumber(String num)\t{\n\t\tfor(int i=0;i<13;i++)\t{\n\t\t\tif(Integer.parseInt(num)==i)\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "public boolean isSetNumPoliza() {\r\n return this.numPoliza != null;\r\n }", "private boolean checkForNumber(String field) {\n\n\t\tPattern p = Pattern.compile(\"[0-9].\");\n\t\tMatcher m = p.matcher(field);\n\n\t\treturn (m.find()) ? true : false;\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean isNumberValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_NUMBER);\n }", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public static boolean esPrimo (int num) {\n\t\tboolean primo = true;\n\t\tint i;\n\t\t\n\t\t// Bucle hasta la mitad - 1 de num (si no se ha podido dividir entre 2 los demas numeros despues de su mitad tampoco se podra\n\t\tfor (i = 2; i < (num / 2) && primo; i++) {\n\t\t\tif (num % i == 0) {\n\t\t\t\tprimo = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn primo;\n\t}", "public static boolean esPrimo(int numero) {\n int contador = 2;\n boolean primo = true;\n while ((primo) && (contador != numero)) {\n if (numero % contador == 0) {\n primo = false;\n }\n contador++;\n }\n\n return primo;\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "private static int isEntero(String palabra) {\n int resultado;//declaramos la variable a retornar\n\n try {\n Integer.parseInt(palabra);//convertimos la palabra a Integer\n resultado = 1;//Si no hay un error entonces es un numero y retornamos true\n } catch (NumberFormatException excepcion) {//de lo contrario es una palabra\n resultado = 0;\n }\n\n return resultado;//retornamos el valor\n }", "public void ingresar() \r\n\t{\r\n\r\n\t\tString numeroCasilla = JOptionPane.showInputDialog(this, \"Ingresar numero en la casilla \" + sudoku.darFilaActual() + \",\" +sudoku.darColumnaActual());\r\n\t\tif (numeroCasilla == null || numeroCasilla ==\"\")\r\n\t\t{}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\tint numeroCasillaInt = Integer.parseInt(numeroCasilla);\r\n\t\t\t\tif(numeroCasillaInt > sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona() || numeroCasillaInt < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog( this, \"El numero ingresado no es valido. Debe ser un valor entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog( this, \"Debe ingresar un valor numerico entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void ingresarNumero() {\n do {\r\n System.out.print(\"\\nIngrese un numero entre 0 y 100000: \");\r\n numero = teclado.nextInt();\r\n if (numero < 0 || numero > 100000){\r\n System.out.println(\"Error, rango invalido. Intentelo de nuevo.\");\r\n }\r\n } while(numero < 0 || numero > 100000);\r\n contarDigitos(numero); //el numero ingresado se manda como parametro al metodo\r\n menu();\r\n }", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public static void main(String[] args) {\nSystem.out.println(\"introduce un numero\");\r\nScanner entrada = new Scanner(System.in);\r\nint num = entrada.nextInt();\r\n\r\nboolean esPrimo = true; \r\nfor (int i=2;i<num;i++){\r\n\tif (num%i==0){\r\n\t\tesPrimo = false;\r\n\t}\r\n}\r\n\r\nif (esPrimo){\r\n\tSystem.out.println(\"El número es primo\");\r\n}else{\r\n\tSystem.out.println(\"El número no es primo\");\r\n}\r\n\t}", "public static boolean esPrimo(int numero) {\n\t\tint contador = 2;\n\t\tboolean primo = true;\n\t\twhile ((primo) && (contador != numero)) {\n\t\t\tif (numero % contador == 0)\n\t\t\t\tprimo = false;\n\t\t\tcontador++;\n\t\t}\n\t\treturn primo;\n\t}", "public void setNumeroParcelas(int numeroParcelas) {\n this.numeroParcelas = numeroParcelas;\n }", "public static String switchNumeriPosizioni(int numero, String pariOrDispari) {\n\t\tString valoreCorrispondente = \"\";\n\t\tswitch (numero) {\n\t\tcase 0:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"0\";\n\t\t\t} else valoreCorrispondente = \"1\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"1\";\n\t\t\t} else valoreCorrispondente = \"0\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"2\";\n\t\t\t} else valoreCorrispondente = \"5\";\n\t\t\tbreak;\n\t\tcase 3:\t\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"3\";\n\t\t\t} else valoreCorrispondente = \"7\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"4\";\n\t\t\t} else valoreCorrispondente = \"9\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"5\";\n\t\t\t} else valoreCorrispondente = \"13\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"6\";\n\t\t\t} else valoreCorrispondente = \"15\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"7\";\n\t\t\t} else valoreCorrispondente = \"17\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"8\";\n\t\t\t} else valoreCorrispondente = \"19\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"9\";\n\t\t\t} else valoreCorrispondente = \"21\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn valoreCorrispondente;\n\t}", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "@Test\n public void parseNumber_returnsSortCommand() {\n assertParseSuccess(PARAM_NUMBER);\n }", "public boolean isSetNumber() {\n return (this.number != null ? this.number.isSetValue() : false);\n }", "private boolean isNumberAhead() {\r\n\t\treturn Character.isDigit(expression[currentIndex]);\r\n\t}", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean validateVerticesNumber(int verticesNumber) {\n return verticesNumber < 1;\n }", "boolean hasNum1();", "private boolean isNumerico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isSetFromNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMNUMBER$2) != 0;\n }\n }", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "private boolean isResultadoDadoValido(int resultadoDado) throws Exception {\n if ((resultadoDado > 6) || (resultadoDado < 1)) {\n throw new Exception(\"Invalid die result\");\n }\n return true;\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 }", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "boolean isNumber(Formula pTt);", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "private boolean hasNumberThreshold() {\r\n return entity.getActualNumber() < entity.getTheoreticalNumber();\r\n }", "@Override\n\tpublic boolean number()\n\t{\n\t\treturn true;\n\t}", "public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }", "public boolean isValid(int number)", "protected boolean puedeDisparar(int tamanoBala) {\n return municion >= tamanoBala;\n }", "public int pedirNIF(){\n int NIF = 0;\n boolean validado = false;\n do{\n System.out.println(\"Introduce la NIF:\");\n try {\n NIF = Integer.parseInt(lector.nextLine());\n validado = true;\n\n if(NIF <= 0){\n validado = false;\n System.out.println(\"El NIF no puede ser un numero negativo\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Por favor, introduce un numero.\");\n }\n\n }while(!validado);\n return NIF;\n }", "public static boolean isNumeric(String value) {\n // Procedimiento para monitorear e informar sobre la excepcion\n try {\n //Se realiza asignacion de dato numerico\n Float.parseFloat(value);\n return true;\n\n }\n //Mostrar mensaje de error\n catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null,Constantes.TXT_Msg_Error,\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n\n return false;\n\n }\n\n }", "private boolean isThereSuchPage (int number) {\n\t\tif (number > 0 && number <= this.getPages().length) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"There isn't such page!\");\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }", "public static void afficherFactureParNumero() {\r\n int numeroFacture = checkInt();\r\n Facture.afficherFacture(numeroFacture);\r\n }", "boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean menosONo(){\n Scanner cifra = new Scanner(System.in);\n System.out.println(\"Задание №6. Введите любое число\");\n int number = cifra.nextInt();\n if (number < 0){\n System.out.println(\"Вы ввели отрицательное число.\");\n return true;\n }else\n System.out.println(\"Вы ввели положительное число.\");\n return false;\n }", "public boolean isPrime(int myNumber) {\n for (int i = 2; i < myNumber/2; i++) {\n if (myNumber % i == 0) {\n System.out.println(myNumber + \" can be divided by \" + i);\n return false;\n }\n }\n return true;\n }", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }", "public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }", "public static boolean numbersCheck(String num)\r\n\t{\r\n\t\treturn num.matches(\"[0-9]+\");\r\n\t}", "public abstract boolean isNumeric();", "public boolean isNumeric(String cadena) {\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException nfe) {\r\n return false;\r\n }\r\n }", "public PrimosTest(Integer inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "public boolean isSetNumber() {\n return EncodingUtils.testBit(__isset_bitfield, __NUMBER_ISSET_ID);\n }", "public boolean isNumber(InputStream in) {\n boolean result = false;\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {\n int number = Integer.parseInt(reader.readLine());\n\n if (number % 2 == 0) {\n result = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public boolean validarLong(String numeroLong){\n boolean isLong = true;\n try {\n long num = Long.valueOf(numeroLong);\n } catch (NumberFormatException e) {\n isLong = false;\n } \n return isLong;\n }", "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 }", "private String isValid(String number)\n {\n\tif(number.matches(\"\\\\d+\")) return number;\n\treturn null;\n }", "private static boolean isNumber( char i ) {\n\t\tif ( Character.isDigit(i) ) return true; \n\t\tthrow new IllegalArgumentException(\"The weight of the route should be a number, now it's '\"+ i +\"'\");\n\t}", "private boolean isNumericoConFraccion(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tcase '.':\r\n\t\t\treturn dotCountValidate();\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isNumber(String in) \n\t{\n\t\ttry \n\t\t{\n\t\t\tInteger.parseInt(in);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.8286935", "0.7879034", "0.728787", "0.6854633", "0.6673861", "0.6615151", "0.66075814", "0.64320314", "0.64257544", "0.63381875", "0.63130546", "0.62739134", "0.61902916", "0.61823404", "0.6149289", "0.6092371", "0.60801554", "0.6045983", "0.60103834", "0.5986331", "0.5986331", "0.5986331", "0.59158456", "0.59155804", "0.58911014", "0.5859865", "0.5838843", "0.58280796", "0.5826581", "0.5820492", "0.5809669", "0.580502", "0.575201", "0.5731982", "0.57225096", "0.57180476", "0.5701773", "0.56984234", "0.5679097", "0.56660193", "0.5642291", "0.5639538", "0.5628244", "0.5624064", "0.5621343", "0.5614035", "0.5608678", "0.5605525", "0.5603134", "0.5596235", "0.55757785", "0.5570486", "0.55681175", "0.5565574", "0.5557577", "0.55402696", "0.5531355", "0.55007637", "0.5492165", "0.54823494", "0.54737526", "0.5444939", "0.54370034", "0.5435814", "0.539108", "0.5379913", "0.5374098", "0.53734094", "0.53720486", "0.5370933", "0.5362735", "0.53582305", "0.5354545", "0.53489834", "0.53460747", "0.5345139", "0.5338187", "0.53358006", "0.5331545", "0.5310057", "0.53030074", "0.5302292", "0.5297728", "0.5297073", "0.5295085", "0.5287028", "0.5285973", "0.5282019", "0.52743316", "0.52741504", "0.5263563", "0.5246882", "0.5242372", "0.52384853", "0.5235459", "0.52173364", "0.5208097", "0.52076703", "0.52048755", "0.5197031" ]
0.76530176
2
/ / Devuelve true si par_Number es un numero / / valor que se quiere saber si es un numero o no / verdadero en caso de que par_Number sea un numero, falso en otro caso
public static boolean IsNumber(long par_Number) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean IsNumber(int par_Numer) {\n return true;\n }", "public static boolean IsNumber(double par_Number) {\n return true;\n }", "public static boolean IsNumber(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^\\\\-?\\\\d*.?\\\\d+$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches() || IsInteger(par_Number);\n }", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public boolean hasNumber(){\n return (alg.hasNumber(input.getText().toString()));\n }", "boolean hasNumber();", "private boolean validar_numero(String numero) {\n boolean es_valido;\n es_valido = numero.charAt(0) != '0';\n return es_valido;\n }", "public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "static boolean blanco(int numero){\n\t\tboolean resultado; \n\t\tif (numero > 43){\n\t\t\tresultado = true;\n\t\t}else{\n\t\t\tresultado = false;\n\t\t}\n\t\treturn resultado;\t\n\t}", "public static boolean IsInteger(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^[\\\\d|\\\\-]\\\\d*$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches();\n\n }", "public static boolean verificarNumeros(String numero) {\n\t\ttry{\n\t\t\tInteger.parseInt(numero);\n\t\t\treturn true;\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t}", "public static void VerificarPar(){\n\t\tint numero;\n\t\tint resultado;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tresultado=(numero%2);\n\t\tif(resultado==0){\n\t\t\tSystem.out.println(\"Numero Par: \"+(numero*2));\n\t\t}else{\n\t\t\tSystem.out.println(\"Numero Impar: \"+(numero*3));\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "public default boolean hasNumber() {\n\t\treturn false;\n\t}", "private boolean numeroValido(int numero, int ren, int col){\n return verificaArea(numero,ren,col)&&verificaRenglon(numero,ren) && verificaColumna(numero,col);\n }", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "public boolean isSetNum() {\n return this.Num != null;\n }", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "public boolean validaNumero(int i, int j, int num) {\r\n\r\n return (comprovaFila(i, num) && comprovaColumna(j, num) && comprovaNumerosQuadrant(i - i % SRN, j - j % SRN, num));\r\n\r\n }", "private boolean isNumber(final String number) {\n try {\n Integer.parseInt(number);\n return true;\n } catch (Exception e) {\n LOGGER.error(\"Not a number \" + number, e);\n return false;\n }\n }", "public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "private boolean isNumber(String number){\n\t\ttry{\r\n\t\t\tFloat.parseFloat(number);\r\n\t\t}catch(Exception e){\r\n\t\t\treturn false;// if the user input is not number it throws flase\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "public boolean isNumber(String num)\t{\n\t\tfor(int i=0;i<13;i++)\t{\n\t\t\tif(Integer.parseInt(num)==i)\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "public boolean isSetNumPoliza() {\r\n return this.numPoliza != null;\r\n }", "private boolean checkForNumber(String field) {\n\n\t\tPattern p = Pattern.compile(\"[0-9].\");\n\t\tMatcher m = p.matcher(field);\n\n\t\treturn (m.find()) ? true : false;\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean isNumberValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_NUMBER);\n }", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public static boolean esPrimo (int num) {\n\t\tboolean primo = true;\n\t\tint i;\n\t\t\n\t\t// Bucle hasta la mitad - 1 de num (si no se ha podido dividir entre 2 los demas numeros despues de su mitad tampoco se podra\n\t\tfor (i = 2; i < (num / 2) && primo; i++) {\n\t\t\tif (num % i == 0) {\n\t\t\t\tprimo = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn primo;\n\t}", "public static boolean esPrimo(int numero) {\n int contador = 2;\n boolean primo = true;\n while ((primo) && (contador != numero)) {\n if (numero % contador == 0) {\n primo = false;\n }\n contador++;\n }\n\n return primo;\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "private static int isEntero(String palabra) {\n int resultado;//declaramos la variable a retornar\n\n try {\n Integer.parseInt(palabra);//convertimos la palabra a Integer\n resultado = 1;//Si no hay un error entonces es un numero y retornamos true\n } catch (NumberFormatException excepcion) {//de lo contrario es una palabra\n resultado = 0;\n }\n\n return resultado;//retornamos el valor\n }", "public void ingresar() \r\n\t{\r\n\r\n\t\tString numeroCasilla = JOptionPane.showInputDialog(this, \"Ingresar numero en la casilla \" + sudoku.darFilaActual() + \",\" +sudoku.darColumnaActual());\r\n\t\tif (numeroCasilla == null || numeroCasilla ==\"\")\r\n\t\t{}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\tint numeroCasillaInt = Integer.parseInt(numeroCasilla);\r\n\t\t\t\tif(numeroCasillaInt > sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona() || numeroCasillaInt < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog( this, \"El numero ingresado no es valido. Debe ser un valor entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog( this, \"Debe ingresar un valor numerico entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void ingresarNumero() {\n do {\r\n System.out.print(\"\\nIngrese un numero entre 0 y 100000: \");\r\n numero = teclado.nextInt();\r\n if (numero < 0 || numero > 100000){\r\n System.out.println(\"Error, rango invalido. Intentelo de nuevo.\");\r\n }\r\n } while(numero < 0 || numero > 100000);\r\n contarDigitos(numero); //el numero ingresado se manda como parametro al metodo\r\n menu();\r\n }", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public static void main(String[] args) {\nSystem.out.println(\"introduce un numero\");\r\nScanner entrada = new Scanner(System.in);\r\nint num = entrada.nextInt();\r\n\r\nboolean esPrimo = true; \r\nfor (int i=2;i<num;i++){\r\n\tif (num%i==0){\r\n\t\tesPrimo = false;\r\n\t}\r\n}\r\n\r\nif (esPrimo){\r\n\tSystem.out.println(\"El número es primo\");\r\n}else{\r\n\tSystem.out.println(\"El número no es primo\");\r\n}\r\n\t}", "public static boolean esPrimo(int numero) {\n\t\tint contador = 2;\n\t\tboolean primo = true;\n\t\twhile ((primo) && (contador != numero)) {\n\t\t\tif (numero % contador == 0)\n\t\t\t\tprimo = false;\n\t\t\tcontador++;\n\t\t}\n\t\treturn primo;\n\t}", "public void setNumeroParcelas(int numeroParcelas) {\n this.numeroParcelas = numeroParcelas;\n }", "public static String switchNumeriPosizioni(int numero, String pariOrDispari) {\n\t\tString valoreCorrispondente = \"\";\n\t\tswitch (numero) {\n\t\tcase 0:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"0\";\n\t\t\t} else valoreCorrispondente = \"1\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"1\";\n\t\t\t} else valoreCorrispondente = \"0\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"2\";\n\t\t\t} else valoreCorrispondente = \"5\";\n\t\t\tbreak;\n\t\tcase 3:\t\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"3\";\n\t\t\t} else valoreCorrispondente = \"7\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"4\";\n\t\t\t} else valoreCorrispondente = \"9\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"5\";\n\t\t\t} else valoreCorrispondente = \"13\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"6\";\n\t\t\t} else valoreCorrispondente = \"15\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"7\";\n\t\t\t} else valoreCorrispondente = \"17\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"8\";\n\t\t\t} else valoreCorrispondente = \"19\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"9\";\n\t\t\t} else valoreCorrispondente = \"21\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn valoreCorrispondente;\n\t}", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "@Test\n public void parseNumber_returnsSortCommand() {\n assertParseSuccess(PARAM_NUMBER);\n }", "public boolean isSetNumber() {\n return (this.number != null ? this.number.isSetValue() : false);\n }", "private boolean isNumberAhead() {\r\n\t\treturn Character.isDigit(expression[currentIndex]);\r\n\t}", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean validateVerticesNumber(int verticesNumber) {\n return verticesNumber < 1;\n }", "boolean hasNum1();", "private boolean isNumerico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isSetFromNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMNUMBER$2) != 0;\n }\n }", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "private boolean isResultadoDadoValido(int resultadoDado) throws Exception {\n if ((resultadoDado > 6) || (resultadoDado < 1)) {\n throw new Exception(\"Invalid die result\");\n }\n return true;\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 }", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "boolean isNumber(Formula pTt);", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "private boolean hasNumberThreshold() {\r\n return entity.getActualNumber() < entity.getTheoreticalNumber();\r\n }", "@Override\n\tpublic boolean number()\n\t{\n\t\treturn true;\n\t}", "public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }", "public boolean isValid(int number)", "protected boolean puedeDisparar(int tamanoBala) {\n return municion >= tamanoBala;\n }", "public int pedirNIF(){\n int NIF = 0;\n boolean validado = false;\n do{\n System.out.println(\"Introduce la NIF:\");\n try {\n NIF = Integer.parseInt(lector.nextLine());\n validado = true;\n\n if(NIF <= 0){\n validado = false;\n System.out.println(\"El NIF no puede ser un numero negativo\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Por favor, introduce un numero.\");\n }\n\n }while(!validado);\n return NIF;\n }", "public static boolean isNumeric(String value) {\n // Procedimiento para monitorear e informar sobre la excepcion\n try {\n //Se realiza asignacion de dato numerico\n Float.parseFloat(value);\n return true;\n\n }\n //Mostrar mensaje de error\n catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null,Constantes.TXT_Msg_Error,\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n\n return false;\n\n }\n\n }", "private boolean isThereSuchPage (int number) {\n\t\tif (number > 0 && number <= this.getPages().length) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"There isn't such page!\");\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }", "public static void afficherFactureParNumero() {\r\n int numeroFacture = checkInt();\r\n Facture.afficherFacture(numeroFacture);\r\n }", "public static boolean menosONo(){\n Scanner cifra = new Scanner(System.in);\n System.out.println(\"Задание №6. Введите любое число\");\n int number = cifra.nextInt();\n if (number < 0){\n System.out.println(\"Вы ввели отрицательное число.\");\n return true;\n }else\n System.out.println(\"Вы ввели положительное число.\");\n return false;\n }", "boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isPrime(int myNumber) {\n for (int i = 2; i < myNumber/2; i++) {\n if (myNumber % i == 0) {\n System.out.println(myNumber + \" can be divided by \" + i);\n return false;\n }\n }\n return true;\n }", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }", "public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }", "public static boolean numbersCheck(String num)\r\n\t{\r\n\t\treturn num.matches(\"[0-9]+\");\r\n\t}", "public abstract boolean isNumeric();", "public boolean isNumeric(String cadena) {\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException nfe) {\r\n return false;\r\n }\r\n }", "public PrimosTest(Integer inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "public boolean isSetNumber() {\n return EncodingUtils.testBit(__isset_bitfield, __NUMBER_ISSET_ID);\n }", "public boolean isNumber(InputStream in) {\n boolean result = false;\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {\n int number = Integer.parseInt(reader.readLine());\n\n if (number % 2 == 0) {\n result = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public boolean validarLong(String numeroLong){\n boolean isLong = true;\n try {\n long num = Long.valueOf(numeroLong);\n } catch (NumberFormatException e) {\n isLong = false;\n } \n return isLong;\n }", "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 }", "private String isValid(String number)\n {\n\tif(number.matches(\"\\\\d+\")) return number;\n\treturn null;\n }", "private static boolean isNumber( char i ) {\n\t\tif ( Character.isDigit(i) ) return true; \n\t\tthrow new IllegalArgumentException(\"The weight of the route should be a number, now it's '\"+ i +\"'\");\n\t}", "private boolean isNumericoConFraccion(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tcase '.':\r\n\t\t\treturn dotCountValidate();\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isNumber(String in) \n\t{\n\t\ttry \n\t\t{\n\t\t\tInteger.parseInt(in);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.82883394", "0.7654633", "0.7288848", "0.6855781", "0.6675215", "0.66162974", "0.6609209", "0.6432674", "0.6425818", "0.63385946", "0.63136816", "0.62750816", "0.61913323", "0.6183558", "0.6149649", "0.6093387", "0.6080585", "0.60477614", "0.6010895", "0.59878284", "0.59878284", "0.59878284", "0.5917597", "0.59167874", "0.58918667", "0.58597076", "0.5839511", "0.5827686", "0.58265316", "0.58216447", "0.58103096", "0.5805976", "0.57536596", "0.5733204", "0.5722001", "0.57190114", "0.5702574", "0.57004285", "0.5679869", "0.5667216", "0.56435466", "0.5639345", "0.5628434", "0.56248045", "0.5622026", "0.5615976", "0.560837", "0.5607451", "0.56046695", "0.559744", "0.5574868", "0.5569239", "0.5569087", "0.55643547", "0.55593926", "0.5538908", "0.5531438", "0.55017954", "0.54916906", "0.5483719", "0.54746276", "0.544636", "0.5437777", "0.54359925", "0.53925586", "0.53794855", "0.53752345", "0.53740287", "0.5373672", "0.53708357", "0.53639925", "0.53595996", "0.53547204", "0.5350318", "0.5346058", "0.53460526", "0.5338359", "0.5335489", "0.5331837", "0.53107244", "0.5304419", "0.53041124", "0.5298821", "0.5297085", "0.5295763", "0.52874917", "0.528477", "0.52825034", "0.5275661", "0.52743983", "0.52650195", "0.52484846", "0.5243006", "0.5238863", "0.5234945", "0.5216298", "0.5208316", "0.5208199", "0.5205749", "0.51975024" ]
0.788069
1
/ / Devuelve true si par_Number es un numero / / valor que se quiere saber si es un numero o no / verdadero en caso de que par_Number sea un numero, falso en otro caso
public static boolean IsNumber(String par_Number) { java.util.regex.Pattern p = java.util.regex.Pattern.compile("^\\-?\\d*.?\\d+$"); java.util.regex.Matcher m = p.matcher(par_Number); return m.matches() || IsInteger(par_Number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean IsNumber(int par_Numer) {\n return true;\n }", "public static boolean IsNumber(long par_Number) {\n return true;\n }", "public static boolean IsNumber(double par_Number) {\n return true;\n }", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "public boolean hasNumber(){\n return (alg.hasNumber(input.getText().toString()));\n }", "boolean hasNumber();", "private boolean validar_numero(String numero) {\n boolean es_valido;\n es_valido = numero.charAt(0) != '0';\n return es_valido;\n }", "public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "static boolean blanco(int numero){\n\t\tboolean resultado; \n\t\tif (numero > 43){\n\t\t\tresultado = true;\n\t\t}else{\n\t\t\tresultado = false;\n\t\t}\n\t\treturn resultado;\t\n\t}", "public static boolean IsInteger(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^[\\\\d|\\\\-]\\\\d*$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches();\n\n }", "public static boolean verificarNumeros(String numero) {\n\t\ttry{\n\t\t\tInteger.parseInt(numero);\n\t\t\treturn true;\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t}", "public static void VerificarPar(){\n\t\tint numero;\n\t\tint resultado;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tresultado=(numero%2);\n\t\tif(resultado==0){\n\t\t\tSystem.out.println(\"Numero Par: \"+(numero*2));\n\t\t}else{\n\t\t\tSystem.out.println(\"Numero Impar: \"+(numero*3));\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "public default boolean hasNumber() {\n\t\treturn false;\n\t}", "private boolean numeroValido(int numero, int ren, int col){\n return verificaArea(numero,ren,col)&&verificaRenglon(numero,ren) && verificaColumna(numero,col);\n }", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "public boolean isSetNum() {\n return this.Num != null;\n }", "public boolean validaNumero(int i, int j, int num) {\r\n\r\n return (comprovaFila(i, num) && comprovaColumna(j, num) && comprovaNumerosQuadrant(i - i % SRN, j - j % SRN, num));\r\n\r\n }", "private boolean isNumber(final String number) {\n try {\n Integer.parseInt(number);\n return true;\n } catch (Exception e) {\n LOGGER.error(\"Not a number \" + number, e);\n return false;\n }\n }", "public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "private boolean isNumber(String number){\n\t\ttry{\r\n\t\t\tFloat.parseFloat(number);\r\n\t\t}catch(Exception e){\r\n\t\t\treturn false;// if the user input is not number it throws flase\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "public boolean isNumber(String num)\t{\n\t\tfor(int i=0;i<13;i++)\t{\n\t\t\tif(Integer.parseInt(num)==i)\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "public boolean isSetNumPoliza() {\r\n return this.numPoliza != null;\r\n }", "private boolean checkForNumber(String field) {\n\n\t\tPattern p = Pattern.compile(\"[0-9].\");\n\t\tMatcher m = p.matcher(field);\n\n\t\treturn (m.find()) ? true : false;\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean isNumberValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_NUMBER);\n }", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public static boolean esPrimo (int num) {\n\t\tboolean primo = true;\n\t\tint i;\n\t\t\n\t\t// Bucle hasta la mitad - 1 de num (si no se ha podido dividir entre 2 los demas numeros despues de su mitad tampoco se podra\n\t\tfor (i = 2; i < (num / 2) && primo; i++) {\n\t\t\tif (num % i == 0) {\n\t\t\t\tprimo = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn primo;\n\t}", "public static boolean esPrimo(int numero) {\n int contador = 2;\n boolean primo = true;\n while ((primo) && (contador != numero)) {\n if (numero % contador == 0) {\n primo = false;\n }\n contador++;\n }\n\n return primo;\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "private static int isEntero(String palabra) {\n int resultado;//declaramos la variable a retornar\n\n try {\n Integer.parseInt(palabra);//convertimos la palabra a Integer\n resultado = 1;//Si no hay un error entonces es un numero y retornamos true\n } catch (NumberFormatException excepcion) {//de lo contrario es una palabra\n resultado = 0;\n }\n\n return resultado;//retornamos el valor\n }", "public void ingresar() \r\n\t{\r\n\r\n\t\tString numeroCasilla = JOptionPane.showInputDialog(this, \"Ingresar numero en la casilla \" + sudoku.darFilaActual() + \",\" +sudoku.darColumnaActual());\r\n\t\tif (numeroCasilla == null || numeroCasilla ==\"\")\r\n\t\t{}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\tint numeroCasillaInt = Integer.parseInt(numeroCasilla);\r\n\t\t\t\tif(numeroCasillaInt > sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona() || numeroCasillaInt < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog( this, \"El numero ingresado no es valido. Debe ser un valor entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog( this, \"Debe ingresar un valor numerico entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void ingresarNumero() {\n do {\r\n System.out.print(\"\\nIngrese un numero entre 0 y 100000: \");\r\n numero = teclado.nextInt();\r\n if (numero < 0 || numero > 100000){\r\n System.out.println(\"Error, rango invalido. Intentelo de nuevo.\");\r\n }\r\n } while(numero < 0 || numero > 100000);\r\n contarDigitos(numero); //el numero ingresado se manda como parametro al metodo\r\n menu();\r\n }", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public static void main(String[] args) {\nSystem.out.println(\"introduce un numero\");\r\nScanner entrada = new Scanner(System.in);\r\nint num = entrada.nextInt();\r\n\r\nboolean esPrimo = true; \r\nfor (int i=2;i<num;i++){\r\n\tif (num%i==0){\r\n\t\tesPrimo = false;\r\n\t}\r\n}\r\n\r\nif (esPrimo){\r\n\tSystem.out.println(\"El número es primo\");\r\n}else{\r\n\tSystem.out.println(\"El número no es primo\");\r\n}\r\n\t}", "public static boolean esPrimo(int numero) {\n\t\tint contador = 2;\n\t\tboolean primo = true;\n\t\twhile ((primo) && (contador != numero)) {\n\t\t\tif (numero % contador == 0)\n\t\t\t\tprimo = false;\n\t\t\tcontador++;\n\t\t}\n\t\treturn primo;\n\t}", "public void setNumeroParcelas(int numeroParcelas) {\n this.numeroParcelas = numeroParcelas;\n }", "public static String switchNumeriPosizioni(int numero, String pariOrDispari) {\n\t\tString valoreCorrispondente = \"\";\n\t\tswitch (numero) {\n\t\tcase 0:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"0\";\n\t\t\t} else valoreCorrispondente = \"1\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"1\";\n\t\t\t} else valoreCorrispondente = \"0\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"2\";\n\t\t\t} else valoreCorrispondente = \"5\";\n\t\t\tbreak;\n\t\tcase 3:\t\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"3\";\n\t\t\t} else valoreCorrispondente = \"7\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"4\";\n\t\t\t} else valoreCorrispondente = \"9\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"5\";\n\t\t\t} else valoreCorrispondente = \"13\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"6\";\n\t\t\t} else valoreCorrispondente = \"15\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"7\";\n\t\t\t} else valoreCorrispondente = \"17\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"8\";\n\t\t\t} else valoreCorrispondente = \"19\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"9\";\n\t\t\t} else valoreCorrispondente = \"21\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn valoreCorrispondente;\n\t}", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "@Test\n public void parseNumber_returnsSortCommand() {\n assertParseSuccess(PARAM_NUMBER);\n }", "public boolean isSetNumber() {\n return (this.number != null ? this.number.isSetValue() : false);\n }", "private boolean isNumberAhead() {\r\n\t\treturn Character.isDigit(expression[currentIndex]);\r\n\t}", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean validateVerticesNumber(int verticesNumber) {\n return verticesNumber < 1;\n }", "boolean hasNum1();", "private boolean isNumerico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isSetFromNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMNUMBER$2) != 0;\n }\n }", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "private boolean isResultadoDadoValido(int resultadoDado) throws Exception {\n if ((resultadoDado > 6) || (resultadoDado < 1)) {\n throw new Exception(\"Invalid die result\");\n }\n return true;\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 }", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "boolean isNumber(Formula pTt);", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "private boolean hasNumberThreshold() {\r\n return entity.getActualNumber() < entity.getTheoreticalNumber();\r\n }", "@Override\n\tpublic boolean number()\n\t{\n\t\treturn true;\n\t}", "public static boolean isNumeric(String cadena){ \r\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException e){\t\r\n System.out.println(e.getMessage());\r\n return false;\r\n }\r\n }", "public boolean isValid(int number)", "public int pedirNIF(){\n int NIF = 0;\n boolean validado = false;\n do{\n System.out.println(\"Introduce la NIF:\");\n try {\n NIF = Integer.parseInt(lector.nextLine());\n validado = true;\n\n if(NIF <= 0){\n validado = false;\n System.out.println(\"El NIF no puede ser un numero negativo\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Por favor, introduce un numero.\");\n }\n\n }while(!validado);\n return NIF;\n }", "protected boolean puedeDisparar(int tamanoBala) {\n return municion >= tamanoBala;\n }", "public static boolean isNumeric(String value) {\n // Procedimiento para monitorear e informar sobre la excepcion\n try {\n //Se realiza asignacion de dato numerico\n Float.parseFloat(value);\n return true;\n\n }\n //Mostrar mensaje de error\n catch(NumberFormatException e){\n JOptionPane.showMessageDialog(null,Constantes.TXT_Msg_Error,\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n\n return false;\n\n }\n\n }", "private boolean isThereSuchPage (int number) {\n\t\tif (number > 0 && number <= this.getPages().length) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"There isn't such page!\");\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isNumber( String test ) {\n\treturn test.matches(\"\\\\d+\");\n }", "public static void afficherFactureParNumero() {\r\n int numeroFacture = checkInt();\r\n Facture.afficherFacture(numeroFacture);\r\n }", "public static boolean menosONo(){\n Scanner cifra = new Scanner(System.in);\n System.out.println(\"Задание №6. Введите любое число\");\n int number = cifra.nextInt();\n if (number < 0){\n System.out.println(\"Вы ввели отрицательное число.\");\n return true;\n }else\n System.out.println(\"Вы ввели положительное число.\");\n return false;\n }", "boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isPrime(int myNumber) {\n for (int i = 2; i < myNumber/2; i++) {\n if (myNumber % i == 0) {\n System.out.println(myNumber + \" can be divided by \" + i);\n return false;\n }\n }\n return true;\n }", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }", "private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }", "public static boolean numbersCheck(String num)\r\n\t{\r\n\t\treturn num.matches(\"[0-9]+\");\r\n\t}", "public abstract boolean isNumeric();", "public boolean isNumeric(String cadena) {\n try {\r\n Integer.parseInt(cadena);\r\n return true;\r\n } catch (NumberFormatException nfe) {\r\n return false;\r\n }\r\n }", "public PrimosTest(Integer inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "public boolean isSetNumber() {\n return EncodingUtils.testBit(__isset_bitfield, __NUMBER_ISSET_ID);\n }", "public boolean isNumber(InputStream in) {\n boolean result = false;\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {\n int number = Integer.parseInt(reader.readLine());\n\n if (number % 2 == 0) {\n result = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }", "public boolean validarLong(String numeroLong){\n boolean isLong = true;\n try {\n long num = Long.valueOf(numeroLong);\n } catch (NumberFormatException e) {\n isLong = false;\n } \n return isLong;\n }", "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 }", "private String isValid(String number)\n {\n\tif(number.matches(\"\\\\d+\")) return number;\n\treturn null;\n }", "private static boolean isNumber( char i ) {\n\t\tif ( Character.isDigit(i) ) return true; \n\t\tthrow new IllegalArgumentException(\"The weight of the route should be a number, now it's '\"+ i +\"'\");\n\t}", "private boolean isNumericoConFraccion(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tcase '.':\r\n\t\t\treturn dotCountValidate();\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isNumber(String in) \n\t{\n\t\ttry \n\t\t{\n\t\t\tInteger.parseInt(in);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean is_phonenumber(String nr)\n\t{\n\t\t// if the string is not null, length is between 0 and 16, starts with \"00\" and all the characters in the sttring are numbers\n\t\t// then it's valid\n\t\tif(nr != null && nr.length() > 0 && nr.length() < 16 && nr.substring(0, 2).equals(\"00\") && valid_numbers(nr))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.8286463", "0.7878233", "0.7652637", "0.6854067", "0.6674745", "0.6614146", "0.66070575", "0.6431147", "0.6425384", "0.6336903", "0.63130295", "0.62738764", "0.6190362", "0.6180515", "0.6148149", "0.6093341", "0.60790133", "0.604656", "0.60094094", "0.59858155", "0.59858155", "0.59858155", "0.5915954", "0.5915693", "0.5890378", "0.5857773", "0.58381146", "0.5830781", "0.58255684", "0.58216375", "0.5809212", "0.58047026", "0.57515854", "0.5731171", "0.5724587", "0.5719564", "0.57001305", "0.5698736", "0.5677524", "0.5665409", "0.5641578", "0.5638338", "0.56281227", "0.5626074", "0.5624248", "0.56134033", "0.56110793", "0.5605041", "0.56048006", "0.55954933", "0.55761445", "0.5571755", "0.5567008", "0.5566279", "0.5557309", "0.55394804", "0.553323", "0.5499672", "0.54914963", "0.54820925", "0.5473391", "0.5443764", "0.5435493", "0.54344404", "0.53908396", "0.5378752", "0.53737646", "0.5372482", "0.53722715", "0.5369514", "0.53623354", "0.5359165", "0.53528726", "0.5348822", "0.5347798", "0.5344953", "0.53371423", "0.5333911", "0.5330219", "0.53124887", "0.5303335", "0.5303089", "0.5296774", "0.5296103", "0.52940816", "0.52880096", "0.52858865", "0.5280303", "0.5275198", "0.5272646", "0.5265233", "0.5245961", "0.5241628", "0.52370775", "0.52336884", "0.5217242", "0.5208171", "0.52069336", "0.52039015", "0.5195291" ]
0.728619
3
/ / Devuelve true si par_Number es un numero entero / / valor que se quiere saber si es un numero entero o no / verdadero en caso de que par_Number sea un numero entero, falso en otro caso
public static boolean IsInteger(String par_Number) { java.util.regex.Pattern p = java.util.regex.Pattern.compile("^[\\d|\\-]\\d*$"); java.util.regex.Matcher m = p.matcher(par_Number); return m.matches(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean IsNumber(int par_Numer) {\n return true;\n }", "public static boolean IsNumber(long par_Number) {\n return true;\n }", "public static boolean IsNumber(double par_Number) {\n return true;\n }", "public boolean verificaNumero() {\n if (contemSomenteNumeros(jTextFieldDeposita.getText()) || contemSomenteNumeros(jTextFieldSaca.getText())\n || contemSomenteNumeros(jTextFieldTransfere.getText())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(this, \"Digite somente números, por favor. \", \"Atenção !!\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "public static boolean IsNumber(String par_Number) {\n\n java.util.regex.Pattern p = java.util.regex.Pattern.compile(\"^\\\\-?\\\\d*.?\\\\d+$\");\n java.util.regex.Matcher m = p.matcher(par_Number);\n\n return m.matches() || IsInteger(par_Number);\n }", "public boolean hasNumber(){\n return (alg.hasNumber(input.getText().toString()));\n }", "public static void VerificarPar(){\n\t\tint numero;\n\t\tint resultado;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tresultado=(numero%2);\n\t\tif(resultado==0){\n\t\t\tSystem.out.println(\"Numero Par: \"+(numero*2));\n\t\t}else{\n\t\t\tSystem.out.println(\"Numero Impar: \"+(numero*3));\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public boolean checkNumber() {\n\t\treturn true;\n\t}", "private boolean camposNumCorrectos() {\n\t\t return Utilidades.isPositiveNumber(anioText.getText().trim());\n\t}", "private boolean validar_numero(String numero) {\n boolean es_valido;\n es_valido = numero.charAt(0) != '0';\n return es_valido;\n }", "private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}", "boolean hasNumber();", "static boolean blanco(int numero){\n\t\tboolean resultado; \n\t\tif (numero > 43){\n\t\t\tresultado = true;\n\t\t}else{\n\t\t\tresultado = false;\n\t\t}\n\t\treturn resultado;\t\n\t}", "private boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "public boolean validateNummer() {\n\t\treturn (nummer >= 10000 && nummer <= 99999 && nummer % 2 != 0); //return true==1 oder false==0\n\t}", "public static boolean verificarNumeros(String numero) {\n\t\ttry{\n\t\t\tInteger.parseInt(numero);\n\t\t\treturn true;\n\t\t}catch(Exception e){\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean numeroValido(int numero, int ren, int col){\n return verificaArea(numero,ren,col)&&verificaRenglon(numero,ren) && verificaColumna(numero,col);\n }", "public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }", "public void ingresar() \r\n\t{\r\n\r\n\t\tString numeroCasilla = JOptionPane.showInputDialog(this, \"Ingresar numero en la casilla \" + sudoku.darFilaActual() + \",\" +sudoku.darColumnaActual());\r\n\t\tif (numeroCasilla == null || numeroCasilla ==\"\")\r\n\t\t{}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\tint numeroCasillaInt = Integer.parseInt(numeroCasilla);\r\n\t\t\t\tif(numeroCasillaInt > sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona() || numeroCasillaInt < 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog( this, \"El numero ingresado no es valido. Debe ser un valor entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog( this, \"Debe ingresar un valor numerico entre 1 y \" + sudoku.darCantidadColumnasZona()*sudoku.darCantidadFilasZona(), \"Error\", JOptionPane.ERROR_MESSAGE );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\nSystem.out.println(\"introduce un numero\");\r\nScanner entrada = new Scanner(System.in);\r\nint num = entrada.nextInt();\r\n\r\nboolean esPrimo = true; \r\nfor (int i=2;i<num;i++){\r\n\tif (num%i==0){\r\n\t\tesPrimo = false;\r\n\t}\r\n}\r\n\r\nif (esPrimo){\r\n\tSystem.out.println(\"El número es primo\");\r\n}else{\r\n\tSystem.out.println(\"El número no es primo\");\r\n}\r\n\t}", "public void ingresarNumero() {\n do {\r\n System.out.print(\"\\nIngrese un numero entre 0 y 100000: \");\r\n numero = teclado.nextInt();\r\n if (numero < 0 || numero > 100000){\r\n System.out.println(\"Error, rango invalido. Intentelo de nuevo.\");\r\n }\r\n } while(numero < 0 || numero > 100000);\r\n contarDigitos(numero); //el numero ingresado se manda como parametro al metodo\r\n menu();\r\n }", "public boolean isSetNum() {\n return this.Num != null;\n }", "public boolean validaNumero(int i, int j, int num) {\r\n\r\n return (comprovaFila(i, num) && comprovaColumna(j, num) && comprovaNumerosQuadrant(i - i % SRN, j - j % SRN, num));\r\n\r\n }", "private boolean validNum (int num) {\n if (num >= 0) return true;\n else return false;\n }", "public boolean isSetNumPoliza() {\r\n return this.numPoliza != null;\r\n }", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "public void leerNumero() {\r\n\t\tdo {\r\n\t\t\tnumeroDNI=Integer.parseInt(JOptionPane.showInputDialog(\"Numero de DNI: \"));\r\n\t\t\tSystem.out.println(\"Numero de 8 digitos...\");\r\n\t\t}while(numeroDNI<9999999||numeroDNI>99999999);\r\n\t\tletra=hallarLetra();\r\n\t}", "public static void OrdenarNumeros(){\n\t\t//Variables\n\t\tint a;\n\t\tint b;\n\t\tint c;\n\t\tString tomar;\n\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese tres numeros numero\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tc=reader.nextInt();\n\t\tif(a>b && b>c){\n\t\t\tTexto=a+\",\"+b+\",\"+c;\n\t\t}else if(a>c && c>b){\n\t\t\tTexto=a+\",\"+c+\",\"+b;\n\t\t}else if(b>a && a>c){\n\t\t\tTexto=b+\",\"+a+\",\"+c;\n\t\t}else if(b>c && c>a){\n\t\t\tTexto=b+\",\"+c+\",\"+a;\n\t\t}else if(c>a && a>b){\n\t\t\tTexto=c+\",\"+a+\",\"+b;\n\t\t}else if(c>b && b>a ){\n\t\t\tTexto=c+\",\"+b+\",\"+a;\n\t\t}\n\t\tSystem.out.println(Texto);\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }", "protected boolean isNumberValid(@NotNull ConversationContext context, @NotNull Number input) {\n/* 30 */ return true;\n/* */ }", "boolean hasNum();", "boolean hasNum();", "boolean hasNum();", "private static int isEntero(String palabra) {\n int resultado;//declaramos la variable a retornar\n\n try {\n Integer.parseInt(palabra);//convertimos la palabra a Integer\n resultado = 1;//Si no hay un error entonces es un numero y retornamos true\n } catch (NumberFormatException excepcion) {//de lo contrario es una palabra\n resultado = 0;\n }\n\n return resultado;//retornamos el valor\n }", "public default boolean hasNumber() {\n\t\treturn false;\n\t}", "public static String switchNumeriPosizioni(int numero, String pariOrDispari) {\n\t\tString valoreCorrispondente = \"\";\n\t\tswitch (numero) {\n\t\tcase 0:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"0\";\n\t\t\t} else valoreCorrispondente = \"1\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"1\";\n\t\t\t} else valoreCorrispondente = \"0\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"2\";\n\t\t\t} else valoreCorrispondente = \"5\";\n\t\t\tbreak;\n\t\tcase 3:\t\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"3\";\n\t\t\t} else valoreCorrispondente = \"7\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"4\";\n\t\t\t} else valoreCorrispondente = \"9\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"5\";\n\t\t\t} else valoreCorrispondente = \"13\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"6\";\n\t\t\t} else valoreCorrispondente = \"15\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"7\";\n\t\t\t} else valoreCorrispondente = \"17\";\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"8\";\n\t\t\t} else valoreCorrispondente = \"19\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tif (pariOrDispari.equals(\"pari\")) {\n\t\t\t\tvaloreCorrispondente = \"9\";\n\t\t\t} else valoreCorrispondente = \"21\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn valoreCorrispondente;\n\t}", "public static boolean esPrimo(int numero) {\n int contador = 2;\n boolean primo = true;\n while ((primo) && (contador != numero)) {\n if (numero % contador == 0) {\n primo = false;\n }\n contador++;\n }\n\n return primo;\n }", "public boolean isNumber(String num)\t{\n\t\tfor(int i=0;i<13;i++)\t{\n\t\t\tif(Integer.parseInt(num)==i)\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static boolean menosONo(){\n Scanner cifra = new Scanner(System.in);\n System.out.println(\"Задание №6. Введите любое число\");\n int number = cifra.nextInt();\n if (number < 0){\n System.out.println(\"Вы ввели отрицательное число.\");\n return true;\n }else\n System.out.println(\"Вы ввели положительное число.\");\n return false;\n }", "public static boolean esPrimo (int num) {\n\t\tboolean primo = true;\n\t\tint i;\n\t\t\n\t\t// Bucle hasta la mitad - 1 de num (si no se ha podido dividir entre 2 los demas numeros despues de su mitad tampoco se podra\n\t\tfor (i = 2; i < (num / 2) && primo; i++) {\n\t\t\tif (num % i == 0) {\n\t\t\t\tprimo = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn primo;\n\t}", "public static boolean esPrimo(int numero) {\n\t\tint contador = 2;\n\t\tboolean primo = true;\n\t\twhile ((primo) && (contador != numero)) {\n\t\t\tif (numero % contador == 0)\n\t\t\t\tprimo = false;\n\t\t\tcontador++;\n\t\t}\n\t\treturn primo;\n\t}", "private boolean isNumber(String number){\n\t\ttry{\r\n\t\t\tFloat.parseFloat(number);\r\n\t\t}catch(Exception e){\r\n\t\t\treturn false;// if the user input is not number it throws flase\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public int pedirNIF(){\n int NIF = 0;\n boolean validado = false;\n do{\n System.out.println(\"Introduce la NIF:\");\n try {\n NIF = Integer.parseInt(lector.nextLine());\n validado = true;\n\n if(NIF <= 0){\n validado = false;\n System.out.println(\"El NIF no puede ser un numero negativo\");\n }\n }catch (NumberFormatException nfe){\n System.out.println(\"Por favor, introduce un numero.\");\n }\n\n }while(!validado);\n return NIF;\n }", "public static boolean esNumero(String cadena) {\n try {\n Integer.parseInt(cadena);\n return true;\n } catch (NumberFormatException nfe) {\n return false;\n }\n }", "private void processNumber() {\r\n\t\tString number = extractNumber();\r\n\r\n\t\tif ((!number.equals(\"1\")) && (!number.equals(\"0\"))) {\r\n\t\t\tthrow new LexerException(String.format(\"Unexpected number: %s.\", number));\r\n\t\t}\r\n\r\n\t\ttoken = new Token(TokenType.CONSTANT, number.equals(\"1\"));\r\n\t}", "protected boolean validateVerticesNumber(int verticesNumber) {\n return verticesNumber < 1;\n }", "private boolean isNumber(final String number) {\n try {\n Integer.parseInt(number);\n return true;\n } catch (Exception e) {\n LOGGER.error(\"Not a number \" + number, e);\n return false;\n }\n }", "public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}", "public void setNumeroParcelas(int numeroParcelas) {\n this.numeroParcelas = numeroParcelas;\n }", "private static boolean validNumber(String thing) {\n\t\treturn validDouble(thing);\n\t}", "private boolean checkForNumber(String field) {\n\n\t\tPattern p = Pattern.compile(\"[0-9].\");\n\t\tMatcher m = p.matcher(field);\n\n\t\treturn (m.find()) ? true : false;\n\t}", "public boolean isSetNumber() {\n return (this.number != null ? this.number.isSetValue() : false);\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 }", "private boolean isResultadoDadoValido(int resultadoDado) throws Exception {\n if ((resultadoDado > 6) || (resultadoDado < 1)) {\n throw new Exception(\"Invalid die result\");\n }\n return true;\n }", "public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}", "private boolean validar(String nombre,String direccion, int numero, String estado) {\r\n\t\tif (nombre == null || nombre.equals(\"\") || direccion == null || direccion.equals(\"\") || estado == null || estado == null || numero==0) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t}", "public boolean isNum(String cad){\n try{\n Integer.parseInt(cad);\n return true;\n }catch(NumberFormatException nfe){\n System.out.println(\"Solo se aceptan valores numericos\");\n return false;\n }\n }", "public PrimosTest(Integer inputNumber, Boolean expectedResult) {\n this.inputNumber = inputNumber;\n this.expectedResult = expectedResult;\n }", "private boolean validarProcesoFianciacionIncumplido(String numeroObligacion) {\n\n boolean proceso = false;\n\n StringBuilder jpql = new StringBuilder();\n jpql.append(\"SELECT o FROM ObligacionFinanciacion o\");\n jpql.append(\" JOIN o.financiacion f\");\n jpql.append(\" JOIN f.proceso p\");\n jpql.append(\" WHERE o.numeroObligacion = :numeroObligacion\");\n jpql.append(\" AND p.estadoProceso.id = :estadoProceso\");\n\n Query query = em.createQuery(jpql.toString());\n query.setParameter(\"numeroObligacion\", numeroObligacion);\n query.setParameter(\"estadoProceso\", EnumEstadoProceso.ECUADOR_FINANCIACION_INCUMPLIDO.getId());\n\n @SuppressWarnings(\"unchecked\")\n List<ObligacionFinanciacion> procesos = query.getResultList();\n if (procesos != null && !procesos.isEmpty()) {\n proceso = true;\n }\n return proceso;\n }", "protected boolean puedeDisparar(int tamanoBala) {\n return municion >= tamanoBala;\n }", "public boolean isNumber(String sIn)\r\n {\r\n int parseNumber = -1;\r\n \r\n try{\r\n parseNumber = Integer.parseInt(sIn);\r\n }catch(Exception e){\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "@Test\n public void parseNumber_returnsSortCommand() {\n assertParseSuccess(PARAM_NUMBER);\n }", "public void printNo(String numar)\r\n {\r\n //toate verificarile posibile pentru a afisa ce trebuie\r\n //mi-e lene sa scriu la fiecare in parte, daca vrei ti le explic la telefon\r\n if(Character.getNumericValue(numar.charAt(0)) ==0 && Character.getNumericValue(numar.charAt(1)) == 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else{\r\n if(Character.getNumericValue(numar.charAt(0)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(0))] + \" hundread \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 1){\r\n System.out.print(v1[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if (Character.getNumericValue(numar.charAt(1)) > 1 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n else if(Character.getNumericValue(numar.charAt(2)) == 0 && Character.getNumericValue(numar.charAt(1)) > 1){\r\n System.out.print(v2[Character.getNumericValue(numar.charAt(1)) - 2] + \" \");\r\n }\r\n if(Character.getNumericValue(numar.charAt(1)) == 0 && Character.getNumericValue(numar.charAt(2)) > 0){\r\n System.out.print(v[Character.getNumericValue(numar.charAt(2))] + \" \");\r\n }\r\n }\r\n }", "public boolean isNumberValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_NUMBER);\n }", "public boolean isSetFromNumber()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(FROMNUMBER$2) != 0;\n }\n }", "private boolean isValidNumber(String quantity) {\n\t\ttry{\n\t\t\tint value=Integer.parseInt(quantity);\n\t\t\treturn value>0? true: false;\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "boolean hasNum1();", "private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}", "public void checkInput(TextField number) {\r\n\t\ttry {\r\n\t\t\tlong num = Long.parseLong(number.getText());\r\n\t\t\tif (num < 0) \t\t\t\t\t// ako je negativan broj, pretvorit cemo ga u pozitivan\r\n\t\t\t\tnum = Math.abs(num);\r\n\t\t\tif (isValid(num)) \r\n\t\t\t\tscene2();\r\n\t\t}\r\n\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\talert(\"Wrong input, try again!\");\r\n\t\t}\r\n\t}", "public boolean isInteger() {\n try {\n Integer.parseInt(txt.getText());\n return true;\n } catch (Exception e) {\n return error(\"El valor debe ser un numero entero!\");\n }\n }", "public boolean isValid(int number)", "public void ejercicio03() {\r\n\t\tcabecera(\"03\", \"Comparar numeros\");\r\n\r\n // Inicio modificacion\r\n\t\t\r\n NumeroEntero n1 = new NumeroEntero(10);\r\n NumeroEntero n2 = new NumeroEntero(10);\r\n\r\n if (n1.comapreTo(n2) == -1){\r\n \t System.out.println(\"N1-> \"+n1);\r\n System.out.println(\"N1 es mayor que N2\");\r\n }\r\n else if (n1.comapreTo(n2) ==1) {\r\n System.out.println(\"N1 -> \"+n1);\r\n System.out.println(\"N1 es menor que N2\");\r\n }\r\n else{\r\n System.out.println(\"N1 y N2 son iguales -> N1 ->\"+n1+\" N2 -> \"+n2);\r\n }\r\n\r\n\t\t// Fin modificacion\r\n\t\t\r\n\t}", "public static boolean isEntero(String valor) {\n boolean valido = false;\n\n try {\n int cantidad = Integer.parseInt(valor);\n if (cantidad > 0) {\n valido = true;\n }\n } catch (NumberFormatException e) {\n System.out.println(\"No es un caracter entero\");\n }\n\n return valido;\n }", "private static boolean isNumeric(String cadena)\n\t {\n\t\t try \n\t\t {\n\t\t\t Integer.parseInt(cadena);\n\t\t\t return true;\n\t\t } catch (NumberFormatException nfe)\n\t\t {\n\t\t\t return false;\n\t\t }\n\t }", "public boolean isPrime(int myNumber) {\n for (int i = 2; i < myNumber/2; i++) {\n if (myNumber % i == 0) {\n System.out.println(myNumber + \" can be divided by \" + i);\n return false;\n }\n }\n return true;\n }", "private boolean isNumberAhead() {\r\n\t\treturn Character.isDigit(expression[currentIndex]);\r\n\t}", "boolean ePrimo(int n) {\n \n if (n < 2) {\n return false;\n }\n \n \n // Guarda o numero de divisores de n. Inicialmente eh 1. Todos os numeros\n // sao divisiveis por 1\n \n int numeroDeDivisores = 1;\n \n // O primeiro candidato a divisor nao trivial eh 2.\n \n int candidatoADivisor = 2;\n \n // Testa a divisao por todos os numeros menores ou iguais a n/2 ou ate \n // encontrar o primeiro divisor.\n \n while((candidatoADivisor <= Math.sqrt(n)) && (numeroDeDivisores == 1)) {\n if (n % candidatoADivisor == 0) {\n // o resto da divisao eh zero. Logo, candidatoADivisor eh um divisor de n. \n // Por isso, que o numero de divisores eh incrementado em 1.\n numeroDeDivisores = numeroDeDivisores + 1;\n }\n candidatoADivisor = candidatoADivisor + 1;\n }\n \n if (numeroDeDivisores == 1) {\n return true;\n }\n else {\n return false;\n }\n }", "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 }", "@Override\n public boolean valida() {\n mediatorCredito m = new mediatorCredito();\n try{\n BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,\"Digite su número de \"\n + \"tarjeta de crédito\",\"\"));\n String pag = JOptionPane.showInputDialog(null,\"Ingrese su medio de pago: (Visa, master Card\"\n + \", American Express)\",\"\");\n if(m.verificarForm(dit, pag)==false){\n JOptionPane.showMessageDialog(null,\"ups, el medio de pago o la tarjeta de crédito no es válido\"\n ,\"Error\",0);\n }\n return m.verificarForm(dit, pag);\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null,\"Acción cancelada\",\"Advertencia\",2);\n return false;\n }\n }", "@Override\n\tpublic boolean number()\n\t{\n\t\treturn true;\n\t}", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasNumber() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean Propose(int serialNum, ProposeData lastAcceptValue) {\n mLock.lock();\n if (0 >= serialNum) {\n mLock.unlock();\n return false;\n }\n if (mMaxSerialNum > serialNum) {\n mLock.unlock();\n return false;\n }\n mMaxSerialNum = serialNum;\n lastAcceptValue.setSerialNum(mLastAcceptValue.serialNum());\n lastAcceptValue.setValue(mLastAcceptValue.value());\n mLock.unlock();\n\n return true;\n }", "public int probar(String poox){\r\n int numero = Character.getNumericValue(poox.charAt(0))+ Character.getNumericValue(poox.charAt(1))+ Character.getNumericValue(poox.charAt(2))+ \r\n Character.getNumericValue(poox.charAt(3))+ Character.getNumericValue(poox.charAt(4));\r\n int comprobar;\r\n if(numero >= 30){\r\n comprobar = 2;\r\n System.out.println( numero +\" Digito verificar = \" + comprobar);\r\n }else if (numero >=20 && numero <= 29){\r\n comprobar = 1;\r\n System.out.println(numero + \" Digito verificar = \" + comprobar);\r\n }else{\r\n comprobar = 0;\r\n System.out.println(numero + \" Digito verificar = \" + comprobar);\r\n }\r\n return comprobar;\r\n }", "public boolean numeroLivreDejaEnregistre(int numero_livre) {\n\t\t\n\t\tString requete_s = \"SELECT id from LIVRES where id = \" + numero_livre;\n\t\t\n\t\ttry{\n\t\t\trequete.execute(requete_s);\n\t\t\t\n\t\t\tResultSet rs = requete.getResultSet();\n\t\t\t\n\t\t\tif(rs.next())\n\t\t\t\treturn (numero_livre == ((Integer) rs.getObject(\"id\")));\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "boolean numberIsLegal (int row, int col, int num) {\n\t\tif (isLegalRow(row, col, num)&&isLegalCol(col, row, num)&&isLegalBox(row,col,num)) {\n\t\t\treturn true;\n\t\t} else if (num == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private boolean isNumerico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase '0':\r\n\t\t\treturn true;\r\n\t\tcase '1':\r\n\t\t\treturn true;\r\n\t\tcase '2':\r\n\t\t\treturn true;\r\n\t\tcase '3':\r\n\t\t\treturn true;\r\n\t\tcase '4':\r\n\t\t\treturn true;\r\n\t\tcase '5':\r\n\t\t\treturn true;\r\n\t\tcase '6':\r\n\t\t\treturn true;\r\n\t\tcase '7':\r\n\t\t\treturn true;\r\n\t\tcase '8':\r\n\t\t\treturn true;\r\n\t\tcase '9':\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static void NumeroAmigo(){\n\t\tint a;\n\t\tint b;\n\t\tString tomar;\n\t\tint resultado;\n\t\tScanner reader= new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese dos numeros\");\n\t\ta=reader.nextInt();\n\t\tb=reader.nextInt();\n\t\tif(a>=0 && b>=0){\n\t\t\tresultado=RepetidorFor(a);\n\t\t\t\tif(resultado==b){\n\t\t\t\tresultado=RepetidorFor(b);\n\t\t\t\tif(resultado==a){\n\t\t\t\t\tSystem.out.println(\"Son numeros amigos\");\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No son numeros amigos\");\n\t\t\t}\n\t\t}else{\n\t\t\tSystem.out.println(\"Ingrese numeros positivos\");\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public static void afficherFactureParNumero() {\r\n int numeroFacture = checkInt();\r\n Facture.afficherFacture(numeroFacture);\r\n }", "private boolean isThereSuchPage (int number) {\n\t\tif (number > 0 && number <= this.getPages().length) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tSystem.out.println(\"There isn't such page!\");\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean valid_numbers(String nr)\n\t{\n\t\t// loop through the string, char by char\n\t\tfor(int i = 0; i < nr.length();i++)\n\t\t{\n\t\t\t// if the char is not a numeric value or negative\n\t\t\tif(Character.getNumericValue(nr.charAt(i)) < 0)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// if it did not return false in the loop, return true\n\t\treturn true;\n\t}", "private boolean validarNumDistanc(double value) {\n\n String msjeError;\n if (value < 0) {\n\n msjeError = \"Valor No Aceptado\";\n this.jLabelError.setText(msjeError);\n this.jLabelError.setForeground(Color.RED);\n this.jLabelError.setVisible(true);\n\n this.jLabel5.setForeground(Color.red);\n return false;\n } else {\n\n this.jLabel5.setForeground(jlabelColor);\n this.jLabelError.setVisible(false);\n return true;\n }\n }", "private boolean isValidNumber() {\n String mobileNumber = ((EditText) findViewById(\n R.id.account_mobile_number_edit_text)).getText().toString();\n\n return PhoneNumberUtils.isValidMobileNumber(PhoneNumberUtils.formatMobileNumber(mobileNumber));\n }", "private static boolean isPrime(int number){\n for(int divisor = 2; divisor <= number / 2; divisor++){\n if(number % divisor == 0){ // If true. number is not prime\n return false;\n }\n }\n return true; // Number is prime\n }", "public void checkNumber(View view){\n Log.i(\"info\", \"button pressed\");\n String message;\n\n // take number from the form\n EditText number=(EditText) findViewById(R.id.editText2);\n if (number.getText().toString().isEmpty()){\n message=\"Please type a number.\";\n } else {\n int numberInt = Integer.parseInt(number.getText().toString());\n\n // use the class Number\n Number testNumber = new Number();\n testNumber.value = numberInt;\n\n // prepare to print message\n message = number.getText().toString();\n\n if (testNumber.isSquared() && testNumber.isTriangular()) {\n message += \" is a square and a triangular number.\";\n } else if (testNumber.isSquared()) {\n message += \" is a square number.\";\n } else if (testNumber.isTriangular()) {\n message += \" is a triangular number.\";\n } else {\n message += \" is neither triangular nor squared.\";\n }\n }\n // show a floating message that desapear after a few seconds\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n // clean the form\n number.setText(\"\");\n\n }", "boolean isNumber(Formula pTt);", "public void setNumberValidProt(int numberValidProt) {\n this.numberValidProt = numberValidProt;\n }", "public boolean isNumber(InputStream in) {\n boolean result = false;\n try (BufferedReader reader = new BufferedReader(new InputStreamReader(in))) {\n int number = Integer.parseInt(reader.readLine());\n\n if (number % 2 == 0) {\n result = true;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return result;\n }" ]
[ "0.8080214", "0.75758034", "0.73528945", "0.7079292", "0.69989926", "0.6598609", "0.65512776", "0.6544239", "0.6453393", "0.6443413", "0.63965553", "0.62884414", "0.626859", "0.6235937", "0.6191827", "0.607444", "0.60657406", "0.60387343", "0.6023056", "0.5959251", "0.592043", "0.5902239", "0.589451", "0.58860844", "0.5864191", "0.5819382", "0.58097875", "0.58090276", "0.57880867", "0.57785326", "0.57768065", "0.57768065", "0.57768065", "0.5766561", "0.5747036", "0.5736042", "0.57258683", "0.57159245", "0.5691238", "0.567414", "0.56582505", "0.5633248", "0.56206083", "0.56134933", "0.5589857", "0.55843484", "0.5566328", "0.5548258", "0.54957193", "0.5490487", "0.5485699", "0.54776585", "0.54728144", "0.54665005", "0.5463511", "0.54546", "0.5448501", "0.5446229", "0.5444123", "0.5422452", "0.5420678", "0.5417772", "0.54164284", "0.5415597", "0.5396051", "0.53952414", "0.53848404", "0.5382148", "0.53803575", "0.5378195", "0.5376335", "0.53686357", "0.5364985", "0.53616244", "0.5361121", "0.53484553", "0.53449243", "0.5315908", "0.529629", "0.5291076", "0.5284964", "0.5282838", "0.5281526", "0.5278895", "0.52716273", "0.5271183", "0.52708465", "0.5258545", "0.5258286", "0.52327967", "0.5232239", "0.522993", "0.5223578", "0.52191126", "0.5211385", "0.52109545", "0.5210744", "0.52007574", "0.51932204", "0.5187662" ]
0.6050517
17
Logger.getLogger(GeneralFunc.class).log(Level.DEBUG, "StringFormat con formato " + format);
public static String stringFormat(String format, Object... objs) { String retVal = ""; Pattern p = Pattern.compile("([{][^}]*[}])"); Matcher m = p.matcher(format); String individualFormat; int order = -1; int pos = -1; //loc_re.match(format); retVal = format; int loc_Conta = 0; while (m.find()) { if (m.group().length() == 0) { continue; } pos = m.group().indexOf(":"); if (pos > 0) { individualFormat = m.group().substring(pos + 1, m.group().length() - pos + 1); order = Integer.parseInt(m.group().substring(1, pos)); //Logger.getLogger(GeneralFunc.class).log(Level.DEBUG, "individualFormat " + individualFormat + "orden: " + order); retVal = retVal.replace(m.group(), formatObject(objs[order], individualFormat, '.')); } else { retVal = retVal.replace(m.group(), formatObject(objs[Integer.parseInt(m.group().substring(1, m.group().length() - 1))], "", '.')); } loc_Conta++; } return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getLogString(String format, Object... args) {\n //Minor optimization, only call String.format if necessary\n if (args.length == 0) {\n return format;\n }\n\n return String.format(format, args);\n }", "void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "void log(String string);", "public void logDebug(String str) {\n }", "public abstract void logd(String str);", "private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "@Test\n\tpublic void logFormattedStringWithSingleObject() {\n\t\tlogger.logf(org.jboss.logging.Logger.Level.DEBUG, \"Hello %s!\", \"World\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(PrintfStyleFormatter.class), eq(\"Hello %s!\"),\n\t\t\t\t\teq(\"World\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.WARN, \"Hello %s!\", \"World\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(PrintfStyleFormatter.class), eq(\"Hello %s!\"),\n\t\t\t\t\teq(\"World\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "public void log(String fmt, Object... args) {\n Log.d(\"Dexedrine\", String.format(fmt, args));\n }", "public String get_log(){\n }", "public static void log(String str)\r\n\t{\n\t}", "public void log(String txt);", "@Test\n\tpublic void logFormattedStringWithThreeObject() {\n\t\tlogger.logf(org.jboss.logging.Logger.Level.DEBUG, \"%s, %s or %s\", \"one\", \"two\", \"three\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(PrintfStyleFormatter.class), eq(\"%s, %s or %s\"),\n\t\t\t\t\teq(\"one\"), eq(\"two\"), eq(\"three\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.WARN, \"%s, %s or %s\", \"one\", \"two\", \"three\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(PrintfStyleFormatter.class), eq(\"%s, %s or %s\"),\n\t\t\t\t\teq(\"one\"), eq(\"two\"), eq(\"three\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "String getFormat();", "String getFormat();", "String getFormat();", "@Test\n\tpublic void logFormattedStringWithTwoObjects() {\n\t\tlogger.logf(org.jboss.logging.Logger.Level.DEBUG, \"%s = %d\", \"magic\", 42);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(PrintfStyleFormatter.class), eq(\"%s = %d\"), eq(\"magic\"),\n\t\t\t\t\teq(42));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.WARN, \"%s = %d\", \"magic\", 42);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(PrintfStyleFormatter.class), eq(\"%s = %d\"), eq(\"magic\"),\n\t\t\t\t\teq(42));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }", "public interface LogFormatter {\n\n /**\n * Creates a log message.\n *\n * @param className The class name that the logger targets at.\n * @param message The original message that is specified with a log method of {@link Log}.\n * @return A log message.\n */\n String format(String className, String message);\n\n /**\n * Creates a log message.\n *\n * @param className The class name that the logger targets at.\n * @param format The format that is specified with a log method of {@link Log}.\n * @param args The additional arguments that are specified with a log method of {@link Log}.\n * @return A log message.\n */\n String format(String className, String format, Object... args);\n}", "String getLogHandled();", "void log();", "void format();", "@Test\n\tpublic void logFormattedMessageWithSingleArgument() {\n\t\tlogger.logv(org.jboss.logging.Logger.Level.DEBUG, \"Hello {0}!\", \"World\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(JavaTextMessageFormatFormatter.class), eq(\"Hello {0}!\"),\n\t\t\t\t\teq(\"World\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(org.jboss.logging.Logger.Level.WARN, \"Hello {0}!\", \"World\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(JavaTextMessageFormatFormatter.class), eq(\"Hello {0}!\"),\n\t\t\t\t\teq(\"World\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "@Test\n\tpublic void logFormattedStringWithMultipleObjects() {\n\t\tlogger.logf(org.jboss.logging.Logger.Level.DEBUG, \"%s, %s, %s or %s\", \"one\", \"two\", \"three\", \"four\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(PrintfStyleFormatter.class), eq(\"%s, %s, %s or %s\"),\n\t\t\t\t\teq(\"one\"), eq(\"two\"), eq(\"three\"), eq(\"four\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.WARN, \"%s, %s, %s or %s\", \"one\", \"two\", \"three\", \"four\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(PrintfStyleFormatter.class), eq(\"%s, %s, %s or %s\"),\n\t\t\t\t\teq(\"one\"), eq(\"two\"), eq(\"three\"), eq(\"four\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "private void logToFile() {\n }", "@Test\n\tpublic void logFormattedMessageWithThreeArguments() {\n\t\tlogger.logv(org.jboss.logging.Logger.Level.DEBUG, \"{0}, {1} or {2}\", 1, 2, 3);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(JavaTextMessageFormatFormatter.class),\n\t\t\t\t\teq(\"{0}, {1} or {2}\"), eq(1), eq(2), eq(3));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(org.jboss.logging.Logger.Level.WARN, \"{0}, {1} or {2}\", 1, 2, 3);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(JavaTextMessageFormatFormatter.class),\n\t\t\t\t\teq(\"{0}, {1} or {2}\"), eq(1), eq(2), eq(3));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "IFileLogger log();", "void log(Level level, String message);", "@Override\n\tpublic void log(Level level, String message, Object... params) {\n\n\t}", "private String logString(String s) {\n Log.i(\"write string\", s);\n return s;\n }", "public void log(String msg) {\n\n\t}", "protected abstract String format();", "@Test\n\tpublic void logFormattedMessageWithMultipleArguments() {\n\t\tlogger.logv(org.jboss.logging.Logger.Level.DEBUG, \"{0}, {1}, {2} or {3}\", 1, 2, 3, 4);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(JavaTextMessageFormatFormatter.class),\n\t\t\t\t\teq(\"{0}, {1}, {2} or {3}\"), eq(1), eq(2), eq(3), eq(4));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(org.jboss.logging.Logger.Level.WARN, \"{0}, {1}, {2} or {3}\", 1, 2, 3, 4);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(JavaTextMessageFormatFormatter.class),\n\t\t\t\t\teq(\"{0}, {1}, {2} or {3}\"), eq(1), eq(2), eq(3), eq(4));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "public void log(String text) {\n }", "public static void log(Object caller, Level level, String message){ \n\t\tlogger.log(level, message);\n }", "@Override\r\n\tsynchronized public void f(String tag, String format, Object... args) {\n\t\tif (isF()) Log.e(tag, (format != null) ? String.format(format, args) : String.valueOf(format));\r\n\t}", "java.lang.String getLogMessage();", "void printLog(String str, int level)\n { if (log!=null) log.println(\"CommandLineUA: \"+str, UserAgent.LOG_OFFSET+level);\n }", "public void add_to_log(String s){\n }", "@Test\n\tpublic void logFormattedMessageWithTwoArguments() {\n\t\tlogger.logv(org.jboss.logging.Logger.Level.DEBUG, \"{0} = {1}\", \"magic\", 42);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(null), any(JavaTextMessageFormatFormatter.class), eq(\"{0} = {1}\"),\n\t\t\t\t\teq(\"magic\"), eq(42));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(org.jboss.logging.Logger.Level.WARN, \"{0} = {1}\", \"magic\", 42);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(null), any(JavaTextMessageFormatFormatter.class), eq(\"{0} = {1}\"),\n\t\t\t\t\teq(\"magic\"), eq(42));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "private FormatUtilities() {}", "@Override\r\n\tpublic String format(LogRecord record) {\n\t\tDate date = new Date(record.getMillis());\r\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\treturn format.format(date)+\" \" + record.getLevel()+\": \\n\" + record.getMessage()+\"\\n\";\r\n\t\t\r\n\t}", "@Override\n\tpublic void printf(Level level, Marker marker, String format, Object... params) {\n\n\t}", "public static void main(String[] args)\n\t{\n\t\tSystem.out.println(logger.getName());\n\t\tlogger.log(Level.INFO,\"come from logFunction\");\n\t\tlogger.debug(\"debug message\");\n\t\tlogger.info(\"info message\");\n\t\tlogger.warn(\"warn message\");\n\t\tlogger.error(\"error message\");\n\t\tlogger.fatal(\"fatal message\");\n\t}", "@Test\n\tpublic void logExceptionAndFormattedStringWithThreeObjectWithLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"%s, %s or %s\", \"one\", \"two\",\n\t\t\t\t\"three\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"%s, %s or %s\"), eq(\"one\"), eq(\"two\"), eq(\"three\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"%s, %s or %s\", \"one\", \"two\",\n\t\t\t\t\"three\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"%s, %s or %s\"), eq(\"one\"), eq(\"two\"), eq(\"three\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "private static void print(final String format, final Object...params) {\n // we prefix all our messages with \">>> \" so as to distinguish them from the driver, node and client messages\n final String msg = String.format(\">>> \" + format, params);\n log.info(msg);\n System.out.println(msg);\n }", "public static void main(String []args) {\n\t\tlog.trace(\"111---\");\n\t\tlog.debug(\"2222\");\n\t\tlog.info(\"333\");\n\t\tlog.warn(\"444\");\n\t\tlog.error(\"555\");\n\t}", "void log(Log log);", "@Override\n\tpublic void log(Level level, Marker marker, String message, Object... params) {\n\n\t}", "public String toString(){\n return \"Format: \" + format +\", \" + super.toString(); \n }", "private void log(String l) {\n if (LOG) {\n System.out.println(\"RotationMatrixTest.\" + l);\n }\n }", "@VTID(8)\r\n java.lang.String format();", "public void setFormat(String fmt)\n {\n format = fmt;\n }", "private void debug(String str) {\n }", "@Override\n protected void log(String tag, String msg) {\n Log.i(tag, \"[you can use your custom logger here \\\"]\" + msg);\n }", "private String format(final String format, final Object arg1, final Object arg2)\n\t{\n\t\treturn MessageFormatter.format(format, arg1, arg2).getMessage();\n\t}", "private static String buildMessage(String format, Object... args) {\n String msg = (args == null) ? format : String.format(Locale.CHINA, format, args);\n\n StackTraceElement[] trace = new Throwable().fillInStackTrace().getStackTrace();\n String caller = \"<unknown>\";\n /*\n Walk up the stack looking for the first caller outside the Log\n It will be at least two frames up, so start there\n */\n for(int i = 2; i < trace.length; i++) {\n Class<?> clazz = trace[i].getClass();\n if(!clazz.equals(Log.class)) {\n String callingClass = trace[i].getClassName();\n callingClass = callingClass.substring(callingClass.lastIndexOf('.') + 1);\n callingClass = callingClass.substring(callingClass.lastIndexOf('$') + 1);\n\n caller = callingClass + \".\" + trace[i].getMethodName();\n break;\n }\n }\n return String.format(Locale.CHINA, \"[%d] %s: %s\", Thread.currentThread().getId(), caller, msg);\n }", "@Test\n\tpublic void logExceptionAndFormattedStringWithSingleObject() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.DEBUG, exception, \"Hello %s!\", \"Error\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(exception), any(PrintfStyleFormatter.class), eq(\"Hello %s!\"),\n\t\t\t\t\teq(\"Error\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.WARN, exception, \"Hello %s!\", \"Error\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(exception), any(PrintfStyleFormatter.class), eq(\"Hello %s!\"),\n\t\t\t\t\teq(\"Error\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "@Override\n\tpublic void log(Level level, Marker marker, String message, Supplier<?>... paramSuppliers) {\n\n\t}", "public void log(String message){\n Date date = new Date();\n String pattern = \"hh:mm:ss\";\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n String dateText = simpleDateFormat.format(date);\n System.out.println(\"LOG \" + dateText + \": \" + message);\n }", "void log(String line);", "@Test\n\tpublic void logExceptionAndFormattedStringWithMultipleObjectsWithLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"%s, %s, %s or %s\", \"one\", \"two\",\n\t\t\t\t\"three\", \"four\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"%s, %s, %s or %s\"), eq(\"one\"), eq(\"two\"), eq(\"three\"), eq(\"four\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"%s, %s, %s or %s\", \"one\", \"two\",\n\t\t\t\t\"three\", \"four\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"%s, %s, %s or %s\"), eq(\"one\"), eq(\"two\"), eq(\"three\"), eq(\"four\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "default String format(String str) {\n return apply(str);\n }", "public interface Loggable\n{\n\n /**\n * Logs the message(s) with the given importance. Message will be\n * prefixed with [TerrainControl], so don't do that yourself.\n * <p/>\n * @param level The severity of the message\n * @param message The messages to log\n */\n public void log(Marker level, String... message);\n\n /**\n * Logs a format string message with the given importance. Message will\n * be prefixed with [TerrainControl], so don't do that yourself.\n * <p/>\n * @param level The severity of the message\n * @param message The messages to log formatted similar to Logger.log()\n * with the same args.\n * @param params The parameters belonging to {0...} in the message\n * string\n */\n public void log(Marker level, String message, Object... params);\n\n /**\n * Logs the message(s) with the given importance <b>ONLY IF</b> logger\n * level matches the level provided. Message will be prefixed with\n * [TerrainControl], so don't do that yourself.\n * <p/>\n * @param ifLevel the Log level to test for\n * @param messages The messages to log.\n */\n public void logIfLevel(Marker ifLevel, String... messages);\n\n /**\n * Logs the message(s) with the given importance <b>ONLY IF</b> logger\n * level matches the level provided. Message will be prefixed with\n * [TerrainControl], so don't do that yourself.\n * <p/>\n * @param ifLevel the Log level to test for\n * @param message The messages to log formatted similar to\n * Logger.log() with the same args.\n * @param params The parameters belonging to {0...} in the message\n * string\n */\n public void logIfLevel(Marker ifLevel, String message, Object... params);\n\n /**\n * Logs the message(s) with the given importance <b>ONLY IF</b> logger\n * level is between the min/max provided. Message will be prefixed with\n * [TerrainControl], so don't do that yourself.\n * <p/>\n * @param min The minimum Log level to test for\n * @param max The maximum Log level to test for\n * @param messages The messages to log.\n */\n public void logIfLevel(Marker min, Marker max, String... messages);\n\n /**\n * Logs the message(s) with the given importance <b>ONLY IF</b> logger\n * level is between the min/max provided. Message will be prefixed with\n * [TerrainControl], so don't do that yourself.\n * <p/>\n * @param min The minimum Log level to test for\n * @param max The maximum Log level to test for\n * @param message The messages to log formatted similar to\n * Logger.log() with the same args.\n * @param params The parameters belonging to {0...} in the message\n * string\n */\n public void logIfLevel(Marker min, Marker max, String message, Object... params);\n\n}", "private void printLog(String str, int level)\n { if (log!=null) log.println(\"AudioApp: \"+str, LoopbackMediaApp.LOG_OFFSET+level);\n if (level<=Log.LEVEL_HIGH) System.out.println(\"AudioApp: \"+str);\n }", "String formatMessage(LogMessage ioM);", "public interface ILog {\n void print(LogLevel logLevel, String tag, String msg, long tid);\n}", "@Override\n\tpublic void log(Level level, Marker marker, Supplier<?> msgSupplier) {\n\n\t}", "public String getLog();", "@Test\n\tpublic void logExceptionAndFormattedStringWithThreeObject() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.DEBUG, exception, \"%s, %s or %s\", \"one\", \"two\", \"three\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.DEBUG), same(exception), any(PrintfStyleFormatter.class), eq(\"%s, %s or %s\"),\n\t\t\t\t\teq(\"one\"), eq(\"two\"), eq(\"three\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(org.jboss.logging.Logger.Level.WARN, exception, \"%s, %s or %s\", \"one\", \"two\", \"three\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(2), isNull(), eq(Level.WARN), same(exception), any(PrintfStyleFormatter.class), eq(\"%s, %s or %s\"),\n\t\t\t\t\teq(\"one\"), eq(\"two\"), eq(\"three\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "@Override\n\tpublic void log(Level level, String message) {\n\n\t}", "@Test\n\tpublic void logExceptionAndFormattedMessageWithThreeArgumentsAndLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logv(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"{0}, {1} or {2}\", 1, 2, 3);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"{0}, {1} or {2}\"), eq(1), eq(2), eq(3));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"{0}, {1} or {2}\", 1, 2, 3);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"{0}, {1} or {2}\"), eq(1), eq(2), eq(3));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "@Test\r\n\tpublic void logTest() {\r\n\t\tlogger.info(\"Testando info\");\r\n\t\tlogger.debug(\"nao sera logado\" + \"Nice\");\r\n\t\tlogger.error(\"This is Error message\", new Exception(\"Testing\"));\r\n\t}", "@Override\n\tpublic void log(Level level, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "@Test\n\tpublic void logExceptionAndFormattedStringWithSingleObjectWithLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"Hello %s!\", \"Error\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"Hello %s!\"), eq(\"Error\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"Hello %s!\", \"Error\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"Hello %s!\"), eq(\"Error\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "@Test\n\tpublic void logExceptionAndFormattedStringWithTwoObjectsWithLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"%s = %d\", \"magic\", 42);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"%s = %d\"), eq(\"magic\"), eq(42));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logf(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"%s = %d\", \"magic\", 42);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(PrintfStyleFormatter.class), eq(\"%s = %d\"), eq(\"magic\"), eq(42));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "public static void main(String[] args)throws IOException ,SQLException {\nlog.debug(\"Hello this is a debug message\");\r\nlog.info(\"Hello this is a info message\");\r\nlog.warn(\"Sample warn message \");\r\nlog.error(\"Sample error message \");\r\nlog.fatal(\"Sample fatal message \");\r\n\r\n}", "@Test\n\tpublic void logExceptionAndFormattedMessageWithSingleArgumentAndLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logv(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"Hello {0}!\", \"World\");\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"Hello {0}!\"), eq(\"World\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"Hello {0}!\", \"World\");\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"Hello {0}!\"), eq(\"World\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "public void setLogFormat(String logFormat) {\n this.logFormat = logFormat;\n }", "@Test\n\tpublic void logExceptionAndFormattedMessageWithMultipleArgumentsAndLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.logv(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, exception, \"{0}, {1}, {2} or {3}\", 1, 2, 3, 4);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"{0}, {1}, {2} or {3}\"), eq(1), eq(2), eq(3), eq(4));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.logv(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, exception, \"{0}, {1}, {2} or {3}\", 1, 2, 3, 4);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"{0}, {1}, {2} or {3}\"), eq(1), eq(2), eq(3), eq(4));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "@FunctionalInterface\n public interface FormattedLogger {\n /**\n * Logs the specified message.\n *\n * @param format\n * A <a href=\"../util/Formatter.html#syntax\">format string</a>\n * @param args\n * Arguments referenced by the format specifiers in the format string. If there are more arguments than\n * format specifiers, the extra arguments are ignored. The number of arguments is variable and may be\n * zero.\n */\n @FormatMethod\n void print(String format, Object... args);\n }", "@Override\n\tpublic void printf(Level level, String format, Object... params) {\n\n\t}", "void log(Message message);", "@Override\n\tpublic void log(Level level, String message, Object p0, Object p1) {\n\n\t}", "public void log(String str)\n\t{\n\t\tDate date = new Date();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm\");\n\t\t\n\t\tString loggable = dateFormat.format(date) + \": \" + str;\n\t\t\n\t\t// Add it to the log\n\t\tthis.log.add(loggable);\n\t\t\n\t\t// Print it out, for now.\n\t\tSystem.out.println(loggable); \n\t}", "@Override\n\tpublic void log(Level level, String message, Supplier<?>... paramSuppliers) {\n\n\t}", "public static String format(Object val, String pattern)\n {\n try\n { \n\t return format(val, pattern, null, null);\n }\n catch(Exception ex)\n {\n\t log.error(ex, \"[NumberUtil] Error caught in method format\");\n\t return \"\";\n }\n }", "public void logData(){\n }", "private static void log(String msg) {\n System.out.println(msg);\n }", "private void log(String s) {\n RlogEx.i(TAG, s);\n }", "void initializeLogging();", "protected void println(String function, String msg) {\r\n if (this.logger != null) {\r\n this.logger.printDebug(msg);\r\n } else {\r\n println(this.getClass(), function, msg);\r\n }\r\n }", "LogLevel getLogLevel();", "@Override\n\tpublic void log(Level level, Marker marker, MessageSupplier msgSupplier) {\n\n\t}", "final void out (String msg1, String msg2) { if (m_debugMode) { Logger.print (msg1); Logger.println (msg2); } }", "public interface ILog {\n\n /**\n * Send an information level log message, used by time-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void info(String tag, String msg);\n\n\n /**\n * Send an warning level log message, used by exception-related log.\n *\n * @param tag Used to identify the source of a log message. It usually identifies\n * the class or activity where the log call occurs.\n * @param msg The message you would like logged.\n */\n void warn(String tag, String msg);\n}", "@Test\n\tpublic void logFormattedMessageAndExceptionWithLoggerClassName() {\n\t\tRuntimeException exception = new RuntimeException();\n\n\t\tlogger.log(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.DEBUG, \"Hello {0}!\", new Object[] { \"Error\" },\n\t\t\t\texception);\n\n\t\tif (debugEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.DEBUG), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"Hello {0}!\"), eq(\"Error\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\n\t\tlogger.log(TinylogLoggerTest.class.getName(), org.jboss.logging.Logger.Level.WARN, \"Hello {0}!\", new Object[] { \"Error\" },\n\t\t\t\texception);\n\n\t\tif (warnEnabled) {\n\t\t\tverify(provider).log(eq(TinylogLoggerTest.class.getName()), isNull(), eq(Level.WARN), same(exception),\n\t\t\t\t\tany(JavaTextMessageFormatFormatter.class), eq(\"Hello {0}!\"), eq(\"Error\"));\n\t\t} else {\n\t\t\tverify(provider, never()).log(anyInt(), anyString(), any(), any(), any(), any(), any());\n\t\t}\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void log(Marker level, String... message);" ]
[ "0.6713397", "0.6647423", "0.65992105", "0.658792", "0.65851676", "0.65391695", "0.63658303", "0.63411164", "0.6307823", "0.6301569", "0.6268411", "0.6227676", "0.6185854", "0.6185854", "0.6185854", "0.61645454", "0.6160456", "0.61536014", "0.61235696", "0.6120511", "0.6073743", "0.60694623", "0.60482615", "0.59993696", "0.5977505", "0.59491134", "0.5909821", "0.5904222", "0.59022516", "0.5900604", "0.5900168", "0.5889115", "0.5881922", "0.58647215", "0.5864611", "0.586388", "0.5854248", "0.58178246", "0.58169377", "0.58093643", "0.58057714", "0.5796372", "0.57931685", "0.57870156", "0.57840014", "0.5773124", "0.576252", "0.5754172", "0.5752867", "0.57369995", "0.5736069", "0.5735242", "0.57348883", "0.5724831", "0.5713678", "0.5712", "0.5711593", "0.5702549", "0.5697513", "0.56869537", "0.56847286", "0.5684159", "0.5678319", "0.56772757", "0.5674414", "0.5672075", "0.56689024", "0.56666285", "0.56622607", "0.56548953", "0.5654717", "0.5652943", "0.5652173", "0.5649363", "0.56464183", "0.56451255", "0.5641018", "0.56388116", "0.5635696", "0.5633213", "0.562892", "0.562546", "0.5622127", "0.5617108", "0.56105375", "0.5609685", "0.56092864", "0.5603847", "0.55995935", "0.55983734", "0.5596555", "0.55947316", "0.5589487", "0.55841434", "0.55801773", "0.55714893", "0.55649763", "0.5558304", "0.5558304", "0.5558304", "0.55574185" ]
0.0
-1
Devuelve un array de String tomando como fin el ultimo char de separators
public static String[] bytesToStringArray(byte[] array, char start, char... separators) { List<String> retVal = new ArrayList<String>(); StringBuilder token = new StringBuilder(); boolean isStarted = false; Character end = separators[separators.length - 1]; List<Character> separator = new ArrayList<Character>(); for(int i = 0; i < (separators.length - 1); i++) { separator.add(separators[i]); } for (byte b : array) { if (b == end) { if (token.length() > 0) { retVal.add(token.toString()); } break; } if (isStarted) { if (separator.contains((Character) (char) b)) { retVal.add(token.toString()); token = new StringBuilder(); continue; } token.append((char) b); } if (b == start) { isStarted = true; } } return retVal.toArray(new String[]{}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Set<Character> createSeparators() {\r\n Set<Character> separators = new Set1L<>();\r\n final char[] arrayOfSeps = { '!', ',', '.', ' ', '\"', ';', ':', '(',\r\n ')', '?', '/', '-' };\r\n //Above: array of chosen separators to be read into a Set<Character>\r\n\r\n for (int i = 0; i < arrayOfSeps.length; i++) {\r\n separators.add(arrayOfSeps[i]);\r\n }\r\n return separators;\r\n }", "private String[] getDelimiters(String numbers) {\n String firstLine = numbers.lines().findFirst().orElse(\"\");\n\n if (firstLine.startsWith(\"//\")) {\n StringBuilder delimiter = new StringBuilder();\n\n List<String> delimiters = new ArrayList<>();\n\n for (int i = 2; i < firstLine.length(); i++) {\n if (firstLine.charAt(i) == ']') {\n delimiters.add(delimiter.toString());\n delimiter = new StringBuilder();\n } else if (firstLine.charAt(i) != '[') {\n delimiter.append(firstLine.charAt(i));\n }\n }\n return delimiters.stream().sorted((s, t1) -> t1.length() - s.length())\n .toArray(String[]::new);\n }\n\n return new String[0];\n }", "private String convertToString(ArrayList<String> arr, char sep) {\n StringBuilder builder = new StringBuilder();\n // Append all Integers in StringBuilder to the StringBuilder.\n for (String str : arr) {\n builder.append(str);\n builder.append(sep);\n }\n // Remove last delimiter with setLength.\n builder.setLength(builder.length() - 1);\n return builder.toString();\n }", "public static String[] split(char delim, String seq) {\n List<String> result = new ArrayList<>(20);\n int max = seq.length();\n int start = 0;\n for (int i = 0; i < max; i++) {\n char c = seq.charAt(i);\n boolean last = i == max - 1;\n if (c == delim || last) {\n result.add(seq.substring(start, last ? c == delim ? i : i + 1 : i));\n start = i + 1;\n }\n }\n return result.toArray(new String[result.size()]);\n }", "public static String[] split(String str, String separator, int max) {\n\t\tStringTokenizer tok = null;\n\t\tif (separator == null) {\n\t\t\t// Null separator means we're using StringTokenizer's default\n\t\t\t// delimiter, which comprises all whitespace characters.\n\t\t\ttok = new StringTokenizer(str);\n\t\t} else {\n\t\t\ttok = new StringTokenizer(str, separator);\n\t\t}\n\n\t\tint listSize = tok.countTokens();\n\t\tif (max > 0 && listSize > max) {\n\t\t\tlistSize = max;\n\t\t}\n\n\t\tString[] list = new String[listSize];\n\t\tint i = 0;\n\t\tint lastTokenBegin = 0;\n\t\tint lastTokenEnd = 0;\n\t\twhile (tok.hasMoreTokens()) {\n\t\t\tif (max > 0 && i == listSize - 1) {\n\t\t\t\t// In the situation where we hit the max yet have\n\t\t\t\t// tokens left over in our input, the last list\n\t\t\t\t// element gets all remaining text.\n\t\t\t\tString endToken = tok.nextToken();\n\t\t\t\tlastTokenBegin = str.indexOf(endToken, lastTokenEnd);\n\t\t\t\tlist[i] = str.substring(lastTokenBegin);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlist[i] = tok.nextToken();\n\t\t\tlastTokenBegin = str.indexOf(list[i], lastTokenEnd);\n\t\t\tlastTokenEnd = lastTokenBegin + list[i].length();\n\t\t\ti++;\n\t\t}\n\t\treturn list;\n\t}", "public static String[] explode(char separator, String string) {\n\t if (string == null) return null;\n\t int len = string.length();\n\t int start = 0;\n\t int end;\n\t ArrayList<String> res = new ArrayList<String>(5);\n\t while (start < len) {\n\t\t end = string.indexOf(separator, start);\n\t\t if (end < 0) end = len;\n\t\t res.add(string.substring(start, end));\n\t\t start = end + 1;\n\t }\n\t return res.toArray(new String[res.size()]);\n }", "public static String[] split(String s) {\n int cp = 0; // Cantidad de palabras\n\n // Recorremos en busca de espacios\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ') { // Si es un espacio\n cp++; // Aumentamos en uno la cantidad de palabras\n }\n }\n\n // \"Este blog es genial\" tiene 3 espacios y 3 + 1 palabras\n String[] partes = new String[cp + 1];\n for (int i = 0; i < partes.length; i++) {\n partes[i] = \"\"; // Se inicializa en \"\" en lugar de null (defecto)\n }\n\n int ind = 0; // Creamos un índice para las palabras\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == ' ') { // Si hay un espacio\n ind++; // Pasamos a la siguiente palabra\n continue; // Próximo i\n }\n partes[ind] += s.charAt(i); // Sino, agregamos el carácter a la palabra actual\n }\n return partes; // Devolvemos las partes\n }", "public static int[] getDelimiters(String s){\n\t\tint len=s.length();\n\t\tint nb_token=0;\n\t\tboolean previous_is_delimiter=true;\n\t\tfor (int i=0; i<len; i++){\n\t\t\tchar c=s.charAt(i);\n\t\t\tif (tokenize_isdelim(c)){\n\t\t\t\tif (!previous_is_delimiter){\n\t\t\t\t\tnb_token++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (previous_is_delimiter){\n\t\t\t\t\tnb_token++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=false;\n\t\t\t}\n\t\t}\n\t\tint[] delimiters=new int[nb_token];\n\t\tint counter=0;\n\t\tprevious_is_delimiter=true;\n\t\tfor (int i=0; i<len; i++){\n\t\t\tchar c=s.charAt(i);\n\t\t\tif (tokenize_isdelim(c)){\n\t\t\t\tif (!previous_is_delimiter){\n\t\t\t\t\tdelimiters[counter]=i;\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif (previous_is_delimiter){\n\t\t\t\t\tdelimiters[counter]=i;\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t\tprevious_is_delimiter=false;\n\t\t\t}\n\t\t}\n\t\treturn delimiters;\n\t\t\n\t}", "private String [] splitString(String name) {\r\n String [] parts = {\"\", \"\"};\r\n if (name != null) {\r\n String [] t = StringExtend.toArray(name, \".\", false);\r\n if (t.length == 3) {\r\n parts [0] = t [0] + \".\" + t [1];\r\n parts [1] = t [2];\r\n }\r\n else if (t.length == 2) {\r\n parts [0] = t [0]; parts [1] = t [1];\r\n }\r\n else if (t.length == 1) {\r\n parts [1] = t [0];\r\n }\r\n }\r\n\r\n return parts;\r\n }", "public static String[] splitLongString(String str, char separator)\n {\n int len = (str == null) ? 0 : str.length();\n if (str == null || len == 0)\n {\n return ArrayUtils.EMPTY_STRING_ARRAY;\n }\n\n int oldPos = 0;\n ArrayList list = new ArrayList();\n int pos = str.indexOf(separator);\n while (pos >= 0)\n {\n list.add(substring(str, oldPos, pos));\n oldPos = (pos + 1);\n pos = str.indexOf(separator, oldPos);\n }\n\n list.add(substring(str, oldPos, len));\n\n return (String[]) list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);\n }", "public String[] splitBySplitter(String s) {\r\n\t\tString[] returnArray = new String[4];\r\n\t\treturnArray = s.split(\"-\");\r\n\t\treturn returnArray;\r\n\t}", "public static String getDelimiters(String numbers) {\n\t\tString delimiters = \"\";\n\t\tMatcher m = Pattern.compile(\"\\\\[([^]]*)\\\\]\").matcher(numbers);\n List<String> allDelimiters = new ArrayList<>();\n while (m.find()) {\n \tallDelimiters.add(m.group().replace(\"[\",\"\").replace(\"]\",\"\"));\n }\n \n for(String d : allDelimiters) {\n \tdelimiters += (delimiters.length() > 0 ? \"|\" : \"\") + d;\n }\n \n return delimiters;\n\t}", "private static String[] getOperations(String input) {\n\t\treturn input.replaceAll(\"[ ]\", \"\").split(\"[;]\");\n\t}", "private static String[] sepInst(String inst){\n\n String[] separated = new String[3];\n separated[0] = inst.substring(0, inst.indexOf(' '));\n if(-1 == inst.indexOf(',')){//enters if when only one variable\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.length());\n }else{//enters else when only when two variables\n separated[1] = inst.substring(inst.indexOf(' ')+1, inst.indexOf(','));\n separated[2] = inst.substring(inst.indexOf(',')+2, inst.length());\n }//end ifelse\n\n return separated;\n }", "protected String[] arrayParser(String item){\n return item.replaceAll(\"\\\\{|\\\\}|\\\\[|\\\\]|(\\\\d+\\\":)|\\\"|\\\\\\\\\", \"\").split(\",\");\n }", "public static String[] splitSepValuesLine(String s, String delimiter, boolean remCommas) {\n\t\tLinkedList<String> output = new LinkedList<String>();\n\t\tString curVal = \"\";\n\t\tboolean inQuotes = false;\n\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\tchar curChar = s.charAt(i);\n\t\t\tif (curChar == '\\\"')\n\t\t\t\tinQuotes = !inQuotes;\n\t\t\telse if (curChar == delimiter.charAt(0) && !inQuotes) {\n\t\t\t\tString toAdd = curVal.trim();\n\t\t\t\tif (remCommas)\n\t\t\t\t\ttoAdd=removeCommas(toAdd);\n\t\t\t\toutput.add(toAdd);\n\t\t\t\tcurVal = \"\";\n\t\t\t} else {\n\t\t\t\tcurVal += curChar;\n\t\t\t}\n\t\t}\n\t\tif (curVal.length() > 0) {\n\t\t\tString toAdd = curVal.trim();\n\t\t\tif (remCommas)\n\t\t\t\ttoAdd=removeCommas(toAdd);\n\t\t\toutput.add(toAdd);\n\t\t}\n\t\tString[] outputArr = new String[output.size()];\n\t\toutput.toArray(outputArr);\n\t\treturn outputArr;\n\t}", "public static String[] splitShortString(String str, char separator)\n {\n int len = (str == null) ? 0 : str.length();\n if (str == null || len == 0)\n {\n return org.apache.myfaces.util.lang.ArrayUtils.EMPTY_STRING_ARRAY;\n }\n\n int lastTokenIndex = 0;\n\n // Step 1: how many substrings?\n // We exchange double scan time for less memory allocation\n for (int pos = str.indexOf(separator);\n pos >= 0; pos = str.indexOf(separator, pos + 1))\n {\n lastTokenIndex++;\n }\n\n // Step 2: allocate exact size array\n String[] list = new String[lastTokenIndex + 1];\n\n int oldPos = 0;\n\n // Step 3: retrieve substrings\n int pos = str.indexOf(separator);\n int i = 0;\n \n while (pos >= 0)\n {\n list[i++] = substring(str, oldPos, pos);\n oldPos = (pos + 1);\n pos = str.indexOf(separator, oldPos);\n }\n\n list[lastTokenIndex] = substring(str, oldPos, len);\n\n return list;\n }", "private static char[] groupBy(char[] values){\n\t\tString result = \"\";\n\t\tchar last = 0;\n\t\tchar counter=0;\n\t\tfor(char i=0;i<values.length;i++){\n\t\t\tif(i==0) {\n\t\t\t\tlast=values[0];\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif(values[i]!=last){\n\t\t\t\t\tresult+=last;\n\t\t\t\t\tresult+=counter;\n\t\t\t\t\tcounter=1;\n\t\t\t\t\tlast=values[i];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tresult+=last;\n\t\tresult+=counter;\n\t\treturn result.toCharArray();\n\t}", "public List<String> GetAssegnamentiInCorso() {\n String str = \"Guillizzoni-Coca Cola Spa1-DRYSZO,Rossi-Coca Cola Spa2-DRYSZ2\";\n StringaAssegnamenti = str;\n StringaAssegnamenti = \"\";\n \n\tList<String> items = Arrays.asList(str.split(\"\\\\s*,\\\\s*\"));\n return items;\n }", "private String[] parseArray(String val) {\n String[] arrayVals;\n val = val.trim();\n if (emptyVal(val)) {\n arrayVals = Constants.EMPTY_STRING_ARRAY;\n } else {\n arrayVals = val.split(\"\\\\s+\");\n }\n return arrayVals;\n }", "public static String[] split(String s, String sep)\r\n {\r\n if (s == null)\r\n return new String[0];\r\n \r\n if (s.trim().length() == 0 || sep == null || sep.length() == 0)\r\n return new String[]{s};\r\n \r\n List list = new ArrayList();\r\n int k1 = 0;\r\n int k2;\r\n while ((k2 = s.indexOf(sep, k1)) >= 0)\r\n {\r\n list.add(s.substring(k1, k2));\r\n k1 = k2 + 1;\r\n }\r\n list.add(s.substring(k1));\r\n \r\n return (String[]) list.toArray(new String[list.size()]);\r\n }", "public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}", "public ArrayList separarRut(String rut){\r\n this.lista = new ArrayList<>();\r\n if(rut.length()==12 || rut.length()==11){ \r\n if(rut.length()==12){\r\n this.lista.add(Character.toString(rut.charAt(0))+Character.toString(rut.charAt(1)));\r\n this.lista.add(Character.toString(rut.charAt(3))+Character.toString(rut.charAt(4))+Character.toString(rut.charAt(5)));\r\n this.lista.add(Character.toString(rut.charAt(7))+Character.toString(rut.charAt(8))+Character.toString(rut.charAt(9)));\r\n this.lista.add(Character.toString(rut.charAt(11)));\r\n }else{\r\n this.lista.add(Character.toString(rut.charAt(0)));\r\n this.lista.add(Character.toString(rut.charAt(2))+Character.toString(rut.charAt(3))+Character.toString(rut.charAt(4)));\r\n this.lista.add(Character.toString(rut.charAt(6))+Character.toString(rut.charAt(7))+Character.toString(rut.charAt(8)));\r\n this.lista.add(Character.toString(rut.charAt(10)));\r\n } \r\n } \r\n return this.lista;\r\n }", "private static String[] AddCorsa(int i) {\r\n Scanner scanner = new Scanner(System.in);\r\n String[] Corsa;\r\n String orari = \"\";\r\n System.out.println(\"Inserisci gli orari della corsa \" + i + \"(:ogni orario deve essere diviso da una ,)\");\r\n orari = scanner.nextLine();\r\n orari+=\", \";\r\n Corsa = orari.split(\",\");\r\n return Corsa;\r\n }", "public static String[] svStringToArray(String sv, String separator) {\n String[] split = sv.split(separator);\n for (int i = 0; i < split.length; i++) {\n split[i] = split[i].trim();\n }\n return split;\n }", "String[] getLegalLineDelimiters();", "private ArrayList<String> convertChar() {\r\n \tArrayList<String> patterns = new ArrayList<String>();\r\n \tfor (int i = 0; i < this.patterns.size(); i++) {\r\n \t\tString s = \"\";\r\n \t\tfor (int j = 0; j < this.patterns.get(i).length; j++) {\r\n \t\t\ts += this.patterns.get(i)[j];\r\n \t\t}\r\n \t\tpatterns.add(s);\r\n \t}\r\n \treturn patterns;\r\n }", "public static String[] split(String toSplit, char spliter){\n String[] endStringArray = new String[4];\n StringBuilder st = new StringBuilder();\n int i = 0;\n for (int j = 0; j < toSplit.length(); j++){\n if (toSplit.charAt(j) != spliter){\n st.append(toSplit.charAt(j));\n }\n else{\n endStringArray[i] = st.toString();\n st = new StringBuilder();\n i++;\n }\n }\n endStringArray[i] = st.toString();\n int size = 0;\n for (String s : endStringArray){\n if (s != null)\n size++;\n }\n String[] reducedArray = new String[size];\n System.arraycopy(endStringArray, 0, reducedArray, 0, size);\n return reducedArray;\n }", "private String[] separarCoordenadas(String pCasilla){\n\t\treturn pCasilla.split(\",\");\n\t}", "public static String[] recorrerElementos(String[] arr){\n\n int maxLenght = maxLength(arr);\n for (int i = maxLenght-1; i >= 0 ; i--){\n HashMap listas = getListas(10);\n for(String arrayElement: arr){\n String key = \"L\" + arrayElement.charAt(i);\n\n ArrayList<String> itemsList = (ArrayList<String>) listas.get(key);\n itemsList.add(arrayElement);\n }\n arr = getNewArray(listas);\n }\n return arr;\n }", "public static String SeperateStrings(String separator, String[] strings){\r\n\t\tString rvString = \"\";\r\n\t\tfor (int i = 0; i < strings.length; i++) {\r\n\t\t\t//add seperator when the amount of strings is more than 1\r\n\t\t\tif (i != 0) {\r\n\t\t\t\trvString += separator;\r\n\t\t\t}\r\n\t\t\trvString += strings[i];\r\n\t\t}\r\n\t\treturn rvString;\r\n\t}", "public static String[] split(String src, String sep) {\n if (src == null || src.equals(\"\") || sep == null || sep.equals(\"\")) return new String[0];\n List<String> v = new ArrayList<String>();\n int idx;\n int len = sep.length();\n while ((idx = src.indexOf(sep)) != -1) {\n v.add(src.substring(0, idx));\n idx += len;\n src = src.substring(idx);\n }\n v.add(src);\n return (String[]) v.toArray(new String[0]);\n }", "public List<String> remake_array(List<String> lists){\n List<String> listItemtemp = new ArrayList<>();\n for (int i = 0; i < lists.size(); i++) {\n listItemtemp.add(i + 1 + \". \" + lists.get(i).substring(3).trim());\n }\n return listItemtemp;\n\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint a [] = {1,0,0,1,1,0,0,1,0,1,0,0,0,1};\r\n\t\t\r\n\t\tboolean start = false;\r\n\t\t//boolean end = false;\r\n\t\tString s = \"\";\r\n\t\tString k = Arrays.toString(a);\r\n\t\tString[] strings = (k.replace(\"[\", \"\").replace(\"]\", \"\").split(\", \"));\r\n\t\tString s1 = (k.replace(\"[\", \"\").replace(\"]\", \"\"));\r\n\t\tString s2 = (s1.replace(\",\", \"\"));\r\n\t\tString s3 = s2.replaceAll(\"\\\\s\", \"\");\r\n\t\t//String stringss = strings.toString();\r\n\t\t//String[] stringss = strings.replaceAll(\"\\\\s\", \"\").split(\"\");\r\n\t\t\r\n\t\tint Startindex = 0;\r\n\t\tint Endindex = 0;\r\n\t\tArrayList<String> ai = new ArrayList<String>();\r\n\t\tfor (int i =0;i<=strings.length-1;i++) {\r\n\t\t\tint result = Integer.parseInt(strings[i]);\r\n\t\t\t\r\n\t\t\tif (result==1 && !start) {\r\n\t\t\t\t\r\n\t\t\t\tstart = true;\r\n\t\t\t\tStartindex = i;\r\n\t\t\t\t\r\n\t\t\t}else if (result==1 && start) {\r\n\t\t\t\tstart = false;\r\n\t\t\t\tEndindex = i;\r\n\t\t\t\ts = s3.substring(Startindex, Endindex+1);\r\n\t\t\t\tai.add(s);\r\n\t\t\t\ti =i-1;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\nSystem.out.println(ai);\r\n\t}", "public static String[] stringToStringArray(String instr, String delim)\n throws NoSuchElementException, NumberFormatException {\n StringTokenizer toker = new StringTokenizer(instr, delim);\n String stringArray[] = new String[toker.countTokens()];\n int i = 0;\n \n while (toker.hasMoreTokens()) {\n stringArray[i++] = toker.nextToken();\n }\n return stringArray;\n }", "public static String[] convertStringToArray(String str){\n String[] arr = str.split(strSeparator);\n return arr;\n }", "static void separarString(String s){\n\t\tString[] palabras = s.split(\"[ ]\");\n\t\tfor(int i = 0; i < palabras.length; i++){\n\t\t\tpalabras[i] = limpia(palabras[i]);\n\t\t\tSystem.out.println(palabras[i]);\n\t\t}\n\t}", "private String[] BreakDiscoveryMessageToStrings(String input) {\n return input.split(\"[\" + Constants.STANDART_FIELD_SEPERATOR + \"]\"); //parse the string by the separator char\n }", "String getEndSplited();", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "@Test\n public void canParseSeparator(){\n int[] i = null;\n try {\n i = SUT.getColumnWidthsFromString(\"1,2,3\");\n } catch (ImportException e) {\n Assert.fail(e.getMessage());\n }\n\n Assert.assertNotNull(i);\n Assert.assertEquals(i[0], 1);\n Assert.assertEquals(i[1], 2);\n Assert.assertEquals(i[2], 3);\n }", "public static void main3(String[] args) {\n String str = \"192*168*1*1\";\n\n //String [] strings = str.split(\"\\\\.\");\n String [] strings = str.split(\"\\\\*\");\n //为什么需要两个斜杠 在本来的情况下 \\ +要转义的字符就可以了\n //但是此时在在\"\"里面不知道\\是干什么的 需要两个斜杠\n for(String s : strings) {\n System.out.println(s);\n }\n }", "public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}", "public String[] displayLineSeparators(String[] input) {\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i] != null) {\n\t\t\t\tinput[i] = input[i].replaceAll(\"\\\\n\", \"\\\\\\\\n\");\n\t\t\t\tinput[i] = input[i].replaceAll(\"\\\\r\", \"\\\\\\\\r\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\n\t}", "protected String[] in2post(String[] a){\n String[] result = new String[20];\n int resCount = 0;\n Stack<String> stack = new Stack<String>();\n String s;\n\n for (int i=0 ; i<(tail) ; i++) {\n s = a[i];\n\n switch (s) {\n case \"/\":\n case \"*\":\n case \"-\":\n case \"+\":\n while (!stack.isEmpty() && Prec(s) <= Prec(stack.peek())) {\n result[resCount++] = stack.pop();\n }\n stack.push(s);\n break;\n case \"(\":\n stack.push(s);\n break;\n case \")\":\n while (!stack.isEmpty() && stack.peek() != \"(\") {\n result[resCount++] = stack.pop();\n }\n stack.pop(); //pop the open parentheses\n break;\n default: //by this point assume it is a number\n result[resCount++] = s;\n }\n }\n\n // pop all the operators from the stack\n while (!stack.isEmpty()){\n result[resCount++] = stack.pop();\n }\n\n tail = resCount;\n return result;\n }", "public void rozseparujDokladnie() {\r\n\t\tboolean wSpacjach, wWyrazie;\r\n\t\tString[] liniaRozseparowana = null;\r\n\t\tArrayList<Integer> lista = null;\r\n\t\tArrayList<String> lista2 = null;\r\n\r\n\t\tfor (String linia : calaZawartosc) {\r\n\t\t\twSpacjach = false;\r\n\t\t\twWyrazie = false;\r\n\r\n\t\t\tlista = new ArrayList<Integer>();\r\n\r\n\t\t\tfor (int i = 0; i < linia.length(); ++i) {\r\n\t\t\t\tif (Character.isWhitespace(linia.charAt(i))) {\r\n\t\t\t\t\tif (!wSpacjach) {\r\n\t\t\t\t\t\twSpacjach = true;\r\n\t\t\t\t\t\twWyrazie = false;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (!wWyrazie) {\r\n\t\t\t\t\t\twSpacjach = false;\r\n\t\t\t\t\t\twWyrazie = true;\r\n\t\t\t\t\t\tlista.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tlista.add(linia.length());\r\n\r\n\t\t\tlista2 = new ArrayList<String>();\r\n\r\n\t\t\tfor (int i = 0; i < lista.size() - 1; ++i)\r\n\t\t\t\tlista2.add(linia.substring(lista.get(i), lista.get(i + 1)));\r\n\r\n\t\t\tliniaRozseparowana = new String[lista2.size()];\r\n\t\t\tfor (int i = 0; i < liniaRozseparowana.length; ++i) {\r\n\t\t\t\tliniaRozseparowana[i] = lista2.get(i);\r\n\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(liniaRozseparowana);\r\n\t\t}\r\n\t}", "public Number[] stringToArrayNumberParser(String string) {\n int stringLength = string.length();\n int arrayLength = (int) (stringLength / 3 * 2 + 5);\n Number[] array = new Number[arrayLength];\n int lastFreeArrayIndex = 0;\n int numberBeginIndex = 0;\n int numberEndIndex = 0;\n char currentCharacter;\n Number number;\n int index;\n boolean isFoundNumber = false;\n for (index = 0; index < stringLength; index++) {\n boolean isSeparator = false;\n currentCharacter = string.charAt(index);\n for (int separatorIndex = 0; separatorIndex < allowedSeparators.length; separatorIndex++) {\n if (currentCharacter == allowedSeparators[separatorIndex]) {\n isSeparator = true;\n }\n }\n if (!isSeparator && !isFoundNumber) {\n isFoundNumber = true; //if not a separator and the first digit of the number\n numberBeginIndex = index;\n } else if (isSeparator && isFoundNumber) {\n isFoundNumber = false; //if separator, after the start of the number\n numberEndIndex = index - 1;\n System.out.println(\"length \" + string.length());\n System.out.println(\"begin: \" + numberBeginIndex);\n System.out.println(\"end \" + (numberEndIndex + 1));\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex);\n lastFreeArrayIndex++;\n }\n }\n if (isFoundNumber) {\n numberEndIndex = index - 1;\n number = Double.parseDouble(string.substring(numberBeginIndex, numberEndIndex + 1));\n addNumberToArrayByIndex(array, number, lastFreeArrayIndex); //case, where the number is the last element of the string\n lastFreeArrayIndex++;\n }\n return arrayFinalFormation(array, lastFreeArrayIndex);\n }", "public static String arrayToSeparatedString(String[] arr, char separator) {\n return String.join(Character.toString(separator), arr);\n }", "public static void main(String[] args) {\nString str=\"This is Batch \";\nString Arr[]=str.split(\"i\");\nSystem.out.println(Arr.length);\nSystem.out.println(Arr[0]);\nSystem.out.println(Arr[1]);\nSystem.out.println(Arr[2]);\n\t}", "public static String[] splitMessage(String msg){\n\t\t\n\t\tString content = msg;\n\t\tString[] msgArray = new String[msg.length()/252];\n\t\tint i=0;\n\t\twhile(content.length() >= 252) {\n\t\t msgArray[i] = content.substring(0, 252);\n\t\t i++;\n\t\t content = content.substring(252);\n\t\t}\n\t\treturn msgArray;\n\t}", "public void rozseparujWytnijBialeZnaki() {\r\n\t\tString[] bufor;\r\n\t\tString[] tablicaWynik;\r\n\t\tint licznik;\r\n\t\tint m;\r\n\t\tfor (String s : calaZawartosc) {\r\n\t\t\tbufor = s.split(\"[\\\\s]+\");\r\n\t\t\tlicznik = 0;\r\n\r\n\t\t\tfor (int i = 0; i < bufor.length; ++i)\r\n\t\t\t\tif (!bufor[i].equals(\"\")) {\r\n\t\t\t\t\t++licznik;\r\n\t\t\t\t}\r\n\r\n\t\t\ttablicaWynik = new String[2 * licznik];\r\n\r\n\t\t\tm = 0;\r\n\r\n\t\t\tfor (String str : bufor)\r\n\t\t\t\tif (!str.equals(\"\")) {\r\n\t\t\t\t\ttablicaWynik[m] = str;\r\n\t\t\t\t\ttablicaWynik[m + 1] = \" \";\r\n\t\t\t\t\t++m;\r\n\t\t\t\t\t++m;\r\n\t\t\t\t}\r\n\r\n\t\t\tcalaZawartoscRozsep.add(tablicaWynik);\r\n\t\t}\r\n\t}", "public String[] readAllStrings(){\n\t\tString[] tokens=WHITESPACE_PATTERN.split(readAll());\n\t\tif (tokens.length==0||tokens[0].length()>0)\n\t\t\treturn tokens;\n\t\tString[] decapitokens=new String[tokens.length-1];\n\t\tfor (int i=0;i<tokens.length-1;i++){\n\t\t\tdecapitokens[i]=tokens[i+1];\n\t\t}\n\t\treturn decapitokens;\n\t}", "public static String[] splitPurified(String s, String delim) {\n String[] result = null;\n if (s != null && s.length() > 0) {\n String[] input = s.split(delim);\n result = new String[input.length];\n int i = 0;\n for (String v : input) {\n result[i] = v != null ? v.trim() : \"\";\n i++;\n }\n }\n return result;\n }", "private ArrayList<Character> retornarListaCaracteres() {\n ArrayList<Character> validaciones = new ArrayList<Character>();\n validaciones.add('.');\n validaciones.add('/');\n validaciones.add('|');\n validaciones.add('=');\n validaciones.add('?');\n validaciones.add('¿');\n validaciones.add('´');\n validaciones.add('¨');\n validaciones.add('{');\n validaciones.add('}');\n validaciones.add(';');\n validaciones.add(':');\n validaciones.add('_');\n validaciones.add('^');\n validaciones.add('-');\n validaciones.add('!');\n validaciones.add('\"');\n validaciones.add('#');\n validaciones.add('$');\n validaciones.add('%');\n validaciones.add('&');\n validaciones.add('(');\n validaciones.add(')');\n validaciones.add('¡');\n validaciones.add(']');\n validaciones.add('*');\n validaciones.add('[');\n validaciones.add(',');\n validaciones.add('°');\n\n return validaciones;\n }", "public static String[] split(String s,boolean check)\r\n\t{\r\n\t\tif(check)\r\n\t\t{\r\n\t\t\tif(!checksum(s))\r\n\t\t\t\tthrow new OpenNMEAException(\"Invalid or missing checksum\");\r\n\t\t\ttrim(s);\r\n\t\t}\r\n\t\ts+='*';\r\n\t\tString[] a=s.split(\",\");\r\n\t\ta[a.length-1]=a[a.length-1].substring(0,a[a.length-1].length()-1);\r\n\t\treturn a;\r\n\t}", "private String[] fixStringArray(String[] input) {\n\n List<String> loutput = new ArrayList<String>();\n\n for (String st : input) {\n if (!\"\".equalsIgnoreCase(st)) {\n loutput.add(st);\n }\n }\n String[] output = new String[loutput.size()];\n for (int i = 0; i < loutput.size(); i++) {\n output[i] = loutput.get(i);\n }\n return output;\n }", "private static ArrayIterator<String> splitString(String base, String delimiter) {\r\n\t\tString[] substrings = base.split(delimiter);\r\n\t\treturn ArrayIterator.create(substrings);\r\n\t}", "public static String[] splitString(String str) {\r\n String line = str.trim();\r\n String info = \"\";\r\n String areas = \"\";\r\n for (int i = 0; i < line.length(); i ++) {\r\n if (i <= 6)\r\n info += line.charAt(i);\r\n else\r\n areas += line.charAt(i);\r\n }\r\n info = info.trim();\r\n areas = areas.trim();\r\n String[] splitString = new String[]{info, areas};\r\n return splitString;\r\n }", "private static int nextSeparator(AnalyzedTokenReadings[] tokens, int start) {\n for(int i = start; i < tokens.length; i++) {\n if(isSeparator(tokens[i].getToken())) {\n return i;\n }\n }\n return tokens.length - 1;\n }", "private String[] commaDelimited(String str) {\n StringTokenizer st = new StringTokenizer(str,\",\");\n String strs[] = new String[st.countTokens()];\n for (int i=0;i<strs.length;i++) strs[i] = Utils.decFmURL(st.nextToken());\n return strs;\n }", "public static String[] returnGroupDecimalSep()\n {\n String[] returnVal = new String[]{\",\",\".\"};\n // if at level of presentation level then take the separators from session\n if(ActionContext.getContext() != null && ServletActionContext.getRequest() != null)\n {\n \t HashMap<String , Object> theFormats = RootUtil.returnNumberFormat(ServletActionContext.getRequest().getSession());\n \t returnVal[0] = StringUtil.nullEmptyToValue(theFormats.get(\"groupSepa\"), \",\");\n \t returnVal[1] = StringUtil.nullEmptyToValue(theFormats.get(\"decimalSepa\"), \".\");\n }\n else\n {\n \t// if there is not session then need to take the separators from initial load if available\n \tif(ConstantsCommon.PATH_GROUP_SEPARATOR != null)\n \t{\n \t returnVal[0] = ConstantsCommon.PATH_GROUP_SEPARATOR;\n \t}\n \tif(ConstantsCommon.PATH_DECIMAL_SEPARATOR != null)\n \t{\n \t returnVal[1] = ConstantsCommon.PATH_DECIMAL_SEPARATOR;\n \t}\n }\n return returnVal;\n }", "private static int[] getFechaInt(String fecha) {\n int[] fechas = new int[3];\n int cont = 0;\n String num = \"\";\n for (int i = 0; i < fecha.length(); i++) {\n if (fecha.charAt(i) != '/') {\n if(fecha.charAt(i) != '-'){\n num += fecha.charAt(i);\n if (cont == 1) {\n fechas[1] = Integer.parseInt(num);\n num = \"\";\n } else if (cont == 3) {\n fechas[0] = Integer.parseInt(num);\n num = \"\";\n } else if (cont == 7) {\n fechas[2] = Integer.parseInt(num);\n num = \"\";\n }\n cont++;\n }\n }\n }\n return fechas;\n }", "public static List toListOfStringsDelimitedByCommaOrSemicolon(String s) {\n if (s == null) {\n return Collections.EMPTY_LIST;\n }\n\n List results = new ArrayList();\n // include empty last one, cft. http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split%28java.lang.String,%20int%29\n String[] terms = s.split(SEPARATOR,-1);\n\n for (int i = 0; i < terms.length; i++) {\n //this has empty string if nothing is found\n String term = terms[i].trim();\n results.add(term);\n }\n\n return results;\n }", "public static String[] strParts(String string, String delim) {\r\n //StringTokenizer st = new StringTokenizer(string);\r\n String[] strings = string.split(delim);\r\n return removeSpaces(strings);\r\n }", "String getSeparator();", "private static String[] splitString(String stringToSplit, String delimiter, boolean takeDelimiter)\n\t{\n\t\tString[] aRet;\n\t\tint iLast;\n\t\tint iFrom;\n\t\tint iFound;\n\t\tint iRecords;\n\t\tint iJump;\n\n\t\t// return Blank Array if stringToSplit == \"\")\n\t\tif (stringToSplit.equals(\"\")) { return new String[0]; }\n\n\t\t// count Field Entries\n\t\tiFrom = 0;\n\t\tiRecords = 0;\n\t\twhile (true)\n\t\t{\n\t\t\tiFound = stringToSplit.indexOf(delimiter, iFrom);\n\t\t\tif (iFound == -1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tiRecords += (takeDelimiter ? 2 : 1);\n\t\t\tiFrom = iFound + delimiter.length();\n\t\t}\n\t\tiRecords = iRecords + 1;\n\n\t\t// populate aRet[]\n\t\taRet = new String[iRecords];\n\t\tif (iRecords == 1)\n\t\t{\n\t\t\taRet[0] = stringToSplit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tiLast = 0;\n\t\t\tiFrom = 0;\n\t\t\tiFound = 0;\n\t\t\tiJump = 0;\n\t\t\tfor (int i = 0; i < iRecords; i++)\n\t\t\t{\n\t\t\t\tiFound = stringToSplit.indexOf(delimiter, iFrom);\n\t\t\t\tif (takeDelimiter)\n\t\t\t\t{\n\t\t\t\t\tiJump = (iFrom == iFound ? delimiter.length() : 0);\n\t\t\t\t\tiFound += iJump;\n\t\t\t\t}\n\t\t\t\tif (iFound == -1)\n\t\t\t\t{ // at End\n\t\t\t\t\taRet[i] = stringToSplit.substring(iLast + delimiter.length(), stringToSplit.length());\n\t\t\t\t}\n\t\t\t\telse if (iFound == 0)\n\t\t\t\t{ // at Beginning\n\t\t\t\t\taRet[i] = delimiter;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ // somewhere in middle\n\t\t\t\t\taRet[i] = stringToSplit.substring(iFrom, iFound);\n\t\t\t\t}\n\t\t\t\tiLast = iFound - (takeDelimiter ? iJump : 0);\n\t\t\t\tiFrom = iFound + (takeDelimiter ? 0 : delimiter.length());\n\t\t\t}\n\t\t}\n\t\treturn aRet;\n\t}", "protected String[] splitMVSLine(String raw) {\n if (raw == null) {\n return new String[] {};\n }\n StringTokenizer st = new StringTokenizer(raw);\n String[] rtn = new String[st.countTokens()];\n int i = 0;\n while (st.hasMoreTokens()) {\n String nextToken = st.nextToken();\n rtn[i] = nextToken.trim();\n i++;\n }\n return rtn;\n }", "private String getSeparator(List<String> file)\n {\n String line = file.get(0);\n \n if (line.contains(\" \") || line.contains(\" ,\")) {\n /* for these delimeters the \"data\" and \"quantidade\" column are not\n * separated correctly, so we need to add one space to support them.\n */\n for (int i = 0; i < file.size(); i++) {\n String l = file.get(i);\n String a = l.substring(0, 16);\n String b = l.substring(16, l.length() - 1);\n file.set(i, a + \" \" + b);\n }\n }\n\n return FileUtil.SEPARATOR(line);\n }", "public static String[] split(String str) {\n\t\treturn split(str, null, -1);\n\t}", "private String[] split(String string){\n\t\tString[] split = string.split( \" \" );\n\t\t\n\t\tfor(int i = 0; i < split.length; i++){\n\t\t\tString index = split[i];\n\t\t\tindex = index.trim();\n\t\t}\n\t\t\n\t\treturn split;\n\t}", "public static List<String> explode(String text, String separator) {\r\n\t\t\tList<String> list = new ArrayList<String>();\r\n\t\t\tif (text != null && separator != null && !text.isEmpty()) {\r\n\t\t\t\tCollections.addAll(list, text.split(separator));\r\n\t\t\t}\r\n\r\n\t\t\treturn list;\r\n\t\t}", "public static String joinArray(String[] strs, String splitter){\n StringBuffer buf = new StringBuffer();\n for (int i = 0; i < strs.length; i++) {\n if (i>0){\n buf.append(splitter);\n }\n buf.append(strs[i]);\n }\n return buf.toString();\n }", "private boolean separator(char c){\n int n = separators.length;\n for(char s : separators){\n if(s == c) return true;\n }\n return false;\n }", "private String[] decode(String encoding) {\n ArrayList<String> components = new ArrayList<String>();\n StringBuilder builder = new StringBuilder();\n int index = 0;\n int length = encoding.length();\n while (index < length) {\n char currentChar = encoding.charAt(index);\n if (currentChar == SEPARATOR_CHAR) {\n if (index + 1 < length && encoding.charAt(index + 1) == SEPARATOR_CHAR) {\n builder.append(SEPARATOR_CHAR);\n index += 2;\n } else {\n components.add(builder.toString());\n builder.setLength(0);\n index++;\n }\n } else {\n builder.append(currentChar);\n index++;\n }\n }\n components.add(builder.toString());\n return components.toArray(new String[components.size()]);\n }", "private String constructList(String[] elements) throws UnsupportedEncodingException {\n if (null == elements || 0 == elements.length)\n return null;\n StringBuffer elementList = new StringBuffer();\n\n for (int i = 0; i < elements.length; i++) {\n if (0 < i)\n elementList.append(\",\");\n elementList.append(elements[i]);\n }\n return elementList.toString();\n }", "public String splitAdresse(String adresse) {\n String[] array = adresse.split(\" \");\n adresse = \"\";\n int i = 0;\n for (String morceau : array) {\n morceau = Normalizer.normalize(morceau, Normalizer.Form.NFD).replaceAll(\"\\\\p{InCombiningDiacriticalMarks}+\", \"\"); // On enlève tous les accents\n adresse = adresse + morceau;\n if (i < array.length - 1) adresse = adresse + \"+\";\n i++;\n }\n return adresse;\n }", "public static String[] split(char c, String value) {\n\t\t int count,idx;\n\t\t for(count=1,idx=value.indexOf(c);idx>=0;idx=value.indexOf(c,++idx),++count);\n\t\t String[] rv = new String[count];\n\t\t if(count==1) {\n\t\t\t rv[0]=value;\n\t\t } else {\n\t\t\t int last=0;\n\t\t\t count=-1;\n\t\t\t for(idx=value.indexOf(c);idx>=0;idx=value.indexOf(c,idx)) {\n\t\t\t\t rv[++count]=value.substring(last,idx);\n\t\t\t\t last = ++idx;\n\t\t\t }\n\t\t\t rv[++count]=value.substring(last);\n\t\t }\n\t\t return rv;\n\t }", "public static String[] splitShortString(\n String str, char separator, char quote)\n {\n int len = (str == null) ? 0 : str.length();\n if (str == null || len == 0)\n {\n return ArrayUtils.EMPTY_STRING_ARRAY;\n }\n\n // Step 1: how many substrings?\n // We exchange double scan time for less memory allocation\n int tokenCount = 0;\n for (int pos = 0; pos < len; pos++)\n {\n tokenCount++;\n\n int oldPos = pos;\n\n // Skip quoted text, if any\n while ((pos < len) && (str.charAt(pos) == quote))\n {\n pos = str.indexOf(quote, pos + 1) + 1;\n\n // pos == 0 is not found (-1 returned by indexOf + 1)\n if (pos == 0)\n {\n throw new IllegalArgumentException(\n \"Closing quote missing in string '\" + str + '\\'');\n }\n }\n\n if (pos != oldPos)\n {\n if ((pos < len) && (str.charAt(pos) != separator))\n {\n throw new IllegalArgumentException(\n \"Separator must follow closing quote in strng '\"\n + str + '\\'');\n }\n }\n else\n {\n pos = str.indexOf(separator, pos);\n if (pos < 0)\n {\n break;\n }\n }\n }\n\n // Main loop will finish one substring short when last char is separator\n if (str.charAt(len - 1) == separator)\n {\n tokenCount++;\n }\n\n // Step 2: allocate exact size array\n String[] list = new String[tokenCount];\n\n // Step 3: retrieve substrings\n // Note: on this pass we do not check for correctness,\n // since we have already done so\n tokenCount--; // we want to stop one token short\n\n int oldPos = 0;\n for (int pos = 0, i = 0; i < tokenCount; i++, oldPos = ++pos)\n {\n boolean quoted;\n\n // Skip quoted text, if any\n while (str.charAt(pos) == quote)\n {\n pos = str.indexOf(quote, pos + 1) + 1;\n }\n\n if (pos != oldPos)\n {\n quoted = true;\n\n if (str.charAt(pos) != separator)\n {\n throw new IllegalArgumentException(\n \"Separator must follow closing quote in strng '\"\n + str + '\\'');\n }\n }\n else\n {\n quoted = false;\n pos = str.indexOf(separator, pos);\n }\n\n list[i] =\n quoted ? dequote(str, oldPos + 1, pos - 1, quote)\n : substring(str, oldPos, pos);\n }\n\n list[tokenCount] = dequoteFull(str, oldPos, len, quote);\n\n return list;\n }", "private static List<String[]> process(String[] files) {\n String path = files[0];\n List<String[]> list = new ArrayList<String[]>();\n for (int i = 1, j = 0; i < files.length; i++) {\n String name = files[i];\n for (j = 0; j < name.length(); j++) {\n if (name.charAt(j) == '('){\n break;\n }\n }\n list.add(new String[]{path+\"/\"+name.substring(0, j), name.substring(j+1, name.length() - 1)});\n }\n \n return list;\n }", "public int [] covertirInt(String [] a) {\n\t\n\t\n\t int [] temporal = new int [a.length-1];\n\t\n\t\n\t for (int i =0; i<temporal.length;i++) {\n\t \n\t\t temporal[i]=Integer.parseInt(a[i+1]);\n\t }\n \n \n\t return temporal;\n\t\n}", "public void splitter(String values) {\n\n\t\tfor(int i=0; i < values.length(); i++) {\n\t\t\tnewString += values.charAt(i);\n\n\t\t\tif(semi == values.charAt(i)) {\n\t\t\t\tnewString = newString.replaceAll(\";\", \"\");\n\t\t\t\tnewString = newString.replaceAll(\"\\n\", \"\");\n\t\t\t\tsplittedString.add(newString);\n\t\t\t\tnewString = \"\";\n\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=0; i < splittedString.size()-1; i++) {\n\t\t\tsection = splittedString.get(i);\n\t\t\tString[] dev = section.split(\",\");\n\t\t\tboolean validValues = true;\n\t\t\tfor(int x1 = 0; x1 < dev.length; x1+=3) {\n\t\t\t\tString xx1 = dev[x1];\n\t\t\t\tif(isInteger(xx1) && validValues) {\n\t\t\t\t\tx.add(Integer.parseInt(xx1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tfor(int y1= 1; y1 <dev.length; y1+=3) {\n\t\t\t\tString yy1 = dev[y1];\n\t\t\t\tif(isInteger(yy1) && validValues) {\n\t\t\t\t\ty.add(Integer.parseInt(yy1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tfor(int z1= 2; z1 <dev.length; z1+=3) {\n\t\t\t\tString zz1 = dev[z1];\n\t\t\t\tif(isInteger(zz1) && validValues) {\n\t\t\t\t\tz.add(Integer.parseInt(zz1));\n\t\t\t\t} else {\n\t\t\t\t\tvalidValues = false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "private List<String> parsePortionList(String[] portionSizes) {\n List<String> portionSizesParsed = new ArrayList<>(Arrays.asList(portionSizes));\n portionSizesParsed.removeAll(Arrays.asList(\"\", null));\n return portionSizesParsed;\n }", "private List<String> splitCommaSeparatedString(String defaults) {\r\n\t\tString[] split = defaults.split(\",\");\r\n\t\tList<String> keyList = new LinkedList<String>();\r\n\t\tfor (int i = 0; i < split.length; i++) {\r\n\t\t\tkeyList.add(split[i].trim());\r\n\t\t}\r\n\t\treturn keyList;\r\n\t}", "private String[] getStringArray(String data, String regex) {\r\n\r\n\t\tLOG.info(\"getStringArray\");\r\n\t\t\r\n\t\tString[] array = data.split(regex);\r\n\r\n\t\tLOG.debug(\"Array [\" + Arrays.toString(array) + \"]\");\r\n\r\n\t\treturn array;\r\n\t\t\r\n\t}", "private static String[] splitPartName(String partName) {\n if (partName == null) {\n partName = \"\";\n }\n\n int last_match = 0;\n LinkedList<String> splitted = new LinkedList<String>();\n Matcher m = partNamePattern.matcher(partName);\n while (m.find()) {\n if (!partName.substring(last_match, m.start()).trim().isEmpty()) {\n splitted.add(partName.substring(last_match, m.start()));\n }\n if (!m.group().trim().isEmpty()) {\n splitted.add(m.group());\n }\n last_match = m.end();\n }\n if (!partName.substring(last_match).trim().isEmpty()) {\n splitted.add(partName.substring(last_match));\n }\n return splitted.toArray(new String[splitted.size()]);\n }", "public static String[] split(String value) {\r\n\t\tif(value == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn value.trim().split(\",\");\r\n\t}", "private static String extractCustomMultipleDelimiters(String delimiter) {\n\t\tdelimiter = delimiter.substring(1, delimiter.length() - 1);\n\t\tdelimiter = delimiter.replace(\"][\", \"|\");\n\t\treturn delimiter;\n\t}", "String[] getParts();", "private String[] getNomeArquivosCaixa(File ordem) throws IOException\n\t{\n\t\tCollection arquivos = new LinkedList();\n\t\tFileReader \t\tfReader \t= new FileReader(ordem);\n\t\tBufferedReader \tbuffReader \t= new BufferedReader(fReader);\n\t\tString patternNomArqCaixa = getPropriedade(\"ordemVoucher.patternArquivosCaixa\");\n\t\tString linha=null;\n\t\twhile ( (linha=buffReader.readLine()) != null )\n\t\t\t/* Verifica se o pattern dos nomes de arquivos foi encontrado */\n\t\t\tif (linha.indexOf(patternNomArqCaixa) > -1)\n\t\t\t{\n\t\t\t\t/* Faz o split da linha que contem diferentes campos separados por \",\"\n\t\t\t\t * Utiliza a classe abaixo devido a maquina da Tecnomen possuir\n\t\t\t\t * a versao 1.3 do Java\n\t\t\t\t */\n\t\t\t\t//String campos[] = linha.split(\",\");\n\t\t\t\tStringTokenizer strToken = new StringTokenizer(linha,\",\");\n\t\t\t\tString campos[] = new String[strToken.countTokens()];\n\t\t\t\tfor (int i=0; i < campos.length; i++)\n\t\t\t\t\tcampos[i] = strToken.nextToken();\n\n\t\t\t\t/* O primeiro campo e o nome do arquivo */\n\t\t\t\tarquivos.add(campos[0]);\n\t\t\t}\n\n\t\tbuffReader.close();\n\t\tfReader.close();\n\t\treturn (String[])arquivos.toArray(new String[0]);\n\t}", "public String[] processString(String sMath){\n String s1 = \"\", elementMath[];\r\n sMath = sMath.trim();\r\n sMath = sMath.replaceAll(\"\\\\s+\",\" \"); // chuan hoa sMath\r\n for (int i=0; i<sMath.length(); i++){\r\n char c = sMath.charAt(i);\r\n if (!isOperator(c)) s1 = s1 + c;\r\n else s1 = s1 + \" \" + c + \" \";\r\n }\r\n s1 = s1.trim();\r\n s1 = s1.replaceAll(\"\\\\s+\",\" \"); // chuan hoa s1\r\n elementMath = s1.split(\" \"); //tach s1 thanh cac phan tu\r\n return elementMath;\r\n }", "public String[] pedirDatosNuevoCarro(){\n String[] nuevoCarro = new String[3];\n boolean paso = false;//Pedimos los datos de un carro, con su verificacion y luego se la enviamos en una String\n while (paso == false){\n try {\n System.out.println(\"Ingrese el numero de placa\");\n nuevoCarro[0] = scan.nextLine();\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n paso = false;\n while (paso == false){\n try {\n System.out.println(\"Ingrese la marca de su vehiculo\");\n nuevoCarro[1] = scan.nextLine();\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n paso = false;\n while (paso == false){\n try {\n System.out.println(\"Ingrese el modelo de su auto, elija el numero antes del modelo ([1 'European|U.S. Compact'], [2 'U.S. Standard'], [3 'U.S. Standard Large'])\");\n String valorString = scan.nextLine();\n int valor = Integer.parseInt(valorString);\n if (valor == 1){\n nuevoCarro[2] = \"European|U.S. Compact\";\n }\n else if (valor == 2){\n nuevoCarro[2] = \"U.S. Standard\";\n }\n else if (valor == 3){\n nuevoCarro[2] = \"U.S. Standard Large\";\n }\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un numero de 1 a 3, por favor\");\n }\n }\n\n return nuevoCarro;\n }", "public static String[] splitTrim(char c, String value) {\n\t\t int count,idx;\n\t\t for(count=1,idx=value.indexOf(c);idx>=0;idx=value.indexOf(c,++idx),++count);\n\t\t String[] rv = new String[count];\n\t\t if(count==1) {\n\t\t\t rv[0]=value.trim();\n\t\t } else {\n\t\t\t int last=0;\n\t\t\t count=-1;\n\t\t\t for(idx=value.indexOf(c);idx>=0;idx=value.indexOf(c,idx)) {\n\t\t\t\t rv[++count]=value.substring(last,idx).trim();\n\t\t\t\t last = ++idx;\n\t\t\t }\n\t\t\t rv[++count]=value.substring(last).trim();\n\t\t }\n\t\t return rv;\n\t }", "public static String implode(char separator, String[] strings) {\n\t if (strings == null) return \"\";\n\t int len = -1;\n\t for (String string: strings) len += string.length() + 1;\n\t StringBuilder buf = new StringBuilder(len);\n\t boolean first = true;\n\t for (String string: strings) {\n\t\t if (first) first = false;\n\t\t else buf.append(separator);\n\t\t buf.append(string);\n\t }\n\t return buf.toString();\n }", "public static String[] splitAt (String toSplit, char splitter) {\n\t\n\t\tint placeHolder = 0; //tracks latest position of new substring\n\t\tint arrayCount = 0; //tracks of position of array entries\n\t\tint numberOfSplitters = 0; /*counts number of splitters so that\n\t\t\t\t\t\t\t\t\t*the length of array will be correct\n\t\t\t\t\t\t\t\t\t*/\n\t\tfor (int x = 0; x < toSplit.length(); x++) {\n\t\t\tif (toSplit.charAt(x) == splitter)\n\t\t\t\tnumberOfSplitters += 1;\n\t\t}\n\t\t/*\n\t\t * creates array to return with the correct number of \n\t\t * elements based on number of splitters plus 1\n\t\t */\n\t\tString[] splitArray = new String[numberOfSplitters + 1];\n\t\tfor (int x = 0; x < toSplit.length(); x++){\n\t\t\tif (toSplit.charAt(x) == splitter) {\n\t\t\t\tsplitArray[arrayCount] = \n\t\t\t\t\t\ttoSplit.substring(placeHolder, x);\n\t\t\t\tplaceHolder = x + 1;\n\t\t\t\tarrayCount += 1;\n\t\t\t}\n\t\t}\n\t //adds substring from last splitter to end of string\n\t\tsplitArray[arrayCount] = \n\t\t\t\ttoSplit.substring(placeHolder);\n\t\treturn splitArray;\n\t}", "public static String[] wordSeparator(String input) {\n return partition(input, ' ');\n }", "private List<String> normalizeCsv(String text) {\n logger.info (\"Text = \" + text);\n List<String> rr = new ArrayList<> ();\n\n StringBuilder line = new StringBuilder ();\n for (int i = 0; i < text.length (); i++) {\n\n String curr = \"\" + text.charAt (i);\n line.append (curr);\n try {\n\n if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"1 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"2 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"3 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"4 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"5 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"6 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n } else if (text.charAt (i - 1) == ',' && (curr + \" \").equals (\"7 \") && (text.charAt (i + 1) == ' ' || Character.isAlphabetic (text.charAt (i + 1)))) {\n rr.add (line.toString ());\n line = new StringBuilder ();\n }\n\n } catch (Exception ex) {\n //System.out.println(ex.getMessage());\n }\n\n }\n return rr;\n }", "public void readArray(String s){\r\n\t\tString[] s1=s.split(\"\");\r\n\t\tSystem.out.println(\"reading string array:-\");\r\n\t\tfor(int i=0;i<s1.length;i++){\r\n\t\t\tSystem.out.print(s1[i]);\r\n\t\t}System.out.println();\r\n\t}", "private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }", "public String[] DevuelvecabeceraRen(){\r\n\t\tString vec[]={\" \",\"id\",\"int\",\"-\",\"*\",\"/\",\"(\",\")\",\"$\",\"E\",\"T\",\"F\"};\r\n\t\treturn vec;\r\n\t\t\r\n\t}", "private byte[][] splitStr(String theString) {\n\t\tbyte[] strByteArr = theString.getBytes(Packet.DEF_ENCODING);// string -> byte[]\n\t\tint noOfStrings = strByteArr.length / Packet.MAX_LENGTH_BYTES;// number of byte[] required\n\t\tif (strByteArr.length % Packet.MAX_LENGTH_BYTES != 0)// check for a shorter byte[] on the end\n\t\t\tnoOfStrings++;\n\t\tbyte[][] resByte = new byte[noOfStrings][];// new byte array array\n\t\tint start = 0;\n\t\t// if the length of the array is less than the max, use it as the max\n\t\tint end = (strByteArr.length < Packet.MAX_LENGTH_BYTES) ? strByteArr.length : Packet.MAX_LENGTH_BYTES;\n\t\tfor (int i = 0; i < resByte.length; i++) {// for every byte array\n\t\t\tresByte[i] = Arrays.copyOfRange(strByteArr, start, end);// copy section of byte[]\n\t\t\tstart += Packet.MAX_LENGTH_BYTES;\n\t\t\tend = ((end + Packet.MAX_LENGTH_BYTES) > strByteArr.length) ? strByteArr.length\n\t\t\t\t\t: (end + Packet.MAX_LENGTH_BYTES);\n\t\t}\n\t\treturn resByte;\n\t}" ]
[ "0.63684744", "0.6303796", "0.5952817", "0.59183633", "0.5763268", "0.5721629", "0.56628174", "0.56190294", "0.56113833", "0.5594496", "0.5544699", "0.5536256", "0.55010176", "0.5488925", "0.548174", "0.54808104", "0.54796505", "0.54776245", "0.5465042", "0.5461392", "0.5442907", "0.5426182", "0.5409983", "0.5397634", "0.53840876", "0.5364555", "0.5354923", "0.53542113", "0.53392756", "0.53391147", "0.53362674", "0.52873033", "0.52845603", "0.5282833", "0.5281519", "0.5276061", "0.5269276", "0.5251012", "0.5231603", "0.5218015", "0.5215726", "0.5214833", "0.52019817", "0.519986", "0.5187907", "0.5174159", "0.5166914", "0.51641524", "0.5150249", "0.51404226", "0.5137419", "0.5127264", "0.51243496", "0.51149476", "0.5093496", "0.5072773", "0.5072445", "0.5070332", "0.50673336", "0.5045844", "0.5038836", "0.50342935", "0.50251216", "0.50101775", "0.4987417", "0.49860245", "0.49778882", "0.49730778", "0.4963181", "0.4958332", "0.49578464", "0.4954406", "0.49511978", "0.49450094", "0.49280453", "0.49254104", "0.49235472", "0.4919175", "0.4915656", "0.49128497", "0.4911969", "0.4910244", "0.49096355", "0.4908708", "0.4903181", "0.49020112", "0.4899477", "0.4898554", "0.48970598", "0.48928192", "0.48908162", "0.48898795", "0.48819265", "0.4880591", "0.48785925", "0.4871507", "0.48649347", "0.48649213", "0.4863801", "0.48637804" ]
0.5471782
18
System.out.println("Escribiendo " + value + " en " + pos);
public static byte[] writeInArray(byte[] array, String value, int pos) { byte[] strVal = value.getBytes(); System.arraycopy(strVal, 0, array, pos, value.length()); return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void afficherMessage () {\r\n System.out.println(\"(\"+valeur+\", \"+type+\")\"); \r\n }", "@Override\n public void affiche(){\n System.out.println(\"Loup : \\n points de vie : \"+this.ptVie+\"\\n pourcentage d'attaque : \"+this.pourcentageAtt+\n \"\\n dégâts d'attaque : \"+this.degAtt+\"\\n pourcentage de parade :\"+this.pourcentagePar+\n \"\\n position : \"+this.pos.toString());\n\n }", "@Override\n public String toString() {\n return value + \" \" + position.name();\n }", "public String getPosicion(){\n return Float.toString(posicion);\n }", "public String getPos(){\r\n\t\t return pos;\r\n\t }", "void establecerPuntoFM(int pos){\n this.emisoraFMActual = pos;\n }", "@Override\n protected void execute() {\n SmartDashboard.putNumber(\"Encoder Value: \", encoderMotor.getSelectedSensorPosition());\n }", "public String getPos() {\n return this.pos;\n }", "public void showPosicoes() {\n this.print(\"\\n\");\n for (int i = 0; i < listaJogadores.size(); i++) {\n // System.out.print(posicoes[i] + \"\\t\");\n }\n }", "@Override\n\tpublic void EmitirSom() {\n\t\tSystem.out.println(\"\\nEsta preguiça emite o som tec tec tec\\n\");\t\t\n\t}", "public void setmostrar(){\n System.out.println(\"¿Qué deseas hacer?\");\n System.out.println(\"i=incrementar\");\n System.out.println(\"d=decrementar\");\n System.out.println(\"s=salir\");\n }", "void establecerPuntoAM(int pos){\n this.emisoraAMActual = pos;\n }", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "public void showValor() {\n String out = new String();\n this.setText(Integer.toString(valor));\n }", "public void affiche() {\n\t\tSystem.out.println(\"Valeur: \" + cpt);\n\t}", "void selectpos()\n {\n \n }", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "@Override\r\n public void infixDisplay() {\r\n System.out.print(value);\r\n }", "public void transConfirm(float draw){\n System.out.println(\"La cantidad de \"+draw+\" ha sido transferida correctamente\");\n System.out.println(\"\");\n}", "@Override\n public void output(Word value){ \n Integer integerValue = value.getUnsignedValue();\n int intValue = (int)integerValue; \n guiDisplay.append(String.valueOf((char)intValue)); \n guiDisplay.setCaretPosition(guiDisplay.getDocument().getLength());\n }", "public void transQuest(){\n System.out.println(\"Que cantidad desea transferir?\");\n System.out.println(\"\");\n}", "@Override\npublic int getPosicao() {\n\treturn posicaoBaixoEscada;\n}", "public static void printSieger(){\n System.out.println(\"Sieger ist \" +GameController.SIEGER);\n }", "@Override\n public void comunicar() {\n System.out.println(\"miauuuu\");\n\n }", "public void setPos(Punto pos) {\n\t\tthis.pos = pos;\n\t}", "public int getPos()\n {\n return pos;\n }", "public void transAccElec(){\n System.out.println(\"Elija la cuenta a la que desea efectuar la transferencia\");\n System.out.println(\"\");\n}", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "public void comer(){\r\n\t\tSystem.out.println(\"He comido\");\r\n\t}", "public void setPosicion(int posicion){\n _posicion = posicion;\n }", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "Pos nextPos(Pos pos) {\n // Get my track from display\n return cd.nextPos(no, pos);\n }", "int getPosition();", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "public abstract void printOneValue(int index);", "private String mostrarCliente(int pos) {\n String mostrar = \"Cedula: \"+getCedulaCliente(pos) + \"\\n\"\n + \"Nombre: \"+getNombreCliente(pos) + \"\\n\"\n + \"Articulo: \"+getCompraRealizada(pos) + \"\\n\"\n + \"Valor: \"+getValorCompra(pos) + \"\\n\\n\";\n return mostrar;\n }", "public Punto getPos() {\n\t\treturn pos;\n\t}", "@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}", "@Override\n public String toString() {\n return String.format(\"position X is='%s' ,position Y is='%s'\" , positionX , positionY);\n }", "@Override\n\tpublic void concentrarse() {\n\t\tSystem.out.println(\"Se centra en sacar lo mejor del Equipo\");\n\t\t\n\t}", "private String getPoints(){\n\t\tString pu = \" punts.\";\n\t\tif(points == 1){\n\t\t\tpu = \" punt.\";\n\t\t}\n\t\treturn \"Puntuació de \" + points + pu;\n\t}", "@Override\n protected void execute() {\n System.out.println(\"Elevator PID Loop:\");\n System.out.println(\"\\t - Current Position: \" + Robot.m_elevator.getEncoder().getPosition());\n \n SmartDashboard.putNumber(\"elevator/pos\", Robot.m_elevator.getEncoder().getPosition());\n // SmartDashboard.putNumber(\"elevator/target\", pos);\n //SmartDashboard.putNumber(\"elevator/error\", Math.abs(Robot.m_elevator.getEncoder().getPosition() - pos));\n // System.out.println(\"\\t - Error: \" + Robot.m)\n }", "static void print() {\n\t\tSystem.out.println(\"Value of x1 = \" +x1);\n\t}", "public String toString(){\n return VALUES.get(Value-2)+\" of \" + Suits;\n }", "public String getPosition(){\r\n\t\treturn position;\r\n\t}", "void detallePokemon(){\n System.out.println(numero+\" - \"+nombre);\n }", "void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }", "private void print(float coutTransfert) {\n\t}", "public void emitirSaludo()\n {\n // borrarPantalla();\n System.out.println(mensaje);\n }", "void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}", "private static void showvalue(int n) {\n\t\tSystem.out.println(\"n is\"+ n);\r\n\t}", "public void come(String comida) {\n System.out.println(\"Estoy comiendo \" + comida);\n }", "private static void gestionarOpciones(int opcion) {\r\n\t\tswitch (opcion) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"\\nMuestro la opci\\u00f3n \"+ opcion);\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"\\nMuestro la opci\\u00f3n \"+ opcion);\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"\\nMuestro la opci\\u00f3n \"+ opcion);\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"\\nMuestro la opci\\u00f3n \"+ opcion);\r\n\t\t\tbreak;\t\t\r\n\t\t}\t\t\r\n\t}", "public void printInfo()\n {\n System.out.println(\"position Value:\" + pos_.get(0).getPosition());\n System.out.println(\"velocitiy Value:\" + vel_.get(0).getVelocity());\n System.out.println(\"lastUpdateTime Value:\" + lastPosUpdateTime_);\n System.out.println(\"KalmanGain_ Value:\" + KalmanGain_);\n }", "public void iniciar(){\nSystem.out.println(\"El primer contador comenzara en el número 0\");\ncontador=0;\nSystem.out.println(\"El segundo contador comenzara en el número 100\");\ncontador2=100;}", "public int getPos()\n {\n return pos;\n }", "@Override\n\tpublic String parler() {\n\t\treturn \"Je suis un Orc\";\n\t}", "public void affiche () {\r\n\t\tSystem.out.println(\"Nom du porteur du compte: \" + this.porteur);\r\n\t\tSystem.out.println(\"numéro du compte: \" + this.IBAN);\r\n\t\tSystem.out.println(\"Solde du compte: \" + this.solde);\r\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public void mostrarJet(){\r\n \r\n System.out.println(\"clase hija jet de vehiculo con motor \");\r\n System.out.println(\"LA CANTIDAD DE MOTORES ES : \" + this.cantidaddeMotores);\r\n\r\n\r\n System.out.println(\"***************************************************\");\r\n System.out.println(\"*************H**E**R**E**D**A**********************\");\r\n System.out.println(\"|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|\");\r\n }", "public void setPosEnSaliente(Position<Arco<E>> pos){\r\n\t\tposV1 = pos;\r\n\t}", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public void change_escudo_pos() {\n\t\tif (!escudo.isCaught())\n\t\t\tlabirinto.lab[escudo.getX_coord()][escudo.getY_coord()] = 'O';\n\t}", "public void position() {\n System.out.println(this.position.getX()+\",\"+this.position.getY()+\",\"+this.position.getDirection());\n }", "public void print() {\r\n System.out.println(c() + \"(\" + x + \", \" + y + \")\");\r\n }", "void vorbereiten(){\n\t\tSystem.out.println(\"vorbereiten \");\n\t}", "static void printMove(Position princessPos, int x, int y) {\r\n\t\tint diffX = princessPos.x - x;\r\n\t\tint diffY = princessPos.y - y;\r\n\t\t\r\n\t\tif (diffX < 0) {\r\n\t\t\tSystem.out.println(LEFT);\r\n\t\t}\r\n\t\telse if (diffX > 0) {\r\n\t\t\tSystem.out.println(RIGHT);\r\n\t\t}\r\n\t\telse if (diffY < 0) {\r\n\t\t\tSystem.out.println(UP);\r\n\t\t}\r\n\t\telse if (diffY > 0) {\r\n\t\t\tSystem.out.println(DOWN);\r\n\t\t}\r\n\t}", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public static void saludo(){\n System.out.println(\"Bienvenido al Sistema\");\n }", "public TextPos() {\n this.value = 1;\n }", "void print(){\n\t\tSystem.out.println(\"[\"+x+\",\"+y+\"]\");\n\t}", "public void setPosCaisse(Position position) {\r\n this.pos_courante = position;\r\n\r\n }", "@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}", "public static int menuFrenar(int pos) {\n Scanner sc = new Scanner(System.in);\r\n int op = 0;\r\n System.out.println(\"Seleccione una opcion:\");\r\n System.out.println(\" 1):Para frenar.\");\r\n System.out.println(\" 2):Para salir.\");\r\n\r\n switch (op) {\r\n case 1:\r\n System.out.println(\"Ingrese la veloidad :\");\r\n Tp8.vehiculos[pos].frenar(sc.nextInt());\r\n op= 1;\r\n break;\r\n \r\n default:\r\n System.out.println(\"La opcione ingresada no es valida!!\");\r\n op=0;\r\n break;\r\n }\r\n return op;\r\n }", "@Override\n public String toString() {\n return \"@(\"+x+\"|\"+y+\") mit Bewegung: \"+bewegung;\n }", "public void afficheSolde() \r\n\t\t\t\t\t\t{ // d�but de la fonction\r\n\t\t\t\t\t\tSystem.out.println(\"Valeur du solde : \" + this.solde);\t\t\r\n\t\t\t\t\t\t}", "public static void RF2() {\r\n System.out.print(\"Gracias,Tenga un Buen Dia \");\r\n\tSystem.out.print(\"Adios :D\");\r\n }", "public void printCode( String value )\r\n\t{\r\n\t\tSystem.out.println(\"A suitable number for this : \");\r\n\t\tSystem.out.println(value);\r\n\t}", "public Posizione getPosizione() {\n return posizione;\n }", "public void retConfirm(float draw){\n System.out.println(\"La cantidad de \"+draw+\" ha sido retirada correctamente\");\n System.out.println(\"\");\n}", "public void pone_posicion(int x){\n this.x = x;\n }", "@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 String get(){\n\t\tString s = value%13+1+\"\"+suits[value/13]+\" \";\r\n\t\treturn s;\r\n\t}", "public abstract String getPos();", "public int getPos();", "public int getPos();", "public void mostrar() {\r\n\t\tfor (int i = 0; i < bolsa.length; i++) {\r\n\t\t\tSystem.out.printf(\"#%d: %d\\t\", i, bolsa[i]);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}", "public void setPoint(int point) {\n\tthis.score_num.setText(String.valueOf(point));\r\n}", "void comer() {\n\t\tSystem.out.println(\"comiendo\");\n\t}", "public static void printVector(int v[]) {\n for (int i = 0; i < v.length; i++) {\n if (i == (v.length) - 2) {\n System.out.print(\"Posição \" + i + \": (\" + v[i] + \") e \");\n } else if (!(i == (v.length) - 1)) {\n System.out.print(\"Posição \" + i + \": (\" + v[i] + \"), \");\n } else {\n System.out.print(\"Posição \" + i + \": (\" + v[i] + \")\");\n }\n }\n System.out.println();\n }", "public void vender() {\n\t\tSystem.out.println(\"Vender \"+cantidad+\" de \"+itemName);\n\t}", "public void somaVezes(){\n qtVezes++;\n }", "public void drawQuest(){\n System.out.println(\"¿Que cantidad desea retirar?\");\n System.out.println(\"\"); \n}", "public static void poder(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n if(experiencia>=100){ //condicion de aumento de nivel\n nivel=nivel+1;\n System.out.println(\"Aumento de nivel exitoso\");\n }\n else{\n System.out.println(\"carece de experiencia para subir su nivel\");\n }\n }", "@Override\n public void movimiento_especial(){\n\n movesp=ataque/2;\n defensa+=5;\n PP= PP-4;\n }", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "private static void printBoard() {\n\n\t//\tJOptionPane.showMessageDialog(null, \"Heyoo\", \".-*Board*-.\", -1);\n\t\t//String name = JOptionPane.showInputDialog(\"Vat is dain name?\");\n\t\t//JOptionPane.showMessageDialog(null, \"Aiight you good, \" + name);\n\t\t\n\t\t\n\t\tString[] options = {\"Sten\", \"Sax\", \"Påse\"};\n\t\tString Val = (String)JOptionPane.showInputDialog(null, \"Sten, Sax eller Påse?\",\n \"Game nr\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n\t\t\n\t\t\n\t\t\n\t}", "protected void displayOperatedValue(int value) {\n \tstack.push(value);\n \tcurrent = value;\n \tshow(current);\n \tcurrent = 0;\n }", "public void executeOUT(){\n\t\tint asciiVal = mRegisters[0].getValue();\n\t\tchar toPrint = (char)asciiVal;\n\t\tSystem.out.print(toPrint);\n\t}", "public POS(int position) {\n \t\tthis.position = position;\n \t}", "public void desplegarInformacion() { //\n\n System.out.println(nombre);\n System.out.println(apellido);\n\n }" ]
[ "0.6573416", "0.6382181", "0.62563133", "0.6208962", "0.612027", "0.6118327", "0.6028613", "0.60183996", "0.59707856", "0.59356594", "0.58985734", "0.5895165", "0.5880083", "0.58791786", "0.5843005", "0.5827489", "0.5826545", "0.5813404", "0.5808456", "0.57924217", "0.5786193", "0.57673675", "0.5767226", "0.57532704", "0.57513976", "0.57426536", "0.5717629", "0.5713376", "0.5710747", "0.57062316", "0.56849045", "0.56577927", "0.56270236", "0.5622672", "0.561563", "0.56072116", "0.56055176", "0.5596835", "0.55962557", "0.55816615", "0.5580634", "0.5577442", "0.5576871", "0.55500257", "0.5546789", "0.55334306", "0.55290437", "0.55274695", "0.55229133", "0.5522258", "0.5512347", "0.551217", "0.54871887", "0.54724777", "0.5471808", "0.5467213", "0.5461804", "0.5460551", "0.545756", "0.5454308", "0.54489815", "0.54486334", "0.5438374", "0.5438275", "0.5437861", "0.54329014", "0.54266953", "0.54193735", "0.54162157", "0.5409782", "0.5408183", "0.5399299", "0.5397886", "0.53976816", "0.5393035", "0.5387839", "0.5386574", "0.5386265", "0.5386162", "0.53832775", "0.5379331", "0.5368619", "0.53671354", "0.53613836", "0.5358736", "0.5358736", "0.5354837", "0.53523046", "0.5351967", "0.53512204", "0.53504705", "0.5349838", "0.53478247", "0.5346346", "0.53379923", "0.5332189", "0.5325707", "0.53222823", "0.53191394", "0.5318945", "0.531531" ]
0.0
-1
Transforma una letra en una columna, se usa para transformar direcciones de excel del tipo row, col en nro y letra
public static Integer SheetLetterToCol(String letter) { int loc_RetVal = 0; int loc_Val = 0; letter = letter.toUpperCase().trim(); loc_RetVal = letter.charAt(letter.length() - 1) - 65; if (letter.length() > 1) { //loc_RetVal++; //A //AA //AB for (int loc_Conta = 1; loc_Conta < letter.length(); loc_Conta++) { loc_Val = letter.charAt((letter.length() - 1) - loc_Conta) - 64; loc_RetVal += loc_Val * (26 * (letter.length() - loc_Conta)); } } return loc_RetVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int convertRowColToIndex(int row, int col) {\n return (row - 1) * this.size + (col - 1);\n }", "ColumnInfoTransformer getColumnInfoTransformer();", "java.lang.String getColumn();", "String getColumn();", "private int create(int row) throws FileNotFoundException {\n\t\tXSSFRow row0 = in.createRow(row);\r\n\t\tXSSFCell cell0row0 = row0.createCell(0);\r\n\t\t\r\n\t\tcell0row0.setCellValue(\"col_lookupName\");\r\n\r\n\t\tXSSFCell cell1row0 = row0.createCell(1);\r\n\t\t\r\n\t\tcell1row0.setCellValue(\"col_lookupType\");\r\n\r\nXSSFCell cell2row0 = row0.createCell(2);\r\n\t\t\r\n\t\tcell2row0.setCellValue(\"col_lookupTable\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell3row0 = row0.createCell(3);\r\n\t\t\r\n\t\tcell3row0.setCellValue(\"col_lookupColumn\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell4row0 = row0.createCell(4);\r\n\t\t\r\n\t\tcell4row0.setCellValue(\"\");\t\r\n\t\t\r\nXSSFCell cell5row0 = row0.createCell(5);\r\n\t\t\r\n\t\tcell5row0.setCellValue(\"\");\t\r\n\t\t\r\nXSSFCell cell6row0 = row0.createCell(6);\r\n\t\t\r\ncell6row0.setCellValue(\"Col_Constraints\");\r\n\r\n\r\nXSSFCell cell7row0 = row0.createCell(7);\r\n\r\ncell7row0.setCellValue(\"\");\r\n\r\n\r\n\r\nXSSFCell cell8row0 = row0.createCell(8);\r\n\r\ncell8row0.setCellValue(\"\");\r\n\r\n\t\t\r\n\t\r\nXSSFCell cell9row0 = row0.createCell(9);\r\n\r\ncell9row0.setCellValue(\"\");\r\n\r\n\r\nXSSFCell cell10row0 = row0.createCell(10);\r\n\r\ncell10row0.setCellValue(\"Col_Pagination\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t// Placing column headings below the row.\r\n\t\tXSSFRow row1 = in.createRow(1);\r\n\t\tXSSFCell cell3row1 = row1.createCell(3);\r\n\t\t\r\n\t\tcell3row1.setCellValue(\"Col_desplayName\");\r\n\r\n\t\tXSSFCell cell4row1 = row1.createCell(4);\r\n\t\t\r\n\t\tcell4row1.setCellValue(\"Col_columnName\");\r\n\r\n\t\tXSSFCell cell5row1 = row1.createCell(5);\r\n\t\r\n\t\tcell5row1.setCellValue(\"Col_searchable\");\r\n\r\n\t\tXSSFCell cell6row1 = row1.createCell(6);\r\n\t\r\n\t\tcell6row1.setCellValue(\"Col_constraintColumn\");\r\n\r\n\t\tXSSFCell cell7row1 = row1.createCell(7);\r\n\t\t\r\n\t\tcell7row1.setCellValue(\"Col_constraintOperator\");\r\n\r\n\t\tXSSFCell cell8row1 = row1.createCell(8);\r\n\t\t\r\n\t\tcell8row1.setCellValue(\"Col_constraintValue\");\r\n\r\n\t\tXSSFCell cell9row1 = row1.createCell(9);\r\n\t\t\r\n\t\tcell9row1.setCellValue(\"Col_parameterName\");\r\n\r\n\t\tXSSFCell cell10row1 = row1.createCell(10);\r\n\t\t\r\n\t\tcell10row1.setCellValue(\"Col_allowed\");\r\n\t\t\r\n\t\t\r\nXSSFCell cell11row1 = row1.createCell(11);\r\n\t\t\r\n\t\tcell11row1.setCellValue(\"Col_recordsPerPage\");\r\n\t\t\r\n\t\t\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,3,5));\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,6,9));\r\n\t\tin.addMergedRegion(new CellRangeAddress(0,0,10,11));\r\n\t\t\r\n\t\t\r\n\t\tin.autoSizeColumn(0);\r\n\t\tin.autoSizeColumn(1);\r\n\t\tin.autoSizeColumn(2);\r\n\t\tin.autoSizeColumn(3);\r\n\t\tin.autoSizeColumn(4);\r\n\t\tin.autoSizeColumn(5);\r\n\t\tin.autoSizeColumn(6);\r\n\t\tin.autoSizeColumn(7);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t FileOutputStream outputStream = new FileOutputStream(\"D://jsonFormatRAHULKADYANbyRAHULKADYAN.xlsx\");\r\n try {\r\n\t\t\tworkbook.write(outputStream);\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 /* try {\r\n\t//\t\tworkbook.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\treturn row;\r\n\t}", "private int separarCoordenadasCol(String[] pCasilla){\n\t\treturn Integer.parseInt(pCasilla[1]);\n\t}", "private void gerarArquivoExcel() {\n\t\tFile currDir = getPastaParaSalvarArquivo();\n\t\tString path = currDir.getAbsolutePath();\n\t\t// Adiciona ao nome da pasta o nome do arquivo que desejamos utilizar\n\t\tString fileLocation = path.substring(0, path.length()) + \"/relatorio.xls\";\n\t\t\n\t\t// mosta o caminho que exportamos na tela\n\t\ttextField.setText(fileLocation);\n\n\t\t\n\t\t// Criação do arquivo excel\n\t\ttry {\n\t\t\t\n\t\t\t// Diz pro excel que estamos usando portguês\n\t\t\tWorkbookSettings ws = new WorkbookSettings();\n\t\t\tws.setLocale(new Locale(\"pt\", \"BR\"));\n\t\t\t// Cria uma planilha\n\t\t\tWritableWorkbook workbook = Workbook.createWorkbook(new File(fileLocation), ws);\n\t\t\t// Cria uma pasta dentro da planilha\n\t\t\tWritableSheet sheet = workbook.createSheet(\"Pasta 1\", 0);\n\n\t\t\t// Cria um cabeçario para a Planilha\n\t\t\tWritableCellFormat headerFormat = new WritableCellFormat();\n\t\t\tWritableFont font = new WritableFont(WritableFont.ARIAL, 16, WritableFont.BOLD);\n\t\t\theaderFormat.setFont(font);\n\t\t\theaderFormat.setBackground(Colour.LIGHT_BLUE);\n\t\t\theaderFormat.setWrap(true);\n\n\t\t\tLabel headerLabel = new Label(0, 0, \"Nome\", headerFormat);\n\t\t\tsheet.setColumnView(0, 60);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\theaderLabel = new Label(1, 0, \"Idade\", headerFormat);\n\t\t\tsheet.setColumnView(0, 40);\n\t\t\tsheet.addCell(headerLabel);\n\n\t\t\t// Cria as celulas com o conteudo\n\t\t\tWritableCellFormat cellFormat = new WritableCellFormat();\n\t\t\tcellFormat.setWrap(true);\n\n\t\t\t// Conteudo tipo texto\n\t\t\tLabel cellLabel = new Label(0, 2, \"Elcio Bonitão\", cellFormat);\n\t\t\tsheet.addCell(cellLabel);\n\t\t\t// Conteudo tipo número (usar jxl.write... para não confundir com java.lang.number...)\n\t\t\tjxl.write.Number cellNumber = new jxl.write.Number(1, 2, 49, cellFormat);\n\t\t\tsheet.addCell(cellNumber);\n\n\t\t\t// Não esquecer de escrever e fechar a planilha\n\t\t\tworkbook.write();\n\t\t\tworkbook.close();\n\n\t\t} catch (IOException e1) {\n\t\t\t// Imprime erro se não conseguir achar o arquivo ou pasta para gravar\n\t\t\te1.printStackTrace();\n\t\t} catch (WriteException e) {\n\t\t\t// exibe erro se acontecer algum tipo de celula de planilha inválida\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private int getColumn() {\n return binaryPartition(column);\n }", "int getColumn();", "public int getColumn();", "private void rowToRenddet(Row row) {\n Cell cell;\n int lastCellNum;\n List<String> strCells = new ArrayList<>();\n\n //List<String> csvLine = new ArrayList<>();\n\n // Check to ensure that a row was recovered from the sheet as it is\n // possible that one or more rows between other populated rows could be\n // missing - blank. If the row does contain cells then...\n if (row != null) {\n\n // Get the index for the right most cell on the row and then\n // step along the row from left to right recovering the contents\n // of each cell, converting that into a formatted String and\n // then storing the String into the csvLine ArrayList.\n lastCellNum = row.getLastCellNum();\n //rendDetalles.add()\n\n for (int i = 0; i <= lastCellNum; i++) {\n cell = row.getCell(i);\n if (cell == null) {\n strCells.add(\"\");\n } else {\n if (cell.getCellType() != CellType.FORMULA) {\n strCells.add(this.formatter.formatCellValue(cell));\n } else {\n strCells.add(this.formatter.formatCellValue(cell, this.evaluator));\n }\n }\n }\n // Make a note of the index number of the right most cell. This value\n // will later be used to ensure that the matrix of data in the CSV file\n // is square.\n if (lastCellNum > this.maxRowWidth) {\n this.maxRowWidth = lastCellNum;\n }\n\n ScpRendiciondetalle det = strCellToDetalle(strCells);\n if (det!=null) rendDetalles.add(det);\n }\n }", "private int transformInput(int row, int col){\n\t\tif( row <= 0 || row > n\n\t\t\t\t|| col <=0 || col > n){\n\t\t\tthrow new IndexOutOfBoundsException();\n\t\t}\n\t\t\n\t\treturn (row-1)*n + col;\n\t}", "default Object convert(GenericRowData row) {\n return convert(row, -1);\n }", "private void colidiuBloco(Bloco[] linhaBloco) {\n\n\t\tfor (int i = 0; i < blocoArray; i++) {\n\t\t\tif (linhaBloco[i].bateu(bola)) {\n\t\t\t\tbola.invertVertical();\n\t\t\t\tscore = score + 100;\n\t\t\t} // fecha if\n\t\t} // fecha for\n\n\t}", "private int toColChar(int column)\n\t{\n\t\tint theCol;\n\t\tswitch (column)\n\t\t{\n\t\tcase 0: theCol = 1; break;\n\t\tcase 1: theCol = 2; break;\n\t\tcase 2: theCol = 3; break;\n\t\tdefault: theCol = -1;\n\t\t}\n\t\t\n\t\treturn theCol;\n\t}", "@Override\n public void escribirExcel(String pathPlan, String pathDeex, String nombResa) throws Exception {\n LOGGER.info(\"Iniciando escritura del archivo en excel\");\n\n LOGGER.debug(\"Ruta de la plantilla {}\", pathPlan);\n LOGGER.debug(\"Ruta donde se va a escribir la plantilla {} \", pathDeex);\n\n //Archivo Origen\n File archOrig = null;\n //Archivo Destino\n File archDest = null;\n //ruta completa de la plantilla\n String pathDefi = pathDeex + File.separator + nombResa;\n //Registra del archivo de excel\n Row row = null;\n //Celda en el archivo de excel\n Cell cell;\n //Hoja de excel\n Sheet sheet = null;\n //Numero de hojas en el libro de excel\n int numberOfSheets;\n //Constantes\n final String NOMBRE_HOJA = \"RESULTADOS EVALUACION\";\n // Fila y columna para \n int fila = 0;\n int columna = 0;\n //Fila inicio evidencia\n int filaEvid;\n\n try {\n archOrig = new File(pathPlan);\n\n if (!archOrig.exists()) {\n LOGGER.debug(\"Plantilla no existe en la ruta {} \", pathPlan);\n throw new IOException(\"La plantilla no existe en la ruta \" + pathPlan);\n }\n\n archDest = new File(pathDeex);\n\n if (!archDest.exists()) {\n LOGGER.debug(\"Ruta no existe donde se va a depositar el excel {} , se va a crear\", pathDeex);\n archDest.mkdirs();\n }\n\n LOGGER.info(\"Ruta del archivo a crear {}\", pathDefi);\n archDest = new File(pathDefi);\n\n if (!archDest.exists()) {\n LOGGER.info(\"No existe el archivo en la ruta {}, se procede a la creacion \", pathDefi);\n archDest.createNewFile();\n } else {\n\n LOGGER.info(\"el archivo que se requiere crear, ya existe {} se va a recrear\", pathDefi);\n archDest.delete();\n LOGGER.info(\"archivo en la ruta {}, borrado\", pathDefi);\n archDest.createNewFile();\n\n LOGGER.info(\"archivo en la ruta {}, se vuelve a crear\", pathDefi);\n\n }\n\n LOGGER.info(\"Se inicia con la copia de la plantilla de la ruta {} a la ruta {} \", pathPlan, pathDefi);\n try (FileChannel archTror = new FileInputStream(archOrig).getChannel();\n FileChannel archTrDe = new FileOutputStream(archDest).getChannel();) {\n\n archTrDe.transferFrom(archTror, 0, archTror.size());\n\n LOGGER.info(\"Termina la copia del archivo\");\n\n } catch (Exception e) {\n LOGGER.info(\"Se genera un error con la transferencia {} \", e.getMessage());\n throw new Exception(\"Error [\" + e.getMessage() + \"]\");\n }\n\n LOGGER.info(\"Se inicia con el diligenciamiento del formato \");\n\n LOGGER.info(\"Nombre Archivo {}\", archDest.getName());\n if (!archDest.getName().toLowerCase().endsWith(\"xls\")) {\n throw new Exception(\"La plantilla debe tener extension xls\");\n }\n\n try (FileInputStream fis = new FileInputStream(archDest);\n Workbook workbook = new HSSFWorkbook(fis);\n FileOutputStream fos = new FileOutputStream(archDest);) {\n\n if (workbook != null) {\n numberOfSheets = workbook.getNumberOfSheets();\n LOGGER.debug(\"Numero de hojas {}\", numberOfSheets);\n\n LOGGER.info(\"Hoja seleccionada:{}\", NOMBRE_HOJA);\n sheet = workbook.getSheetAt(0);\n\n fila = 5;\n\n LOGGER.info(\"Se inicia con la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Creando las celdas a llenar\");\n\n for (int numeFila = fila; numeFila < this.listOpme.size() + fila; numeFila++) {\n\n LOGGER.info(\"Fila {} \", numeFila);\n if (numeFila > 8) {\n\n copyRow(workbook, sheet, numeFila - 2, numeFila - 1);\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 1, 4));\n sheet.addMergedRegion(new CellRangeAddress(numeFila - 1, numeFila - 1, 6, 7));\n\n }\n\n }\n\n LOGGER.info(\"Terminando de llenar celdas\");\n LOGGER.info(\"Poblar registros desde {} \", fila);\n\n for (OptuMejo optuMejo : this.listOpme) {\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Capacitacion tecnica {}\", fila, optuMejo.getCapaTecn());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(optuMejo.getCapaTecn());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, optuMejo.getComporta());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(6);\n\n cell.setCellValue(optuMejo.getComporta());\n\n fila++;\n\n }\n LOGGER.info(\"Termino de poblar el registro hasta {} \", fila);\n //Ajustando los formulario\n if (fila > 8) {\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));\n } else {\n fila = 9;\n }\n\n /* sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 6));*/\n LOGGER.info(\"Fin de la escritura de las oportunidades de mejora\");\n\n LOGGER.info(\"Se inicia la escritura de las evidencias \");\n\n fila += 2;\n filaEvid = fila + 5;\n\n LOGGER.info(\"Se inicia la creacion de las celdas desde el registro {} \", fila);\n\n for (Evidenci evidenci : this.listEvid) {\n\n if (filaEvid < fila) {\n copyRow(workbook, sheet, fila - 1, fila);\n\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 1. Valor Fecha {}\", fila, evidenci.getFecha());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(1);\n\n cell.setCellValue(evidenci.getFecha());\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 6. Valor compromisos del area {}\", fila, evidenci.getDescripc());\n row = null;\n cell = null;\n\n row = sheet.getRow(fila);\n cell = row.getCell(2);\n\n cell.setCellValue(evidenci.getDescripc());\n\n sheet.addMergedRegion(new CellRangeAddress(fila, fila, 2, 6));\n\n fila++;\n\n }\n\n LOGGER.info(\"Fin de la escritura de las Evidencias\");\n\n LOGGER.info(\"Inicio de escritura de calificaciones\");\n //Ajustando los formulario - resultado\n\n /*sheet.addMergedRegion(new CellRangeAddress(fila, fila, 1, 7));*/\n if (fila > filaEvid) {\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 2, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 3, fila + 3, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 4, fila + 4, 2, 5));\n sheet.addMergedRegion(new CellRangeAddress(fila + 1, fila + 1, 6, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 2, fila + 4, 6, 7));\n //Firma del evaluado ajuste\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 1, 3));\n sheet.addMergedRegion(new CellRangeAddress(fila + 5, fila + 5, 4, 6));\n\n //Ajustando recursos\n sheet.addMergedRegion(new CellRangeAddress(fila + 6, fila + 6, 1, 7));\n\n sheet.addMergedRegion(new CellRangeAddress(fila + 8, fila + 8, 1, 7));\n sheet.addMergedRegion(new CellRangeAddress(fila + 10, fila + 10, 1, 7));\n\n } else {\n fila = filaEvid + 1;\n LOGGER.info(\"Fila a ejecutar {} \", fila);\n }\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor Excelente {}\", fila + 2, this.excelent);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(2);\n\n cell.setCellValue((this.excelent != null ? this.excelent : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor satisfactorio {}\", fila + 3, this.satisfac);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 3);\n cell = row.getCell(2);\n\n cell.setCellValue((this.satisfac != null ? this.satisfac : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 3. Valor no satisfactorio {}\", fila + 4, this.noSatisf);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 4);\n cell = row.getCell(2);\n\n cell.setCellValue((this.noSatisf != null ? this.noSatisf : \"\"));\n\n //Ajustando Total Calificacion en Numero\n LOGGER.debug(\"Se va actualizar la linea {} celda 2. Valor total calificacion {}\", fila + 2, this.numeToca);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 2);\n cell = row.getCell(6);\n\n cell.setCellValue(this.numeToca);\n\n LOGGER.info(\"Fin de escritura de calificaciones\");\n\n LOGGER.info(\"Inicio de escritura de interposicion de recursos\");\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.siinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(6);\n\n cell.setCellValue(\"SI:\" + (this.siinRecu != null ? this.siinRecu : \"\"));\n\n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 7, this.noinRecu);\n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 7);\n cell = row.getCell(7);\n\n cell.setCellValue(\"NO:\" + (this.noinRecu != null ? this.noinRecu : \"\"));\n \n \n LOGGER.debug(\"Se va actualizar la linea {} celda 5. Valor si interpone recursos {}\", fila + 8, this.fech);\n \n row = null;\n cell = null;\n\n row = sheet.getRow(fila + 8);\n cell = row.getCell(1);\n\n cell.setCellValue(\"FECHA:\" + (this.fech != null ? this.fech : \"\"));\n \n \n\n LOGGER.info(\"Fin de escritura de interposicion de recursos\");\n\n //Ajustando recursos\n workbook.write(fos);\n\n } else {\n throw new Exception(\"No se cargo de manera adecuada el archivo \");\n }\n\n } catch (Exception e) {\n System.out.println(\"\" + e.getMessage());\n }\n\n } catch (Exception e) {\n LOGGER.error(e.getMessage());\n throw new Exception(e.getMessage());\n }\n }", "int getColumnPosition(String path);", "private Celula celulaEscolhida(BotaoJogo botao) {\n\t\treturn mapa.getCelula(botao.getLinha(), botao.getColuna());\r\n\t}", "public static void main(String[] args) throws IOException{\n\t\tString [][] data = null;\r\n\t\t\r\n\t\t\r\n\t\tFileInputStream fis= new FileInputStream(\"./data/book1.xlsx\");\r\n\t\tXSSFWorkbook wbook = new XSSFWorkbook(fis);\r\n\t\tXSSFSheet sheet=wbook.getSheetAt(0);\r\n\t\tint rowcount = sheet.getLastRowNum();\r\n\t\tint cellcount= sheet.getRow(0).getLastCellNum();\r\n\t\t data = new String [rowcount][cellcount];\r\n\t\tfor(int i=1;i<rowcount;i++) {\r\n\t\t\tXSSFRow row=sheet.getRow(i);\r\n\t\t\tfor(int j=0;j<cellcount;j++) {\r\n\t\t\t\tXSSFCell cell= row.getCell(j);\r\n//\t\t\t\tdata=cell.getStringCellValue();\r\n\t\t\t\tdata[i-1][j]=cell.getStringCellValue();\r\n\t\t\t\tSystem.out.println(Arrays.toString(data));\r\n\t\t\t}} \r\n\r\n\t\tString text1 =\"I Love India\";\r\n\t\tString text2 =\"More\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//String to Char array\r\n\t\tchar[] ch = text1.toCharArray();\r\n\t\tSystem.out.println(text1);\r\n\t\t\r\n\t\t//length of String\r\n\t\tint length = ch.length;\r\n\t\tSystem.out.println(length);\r\n\t\t\t\t\r\n\t\t//print single character\r\n\t\tfor(char all:ch) {\r\n\t\t\tSystem.out.println(all);\r\n\t\t}\r\n\t\t\t\t\r\n\t\t//char to string\r\n\t\tchar ch1 = 'I';\r\n\t\tString string = Character.toString(ch1);\r\n\t\tSystem.out.println(string);\r\n\t\t\r\n\t\t//to find the index of a character\r\n\t\tint num=text1.indexOf(\"e\");\r\n\t\tSystem.out.println(num);\r\n\t\t\r\n\t\t//to find character of the index\r\n\t\tchar a=text1.charAt(4);\r\n\t\tSystem.out.println(a);\r\n\r\n\t\t//to find the index of character from end\r\n\t\tint num1=text1.lastIndexOf(\"n\");\r\n\t\tSystem.out.println(num1);\r\n\t\t\r\n\t\t//to concat to text\r\n\t\tString value=text1.concat(\" \"+text2);\r\n\t\tSystem.out.println(value);\r\n\t\t\r\n\t\t//to convert integer to string\r\n\t\tint digit=10;\r\n\t\tSystem.out.println(\"The value is \"+digit);\r\n\t\t\r\n\t\t//to remove whitespaces in front and last of a string\r\n\t\tString asdf= \" mohan \";\r\n\t\tString b=asdf.trim();\r\n\t\tSystem.out.println(b);\r\n\t\t\t\t\r\n\t\t//to print selected text\r\n\t\tString c=text1.substring(3);\r\n\t\tSystem.out.println(c);\r\n\t\t\r\n\t\t//to print selected text\r\n\t\tString d=text1.substring(3, 9);\r\n\t\tSystem.out.println(d);\r\n\t\t\r\n\t\t//to split the character with spaces\r\n\t\tString[] q=text1.split(\" \");\r\n\t\tint len = q.length;\r\n\t\tSystem.out.println(len);\r\n\t\tfor(String each:q) {\r\n\t\t\tSystem.out.println(each);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//to split the character with commas\r\n\t\tString test=\"Mohan,Balaji,Chennai\";\r\n\t\tString[] s=test.split(\",\");\r\n\t\tint len1 = q.length;\r\n\t\tSystem.out.println(len1);\r\n\t\tfor(String each:s) {\r\n\t\t\tSystem.out.println(each);\r\n\t\t}\r\n\t\t\r\n\t\t//print first word in a string\r\n\t\tString text3=\"Welcome to chennai\";\r\n\t\tString[] a1=text3.split(\" \");\r\n\t\tSystem.out.println(a1[0]);\r\n\t\t\r\n\t\t//to find first non-repeating character in a string\r\n\t\tSystem.out.println(\"asdfsdaf\");\r\n\t\tString sa=\"java\";\r\n\t\tfor(char ch12:sa.toCharArray()) {\r\n\t\tif(sa.indexOf(ch12) == sa.lastIndexOf(ch12)) {\r\n\t\t\tSystem.out.println(ch12);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\t//to reverse a string\r\n\t\tStringBuilder z= new StringBuilder();\r\n\t\tStringBuilder append = z.append(text1);\r\n\t\tStringBuilder reverse = append.reverse();\r\n\t\tSystem.out.println(reverse);\r\n\t\t\r\n\t\t\r\n\t\t//to replace a character in a string\r\n\t\tString replace = text1.replace(\"e\", \"p\");\r\n\t\tSystem.out.println(replace);\r\n\t\t\r\n\t\t//to change all characters to lowercase\r\n\t\tString low=text1.toLowerCase();\r\n\t\tSystem.out.println(low);\r\n\t\t\r\n\t\t//to change all characters to uppercase\r\n\t\tString up=text1.toUpperCase();\r\n\t\tSystem.out.println(up);\r\n\t\t\r\n\t\t//to swap first and last letter in a string\r\n\t\t//convert string to charArray\r\n\t\t//char[] ch = text1.toCharArray();\r\n\t\tchar temp = ch[0];\t\t\r\n\t\tch[0]=ch[ch.length-1];\r\n\t\tch[ch.length-1]=temp;\r\n\t\t\r\n\t\tSystem.out.println(ch);\r\n\t\t\r\n\t\t//swap using stringbuilder\r\n\t\tString test1=\"Mohan Balaji\";\r\n\t\tchar[] cc= test1.toCharArray();\r\n\t\tStringBuilder x= new StringBuilder();\r\n\t\tStringBuilder append2 = x.append(test1);\r\n\t\tchar first = x.charAt(0);\r\n\t\tx.setCharAt(0, cc[cc.length-1]);\r\n\t\tx.setCharAt(cc.length-1, first);\r\n\t\tString string2 = x.toString();\r\n\t\tSystem.out.println(string2);\r\n\t\t\r\n\t\t\r\n\t\t//to find duplicate char\r\n//\t\tfor(int i=0;i<cc.length;i++) {\r\n//\t\t\tfor(int j=i+1;j<cc.length;j++) {\r\n//\t\t\t\tif(cc[i]==cc[j]) {\r\n//\t\t\t\t\tSystem.out.println(cc[j]);\r\n//\t\t\t\tbreak;\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t\r\n\t\t//fibonancci series using loop\r\n\t\tint max=10;\r\n\t\tint previous=0;\r\n\t\tint next=1;\r\n\t\t\r\n\t\tSystem.out.println(\"The fibonancci series of\"+max+\"numbers : \");\r\n\t\t\r\n\t\tfor(int i=0;i<=max;i++) {\r\n\t\t\tSystem.out.println(previous+\"\");\r\n\t\t\tint sum=previous+next;\r\n\t\t\tprevious=next;\r\n\t\t\tnext=sum;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n//\t\tpackage utils;\r\n//\r\n//\t\timport java.io.IOException;\r\n//\r\n//\t\timport com.aventstack.extentreports.ExtentReports;\r\n//\t\timport com.aventstack.extentreports.ExtentTest;\r\n//\t\timport com.aventstack.extentreports.MediaEntityBuilder;\r\n//\t\timport com.aventstack.extentreports.MediaEntityModelProvider;\r\n//\t\timport com.aventstack.extentreports.reporter.ExtentHtmlReporter;\r\n//\r\n//\t\tpublic abstract class Report {\r\n//\t\t\tpublic static ExtentHtmlReporter html;\r\n//\t\t\tpublic static ExtentReports extent;\r\n//\t\t\tpublic static ExtentTest test, suiteTest;\r\n//\t\t\tpublic String testCaseName, testNodes, testDescription, category, authors;\r\n//\r\n//\r\n//\t\t\tpublic void startResult() {\r\n//\t\t\t\thtml = new ExtentHtmlReporter(\"./reports/results.html\");\r\n//\t\t\t\thtml.setAppendExisting(true);\t\t\r\n//\t\t\t\textent = new ExtentReports();\t\t\r\n//\t\t\t\textent.attachReporter(html);\t\r\n//\t\t\t}\r\n//\r\n//\r\n//\t\t\tpublic ExtentTest startTestModule(String testCaseName, String testDescription) {\r\n//\t\t\t\tsuiteTest = extent.createTest(testCaseName, testDescription);\r\n//\t\t\t\treturn suiteTest;\r\n//\t\t\t}\r\n//\r\n//\r\n//\r\n//\t\t\tpublic ExtentTest startTestCase(String testNodes) {\r\n//\t\t\t\ttest = \tsuiteTest.createNode(testNodes);\r\n//\t\t\t\treturn test;\r\n//\t\t\t}\r\n//\r\n//\t\t\tpublic abstract long takeSnap();\r\n//\r\n//\r\n//\t\t\tpublic void reportStep(String desc, String status, boolean bSnap) {\r\n//\r\n//\t\t\t\tMediaEntityModelProvider img = null;\r\n//\t\t\t\tif(bSnap && !status.equalsIgnoreCase(\"INFO\")){\r\n//\r\n//\t\t\t\t\tlong snapNumber = 1000000L;\r\n//\t\t\t\t\tsnapNumber = takeSnap();\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\timg = MediaEntityBuilder.createScreenCaptureFromPath\r\n//\t\t\t\t\t\t\t\t(\"./../reports/images/\"+snapNumber+\".jpg\").build();\r\n//\t\t\t\t\t} catch (IOException e) {\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\tif(status.equalsIgnoreCase(\"PASS\")) {\r\n//\t\t\t\t\ttest.pass(desc, img);\t\t\t\r\n//\t\t\t\t}else if (status.equalsIgnoreCase(\"FAIL\")) {\r\n//\t\t\t\t\ttest.fail(desc, img);\r\n//\t\t\t\t\tthrow new RuntimeException();\r\n//\t\t\t\t}else if (status.equalsIgnoreCase(\"WARNING\")) {\r\n//\t\t\t\t\ttest.warning(desc, img);\r\n//\t\t\t\t}else if (status.equalsIgnoreCase(\"INFO\")) {\r\n//\t\t\t\t\ttest.info(desc);\r\n//\t\t\t\t}\t\t\t\t\t\t\r\n//\t\t\t}\r\n//\r\n//\r\n//\t\t\tpublic void reportStep(String desc, String status) {\r\n//\t\t\t\treportStep(desc, status, true);\r\n//\t\t\t}\r\n//\r\n//\r\n//\r\n//\r\n//\t\t\tpublic void endResult() {\r\n//\t\t\t\textent.flush();\r\n//\t\t\t}\t\r\n\r\n//\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\t}", "public String getColumnName(int col) {\n\t\treturn (col == 0) ? \"Path\" : prescaleTable.prescaleColumnName(col - 1);\n\t}", "void calculateLobColumnPositionsForRow() {\n int currentPosition = 0;\n\n for (int i = 0; i < columns_; i++) {\n if ((isNonTrivialDataLob(i))\n && (locator(i + 1) == -1)) // Lob.INVALID_LOCATOR))\n // key = column position, data = index to corresponding data in extdtaData_\n // ASSERT: the server always returns the EXTDTA objects in ascending order\n {\n extdtaPositions_.put(i + 1, currentPosition++);\n }\n }\n }", "@Test\n public void testConvertColumnMarkToNumber() {\n Assertions.assertEquals(1, GameUtil.convertRowMarkToNumber(\"A\"), \"Test - A returns 1\");\n Assertions.assertEquals(2, GameUtil.convertRowMarkToNumber(\"B\"), \"Test - B returns 2\");\n Assertions.assertEquals(3, GameUtil.convertRowMarkToNumber(\"C\"), \"Test - C returns 3\");\n Assertions.assertEquals(27, GameUtil.convertRowMarkToNumber(\"AA\"), \"Test - A returns 27\");\n Assertions.assertEquals(703, GameUtil.convertRowMarkToNumber(\"AAA\"), \"Test - A returns 703\");\n Assertions.assertEquals(703, GameUtil.convertRowMarkToNumber(\"AAeA\"), \"Test - A returns 703\");\n Assertions.assertEquals(703, GameUtil.convertRowMarkToNumber(\"AA!A\"), \"Test - A returns 703\");\n Assertions.assertEquals(704, GameUtil.convertRowMarkToNumber(\"AAB\"), \"Test - A returns 704\");\n }", "public void flipHorizontal() {\n\t\t\tfor(int row = 0; row < TILE_DIM; row++) {\n\t\t\t\tString tmp = \"\";\n\t\t\t\tfor(int col = TILE_DIM-1; col >= 0; col--) {\n\t\t\t\t\ttmp += this.data[row].charAt(col);\n\t\t\t\t}\n\t\t\t\tthis.data[row] = tmp;\n\t\t\t}\n\t\t\tcomputeHashes();\n\t\t}", "private int getColumn(int number) {\n return number % 9;\n }", "String getColumn(int index);", "String getColumn(int index);", "public void rotateColumn(int a, int b) {\n for (int i = 0; i < b; i++) {\n char last = screen[screen.length - 1][a];\n for (int j = screen.length - 2; j >= 0; j--) {\n screen[j + 1][a] = screen[j][a];\n }\n screen[0][a] = last;\n }\n }", "public int getColumn()\n {\n return col;\n }", "@Override\n\tpublic String getColumnName(int col) {\n\t\treturn NOMICOLONNE[col];\n\t}", "int atColumn();", "private int FuncFillColumnList(ArrayList list,int sheetinput) {\n\t\tFileInputStream fis = null;\n\t\ttry {\n\t\t\tfis = new FileInputStream(new File(filename));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint columns=0;\n\t\tif(type==0){\n\t\t//create wrokbook xls\n\t\tHSSFWorkbook wb = null;\n\t\ttry {\n\t\t\twb = new HSSFWorkbook(fis);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//create sheet object to retrieve the sheet\n\t\tHSSFSheet sheet=wb.getSheetAt(sheetinput);\n\t\t//that is for evaluate the cell type\n\t\tFormulaEvaluator formulaeva=wb.getCreationHelper().createFormulaEvaluator();\n\t\t\n\t\tboolean donerow=false;\n\t\tfor(Row row : sheet)\n\t\t{\n\t\t\tif(!donerow)\n\t\t\tfor(Cell cell : row)\n\t\t\t{\n\t\t\t\tswitch(formulaeva.evaluateInCell(cell).getCellType())\n\t\t\t\t{\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tlist.add(cell.getNumericCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tlist.add(cell.getStringCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolumns++;\n\t\t\tdonerow=true;\n\n\t\t}\n\t\t}\n\t\tif(type==1){\n\t\t//create wrokbook xlsx\n\t\tXSSFWorkbook wb = null;\n\t\ttry {\n\t\t\twb = new XSSFWorkbook(fis);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//create sheet object to retrieve the sheet\n\t\tXSSFSheet sheet=wb.getSheetAt(sheetinput);\n\t\t//that is for evaluate the cell type\n\t\tFormulaEvaluator formulaeva=wb.getCreationHelper().createFormulaEvaluator();\n\t\tboolean donerow=false;\n\t\tfor(Row row : sheet)\n\t\t{\n\t\t\tif(!donerow)\n\t\t\tfor(Cell cell : row)\n\t\t\t{\n\t\t\t\tswitch(formulaeva.evaluateInCell(cell).getCellType())\n\t\t\t\t{\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_NUMERIC:\n\t\t\t\t\tlist.add(cell.getNumericCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t//if cell is numeric format\n\t\t\t\tcase Cell.CELL_TYPE_STRING:\n\t\t\t\t\tlist.add(cell.getStringCellValue());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolumns++;\n\t\t\tdonerow=true;\n\n\t\t}\n\t\t}\n\t\treturn columns-1;\n\t}", "private void cargarColumnasTabla(){\n \n modeloTabla.addColumn(\"Nombre\");\n modeloTabla.addColumn(\"Telefono\");\n modeloTabla.addColumn(\"Direccion\");\n }", "private void shiftLeftToRight(int colNum, int rowNum, FloorTile tile, int rotation) {\n shiftTilesLeftToRight(colNum, rowNum, tile, rotation);\n shiftPlayerPiecesLeftToRight(rowNum);\n }", "private void findColumnBoundaries(){\n int columnBoundaryX1 = Integer.MAX_VALUE;\n int columnBoundaryX2 = Integer.MIN_VALUE;\n for(ArrayList<Element> cell : cells){\n String pos;\n String[] positions;\n\n Element firstWordInCell = cell.get(0);\n Element lastWordInCell = cell.get(cell.size()-1);\n\n pos = firstWordInCell.attr(\"title\");\n positions = pos.split(\"\\\\s+\");\n int x1 = Integer.parseInt(positions[1]);\n if(x1 < columnBoundaryX1){\n columnBoundaryX1 = x1;\n this.columnBoundaryX1 = x1;\n }\n\n pos = lastWordInCell.attr(\"title\");\n positions = pos.split(\"\\\\s+\");\n int x2 = Integer.parseInt(positions[3]);\n if(x2 > columnBoundaryX2){\n columnBoundaryX2 = x2;\n this.columnBoundaryX2 = x2;\n }\n }\n }", "public abstract int getColumn();", "private void rotateColumn(Integer column) {\n \t\t\n \t\tArrayList<Block> blocks = game.getSlot().getBlocks();\n \t\t\n \t\tArrayList<String> last = new ArrayList<String>();\n \t\tlast.add(blocks.get(column+6).getTypeId() + \":\" + blocks.get(column+6).getData());\n \t\tlast.add(blocks.get(column+3).getTypeId() + \":\" + blocks.get(column+3).getData());\n \t\t\n \t\t//Get the id and split it\n \t\tint s1 = 1;\n \t\tbyte s2 = 0;\n \t\tString id = getNext();\n \t\t\n \t\t// Prevent silly-looking duplicate blocks\n \t\twhile(id.equalsIgnoreCase(last.get(0))) {\n \t\t\tid = getNext();\n \t\t}\n \t\t\n \t\t//Since the id is not the same (see above) we can go ahead and split it up\n \t\tString[] mSplit = id.split(\"\\\\:\");\n \t\t\tif (mSplit.length == 2) {\n \t\t\t\ts1 = Integer.parseInt(mSplit[0]);\n \t\t\t\ts2 = Byte.parseByte(mSplit[1]);\n \t\t\t}else {\n \t\t\t\ts1 = Integer.parseInt(mSplit[0]);\n \t\t\t}\n \t\t\n \t\t// First column\n \t\tblocks.get(column+6).setTypeIdAndData(s1, s2, false);\n \t\t\n \t\t// Second Column\n \t\tint c2ID = 1;\n \t\tbyte c2Byte = 0;\n \t\tString[] column2 = last.get(0).split(\"\\\\:\");\n \t\t\tif (column2.length == 2) {\n \t\t\t\tc2ID = Integer.parseInt(column2[0]);\n \t\t\t\tc2Byte = Byte.parseByte(column2[1]);\n \t\t\t}else {\n \t\t\t\tc2ID = Integer.parseInt(column2[0]);\n \t\t\t}\n \t\tblocks.get(column+3).setTypeIdAndData(c2ID, c2Byte, false);\n \t\t\n \t\t// Third Column\n \t\tint c3ID = 1;\n \t\tbyte c3Byte = 0;\n \t\tString[] column3 = last.get(1).split(\"\\\\:\");\n \t\t\tif (column3.length == 2) {\n \t\t\t\tc3ID = Integer.parseInt(column3[0]);\n \t\t\t\tc3Byte = Byte.parseByte(column3[1]);\n \t\t\t}else {\n \t\t\t\tc3ID = Integer.parseInt(column3[0]);\n \t\t\t}\n \t\tblocks.get(column).setTypeIdAndData(c3ID, c3Byte, false);\n \t\t\n \t}", "private void shiftRightToLeft(int colNum, int rowNum, FloorTile tile, int rotation) {\n shiftTilesRightToLeft(colNum, rowNum, tile, rotation);\n shiftPlayerPiecesRightToLeft(rowNum);\n }", "public int[] convertPixelsInRowCol(int x, int y) {\n\t\tint[] row_col = new int[2];\n\t\t// filas\n\t\trow_col[0] = y / config.getLevelBoxSize();\n\t\t// columnas\n\t\trow_col[1] = x / config.getLevelBoxSize();\n\t\treturn row_col;\n\t}", "private int getColumn(double lng) {\r\n\t\tif (lng <= mbr.minLng()) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (lng >= mbr.maxLng()) {\r\n\t\t\treturn nCol - 1;\r\n\t\t}\r\n\t\treturn (int) ((lng - mbr.minLng()) / cellSize);\r\n\t}", "Column getCol();", "public static void inverseTransform() {\r\n \tint start = BinaryStdIn.readInt();\r\n \tString str = BinaryStdIn.readString();;\r\n \tchar[] lastCol = str.toCharArray();\r\n \tint[] count = new int[256];\r\n \tfor (char c : lastCol) {\r\n \t\tcount[c]++;\r\n \t}\r\n \tfor (int i = 1; i < count.length; i++) {\r\n \t\tcount[i] += count[i - 1];\r\n \t}\r\n \tint[] next = new int[lastCol.length];\r\n \tchar[] firstCol = new char[lastCol.length];\r\n \tfor (int i = lastCol.length - 1; i >= 0; i--) {\r\n \t\tint index = --count[lastCol[i]];\r\n \t\tfirstCol[index] = lastCol[i];\r\n \t\tnext[index] = i;\r\n \t}\r\n \tint sum = 0;\r\n \twhile (sum < lastCol.length) {\r\n \t\tBinaryStdOut.write(firstCol[start]);\r\n \t\tstart = next[start];\r\n \t\tsum++;\r\n \t}\r\n \tBinaryStdOut.close();\r\n }", "public void testColumnaIzquierdaLlena( )\n {\n setupEscenario2( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 1, marcaJugador1 );\n triqui.marcarCasilla( 4, marcaJugador1 );\n triqui.marcarCasilla( 7, marcaJugador1 );\n assertTrue( triqui.columnaIzquierdaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "public int getColumn() {\n // YOUR CODE HERE\n return this.column;\n }", "public abstract List<CellValue< ? extends Comparable< ? >>> convertColumnData(C column,\n List<V> columnData);", "private void convertTables(XWPFDocument docx) {\n\n List<XWPFTable> tables = docx.getTables();\n for (XWPFTable table : tables) {\n List<XWPFTableRow> rows = table.getRows();\n for (XWPFTableRow row : rows) {\n List<XWPFTableCell> cells = row.getTableCells();\n for (XWPFTableCell cell : cells) {\n List<XWPFParagraph> cellParagraphs = cell.getParagraphs();\n for (XWPFParagraph celssParagraph : cellParagraphs) {\n\n List<XWPFRun> cellRuns = celssParagraph.getRuns();\n// convertRuns(cellRuns);\n convertParagrpahRuns(cellRuns,celssParagraph);\n\n }\n\n }\n\n }\n\n }\n }", "int getCol();", "void incrementColumnIndex();", "void incrementColumnIndex();", "public static String[][] acomodamiento(char direccion, String[][] cuadricula) {\n int numeroA;\n int espacios;\n for (int fila = 0; fila < 4; fila++) {\n\n for (int columna = 0; columna < 4; columna++) {\n\n switch (direccion) {\n case 'w':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia, cuando la encuentra mueve desde esa posicion hacia arriba\n del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[columna][fila].equals(\" \") == false) {\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n //Verigica si hay un numero igual arriba suyo para sumarse\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento - 1][fila])) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de arriba\n */\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento - 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento - 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento - 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion arriba la sustituye la de abajo\n else if (cuadricula[vecesMovimiento - 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento - 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 's':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de abajo para arriba, cuando la encuentra mueve\n desde esa posicion hacia abajo del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[3 - columna][fila].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de abajo de la matriz\n // llegaremos hasta 2 ya que sigue comparando con una posicion abajo extra gracias al +1\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de abajo\n */\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento + 1][fila])) {\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento + 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento + 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento + 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion abajo la sustituye la de arriba\n else if (cuadricula[vecesMovimiento + 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento + 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 'a':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de izquierda a derecha, cuando la encuentra mueve\n desde esa posicion hacia la izquierda del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[fila][columna].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de la izquierda de la matriz, es decir inicializada en 0\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de izquierda\n */\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento - 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento - 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento - 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento - 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion izquierda la sustituye la de derecha\n else if (cuadricula[fila][vecesMovimiento - 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento - 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n //Lo mismo establecido pero orientado a la derecha, y en lugar del -1 de los vectores lo pasamos como +1 siguiendo la estructura\n //de la opcion 's'\n case 'd':\n if (cuadricula[fila][3 - columna].equals(\" \") == false) {\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento + 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento + 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento + 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento + 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } else if (cuadricula[fila][vecesMovimiento + 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento + 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n }\n\n }\n }\n return cuadricula;\n }", "private int getColumn(int x) {\n\t\t// TODO Auto-generated method stub\n\t\tint w = view.getWidth() / nColumns;\n\t\treturn x / w;\n\t}", "public int getCol() { return _col; }", "public void incremetColumn() {\n setRowAndColumn(row, column + 1);\n }", "public CellCoord nextColumn() {\n return new CellCoord(column + 1, row);\n }", "public int getColumn()\t \t\t{ return column; \t}", "public int getDecoratedColumn (Node node);", "@Override\n\tpublic String getColumnName(int col) throws SQLException {\n\t\tif (col <= this.width && col >= 1) {\n\n\t\t\tcol--;\n\t\t\tString str = table[0][col];\n\t\t\tStringTokenizer token = new StringTokenizer(str, \",\");\n\t\t\tString label = token.nextToken();\n\n\t\t\treturn label;\n\n\t\t} else\n\t\t\tthrow new SQLException(\"column requested out of table bounds \");\n\t}", "protected abstract V convertToModelCell(C column,\n CellValue< ? > cell);", "@SuppressWarnings({ \"deprecation\", \"static-access\" })\n\tpublic void crearExcel(String nombreFichero,java.sql.Connection connection) throws SQLException {\n \tint contador=0;\n \t\n // Se crea el libro\n HSSFWorkbook libro = new HSSFWorkbook();\n\n // Se crea una hoja dentro del libro\n HSSFSheet hoja = libro.createSheet();\n\n // Se crea una fila dentro de la hoja\n HSSFRow fila = hoja.createRow(contador);\n\n // Se crea una celda dentro de la fila\n HSSFCell celda = fila.createCell((short) 0);\n // Se crea una celda dentro de la fila\n HSSFCell celda2 = fila.createCell((short) 1 );\n // Se crea una celda dentro de la fila\n HSSFCell celda3 = fila.createCell((short) 2 );\n // Se crea una celda dentro de la fila\n HSSFCell celda4 = fila.createCell((short) 3 );\n \n // Se crea el contenido de la celda y se mete en ella.\n HSSFRichTextString texto = new HSSFRichTextString(\"Área\");\n celda.setCellValue(texto);\n\n HSSFRichTextString texto2 = new HSSFRichTextString(\"Dimensión\");\n celda2.setCellValue(texto2);\n \n HSSFRichTextString texto3 = new HSSFRichTextString(\"Lema\");\n celda3.setCellValue(texto3);\n \n HSSFRichTextString texto4 = new HSSFRichTextString(\"Rasgos de Contenido\");\n celda4.setCellValue(texto4);\n \n ArrayList<idPalabra> misAreasAux=new ArrayList<idPalabra>();\n\t\t String areaAct=\"\";\n\t\t area misAreas=new area();\n\t\t misAreasAux=misAreas.devolverAreas(connection);\n\t\t Integer lemAct;\n\t\t \n //SE RECORREN TODAS LAS AREAS\n\t\t for(int i=0; i<misAreasAux.size();i++){\n\t\t\t\n\t\t\t //SE OBTIENE EL AREA ACTUAL\n\t\t\t areaAct=misAreasAux.get(i).getPalabra();\t\n\t\t\t ArrayList<idPalabra> misCategorias= new ArrayList<idPalabra>();\n\t\t\t categoria micategoria = new categoria();\n\t\t\t misCategorias=micategoria.consultarCategoriasConArea(areaAct, connection);\n\t\t\t //Si es 0 es que no hay categorias\n\t\t\t if(misCategorias.size()==0){\n\t\t\t\t contador=contador+1;\n\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\n\t\t\t } \n\t\t\t else{\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t//esto es que si tengo categorias\n\t\t\t\tfor(int j=0; j<misCategorias.size();j++){\n\t\t\t\t\t\n\t\t\t\t\t String catAct=misCategorias.get(j).getPalabra();\t\n\t\t\t\t\t//para cada categoria tengo que ver si tiene lemas\n\t\t\t\t\tArrayList<Integer> lemasAct=new ArrayList<Integer>();\n\t\t\t\t\tcategoriasLemas misLemas=new categoriasLemas();\n\t\t\t\t\tlemasAct=misLemas.consultarLemasdeunaCategoria(misCategorias.get(j).getId(),connection);\n\t\t\t\t\t//Si es 0 es que no tengo lemas asociados a dicha categoria\n\t\t\t\t\tif(lemasAct.size()==0){\n\t\t\t\t\t\t contador=contador+1;\n\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//SI TIENE VARIOS LEMAS ASOCIADOS\n\t\t\t\t\t\tfor(int x=0; x<lemasAct.size();x++){\n\t\t\t\t\t\t\tlema miLema =new lema();\n\t\t\t\t\t\t\t lemAct=lemasAct.get(x);\t\n\t\t\t\t\t\t\tlemaRasgo misLemaRasgo= new lemaRasgo();\n\t\t\t\t\t\t\tArrayList<Integer> rasgos=new ArrayList<Integer>();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\trasgos= misLemaRasgo.devolverRasgosDeLema(lemasAct.get(x),connection);\n\t\t\t\t\t\t\t//NO TIENE RASGOS\n\t\t\t\t\t\t\tif(rasgos.size()==0){\n\t\t\t\t\t\t\t\tcontador=contador+1;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//SI TIENE RASGOS\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tcontador++;\n\t\t\t\t\t\t\t\t fila = hoja.createRow(contador);\n\t\t\t\t\t\t\t\tcelda = fila.createCell((short) 0);\n\t\t\t\t\t\t\t\t celda.setCellValue(areaAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 1);\n\t\t\t\t\t\t\t\t celda.setCellValue(catAct);\n\t\t\t\t\t\t\t\t celda = fila.createCell((short) 2);\n\t\t\t\t\t\t\t\t celda.setCellValue(miLema.consultarUnLemaPorId(lemAct,connection));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t int cont=3;\n\t\t\t\t\t\t\t\tfor(int k=0; k<rasgos.size();k++){\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\trasgocontenido mirasgo =new rasgocontenido();\n\t\t\t\t\t\t\t\t\tcelda = fila.createCell((short) cont);\n\t\t\t\t\t\t\t\t\tcelda.setCellValue(mirasgo.consultarRasgoPorId(rasgos.get(k),connection));\n\t\t\t\t\t\t\t\t\tcont++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t}//if rasgos\n\t\t\t\t\t\t}//if lemas\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}//if categorias\n\t\t\t\t\t\t\n\n \n\t\t\t }\n\t\t }\n \n // Se salva el libro.\n try {\n FileOutputStream elFichero = new FileOutputStream(nombreFichero);\n libro.write(elFichero);\n elFichero.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static List<InputDto> readXLSXFile(File file) throws Exception {\n List<InputDto> inputDtos = new ArrayList<>();\n\n Integer i = 0;\n InputStream ExcelFileToRead = new FileInputStream(file);\n XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\n\n XSSFWorkbook test = new XSSFWorkbook();\n\n XSSFSheet sheet = wb.getSheetAt(0);\n XSSFRow row;\n XSSFCell cell;\n\n Iterator rows = sheet.rowIterator();\n// ss = new String[sheet.getLastRowNum()];\n sheet.getLastRowNum();\n while (rows.hasNext()) {\n InputDto input = new InputDto();\n row = (XSSFRow) rows.next();\n Iterator cells = row.cellIterator();\n if (row.getRowNum() == 0) {\n continue; //just skip the rows if row number is 0 or 1\n }\n String s = \"\";\n while (cells.hasNext()) {\n cell = (XSSFCell) cells.next();\n\n if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n// System.out.print(cell.getStringCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getRawValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n }\n /*else {\n //U Can Handel Boolean, Formula, Errors\n }*/\n }\n if (!s.equals(\"\") && s.split(\"\\\\|\").length == 8) {\n input.setLoadName(s.split(\"\\\\|\")[6]);\n input.setLoadSize(s.split(\"\\\\|\")[1]);\n input.setLoadDate(s.split(\"\\\\|\")[0]);\n input.setLoadPath(s.split(\"\\\\|\")[4]);\n input.setLoadType(s.split(\"\\\\|\")[2]);\n input.setCicsName(s.split(\"\\\\|\")[5]);\n input.setRowId(s.split(\"\\\\|\")[7]);\n System.out.println(input.getRowId());\n inputDtos.add(input);\n// ss[i] = s;\n\n } else {\n throw new Exception(\"EXCEL DATA IS NOT COMPELETED\");\n }\n i++;\n }\n\n return inputDtos;\n }", "@Override\n\tprotected void defineRightColumn()\n\t{\n\t\tfor (int i = 0; i < leftColumn_.size(); i++)\n\t\t{\n\t\t\trightColumn_.add(\"\");\n\t\t}\n\t}", "private void generateColumns() {\n\t\tSquare[] squareArr=new Square[squares.length];\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\tfor (int j=0; j<squares.length; j++) {\n\t\t\t\tsquareArr[j]=squares[j][i];\n\t\t\t}\n\t\t\tcolumns[i]=new Column(squareArr);\n\t\t}\n\t}", "public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\r\n\t\tString pdfLocation = \"C:\\\\Users\\\\805268\\\\Desktop\\\\Intelligence\\\\Pdf conversion\\\\VT17-010212-01_AHU.pdf\";\r\n\t\tPdfReader reader = new PdfReader(pdfLocation);\r\n PdfReaderContentParser parser = new PdfReaderContentParser(\r\n reader);\r\n // PrintWriter out = new PrintWriter(new FileOutputStream(txt));\r\n TextExtractionStrategy strategy;\r\n String line = null;\r\n ArrayList<String> liners = new ArrayList<String>();\r\n \t\r\n for (int i = 1; i <= reader.getNumberOfPages(); i++) {\r\n \r\n \tstrategy = parser.processContent(i,\r\n new SimpleTextExtractionStrategy());\r\n \tline = strategy.getResultantText(); \r\n \tliners.add(line);\r\n }\r\n reader.close();\r\n\r\n \r\n \r\n // using apache poi text to excel converter\r\n\r\n @SuppressWarnings(\"resource\")\r\n\t\torg.apache.poi.ss.usermodel.Workbook wb = new HSSFWorkbook();\r\n CreationHelper helper = wb.getCreationHelper();\r\n Sheet sheet = wb.createSheet(\"new sheet\");\r\n \r\n //System.out.println(\"link------->\" + line);\r\n \r\n //List<String> lines = IOUtils.readLines(new StringReader(line));\r\n int q=0;\r\n for (int i = 0; i < liners.size(); i++) { \r\n \tString str[] = liners.get(i).split(\"\\n\");\r\n \tfor (int j = 0; j < str.length; j++) {\r\n \t\tRow row = sheet.createRow((short) q);\r\n \t\trow.createCell(0).setCellValue(\r\n \t\thelper.createRichTextString(str[j]));\r\n \t\tq++;\r\n }\r\n }\r\n FileOutputStream fileOut = new FileOutputStream(\r\n \"C:\\\\Users\\\\805268\\\\Desktop\\\\Intelligence\\\\Pdf conversion\\\\VT17-010212-01_AHU_Converted.xls\");\r\n wb.write(fileOut);\r\n fileOut.close();\r\n\t}", "private void export2(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\",\n\t\t\t\t\"ascAsociadoPadre\");\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.empresa\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString empresa = \"\";\n\t\t\t\tif (asociado.getAscDirTrabajo() == null\n\t\t\t\t\t\t|| asociado.getAscDirTrabajo().equals(\"\")) {\n\t\t\t\t\tCtaDptDepartamentoTrabajo departamentoTrabajo = asociado\n\t\t\t\t\t\t\t.getCtaDptDepartamentoTrabajo();\n\t\t\t\t\tCtaEtrEmpresaTrabajoDAO empresaTrabajoDAO = new CtaEtrEmpresaTrabajoDAO(getSessionHibernate(request));\n\t\t\t\t\tCtaEtrEmpresaTrabajo empresaTrabajo = empresaTrabajoDAO\n\t\t\t\t\t\t\t.findById(departamentoTrabajo\n\t\t\t\t\t\t\t\t\t.getCtaEtrEmpresaTrabajo().getEtrId());\n\t\t\t\t\tempresa = empresaTrabajo.getEtrNombre();\n\t\t\t\t} else {\n\t\t\t\t\tempresa = asociado.getAscDirTrabajo();\n\t\t\t\t}\n\t\t\t\treturn empresa;\n\t\t\t}\n\n\t\t});\n\n\t\tnombreColumna = row.getColumn(\"ascAsociadoPadre\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.total\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\tdescAportaciones,request);\n\n\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\tdescAhorros,request);\n\n\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\tdescPrestamos,request);\n\n\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\", descSeguros,request);\n\n\t\t\t\treturn descAportaciones + descAhorros + descPrestamos\n\t\t\t\t\t\t+ descSeguros;\n\t\t\t}\n\t\t});\n\n\t\ttableFacade.render();\n\t}", "public LocalDateTime getDateForColumn(int column, int row){\n \tLocalDate tempDate = date;\n \tint dayOfWeek = tempDate.getDayOfWeek().getValue();\n \tint calendarDayOfWeek = column+1;\n \tint difDayOfWeek = calendarDayOfWeek-dayOfWeek;\n \tint dayOfMonth = tempDate.getDayOfMonth();\n \ttempDate = tempDate.plusDays(difDayOfWeek);\n \tint calendarDayOfMonth = tempDate.getDayOfMonth();\n \tint year = tempDate.getYear();\n \tint month = tempDate.getMonthValue();\n// \tSystem.out.println(\"Column : \" + column + \" Row : \" + row + \" dateDayOfWeek : \" + date.getDayOfWeek().getValue());\n \tLocalDateTime newDate = LocalDateTime.of(year, month, calendarDayOfMonth, row, 0);\n\t\treturn newDate;\n }", "public int columnToX(int column) {\n return (column * getCellSize() + PADDING);\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "@Override\n public String getColumnName(int columnIndex) {\n return nomeColunas[columnIndex];\n }", "public static int convertColumnToX(int column) {\n return PIECES_START_X + SQUARE_WIDTH * column;\n }", "@Override\r\n public String getColumnName(int col) {\r\n return title[col];\r\n }", "public int getColumn(){ return (Integer)args[1]; }", "public void decrementColumn() {\n setRowAndColumn(row, Math.max(column - 1, 0));\n }", "@SuppressWarnings({ \"resource\", \"deprecation\" })\n\tpublic String fetch_data_from_excel(String excel_name_with_extension, String sheet_name, String parent_cell, String target_row, String target_column)\n\t\t\tthrows Exception {\n\n\t\tArrayList<String> column_header = new ArrayList<String>();\n\t\tArrayList<String> row_header = new ArrayList<String>();\n\t\t\n\t\tString cellValue = null;\n\n\t\tString folderPath = \"src//test//resources//TestData//\"; // keep excel in this folder path\n\t\tString element_Image = System.getProperty(\"user.dir\") + File.separator + folderPath + excel_name_with_extension;\n\n\t\tFile file = new File(element_Image);\n\t\tFileInputStream fis = new FileInputStream(file); // this contains raw data from the excel\n\t\tXSSFWorkbook workbook = new XSSFWorkbook(fis); // creating workbook\n\n\t\tInteger sheets = workbook.getNumberOfSheets(); // gives count of total number of sheets\n\n\t\tfor (Integer i = 0; i < sheets; i++) {\n\t\t\tif (workbook.getSheetName(i).equalsIgnoreCase(sheet_name)) {\n\t\t\t\tXSSFSheet sheet = workbook.getSheetAt(i); // getting the sheet from workbook\n\n\t\t\t\t// identify required column by scanning the entire 1st row\n\t\t\t\tIterator<Row> rows = sheet.iterator(); // sheet is collection of rows\n\t\t\t\tRow firstRow = rows.next();\n\t\t\t\tIterator<Cell> cell = firstRow.cellIterator(); // row is collection of cells\n\n\t\t\t\tInteger column;\n\n\t\t\t\twhile (cell.hasNext()) {\n\t\t\t\t\tCell cellElement = cell.next();\n\n\t\t\t\t\tif (cellElement.getCellTypeEnum() == CellType.STRING) {\n\t\t\t\t\t\tcolumn_header.add(cellElement.getStringCellValue());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcolumn_header.add(NumberToTextConverter.toText(cellElement.getNumericCellValue()));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcolumn = column_header.indexOf(parent_cell);\n\n\t\t\t\tIterator<Row> rows2 = sheet.iterator();\n\n\t\t\t\twhile (rows2.hasNext()) {\n\t\t\t\t\tRow r = rows2.next();\n\t\t\t\t\tif (r.getCell(column).getCellTypeEnum() == CellType.STRING) {\n\t\t\t\t\t\trow_header.add(r.getCell(column).getStringCellValue());\n\t\t\t\t\t} else {\n\t\t\t\t\t\trow_header.add(NumberToTextConverter.toText(r.getCell(column).getNumericCellValue()));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tInteger row_index = row_header.indexOf(target_row);\n\t\t\t\tInteger column_index = column_header.indexOf(target_column);\n\n\t\t\t\tif (sheet.getRow(row_index).getCell(column_index).getCellTypeEnum() == CellType.STRING) {\n\t\t\t\t\tcellValue = sheet.getRow(row_index).getCell(column_index).getStringCellValue();\n\t\t\t\t} else {\n\t\t\t\t\tcellValue = NumberToTextConverter\n\t\t\t\t\t\t\t.toText(sheet.getRow(row_index).getCell(column_index).getNumericCellValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cellValue;\n\t}", "public static List<List<String>> readXls(HSSFSheet decompteSheet) {\n //remise a zero de la liste data\n List<List<String>> data = new ArrayList<>();\n\n for (Row row : decompteSheet) {\n //saut de la premiere ligne\n if (row.getRowNum() == 0)\n continue;\n\n List<String> dataLine = new ArrayList<>();\n for (Cell cell : row) {\n try {\n switch (cell.getColumnIndex()) {\n //recuperation de la date\n case 0:\n dataLine.add(new SimpleDateFormat(\"dd/MM/yyyy\").format(cell.getDateCellValue()));\n break;\n //recuperation des donnees textes\n case 1:\n dataLine.add(cell.getStringCellValue());\n break;\n //recuparation des donnees numeriques\n default:\n dataLine.add(String.valueOf(cell.getNumericCellValue()));\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n Erreur.creerFichierErreur(e.getMessage()+\"\\n\"\n + decompteSheet.getSheetName() +\" \"+ Column.getLetterFromInt(cell.getColumnIndex()) + (cell.getRowIndex() + 1));\n }\n }\n data.add(dataLine);\n }\n\n return data;\n }", "@Override\n public String getColumnName(int column) {\n return cabecera[column];\n }", "private static String[] rotateGrid(String[] grid) {\n\t\tString[] tmp = new String[grid.length];\n\t\tfor(int col = 0; col < grid.length; col++) {\n\t\t\ttmp[col] = \"\";\n\t\t\tfor(int row = grid.length-1; row >= 0; row--) {\n\t\t\t\ttmp[col] += grid[row].charAt(col);\n\t\t\t}\n\t\t}\n\t\treturn tmp;\n\t}", "int getColumnIndex();", "int getColumnIndex();", "int getColumnIndex();", "public Column getColumn(int pos) { return columns[pos]; }", "private int getColumn( int position ) {\n if ( columns == 1 ) {\n return 0;\n }\n //Log.d(TAG, \"getColumn returning some shit: \" + position + \" % \" + columns + \" = \" + (position % columns));\n return position % columns;\n }", "public static int convertXToColumn(int x) {\n return (x - DRAG_TARGET_SQUARE_START_X) / SQUARE_WIDTH;\n }", "@Override\n public void writeRow(List<POICell> columns) throws Exception {\n try\n {\n for ( POICell column : columns )\n {\n Row row = column.getRow();\n row.createCell(column.getColumnIdx()).setCellValue(column.getText());\n }\n }\n catch (Exception e)\n {\n String msg = this.getClass().getSimpleName() + \": \" + e.getMessage();\n throw new IOException(msg);\n }\n }", "public int obtenerColumna() {\n\t\treturn columna;\n\t}", "private int xyTo1D(int row, int col)\n {\n validate(row, col);\n return (row-1) * gridSize + col-1;\n }", "private Cell get_left_cell(int row, int col) {\n return get_cell(row, --col);\n }", "private int getCodigoVistoBueno(int columna){\n int intCodVisBue=0;\n int w=0;\n int intCol=columna;\n int intVecCol=0;\n try{\n do{\n intVecCol=Integer.parseInt(strVecDat[w][2]);\n if(intCol==intVecCol){\n intCodVisBue=Integer.parseInt(strVecDat[w][0]);\n break;\n }\n else{\n w++;\n }\n }while(strVecDat[w][2]!=null);\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(this, e);\n \n }\n return intCodVisBue;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic static void createMigrationInputFiles()\n\t{\n\t\t@SuppressWarnings({ \"rawtypes\" })\n\t\tMultiValueMap structureMap = new MultiValueMap(); // MultiValueMap for adding child item rows for every parentId\n\n\t\ttry\n\t\t{\n\t\t\tWorkbook workbook = new XSSFWorkbook(EXCEL_FILE);\n\t\t\tSheet datatypeSheet = workbook.getSheetAt(0);\n\n\t\t\tint linkDocCount = 0, linkDwgCount = 0, linkPurchSpecCount = 0, linkMadeFromCount = 0, engParts = 0, altPartsCount = 0;\n\n\t\t\tList<String> serviceItemsList = new ArrayList<String>();\n\t\t\tList<String> engItemsList = new ArrayList<String>();\n\n\t\t\t// Skipping top two rows\n\t\t\tIterator<Row> rowIterator = datatypeSheet.iterator();\n\t\t\tif (rowIterator.hasNext())\n\t\t\t\trowIterator.next();\n\t\t\tif (rowIterator.hasNext())\n\t\t\t\trowIterator.next();\n\n\t\t\t// Reading the rows one by one\n\t\t\twhile (rowIterator.hasNext())\n\t\t\t{\n\t\t\t\tcurrentRow = rowIterator.next();\n\t\t\t\tString tierType = BLANK;\n\t\t\t\tif (v(TIER_TYPE) != null && v(TIER_TYPE).trim().length() != 0\n\t\t\t\t\t\t&& !v(TIER_TYPE).trim().isEmpty())\n\t\t\t\t{\n\t\t\t\t\ttierType = v(TIER_TYPE).replace(SEMICOLON_SPACE, COMMA);\n\t\t\t\t\ttierType = tierType.replace(SPACE_SEMICOLON, COMMA);\n\t\t\t\t\ttierType = tierType.replace(SEMICOLON, COMMA);\n\t\t\t\t}\n\n\t\t\t\tString engineFamily = BLANK;\n\t\t\t\tif (v(ENGINE_FAMILY) != null && v(ENGINE_FAMILY).trim().length() != 0\n\t\t\t\t\t\t&& !v(ENGINE_FAMILY).trim().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tengineFamily = v(ENGINE_FAMILY).replace(SEMICOLON_SPACE, COMMA);\n\t\t\t\t\tengineFamily = engineFamily.replace(SPACE_SEMICOLON, COMMA);\n\t\t\t\t\tengineFamily = engineFamily.replace(SEMICOLON, COMMA);\n\t\t\t\t\t/*\n\t\t\t\t\tengineFamily = v(ENGINE_FAMILY).replace(SPACE, BLANK);\n\t\t\t\t\tengineFamily = engineFamily.replace(SEMICOLON, COMMA);*/\n\t\t\t\t}\n\n\t\t\t\tString componentId = BLANK;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (v(SERVICE_CMP_ID) != null && v(SERVICE_CMP_ID).trim().length() != 0\n\t\t\t\t\t\t\t&& !v(SERVICE_CMP_ID).trim().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\t/*System.out.println(currentRow.getCell(SERVICE_CMP_ID)\n\t\t\t\t\t\t\t\t.getRichStringCellValue()); */\n\t\t\t\t\t\tcomponentId = (currentRow.getCell(SERVICE_CMP_ID).getRichStringCellValue())\n\t\t\t\t\t\t\t\t.toString();\n\t\t\t\t\t\tcomponentId = componentId.replace(SEMICOLON_SPACE, COMMA);\n\t\t\t\t\t\tcomponentId = componentId.replace(SPACE_SEMICOLON, COMMA);\n\t\t\t\t\t\tcomponentId = componentId.replace(SEMICOLON, COMMA);\n\t\t\t\t\t\t//System.out.println(componentId);\n\t\t\t\t\t}\n\t\t\t\t} catch (IllegalStateException e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\\nError : Item \" + v(ITEM_ID)\n\t\t\t\t\t\t\t+ \" has invalid Component ID formula.\");\n\t\t\t\t\tLOG_WRITER.write(\"\\nError : Item \" + v(ITEM_ID)\n\t\t\t\t\t\t\t+ \" has invalid Component ID formula.\");\n\t\t\t\t}\n\n\t\t\t\tString catalogNum = BLANK;\n\t\t\t\tif (v(CATALOG_ITEM) != null && v(CATALOG_ITEM).trim().length() != 0\n\t\t\t\t\t\t&& !v(CATALOG_ITEM).trim().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tcatalogNum = v(CATALOG_ITEM).replace(SPACE, BLANK);\n\t\t\t\t\tcatalogNum = catalogNum.replace(SEMICOLON, COMMA);\n\t\t\t\t}\n\t\t\t\t//convertRowToPipeDelimited(currentRow);\n\t\t\t\t//if it is for Service Part\n\t\t\t\tif (v(LINE_TYPE).equals(NEW_SERVICE_PART))\n\t\t\t\t{\n\t\t\t\t\t/* Check for the revision field */\n\t\t\t\t\tString revision_id = DEFAULT_REVISION_ID;\n\t\t\t\t\tif (v(REVISION) != null && v(REVISION).trim().length() != 0\n\t\t\t\t\t\t\t&& !v(REVISION).trim().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\trevision_id = v(REVISION).replace(SPACE, BLANK);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Service Part Writer */\n\n\t\t\t\t\tif (!serviceItemsList.contains(v(ITEM_ID)))\n\t\t\t\t\t{\n\t\t\t\t\t\tSERVICE_PART_WRITER\n\t\t\t\t\t\t\t\t.write(v(ITEM_ID)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(ITEM_NAME)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ revision_id\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ TYPE_REAL_NAME\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ ((v(UOM) == null || v(UOM).trim().length() == 0\n\t\t\t\t\t\t\t\t\t\t\t\t|| v(UOM).trim().isEmpty() || v(UOM)\n\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(EACH)) ? BLANK : v(UOM).trim())\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(IP_CLASS)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(OBJ_WEIGHT)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(OBJ_WEIGHT_UOM)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(ENG_PRODUCT_LINE)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ ((v(DATA_MODEL).contains(MODEL_BASED)) ? MB\n\t\t\t\t\t\t\t\t\t\t\t\t: ((v(DATA_MODEL).contains(MODEL_CENTRIC)) ? MC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: BLANK)\n\n\t\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t\t\t+ DEL + v(ECCN) + DEL + v(ECCN_SOURCE) + DEL + v(OBJ_EVI)\n\t\t\t\t\t\t\t\t\t\t+ DEL + v(CTQ) + DEL + v(CCC) + DEL + v(ECC) + DEL + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(HOMOLOGATION) + DEL + v(CRITICAL_PART) + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(ENG_MAKE_BUY) + NEW_LINE);\n\n\t\t\t\t\t\t/* Service Form Update Writer */\n\t\t\t\t\t\tSERVICE_FORM_WRITER\n\t\t\t\t\t\t\t\t.write(v(ITEM_NAME) + DEL + v(ITEM_ID) + DEL + componentId + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(SERVICEABLE) + DEL + v(REPAIRABLE) + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(SERIALIZED) + DEL + v(POS_TRACKED) + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(SERVICE_ITEM_TYPE) + DEL + tierType + DEL\n\t\t\t\t\t\t\t\t\t\t+ engineFamily + DEL + catalogNum + NEW_LINE);\n\n\t\t\t\t\t\t/* Service Parts' Owning Group update */\n\t\t\t\t\t\tSP_GROUP_ID_WRITER.write(v(ITEM_ID) + NEW_LINE);\n\n\t\t\t\t\t\t/* Relate Service Parts to Document */\n\t\t\t\t\t\tif (v(LINK_DOC) != null && v(LINK_DOC).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_DOC).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSP_ATTACHMENT_WRITER.write(v(ITEM_ID) + DEL + revision_id + DEL\n\t\t\t\t\t\t\t\t\t+ v(LINK_DOC) + DEL + SP_DOC_RELATION_NAME + NEW_LINE);\n\t\t\t\t\t\t\tlinkDocCount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Relate Service Parts to Drawing */\n\t\t\t\t\t\tif (v(LINK_DWG) != null && v(LINK_DWG).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_DWG).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSP_ATTACHMENT_WRITER.write(v(ITEM_ID) + DEL + revision_id + DEL\n\t\t\t\t\t\t\t\t\t+ v(LINK_DWG) + DEL + SP_DWG_RELATION_NAME + NEW_LINE);\n\t\t\t\t\t\t\tlinkDwgCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* Relate Service Parts to Purchase Specifications */\n\t\t\t\t\t\tif (v(LINK_PURCHSPEC) != null && v(LINK_PURCHSPEC).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_PURCHSPEC).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSP_ATTACHMENT_WRITER.write(v(ITEM_ID) + DEL + revision_id + DEL\n\t\t\t\t\t\t\t\t\t+ v(LINK_PURCHSPEC) + DEL + SP_PURCHSPEC_RELATION_NAME\n\t\t\t\t\t\t\t\t\t+ NEW_LINE);\n\t\t\t\t\t\t\tlinkPurchSpecCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* Relate Service Parts to MadeFrom */\n\t\t\t\t\t\tif (v(LINK_MADEFROM) != null && v(LINK_MADEFROM).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_MADEFROM).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMADE_FROM_RELATION_WRITER.write(v(ITEM_ID) + DEL + v(LINK_MADEFROM)\n\t\t\t\t\t\t\t\t\t+ DEL + SP_MADEFROM_RELATION_NAME + NEW_LINE);\n\t\t\t\t\t\t\tlinkMadeFromCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tserviceItemsList.add(v(ITEM_ID));\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG_WRITER.write(DUPLICATE_ENTRY + v(ITEM_ID));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse if (v(LINE_TYPE).equals(EXISTING_ENG_PART))\n\t\t\t\t{\n\t\t\t\t\t/* EngParts' Service Form Creation - ITEM_ID will be used as the Service Form's NAME */\n\t\t\t\t\tif (!engItemsList.contains(v(ITEM_ID)))\n\t\t\t\t\t{\n\t\t\t\t\t\tEP_SERVICE_FORM_WRITER.write(v(ITEM_NAME) + DEL + componentId + DEL\n\t\t\t\t\t\t\t\t+ v(SERVICEABLE) + DEL + v(REPAIRABLE) + DEL + v(SERIALIZED) + DEL\n\t\t\t\t\t\t\t\t+ v(POS_TRACKED) + DEL + v(SERVICE_ITEM_TYPE) + DEL + tierType\n\t\t\t\t\t\t\t\t+ DEL + engineFamily + DEL + catalogNum + DEL + v(ITEM_ID)\n\t\t\t\t\t\t\t\t+ NEW_LINE);\n\t\t\t\t\t\tengParts++;\n\t\t\t\t\t\tengItemsList.add(v(ITEM_ID));\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG_WRITER.write(DUPLICATE_ENTRY + v(ITEM_ID));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*\tAdd child item rows for each assembly */\n\t\t\t\tif (v(PARENT_ID) != null && v(PARENT_ID).trim().length() != 0\n\t\t\t\t\t\t&& !v(PARENT_ID).isEmpty())\n\t\t\t\t{\n\t\t\t\t\tstructureMap.put(v(PARENT_ID), currentRow.getRowNum());\n\t\t\t\t\t/*\tSTRUCTURE_WRITER.write(v(PARENT_ID) + DEL + v(ITEM_ID) + DEL + v(QTY) + DEL\n\t\t\t\t\t\t\t\t+ v(SEQ) + NEW_LINE); - can not write it here, as the same parent might come again later. IPS_DATA_UPLOAD fails if the parent has existing BVR with -bom mode. */\n\t\t\t\t}\n\n\t\t\t\t/* Global Alternate */\n\t\t\t\tString globalAltStr = v(GLOBAL_ALT);\n\t\t\t\tif (globalAltStr != null && !globalAltStr.trim().isEmpty()\n\t\t\t\t\t\t&& globalAltStr.trim().length() != 0)\n\t\t\t\t{\n\t\t\t\t\tglobalAltStr = globalAltStr.replace(SPACE, BLANK);\n\t\t\t\t\tString globalAltArray[] = globalAltStr.split(SEMICOLON);\n\t\t\t\t\tfor (int i = 0; i < globalAltArray.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSP_GLOBAL_ALT_WRITER.write(v(ITEM_ID) + DEL + globalAltArray[i].trim()\n\t\t\t\t\t\t\t\t+ NEW_LINE);\n\t\t\t\t\t\taltPartsCount++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tLOG_WRITER.write(TOTAL_SERVICE_PARTS + serviceItemsList.size() + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_DOCUMENTS_TO_ATTACH + linkDocCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_DRAWINGS_TO_ATTACH + linkDwgCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_PURCHSPEC_TO_ATTACH + linkPurchSpecCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_MADEFROM_TO_ATTACH + linkMadeFromCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_ALTERNATE_PARTS_TO_ADD + altPartsCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_ENG_PARTS_FOR_SERVICE_FORM_CREATON + engParts + NEW_LINE);\n\t\t\tLOG_WRITER.write(LINE_SEPERATOR);\n\n\t\t\t/* Write Structures */\n\t\t\tLOG_WRITER.write(STRUCTURE_START_TIME + new java.util.Date() + NEW_LINE);\n\t\t\tSet<String> parentIDs = structureMap.keySet();\n\t\t\tIterator parentIDsIterator = parentIDs.iterator();\n\t\t\tLOG_WRITER.write(TOTAL_STRUCTURES + parentIDs.size() + NEW_LINE);\n\t\t\t/*PS_STRUCTURE_WRITER.write(NEW_LINE + HASH_SIGN + TOTAL_STRUCTURES + parentIDs.size()\n\t\t\t\t\t+ NEW_LINE);*/\n\t\t\twhile (parentIDsIterator.hasNext())\n\t\t\t{\n\t\t\t\tObject parentID = parentIDsIterator.next();\n\n\t\t\t\t/*PS_STRUCTURE_WRITER.write(NEW_LINE + parentID + DEL + DEFAULT_REVISION_ID + DEL\n\t\t\t\t\t\t+ TYPE_REAL_NAME + DEL + ZERO + NEW_LINE);*/\n\n\t\t\t\tCollection childRows = (Collection) structureMap.get(parentID);\n\t\t\t\tIterator childRowsIterator = childRows.iterator();\n\t\t\t\twhile (childRowsIterator.hasNext())\n\t\t\t\t{\n\t\t\t\t\tRow cRow = datatypeSheet.getRow((int) childRowsIterator.next());\n\t\t\t\t\t/*PS_STRUCTURE_WRITER.write(rv(cRow, ITEM_ID) + DEL + DEFAULT_REVISION_ID + DEL\n\t\t\t\t\t\t\t+ TYPE_REAL_NAME + DEL + ONE + DEL + rv(cRow, SEQ) + DEL\n\t\t\t\t\t\t\t+ rv(cRow, QTY) + NEW_LINE);*/\n\t\t\t\t\tSTRUCTURE_WRITER.write(parentID + DEL + rv(cRow, ITEM_ID) + DEL + rv(cRow, QTY)\n\t\t\t\t\t\t\t+ DEL + rv(cRow, SEQ) + NEW_LINE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tLOG_WRITER.write(STRUCTURE_END_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\tworkbook.close();\n\t\t} catch (FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(EXCEPTION + e.getMessage());\n\t\t} catch (IOException e)\n\t\t{\n\t\t\tSystem.out.println(EXCEPTION + e.getMessage());\n\t\t} finally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (SERVICE_PART_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSERVICE_PART_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SERVICE_FORM_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSERVICE_FORM_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (EP_SERVICE_FORM_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tEP_SERVICE_FORM_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SP_GLOBAL_ALT_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSP_GLOBAL_ALT_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SP_GROUP_ID_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSP_GROUP_ID_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SP_ATTACHMENT_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSP_ATTACHMENT_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (MADE_FROM_RELATION_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tMADE_FROM_RELATION_WRITER.close();\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif (PS_STRUCTURE_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tPS_STRUCTURE_WRITER.close();\n\t\t\t\t}*/\n\t\t\t\tif (STRUCTURE_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSTRUCTURE_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (LOG_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(END_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\t\t\tSystem.out.println(END_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\t\t\tLOG_WRITER.close();\n\t\t\t\t}\n\n\t\t\t} catch (IOException ex)\n\t\t\t{\n\t\t\t\tSystem.out.println(EXCEPTION + ex.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void calculosFicha(int ficha, int fila, int columna, String mov) {\r\n this.setseMovio(true);\r\n this.setContador(0);\r\n this.setContadorMov(this.getContadorMov() - 1);\r\n\r\n int diagonalP = ficha;\r\n int horizontal = ficha;\r\n int vertical = ficha;\r\n int diagonalS = ficha;\r\n boolean arriba = true;\r\n boolean abajo = true;\r\n boolean derecha = true;\r\n boolean izquierda = true;\r\n int num = 0;\r\n while (izquierda || derecha || arriba || abajo) {\r\n num++;\r\n if (fila - num == 0) {\r\n arriba = false;\r\n }\r\n if (fila + num == 9) {\r\n abajo = false;\r\n }\r\n if (columna + num == 10) {\r\n derecha = false;\r\n }\r\n if (columna - num == 0) {\r\n izquierda = false;\r\n }\r\n\r\n if (arriba) {\r\n vertical += tablero[fila - num][columna].getValor();\r\n }\r\n if (abajo) {\r\n vertical += tablero[fila + num][columna].getValor();\r\n }\r\n if (derecha) {\r\n horizontal += tablero[fila][columna + num].getValor();\r\n }\r\n if (izquierda) {\r\n horizontal += tablero[fila][columna - num].getValor();\r\n }\r\n if (arriba && izquierda) {\r\n diagonalP += tablero[fila - num][columna - num].getValor();\r\n }\r\n if (arriba && derecha) {\r\n diagonalS += tablero[fila - num][columna + num].getValor();\r\n }\r\n if (abajo && izquierda) {\r\n diagonalS += tablero[fila + num][columna - num].getValor();\r\n }\r\n if (abajo && derecha) {\r\n diagonalP += tablero[fila + num][columna + num].getValor();\r\n }\r\n\r\n }\r\n\r\n Arrays.fill(movimientos, false);\r\n if (vertical < 9 && vertical != ficha) {\r\n movimientos[vertical] = true;\r\n }\r\n if (horizontal < 9 && horizontal != ficha) {\r\n movimientos[horizontal] = true;\r\n }\r\n if (diagonalP < 9 && diagonalP != ficha) {\r\n movimientos[diagonalP] = true;\r\n }\r\n if (diagonalS < 9 && diagonalS != ficha) {\r\n movimientos[diagonalS] = true;\r\n }\r\n this.comprobarMov();\r\n }", "public int getColumn() {\n return col;\n }", "public static Matrix applyColumnOperation(Matrix m, ColumnTransformation co) {\n throw new UnsupportedOperationException(\"to be implemented\");\n }", "private void writeColumnHeader() throws WriteException, IOException {\r\n WriteXLS.getInstance().writeColumnLabels();\r\n }", "public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"C:\\\\Users\\\\Leonardo\\\\git\\\\repository5\\\\HandleExcelWithApachePoi\\\\src\\\\arquivo_excel.xls\");\r\n\t\t\r\n\t\tif (!file.exists()) {\r\n\t\t\tfile.createNewFile();\r\n\t\t}\r\n\t\t\r\n\t\tPessoa p1 = new Pessoa();\r\n\t\tp1.setEmail(\"[email protected]\");\r\n\t\tp1.setIdade(50);\r\n\t\tp1.setNome(\"Ricardo Edigio\");\r\n\t\t\r\n\t\tPessoa p2 = new Pessoa();\r\n\t\tp2.setEmail(\"[email protected]\");\r\n\t\tp2.setIdade(40);\r\n\t\tp2.setNome(\"Marcos Tadeu\");\r\n\t\t\r\n\t\tPessoa p3 = new Pessoa();\r\n\t\tp3.setEmail(\"[email protected]\");\r\n\t\tp3.setIdade(30);\r\n\t\tp3.setNome(\"Maria Julia\");\r\n\t\t\r\n\t\tList<Pessoa> pessoas = new ArrayList<Pessoa>();\r\n\t\tpessoas.add(p1);\r\n\t\tpessoas.add(p2);\r\n\t\tpessoas.add(p3);\r\n\t\t\r\n\t\t\r\n\t\tHSSFWorkbook hssfWorkbook = new HSSFWorkbook(); /*escrever na planilha*/\r\n\t\tHSSFSheet linhasPessoa = hssfWorkbook.createSheet(\"Planilha de pessoas\"); /*criar planilha*/\r\n\t\t\r\n\t\tint nlinha = 0;\r\n\t\tfor (Pessoa p : pessoas) {\r\n\t\t\tRow linha = linhasPessoa.createRow(nlinha ++); /*criando a linha na planilha*/\r\n\t\t\t\r\n\t\t\tint celula = 0;\r\n\t\t\t\r\n\t\t\tCell celNome = linha.createCell(celula ++); /*celula 1*/\r\n\t\t\tcelNome.setCellValue(p.getNome());\r\n\t\t\t\r\n\t\t\tCell celEmail = linha.createCell(celula ++); /*celula 2*/\r\n\t\t\tcelEmail.setCellValue(p.getEmail());\r\n\t\t\t\r\n\t\t\tCell celIdade = linha.createCell(celula ++); /*celula 3*/\r\n\t\t\tcelIdade.setCellValue(p.getIdade());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tFileOutputStream saida = new FileOutputStream(file);\r\n\t\thssfWorkbook.write(saida);\r\n\t\t\r\n\t\tsaida.flush();\r\n\t\tsaida.close();\r\n\t\t\r\n\t\tSystem.out.println(\"Planilha Criada com Sucesso!\");\r\n\t\t\r\n\t}", "public int getColumna() {\r\n\t\treturn columna;\r\n\t}", "Column createColumn();", "private int rowToX(int r) { \n\t\treturn r * getHeight() / BOARD_LENGTH - (BOARD_PIECE_LENGTH); // why - 50 ?\n\t}", "@Override\n protected boolean isColumnMultiLine(int column)\n {\n return true;\n }", "void setupNewColumns( final int newColumnCount, final PdfData pdd )\r\n {\r\n PdfOutfile outfile = pdd.getOutfile();\r\n float currYposition = outfile.getYposition();\r\n float verticalSkip = computeVerticalSkip( currYposition, pdd );\r\n\r\n // going from 1 column to many\r\n if( pdd.getColumnCount() == 1 ) {\r\n pdd.setColumns( new Columns( newColumnCount, verticalSkip, pdd ));\r\n }\r\n else\r\n // going from many to 1, so then we can close off where we are on the\r\n // page and go back to a single column. If we are in the leftmost column,\r\n // then we make the conversion right there on the page. If we are not in the\r\n // leftmost column, then we presume that the leftmost column has been filled\r\n // to the bottom of the page, so we need to do a page eject and start on the\r\n // next page.\r\n\r\n // adjustCurrentColumn(); //-----from v. 0.1.16. Needed?\r\n if( newColumnCount == 1 ) {\r\n // are we in the leftmost column?\r\n if( pdd.getCurrColumn() == 0 ) {\r\n pdd.setColumns( new Columns( 1, verticalSkip, pdd ));\r\n }\r\n else\r\n // if we're not in the first column, we have to assume\r\n // that the leftmost column is full to the bottom of the\r\n // page, so we push out a new page and start in the left\r\n // column of that page (column 0)\r\n {\r\n outfile.newPageLowLevel();\r\n pdd.setColumns( new Columns( 1, 0f, pdd ));\r\n pdd.setCurrColumn( 0 );\r\n }\r\n }\r\n else\r\n // we are going form many columns to another number of many columns\r\n // so start a new page and resume in column 0\r\n {\r\n outfile.newPageLowLevel();\r\n pdd.setColumns( new Columns( newColumnCount, 0f, pdd ));\r\n pdd.setCurrColumn( 0 );\r\n }\r\n }", "@Override\n\tprotected String getColumn()\n\t{\n\t\treturn null;\n\t}", "private void export3(final TableFacade tableFacade,final HttpServletRequest request) {\n\t\tif (WICH_ONE.equals(\"A\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascIngresoCoope\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"B\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascRetiroCoope\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"C\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascProfesion\");\n\t\t}\n\t\tif (WICH_ONE.equals(\"D\")) {\n\t\t\ttableFacade.setColumnProperties(\"ascCodigo\", \"ascSalario\");\n\t\t}\n\n\t\tTable table = tableFacade.getTable();\n\t\t// ---- Titulo de la tabla\n\t\ttable.setCaptionKey(\"tbl.planilla.caption\");\n\n\t\tRow row = table.getRow();\n\t\tColumn nombreColumna = row.getColumn(\"ascCodigo\");\n\t\tnombreColumna.setTitleKey(\"tbl.planilla.ascCodigo.x\");\n\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\tpublic Object getValue(Object item, String property, int rowcount) {\n\t\t\t\tObject value = new BasicCellEditor().getValue(item, property,\n\t\t\t\t\t\trowcount);\n\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\tString codigo = \"'\" + asociado.getAscCodigo();\n\t\t\t\treturn codigo;\n\t\t\t}\n\n\t\t});\n\n\t\tif (WICH_ONE.equals(\"A\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascIngresoCoope\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.aportaciones\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAportaciones = 0.0;\n\t\t\t\t\tdescAportaciones += obtenerDescuentos(asociado, \"B\", \"A\",\n\t\t\t\t\t\t\tdescAportaciones,request);\n\t\t\t\t\treturn descAportaciones;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"B\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascRetiroCoope\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.ahorros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descAhorros = 0.0;\n\t\t\t\t\tdescAhorros += obtenerDescuentos(asociado, \"B\", \"B\",\n\t\t\t\t\t\t\tdescAhorros,request);\n\t\t\t\t\treturn descAhorros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"C\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascProfesion\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.prestamos\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descPrestamos = 0.0;\n\t\t\t\t\tdescPrestamos += obtenerDescuentos(asociado, \"C\", \"\",\n\t\t\t\t\t\t\tdescPrestamos,request);\n\t\t\t\t\treturn descPrestamos;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\t\tif (WICH_ONE.equals(\"D\")) {\n\t\t\tnombreColumna = row.getColumn(\"ascSalario\");\n\t\t\tnombreColumna.setTitleKey(\"tbl.planilla.seguros\");\n\t\t\tnombreColumna.getCellRenderer().setCellEditor(new CellEditor() {\n\n\t\t\t\tpublic Object getValue(Object item, String property,\n\t\t\t\t\t\tint rowcount) {\n\t\t\t\t\tObject value = new BasicCellEditor().getValue(item,\n\t\t\t\t\t\t\tproperty, rowcount);\n\t\t\t\t\tCtaAscAsociado asociado = (CtaAscAsociado) item;\n\t\t\t\t\tdouble descSeguros = 0.0;\n\t\t\t\t\tdescSeguros += obtenerDescuentos(asociado, \"D\", \"\",\n\t\t\t\t\t\t\tdescSeguros,request);\n\t\t\t\t\treturn descSeguros;\n\t\t\t\t}\n\n\t\t\t});\n\t\t}\n\n\t\ttableFacade.render();\n\t}", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }" ]
[ "0.5482164", "0.53171724", "0.5201905", "0.5194406", "0.51710516", "0.51599723", "0.514348", "0.5023331", "0.4987002", "0.49195486", "0.49110028", "0.48816228", "0.48731002", "0.48716217", "0.48670235", "0.48668364", "0.4853728", "0.48492607", "0.4848177", "0.48224074", "0.4818146", "0.48104182", "0.4791315", "0.47870514", "0.47815266", "0.47815266", "0.4780515", "0.47773302", "0.47762337", "0.47749346", "0.47701213", "0.47674012", "0.47531003", "0.47429624", "0.4730058", "0.47260547", "0.47127828", "0.47124404", "0.4705451", "0.4700316", "0.46983021", "0.46956083", "0.4692717", "0.46867478", "0.4683001", "0.4673534", "0.46542966", "0.46542966", "0.46520957", "0.46509838", "0.46459615", "0.46426484", "0.46419704", "0.46417776", "0.4641056", "0.46360248", "0.46290863", "0.46282464", "0.46279973", "0.46268892", "0.46251854", "0.4621894", "0.4601296", "0.4599019", "0.45987046", "0.4596931", "0.45931518", "0.45931518", "0.45851862", "0.45849842", "0.45843026", "0.4580828", "0.45701277", "0.45661992", "0.45641187", "0.4563375", "0.45611376", "0.45611376", "0.45611376", "0.45536974", "0.4546532", "0.45462263", "0.45460892", "0.45445222", "0.4534505", "0.45337054", "0.45203125", "0.45161673", "0.45106637", "0.450904", "0.45050704", "0.44963348", "0.44961902", "0.44908786", "0.4489615", "0.44895542", "0.44764313", "0.44754633", "0.4472585", "0.4470888", "0.44646046" ]
0.0
-1
Process actions related with the servers. Potential actions: CreationRequest the request to create the server has been sent CreationReady the server has been created and configured successfully CreationFailed the server creation has failed server has not been created or server configuration returned error
public Server processAction(Long serverId, ApiV1ServerActionDTO action) { Optional<Server> optionalServer = serverRepository.findById(serverId); Server server = optionalServer.orElse(null); if ( server == null ) { log.error("Server not found"); return null; } if (action.getAction().equals("CreationRequest")) { if ( server.getCreationRequest() == null ) { server.setCreationRequest(); server = serverRepository.save(server); } } else if (action.getAction().equals("CreationReady") && action.getIpv4() != null) { if ( server.isBuilding() ) { server.setCreationCompleted(); server.setIpv4(action.getIpv4()); server.setId_external(action.getId_external()); server = serverRepository.save(server); // if it is the first server in the location, just make sure that we have // the domain record created and that it is pointing to the correct server DomainRecord locationDns = digitalOceanGateway.find(server.getSupplierLocation().getLocation()); if (locationDns == null) { digitalOceanGateway.create(server.getSupplierLocation().getLocation(), server); } else { digitalOceanGateway.update(server.getSupplierLocation().getLocation(), server); } // a user requested the creation of the server. We need to configure the system // so this user can start using it. if (server.getUser().getId() != -1) { // notify the user who has requested the server Email serverBuilt = Email.builder() .with(CoreUtils.getRemoteIp(), CoreUtils.getCookieId().orElse("")) .fromSupport() .to(server.getUser().getEmail()) .subject("Your VPN location is now ready to use") .withTextBody("Thanks for using TheVPNCompany. You have requested to use the location " + server.getSupplierLocation().getLocation().getName() + " and we have build a new server just for you.") .build(); mailUtil.sendEmail(serverBuilt); // change the user location UserLocation userLocation = userLocationRepository.findByUser(server.getUser()).orElseThrow(); userLocation.setLocation(server.getSupplierLocation().getLocation()); userLocationRepository.save(userLocation); // update DNS digitalOceanGateway.updateCNAME(userLocation); } } } else if (action.getAction().equals("CreationFailed")) { server.setCreationFailed(); server = serverRepository.save(server); Email errorEmail = Email.builder() .with(CoreUtils.getRemoteIp(), CoreUtils.getCookieId().orElse("")) .fromSupport() .to(Email.Account.TECH) .subject(CoreUtils.getEnvironemnt() + " - TheVPNCompany Error While Creating Server " + server.getId()) .withTextBody("An error has happened while creating the server " + server.getId()) .build(); mailUtil.sendEmail(errorEmail); } return server; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ResponseDTO performServerActions();", "public Event execute() {\n Customer c = super.getCustomer();\n List<Server> s = super.getServers();\n ListIterator<Server> li = s.listIterator();\n\n while (li.hasNext()) {\n Server server = li.next();\n\n if (server.getIdentifier() == this.serverId) {\n Server newServer = server.serverServe(this.startTime + SERVICE_TIME);\n li.set(newServer);\n break;\n }\n }\n\n return new DoneEvent(c, s, this.serverId, this.startTime + SERVICE_TIME);\n }", "@Override\n public void process() {\n Simulator.allocateServer(c);\n }", "private void handleServers() throws XMLStreamException {\n printf(\"FOUND SERVERS\");\n\n while (skipToStartButNotPast(SERVER, SERVERS)) {\n handleServer();\n }\n }", "private void createExchange(RoutingContext routingContext) {\n LOGGER.debug(\"Info: createExchange method started;\");\n JsonObject requestJson = routingContext.getBodyAsJson();\n LOGGER.info(\"request ::: \" + requestJson);\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/exchange\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson.copy(), authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n LOGGER.debug(\"Info: Authenticating response ;\".concat(authHandler.result().toString()));\n LOGGER.debug(\"Info: databroker :: ;\" + databroker);\n Future<Boolean> isValidNameResult =\n isValidName(requestJson.copy().getString(JSON_EXCHANGE_NAME));\n isValidNameResult.onComplete(validNameHandler -> {\n if (validNameHandler.succeeded()) {\n Future<JsonObject> brokerResult =\n managementApi.createExchange(requestJson, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Creating exchange\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\" + brokerResultHandler.cause());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + validNameHandler.cause().getMessage());\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_EXCHANGE_NAME);\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n\n }", "public void setup_servers()\n {\n // get ServerInfo\n ServerInfo t = new ServerInfo();\n // all 3 servers\n for(int i=0;i<3;i++)\n {\n // get the server IP and port info\n String t_ip = t.hmap.get(i).ip;\n int t_port = Integer.valueOf(t.hmap.get(i).port);\n Thread x = new Thread()\n {\n public void run()\n {\n try\n {\n Socket s = new Socket(t_ip,t_port);\n // SockHandle instance with svr_hdl true and rx_hdl false as this is the socket initiator\n SockHandle t = new SockHandle(s,my_ip,my_port,my_c_id,c_list,s_list,false,true,cnode);\n }\n catch (UnknownHostException e) \n {\n \tSystem.out.println(\"Unknown host\");\n \tSystem.exit(1);\n } \n catch (IOException e) \n {\n \tSystem.out.println(\"No I/O\");\n e.printStackTrace(); \n \tSystem.exit(1);\n }\n }\n };\n \n x.setDaemon(true); \t// terminate when main ends\n x.setName(\"Client_\"+my_c_id+\"_SockHandle_to_Server\"+i);\n x.start(); \t\t\t// start the thread\n }\n }", "private void doServers(final HttpRequest httpRequest, final HttpResponse response) {\r\n\r\n final List<Server> servers = ServerService.getInstance().getAll();\r\n if (servers == null || servers.isEmpty()) {\r\n return;\r\n }\r\n\r\n // We should have a dedicated mapper for this\r\n final ServerListEntity serverListEntity = XMLUtils.convertServers(servers);\r\n try {\r\n final JAXBContext jaxbContext = JAXBContext.newInstance(ServerListEntity.class);\r\n final Marshaller marshaller = jaxbContext.createMarshaller();\r\n marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);\r\n marshaller.setProperty(\"com.sun.xml.bind.characterEscapeHandler\", new XmlCharacterHandler());\r\n marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);\r\n\r\n final StringWriter stringWriter = new StringWriter();\r\n stringWriter.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\");\r\n final PrintWriter printWriter = new PrintWriter(stringWriter);\r\n marshaller.marshal(serverListEntity, printWriter);\r\n response.appendContent(stringWriter.toString());\r\n response.setMimeType(\"text/xml\");\r\n }\r\n catch (final JAXBException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void newExtractionPlan(List<EvidenceExtractionServicesServer> evidenceExtractionServicesServers)\n\t\t\tthrows ScopixException {\n\t\tlog.info(\"start\");\n\t\tExtractionPlanDetailDAO dao = SpringSupport.getInstance().findBeanByClassName(ExtractionPlanDetailDAO.class);\n\t\tfor (EvidenceExtractionServicesServer evidenceExtractionServicesServer : evidenceExtractionServicesServers) {\n\t\t\t// la limpieza se deba hacer por id en Business Services no por\n\t\t\t// serverId\n\t\t\tlog.debug(\"EvidenceExtractionServicesServer : \" + evidenceExtractionServicesServer.getId() + \" deleting EP.\");\n\t\t\tdeleteExtractionPlan(evidenceExtractionServicesServer.getIdAtBusinessServices(),\n\t\t\t\t\tevidenceExtractionServicesServer.getExtractionPlans());\n\n\t\t\t// save evidenceExtractionServicesServer\n\t\t\tlog.debug(\"Saving EvidenceExtractionServicesServer : \" + evidenceExtractionServicesServer.getId());\n\t\t\tgetDao().save(evidenceExtractionServicesServer);\n\n\t\t\tlog.debug(\"Saving EvidenceExtractionServicesServer.providers: \"\n\t\t\t\t\t+ evidenceExtractionServicesServer.getEvidenceProviders().size());\n\t\t\tgetDao().save(evidenceExtractionServicesServer.getEvidenceProviders());\n\n\t\t\tlog.debug(\"Saving EvidenceExtractionServicesServer.getExtractionPlans: \"\n\t\t\t\t\t+ evidenceExtractionServicesServer.getExtractionPlans().size());\n\t\t\tgetDao().save(evidenceExtractionServicesServer.getExtractionPlans());\n\n\t\t\tfor (ExtractionPlan ep : evidenceExtractionServicesServer.getExtractionPlans()) {\n\n\t\t\t\tlog.debug(\"For ExtractionPlan: \" + ep.getId());\n\n\t\t\t\tlog.debug(\"Saving ExtractionPlan.getStoreTimes: \" + ep.getStoreTimes().size());\n\t\t\t\tgetDao().save(ep.getStoreTimes());\n\n\t\t\t\tlog.debug(\"Saving ExtractionPlan.getSituationRequests: \" + ep.getSituationRequests().size());\n\t\t\t\tgetSituationRequestDAO().save(ep.getSituationRequests());\n\n\t\t\t\tfor (SituationRequest situationRequest : ep.getSituationRequests()) {\n\n\t\t\t\t\tlog.debug(\"For situationRequest: \" + situationRequest.getId());\n\n\t\t\t\t\tlog.debug(\"Saving situationRequest.getMetricRequests: \" + situationRequest.getMetricRequests().size());\n\t\t\t\t\tgetMetricRequestDAO().save(situationRequest.getMetricRequests());\n\n\t\t\t\t\tlog.debug(\"Saving situationRequest.getSituationSensors: \" + situationRequest.getSituationSensors().size());\n\t\t\t\t\tgetSituationSensorDAO().save(situationRequest.getSituationSensors());\n\n\t\t\t\t\tlog.debug(\"Saving MetricRequest: \" + situationRequest.getMetricRequests().size());\n\t\t\t\t\tfor (MetricRequest mr : situationRequest.getMetricRequests()) {\n\t\t\t\t\t\tgetEvidenceProviderRequestDAO().save(mr.getEvidenceProviderRequests());\n\t\t\t\t\t}\n\n\t\t\t\t\t// se agrega nueva estructura para manejo de random Camera\n\t\t\t\t\tlog.debug(\"Saving situationRequest.getSituationRequestRanges: \"\n\t\t\t\t\t\t\t+ situationRequest.getSituationRequestRanges().size());\n\t\t\t\t\tgetSituationRequestRangeDAO().save(situationRequest.getSituationRequestRanges());\n\n\t\t\t\t\tlog.debug(\"Saving SituationRequestRanges: \" + situationRequest.getSituationRequestRanges().size());\n\t\t\t\t\tfor (SituationRequestRange srr : situationRequest.getSituationRequestRanges()) {\n\t\t\t\t\t\tgetSituationExtractionRequestDAO().save(srr.getSituationExtractionRequests());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tlog.debug(\"Saving saveAllExtractionPlanDetails: \" + ep.getExtractionPlanDetails().size());\n\t\t\t\tdao.saveAllExtractionPlanDetail(ep.getExtractionPlanDetails());\n\n\t\t\t}\n\t\t\tinitializeWebserviceClient();\n\n\t\t\tlog.debug(\"Getting extractionPlanWebService \");\n\t\t\tExtractionPlanWebService extractionPlanWebService = ExtractionPlanWebServiceClient.getInstance().getWebServiceClient(\n\t\t\t\t\tevidenceExtractionServicesServer.getUrl());\n\n\t\t\tlog.debug(\"Creating ExtractionPlanToExtractionServer \");\n\t\t\tSendExtractionPlanToExtractionServerCommand sendExtractionPlanToExtractionServerCommand = new SendExtractionPlanToExtractionServerCommand();\n\n\t\t\tlog.debug(\"Sending ExtractionPlanToExtractionServer \");\n\t\t\tsendExtractionPlanToExtractionServerCommand.execute(evidenceExtractionServicesServer, extractionPlanWebService);\n\n\t\t}\n\t\tlog.info(\"end\");\n\t}", "ResponseDTO startAllServers();", "@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "@Override\n public void execute()\n {\n if(levelOfDetail != null)\n {\n if(levelOfDetail.equals(\"simple\"))\n serverStatusFactory = new SimpleFactory();\n else if(!levelOfDetail.equals(\"complex\"))\n throw new InvalidLevelOfDetailException();\n }\n\n status = serverStatusFactory.getServerStatus(id, String.format(template, name));\n\n for (String detail : details)\n {\n switch (detail)\n {\n case \"operations\":\n {\n status = serverStatusFactory.getOperationsDetailedServerStatus(status);\n break;\n }\n case \"extensions\":\n {\n status = serverStatusFactory.getExtensionDetailedServerStatus(status);\n break;\n }\n case \"memory\":\n {\n status = serverStatusFactory.getMemoryDetailedServerStatus(status);\n break;\n }\n default:\n {\n throw new InvalidDetailException();\n }\n }\n }\n status.setStatusDesc(status.generateStatusDesc());\n }", "void filterCreate(ServerContext context, CreateRequest request,\n ResultHandler<Resource> handler, RequestHandler next);", "private void configureServerInstance() {\n final String myUrl = \"http://68.71.213.88/pepinstances/json\";\n final HttpClient client = HttpClientBuilder.create().build();\n final HttpPost httpPost = new HttpPost(myUrl);\n\n httpPost.addHeader(\"Connection\", \"keep-alive\");\n httpPost.addHeader(\"X-Conversation-Id\", \"BeepBeep123456\");\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n httpPost.addHeader(\"X-API-Version\", \"1\");\n httpPost.addHeader(\"Accept\", \"application/json;apiversion=1\");\n httpPost.addHeader(\"Authorization\", \"BEARER \" + token);\n httpPost.addHeader(\"X-Disney-Internal-PoolOverride-WDPROAPI\",\n \"XXXXXXXXXXXXXXXXXXXXXXXXX\");\n\n final String bodyRequest = \"\";\n HttpEntity entity;\n try {\n entity = new ByteArrayEntity(bodyRequest.getBytes(\"UTF-8\"));\n httpPost.setEntity(entity);\n\n final HttpResponse response = client.execute(httpPost);\n final HttpEntity eResponse = response.getEntity();\n final String responseBody = EntityUtils.toString(eResponse);\n final JSONObject lampStack = new JSONObject(responseBody)\n .getJSONObject(\"LAMPSTACK\");\n if (lampStack.getString(\"LIVE INSTANCE\").equals(\"A\")) {\n setServerInstance(\"A\");\n } else if (lampStack.getString(\"LIVE INSTANCE\").equals(\"B\")) {\n setServerInstance(\"B\");\n } else {\n setServerInstance(\"B\");\n }\n\n } catch (final Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }", "private void execute() {\n\n\t\tPropertiesParser propertiesParser = new PropertiesParser();\n\t\t\n\t\tsetupServer(propertiesParser);\n\t\ttry {\n\t\t\t\n\t\t\tThread.sleep(SERVER_AFTER_RUN_DELAY);\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint i=0;\n\t\tfor( ; i < propertiesParser.getReadersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,true);\n\t\t\t\n\t\t}\n\t\tfor(; i < propertiesParser.getReadersNum()+ propertiesParser.getWritersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,false);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void create(HandlerContext context, Management request, Management response) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "private void createMovement(ServerRequest request,\n ServerResponse response) {\n System.out.println(\"Before Creating\");\n // request.content().as(JsonObject.class).thenAccept(jo -> compensateMovementInMongoDB(jo, response));\n request.content().as(JsonObject.class).thenAccept(jo -> createMovementInMongoDB(jo, response));\n System.out.println(\"After Creating\");\n }", "public SubTaskGroup createCreateServerTasks(Collection<NodeDetails> nodes) {\n SubTaskGroup subTaskGroup = createSubTaskGroup(\"AnsibleCreateServer\");\n for (NodeDetails node : nodes) {\n UserIntent userIntent = taskParams().getClusterByUuid(node.placementUuid).userIntent;\n AnsibleCreateServer.Params params = new AnsibleCreateServer.Params();\n fillCreateParamsForNode(params, userIntent, node);\n params.creatingUser = taskParams().creatingUser;\n params.platformUrl = taskParams().platformUrl;\n // Create the Ansible task to setup the server.\n AnsibleCreateServer ansibleCreateServer = createTask(AnsibleCreateServer.class);\n ansibleCreateServer.initialize(params);\n // Add it to the task list.\n subTaskGroup.addSubTask(ansibleCreateServer);\n }\n getRunnableTask().addSubTaskGroup(subTaskGroup);\n return subTaskGroup;\n }", "@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}", "@Override\r\n\tpublic void processAction(ActionRequest actionRequest,\r\n\t\t\tActionResponse actionResponse) throws IOException, PortletException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.processAction(actionRequest, actionResponse);\r\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 }", "private void createVHost(RoutingContext routingContext) {\n LOGGER.debug(\"Info: createVHost method started;\");\n JsonObject requestJson = routingContext.getBodyAsJson();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/vhost\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson.copy(), authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n Future<Boolean> validNameResult = isValidName(requestJson.copy().getString(JSON_VHOST));\n validNameResult.onComplete(validNameHandler -> {\n if (validNameHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.createVHost(requestJson, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Creating vhost\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_EXCHANGE_NAME);\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n\n }", "ResponseDTO performServerActions(String tagName, List<String> tagValues);", "private void createActions() {\n\n\t\t//-----------------------------------------------\n\t\t// Check if Party Exists\n\t\t//-----------------------------------------------\n\t\tpartyExists = new GuardedRequest<Party>() {\n\t\t\tprotected boolean error() {return emailaddressField.noValue();}\n\t\t\tprotected void send() {super.send(getValue(new PartyExists()));}\n\t\t\tprotected void receive(Party party) {\n\t\t\t\tif (party != null ) {setValue(party);}\n\t\t\t}\n\t\t};\n\n\t\t//-----------------------------------------------\n\t\t// Read Party\n\t\t//-----------------------------------------------\n\t\tactorRead = new GuardedRequest<Party>() {\n\t\t\tprotected boolean error() {return partyField.noValue();}\n\t\t\tprotected void send() {super.send(getValue(new ActorRead()));}\n\t\t\tprotected void receive(Party party){setValue(party);}\n\t\t};\n\n\t\t//-----------------------------------------------\n\t\t// Update Party\n\t\t//-----------------------------------------------\n\t\tactorUpdate = new GuardedRequest<Party>() {\n\t\t\tprotected boolean error() {\n\t\t\t\treturn (\n\t\t\t\t\t\tifMessage(AbstractRoot.noOrganizationid(), Level.TERSE, AbstractField.CONSTANTS.errOrganizationid(), partyField)\n\t\t\t\t\t\t|| ifMessage(partyField.noValue(), Level.TERSE, AbstractField.CONSTANTS.errId(), partyField)\n\t\t\t\t\t\t|| ifMessage(emailaddressField.noValue(), Level.ERROR, AbstractField.CONSTANTS.errEmailaddress(), emailaddressField)\n\t\t\t\t\t\t|| ifMessage(formatdateField.noValue(), Level.ERROR, CONSTANTS.formatdateError(), formatdateField)\n\t\t\t\t\t\t|| ifMessage(formatphoneField.noValue(), Level.ERROR, CONSTANTS.formatphoneError(), formatphoneField)\n\t\t\t\t\t\t|| ifMessage(!Party.isEmailAddress(emailaddressField.getValue()), Level.ERROR, AbstractField.CONSTANTS.errEmailaddress(), emailaddressField)\n//\t\t\t\t\t\t|| ifMessage((typesField.hasValue(Party.Type.Agent.name()) || typesField.hasValue(Party.Type.Organization.name())) && !partyField.hasValue(AbstractRoot.getOrganizationid()), Level.ERROR, CONSTANTS.partytypeError(), partyField)\n\t\t\t\t);\n\t\t\t}\n\t\t\tprotected void send() {super.send(getValue(new ActorUpdate()));}\n\t\t\tprotected void receive(Party party) {\n\t\t\t\tif (parentTable != null) {parentTable.execute(true);}\n\t\t\t\thide();\n\t\t\t}\n\t\t};\n\n\t\t//-----------------------------------------------\n\t\t// Delete Party\n\t\t//-----------------------------------------------\n\t\tactorDelete = new GuardedRequest<Party>() {\n\t\t\tprotected String popup() {return AbstractField.CONSTANTS.errDeleteOK();}\n\t\t\tpublic void cancel() {state = oldstate;}\n\t\t\tprotected boolean error() {\n\t\t\t\treturn (\n\t\t\t\t\t\tifMessage(partyField.noValue(), Level.TERSE, AbstractField.CONSTANTS.errId(), partyField)\n\t\t\t\t);\n\t\t\t}\n\t\t\tprotected void send() {super.send(getValue(new ActorDelete()));}\n\t\t\tprotected void receive(Party party){\n\t\t\t\tif (parentTable != null) {parentTable.execute(true);}\n\t\t\t\thide();\n\t\t\t}\n\t\t};\t\n\t}", "protected void doStartup()\r\n\t{\r\n\t\tthis.logger.info(Messages.getString(\"StartupProcessorImpl.2\")); //$NON-NLS-1$\r\n\r\n\t\tsetStartupResult(result.wait);\r\n\t\t\r\n\t\twhile (!result.allow.equals(allowProcessing()))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tString samlID = this.identifierGenerator.generateSAMLID();\r\n\t\t\t\t\r\n\t\t\t\tElement requestDocument = buildRequest(samlID);\r\n\t\t\t\t\r\n\t\t\t\tTrustedESOERole trustedESOERole = this.metadata.getEntityRoleData(this.trustedESOEIdentifier, TrustedESOERole.class);\r\n\t\t\t\tString endpoint = trustedESOERole.getSPEPStartupServiceEndpoint(IMPLEMENTED_BINDING);\r\n\t\t\t\t\r\n\t\t\t\tthis.logger.debug(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.3\"), endpoint) ); //$NON-NLS-1$\r\n\t\t\t\t\r\n\t\t\t\tElement responseDocument = this.wsClient.spepStartup(requestDocument, endpoint);\r\n\t\t\t\t\r\n\t\t\t\tthis.logger.debug(Messages.getString(\"StartupProcessorImpl.4\")); //$NON-NLS-1$\r\n\r\n\t\t\t\tprocessResponse(responseDocument, samlID);\r\n\t\t\t\t\r\n\t\t\t\tsetStartupResult(result.allow);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (WSClientException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.5\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (MarshallerException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.6\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (SignatureValueException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.7\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (ReferenceValueException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.8\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (UnmarshallerException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.9\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (SPEPInitializationException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.10\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.11\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tThread.sleep(this.startupRetryInterval*1000);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.30\"), this.startupRetryInterval) ); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException e)\r\n\t\t\t{\r\n\t\t\t\t// Ignore\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.logger.debug(Messages.getString(\"StartupProcessorImpl.33\")); //$NON-NLS-1$\r\n\t\t\r\n\t}", "@SuppressWarnings(\"ConstantConditions\")\n @Inject(method = \"setupServer()Z\", at = @At(\"RETURN\"))\n public void setupServer(CallbackInfoReturnable<Boolean> info) {\n // Make sure that the server successfully started\n if (info.getReturnValueZ()) {\n IdleShutdownServer.INSTANCE.getShutdownController().notifyServerStart((MinecraftDedicatedServer)(Object)this);\n }\n }", "public int actions()\n {\n switch (mState) \n {\n case cProcessInit:\n out();\n if (cSimTimeMicro < cClientCount/cClientTransPerMicro) {\n cSimTimeMicro = cClientCount/cClientTransPerMicro;\n System.out.println(\"\\nSimulation time is too short! It has been reset to \" + cSimTimeMicro + \" micro\\n\");\n }\n cMaxRequestsToSend = (int) (cClientTransPerMicro * cSimTimeMicro);\n System.out.println(\"cMaxRequestsToSend = \" + cMaxRequestsToSend);\n \n if (cTransLogMon)\n {\n System.out.println(cTransMonHeader);\n System.out.println(\"----------------------------------------------------------------------------------------\");\n }\n\n// if (cTick)\n// {\n// activate(new Tick());\n// }\n activate(mTaxJvm);\n return cMeJvm;\n \n case cMeJvm:\n activate(mMeJvm);\n return cMeStandbyJvm;\n\n case cMeStandbyJvm:\n activate(mMeStandbyJvm);\n return cJvmActivated;\n\n case cJvmActivated:\n mClientList = headToArray(mClient.mProcess, new Process[0]);\n \n //double tInterval = 500/tClientList.length; //500 is the minimum response time\n //double tInterval = 1.0/(cClientCount*cClientTransPerMicro); \n \n double tInterval = 1.0D*1000*1000/(cClientCount); //evenly distributed client over 1 second interval\n \n //hold until connect next client to the system \n mHoldTimeBetweenClients = cRandom.normal(tInterval, tInterval*0.3);\n mFor_i = -1;\n // Flow into loop\n\n case cForNext:\n ++mFor_i;\n //for (int i = 0; i < tClientList.length; ++i) //For every client\n if (mFor_i >= mClientList.length)\n {\n return cForEnd;\n }\n\n tClientStartTime = time();\n activate((Process) mClientList[mFor_i]); \n return cNewClient;\n \n case cNewClient:\n hold(mHoldTimeBetweenClients);\n return cForNext;\n\n case cForEnd:\n //hold(cRunTimeMicro);\n //return cHoldRunTimeMicro;\n\n case cHoldRunTimeMicro:\n cActualRunTimeMicro = cSimTimeMicro * 2;\n hold(cActualRunTimeMicro);\n return cHoldRunTime;\n \n case cHoldRunTime:\n if (cTick)\n {\n System.out.println(\"\\nSimulation time = \" + time()/(1000.0*1000.0) + \" sec.\");\n System.out.println(\"Requests = \" + cRequests);\n System.out.println(\"cRequestsToSend = \" + cMaxRequestsToSend);\n System.out.println(\"Av.tax time = \" + cTaxSum/cRequests);\n System.out.println(\"Av.client time = \" + cClientSum/cRequests);\n System.out.println(\"\\nExecution time: \" + ((System.currentTimeMillis() - cStartTime)/1000.0) + \" secs.\"); \n }\n return cProcessDone;\n }\n return cProcessError;\n }", "public ServerService(){\n\t\tlogger.info(\"Initilizing the ServerService\");\n\t\tservers.put(1001, new Server(1001, \"Test Server1\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1002, new Server(1002, \"Test Server2\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1003, new Server(1003, \"Test Server3\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tservers.put(1004, new Server(1004, \"Test Server4\", 5, 30, 30, ServerStatus.RUNNING));\n\t\tlogger.info(\"Initilizing the ServerService Done\");\n\t}", "@Override\n\tpublic void processAction(ActionRequest actionRequest, ActionResponse actionResponse)\n\t\t\tthrows IOException, PortletException {\n\t\tsuper.processAction(actionRequest, actionResponse);\n\t}", "@Override\n\tpublic void execute() {\n\t\tlog.info(\"running...\");\n\n\n\t\t/* example for finding the server agent */\n\t\tIAgentDescription serverAgent = thisAgent.searchAgent(new AgentDescription(null, \"ServerAgent\", null, null, null, null));\n\t\tif (serverAgent != null) {\n\t\t\tthis.server = serverAgent.getMessageBoxAddress();\n\n\t\t\t// TODO\n\t\t\tif (!hasGameStarted) {\n\t\t\t\tStartGameMessage startGameMessage = new StartGameMessage();\n\t\t\t\tstartGameMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\tstartGameMessage.gridFile = \"/grids/h_01.grid\";\n\t\t\t\t// Send StartGameMessage(BrokerID)\n\t\t\t\tsendMessage(server, startGameMessage);\n\t\t\t\treward = 0;\n\t\t\t\tthis.hasGameStarted = true;\n\t\t\t}\n\n\t\t} else {\n\t\t\tSystem.out.println(\"SERVER NOT FOUND!\");\n\t\t}\n\n\n\t\t/* example of handling incoming messages without listener */\n\t\tfor (JiacMessage message : memory.removeAll(new JiacMessage())) {\n\t\t\tObject payload = message.getPayload();\n\n\t\t\tif (payload instanceof StartGameResponse) {\n\t\t\t\t/* do something */\n\n\t\t\t\t// TODO\n\t\t\t\tStartGameResponse startGameResponse = (StartGameResponse) message.getPayload();\n\n\t\t\t\tthis.maxNum = startGameResponse.initialWorkers.size();\n\t\t\t\tthis.agentDescriptions = getMyWorkerAgents(this.maxNum);\n\t\t\t\tthis.gameId = startGameResponse.gameId;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + startGameResponse.toString());\n\n\t\t\t\t// TODO handle movements and obstacles\n\t\t\t\tthis.gridworldGame = new GridworldGame();\n\t\t\t\tthis.gridworldGame.obstacles.addAll(startGameResponse.obstacles);\n\n\n\n\t\t\t\t// TODO nicht mehr worker verwenden als zur Verfügung stehen\n\n\t\t\t\t/**\n\t\t\t\t * Initialize the workerIdMap to get the agentDescription and especially the\n\t\t\t\t * MailBoxAdress of the workerAgent which we associated with a specific worker\n\t\t\t\t *\n\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAId.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\t\t\t\t} */\n\n\t\t\t\t/**\n\t\t\t\t * Send the Position messages to each Agent for a specific worker\n\t\t\t\t * PositionMessages are sent to inform the worker where it is located\n\t\t\t\t * additionally put the position of the worker in the positionMap\n\t\t\t\t */\n\t\t\t\tfor (Worker worker: startGameResponse.initialWorkers) {\n\t\t\t\t\tpositionMap.put(worker.id, worker.position);\n\n\t\t\t\t\tworkerIdMap.put(worker.id, this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)));\n\t\t\t\t\tworkerIdReverseAID.put(this.agentDescriptions.get(startGameResponse.initialWorkers.indexOf(worker)).getAid(), worker.id);\n\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(worker.id);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\t// Send each Agent their current position\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = startGameResponse.gameId;\n\t\t\t\t\tpositionMessage.position = worker.position;\n\t\t\t\t\tpositionMessage.workerIdForServer = worker.id;\n\t\t\t\t\t//System.out.println(\"ADDRESS IS \" + workerAddress);\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t\t//break;\n\t\t\t\t}\n\n\t\t\t\thasAgents = true;\n\n\t\t\t\tfor (Order order: savedOrders) {\n\t\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(order);\n\t\t\t\t\tPosition workerPosition = null;\n\t\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tint steps = workerPosition.distance(order.position) + 2;\n\t\t\t\t\tint rewardMove = (steps > order.deadline)? 0 : order.value - steps * order.turnPenalty;\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\t\ttakeOrderMessage.orderId = order.id;\n\t\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\t\ttakeOrderMessage.gameId = gameId;\n\t\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionConfirm) {\n\t\t\t\tPositionConfirm positionConfirm = (PositionConfirm) message.getPayload();\n\t\t\t\tif(positionConfirm.state == Result.FAIL) {\n\t\t\t\t\tString workerId = workerIdReverseAID.get(positionConfirm.workerId);\n\t\t\t\t\tIAgentDescription agentDescription = workerIdMap.get(workerId);\n\t\t\t\t\tICommunicationAddress workerAddress = agentDescription.getMessageBoxAddress();\n\n\t\t\t\t\tPositionMessage positionMessage = new PositionMessage();\n\n\t\t\t\t\tpositionMessage.workerId = agentDescription.getAid();\n\t\t\t\t\tpositionMessage.gameId = positionConfirm.gameId;\n\t\t\t\t\tpositionMessage.position = positionMap.get(workerId);\n\t\t\t\t\tpositionMessage.workerIdForServer = workerId;\n\n\t\t\t\t\tsendMessage(workerAddress, positionMessage);\n\t\t\t\t} else {\n\t\t\t\t\tactiveWorkers.add(message.getSender());\n\t\t\t\t\tfor (String orderId: orderMessages) {\n\t\t\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(this.orderMap.get(orderId));\n\t\t\t\t\t\tif(workerAddress.equals(message.getSender())){\n\t\t\t\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\t\t\t\tassignOrderMessage.order = this.orderMap.get(orderId);\n\t\t\t\t\t\t\tassignOrderMessage.gameId = gameId;\n\t\t\t\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\n\t\t\tif (payload instanceof OrderMessage) {\n\n\t\t\t\t// TODO entscheide, ob wir die Order wirklich annehmen wollen / können\n\n\t\t\t\tOrderMessage orderMessage = (OrderMessage) message.getPayload();\n\n\t\t\t\tif (!hasAgents){\n\t\t\t\t\tsavedOrders.add(orderMessage.order);\n\t\t\t\t\tcontinue;\n\t\t\t\t}else {\n\t\t\t\t\tOrder thisOrder = orderMessage.order;\n\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(thisOrder);\n\t\t\t\tPosition workerPosition = null;\n\t\t\t\tfor (IAgentDescription agentDescription: agentDescriptions) {\n\t\t\t\t\tif (agentDescription.getMessageBoxAddress().equals(workerAddress)) {\n\t\t\t\t\t\tString workerId = workerIdReverseAID.get(agentDescription.getAid());\n\t\t\t\t\t\tworkerPosition = positionMap.get(workerId);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// 3 Runden anfangs zum Initialisieren\n\t\t\t\t\tint steps = workerPosition.distance(thisOrder.position) + 1;\n\t\t\t\t\tint rewardMove = (steps > thisOrder.deadline)? 0 : thisOrder.value - steps * thisOrder.turnPenalty;\n\n\n\t\t\t\t\tSystem.out.println(\"REWARD: \" + rewardMove);\n\n\t\t\t\tif(rewardMove > 0) {\n\t\t\t\t\tTakeOrderMessage takeOrderMessage = new TakeOrderMessage();\n\t\t\t\t\ttakeOrderMessage.orderId = orderMessage.order.id;\n\t\t\t\t\ttakeOrderMessage.brokerId = thisAgent.getAgentId();\n\t\t\t\t\ttakeOrderMessage.gameId = orderMessage.gameId;\n\t\t\t\t\tsendMessage(server, takeOrderMessage);\n\n\t\t\t\t\t// Save order into orderMap\n\t\t\t\t\tOrder order = ((OrderMessage) message.getPayload()).order;\n\t\t\t\t\tthis.orderMap.put(order.id, order);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + orderMessage.toString());\n\n\t\t\t\t// Save order into orderMap\n\n\t\t\t}\n\n\t\t\tif (payload instanceof TakeOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\t// Got Order ?!\n\t\t\t\tTakeOrderConfirm takeOrderConfirm = (TakeOrderConfirm) message.getPayload();\n\t\t\t\tResult result = takeOrderConfirm.state;\n\n\t\t\t\t/**\n\t\t\t\t *\n\t\t\t\t * DEBUGGING\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tSystem.out.println(\"SERVER SENDING \" + takeOrderConfirm.toString());\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\n\t\t\t\t\t// Remove order from orderMap as it was rejected by the server\n\t\t\t\t\tthis.orderMap.remove(takeOrderConfirm.orderId);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\t// TODO send serverAddress\n\t\t\t\t// Assign order to Worker(Bean)\n\t\t\t\t// Send the order to the first agent\n\t\t\t\tAssignOrderMessage assignOrderMessage = new AssignOrderMessage();\n\t\t\t\tassignOrderMessage.order = this.orderMap.get(takeOrderConfirm.orderId);\n\t\t\t\tassignOrderMessage.gameId = takeOrderConfirm.gameId;\n\t\t\t\tassignOrderMessage.server = this.server;\n\t\t\t\tICommunicationAddress workerAddress = decideOrderAssigment(assignOrderMessage.order);\n\t\t\t\tif(activeWorkers.contains(workerAddress)){\n\t\t\t\t\tsendMessage(workerAddress, assignOrderMessage);\n\t\t\t\t} else {\n\t\t\t\t\torderMessages.add(takeOrderConfirm.orderId);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif (payload instanceof AssignOrderConfirm) {\n\n\t\t\t\t// TODO\n\t\t\t\tAssignOrderConfirm assignOrderConfirm = (AssignOrderConfirm) message.getPayload();\n\t\t\t\tResult result = assignOrderConfirm.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// Handle failed confirmation\n\t\t\t\t\t// TODO\n\t\t\t\t\tICommunicationAddress alternativeWorkerAddress = getAlternativeWorkerAddress(((AssignOrderConfirm) message.getPayload()).workerId);\n\t\t\t\t\treassignOrder(alternativeWorkerAddress, assignOrderConfirm);\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\torderMessages.remove(assignOrderConfirm.orderId);\n\n\t\t\t\t// TODO Inform other workers that this task is taken - notwendig??\n\n\t\t\t}\n\n\t\t\tif (payload instanceof OrderCompleted) {\n\n\t\t\t\tOrderCompleted orderCompleted = (OrderCompleted) message.getPayload();\n\t\t\t\tResult result = orderCompleted.state;\n\n\t\t\t\tif (result == Result.FAIL) {\n\t\t\t\t\t// TODO Handle failed order completion -> minus points for non handled rewards\n\t\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\treward += orderCompleted.reward;\n\t\t\t\t// TODO remove order from the worker specific order queues\n\n\t\t\t}\n\n\t\t\tif (payload instanceof PositionUpdate) {\n\n\t\t\t\tPositionUpdate positionUpdate = (PositionUpdate) message.getPayload();\n\t\t\t\tupdateWorkerPosition(positionUpdate.position, positionUpdate.workerId);\n\n\t\t\t}\n\n\t\t\tif (payload instanceof EndGameMessage) {\n\n\t\t\t\tEndGameMessage endGameMessage = (EndGameMessage) message.getPayload();\n\t\t\t\t// TODO lernen lernen lernen lol\n\t\t\t\tSystem.out.println(\"Reward: \" + endGameMessage.totalReward);\n\t\t\t}\n\n\t\t}\n\t}", "private void setupEndpoints() {\n post(API_CONTEXT, \"application/json\", (request, response) -> {\n try {\n response.status(201);\n return gameService.startGame(request.body());\n } catch (Exception e) {\n logger.error(\"Failed to create a new game\");\n response.status(400);\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Join a game\n put(API_CONTEXT + \"/:id\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.joinGame(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceJoinException ex) {\n response.status(410);\n return new ErrorMessage(ex.getMessage());\n }\n }, new JsonTransformer());\n\n // Play a game\n post(API_CONTEXT + \"/:id/turns\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n gameService.play(request.params(\":id\"), request.body());\n } catch (GameService.GameServiceIdException ex){\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n } catch (GameService.GameServiceMoveException ex) {\n response.status(422);\n return new ErrorMessage(ex.getMessage());\n }\n return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // Describe the game board\n get(API_CONTEXT + \"/:id/board\", \"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeBoard(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n // fetch state\n get(API_CONTEXT + \"/:id/state\",\"application/json\", (request, response) -> {\n try {\n response.status(200);\n return gameService.describeState(request.params(\":id\"));\n } catch (GameService.GameServiceIdException ex) {\n response.status(404);\n return new ErrorMessage(ex.getMessage());\n }\n //return Collections.EMPTY_MAP;\n }, new JsonTransformer());\n\n// get(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.find(request.params(\":id\"));\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to find object with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// get(API_CONTEXT + \"/todos\", \"application/json\", (request, response)-> {\n// try {\n// return todoService.findAll() ;\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(\"Failed to fetch the list of todos\");\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// put(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// return todoService.update(request.params(\":id\"), request.body());\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to update todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// return Collections.EMPTY_MAP;\n// }\n// }, new JsonTransformer());\n//\n// delete(API_CONTEXT + \"/todos/:id\", \"application/json\", (request, response) -> {\n// try {\n// todoService.delete(request.params(\":id\"));\n// response.status(200);\n// } catch (TodoService.TodoServiceException ex) {\n// logger.error(String.format(\"Failed to delete todo with id: %s\", request.params(\":id\")));\n// response.status(500);\n// }\n// return Collections.EMPTY_MAP;\n// }, new JsonTransformer());\n\n }", "boolean shouldPrecreateServerService(EffectiveServerSpec server) {\n if (Boolean.TRUE.equals(server.isPrecreateServerService())) {\n // skip pre-create if admin server and managed server are both shutting down\n return ! (domain.getAdminServerSpec().isShuttingDown() && server.isShuttingDown());\n }\n return false;\n }", "private void createQueue(RoutingContext routingContext) {\n LOGGER.debug(\"Info: createQueue method started;\");\n JsonObject requestJson = routingContext.getBodyAsJson();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/queue\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson.copy(), authenticationInfo, authHandler -> {\n LOGGER.debug(\"Info: Authenticating response ;\".concat(authHandler.result().toString()));\n if (authHandler.succeeded()) {\n Future<Boolean> validNameResult =\n isValidName(requestJson.copy().getString(JSON_QUEUE_NAME));\n validNameResult.onComplete(validNameHandler -> {\n if (validNameHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.createQueue(requestJson, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Creating Queue\");\n handleSuccessResponse(response, ResponseType.Created.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Bad request\");\n handleResponse(response, ResponseType.BadRequestData, MSG_INVALID_EXCHANGE_NAME);\n }\n\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "private void establishServerConnection() {\n int lb_port = Integer.parseInt(gui.getLBPort_Text().getText());\n gui.getLBPort_Text().setEnabled(false);\n String lb_ip = gui.getLBIP_Text().getText();\n gui.getLBIP_Text().setEnabled(false);\n int server_port = Integer.parseInt(gui.getServerPort_Text().getText());\n gui.getServerPort_Text().setEnabled(false);\n String server_ip = gui.getServerIP_Text().getText();\n gui.getServerIP_Text().setEnabled(false);\n obtainId(server_ip, server_port);\n lbInfo = new ConnectionInfo(lb_ip, lb_port, 3);\n\n if (connection.startServer(server_port)) {\n connectionHandler = new ServerConnections(connection, lbInfo, requestsAnswered, processingRequests, gui.getCompleted_Text(), gui.getProcessing_Text());\n new Thread(connectionHandler).start();\n\n requestServerId();\n scheduler.scheduleAtFixedRate(heartbeat, 10, 10, TimeUnit.SECONDS);\n } else {\n gui.getLBPort_Text().setEnabled(true);\n gui.getLBIP_Text().setEnabled(true);\n gui.getServerPort_Text().setEnabled(true);\n gui.getServerIP_Text().setEnabled(true);\n gui.getButton_Connect().setEnabled(true);\n }\n }", "private void createWebServers() throws Exception {\r\n\t\tXPathReader xmlReader = new XPathReader(CONFIGURE_FILE);\r\n\t\tNodeList webServerNodeList = (NodeList) xmlReader.getElement(\"/application/webServer\");\r\n\t\tfor(int idx = 1; idx <= webServerNodeList.getLength(); idx ++ ) {\r\n\t\t\tString webServerExpression = String.format(\"/application/webServer[%d]\", idx);\r\n\t\t\tString id = xmlReader.getTextContent(webServerExpression + \"/@id\");\r\n\t\t\tint port = Integer.parseInt(xmlReader.getTextContent(webServerExpression + \"/@port\"));\r\n\t\t\tWebServer webServer = new WebServer();\r\n\t\t\twebServer.setPort(port);\r\n\t\t\t\r\n\t\t\t// setting SSL properties\r\n\t\t\tif(xmlReader.hasElement(webServerExpression + \"/ssl\")) {\r\n\t\t\t\twebServer.setSsl(true);\r\n\t\t\t\tString keyStorePath = xmlReader.getTextContent(webServerExpression + \"/ssl/keyStorePath\");\r\n\t\t\t\tString keyStoreType = xmlReader.getTextContent(webServerExpression + \"/ssl/keyStoreType\");\r\n\t\t\t\tString keyStorePass = xmlReader.getTextContent(webServerExpression + \"/ssl/keyStorePass\");\r\n\t\t\t\twebServer.setKeyStorePath(keyStorePath);\r\n\t\t\t\twebServer.setKeyStoreType(keyStoreType);\r\n\t\t\t\twebServer.setKeyStorePass(keyStorePass);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// adds context\r\n\t\t\tNodeList contextNodeList = (NodeList) xmlReader.getElement(webServerExpression + \"/context\");\r\n\t\t\tfor(int i = 1; i <= contextNodeList.getLength(); i ++) {\r\n\t\t\t\tString contextExpression = String.format(webServerExpression + \"/context[%d]\", i);\r\n\t\t\t\tString path = xmlReader.getTextContent(contextExpression + \"/@path\");\r\n\t\t\t\tString resourceBase = xmlReader.getTextContent(contextExpression + \"/resourceBase\");\r\n\t\t\t\tString descriptor = xmlReader.getTextContent(contextExpression + \"/descriptor\");\r\n\t\t\t\tWebServerContext webServerContext = new WebServerContext();\r\n\t\t\t\twebServerContext.setContextPath(path);\r\n\t\t\t\twebServerContext.setResourceBase(resourceBase);\r\n\t\t\t\twebServerContext.setDescriptor(descriptor);\r\n\t\t\t\twebServer.addContext(webServerContext);\r\n\t\t\t}\r\n\r\n\t\t\t// add webServer\r\n\t\t\twebServers.put(id, webServer);\r\n\t\t}\r\n\t}", "public void configure() {\n\t\tfrom(\"seda:vxf.onboard?multipleConsumers=true\")\n\t\t.doTry()\n\t\t.bean(new MANOController(),\"onBoardVxFToMANOProvider\") //returns exception or nothing\n\t\t.log(\"VNFD Onboarded Successfully\")\n\t\t.doCatch(Exception.class)\n\t\t.log(\"VNFD Onboarding failed!\");\n\n\t\tfrom(\"seda:nsd.onboard?multipleConsumers=true\")\n\t\t.doTry()\n\t\t.bean(new MANOController(),\"onBoardNSDToMANOProvider\") //returns exception or nothing\n\t\t.log(\"NSD Onboarded Successfully\")\n\t\t.doCatch(Exception.class)\n\t\t.log(\"NSD Onboarding failed!\");\t\t\n\n\t\t\n\t\tfrom(\"seda:nsd.deploy?multipleConsumers=true\")\n\t\t.doTry()\n\t\t.bean(new MANOController(),\"deployNSDToMANOProvider\") //returns exception or nothing\n\t\t.log(\"NS deployed Successfully\").stop()\n\t\t.doCatch(Exception.class)\n\t\t.log(\"NS deployment failed!\").stop();\t\t\n\n\t\tfrom(\"seda:nsd.deployment.complete?multipleConsumers=true\")\n\t\t.doTry()\n\t\t.bean(new MANOController(),\"terminateNSFromMANOProvider\") //returns exception or nothing\n\t\t.log(\"NS completed Successfully\")\n\t\t.doCatch(Exception.class)\n\t\t.log(\"NS completion failed!\").stop();\n\n\t\tfrom(\"seda:nsd.deployment.delete?multipleConsumers=true\")\n\t\t.doTry()\n\t\t.bean(new MANOController(),\"deleteNSFromMANOProvider\") //returns exception or nothing\n\t\t.log(\"NS deleted Successfully\")\n\t\t.doCatch(Exception.class)\n\t\t.log(\"NS deletion failed!\").stop();\n\t\t\n\t\t//from(\"timer://checkAndDeployTimer?delay=2m&period=120000\").bean(new MANOController(),\"checkAndDeployExperimentToMANOProvider\").stop();\n\t\t//from(\"timer://checkAndTerminateTimer?delay=2m&period=120000\").bean(new MANOController(),\"checkAndTerminateExperimentToMANOProvider\").stop();\n\t\t\n\t\tfrom(\"timer://checkAndUpdateRunningDeploymentDescriptors?delay=1m&period=120000\").bean(MANOController.class,\"checkAndUpdateRunningDeploymentDescriptors\").stop();\n\t\t\n\t}", "public Preparation(){\n\t\ttry {\n\t\t\t\n\t\t\tValueObjectRetrieve valueObjectRetrieve = new ValueObjectRetrieve(\"StaticData\",new Integer(1),remotehosturi);\n\t\t\tStaticData staticData = (StaticData)valueObjectRetrieve.getValueObject();\n\t\t\tHttpPost httpPost = new HttpPost(\"name\",nameofj2eeproject,null,remotehosturi,\"J2eeProject\");\n\t\t\tSystem.err.println(httpPost.isOk());\n\t\t\t\n\t\t\tFile file = new File(eclipseroot + nameofj2eeproject + \"/mda\");\n\t\t\tfile.mkdir();\n\t\t\t\n\t\t\tFile webxmlfile = new File(eclipseroot + nameofj2eeproject + \"/WEB-INF/web.xml\");\n\t\t\t\n\t\t\tFileDownload fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/base.css\",remotehosturi + \"/base.css\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/createscheme.bat\",remotehosturi + \"/mda/createscheme.bat\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/dropscheme.bat\",remotehosturi + \"/mda/dropscheme.bat\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/h.jsp\",remotehosturi + \"/h.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/index.jsp\",remotehosturi + \"/index.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/menu.jsp\",remotehosturi + \"/menu.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/mysql-connector-java-3.1.12-bin.jar\",remotehosturi + \"/mda/mysql-connector-java-3.1.12-bin.jar\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/systemheader.jsp\",remotehosturi + \"/systemheader.jsp\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/web.xml\",remotehosturi + \"/WEB-INF/web.xml\");\n\t\t\t fileDownload = new FileDownload(eclipseroot + nameofj2eeproject+\"/templates/.classpath\",remotehosturi + \"/.classpath\");\n\n\t\t\t \n\t\t\tHttpClient httpClient = new HttpClient(); \n\t\t\tGetMethod getMethod = new GetMethod(\"http://\" + remotehosturi + \"/templates/copycorejar.bat\");\n\t\t\thttpClient.executeMethod(getMethod);\n\t\t\tString contentofcopycorejat_bat = getMethod.getResponseBodyAsString();\n\t\t\tcontentofcopycorejat_bat = contentofcopycorejat_bat.replaceAll(\"nameofj2eeproject\",nameofj2eeproject);\n\t\t\tFile copycorejat_batfile = new File(eclipseroot + nameofj2eeproject + \"/mda/copycorejar.bat\");\n\t\t\tFileWriter writer = new FileWriter(copycorejat_batfile);\n\t\t\twriter.write(contentofcopycorejat_bat);\n\t\t\t\n\t\t\thttpClient = new HttpClient(); \n\t\t\tgetMethod = new GetMethod(\"http://\" + remotehosturi + \"/templates/createscheme.bat\");\n\t\t\thttpClient.executeMethod(getMethod);\n\t\t\tString content = getMethod.getResponseBodyAsString();\n\t\t\tcontent = content.replaceAll(\"nameofj2eeproject\",nameofj2eeproject);\n\t\t\tFile instancefile = new File(eclipseroot + nameofj2eeproject + \"/mda/copycorejar.bat\");\n\t\t\twriter = new FileWriter(instancefile);\n\t\t\twriter.write(contentofcopycorejat_bat);\n//\t\t\tFile base_css = new File(eclipseroot + nameofj2eeproject + \"base.css\");\n\t\t\t\n\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void twoClientSetupProcesses() {\n\n\tList<String> aClientTags=TagsFactory.getAssignmentTags().getTwoClientClientTags();\n\tList<String> aServerTags=TagsFactory.getAssignmentTags().getTwoClientServerTags();\n\n\ttwoClientSetupProcesses(aClientTags, aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_0\", \"Client_1\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Registry\", 500);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Server\", 2000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_0\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setSleepTime(\"Client_1\", 5000);\n//\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "public SubTaskGroup createSetupServerTasks(\n Collection<NodeDetails> nodes, Consumer<AnsibleSetupServer.Params> paramsCustomizer) {\n SubTaskGroup subTaskGroup = createSubTaskGroup(\"AnsibleSetupServer\");\n for (NodeDetails node : nodes) {\n UserIntent userIntent = taskParams().getClusterByUuid(node.placementUuid).userIntent;\n AnsibleSetupServer.Params params = new AnsibleSetupServer.Params();\n fillSetupParamsForNode(params, userIntent, node);\n params.useSystemd = userIntent.useSystemd;\n paramsCustomizer.accept(params);\n params.sshUserOverride = node.sshUserOverride;\n params.sshPortOverride = node.sshPortOverride;\n\n // Create the Ansible task to setup the server.\n AnsibleSetupServer ansibleSetupServer = createTask(AnsibleSetupServer.class);\n ansibleSetupServer.initialize(params);\n // Add it to the task list.\n subTaskGroup.addSubTask(ansibleSetupServer);\n }\n getRunnableTask().addSubTaskGroup(subTaskGroup);\n return subTaskGroup;\n }", "@PostMapping(value = \"/createUpdateServerConf\")\n\tpublic @ResponseBody ResultVO createUpdateServerConf(HttpServletRequest req, HttpServletResponse res,\n\t\t\tModelMap model) {\n\n\t\tString objName = req.getParameter(\"objName\");\n\t\tString objComment = req.getParameter(\"objComment\");\n\t\tString adminType = req.getParameter(\"adminType\");\n\n\t\tString mainOs = req.getParameter(GPMSConstants.CTRL_ITEM_MAINOS);\n\t\tString extOs = req.getParameter(GPMSConstants.CTRL_ITEM_EXTOS);\n\t\tString priorities = req.getParameter(GPMSConstants.CTRL_ITEM_PRIORITIES);\n\n\t\tResultVO resultVO = new ResultVO();\n\n\t\ttry {\n\n\t\t\tCtrlItemVO itemVo = new CtrlItemVO();\n\t\t\titemVo.setObjNm(objName);\n\t\t\titemVo.setComment(objComment);\n\t\t\titemVo.setModUserId(LoginInfoHelper.getUserId());\n\t\t\titemVo.setMngObjTp(GPMSConstants.CTRL_UPDATE_SERVER_CONF);\n\t\t\titemVo.setMngObjTpAbbr(GPMSConstants.CTRL_UPDATE_SERVER_CONF_ABBR);\n\t\t\tif (\"S\".equalsIgnoreCase(adminType)) {\n\t\t\t\titemVo.setStandardObj(true);\n\t\t\t}\n\n\t\t\tArrayList<CtrlPropVO> propList = new ArrayList<CtrlPropVO>();\n\t\t\tint propSeq = 1;\n\n\t\t\tpropList.add(new CtrlPropVO(\"\", String.valueOf(propSeq++), GPMSConstants.CTRL_ITEM_MAINOS, mainOs, \"\",\n\t\t\t\t\tLoginInfoHelper.getUserId()));\n\t\t\tpropList.add(new CtrlPropVO(\"\", String.valueOf(propSeq++), GPMSConstants.CTRL_ITEM_EXTOS, extOs, \"\",\n\t\t\t\t\tLoginInfoHelper.getUserId()));\n\t\t\tpropList.add(new CtrlPropVO(\"\", String.valueOf(propSeq++), GPMSConstants.CTRL_ITEM_PRIORITIES, priorities,\n\t\t\t\t\t\"\", LoginInfoHelper.getUserId()));\n\n\t\t\tCtrlPropVO[] props = new CtrlPropVO[propList.size()];\n\t\t\tprops = propList.toArray(props);\n\n\t\t\tStatusVO status = ctrlMstService.createCtrlItem(itemVo, props);\n\t\t\tresultVO.setStatus(status);\n\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error in createUpdateServerConf : {}, {}, {}\", GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR), ex.toString());\n\t\t\tif (resultVO != null) {\n\t\t\t\tresultVO.setStatus(new StatusVO(GPMSConstants.MSG_FAIL, GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR)));\n\t\t\t}\n\t\t}\n\n\t\treturn resultVO;\n\t}", "public void execute() {\n //this.$context.$Request.initialize();\n this.$context.$Request.extractAllVars();\n\n this.$context.$Response.writeHeader(\"Content-type\", \"text/html; charset=UTF-8\");\n\n // Check security code\n if (!this.$context.$Request.contains(\"code\")) {\n this.$context.$Response.end(\"Code is required!\");\n return;\n }\n String $code = this.$context.$Request.get(\"code\");\n if (!EQ($code, Config.SECURITY_CODE)) {\n this.$context.$Response.end(\"Incorrect code!\");\n return;\n }\n\n // Check package\n if (!this.$context.$Request.contains(\"package\")) {\n this.$context.$Response.end(\"Package is required!\");\n return;\n }\n String $package = this.$context.$Request.get(\"package\");\n if (BLANK($package)) {\n this.$context.$Response.end(\"Empty package!\");\n return;\n }\n String[] $packageChunks = Strings.split(\"-\", $package);\n for (int $n = 0; $n < SIZE($packageChunks); $n++)\n $packageChunks[$n] = Strings.firstCharToUpper($packageChunks[$n]);\n $package = Strings.join(\"/\", $packageChunks);\n\n // Check class\n if (!this.$context.$Request.contains(\"class\")) {\n this.$context.$Response.end(\"Class is required!\");\n return;\n }\n String $className = this.$context.$Request.get(\"class\");\n if (BLANK($className)) {\n this.$context.$Response.end(\"Empty class!\");\n return;\n }\n\n // Check method\n if (!this.$context.$Request.contains(\"method\")) {\n this.$context.$Response.end(\"Method is required!\");\n return;\n }\n String $method = this.$context.$Request.get(\"method\");\n if (BLANK($method)) {\n this.$context.$Response.end(\"Empty method!\");\n return;\n }\n\n // Fill array with parameters\n int $count = 0;\n TArrayList $pars = new TArrayList();\n for (int $n = 1; $n <= 6; $n++) {\n String $parName = CAT(\"par\", $n);\n if (!this.$context.$Request.contains($parName))\n break;\n String $parValue = this.$context.$Request.get($parName);\n if (EQ($parValue, \"_\"))\n $parValue = \"\";\n //$parsArray[] = $parValue;\n $pars.add($parValue);\n $count++;\n }\n\n String $buffer = null;\n Object $result = null;\n\n String $fullClass = CAT($package, \"/\", $className);\n\n $fullClass = Strings.replace(\"/\", \".\", $fullClass);\n TArrayList $pars0 = new TArrayList(new Object[] { this.$context.$Connection });\n $result = Bula.Internal.callMethod($fullClass, $pars0, $method, $pars);\n\n if ($result == null)\n $buffer = \"NULL\";\n else if ($result instanceof DataSet)\n $buffer = ((DataSet)$result).toXml(EOL);\n else\n $buffer = STR($result);\n this.$context.$Response.write($buffer);\n this.$context.$Response.end();\n }", "public void processAction(ActionRequest request, ActionResponse response) throws PortletException, java.io.IOException {\r\n\r\n }", "public interface RequestServer {\n\n @GET(\"caseplatform/mobile/system-eventapp!register.action\")\n Call<StringResult> register(@Query(\"account\") String account, @Query(\"password\") String password, @Query(\"name\") String name,\n @Query(\"mobilephone\") String mobilephone, @Query(\"identityNum\") String identityNum);\n\n @GET(\"caseplatform/mobile/login-app!login.action\")\n Call<String> login(@Query(\"name\") String username, @Query(\"password\") String password);\n\n @GET(\"caseplatform/mobile/system-eventapp!setUserPassword.action\")\n Call<StringResult> setPassword(@Query(\"account\") String account,\n @Query(\"newPassword\") String newPassword,\n @Query(\"oldPassword\") String oldPassword);\n\n @GET(\"caseplatform/mobile/system-eventapp!getEventInfo.action\")\n Call<Event> getEvents(@Query(\"account\") String account, @Query(\"eventType\") String eventType);\n\n @GET(\"caseplatform/mobile/system-eventapp!reportEventInfo.action \")\n Call<EventUpload> reportEvent(\n @Query(\"account\") String account,\n @Query(\"eventType\") String eventType,\n @Query(\"address\") String address,\n @Query(\"eventX\") String eventX,\n @Query(\"eventY\") String eventY,\n @Query(\"eventMs\") String eventMs,\n @Query(\"eventMc\") String eventMc,\n @Query(\"eventId\") String eventId,\n @Query(\"eventClyj\") String eventClyj,\n @Query(\"eventImg\") String eventImg,\n @Query(\"eventVideo\") String eventVideo,\n @Query(\"eventVoice\") String eventVoice\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!getUserInfo.action\")\n Call<UserInfo> getUserInfo(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @GET(\"caseplatform/mobile/system-eventapp!getOrgDataInfo.action\")\n Call<OrgDataInfo> getOrgData(@Query(\"orgNo\") String orgNo, @Query(\"account\") String account);\n\n @Multipart\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Part(\"video\") File video, @Part(\"videoFileName\") String videoFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodVideo.action\")\n Call<FileUpload> uploadVideo(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Query(\"audio\") File audio, @Query(\"audioFileName\") String audioFileName);\n\n @POST(\"caseplatform/mobile/video-upload!uplodAudio.action\")\n Call<FileUpload> uploadAudio(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Query(\"img\") File img, @Query(\"imgFileName\") String imgFileName);\n\n @POST(\"caseplatform/mobile/file-upload!uplodFile.action\")\n Call<FileUpload> uploadImage(@Body RequestBody requestBody);\n\n @GET(\"caseplatform/mobile/system-eventapp!jobgps.action\")\n Call<StringResult> setCoordinate(@Query(\"account\") String account,\n @Query(\"address\") String address,\n @Query(\"x\") String x,\n @Query(\"y\") String y,\n @Query(\"coordsType\") String coordsType,\n @Query(\"device_id\") String device_id\n );\n\n @GET(\"caseplatform/mobile/system-eventapp!Mbtrajectory.action\")\n Call<Task> getTask(@Query(\"account\") String account);\n\n}", "@Override\n public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {\n try {\n ExternalFirewallDeviceVO fwDeviceVO = _srxFwService.addSrxFirewall(this);\n if (fwDeviceVO != null) {\n SrxFirewallResponse response = _srxFwService.createSrxFirewallResponse(fwDeviceVO);\n response.setObjectName(\"srxfirewall\");\n response.setResponseName(getCommandName());\n this.setResponseObject(response);\n } else {\n throw new ServerApiException(BaseAsyncCmd.INTERNAL_ERROR, \"Failed to add SRX firewall due to internal error.\");\n }\n } catch (InvalidParameterValueException invalidParamExcp) {\n throw new ServerApiException(BaseCmd.PARAM_ERROR, invalidParamExcp.getMessage());\n } catch (CloudRuntimeException runtimeExcp) {\n throw new ServerApiException(BaseCmd.INTERNAL_ERROR, runtimeExcp.getMessage());\n }\n }", "private void processAction(ClientContext context, String relayMsg) throws Exception\r\n {\r\n TwoPlayerClientContext tPCC = (TwoPlayerClientContext) context;\r\n updateContext(tPCC, tPCC.getIOMSG(), tPCC.getMessage());\r\n // update the list\r\n for (TwoPlayerClientContext tp : serverContext.getContextList())\r\n {\r\n if (!tp.equals(tPCC))\r\n {\r\n messageQueue.appendText(\"Processing Action for \" + \r\n tp.getClientID().toString() + \"\\n\");\r\n // copy the data over to other clients\r\n copyData(tPCC, tp);\r\n updateContext(tp, tPCC.getIOMSG(), relayMsg);\r\n }\r\n }\r\n }", "public static void setUpServer() {\n\t\tList<ServerDefinition> srvToSC0CascDefs = new ArrayList<ServerDefinition>();\r\n\t\tServerDefinition srvToSC0CascDef = new ServerDefinition(TestConstants.COMMUNICATOR_TYPE_PUBLISH, TestConstants.logbackSrv, TestConstants.pubServerName1,\r\n\t\t\t\tTestConstants.PORT_PUB_SRV_TCP, TestConstants.PORT_SC0_TCP, 1, 1, TestConstants.pubServiceName1);\r\n\t\tsrvToSC0CascDefs.add(srvToSC0CascDef);\r\n\t\tSystemSuperTest.srvDefs = srvToSC0CascDefs;\r\n\t}", "void executeAction(String action, Map params,\n IPSAgentHandlerResponse response);", "public SubTaskGroup createStartTServersTasks(Collection<NodeDetails> nodes) {\n SubTaskGroup subTaskGroup = createSubTaskGroup(\"AnsibleClusterServerCtl\");\n for (NodeDetails node : nodes) {\n AnsibleClusterServerCtl.Params params = new AnsibleClusterServerCtl.Params();\n UserIntent userIntent = taskParams().getClusterByUuid(node.placementUuid).userIntent;\n // Add the node name.\n params.nodeName = node.nodeName;\n // Add the universe uuid.\n params.setUniverseUUID(taskParams().getUniverseUUID());\n // Add the az uuid.\n params.azUuid = node.azUuid;\n // The service and the command we want to run.\n params.process = \"tserver\";\n params.command = \"start\";\n params.placementUuid = node.placementUuid;\n // Set the InstanceType\n params.instanceType = node.cloudInfo.instance_type;\n params.useSystemd = userIntent.useSystemd;\n // Create the Ansible task to get the server info.\n AnsibleClusterServerCtl task = createTask(AnsibleClusterServerCtl.class);\n task.initialize(params);\n // Add it to the task list.\n subTaskGroup.addSubTask(task);\n }\n getRunnableTask().addSubTaskGroup(subTaskGroup);\n return subTaskGroup;\n }", "public SubTaskGroup createConfigureServerTasks(\n Collection<NodeDetails> nodes, Consumer<AnsibleConfigureServers.Params> paramsCustomizer) {\n SubTaskGroup subTaskGroup = createSubTaskGroup(\"AnsibleConfigureServers\");\n for (NodeDetails node : nodes) {\n Cluster cluster = taskParams().getClusterByUuid(node.placementUuid);\n UserIntent userIntent = cluster.userIntent;\n AnsibleConfigureServers.Params params = new AnsibleConfigureServers.Params();\n // Set the device information (numVolumes, volumeSize, etc.)\n params.deviceInfo = userIntent.getDeviceInfoForNode(node);\n // Add the node name.\n params.nodeName = node.nodeName;\n // Add the universe uuid.\n params.setUniverseUUID(taskParams().getUniverseUUID());\n // Add the az uuid.\n params.azUuid = node.azUuid;\n params.placementUuid = node.placementUuid;\n // Sets the isMaster field\n params.enableYSQL = userIntent.enableYSQL;\n params.enableYCQL = userIntent.enableYCQL;\n params.enableYCQLAuth = userIntent.enableYCQLAuth;\n params.enableYSQLAuth = userIntent.enableYSQLAuth;\n // Set if this node is a master in shell mode.\n // The software package to install for this cluster.\n params.ybSoftwareVersion = userIntent.ybSoftwareVersion;\n params.setEnableYbc(taskParams().isEnableYbc());\n params.setYbcSoftwareVersion(taskParams().getYbcSoftwareVersion());\n params.setYbcInstalled(taskParams().isYbcInstalled());\n // Set the InstanceType\n params.instanceType = node.cloudInfo.instance_type;\n params.enableNodeToNodeEncrypt = userIntent.enableNodeToNodeEncrypt;\n params.enableClientToNodeEncrypt = userIntent.enableClientToNodeEncrypt;\n params.rootAndClientRootCASame = taskParams().rootAndClientRootCASame;\n\n params.allowInsecure = taskParams().allowInsecure;\n params.setTxnTableWaitCountFlag = taskParams().setTxnTableWaitCountFlag;\n params.rootCA = taskParams().rootCA;\n params.setClientRootCA(taskParams().getClientRootCA());\n params.enableYEDIS = userIntent.enableYEDIS;\n params.useSystemd = userIntent.useSystemd;\n // sshPortOverride, in case the passed imageBundle has a different port\n // configured for the region.\n params.sshPortOverride = node.sshPortOverride;\n paramsCustomizer.accept(params);\n\n // Development testing variable.\n params.itestS3PackagePath = taskParams().itestS3PackagePath;\n\n Universe universe = Universe.getOrBadRequest(taskParams().getUniverseUUID());\n UUID custUUID = Customer.get(universe.getCustomerId()).getUuid();\n\n params.callhomeLevel = CustomerConfig.getCallhomeLevel(custUUID);\n // Set if updating master addresses only.\n if (params.updateMasterAddrsOnly) {\n params.type = UpgradeTaskParams.UpgradeTaskType.GFlags;\n if (params.isMaster) {\n params.setProperty(\"processType\", ServerType.MASTER.toString());\n params.gflags =\n GFlagsUtil.getGFlagsForNode(\n node,\n ServerType.MASTER,\n universe.getUniverseDetails().getClusterByUuid(cluster.uuid),\n universe.getUniverseDetails().clusters);\n } else {\n params.setProperty(\"processType\", ServerType.TSERVER.toString());\n params.gflags =\n GFlagsUtil.getGFlagsForNode(\n node,\n ServerType.TSERVER,\n universe.getUniverseDetails().getClusterByUuid(cluster.uuid),\n universe.getUniverseDetails().clusters);\n }\n }\n // Create the Ansible task to get the server info.\n AnsibleConfigureServers task = createTask(AnsibleConfigureServers.class);\n task.initialize(params);\n task.setUserTaskUUID(userTaskUUID);\n // Add it to the task list.\n subTaskGroup.addSubTask(task);\n }\n getRunnableTask().addSubTaskGroup(subTaskGroup);\n return subTaskGroup;\n }", "public void conectServer() {\n\n\t}", "public Server createServer(Server server){\n\t\tlogger.info(\"Creating the Server with the given details\");\n\t\tint id = servers.size()+1+1000;\n\t\tlogger.info(\"The Server id is \"+id);\n\t\tserver.setServerId(id);\n\t\tserver.setServerStatus(ServerStatus.BUILDING);\n\t\tServerBuilder serverBuilder = new ServerBuilder(\"\"+id, server);\n\t\tserverBuilder.start();\n\t\tservers.put(id, server);\n\t\treturn server;\n\t}", "private void createProducts() throws Exception {\n\n\t\tproductDetails200 = ElementFactory.getDefaultProduct(\"CiProd200\", defaultCategories);\n\t\tproductDetails400 = ElementFactory.getDefaultProduct(\"CiProd400\", defaultCategories);\n\n\t\tRestResponse createProduct = ProductRestUtils.createProduct(productDetails200, productManager1);\n\t\tResourceRestUtils.checkCreateResponse(createProduct);\n\t\tproduct200 = ResponseParser.parseToObjectUsingMapper(createProduct.getResponse(), Product.class);\n\n\t\tcreateProduct = ProductRestUtils.createProduct(productDetails400, productManager2);\n\t\tResourceRestUtils.checkCreateResponse(createProduct);\n\t\tproduct400 = ResponseParser.parseToObjectUsingMapper(createProduct.getResponse(), Product.class);\n\t}", "public void markSrvTargetNameCreate() throws JNCException {\n markLeafCreate(\"srvTargetName\");\n }", "private void performCreates()\n {\n // Create entities. We have to loop possibly many times to create the entities\n // because we have to set the FKs. It's\n // possible that the source for a FK is a FK from yet another EI. We don't\n // want to copy a FK until we know that the source for a FK has been\n // properly set. We also want to make sure we set the FK's for the EIs that\n // have been excluded/deleted before we copy FKs for the included/created.\n int debugCnt = 0; // We'll keep a counter in case we get an infinite loop.\n\n // creatingEntities will be true for as long as we think we need to create more entities.\n boolean creatingEntities = true;\n while ( creatingEntities )\n {\n // We'll hope that we're done creating entities after this iteration. If we\n // find we need to create more then we'll turn it back on.\n creatingEntities = false;\n\n if ( debugCnt++ > 100 )\n throw new ZeidonException(\"Internal error: too many times creating entities.\");\n\n for ( ViewImpl view : viewList )\n {\n ObjectInstance oi = view.getObjectInstance();\n\n for ( final EntityInstanceImpl ei : oi.getEntities() )\n {\n if ( ! requiresCreate( ei ) )\n continue;\n\n assert ! ei.getEntityDef().isDerivedPath();\n\n if ( ! createInstance( view, ei ) )\n creatingEntities = true; // We weren't able to create ei. Try again later.\n }\n }\n } // while creatingEntities...\n }", "public void processRequest() throws ServerException {\r\n\t\tint statusCode = 0;\r\n\r\n\t\tSecureDirectory secureDirectory = getSecureDirectory( request.getURI() );\r\n\t\tswitch ( checkAuthentication( secureDirectory ) ) {\r\n\t\tcase NOT_SECURE_DIR:\r\n\t\t\tstatusCode = processNormalRequest( true );\r\n\t\t\tbreak;\r\n\t\tcase NEED_AUTHENTICATE:\r\n\t\t\tstatusCode = sendAuthenticateMessage( secureDirectory );\r\n\t\t\tbreak;\r\n\t\tcase AUTHENTICATED:\r\n\t\t\tstatusCode = processNormalRequest( false );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tthrow new ServerException( ResponseTable.INTERNAL_SERVER_ERROR );\r\n\t\t}\r\n\r\n\t\tnew AccessLog().log( request, statusCode );\r\n\t}", "abstract ManagedChannel createChannel(List<ServerInfo> servers);", "public void onServerSucceeded() {\n if (offline) {\n statusObserver.onServerCameBack();\n offline = false;\n }\n }", "private void setStatusForCreate(SewerageConnectionRequest sewerageConnectionRequest) {\n\t\tif (sewerageConnectionRequest.getSewerageConnection().getProcessInstance().getAction()\n\t\t\t\t.equalsIgnoreCase(SWConstants.ACTION_INITIATE)) {\n\t\t\tsewerageConnectionRequest.getSewerageConnection().setApplicationStatus(SWConstants.STATUS_INITIATED);\n\t\t}\n\t}", "@Override\r\n\t\tpublic void action() {\n\t\t\tswitch (state) {\r\n\t\t\tcase REGISTER:\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" trying to register\");\r\n\t\t\t\t\r\n\t\t\t\t// searching for waiter agent\r\n\t\t\t\twhile(waiter == null) {\r\n\t\t\t\t\twaiter = searchWaiterAgent(\"waiter-service\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tACLMessage cfp = new ACLMessage(ACLMessage.CFP);\r\n\t\t\t\tcfp.addReceiver(waiter);\r\n\t\t\t\tcfp.setContent(\"philosopher-agent\");\r\n\t\t\t\tcfp.setConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tcfp.setReplyWith(\"cfp\"+System.currentTimeMillis());\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" send registration request \" + cfp);\r\n\t\t\t\tmyAgent.send(cfp);\r\n\t\t\t\t\r\n\t\t\t\t// Prepare template to get response\r\n\t\t\t\t//mt = MessageTemplate.and(MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\"),\r\n\t\t\t\t//\t\tMessageTemplate.MatchInReplyTo(request.getReplyWith()));\r\n\t\t\t\tmt = MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tstate = State.REGISTERED;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase REGISTERED:\r\n\t\t\t\tACLMessage response = myAgent.receive();\r\n\t\t\t\tif (response != null && response.getConversationId().equals(\"philosopher-waiter-fork\")) {\r\n\t\t\t\t\tif (response.getPerformative() == ACLMessage.SUBSCRIBE) {\r\n\t\t\t\t\t\t// behaviour can be finished\r\n\t\t\t\t\t\tregistered = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registered Successfully\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tregistered = false;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registration in progress\");\r\n\t\t\t\t\t\tstate = State.REGISTER;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(myAgent.getAID().getName() + \" blocked\");\r\n\t\t\t\t\tblock();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}", "private OutOfProcessServer()\n {\n }", "public void waitServersReady() {\n }", "public void handle(String action, String resourceURI, HandlerContext context, Management request, Management response) throws Exception {\n\n if (Transfer.GET_ACTION_URI.equals(action)) {\n response.setAction(Transfer.GET_RESPONSE_URI);\n get(context, request, response);\n return;\n }\n\n if (Transfer.PUT_ACTION_URI.equals(action)) {\n response.setAction(Transfer.PUT_RESPONSE_URI);\n put(context, request, response);\n return;\n }\n if (Transfer.DELETE_ACTION_URI.equals(action)) {\n response.setAction(Transfer.DELETE_RESPONSE_URI);\n delete(context, request, response);\n return;\n }\n if (Transfer.CREATE_ACTION_URI.equals(action)) {\n response.setAction(Transfer.CREATE_RESPONSE_URI);\n create(context, request, response);\n return;\n }\n\n if (Enumeration.ENUMERATE_ACTION_URI.equals(action)) {\n response.setAction(Enumeration.ENUMERATE_RESPONSE_URI);\n Enumeration enuRequest = new Enumeration(request);\n Enumeration enuResponse = new Enumeration(response);\n enumerate( context, enuRequest, enuResponse);\n return;\n }\n if (Enumeration.PULL_ACTION_URI.equals(action)) {\n response.setAction(Enumeration.PULL_RESPONSE_URI);\n final Enumeration enuRequest = new Enumeration(request);\n final Enumeration enuResponse = new Enumeration(response);\n pull( context, enuRequest, enuResponse);\n return;\n }\n if (Enumeration.RELEASE_ACTION_URI.equals(action)) {\n response.setAction(Enumeration.RELEASE_RESPONSE_URI);\n final Enumeration enuRequest = new Enumeration(request);\n final Enumeration enuResponse = new Enumeration(response);\n release( context, enuRequest, enuResponse);\n return;\n }\n\n if(!customDispatch(action, context, request, response))\n throw new ActionNotSupportedFault(action);\n\t\t\n\t}", "public boolean ServerAction(Container container, Map<String, String> request)\r\n\t\t\tthrows UIException {\n\t\treturn false;\r\n\t}", "public void lbl_ListName_Server(ActionEvent e) throws Exception\n\t{\n\t}", "public static void twoClientSetupProcesses(List<String> aClientTags, List<String> aServerTags ) {\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcessTeams(Arrays.asList(\"RegistryBasedDistributedProgram\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setTerminatingProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Client_0\", \"Client_1\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setProcesses(\"RegistryBasedDistributedProgram\", Arrays.asList(\"Registry\", \"Server\", \"Client_1\", \"Client_0\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Registry\", Arrays.asList(\"Registry\"));\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Server\", aServerTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_0\", aClientTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setEntryTags(\"Client_1\", aClientTags);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Registry\", FlexibleStaticArgumentsTestCase.TEST_REGISTRY_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Server\", FlexibleStaticArgumentsTestCase.TEST_SERVER_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_0\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_0_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setArgs(\"Client_1\", FlexibleStaticArgumentsTestCase.TEST_CLIENT_1_ARGS);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Registry\", 500);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Server\", 2000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Client_0\", 5000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().setGraderResourceReleaseTime(\"Client_1\", 5000);\n\tBasicExecutionSpecificationSelector.getBasicExecutionSpecification().getProcessTeams().forEach(team -> System.out.println(\"### \" + team));\n}", "private void setupServerInfo() {\n\t\tlogger.trace(\"setupServerInfo() is called\");\n\t\t\n\t\t Object[] message = {\n\t\t \"Server Port:\", kkServerPortField,\n\t\t };\n\n\t\t int option = JOptionPane.showConfirmDialog(null, message, \"Setup Server\", JOptionPane.OK_CANCEL_OPTION);\n\t\t if (option == JOptionPane.OK_OPTION) {\t\t \n\t\t\t String portStr = kkServerPortField.getText().trim();\n\t\t\t if(Utility.isNumeric(portStr)){\n\t\t\t\t int port = Integer.valueOf(portStr);\n\t\t\t\t kkServerPort = (port > 0 && port < 65536?port:kkServerPort);\n\t\t\t }\n\t\t }\n\t\t kkServerPortField.setText(String.valueOf(kkServerPort));\n\t}", "public static void main(String[] args) throws IOException{\n\t\tString accessToken = \"<YOUR_ACCESS_TOKEN>\";\n\t\t// The IBM Cloud organization & space to query - case sensitive.\n\t\tString org = \"<YOUR_ORG>\"; // Example: [email protected]\n\t\tString space = \"<YOUR_SPACE>\"; // Example: dev \n\n\t\t// Use TLSv1.2.\n\t\tSystem.setProperty(\"https.protocols\", \"TLSv1.2\");\n\n\t\t// Create the URL.\n\t\tURL orgsURL = new URL(apiEndpoint + \"/organizations/\" + org + \"/spaces/\" + space + \"/serviceinstances\");\n\t\tHttpURLConnection con = (HttpURLConnection) orgsURL.openConnection();\n\t\tcon.setRequestMethod(\"POST\");\n\t\tcon.setRequestProperty(\"Authorization\", \"Bearer \" + accessToken);\n\t\tcon.setRequestProperty(\"Content-Type\",\"application/json\");\n\t\tcon.setDoOutput(true);\n\n\t\t/* CREATE OPTIONS\n\t\t * Type: The plan type to create.\n\t\t * \t\t\t\t\t\t\tEnum: [\"LibertyCollective\", \"LibertyCore\", \"LibertyNDServer\", \"WASBase\", \"WASCell\", \"WASNDServer\"]\n\t\t *\n\t\t * Name: Name your new service icon in IBM Cloud.\n\t\t *\n\t\t * ApplicationServerVMSize: The size of the virtual machine.\n\t\t * \t\t\t\t\t\t\tEnum: [S, M, L, XL, XXL]\n\t\t *\n\t\t * ControlServerVMSize: The size of the Virtual Machine containing the Collective Controller for a LibertyCollective service instance,\n\t\t * \t\t\t\t\t\t\tor the size of the Virtual Machine containing the DMGR for a WASCell service instance. This is required for\n\t\t * \t\t\t\t\t\t \ttypes \"LibertyCollective\" and \"WASCell\", Illegal argument for the other Types.\n\t\t * \t\t\t\t\t\t\tEnum: [S, M, L, XL, XXL]\n\t\t *\n\t\t * NumberOfApplicationVMs: The number (integer) of application server Virtual Machines to create This is required for types \"LibertyCollective\"\n\t\t * \t\t\t\t\t\t\tand \"WASCell\", Illegal argument for the other Types.\n\t\t *\n\t\t * Software_Level: This is optional for types \"WASBase\", \"WASNDServer\", and \"WASCell\". If one is not specified version \"9.0.0\" will be default.\n\t\t * \t\t\t\t\t\t\tEnum: [\"8.5.5\", \"9.0.0\"]\n\t\t */\n\t\tString createOptionsJSON = \"{\\\"Type\\\":\\\"LibertyCore\\\",\\\"Name\\\":\\\"MyFirstAPIServiceInstance\\\",\\\"ApplicationServerVMSize\\\":\\\"S\\\"}\";\n\n\t\t// Add JSON POST data.\n\t\tDataOutputStream wr = new DataOutputStream(con.getOutputStream());\n\t\twr.writeBytes(createOptionsJSON);\n\t\twr.flush();\n\t\twr.close();\n\n\t\tBufferedReader br = null;\n\t\tif (HttpURLConnection.HTTP_OK == con.getResponseCode()) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(con.getInputStream()));\n\t\t}\n\t\telse {\n\t\t\tbr = new BufferedReader(new InputStreamReader(con.getErrorStream()));\n\t\t}\n\n\t\tStringBuffer response = new StringBuffer();\n\t\tString line;\n\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tresponse.append(line);\n\t\t}\n\t\tbr.close();\n\n\t\t// Response from the request.\n\t\tSystem.out.println(response.toString());\n\n\t\t/* Example Response for creating a service instance of type \"LibertyCore\"\n\t\t * {\n\t\t * \t\"Status\":\"Active\",\n\t\t * \t\"ApplicationVMInfo\":\n\t\t * \t{\n\t\t * \t\t\"disk\":12.0,\n\t\t * \t\t\"memory\":2048,\"vcpu\":1\n\t\t * \t},\n\t\t * \t\"ServiceInstance\":\n\t\t * \t{\n\t\t * \t\t\"ServiceInstanceID\":\"8b80bac5-4e78-4a87-bb3e-0e4a8fd6d13a\",\n\t\t * \t\t\"ServiceType\":\"LibertyCore\",\n\t\t * \t\t\"SpaceID\":\"esw7jc13-b12a-47jn-9627-06jdu78d98ed\",\n\t\t * \t\t\"OrganizationID\":\"a23w6701-5324-4af8-b593-e9fdffer36a2\",\n\t\t * \t\t\"Name\":\"MyFirstAPIServiceInstance\"\n\t\t * \t}\n\t\t * }\n\t\t */\n\t}", "abstract protected ActionForward processCreate( UserRequest request )\n throws IOException, ServletException;", "public void markSrvPortCreate() throws JNCException {\n markLeafCreate(\"srvPort\");\n }", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "@ScheduledApiChange(when = \"5.0\", details = \"Default implementation will be removed.\")\n default void preparationSuccessful(@Nonnull Module module,\n @Nonnull Client client,\n @Nonnull Set<TCSResource<?>> resources) {\n }", "private ServerCommand processCreateUserCommand(RoMClient client, CreateUserClientCommand createUserCommand) {\r\n \t\tboolean success = false;\r\n \r\n \t\t// Check if user is admin\r\n \t\tif (client.getIsAdmin()) {\r\n \t\t\tsuccess = this.dataLayer.addUser(createUserCommand.getNewUserName(), createUserCommand.getSHA1EncryptedPassword());\r\n \t\t}\r\n \r\n \t\tServerCommand serverResponseCommand = new CreateUserServerCommand(success, createUserCommand);\r\n \r\n \t\treturn serverResponseCommand;\r\n \t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tcreateServer();\n\t\t\t\t// and start it as a thread\n\t\t\t\tnew ServerRunning().start();\n\t\t\t\tbtnLogin.setEnabled(false);\n\t\t\t\tbtnLogout.setEnabled(true);\n\t\t\t}", "public static void getStatus() {\n\t\ttry {\n\t\t\tint i = 1;\n\t\t\tList<Object[]>serverDetails = ServerStatus.getServerDetails();\n\t\t\tfor (Object[] servers:serverDetails){\n\t\t\t\tServerStatus.verifyServerStatus(i,(String)servers[0], (String)servers[1], (String)servers[2]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch (Exception ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void checkAction() {\n if (action == Consts.CREATE_ACTION) {\n createAction();\n } else {\n updateAction(getArguments().getString(\"taskId\"));\n }\n }", "@Test\n public void CloudScriptServer()\n {\n PlayFabServerModels.LoginWithServerCustomIdRequest customIdReq = new PlayFabServerModels.LoginWithServerCustomIdRequest();\n customIdReq.CreateAccount = true;\n customIdReq.ServerCustomId = PlayFabSettings.BuildIdentifier;\n PlayFabResult<PlayFabServerModels.ServerLoginResult> loginRes = PlayFabServerAPI.LoginWithServerCustomId(customIdReq);\n assertNotNull(loginRes.Result);\n PlayFabServerModels.ExecuteCloudScriptServerRequest hwRequest = new PlayFabServerModels.ExecuteCloudScriptServerRequest();\n hwRequest.FunctionName = \"helloWorld\";\n hwRequest.PlayFabId = loginRes.Result.PlayFabId;\n PlayFabResult<PlayFabServerModels.ExecuteCloudScriptResult> hwResult = PlayFabServerAPI.ExecuteCloudScript(hwRequest);\n assertNotNull(hwResult.Result.FunctionResult);\n Map<String, String> arbitraryResults = (Map<String, String>)hwResult.Result.FunctionResult;\n assertEquals(arbitraryResults.get(\"messageValue\"), \"Hello \" + loginRes.Result.PlayFabId + \"!\");\n }", "public void execute() throws ServerException;", "@Override\n\tpublic boolean processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException {\n\t\tString cmd = ParamUtil.getString(actionRequest, Constants.CMD);\n\t\tSystem.out.println(\"CMD=\" + cmd);\n\t\treturn _mvcActionCommand.processAction(actionRequest, actionResponse);\n\t}", "@PostMapping(\"/new\")\n TokenMessage setupServer(@RequestBody Client client) {\n // Only setup an admin account if one doesn't exist\n if (isSetup()) {\n throw new GromitsException(\"Server already setup\", HttpStatus.FORBIDDEN);\n }\n return new TokenMessage(client.getName(), clientService.createAdmin(client));\n }", "@Test\n public void testPostShoppinglistsAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.postShoppinglistsAction(\"{name}\", \"{description}\", \"{Content-Language}\");\n List<Integer> expectedResults = Arrays.asList(200, 201, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ShoppingList\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 201) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ShoppingList\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "@PostMapping(value = \"/createHostNameConf\")\n\tpublic @ResponseBody ResultVO createHostNameConf(HttpServletRequest req, HttpServletResponse res, ModelMap model) {\n\n\t\tString objName = req.getParameter(\"objName\");\n\t\tString objComment = req.getParameter(\"objComment\");\n\t\tString adminType = req.getParameter(\"adminType\");\n\n\t\tString hosts = req.getParameter(GPMSConstants.CTRL_ITEM_HOSTNAME);\n\n\t\tResultVO resultVO = new ResultVO();\n\n\t\ttry {\n\n\t\t\tCtrlItemVO itemVo = new CtrlItemVO();\n\t\t\titemVo.setObjNm(objName);\n\t\t\titemVo.setComment(objComment);\n\t\t\titemVo.setModUserId(LoginInfoHelper.getUserId());\n\t\t\titemVo.setMngObjTp(GPMSConstants.CTRL_HOSTS_SETUP_CONF);\n\t\t\titemVo.setMngObjTpAbbr(GPMSConstants.CTRL_HOSTS_SETUP_CONF_ABBR);\n\t\t\tif (\"S\".equalsIgnoreCase(adminType)) {\n\t\t\t\titemVo.setStandardObj(true);\n\t\t\t}\n\n\t\t\tArrayList<CtrlPropVO> propList = new ArrayList<CtrlPropVO>();\n\t\t\tint propSeq = 1;\n\n\t\t\tpropList.add(new CtrlPropVO(\"\", String.valueOf(propSeq++), GPMSConstants.CTRL_ITEM_HOSTNAME, hosts, \"\",\n\t\t\t\t\tLoginInfoHelper.getUserId()));\n\n\t\t\tCtrlPropVO[] props = new CtrlPropVO[propList.size()];\n\t\t\tprops = propList.toArray(props);\n\n\t\t\tStatusVO status = ctrlMstService.createCtrlItem(itemVo, props);\n\t\t\tresultVO.setStatus(status);\n\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error in createHostNameConf : {}, {}, {}\", GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR), ex.toString());\n\t\t\tif (resultVO != null) {\n\t\t\t\tresultVO.setStatus(new StatusVO(GPMSConstants.MSG_FAIL, GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR)));\n\t\t\t}\n\t\t}\n\n\t\treturn resultVO;\n\t}", "@Override\n @POST\n @Path(\"/servers\")\n @Consumes(\"application/json\")\n public Response registerServer(String requestBody) throws Exception {\n if (log.isTraceEnabled()) {\n log.trace(\"registerServer() started. Data: \" + requestBody);\n }\n\n Server server;\n try {\n JSONObject json = new JSONObject(requestBody);\n String serverURI = json.getString(\"serverURI\");\n Pattern uriPattern = Pattern.compile(\n String.format(\"^/providers/%d/servers/(\\\\d+)$\", provider.getProviderId()));\n Matcher m = uriPattern.matcher(serverURI);\n if (!m.find()) {\n throw new Exception(\"Invalid server URI: \" + serverURI);\n }\n int serverId = Integer.parseInt(m.group(1));\n server = ServerDAO.findById(provider, serverId);\n if (server == null) {\n throw new Exception(String.format(\"Server '%s' not found.\", serverURI));\n }\n }\n catch (Exception e) {\n throw new WebApplicationException(\n Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build());\n }\n\n EntityManager em = PersistenceUtils.getInstance().getEntityManager();\n\n try {\n if (!cluster.getServerList().contains(server)) {\n em.getTransaction().begin();\n server.getClusterList().add(cluster);\n cluster.getServerList().add(server);\n server = em.merge(server);\n cluster = em.merge(cluster);\n em.getTransaction().commit();\n }\n // no problem if server is already registered\n\n URI resourceUri = new URI(String.format(\"/%d\", server.getServerId()));\n log.trace(\"registerServer() finished successfully.\");\n return Response.created(resourceUri).build();\n }\n finally {\n PersistenceUtils.getInstance().closeEntityManager(em);\n }\n }", "public void createAction() {\n }", "private void serverConfigurations() {\n\n client = new Client();\n client.start();\n\n Network.register(client);\n\n client.addListener(new Listener() {\n public void connected(Connection connection) {\n }\n\n public void received(Connection connection, Object object) {\n if (object instanceof IsFull)\n transitionTo(mainMenu);\n if (object instanceof Abort) {\n //\n }\n\n if (object instanceof CanStart)\n Platform.runLater(() -> transitionTo(mainGame));\n\n if (object instanceof WhoseTurn) {\n WhoseTurn whoseTurn = (WhoseTurn) object;\n Platform.runLater(() -> setTurnLabel(whoseTurn.name));\n }\n if (object instanceof ConnectedPlayers) {\n System.out.println(\"CONNECTED PLAYERS\");\n ConnectedPlayers players = (ConnectedPlayers) object;\n Platform.runLater(() -> {\n textArea.clear();\n for (String name : players.names)\n textArea.appendText(name + \"\\n\");\n }\n );\n }\n\n if (object instanceof ReadyForShips)\n Platform.runLater(() -> transitionTo(setShips));\n\n if (object instanceof OthersSpecs) {\n OthersSpecs othersSpecs = (OthersSpecs) object;\n\n Platform.runLater(() -> {\n\n ene1.serverID = othersSpecs.ene1;\n ene1.name = othersSpecs.ene1n;\n ene1.labeln.setText(ene1.name);\n cWl1.setText(ene1.name);\n\n ene2.serverID = othersSpecs.ene2;\n ene2.name = othersSpecs.ene2n;\n ene2.labeln.setText(ene2.name);\n cWl2.setText(ene2.name);\n\n });\n\n }\n\n if (object instanceof YourBoardToPaint)\n //System.out.println(\"MY BOARD TO PAINT\");\n Platform.runLater(() -> mGSelfBoard.updateTiles(((YourBoardToPaint) object).board));\n\n if (object instanceof EnemiesBoardsToPaint) {\n //System.out.println(\"ENEMIES BOARDS TO PAINT\");\n Platform.runLater(() -> {\n ene1.b.startTiles(((EnemiesBoardsToPaint) object).board1);\n ene2.b.startTiles(((EnemiesBoardsToPaint) object).board2);\n });\n }\n\n if (object instanceof EnemyBoardToPaint) {\n Platform.runLater(() -> {\n EnemyBoardToPaint ebp = (EnemyBoardToPaint) object;\n updateEnemyBoard(ebp.id, ebp.newAttackedBoard);\n System.out.println(\"ENEMY BOARD TO PAINT WITH INDEX \" + ebp.id);\n });\n }\n\n if (object instanceof AnAttackResponse) {\n Platform.runLater(() -> {\n lastAttacked.b.updateTiles(((AnAttackResponse) object).newAttackedBoard);\n iCanAttack = ((AnAttackResponse) object).again;\n doSounds(((AnAttackResponse) object).actualHit, ((AnAttackResponse) object).shipHit);\n });\n }\n\n if (object instanceof YourTurn) {\n Platform.runLater(() -> {\n iCanAttack = true;\n setTurnLabel(\"My TURN!!\");\n });\n }\n\n if (object instanceof YouDead) {\n Platform.runLater(() -> {\n lost(\"You died a horrible death. RIP you\");\n transitionTo(mainMenu);\n });\n }\n\n if (object instanceof PlayerDied) {\n Platform.runLater(() -> {\n removeEnemy(((PlayerDied) object).who);\n });\n }\n\n if (object instanceof YouWon) {\n Platform.runLater(() -> {\n Alert lost = new Alert(Alert.AlertType.CONFIRMATION);\n lost.setContentText(\"YOU BEAT THEM ALL\");\n lost.showAndWait();\n won();\n });\n }\n\n if (object instanceof ChatMessage) {\n Platform.runLater(() -> {\n EnemyLocal toUpdate = ene1;\n if (((ChatMessage) object).saidIt == ene2.serverID) {\n toUpdate = ene2;\n }\n toUpdate.conversation.setText(toUpdate.conversation.getText() + ((ChatMessage) object).message);\n });\n }\n }\n });\n\n }", "@Override\n\tpublic void execute() {\n\t\t\n\t\tif (GamesHandler.test) {\n\t\t\tserverModel = ServerFacadeTest.getSingleton().getGameModel(gameID);\n\t\t} else {\n\t\t\tserverModel = ServerFacade.getSingleton().getGameModel(gameID);\n\t\t}\n\t\t\n\t\tPlayer player = serverModel.getPlayers().get(sender);\n\t\tDevCardList playerOldDevCards = player.getOldDevCards();\n\t\t\n\t\tplayerOldDevCards.setRoadBuilding(playerOldDevCards.getRoadBuilding() - 1);\n\t\t\n\t\tserverModel.getMap().addRoad(new Road(sender, spot1));\n\t\tserverModel.getMap().addRoad(new Road(sender, spot2));\n\t\t\n\t\tplayer.setRoads(player.getRoads() - 2);\n\t\t\n\t\tplayer.setPlayedDevCard(true);\n\t\t\n\t\tMessageLine line = new MessageLine();\n\t\tString username = player.getName();\n\t\tif(username.toLowerCase().equals(\"ife\") || username.toLowerCase().equals(\"ogeorge\")){\n\t\t\tline.setMessage(\"Ife built a couple of roads to try to catch up with Paul, but Daniel always wins anyway\");\n\t\t}\n\t\telse{\n\t\t\tline.setMessage(username + \" built a couple roads with a road building development card\");\n\t\t}\n//\t\tline.setMessage(username + \" built a couple roads with a road building development card\");\n\t\tline.setSource(username);\n\t\tserverModel.getLog().addLine(line);\n\t}", "public void startServer(PWModelDetails pwModelDetails) {\n try {\n List<ServerSap> serverSaps = null;\n try {\n serverSaps = ServerSap.getSapsFromSclFile(pwModelDetails.getSclFileName());\n } catch (SclParseException e) {\n logger.info(\"Error parsing SCL/ICD file: \" + e.getMessage());\n e.printStackTrace();\n return;\n }\n serverSap = serverSaps.get(0);\n serverSap.setPort(pwModelDetails.getPortNumber());\n\n InetAddress address = null;\n try {\n ipAddress = pwModelDetails.getIpAddress();\n address = InetAddress.getByName(ipAddress);\n } catch (UnknownHostException e) {\n logger.info(\"Unknown host: \" + ipAddress);\n logger.info(\"Proxy will run with the defualt IP as define in the SCL file.\");\n logger.info(\"Unknown host \" + ipAddress);\n return;\n }\n if (address != null) {\n serverSap.setBindAddress(address);\n }\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n if (serverSap != null) {\n serverSap.stop();\n }\n logger.info(\"Server was stopped\");\n }\n });\n ServerModel serverModel = serverSap.getModelCopy();\n// create a SampleServer instance that can be passed as a callback object to startListening() and\n// SmartPowerIEDServer sampleServer = new SmartPowerIEDServer();\n SoftGridIEDServer sampleServer = this;\n// Open MUC initialization\n List<BasicDataAttribute> branchCircuitBreakerVals = new ArrayList<BasicDataAttribute>(3);\n for (String reference : iedRefFcHashMap.keySet()) {\n BasicDataAttribute field = (BasicDataAttribute) serverModel.findModelNode(reference, iedRefFcHashMap.get(reference));\n if (field == null) {\n logger.info(\">>>>>> Error in obtaining SCL reference object = \" + reference);\n }\n branchCircuitBreakerVals.add(field);\n }\n// Power World Device Initialization\n ParameterGenerator parameterGenerator = new ParameterGenerator();\n parameterGenerator.setSclKeyToPWKeyMap(pwModelDetails.getSclToPWMapping());\n parameterGenerator.setKeyParameters(pwModelDetails.getKeyArray());\n parameterGenerator.setValueParameters(pwModelDetails.getDataFieldArray());\n parameterGenerator.setPersistedValues(pwModelDetails.getValueArray());\n parameterGenerator.setDeviceObjectName(pwModelDetails.getDeviceName());\n if (controlAPI == null) {\n controlAPI = IedControlerFactory.getPWComBridgeIterface();\n synchronized (controlAPI) {\n if (!controlAPI.isCaseOpened()) {\n controlAPI.openCase();\n }\n }\n }\n parameterGenerator.setControlAPI(controlAPI);\n// load power world data\n serverSap.startListening(sampleServer, parameterGenerator);\n try {\n serverSap.setValues(branchCircuitBreakerVals);\n } catch (Exception e) {\n logger.info(\"pwModelDetails.getModelNodeReference() = \" + pwModelDetails.getModelNodeReference());\n e.printStackTrace();\n }\n\n String[][] paramPack = parameterGenerator.getParamPack();\n type = IEDUtils.getIEDType(parameterGenerator.getDeviceObjectName());\n id = ++IED_COUNT;\n StringBuffer sb = new StringBuffer();\n String logDataSeperator = \":\";\n boolean loged = false;\n logEvent(\"IED : \" + type.name() + \" : \" + id + \" is Started...!\");\n String[] elements = null;\n while (true) {\n synchronized (this) {\n try {\n Thread.sleep(PW_INTERROGATION_INTERVAL);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n elements = parameterGenerator.loadDataValues(paramPack);\n if (elements == null) {\n if(type.name().equals(\"BUS\"))\n {\n System.out.println(\"BUS\");\n }\n continue;\n }\n sb.append(\"Type:\").append(type.name());\n for (int i = 0; i < branchCircuitBreakerVals.size(); i++) {\n BasicDataAttribute modelNodes = branchCircuitBreakerVals.get(i);\n if (modelNodes != null && elements.length > i) {\n String pwKeyName = null;\n for (String sclKey : parameterGenerator.getSclKeyToPWKeyMap().keySet()) {\n if (modelNodes.getReference().toString().endsWith(sclKey)) {\n pwKeyName = sclKey;\n }\n }\n if (pwKeyName == null) {\n continue;\n }\n for (int j = 0; j < paramPack[0].length; j++) {\n if (!loged) {\n sb.append(logDataSeperator).append(paramPack[0][j]).append(logDataSeperator).append(elements[j]);\n }\n if (parameterGenerator.getSclKeyToPWKeyMap().get(pwKeyName).equals(paramPack[0][j])) {\n if (modelNodes instanceof BdaDoubleBitPos) {\n byte[] status = new byte[1];\n if (elements[j].equalsIgnoreCase(\"open\")) {\n status[0] = 0;\n } else {\n status[0] = 1;\n }\n ((BdaDoubleBitPos) modelNodes).setValue(status);\n } else if (modelNodes instanceof BdaVisibleString) {\n ((BdaVisibleString) modelNodes).setValue(elements[j]);\n } else if (modelNodes instanceof BdaFloat32) {\n ((BdaFloat32) modelNodes).setFloat(Float.parseFloat(elements[j]));\n }\n }\n }\n loged = true;\n }\n }\n serverStarted = true;\n// synchronized (logger) {\n// if (ConfigUtil.MANUAL_EXPERIMENT_MODE) {\n // if this string is not printed in the log file,\n logger.info(sb.toString());\n// }\n// }\n sb = new StringBuffer(\"\");\n loged = false;\n serverSap.setValues(branchCircuitBreakerVals);\n if (serverStoped) {\n serverStarted = false;\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testLifeCycle() {\n NewServerResponse serverResponse = connection.createServer(\n \"test.ivan.api.com\", \"lenny\", \"MIRO1B\");\n Server server = serverResponse.getServer();\n // Now we have the server, lets restart it\n assertNotNull(server.getId());\n ServerInfo serverInfo = connection.restartServer(server.getId());\n\n // Should be running now.\n assertEquals(serverInfo.getState(), RunningState.RUNNING);\n assertEquals(server.getName(), \"test.ivan.api.com\");\n assertEquals(server.getImageId(), \"lenny\");\n connection.destroyServer(server.getId());\n }", "private void normalizeModel(List<Server> servers) {\n\n for (Server server : servers) {\n ServerInstance serverInstance = getServerInstance(new ServerRef(server.getHostName(), server.getName()));\n server.setServerState(serverInstance.getServerState());\n server.setSuspendState(serverInstance.getSuspendState());\n }\n }", "private void sendSetRequest() {\r\n\t\tnumOfSets++;\r\n\t\ttype = \"0\";\r\n\t\tnumOfRecipients = servers.size();\r\n\t\tfor(ServerHandler s : servers) {\r\n\t\t\ts.send(this, input);\r\n\t\t}\r\n\t\tsendTime = System.nanoTime();\r\n\r\n\t\tworkerTime = sendTime - pollTime;\r\n\t\t\r\n\t\tfor(ServerHandler s : servers) {\r\n\t\t\tString ricevuto = s.receive();\r\n\t\t\treplies.add(ricevuto);\r\n\t\t}\r\n\t\treceiveTime = System.nanoTime();\r\n\t\tprocessingTime = receiveTime - sendTime;\r\n\t\t\r\n\t\t\r\n\t\tfor(String reply : replies) {\r\n\t\t\tif(!(\"STORED\".equals(reply))) {\r\n\t\t\t\tunproperRequests.add(reply);\r\n\t\t\t\tsendBack(currentJob.getClient(), reply);\r\n\t\t\t\treplies.clear();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tsendBack(currentJob.getClient(), \"STORED\");\r\n\t\treplies.clear();\r\n\t\t\r\n\t}", "private void createResourceMessageAction(Message receivedMessage, DataOutputStream os) throws IOException{\r\n\r\n\t\tSystem.out.println(LOG_TAG + \"Handler for CREATERESOURCE\");\r\n\r\n\t\tSystem.out.println(LOG_TAG + \"Send Ack\");\r\n\r\n\t\tCreateResourceMessage createMessage = new CreateResourceMessage(receivedMessage);\r\n\r\n\t\tPeerCluster.createResource(createMessage.getTime());\r\n\r\n\t\tos.write((new AckMessage(this.listenerId, this.listenerAddr, this.listenerPort, 0, \"\")).generateXmlMessageString().getBytes());\r\n\r\n\t}", "@Test\n public void testPostCartsIdCouponsAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.postCartsIdCouponsAction(\"{id}\", \"{code}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "@Test\n public void testPostOrdersAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.postOrdersAction(\"{cartId}\", \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Order\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) {\r\n\t\tCommunitycreationForm communitycreationForm = (CommunitycreationForm) form;// TODO Auto-generated method stub\r\n\t\t\r\n\t\tEntpMaster entpMaster = new EntpMaster();\r\n\t\tRootMaster rootMaster = new RootMaster();\r\n\t\tString strStatus=\"failure\";\r\n\t\t//System.out.println(\" in action Communitycreation>>>>>!!\");\r\n\t\t\r\n\t\tDataSource ds = getDataSource(request,\"entp\");\r\n\t\t\r\n\t\tString strResult = \"\";\r\n\t\t\r\n\t\t strResult=entpMaster.companyVerify(ds,communitycreationForm.getCommunityName());\r\n\t\t //System.out.println(\"strResult in action Communitycreation>>>>>!!\"+strResult);\r\n\t\t \r\n\t\tif(!strResult.equals(\"success\"))\r\n\t\t{\r\n\t\t\tif(strResult.equals(\"sname\"))\r\n\t\t\t{\r\n\t\t\t\tActionErrors errors = new ActionErrors();\r\n\t\t\t\terrors.add(\"duplicate\", new ActionError(\"errors.company.duplicate\"));\r\n\t\t\t\t\r\n\t\t\t\tif(!errors.isEmpty())\r\n\t\t\t\t{\r\n\t\t\t\t\tsaveErrors(request, errors);\r\n\t\t\t\t}\r\n\t\t\t\tstrStatus=\"failure\";\r\n\t\t\t\treturn mapping.findForward(\"failure\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tstrStatus=\"success\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//System.out.println(\"strStatus in action Communitycreation>>>>>\"+strStatus);\r\n\t\t\r\n\t\tif(strStatus.equalsIgnoreCase(\"success\")){\r\n\t\t\t\r\n\t\t\r\n\t\tVector <String> companyVec = new Vector<String>();\r\n\t\tVector <String> userVec = new Vector<String>();\r\n\t\t\r\n\t\tString creationDate =\"\";\r\n\t\tString creationTime =\"\";\r\n\t\tjava.util.Date dt = new java.util.Date();\r\n\t\tSimpleDateFormat sform = new SimpleDateFormat(\"yyyy-MM-dd, HH:mm:ss,a\");\r\n\t\tString completeRemDate = sform.format(dt);\r\n\t\tStringTokenizer sttotal = new StringTokenizer(completeRemDate, \",\");\r\n\t creationDate = sttotal.nextToken();\r\n\t creationTime = sttotal.nextToken();\r\n\t \r\n\t\t\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName()); //Company short name\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName());\t//Company name\r\n\t\tcompanyVec.add(\"Logix Park\");\r\n\t\tcompanyVec.add(\"Logix Park\");\r\n\t\tcompanyVec.add(\"5115\");\r\n\t\tcompanyVec.add(\"94\");\r\n\t\tcompanyVec.add(\"94\");\r\n\t\tcompanyVec.add(\"201301\");\r\n\t\tcompanyVec.add(communitycreationForm.getCommunityName()+\"@mobilemantra.com\");\r\n\t\tcompanyVec.add(\"+91~0568~258047\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"10\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\tcompanyVec.add(\"0000-00-00\");\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\tcompanyVec.add(\"Consumer\");\r\n\t\tcompanyVec.add(\"NotRequired\");\r\n\t\tcompanyVec.add(\"2\");\r\n\t\tcompanyVec.add(communitycreationForm.getRdbgroup()); // RIGHTS ID\r\n\t\tcompanyVec.add(creationDate);\r\n\t\tcompanyVec.add(creationTime);\r\n\t\tcompanyVec.add(\"0\");\r\n\t\tcompanyVec.add(\"1\");\r\n\t\t//System.out.println(\"communitycreationForm.getRdbgroup() in action Communitycreation>>>^^^^^^^>>\"+communitycreationForm.getRdbgroup());\r\n\t\tstrResult=rootMaster.insertCompanyDetail(ds,companyVec);\r\n\t\t\r\n\t\t/*\r\n\t\tVector companyDetailVec=rootMaster.getCompanyDetail(ds,communitycreationForm.getCommunityName());\r\n\t\t\r\n\t\t\tif(strResult.equalsIgnoreCase(\"success\"))\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tuserVec.add(companyDetailVec.elementAt(0).toString());\r\n\t\t\t\tuserVec.add(\"1\");\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName());\r\n\t\t\t\tuserVec.add(communitycreationForm.getCommunityName()+\"@mobilemantra.com\");\r\n\t\t\t\tuserVec.add(\"+911202517690\");\r\n\t\t\t\tuserVec.add(\"+911202517690\");\r\n\t\t\t\tuserVec.add(\"Logix Park\");\r\n\t\t\t\tuserVec.add(\"India\");\r\n\t\t\t\tuserVec.add(\"UP\");\r\n\t\t\t\tuserVec.add(\"NOIDA\");\r\n\t\t\t\tuserVec.add(\"201301\");\r\n\t\t\t\tuserVec.add(\"nophoto.jpg\");\r\n\t\t\t\tuserVec.add(\"IN\");\r\n\t\t\t\tuserVec.add(creationDate);\r\n\t\t\t\tuserVec.add(creationTime);\r\n\t\t\t\tuserVec.add(\"0000-00-00\");\r\n\t\t\t\tuserVec.add(\"00:00:00\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"20\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"0\");\r\n\t\t\t\tuserVec.add(\"Male\");\r\n\t\t\t\t//System.out.println(\"userVec in action Communitycreation>>>>>\"+userVec);\r\n\t\t\t\tstrResult=rootMaster.insertUserInfo(ds,userVec);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn mapping.findForward(strResult);\r\n\t}", "public void createAndRegisterActors(){\n //stressAppNetworkService.getAbstractNetworkServiceList().forEach((type,ns)->{\n stressAppNetworkService.getChatNetworkServicePluginRootList().forEach(ns->{\n //System.out.println(\"Network Service type: \"+type);\n nsPublicKeyMap.put(ns.getPublicKey(), (ChatNetworkServicePluginRoot) ns);\n ((ChatNetworkServicePluginRoot) ns).setMessageReceiver(this);\n int actorCounter = 0;\n for(ActorProfile actor : actorProfileList){\n createAndRegisterActor(actor,(ChatNetworkServicePluginRoot) ns, actorCounter);\n actorCounter++;\n actorsCreated++;\n report(ReportType.ACTOR_CREATED);\n }\n nsStarted++;\n report(ReportType.NS_STARED);\n });\n }", "public String createElineAndTunnels(SCreateElineAndTunnelsInput createElineAndTunnels)\n throws ServerException {\n String printText = \"Create eline and tunnels \"\n + createElineAndTunnels.getInput().getSncEline().getId();\n LOGGER.debug(printText + \" begin. \");\n Gson gson = new Gson();\n LOGGER.debug(\"Send to Controller: \" + gson.toJson(createElineAndTunnels));\n Retrofit retrofit = ServiceUtil.initRetrofit(baseUrl);\n ElineServiceInterface service = retrofit.create(ElineServiceInterface.class);\n Call<SCmdResultAndNcdResRelationsOutput> repos\n = service.createElineAndTunnels(createElineAndTunnels);\n Response<SCmdResultAndNcdResRelationsOutput> response;\n try {\n response = repos.execute();\n } catch (IOException ex) {\n throw new ServerIoException(ex);\n }\n ServiceUtil.parseCmdResultAndNcdResRelOutput(response, LOGGER, printText);\n LOGGER.debug(printText + \" end. \");\n return L2Converter.getReturnId(response.body());\n }", "public void actions() {\n\t\t\tProvider p = array_provider[theTask.int_list_providers_that_tried_task.get(0)];\n\t\t\t\n\t\t\t//there is a percentage of probability that the user will fail to complete the task\n\t\t\tif(random.draw((double)PERCENTAGE_TASK_FAILURE/100)){ // SUCCESS\n\n\t\t\t\ttot_success_tasks++;\n\t \tthrough_time += time() - theTask.entryTime;\n\t\t\t\ttheTask.out();\n\t\t\t\t\n\t\t\t\tif(FIXED_EARNING_FOR_TASK) earning_McSense = earning_McSense + FIXED_EARNING_VALUE;\n\t\t\t\telse {\n\n\t\t\t\t\t//Provider p = (Provider) theTask.providers_that_tried_task.first();\n\t\t\t\t\tearning_McSense = earning_McSense + (p.min_price*PERCENTAGE_EARNING)/100;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\telse { // FAILURE\n\t\t\t\t//we should check again and if the check fails insert the task in rescheduled_waiting\n\t\t\t\ttheTask.into(taskrescheduled);\n\t\t\t\ttot_failed_tasks++;\n\t\t\t\t//new StartTaskExecution(theTask).schedule(time());\n\n\t\t\t}\n\t\t\t// the provider frees one slot\n\t\t\tp.number_of_task_executing--;\n\t\t\ttot_scheduled_completed_in_good_or_bad_tasks++;\n\n \t}", "@Override\n\tpublic boolean prepareOp() {\n\t\tIterator<Server> iter = this.serverList.iterator();\n\t\tServer current = null;\n\t\t\n\t\t/* \n\t\t * the first replicaNumber servers received the label 0.\n\t\t * then the label of other servers is calculated by sql.getNewLabel()\n\t\t */\n\t\tint groupId = 0;\n\t\tlong label = Constants.maxLabel;\n\t\tint j = 0;\n\t\t\n\t\tPadFsLogger.log(LogLevel.DEBUG, \"NUMBER OF SERVERS in the list : \"+this.serverList.size());\n\t\twhile(iter.hasNext()){\n\t\t\t\n\t\t\t// initialize label and groupId of servers \n\t\t\tif(!(j < Constants.replicaNumber)){ \n\t\t\t\tj = 0;\n\t\t\t\t\n\t\t\t\tgroupId = j;\n\t\t\t\tlabel = label/2;\n\t\t\t}\n\t\t\telse{ \n\t\t\t\tgroupId = j;\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = iter.next();\n\t\t\tcurrent.setGroupId(groupId);\n\t\t\tcurrent.setLabel(label);\n\t\t\tcurrent.setStatus(ServerStatus.READY);\n\t\t\t\n\t\t\tPadFsLogger.log(LogLevel.DEBUG,\"idServer: \"+Long.toUnsignedString(current.getId())+\n\t\t\t\t\t\" label: \"+Long.toUnsignedString(label) + \" groupId: \"+groupId);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tif( !SqlManager.updateServerLabelGroupId(current.getId(), label, groupId) ){\n\t\t\t\tPadFsLogger.log(LogLevel.DEBUG,\"Error during update server label \");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\tj++;\n\t\t\t\n\t\t}\n\n\t\treturn true;\n\t}", "public ServerDef() {}", "@Test\n public void testPostCartsIdEntriesAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.postCartsIdEntriesAction(\"{id}\", \"{productVariantId}\", -1, \"{customerId}\");\n List<Integer> expectedResults = Arrays.asList(200, 400, 403, 404);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/Cart\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 403) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 404) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public static void sendOK() {\n try {\n Server destServer = ServerState.getInstance().getServers().get(sourceID);\n MessageTransfer.sendServer(\n ServerMessage.getOk( String.valueOf(ServerState.getInstance().getSelfID()) ),\n destServer\n );\n System.out.println(\"INFO : Sent OK to s\"+destServer.getServerID());\n }\n catch(Exception e) {\n System.out.println(\"INFO : Server s\"+sourceID+\" has failed. OK message cannot be sent\");\n }\n }", "private void createSignalSystems() {\r\n\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(2)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(3)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(4)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(5)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(7)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(8)));\r\n\r\n if (TtCreateParallelNetworkAndLanes.checkNetworkForSecondODPair(this.scenario.getNetwork())) {\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(10)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(11)));\r\n }\r\n }" ]
[ "0.6080248", "0.5454787", "0.5411963", "0.53855985", "0.53412515", "0.5339934", "0.53211707", "0.5315209", "0.52618587", "0.52599764", "0.5235711", "0.52066225", "0.5188432", "0.51787025", "0.51644546", "0.51376086", "0.512395", "0.511635", "0.5110363", "0.5086018", "0.5081697", "0.5044818", "0.50128126", "0.49810702", "0.49754715", "0.49532786", "0.49346682", "0.49188745", "0.49150294", "0.49086827", "0.4907442", "0.4900626", "0.490032", "0.48951134", "0.48675594", "0.4859049", "0.48588032", "0.48571065", "0.4852596", "0.48452586", "0.48387387", "0.48326665", "0.483022", "0.48292625", "0.4824637", "0.48195738", "0.4809799", "0.48072606", "0.4806734", "0.48047462", "0.48006085", "0.48002467", "0.47811764", "0.47808206", "0.47694275", "0.47680783", "0.4753633", "0.4751727", "0.47456068", "0.47377422", "0.4724303", "0.4720196", "0.4705295", "0.47036552", "0.47023872", "0.46950102", "0.46926966", "0.46916437", "0.46860057", "0.4684825", "0.46724397", "0.46629208", "0.46572438", "0.46567816", "0.46477765", "0.4639984", "0.46358347", "0.4634637", "0.46326622", "0.4628382", "0.46283147", "0.46241507", "0.46201682", "0.46176806", "0.46168166", "0.46167368", "0.46164495", "0.46113014", "0.4611", "0.46109504", "0.46073568", "0.46049497", "0.4602239", "0.45981693", "0.45921603", "0.45891002", "0.45889467", "0.45887733", "0.45846573", "0.4583965" ]
0.70635515
0
Programa que pide que se introduzcan caracteres por teclado y los muestra por pantalla
public static void main(String[] args) throws IOException { BufferedReader stdin=null; stdin=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Introduzca caracteres y pulse Intro: "); String linea=stdin.readLine(); System.out.println("Ha escrito: " + linea); stdin.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void CasoChar(String caracter) throws IOException, Exception\r\n {\r\n String palabra = caracter + leerCaracter() + leerCaracter() + leerCaracter();\r\n switch (palabra.toUpperCase())\r\n {\r\n case \"CHR(\":\r\n String[] numero = leerPalabra(leerCaracter(), \")\");\r\n Matcher matcher = patronNUM.matcher(numero[0]);\r\n if (matcher.matches())\r\n {\r\n switch (numero[1])\r\n {\r\n case \")\":\r\n if (leerRango)\r\n {\r\n if (AnalizarRango(contenidoConjunto.get(contenidoConjunto.size() - 1), Integer.parseInt(numero[0])))\r\n {\r\n int inicio = contenidoConjunto.size() - 1; int fin = Integer.parseInt(numero[0]);\r\n for (int i = contenidoConjunto.get(inicio); i <= fin; i++)\r\n {\r\n contenidoConjunto.add(i);\r\n }\r\n leerRango = false;\r\n AnalizarSimbolo(leerCaracter());\r\n }\r\n }\r\n else\r\n {\r\n contenidoConjunto.add(Integer.parseInt(numero[0]));\r\n AnalizarSimbolo(leerCaracter());\r\n }\r\n break;\r\n default:\r\n Caracteres -= numero[1].length(); debeContinuar = false;\r\n E1(\"Se esperaba final de la definición del caracter en ASCII, no se cerro el parentesis.\");\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n Caracteres -= numero[0].length(); debeContinuar = false;\r\n E1(\"No se definió de forma correcta el char por el método ASCII, se esperaba un número dentro de los parentesis.\");\r\n }\r\n break;\r\n default:\r\n Caracteres -= palabra.length(); debeContinuar = false;\r\n E1(\"Se esperaba la definición por código ASCII del elemento del conjunto \" + nombreConjunto);\r\n break;\r\n }\r\n }", "private String construyeCaracter(String palabra) throws IOException {\n\t\tToken aux = null;\n \t\twhile(!((aux = this.nextTokenWithWhites()).get_lexema().equals(\"'\"))) {\n \t\t\tif (aux.get_lexema().equals(\"fin\"))\n \t\t\t\treturn palabra;\n \t\t\tpalabra = palabra + aux.get_lexema();\n \t\t\t// Si vemos que el caracter se alarga mucho, paramos de leer\n \t\t\tif (palabra.length() > 4) {\n \t\t\t\treturn palabra;\n \t\t\t}\n \t\t}\n \t\tpalabra = palabra + aux.get_lexema();\n\t\treturn palabra;\n\t}", "public static void main(String[] args) {\n System.out.println(\"***************************\");\n System.out.println(\"****** Jeux du Pendu ******\");\n System.out.println(\"***************************\");\n System.out.println(\"***** Moins de points *****\");\n System.out.println(\"******** tu auras *********\");\n System.out.println(\"****** Mieux ce sera ******\");\n System.out.println(\"***************************\");\n System.out.println(\"***************************\");\n\n //init tableau de mots\n String[] listeDeMots = { \"css\", \"html\", \"diagramme\", \"linux\", \"windows\" };\n\n boolean victory = false;\n int nbErreur = 0;\n //choix random dans la liste de mots\n String motCache = listeDeMots[(int) (Math.random() * listeDeMots.length)];\n\n //transformation des caractères du mot en underscore\n char[] tabMotCache = new char[motCache.length()];\n for (int i = 0; i < motCache.length(); i++) {\n tabMotCache[i] = '_';\n }\n System.out.println(\n \"Le mot caché contient \" + motCache.length() + \" lettres.\"\n );\n System.out.println(tabMotCache);\n\n Scanner lettre = new Scanner(System.in);\n while ((victory == false) || (nbErreur <= 7)) {\n String lettreChoisie = lettre.next();\n\n System.out.println(\"Veuillez saisir une lettre !\");\n // prend la première lettre saisi par l'user\n if (lettreChoisie.length() > 1) {\n lettreChoisie = lettreChoisie.substring(0, 1);\n }\n // si la lettre tapée est dans le mot remplace l'underscore par la lettre\n // et répète l'occurence pour plusieurs fois la même lettre dans le mot\n if (motCache.contains(lettreChoisie)) {\n int index = motCache.indexOf(lettreChoisie);\n\n while (index >= 0) {\n tabMotCache[index] = lettreChoisie.charAt(0);\n index = motCache.indexOf(lettreChoisie, index + 1);\n System.out.println(tabMotCache);\n }\n } else {\n nbErreur++;\n System.out.println(\"Tu as commis \" + nbErreur + \" erreurs..\");\n System.out.println(\"Il te reste \" + (7 - nbErreur) + \" essais !\");\n System.out.println(tabMotCache);\n }\n\n // on récupère le tableau de caractère en string pour vérifier l'égalité\n // avec le mot caché et déclarer la victoire\n String motDeviner = new String(tabMotCache);\n if (motDeviner.equals(motCache)) {\n victory = true;\n System.out.println(\"You win !\");\n System.out.println(\"Tu as commis \" + nbErreur + \" erreur !\");\n System.out.println(\"Tu as obtenu \" + (nbErreur * 5) + \" points !\");\n break;\n }\n if (nbErreur == 7) {\n System.out.println(\n \"You looose ! Le mot à deviner était : \" + motCache + \" !\"\n );\n System.out.println(\"Tu as obtenu \" + (nbErreur * 5) + \" points !\");\n break;\n }\n }\n lettre.close();\n }", "public static void main(String[] args) {\n String frase;\n String frase2 = \"\";//debe ser inicializada\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Ingrese una frase\");\n frase = sc.nextLine();\n\n int i = 0;\n\n while (i < frase.length()) {//ou con for et if y else, los i++ estarian solo en el for\n if (frase.charAt(i) != ' ') {\n frase2 = frase2.concat(frase.substring(i, i + 1));\n } else {//el else solo pedia tranformar los espacios en alterisco que se hace solo con\n frase2 = frase2.concat(\"*\");//esto//y esto\n while (frase.charAt(i) == ' ') {\n i++;\n }\n frase2 = frase2.concat(frase.substring(i, i + 1));\n }\n i++;\n }//faltaria una primera condicion como en los 2 ejercicios precedentes pa que no imprima asteriscos antes de la 1era letra\n System.out.println(frase2);\n }", "public static void letra(){\n\t\tScanner sc=new Scanner(System.in);\n\t\tchar letra;\n\t\tSystem.out.println(\"Introduzca una letra: \");\n\t\tletra=sc.next().charAt(0);\n\t\t\n\t\tswitch(letra){\n\t\t\tcase 'a': case 'A':\n\t\t\tcase 'e':case 'E':\n\t\t\tcase 'i':case'I':\n\t\t\tcase 'o': case'O':\n\t\t\tcase'u': case 'U':\n\t\t\t\tSystem.out.println(\"Es una vocal\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Es una consonante.\");\n\t\t}\n\t\t\n\t\t\n\t}", "public void ComenzarJuego() {\n Random R = new Random();\n int i = -1; // declaro una variable i(intentos como deducion) para realizar la la busqueda de dicha palabra\n do{ //inicio un ciclo tipo (do) para que intentos sea igual a R.nextInt(palabras) en teoria el bucle\n //se ejecuta obligatoriamente\n i = R.nextInt(PalabrasAdivinar.length);\n \n }while (posicion == i); //si la condicion posicion se cumple, posicion va ser igual a i(intentos)\n posicion = i;\n palabras = PalabrasAdivinar[posicion];\n \n // y palbras va ser igual a PalabrasAdivinadar\n for (i = 0; i < palabras.length(); i++);{ \n //el ciclo for que es i(intentos) va ser igual a cero, donde inicia posicion, la condicion i va ser menor a palabras (relaciona),{ // y la ultima va manipular los valores que mencionamos\n if(palabras.charAt(i)!) // si se cumple palabras va ser igual a '' y solucion = caract sino = espacio para generar las palabras\n Solucion += (\"_\"); // debemos pensar que es muy necesario por el hecho de los espacios si por ejemplo gears of war \n else \n Solucion += (\" \");\n \n }\n \n Dibujar();\n \n }", "private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }", "public static void main(String[] args) {\n \n String palabaras[], palabraSelected=\"\";\n char juego[];\n char letra; \n char seguir; \n \n \n //puede volver a jugar.\n //con las palabras que no ha salido. Gastando palabras\n //en caso de no existir palabra terminar el juego e indicar el mensaje respectivo.\n\n\n do {\n aciertos=0; errores=0;\n bandera=false;\n\n palabaras= leerArchivo();\n \n if(palabaras.length==0){\n System.out.println(\"No se puede jugar porque no hay palabras\");\n break; \n }\n\n \n \n String nombre= palabaras[0].substring(0,18).trim().toUpperCase();\n\n String pa= String.format(\"%1$-20s\", \"walter\");\n System.out.println(pa.length());\n\n // escribirLineaArchivo(palabaras);\n \n //obtenerPalabra\n //random para obtener la palabara\n \n palabraSelected= obtenerPalabra(palabaras);\n //palabraSelected= palabraSelected.toUpperCase();\n \n //obtnerVectorJuego\n //instacia del venctor juego con el tamaño de la palabra seleccionada\n juego= obtenerVectorJuego(palabraSelected);\n \n /*//1 manera apata de llenar el vector juego con la palabra seleccinada\n for(int i=0; i<palabraSelected.length(); i++){\n \n juego[i]=palabraSelected.charAt(i);\n \n }\n */\n \n //segunda manera\n\n /* if(!palabraSelected.equals(\"fdd\")){\n\n\n }*/\n \n System.out.println(\"BIENVENIDO AL JUEGO DEL AHORCADO..\"); \n \n do {\n \n bandera=false;\n //imprimirJuego\n imprimirJuego(palabraSelected, juego);\n \n letra = solicitarLetra();\n \n //validarLetra\n validarLetra(letra, juego);\n \n //imprimirResultado\n imprimirResultado();\n \n \n } while (aciertos!=juego.length && errores!=7);\n \n \n //imprimirResultadoFinal\n imprimirResultadoFinal(juego, palabraSelected);\n\n\n\n System.out.println(\"Desea volver a jugar(S/N)? \"); \n seguir= scan.next().toUpperCase().charAt(0);\n \n eliminarPalabraArchivo(palabraSelected, palabaras);\n \n\n\n\n\n } while (seguir=='S');\n }", "public String traduciraMorse(String texto, Boolean condicion) {\n String cadena = \"\";\n Boolean encontrada;\n\n // TEXTO a MORSE\n if (condicion == false) {\n for (int i = 0; i < texto.length(); i++) {\n String refuerzo = String.valueOf(texto.charAt(i));\n encontrada = false;\n for (Morse aux : AccesoFichero.lMorse) {\n if (aux.getLetra().equalsIgnoreCase(refuerzo)) {\n cadena += aux.getCodigo() + \" \";\n encontrada = true;\n }\n }\n if (encontrada == false) {\n cadena += \" \";\n }\n\n }\n // MORSE a TEXTO\n } else {\n String[] refuerzo = texto.split(\" \");\n for (int i = 0; i < refuerzo.length; i++) {\n\n encontrada = false;\n for (Morse aux : AccesoFichero.lMorse) {\n if (aux.getCodigo().equalsIgnoreCase(refuerzo[i])) {\n cadena += aux.getLetra() + \" \";\n encontrada = true;\n }\n }\n if (encontrada == false) {\n cadena += \" \";\n }\n\n }\n }\n\n return cadena;\n }", "public String ingresarLetra(String letra, String palabra)throws MyException{\n String respuesta=\"\";\n if(Integer.toString(1).equals(letra)||Integer.toString(2).equals(letra)||Integer.toString(3).equals(letra)||Integer.toString(4).equals(letra)||Integer.toString(5).equals(letra)||Integer.toString(6).equals(letra)||Integer.toString(7).equals(letra)||Integer.toString(8).equals(letra)||Integer.toString(9).equals(letra)||Integer.toString(0).equals(letra)||letra.equals(letra.toUpperCase())){\n throw new MyException(\"Debe ingresar una letra en minúsculas(a-z)\");\n }else{\n if(palabra.contains(letra)){\n if(this.palabra.contains(\"-\")){\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n }else{\n for(int i=0;i<this.palabra.length();i++){\n if((letra.toLowerCase().equals(palabra.toLowerCase().substring(i,i+1)))){\n respuesta+=palabra.subSequence(i, i+1);\n }else{\n respuesta+=\"-\";\n }\n }\n this.palabra=respuesta;\n }\n }else{\n respuesta=this.ocultarPalabra(this.palabra);\n this.oportunidades-=1;\n try{\n this.cambiarEstadoImagen();\n }\n catch(NullPointerException ex){\n JOptionPane.showMessageDialog(null, \"No se pudo actualizar la imagen del ahorcado :(\\n\\n Imagen no encontrada\");\n }\n }\n return respuesta;\n }\n }", "public static void main(String[] args) throws IOException {\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\r\n System.out.println(\" Escribe : \");\r\n String texto=br.readLine().toUpperCase();\r\n String alfabeto = \"ABCDEFGHIJKLMNÑOPQRSTUVWXYZ\";\r\n\r\n int[] recuento=new int[alfabeto.length()];\r\n contarLetra(texto,alfabeto,recuento);\r\n visualizarRecuento(alfabeto,recuento);\r\n\r\n }", "public static char[] pedirPalabraSecreta() {\r\n // PedirPalabra\r\n Scanner leer = new Scanner(System.in);\r\n System.out.println(\"Introduce la palabra secreta\");\r\n String palabraSecreta = leer.nextLine();\r\n char[] cadena= palabraSecreta.toCharArray();\r\n for (int i = 0; i < cadena.length; i++) {\r\n cadena[i]=Character.toUpperCase(cadena[i]);\r\n }\r\n return cadena;\r\n }", "public String IndicadorCaracteres(String palabra){\n\t\tint aux=-1;\n\t\t\t//Analiza los 17 primeros símbolos de la matriz \"simbolos\" que son los caracteres\n\t\t\t//tentativos que la palabra podría tener\n\t\t\tfor(int i=0; i<17; i++) {\n\t\t\t\t//Se verifica si la palabra contiene algún de los símbolos\n\t\t\t\tif(palabra.contains(simbolos[0][i])) {\n\t\t\t\t\t//Variable auxiliar para conocer el caracter \n\t\t\t\t\taux=i;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn (aux!=-1)? simbolos[0][aux]:\"\";\n\t}", "public static void main(String[] args) {\n int[] notas = new int[4];\n //FORMA 1 DE LLENAR EL ARREGLO\n notas[0] = 61;\n notas[1] = 84;\n notas[2] = 60;\n notas[3] = 95;\n // OTRA FORMA DE RELLENAR EL ARREGLO -- NO RECOMENDABLE --\n int[] n = {1, 8, 2, 3, 6, 4, 9, 7, 8, 5, 1, 2, 30};\n //Como acceder a los datos uno por uno\n System.out.println(\"Recorrido uno por uno: \");\n System.out.print(\"Recorrido notas: \");\n System.out.println(notas[2]);\n System.out.print(\"Recorrido de n: \");\n System.out.println(n[11]);\n //TODO JUNTO\n System.out.println(\"Recorrido de notas:\");\n for(int i = 0; i < 4; i++){\n System.out.print(notas[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\"Recorrido de n:\");\n for(int i = 0; i < 13; i++){\n System.out.print(n[i] + \" \");\n }\n //---------- CON CHAR ----------\n char[] secciones = new char[3];\n \n secciones[0] = 'A';\n secciones[1] = 'B';\n secciones[2] = 'C';\n char[] s = {'D', 'E', 'F', 'G'};\n \n System.out.println(\"Recorrido uno por uno: \");\n System.out.print(\"Recorrido de secciones: \");\n System.out.println(secciones[1]);\n System.out.print(\"Recorrido de s: \");\n System.out.println(s[2]);\n System.out.println(\"Recorrido de todos\");\n }", "public void Caracteristicas(){\n System.out.println(\"La resbaladilla tiene las siguientes caracteristicas: \");\r\n if (escaleras==true) {\r\n System.out.println(\"Tiene escaleras\");\r\n }else System.out.println(\"No tiene escaleras\");\r\n System.out.println(\"Esta hecho de \"+material);\r\n System.out.println(\"Tiene una altura de \"+altura);\r\n }", "public static char leerCaracter() { \n\t\tchar letra = sc.nextLine().charAt(0); // Lee una cadena y obtiene el primer caracter\n\t\treturn letra;\n\t}", "private static void ecrire (char car)\r\n\t{\n\t\tif (car >= ' ')\r\n\t\t{\r\n\t\t\tSystem.out.println (\"Caractere : \" + car );\r\n\t\t}\r\n\t\t// Sinon si c'est un caractere de controle, on affiche son code ascci\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println (\"Controle : code \" + (int) car);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n String word = \"Tenet\";\n String word3 = \"tenet\";\n System.out.println(\"word \" + word);\n word.toLowerCase(); //porównanie bez wielkosci znakow\n //charAt(0) - zero,\n String[] Tablica = new String[word.length()];\n for (int i = 0; i < word.length(); i++) {\n Tablica[i] = String.valueOf(word.charAt(i));\n }\n String word2 = \"\";\n\n for (int i = (word.length() - 1); i >= 0; i--) {\n //System.out.print(Tablica[i]);\n word2 = word2 + Tablica[i];\n }\n //System.out.println();\n System.out.println(\"word 2 \" + word2);\n System.out.println(\"word 3 \" + word3);\n\n System.out.print(\"word 3 i word 2 \");\n if (word3.toLowerCase().equals(word2.toLowerCase())) {\n System.out.println(\"jest palidronem\");\n } else {\n System.out.println(\"nie jest palidronem\");\n }\n\n//koniec\n\n }", "private String limpiar_texto(String texto){\n \n texto = texto.replaceAll(\"\\n\",\"\");\n texto=texto.toUpperCase();\n for(int i=0;i<texto.length();i++){\n //Se crea un for que llenara el nuevo char\n int posicion = tabla.indexOf(texto.charAt(i)); //charat regresa el valor del arreglo\n if(posicion == -1){ \n texto=texto.replace(texto.charAt(i),' ');\n //En caso que no aparezca en la tabla de caracteres\n //Tiene que ser eliminado\n }\n }\n return texto;\n }", "public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}", "public static void main(String[] args) throws Exception {\n String patronA = \"[0-5]\";\n\n // conjunto de letras de \"a\" a \"c\"\n String patronB = \"[a-c]\";\n\n // conjunto de todas las letras minusculas\n String patronC = \"[a-z]\";\n\n // conjunto de numeros\n String patronD = \"[0-9]\";\n\n // ejemplo con tipo de dato string\n String textoAlfanumerico = \"0123aaaa\";\n System.out.println(\"Texto alfanumerico:\" + textoAlfanumerico);\n\n String replace1 = textoAlfanumerico.replaceAll(patronA, \"X\");\n System.out.println(\"Reemplazo de numeros con X: \" + replace1);\n\n String replace2 = textoAlfanumerico.replaceAll(patronB, \"X\");\n System.out.println(\"Reemplazo de letras con X: \" + replace2);\n\n\n //[0-5][a-c];\n //String patronComplejo = patronA + patronB;\n\n //[a-c]*[0-5]*\n //String patronComplejo = patronA + \"*\" + patronB + \"*\";\n\n //\"[a-z]+\"\n\n // + = una coincidencia\n // * = ninguna o muchas\n\n //String patronComplejo = \"(\" + patronA + patronC + \")+\";\n String patronComplejo = \"(\" + patronC + \")+\";\n\n String texto = \"hola, aacc este bbcc es mi 55222aaa texto 2663aaaa blah blah\";\n System.out.println(\"patron complejo:\" + patronComplejo);\n System.out.println(texto);\n\n Pattern pattern = Pattern.compile(patronComplejo);\n Matcher matcher = pattern.matcher(texto);\n\n // buscar ocurrencias\n while (matcher.find()) {\n System.out.println(\"Encontrado:\" + matcher.group());\n }\n\n\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public static void main(String[] args) {\n char [] letra = new char [27];\n letra [0] = 'A';\n letra [1] = 'B';\n letra [2] = 'C';\n letra [3] = 'D';\n letra [4] = 'E';\n letra [5] = 'F';\n letra [6] = 'G';\n letra [7] = 'H';\n letra [8] = 'I';\n letra [9] = 'J';\n letra [10] = 'K';\n letra [11] = 'L';\n letra [12] = 'M';\n letra [13] = 'N';\n letra [14] = 'Ñ';\n letra [15] = 'O';\n letra [16] = 'P';\n letra [17] = 'Q';\n letra [18] = 'R';\n letra [19] = 'S';\n letra [20] = 'T';\n letra [21] = 'U';\n letra [22] = 'V';\n letra [23] = 'W';\n letra [24] = 'X';\n letra [25] = 'Y';\n letra [26] = 'Z';\n int [] contadores = new int [27];\n pedirCadena();\n comprobarvocales(letra,contadores);\n }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "public static void batalla(){\n\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int turno; //declaracion de variables locales a utilizar\n int numeroAleatorio;\n int numeroAleatorio2;\n int ataqueEnemigo;\n int experienciaGanada;\n int oroGanado;\n String enemigo;\n Random aleatorio = new Random();//declarando variables tipo random para aleatoriedad\n Random aleatorio2 = new Random();\n Random aleatorio3 = new Random();\n //Inicializando la batalla\n System.out.println(\"...Bienvenido a la batalla...\");\n System.out.println(\"El turno de atacar es aleatorio.\");\n //eligiendo al oponente en battalla mediante el llamado de la funcion enemigos\n enemigo = enemigos();\n System.out.printf(\"\\nTu oponente es: \"+enemigo);\n //eligiendo turno aleatorio si es 1 inicia enemigo, si es 2 inicia jugador\n turno = (aleatorio.nextInt(2)+1);\n do{//condicion si primer turno es del jugador\n if(turno%2==0){\n turnoJugador();//llamando a funcion turnoJugador \n\t\t\t\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n \t\tSystem.out.flush(); \n }\n else{\n System.out.println(\"\\nturno de:\"+enemigo);\n ataqueEnemigo= turnoEnemigo(enemigo);//enviando parametro enemigo\n puntosDeVida= puntosDeVida-ataqueEnemigo;//descontando vida a jugador \n } \n turno=turno+1;//contador para los turnos correspondientes\n //validando la continuidad del juego mediante los puntos de vida.\n }while(puntosDeVida>0 && puntosDeVidaEnemigo>0&&opcionMiedo!=1);\n\n if(opcionMiedo!=1){//condicion de huida del jugador \n \t//condicion si el ganador de la battala es el Jugador\n \tif(puntosDeVida>puntosDeVidaEnemigo){\n \t\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n \t\tSystem.out.flush();\n \t\tSystem.out.println(\"Ganador de la batalla: \"+nombrePersonaje);\n \t//sumando los atributos ganados en battala\n \t\tnumeroAleatorio = (aleatorio2.nextInt(30-20+1)+20);\n \t\texperienciaGanada= ((nivel+1)*10)+numeroAleatorio;\n \t\texperiencia=experiencia+experienciaGanada;\n \n \t\tnumeroAleatorio2 = (aleatorio3.nextInt(45-15+1)+15);\n \t\toroGanado= ((nivel+1)*10)+numeroAleatorio2;\n \t\toro=oro+oroGanado;\n \t//imprimiendo los atributos ganados en batalla\n \t\tSystem.out.println(\"Oro Ganado: \"+oroGanado);\n \t\tSystem.out.println(\"experiencia Ganada: \"+experienciaGanada);\n \t//reiniciando la vida a los enemigos\n \t\tpuntosDeVidaEnemigo=0;\n \t//contador de derrotas para los enemigos disponibles\n\t\t\tswitch(enemigo){\n\t\t\t\tcase \"Dark_Wolf\":{\n \t\tenemigoVencido1=enemigoVencido1+1;\n \tbreak;\n \t\t}\n \tcase \"Dragon\":{\n \t\tenemigoVencido2=enemigoVencido2+1;\n \tbreak;\n \t\t}\n \tdefault:{\n enemigoVencido3=enemigoVencido3+1;\n break;\n }\n }\n }\n \telse{//mostrando al enemigo ganador en pantalla\n \t\tSystem.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n \t\tSystem.out.flush();\n \t\tSystem.out.println(\"Ganador de la batalla: \"+enemigo);\n \t\t//reiniciando las caracteristicas principales al jugador\n \t\tpuntosDeVida=150;\n \t\tpuntosDeMana=10;\n \t\tnivel=0;\n \t\texperiencia=0;\n \t\toro=0;\n \t\tarticulo1=0;\n \t\tarticulo2=0;\n \t\tarticulo3=0;\n \t\tenemigoVencido1=0;\n \t\tenemigoVencido2=0;\n \t\tenemigoVencido3=0;\n }\n }else{\n\t\t\tSystem.out.println(\"Huiste de la batalla!!!\");\n\t\t\tSystem.out.println(\"oro perdido:\"+oroPerdido);\n\t\t\tpuntosDeVidaEnemigo=0;}//reiniciando solo la vida del enemigo despues de la huida del jugador\n }", "public char controlloOrizzontale(char[][] scacchiera)\n {\n for (int h=0;h<3;h++)\n {\n if (scacchiera[h][0]==scacchiera[h][1]&&scacchiera[h][1]==scacchiera[h][2]) return scacchiera[h][0];\n }\n return ' ';\n }", "public String corrector () {\n String aux = tabla_lexica.peek();\n \n if (aux.equals(\"$\") || aux.equals(\".\") || aux.equals(\"(\") || aux.equals(\")\") || aux.equals(\",\") || aux.equals(\"'\") || aux.equals(\"+\") || aux.equals(\"-\") || aux.equals(\"*\") || aux.equals(\"/\") || aux.equals(\"r\") || aux.equals(\"i\") || aux.equals(\"d\") || aux.equals(\"a\")) {\n return aux;\n } \n \n Pattern p1 = Pattern.compile(\"(([>\\\\<])+([=])|[(\\\\)\\\\;\\\\+\\\\-\\\\–\\\\*\\\\/\\\\'\\\\’\\\\‘\\\\,\\\\.\\\\>\\\\<\\\\=]|([@0-9A-Za-z]*)+([#\\\\.\\\\%\\\\_\\\\-]*)?[0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)\"\n + \"|([@A-Za-z]*)+([#\\\\%\\\\_\\\\-]*)?[A-Za-z0-9]+([#\\\\%\\\\_\\\\-\\\\[0-9A-Za-z]*)?([#\\\\%\\\\-\\\\_\\\\[0-9A-Za-z]*)|[!\\\\$\\\\%\\\\&\\\\?\\\\¿\\\\¡\\\\_]|[a-zA-Z])\");\n \n Matcher m2 = p1.matcher(aux);\n while (m2.find()) {\n if(m2.group().matches(\"SELECT|FROM|WHERE|IN|AND|OR|CREATE|TABLE|CHAR|NUMERIC|NOT|NULL|CONSTARINT|KEY|PRIMARY|FOREIGN|REFERENCES|INSERT|INTO|VALUES|GO|CREATE|PROCEDURE|VARCHAR\"\n + \"|AS|IF|EXISTS|BEGIN|PRINT|END|ELSE\")) //Palabras reservadas\n {\n String pal = m2.group();\n switch (pal) {\n case \"SELECT\": aux = \"s\";\n auxLinea = m2.group();\n break;\n case \"FROM\": aux = \"f\";\n auxLinea = m2.group();\n break;\n case \"WHERE\": aux = \"w\";\n auxLinea = m2.group();\n break;\n case \"IN\": aux = \"n\";\n auxLinea = m2.group();\n break;\n case \"AND\": aux = \"y\";\n auxLinea = m2.group();\n break;\n case \"OR\": aux = \"o\";\n auxLinea = m2.group();\n break;\n case \"CREATE\": aux = \"c\";\n auxLinea = m2.group();\n break;\n case \"TABLE\": aux = \"t\";\n auxLinea = m2.group();\n break;\n case \"CHAR\": aux = \"h\";\n auxLinea = m2.group();\n break;\n case \"NUMERIC\": aux = \"u\";\n auxLinea = m2.group();\n break;\n case \"NOT\": aux = \"e\";\n auxLinea = m2.group();\n break;\n case \"NULL\": aux = \"g\";\n auxLinea = m2.group();\n break;\n case \"CONSTRAINT\": aux = \"b\";\n auxLinea = m2.group();\n break;\n case \"KEY\": aux = \"k\";\n auxLinea = m2.group();\n break;\n case \"PRIMARY\": aux = \"p\";\n auxLinea = m2.group();\n break;\n case \"FOREIGN\": aux = \"j\";\n auxLinea = m2.group();\n break;\n case \"REFERENCES\": aux = \"l\";\n auxLinea = m2.group();\n break;\n case \"INSERT\": aux = \"m\";\n auxLinea = m2.group();\n break;\n case \"INTO\": aux = \"q\";\n auxLinea = m2.group();\n break;\n case \"VALUES\": aux = \"v\";\n auxLinea = m2.group();\n break;\n }\n } else {\n \n }\n }\n return aux;\n }", "public static void main(String[] args) {\n\t\tScanner teclado= new Scanner(System.in);\r\n\t\tchar letra\r\n\t\tSystem.out.printf(\"Introduzca un caracter\");\r\n\t\tletra=teclado.next().charAt(0);\r\n\t\twhile(letra!='*') {\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n\tprotected char scegliMossaDaFare(int iAvversario, int jAvversario, char[][] scacchiera) {\n\t\t\n\t\tif(this.storicoMosseAvversario.isEmpty()) {\n\t\t\tswitch(new Random(2).nextInt()) {\n\t\t\t\tcase 0: return 'U';\n\t\t\t\tcase 1: return 'D';\n\t\t\t\tcase 2: if(this.posX == 4 && this.posY == DIM - 1)\n\t\t\t\t\t\t\treturn 'R';\n\t\t\t\t\t\treturn 'L';\n\t\t\t}\n\t\t}\n\n\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'U' && rimaneNellaScacchiera(this.posY + 1))\n\t\t\t//if(casellaLibera)\n\t\t\treturn 'D';\n\t\telse\n\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'D' && rimaneNellaScacchiera(this.posY - 1))\n\t\t\t\treturn 'U';\n\t\t\telse \n\t\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'L' && rimaneNellaScacchiera(this.posX + 1))\n\t\t\t\t\treturn 'R';\n\t\t\t\telse\n\t\t\t\t\treturn 'L';\n\t}", "private String[] Transposicion(String texto) {\n String retorno[] = new String[2];\n retorno[0] = \"1\";\n retorno[1] = \"\";\n texto = texto.toLowerCase();\n try {//evalua si hay transposicion en el while\n if (texto.contains(\"w\") && texto.contains(\"h\") && texto.contains(\"i\") && texto.contains(\"l\") && texto.contains(\"e\")) {\n if (!texto.equals(\"while\") && texto.length() == 5) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia while.\";\n }\n } else {//evalua si hay transposicion en el if\n if (texto.contains(\"i\") && texto.contains(\"f\")) {\n if (!texto.equals(\"if\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia if.\";\n }\n } else {//evalua si hay transposicion en el int\n if (texto.contains(\"i\") && texto.contains(\"n\") && texto.contains(\"t\")) {\n if (!texto.equals(\"int\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia int.\";\n }\n } else {//evalua si hay transposicion en el for\n if (texto.contains(\"f\") && texto.contains(\"o\") && texto.contains(\"r\")) {\n if (!texto.equals(\"for\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia for.\";\n }\n } else {//evalua si hay transposicion en el do while\n if (texto.contains(\"d\") && texto.contains(\"o\")) {\n if (!texto.equals(\"do\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia do.\";\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en metodo de Transposicion\");\n } finally {\n return retorno;\n }\n }", "public void letras() {\n caracteres = 32 - txtMensaje.getText().length(); //Indica la catidad de carcteres\n //disponibles. En el LCD solo se permite imprimir 32 caracteres.\n\n if (caracteres <= 0) { //Si la cantidad de caracteres se ha agotado... \n lbCaracteres.setText(\"Caracteres disponibles: 0\"); //Se imprime que la cantidad de \n //caracteres disponibles es 0\n String cadena = \"\"; //Se declara la variable que guardará el mensaje a enviar\n cadena = txtMensaje.getText(); //Se asigna el texto del TextField a la variable cadena\n cadena = cadena.substring(0, 32); //Se evita que por alguna razón la variable contenga\n //más de 32 caracteres, utilizando el substring que crea un string a partir de uno mayor.\n txtMensaje.setText(cadena); //se regresa la cadena con 32 caracteres al TextField\n } else {\n //Si la cantidad de caracteres disponibles es ayor a 0 solamente se imprimirá la cantidad\n //de caracteres disponibles\n lbCaracteres.setText(\"Caracteres disponibles: \" + (caracteres));\n }\n }", "public char Get_Character() {\n\n\n\n /* Hex equivalent of Morse code is formed by left-shifting */\n /* 1 or 0 into hex_code. The 0x01 initial value marks the */\n /* beginning of the bit field, 1 being a dit and 0 a dash. */\n\n /* Get the level of a fragment from PLL detector. A fragment */\n /* is a small fraction of a morse code element, there are from */\n /* 8 to 30 frags/element depending on Morse speed (30-10 w.p.m) */\n while(true) {\n\t/* Decide on a mark or space fragment */\n\t/* with a hysterisis on the threshold */\n\tGet_Fragment();\n\n\t/* Increment mark or space count */\n\tif( isFlagSet(MARK_TONE) )\n\t mark_cnt++;\n\telse\n\t space_cnt++;\n\n\t/* If a mark element is too long, limit count */\n\tif( mark_cnt > unit_elem * 8 ) mark_cnt = unit_elem * 8;\n\n\t/* If a space element is too long, limit count */\n\tif( space_cnt > unit_elem * 16 ) space_cnt = unit_elem * 16;\n\n\t/* Process mark and space element counts to decode Morse */\n\tswitch( new_context )\n\t{\n\t case MARK_SIGNAL: /* Process mark element */\n\n\t\t/* If fragment is a mark */\n\t\tif( isFlagSet(MARK_TONE) )\n\t\t{\n\t\t /* If mark element is too long */\n\t\t /* reset and wait for a space */\n\t\t if( mark_cnt >= (unit_elem * 8) )\n\t\t {\n\t\t\t/* Clear space counter */\n\t\t\tspace_cnt = 0;\n\n\t\t\t/* Clear hex character code */\n\t\t\thex_code = 0x01;\n\n\t\t\t/* Wait for a space fragment */\n\t\t\tnew_context = WAIT_FOR_SPACE;\n\n\t\t } /* if( mark_cnt >= unit_elem * 8 ) */\n\n\t\t} /* if( isFlagSet(MARK_TONE) ) */\n\t\telse\n\t\t{\n\t\t /* Clear space count to 1 */\n\t\t space_cnt = 1;\n\n\t\t /* Switch to processing inter-element space */\n\t\t new_context = ELEM_SPACE;\n\t\t}\n\n\t\tbreak;\n\n\t case ELEM_SPACE: /* Process inter-element space */\n\n\t\t/* If space reaches 1/2 units its an inter-element space */\n\t\tif( ((space_cnt * 2) >= unit_elem) ||\n\t\t\tisFlagSet(MARK_TONE) )\n\t\t{\n\t\t /* If mark is < 2 units its a dit else a dash */\n\t\t if( (mark_cnt < unit_elem * 2) )\n\t\t {\n\t\t\t/* Insert dit and increment mark frag and elem count */\n\t\t\thex_code = (hex_code << 1) | 0x01;\n\t\t\tmark_frag_cnt += mark_cnt;\n\t\t\tmark_elem_cnt += 1; /* A dit is 1 element long */\n\t\t }\n\t\t else\n\t\t {\n\t\t\t/* Insert dash and increment mark frag and elem count */\n\t\t\thex_code <<= 1;\n\t\t\tmark_frag_cnt += mark_cnt;\n\t\t\tmark_elem_cnt += 3; /* A dash is 3 elements long */\n\t\t } /* if( mark_cnt < unit_elem * 2 ) */\n\n\t\t /* Clear mark count */\n\t\t mark_cnt = 0;\n\n\t\t /* Wait for inter-char space count */\n\t\t if( isFlagClear(MARK_TONE) )\n\t\t\tnew_context = CHAR_SPACE;\n\t\t else\n\t\t {\n\t\t\tspace_cnt = 0;\n\t\t\tnew_context = MARK_SIGNAL;\n\t\t }\n\n\t\t} /* if( (space_cnt * 2) >= unit_elem || ) */\n\n\t\tbreak;\n\n\t case CHAR_SPACE: /* Wait for inter-char space */\n\n\t\t/* If fragment is space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t /* If space reaches 2 units its inter-character */\n\t\t if( space_cnt >= (unit_elem * 2) )\n\t\t {\n\t\t\t/* Switch to waiting for inter-word space */\n\t\t\tnew_context = WAIT_WORD_SPACE;\n\n\t\t\t/* Return decoded Morse char */\n char c = Hex_to_Ascii(hex_code);\n\n /* Clear hex character code */\n\t\t\thex_code = 0x01;\n\n return c;\n\t\t }\n\n\t\t} /* if( isFlagClear(MARK_TONE) ) */\n\t\telse /* Its the end of inter-element space */\n\t\t{\n\t\t /* Count up space frags and elements */\n\t\t space_frag_cnt += space_cnt;\n\t\t space_elem_cnt++; /* Inter-element space */\n\n\t\t /* Clear space cnt and process marks */\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t}\n\n\t\tbreak;\n\n\t case WAIT_WORD_SPACE: /* Wait for an inter-word space */\n\n\t\t/* If fragment is space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t /* If space count reaches 5, its word space */\n\t\t if( space_cnt >= (unit_elem * 5) )\n\t\t\tnew_context = WORD_SPACE;\n\n\t\t} /* if( isFlagClear(MARK_TONE) ) */\n\t\telse /* Its the end of inter-character space */\n\t\t{\n\t\t /* Adapt to incoming signal */\n\t\t Adapt_Decoder();\n\n\t\t /* Switch to processing mark signal */\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t}\n\n\t\tbreak;\n\n\t case WORD_SPACE: /* Process Inter-word space */\n\n\t\t/* If fragment is space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t if( space_cnt >= (unit_elem * 7) )\n\t\t {\n\t\t\tnew_context = WAIT_FOR_MARK;\n\t\t\treturn( ' ' );\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t /* Adapt to incoming signal */\n\t\t Adapt_Decoder();\n\n\t\t /* Switch to processing mark signal */\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t return( ' ' );\n\t\t}\n\n\t case WAIT_FOR_MARK: /* Process no-signal space */\n\n\t\t/* If fragment is mark switch to processing marks */\n\t\tif( isFlagSet(MARK_TONE) )\n\t\t{\n\t\t space_cnt = 0;\n\t\t new_context = MARK_SIGNAL;\n\t\t}\n\n\t\tbreak;\n\n\t case WAIT_FOR_SPACE: /* Wait for space after long dash */\n\n\t\t/* If fragment is space, switch to counting space */\n\t\tif( isFlagClear(MARK_TONE) )\n\t\t{\n\t\t space_cnt = 1;\n\t\t mark_cnt = 0;\n\t\t new_context = WAIT_FOR_MARK;\n\t\t}\n\n\t\tbreak;\n\n\t default: /* Set context if none */\n\t\tif( isFlagSet(MARK_TONE) )\n\t\t new_context = MARK_SIGNAL;\n\t\telse\n\t\t new_context = WAIT_FOR_MARK;\n\n\t} /* End of switch( new_context ) */\n\n } /* while(1) */\n\n\n }", "@Test\r\n public void testDescifrar() {\r\n System.out.println(\"descifrar\");\r\n String frase = \"KRÑD\";\r\n int base = 3;\r\n char[] expResult = {'H','O','L','A'};\r\n char[] result = Cifrado.descifrar(frase, base);\r\n assertArrayEquals(expResult, result);\r\n \r\n }", "@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }", "public static void main(String[] args) {\n char[] cadeiaCaracter = {'B','E','N','G','I','L'};\n String cadeiaChar = new String(cadeiaCaracter);\n System.out.println(cadeiaChar);\n //Criar string a partir de intervalo de cadeias de caractere\n char[] abcdef = {'A','B','C','D','E','F'};\n String abc = new String(abcdef, 0,3);\n System.out.println(abc);\n //Array de byte, cada byte representa um caractere da tabela ascii\n byte[] ascii = {65,66,67,68,69};\n String abcde = new String(ascii);\n System.out.println(abcde);\n String cde = new String(ascii,1,3);\n System.out.println(cde);\n //Atribuição sem o new\n String let = \"Letícia\";\n String lettis = \"Letícia\";\n System.out.println(let);\n }", "public static void main (String[] args){\n int y = 1;\n for (y = 1; y <= 4; y++){\n // He usat bucles per no duplicar codi i per optimització.\n int x =1;\n // Bucle\n for (x = 1; x <= 4; x++){\n String abc = \"AAAAABCÇDEEEEEFGHIIIIIJKLMNOOOOOPQRSTUUUUUVWXYZ\"; //47\n int lletra = (int) (abc.length() * Math.random());\n char a = abc.charAt(lletra);\n System.out.print(\"\\u001B[36m\"+a); \n } \n System.out.println(\"\");\n }\n }", "@Override\n\tpublic void llenarArreglo(){\n\n\t\tString[] textoSeparado = texto.toLowerCase().split(\"\\\\W+\"); //pasa todo a minusculas y despues busca todas las no palabras con W y con + junta los que estan seguidos para separador, ver http://regexr.com/3dcpk\n\n\t\tif (palabras==null) {\n\t\t\t//agregar el primer elemento manualmente\n\t\t\tLabel etiqueta = new Label(textoSeparado[0]);\n\t\t\tpalabras = new Palabra[1];\n\t\t\tpalabras[0] = new Palabra(textoSeparado[0], etiqueta);\n\t\t}\n\n\t\t\tfor (int i=1; i<textoSeparado.length; i++) { //importante el uno para no contar la primera palabra dos veces\n\t\t\t\tString buscar= textoSeparado[i];\n\t\t\t\tif (!checarListaNegra(buscar)) { //solo se hace la operacion por cada palabra si no esta en la lista negra\n\t\t\t\t\tboolean yaExiste = false;\n\t\t\t\t\tfor (Palabra palabraActual : palabras) {\n\t\t\t\t\t\tif (palabraActual.getContenido().equals(buscar)) {\n\t\t\t\t\t\t\tyaExiste = true;\n\t\t\t\t\t\t\tpalabraActual.actualizarFrecuencia();\n\t\t\t\t\t\t//\tSystem.out.println(\"se actualizo\"+ palabraActual.getContenido());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!yaExiste) {\n\t\t\t\t\t\t//no se encontro la palabra (String buscar) en el gran arreglo de palabras entonces hay que crearla\n\t\t\t\t\t\tagregarPalabra(buscar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint count = 0;\n\t\tSystem.out.println(\"Veillez saisir une phrase :\");\n\t\tString phrase = sc.nextLine();\n\t\tSystem.out.println(phrase);\n\t\tSystem.out.println(\"M : \" + phrase.toUpperCase());\n\t\tfor(int i = 0; i < phrase.length(); i++)\n\t\t{\n\t\t\tif(phrase.charAt(i) == 'e')\n\t\t\t\tcount++;\n\t\t}\n\t\tSystem.out.println(\"C : \" + phrase.length());\n\t\tSystem.out.println(\"Le nombre de 'e' dans la phrase : \" + count);\n\t\tif(count > 0)\n\t\t\tSystem.out.println(\"R : \" + phrase.replace('e', '*'));\n\t}", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "public static void main(String[] args) {\n //variable tipo local que recibe la opcion de nombre para el jugador\n int numeroDeOpcion;\n //acreditacion de los puntos iniciales\n puntosDeVida= 150*(nivel+1);\n puntosDeMana= 10*(nivel+1);\n //inicializacion del juego y preguntando si desea un nombre para el personaje\n \tSystem.out.println(\" ---->BIENVENIDO AL JUEGO<----\");\n \tSystem.out.println(\"\\nDesea ingresar un nombre a su personaje [S]si, [N]no\");\n \tScanner caracterNombre=new Scanner(System.in);\n \tString opcionTemp = caracterNombre.nextLine();\n \topcion = opcionTemp.charAt(0); //leyendo opcion\n \t//Ingresando un nombre por el jugador\n \tif(opcion=='s'||opcion=='S'){\n \t\tSystem.out.println(\"Ingrese el nombre:\");\n \t\tScanner cadenaNombre=new Scanner(System.in);\n \t\tnombrePersonaje=cadenaNombre.nextLine();\n \t}\n //Estableciendo nombre predeterminado por el juego\n else{\n \tnombrePersonaje=\"Jugador1\";\n \tSystem.out.printf(\"\\nSe le a asignado el personaje:\\t\"+nombrePersonaje); \n \t}\n do{\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n //Menu de opciones principales para el jugador\n System.out.println(\"\\n..MENU DE OPCIONES..\");\n System.out.println(\"1. A la carga.\"); //Inicia la battalla\n System.out.println(\"2.Tienda.\"); //Permite comprar articulos para la batalla\n System.out.println(\"3.zzZzzZzzZ(Dormir).\");//Permite recuperar al jugador a su estado inicial \n System.out.println(\"4.Status.\"); //Muestra las estadisticas del juego\n System.out.println(\"5.Mas Poder!!!.\"); //Para aumento de nivel del juego \n System.out.println(\"6.Salir.\"); //finaliza las acciones y sale del juego\n do{//validando el numero de opcion\n System.out.println(\"Ingrese el numero de opcion:\");\n numeroDeOpcion= scanner.nextInt();\n }\n while(numeroDeOpcion<1 || numeroDeOpcion>6);\n //comparando la opcion ingresada\n switch(numeroDeOpcion){\n //mostrando los casos existentes por comparar\n case 1:{\n do{\n batalla();//llamando a la funcion batalla\n //Validando la repeticion de la fuencion o su finalizacion\n System.out.println(\"\\nDesea otra Batalla? [S]i, [N]o\");\n Scanner caracterBatalla=new Scanner(System.in);\n String opcionTemp1 = caracterBatalla.nextLine();\n repetirOpcion = opcionTemp1.charAt(0);\n opcionMiedo=0; //reiniciando la opcion miedo\n } \n //condicion del bucle para la funcion batalla \n while(repetirOpcion=='s'||repetirOpcion=='S');\n break;\n }\n case 2:{\n do{\n tienda();//llamando a la funcion tienda\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea realizar otra compra? [S]i, [N]o\");\n Scanner caracterTienda=new Scanner(System.in);\n String opcionTemp2 = caracterTienda.nextLine();\n repetirOpcion2 = opcionTemp2.charAt(0);\n }\n //condicion de bucle para la funcion tienda\n while(repetirOpcion2=='s'||repetirOpcion2=='S');\n break;\n }\n case 3:{\n do{\n dormir();//llamando a la funcion dormir\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea volver a dormir? [S]i, [N]o\");\n Scanner caracterDormir=new Scanner(System.in);\n String opcionTemp3 = caracterDormir.nextLine();\n repetirOpcion3 = opcionTemp3.charAt(0);\n }\n //condicion de bucle para la funcion dormir \n while(repetirOpcion3=='s'||repetirOpcion3=='S');\n break;\n }\n case 4:{\n do{\n status();//llamando a la funcion status\n //validando su repeticion\n System.out.println(\"\\nMostrar nuevamente? [S]i, [N]o\");\n Scanner caracterStatus=new Scanner(System.in);\n String opcionTemp4 = caracterStatus.nextLine();\n repetirOpcion4 = opcionTemp4.charAt(0);\n }\n //condicion de bucle para la funcion status \n while(repetirOpcion4=='s'||repetirOpcion4=='S');\n break;\n }\n case 5:{\n do{\n poder();//llamando a la funcion poder\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea mas poder? [S]i, [N]o\");\n Scanner caracterPoder=new Scanner(System.in);\n String opcionTemp5 = caracterPoder.nextLine();\n repetirOpcion5 = opcionTemp5.charAt(0);\n }\n //condion de bucle para la funcion poder \n while(repetirOpcion5=='s'||repetirOpcion5=='S');\n break;\n }\n \tdefault:{\n System.exit(0);//saliendo del juego\n break;\n }\n }\n //validacion del retorno al menu principal\n System.out.println(\"volver al menu [S]si, [N]no?\");\n Scanner caracterVolver=new Scanner(System.in);\n String opcionTemp6 = caracterVolver.nextLine();\n opcionSalir=opcionTemp6.charAt(0);\n }\n //condicion del bucle para menu principal\n while(opcionSalir=='S'||opcionSalir=='s'); \n }", "private String pedirCasilla(String mensaje) {\n char columna;\n int fila;\n String casilla;\n do {\n casilla = ManejoInfo.getTextoSimple(\"la casilla \" + mensaje);\n columna = casilla.charAt(0);\n fila = Character.getNumericValue(casilla.charAt(1));\n if (!validarColum(columna) && fila >= 9) {\n System.out.println(\"\\nIngrese una casilla valida!\\n\");\n }\n } while (!validarColum(columna) && fila >= 9);\n return casilla;\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public static String enemigos(){\n int numeroEnemigo; //variables locales a utilizar\n String enemigoSeleccionado;\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n \n numeroEnemigo= (numeroAleatorio.nextInt(3)+1);\n //comparando los enemigos disponibles\n switch(numeroEnemigo){\n case 1:{\n enemigoSeleccionado= \"Dark_Wolf\";\n\t\t puntosDeVidaEnemigo=150;\n return enemigoSeleccionado;//retornando a enemigo Dark\n }\n case 2:{\n enemigoSeleccionado= \"Dragon\";\n\t\t puntosDeVidaEnemigo=155;\n return enemigoSeleccionado;//retornando a enemigo Dragon\n }\n default:{\n enemigoSeleccionado= \"Migthy_Golem\";\n\t\t puntosDeVidaEnemigo=160;\n return enemigoSeleccionado;//retornando a enemigo Golem \n }\n } \n }", "public String elegirtipoqueso(){\n //es un metodo void, o string?\n \n Scanner entrada = new Scanner(System.in);\n int queso;\n System.out.println(\"Elije el queso que deseas\");\n System.out.println(\"1.- Parmesano\");\n System.out.println(\"2.- Mozzalera\");\n queso = entrada.nextInt();\n if (queso==1){\n \n Scanner entrada2 = new Scanner(System.in);\n System.out.println(\"¿Cuantas pizzas deses comprar?\");\n int valor2 = entrada2.nextInt();\n int tamano;\n int c1=75*valor2,m1=89*valor2,g1=112*valor2,f1=135*valor2;\n System.out.println(\"Elije el tamaño\");\n System.out.println(\"1.- Chica \"+c1/valor2+\"$\"); \n System.out.println(\"2.-Mediana \"+m1/valor2+\"$\"); \n System.out.println(\"3.-Grande \"+g1/valor2+\"$\");\n System.out.println(\"4.-Familiar \"+f1/valor2+\"$\");\n tamano = entrada2.nextInt();\n String t2 = String.valueOf(tamano);\n if (tamano==1){\n System.out.println(\"La pizza se corta en 4 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+c1+\"$\");\n }\n else if(tamano==2){\n System.out.println(\"La pizza se corta en 8 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+m1+\"$\");\n }\n else if(tamano==3){\n System.out.println(\"La pizza se corta en 12 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+g1+\"$\");\n }\n else if(tamano==4){\n System.out.println(\"La pizza se corta en 16 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+f1+\"$\");\n }\n return t2;\n }\n if (queso==2){\n Scanner entrada3 = new Scanner(System.in);\n int tamano2;\n System.out.println(\"¿Cuantas pizzas desea comprar?\");\n int valor2 = entrada3.nextInt();\n int c2=89*valor2,m2=115*valor2,g2=135*valor2,f2=175*valor2;\n System.out.println(\"Elije el tamaño\");\n System.out.println(\"1.- Chica \"+c2/valor2+\"$\"); \n System.out.println(\"2.-Mediana \"+m2/valor2+\"$\"); \n System.out.println(\"3.-Grande \"+g2/valor2+\"$\");\n System.out.println(\"4.-Familiar \"+f2/valor2+\"$\");\n tamano2 = entrada3.nextInt();\n String t2 = String.valueOf(tamano2);\n if (tamano2==1){\n System.out.println(\"La pizza se corta en 4 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+c2+\"$\");\n }\n else if(tamano2==2){\n System.out.println(\"La pizza se corta en 8 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+m2+\"$\");\n }\n else if(tamano2==3){\n System.out.println(\"La pizza se corta en 12 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+g2+\"$\");\n }\n else if(tamano2==4){\n System.out.println(\"La pizza se corta en 16 partes iguales\");\n System.out.println(\"La cantidad a pagar es de \"+f2+\"$\");\n }\n return t2;\n }\n String q = String.valueOf(queso);\n return q;\n }", "public static int Main()\n\t{\n\t\tString a = new String(new char[101]);\n\t\ta = new Scanner(System.in).nextLine();\n\t\tint la;\n\t\tla = a.length();\n\t\tfor (int i = 0;i < la;i++)\n\t\t{\n\t\t\tif (a.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\tif (a.charAt(i + 1) == ' ')\n\t\t\t\t{\n\t\t\t\t\tfor (int j = i;j < la;j++)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = tangible.StringFunctions.changeCharacter(a, j, a.charAt(j + 1));\n\t\t\t\t\t}\n\t\t\t\t\tla--;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 0;i < la;i++)\n\t\t{\n\t\tSystem.out.print(a.charAt(i));\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\nScanner scn=new Scanner(System.in);\nSystem.out.println(\"你好 請問你是\");\nString a = scn.next();\nSystem.out.println(\"你好\"+a+\"請問你就讀哪所學校\");\nString b=scn.next();\nSystem.out.println(a+\"原來你是\"+b+\"畢業的阿\");\nSystem.out.println(\"請問你就讀甚麼科系\");\nString c=scn.next();\nSystem.out.println(\"挖~~\"+c+\"是很好的科系耶,你實在太厲害了:)\");\nSystem.out.println(\"你畢業後要做甚麼工作啊?\");\nString d=scn.next();\nSystem.out.println(d+\"這個工作不錯啊,真羨慕你!~~\");\n\t}", "public void ReiniciarPalabra() {\n\t\t\n\t\t/*limpiarCasillero();*/\n\t\t\t\t\n\t\tString palabra = palabras[(int)(Math.random()*5)];\n\t\t\n\t\tSystem.out.println(\" \"+palabra+\" \"+palabra.length());\n\t\t\n\t\tMostrarCasillero(palabra);\n\t\t\n\t\t\n\t}", "public static String romaCoding(String s){\n s = s.toLowerCase().replaceAll(\" \", \"\");\n StringBuffer sb = new StringBuffer(s);\n System.out.println(s);\n /**\n * Step1: Reverse the string\n */\n String step1 = sb.reverse().toString();\n System.out.println(step1);\n\n /**\n * Step2: Rail Fence Cipher Coding\n */\n String step2 = RailFenceCipher.railFenceCipherCoding(step1);\n System.out.println(step2);\n\n /**\n * Step3: Computer Key Board Coding\n */\n String step3 = \"\";\n Map<Character, Character> map = KeyBoard.getCodingMap();\n for(int i = 0; i < step2.length(); i++){\n step3 = step3 + map.get(step2.charAt(i));\n }\n System.out.println(step3);\n\n /**\n * Step4: Covert string to numbers with Nokia phone keyboard\n */\n String step4 = \"\";\n Map nokiaMap = KeyBoard.getNokiaCodingMap();\n for(int i = 0; i < step3.length(); i++){\n step4 = step4 + nokiaMap.get(step3.charAt(i)) + \"\";\n }\n System.out.println(step4);\n\n /**\n * Step5: Convert string to morse code\n */\n String step5 = \"\";\n Map morseMap = MorseCode.getMorseMap();\n for(int i = 0; i < step4.length(); i++){\n Character c = step4.charAt(i);\n step5 = step5 + morseMap.get(c) + \"/\";\n }\n System.out.println(step5);\n return step5;\n }", "public void insertar (String p) {\n int x = p.length();\n for (int i = x-1; i >=0; i--) {\n System.out.println(p.charAt(i));\n pila.add(p.charAt(i)+\"\");\n }\n }", "public static void NumeroCapicua(){\n\t\tint numero,resto,falta,invertido;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tfalta=numero;\n\t\tinvertido=0;\n\t\tresto=0;\n\t\twhile(falta!=0){\n\t\t\tresto=(falta%10);\n\t\t\tinvertido=(invertido*10)+resto;\n\t\t\tfalta=(int)(falta/10);\n\t\t}\n\t\tif(invertido==numero){\n\t\t\tSystem.out.println(\"Es Capicua\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No es Capicua\");\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "public static int turnoEnemigo(String enemigoRecibido){\n String enemigo; //variables locales a utilizar\n int ataqueEnemigo;\n Random aleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int inferior;\n int superior;\n \n enemigo=enemigoRecibido;//recibiendo al enemigo elegido por la funcion enemigos\n //comparando con los enemigos disponibles\n switch(enemigo){\n case \"Dark_Wolf\":{\n //ejecutando acciones del enemigo Dark\n inferior=10+nivel;\n superior=10+nivel+10;\n ataqueEnemigo=(aleatorio.nextInt(superior-inferior+1)+inferior);\n return ataqueEnemigo;//retornando el ataque de Dark\n }\n case \"Dragon\":{\n inferior=15+nivel; //ejecutando acciones del enemigo Dragon\n superior=15+nivel+10;\n ataqueEnemigo=(aleatorio.nextInt(superior-inferior+1)+inferior);\n return ataqueEnemigo; //retornando ataque del enemigo Dragon\n }\n default:{\n inferior=25+nivel; //ejecutando acciones del enemigo Golem\n superior=25+nivel+10;\n ataqueEnemigo=(aleatorio.nextInt(superior-inferior+1)+inferior);\n return ataqueEnemigo; //retornando ataque del enemigo Golem\n }\n }\n }", "public static void main(String[] args) {\n String matriz = \"ABCDEFGHIJLMNOPQRSTUVWXYZ\";\n Ejercicio1 c = new Ejercicio1();\n String retorno;\n String mensaje = JOptionPane.showInputDialog(\"Digite el mensaje\");\n// Convierte el mensaje a mayusculas\n mensaje = mensaje.toUpperCase();\n c.llenaMatriz(matriz);\n retorno = c.aTap(mensaje);\n JOptionPane.showMessageDialog(null, retorno);\n\n //Fin de la Primera parte del examen\n /*\n Inicio de la Segunda parte del examen\n */\n /*\n String[] lista = {\" auto \", \" pato \", \" palo \", \" poto \", \" amar \", \" amor \",\n \" loca \", \" loco \", \" polo \", \" poco \", \" poca \", \" rota \", \" roto \"};\n AdminPalabras admin = new AdminPalabras( lista );\n String[] letras = {\" escalopa \", \" automotor\", \" percatado\"};\n for(int i = 0; i < letras . length ; i ++) {\n int cont = admin .ContarPalabrasPosibles(letras [i ]);\n JOptionPane.showMessageDialog(null,letras [i] + \": \" + cont );\n }*/\n //Fin de la Segunda parte del Examen\n }", "public void realizaSimulacion() {\n do {\n \tif (mundo != null) {\n \t\tSystem.out.println(mundo.toString());\n \t}\n \t\n \tSystem.out.println(\"Elija un comando: \"); // solicitud del comando\n System.out.println(\"Comando > \");\n String opcion = in.nextLine();\n opcion = opcion.toUpperCase();\n\n String[] words = opcion.split(\" \");\n \n try {\n \tif((mundo != null) || (mundo == null && !comandosNoPermitidos(opcion))){\n\t \tComando comando = ParserComandos.parseaComandos(words); //busca el comando comparandolo\n\t \t\n\t\t if (comando != null) {\t\n\t\t\t\t\t\tcomando.ejecuta(this); // Si lo encuentra, lo ejecuta\n\t\t }\n\t\t else {\n\t\t \tSystem.out.println(\"Comando incorrecto\");\n\t\t }\n \t}\n \n } catch (IOException | PalabraIncorrecta | ErrorLecturaTipoCelula | FormatoNumericoIncorrecto | IndicesFueraDeRango | InputMismatchException | PosicionVacia | PosicionOcupada | CelulaIncorrecta e) {\n \t\te.printStackTrace();\n \t}\n \n \n GuiaEjecucion.textoAyuda();\t\t//muestra codigos de mensaje que no afecten a evoluciona\n GuiaEjecucion.pasosDados(); //muestra codigos de mensajes que tengan que ver con los movimientos de las celulas\n } while (!this.simulacionTerminada);\t//en casod e que el usuario esciba el comando SALIR, se termina la ejecuci�n\n }", "public static void main (String[] args)\n\t{\n\t\tString bat;\n\t\tString bi;\n\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"\\n Intruoduce el el primer string: \");\n\t\tbat = sc.nextLine();\n\n\t\n\t\tSystem.out.print(\"\\n Introduce el segundo string: \");\n\t\tbi = sc.nextLine();\n\n\n\n\t\t// con el siguiente objeto concatena el string bat con el string 2\n \t\tString concatenado = bat.concat(bi);\n \t\tSystem.out.println(\"\\n El texto concatenado es: \" + concatenado);\n\n\t\t\n\t\t// para imprimir los dos strings ya concatenados\n\t\tSystem.out.println(\"\\n Primer valor de la cadena concatenada: \" + concatenado);\n\t\t\n\n\t\t//para convertir en mayusculas o minusculas los caracteres del string\n\t\tString minus = concatenado.toLowerCase();\n\t\tString mayus = concatenado.toUpperCase();\n\n\t\tSystem.out.print(\"lo concatenado en minuscula: \" + minus);\n\t\tSystem.out.print(\"\\nlo concatenado en mayuscula: \" + mayus);\n\n\n\n\n\n\t\t//para comparar los dos Strings si son iguales da igual mayuscula o minuscula\n\t\tif (bat.equalsIgnoreCase(bi) ) // igual con mayuscula y minusculas bat.equals(bi)\n\t\t\tSystem.out.println(\"\\nLos dos strings son iguales\");\n\t\telse\n\t\t\tSystem.out.println(\"\\nlos dos strings son diferentes\");\n\n\t\t//si el string esta vacio para ello lo escrito por teclado tiene que ser de tipo nextLine\n\t\tif (bat.isEmpty())\n\t\t\tSystem.out.println(\"el string bat esta vacio\");\n\n\t\tif (bi.isEmpty())\n\t\t\tSystem.out.println(\"el string bi esta vacio\");\n\n\t\t//para convertir datos de cualquier tipo a string\n\t\tSystem.out.print(\"\\n Intruoduce un numero para convertirlo a string \");\n\t\tint zenbaki = sc.nextInt();\n\n\t\tString berria = String.valueOf(zenbaki);\n\t\tSystem.out.print(zenbaki);\n\t\t\n\n\t\t\n\t\t\t\n\t}", "public static String asignarNombres() {\n Scanner escaner = new Scanner(System.in);\n String nombrePrevioArreglo;\n int contador;\n boolean nombreEncontrado = true;\n\n System.out.println(\"Bienvenido Jugador\");\n System.out.println(\"Escribe tu nombre: \\n\");\n nombrePrevioArreglo = escaner.nextLine();\n //Volvemos a construir el string que adoptara los valores del mismo pero en mayusculas\n nombrePrevioArreglo = new String((mayusculas(nombrePrevioArreglo.toCharArray())));\n\n //Empezamos desde una condicion de inicio 1 para agrandar los nombres y asignarle el nombre a la posicion 0 como al punteo\n if (nombres.length == 1) {\n nombres = new String[nombres.length + 1];\n punteos = new int[nombres.length + 1];\n nombres[0] = nombrePrevioArreglo;\n punteos[0] = 0;\n\n } else {\n //ciclo que trata de encontrar el nombre en el arreglo nombre\n for (contador = 0; contador < nombres.length; contador++) {\n if (nombrePrevioArreglo.equals(nombres[contador])) {\n nombreEncontrado = true;\n break;\n }\n nombreEncontrado = false;\n }\n /*Al no encontrar el nombre creamos dos arreglos mas (nombresAuxiliar y punteosAuxiliar) que serviran de almacenamiento tenporal mientras\n volvemos a crear el nuevo arreglo de los nombres les volvemos a colocar los datos que poseian mas el nombre nuevo\n */\n if (nombreEncontrado == false) {\n String[] nombresAuxiliar = new String[nombres.length];\n int[] punteosAuxiliar = new int[nombres.length];\n punteosAuxiliar = punteos;\n nombresAuxiliar = nombres;\n nombres = new String[nombres.length + 1];\n punteos = new int[nombres.length + 1];\n for (contador = 0; contador < nombresAuxiliar.length; contador++) {\n nombres[contador] = nombresAuxiliar[contador];\n punteos[contador] = punteosAuxiliar[contador];\n }\n punteos[nombres.length - 2] = 0;\n nombres[nombres.length - 2] = nombrePrevioArreglo;\n }\n }\n //Regresa el nombre ya registrado\n return nombrePrevioArreglo;\n\n }", "private String encodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n SubstCipher encodingText = new SubstCipher(this.shiftAlea);\n encodingText.buildShiftedTextFor(text);\n String encoding = encodingText.getLastShiftedText();\n return encodageMot(encoding);\n }", "public static void main(String[] args) {\n Scanner key=new Scanner(System.in);\r\n while(key.hasNext())\r\n {\r\n String s=key.next();\r\n String c=\"\";\r\n for (int i = 0; i <s.length(); i++) {\r\n if((Character)s.charAt(i)=='1'|| (Character)s.charAt(i)=='0'|| (Character)s.charAt(i)=='-')\r\n {\r\n // c=c+c.concat(String.valueOf((Character)s.charAt(i)));\r\n System.out.print((Character)s.charAt(i));\r\n }\r\n else if((Character)s.charAt(i)=='A' || (Character)s.charAt(i)=='B' || (Character)s.charAt(i)=='C')\r\n {\r\n System.out.print(2);\r\n }\r\n else if((Character)s.charAt(i)=='D' || (Character)s.charAt(i)=='E' || (Character)s.charAt(i)=='F')\r\n {\r\n System.out.print(3);\r\n }\r\n else if((Character)s.charAt(i)=='G' || (Character)s.charAt(i)=='H' || (Character)s.charAt(i)=='I')\r\n {\r\n System.out.print(4);\r\n }\r\n else if((Character)s.charAt(i)=='J' || (Character)s.charAt(i)=='K' || (Character)s.charAt(i)=='L')\r\n {\r\n System.out.print(5);\r\n }\r\n else if((Character)s.charAt(i)=='M' || (Character)s.charAt(i)=='N' || (Character)s.charAt(i)=='O')\r\n {\r\n System.out.print(6);\r\n }\r\n else if((Character)s.charAt(i)=='P' || (Character)s.charAt(i)=='Q' || (Character)s.charAt(i)=='R' || (Character)s.charAt(i)=='S')\r\n {\r\n System.out.print(7);\r\n }\r\n else if((Character)s.charAt(i)=='T' || (Character)s.charAt(i)=='U' || (Character)s.charAt(i)=='V')\r\n {\r\n System.out.print(8);\r\n }\r\n else if((Character)s.charAt(i)=='W' || (Character)s.charAt(i)=='X' || (Character)s.charAt(i)=='Y'|| (Character)s.charAt(i)=='Z')\r\n {\r\n System.out.print(9);\r\n }\r\n }\r\n System.out.println();\r\n }\r\n }", "public static void main ( String [] args)\r\n\t{\n\t\tchar [] english = { \r\n\t\t\t 'A', 'B', 'C', 'D', 'E', 'F', \r\n\t\t\t\t 'G', 'H', 'I', 'J', 'K', 'L', \r\n\t\t\t\t 'M', 'N', 'O', 'P', 'Q', 'R', \r\n\t\t\t\t 'S', 'T', 'U', 'V', 'W', 'X', \r\n\t\t\t\t 'Y', 'Z', '1', '2', '3', '4', \r\n\t\t\t\t '5', '6', '7', '8', '9', '0', ' '};\r\n\t\t\r\n\t\tString [] morse = { \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\t \".-.\", \"...\", \"-\", \"..-\", \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\r\n\t\t// Define and initialize variables for values to be input\r\n\t\tint userChoice = 0;\t\t\t\t\t// user selection: 1 or 2\r\n\t\tString userMessage = new String();\t// message to translate\r\n\t\tString translationStr = \"\"; \t\t// variable to hold translated str\r\n\t\tString [] userInputMorse = null;\t// array for morse translation\r\n\t\t\r\n\t\t// Scanner to obtain user input\r\n\t\tScanner inputMain = new Scanner( System.in ); \r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.print\r\n\t\t ( \"MAIN MENU \"\r\n\t\t + \"\\n1: Translate from English to Morse code\"\r\n\t\t + \"\\n2: Translate from Morse code to English\"\r\n\t\t + \"\\n\"\r\n\t\t + \"\\nEnter a number from the above choices: \");\r\n\t\tuserChoice = inputMain.nextInt(); // read input for translation type\r\n\t\t\r\n\t\tif ( userChoice == 1 )\r\n\t\t{\r\n\t\t\t/*\r\n\t\t\t * For some reason, my initial scanner does not take a \r\n\t\t\t * second input so I created another scanner specific to each\r\n\t\t\t * input message type (English or Morse) to be used\r\n\t\t\t */\r\n\t\t\tScanner inputEnglish = new Scanner( System.in );\r\n\t\t\tSystem.out.print\r\n\t\t\t ( \"\\nINSTRUCTIONS\"\r\n\t\t\t\t+ \"\\nEnter the English phrase you wish to translate into Morse \"\r\n\t\t\t + \"\\ncode. Please separate each word with one blank space.\"\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t + \"\\nEnter the phrase: \" );\r\n\t\t\t\r\n\t\t\t// read input, message to translate\r\n\t\t\tuserMessage = inputEnglish.nextLine();\r\n\t\t\t\r\n\t\t\t// convert to upper case for encoding array comparison\r\n\t\t\tuserMessage = userMessage.toUpperCase();\r\n\t\t\t\r\n\t\t\t// separate english message input into individual letters and store\r\n\t\t\t// in char array\r\n\t\t\tchar [] userInputChar = userMessage.toCharArray();\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Initial for loop iterates through the letters of the English\r\n\t\t\t * message stored in char array. Nested for loop iterates through\r\n\t\t\t * each character in the English encoding array. Once a match is\r\n\t\t\t * made (via the if == test), the index of the English encoding \r\n\t\t\t * array is used to find the corresponding Morse code in the Morse \r\n\t\t\t * array. The Morse code is then saved to the translationStr \r\n\t\t\t * variable. The same steps are repeated in the else section.\r\n\t\t\t */\r\n\t\t\tfor ( int i = 0; i < userInputChar.length; i++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int j = 0; j < english.length; j++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( english[j] == userInputChar[i] )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttranslationStr = translationStr + morse[j] + \" \";\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end of j for loop\r\n\t\t\t} // end of i for loop\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tScanner inputMorse = new Scanner( System.in );\r\n\t\t\tSystem.out.print\r\n\t\t\t ( \"\\nINSTRUCTIONS\"\r\n\t\t\t\t+ \"\\nEnter the Morse code you wish to translate. Please \"\r\n\t\t\t\t+ \"\\nseparate each letter/digit with a single space and \"\r\n\t\t\t\t+ \"\\ndelimit multiple words with a '|'. For example, \"\r\n\t\t\t\t+ \"\\n'- --- | -... .' would be the Morse code for the \"\r\n\t\t\t\t+ \"\\nsentence 'to be'.\"\r\n\t\t\t\t+ \"\\n\"\r\n\t\t\t\t+ \"\\nEnter the phrase: \" );\r\n\t\t\t\r\n\t\t\t// read input of Morse code to translate\r\n\t\t\tuserMessage = inputMorse.nextLine();\r\n\t\t\t\r\n\t\t\t// split each Morse code letter into individual strings and save\r\n\t\t\t// to a array\r\n\t\t\tuserInputMorse = userMessage.split( \" \" ); \r\n\t\t\t\r\n\t\t\tfor ( int i = 0; i < userInputMorse.length; i++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int j = 0; j < morse.length; j++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( morse[j].equals(userInputMorse[i]) )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttranslationStr = translationStr + english[j];\r\n\t\t\t\t\t}\r\n\t\t\t\t} // end of j for loop\r\n\t\t\t} // end of i for loop\r\n\t\t} // end of if statement\r\n\t\t\r\n\t\t// output\r\n\t\tSystem.out.println( translationStr );\r\n\t}", "public void nuevoJuego() {\n fallos = 0;\n finDePartida = false;\n\n for (TextView b : botonesLetras) {\n b.setTextColor(Color.BLACK);\n b.setOnClickListener(clickListenerLetras);\n b.setPaintFlags(b.getPaintFlags() & (~ Paint.STRIKE_THRU_TEXT_FLAG));\n }\n ImageView img_ahorcado = (ImageView) findViewById(es.makingapps.ahorcado.R.id.img_ahorcado);\n img_ahorcado.setImageResource(R.drawable.ahorcado_0);\n\n BaseDatos bd = new BaseDatos(this);\n palabraActual = bd.queryPalabraAleatoria(nivelSeleccionado, esAcumulativo);\n\n palabraEspaniol.setText(palabraActual.getEspaniol());\n\n progreso = \"\";\n boolean parentesis = false;\n for(int i = 0; i<palabraActual.getIngles().length(); i++) {\n if(parentesis){\n progreso += palabraActual.getIngles().charAt(i);\n }\n else {\n// if (palabraActual.getIngles().charAt(i) == ' ')\n// progreso += ' ';\n// else if (palabraActual.getIngles().charAt(i) == '-')\n// progreso += '-';\n// else if (palabraActual.getIngles().charAt(i) == '/')\n// progreso += '/';\n// else if (palabraActual.getIngles().charAt(i) == '(') {\n// progreso += '(';\n// parentesis = true;\n// }\n// else if (palabraActual.getIngles().charAt(i) == ')') {\n// progreso += ')';\n// parentesis = false;\n// }\n// else\n// progreso += '_';\n if(Character.isLowerCase(palabraActual.getIngles().charAt(i)))\n progreso += '_';\n else if (palabraActual.getIngles().charAt(i) == '(') {\n progreso += '(';\n parentesis = true;\n }\n else if (palabraActual.getIngles().charAt(i) == ')') {\n progreso += ')';\n parentesis = false;\n }\n else\n progreso += palabraActual.getIngles().charAt(i);\n }\n }\n\n palabraIngles.setText( progreso );\n }", "private char comprobarConsumoEnergetico(char letra) {\r\n char letras[] = { 'A', 'B', 'C', 'D', 'E', 'F' };\r\n boolean encontrado = false;\r\n this.consumoEnergetico = 'F';\r\n for (int i = 0; i < letras.length && !encontrado; i++) {\r\n if (letras[i]==letra) {\r\n encontrado = true;\r\n this.consumoEnergetico = letra;\r\n }\r\n }\r\n return this.consumoEnergetico;\r\n }", "public String ocurrencia() {\n String palabra = \"\";\n int retorno = 0;\n for (int i = 0; i < getCadena().length(); i++) {\n\n if ((getCadena().charAt(i) == ' ') || (i > getCadena().length() - 2)) {\n if (palabra.equals(getBuscar())) {\n retorno++;\n palabra = \"\";\n } else {\n palabra = \"\";\n }\n\n } else {\n palabra += getCadena().charAt(i);\n\n }\n }\n return (\"La cantida de ocurrencias son de:\" + '\\n' + retorno);\n }", "public static String IngresarRazaCorrecta (){\n boolean condicion;\r\n int razaPerro;\r\n String razaElegida=\"\";\r\n do {\r\n MenuRaza();\r\n razaPerro = TecladoIn.readLineInt();\r\n if ((razaPerro > 0) && (razaPerro < 13)) {\r\n razaElegida=TiposDeRaza(razaPerro - 1);\r\n condicion = true;\r\n } else {\r\n System.out.println(\"Ingrese una raza Correcta del 1 al 12.\");\r\n System.out.println(\".........................................\");\r\n condicion = false;\r\n }\r\n } while (condicion != true);\r\n return razaElegida;}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString xStringA = scan.next() + \"111111\";\n\t\tchar[] xCharA = xStringA.toCharArray();\n\t\tString[] xAlpha = new String[26];\n\t\txAlpha[0]=\"a\";\n\t\txAlpha[1]=\"B\";\n\t\txAlpha[2]=\"C\";\n\t\txAlpha[3]=\"D\";\n\t\txAlpha[4]=\"E\";\n\t\txAlpha[5]=\"F\";\n\t\txAlpha[6]=\"G\";\n\t\txAlpha[7]=\"H\";\n\t\txAlpha[8]=\"I\";\n\t\txAlpha[9]=\"J\";\n\t\txAlpha[10]=\"K\";\n\t\txAlpha[11]=\"L\";\n\t\txAlpha[12]=\"M\";\n\t\txAlpha[13]=\"N\";\n\t\txAlpha[14]=\"O\";\n\t\txAlpha[15]=\"P\";\n\t\txAlpha[16]=\"Q\";\n\t\txAlpha[17]=\"R\";\n\t\txAlpha[18]=\"S\";\n\t\txAlpha[19]=\"T\";\n\t\txAlpha[20]=\"U\";\n\t\txAlpha[21]=\"V\";\n\t\txAlpha[22]=\"W\";\n\t\txAlpha[23]=\"X\";\n\t\txAlpha[24]=\"Y\";\n\t\txAlpha[25]=\"Z\";\n\t\t\n\t\t\n\t\tchar one = xStringA.charAt(0);\n\t\tchar two = xStringA.charAt(1);\n\t\tchar three = xStringA.charAt(2);\n\t\tchar four = xStringA.charAt(3);\n\t\tchar five = xStringA.charAt(4);\n\t\tchar six = xStringA.charAt(5);\n\n\t\tString sOne = Character.toString(one);\n\t\tString sTwo = Character.toString(two);\n\t\tString sThree = Character.toString(three);\n\t\tString sFour = Character.toString(four);\n\t\tString sFive = Character.toString(five);\n\t\tString sSix = Character.toString(six);\n\t/*\t\n\t\tSystem.out.println(sOne);\n\t\tSystem.out.println(sTwo);\n\t\tSystem.out.println(sThree);\n\t\tSystem.out.println(sFour);\n\t\tSystem.out.println(sFive);\n\t\tSystem.out.println(sSix);\n\t*/\n\t\t\n\t\tfor (int i = 0; i < 26 ; i++) {\n\t\t\tif (sOne != xAlpha[i]) {\n\t\t\t\tint oneVar = 1;\n\t\t\t\toneVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sOne + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(oneVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar1\");\n\t\t\t}\n\t\t\t\n\t\t\tif (sTwo != xAlpha[i]) {\n\t\t\t\tint twoVar = 2;\n\t\t\t\ttwoVar = i+1;\n\t\t\t\tSystem.out.println(\"Value is\");\n\t\t\t\tSystem.out.println(sTwo + \" \" +xAlpha[i]);\n\t\t\t\tSystem.out.println(twoVar);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"no value was similar2\");\n\t\t\t}\n\t\t\t}\n\t\t}", "public void podaj_cene() {\n\t\tdo{System.out.print(\"Podaj cene średniej pizzy:\");\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner odczyt= new Scanner(System.in);\n\t\tcena= odczyt.nextInt();\n\t\tif(cena<6){\n\t\t\tSystem.out.println(\"Zbyt niska cena!\");\n\t\t }\n\t\t}while(cena<6);\n\t\t}", "static private int ejercicio4(String stringEjemplo){\n\n if (stringEjemplo.contentEquals(\"uno\")){\n return 1;\n }\n if (stringEjemplo.contentEquals(\"dos\")) {\n return 2;\n }\n if (stringEjemplo.contentEquals(\"tres\")){\n return 3;\n }\n if (stringEjemplo.contentEquals(\"cuatro\")){\n return 4;\n }\n if (stringEjemplo.contentEquals(\"cinco\")){\n return 5;\n }\n return -1;\n }", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"isminizi giriniz\");\n//\t\tString isim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.println(\"soyadinizi giriniz\");\n//\t\tString soyisim=scan.nextLine().toLowerCase();\n//\t\tSystem.out.print(isim.substring(0, 1).toUpperCase()+isim.substring(1, isim.length()));\n//\t\tSystem.out.print(\" \" +soyisim.substring(0, 1).toUpperCase() +soyisim.substring(1, soyisim.length()));\n\n\t\t/// hocanin cozumu\n\t\t// int ikinciBasNok = isimSoyIsim.indexOf(\" \");\n// System.out.print(isimSoyIsim.substring(0,1).toUpperCase());\n// System.out.print(isimSoyIsim.substring(1, ikinciBasNok+1).toLowerCase());\n// System.out.print(isimSoyIsim.substring(ikinciBasNok+1, ikinciBasNok+2).toUpperCase());\n// System.out.println(isimSoyIsim.substring(ikinciBasNok+2).toLowerCase());\n\n\t\t/// Array ile cozum\n\t\tString isimSoyIsim = scan.nextLine();\n\t\t\n// 0/fedai 1/ocak //isimler.length => 2 - 1 1 != 1\n\t\tString[] isimler = isimSoyIsim.split(\" \");\n\n\t\tfor (int i = 0; i < isimler.length; i++) {\n\t\t\tisimler[i] = isimler[i].toLowerCase();\n\t\t\t\tif(isimler.length-1 != i ) //\n\t\t\tSystem.out.print(isimler[i].substring(0, 1).toUpperCase() + isimler[i].substring(1) + \" \");\n\t\t\t\telse\n\t\t System.out.print(isimler[i].substring(0,1).toUpperCase()+isimler[i].substring(1));\n\t\t}\nscan.close();\n\t}", "public void start1()\n\t{\n\t\taddPlug('A', 'M');\n\t\taddPlug('G', 'L');\n\t\taddPlug('E', 'T');\t\t\n\t\t\n\t\taddRotor(new BasicRotor (\"I\",6), 0);\n\t\taddRotor(new BasicRotor(\"II\",12), 1);\n\t\taddRotor(new BasicRotor(\"III\",5), 2);\n\t\t\n\t\treflector = new Reflector(\"ReflectorI\");\n\t\taddReflector(reflector);\n\t\t\n\t\tString encodedMessage = \"GFWIQH\";\n\t\t\n\t\t//loops through each character from the string and decodes it\n\t\tfor (char character: encodedMessage.toCharArray())\n\t\t{\n\t\t\tcharacter = encodeLetter(character);\n\t\t\tSystem.out.print(character);\n\t\t}\n\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint total = sc.nextInt();\n\t\tString text[] = new String[total]; //total要大於1\n\t\tfor(int i=0;i<total;i++) {\n\t\t\t//每列輸入一組字串\n\t\t\ttext[i] = sc.nextLine();; //輸入到字串中切勿使用nextLine\t\t\n\t\t}\n\n//\t\tSystem.out.println(text.length); //total = 5 輸出5\n\t\t\n\t\t//5列 把text陣列長度找出\n\t\t//幾列 做幾次\n\t\tfor(int i=1;i<text.length;i++)\n\t\t{\n\t\t\t//分割字串 空白字元\n\t\t\tString[] textSplit = text[i].split(\" \"); //空白分隔\n\t\t\tSystem.out.print(\"\\n\");\n\t\t\tfor(int j=0;j<textSplit.length;j++) {\n\n//\t\t\t\tSystem.out.println(\"textSplit\"+textSplit[j]);\n\t\t\t\tswitch(textSplit[j]){\n\t\t\t\t\tcase \".-\":System.out.print(\"A\");break;\n\t\t\t\t\tcase \"-...\":System.out.print(\"B\");break;\n\t\t\t\t\tcase \"-.-.\":System.out.print(\"C\");break;\n\t\t\t\t\tcase \"-..\":System.out.print(\"D\");break;\n\t\t\t\t\tcase \".\":System.out.print(\"E\");break;\n\t\t\t\t\tcase \"..-.\":System.out.print(\"F\");break;\n\t\t\t\t\tcase \"--.\":System.out.print(\"G\");break;\n\t\t\t\t\tcase \"....\":System.out.print(\"H\");break;\n\t\t\t\t\tcase \"..\":System.out.print(\"I\");break;\n\t\t\t\t\tcase \".---\":System.out.print(\"J\");break;\n\t\t\t\t\tcase \"-.-\":System.out.print(\"K\");break;\n\t\t\t\t\tcase \".-..\":System.out.print(\"L\");break;\n\t\t\t\t\tcase \"--\":System.out.print(\"M\");break;\n\t\t\t\t\tcase \"-.\":System.out.print(\"N\");break;\n\t\t\t\t\tcase \"---\":System.out.print(\"O\");break;\n\t\t\t\t\tcase \".--.\":System.out.print(\"P\");break;\n\t\t\t\t\tcase \"--.-\":System.out.print(\"Q\");break;\n\t\t\t\t\tcase \".-.\":System.out.print(\"R\");break;\n\t\t\t\t\tcase \"...\":System.out.print(\"S\");break;\n\t\t\t\t\tcase \"-\":System.out.print(\"T\");break;\n\t\t\t\t\tcase \"..-\":System.out.print(\"U\");break;\n\t\t\t\t\tcase \"...-\":System.out.print(\"V\");break;\n\t\t\t\t\tcase \".--\":System.out.print(\"W\");break;\n\t\t\t\t\tcase \"-..-\":System.out.print(\"X\");break;\n\t\t\t\t\tcase \"-.--\":System.out.print(\"Y\");break;\n\t\t\t\t\tcase \"--..\":System.out.print(\"Z\");break;\n\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "private char hallarLetra() {\r\n\t\tchar[] letra= {'T','R','W','A','G','M','Y','F','P','D','X',\r\n\t\t\t\t\t'B','N','J','Z','S','Q','V','H','L','C','K','E'};\r\n\t\treturn letra[numeroDNI%23];\r\n\t}", "public String[] pedirDatosNuevoCarro(){\n String[] nuevoCarro = new String[3];\n boolean paso = false;//Pedimos los datos de un carro, con su verificacion y luego se la enviamos en una String\n while (paso == false){\n try {\n System.out.println(\"Ingrese el numero de placa\");\n nuevoCarro[0] = scan.nextLine();\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n paso = false;\n while (paso == false){\n try {\n System.out.println(\"Ingrese la marca de su vehiculo\");\n nuevoCarro[1] = scan.nextLine();\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n paso = false;\n while (paso == false){\n try {\n System.out.println(\"Ingrese el modelo de su auto, elija el numero antes del modelo ([1 'European|U.S. Compact'], [2 'U.S. Standard'], [3 'U.S. Standard Large'])\");\n String valorString = scan.nextLine();\n int valor = Integer.parseInt(valorString);\n if (valor == 1){\n nuevoCarro[2] = \"European|U.S. Compact\";\n }\n else if (valor == 2){\n nuevoCarro[2] = \"U.S. Standard\";\n }\n else if (valor == 3){\n nuevoCarro[2] = \"U.S. Standard Large\";\n }\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un numero de 1 a 3, por favor\");\n }\n }\n\n return nuevoCarro;\n }", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public String comunica() {\r\n// ritorna una stringa\r\n// posso usare il metodo astratto \r\n return msg + AggiungiQualcosa();\r\n }", "private void actualizarOrdenes(Character letra) {\r\n\t\tint ordenContexto = this.contextoActual.length();\r\n\t\tString contextoString = this.contextoActual.substring(0, ordenContexto);\r\n\t\tlogger.debug(\"Nuevo contexto: \" + contextoString);\r\n\t\tContexto contexto;\r\n\t\tboolean finalizarActualizacion = false;\r\n\t\t\r\n\t\twhile (ordenContexto > -1 && !finalizarActualizacion) {\r\n\t\t\tcontexto = this.listaOrdenes.get(ordenContexto).getContexto(contextoString);\r\n\t\t\tif (contexto.getArrayCharProb().isEmpty()) {\r\n\t\t\t\t//Agrego el Escape para el contexto vacio\r\n\t\t\t\tcontexto.crearCharEnContexto(Constantes.ESC);\r\n\t\t\t\t//Agrego la letra al contexto ya que se que no exite por estar vacio el contexto\r\n\t\t\t\tcontexto.crearCharEnContexto(letra);\r\n\t\t\t} else {\r\n\t\t\t\t//Busco la letra, si no esta la agrego y aumento ESC. Si esta Aumento la letra.\r\n\t\t\t\tif (contexto.existeChar(letra)) {\r\n\t\t\t\t\t//La encontro entonces actualizamos la letra\r\n\t\t\t\t\tcontexto.actualizarContexto(letra);\r\n\t\t\t\t\tfinalizarActualizacion = true;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Como la letra no esta, la creo y actualizo el ESC\r\n\t\t\t\t\tcontexto.actualizarContexto(Constantes.ESC);\r\n\t\t\t\t\tcontexto.crearCharEnContexto(letra);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Preparo para el siguiente contexto\r\n\t\t\tif (ordenContexto > 0){\r\n\t\t\t\tordenContexto--;\r\n\t\t\t\tcontextoString = this.contextoActual.substring(this.contextoActual.length() - ordenContexto, this.contextoActual.length());\r\n\t\t\t\tlogger.debug(\"Nuevo contexto: \" + contextoString);\r\n\t\t\t} else {\r\n\t\t\t\tordenContexto--;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void Inicialitzar_Secret_Old(char[][] Matriu) {\r\n\r\n\t\tfor (int F = 0; F < TAULER; F++)\r\n\t\t\tfor (int C = 0; C < TAULER; C++)\r\n\t\t\t\tif (F == 0)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'A';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'B';\r\n\t\t\t\telse if (F == 1)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'C';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'D';\r\n\t\t\t\telse if (F == 2)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'E';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'F';\r\n\t\t\t\telse if (F == 3)\r\n\t\t\t\t\tif (C == 0 || C == 1)\r\n\t\t\t\t\t\tMatriu[F][C] = 'G';\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tMatriu[F][C] = 'H';\r\n\t}", "@Override\r\n\tpublic String encriptar(String string) {\n\r\n \r\n String newName=\"\";\r\n for (int i = 0; i < string.length(); i++) {\r\n // instrucción switch con tipo de datos int\r\n switch (string.charAt(i)) \r\n {\r\n case 'a' : newName+=\"1,\";\r\n break;\r\n case 'b' : newName+=\"2,\";\r\n break;\r\n case 'c' : newName+=\"3,\";\r\n break;\r\n case 'd' : newName+=\"4,\";\r\n break;\r\n case 'e' : newName+=\"5,\";\r\n break;\r\n case 'f' : newName+=\"6,\";\r\n break;\r\n case 'g' : newName+=\"7,\";\r\n break;\r\n case 'h' : newName+=\"8,\";\r\n break;\r\n case 'i' : newName+=\"9,\";\r\n break;\r\n case 'j' : newName+=\"10,\";\r\n break;\r\n case 'k' : newName+=\"11,\";\r\n break;\r\n case 'l' : newName+=\"12,\";\r\n break;\r\n case 'm' : newName+=\"13,\";\r\n break;\r\n case 'n' : newName+=\"14,\";\r\n break;\r\n case 'ñ' : newName+=\"15,\";\r\n break;\r\n case 'o' : newName+=\"16,\";\r\n break;\r\n case 'p' : newName+=\"17,\";\r\n break;\r\n case 'q' : newName+=\"18,\";\r\n break;\r\n case 'r' : newName+=\"19,\";\r\n break;\r\n case 's' : newName+=\"20,\";\r\n break;\r\n case 't' : newName+=\"21,\";\r\n break;\r\n case 'u' : newName+=\"22,\";\r\n break;\r\n case 'v' : newName+=\"23,\";\r\n break;\r\n case 'w' : newName+=\"24,\";\r\n break;\r\n case 'x' : newName+=\"25,\";\r\n break;\r\n case 'y' : newName+=\"26,\";\r\n break;\r\n case 'z' : newName+=\"27,\";\r\n break;\r\n case ' ' : newName+=\"0,\";\r\n break;\r\n \r\n \r\n }\r\n \r\n }\r\n \r\n String palabraFinal= eliminarComaSi(newName);\r\n return palabraFinal;\r\n\t}", "private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }", "public static void main(String arg[]) {\n String frase1 = \"Había vez circo alegraba el\";\n String frase2 = \"una un que siempre carazón sin temer jamás\";\n String frase3 = \"\";\n\n int inicio1 = 0;\n int fin1 = frase1.indexOf(\" \");\n int inicio2 = 0;\n int fin2 = frase2.indexOf(\" \");\n\n while ((fin1 != -1) || (fin2 != -1)) {\n if (fin1 != -1) {\n frase3 = frase3.concat(frase1.substring(inicio1, fin1 + 1));\n inicio1 = fin1 + 1;\n fin1 = frase1.indexOf(\" \", inicio1);\n }\n if (fin2 != -1) {\n frase3 = frase3.concat(frase2.substring(inicio2, fin2 + 1));\n inicio2 = fin2 + 1;\n fin2 = frase2.indexOf(\" \", inicio2);\n }\n }\n System.out.println(frase3);\n }", "public static String morse2text(String morse) {\r\n\r\n\t\tString rest = morse;\r\n\t\tString zeichen = \"\";\r\n\t\tString out = \"\";\r\n\t\tchar c = 'x';\r\n\t\tchar prev = 'x'; // Damit zwischen :: und : unterschieden werden kann, \r\n\t\t\t\t\t\t\t\t\t\t // wird jeweils der vorherige Charakter aufgezeichnet.\r\n\t\tfor(int i = 0; i < morse.length(); i++) {\r\n\t\t\tc = rest.charAt(0);\r\n\t\t\tif(rest.length() > 1) { // diese Abfrage stellt sicher, dass das letzte Zeichen \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// interpretiert wird, auch ohne : am Ende\r\n\t\t\t\trest = rest.substring(1); // löscht das erste Zeichen, das in c gespeichert ist\r\n\r\n\t\t\t\tif(c != ':') {\r\n\r\n\t\t\t\t\tzeichen += c;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif(prev == ':') {\r\n\t\t\t\t\t\t//Wort zuende\r\n\t\t\t\t\t\tout += \" \";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t//Zeichen zuende, an Interpreter senden\r\n\r\n\t\t\t\t\t\tout+= m2thelper(zeichen);\r\n\r\n\t\t\t\t\t\tzeichen = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tprev = c;\r\n\t\t\t} else { //letztes Zeichen\r\n\r\n\t\t\t\tif(c == '*') { // Letztes Zeichen interpretieren und Punkt anhängen\r\n\t\t\t\t\tout += m2thelper(zeichen);\r\n\t\t\t\t\tout += m2thelper(Character.toString(c));\r\n\t\t\t\t} else if(c == ':'){ // Kann entweder Leerzeichen oder Zeichenende sein\r\n\t\t\t\t\t\tif(prev == ':') { // Leerzeichen\r\n\t\t\t\t\t\t\tout += \" \";\r\n\t\t\t\t\t\t} else { // Zeichenende, vorheriges Zeichen an Interpreter senden\r\n\t\t\t\t\t\t\tout += m2thelper(zeichen);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t} else { // Letztes Zeichen ist Teil des Morsezeichen, anhängen und an Interpreter senden\r\n\t\t\t\t\tout += m2thelper(zeichen + c);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn out;\r\n\r\n\r\n\t}", "private String[] Condicion(String variable, String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].equals(variable)) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n }\n } else {\n if (var[0].equals(variable)) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }", "public char controlloVerticale(char[][] scacchiera)\n {\n for (int w=0;w<3;w++)\n {\n if (scacchiera[0][w]==scacchiera[1][w]&&scacchiera[1][w]==scacchiera[2][w]) return scacchiera[0][w];\n }\n return ' ';\n }", "public static void main(String[] args) {\n\t\tchar letra= 'a';\r\n\t\tSystem.out.println(letra);\r\n\t\t\r\n\t\tchar valor = 66;\r\n\t\tvalor = (char) (valor + 1);\r\n\t\tSystem.out.println(valor);\r\n\t\t\r\n\t\t// String é mais comum\r\n\t String palavra = \"aprendendo java\";\r\n\t System.out.println(palavra);\r\n\t\t\r\n\t \r\n\t // char usa aspas simples e String usa aspas duplas\r\n\t}", "public void llenarDiccionario(){\n String[] letras = {\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\",\"h\",\"i\",\"j\",\"k\",\"l\",\"m\",\"n\",\n \"o\",\"p\",\"q\",\"r\",\"s\",\"t\",\"u\",\"v\",\"w\",\"x\",\"y\",\"z\",\"0\",\"1\",\"2\",\"3\",\"4\",\n \"5\",\"6\",\"7\",\"8\",\"9\",\" \"};\n String[] encriptado = {\"!\",\"]\",\"^\",\"æ\",\"ü\",\"×\",\"¢\",\"þ\",\"@\",\"§\",\"«\",\n \"A\",\"¥\",\"~\",\"c\",\"r\",\"z\",\"W\",\"8\",\"ç\",\"2\",\"L\",\"f\",\"&\",\"#\",\"[\",\",\",\n \"p\",\"Q\",\"K\",\"m\",\"s\",\"J\",\"V\",\"b\",\"U\",\"-\"};\n for (int i = 0; i < 36; i++) {\n diccionarioEncriptado.put(letras[i], encriptado[i]);\n }\n \n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\t\r\n\t\tint input = 0;\r\n\t\tint ai = 0;\r\n\t\tint win = 0;\r\n\t\tint defeat = 0;\r\n\t\tint draw = 0;\r\n\t\t\r\n\t\tString me = \"\";\r\n\t\tString com = \"\";\r\n\t\tSystem.out.println(\"★☆★☆★☆★☆가위바위보 게임입니다!★☆★☆★☆★☆\");\r\n\t\tfor(int i = 1 ; i < 4 ; i++) {\r\n\t\t\tSystem.out.println(\"\\t\\t\\t\\t\\t 최대횟수/남은횟수\");\r\n\t\t\tSystem.out.println(\"가위(1), 바위(2), 보(3) 중 하나를 입력하세요>>>\\t\\t3 / \" + i);\r\n\t\t\tinput = scan.nextInt();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tai = (int)(Math.random()*3) + 1;\r\n\t\t\t\r\n\t\t\tif (input == 1) me = \"가위\";\r\n\t\t\telse if (input == 2) me = \"바위\";\r\n\t\t\telse if (input == 3) me = \"보\";\r\n\t\t\telse System.out.println(\"잘못 입력하셨습니다\");\r\n\t\t\tif (ai == 1) com = \"가위\";\r\n\t\t\telse if (ai == 2) com = \"바위\";\r\n\t\t\telse if (ai == 3) com = \"보\";\r\n\t\t\t\r\n\t\t\tif(me != \"\") {\r\n\t\t\t\tSystem.out.println(\"컴퓨터도 선택 했습니다.\");\r\n\t\t\t\tSystem.out.println(\"당신은 \\\"\" + me + \"\\\" 상대는 \\\"\" + com + \"\\\" 을 선택했습니다\");\r\n\t\t\t\r\n\t\t\t\tswitch (input - ai) {\r\n\t\t\t\tcase -1 : case 2 : \r\n\t\t\t\t\tSystem.out.println(\"★☆저런~~ 졌네요★☆\\n\"); defeat += 1; \r\n\t\t\t\t\tSystem.out.println(\"전적 => 승리 [ \" + win + \" ]\\t패배 [ \" + defeat + \" ]\\t무승부 [ \" + draw + \" ]\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase -2 : case 1 : \r\n\t\t\t\t\tSystem.out.println(\"★☆오~~ 이겼네요★☆\\n\"); win += 1; \r\n\t\t\t\t\tSystem.out.println(\"전적 => 승리 [ \" + win + \" ]\\t패배 [ \" + defeat + \" ]\\t무승부 [ \" + draw + \" ]\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 0 : \r\n\t\t\t\t\tSystem.out.println(\"★☆이런! 비겼네요★☆\\n\"); draw += 1;\r\n\t\t\t\t\tSystem.out.println(\"전적 => 승리 [ \" + win + \" ]\\t패배 [ \" + defeat + \" ]\\t무승부 [ \" + draw + \" ]\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault : System.out.println(\"오류 입니다\"); \r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(win==defeat) {\r\n\t\t\tSystem.out.println(\"최종 결과 => 무승부 입니다\");\r\n\t\t} else if(win > defeat) {\r\n\t\t\tSystem.out.println(\"최종 결과 => 당신의 승리입니다\");\r\n\t\t} else if(win < defeat) {\r\n\t\t\tSystem.out.println(\"최종 결과 => 당신의 패배입니다\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"오류 입니다\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n String X_awal = \"my name is marouane, and i'm sick, thank you very much\";\n String Y = \"my name is adeleye, but you are very sick, thank you \";\n String X = match(X_awal, Y);\n int[] Penanda_Y = new int[Y.length()];\n int y_length = Y.length();\n for (int k = 0; k < y_length; k++) {\n Penanda_Y[k] = 0;\n }\n int m = X.length();\n int n = Y.length();\n String L = \"\";\n String LSym = \"\";\n int R = 0;\n int i = 1;\n int[] P = new int[100];\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n i = 1;\n while (i <= m) {\n if (i != m) {\n P[i + 1] = posisi(X, Y, (i + 1), Penanda_Y, R);\n }\n if (P[i + 1] == 0) {\n if (P[i] > R) {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n }\n break;\n }\n\n if (P[i + 1] < R || P[i] < R) {\n R = 0;\n }\n if (P[i] > P[i + 1]) {\n if (R == 0 && i > 1) {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n Penanda_Y[P[i] - 1] = 1;\n R = P[i];\n i = i + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n } else {\n L = L + \" \" + Integer.toString(P[i + 1]);\n LSym = LSym + \" \" + X.charAt(i + 1 - 1);\n Penanda_Y[P[i + 1] - 1] = 1;\n R = P[i + 1];\n i = (i + 1) + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n }\n\n } else {\n\n if (R == 0 && i > 1) {\n L = L + \" \" + Integer.toString(P[i + 1]);\n LSym = LSym + \" \" + X.charAt(i + 1 - 1);\n Penanda_Y[P[i + 1] - 1] = 1;\n R = P[i + 1];\n i = (i + 1) + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n } else {\n L = L + \" \" + Integer.toString(P[i]);\n LSym = LSym + \" \" + X.charAt(i - 1);\n Penanda_Y[P[i] - 1] = 1;\n R = P[i];\n i = i + 1;\n if (R == Y.length() || i > X.length()) {\n break;\n }\n P[i] = posisi(X, Y, i, Penanda_Y, R);\n }\n }\n }\n System.out.println(\"X = \" + X_awal);\n System.out.println(\"X = \" + Y);\n System.out.println(\"L = \" + L);\n System.out.println(\"LSym = \" + LSym);\n System.out.println(\"Length = \" + LSym.length() / 2);\n}", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner lector= new Scanner(System.in);\n\t System.out.println(\"Escriu una frase, et donare info:\");\n\t \n\t String primera = lector.nextLine();\n\t int [] lala = new int[26];\n\t int contador = 0;\n\t \n\t for(int i=0;i<primera.length();i++){\n\t \tchar a = primera.charAt(i);\n\t \tfor (int j=0;j<abe.length();j++){\n\t \t\tchar e = abe.charAt(j);\n\t \t\tif(a==e){lala[j]=lala[j]+1;}\n\t \t}\n\t \n\t }\n\t \n\t for(int i=0;i<lala.length;i++){\n\t \t\tif(lala[i]!=0){\n\t \t\tchar e = abe.charAt(i);\n\t \t\tSystem.out.print(e+\" aparaeix: \");\n\t \t\n\t \tSystem.out.println(lala[i]+ \"vegades.\");}}\n\t }", "public static void iniciarAciertos(String vacierto[],String palabra){\n for (int i=0;i<palabra.length();i++){\r\n if (vacierto[i]==null){\r\n vacierto[i]=\" - \";\r\n }\r\n //comprobar que se rellena la matriz con -\r\n //System.out.println(vacierto[i]);\r\n }\r\n \r\n }", "private String decodageCesar(String text) {\n if (text == null || text.equals(\"\")) {\n throw new AssertionError(\"Aucun texte n'est saisie\");\n }\n String decoding = decodageMot(text);\n SubstCipher decodingText = new SubstCipher(this.shiftAlea);\n decodingText.ensureNegativeShift();\n decodingText.buildShiftedTextFor(decoding);\n return decodingText.getLastShiftedText();\n }", "public static String crypter (String chaineACrypter, int codeCryptage) {\r\n char car;\r\n char newCar;\r\n int charLength = chaineACrypter.length();\r\n\r\n for(int i = 0; i < charLength; i++){\r\n car = chaineACrypter.charAt(i);\r\n if(car >= 'a' && car <= 'z'){\r\n newCar = (char)(car + codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= 'A' && car <= 'Z'){\r\n newCar = (char)(car - codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }else if(car >= '0' && car <= '9'){\r\n newCar = (char)(car + 7 % codeCryptage);\r\n if (i == 0) {\r\n chaineACrypter = newCar + chaineACrypter.substring(i+1);\r\n }else{\r\n chaineACrypter = chaineACrypter.substring(0, i) + newCar + chaineACrypter.substring(i+1);\r\n }\r\n }\r\n }\r\n\r\n\r\n return chaineACrypter;\r\n }", "protected void acoesTeclado(String charSequence) {\n\t\t\tanexaDescricao(\"Interagindo com a(s) tecla(s): \" + charSequence);\n\t\t\tnew Actions(getDriver()).sendKeys(charSequence).build().perform();\n\t}", "public static void partida(String vpalabra[],String verror[],String vacierto[],String palabra){\r\n //comienzo ahorcado\r\n System.out.println(\"******************* AHORCADO *******************\");\r\n String letra;\r\n \r\n int contador=7;\r\n //bucle\r\n while ((contador>0)&&(ganarPartida(vacierto,vpalabra)==false)){\r\n //for (int i=0;i<verror.length;i++){\r\n //muestra el dibujo para que sepa por donde va \r\n mostrarDibujo(contador);\r\n System.out.println(\"VIDAS: \"+ contador);\r\n //mostrar vector acierto\r\n mostrarAcierto(palabra, vacierto);\r\n \r\n \r\n //pregunta letra al jugador \r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n System.out.println(\"Escribe una única letra: \");\r\n letra=leer.next();\r\n \r\n //muestra vector verror las letras erroneas que vas introduciendo\r\n muestraError(verror);\r\n System.out.println(\"\");\r\n System.out.println(\"\"); \r\n //comprueba si letra esta en la matriz palabra para acertar o fallar\r\n if (buscarLetra(vpalabra, vacierto, verror, letra)==false){\r\n //recorro verror guardando letra erronea\r\n \r\n // verror[i]=letra;\r\n contador--;\r\n } \r\n \r\n //}\r\n }\r\n \r\n if (ganarPartida(vacierto,vpalabra)==true){\r\n System.out.println(\"La palabra es: \");\r\n mostrarPalabra(palabra, vpalabra);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"¡HAS GANADO!\");\r\n } else{\r\n System.out.println(\" _ _ _ \");\r\n System.out.println(\" |/ | \");\r\n System.out.println(\" | 0 \");\r\n System.out.println(\" | /ºº/ \");\r\n System.out.println(\" | | \");\r\n System.out.println(\" | / / \");\r\n System.out.println(\" | \");\r\n System.out.println(\"---------------\");\r\n System.out.println(\"---------------\");\r\n System.out.println(\" HAS PERDIDO \");\r\n }\r\n }", "private static void esPalindromo(String palabraUsuario) {\n\t\tString primeraParte = \"\";\n\t\tString segundaParte = \"\";\n\t\tif (palabraUsuario.length() % 2 == 0) {// Es Par\n\t\t\tfor (int i = 0; i < palabraUsuario.length() / 2; i++) {//Recorro lo caracteres de la palabra introducida hasta la mitad\n\t\t\t\tprimeraParte += palabraUsuario.charAt(i); //Los meto en una cadena\n\t\t\t}\n\t\t\tfor (int i = palabraUsuario.length() / 2 - 1; i >= 0; i--) {//Recorro la mitad de la palabra introducida pero al reves\n\t\t\t\tsegundaParte += palabraUsuario.charAt(i);\n\t\t\t}\n\t\t\tString palabraCreada = primeraParte + segundaParte;// Creo una palabra a partir de la primera y segunda parte\n\t\t\tif (palabraCreada.equalsIgnoreCase(palabraUsuario))//Si la palabra que ha introducido es igual a la que he compuesto \n\t\t\t\tSystem.out.println(\"Es palindromo\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No es palindromo\");\n\t\t} else {// Es impar\n\t\t\tfor (int i = 0; i < palabraUsuario.length() / 2 + 1; i++) {//Recorro lo caracteres de la palabra introducida un caracter mas de la mitad\n\t\t\t\tprimeraParte += palabraUsuario.charAt(i); // Los meto en una cadena\n\t\t\t}\n\t\t\tfor (int i = primeraParte.length() - 2; i >= 0; i--) {//Le doy i el valor de la longitud de la primera parte -2 porque es impar \n\t\t\t\tsegundaParte += primeraParte.charAt(i);\n\t\t\t}\n\t\t\tString palabraComprobar = primeraParte + segundaParte;\n\t\t\tif (palabraUsuario.equalsIgnoreCase(palabraComprobar)) {//Igual que antes\n\t\t\t\tSystem.out.println(\"Es un palindromo\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"No es un palindromo\");\n\t\t\t}\n\t\t}\n\n\t}", "public boolean buscarLetra(char letra) {\n if ( palabra.indexOf(letra,0) == -1 ) { \r\n almacenarErrados(letra); \r\n return false; \r\n }else{ \r\n //Recorremos toda la palabra para reemeplaza el _ por la letra ingresada \r\n int pos = 0; \r\n do { \r\n pos = palabra.indexOf(letra, pos); \r\n if (pos != -1) { \r\n letras[pos] = letra; \r\n pos++; \r\n } \r\n } \r\n while (pos != -1); \r\n } \r\n return true; \r\n }", "public static void main(String[] args) {\n\t\tString s = \"Esto es una cadena de caracteres\";\n\t\tString s1 = s.substring(0,7);\n\t\tString s2 = s.substring(8,12);\n\t\tString s3 = s.substring(8);\n\t\tSystem.out.println(s1);\n\t\tSystem.out.println(s2);\n\t\tSystem.out.println(s3);\n\t}", "public static String cadenaDescomponer(String cadena, int posicion, String caracter){\n String caddenaRetorno = \"cadena\"; //Va a tomar valor o lo va a descomponer\n //si se pide una posicion mas\n if(posicion >1){\n //recorrido para quitar datos\n for(int i=0; i<posicion-1;i++){\n //descomposicion pol@juy@5245@liok\n caddenaRetorno = caddenaRetorno.substring(caddenaRetorno.indexOf(caracter) + 1);\n\n }\n }\n //cuando encuentre el valor\n if(caddenaRetorno.indexOf(cadena) > 0){\n caddenaRetorno = caddenaRetorno.substring(0,caddenaRetorno.indexOf(caracter));\n }\n\n //retornamos el valor limpio\n return caddenaRetorno;\n }", "public static void main(String[] args) {\n\n Scanner vowelconsonent =new Scanner(System.in);\n char ch;\n System.out.print(\"Enter your word = \");\n\n ch = vowelconsonent.next().charAt(0);\n\n\n if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'){\n\n System.out.print(\"vowel \"+ch);\n\n }else {\n\n System.out.print(\"consonent \");\n\n }\n\n }", "public static void main(String[] args) {\n String a = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ#-\";\r\n //---------------------------------------------------------------------\r\n \r\n //Memanggil alfabet String yang diinginkan\r\n //Menentukan alfabet untuk Nama\r\n char hasil1 = a.charAt(0);\r\n char hasil2 = a.charAt(25);\r\n char hasil3 = a.charAt(7);\r\n char hasil4 = a.charAt(0);\r\n char hasil5 = a.charAt(17);\r\n char hasil6 = a.charAt(27);\r\n char hasil7 = a.charAt(1);\r\n char hasil8 = a.charAt(4);\r\n char hasil9 = a.charAt(17);\r\n char hasil10 = a.charAt(11);\r\n char hasil11 = a.charAt(8);\r\n char hasil12 = a.charAt(0);\r\n char hasil13 = a.charAt(13);\r\n char hasil14 = a.charAt(0);\r\n //---------------------------------------------------------------------\r\n \r\n //Menentukan alfabet untuk Kelas\r\n char hasil15 = a.charAt(23);\r\n char hasil16 = a.charAt(8);\r\n char hasil17 = a.charAt(8);\r\n char hasil18 = a.charAt(27);\r\n char hasil19 = a.charAt(17);\r\n char hasil20 = a.charAt(15);\r\n char hasil21 = a.charAt(11);\r\n char hasil22 = a.charAt(27);\r\n char hasil23 = a.charAt(1);\r\n //---------------------------------------------------------------------\r\n \r\n //Saat nya memanggil output yang telah di tentukan pada variable-variable diatas\r\n System.out.println(\"ALFABET TERSEDIA : \"+a);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Nama\r\n System.out.println(\"Nama : \"+hasil1+\"\"+hasil2+\"\"+hasil3+\"\"+hasil4+\r\n \"\"+hasil5+\"\"+hasil6+\"\"+hasil7+\"\"+hasil8+\"\"+hasil9+\"\"+hasil10+\"\"\r\n +hasil11+\"\"+hasil12+\"\"+hasil13+\"\"+hasil14);\r\n //---------------------------------------------------------------------\r\n \r\n //Pemanggilan Kelas\r\n System.out.println(\"Kelas : \"+hasil15+\"\"+hasil16+\"\"+hasil17+\"\"+\r\n hasil18+\"\"+hasil19+\"\"+hasil20+\"\"+hasil21+\"\"+hasil22+\"\"+hasil23);\r\n //---------------------------------------------------------------------\r\n \r\n //---------------------------------------------------------------------\r\n System.out.println(\"---------------------------------------------------\"\r\n + \"------------------\");\r\n //---------------------------------------------------------------------\r\n \r\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.print(\"Unesi ime: \");\n\t\tScanner unos = new Scanner(System.in);\n\t\tString ime = unos.next();\n\t\t\n\t\t//prvi red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t System.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//drugi red crtica\n\t\tSystem.out.println(\": : : TABLICA MNOZENJA : : :\");\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tSystem.out.print(\" * |\");\n\t\tfor(int j=1;j<=9;j++){\n\t\t\tSystem.out.printf(\"%3d\",j);\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//treci red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tfor(int i=1;i<=9;i++){\n\t\t\tSystem.out.printf(\"%2d |\",i);\n\t\t\tfor(int j=1;j<=9;j++){\n\t\t\t\tSystem.out.printf(\"%3d\",i*j);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t//cetvrti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int k=0;k<8;k++){\n\t\t\tSystem.out.printf(\": \");\n\t\t}\n\t\tSystem.out.print(\":by \"+ime);\n\t\tSystem.out.println();\n\t\t\n\t\t//peti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\tunos.close();\n\t}" ]
[ "0.69222075", "0.68049943", "0.678763", "0.67319727", "0.6721295", "0.66934025", "0.65984124", "0.6442328", "0.64008164", "0.63495606", "0.63248897", "0.62675154", "0.625307", "0.6193184", "0.618457", "0.6182028", "0.6170189", "0.6166869", "0.61604434", "0.61595345", "0.61473763", "0.6147096", "0.6129829", "0.61184245", "0.61012775", "0.6085935", "0.60811746", "0.6060433", "0.6046926", "0.6026466", "0.6018296", "0.5989614", "0.594542", "0.59447026", "0.5932996", "0.5931412", "0.59065217", "0.5901438", "0.5899799", "0.5896485", "0.58803904", "0.5879335", "0.5875789", "0.58736247", "0.58445877", "0.58424634", "0.58398455", "0.5836645", "0.5831057", "0.5816224", "0.58147675", "0.5806874", "0.5803938", "0.58025444", "0.5792554", "0.57875884", "0.5778777", "0.57751596", "0.5775094", "0.5768515", "0.5765931", "0.5763162", "0.57586104", "0.57583016", "0.57518005", "0.5751364", "0.5749308", "0.57462156", "0.57460564", "0.5744473", "0.57413006", "0.5738555", "0.573663", "0.5734582", "0.5733298", "0.57322955", "0.5731087", "0.57308376", "0.5726227", "0.5725952", "0.5725911", "0.5722849", "0.5713292", "0.57122964", "0.57065135", "0.5696018", "0.5681021", "0.56799805", "0.5676853", "0.56705564", "0.5665591", "0.5657837", "0.5652076", "0.56446546", "0.5644405", "0.5644368", "0.5641461", "0.56403947", "0.5634383", "0.5633466", "0.56327546" ]
0.0
-1
Computer computer = new Computer(); computer.setCPU("AMD R9"); computer.setDisk("sanxing"); computer.setMemory(1024); System.out.println(computer.getDetail());
public static void main(String[] args) { PC pc = new PC(); pc.setCPU("AMD R9"); pc.setDisk("sanxing"); pc.setMemory(1024); pc.setBrand("macbook"); pc.printInfo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Computer getBasicComputer() {\n // Build and return a basic computer\n return new Computer.Builder(\"2GB\", \"2TB\", \"Intel i7\").setBluetoothEnabled(true).build();\n }", "public Computer(int itemNum, String name, double price, String brand, String cpu, int ram, int hard_drive, double screen)\r\n\t{\r\n\t\tsuper(itemNum, price, name);\r\n\t\tthis.brand = brand;\r\n\t\tthis.cpu = cpu;\r\n\t\tmemory = ram;\r\n\t\tdiskSpace = hard_drive; \r\n\t\tscreenSize = screen;\r\n\t}", "public static void main(String[] args) {\n Computer computerOne = new Computer(8, 2, \"AMD\");\n\n // instantiate a new laptop object\n Laptop laptopOne = new Laptop(16,\"intel\", true, 1, 1, \"James\");\n laptopOne.turnOn();\n laptopOne.moveCursor();\n laptopOne.loadProgram(5);\n laptopOne.setComputerName(\"Shiva\");\n System.out.println(laptopOne.getComputerName());\n\n laptopOne.logIn(\"MySecretPassword\");\n\n String source = \"Hello World\";\n\n for (String part : source.split(\" \")) {\n System.out.print(new StringBuilder(part).reverse().toString());\n System.out.print(\" \");\n }\n\n\n // general computer object\n //System.out.println(\"There is \" + computerOne.getMemoryAmount() + \"GB of memory.\"\n\n\n }", "public String toString() {\n\t\treturn(\"\\nComputer Info:\" +\n\t\t\t \"\\nBrand: \" + brand +\n\t\t\t \"\\nModel: \" + model +\n\t\t\t \"\\nSN: \" + SN +\n\t\t\t \"\\nPrice: \" + price);\n\t}", "public ComputerSpec getComputerSpec() {\n return computerSpec;\n }", "public Computer() {\n\t\tmPC = new BitString();\n\t\tmPC.setValue(0);\n\t\tmIR = new BitString();\n\t\tmIR.setValue(0);\n\t\tmCC = new BitString();\n\t\tmCC.setBits(new char[] { '0', '0', '0' });\n\t\tmRegisters = new BitString[MAX_REGISTERS];\n\t\tfor (int i = 0; i < MAX_REGISTERS; i++) {\n\t\t\tmRegisters[i] = new BitString();\n\t\t\tmRegisters[i].setValue(i);\n\t\t}\n\n\t\tmMemory = new BitString[MAX_MEMORY];\n\t\tfor (int i = 0; i < MAX_MEMORY; i++) {\n\t\t\tmMemory[i] = new BitString();\n\t\t\tmMemory[i].setValue(0);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tComputer c1 = new Computer();\r\n\t\tc1.setCname(\"dell\");\r\n\t\tc1.setCyear(2021);\r\n\t\tc1.setCcost(1800.99);\r\n\t\tSystem.out.println(\"Computer \"+ c1.getCname());\r\n\t\tSystem.out.println(\"Computer \"+ c1.getCyear());\r\n\t\tSystem.out.println(\"Computer \"+ c1.getCcost());\r\n\r\n\t\t\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tMobile samsung = new Mobile();\r\n\t\t\r\n\t\tsamsung.Rom = 16;\r\n\t\tsamsung.Ram = 4;\r\n\t\tsamsung.os=\"android\";\r\n\t\tsamsung.camera=15;\r\n\t\tsamsung.battery=5000;\r\n\t\tsamsung.processor=(float) 1.7;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"features:\");\r\n\t\tSystem.out.println(\"samsung specufications\");\r\n\t\tSystem.out.println(\"Ram:\"+samsung.Ram);\r\n\t\tSystem.out.println(\"Rom:\"+samsung.Rom);\r\n\t System.out.println(\"os\"+samsung.os);\r\n\t System.out.println(\"camera\"+samsung.camera);\r\n\t System.out.println(\"battery\"+samsung.battery);\r\n\t System.out.println(\"processor\"+samsung.processor);\r\n\t \r\n\r\nSystem.out.println(\"functions\");\r\nsamsung.calling();\r\nsamsung.gaming();\r\nsamsung.chatting();\r\n\r\n\r\nMobile apple=new Mobile();\r\napple.Ram=8;\r\napple.Rom=64;\r\napple.os=\"ios 13.0\";\r\napple.processor=18;\r\napple.battery=4000;\r\napple.camera=12;\r\nSystem.out.println(\"apple specificatios\");\r\nSystem.out.println(apple.Ram);\r\nSystem.out.println(apple.Rom);\r\nSystem.out.println(apple.os);\r\nSystem.out.println(apple.processor);\r\nSystem.out.println(apple.battery);\r\nSystem.out.println(apple.camera);\r\napple.calling();\r\napple.gaming();\r\napple.chatting();\r\n\r\n\t}", "public void getSystemInfo(){\n //get system info\n System.out.println(\"System Information\");\n System.out.println(\"------------------\");\n System.out.println(\"Available Processors: \"+Runtime.getRuntime().availableProcessors());\n System.out.println(\"Max Memory to JVM: \"+String.valueOf(Runtime.getRuntime().maxMemory()/1000000)+\" MB\");\n System.out.println(\"------------------\");\n System.out.println();\n }", "public Computer build() {\n return computer;\n }", "@Override\n\tpublic Computer getComputer() {\n\t\treturn com;\n\t}", "public static void main(String[] args) {\n\r\n\t\tMachine mac = new Machine();\r\n\t\t\r\n\t\tmac.start();\r\n\t\tmac.stop();\r\n\t\tSystem.out.println(\"----------------------\");\r\n\t\t\r\n\t\tCar bmw = new Car();\r\n\t\tbmw.start();\r\n\t\tbmw.stop();\r\n\t\tbmw.re_strat();\r\n\t\tSystem.out.println(\"-------------------\");\r\n\t\t\r\n\t\tMachine alto = new Car();\r\n\t\t\t\talto.start();\r\n\t\talto.stop();\r\n\t\tSystem.out.println(alto.engsize);\r\n\t\tSystem.out.println(\"---------------------------\");\t\r\n\t}", "public Cpu getCpu(){\n return maquina;\n }", "public String displayDetails()\n\t{\n\t\tString displayDetail = \"\";\n\t\t \n\t\tdisplayDetail = (\"Make of your System\\t\\t=>\\t\" + make + \n\t\t\t\t\t\t\"\\nModel of your System\\t\\t=>\\t\" + model + \n\t\t\t\t\t\t\"\\nSpeed of your System\\t\\t=>\\t\" + speed + \n\t\t\t\t\t\t\"\\nMemory of your System\\t\\t=>\\t\" + memorySize + \" MB \" +\n\t\t\t\t\t\t\"\\nHard Disk of your System\\t=>\\t\" + hardDiskSize + \" GB \" +\n\t\t\t\t\t\t\"\\nPurchase Cost of your System\\t=>\\t\" + purchaseCost);\n\t\t\n\t\treturn displayDetail;\n\t}", "public ComputerBuilder() {\n this.computer = new Computer();\n }", "public void printComputerSummary() {\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\tSystem.out.println(comp.getDescription());\n\t\t}\n\t}", "public static void main(String args[]) {\n\n CPU3 chinaCPU = new CPU3(9);\n CPU3.Manufacturer chinaCPUManufacturers = new CPU3.Manufacturer();\n\n System.out.println(\"Manufacturer Name : \" + chinaCPUManufacturers.getName());\n System.out.println(\"Type of Silicon : \"+chinaCPUManufacturers.getTypeOfSilicon());\n }", "public String GetComputerCard(int value){\n return handComputer.get(value);\n }", "public static void main(String[] args){\n\t\tVehicle example = new Vehicle(\"AB12 ABC\");\r\n\t\tSystem.out.println(\"Vehicle Registration: \" + example.getRegistration());\r\n example.setMake(\"Audi\");\r\n\t\tSystem.out.println(\"Make: \" + example.getMake());\r\n\t\t\t\t\r\n\t\texample.setEngineSize(1.6);\r\n\t\tSystem.out.println(\"Engine Size: \" + example.getEngineSize());\r\n\t\texample.setFuel(Vehicle.FuelType.DIESEL);\r\n\t\tSystem.out.println(\"Fuel: \" + example.getFuel());\r\n\t\texample.setRegistration(\"EF34 CDE\");\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(example);\r\n }", "public static void vehicleInfo() {\n\t\n\tSystem.out.println(\"numberOfVehicles: \"+numberOfVehicles);\n\tint count=getNumberOfVehicles();\n\tString make=\"Kia\";\n\tmake=make.toUpperCase();\n\tSystem.out.println(\"make\"+make);\n\t\n}", "public void printCompHand(){\n for(int i = 0; i < GetSizeOfComputerHand(); i++){\n System.out.println(handComputer.get(i));\n }\n }", "public Machine machine() {\n return machine;\n }", "public static void main(String[] args) {\n \tComputer myPC = new Computer();\r\n\r\n \t// Add a hard disk \r\n \tComponent hdd1 = new HardDisk(1000, 3, \"Seagate\", 790.50);\r\n \tmyPC.addComponent(\"hard disk 1\", hdd1);\r\n\r\n \t// Add a second hard disk\r\n \tComponent hdd2 = new HardDisk(1500, 2, \"Seagate\", 640.69);\r\n \tmyPC.addComponent(\"hard disk 2\", hdd2);\r\n }", "public void printAllComputers( ) { \n\t\tint i=1;\n\t\tfor (Computer temp : computers ) {\n\n\t\t\tSystem.out.println(\"Computer number : \"+i);\n\t\t\ttemp.printComputerSummary();\n\t\t\ti++;\n\n\t\t}\n\t}", "public Computer() {\n\t\tconfiguration = new HashMap<>();\n\t}", "org.hyperflex.roscomponentmodel.System getSystem();", "public static void main(String[] args) {\n Computer computer = new Computer();\n computer.description();\n for (int i = 0; i != computer.resource; i++) {\n computer.on();\n computer.off();\n }\n }", "public ComputerDataModel() {\n\n }", "public static String getCpuInfo() {\n String result = \"\";\n ProcessBuilder cmd;\n try {\n String[] args = {COMMAND_LINE, PATH_CPU};\n cmd = new ProcessBuilder(args);\n Process process = cmd.start();\n InputStream in = process.getInputStream();\n byte[] re = new byte[24];\n while (in.read(re) != -1) {\n result = result + new String(re);\n }\n in.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n result = \"N/A\";\n }\n return result.trim();\n }", "public MyComputer(String gpu, int numberOfFans, int gbOfRam) {\n this.gpu = gpu;\n this.numberOfFans = numberOfFans;\n this.gbOfRam = gbOfRam;\n }", "public static void main(String[] args) {\n Computer computer = new Computer.Builder()\n .withCase(\"Tower\")\n .withCPU(\"Intel i5\")\n .withMotherboard(\"MSI B360M-MORTAR\")\n .withGPU(\"nVidia Geforce GTX 750ti\")\n .withHDD(\"Toshiba 1TB\")\n .withOperatingSystem(\"Windows 10\")\n .withPowerSupply(500)\n .withAmountOfRam(8)\n .build();\n /* Not as clean as first example\n\n Computer computer = new Computer(\"Tower\", \"Intel i5\", \"MSI B360M-MORTAR\",\n \"nVidia GeForce GTX 750ti\", \"Toshiba 1TB\", \"Windows 10\", 500, 8);\n */\n }", "public BasicComputer(double clockRate, double memory, int storage, int power) {\r\n this.make = \"N/A\";\r\n this.model = \"N/A\";\r\n this.setClockRate(clockRate);\r\n this.setMemory(memory);\r\n this.setMemory(storage);\r\n this.setPower(power);\r\n }", "public void info()\n {\n System.out.println(toString());\n }", "public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }", "public static void main(String[] args) {\n\t\tnem cpu = new nem();\r\n\t\t//creaye an object of inner class Processor using outer class\r\n\t\tnem.Processor processor = cpu.new Processor();\r\n\t\t//create an object of inner class RAM using outer class Multiarray\r\n\t\t\r\n\t\tnem.RAM ram = cpu.new RAM();\r\n\t\tSystem.out.println(\"\" + processor.getCache());\r\n\t\tSystem.out.println(\"\" + ram.getClockSpeed());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n public String toString()\r\n {\r\n return(\"This cellphone's MAC number is : \" + getMacNumber() + \"\\nThe cellphone's screen size is: \" + getScreenSize() + \"\\nThe cellphone's model type is : \" + getModelType() + \"\\nThe cellphone's retail price is: \" + getPrice() + \"\\nThe cellphone's Product number is: \" + getNumber() + \"\\nThe products name/brand is: \" + getName());\r\n }", "public String toString() { return tech.getTechName(); }", "public Computer() {\n\t\tparts = new ComputerPart[] { new Mouse(), new Keyboard(), new Monitor() };\n\t}", "public static void main(String[] args) {\n Virus Ebola = new Virus();\n // set member variables on the instance of Virus stored in Herpes\n Ebola.Baltimore = \"V\";\n Ebola.Order = \"Mononegavirales\";\n Ebola.Family = \"Filoviridae\";\n Ebola.Genus = \"Ebolavirus\";\n Ebola.Tropism = \"Anything it can liquefy\";\n Ebola.HumanOnly = false;\n Ebola.Envelope = false;\n Ebola.GenomeSize = 19;\n \n // send our Car instance to a helper method to print its member variables\n displayVirusStats(Ebola);\n // test its methods\n Ebola.startReplication();\n Ebola.notReplicating();\n Ebola.getCurrentSpeed();\n \n}", "public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }", "public void displayAllInfo(){\nSystem.out.println(\"Dimensions of the room - length in feet : \" + room.getLengthInFeet() + \" width in feet :\" + room.getWidthInFeet());\nSystem.out.println(\"Price per square foot :\" + pricePerSquareFoot);\nSystem.out.println(\"Total Cost :\" + calculateTotalCost());\n}", "public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}", "public String diagnoseSystem()\n\t{\n\t\tString diagnoseSystem = \"\";\n\t\t \n\t\tcheckHDStatus();\n\t\tgoodMemorySize();\n\t\tdiagnoseSystem = (\"Hard Disk size\\t\\t\\t=>\\t\" + checkHDStatus + \n\t\t\t\t\t\t\"\\nMemory Size Ok\\t\\t\\t=>\\t\" + goodMemorySize);\n\t\t\n\t\treturn diagnoseSystem;\n\t}", "public void printTypeInfo(){\n\t\tSystem.out.println(\"This type of computer is suitable for massive usage, when it comes to portability.\");\n\t\tSystem.out.println(\"Main thing at these computers is portability and funcionality.\");\n\t\t\n\t}", "public Long getCpu() {\n return this.Cpu;\n }", "public void initPC() {\r\n\t\tthis.memoryTaken = 0;\r\n\t\tthis.cpuTaken = 0;\r\n\t\t\r\n\t\tObject[] args = getArguments();\r\n\r\n\t\tObject[] quirks = (Object[])args[1];\r\n\t\t\r\n\t\tthis.memory = (Integer)quirks[0];\r\n\t\tthis.cpu = (Integer)quirks[1];\r\n\t\tthis.pricePerMemoryUnit = (Double)quirks[2];\r\n\t\tthis.pricePerCpuUnit = (Double)quirks[3];\r\n\t\tthis.pricePerSecond = (Double)quirks[4];\r\n\t\tthis.discountPerWaitingSecond = (Double)quirks[5];\r\n\t\t\r\n\t\tSystem.out.println(this);\r\n\t}", "private CpuInfoProvider() {\r\n\t\t\r\n\t}", "public String toString() {\n return \"MAVLINK_MSG_ID_ONBOARD_COMPUTER_STATUS - sysid:\" + sysid + \" compid:\" + compid + \" time_usec:\" + time_usec + \" uptime:\" + uptime + \" ram_usage:\" + ram_usage + \" ram_total:\" + ram_total + \" storage_type:\" + storage_type + \" storage_usage:\" + storage_usage + \" storage_total:\" + storage_total + \" link_type:\" + link_type + \" link_tx_rate:\" + link_tx_rate + \" link_rx_rate:\" + link_rx_rate + \" link_tx_max:\" + link_tx_max + \" link_rx_max:\" + link_rx_max + \" fan_speed:\" + fan_speed + \" type:\" + type + \" cpu_cores:\" + cpu_cores + \" cpu_combined:\" + cpu_combined + \" gpu_cores:\" + gpu_cores + \" gpu_combined:\" + gpu_combined + \" temperature_board:\" + temperature_board + \" temperature_core:\" + temperature_core + \"\";\n }", "public void display(){\n System.out.println(\"\\n Car 2:\");\n System.out.println(toString());\n }", "public Computer(OS os) {\n this.os = os;\n isInfected = false;\n }", "@Override\n public String toString() {\n return String.format(\"ServerID=%d, UsedCPU=%d, LeftoverCPU=%f, UsedMemory=%d, \" +\n \"LeftoverMemory=%f\",\n pm.getID(),\n used_cpu, getLeftoverCPUPercentile(),\n used_mem, getLeftoverMemoryPercentile());\n }", "public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}", "public static void main(String[] args) {\n Dimensions dimensions = new Dimensions(20, 20, 5);\n\t Case theCase = new Case(\"220B\", \"Dell\", \"240\", dimensions);\n\n\t Monitor theMonitor = new Monitor(\"Chromebook\", \"Google\", 27, new Resolution(2540, 1440));\n\t Motherboard theMotherboard = new Motherboard(\"BJ-200\", \"Asus\", 4, 6, \"v2.44\");\n\n\t // created PC class by passing 3 objects into our PC constructor\n\t PC thePC = new PC(theCase, theMonitor, theMotherboard);\n\t // we can access methods and variable from our various objects by accessing the returned object in our getter\n\t\tthePC.powerUp();\n\n }", "public void hardwareResources() {\n\t\tSystem.out.println(\"I am the Hardware implemented through Multiple inheritence in Desktop class\");\r\n\r\n\t}", "public static void getCpuUsage(){\r\n CPUmeasurement currentCpuUsage = new CPUmeasurement();\r\n cpuUsageList.add(currentCpuUsage);\r\n //CPUmeasurement.printCpuUsage(currentCpuUsage);\r\n }", "public List<CPU> getCPU() {\n\t\tCPU cpu;\n\t\tList<CPU> listCPUInfoModel = new ArrayList<CPU>();\n\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tcpu = new CPU();\n\n\t\t\tcpu.setVendor(\"Intel\");\n\t\t\tcpu.setClock(i + 1);\n\t\t\tcpu.setTotalCores(i + 1);\n\t\t\tcpu.setModel(\"Intel 4004\");\n\n\t\t\tlistCPUInfoModel.add(cpu);\n\t\t}\n\n\t\treturn listCPUInfoModel;\n\t}", "@Override\n\tvoid putData() {\n\t\tSystem.out.println(\"Brand : \"+brand);\n\t\tSystem.out.println(\"Model : \"+model);\n\t\tSystem.out.println(\"Year of manufacture : \"+year_of_manufacture);\n\t\tSystem.out.println(\"CC : \"+cc);\n\t}", "public String toStringConsole() {\n\t\treturn \" SoilMoisture Sensor Read [ \" \n\t\t\t\t+ \"Temperature= \" + getTemperature() \n\t\t\t\t+ \"°C,\\t Lux= \" + getLux() \n\t\t\t\t+ \"%,\\t Moisture=\" + getMoisture() \n\t\t\t\t+ \"%,\\t Read Time= \" + readTime + \" ]\";\n\t}", "public String toString(){\n return \"MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION - sysid:\"+sysid+\" compid:\"+compid+\" time_boot_ms:\"+time_boot_ms+\" firmware_version:\"+firmware_version+\" tilt_max:\"+tilt_max+\" tilt_min:\"+tilt_min+\" tilt_rate_max:\"+tilt_rate_max+\" pan_max:\"+pan_max+\" pan_min:\"+pan_min+\" pan_rate_max:\"+pan_rate_max+\" cap_flags:\"+cap_flags+\" vendor_name:\"+vendor_name+\" model_name:\"+model_name+\"\";\n }", "public CPU getCPU() {\r\n\t\treturn cpu;\r\n\t}", "void printCarInfo();", "public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }", "@Test\n\tpublic void testGetComputerSystem_1()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\n\t\tCIMObject result = fixture.getComputerSystem(aArguments);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public String getSystemInfo() {\n listItems();\n return String.format(\"Owner: %s\\nNumber of maximum items: %d\\nNumber of current items: %d\\nCurrent items \" +\n \"stocked: %s\\nTotal money in machine: %.2f\\nUser money in machine: %.2f\\nStatus of machine: %s\", owner,\n maxItems, itemCount, Arrays.toString(itemList), totalMoney, userMoney, vmStatus.getStatus());\n }", "public String toString(){\n String temp = drv.getAbsolutePath() + \"\\n\";\n temp += freeSpace + \" / \" + totalSpace + \"\\n\";\n temp += getPercentRem() +\"%\\n\";\n temp += \"Drive Setup: \" + isSetup + \"\\n\";\n for(String i: drv.list()){\n temp += i + \"\\n\";\n }\n return temp;\n }", "public static void main(String[] args) {\n\t\tTelphone phone = new Telphone();\n\t\tTelphone phone2 =new Telphone(1.5f, 1.4f, 2.0f);\n\t\tSystem.out.println(phone2.screen);\n\t\tSystem.out.println(Telphone.price);\n\t}", "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}", "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 void helloVM()\n {\n \ttry {\n\n\t\t\t\n\t\t\tVirtualMachineConfigInfo vminfo = vm.getConfig();\n\t\t\tVirtualMachineCapability vmc = vm.getCapability();\n\t\t\tVirtualMachineRuntimeInfo vmri = vm.getRuntime();\n\t\t\tVirtualMachineSummary vmsum = vm.getSummary();\n\n\t\t\t\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"VM Information : \");\n\t\t\t\n\t\t\tSystem.out.println(\"VM Name: \" + vminfo.getName());\n\t\t\tSystem.out.println(\"VM OS: \" + vminfo.getGuestFullName());\n\t\t\tSystem.out.println(\"VM ID: \" + vminfo.getGuestId());\n\t\t\tSystem.out.println(\"VM Guest IP Address is \" +vm.getGuest().getIpAddress());\n\t\t\t\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"Resource Pool Informtion : \");\n\t\t\t\n\t\t\tSystem.out.println(\"Resource pool: \" +vm.getResourcePool());\n\t\t\t\n\t\t\tSystem.out.println(\"VM Parent: \" +vm.getParent());\n\t\t\t//System.out.println(\"VM Values: \" +vm.getValues());\n\t\t\tSystem.out.println(\"Multiple snapshot supported: \"\t+ vmc.isMultipleSnapshotsSupported());\n\t\t\tSystem.out.println(\"Powered Off snapshot supported: \"+vmc.isPoweredOffSnapshotsSupported());\n\t\t\tSystem.out.println(\"Connection State: \" + vmri.getConnectionState());\n\t\t\tSystem.out.println(\"Power State: \" + vmri.getPowerState());\n\t\t\t\n\n\t\t\t//CPU Statistics\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"CPU and Memory Statistics\" );\n\t\t\t\n\t\t\tSystem.out.println(\"CPU Usage: \" +vmsum.getQuickStats().getOverallCpuUsage());\n\t\t\tSystem.out.println(\"Max CPU Usage: \" + vmri.getMaxCpuUsage());\n\t\t\tSystem.out.println(\"Memory Usage: \"+vmsum.getQuickStats().getGuestMemoryUsage());\n\t\t\tSystem.out.println(\"Max Memory Usage: \" + vmri.getMaxMemoryUsage());\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\n\t\t} catch (InvalidProperty e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RuntimeFault e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "private static void JVMInfo() {\n System.out.println(\"Available processors (cores): \" +\n Runtime.getRuntime().availableProcessors());\n\n /* Total amount of free memory available to the JVM */\n System.out.println(\"Free memory (bytes): \" +\n Runtime.getRuntime().freeMemory());\n\n /* This will return Long.MAX_VALUE if there is no preset limit */\n long maxMemory = Runtime.getRuntime().maxMemory();\n /* Maximum amount of memory the JVM will attempt to use */\n System.out.println(\"Maximum memory (bytes): \" +\n (maxMemory == Long.MAX_VALUE ? \"no limit\" : maxMemory));\n\n /* Total memory currently in use by the JVM */\n System.out.println(\"Total memory (bytes): \" +\n Runtime.getRuntime().totalMemory());\n\n }", "Information getInfo();", "@Override\n\tpublic String getCPU() {\n\t\treturn null;\n\t}", "@Test(expected = org.apache.axis.AxisFault.class)\n\tpublic void testGetComputerSystem_4()\n\t\tthrows Exception {\n\t\tSAPHostControl_BindingStub fixture = new SAPHostControl_BindingStub(new URL(\"\"), new DeployWSServiceLocator());\n\t\tProperty[] aArguments = new Property[] {};\n\n\t\tCIMObject result = fixture.getComputerSystem(aArguments);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t}", "public String toString()\n\t{\n\t\tString output=\"Chip ID: \"+theChipId+\" Name: \"+theName+\" Pet Type: \"+ thePetType+\" Age: \"+theAge+\"\";\n\t\treturn output;\n\t}", "public void dump() {\n System.out.println(\"ID : \"+hostID);\n for (int i=0; i<hostAddresses.size(); i++) System.out.println(\" - addresse : \"+hostAddresses.elementAt(i).getNormalizedAddress());\n System.out.println(\"CPU : \"+cpuLoad);\n System.out.println(\"Memoire : \"+memoryLoad);\n System.out.println(\"Batterie : \"+batteryLevel);\n System.out.println(\"Threads : \"+numberOfThreads);\n System.out.println(\"CMs : \"+numberOfBCs);\n System.out.println(\"connecteurs : \"+numberOfConnectors);\n System.out.println(\"connecteurs entree reseau : \"+numberOfConnectorsNetworkInputs);\n System.out.println(\"connecteurs sortie reseau : \"+numberOfConnectorsNetworkOutputs);\n System.out.println(\"Traffic PF entree : \"+networkPFInputTraffic);\n System.out.println(\"Traffic PF sortie : \"+networkPFOutputTraffic);\n System.out.println(\"Traffic application entree : \"+networkApplicationInputTraffic);\n System.out.println(\"Traffic application sortie : \"+networkApplicationOutputTraffic);\n }", "UsageInfo(PhysicalMachine pm) {\n this.pm = pm;\n }", "PhysicalMachine getPhysicalMachine() {\n return pm;\n }", "public String toString(){\n return getName() + getDetails() + getPhone();\n }", "public static void main(String[] args) {\n\r\n House myHouse = new House(new Room(\"myBedroom\", 4, 2, false), 43);\r\n myHouse.wallsDetails();\r\n\r\n }", "public DeviceInfo() {}", "public PC getPC() {return _pc;}", "public String toString() {\n String str = \"Manufacturer: \" + manufacturer + \"\\n\";\n str += \"Serial Number: \" + serialNumber + \"\\n\";\n str += \"Date: \" + manufacturedOn + \"\\n\";\n str += \"Name: \" + name;\n return str;\n }", "public static void main(String[] args) {\n\n Car Lorry=new Car();\n Car SportCar=new Car();\n\n printInfo();\n\n }", "public static void main(String[] args) {\n\n Car car2=new Car(\"bmw\" ,2020,250876,\"yellow\");\n\n System.out.println(car2.brand);\n System.out.println(car2.year);\n System.out.println(car2.price);\n System.out.println(car2.color);\n\n Car car3=new Car(\"toyoto\",2010,35876,\"black\");\n System.out.println(car3);//tostring\n\n Library.stars();\n car3.getCarBrandYear();\n Library.stars();\n car2.getCarBrandYear();\n\n Car car4=new Car(\"audi\",2010);\n System.out.println(car4);\n\n }", "public static void main(String[] args) {\nCar car = new Car (\"Ford\", 25000, 2003);\nSystem.out.println(car.carBrand + \"\\t\" + car.price + \"\\t\" + car.year);\n\nCar car1 = new Car (\"Nissan\", 50000, 2013);\t\nSystem.out.println(car1.carBrand + \"\\t\" + car1.price + \"\\t\" + car1.year);\n\t}", "public void print() {\n\t\tSystem.out.println(\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName+\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)+\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress);\r\n\t}", "public static void main(String[] args) {\n\tString car =\"Maruti\";\r\n\tString model =\t \"Suzuki\";\r\n\t\r\n\r\n\t// primitve Datatype\r\n\tchar color ='W';\r\n\tint price =40000;\r\n\tbyte memory =120;\r\n\tfloat carsize = 20.5f;\r\n\tboolean isAutomatic =true;\r\n\tlong registerednumber =834393934934L;\r\n\t\r\n\tSystem.out.println(\"Brandname is \" + car);\r\n\tSystem.out.println(\"CarPrice is \" + price );\r\n\tSystem.out.println(\"Carmemory is \" + memory );\r\n\tSystem.out.println(\"Carsize is \" +carsize );\r\n\tSystem.out.println(\"Carregistered number is \" + price +memory +carsize +registerednumber);\r\n\tSystem.out.println(\"Cargeratype is Automatic \" + true);\r\n\r\n}", "public void display(){\r\n System.out.println(\"_____________________valuues of__[th]__constuctor_________________________\");\r\n System.out.println(\"No_of_people = \"+NO_OF_PEOPLE);\r\n System.out.println(\"EVENT_NUBMBER = \"+EVENT_NUMBER);}", "public String toString()\r\n/* 367: */ {\r\n/* 368:620 */ return \r\n/* 369: */ \r\n/* 370: */ \r\n/* 371: */ \r\n/* 372: */ \r\n/* 373: */ \r\n/* 374:626 */ 165 + \"Monitor \" + this.name + \" Current Speed Read: \" + (this.lastReadThroughput >> 10) + \" KB/s, \" + \"Asked Write: \" + (this.lastWriteThroughput >> 10) + \" KB/s, \" + \"Real Write: \" + (this.realWriteThroughput >> 10) + \" KB/s, \" + \"Current Read: \" + (this.currentReadBytes.get() >> 10) + \" KB, \" + \"Current asked Write: \" + (this.currentWrittenBytes.get() >> 10) + \" KB, \" + \"Current real Write: \" + (this.realWrittenBytes.get() >> 10) + \" KB\";\r\n/* 375: */ }", "public String toString()\n\t{\n\t\treturn getArea() + \".\" + getLine() + \".\" + getDevice();\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tCar1 car = new Car1();//객체생성\r\n\t\t//객체를 생성하면 생성자가 호출되고 필드 초기화와 메소드 호출 등\r\n\t\t//객체를 사용할 준비를 한다.\r\n\t\tSystem.out.println(\"company : \" + car.company);\r\n\t\tSystem.out.println(\"model : \" + car.model);\r\n\t\tSystem.out.println(\"color : \" + car.color);\r\n\t\tSystem.out.println(\"speed : \" + car.speed);\r\n\t\t\r\n\r\n\t}", "public AbstractCar(String car){\n\t\n\tSystem.out.println(\"\\n\\n The following are the details for : \" + car);\n}", "private static String getCpuInfo(String target) throws IOException, InterruptedException {\n if (cpuInfo == null) {\r\n cpuInfo = new HashMap<String, String>();\r\n // Next modified jplaberge\r\n String result[] = pi4jSystemInfoConnector.getCpuInfo() ;\r\n if(result != null){\r\n for(String line : result) {\r\n String parts[] = line.split(\":\", 2);\r\n if (parts.length >= 2 && !parts[0].trim().isEmpty() && !parts[1].trim().isEmpty()) {\r\n cpuInfo.put(parts[0].trim().toLowerCase(), parts[1].trim());\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (cpuInfo.containsKey(target.toLowerCase())) {\r\n return cpuInfo.get(target.toLowerCase());\r\n }\r\n\r\n throw new RuntimeException(\"Invalid target: \" + target);\r\n }", "public static void main(String[] args) {\n car car = new car(8,\"Base Car\");\n System.out.println(car.startEngine());\n System.out.println(car.accelerate());\n System.out.println(car.brake());\n\n //output for the lamborghini car\n lambo gall = new lambo(8,\"Gallardo\");\n System.out.println(gall.startEngine());\n System.out.println(gall.accelerate());\n System.out.println(gall.brake());\n\n //output for the ferrari car\n ferrari ferr = new ferrari(6,\"F30\");\n System.out.println(ferr.startEngine());\n System.out.println(ferr.accelerate());\n System.out.println(ferr.brake());\n\n }", "public String getRemoteComputerString(){\n return this.remoteComputerString;\n }", "public String toString() {\n\t\treturn \"This Airplane is manufactured by \" + this.brand +\". It costs \" + this.price + \"$ and its horse power is \" + this.horsePower + \".\";\n\t}", "public static void main(String[] args) {\n\t Product a = new Product(123, \"Shiseido Face Cream\", 85.00 , 2);\r\n\t Product b = new Product(111, \"Chanel Perfume\", 65.00, 5);\r\n\t \r\n\t System.out.println(a.toString());\r\n\t System.out.println(b.toString());\r\n\t \r\n}", "public Demo()\n {\n machine = new Machine();\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tMyMobile samsung = new MyMobile();\r\n\t\t\r\n\t\r\n\t\tfloat ampSamsung = samsung.amps;\r\n\t\tString brandNameSam = samsung.brandName;\r\n\t\tint costSam = samsung.cost;\r\n\t\t\r\n\t\tSystem.out.println(\" Amps of samsung: \" + ampSamsung);\r\n\t\t\r\n\t\tSystem.out.println(\"Brand Name:\" + samsung.brandName);\r\n\t\tSystem.out.println(\" cost :\" + costSam);\r\n\t\t\r\n\t\tsamsung.makeCalls();\r\n\t\tsamsung.payMoney();\r\n\t\t\r\n\t\tint costSamsung = samsung.getCost();\r\n\t\tSystem.out.println(\" costSamsung from the method\" + costSamsung);\r\n\t\t\r\n\t\tString sms = samsung.getSMS();\r\n\t\tSystem.out.println(\"sms :\" + sms);\r\n\t\t\r\n\t\tsamsung.printSMS(sms);\r\n\t\t\r\n\t\tMyMobile apple = new MyMobile();\r\n\t\tapple.amps=2.5f;\r\n\t\tSystem.out.println(\" Amps of apple: \" + apple.amps);\r\n\t\t\r\n\t//\tMyMobile apple = new MyMobile();\r\n\t\t\r\n\r\n\t}", "private static void showSpr(MicroBlazeProcessor mb) {\r\n SpecialPurposeRegisters spr = mb.getSpecialRegisters();\r\n //System.out.println(\"Special Register Values:\");\r\n console.print(\"Special Register Values:\");\r\n for (SpecialRegister reg : SpecialRegister.values()) {\r\n int value = spr.read(reg);\r\n String stringValue;\r\n switch(reg) {\r\n case rmsr:\r\n stringValue = Integer.toBinaryString(value);\r\n stringValue = BitOperations.padBinaryString(stringValue, 32);\r\n //System.out.println(reg.name() + \":\" + stringValue);\r\n console.print(reg.name() + \":\" + stringValue);\r\n break;\r\n case resr:\r\n stringValue = Integer.toBinaryString(value);\r\n stringValue = BitOperations.padBinaryString(stringValue, 32);\r\n //System.out.println(reg.name() + \":\" + stringValue);\r\n console.print(reg.name() + \":\" + stringValue);\r\n break;\r\n case rpc:\r\n stringValue = Integer.toHexString(value);\r\n stringValue = BitOperations.padHexString(stringValue, 8);\r\n //System.out.println(reg.name() + \":\" + stringValue);\r\n console.print(reg.name() + \":\" + stringValue);\r\n break;\r\n default:\r\n //System.out.println(reg.name() + \":\" + value);\r\n console.print(reg.name() + \":\" + value);\r\n break;\r\n\r\n }\r\n \r\n }\r\n }" ]
[ "0.68060035", "0.673271", "0.66980994", "0.66603804", "0.6475029", "0.6404259", "0.6374046", "0.6275492", "0.6252197", "0.62026834", "0.61227095", "0.60567725", "0.6051011", "0.5998749", "0.5993989", "0.5987308", "0.5983756", "0.5964659", "0.5959174", "0.5932901", "0.59218323", "0.59145623", "0.5897888", "0.5893128", "0.58919704", "0.58909833", "0.58713144", "0.58631736", "0.5859898", "0.5858088", "0.5824693", "0.5820878", "0.58114463", "0.58110934", "0.57926863", "0.577978", "0.5763089", "0.5760942", "0.57523876", "0.5752076", "0.57492596", "0.5703948", "0.5699419", "0.569322", "0.5690949", "0.56902176", "0.5683385", "0.5668663", "0.5652657", "0.5645337", "0.5638725", "0.563738", "0.5631817", "0.5628728", "0.5619673", "0.5618744", "0.5618383", "0.56122994", "0.5610972", "0.56086296", "0.5605275", "0.56000274", "0.5598679", "0.5594159", "0.558733", "0.55784285", "0.5573589", "0.55679023", "0.5561887", "0.5559607", "0.55480206", "0.55449843", "0.5541582", "0.5539547", "0.5536167", "0.55354524", "0.55277324", "0.55219984", "0.55180734", "0.551538", "0.55137146", "0.5512567", "0.5511481", "0.55093443", "0.5500189", "0.5495896", "0.5490766", "0.54828227", "0.5473158", "0.5469033", "0.5459475", "0.5458782", "0.5455248", "0.5453309", "0.5452457", "0.5451523", "0.54496175", "0.54420316", "0.54325354", "0.5431879" ]
0.67593855
1
Se encarga de obtener un recurso por su id
public G obtener(Long id) throws AppException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode findTreeNodeById(int id) {\n if (this.selfId == id) {\n return this;\n }\n if (childList.isEmpty()) {//check\n return null;\n } else {\n for (TreeNode child : childList) {\n TreeNode resultNode = child.findTreeNodeById(id);\n if (resultNode != null) {\n return resultNode;\n }\n }\n return null;\n }\n }", "private int find(int[] roots , int id){\n\n if (roots[id] == id) return id;\n roots[id] = find(roots, roots[id]);\n return roots[id];\n }", "protected int find(int id) \n\t{\n\t //Check the current pair is the root of the tree\n if (parents[id] == id)\n {\n //Return the id of the current pair as if it is its own parent\n return id;\n }\n \n //Set the parent of the current pair to the parent of its parent\n int res = find(parents[id]);\n parents[id] = res;\n \n //Return the root of the tree\n\t\treturn res;\n\t}", "private Node searchNode(int id) {\n\t\tNode node = searchRec(root,id);\n\t\treturn node;\n\t}", "private Node searchRec(Node node, int id) {\n\t\tNode found = null;\n\t\tif(node == null || node.getId() == id){\n\t\t\treturn node;\n\t\t}\n\t\telse if(node.getId() > id){\n\t\t\tfound = searchRec(node.getLeft(), id);\n\t\t}\n\t\telse if(node.getId() < id){\n\t\t\tfound = searchRec(node.getRight(), id);\n\t\t}\n\t\treturn found;\n\t}", "public Pagos getPago(String id){\n if(pagoMongoRepository.findById(id).get()!=null){\n return pagoMongoRepository.findById(id).get();\n }else{\n return null;\n }\n }", "public RecursosVO getDatosRecurso(int idEquipo) {\n\n\t\tRecursosVO recurso = null;\n\n\t\tString query = \"SELECT ID, TITULO, LATITUD, LONGITUD FROM RECURSO WHERE ID = \"\n\t\t\t\t+ idEquipo;\n\n\t\tStatement st = null;\n\t\tResultSet rs = null;\n\n\t\ttry {\n\n\t\t\tthis.abrirConexion();\n\n\t\t\tst = connection.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\t// rs = connection.createStatement().executeQuery(query);\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(1);\n\t\t\t\tString titulo = rs.getString(2);\n\t\t\t\tfloat latitud = rs.getFloat(3);\n\t\t\t\tfloat longitud = rs.getFloat(4);\n\n\t\t\t\t// RecursosVO recurso = new RecursosVO(id, titulo, latitud,\n\t\t\t\t// longitud);\n\t\t\t\t// recursos.add(recurso);\n\t\t\t\trecurso = new RecursosVO(id, latitud, longitud, null, null,\n\t\t\t\t\t\tnull, null, null, null, null, null, null, null, null,\n\t\t\t\t\t\tnull, null, null);\n\t\t\t}\n\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.log(Level.SEVERE,\n\t\t\t\t\t\"ClassNotFoundException : \" + e.getMessage());\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlogger.log(Level.SEVERE, \"SQLException : \" + e.getMessage());\n\t\t} finally {\n\t\t\tif (rs != null) {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (st != null) {\n\t\t\t\ttry {\n\t\t\t\t\tst.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.cerrarConexion();\n\n\t\treturn recurso;\n\n\t}", "@Override\r\n public Folder getFolderById(long id) {\n Optional <Folder> optional = folderRepository.findById(id);\r\n Folder folder = null;\r\n \r\n if(optional.isPresent()){\r\n folder = optional.get(); \r\n }else{\r\n throw new RuntimeException(\"Folder not found\");\r\n }\r\n \r\n \r\n return folder;\r\n \r\n }", "@RequestMapping(method=RequestMethod.GET,value=\"/parent/{id}\")\r\n\t@JsonView(Views.Private.class)\r\n\tpublic ResponseEntity<?> getParentById_parent(@PathVariable String id){\r\n\t\treturn parentDao.getParentById(id);\r\n\t}", "Comment recursiveFind(ArrayList<Comment> myList, String parentID) {\n\t\t\t\n\t\tfor (Comment c : myList) {\n\t\t\t\n\t\t\tif (c.getId().toString().equals(parentID)) {\n\t\t\t//\tSystem.out.println(\"NASAO SAMMMM U 1 !!!!\");\n\t\t//\t\tSystem.out.println(comment.getId());\n\t\t\t//\tSystem.out.println(comment.getLikes());\n\t\t\t\t//System.out.println(comment.getText());\n\t\t\t\trecCom=c;\n\t\t\t\tif(recCom!=null)\n\t\t\t//\t\tSystem.out.println(recCom.getText());\n\t\t\t\t\n\t\t\t\treturn c;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\tfor (Comment comment : c.getComments()) {\n\t\t\t\t//\tSystem.out.println(\"Poredi sa :\" +comment.getId());\n\t\t\t\t//\tSystem.out.println(\"tekst je :\" +comment.getText());\n\t\t\t\t//\tSystem.out.println(comment.getComments().size());\n\t\t\t\t\tif (comment.getId().toString().equals(parentID)) {\n\t\t\t\t//\t\tSystem.out.println(\"NASAO SAMMMM U 2 !!!!\");\n\t\t\t\t\t//\tSystem.out.println(comment.getId());\n\t\t\t\t\t//\tSystem.out.println(comment.getLikes());\n\t\t\t\t\t//\tSystem.out.println(comment.getText());\n\t\t\t\t\t\trecCom=comment;\n\t\t\t\t\t\treturn comment;\n\t\t\t\t\t}\n\t\t\t\t\tif (comment.getComments().size() > 0){ \n\t\t\t\t\t//\tSystem.out.println(comment.getText());\n\t\t\t\t\t//\tSystem.out.println(comment.getComments().get(0).getText());\n\t\t\t\t\t\trecursiveFind(comment.getComments(), parentID);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "String getChildId();", "public Node getTB(String id,Node parent){\n try{\n HashMap hash= (HashMap)client.execute(\"getResource\", new Object[]{id});\n String path = hash.get(\"path\").toString();\n String name = path.split(\"/\")[path.split(\"/\").length-1];\n byte type = 1;\n if(path.indexOf(\"/\")==-1){\n type = 0;\n }\n Node node = new Node(id,path,name,parent,null,type);\n Object[] children = (Object[])hash.get(\"children\");\n for(Object o:children){\n node.addChild(o.toString(), null);\n }\n HashMap meta = (HashMap)hash.get(\"meta\");\n if(meta!=null&&meta.size()!=0){\n Set keys = meta.keySet();\n Iterator iter = keys.iterator();\n while(iter.hasNext()){\n String n = iter.next().toString();\n if(n.equals(\"_epnames_\"+RunnerRepository.user)){\n node.setEPs(meta.get(n).toString());\n continue;\n }\n node.addProperty(n, meta.get(n).toString());\n }\n }\n return node;\n }catch(Exception e){\n System.out.println(\"requested id: \"+id);\n try{System.out.println(\"server respons: \"+client.execute(\"getResource\", new Object[]{id}));}\n catch(Exception ex){ex.printStackTrace();}\n e.printStackTrace();\n return null;\n }\n }", "private Node findNode(Graph g, int id){\r\n for(Node n : g.getListNodes()){\r\n if (n.getId() == id){\r\n return n;\r\n }\r\n }\r\n return null;\r\n }", "public ResponseEntity<GrupoDS> recuperarGrupoPorId(@ApiParam(value = \"ID do grupo.\",required=true) @PathVariable(\"id\") Long id) {\n Optional<GrupoModel> optional = grupoRepository.findById(id);\n if (optional != null) {\n \treturn new ResponseEntity<GrupoDS>(new GrupoDS(optional.get()), HttpStatus.OK);\n }\n return new ResponseEntity<GrupoDS>(HttpStatus.NOT_FOUND);\n }", "List<HNode> getChildren(Long id);", "public Node returnNodeById(Id id){\n\t\tif(id.indice >= listOfNodes.size()) return null;\n\t\tNode n = listOfNodes.elementAt(id.indice);\n\t\tif(n == null) return null;\n\t\tId nid = n.getId();\n\t\tif(nid.indice != id.indice || nid.unique != id.unique) return null; \n\t\treturn n;\n\t}", "@Override\r\n\tpublic Excursion getExcuById(int id) {\n\t\tSession s = sf.getCurrentSession();\r\n\r\n\t\treturn (Excursion) s.get(Excursion.class, id);\r\n\t}", "@Override\n\tpublic void llenarPorId(Object id) {\n\t\t\n\t}", "public Node<T> search(int id) {\n Node<T> res = root;\n res = search(res, id);\n if (res.getId() == id) return res;\n else return null;\n }", "public Chore findChoreId(int id){\n //Checking All chore Lists\n\n //Unassigned List\n Iterator<Chore> choreIterator = unassignedChores.iterator();\n while (choreIterator.hasNext()){\n Chore chore = choreIterator.next();\n if(chore.getChoreId() == id){\n return chore;\n }\n\n }\n\n\n //FINISHED Chores\n choreIterator = finishedChores.iterator();\n while (choreIterator.hasNext()){\n Chore chore = choreIterator.next();\n if(chore.getChoreId() == id){\n return chore;\n }\n\n }\n\n //Checking all users\n for (int i = 0; i < regUsers.size(); i++){\n regUsers.get(i).getChoreFromId(id);\n }\n\n for (int i = 0; i < adminUsers.size(); i++){\n adminUsers.get(i).getChoreFromId(id);\n }\n return null;\n }", "public Node findSuccessor(int id);", "public Path getPath(Integer id) throws ResourceNotFoundException;", "private CommunicationLink getNodeById(Integer id)\n {\n if (allNodes.size() == 0)\n {\n return null;\n }\n try\n {\n return allNodes.get(id);\n } catch (Exception e)\n {\n return null;\n }\n }", "protected Lotofacil buscarLotofacilId(long id) {\r\n\t\treturn LotofacilListagemResultados.repositorio.buscarLotofacilId(id);\r\n\t}", "public Node find(int id) {\n return tree.find(id);\n }", "static Map<Utilisateur,Utilisateur.RELATION> getRelations(int id) {\n Map<Utilisateur, Utilisateur.RELATION> rels = new HashMap<>();\n Cursor c = selectRelations(id);\n\n try {\n while (c.moveToNext())\n {\n if (c.getInt(0) == 2)\n rels.put(get(c.getString(1)), Utilisateur.RELATION.fromInt(c.getInt(0)));\n else\n rels.put(get(c.getString(2)), Utilisateur.RELATION.fromInt(c.getInt(0)));\n }\n }\n finally {\n c.close();\n }\n return rels;\n }", "public Proyecto proyectoPorId(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto proyecto =plantilla.getForObject(\"http://localhost:5000/proyectos/\" + id, Proyecto.class);\n\t\t\treturn proyecto;\n\t\t}", "Subdivision findById(Long id);", "String getRootId();", "String getRootId();", "@Override\r\n public Concursando consultarConcursandoPorId(long id) throws Exception {\n return rnConcursando.consultarPorId(id);\r\n }", "private String getParentId(String id) {\r\n\r\n String[] data = id.split(\"\\\\.\");\r\n String idParent = null;\r\n\r\n for (int i = data.length - 2; i >= 0; i--) {\r\n if (idParent == null) {\r\n idParent = data[i];\r\n } else {\r\n idParent = data[i] + \".\" + idParent;\r\n }\r\n }\r\n return idParent;\r\n }", "public Atracao obterAtracao(Integer id){\n\t\t\n\t\t\n\t\tIterador itrAtracao = listAtracao.iterador();\n\t\tAtracao aux;\n\t\t\n\t\twhile(itrAtracao.temProximo()){\n\t\t\taux = (Atracao) itrAtracao.obterProximo();\n\t\t\tif(aux.getiD() == id){\n\t\t\t\treturn aux;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t\t\n\t}", "public ArrayList<Personne> findChilds(int id) {\n\t\tArrayList<Personne> pe = new ArrayList<Personne>();\n\t\ttry {\n\t\t\tString req = \"SELECT id,nom, prenom, evaluation FROM PERSONNE_1 WHERE ID=?\";\n\t\t\tPreparedStatement ps= connect.prepareStatement(req);\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tPersonne p;\n\t\t\tp =new Personne (id, rs.getString(1),rs.getString(2));\n\t\t\tpe.add(p);\n\t\t}catch (SQLException e) {e.printStackTrace();}\n\t\t\t\n\treturn pe;\n\t}", "public T getWithChildById(Object id, String... fetchRelations){\n\t\treturn MongoClientSigleton.getDatastore().get(getEntityClazz(), id);\n\t}", "private int findChildOrIndex(BTreeNode<T> currentNode, I id) {\n int indexChild = 0;\n while (currentNode.getKey(indexChild) != null && comparator.compare(currentNode.getKey(indexChild), id) < 0) {\n indexChild++;\n }\n\n return indexChild;\n }", "private Node<T> LongestPathRec(Node<T> nodo, int prof, Node<T> ret) {\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tprof++;// Aumenta la profundidad\r\n\t\t\tif (prof == this.getMaxDepth()) {// Si es el mas profundo\r\n\t\t\t\tret = nodo.getChildren().get(1);// Asigna ret como el mas\r\n\t\t\t\t\t\t\t\t\t\t\t\t// profundo\r\n\t\t\t\treturn ret;// Retorna\r\n\t\t\t}\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\tret = LongestPathRec(hijos.get(i), prof, ret);// Recursividad\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// del metodo\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private int root(int i) {\n while(id[i]!=i){\n i = id[i];\n }\n return i;\n }", "public Grupo load(int id) {\n\t\tConnection conn = new ConnectionFactory().getConnection();\r\n\r\n\t\tString sqlComand = \"SELECT * FROM atividade WHERE id=?\";\r\n\r\n\t\tGrupo grupo = null;\r\n\r\n\t\ttry (PreparedStatement stm = conn.prepareStatement(sqlComand)) {\r\n\t\t\tstm.setInt(1, id);\r\n\r\n\t\t\tResultSet rs = stm.executeQuery();\r\n\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tgrupo = new Grupo();\r\n\t\t\t\tProfessorDAO professorDAO = new ProfessorDAO();\r\n\r\n\t\t\t\tgrupo.setId((rs.getInt(\"id\")));\r\n\t\t\t\tgrupo.setNumero((rs.getInt(\"numero\")));\r\n\t\t\t\tgrupo.setNome((rs.getString(\"nome\")));\r\n\t\t\t\tgrupo.setProfessor((professorDAO.load(rs.getInt(\"orientador_id\"))));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn grupo;\r\n\t}", "public Node getNode(Node root, int id){\n\t\tif(root==nil){\n\t\t\treturn nil;\n\t\t}\n\t\t\n\t\tif(root.id == id){\n\t\t\treturn root;\n\t\t}\n\t\tif(id < root.id){\n\t\t\troot = getNode(root.left,id);\n\t\t}else{\n\t\t\troot = getNode(root.right,id);\n\t\t}\n\t\t\n\t\treturn root;\n\t}", "public List<TurmaDocente> listTurmas(Long id){ \n \n Session session = getSessionFactory().openSession();\n Criteria criteria = session.createCriteria(TurmaDocente.class);\n criteria.add(Restrictions.eq(\"idDocente\", id));\n //criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);\n\n List results = criteria.list();\n session.close();\n\n return results; \n }", "public static LinkedList<Recensione> getRecensioni(int id) throws SQLException {\n\t\t\tString query = \"SELECT * \"\n\t\t\t\t\t+ \"FROM recensione \"\n\t\t\t\t\t+ \"WHERE approvata = 1 AND id_gioco='\"+id+\"';\";\n\t\t\t\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\tLinkedList<Recensione> mList = new LinkedList<Recensione>();\n\t\t\t// Stampiamone i risultati riga per riga\n\t\t\twhile (res.next()) {\n\t\t\t\t// (id, testo, approvata).\n\t\t\t\tRecensione r = new Recensione(res.getInt(\"id\"), res.getString(\"testo\"), res.getBoolean(\"approvata\"));\n\t\t\t\tmList.add(r);\n\t\t\t}\n\t\t\tcloseConnectionToDB(con);\n\t\t\treturn mList;\n\t\t}", "DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;", "@GET\n @Path(\"/conciliacion/{id}\")\n @Produces({MediaType.APPLICATION_JSON})\n public List<EscenarioDTO> getByConciliacion(@PathParam(\"id\") int id) {\n logger.log(Level.INFO, \"id:{0}\", id);\n List<EscenarioDTO> lstDTO;\n List<Escenario> lst;\n lst = managerDAO.findByConciliacion(id);\n lstDTO = lst.stream().map(item -> item.toDTO()).distinct().sorted(comparing(EscenarioDTO::getId)).collect(toList());\n List<EscenarioDTO> lstFinal = (List<EscenarioDTO>) (List<?>) lstDTO;\n return lstFinal;\n }", "public Curso find(Long id) {\n\t\tfor (Curso curso : cursos) {\n\t\t\tif(curso.getId() == id) {\n\t\t\t\treturn curso;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Folder get(long id) {\n return super.get(Folder.class, id);\n }", "public Funcionario buscaPorId(Integer id) throws Exception {\n\t\topenDatabase();\n\t\tSQL = \"SELECT tb_funcionario.idfuncionario, tb_funcionario.nome, tb_funcionario.email, tb_funcionario.tel, tb_dependente.iddependente, tb_dependente.nome, tb_dependente.parentesco \" + \n\t\t\t\t\"FROM tb_funcionario \" + \n\t\t\t\t\"INNER JOIN tb_dependente ON tb_funcionario.idfuncionario = tb_dependente.funcionario_id \" +\n\t\t\t\t\"WHERE tb_funcionario.idfuncionario = ?\";\n\t\tps = con.prepareStatement(SQL);\n\t\tps.setInt(1, id);\n\t\trs = ps.executeQuery();\n\t\t\n\t\tFuncionario funcionario = new Funcionario();\n\t\tList<Dependente> listaDependentes = new ArrayList<Dependente>();\n\t\tfuncionario.setDependentes(new ArrayList<Dependente>());\n\t\t\n\t\twhile (rs.next()) {\n\t\t\tfuncionario.setId(rs.getInt(\"tb_funcionario.idfuncionario\"));\n\t\t\tfuncionario.setNome(rs.getString(\"tb_funcionario.nome\"));\n\t\t\tfuncionario.setEmail(rs.getString(\"tb_funcionario.email\"));\n\t\t\tfuncionario.setTelefone(rs.getString(\"tb_funcionario.tel\"));\n\n\t\t\t\tDependente dependente = new Dependente();\n\t\t\t\tdependente.setId(rs.getInt(\"tb_dependente.iddependente\"));\n\t\t\t\tdependente.setNome(rs.getString(\"tb_dependente.nome\"));\n\t\t\t\tdependente.setParentesco(rs.getString(\"tb_dependente.parentesco\"));\n\n\t\t\tlistaDependentes.add(dependente);\n\n\t\t}\n\n\t\tfuncionario.setDependentes(listaDependentes);\n\t\t\n\t\tcloseDatabase();\n\t\treturn funcionario;\n\t}", "public void getCheque(Integer id) {\n\t\t\r\n\t}", "public Optional<Hierarchy> findOne(String id) {\n log.debug(\"Request to get Hierarchy : {}\", id);\n return hierarchyRepository.findById(id);\n }", "public boolean find(int id){\n Node temp=root;\n while(temp!= null){\n if(id==temp.data){\n return true;\n }\n else if (temp.data>id){\n temp=temp.left;\n }\n else {\n temp=temp.right;\n }\n \n }\n return false;\n }", "@Override\n\tpublic ImagenOArchivo findImagenOarchivoByIdDatoProyecto(int idProyecto) {\n\t\tString queryString1 = \"from ImagenOArchivo where datoProyecto.datoProyectoID= ? \";\n\t\tObject[] params1 = new Object[1];\n\t\tparams1[0] = idProyecto;\n\t\t\n\t\tList<ImagenOArchivo> list=super.find(queryString1,params1);\n\t\tif (list!=null && list.size()!=0) {\n\t\t\treturn list.get(0);\n\t\t}\n\t\treturn null;\n\t}", "Set<KidDTO> findByParentId(@Param(\"parentId\") long parentId);", "public Conge find( Integer idConge ) ;", "private Node searchID(Node root, int ID) {\n\t\tif(root == null || root.isNull) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tif(root.ID > ID) {\n\t\t\t\treturn searchID(root.left, ID);\n\t\t\t} else if(root.ID < ID)\n\t\t\t\treturn searchID(root.right, ID);\n\t\t\telse\n\t\t\t\treturn root;\n\t\t}\n\t}", "@Override\r\n\tpublic void find(Integer id) {\n\r\n\t}", "DireccionDTO consultarDireccion(long idDireccion);", "public ResultSet leesParentIdLijst() {\n String sql = \"select distinct f2.id parent_id\\n\" +\n \" from bookmarkfolders f1\\n\" +\n \" join bookmarkfolders f2 on f1.parent_id = f2.id\\n\" +\n \" order by f2.id;\";\n ResultSet rst = execute(sql);\n\n ResultSet result = null;\n try {\n result = rst;\n } catch(Exception e) {\n System.out.println(e.getMessage() + \" - \" + sql);\n }\n\n return result;\n }", "long buscarProximo(long id);", "Object getDados(long id);", "N getNode(int id);", "List<CMSObject> getNodeById(String id, Object session) throws RepositoryAccessException;", "public Path getPath(int id){\n if(id < 0 || id >= mazes.size()) throw new IncorrectMazeIDException();\n if(paths.containsKey(id)) return paths.get(id);\n MazeService mazeService = new MazeService(getMaze(id));\n Path path = new Path(mazeService.getPath());\n paths.put(id, path);\n return path;\n }", "private Node getNodeWithID(int ID)\r\n {\r\n Node currentNode = first_node;\r\n boolean found = false;\r\n\r\n while(!found && currentNode != null)\r\n {\r\n if(ID == currentNode.getData().getStudent_ID())\r\n {\r\n found = true;\r\n }\r\n else\r\n {\r\n currentNode = currentNode.getNextNode();\r\n }\r\n }\r\n return currentNode;\r\n }", "public Prototipo encontrarPrototipoPorIdProducto(Producto id) {\r\n Prototipo pro;\r\n try {\r\n EntityManager em = getEntityManager();\r\n Query q = em.createNamedQuery(\"Prototipo.findByIdProducto\", Prototipo.class).setParameter(\"idProducto\", id);\r\n pro = (Prototipo) q.getSingleResult();\r\n } catch (Exception e) {\r\n pro = null;\r\n }\r\n return pro;\r\n }", "CMSObject getFirstNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "public String FindById(int id) throws SQLException{\n\t\t\tString req =\"Select NomGroupe from Groupe where ID_Groupe= ? \";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setInt(1,id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\treturn rs.getString(1);\t\n\t\t\t\n\t\t}", "String getIdNode2();", "public KListObject<KAssurer_lecon> chargerListeRDVEleve(int id){\r\n\t\tint idAgenda;\r\n\t\t\r\n\t\tKListObject<KAssurer_lecon> Kliste =new KListObject<KAssurer_lecon>(KAssurer_lecon.class);\r\n\t\tKAssurer_lecon lecon = null;\r\n\t\tKListObject<KAgenda> Kliste1 =new KListObject<KAgenda>(KAgenda.class);\r\n\t\tKliste1.loadFromDb(BDD.db,\"select * from agenda where id in (select idAgenda from assurer_lecon where ideleve =\"+id+\") \" +\r\n\t\t\t\t\"order by date_agenda asc, heure_agenda asc\");\r\n\t\t\r\n\t\tfor(int i = 0; i<Kliste1.count(); i++){\r\n\t\t\tidAgenda = ((Integer)Kliste1.get(i).getId());\r\n\t\t\tlecon = new KAssurer_lecon();\r\n\t\t\ttry {\r\n\t\t\t\tlecon.loadOne(BDD.db,\" idAgenda = \"+idAgenda+\" and idEleve =\"+id);\r\n\t\t\t\tKliste.add(lecon);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace(); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn Kliste;\r\n\t}", "long buscarAnterior(long id);", "@Override\r\n public Assunto buscarId(int id) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.id =:id\");\r\n query.setParameter(\"id\", id);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }", "@Override\n public Object recuperarElemento(Class clase, long id) {\n Query query = database.query();\n query.constrain(clase);\n query.descend(\"id\").constrain(id);\n ObjectSet result = query.execute();\n if (result.hasNext())\n return result.next();\n else return null;\n }", "private TennisPlayerContainerNode getPlayerNodeRec(TennisPlayerContainerNode currRoot, String playerId) {\n\t\t\t\n\t\t\t if (currRoot == null) { \n\t\t\t\t \n\t\t\t\t return null; \n\t\t\t\t \n\t\t\t\t } else {// 3-way comparison to understand how to proceed the search\n\t\t \n\t\t\t\t\t// Get player from current root and compare their ID's\n\t\t int comparisonResult = currRoot.getPlayer().getId().compareTo(playerId);\n\t\t \n\t\t if (comparisonResult == 0) {//if they are the same\n\t\t \t\n\t\t return currRoot;\n\t\t \n\t\t } else if (comparisonResult < 0) {\n\t\t \t\n\t\t return getPlayerNodeRec(currRoot.getRight(), playerId);\n\t\t \n\t\t } else {\n\t\t \t\n\t\t return getPlayerNodeRec(currRoot.getLeft(), playerId);\n\t\t }\n\t\t }\n\t\t\t\n\t\t}", "Receta getByIdWithImages(long id);", "public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }", "private Process fetchProcessById(Integer id)\r\n\t{\r\n\t\tProcess process = (Process)doQueryForObject(getSqlSession(), FETCH_PROCESS_BY_ID, id);\r\n\r\n\t\tif (!ValidationUtil.isNull(process.getParentProcess())\r\n\t\t\t\t&& !ValidationUtil.isNullOrZero(process.getParentProcess().getId()))\r\n\t\t{\r\n\t\t\tprocess.setParentProcess(fetchProcessById(process.getParentProcess().getId()));\r\n\t\t}\r\n\r\n\t\treturn process;\r\n\t}", "public PDFGoTo getPDFGoTo(String id)\n {\n IDNode node=(IDNode)idReferences.get(id); \n return node.getInternalLinkGoTo();\n }", "FPNode_Strings getChildWithID(String id) {\r\n\t\t// for each child node\r\n\t\tfor(FPNode_Strings child : childs){\r\n\t\t\t// if the id is the one that we are looking for\r\n\t\t\tif(child.itemID.equals(id)){\r\n\t\t\t\t// return that node\r\n\t\t\t\treturn child;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if not found, return null\r\n\t\treturn null;\r\n\t}", "CMSObject getFirstNodeById(String id, Object session) throws RepositoryAccessException;", "private int root(int i) {\n while (i != id[i]) {\n i = id[i];\n }\n return i;\n }", "@Override\n\tpublic GrupoPermiso findById(int id) {\n\t\treturn null;\n\t}", "List<CMSObject> getNodeById(String id, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "@GET\n\t@Path( \"{id: \\\\d+}\" )\n\t@Produces( { MediaType.APPLICATION_JSON } )\n\tpublic Response getTipo( @PathParam( \"id\" ) Long id )\n\t{\n\t\tRotondAndesTM tm = new RotondAndesTM( getPath( ) );\n\t\ttry\n\t\t{\n\t\t\tTipo v = tm.buscarTipoPorId( id );\n\t\t\treturn Response.status( 200 ).entity( v ).build( );\t\t\t\n\t\t}\n\t\tcatch( Exception e )\n\t\t{\n\t\t\treturn Response.status( 500 ).entity( doErrorMessage( e ) ).build( );\n\t\t}\n\t}", "public Aluguel read(int id) {\n MongoCursor<Document> cursor = collection.find().iterator();\r\n Aluguel aluguel = null;\r\n List<Aluguel> alugueis = new ArrayList<>();\r\n if (cursor.hasNext()) {\r\n aluguel = new Aluguel().fromDocument(cursor.next());\r\n alugueis.add(aluguel);\r\n }\r\n alugueis.forEach(a -> System.out.println(a.getId()));\r\n return aluguel;\r\n }", "public Paciente get( Long id ) {\r\n\t\t\tlogger.debug(\"Retrieving codigo with id: \" + id);\r\n\t\t\t\r\n\t\t\t/*for (Paciente paciente:codigos) {\r\n\t\t\t\tif (paciente.getId().longValue() == id.longValue()) {\r\n\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\treturn paciente;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tlogger.debug(\"No records found\");\r\n\t\t\treturn null;\r\n\t\t}", "@Override\n\tpublic Collection<Tkfl> getCurrentTkflById(String id) {\n\t\tString sql = \"select ID_,PARENT_ID,TKMC,MS from tkfl where parent_id=?\";\n\t\tList<Tkfl> list = this.jdbcTemplate.query(sql, new Object[] { id },\n\t\t\t\tnew RowMapper<Tkfl>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Tkfl mapRow(ResultSet result, int i)\n\t\t\t\t\t\t\tthrows SQLException {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tTkfl tkfl = new Tkfl();\n\t\t\t\t\t\ttkfl.setId(result.getInt(\"id_\"));\n\t\t\t\t\t\ttkfl.setParentId(result.getInt(\"parent_id\"));\n\t\t\t\t\t\ttkfl.setTkmc(result.getString(\"tkmc\"));\n\t\t\t\t\t\ttkfl.setMs(result.getString(\"ms\"));\n\t\t\t\t\t\treturn tkfl;\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\treturn list;\n\t}", "Bank find(int id)\n\t{\n\t\tif (list.isEmpty()) return null;\n\t\tint maxid = findLast().id;\n\t\tif (id > maxid) return null;\n\t\telse if (id == maxid) return findLast();\n\t\tint minid = findFirst().id;\n\t\tif (id < minid) return null;\n\t\telse if (id == minid) return findFirst();\n\t\t// Guess position\n\t\tint guess = count()*(id-minid)/(maxid-minid);\n\t\tBank current = (Bank) list.get(guess);\n\t\tif (current.id == id) return current;\n\t\telse if (current.id < id)\n\t\t{\n\t\t\twhile (current.id < id)\n\t\t\t{\n\t\t\t\tcurrent = current.next;\n\t\t\t\tif (current.id == id) return current;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t\telse \n\t\t{\n\t\t\twhile (current.id > id)\n\t\t\t{\n\t\t\t\tcurrent = current.prev;\n\t\t\t\tif (current.id == id) return current;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\r\n public QuestaoDiscursiva consultarQuestaoDiscursivaPorId(long id)\r\n throws Exception {\n return rnQuestaoDiscursiva.consultarPorId(id);\r\n }", "public static Node findNodeById(ConcurrentHashMap<String, Node> idIndex, String id, Logger logger) {\n\t\tNode foundNode = idIndex.get(id);\n\n\t\tif (foundNode == null) {\n\t\t\tlogger.warning(\"WARNING: COULD NOT FIND NODE WITH ID = \" + id + \". HREF IGNORED...\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn foundNode;\n\n\t\t// ArrayList<Node> foundNodes = new ArrayList<Node>();\n\t\t//\n\t\t// Iterator<Entry<String, Node>> it = idIndex.entrySet().iterator();\n\t\t// while (it.hasNext()) {\n\t\t// Map.Entry<String, Node> pair = (Map.Entry<String, Node>) it.next();\n\t\t//\n\t\t// if (pair.getKey().equals(id)) {\n\t\t// foundNodes.add(pair.getValue());\n\t\t// it.remove();\n\t\t// break;\n\t\t// }\n\t\t// }\n\t\t//\n\t\t// // for (Node n : idIndex.query(\"id\", id)) {\n\t\t// // foundNodes.add(n);\n\t\t// // }\n\t\t//\n\t\t// switch (foundNodes.size()) {\n\t\t// case 0:\n\t\t// logger.warning(\"WARNING: COULD NOT FIND NODE WITH ID = \" + id);\n\t\t// return null;\n\t\t// case 1:\n\t\t// return foundNodes.get(0);\n\t\t// case 2:\n\t\t// if (foundNodes.get(0).getId() < foundNodes.get(1).getId()) {\n\t\t// if (isOld) {\n\t\t// return foundNodes.get(0);\n\t\t// }\n\t\t// return foundNodes.get(1);\n\t\t// } else {\n\t\t// if (isOld) {\n\t\t// return foundNodes.get(1);\n\t\t// }\n\t\t// return foundNodes.get(0);\n\t\t// }\n\t\t// default:\n\t\t// logger.warning(\"WARNING: MULTIPLE NODES HAVE THE SAME ID = \" + id);\n\t\t// return null;\n\t\t// }\n\t}", "public SegmentRefOrGroup get(Set<SegmentRefOrGroup> structure, String id){\n \treturn structure.stream().filter(x -> x.getId().equals(id)).findFirst().orElse(null);\n }", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "String getFullParentId();", "public List<ReciboPension> buscarRecibosDependientes(long idPersona) {\n\t\treturn (List<ReciboPension>)entityManager.createQuery(\"\tselect r from ReciboPension r where r.alumno.idPersona\tin ( select a.idPersona from Apoderado ap inner join ap.alumnos a \twhere ap.idPersona = :id ) \")\n \t\t.setParameter(\"id\", idPersona).getResultList();\n\t}", "private Node getNodeById(int objId){\n return dungeonPane.lookup(\"#\" + Integer.toString(objId));\n }", "String getIdNode1();", "public List getReplyList(int id) {\n\t\tString HQL = \"\";\r\n\t\tHQL += \" from XzfyOtherSuggest x\";\r\n\t\tHQL += \" where 1 = 1 and x.parentId =\"+id+\"order by id asc\";\t\r\n\t\treturn super.find(HQL);\r\n\t}", "public void addPathId(long id) {\n synchronized (pathsToBeTraversed) {\n pathsToBeTraversed.add(id);\n }\n }", "@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}", "@Override\n\tpublic ArrayList<Risposta> getRisposte(int id) {\n\t\tDB db = getDB();\n\t\tArrayList<Risposta> risposte = new ArrayList<Risposta>();\n\t\tMap<Long, Risposta> list = db.getTreeMap(\"risposte\");\n\t\tfor(Map.Entry<Long, Risposta> risposta : list.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta) {\n\t\t\t\tif(risposta.getValue().getDomandaID() == id)\n\t\t\t\t\trisposte.add((Risposta)risposta.getValue());\n\t\t\t}\n\t\treturn risposte;\n\t}", "private Domino getdominoByID(int id) {\n Game game = KingdominoApplication.getKingdomino().getCurrentGame();\n for (Domino domino : game.getAllDominos()) {\n if (domino.getId() == id) {\n return domino;\n }\n }\n throw new java.lang.IllegalArgumentException(\"Domino with ID \" + id + \" not found.\");\n }", "public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }" ]
[ "0.6447861", "0.64098203", "0.62952423", "0.6283196", "0.62756014", "0.61266035", "0.59875965", "0.5918313", "0.5904624", "0.58782256", "0.58642745", "0.5860818", "0.5834331", "0.5833899", "0.5832436", "0.57746315", "0.576682", "0.57566476", "0.5746734", "0.57417244", "0.5736752", "0.5726199", "0.5725548", "0.571593", "0.5711689", "0.5702329", "0.5682461", "0.56722903", "0.56581724", "0.5655307", "0.5655307", "0.5647718", "0.5645727", "0.5619835", "0.5611891", "0.56111544", "0.56009346", "0.55880415", "0.5580756", "0.55797267", "0.5575565", "0.5573623", "0.5566936", "0.55627877", "0.5555259", "0.5544338", "0.5541133", "0.5535219", "0.55277264", "0.551353", "0.5507615", "0.5506932", "0.54973185", "0.5493565", "0.5483473", "0.5483398", "0.5473531", "0.5469267", "0.54644954", "0.546244", "0.5458264", "0.54436296", "0.54378575", "0.5437084", "0.54364586", "0.5435389", "0.54322094", "0.5429631", "0.5426102", "0.5423952", "0.5409532", "0.54060924", "0.54048485", "0.5399896", "0.5399317", "0.5394731", "0.5392755", "0.5390569", "0.53838706", "0.538335", "0.538029", "0.5379685", "0.5376292", "0.5375875", "0.5374807", "0.5365315", "0.5364237", "0.53428376", "0.53427017", "0.5342677", "0.53385484", "0.53379565", "0.5318137", "0.5316821", "0.5315383", "0.53144306", "0.5313161", "0.5306581", "0.53048736", "0.5283772", "0.5279837" ]
0.0
-1
Se encarga de insertar un nuevo recurso
public G insertar(G entity, HttpServletRequest httpRequest) throws AppException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }", "public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }", "private void insertar(String nombre, String Contra) {\n ini.Tabla.insertar(nombre, Contra);\n AVLTree arbol = new AVLTree();\n Nod nodo=null;\n ini.ListaGen.append(0,0,\"\\\\\",nombre,\"\\\\\",\"\\\\\",arbol,\"C\",nodo); \n \n }", "public void insertar(String dato){\r\n \r\n if(estaVacia()){\r\n \r\n primero = new NodoJugador(dato);\r\n }else{\r\n NodoJugador temporal = primero;\r\n while(temporal.getSiguiente()!=null){\r\n temporal = temporal.getSiguiente();\r\n }\r\n \r\n temporal.setSiguiente(new NodoJugador(dato));\r\n }\r\n }", "public void insert(Nodo nodo) {\r\n\t\tif(cont<7){\r\n\t\t\tif(this.getRaiz() == null) {\r\n\t this.setRaiz(nodo);\r\n\t nodo.setClave(0);\r\n\t return;\r\n\t }\r\n\t \r\n\t Nodo t = this.getRaiz();\r\n\t boolean val = true;\r\n\t while((t != null)&&(val)) {\r\n\t if(t.getLeft() == null) {\r\n\t \tt.setLeft(nodo);\r\n\t \tcont++;\r\n\t \tNivel(nodo);\r\n\t \tval=false;\r\n\t }\r\n\t else if(t.getRight() == null) {\r\n\t t.setRight(nodo);\r\n\t cont++;\r\n\t \tNivel(nodo);\r\n\t val=false;\r\n\t }\r\n\t else {\r\n\t int lCount = countChildren(t.getLeft());\r\n\t int rCount = countChildren(t.getRight());\r\n\t if(lCount == rCount)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else if(lCount == 0 || lCount == 1)\r\n\t t = t.getLeft(); \r\n\t \r\n\t else\r\n\t t = t.getRight();\r\n\t \r\n\t }\r\n\t\r\n\t }\r\n\t\t}\r\n\t}", "boolean insertar(Nodo_B nuevo){\n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n size ++;\n return true;\n }else{\n if(this.primero == this.ultimo){ // -------------------------solo hay un nodo \n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }\n }else{ // ---------------------------------------------------hay mas de un nodo\n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n Nodo_B pivote = this.primero;\n while(pivote != null){\n if(nuevo.valor < pivote.valor){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n //--------------------------- cambia los punteros a las paginas\n pivote.izq = nuevo.der;\n pivote.anterior.der = nuevo.izq;\n //-----------------------------------------------------------\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n size++;\n return true;\n }else if(nuevo.valor == pivote.valor){\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n }\n return false;\n }", "public void inserisci(String dove, String contenuto){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, \"directory\");\n n_nodi++;\n return;\n }\n //troviamo il nodo che sarà il padre del nodo che dobbiamo aggiungere\n NodoAlbero cercato = ricerca(dove);\n \n //se il nodo padre non esiste, non aggiungiamo il nuovo nodo\n if (cercato == null)\n return;\n //se il nodo padre non ha un figlio, lo creiamo\n if (cercato.getFiglio() == null)\n cercato.setFiglio(new NodoAlbero(contenuto, cercato, \"directory\"));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = cercato.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), \"directory\"));\n }\n n_nodi++;\n }", "public void inserisci(NodoAlbero dove, String contenuto, String tipo){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, tipo);\n n_nodi++;\n return;\n }\n //se il nodo padre non ha un figlio, lo creiamo\n if (dove.getFiglio() == null)\n dove.setFiglio(new NodoAlbero(contenuto, dove, tipo));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = dove.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), tipo));\n }\n n_nodi++;\n }", "public void insertToCarrito(String user, int cant, Producto prod) {\n NodoAvl tmp = root;\n while (tmp != null && !tmp.username.equals(user)) {\n if (user.compareTo(tmp.username) < 0) {\n tmp = tmp.izq;\n } else {\n tmp = tmp.der;\n }\n }\n if (tmp != null && user.equals(tmp.username)) {\n if(tmp.carrito != null)\n tmp.carrito.insertTail(user, cant, prod);\n else{\n Lista ls = new Lista();\n ls.insertTail(user, cant, prod);\n tmp.carrito = ls;\n }\n Log.logger.info(\" Agregado a usuario :\" + user);\n } else {\n Log.logger.warn(\"Usuario no encontrado \" + user);\n }\n \n }", "public void insertar(Proceso p) {\n\t\tif (p == null) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.tllegada = p.tllegada;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.rrejecutada = p.rrejecutada;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\t\tint tamaņo = p.id.length();\n\t\tif (tamaņo == 1) {\n\t\t\tnuevo.id = p.id + \"1\";\n\t\t} else {\n\t\t\tchar id = p.id.charAt(0);\n\t\t\tint numeroId = Integer.parseInt(String.valueOf(p.id.charAt(1))) + 1;\n\t\t\tnuevo.id = String.valueOf(id) + String.valueOf(numeroId);\n\t\t}\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void insertar(int x, String nombre) {\n \tNodo nuevo;\n nuevo = new Nodo();\n nuevo.edad = x;\n nuevo.nombre = nombre;\n //Validar si la lista esta vacia\n if (raiz==null)\n {\n nuevo.sig = null;\n raiz = nuevo;\n }\n else\n {\n nuevo.sig = raiz;\n raiz = nuevo;\n }\n }", "void insert(int data) { \n root = insertRec(root, data); \n }", "private void insertarKey(BTreeNode<T> root, T t) {\n BTreeNode<T> currentNode = root;\n\n if (currentNode.isLeaf()) {\n if (!itsRepeated(currentNode, (I)t.getId())) {\n insercionOrdenada(currentNode, t);\n } else {\n System.out.println(\"Dato repetido\");\n }\n } else {\n int indexChild = findChildOrIndex(currentNode, (I)t.getId());\n if (!itsRepeated(currentNode.getChild(indexChild), (I)t.getId())) {\n BTreeNode<T> child = currentNode.getChild(indexChild);\n if (child.getNumKeys() == 4 && child.isLeaf()) {\n insercionOrdenada(currentNode.getChild(indexChild), t);\n splitChild(currentNode, currentNode.getChild(indexChild), indexChild);\n } else {\n insertarKey(root.getChild(indexChild), t);\n }\n\n if (currentNode.getNumKeys() == 5) {\n checkMaxKeys(currentNode);\n }\n } else {\n System.out.println(\"Dato repetido\");\n }\n }\n }", "public void InsertarNodo(int nodo) {\r\n Nodo nuevo_nodo = new Nodo(nodo);\r\n nuevo_nodo.siguiente = UltimoValorIngresado;\r\n UltimoValorIngresado = nuevo_nodo;\r\n tamaño++;\r\n }", "public boolean inserir(GrauParentesco grauParentesco) throws Exception ;", "@Override\n\tpublic void addRecurso(Recurso recurso) {\n\t\t\n\t}", "public static void insertar (tcus_clientes info){\n \tNodoArbol nuevo = new NodoArbol (info);\n if (raiz == null) {\n raiz = nuevo;\n } else {\n \tNodoArbol anterior = null, reco;\n reco = raiz;\n while (reco != null) {\n anterior = reco;\n if (info.getNmid() < reco.getNodo().getNmid())\n reco = reco.getIzq();\n else\n reco = reco.getDer();\n }\n if (info.getNmid() < anterior.getNodo().getNmid())//50<100\n anterior.setIzq(nuevo); \n else\n anterior.setDer(nuevo);\n }\n }", "int insert(WayShopCateRoot record);", "public void AgregarDeMayorAMenor(int el) throws Exception{\n if(repetido(el)){\n throw new Exception(\"El dato ya existe en la lista!!!\");\n }else{\n /*\n Crear un nodo para el nuevo dato.\n Si la lista esta vacía, o el valor del primer elemento de la lista \n es mayor que el nuevo, insertar el nuevo nodo en la primera posición \n de la lista y modificar la cabecera respectivamente.\n \n */\n NodoDoble newNode = new NodoDoble(el);\n if (estVacia() || inicio.GetDato() == el) {\n newNode.SetSiguiente(inicio);\n inicio = newNode;\n } else {\n /* \n Si no se cumple el caso anterior, buscar el lugar adecuado \n para la inserción: recorrer la lista conservando el nodo actual. \n Inicializar nodo actual con el valor de primera posición, \n y avanzar mientras el siguiente nodo no sea nulo y el dato \n que contiene la siguiente posición sea mayor o igual que \n el dato a insertar.\n */\n NodoDoble current = inicio;//\n while (current.GetSiguiente() != null\n && current.siguiente.GetDato() >= el) {\n current = current.GetSiguiente();\n }\n /*\n Con esto se señala al nodo adecuado, \n a continuación insertar el nuevo nodo a continuación de él.\n */\n newNode.SetSiguiente(current.GetSiguiente());\n current.SetSiguiente(newNode);\n }\n } \n }", "public void insertar(Proceso p, int tiempo) {\n\t\tif (p == null || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.rafaga = p.rafaga;\n\t\tnuevo.id = p.id;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.ColaProviene = p.ColaProviene;\n\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += nuevo.rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void InsertarProceso(Proceso nuevo) {\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tthis.cabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t}", "private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "public void processInsertar() {\n }", "public void agregarAlFinal(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario recorre la lista hasta llegar al ultimo nodo\r\n //y agrega el nuevo.\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al ultimo nodo.\r\n while(aux.getSiguiente() != null){\r\n aux = aux.getSiguiente();\r\n }\r\n // Agrega el nuevo nodo al final de la lista.\r\n aux.setSiguiente(nuevo);\r\n }\r\n // Incrementa el contador de tamaño de la lista\r\n tamanio++;\r\n }", "int insertSelective(WayShopCateRoot record);", "public void insertar(int rafaga, int tiempo) {\n\t\tif (rafaga <= 0 || tiempo < 0) {\n\t\t\treturn;\n\t\t}\n\t\tProceso nuevo = new Proceso();\n\t\tnuevo.id = String.valueOf((char) this.caracter);\n\t\tthis.caracter++;\n\t\tnuevo.rafaga = rafaga;\n\t\tnuevo.tllegada = tiempo;\n\t\tnuevo.IdCola = this.IdCola;\n\t\tnuevo.NombreCola = this.NombreCola;\n\t\tnuevo.ColaProviene = this.NombreCola;\n\t\tif (raiz.sig == raiz) {\n\t\t\traiz.sig = nuevo;\n\t\t\tcabeza = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\tnuevo.padre = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t} else {\n\t\t\tProceso aux = raiz.padre;\n\t\t\taux.sig = nuevo;\n\t\t\tnuevo.sig = raiz;\n\t\t\traiz.padre = nuevo;\n\t\t\tnuevo.padre = aux;\n\t\t}\n\t\tthis.numProcesos++;\n\t\tthis.rafagaTotal += rafaga;\n\t\tthis.Ordenamiento();\n\t}", "public void RB_Insert(ArvoreRB A, Node z){\r\n Node y = A.nil;\r\n Node x = A.raiz; \r\n\r\n while (x != A.nil) {\r\n y = x;\r\n if (z.conteudoNo.compareToIgnoreCase(x.conteudoNo) < 0) { \r\n x = x.esq;\r\n } else {\r\n x = x.dir;\r\n }\r\n }\r\n z.pai = y;\r\n if (y == A.nil) {\r\n A.raiz = z;\r\n } else if (z.conteudoNo.compareToIgnoreCase(y.conteudoNo) < 0) {\r\n y.esq = z;\r\n } else {\r\n y.dir = z;\r\n }\r\n z.esq = A.nil;\r\n z.dir = A.nil;\r\n z.cor = \"vermelho\";\r\n insertFixup(A,z);\r\n }", "@Override\n\tpublic void insertar() {\n\t\t\n\t}", "void insertar_cabeceraMatriz(Nodo_B nuevo){\n \n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n \n this.size++;\n }else{\n \n if(nuevo.getValor() < this.primero.getValor()){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero = nuevo;\n this.size++;\n }else if(nuevo.getValor() > this.ultimo.getValor()){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo = nuevo;\n this.size++;\n }else{\n Nodo_B pivote = this.primero;\n \n while(pivote != null){\n if(nuevo.getValor() < pivote.getValor()){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n this.size++;\n break;\n }else if(nuevo.getValor() == pivote.getValor()){\n System.out.print(\"ya hay un valor con este codigo registrado\");\n break;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n // JOptionPane.showMessageDialog(null, \"salio del metodo insertar cabecera con el pais :\"+nuevo.nombreDestino);\n }", "public void insertarcola(){\n Cola_banco nuevo=new Cola_banco();// se declara nuestro metodo que contendra la cola\r\n System.out.println(\"ingrese el nombre que contendra la cola: \");// se pide el mensaje desde el teclado\r\n nuevo.nombre=teclado.next();// se ingresa nuestro datos por consola yse almacena en la variable nombre\r\n if (primero==null){// se usa una condicional para indicar si primer dato ingresado es igual al null\r\n primero=nuevo;// se indica que el primer dato ingresado pasa a ser nuestro dato\r\n primero.siguiente=null;// se indica que el el dato ingresado vaya al apuntador siguente y que guarde al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo en la cabeza de nuestro cola\r\n }else{// se usa la condicon sino se cumple la primera\r\n ultimo.siguiente=nuevo;//se indica que ultimo dato ingresado apunte hacia siguente si es que hay un nuevo dato ingresado y que vaya aser el nuevo dato de la cola\r\n nuevo.siguiente=null;// se indica que el nuevo dato ingresado vaya y apunete hacia siguente y quees igual al null\r\n ultimo=nuevo;// se indica que el ultimo dato ingresado pase como nuevo dato\r\n }\r\n System.out.println(\"\\n dato ingresado correctamente\");// se imprime enl mensaje que el dato ha sido ingresado correctamente\r\n}", "Node insertRec(T val, Node node, List<Node> path, boolean[] wasInserted) {\n if (node == null) {\n wasInserted[0] = true;\n Node newNode = new Node(val);\n path.add(newNode);\n return newNode;\n }\n\n int comp = val.compareTo(node.val);\n if (comp < 0) {\n node.left = insertRec(val, node.left, path, wasInserted);\n } else if (comp > 0) {\n node.right = insertRec(val, node.right, path, wasInserted);\n }\n\n path.add(node);\n return node;\n }", "public void insertar(Cliente c) {\n if (cabeza == null) { //En caso de que la cabeza sea nula, el dato sera el primero de la lista.\n cabeza = new NodoCliente(c);\n } else {\n if (c.getEspacios() <= cabeza.getDato().getEspacios()) { //Con ayuda de la condicion \"if\" y \"else\" de abajo, se orden los datos por espacios reservados,\n NodoCliente aux = new NodoCliente(c); //de menor a mayor.\n aux.setNext(cabeza);\n cabeza = aux;\n } else {\n if (cabeza.getNext() == null) {\n cabeza.setNext(new NodoCliente(c));\n } else {\n NodoCliente aux = cabeza;\n while (aux.getNext() != null && c.getEspacios() > aux.getNext().getDato().getEspacios()) {\n aux = aux.getNext();\n }\n NodoCliente temp = new NodoCliente(c);\n temp.setNext(aux.getNext());\n aux.setNext(temp);\n }\n }\n }\n }", "int insert(Tipologia record);", "public void insertSubArbol(Nodo nodo) {\r\n\t\tif(cont<5){\r\n\t\t\tif(this.getRaiz() == null) {\r\n\t\t\t\tthis.setRaiz(nodo);\r\n\t\t\t\tnodo.setClave(0);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tNodo t = this.getRaiz();\r\n\t\t\tboolean val = true;\r\n\t\t\twhile((t != null)&&(val)) {\r\n\t\t\t\tif(t.getLeft() == null) {\r\n\t\t\t\t\tt.setLeft(nodo);\r\n\t\t\t\t\tcont++;\r\n\t\t\t\t\tval=false;\r\n\t\t\t\t}\r\n\t\t\t\telse if(t.getRight() == null) {\r\n\t\t\t\t\tt.setRight(nodo);\r\n\t\t\t\t\tcont++;\r\n\t\t\t\t\tval=false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tint lCount = countChildren(t.getLeft());\r\n\t\t\t\t\tint rCount = countChildren(t.getRight());\r\n\t\t\t\t\tif(lCount == rCount)\r\n\t\t\t\t\t\tt = t.getLeft(); \r\n\t\t\t\t\t\r\n\t\t\t\t\telse if(lCount == 0 || lCount == 1)\r\n\t\t\t\t\t\tt = t.getLeft(); \r\n\t\t\t\t\t\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tt = t.getRight();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void insertarInicio(E dato) {\n\t\tprimero=new Nodo<E>(dato,primero);\n\t\tif (estaVacia()) {\n\t\t\tultimo=primero;\n\t\t}\n\t\tcantidad++;\n\t}", "public void insertarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setIdSeccion(38);\n \tgrado.setNumGrado(2);\n \tgrado.setUltimoGrado(0);\n \tString respuesta = negocio.insertarGrado(\"\", grado);\n \tSystem.out.println(respuesta);\n }", "private void recursiveInsert(eNode head_ref, eNode toInsert)\r\n {\r\n if(head_ref.getNext() == null)\r\n head_ref.setNext(toInsert);\r\n else\r\n recursiveInsert(head_ref.getNext(), toInsert);\r\n }", "public void insereFim(TinfoTransicao item) {\t\t\n\t\tTnodoTransicao novo = new TnodoTransicao(item);\n\t\tnovo.proximo = this.ultimo.proximo;\n\t\tthis.ultimo.proximo = novo;\n\t\tthis.ultimo = novo;\t\n\t}", "private void insertNodeIntoTree(Node node) {\n\t\troot = insert(root,node);\t\n\t}", "private void insert(RBNode<T> node) {\r\n RBNode<T> current = this.root;\r\n //need to save the information of parentNode\r\n //because need the parentNode to connect the new node to the tree\r\n RBNode<T> parentNode = null;\r\n\r\n //1. find the insert position\r\n while(current != null) {\r\n parentNode = current;//store the parent of current, because current is going to move\r\n int cmp = node.key.compareTo(current.key);\r\n if(cmp < 0)//if insert data is smaller than current data, then go into left subtree\r\n current = current.left;\r\n else//if insert data is bigger than or equal to current data, then go into right subtree\r\n current = current.right;\r\n }\r\n\r\n //find the position, let parentNode as the parent of newNode\r\n node.parent = parentNode;\r\n\r\n //2. connect newNode to parentNode\r\n if(parentNode != null) {\r\n int cmp = node.key.compareTo(parentNode.key);\r\n if(cmp < 0)\r\n parentNode.left = node;\r\n else\r\n parentNode.right = node;\r\n } else {\r\n //if parentNode is null, means tree was empty, let root = newNode\r\n this.root = node;\r\n }\r\n\r\n //3. fix the current tree to be a RBTree again\r\n insertFixUp(node);\r\n }", "public void insert(int key)\n {\n root = insertRec(root,key);\n }", "public void addPrimero(Object obj) {\n if (cabeza == null) { //Si la cabeza es nula, entoces se creará un nuevo nodo donde le pasaremos el valor de obj\n cabeza = new Nodo(obj);\n } else { //Si no es nula, signifa que el valor que se ingrese, pasara a ser la nueva cabeza\n Nodo temp = cabeza; //Metemos la cabeza en un nodo temporal\n Nodo nuevo = new Nodo(obj); //Creamos un nuevo nodo, que no está enlazado\n nuevo.enlazarSiguiente(temp); //Y el nuevo nodo lo enlazamos a el nodo Temp, que contenia el valor anterior de la otra cabeza\n cabeza = nuevo; //Y ahora le decimos que la cabeza sera nuevo\n }\n size++; //Cada vez que agreguemos un nuevo nodo el tamaño de nuestra lista tendra que aumentar\n }", "public int insertTurno(Turno t) {\r\n\t\t// TODO He quitado esta comprobación porque si metes un turno, se le asigna un id nuevo, ¿no? - Dani\r\n//\t\tif (getTurno(t.getIdTurno())!=null) return -1;\r\n\t\tint i = controlador.insertTurno(t);\r\n\t\tt.setIdTurno(i);\r\n\t\tturnos.add(t);\r\n\t\treturn i;\r\n\t}", "public void insertar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puedes dejar cuadros en blanco\");//C.P.M Verificamos si las casillas esta vacia si es asi lo notificamos\r\n } else {//C.P.M de lo contrario prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos las variabes al modelo \r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.insertar();//C.P.M Ejecutamos el metodo del modelo \r\n if (Error.equals(\"\")) {//C.P.M Si el modelo no regresa un error es que todo salio bien\r\n JOptionPane.showMessageDialog(null, \"Se guardo exitosamente la configuracion\");//C.P.M notificamos a el usuario\r\n vista.dispose();//C.P.M y cerramos la vista\r\n } else {//C.P.M de lo contrario \r\n JOptionPane.showMessageDialog(null, Error);//C.P.M notificamos a el usuario el error\r\n }\r\n }\r\n }", "public void insertToWish(String user, int cant, Producto prod) {\n NodoAvl tmp = root;\n while (tmp != null && !tmp.username.equals(user)) {\n if (user.compareTo(tmp.username) < 0) {\n tmp = tmp.izq;\n } else {\n tmp = tmp.der;\n }\n }\n if (tmp != null && user.equals(tmp.username)) {\n if(tmp.whish!= null)\n tmp.whish.insertTail(user, cant, prod);\n else{\n Lista ls = new Lista();\n ls.insertTail(user, cant, prod);\n tmp.whish = ls;\n }\n Log.logger.info(\" Agregado a usuario :\" + user);\n } else {\n Log.logger.warn(\"Usuario no encontrado \" + user);\n }\n \n }", "@Transactional\n DataRistorante insert(DataRistorante risto);", "public void insert(int id){\n Node newNode= new Node (id);\n Node temp=root;\n Node parent=null;\n \n if (root==null){\n root=newNode;\n return;\n }\n \n while (true){\n parent=temp;\n if (id<=temp.data){\n temp=temp.left;\n if(temp==null){\n parent.left=newNode;\n return;\n }\n }\n if (id>=temp.data){\n temp=temp.right;\n if(temp==null){\n parent.right=newNode;\n return;\n }\n }\n }\n\n }", "public void criar() throws IOException {\nif (!directorio.exists()) {\n directorio.mkdir();\n System.out.println(\"Directorio criado\");\n } else {\n System.out.println(\"Directorio existe\");\n }\n if (!fileAdmin.exists()) {\n fileAdmin.createNewFile();\n System.out.println(\"file de Administrador criado com sucesso\");\n escrever(lista);\n } else {\n System.out.println(\"ficheiro existe\");\n }\n\n }", "public void agregarAlInicio(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario va agregando los nodos al inicio de la lista.\r\n } else{\r\n // Une el nuevo nodo con la lista existente.\r\n nuevo.setSiguiente(inicio);\r\n // Renombra al nuevo nodo como el inicio de la lista.\r\n inicio = nuevo;\r\n }\r\n // Incrementa el contador de tamaño de la lista.\r\n tamanio++;\r\n }", "public void recInsertNode(TriLinkNode curNode)\r\n {\r\n if(curNode.i1==true&&curNode.i2==true)\r\n {\r\n if(temp.v1<curNode.v1)\r\n {\r\n if(curNode.left!=null)\r\n {\r\n recInsertNode(curNode.left);\r\n }else\r\n {\r\n curNode.left=temp;\r\n curNode.left.up=curNode;\r\n }\r\n }else if(temp.v1>curNode.v2)\r\n {\r\n if(curNode.right!=null)\r\n {\r\n recInsertNode(curNode.right);\r\n }else\r\n {\r\n curNode.right=temp;\r\n curNode.right.up=curNode;\r\n }\r\n }else if(temp.v1>curNode.v1&&temp.v1<curNode.v2)\r\n {\r\n if(curNode.down!=null)\r\n {\r\n recInsertNode(curNode.down);\r\n }else\r\n {\r\n curNode.down=temp;\r\n curNode.down.up=curNode;\r\n }\r\n }\r\n }else if(temp.v1>curNode.v1)\r\n {\r\n curNode.v2=temp.v1;\r\n curNode.d2=false;\r\n curNode.i2=true;\r\n }else if(temp.v1<curNode.v1&&curNode.left!=null)\r\n {\r\n recInsertNode(curNode.left);\r\n }else if(temp.v1<curNode.v1&&curNode.left==null)\r\n {\r\n curNode.left=temp;\r\n }\r\n }", "int insert(ChangesetParents record);", "private void ReservarCita(String horaini,String horafin)\n {\n progressDialog=new ProgressDialog(HorasCitasActivity.this);\n progressDialog.setTitle(\"Agregado horario\");\n progressDialog.setMessage(\"cargando...\");\n progressDialog.show();\n progressDialog.setCancelable(false);\n String key = referenceehoras.push().getKey();\n\n // para gaurar el nodo Citas\n // sadfsdfsdfsd1212sdss\n Horario objecita =new Horario(key,idespecialidad,horaini,horafin,nombreespecialidad );\n //HorarioAtencion\n // reference=FirebaseDatabase.getInstance().getReference(\"HorarioAtencion\");\n // referenceCitas= FirebaseDatabase.getInstance().getReference(\"CitasReservadas\").child(user_id);\n referenceehoras.child(key).setValue(objecita).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n Toast.makeText(HorasCitasActivity.this, \"Agregado\", Toast.LENGTH_SHORT).show();\n progressDialog.dismiss();\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(HorasCitasActivity.this, \"Error :\" +e.getMessage(), Toast.LENGTH_SHORT).show();\n\n }\n });\n }", "@Override\n\tpublic void insertarServicio(Servicio nuevoServicio) {\n\t\tservicioDao= new ServicioDaoImpl();\n\t\tservicioDao.insertarServicio(nuevoServicio);\n\t\t\n\t\t\n\t}", "public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}", "private void insertToFile (PQNode node) throws Exception{\n int fileId = (node.getPqIndex()-1)/ENTRY_BLOCK_SIZE;\n File file = new File(DIRECTORY + getMapFileName(NAME_PATTERN, fileId));\n\n List<PQNode> nodes = retrieveWholeFile(node.getPqIndex());\n nodes.add(node);\n\n storeToFile(file,nodes, false);\n }", "@Override\r\n public void inserirConcursando(Concursando concursando) throws Exception {\n rnConcursando.inserir(concursando);\r\n }", "public static void insertar(plantilla p,String nombre){\n\t\ttry {\r\n \tObjectInputStream entrada=new ObjectInputStream(new FileInputStream(nombre+\".lorito\"));\r\n patronesPlantillas obj1=(patronesPlantillas)entrada.readObject();\r\n obj1.mostrarPatronesPlantillas();\r\n System.out.println(\"-----------------------------\");\r\n entrada.close();\r\n \r\n\t\tobj1.insertarPlantilla(p);\r\n \r\n \r\n ObjectOutputStream salida=new ObjectOutputStream(new FileOutputStream(obj1.nombre()+\".lorito\"));\r\n // salida.writeObject(\"guardar este string y un objeto\\n\");\r\n salida.writeObject(obj1);\r\n salida.close();\r\n \r\n entrada=new ObjectInputStream(new FileInputStream(nombre+\".lorito\"));\r\n // String str=(String)entrada.readObject();\r\n obj1=(patronesPlantillas)entrada.readObject();\r\n obj1.mostrarPatronesPlantillas();\r\n System.out.println(\"-----------------------------\");\r\n entrada.close(); \r\n \r\n }catch (Exception e) { }\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}", "int insertSelective(Tipologia record);", "@Override\r\n\tpublic Ngo insert(Ngo obj) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Excursion addExcursion(Excursion excu) {\n\t\tSession s = sf.getCurrentSession();\r\n\r\n\t\ts.save(excu);\r\n\r\n\t\treturn excu;\r\n\t}", "public boolean crearRegistro(int codigoCiclo, int codigoPlan, int codigoObjetivo, String descripcion, String justificacion, double valorMeta, double valorMinimo, double valorMaximo, String tipoMedicion, String estado, String fuenteDato, String aplicaEn, String unidadMedida, String tipoGrafica, String mes01, String mes02, String mes03, String mes04, String mes05, String mes06, String mes07, String mes08, String mes09, String mes10, String mes11, String mes12, Collection arrResponsables, Collection arrRecursos, String usuarioInsercion) {\n/* 664 */ int elSiguiente = siguienteRegistro(codigoCiclo, codigoPlan);\n/* 665 */ if (elSiguiente == 0) {\n/* 666 */ return false;\n/* */ }\n/* */ \n/* */ try {\n/* 670 */ String s = \"insert into cal_plan_metas (codigo_ciclo,codigo_plan,codigo_meta,codigo_objetivo,descripcion,justificacion,valor_meta,valor_minimo,valor_maximo,tipo_medicion,estado,fuente_dato,aplica_en,unidad_medida,tipo_grafica,mes01,mes02,mes03,mes04,mes05,mes06,mes07,mes08,mes09,mes10,mes11,mes12,fecha_insercion,usuario_insercion) values (\" + codigoCiclo + \",\" + \"\" + codigoPlan + \",\" + \"\" + elSiguiente + \",\" + \"\" + codigoObjetivo + \",\" + \"'\" + descripcion + \"',\" + \"'\" + justificacion + \"',\" + \"\" + valorMeta + \",\" + \"\" + valorMinimo + \",\" + \"\" + valorMaximo + \",\" + \"'\" + tipoMedicion + \"',\" + \"'\" + estado + \"',\" + \"'\" + fuenteDato + \"',\" + \"'\" + aplicaEn + \"',\" + \"'\" + unidadMedida + \"',\" + \"'\" + tipoGrafica + \"',\" + \"'\" + mes01 + \"',\" + \"'\" + mes02 + \"',\" + \"'\" + mes03 + \"',\" + \"'\" + mes04 + \"',\" + \"'\" + mes05 + \"',\" + \"'\" + mes06 + \"',\" + \"'\" + mes07 + \"',\" + \"'\" + mes08 + \"',\" + \"'\" + mes09 + \"',\" + \"'\" + mes10 + \"',\" + \"'\" + mes11 + \"',\" + \"'\" + mes12 + \"',\" + \"\" + Utilidades.getFechaBD() + \",\" + \"'\" + usuarioInsercion + \"'\" + \")\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 731 */ boolean rta = this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* 734 */ if (rta) {\n/* */ \n/* 736 */ s = \"delete from cal_plan_recursos_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + elSiguiente;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 742 */ this.dat.executeUpdate(s);\n/* 743 */ Iterator iterator = arrRecursos.iterator();\n/* 744 */ while (iterator.hasNext()) {\n/* 745 */ Integer codigo = (Integer)iterator.next();\n/* 746 */ crearRecurso(codigoCiclo, codigoPlan, elSiguiente, codigo.intValue(), \"A\", usuarioInsercion);\n/* */ } \n/* 748 */ s = \"delete from cal_plan_responsables_meta where codigo_ciclo=\" + codigoCiclo + \" and codigo_plan=\" + codigoPlan + \" and codigo_meta=\" + elSiguiente + this.dat.executeUpdate(s);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 756 */ Iterator iterator2 = arrResponsables.iterator();\n/* 757 */ while (iterator2.hasNext()) {\n/* 758 */ Integer codigo = (Integer)iterator2.next();\n/* 759 */ crearResponsable(codigoCiclo, codigoPlan, elSiguiente, codigo.intValue(), \"A\", usuarioInsercion);\n/* */ } \n/* */ } \n/* */ \n/* 763 */ return rta;\n/* */ }\n/* 765 */ catch (Exception e) {\n/* 766 */ e.printStackTrace();\n/* 767 */ Utilidades.writeError(\"%CalMetasDAO:crearRegistro \", e);\n/* */ \n/* 769 */ return false;\n/* */ } \n/* */ }", "private void insercionOrdenada(BTreeNode<T> currentNode, T t) {\n int indexNewKey = findChildOrIndex(currentNode, (I)t.getId());\n\n for (int i = currentNode.getNumKeys() - 1; i >= indexNewKey; i--) {\n currentNode.setKey(currentNode.getKey(i), i + 1);\n }\n\n currentNode.setKey(t, indexNewKey);\n\n currentNode.increaseNumKeys();\n }", "public int insert(){ // Wrapper insert function, passes random values to insert integer data in the tree.\n Random rn = new Random();\n\n\n for (int i = 0; i < 10; ++i)\n {\n insert(3);\n insert(5);\n insert(9);\n insert(5);\n insert(8);\n insert(1);\n insert(7);\n insert(4);\n insert(3);\n }\n return 1;\n }", "int insertSelective(Movimiento record);", "int insert(Movimiento record);", "public void nuevoPaciente(String idPaciente, String DNI, String nombres, String apellidos, String direccion, String ubigeo, String telefono1, String telefono2, String edad)\n {\n try\n {\n PreparedStatement pstm=(PreparedStatement)\n con.getConnection().prepareStatement(\"insert into \" + \" paciente(idPaciente, dui, nombres, apellidos, direccion, ubigeo, telefono1, telefono2, edad)\" + \"values (?,?,?,?,?,?,?,?,?)\");\n \n pstm.setString(1, idPaciente);\n pstm.setString(2, DNI);\n pstm.setString(3, nombres);\n pstm.setString(4, apellidos);\n pstm.setString(5, direccion);\n pstm.setString(6, ubigeo);\n pstm.setString(7, telefono1);\n pstm.setString(8, telefono2);\n pstm.setString(9, edad); \n \n pstm.execute();\n pstm.close();\n }\n catch(SQLException e)\n {\n System.out.print(e);\n }\n }", "int insert(GroupRightDAO record);", "private void insertRecursively(Node<T> parent, T value) {\n\n Node<T> node = new Node<>(value);\n\n // Traverses the tree to the left if the new node's key is less than the parent's key.\n if (value.compareTo(parent.getValue()) == -1) {\n\n // If the parent's left branch is empty, sets it as the new node.\n if (parent.getLeft() == null) parent.setLeft(node);\n // Otherwise, calls this method again, with the parent's left branch as the new parent.\n else insertRecursively(parent.getLeft(), value);\n\n // Traverses to the right with reversed logic.\n } else if (value.compareTo(parent.getValue()) == 1) {\n\n if (parent.getRight() == null) parent.setRight(node);\n else insertRecursively(parent.getRight(), value);\n }\n\n balance(parent.getLeft());\n balance(parent.getRight());\n balance(parent);\n }", "public void insercionMasiva() {\r\n\t\tif (!precondInsert())\r\n\t\t\treturn;\r\n\t\tUploadItem fileItem = seleccionUtilFormController.crearUploadItem(\r\n\t\t\t\tfName, uFile.length, cType, uFile);\r\n\t\ttry {\r\n\t\t\tlLineasArch = FileUtils.readLines(fileItem.getFile(), \"ISO-8859-1\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Error al subir el archivo\");\r\n\t\t}\r\n\r\n\t\tStringBuilder cadenaSalida = new StringBuilder();\r\n\t\tString estado = \"EXITO\";\r\n\t\tcantidadLineas = 0;\r\n\t\t//Ciclo para contar la cantdad de adjudicados o seleccionados que se reciben\r\n\t\tfor (String linea : lLineasArch) {\r\n\t\t\tcantidadLineas++;\r\n\t\t\tif(cantidadLineas > 1){\r\n\t\t\t\tseleccionados++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Condicion para verificar si la cantidad de seleccionados es mayor a la cantidad de vacancias (en cuyo caso se procede a abortar el proceso e imprimir\r\n\t\t//un mensaje de error) o verificar si esta es menor (se imprime el mensaje pero se continua)\r\n\t\t\r\n\t\tif(seleccionados > concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\testado = \"FRACASO\";\r\n\t\t\tcadenaSalida.append(estado + \" - CANTIDAD DE AJUDICADOS ES SUPERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\telse if(seleccionados < concursoPuestoAgrNuevo.getCantidadPuestos()){\r\n\t\t\tcadenaSalida.append(\"ADVERTENCIA - CANTIDAD DE ADJUDICADOS ES INFERIOR A LA CANTIDAD DE PUESTOS VACANTES PARA EL GRUPO\");\r\n\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t}\r\n\t\tseleccionados = 0;\r\n\t\t\r\n\t\tif(!estado.equals(\"FRACASO\")){\r\n\r\n\t\tcantidadLineas = 0;\r\n\t\tfor (String linea : lLineasArch) {\r\n\r\n\t\t\tcantidadLineas++;\r\n\t\t\testado = \"EXITO\";\r\n\t\t\tString observacion = \"\";\r\n\t\t\tFilaPostulante fp = new FilaPostulante(linea);\r\n\t\t\tList<Persona> lista = null;\r\n\t\t\tif (cantidadLineas > 1 && fp != null && fp.valido) {\r\n\t\t\t\t//Verifica si la persona leida en el registro del archivo CSV existe en la Tabla Persona\r\n\t\t\t\tString sqlPersona = \"select * from general.persona where persona.documento_identidad = '\"+fp.getDocumento()+ \"'\";\r\n\t\t\t\tQuery q1 = em.createNativeQuery(sqlPersona, Persona.class);\r\n\t\t\t\tPersona personaLocal = new Persona();\r\n\t\t\t\tint banderaEncontroPersonas = 0;\r\n\t\t\t\t//Si existe, se almacena el registro de la tabla\r\n\t\t\t\tif(!q1.getResultList().isEmpty()){\r\n\t\t\t\t\tlista = q1.getResultList();\r\n\t\t\t\t\tif (compararNomApe(lista.get(0).getNombres(), removeCadenasEspeciales(fp.getNombres()))\r\n\t\t\t\t\t\t\t&& compararNomApe(lista.get(0).getApellidos(), removeCadenasEspeciales(fp.getApellidos())) ) {\r\n\t\t\t\t\t\t\tbanderaEncontroPersonas = 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\t\tobservacion += \" PERSONA NO REGISTRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\tobservacion += \" PERSONA NO REGITRADA EN LA BASE DE DATOS LOCAL\";\r\n\t\t\t\t}\r\n\t\t\t\t//Verificamos que la persona figure en la lista corta como seleccionado\r\n\t\t\t\tif(!estado.equals(\"FRACASO\")){\r\n\t\t\t\t\tint banderaExisteEnListaCorta = 0;\t\t\t\t\t\r\n\t\t\t\t\tint i=0;\r\n\t\t\t\t\tif (banderaEncontroPersonas == 1) {\r\n\t\t\t\t\t\twhile(i<lista.size()){\r\n\t\t\t\t\t\t\tpersonaLocal = (Persona) lista.get(i);\r\n\t\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\t\tList<EvalReferencialPostulante> listaEvalRefPost = p.getResultList();\r\n\t\t\t\t\t\t\tif (!listaEvalRefPost.isEmpty()) {\r\n\t\t\t\t\t\t\t\tbanderaExisteEnListaCorta = 1;\r\n\t\t\t\t\t\t\t\ti = lista.size();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (banderaExisteEnListaCorta == 0) {\r\n\t\t\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\t\t\tobservacion += \" NO SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t} else if (banderaExisteEnListaCorta == 1){\r\n\t\t\t\t\t\tobservacion += \" SELECCIONADO/ELEGIBLE EN LISTA CORTA\";\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tQuery p = em.createQuery(\"select E from EvalReferencialPostulante E \"\r\n\t\t\t\t\t\t\t\t+ \"where E.postulacion.personaPostulante.persona.idPersona =:id_persona and E.concursoPuestoAgr.idConcursoPuestoAgr =:id_concurso_puesto_agr and E.listaCorta=:esta_en_lista_corta\");\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_persona\", personaLocal.getIdPersona());\r\n\t\t\t\t\t\t\t\tp.setParameter(\"id_concurso_puesto_agr\", this.idConcursoPuestoAgr);\r\n\t\t\t\t\t\t\t\tp.setParameter(\"esta_en_lista_corta\", true);\r\n\t\t\t\t\t\tEvalReferencialPostulante auxEvalReferencialPostulante = (EvalReferencialPostulante) p.getResultList().get(0);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//Validaciones para actualizaciones\r\n\t\t\t\t\t\t//Bandera indicadora de actualizaciones hechas\r\n\t\t\t\t\t\tint bandera = 0;\r\n\t\t\t\t\t\tif(auxEvalReferencialPostulante.getSelAdjudicado() == null){\r\n\t\t\t\t\t\t\testado = \"EXITO\";\r\n\t\t\t\t\t\t\tauxEvalReferencialPostulante.setSelAdjudicado(true);;\r\n\t\t\t\t\t\t\tbandera = 1;\r\n\t\t\t\t\t\t\tem.merge(auxEvalReferencialPostulante);\r\n\t\t\t\t\t\t\tem.flush();\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\tagregarEstadoMotivo(linea, estado, observacion, cadenaSalida);\r\n\t\t\t}\r\n\t\t\tif (cantidadLineas > 1 && !fp.valido) {\r\n\t\t\t\testado = \"FRACASO\";\r\n\t\t\t\tcadenaSalida\r\n\t\t\t\t\t\t.append(estado\r\n\t\t\t\t\t\t\t\t+ \" - ARCHIVO INGRESADO CON MENOS CAMPOS DE LOS NECESARIOS. DATOS INCORRECTOS EN ALGUNA COLUMNA.\");\r\n\t\t\t\tcadenaSalida.append(System.getProperty(\"line.separator\"));\r\n\t\t\t}\r\n\r\n\t\t\t// FIN FOR\r\n\t\t}\r\n\t\t//FIN IF\r\n\t\t}\r\n\t\tif (lLineasArch.isEmpty()) {\r\n\t\t\tstatusMessages.add(Severity.INFO, \"Archivo inválido\");\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSimpleDateFormat sdf2 = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\r\n\t\t\tString nArchivo = sdf2.format(new Date()) + \"_\" + fName;\r\n\t\t\tString direccion = System.getProperty(\"jboss.home.dir\") + System.getProperty(\"file.separator\") + \"temp\" + System.getProperty(\"file.separator\");\r\n\t\t\tFile archSalida = new File(direccion + nArchivo);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tFileUtils\r\n\t\t\t\t\t\t.writeStringToFile(archSalida, cadenaSalida.toString());\r\n\t\t\t\tif (archSalida.length() > 0) {\r\n\t\t\t\t\tstatusMessages.add(Severity.INFO, \"Insercion Exitosa\");\r\n\t\t\t\t}\r\n\t\t\t\tJasperReportUtils.respondFile(archSalida, nArchivo, false,\r\n\t\t\t\t\t\t\"application/vnd.ms-excel\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tstatusMessages.add(Severity.ERROR, \"IOException\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int insert(PathologyInfo record);", "private void insertRecursive(TrieNode current, String word, int index) {\n\t\t\n\t\tif(index == word.length()) {\n\t\t\tcurrent.isLeaf = true;\n\t\t\treturn;\n\t\t}\n\t\t Character ch = word.charAt(index);\t \n\t\t\tif (!current.getChild().containsKey(ch)) {\n\t\t\t\tTrieNode newNode = new TrieNode();\n\t\t\t\tcurrent.getChild().put(ch, newNode);\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.getChild().get(ch);\n\t\t\t\n insertRecursive(current, word, index++);\n\t}", "public void insertarRubro2(RubrosObject rubro) throws SQLException \r\n { \r\n PreparedStatement prepStmt = null;\r\n\r\n String insertStatement = \"INSERT INTO RUBROS (IDRUBRO, NOMBRE, MONTO, IDPRESUPUESTO,SALDO,TIPO_PAGO) VALUES (?,?,?,?,?,?)\";\r\n \r\n prepStmt = con.prepareStatement(insertStatement);\r\n \r\n prepStmt.setInt(1, Integer.parseInt(rubro.getIdentificador()));\r\n prepStmt.setString(2, rubro.getNombre());\r\n prepStmt.setDouble(3, Double.parseDouble(rubro.getMonto()));\r\n prepStmt.setInt(4, Integer.parseInt(rubro.getIdpresupuesto()));\r\n prepStmt.setDouble(5, Double.parseDouble(rubro.getMonto()));//EL SALDO SE INICIA IGUAL AL MONTO\r\n prepStmt.setString(6, rubro.getTipo_pago().trim());\r\n \r\n prepStmt.executeUpdate();\r\n \r\n \r\n if (prepStmt != null) {\r\n prepStmt.close();\r\n }\r\n\r\n }", "Node insertRec(Node root, int data) { \n \n // If the tree is empty, \n // return a new node \n if (root == null) { \n root = new Node(data); \n return root; \n } \n \n /* Otherwise, recur down the tree */\n if (data < root.data) \n root.left = insertRec(root.left, data); \n else if (data > root.data) \n root.right = insertRec(root.right, data); \n \n /* return the (unchanged) node pointer */\n return root; \n }", "public TreeNode insert(TreeNode root, int key) {\n if (root == null) {\n root = new TreeNode(key);\n return root;\n }\n TreeNode cur = root, par = root;\n while (cur != null) {\n par = cur;\n if (cur.key == key) {\n return root;\n }\n if (key < cur.key) {\n cur = cur.left;\n } else {\n cur = cur.right;\n }\n }\n // this is when cur is null (out of the while)\n if (key < par.key) {\n par.left = new TreeNode(key);\n } else {\n par.right = new TreeNode(key);\n }\n \n return root;\n }", "public static void registrarOperacionPrestamo(Usuario autor, long idPrestamo, Operacion operacion) throws DaoException {\r\n String msg = null;\r\n Prestamo prestamo = PrestamoDao.findPrestamoById(idPrestamo, null);\r\n Conexion con = null;\r\n try {\r\n HashMap<String, String> infoPrestamo;\r\n HashMap<String, Object> infoOperacion = new HashMap<String, Object>();\r\n infoOperacion.put(\"ID\", Consultas.darNumFilas(Operacion.NOMBRE_TABLA)+1);\r\n infoOperacion.put(\"FECHA\", Consultas.getCurrentDate());\r\n infoOperacion.put(\"TIPO\", operacion.getTipo());\r\n infoOperacion.put(\"ID_AUTOR\", autor.getId());\r\n\r\n \r\n con=new Conexion();\r\n switch (operacion.getTipo()) {\r\n case Operacion.PAGAR_CUOTA:\r\n PrestamoDao.registrarPagoCuota(prestamo,con);\r\n infoOperacion.put(\"MONTO\", prestamo.getValorCuota());\r\n infoOperacion.put(\"DESTINO\", \"0\");\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n \r\n break;\r\n case Operacion.PAGAR_CUOTA_EXTRAORDINARIA:\r\n \r\n //solo gasta lo necesario par apagar el prestamo\r\n if (operacion.getMonto()>prestamo.getCantidadRestante())\r\n {\r\n throw new DaoException(\"La cuota supera lo que debe\");\r\n }\r\n \r\n infoOperacion.put(\"MONTO\", operacion.getMonto());\r\n infoOperacion.put(\"DESTINO\",\"0\" );\r\n infoOperacion.put(\"METODO\", operacion.getMetodo());\r\n infoOperacion.put(\"ID_PRESTAMO\", prestamo.getId()); \r\n PrestamoDao.registrarPagoCuotaExtraordinaria(prestamo,operacion,con);\r\n break;\r\n case Operacion.CERRAR:\r\n if (prestamo.getCantidadRestante() != 0) {\r\n throw new DaoException( \"El prestamo no se ha pagado completamente\");\r\n } else {\r\n \r\n Consultas.insertar(null, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n String sentenciaCerrar = \"UPDATE PRESTAMOS SET ESTADO='CERRADO' WHERE ID=\" + prestamo.getId();\r\n con.getConexion().prepareStatement(sentenciaCerrar).executeUpdate();\r\n \r\n }\r\n \r\n }\r\n \r\n Consultas.insertar(con, infoOperacion, Operacion.infoColumnas, Operacion.NOMBRE_TABLA);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(OperacionDao.class.getName()).log(Level.SEVERE, null, ex); \r\n con.rollback();\r\n throw new DaoException();\r\n }\r\n\r\n \r\n }", "public void crearDepartamento(String nombredep, String num, int nvJefe, int horIn, int minIn, int horCi, int minCi) {\r\n\t\t// TODO Auto-generated method stub by carlos Sánchez\r\n\t\t//Agustin deberia devolverme algo q me indique si hay un fallo alcrearlo cual es\r\n\t\t//hazlo como mas facil te sea.Yo no se cuantos distintos puede haber.\r\n\t\r\n\t//para añadir el Dpto en la BBDD no se necesita el Nombre del Jefe\r\n\t//pero si su numero de vendedor (por eso lo he puesto como int) que forma parte de la PK \r\n\t\t\r\n\t\tint n= Integer.parseInt(num);\r\n\t\tString horaapertura=aplicacion.utilidades.Util.horaminutosAString(horIn, minIn);\r\n\t\tString horacierre=aplicacion.utilidades.Util.horaminutosAString(horCi, minCi);\r\n\t\tTime thI= Time.valueOf(horaapertura);\r\n\t\tTime thC=Time.valueOf(horacierre);\r\n\t\tthis.controlador.insertDepartamentoPruebas(nombredep, nvJefe,thI,thC); //tabla DEPARTAMENTO\r\n\t\tthis.controlador.insertNumerosDepartamento(n, nombredep); //tabla NumerosDEPARTAMENTOs\r\n\t\tthis.controlador.insertDepartamentoUsuario(nvJefe, nombredep); //tabla DepartamentoUsuario\r\n\r\n\t\t//insertamos en la cache\r\n\t\t//Departamento d=new Departamento(nombredep,Integer.parseInt(num),getEmpleado(nvJefe),null,null);\r\n\t\t//departamentosJefe.add(d);\r\n\t\t/*ArrayList<Object> aux=new ArrayList<Object>();\r\n\t\taux.add(nombredep);\r\n\t\taux.add(n);\r\n\t\taux.add(nvJefe);\r\n\t\tinsertCache(aux,\"crearDepartamento\");*///no quitar el parseInt\r\n\t}", "public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden, InputStream archivo){\n try {\n PreparedStatement dp = crearDeclaracionPreparada(conexion, datos, orden); \n dp.setBlob(datos.size() + 1, archivo);\n dp.executeUpdate();\n //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }", "@Override\r\n public Kiosque insertKiosque(Kiosque obj) {\r\n em.persist(obj);\r\n return obj;\r\n //To change body of generated methods, choose Tools | Templates.\r\n }", "@Override\r\n public void inserirQuestaoDiscursiva(QuestaoDiscursiva questaoDiscursiva)\r\n throws Exception {\n rnQuestaoDiscursiva.inserir(questaoDiscursiva);\r\n\r\n }", "public JsonNode insert(String resourcePath, String model, JsonNode jsonNode) {\n\t\tNitrite db = nitriteDbConnection.getConnection(resourcePath, model);\n\t\tNitriteCollection collection = db.getCollection(model);\n\t\tDocument doc = getDocument(jsonNode);\n\t\tcollection.insert(doc);\n\t\treturn getJsonNode(doc);\n\t}", "@Override\n\tpublic Tutorial insert(Tutorial t) {\n\t\treturn cotizadorRepository.save(t);\n\n\t\t\n\t}", "public void insert(int data) { \n\t\troot = insert(root, data);\t\n\t}", "public boolean insertarOrdenador(Ordenador o) {\n\t\tboolean resultado = false;\n\t\ttry {\n\t\t\tSimpleDateFormat formato = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\n\t\t\tXPathQueryService consulta = (XPathQueryService) col.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tconsulta.query(\"update insert \"\n\t\t\t\t\t+ \"<ordenador codigo='\"+o.getCodigo()+\"' fecha='\"+\n\t\t\t\t\t formato.format(o.getFecha())+\"'>\"\n\t\t\t\t\t + \"<piezas/>\" +\n\t\t\t\t\t \"<precio>0</precio>\" \n\t\t\t\t\t+\"</ordenador>\"\n\t\t\t\t\t+ \"into /ordenadores\");\n\t\t\tresultado=true;\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}", "public void insert(int key) {\n // Implement insert() using the non-recursive version\n // This function should call findClosestLeaf()\n\n if(root!=null){ // มี node ใน tree\n Node n = findClosestLeaf(key); //หา Leaf n ที่ใกล้ค่าที่ใส่มากที่สุด โดย call findClosestLeaf()\n\n\n if(n.key!= key){ // ค่าที่จะใส่ต้องไม่มีใน tree\n if(key > n.key){ // ค่าที่จะใส่มากกว่า Leaf n ให้ใส่เป็นลูฏของ Leaf ด้านขวา\n n.right = new Node(key);\n n.right.parent = n;\n }\n\n else { // ค่าที่จะใส่น้อยกว่า Leaf n ให้ใส่เป็นลูฏของ Leaf ด้านซ้าย\n n.left = new Node(key);\n n.left.parent = n;\n }\n }\n else\n {\n return;\n }\n\n }else{ // ไม่มี node ใน tree ดังนั้นค่าที่ใส่เข้ามาจะกลายเป็ฯ root\n root = new Node(key);\n }\n }", "public void insertNode(int d){\n if(root == null){\n root = new TreeNode(d);\n }\n else{\n root.insert(d);\n }\n }", "public void AgregarUsuario(Usuario usuario)\n {\n //encerramos todo en un try para manejar los errores\n try{\n //si no hay ninguna conexion entonces generamos una\n if(con == null)\n con = Conexion_Sql.getConexion();\n \n String sql = \"INSERT INTO puntajes(nombre,puntaje) values(?,?)\";\n \n PreparedStatement statement = con.prepareStatement(sql);\n statement.setString(1, usuario.RetornarNombre());\n statement.setInt(2, usuario.RetornarPremio());\n int RowsInserted = statement.executeUpdate();\n \n if(RowsInserted > 0)\n {\n System.out.println(\"La insercion fue exitosa\");\n System.out.println(\"--------------------------------------\");\n }\n else\n {\n System.out.println(\"Hubo un error con la insercion\");\n System.out.println(\"--------------------------------------\");\n }\n }\n catch(SQLException ex)\n {\n ex.printStackTrace();\n }\n }", "int insert(PensionRoleMenu record);", "protected void insertFromLeaf(Node node, Page page){\n if(!node.isFull()){\n // basta inserir \n if (node instanceof Leaf){\n Entry e = new Entry<Page>(page.getKey(), page);\n node.inserir(e);\n }else{\n Entry e = new Entry<IntNode>(page.getKey());\n //e.setKey(node.getEntry(node.size-1).getKey());\n node.inserir(e);\n }\n\n }else{\n \n Node nodep;\n if(node instanceof Leaf){\n nodep = new Leaf(n);\n }else{\n nodep = new IntNode(n);\n }\n\n node.split(nodep);\n\n // a chave dessa entrada deve ser o maximo do left\n\n Node pai;\n Entry e1;\n if(!node.hasPai()){\n \n pai = new IntNode(n);\n \n int at = 0;\n if(node.size > 0){\n at = node.size-1;\n } \n\n e1 = new Entry<Node>(node.getEntry(at).getKey(), node, nodep);\n e1.setKey(node.getEntry(node.size-1).getKey());\n \n pai.inserir(e1);\n \n node.setPai((IntNode) pai);\n head = pai;\n \n }else{ \n pai = node.pai;\n e1 = new Entry<Node>(node.getKey(node.size - 1), node, nodep);\n \n pai.inserir(e1);\n }\n nodep.setPai((IntNode) pai);\n\n // decidindo se insere no node ou nodep\n int i = node.find(page.getKey());\n if(i >= node.size){\n nodep.inserir(e1);\n }else{ \n node.inserir(e1);\n }\n\n //down(pai, page);\n //insertFromLeaf(pai, page);\n }\n }", "public static Nodo insertaNodo(Nodo arbol) {\n\n if (arbol.info > n.info) {\n if (arbol.izq == null) {\n arbol.izq = n;\n } else {\n insertaNodo(arbol.izq);\n }\n } else if (arbol.info < n.info) {\n if (arbol.der == null) {\n arbol.der = n;\n } else {\n insertaNodo(arbol.der);\n }\n }\n return arbol;\n }", "public void domicilioAgregar() {\r\n\t\tlog.info(\"Domicilio agregar \" + nuevoDomici.getDomicilio());\r\n\t\tboolean verifica = false;\r\n\t\tmensaje = null;\r\n\t\tnuevoDomici.setTbTipoCasa(objTipoCasaService.findTipoCasa(Tipocasanuevo));\r\n\t\tnuevoDomici.setDomicilio(domicilio);\r\n\t\tnuevoDomici.setReferencia(referencia);\r\n\t\tnuevoDomici.setTbUbigeo(objUbigeoService.findUbigeo(idUbigeo));\r\n\t\tlog.info(\"TIPO-CASA-NUEVO--->\"+nuevoDomici.getTbTipoCasa().getIdtipocasa());\r\n\t\tnuevoDomici.setNuevoD(1);\r\n\t\t//aqui ponfo el ID-Domicilio a la lista Domicilio temporalmente.\r\n\t\tnuevoDomici.setIddomiciliopersona(0);\r\n\t\tnuevoDomici.setTbEstadoGeneral(objEstadoGeneralService.findEstadogeneral(15));\r\n\t\t\r\n\t\tfor (int i = 0; i < DomicilioPersonaList.size(); i++) {\r\n\t\t\tlog.info(\" \"+ DomicilioPersonaList.get(i).getDomicilio() + \" \" + nuevoDomici.getDomicilio());\r\n\t\t\tif (DomicilioPersonaList.get(i).getDomicilio().equals(nuevoDomici.getDomicilio())) {\r\n\t\t\t\tverifica = false;\r\n\t\t\t\tmensaje = \"el Domicilio ya se encuentra registrado en la lista de domiclio cliente\";\r\n\t\t\t\tbreak;\r\n\t\t\t}else {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (DomicilioPersonaList.size() == 0) {\r\n\t\t\t\tverifica = true;\r\n\t\t\t\t}\r\n\t\t\tif (verifica) {\r\n\t\t\t\tnuevoDomici.setItem(\"Por Agregar\");\r\n\t\t\t\tDomicilioPersonaList.add(nuevoDomici);\r\n\t\t\t\tlog.info(\"se agrego \"+ nuevoDomici.getDomicilio());\r\n\t\t\t\t}\r\n\t\t\tif (mensaje != null) {\r\n\t\t\t\tmsg = new FacesMessage(FacesMessage.SEVERITY_FATAL,\r\n\t\t\t\tConstants.MESSAGE_ERROR_FATAL_TITULO, mensaje);\r\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\r\n\t\t\t\t}\r\n\t\t\tnuevoDomici = new DomicilioPersonaSie();\r\n\t\t}", "public void insert(T data)\r\n {\r\n root = insert(root, data);\r\n }", "@Override\n public boolean insertar(T dato){\n //Si el arbol se encuentra vacio\n if (esVacio()) {\n super.setRaiz(new NodoBin<T>(dato));\n return (true);\n } \n super.setRaiz(buscarAS(dato));\n int cmp = ((Comparable)dato).compareTo(super.getRaiz().getInfo()); \n // Si el dato es menor a la raiz\n if (cmp < 0) {\n NodoBin<T> n = new NodoBin<T>(dato);\n n.setIzq(super.getRaiz().getIzq());\n n.setDer(super.getRaiz());\n super.getRaiz().setIzq(null);\n super.setRaiz(n);\n return (true);\n }\n // Si el dato es mayor a la raiz\n else if (cmp > 0) {\n NodoBin<T> n = new NodoBin<T>(dato);\n n.setDer(super.getRaiz().getDer());\n n.setIzq(super.getRaiz());\n super.getRaiz().setDer(null);\n super.setRaiz(n);\n return (true);\n }\n return (false);\n }", "public static void registrarOrden(java.sql.Connection conexion, ArrayList<String> datos, String orden){\n try { \n crearDeclaracionPreparada(conexion, datos, orden).executeUpdate(); //Ejecutamos la orden de tipo Query creada a partir de la orden y datos dados\n if(conexion.isClosed() == false)//si la conexion está abierta la cerramos\n conexion.close();\n } catch (SQLException ex) {\n System.out.println(\"\\n\\n\\n\"+ex); //Imprimimos el error en consola en caso de fallar \n } \n }", "@Override\r\n\tpublic void insertar() {\n\t\ttab_nivel_funcion_programa.insertar();\r\n\t\t\t\r\n\t\t\r\n\t}", "public void insertFixup(ArvoreRB A,Node z){ \r\n \r\n while ( z.pai.cor == \"vermelho\"){ \r\n if (z.pai == z.pai.pai.esq) {\r\n Node y = z.pai.pai.dir; \r\n if (y.cor== \"vermelho\") {\r\n z.pai.cor = \"preto\";\r\n y.cor = \"preto\";\r\n z.pai.pai.cor = \"vermelho\";\r\n z = z.pai.pai;\r\n } else {\r\n if (z == z.pai.dir) {\r\n z = z.pai;\r\n rotacaoEsq(A,z);\r\n }\r\n z.pai.cor = \"preto\";\r\n z.pai.pai.cor = \"vermelho\";\r\n rotacaoDir(A,z.pai.pai);\r\n }\r\n }else {\r\n if (z.pai == z.pai.pai.dir) { \r\n Node y = z.pai.pai.esq;\r\n if (y.cor == \"vermelho\") {\r\n z.pai.cor = \"preto\";\r\n y.cor = \"preto\";\r\n z.pai.pai.cor = \"vermelho\";\r\n z = z.pai.pai; \r\n }\r\n else{\r\n if (z == z.pai.esq) {\r\n z = z.pai;\r\n rotacaoDir(A,z); \r\n }\r\n z.pai.cor = \"preto\";\r\n z.pai.pai.cor = \"vermelho\";\r\n rotacaoEsq(A,z.pai.pai);\r\n } \r\n \r\n } \r\n A.raiz.cor = \"preto\";\r\n } \r\n }\r\n }", "static void insert(String key)\n {\n \n int len=key.length();\n trie_node crawl=root;\n for(int i=0;i<len;i++)\n {\n int idx=key.charAt(i);\n if(crawl.child[idx]==null)\n crawl.child[idx]=new trie_node();\n else\n crawl.child[idx].f++;\n\n crawl=crawl.child[idx];\n } \n \n \n }", "private void insertarOrdenado(NodoBAVL<T> n, T o, int index) {\n if (o.compareTo(n.getElemento()) < 0) {\n if (n.getIzquierda() == null) {\n n.setIzquierda(new NodoBAVL<>(o, null, null, n));\n n.getIzquierda().getEgresados().add(index);\n recalcularFE(n);\n } else {\n insertarOrdenado((NodoBAVL) n.getIzquierda(), o, index);\n }\n } else if (o.compareTo(n.getElemento()) > 0) {\n if (n.getDerecha() == null) {\n n.setDerecha(new NodoBAVL<>(o, null, null, n));\n n.getDerecha().getEgresados().add(index);\n recalcularFE(n);\n } else {\n insertarOrdenado((NodoBAVL) n.getDerecha(), o, index);\n }\n } else {\n n.getEgresados().add(index);\n }\n }", "public static void Levelinsert (int id,String FQN,String name, String container,int number,String table )\n\t { \n\t \n\t \ttry \n\t { \n\t Statement stmt=null; \n\t ResultSet res=null; \n\t Class.forName(\"com.mysql.jdbc.Driver\"); \n\t Connection conn = DriverManager.getConnection(sqldatabase,mysqluser,mysqlpassword); \n\t stmt = (Statement)conn.createStatement(); \n\t res= stmt.executeQuery(\"SELECT * from level \"); \n\n\n\t // 增加数据\n\t Statement stm = (Statement) conn.createStatement();// 提交查巡\n\t String sql = \"select * from level\";\n\t ResultSet rs = stm.executeQuery(sql);// 取得查巡結果\n//\t sql = \"insert into entity (id,name,FQN,container) values ('6','AccountType','Example2.O2.AccountType','Example2.O10')\";\n\t \n\t int n = stm.executeUpdate(\"insert into \"+table+\"(id,FQN,name, container,number) values (\"+\"'\"+id+\"'\"+\",\"+\"'\"+FQN+\"'\"+\",\"+\"'\"+name+\"'\"+\",\"+\"'\"+container+\"'\"+\",\"+\"'\"+number+\"'\"+\")\"); // 增加数据 \n\t if (n > 0) {\n//\t JOptionPane.showMessageDialog(null, \"成功\");\n\t \n\t \n\t } else {\n//\t JOptionPane.showMessageDialog(null, \"失败\");\n\t }\n\t //增加数据结束\n\n\t while (res.next()) \n\t { \n\n\t } \n\t } \n\t \n\t catch(Exception ex) \n\t { \n\t ex.printStackTrace(); \n\t } \n\t}", "int insert(ParUsuarios record);", "public int insert(int newKey){\n int i=n-1;\n int x =0;\n if (isLeaf){\n while ((i>=0)&& (newKey<=key[i])) {\n if(newKey==key[i]) \n return -1;//duplicate return withoiut doinganything\n key[i+1] = key[i];\n i--;\n \n }\n if(x>=0){\n n++;\n key[i+1]=newKey;\n }\n }\n else{\n while ((i>=0)&& (newKey<=key[i])) {\n if(newKey==key[i])\n return -1;// find duplictte return without doing anithing \n \n else\n i--;\n }\n if(x>=0){\n \n int insertChild = i+1; // Subtree where new key must be inserted\n if (c[insertChild].isFull()){\n x++;// one more node.\n // The root of the subtree where new key will be inserted has to be split\n // We promote the mediand of that root to the current node and\n // update keys and references accordingly\n \n //System.out.println(\"This is the full node we're going to break \");// Debugging code\n //c[insertChild].printNodes();\n //System.out.println(\"going to promote \" + c[insertChild].key[T-1]);\n n++;\n c[n]=c[n-1];\n for(int j = n-1;j>insertChild;j--){\n c[j] =c[j-1];\n key[j] = key[j-1];\n }\n key[insertChild]= c[insertChild].key[T-1];\n c[insertChild].n = T-1;\n \n BTreeNode newNode = new BTreeNode(T);\n for(int k=0;k<T-1;k++){\n newNode.c[k] = c[insertChild].c[k+T];\n newNode.key[k] = c[insertChild].key[k+T];\n }\n \n newNode.c[T-1] = c[insertChild].c[2*T-1];\n newNode.n=T-1;\n newNode.isLeaf = c[insertChild].isLeaf;\n c[insertChild+1]=newNode;\n \n //System.out.println(\"This is the left side \");\n //c[insertChild].printNodes(); \n //System.out.println(\"This is the right side \");\n //c[insertChild+1].printNodes();\n //c[insertChild+1].printNodes();\n \n if (newKey <key[insertChild]){\n c[insertChild].insert(newKey); }\n else{\n c[insertChild+1].insert(newKey); }\n }\n else\n c[insertChild].insert(newKey);\n }\n \n \n }\n return x ;\n }", "public void insertar(Trabajo t){\r\n\t\tif(!estaLlena()){\r\n\t\t\tultimo = siguiente(ultimo);\r\n\t\t\telementos[ultimo] = t;\r\n\t\t}\r\n\t}" ]
[ "0.6917432", "0.6475217", "0.64354783", "0.62799203", "0.6258545", "0.61179435", "0.6116147", "0.6098622", "0.5997656", "0.5900724", "0.5892287", "0.58641183", "0.5842538", "0.5796372", "0.57947123", "0.5793337", "0.578084", "0.57661515", "0.57435685", "0.5726894", "0.5717001", "0.57122564", "0.5679614", "0.56789786", "0.5677406", "0.56717527", "0.56638926", "0.56543434", "0.56198514", "0.56187177", "0.5608089", "0.55879337", "0.55838776", "0.5579324", "0.5562549", "0.5551913", "0.5545831", "0.55162424", "0.55112535", "0.5491347", "0.54865146", "0.5477498", "0.5473286", "0.54685897", "0.54636514", "0.5461524", "0.54553765", "0.54491365", "0.5444231", "0.5440781", "0.5433621", "0.54262334", "0.5422342", "0.5414239", "0.54080695", "0.54041606", "0.5403587", "0.5403539", "0.54028016", "0.5402506", "0.5390919", "0.5387417", "0.5382503", "0.5375071", "0.53707784", "0.53679335", "0.5354939", "0.53409356", "0.5337579", "0.5332957", "0.532977", "0.5325242", "0.5321988", "0.5321791", "0.5319766", "0.53195685", "0.53163105", "0.53132784", "0.53079695", "0.53002644", "0.52999294", "0.5298972", "0.5298621", "0.5295123", "0.52935517", "0.5288671", "0.52856565", "0.5281365", "0.5277601", "0.5268424", "0.5265295", "0.52643085", "0.52583635", "0.5251824", "0.5250095", "0.52483237", "0.5246001", "0.5245905", "0.52419853", "0.5241233", "0.5234628" ]
0.0
-1
Se encarga de eliminar un recurso.
public void eliminar(Long id) throws AppException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removerFinal() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n ElementoLista elementoTemporarioAnteriorAtual = this.primeiro;\n ElementoLista elementoTemporarioAtual = this.primeiro.irParaProximo();\n for (int i = 1; i < totalElementos(); i++) {\n elementoTemporarioAnteriorAtual = elementoTemporarioAtual;\n elementoTemporarioAtual = elementoTemporarioAtual.irParaProximo();\n }\n\n this.ultimo = elementoTemporarioAnteriorAtual;\n this.ultimo.definirProximo(null);\n this.total--;\n }\n //this.ultimo = this.ultimo.irParaAnterior();\n //this.ultimo.definirProximo(null);\n }", "@Override\n\tpublic void eliminar() {\n\t\t\n\t}", "@Override\n\tpublic void eliminar() {\n\n\t}", "public int eliminarAlFinal(){\n int edad = fin.edad;\n if(fin==inicio){\n inicio=fin=null;\n }else{\n Nodo auxiliar=inicio;\n while(auxiliar.siguiente!=fin){\n auxiliar=auxiliar.siguiente;\n }\n fin=auxiliar;\n fin.siguiente=null;\n }\n return edad;\n }", "@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}", "public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}", "public int eliminar() {\n if (estaVacia()) { // si esta vacia\r\n System.out.println(\"La pila esta vacia\"); // mensaje indicando que esta vaci\r\n return -1; // retorno\r\n } else { // si no esta vacia\r\n reducirTamanio(); // ejecutamos el metodo para checar si el tamaño puede ser reducido (ver metodo en linea 58)\r\n return array[top--]; // decrementamos el arreglo\r\n }\r\n }", "private void EliminarAristaNodo (NodoGrafo nodo ,int v){\n\t\tNodoArista aux = nodo.arista;\n\t\tif (aux != null) {\n\t\t\t// Si la arista a eliminar es la primera en\n\t\t\t// la lista de nodos adyacentes\n\t\t\tif (aux.nodoDestino.nodo == v){\n\t\t\t\tnodo.arista = aux.sigArista;\n\t\t\t}\n\t\t\telse {\n\t\t\t\twhile (aux.sigArista!= null && aux.sigArista.nodoDestino.nodo != v){\n\t\t\t\t\taux = aux.sigArista;\n\t\t\t\t}\n\t\t\t\tif (aux.sigArista!= null) {\n\t\t\t\t\t// Quita la referencia a la arista hacia v\n\t\t\t\t\taux.sigArista = aux.sigArista.sigArista;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void removerInicio() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n this.primeiro = this.primeiro.irParaProximo();\n this.total--;\n break;\n }\n }", "protected void xremove(Node<T> u) {\n\t\tif (u == r) {\n\t\t\tremove();\n\t\t} else {\n\t\t\tif (u == u.parent.left) {\n\t\t\t\tu.parent.left = nil;\n\t\t\t} else {\n\t\t\t\tu.parent.right = nil;\n\t\t\t}\n\t\t\tu.parent = nil;\n\t\t\tr = merge(r, u.left);\n\t\t\tr = merge(r, u.right);\n\t\t\tr.parent = nil;\n\t\t\tn--;\n\t\t}\n\t}", "public void removerPorReferencia(int referencia){\n if (buscar(referencia)) {\n // Consulta si el nodo a eliminar es el pirmero\n if (inicio.getEmpleado().getId() == referencia) {\n // El primer nodo apunta al siguiente.\n inicio = inicio.getSiguiente();\n // Apuntamos con el ultimo nodo de la lista al inicio.\n ultimo.setSiguiente(inicio);\n } else{\n // Crea ua copia de la lista.\n NodoEmpleado aux = inicio;\n // Recorre la lista hasta llegar al nodo anterior\n // al de referencia.\n while(aux.getSiguiente().getEmpleado().getId() != referencia){\n aux = aux.getSiguiente();\n }\n if (aux.getSiguiente() == ultimo) {\n aux.setSiguiente(inicio);\n ultimo = aux;\n } else {\n // Guarda el nodo siguiente del nodo a eliminar.\n NodoEmpleado siguiente = aux.getSiguiente();\n // Enlaza el nodo anterior al de eliminar con el\n // sguiente despues de el.\n aux.setSiguiente(siguiente.getSiguiente());\n // Actualizamos el puntero del ultimo nodo\n }\n }\n // Disminuye el contador de tama�o de la lista.\n size--;\n }\n }", "public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }", "@Override\r\n public void remove() {\n Node current = exp.head;\r\n if( current.next == null ){\r\n exp.head = null;\r\n }\r\n\r\n while( current.next.next != null ){\r\n current = current.next;\r\n }\r\n current.next = null; // current.next son elemani gosterir.\r\n\r\n }", "public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }", "public void eliminar(String tag) throws NotFoundNodeException {\n\n if (this.buscar(tag) != null) {\n NodoListaDoble<T> tmp = this.raiz;\n boolean eliminado = false;\n while (!eliminado) {\n if (tmp.getTag().equals(tag)) {\n if (tmp == this.raiz) {\n NodoListaDoble<T> ant = this.raiz.getAnterior();\n NodoListaDoble<T> sig = this.raiz.getSiguiente();\n if (sig != null) {\n sig.setAnterior(ant);\n }\n this.raiz = sig;\n eliminado = true;\n break;\n } else {\n NodoListaDoble<T> ant = tmp.getAnterior();\n NodoListaDoble<T> sig = tmp.getSiguiente();\n ant.setSiguiente(sig);\n if (sig != null) {\n sig.setAnterior(ant);\n }\n eliminado = true;\n break;\n }\n }\n\n tmp = tmp.getSiguiente();\n }\n } else {\n throw new NotFoundNodeException(\"No existe un elemento con tag: \" + tag);\n }\n }", "@Override\n public boolean eliminar(T dato) {\n if (esVacio())\n return (false); \n super.setRaiz(buscarAS(dato));\n int cmp = ((Comparable)dato).compareTo(super.getRaiz().getInfo()); \n //Si se encontro el elemento\n if (cmp==0){\n if (super.getRaiz().getIzq()==null){\n super.setRaiz(super.getRaiz().getDer());\n } \n else {\n NodoBin<T> x = super.getRaiz().getDer();\n super.setRaiz(super.getRaiz().getIzq());\n super.setRaiz(biselar(super.getRaiz(), dato));\n super.getRaiz().setDer(x);\n }\n return (true);\n }\n //El dato no fue encontrado\n return (false);\n }", "public void removerPorReferencia(String referencia){\n if (buscar(referencia)) {\r\n // Consulta si el nodo a eliminar es el pirmero\r\n if (inicio.getValor() == referencia) {\r\n // El primer nodo apunta al siguiente.\r\n inicio = inicio.getSiguiente();\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al nodo anterior \r\n // al de referencia.\r\n while(aux.getSiguiente().getValor() != referencia){\r\n aux = aux.getSiguiente();\r\n }\r\n // Guarda el nodo siguiente del nodo a eliminar.\r\n Nodo siguiente = aux.getSiguiente().getSiguiente();\r\n // Enlaza el nodo anterior al de eliminar con el \r\n // sguiente despues de el.\r\n aux.setSiguiente(siguiente); \r\n }\r\n // Disminuye el contador de tamaño de la lista.\r\n tamanio--;\r\n }\r\n }", "private Nodo eliminarNodo(Nodo aux, int dato) {\n\t\tif(aux == null) { \r\n\t\t\tSystem.out.println(\"El nodo no se encontro\");\r\n\t\t}else if(dato < aux.getDato()) { // Se busca el dato por el lado izquierdo.\r\n\t\t\tNodo izq = eliminarNodo(aux.getHijoIzq(), dato);\r\n\t\t\taux.setHijoIzq(izq);\r\n\t\t}else if (dato > aux.getDato()) { // Se busca el dato por el lado derecho.\r\n\t\t\tNodo der = eliminarNodo(aux.getHijoDer(), dato);\r\n\t\t\taux.setHijoIzq(der);\r\n\t\t}else { // Un vez encontrado se ejecuta el else.\r\n\t\t\tNodo n = aux; \r\n\t\t\tif(n.getHijoDer() == null) {// si el nodo del lado derecho es igual null se captura el nodo izquierdo.\r\n\t\t\t\taux = n.getHijoIzq(); \r\n\t\t\t}else if (n.getHijoIzq() == null) {// si el nodo del lado izquierdo es igual null se captura el nodo izquierdo.\r\n\t\t\t\taux = n.getHijoDer();\r\n\t\t\t}else { // Si el nodo a eliminar tiene dos hijos entonces hacemos cambiamos los lugaresa para despues eliminarlo. \r\n\t\t\t\tn = cambiar(n);\r\n\t\t\t}\r\n\t\t\tn = null; // ELiminamos el nodo.\r\n\t\t}\r\n\t\treturn aux;\r\n\t}", "public void eliminar(Object o) {\n\t\t\n\t}", "public void eliminarElemento(T dato) {\n\t\tNodeTabla<K, T> nodo = primerElemento;\n\n\t\t// itera los elementos hasta que se acaben o encuentre el elemento\n\t\twhile (nodo != null && !nodo.getElemento().equals(dato)) {\n\t\t\tnodo = nodo.getSiguiente();\n\t\t}\n\n\t\t// se encontro el nodo?\n\t\tif (nodo != null) {\n\t\t\tif (nodo != primerElemento) {\n\t\t\t\t// borra el nodo de la existencia\n\t\t\t\tnodo.getAnterior().setSiguiente(nodo.getSiguiente());\n\t\t\t\tnodo.getSiguiente().setAnterior(nodo.getAnterior());\n\t\t\t} else {\n\t\t\t\tprimerElemento = primerElemento.getSiguiente();\n\t\t\t}\n\t\t\t// baja en uno el tamano\n\t\t\ttamano--;\n\n\t\t} else {\n\t\t\t// Bruh, no esta el nodo\n\t\t\tSystem.out.println(\"No se encontro el elemento a eliminar.\");\n\t\t}\n\n\t}", "public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }", "public void eliminar(ListaConArreglo nodosMaquina){\n\t\tmodAdmin.eliminar( nodosMaquina);\n\t\tif(!ModAdmin.existe){\n\t\t\tSystem.err.println(\"El dominio indicado no existe en la base\");\n\t\t}\n\t\tModAdmin.existe=false;\n\t}", "private void eliminarLibro(int pos) {\n\t\t// TODO Auto-generated method stub\n\t\tint contador = 0;\n\t\tboolean parar = false;\n\t\tLibro aux;\n\t\t\n\t\twhile((contador < lb.length) && !parar) {\n\t\t\tif(lb[contador] == null) {\n\t\t\t\tparar = true;\n\t\t\t\tcontador--;\n\t\t\t}else {\n\t\t\t\tcontador++;\n\t\t\t}\n\t\t}\n\t\tif(!parar) contador = lb.length-1;\n\t\t\n\t\taux = lb[pos];\n\t\tlb[pos] = lb[contador];\n\t\tlb[contador] = null;\n\t\tlb[lb.length-1] = aux;\n\t\tlb = Arrays.copyOf(lb, lb.length-1);\n\t\tif(lb[pos] == null) {\n\t\t\tfor(int i=pos; i<lb.length-1;i++) {\n\t\t\t\tlb[i] = lb[i+1];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void EliminarElmento(int el) throws Exception{\n if (!estVacia()) {\n if (inicio == fin && el == inicio.GetDato()) {\n inicio = fin = null;\n } else if (el == inicio.GetDato()) {\n inicio = inicio.GetSiguiente();\n } else {\n NodoDoble ante, temporal;\n ante = inicio;\n temporal = inicio.GetSiguiente();\n while (temporal != null && temporal.GetDato() != el) {\n ante = ante.GetSiguiente();\n temporal = temporal.GetSiguiente();\n }\n if (temporal != null) {\n ante.SetSiguiente(temporal.GetSiguiente());\n if (temporal == fin) {\n fin = ante;\n }\n }\n }\n }else{\n throw new Exception(\"No existen datos por borrar!!!\");\n }\n }", "public LinkedList<Nodo> eliminarNodoNotExec(Nodo nodoElim){\n LinkedList<Nodo> nodoNotExec=new LinkedList<>();\n \n for(Nodo n:nodoElim.getHermanos().values()){\n //if((n.getParent()==nodoElim.getParent())&&(n.getSimbolo().equals(nodoElim.getSimbolo()))){\n nodoNotExec.add(n);\n \n //}\n }\n if(!nodoNotExec.isEmpty()){\n for(Nodo n:nodoNotExec){\n panelPadre.getChildren().removeAll(n.getRectangle(),n.getLabel());\n //nodos.remove(n);\n } \n \n } \n return nodoNotExec;\n }", "public static void borrarhijoRecursivo(Path carpetaHija) {\n\n\t\tDirectoryStream<Path> hijosCarpeta;// Este objeto sirve para poder iterar directorios lo convertimos en una\n\t\t\t\t\t\t\t\t\t\t\t// especie\n\t\t// de lista para guardar varios Path\n\n\t\ttry {\n\n\t\t\thijosCarpeta = Files.newDirectoryStream(carpetaHija);// hacemos esto para crear diferentes Path en los\n\t\t\t// subdirectorios de carpeta\n\n\t\t\t// y en el segundo borrar los ficheros\n\t\t\tfor (Path entry : hijosCarpeta) {\n\n\t\t\t\tif (Files.isDirectory(entry)) {\n\t\t\t\t\tSystem.out.println(\"entrando en\" + entry);\n\t\t\t\t\tborrarhijoRecursivo(entry);\n\t\t\t\t} else {\n\n\t\t\t\t\tSystem.out.println(\"borrando\" + entry);\n\t\t\t\t\tFiles.delete(entry);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Borrando carpeta \" + carpetaHija.toAbsolutePath());\n\t\t\tFiles.delete(carpetaHija);\n\n\t\t\t// llamamos otra vez a la funcion recursivamente para crear la carpeta\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public boolean eliminar() {\r\n if (colaVacia()) {\r\n return false;\r\n }\r\n\r\n if (ini == fin) {\r\n ini = fin = -1;\r\n } else {\r\n ini++;\r\n }\r\n\r\n return true;\r\n }", "public void eliminar(TipoDocumento tpDocu) {\n try {\n boolean verificarReLaboraldEnTpDocu = servReLaboral.buscarRegistroPorTpDocumento(tpDocu);\n if (verificarReLaboraldEnTpDocu) {\n MensajesFaces.informacion(\"No se puede eliminar\", \"Existen Datos Relacionados\");\n } else {\n servtpDocumento.eliminarTipoDocumento(tpDocu);\n tipoDocumento = new TipoDocumento();\n MensajesFaces.informacion(\"Eliminado\", \"Exitoso\");\n }\n } catch (Exception e) {\n MensajesFaces.advertencia(\"Error al eliminar\", \"detalle\" + e);\n }\n }", "public void removerCarro() {\n\n if (carrosCadastrados.size() > 0) {//verifica se existem carros cadastrados\n listarCarros();\n System.out.println(\"Digite o id do carro que deseja excluir\");\n int idCarro = verifica();\n for (int i = 0; i < carrosCadastrados.size(); i++) {\n if (carrosCadastrados.get(i).getId() == idCarro) {\n if (carrosCadastrados.get(i).getEstado()) {//para verificar se o querto está sendo ocupado\n System.err.println(\"O carrp está sendo utilizado por um hospede nesse momento\");\n } else {\n carrosCadastrados.remove(i);\n System.err.println(\"cadastro removido\");\n }\n }\n\n }\n } else {\n System.err.println(\"Não existem carros cadastrados\");\n }\n }", "private T remove(Node<T> rm_node) {\n //if(node.previous == null) return removeFirst(); //If its a first node to remove.\n //if(node.next == null) return removeLast(); //If it's last node to remove.\n\n rm_node.next.previous = rm_node.previous; //pointing deleting nodes next element to deleting nodes prev. 3 <--- 4 ---> 5\n rm_node.previous.next = rm_node.next; //pointing deleting nodes prev element to deleting nodes next. deleting 4\n\n T data = rm_node.data; //to return deleted node data.\n\n rm_node.data = null;\n rm_node = rm_node.previous = rm_node.next = null; //Clearing node\n --size;\n\n return data;\n }", "public int eliminardelfinal(){\n int elemento=fin.dato;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n fin=fin.anterior;\n fin.siguiente=null;}\n return elemento;\n }", "public void eliminarBodegaActual(){\n Nodo_bodega_actual.obtenerAnterior().definirSiguiente(Nodo_bodega_actual.obtenerSiguiente());\n if(Nodo_bodega_actual.obtenerSiguiente() != null){\n Nodo_bodega_actual.obtenerSiguiente().definirAnterior(Nodo_bodega_actual.obtenerAnterior());\n } \n }", "public Stack pilaEliminaDatos( Stack pila )\n {\n // Verificamos que la pila no este vacia para eliminar datos\n if (!pila.isEmpty())\n {\n this.imprime(\"Se ha eliminado este elemento ->\" + pila.peek() +\"<- de la pila\");\n pila.pop();\n }\n else\n {\n this.imprime(\"La pila esta vacia, no se pueden eliminar datos\");\n }\n\n return pila;\n }", "@Override\n public boolean eliminar(T dato) {\n try {\n this.raiz = eliminar(this.raiz, dato);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "public static void borrarCrearRecursivo(Path carpeta) {\n\n\t\tString res = \"\";\n\t\t// si la carpeta no existe la creamos\n\n\t\t// caso base\n\t\tif (!Files.isDirectory(carpeta)) {\n\t\t\ttry {\n\t\t\t\tFiles.createDirectories(carpeta);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"Hemos creado la carpeta\" + carpeta.toAbsolutePath());\n\t\t\t// Caso recursivo\n\n\t\t} else {\n\n\t\t\tDirectoryStream<Path> hijosCarpeta;// Este objeto sirve para poder iterar directorios lo convertimos en una\n\t\t\t\t\t\t\t\t\t\t\t\t// especie\n\t\t\t// de lista para guardar varios Path\n\t\t\ttry {\n\n\t\t\t\thijosCarpeta = Files.newDirectoryStream(carpeta);// hacemos esto para crear diferentes Path en los\n\t\t\t\t// subdirectorios de carpeta\n\n\t\t\t\t// y en el segundo borrar los ficheros\n\t\t\t\tfor (Path entry : hijosCarpeta) {\n\n\t\t\t\t\tif (Files.isDirectory(entry)) {\n\t\t\t\t\t\tSystem.out.println(\"entrando en\" + entry);\n\t\t\t\t\t\tborrarhijoRecursivo(entry);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tres += \"Borrando \" + entry + \"\\n\";\n\t\t\t\t\t\tSystem.out.println(\"borrando \" + entry);\n\t\t\t\t\t\tFiles.delete(entry);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Borrando carpeta \" + carpeta);\n\t\t\t\tFiles.delete(carpeta);\n\n\t\t\t\t// llamamos otra vez a la funcion recursivamente para crear la carpeta\n\t\t\t\tborrarCrearRecursivo(carpeta);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t}", "public void eliminar(DetalleArmado detallearmado);", "@Override\r\n public void removerConcursando(long id) throws Exception {\n rnConcursando.remover(id);\r\n }", "private void eliminarDisparos(int num){\n\t\t\n\t\tnumDisparos--;\n\t\tfor(int i=num;i<numDisparos;i++)\n\t\t\tdisparos[i]=disparos[i+1];\n\t\t\tdisparos[numDisparos]=null;\n\t}", "private void pruneRecur(BinaryNode node, Integer sum, Integer k) {\n\n if (node == null) return;\n else {\n sum += (Integer)node.element;\n if (largestPath(node.left, sum) >= k) {\n pruneRecur(node.left, sum, k);\n } else {\n node.left = null;\n }\n if (largestPath(node.right, sum) >= k) {\n pruneRecur(node.right, sum, k);\n } else {\n node.right = null;\n }\n }\n }", "public void deleteRear() {\r\n\t\tif(isEmpty()) return;\r\n\t\ttail = tail.prev;\r\n\t\ttail.next = null;\r\n\t}", "@Override\r\n public void removerQuestaoDiscursiva(long id) throws Exception {\n rnQuestaoDiscursiva.remover(id);\r\n\r\n }", "private void eliminarAux(NodoAVL<T> actual){\n NodoAVL<T> papa= actual.getPapa();\n if(actual.getHijoIzq()==null && actual.getHijoDer()==null)\n eliminaSinHijos(actual,papa); \n else{//CASO2: Nodo con un solo hijo (izq)\n NodoAVL<T> sustituto;\n if(actual.getHijoIzq()!=null && actual.getHijoDer()==null){\n sustituto= actual.getHijoIzq();\n eliminaSoloConHijoIzq(actual,papa,sustituto); \n }\n else//CASO3: Nodo con un solo hijo (der)\n if(actual.getHijoIzq()==null && actual.getHijoDer()!=null){\n sustituto= actual.getHijoDer();\n eliminaSoloConHijoDer(actual,papa, sustituto);\n }\n else //CASO4: Nodo con dos hijos\n if(actual.getHijoIzq()!=null && actual.getHijoDer()!=null)\n eliminaConDosHijos(actual);\n }\n \n }", "@Override\r\n\tpublic int deleteExcursion(Excursion excu) {\n\t\tSession s = sf.getCurrentSession();\r\n\t\t\r\n\t\t//retrouver l'objet excursion par son nom\r\n\t\texcu=this.getExcu(excu);\r\n\t\t\r\n\t\ttry{\r\n\t\t\ts.delete(excu);\r\n\t\t\treturn 1;\r\n\t\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "private void removeOpRecursive(Operator<?> operator) {\n List<Operator<?>> parentOperators = new ArrayList<Operator<?>>();\n for (Operator<?> op : operator.getParentOperators()) {\n parentOperators.add(op);\n }\n for (Operator<?> parentOperator : parentOperators) {\n Preconditions.checkArgument(parentOperator.getChildOperators().contains(operator),\n \"AssertionError: parent of \" + operator.getName() + \" doesn't have it as child.\");\n parentOperator.removeChild(operator);\n if (parentOperator.getNumChild() == 0) {\n removeOpRecursive(parentOperator);\n }\n }\n }", "public void eliminarElemento(int indice){ \n nodos.remove(indice);\n fireIntervalRemoved(this, indice, indice); \n }", "public void prune() {\n this.getTree().prune();\n }", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public boolean remove(Object o) {\n final Node<E>[] update = new Node[MAX_LEVEL];\n final E element = (E) o;\n Node<E> curr = head;\n for (int i = level - 1; i >= 0; i--) {\n while (curr.next[i] != head && comparator.compare(curr.next[i].element, element) < 0)\n curr = curr.next[i];\n update[i] = curr;\n }\n curr = curr.next();\n if (curr == head || comparator.compare(curr.element, element) != 0)\n return false;\n delete(curr, update);\n return true;\n }", "private Node remove(int i) {\n Node result = null;\n int len = this.getlength();\n if (i >= len) {\n System.out.println(\"out of range exception\");\n return this;\n } else {\n if (i == 0) {\n result = this.nextNode;\n return result;\n } else {\n result = this;\n Node cur = this;\n for (int j = 0; j < i - 1; j++) {\n cur = cur.nextNode;\n }\n cur.nextNode = cur.nextNode.nextNode;\n }\n return result;\n }\n }", "public void eliminarNodo_Dat(int dato) {\n\t raiz = eliminarNodo(raiz, dato);\r\n\t}", "public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }", "public void eliminarCompraComic();", "@Override\r\n\tpublic void eliminar(Long idRegistro) {\n\t\t\r\n\t}", "public void eliminarNodo(Nodo nodoElim,int number){\n \n panelPadre.getChildren().removeAll(nodoElim.getRectangle(),nodoElim.getLabel(),nodoElim.getLine());\n \n if(nodoElim.getParent()!=null){\n nodoElim.getParent().getChildren().remove(nodoElim);\n if(nodoElim.getParent().getParent()==null && nodoElim.getLeftSibling()==null)\n posXAnterior=10;\n else \n posXAnterior=nodos.get(number-1).getPosX();\n }\n \n nodos.remove(number);\n }", "public void remove(){\n if(!isAfterNext)//flag false so next has not been called\n {\n throw new IllegalStateException();\n \n }\n if(position == first){\n removeFirst();//calls LL method because we re an inner class\n \n }\n else{\n previous.next = position.next;// move ref of previou to node after me \n }\n position = previous; \n isAfterNext= false;\n //first call to remove the current position reverts to the predecessor \n //of remove element thus predecessor is no longer known \n }", "@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}", "public void removerContato() {\n\t\tSystem.out.println(\"Digite o número do contato que deseja remover: \");\n\t\tint numeroContato = scanner.nextInt();\n\t\tlistaDeContatos.remove(numeroContato);\n\t}", "@Override\n protected void remover(Funcionario funcionario) {\n\n }", "public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }", "public void remove() {\n\t\tif (current == head) {\n\t\t\thead = current.getNext();\n\t\t\tcurrent = head;\n\t\t}\n\t\tif (current.getNext() == null) {\n\t\t\tcurrent.getPrevious().setNext(null);\n\t\t\tcurrent = current.getPrevious();\n\t\t}\n\t\telse {\n\t\t\tcurrent.getPrevious().setNext(current.getNext());\n\t\t\tcurrent.getNext().setPrevious(current.getPrevious());\n\t\t\tcurrent = current.getPrevious();\n\t\t}\n\t}", "public void eliminar() throws RollbackException, SystemException, HeuristicRollbackException, HeuristicMixedException {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n String id = FacesUtil.getRequestParameter(\"idObj\");\n Tblobjeto o = (Tblobjeto) session.load(Tblobjeto.class, Short.parseShort(id));\n try {\n tx = (Transaction) session.beginTransaction();\n session.delete(o);\n tx.commit();\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, \"Informacion:\", \"Registro eliminado satisfactoriamente\"));\n } catch (HibernateException e) {\n tx.rollback();\n\n FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, \"Un error ha ocurrido:\", e.getCause().getMessage()));\n } finally {\n session.close();\n populateTreeTable();\n UsuarioBean u = (UsuarioBean) FacesUtil.getBean(\"usuarioBean\");\n u.populateSubMenu();\n }\n }", "void deleteTree(TreeNode node) \n {\n root = null; \n }", "private static void delTree(BoardTree root) {\n if (root.children == null) return;\n for (BoardTree child : root.children) {\n delTree(child);\n }\n root.children.clear();\n root = null;\n }", "private static void eliminarJugador() {\n\t\ttry {\n\t\t\tSystem.out.println(jugadores.toString());\n\t\t\tjugadores.borrar(Teclado.leerCadena(\"Nombre:\"));//indica el nombre del jugador que se desea borrar\n\t\t} catch (JugadorNoExisteException | NombreNoValidoException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void remove()\n {\n this.prev.next = this.next;\n this.next.prev = this.prev;\n this.next = null;\n this.prev = null;\n }", "private Node prune(Node r) {\r\n if (r == null) return null;\r\n Op op = r.op();\r\n r.left(prune(r.left()));\r\n if (r.left() == null) r.ref(prune(r.ref()));\r\n else r.right(prune(r.right()));\r\n if (r.right() != null && r.right().op() == Temp) r.right(null);\r\n if (op == Temp) return r.left();\r\n return r;\r\n }", "public void eliminarCajeros(int id);", "public void deleteCurrentJoueur(){\n\t\tElement elementPreviousToCurrent = this.getCurrentElement().getPrevious();\n\t\tElement elementNextToCurrent = this.getCurrentElement().getNext();\n\t\t\n\t\telementPreviousToCurrent.setNext(elementNextToCurrent);\n\t\telementNextToCurrent.setPrevious(elementPreviousToCurrent);\n\t\t\n\t\t// l'element suivant devient l'element courant (on passe au suivant)\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}", "public static void removeSample() {\n Node ll1 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll2 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll3 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll4 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n Node ll6 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n System.out.println(\"remove 1==\");\n Node r1 = ll1.remove(0);\n r1.printList();\n System.out.println(\"remove 2==\");\n Node r2 = ll2.remove(1);\n r2.printList();\n System.out.println(\"remove 3==\");\n Node r3 = ll3.remove(2);\n r3.printList();\n System.out.println(\"remove 4==\");\n Node r4 = ll4.remove(3);\n r4.printList();\n System.out.println(\"remove 5==\");\n Node r5 = ll5.remove(4);\n r5.printList();\n System.out.println(\"remove 6==\");\n Node r6 = ll6.remove(5);\n r6.printList();\n\n }", "public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }", "public void VaciarPila() {\r\n while (!PilaVacia()) {\r\n EliminarNodo();\r\n }\r\n }", "private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }", "public void delete() {\n this.root = null;\n }", "public int EliminarNodo() {\r\n int auxiliar = UltimoValorIngresado.informacion;\r\n UltimoValorIngresado = UltimoValorIngresado.siguiente;\r\n tamaño--;\r\n return auxiliar;\r\n }", "public void eliminarCarrito(Carrito carrito){\n\t\tthis.listaCarritos.remove(carrito);\n\t\tSystem.out.println(\"Se elimino el carrito \"+carrito.getNombreCarrito()+\"!\");\n\t}", "void eliminar(Long id);", "public void delete(Node x) {\n if (!redoDone)\n redoStack.clear();\n else\n redoDone = false;\n BSTTrackingData log = new BSTTrackingData(x, x.left, x.right, x.parent, null, 'd');\n Boolean isRoot = x == root;\n Node toRemove = x;\n Node succ = null;\n if (x.left != null & x.right != null) { //if Case 3 - PartA change toRemove to the successor and remove it from the tree\n succ = successorForDelete(x); //use side function to get the successor (adjusted to improve retrack runtime)\n toRemove = succ;\n log.setSuccParent(succ.parent); //update log accordingly\n }\n stack.push(log);\n deleteUpToChild(toRemove); //function to handle removal of node with up to 1 child.\n if (succ != null) { //Case 3 part B - Place the successor in x's location in the tree.\n //update parent\n succ.parent = x.parent;\n if (isRoot) {\n root = succ;\n } else {\n if (x.parent.right == x) x.parent.right = succ;\n else x.parent.left = succ;\n }\n //update both children\n succ.right = x.right;\n if (x.right != null)\n x.right.parent = succ;\n succ.left = x.left;\n if (x.left != null)\n x.left.parent = succ;\n }\n\n }", "private Node<T> remove(Node<T> current, T data, Node<T> toReturn) {\n if (current == null) {\n return null;\n }\n hAndBF(current);\n if (data.compareTo(current.getData()) < 0) {\n current.setLeft(remove(current.getLeft(), data, toReturn));\n } else if (data.compareTo(current.getData()) > 0) {\n current.setRight(remove(current.getRight(), data, toReturn));\n } else {\n size--;\n toReturn.setData(current.getData());\n if (current.getLeft() != null && current.getRight() != null) {\n current.setData(twoChildren(current));\n } else if (current.getLeft() == null) {\n current = current.getRight();\n } else {\n current = current.getLeft();\n }\n\n }\n if (current == null) {\n return current;\n } else {\n return balance(current);\n }\n }", "public String remove()\n\t{\n\t\tString result = null;\n\t\tif (pointer > 0)\n\t\t{\n\t\t\tif (pointer == 1)\n\t\t\t{\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tString oldRoot = data[0];\n\t\t\t\tString oldLast = data[pointer - 1];\n\t\t\t\tdata[0] = oldLast;\n\t\t\t\tdata[pointer - 1] = oldRoot;\n\t\t\t\tpointer--;\n\t\t\t\tresult = data[pointer];\n\t\t\t\tint parent = 0;\n\t\t\t\t//left child\n\t\t\t\tint childLeft = parent * 2 + 1;\n\n\t\t\t\twhile (childLeft < pointer)\n\t\t\t\t{\n\t\t\t\t\t//right child\n\t\t\t\t\tint childRight = parent * 2 + 2;\n\t\t\t\t\t//assume the mininum of the two children is left child\n\t\t\t\t\tint childMin = childLeft;\n\t\t\t\t\tif (childRight < pointer)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (smallerThan(childRight, childLeft))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchildMin = childRight;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (smallerThan(childMin, parent))\n\t\t\t\t\t{\n\t\t\t\t\t\t//downheap\n\t\t\t\t\t\tswap(childMin, parent);\n\t\t\t\t\t\tparent = childMin;\n\t\t\t\t\t\tchildLeft = parent * 2 + 1;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public boolean remove(int a) {\r\n\t\tif (contains(a)) {\r\n\t\t\tif (this.value == a) {\r\n\t\t\t\tif (this.leftChild != null) {\r\n\t\t\t\t\tthis.value = this.leftChild.value; \r\n\t\t\t\t\tfindRL(this.leftChild).rightChild = this.rightChild;\r\n\t\t\t\t\tif (this.leftChild.rightChild != null) {\r\n\t\t\t\t\t\tthis.rightChild = this.leftChild.rightChild;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this.leftChild.leftChild != null) {\r\n\t\t\t\t\t\tthis.leftChild = this.leftChild.leftChild;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.leftChild = this.leftChild.leftChild;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (this.rightChild != null) {\r\n\t\t\t\t\tthis.value = this.rightChild.value;\r\n\t\t\t\t\tif (this.rightChild.rightChild != null) {\r\n\t\t\t\t\t\tthis.rightChild = this.rightChild.rightChild;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.rightChild = this.rightChild.rightChild;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (this.rightChild.leftChild != null) {\r\n\t\t\t\t\t\tthis.leftChild = this.rightChild.leftChild;\r\n\t\t\t\t\t} \r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.value = 0; \r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tif (this.value < a) {\r\n\t\t\t\tif (this.rightChild != null) {\r\n\t\t\t\t\tif (this.rightChild.value == a) {\r\n\t\t\t\t\t\tif (this.rightChild.leftChild != null) {\r\n\t\t\t\t\t\t\tfindRL(this.rightChild.leftChild).rightChild = this.rightChild.rightChild;\r\n\t\t\t\t\t\t\tthis.rightChild = this.rightChild.leftChild;\r\n\t\t\t\t\t\t} else if (this.rightChild.rightChild != null) {\r\n\t\t\t\t\t\t\tthis.rightChild = this.rightChild.rightChild;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthis.rightChild = null; \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.rightChild.remove(a);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (this.leftChild != null) {\r\n\t\t\t\t\tif (this.leftChild.value == a) {\r\n\t\t\t\t\t\tif (this.leftChild.leftChild != null) {\r\n\t\t\t\t\t\t\tfindRL(this.leftChild.leftChild).rightChild = this.leftChild.rightChild; \r\n\t\t\t\t\t\t\tthis.leftChild = this.leftChild.leftChild;\r\n\t\t\t\t\t\t} else if (this.leftChild.rightChild != null) {\r\n\t\t\t\t\t\t\tthis.leftChild = this.leftChild.rightChild;\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tthis.leftChild = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.leftChild.remove(a);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void deleteHierarchyData(TreePath[] selRows) {\r\n SponsorHierarchyBean delBean;\r\n CoeusVector delData = new CoeusVector();\r\n TreePath treePath=selRows[selRows.length-1];\r\n DefaultMutableTreeNode selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int selRow=sponsorHierarchyTree.getRowForPath(treePath);\r\n String optionPaneMsg=EMPTY_STRING;\r\n if(selNode.isRoot()) return;\r\n if(!selNode.getAllowsChildren()) {\r\n if(selRows.length > 1) {\r\n optionPaneMsg = coeusMessageResources.parseMessageKey(\"maintainSponsorHierarchy_exceptionCode.1252\");\r\n }else {\r\n optionPaneMsg = \"Do you want to remove the sponsor \"+selNode.toString()+\" from the hierarchy?\";\r\n }\r\n int optionSelected = CoeusOptionPane.showQuestionDialog(optionPaneMsg,CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n for (int index=selRows.length-1; index>=0; index--) {\r\n treePath = selRows[index];\r\n selRow = sponsorHierarchyTree.getRowForPath(treePath);\r\n selNode = (DefaultMutableTreeNode)treePath.getLastPathComponent();\r\n int endIndex = selNode.toString().indexOf(\":\");\r\n Equals getRowData = new Equals(\"sponsorCode\",selNode.toString().substring(0,endIndex == -1 ? selNode.toString().length():endIndex));\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(0);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n delData.addAll(cvFilteredData);\r\n saveRequired = true;\r\n }\r\n }\r\n } else {\r\n \r\n// int optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_YES);\r\n int optionSelected = -1;\r\n try{\r\n if(selNode != null && selNode.getLevel() == 1 && isPrintingHierarchy && isFormsExistInGroup(selNode.toString())){\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the group \"+selNode.toString()+\" , all its children and associated sponsor forms from the hierarchy?\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }else{\r\n optionSelected = CoeusOptionPane.showQuestionDialog(\"Do you want to remove the Group \"+selNode.toString()+\" , all its children from the hierarchy.\",CoeusOptionPane.OPTION_YES_NO,CoeusOptionPane.DEFAULT_NO);\r\n }\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n if(optionSelected == CoeusOptionPane.SELECTION_YES) {\r\n //Case#2445 - proposal development print forms linked to indiv sponsor, should link to sponsor hierarchy - Start\r\n if(isPrintingHierarchy && selectedNode.getLevel() == 1){\r\n TreeNode root = (TreeNode)sponsorHierarchyTree.getModel().getRoot();\r\n TreePath result = findEmptyGroup(sponsorHierarchyTree, new TreePath(root));\r\n if( result == null){\r\n try{\r\n deleteForms(selNode.toString());\r\n }catch(CoeusUIException coeusUIException){\r\n CoeusOptionPane.showDialog(coeusUIException);\r\n return ;\r\n }\r\n }\r\n }\r\n Equals getRowData = new Equals(fieldName[selNode.getLevel()],selNode.toString());\r\n CoeusVector cvFilteredData = getDeleteData(cvHierarchyData.filter(getRowData));//Modified for bug fix Start #1830\r\n model.removeNodeFromParent(selNode);\r\n for (int i=0; i<cvFilteredData.size(); i++) {\r\n delBean = (SponsorHierarchyBean)cvFilteredData.get(i);\r\n delBean.setAcType(TypeConstants.DELETE_RECORD);\r\n flushBean(delBean);//Added for bug fix Start #1830\r\n saveRequired = true;\r\n }\r\n delData.addAll(cvFilteredData);\r\n }\r\n }\r\n if(selRow < sponsorHierarchyTree.getRowCount() && \r\n ((DefaultMutableTreeNode)sponsorHierarchyTree.getPathForRow(selRow).getLastPathComponent()).getAllowsChildren() && !selNode.getAllowsChildren())\r\n sponsorHierarchyTree.setSelectionPath(treePath.getParentPath());\r\n else\r\n if(selRow >= sponsorHierarchyTree.getRowCount())\r\n selRow = 0;\r\n sponsorHierarchyTree.setSelectionRow(selRow);\r\n \r\n groupsController.refreshTableData(delData);\r\n }", "public int eliminar(int pasoSolicitado ){\n if(tipoTraductor.equals(\"Ascendente\"))\n eliminarAsc(pasoSolicitado);\n else \n eliminarDesc(pasoSolicitado);\n cadena.actualizarCadena(pasoSolicitado);\n contador=pasoSolicitado;\n return contador-1;\n }", "public T remove(T x) {\n\t\tEntry<T> node = getSplay(find(x));\n\t\tT result;\n\t\tresult = node.element;\n\t\tif(node == null)\n\t\t\treturn null;\n\t\tsplay(node);\n\t\tif(node.left != null && node.right != null) {\n\t\t\tEntry<T> tmp = getSplay(node.left);\n\t\t\twhile(tmp.right != null)\n\t\t\t\ttmp = getSplay(tmp.right);\n\t\t\t\n\t\t\ttmp.right = node.right;\n\t\t\tgetSplay(node.right).parent = tmp;\n\t\t\tgetSplay(node.left).parent = null;\n\t\t\troot = node.right;\n\t\t\t \n\t\t}\n\t\telse if(node.right != null) {\n\t\t\tgetSplay(node.right).parent = null;\n\t\t\troot = node.right;\n\t\t}\n\t\telse if(node.left != null) {\n\t\t\tgetSplay(node.left).parent = null;\n\t\t\troot = node.left;\n\t\t}\n\t\telse {\n\t\t\troot = null;\n\t\t}\n\t\tnode.parent = null;\n node.left = null;\n node.right = null;\n node = null;\n return result;\n\t}", "@Override\n\tpublic TreeNode remove() {\n\t\treturn null;\n\t}", "public boolean Delete(int num) {\r\n\t\t//initialize boolean field, set to true if value found in tree\r\n\t\tboolean found;\r\n\t\t//initialize the parent node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper p = new TreeNodeWrapper();\r\n\t\t//initialize the child node using the TreeNodeWrapper\r\n\t\tTreeNodeWrapper c = new TreeNodeWrapper();\r\n\t\t//initialize largest field to re-allocate parent/child nodes\r\n\t\tTreeNode largest;\r\n\t\t//initialize nextLargest field to re-allocate parent/child nodes\r\n\t\tTreeNode nextLargest;\r\n\t\t//found set to true if FindNode methods locates value in the tree\r\n\t\tfound = FindNode(num, p, c);\r\n\t\t//if node not found return false\r\n\t\tif(found == false)\r\n\t\t\treturn false;\r\n\t\telse //identify the case number\r\n\t\t{\r\n\t\t\t//case 1: deleted node has no children\r\n\t\t\t//if left and right child nodes of value are both null node has no children\r\n\t\t\tif(c.Get().Left == null && c.Get().Right == null)\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t\tp.Get().Left = null;\r\n\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\tp.Get().Right = null;\r\n\t\t\t//case 2: deleted node has 1 child\r\n\t\t\t//if deleted node only has 1 child node\r\n\t\t\telse if(c.Get().Left == null || c.Get().Right == null)\r\n\t\t\t{\r\n\t\t\t\t//if parent left node is equal to child node then deleted node is a left child\r\n\t\t\t\tif(p.Get().Left == c.Get())\r\n\t\t\t\t{\r\n\t\t\t\t\t//if deleted node is a left child then set deleted node child node as child to parent node\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Left = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t\telse //if deleted node is a right child then set deleted node child node as child to parent node\r\n\t\t\t\t{\r\n\t\t\t\t\tif(c.Get().Left != null) //deleted node has a left child\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Left;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tp.Get().Right = c.Get().Right;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//case 3: deleted node has two children\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//set the nextLargest as the left child of deleted node\r\n\t\t\t\tnextLargest = c.Get().Left;\r\n\t\t\t\t//set the largest as the right node of the nextLargest node\r\n\t\t\t\tlargest = nextLargest.Right;\r\n\t\t\t\t//if right node is not null then left child has a right subtree\r\n\t\t\t\tif(largest != null) \r\n\t\t\t\t{\r\n\t\t\t\t\t//while loop to move down the right subtree and re-allocate after node is deleted\r\n\t\t\t\t\twhile(largest.Right != null) //move down right subtree\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tnextLargest = largest;\r\n\t\t\t\t\t\tlargest = largest.Right;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//overwrite the deleted node\r\n\t\t\t\t\tc.Get().Data = largest.Data; \r\n\t\t\t\t\t// save the left subtree\r\n\t\t\t\t\tnextLargest.Right = largest.Left; \r\n\t\t\t\t}\r\n\t\t\t\telse //left child does not have a right subtree\r\n\t\t\t\t{\r\n\t\t\t\t\t//save the right subtree\r\n\t\t\t\t\tnextLargest.Right = c.Get().Right; \r\n\t\t\t\t\t//deleted node is a left child\r\n\t\t\t\t\tif(p.Get().Left == c.Get()) \r\n\t\t\t\t\t\t//jump around deleted node\r\n\t\t\t\t\t\tp.Get().Left = nextLargest; \r\n\t\t\t\t\telse //deleted node is a right child\r\n\t\t\t\t\t\tp.Get().Right = nextLargest; //jump around deleted node\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//return true is delete is successful\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "private E removeNode(Node n) {\n \tassert (n != sentinel);\n \tn.succ.pred = n.pred;\n \tn.pred.succ = n.succ;\n \tsize--;\n \treturn n.data;\n }", "public void remove() {\n\n\t\tif (size() > 1) {\n\n\t\t\tNode node = head;\n\n\t\t\tfor (int i = 0; i < size() - 1; i++) {\n\n\t\t\t\tnode = node.getNextNode();\n\n\t\t\t}\n\n\t\t\tif (node != null) {\n\n\t\t\t\tnode.setNextNode(null);\n\t\t\t\tsize--;\n\n\t\t\t}\n\n\t\t} else if (size() == 1) {\n\n\t\t\thead = null;\n\t\t\tsize--;\n\n\t\t}\n\n\t}", "public synchronized void eliminar(int nombre){\n\n elemento.remove(nombre);\n \n }", "protected Tree remove(){\n if(noItems<=0){\n System.out.println(\"Q Empty. Cant remove\");\n return null;\n }else{\n return array[--noItems];\n }\n }", "public void remove(Comparable obj)\n {\n \t fixup(root, deleteNode(root, obj));\n }", "public void remove(int pos) throws CurrentNotSetException {\r\n\t\ttry {\r\n\t\t\tNode temp = first;\r\n\t\t\tint cnt = 1;\r\n\t\t\tboolean b1 = false;\r\n\t\t\tif (first != null || last != null || aktu != null) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif (cnt == pos) {\r\n\t\t\t\t\t\tif (temp.equals(aktu)) {\r\n\t\t\t\t\t\t\taktu = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (temp.equals(first)) {\r\n\t\t\t\t\t\t\tfirst = temp.getNext();\r\n\t\t\t\t\t\t\ttemp = first;\r\n\t\t\t\t\t\t} else if (temp.equals(last)) {\r\n\t\t\t\t\t\t\tlast = temp.getPrevious();\r\n\t\t\t\t\t\t\ttemp = last;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttemp.getNext().setPrevious(temp.getPrevious());\r\n\t\t\t\t\t\t\ttemp.getPrevious().setNext(temp.getNext());\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (b1) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else if (temp.equals(last)) {\r\n\t\t\t\t\t\tb1 = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttemp = temp.getNext();\r\n\t\t\t\t\tcnt++;\r\n\t\t\t\t} while (true);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CurrentNotSetException();\r\n\t\t}\r\n\t}", "void eliminar(int c);", "public T remove(T plan) { //Time Complexity: O(n)\n if (root == null) {\n return null;\n }\n Node<T> parent = null;\n Node<T> curr = this.root;\n\n while (curr != null) {\n if (curr.data.compareTo(plan) == 0) {\n return removeNode(curr, parent);\n } else {\n parent = curr;\n if (curr.data.compareTo(plan) < 0) {\n curr = curr.right;\n } else {\n curr = curr.left;\n }\n }\n }\n return null;\n }", "public abstract void eliminarSubproducto(EntityManager sesion, Subproducto subproducto);", "@Override\n\tpublic void RemoverCarrinho(EntidadeDominio entidade) throws SQLException {\n\t\t\n\t}", "public void deleteMax() {\n root = deleteMax(root);\n }", "public void deleteMax() {\n root = deleteMax(root);\n }", "private void delete(Node curr, int ID, AtomicReference<Node> rootRef) {\n\t\tif(curr == null || curr.isNull) {\n return;\n }\n if(curr.ID == ID) {\n if(curr.right.isNull || curr.left.isNull) {\n deleteDegreeOneChild(curr, rootRef);\n } else {\n Node n = findSmallest(curr.right);\n \tcurr.ID = n.ID;\n curr.count = n.count;\n delete(curr.right, n.ID, rootRef);\n }\n }\n if(curr.ID < ID) {\n delete(curr.right, ID, rootRef);\n } else {\n delete(curr.left, ID, rootRef);\n }\n\t}", "public boolean delete (int val) throws DifferentOrderTrees {\r\n \tboolean supprime = false;\r\n \tMonceau monceauTemp = new Monceau();\r\n \t\r\n \t//recherche de la valeur a supprimer\r\n \tfor (int i = 0; i < arbres.size(); i++) {\r\n \t\tif (arbres.get(i).findValue(val) == null)\r\n \t\t\tcontinue;\r\n \t\telse {\r\n \t\t\tmonceauTemp.arbres = arbres.get(i).findValue(val).delete();\r\n \t\t\tarbres.remove(arbres.get(i)); //supprime noeud\r\n \t\t\tthis.fusion(monceauTemp); //fusionne les 2 monceaux\r\n \t\t\ti = (0-1); //on recommence (-1 car on fait i++ apres (boucle for))\r\n \t\t\tsupprime = true;\r\n \t\t}\r\n \t}\r\n \t\r\n return supprime;\r\n }", "public void removeSelf(){\n\t\tif(prev != null){\n\t\t\tprev.next = next;\n\t\t\tnext.prev = prev;\n\t\t\tprev = null;\n\t\t\tnext = null;\n\t\t}\n\t}" ]
[ "0.6481892", "0.6463476", "0.6388616", "0.635999", "0.6323356", "0.62620217", "0.62009656", "0.61889505", "0.61825633", "0.6163663", "0.6080177", "0.60792303", "0.60606223", "0.60595316", "0.6046753", "0.6017642", "0.6013664", "0.59889364", "0.59738696", "0.5960428", "0.59358823", "0.59123117", "0.58752966", "0.5874913", "0.58692175", "0.58593035", "0.5859197", "0.58277977", "0.5827315", "0.58238816", "0.5809573", "0.5802851", "0.5797413", "0.57827497", "0.5777", "0.57759476", "0.5738328", "0.5728384", "0.57266307", "0.57198936", "0.57187736", "0.571361", "0.57108605", "0.5707392", "0.5703382", "0.56780475", "0.5668064", "0.5668064", "0.5660181", "0.5640543", "0.56304336", "0.56262106", "0.5619787", "0.5616492", "0.56002986", "0.5595519", "0.5576955", "0.557628", "0.5569453", "0.55566806", "0.55556744", "0.5554492", "0.55340666", "0.55324894", "0.55280775", "0.552796", "0.55196005", "0.5516666", "0.5511589", "0.54976875", "0.5486867", "0.5485035", "0.54836154", "0.5483039", "0.5475718", "0.5472004", "0.5467936", "0.5459415", "0.5456333", "0.5455861", "0.54525846", "0.54485416", "0.5442922", "0.5442497", "0.5441962", "0.5436201", "0.543039", "0.5425231", "0.54160357", "0.5413795", "0.5412002", "0.5409266", "0.54009044", "0.53969616", "0.53965855", "0.53962314", "0.539492", "0.539492", "0.53906244", "0.53837305", "0.53830016" ]
0.0
-1
Se encarga de modificar un recurso.
public void modificar(Long id, G entity, HttpServletRequest httpRequest) throws AppException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addRecurso(Recurso recurso) {\n\t\t\n\t}", "public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }", "private Long modificarDireccion(Direccion direccion) {\n\t\t\ttry {\n\t\t\t\tgDireccion.modify(direccion);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\treturn direccion.getIdDireccion();\n\t}", "protected void modifyOnGithubRecursive(GHRepository repo, GHContent content,\n String branch, String img, String tag) throws IOException {\n if (content.isFile() && content.getDownloadUrl() != null) {\n modifyOnGithub(content, branch, img, tag, \"\");\n } else if(content.isDirectory()) {\n for (GHContent newContent : repo.getDirectoryContent(content.getPath(), branch)) {\n modifyOnGithubRecursive(repo, newContent, branch, img, tag);\n }\n } else {\n // The only other case is if we have a file, but content.getDownloadUrl() is null\n log.info(\"Skipping submodule {}\", content.getName());\n }\n }", "public void setRecurso(java.lang.String recurso) {\r\n this.recurso = recurso;\r\n }", "private static void recorrerDirectorios(File[] ficheros, \n\t\t\tint indice, String texto) {\n\t\tif (indice <= ficheros.length - 1) {\n\t\t\tif (ficheros[indice].isDirectory()) {\n\t\t\t\t// si es directorio\n\t\t\t\tFile nuevo = new File(ficheros[indice].getPath());\n\t\t\t\tFile[] tabla = nuevo.listFiles();\n\t\t\t\trecorrerFicheros(tabla, 0, texto);\n\t\t\t\trecorrerDirectorios(tabla, 0, texto);\n\t\t\t\tindice++;\n\t\t\t\trecorrerDirectorios(ficheros, indice, texto);\n\t\t\t} else {\n\t\t\t\tindice++;\n\t\t\t\trecorrerDirectorios(ficheros, indice, texto);\n\t\t\t}\n\t\t}\n\t}", "private void updateChildrenOrgPath(String oldNo, String newNo) {\n\t\tif (!oldNo.equals(newNo)) {\n\t\t\torgMapper.updateSubParentNo(oldNo, newNo);\n\t\t}\n\t\tList<OrgVo> children = orgMapper.queryChildrenByOrgNo(newNo);\n\t\tchildren.forEach(o -> {\n\t\t\tEpSOrg org = new EpSOrg();\n\t\t\tBeanUtils.copyProperties(o, org);\n\t\t\tsetOrgPath(org);\n\t\t\torgMapper.updateWithoutNull(org); //更新orgPath\n\t\t\tupdateChildrenOrgPath(org.getOrgNo(), org.getOrgNo());\n\t\t});\n\t}", "public void setRecursive(boolean recursive)\n { this.recursive=recursive;\n }", "public Node modify(Node root)\n {\n int s=0;\n //Node temp=root;\n solve(root);\n return root;\n }", "public void writeObjectRecurse(ZObjectOutputStream out) throws IOException {\n }", "@Override\n public Nodo ejecutar() {\n listaNodos.add(nodoRaiz);\n //nodo almacenado temporalmente\n Nodo nodoActual;\n //cola de hijos producto de aplicar ops\n ArrayList <Nodo> cola;\n \n NODO:while(!(listaNodos.isEmpty()))\n {\n nodoActual=listaNodos.get(0);\n listaNodos.remove(0);\n //Detecto el nodo como un ciclo y salto si sí es luego verifico meta\n if(nodoCiclo(nodoActual))\n {\n \n// System.out.println(\"Es Ciclo: \"+nodoActual.getOperador());\n continue NODO;\n }\n else if(esMeta(nodoActual)){\n solucion(nodoActual);\n JOptionPane.showMessageDialog(null, \"nodos expandidos\"+nodoexpandidos+\"profundidad\"+profundidad);\n return nodoActual;\n }\n //Expando Nodo\n cola=expandirNodo(nodoActual);\n nodoexpandidos++;\n for(int i=0;i<cola.size();i++)\n {\n Nodo temporal=cola.get(i);\n cola.set(i, temporal);\n \n }\n //Armo cola general\n cola.addAll(listaNodos);\n listaNodos=(ArrayList <Nodo>)cola.clone();\n }\n return null;\n }", "public GlobFileSet recurse()\n\t\t{\n\t\tm_recurse = true;\n\t\treturn (this);\n\t\t}", "void updateAllParentsBelow();", "@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}", "private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }", "@Override\n\tpublic void posModify() {\n\t\tgetEntityManager().refresh(instance);\n\t\tcambiarTipoCuenta(instance);\n\t\tgetEntityManager().flush();\n\t\tgetEntityManager().refresh(instance);\n\t\tresultList = null;\n\t\trootNode = null;\n\t}", "public static void borrarCrearRecursivo(Path carpeta) {\n\n\t\tString res = \"\";\n\t\t// si la carpeta no existe la creamos\n\n\t\t// caso base\n\t\tif (!Files.isDirectory(carpeta)) {\n\t\t\ttry {\n\t\t\t\tFiles.createDirectories(carpeta);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"Hemos creado la carpeta\" + carpeta.toAbsolutePath());\n\t\t\t// Caso recursivo\n\n\t\t} else {\n\n\t\t\tDirectoryStream<Path> hijosCarpeta;// Este objeto sirve para poder iterar directorios lo convertimos en una\n\t\t\t\t\t\t\t\t\t\t\t\t// especie\n\t\t\t// de lista para guardar varios Path\n\t\t\ttry {\n\n\t\t\t\thijosCarpeta = Files.newDirectoryStream(carpeta);// hacemos esto para crear diferentes Path en los\n\t\t\t\t// subdirectorios de carpeta\n\n\t\t\t\t// y en el segundo borrar los ficheros\n\t\t\t\tfor (Path entry : hijosCarpeta) {\n\n\t\t\t\t\tif (Files.isDirectory(entry)) {\n\t\t\t\t\t\tSystem.out.println(\"entrando en\" + entry);\n\t\t\t\t\t\tborrarhijoRecursivo(entry);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tres += \"Borrando \" + entry + \"\\n\";\n\t\t\t\t\t\tSystem.out.println(\"borrando \" + entry);\n\t\t\t\t\t\tFiles.delete(entry);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Borrando carpeta \" + carpeta);\n\t\t\t\tFiles.delete(carpeta);\n\n\t\t\t\t// llamamos otra vez a la funcion recursivamente para crear la carpeta\n\t\t\t\tborrarCrearRecursivo(carpeta);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t}", "public DFS()\n {\n\n\n writeLock = lock.writeLock();\n readLock = lock.readLock();\n\n recoverINodes();\n\n createDir(\"/\"); // add a root if it does not exist .\n\n }", "private void updateFiles() {\n\t}", "private List<Node<T>> completaCamino(Node<T> ret, List<Node<T>> camino) {\r\n\t\tboolean comp = true;// Comprobacion\r\n\t\tcamino.add(ret);// Aņadimos el nodo al camino\r\n\t\twhile (comp) {\r\n\t\t\tif (ret.getParent() != null) {// Mientras no sea la raiz\r\n\t\t\t\tcamino.add(ret.getParent(), 1);// Aņade al inicio de la lista\r\n\t\t\t\tret = ret.getParent();// Hace que el padre sea el nuevo nodo\r\n\t\t\t} else if (ret.getParent() == null) {// Si es la raiz\r\n\t\t\t\tcomp = false;// Cancela\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn camino;\r\n\t}", "public void actualizarContadores(){\n\t\tparent.refresqueContadores();\n\t}", "@Override\n public void vaciar() {\n this.raiz = NodoBinario.nodoVacio();\n }", "public void resta(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n }\n }", "public void actualizarPorTipoIdentificacion()\r\n/* 686: */ {\r\n/* 687:755 */ cargarListaTipoComprobanteSRI();\r\n/* 688:756 */ cargarListaCreditoTributarioSRI();\r\n/* 689: */ }", "@Override\n public void run() {\n updateTotalSizeOfFilesInDir(child);\n }", "@Test\n public void testModificar() {\n System.out.println(\"Edit\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Hugo\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n //recuperacion\n Persona p = (Persona) repo.buscar(persona.getId());\n \n //modificacion\n p.setNumeroDocumento(\"4475188\");\n repo.modificar(p);\n \n //test\n Persona pmod = (Persona)repo.buscar(persona.getId());\n assertEquals(pmod.getId(), p.getId());\n assertEquals(\"4475188\", pmod.getNumeroDocumento());\n }", "public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }", "public void modificar() {\r\n if (vista.jTNombreempresa.getText().equals(\"\") || vista.jTTelefono.getText().equals(\"\") || vista.jTRFC.getText().equals(\"\") || vista.jTDireccion.getText().equals(\"\")) {\r\n JOptionPane.showMessageDialog(null, \"Faltan Datos: No puede dejar cuadros en blanco\");//C.P.M Verificamos que todas las casillas esten llenas de lo contrario lo notificamos a el usuario\r\n } else {//C.P.M de lo contrario todo esta bien y prosegimos\r\n modelo.setNombre(vista.jTNombreempresa.getText());//C.P.M mandamos al modelo la informacion\r\n modelo.setDireccion(vista.jTDireccion.getText());\r\n modelo.setRfc(vista.jTRFC.getText());\r\n modelo.setTelefono(vista.jTTelefono.getText());\r\n \r\n Error = modelo.modificar();//C.P.M ejecutamos la funcion modificar del modelo y esperamos algun error\r\n if (Error.equals(\"\")) {//C.P.M si el error viene vacio es que no ocurrio algun error \r\n JOptionPane.showMessageDialog(null, \"La configuracion se modifico correctamente\");\r\n } else {//C.P.M de lo contrario lo notificamos a el usuario\r\n JOptionPane.showMessageDialog(null, Error);\r\n }\r\n }\r\n }", "@Override\r\n\tpublic int updateExcursion(Excursion excu) {\n\t\tSession s = sf.getCurrentSession();\r\n\r\n\t\t// creation de la requete\r\n\t\tString req = \"UPDATE Excursion ex SET ex.nomExcursion=:pNom, ex.descriptionExcursion=:pDesc, ex.imageExcursion=:pImg, ex.prixExcursion=:pPrix WHERE ex.idExcursion=:pId\";\r\n\r\n\t\t// creation de query et passage des paramètres\r\n\t\tQuery query = s.createQuery(req);\r\n\t\tquery.setParameter(\"pNom\", excu.getNomExcursion());\r\n\t\tquery.setParameter(\"pDesc\", excu.getDescriptionExcursion());\r\n\t\tquery.setParameter(\"pImg\", excu.getImageExcursion());\r\n\t\tquery.setParameter(\"pPrix\", excu.getPrixExcursion());\r\n\t\tquery.setParameter(\"pId\", excu.getIdExcursion());\r\n\r\n\t\treturn query.executeUpdate();\r\n\t}", "public void directoryChange( int type, Set fileSet );", "private void modificarReserva() throws Exception {\r\n\t\tif (mngRes.existeReservaPeriodo(getSitio().getId())) {\r\n\t\t\tif (mayorEdad) {\r\n\t\t\t\tmngRes.modificarReserva(getEstudiante(), periodo.getPrdId(), getSitio(), null);\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t} else {\r\n\t\t\t\tmngRes.modificarReserva(getEstudiante(), periodo.getPrdId(), getSitio(),\r\n\t\t\t\t\t\tgetDniRepresentante() + \";\" + getNombreRepresentante());\r\n\t\t\t\tlibres = mngRes.traerLibres(getSitio().getId().getArtId());\r\n\t\t\t}\r\n\t\t\tMensaje.crearMensajeINFO(\"Reserva realizada correctamente, no olvide descargar su contrato.\");\r\n\t\t} else {\r\n\t\t\tMensaje.crearMensajeWARN(\"El sitio seleccionado ya esta copado, favor eliga otro.\");\r\n\t\t}\r\n\t}", "public boolean alterar(GrauParentesco grauParentesco) throws Exception;", "public void AgregarDeMayorAMenor(int el) throws Exception{\n if(repetido(el)){\n throw new Exception(\"El dato ya existe en la lista!!!\");\n }else{\n /*\n Crear un nodo para el nuevo dato.\n Si la lista esta vacía, o el valor del primer elemento de la lista \n es mayor que el nuevo, insertar el nuevo nodo en la primera posición \n de la lista y modificar la cabecera respectivamente.\n \n */\n NodoDoble newNode = new NodoDoble(el);\n if (estVacia() || inicio.GetDato() == el) {\n newNode.SetSiguiente(inicio);\n inicio = newNode;\n } else {\n /* \n Si no se cumple el caso anterior, buscar el lugar adecuado \n para la inserción: recorrer la lista conservando el nodo actual. \n Inicializar nodo actual con el valor de primera posición, \n y avanzar mientras el siguiente nodo no sea nulo y el dato \n que contiene la siguiente posición sea mayor o igual que \n el dato a insertar.\n */\n NodoDoble current = inicio;//\n while (current.GetSiguiente() != null\n && current.siguiente.GetDato() >= el) {\n current = current.GetSiguiente();\n }\n /*\n Con esto se señala al nodo adecuado, \n a continuación insertar el nuevo nodo a continuación de él.\n */\n newNode.SetSiguiente(current.GetSiguiente());\n current.SetSiguiente(newNode);\n }\n } \n }", "public void recUpdateNode(Node n) {\r\n\t\t//update this node\r\n\t\tupdateSingleNode(n);\r\n\t\t\r\n\t\t//if this node is marked, update the parent node's other child.\r\n\t\tif( n.marked ) {\r\n\t\t\t//unmark both children of this node's parent\r\n\t\t\tn.parent.right.marked = n.parent.left.marked = false;\r\n\t\t\t//find and update the other child\r\n\t\t\tif( n.parent.left == n ) {\r\n\t\t\t\tupdateSingleNode(n.parent.right);\r\n\t\t\t} else if( n.parent.right == n ){\r\n\t\t\t\tupdateSingleNode(n.parent.left);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//if this is not the root, go to the next parent\r\n\t\tif( n.parent != nilNode ) {\r\n\t\t\trecUpdateNode(n.parent);\r\n\t\t}\r\n\t}", "public static void borrarhijoRecursivo(Path carpetaHija) {\n\n\t\tDirectoryStream<Path> hijosCarpeta;// Este objeto sirve para poder iterar directorios lo convertimos en una\n\t\t\t\t\t\t\t\t\t\t\t// especie\n\t\t// de lista para guardar varios Path\n\n\t\ttry {\n\n\t\t\thijosCarpeta = Files.newDirectoryStream(carpetaHija);// hacemos esto para crear diferentes Path en los\n\t\t\t// subdirectorios de carpeta\n\n\t\t\t// y en el segundo borrar los ficheros\n\t\t\tfor (Path entry : hijosCarpeta) {\n\n\t\t\t\tif (Files.isDirectory(entry)) {\n\t\t\t\t\tSystem.out.println(\"entrando en\" + entry);\n\t\t\t\t\tborrarhijoRecursivo(entry);\n\t\t\t\t} else {\n\n\t\t\t\t\tSystem.out.println(\"borrando\" + entry);\n\t\t\t\t\tFiles.delete(entry);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(\"Borrando carpeta \" + carpetaHija.toAbsolutePath());\n\t\t\tFiles.delete(carpetaHija);\n\n\t\t\t// llamamos otra vez a la funcion recursivamente para crear la carpeta\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private long recursivoCarpeta(File archivo,String nombre)\n {\n //variable para guardar el peso total\n long pesoArchivo=0;\n //verificamos si es una carpeta o un archivo\n if(archivo.isDirectory())\n {\n //si es una carpeta obtenemos su lista de archivos\n File lista[]=archivo.listFiles();\n //creamos un ciclo y aplicamos el mismo metodo para verificar si es acarpeta o archivo\n for (File file : lista) {\n pesoArchivo+=recursivoCarpeta(file, nombre);\n }\n }\n else\n {\n //si es un archivo\n //obtenemos su peso\n pesoArchivo=archivo.length();\n //auxiliar para guardar la direccion del archivo\n String aux=archivo.toString();\n //guardamos la direccion del archivo\n documentos.add(archivo.getPath());\n //obtenemos la subcadena desde donde comienza el nombre de la carpeta\n aux=aux.substring(aux.indexOf(nombre),aux.length());\n //agregamos el nombre a la lista\n nombres.add(aux);\n }\n //devolvemos el peso del archivo\n return pesoArchivo;\n }", "public void agregarAlFinal(int el){\n if(!estVacia()){\n fin=new NodoDoble(el,null,fin);\n fin.anterior.siguiente=fin;\n }else{\n inicio=fin=new NodoDoble(el);\n }\n }", "boolean isRecursive();", "@Override\n\tpublic boolean modificar(Marca marc) {\n\t\treturn marcadao.modificar(marc);\n\t}", "public void reinicio() {\n iNumBloques = 54; // se reinicia la cantidad de bloques\n iNivel = 1; // vuelve al nivel 1\n iScore = 0; // se reinicia el score\n iVidas = 3; // se reinicia la cantidad de vidas\n // La direccion del proyectil sera para arriba\n bDireccionY = false;\n // la direccion del proyectil sera al contrario de donde iba\n bDireccionX = !bDireccionX;\n // Se reposiciona el proyectil\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n // Se reincia la velocidad del proyectil\n objProyectil.setVelocidad(5);\n // Se reposiciona la barra\n objBarra.reposiciona(((getWidth() / 2)\n - (objProyectil.getAncho() / 2)), (getHeight()\n - objBarra.getAlto()));\n // se limpia la lista de bloques\n lnkBloques.clear();\n // se vuelve a llenar y se acomoda\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n }", "public void anadirObjetoRecolectable (ObjetoRecolectable pObjeto){\n\t\tif (pObjeto instanceof ObjetoClave){\n\t\t\tthis.anadirObjetoClave((ObjetoClave)pObjeto);\n\t\t}\n\t\telse if (pObjeto instanceof PiezaArmadura){\n\t\t\tthis.actualizarArmadura((PiezaArmadura)pObjeto);\n\t\t}\n\t}", "private void updateStructure()\r\n {\r\n int id = 1;\r\n Integer outlineLevel = Integer.valueOf(1);\r\n for (Task task : m_project.getChildTasks())\r\n {\r\n id = updateStructure(id, task, outlineLevel);\r\n }\r\n }", "public void updateNodeAndParents( TreeNode node )\n {\n viewer.update( node, null );\n TreeNode parent = node.getParent();\n while ( parent != null )\n {\n viewer.update( parent, null );\n parent = parent.getParent();\n }\n }", "@Override\npublic void setIncrementalChildAddition(boolean newVal) {\n\t\n}", "public Boolean DeleteAndMerge(Node node) {\n\t\tif (node.getLeftChild() == null) {\n\t\t\tDeleteAllChild(node);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (node.getParent().getLeftChild() == node) {\n\t\t\t// Node tempNode=node.getLeftChild();\n\t\t\tint level = node.getLevel();\n\t\t\tNode pa = node.getParent();\n\t\t\tPreorderLevel(node.getLeftChild());\n\t\t\tnode.getParent().setLeftChild(node.getLeftChild());\n\t\t\tnode.getLeftChild().setParent(node.getParent());\n\t\t\tnode.getLeftChild().setLevel(node.getLevel());\n\t\t\tNode tempNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null) {\n\t\t\t\t\tnode.setRightChild(tempNode);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\tnode.setParent(pa);\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tint level = node.getLevel();\n\t\t\tNode tNode = node.getParent().getLeftChild();\n\n\t\t\tfor (;;) {\n\t\t\t\tif (tNode.getRightChild() == node)\n\t\t\t\t\tbreak;\n\t\t\t\ttNode = tNode.getRightChild();\n\t\t\t}\n\t\t\ttNode.setRightChild(node.getLeftChild());\n\n\t\t\tNode parent = node.getParent();\n\t\t\tNode rNode = node.getRightChild();\n\t\t\tnode = node.getLeftChild();\n\t\t\tPreorderLevel(node);\n\t\t\tfor (;;) {\n\t\t\t\tif (node.getRightChild() == null)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tnode.setParent(parent);// 改变子结点的父结点\n\t\t\t\t\t// 修改结点层级\n\t\t\t\t\tif (node.getParent() == null) {\n\t\t\t\t\t\tnode.setLevel(0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnode.setLevel(level);\n\t\t\t\t\t}\n\t\t\t\t\tnode = node.getRightChild();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tnode.setParent(parent);\n\t\t\tnode.setLevel(level);\n\t\t\tnode.setRightChild(rNode);\n\t\t\t// if (rNode.getParent() == null) {\n\t\t\t// rNode.setLevel(0);\n\t\t\t// } else {\n\t\t\t// rNode.setLevel(rNode.getParent().getLevel() + 1);\n\t\t\t// }\n\t\t}\n\n\t\treturn true;\n\n\t}", "public void reiniciar() {\n // TODO implement here\n }", "private final <N extends INodeDirectory> N replaceSelf(final N newDir) {\r\n final INodeDirectory parent = getParent();\r\n Preconditions.checkArgument(parent != null, \"parent is null, this=%s\", this);\r\n parent.replaceChild(this, newDir);\r\n return newDir;\r\n }", "static void PrintRecorrido(int ini, int fin) {\n\n //System.out.println(\"Recorrido de nodos para llegar de nodo \" + ini + \" a \" + fin);\n List<Integer> path = new ArrayList<Integer>();\n int total=0;\n for (;;) { //infinite loop\n\n path.add(fin);\n if (prev[fin] == -1) {//si se llegó al inicio\n break;\n }\n total+=pesos[fin];//va sumando los pesos \n fin = prev[fin]; //\n }\n\n for (int i = path.size() - 1, k = 0; i >= 0; --i) {//se recorre de atrás para adelante printing los valores\n if (k != 0) {\n System.out.print(\" \");\n }\n System.out.print(path.get(i));//muestra el valor en posicion i (ultimo)\n k = 1;\n }\n System.out.print(\" Total:\"+total);\n System.out.println();\n }", "@Override\n\tpublic void recreo() {\n\n\t}", "public void updatePath() {\n\t\tString oldPath = this.path;\n\t\tif (materializePath()) {\n\t\t\tPageAlias.create(this, oldPath);\n\t\t\tupdateChildPaths();\n\t\t}\n\t}", "public NavigatoreRisultati(Modulo unModulo) {\n /* rimanda al costruttore della superclasse */\n super(unModulo);\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 carroRemovido(){\n System.out.println(\"Su carro fue removido exitosamente\");\n }", "@Override\n\tpublic void modificada(Mao m, Participante p) {\n\t\t\n\t}", "public void RBInsertFixup(Website site) {\r\n\t\tif (site == root) {\t\t\t//catches calling fixup on the root\r\n\t\t\tsite.setIsRed(false);\t//if it is the root, set to black\r\n\t\t} else if (site != root) {\t//iff it is not the root, continue \r\n\t\t\t\r\n\t\t\twhile (site.getParent().getIsRed() == true\r\n\t\t\t\t\t&& site.getParent().getParent() != null) { //while site's parent is red and site's parent's parent is not null\r\n\t\t\t\tif (site.getParent() == site.getParent().getParent().getLeft()) { //z's parent is the left child\r\n\t\t\t\t\tWebsite y = site.getParent().getParent().getRight(); //y is the right uncle\r\n\r\n\t\t\t\t\t//case 1\r\n\t\t\t\t\tif (y != null && y.getIsRed() == true) { \t//if y is not a null, which is counted as black, or if y is red\r\n\t\t\t\t\t\tsite.getParent().setIsRed(false); \t\t//sets site's parent to black\r\n\t\t\t\t\t\tif (site.getParent().getParent() != null) {\t//if it will not cause a null pointer error,\r\n\t\t\t\t\t\t\tsite.getParent().getParent().setIsRed(true); //sets grandparent to red\r\n\t\t\t\t\t\t\tsite=site.getParent().getParent();\t\t\t//sets site to grandparent\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (y != null) { //checks for null pointer exception\r\n\t\t\t\t\t\t\ty.setIsRed(false); //y is black\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\t//case 2 rotate\r\n\t\t\t\t\telse if (site == site.getParent().getRight()) {\r\n\t\t\t\t\t\tsite = site.getParent();\t//updates site to its parent\r\n\t\t\t\t\t\tleftRotate(root, site);\t\t//roates updated parent\r\n\t\t\t\t\t} else {\t//case 3 rotate\r\n\t\t\t\t\t\tsite.getParent().setIsRed(false);\t\t//parent is black\r\n\t\t\t\t\t\tsite.getParent().getParent().setIsRed(true);\t//grandparent is red\r\n\t\t\t\t\t\trightRotate(root, site.getParent().getParent());\t//rotates to fix tree\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tWebsite y = site.getParent().getParent().getLeft(); //y is the left uncle\r\n\t\t\t\t\t//case 1 simple recoloring\r\n\t\t\t\t\tif (y != null && y.getIsRed() == true) { //if y is not a null, which is counted as black, or if y is red\r\n\t\t\t\t\t\tsite.getParent().setIsRed(false);\t\t//sets site's parent to black\r\n\t\t\t\t\t\tif (site.getParent().getParent() != null) {\t//if it will not cause a null pointer error,\r\n\t\t\t\t\t\t\tsite.getParent().getParent().setIsRed(true); //sets grandparent to red\r\n\t\t\t\t\t\t\tsite=site.getParent().getParent();\t\t\t\t//sets site to grandparent\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (y != null) {\t//checks for null pointer exception\r\n\t\t\t\t\t\t\ty.setIsRed(false);\t//y is black\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\t\t//case 2 rotate \r\n\t\t\t\t\t\telse if (site == site.getParent().getLeft()) { \r\n\t\t\t\t\t\tsite = site.getParent();\t//update's site to its parent\r\n\t\t\t\t\t\trightRotate(root, site);\t//rotates updated parent\r\n\t\t\t\t\t} \r\n\t\t\t\t\t\t//case 3 rotate\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\tsite.getParent().setIsRed(false);\t//parent is black\r\n\t\t\t\t\t\tsite.getParent().getParent().setIsRed(true);\t//grandparent is red\r\n\t\t\t\t\t\tleftRotate(root, site.getParent().getParent());\t//rotates to fix tree\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif(site==root) { //if site is the root, \r\n\t\t\t\troot.setIsRed(false);\t//sets the root/site to black\r\n\t\t\t\tbreak;\t\t\t\t\t//breaks out of the loop\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\troot.setIsRed(false); //sets root to black just in case\r\n\t}", "private List<Node<T>> auxiliarRecorridoPost(Node<T> nodo, List<Node<T>> lista) {\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\tauxiliarRecorridoPost(hijos.get(i), lista);// Recursividad\r\n\t\t\t}\r\n\t\t}\r\n\t\tlista.add(nodo);// Aņade a la lista\r\n\t\treturn lista;// Devuelve lista\r\n\t}", "private void uploadLocalDocument(){\t\t\n\t\tif(getFileChooser(JFileChooser.FILES_ONLY).showOpenDialog(this)==JFileChooser.APPROVE_OPTION){\n\t\t\tNode node = null;\n\t\t\ttry {\n\t\t\t\tnode = alfrescoDocumentClient.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\t\n\t\t\t//Node node = alfrescoManager.addFileFromParent(getTreeSelectedAlfrescoKey(), getFileChooser().getSelectedFile());\t\t\n\t\t\tif(node!=null){\n\t\t\t\tgetDynamicTreePanel().getChildFiles(getTreeSelectedDefaultMutableNode());\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"El documento se ha subido correctamente.\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error al subir el documento.\");\n\t\t}\n\t\t//el boton solo esta activo si un directorio esta seleccionado en el arbol directorios\n\t\t//se abre un filechooser y se elije un documento\n\t\t//solo se sube a alfresco, no se asocia automaticamente\n\t\t//se enviara la instancia de File() con el fichero seleccionado\n\t\t//se crea el fichero en alfresco, se recupera el nodo y se añade a la tabla actual (se hace de nuevo la peticion a getChildFiles())\n\t}", "private void updateTree(char c) {\n Node currentNode = getNode(c);\n //update nodes until the parent\n updateNodes(currentNode);\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tUtils.upgradeRootPermission(getPackageCodePath());\n\t\t\t}", "private void recurrence(final Path path) {\n Wipe.DEFAULT.forEach(\n it -> {\n it.clean(this.delete, path);\n this.jump(path);\n }\n );\n final File[] files = path.toFile().listFiles(File::isDirectory);\n if (files != null) {\n Arrays\n .stream(files)\n .forEach(it -> this.recurrence(it.toPath()));\n }\n }", "public abstract void actualizarSubproducto(EntityManager sesion, Subproducto subproducto);", "public void agregarAlFinal(int edad){\n if(!estaVacia()){\n fin.siguiente = new Nodo(edad);\n fin=fin.siguiente;\n }else{\n fin=inicio = new Nodo(edad);\n }\n }", "public void replaceNodeInInorderTraverse(Node node)\n\t{\n\t\tif(node!=null)\n\t\t{\n\t\t\t\n\t\t\treplaceNodeInInorderTraverse(node.leftChild);\n\t\t\tnode.data = (int) arr.get(index);\n\t\t\tindex++;\n\t\t\treplaceNodeInInorderTraverse(node.rightChild);\n\t\t}\n\t}", "public void agregaralfinal(int el){\n if(!estavacia()){\n fin=new nododoble(el, null, fin);\n fin.anterior.siguiente=fin;\n }else{\n inicio=fin=new nododoble(el);\n }}", "public void agregarAlFinal(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario recorre la lista hasta llegar al ultimo nodo\r\n //y agrega el nuevo.\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al ultimo nodo.\r\n while(aux.getSiguiente() != null){\r\n aux = aux.getSiguiente();\r\n }\r\n // Agrega el nuevo nodo al final de la lista.\r\n aux.setSiguiente(nuevo);\r\n }\r\n // Incrementa el contador de tamaño de la lista\r\n tamanio++;\r\n }", "private void actualizarConsecutivoExistente() {\n consecutivoSeleccionado.setTipoDocumento(clasificacionesFacade.find(Integer.parseInt(tipoDocumento)));\r\n consecutivoSeleccionado.setResolucionDian(resolucion);\r\n consecutivoSeleccionado.setInicio(inicio);\r\n consecutivoSeleccionado.setFin(fin);\r\n consecutivoSeleccionado.setActual(actual);\r\n consecutivoSeleccionado.setPrefijo(prefijo);\r\n consecutivoSeleccionado.setTexto(texto);\r\n consecutivoFacade.edit(consecutivoSeleccionado);\r\n limpiarFormularioConsecutivos();\r\n RequestContext.getCurrentInstance().update(\"IdFormConsecutivos\");\r\n mostrarTabView=false;\r\n imprimirMensaje(\"Correcto\", \"El consecutivo ha sido actualizado.\", FacesMessage.SEVERITY_INFO);\r\n }", "private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }", "@Override\n\tpublic void visit(Modulo arg0) {\n\t\t\n\t}", "public void inorder()\n {\n inorderRec(root);\n }", "public boolean isRecursive() {\n return mIsRecursive;\n }", "void updateBranch(Commit newt) {\n String nextBranch = null;\n Commit theNext = null;\n File parent = new File(\".gitlet/current\");\n for (File file : parent.listFiles()) {\n nextBranch = file.getName();\n }\n try {\n File getHead = new File(\".gitlet/heads/\" + nextBranch);\n FileOutputStream fieOut = new FileOutputStream(getHead);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n try {\n File hideous = new File(\".gitlet/current/\" + nextBranch);\n FileOutputStream ieOut = new FileOutputStream(hideous);\n ObjectOutputStream betOut = new ObjectOutputStream(ieOut);\n betOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n }", "public void inOrderTraverseRecursive();", "private void expandTree() {\n tree.expand();\n }", "private void fixTree(Node node){\n while(node.parent.color == RED){\n Node uncle = nil;\n if (node.parent == node.parent.parent.left){ // parent is to the left of grandparent\n uncle = node.parent.parent.right;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****LEFT RIGHT CASE (rotate P left)**** // GB GB\n if (node == node.parent.right){ // PR ==> NR\n node = node.parent; // NR PR\n rotateLeft(node); //\n }\n \n // ****LEFT LEFT CASE (rotate G right)****\n // uncle is nil and color = BLACK, or is // GB P\n // not nil and color still is BLACK // PR ==> N G\n node.parent.color = BLACK; // NR\n node.parent.parent.color = RED;\n rotateRight(node.parent.parent);\n \n } else { //parent is to the right of grand parent\n uncle = node.parent.parent.left;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****RIGHT LEFT CASE (rotate P right)**** // GB GB\n if (node == node.parent.left){ // PR ==> NR\n node = node.parent; // NR PR\n rotateRight(node); //\n }\n \n // **** RIGHT RIGHT CASE (rotate G left) // GR PB\n node.parent.color = BLACK; // PB ==> GR NR\n node.parent.parent.color = RED; // NR\n rotateLeft(node.parent.parent);\n }\n }\n \n root.color = BLACK;\n }", "public void updateGraph(){\n int cont=contador;\n eliminar(0);\n construir(cont);\n }", "public static void guardarArchivo(LinkedList<LinkedList<Integer>> permutacionParaCadaSubconjunto,\n int numeroDePuntos, float p) {\n final String nombreDelArchivo = \"respuesta-ejemplo-U=\" + numeroDePuntos + \"-p=\" + p + \".txt\";\n try {\n PrintWriter escritor = new PrintWriter(nombreDelArchivo, \"UTF-8\");\n for (LinkedList<Integer> lista : permutacionParaCadaSubconjunto) {\n for (Integer duenoDeVehiculo : lista)\n escritor.print(duenoDeVehiculo + \" \");\n escritor.println();\n }\n escritor.close();\n } catch (IOException ioe) {\n System.out.println(\"Error escribiendo el archivo de salida \" + ioe.getMessage());\n }\n }", "public void inserisci(String dove, String contenuto){\n if (n_nodi == 0){\n root = new NodoAlbero(contenuto, null, \"directory\");\n n_nodi++;\n return;\n }\n //troviamo il nodo che sarà il padre del nodo che dobbiamo aggiungere\n NodoAlbero cercato = ricerca(dove);\n \n //se il nodo padre non esiste, non aggiungiamo il nuovo nodo\n if (cercato == null)\n return;\n //se il nodo padre non ha un figlio, lo creiamo\n if (cercato.getFiglio() == null)\n cercato.setFiglio(new NodoAlbero(contenuto, cercato, \"directory\"));\n //se ce ne ha già almeno uno, lo accodiamo agli altri figli\n else {\n NodoAlbero temp = cercato.getFiglio();\n while (temp.getFratello() != null)\n temp = temp.getFratello();\n temp.setFratello(new NodoAlbero(contenuto, temp.getPadre(), \"directory\"));\n }\n n_nodi++;\n }", "private void reFix(WAVLNode x) {\n\t x.sizen--;\r\n\t while(x.parent!=null) {\r\n\t\t x=x.parent;\r\n\t\t x.sizen--;\r\n\t }\r\n }", "@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}", "@Test\n public void testRecursion() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Solution.getClass().getMethod(\"recursion\", ArrayList<Integer>.class, TreeNode.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "private void borraArchivos() {\n boolean isBorrado;\n for (BeanCargaOmisos dato : this.listadoCargaOmisos) {\n String dirBitacora = dato.getRutaEnBitacora();\n String dirRepositorio = dato.getRutaEnRepositorio();\n if (dirBitacora != null && !dirBitacora.isEmpty()) {\n File archivoBitacora = new File(dirBitacora);\n if (archivoBitacora.exists()) {\n isBorrado = archivoBitacora.delete();\n getLogger().debug(isBorrado);\n }\n }\n if (dirRepositorio != null && !dirRepositorio.isEmpty()) {\n File archivoRepositorio = new File(dirRepositorio);\n if (archivoRepositorio.exists()) {\n isBorrado = archivoRepositorio.delete();\n getLogger().debug(isBorrado);\n }\n }\n }\n }", "private void btnModificarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnModificarActionPerformed\n if(libCancion.getSelectedIndex()<0){\n \n }\n else{\n int a = libCancion.getSelectedIndex();\n modificar = new modificarInfo();\n modificar.setVisible(true);\n modificar.btn.getModel().setEnabled(true);\n modificar.btn.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent evt){\n \n String artista = modificar.txtArtista.getText();\n String album = modificar.txtAlbum.getText();\n String genero = modificar.txtGenero.getText();\n cancion.modificarCancion(a, artista, album, genero);\n modificar.lblCorrecto.setText(\"Se ha modificado\");\n libCancion.setModel(lista);\n }\n \n \n \n \n });\n imagen=null;\n modificar.subir.setEnabled(true);\n modificar.subir.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent evt){\n int status = fileChooser.showOpenDialog (null);\n if (status == JFileChooser.APPROVE_OPTION){\n File selectedFile = fileChooser.getSelectedFile();\n imagen = selectedFile.getAbsolutePath();\n System.out.println(imagen);\n cancion.subirImagen(a, imagen);\n \n \n }\n \n else{ \n if (status == JFileChooser.CANCEL_OPTION){\n System.out.println(\"CANCELAR\");\n }\n cancion.subirImagen(a, imagen);\n \n \n }\n }\n });\n }\n }", "public static void devolucion(int id, int codigo) throws Exception {\n\t\tint n = localizarPosicionPrestamo(id, codigo);\n\t\tSystem.out.println(n);\n\t\t// ###########################################################################\n\t\t// Cambios en el Fichero de FPRESTAMOS (Ver Clase Const)\n\t\tf = new RandomAccessFile(Const.FPRESTAMOS, \"rw\");\n\t\tArchivos.irARegistro(f, id, Usuario.getlongitugRegistroUsuarioPrestamos());\n\t\tUsuario u = new Usuario();\n\t\tu.leer(f);\n\n\t\t// almaceno en FP la posicion actial del puntero para seguir en el usuario pero\n\t\t// solo para accder de forma directa a los libros prestados.\n\n\t\t// fp |> posicion del puntero en el fichero justo despues de leer el usuario\n\t\t// seleccionado\n\t\tint fp = (int) f.getFilePointer();\n\n\t\t// n |> posicion del libro el cual se quiere devolver por parte del usuario\n\t\tf.seek(fp + (n * Libro.getLongitudRegistroLibro()));\n\t\tLibro l = new Libro();\n\t\tl = new Libro(-1, \"\", false);\n\t\tl.escribir(f);\n\n\t\t// ###########################################################################\n\t\t// Cambios en el fichero de FLIBROS (Ver Clase Const)\n\t\t// Escribe en dicho fichero el libro pero con el atributo de Prestado como False\n\t\tf = new RandomAccessFile(Const.FLIBROS, \"rw\");\n\t\tl = new Libro();\n\t\tArchivos.retrocederRegistroLibro(f, codigo, Libro.getLongitudRegistroLibro(), l);\n\t\tl.prestado = false;\n\t\tl.escribir(f);\n\n\t\t// ###########################################################################\n\t\t// Cambios en el fichero de FLIBROASIGNADOA (Ver Clase Const)\n\t\t// Escribe en dicho fichero un libro y un suaurio Nulo con valores nulos\n\t\tf = new RandomAccessFile(Const.FLIBROASIGNADOA, \"rw\");\n\t\tArchivos.irARegistro(f, codigo, Const.N);\n\n\t\t// finalmente se crea y escriben usuario y libros nulos en el fichero\n\t\tl = new Libro(-1, \"\", false);\n\t\tl.escribir(f);\n\n\t\tu = new Usuario(\"\", -1);\n\t\tu.escribir(f);\n\n\t\tf.close();\n\n\t}", "public boolean addChild(INode node, final boolean setModTime,\r\n final Snapshot latest) throws NSQuotaExceededException {\r\n final int low = searchChildren(node.getLocalNameBytes());\r\n if (low >= 0) {\r\n return false;\r\n }\r\n\r\n if (isInLatestSnapshot(latest)) {\r\n return replaceSelf4INodeDirectoryWithSnapshot()\r\n .addChild(node, setModTime, latest);\r\n }\r\n addChild(node, low);\r\n if (setModTime) {\r\n // update modification time of the parent directory\r\n updateModificationTime(node.getModificationTime(), latest);\r\n }\r\n return true;\r\n }", "public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }", "private void restoreDirectories() throws IOException {\n\t\t// Reponemos las refactorizaciones que habia antes\n\t\tFileManager.emptyDirectories(RefactoringPlugin\n\t\t\t\t.getDynamicRefactoringsDir());\n\t\tFileManager.deleteDirectories(\n\t\t\t\tRefactoringPlugin.getDynamicRefactoringsDir(), false);\n\t\tFileManager\n\t\t\t\t.copyFolder(\n\t\t\t\t\t\t\"./testdata/XML/Writer/availableRefactorings/DynamicRefactorings\",\n\t\t\t\t\t\tnew File(RefactoringPlugin.getDynamicRefactoringsDir())\n\t\t\t\t\t\t\t\t.getParent());\n\t\t// Borramos la carpeta con las refactorizaciones del directorio temporal\n\t\tFileManager\n\t\t\t\t.emptyDirectories(\"./testdata/XML/Writer/availableRefactorings/DynamicRefactorings\");\n\t\tFileManager\n\t\t\t\t.deleteDirectories(\n\t\t\t\t\t\t\"./testdata/XML/Writer/availableRefactorings/DynamicRefactorings\",\n\t\t\t\t\t\ttrue);\n\t\t// Borramos el archivo generado para dejar la aplicaci�n como se\n\t\t// encontraba.\n\t\tFileManager.deleteFile(RefactoringConstants.REFACTORING_TYPES_FILE);\n\t}", "public boolean modificarContrato(int idContrato, int turnoInicial, String nombre, String patron, int duracionCiclo, double salario, int tipo) {\r\n\t\tContrato c = getContrato(idContrato);\r\n\t\tif (c==null) return false;\r\n\t\tc.setTurnoInicial(turnoInicial);\r\n\t\tc.setNombreContrato(nombre);\r\n\t\tc.setPatron(patron);\r\n\t\tc.setDuracionCiclo(duracionCiclo);\r\n\t\tc.setSalario(salario);\r\n\t\tc.set_tipoContrato(tipo);\r\n\t\tmodifyCache(c, \"Contrato\");\r\n\t\treturn true;\r\n\t}", "public void restarPunto ( ) {\n\t\tif ( vida > 0 )\n\t\t\tvida--;\n\t}", "public GrupoProducto modificar(GrupoProducto grupoProducto){\r\n Long id = grupoProducto.getId();\r\n for (int i = 0; i <= listaGrupoProductos.size(); i++) {\r\n if (id == listaGrupoProductos.get(i).getId()) {\r\n listaGrupoProductos.set(i, grupoProducto);\r\n return grupoProducto;\r\n\r\n }\r\n }\r\n return null;\r\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 }", "void rootChanged(@NotNull PsiFile psiFile);", "private void modify(seg_node root, int l, int r, int a, int b, int v) {\n push_down(root);\n if (l == a && r == b) {\n root._sum += v * root.tot ;\n root._product = root._product * power_mod(root._product_of_di, v) % mod;\n root._lazy_sum += v;\n return;\n }\n int m = (l + r) / 2;\n if (b <= m) {\n modify(root.left, l, m, a, b, v);\n } else if (a >= m + 1) {\n modify(root.right, m + 1, r, a, b, v);\n } else {\n modify(root.left, l, m, a, m, v);\n modify(root.right, m + 1, r, m + 1, b, v);\n }\n push_up(root);\n }", "private void updateToFile(PQNode node) throws Exception{\n List<PQNode> nodes = retrieveWholeFile(node.getPqIndex());\n int replaceIndex = node.getPqIndex()-bufStart;\n\n nodes.set(replaceIndex,node);\n int fileId = (node.getPqIndex()-1)/ENTRY_BLOCK_SIZE;\n File file = new File(DIRECTORY + getMapFileName(NAME_PATTERN, fileId));\n storeToFile(file,nodes, false);\n }", "@Override\r\n\tpublic void cargarSubMenuPersona() {\n\t\t\r\n\t}", "public abstract boolean impliesWithoutTreePathCheck(Permission permission);", "public static void actualizarCreencias(int id) {\n\t\tint j =0;\t\t\n\t\t//Actualizamos las creecias del jugador \n\t\tint i =0;\n\t\tfor(j =0; j < GestorPartida.getContJugadores();j++) {\n\t\t\t\n\t\t\t\n\t\t\tif(GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t//Filtramos que los jugadores que vayan a actualizar sus creencias sean los de la sala del jugador que acaba de realizar una accion, excepto las suyas propias\t\t\t\n\t\t\t\tif(GestorPartida.getJugadores()[j].getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala()) && GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t\t//Actualizamos la sala por si el jugador se acaba de mover\n\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setSalaPersona(GestorPartida.getJugadores()[j].getSala(), i);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosJugador();j++) {\n\t\t\t//Comprobamos que el jugador coincida con un poseedor de un objeto\n\t\t\tif(GestorPartida.getObjetoJugador()[j].getJugador().getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoJugador()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoJugador()[j].getJugador().getNombre(), x);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosSala();j++) {\n\t\t\t//Comprobamos si hay objetos en la sala del jugador\n\t\t\tif(GestorPartida.getObjetoSala()[j].getSala().getNombre().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoSala()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoSala()[j].getSala().getNombre(), x);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public void aumentarReproducciones() {\n\t\treproducciones++;\n\t}", "private void updateSkiTreeLevel(SkiNode head) {\n\t\tfor (SkiNode nextNode : head.next) {\n\t\t\tif (nextNode != null) {\n\t\t\t\tupdateSkiTreeLevel(nextNode);\n\t\t\t\thead.level = Math.max(head.level, nextNode.level + 1);\n\t\t\t}\n\t\t}\n\t\thead.level = Math.max(head.level, 1);\n\t\thMap[head.i][head.j] = head.level;\n\t}", "private Long modificarCorreoElectronico(CorreoElectronico correo) {\n\t\ttry {\n\t\t\t gCorreoElectronico.modify(correo);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn correo.getIdCorreoElectronico();\n\t}", "@Override\n public void rootRPClassUpdate(RPObject entity) {\n }", "public void recevoirDossier() {\n try {\n fileInfo = (FileInfo) ois.readObject(); //lire les informations du fichier\n //chemin du fichier en sortie\n String outputFile = fileInfo.getDestinationDirectory() + fileInfo.getFilename();\n dstFile = new File(outputFile);\n if (!new File(fileInfo.getDestinationDirectory()).exists()) { //si le fichier n'existe pas\n new File(fileInfo.getDestinationDirectory()).mkdirs(); //creation du fichier\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData()); //ecrire les données dans le fichier\n fos.flush();\n fileInfo.setFileData(null);\n System.gc();\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n\n } else if (dstFile.lastModified() < fileInfo.getModifier()) { //si le fichier existe et que c'est une nouvelle version alors\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData());\n fos.flush();\n fileInfo.setFileData(null);\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(RecevoirFichier.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void addFolder(){\n }" ]
[ "0.6094673", "0.58493054", "0.58108044", "0.5635136", "0.55706507", "0.5554412", "0.54572845", "0.53495634", "0.5306717", "0.5236774", "0.5175328", "0.51238966", "0.5120859", "0.5115536", "0.50694025", "0.5041886", "0.50252", "0.50150484", "0.50073713", "0.4978979", "0.4975237", "0.49669653", "0.4966201", "0.49607095", "0.49549103", "0.49382272", "0.49319124", "0.49236453", "0.49039254", "0.49031895", "0.48985633", "0.48957083", "0.4892806", "0.4882787", "0.48814222", "0.4874376", "0.4873131", "0.4868013", "0.4858401", "0.485624", "0.4853493", "0.4846694", "0.48324823", "0.48115906", "0.48065868", "0.48040843", "0.48001623", "0.47905344", "0.47794628", "0.47737032", "0.47729003", "0.4766538", "0.47491512", "0.47404268", "0.473702", "0.4726381", "0.47242194", "0.47235152", "0.47199863", "0.47123864", "0.4712372", "0.47087047", "0.47083", "0.470273", "0.46941102", "0.46914822", "0.4686941", "0.4683331", "0.46797186", "0.4677158", "0.4674603", "0.46722522", "0.46712142", "0.4669445", "0.46670124", "0.46653587", "0.4648593", "0.46484438", "0.4648001", "0.46462843", "0.46402", "0.46364677", "0.46279794", "0.46274585", "0.46224558", "0.46222776", "0.46220082", "0.4619504", "0.46071565", "0.46063057", "0.45974302", "0.45964026", "0.4587688", "0.45875278", "0.45846027", "0.45839977", "0.45827895", "0.45811182", "0.4577442", "0.45768824", "0.45759112" ]
0.0
-1
Se encarga de recuperar la lista paginada y ordenado de recursos.
public ListaResponse<G> listar(HashMap<String, Object> filtros);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ResultMap<BaseNode> listChildren(Pagination pagination);", "@Override // Métodos que fazem a anulação\n\tpublic void pagaIR() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "List<Registration> allRegTrailPagination(long idTrail, int currentPage, int elementPerPage);", "List<Registration> allRegUserPagination(long idUser, int currentPage, int elementPerPage);", "@Command\n\t@NotifyChange(\"*\")\n\tpublic void paginarLista(){\n\t\tint page=pagAnalistas.getActivePage();\n\t\tcambiarAnalistas(page, null, null);\n\t}", "public List<Pregunta> getPreguntasRecientes(int page, int pageSize);", "@Override\n protected void onResume() {\n getList(currentPage.toString(), tag);\n super.onResume();\n }", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "void findWithPagination(Pagination<Task, Project> pagination);", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "Page getList(ViewResourceSearchVO viewResourceSearchVO) throws Exception;", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "public List getList(int start, int pernum, SearchParam param);", "List<RiceCooker> getPerPage(long startRow, long maxRows);", "private void pagination(){\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n }\n\n @Override\n public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n if (dy>0){\n LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();\n int lastItem = layoutManager.findLastCompletelyVisibleItemPosition(); //finds last visible item\n int currentTotalCount = layoutManager.getItemCount(); //find total number of displayed items\n\n if (mLoadingItems){\n if (currentTotalCount > previousTotal){\n mLoadingItems = false;\n previousTotal = currentTotalCount;\n }\n }\n if (!mLoadingItems && (currentTotalCount <= (lastItem +view_threshold))) {\n mLoadingItems = true;\n //Increment number of items on the list\n firstItemVisible = firstItemVisible+10;\n lastItemVisible = lastItemVisible+10;\n //Update adapter\n jsonParse();\n }\n }\n }\n });\n }", "@GetMapping(\"/pagina\")\t\n\tpublic ResponseEntity<?> listar(Pageable pageable) {\n\t\tPageable pageableEnv = PageRequest.of(pageable.getPageNumber() - 1, pageable.getPageSize());\n\t\treturn ResponseEntity.ok().body(service.findAll(pageableEnv));\n\t}", "public List<DetallesFacturaContratoVenta> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 32: */ {\r\n/* 33: 51 */ List<DetallesFacturaContratoVenta> listaDetallesFacturaContratoVenta = new ArrayList();\r\n/* 34: */ \r\n/* 35: 53 */ CriteriaBuilder criteriaBuilder = this.em.getCriteriaBuilder();\r\n/* 36: 54 */ CriteriaQuery<DetallesFacturaContratoVenta> criteriaQuery = criteriaBuilder.createQuery(DetallesFacturaContratoVenta.class);\r\n/* 37: 55 */ Root<DetallesFacturaContratoVenta> from = criteriaQuery.from(DetallesFacturaContratoVenta.class);\r\n/* 38: */ \r\n/* 39: 57 */ Fetch<Object, Object> contratoVenta = from.fetch(\"contratoVenta\", JoinType.LEFT);\r\n/* 40: 58 */ Fetch<Object, Object> empresa = contratoVenta.fetch(\"empresa\", JoinType.LEFT);\r\n/* 41: 59 */ Fetch<Object, Object> cliente = empresa.fetch(\"cliente\", JoinType.LEFT);\r\n/* 42: 60 */ contratoVenta.fetch(\"agenteComercial\", JoinType.LEFT);\r\n/* 43: 61 */ contratoVenta.fetch(\"subempresa\", JoinType.LEFT);\r\n/* 44: 62 */ Fetch<Object, Object> direccionEmpresa = contratoVenta.fetch(\"direccionEmpresa\", JoinType.LEFT);\r\n/* 45: 63 */ direccionEmpresa.fetch(\"ubicacion\", JoinType.LEFT);\r\n/* 46: 64 */ contratoVenta.fetch(\"canal\", JoinType.LEFT);\r\n/* 47: 65 */ contratoVenta.fetch(\"zona\", JoinType.LEFT);\r\n/* 48: 66 */ contratoVenta.fetch(\"condicionPago\", JoinType.LEFT);\r\n/* 49: */ \r\n/* 50: 68 */ List<Expression<?>> empresiones = obtenerExpresiones(filters, criteriaBuilder, from);\r\n/* 51: 69 */ criteriaQuery.where((Predicate[])empresiones.toArray(new Predicate[empresiones.size()]));\r\n/* 52: */ \r\n/* 53: 71 */ agregarOrdenamiento(sortField, sortOrder, criteriaBuilder, criteriaQuery, from);\r\n/* 54: */ \r\n/* 55: 73 */ CriteriaQuery<DetallesFacturaContratoVenta> select = criteriaQuery.select(from);\r\n/* 56: */ \r\n/* 57: 75 */ TypedQuery<DetallesFacturaContratoVenta> typedQuery = this.em.createQuery(select);\r\n/* 58: 76 */ agregarPaginacion(startIndex, pageSize, typedQuery);\r\n/* 59: */ \r\n/* 60: 78 */ listaDetallesFacturaContratoVenta = typedQuery.getResultList();\r\n/* 61: 81 */ for (DetallesFacturaContratoVenta dfcv : listaDetallesFacturaContratoVenta)\r\n/* 62: */ {\r\n/* 63: 83 */ CriteriaQuery<DetalleContratoVenta> cqDetalle = criteriaBuilder.createQuery(DetalleContratoVenta.class);\r\n/* 64: 84 */ Root<DetalleContratoVenta> fromDetalle = cqDetalle.from(DetalleContratoVenta.class);\r\n/* 65: 85 */ fromDetalle.fetch(\"producto\", JoinType.LEFT);\r\n/* 66: */ \r\n/* 67: 87 */ cqDetalle.where(criteriaBuilder.equal(fromDetalle.join(\"contratoVenta\"), dfcv.getContratoVenta()));\r\n/* 68: 88 */ CriteriaQuery<DetalleContratoVenta> selectContratoVenta = cqDetalle.select(fromDetalle);\r\n/* 69: */ \r\n/* 70: 90 */ List<DetalleContratoVenta> listaDetalleContratoVenta = this.em.createQuery(selectContratoVenta).getResultList();\r\n/* 71: 91 */ dfcv.getContratoVenta().setListaDetalleContratoVenta(listaDetalleContratoVenta);\r\n/* 72: */ }\r\n/* 73: 94 */ return listaDetallesFacturaContratoVenta;\r\n/* 74: */ }", "List<T> findPage(int pageNumber);", "public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;", "LiveData<PagedList<Response>> pagedList();", "private void paginate() {\n List<ItemModel> old = adapter.getItems();\n List<ItemModel> New = new ArrayList<>(addList());\n CardStackCallback callback = new CardStackCallback(old, New);\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(callback);\n adapter.setItems(New);\n result.dispatchUpdatesTo(adapter);\n }", "private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\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\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public interface PaginatedResult<T> {\n\n\t/**\n\t * Get the contents as an array of component type\n\t */\n\tpublic T[] items();\n\n\t/**\n\t * Obtain params required to perform the given relative query\n\t */\n\tpublic abstract PaginatedResult<T> first() throws AblyException;\n\tpublic abstract PaginatedResult<T> current() throws AblyException;\n\tpublic abstract PaginatedResult<T> next() throws AblyException;\n\n\tpublic abstract boolean hasFirst();\n\tpublic abstract boolean hasCurrent();\n\tpublic abstract boolean hasNext();\n}", "public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);", "public abstract ArrayList<T> findAll(int limit, int offset);", "Page<PathHistory> findAll(Pageable pageable);", "private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }", "private static void traverse(ItemInfo rootItem, List<ItemInfo> results, int depth, String extraAttributes) throws Exception {\n Objects.requireNonNull(extraAttributes);\n\n final Collection<ItemInfo> children = new ArrayList<>();\n\n// final URL itemURL\n// = UriBuilder\n// .fromUri(rootItem.href.replace(\" \", \"%20\"))\n// .queryParam(\"attributes\", extraAttributes)\n// .build()\n// .toURL();\n\n final HttpURLConnection getItemConnection = (HttpURLConnection) rootItem.href.openConnection();\n getItemConnection.setConnectTimeout(PlatformTools.getDefaultConnectionTimeoutms());\n getItemConnection.setReadTimeout(PlatformTools.getDefaultReadTimeoutms());\n getItemConnection.setRequestProperty(\"Accept\", \"application/hal+json\");\n\n final int itemStatus = getItemConnection.getResponseCode();\n if (HttpURLConnection.HTTP_OK == itemStatus) {\n final String rawItemPageResults = PlatformTools.getContent(getItemConnection);\n final JSONObject itemResult = JSONObject.fromObject(rawItemPageResults);\n results.add(new ItemInfo(itemResult, depth));\n\n final JSONObject embedded = (JSONObject) itemResult.get(\"_embedded\");\n JSONObject collection = null;\n if (null != embedded) {\n collection = (JSONObject) embedded.get(\"loc:collection\");\n }\n // The item to traverse is a folder:\n if (null != collection) {\n // Get the items of the folder pagewise:\n JSONObject embeddedItems = (JSONObject) collection.get(\"_embedded\");\n if (null != embeddedItems) {\n do {\n final Object itemsObject = embeddedItems.get(\"loc:item\");\n if (null != itemsObject) {\n if (itemsObject instanceof JSONArray) {\n final JSONArray items = (JSONArray) itemsObject;\n\n final Collection<ItemInfo> itemPage = new ArrayList<>(items.size());\n for (final Object item : items) {\n final JSONObject folderItem = (JSONObject) item;\n itemPage.add(new ItemInfo(folderItem, depth + 1));\n }\n children.addAll(itemPage);\n } else {\n children.add(new ItemInfo((JSONObject) itemsObject, depth + 1));\n }\n }\n\n final JSONObject linkToNextPage = (JSONObject) collection.getJSONObject(\"_links\").get(\"next\");\n if (null != linkToNextPage) {\n final HttpURLConnection itemNextPageConnection = (HttpURLConnection) new URL(linkToNextPage.getString(\"href\").replace(\" \", \"%20\")).openConnection();\n itemNextPageConnection.setConnectTimeout(PlatformTools.getDefaultConnectionTimeoutms());\n itemNextPageConnection.setReadTimeout(PlatformTools.getDefaultReadTimeoutms());\n itemNextPageConnection.setRequestProperty(\"Accept\", \"application/hal+json\");\n\n final int itemNextPageStatus = itemNextPageConnection.getResponseCode();\n if (HttpURLConnection.HTTP_OK == itemNextPageStatus) {\n final String rawNextItemPageResults = PlatformTools.getContent(itemNextPageConnection);\n collection = JSONObject.fromObject(rawNextItemPageResults);\n embeddedItems = (JSONObject) collection.get(\"_embedded\");\n } else {\n collection = null;\n }\n } else {\n collection = null;\n }\n } while (null != collection && null != embeddedItems);\n }\n }\n\n for (final ItemInfo item : children) {\n if (item.hasChildren) {\n traverse(item, results, depth + 1, extraAttributes);\n }\n }\n\n for (final ItemInfo item : children) {\n if (!item.hasChildren) {\n results.add(item);\n }\n }\n } else {\n LOG.log(Level.INFO, \"Get item failed for item <{0}>. -> {1}\", new Object[] {rootItem.href, PlatformTools.getContent(getItemConnection)});\n }\n }", "private List<Node<T>> completaCamino(Node<T> ret, List<Node<T>> camino) {\r\n\t\tboolean comp = true;// Comprobacion\r\n\t\tcamino.add(ret);// Aņadimos el nodo al camino\r\n\t\twhile (comp) {\r\n\t\t\tif (ret.getParent() != null) {// Mientras no sea la raiz\r\n\t\t\t\tcamino.add(ret.getParent(), 1);// Aņade al inicio de la lista\r\n\t\t\t\tret = ret.getParent();// Hace que el padre sea el nuevo nodo\r\n\t\t\t} else if (ret.getParent() == null) {// Si es la raiz\r\n\t\t\t\tcomp = false;// Cancela\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn camino;\r\n\t}", "public ObservableList<Pagadores> carregaPagadores() {\n\t\tcon = Conexao.conectar();\n\t\tObservableList<Pagadores> resultadoPagadores = FXCollections.observableArrayList();\n\t\ttry {\n\t\t\tString query = \"SELECT * FROM pagadores WHERE estpagador = ? ORDER BY agente\";\n\t\t\tprepStmt = con.prepareStatement(query); // create a statement\n\t\t\tprepStmt.setString(1, \"A\");\n\t\t\trs = prepStmt.executeQuery();\n\t\t\t\t\t\t // extract data from the ResultSet\n\t\t\twhile(rs.next()) {\n\t\t\t\tPagadores temp = new Pagadores();\n\t\t\t\ttemp.setCodPagador(rs.getInt(\"codpagador\"));\n\t\t\t\ttemp.setEstPagador(rs.getString(\"estpagador\"));\n\t\t\t\ttemp.setRecDescr(rs.getString(\"recdescr\"));\n\t\t\t\t\n\t\t\t\ttemp.setValContrato(rs.getDouble(\"valcontrato\"));\n\t\t\t\ttemp.setContratoInic(DateUtils.asLocalDate(rs.getDate(\"contratoinic\")));\n\t\t\t\ttemp.setContratoFim(DateUtils.asLocalDate(rs.getDate(\"contratofim\")));\n\t\t\t\t\n\t\t\t\ttemp.setNomeContrato(rs.getString(\"nomecontrato\"));\n\t\t\t\ttemp.setContaVinc(rs.getInt(\"contavinc\"));\n\t\t\t\ttemp.setCentroReceb(rs.getInt(\"centroreceb\"));\n\t\t\t\t\n\t\t\t\ttemp.setSubCentroRec(rs.getInt(\"subcentrorec\"));\n\t\t\t\ttemp.setDataLanc(DateUtils.asLocalDate(rs.getDate(\"datalanc\")));\n\t\t\t\ttemp.setDiaVenc(rs.getInt(\"diavenc\"));\n\t\t\t\ttemp.setAgente(rs.getString(\"agente\"));\n\t\t\t\t\n\t\t\t\tresultadoPagadores.add(temp);\n\t\t\t}\n\t\t\treturn resultadoPagadores;\n\t\t} catch(Exception e) {\n\t\t\tMessageBox.show(\"Erro ao ler pagadores 59\", e.getMessage());\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tprepStmt.close();\n\t\t\t\t//conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "List<JournalPage> getAllPages();", "@Override\r\n\tpublic List<TypeModePaiement> listeAllPagination(int page) {\n\t\treturn null;\r\n\t}", "public List<T> getPageElementsList();", "Page<RefTarifDTO> findAll(Pageable pageable);", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "List<ProductView> getAllByPage(PageableAndSortable pageableAndSortable) throws ProductException;", "@PreAuthorize(\"@userAuthorize.canList(#searchCriterias)\")\n\t@RequestMapping(value = \"/listWithCriteriasByPage\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> listWithCriteriasByPage(@RequestBody List<SearchCriteria> searchCriterias, Pageable pageable) {\n\t\tPage<User> users = userService.listWithCriterasByPage(searchCriterias, pageable);\n\t\t// return.\n\t\treturn new ResponseEntity<Page<User>>(users, HttpStatus.OK);\n\t}", "private List<PreDocumentoEntrata> ricercaSinteticaPreDocumentoEntrata() {\n\t\tRicercaSinteticaPreDocumentoEntrataResponse resRSPD = ricercaSinteticaPreDocumentoEntrata(0);\t\t\n\t\tList<PreDocumentoEntrata> result = resRSPD.getPreDocumenti();\n\t\t\n\t\tfor(int i = 1; i < resRSPD.getTotalePagine(); i++) {\t\t\t\n\t\t\tresRSPD = ricercaSinteticaPreDocumentoEntrata(i);\n\t\t\tresult.addAll(resRSPD.getPreDocumenti());\t\t\t\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic ArrayList<Parent> queryAllOrderPage(int begin, int size) {\n\t\treturn parentDao.queryAllOrderPage(begin, size);\n\t}", "List<E> page(Page page, Long...params);", "public List<UserVO> pagingUser(Criteria cri);", "void findWithPagination(Pagination<Activity, Assignment> pagination);", "Page<EtatOperation> findAll(Pageable pageable);", "public List<Object> retrievePagingList(PageBean pageBean) ;", "List<Activity> findAllPageable(int page, int size);", "Page<Accessprofile> listWithCriterasByPage(List<SearchCriteria> searchCriterias, Pageable pageable);", "public List<String> iterateProgramPageList();", "@Override\n\tpublic Page<RegiaoEntity> Lista(PageRequest page) {\n\t\treturn null;\n\t}", "private List<Node<T>> auxiliarRecorridoIn(Node<T> nodo, List<Node<T>> lista, Node<T> raiz) {\r\n\t\t\r\n\t\tif (nodo.getChildren() != null) {\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tauxiliarRecorridoIn(hijos.get(i), lista, raiz);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "private Hashtable<String, String> cargarRecursos() {\n Hashtable<String, String> recursosTemp = new Hashtable<String, String>(); \n \n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA, ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA);\n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB, ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB);\n return recursosTemp;\n }", "@Override\n\tpublic void realizarPago() {\n\t}", "@DirectMethod\r\n\tpublic List<MovimientoDto> obtenerPagos(int iIdEmpresa, int iIdEmpRaiz, int iIdBanco, \r\n\t\t\tString sIdDivisa, String sIdChequera, String sTipoBusqueda, int idUsuario)\r\n\t{\r\n\t\tif (!Utilerias.haveSession(WebContextManager.get())) \r\n\t\t\treturn null;\r\n\t\tList<MovimientoDto> listConsPag = new ArrayList<MovimientoDto>(); \r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (Utilerias.haveSession(WebContextManager.get())) {\r\n\t\t\tParamBusquedaFondeoDto dtoBus = new ParamBusquedaFondeoDto();\r\n\t\t\tCoinversionService coinversionService = (CoinversionService) contexto.obtenerBean(\"coinversionBusinessImpl\");\r\n\t\t\tdtoBus.setIdEmpresa(funciones.validarEntero(iIdEmpresa));\r\n\t\t\tdtoBus.setIdBanco(funciones.validarEntero(iIdBanco));\r\n\t\t\tdtoBus.setIdChequera(funciones.validarCadena(sIdChequera));\r\n\t\t\tdtoBus.setIdEmpresaRaiz(funciones.validarEntero(iIdEmpRaiz));\r\n\t\t\tdtoBus.setSTipoBusqueda(funciones.validarCadena(sTipoBusqueda));\r\n\t\t\tdtoBus.setIdDivisa(funciones.validarCadena(sIdDivisa));\r\n\t\t\tdtoBus.setIdUsuario(idUsuario);\r\n\t\t\t\r\n\t\t\tlistConsPag = coinversionService.obtenerPagos(dtoBus);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e) \r\n\t\t\t\t\t+ \"P:Coinversion, C:CoinversionAction, M:obtenerPagos\");\r\n\t\t}\r\n\t\treturn listConsPag;\r\n\t}", "private ArrayList<Integer> getPageLinks() {\n int numberOfPages = sqlData.getNumberOfPages();\n\n int n = (pageNumInt / numberOfPages);\n Integer startPage = n * numberOfPages;\n\n ArrayList<Integer> pageLinks = new ArrayList<Integer>();\n\n // iterate and add to the array\n for(int i=0; i < numberOfPages; i++) {\n pageLinks.add(++startPage); \n }\n\n return pageLinks;\n \n }", "public static String paginate(HttpServletRequest request, HttpServletResponse response) {\n List page = FastList.newInstance();\n Paginator paginator = PaginatorFactory.getPaginator(request);\n String action = UtilCommon.getParameter(request, \"action\");\n String pageNumberString = UtilCommon.getParameter(request, \"pageNumber\");\n \n if (paginator != null) {\n try {\n if (pageNumberString != null) {\n try {\n long pageNumber = Long.parseLong(pageNumberString);\n page = paginator.getPageNumber(pageNumber);\n }\n catch (NumberFormatException e) {\n Debug.logWarning(\"Failed to get page numer [\" + pageNumberString + \"] to to format error: \" + e.getMessage(), module);\n page = paginator.getCurrentPage();\n }\n }\n else if (action == null || \"getCurrentPage\".equals(action)) {\n page = paginator.getCurrentPage();\n }\n else if (\"getNextPage\".equals(action)) {\n page = paginator.getNextPage();\n }\n else if (\"getPreviousPage\".equals(action)) {\n page = paginator.getPreviousPage();\n }\n else if (\"getFirstPage\".equals(action)) {\n page = paginator.getFirstPage();\n }\n else if (\"getLastPage\".equals(action)) {\n page = paginator.getLastPage();\n }\n else {\n Debug.logWarning(\"Paginate action [\" + action + \"] not supported.\", module);\n page = paginator.getCurrentPage();\n }\n }\n catch (ListBuilderException e) {\n return doListBuilderExceptionResponse(request, response, paginator, e);\n }\n }\n return doPaginationResponse(request, response, paginator, page);\n }", "public List<CategoriaArticuloServicio> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 34: */ {\r\n/* 35:75 */ return this.categoriaArticuloServicioDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 36: */ }", "Page<Livre> findAll(Pageable pageable);", "public interface PagedResult<T> {\r\n\r\n\t/*\r\n\t * Result code\r\n\t */\r\n\t\r\n\tpublic static final int RESULT_CODE_OK = 0;\r\n\t\r\n\tpublic static final int RESULT_CODE_KO = -1;\r\n\t\r\n\tpublic static final int FIRST_PAGE_INDEX = 1;\r\n\t\r\n\t/**\r\n\t * The method getElementCount() returns this value if the element count is unavalable\r\n\t */\r\n\tpublic final static Integer ELEMENT_COUNT_UNAVAILABLE = -1;\r\n\t\r\n\t/**\r\n\t * <p>The position of the first element of the current pages ( (currentPage-1) * perPage )</p> \r\n\t * \r\n\t * @return\toffset of the first element in this page\r\n\t */\r\n\tpublic Integer getOffset();\r\n\t\r\n\t/**\r\n\t * <p>Maximum number of elements in a page</p>\r\n\t * \r\n\t * @return\tmaximum number of elements in a page\r\n\t */\r\n\tpublic Integer getPerPage();\r\n\r\n\t/**\r\n\t * <p>Total number of elements in all pages</p>\r\n\t * \r\n\t * @return\ttotal number of elements in all pages\r\n\t */\r\n\tpublic Long getElementCount();\r\n\t\r\n\t/**\r\n\t * <p>Position of current page ( in the range 1 - n )</p>\r\n\t * \r\n\t * @return\tposition of current page\r\n\t */\r\n\tpublic Integer getCurrentPage();\t\r\n\t\r\n\t/**\r\n\t * <p>Total number of pages</p>\r\n\t * \r\n\t * @return\ttotal number of pages\r\n\t */\r\n\tpublic Integer getPageCount();\t\r\n\t\r\n\t/**\r\n\t * <p>Number of elements in current page</p>\r\n\t * \r\n\t * @return\tthe size of the current page\r\n\t */\r\n\tpublic Integer getCurrentPageSize();\r\n\t\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic Iterator<T> getPageElements();\r\n\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic List<T> getPageElementsList();\r\n\t\r\n\t/**\r\n\t * <p>Iterator over page numbers ( 1 - n )</p>\r\n\t * \r\n\t * @return\titerator over page numbers ( 1 - n )\r\n\t */\r\n\tpublic Iterator<Integer> getPageCountIterator();\r\n\t\r\n\t/**\r\n\t * Result code for this page\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic int getResultCode();\r\n\t\r\n\t/**\r\n\t * Additional info of this page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Map<String, Object> getInfo();\r\n\t\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isLastPage();\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFirstPage();\t\r\n\t\r\n\t\r\n\t// ******* additiona method for virtual paging *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * VIRTUAL PAGING IS A METHOD WHERE A VIRTUAL PAGE IS MAPPED INTO A BIGGER PAGE *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * Virtual search key\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String getVirtualSearchKey();\r\n\t\r\n\tpublic Integer getRealPerPage();\r\n\t\r\n\tpublic Integer getRealCurrentPage();\r\n\t\r\n\tpublic PagedResult<T> getVirtualPage( int currentPage );\r\n\t\r\n\tpublic boolean isSupportVirtualPaging();\r\n\t\r\n\t\r\n\t// ******* additiona method for full result *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * FULL RESULT IS A METHOD OF ACCESS PAGE WHERE ALL ELEMENTS ARE ACCESSIBLE ONLY ITERATING *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * <code>true</code> if the the page contains the full result\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFullResult();\r\n\r\n}", "List<Item<T>> addItemsForPage(final long page);", "List<? extends Page> getPages();", "public ObservableList<Pagadores> carregaPagadores(int centro, int subCentro) {\n\t\tcon = Conexao.conectar();\n\t\tObservableList<Pagadores> resultadoPagadores = FXCollections.observableArrayList();\n\t\ttry {\n\t\t\tString query = \"SELECT * FROM pagadores WHERE estpagador > ? AND centroreceb = ? AND subcentrorec = ?\";\n\t\t\tprepStmt = con.prepareStatement(query); // create a statement\n\t\t\tprepStmt.setString(1, \"\");\n\t\t\tprepStmt.setInt(2, centro);\n\t\t\tprepStmt.setInt(3, subCentro);\n\t\t\trs = prepStmt.executeQuery();\n\t\t\t\t\t\t // extract data from the ResultSet\n\t\t\twhile(rs.next()) {\n\t\t\t\tPagadores temp = new Pagadores();\n\t\t\t\ttemp.setCodPagador(rs.getInt(\"codpagador\"));\n\t\t\t\ttemp.setEstPagador(rs.getString(\"estpagador\"));\n\t\t\t\ttemp.setRecDescr(rs.getString(\"recdescr\"));\n\t\t\t\t\n\t\t\t\ttemp.setValContrato(rs.getDouble(\"valcontrato\"));\n\t\t\t\ttemp.setContratoInic(DateUtils.asLocalDate(rs.getDate(\"contratoinic\")));\n\t\t\t\ttemp.setContratoFim(DateUtils.asLocalDate(rs.getDate(\"contratofim\")));\n\t\t\t\t\n\t\t\t\ttemp.setNomeContrato(rs.getString(\"nomecontrato\"));\n\t\t\t\ttemp.setContaVinc(rs.getInt(\"contavinc\"));\n\t\t\t\ttemp.setCentroReceb(rs.getInt(\"centroreceb\"));\n\t\t\t\t\n\t\t\t\ttemp.setSubCentroRec(rs.getInt(\"subcentrorec\"));\n\t\t\t\ttemp.setDataLanc(DateUtils.asLocalDate(rs.getDate(\"datalanc\")));\n\t\t\t\ttemp.setDiaVenc(rs.getInt(\"diavenc\"));\n\t\t\t\ttemp.setAgente(rs.getString(\"agente\"));\n\t\t\t\t\n\t\t\t\tresultadoPagadores.add(temp);\n\t\t\t}\n\t\t\treturn resultadoPagadores;\n\t\t} catch(Exception e) {\n\t\t\tMessageBox.show(\"Erro ao ler pagadores 59\", e.getMessage());\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tprepStmt.close();\n\t\t\t\t//conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "Pages getPages();", "public void inOrderTraverseRecursive();", "@Override\r\n\tpublic List<Node<T>> getPostOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPost(raiz, lista);\r\n\t}", "@Override\r\n\tprotected JSON_Paginador getJson_paginador() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Signuptable> findPage(String where, int startIndex, int pageSize) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tcurPage = 1;\n\t\t\t\tmList.clear();\n\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(), curPage,\n\t\t\t\t\t\tpageSize, NetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t}", "@Override\n\tpublic Page<RegiaoEntity> Lista(String paramLike, PageRequest page) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tint pageSize = 10; // 한 페이지 당 출력될 글의 개수 지정\r\n\t\t\r\n\t\tString pageNum = request.getParameter(\"pageNum\"); // 페이지 번호를 받아온다.\r\n\t\tif(pageNum == null) {\r\n\t\t\tpageNum = \"1\"; // 페이지 번호를 눌러서 들어오지 않으면 게시판 1page를 보여준다.\r\n\t\t}\r\n\t\t\r\n\t\t// 페이지 번호를 사용해서 페이징 처리 시 연산을 수행할 것이므로\r\n\t\t// 페이지 번호값을 정수타입으로 변경\r\n\t\tint currentPage = Integer.parseInt(pageNum);\r\n\t\t\r\n\t\t// 해당 페이지에 출력되는 글들 중 가장 먼저 출력되는 글의 레코드 번호\r\n\t\tint startRow = (currentPage - 1) * pageSize + 1;\r\n\t\t// 현재 페이지 : 1\r\n\t\t// (1 - 1) * pageSize + 1 ---------> 1\r\n\t\t// 현재 페이지 : 2\r\n\t\t// (2 - 1) * pageSize + 1 ---------> 11\r\n\t\t\r\n\t\tint count = 0;\r\n\t\t// count : 총 글의 개수를 저장할 변수\r\n\t\tint number = 0;\r\n\t\t// number : 해당 페이지에 가장 먼저 출력되는 글의 번호\r\n\t\t\r\n\t\tList<ReservationInfo> reservationList = null; // 글 정보를 저장할 리스트\r\n\t\t// 해당 페이지에 출력되는 글 목록을 저장할 컬렉션\r\n\t\t\r\n\t\t// 비지니스 로직 처리를 위해 서비스 객체 생성\r\n\t\tReservationListService reservationListService = new ReservationListService();\r\n\t\t\r\n\t\tcount = reservationListService.getReservationCount(); // 총 예약의 개수를 가져온다.\r\n\t\tif(count > 0) { \r\n\t\t\t// 예약이 하나라도 있으면 리스팅할 예약 정보 얻어오기\r\n\t\t\treservationList = reservationListService.getReservationList(startRow, pageSize); // 해당 페이지의 레코드 10개씩 가져온다.\r\n\t\t}\r\n\t\t\r\n\t\t// 전체 페이지에서 현재페이지 -1을 해서 pageSize를 곱한다.\r\n\t\tnumber = count - (currentPage - 1) * pageSize;\r\n\t\t// 총 글의 개수 : 134\r\n\t\t// 현재 페이지 : 1\r\n\t\t// 134 - (1 - 1) * 10 -------> 134\r\n\t\t\r\n\t\tint startPage = 0;\r\n\t\tint pageCount = 0;\r\n\t\tint endPage = 0;\r\n\t\t\r\n\t\tif(count > 0) { // 글이 하나라도 존재하면...\r\n\t\t\tpageCount = count / pageSize + (count % pageSize == 0 ? 0 : 1);\r\n\t\t\t// 총 페이지 개수를 구함.\r\n\t\t\t// ex) 총 글의 개수 13개이면 페이지는 2개 필요..\r\n\t\r\n\t\t\tstartPage = ((currentPage -1) / pageSize) * pageSize + 1;\r\n\t\t\t// 현재 페이지 그룹의 첫번째 페이지를 구함.\r\n\t\t\t// [1][2][3][4][5][6][7]...[10] -------> 처음 페이지 그룹\r\n\t\t\t// 다음 페이지 스타트 페이지 : [11][12][13]....[20]\r\n\t\t\t\t\t\r\n\t\t\tint pageBlock = 10;\r\n\t\t\tendPage = startPage + pageBlock - 1;\r\n\t\t\t\r\n\t\t\t// 마지막 페이지 그룹인 경우..\r\n\t\t\tif(endPage > pageCount) endPage = pageCount;\r\n\t\t}\r\n\t\t\r\n\t\t// 포워딩 하기 전, 가져 온 글 공유\r\n\t\trequest.setAttribute(\"reservationList\", reservationList);\r\n\t\tPageInfo pageInfo = new PageInfo(); // 페이지에 관한 정보를 처리하는 객체 생성\r\n\t\tpageInfo.setCount(count);\r\n\t\tpageInfo.setCurrentPage(currentPage);\r\n\t\tpageInfo.setEndPage(endPage);\r\n\t\tpageInfo.setNumber(number);\r\n\t\tpageInfo.setPageCount(pageCount);\r\n\t\tpageInfo.setStartPage(startPage);\r\n\t\t\r\n\t\trequest.setAttribute(\"pageInfo\", pageInfo);\r\n\t\tActionForward forward = new ActionForward();\r\n\t\tforward.setUrl(\"/pc/reservationList.jsp\"); // list.jsp 페이지 포워딩\r\n\t\t\r\n\t\treturn forward;\r\n\t}", "Page<Accessprofile> listAllByPage(Pageable pageable);", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "public List<Maquina> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 34: */ {\r\n/* 35: 73 */ return this.maquinaDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 36: */ }", "@PostMapping(\"/J314Authorities.pag\")\n\t@Timed\n\t\n\tpublic ResultExt< Page< J314AuthorityPoj >> getAllPag(HttpServletRequest request,HttpServletResponse response, @Valid @RequestBody J314AuthorityCritPaged pag)\n\t{\n\t\t\n\t\tString params=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\n\t\tContexto ctx = Contexto.init();\n\t\tctx.put(Contexto.REQUEST,request);\n\t\tctx.put(Contexto.RESPONSE,response);\n\t\tctx.put(Contexto.CLAVE_SEGURIDAD,\"REST_ENTITY_J314AUTHORITY_GETALLPAG\");\n\t\tctx.put(Contexto.URL_SOLICITADA,\"/J314Authorities.pag\");\n\t\tResult< Page< J314AuthorityPoj >> res=new Result<>();\n\t\tif (log.isInfoEnabled()) log.info(\"Entrada en REST POST:getAllPag(\"+params+\")\"+params);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!verificaPermisos(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\"))\n\t\t\t{\n\t\t\t\tres.addError(new ErrorSinPermiso(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\",\"/J314Authorities.pag\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparams=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\t\t\t\tif (log.isInfoEnabled()) log.info(\"Verificado en REST POST:getAllPag(\"+params+\")\"+params);\n\n\t\t\t\tJ314AuthorityCritPaged pag_ = pag;\n\n\t\t\t\tResult< Page< J314Authority > > res_=service.findAll(pag_);\n\t\t\t\tres.setInfoEWI(res_);\n\n\t\t\t\tres.setData(J314AuthorityPoj.toPOJOPage(res_.getData()));\n\n\t\t\t}\n\t\t\taddTiempoSesion();\n\t\t}\tcatch(Exception e)\n\t\t{\n\t\t\tres.addError(new ErrorGeneral(e));\n\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST POST:getAllPag(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(e));\n\t\t}\n\t\tif (log.isInfoEnabled()) log.info(\"Salida de REST POST:getAllPag(\"+params+\"). Resultado:\"+res.toString());\n\n\t\tResultExt< Page< J314AuthorityPoj > > resFin=new ResultExt<>(res,ctx.getAs(\"ticketStr\"));\n\t\tContexto.close();\n\t\treturn resFin;\n\t}", "public List<Reporteador> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 52: */ {\r\n/* 53: 71 */ return this.reporteadorDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 54: */ }", "public List<ItemsResponse> getListItems(ItemsRequest req) throws DAOException {\n\t\tlogger.debug(\" --- getListItems [ HNotaDAO ] --- \" );\n\t\tlogger.debug(\" --- request : \"+req.toString()+\" --- \" );\n\t\t\n\t\t\n\t\tList<ItemsResponse> lista = null;\n\t\tStringBuilder query = new StringBuilder();\n\n\t\tint limit = req.getLimit();\n\t\tint page = req.getPage();\n\n\t\tif (limit == 0 || page == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint to = limit * page;\n\t\tint from = (to - limit) + 1;\n\n\t\tquery.append(\" SELECT * FROM (SELECT @rownum:=@rownum+1 rank , q.* \");\n\t\tquery.append(\" \t\tFROM ( SELECT n.FC_ID_CONTENIDO AS id , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_TITULO AS title, \");\n query.append(\" \t\t\t n.FC_CN AS user , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_DESCRIPCION AS description , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FD_FECHA_PUBLICACION AS date , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_TIPO_NOTA AS typeItem, \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_FRIENDLY_URL AS url_item , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_ESTATUS_NOTA AS status , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_IMAGEN_PRINCIPAL AS image , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_ID_CATEGORIA AS idCategories , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_DESCRIPCION AS descCategories, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_DESCRIPCION AS descSport, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_ID_DEPORTE AS idSport \");\n\t\tquery.append(\" \t\t\t\tFROM yog_ba_h_nota n \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_categoria categoria ON n.FC_ID_CATEGORIA = categoria.FC_ID_CATEGORIA \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_deporte deporte ON n.FC_ID_DEPORTE = deporte.FC_ID_DEPORTE \");\n\t\tquery.append(\" \t\t \t\t WHERE 1=1 \");\n\t\t\n\t\tif (req.getType().equals(\"categoria\")) {\n\t\t\tquery.append(\" AND categoria.FC_ID_CATEGORIA = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\t\n\t\tif (req.getType().equals(\"deporte\")) {\n\t\t\tquery.append(\" AND deporte.FC_ID_DEPORTE = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\tif (req.getStatus() != null && !req.getStatus().equals(\"\"))\n\t\t\tquery.append(\" AND n.FC_ID_ESTATUS_NOTA = '\" + req.getStatus() + \"' \");\n\n\t\tquery.append(\" ORDER BY FD_FECHA_PUBLICACION DESC ) AS q ,(SELECT @rownum:=0) num ) r \");\n\t\tquery.append(\" WHERE r.rank >= \" + from + \" AND r.rank <= \" + to + \" \");\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\ttry {\n\n\t\t\tlista = jdbcTemplate.query(query.toString(), new BeanPropertyRowMapper<ItemsResponse>(ItemsResponse.class));\n\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\"--- Error getListItems [ HNotaDAO ] :\", e);\n\n\t\t\tthrow new DAOException(e.getMessage());\n\n\t\t}\n\n\t\treturn lista;\n\n\t}", "@Override\n public int doStartTag() throws JspException {\n\n int pageCount = (this.recordCount + this.pageSize - 1) / this.pageSize;\n StringBuilder sb = new StringBuilder();\n\n if (this.recordCount != 0 && this.recordCount > this.pageSize) {\n sb.append(\"<ol class=\\\"paginator\\\">\");\n if (this.pageNo > pageCount) {\n this.pageNo = pageCount;\n }\n if (this.pageNo < 1) {\n this.pageNo = 1;\n }\n HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();\n\n url = request.getAttribute(\"originalUrl\").toString();\n url += \"?\";\n if (StringUtil.isNotEmpty(request.getQueryString())) {\n String queryString = request.getQueryString();\n url += queryString.replaceAll(\"page=[0-9]*\", \"\");\n if (!url.endsWith(\"&\") && !url.endsWith(\"?\")) {\n url += \"&\";\n }\n }\n\n if (this.pageNo > 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--prev\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo - 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n int start = 1;\n if (this.pageNo > 4) {\n start = this.pageNo - 1;\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=1'>1</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=2'>2</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n int end = this.pageNo + 1;\n if (end > pageCount) {\n end = pageCount;\n }\n for (int i = start; i <= end; i++) {\n if (this.pageNo == i) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number paginator__item--current\\\"><span class=\\\"paginator__item__text\\\">\" + i + \"</span></li>\");\n } else {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + i + \"'>\").append(i).append(\"</a></li>\");\n }\n }\n if (end < pageCount - 2) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n if (end < pageCount - 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (pageCount - 1) + \"'>\").append((pageCount - 1) + \"</a></li>\");\n }\n if (end < pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + pageCount + \"'>\").append(pageCount + \"</a></li>\");\n }\n if (this.pageNo != pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--next\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo + 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n }\n if (anchor != null) {\n sb.append(\"<script type='text/javascript'>$('.paginator a').each(function(){var href=$(this).attr('href');$(this).attr('href',href+'\" + anchor + \"')});</script>\");\n }\n sb.append(\"</ol>\");\n try {\n this.pageContext.getOut().println(sb.toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n\n e.printStackTrace();\n }\n return 0;\n }", "public void getChallanOnloadList(TaxChallan taxChallan,HttpServletRequest request) {\r\n\t\tObject[][]listData = null;\r\n\t\tArrayList<Object> list = new ArrayList();\r\n\t\ttry {\r\n\t\t\tString query = \"SELECT CHALLAN_CODE ,DECODE(CHALLAN_MONTH ,1,'JANUARY',2,'FEBRUARY',3,'MARCH',4,'APRIL',5, \"\r\n\t\t\t\t\t+ \" 'MAY',6,'JUNE',7,'JULY',8,'AUGUST', 9,'SEPTEMBER',10,'OCTOBER',11,'NOVEMBER',12,'DECEMBER'), \"\r\n\t\t\t\t\t+ \" CHALLAN_YEAR, NVL(DIV_NAME,' '), DIV_ID, CHALLAN_MONTH, ROWNUM, TO_CHAR(NVL(CHALLAN_TOTALTAX,0),9999999990.99) FROM HRMS_TAX_CHALLAN \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_DIVISION ON HRMS_DIVISION.DIV_ID = HRMS_TAX_CHALLAN.CHALLAN_DIVISION_ID \"\r\n\t\t\t\t\t+ \" ORDER BY CHALLAN_YEAR DESC\";\r\n\t\t\tlistData = getSqlModel().getSingleResult(query);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in listData query\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(listData !=null && listData.length >0){\r\n\t\t\t\r\n\t\t\t\tString[] pageIndex = Utility.doPaging(taxChallan.getMyPage(), listData.length, 20);\r\n\t\t\t\tif (pageIndex == null) {\r\n\t\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t\t} //end of if\r\n\t\t\t\trequest.setAttribute(\"totalPage\", Integer.parseInt(String\r\n\t\t\t\t\t\t.valueOf(pageIndex[2])));\r\n\t\t\t\trequest.setAttribute(\"pageNo\", Integer.parseInt(String\r\n\t\t\t\t\t\t.valueOf(pageIndex[3])));\r\n\r\n\t\t\t\tif (pageIndex[4].equals(\"1\"))\r\n\t\t\t\t\ttaxChallan.setMyPage(\"1\");\r\n\t\t\t\r\n\t\t\t//int count=0;\r\n\t\t\tfor (int i = Integer.parseInt(pageIndex[0]); i < Integer.parseInt(pageIndex[1]); i++) {\r\n\t\t\t\tTaxChallan bean = new TaxChallan();\r\n\t\t\t\tbean.setChallanListCode(String.valueOf(listData[i][0]));\r\n\t\t\t\tbean.setChallanListMonth(String.valueOf(listData[i][1]));\r\n\t\t\t\tbean.setChallanListYear(String.valueOf(listData[i][2]));\r\n\t\t\t\tbean.setChallanListDivName(String.valueOf(listData[i][3]));\r\n\t\t\t\tbean.setChallanListDivId(String.valueOf(listData[i][4]));\r\n\t\t\t\tbean.setChallanListMonthId(String.valueOf(listData[i][5]));\r\n\t\t\t\tbean.setListRowNum(String.valueOf(listData[i][6]));\r\n\t\t\t\tbean.setListTotalTax(String.valueOf(listData[i][7]));\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t\t//count++;\r\n\t\t\t} //end of loop\r\n\t\t\ttaxChallan.setTotalListRecords(String.valueOf(listData.length));\r\n\t\t\ttaxChallan.setIteratorlist(list);\r\n\t\t\t//request.setAttribute(\"addQuestionTotalPages\",(list.size() % scriptPageNo == 0)?(list.size()/scriptPageNo):(list.size()/scriptPageNo)+1);\r\n\t\t}else{\r\n\t\t\ttaxChallan.setListNoData(\"true\");\r\n\t\t} //end of else\r\n\t\t\r\n\t}", "void nextPage() throws IndexOutOfBoundsException;", "public abstract void onLoadMore(int page, int totalItemsCount);", "public abstract void onLoadMore(int page, int totalItemsCount);", "@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}", "Page<T> findAll(Pageable pageable);", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;", "@Override\n\tpublic Page<?> pagination(Integer pagenumber, Integer rows, String sortdireccion, String sortcolumn,\n\t\t\tObject filter) {\n\t\treturn null;\n\t}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction, Pagination pagination);", "private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "Page<Fotografia> findAll(Pageable pageable);", "@Override\r\n\tpublic List<ReviewVO> listPage(int page) throws Exception {\n\t\tif(page<=0) {\r\n\t\t\tpage=1;\r\n\t\t}\r\n\t\t\r\n\t\tpage = (page-1)*10; // 한 페이지에 10개의 글 보이기\r\n\t\t\r\n\t\treturn ss.selectList(\"listPage\", page);\r\n\t}", "@Override\n\tpublic void onLoadMore() {\n\t\tpage++;\n\t\texecutorService.submit(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tpublic PageDataList<ReferrerModel> referrerList(int pageNumber,int pageSize,ReferrerModel model) {\n\t\tString strSql = \" select w.id,w.name,u.real_name,u.mobile_phone,p.coupon_code, \" +\r\n\t\t\t\t\" i.real_name as invite_user,i.mobile_phone invite_mobile_phone,p.used_times from rd_user_invite ui \" +\r\n\t\t\t\t\" join rd_user u on ui.user_id = u.user_id \" +\r\n\t\t\t\t\" join rd_user i on ui.invite_user = i.user_id \" +\r\n\t\t\t\t\" LEFT JOIN ehb_wealth_user wu ON ui.user_id = wu.user_id \" + \r\n\t\t\t\t\" LEFT JOIN ehb_zc_wealth_manager_user m ON wu.id = m.wealth_user_id \" +\r\n\t\t\t\t\" left join ehb_zc_wealth_manager w on m.wealth_manager_id = w.id \" + \r\n\t\t\t\t\" left join rd_user_promot p on ui.invite_user = p.user_id where 1=1 \";\r\n\t\tif (!StringUtil.isBlank(model.getSearchName())) {\r\n\t \tstrSql += \" and (u.mobile_phone like '%\" + model.getSearchName() + \"%' \" + \r\n \t \" or u.real_name like '%\" + model.getSearchName() + \"%') \";\r\n\t } \r\n\t\tQuery query = em.createNativeQuery(strSql);\r\n\t\tPage page = new Page(query.getResultList().size(), pageNumber,pageSize);\r\n\t\tquery.setFirstResult((pageNumber - 1) * pageSize);\r\n\t\tquery.setMaxResults(pageSize);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Object[]> list = query.getResultList();\r\n\t\tPageDataList<ReferrerModel> pageDataList_ = new PageDataList<ReferrerModel>();\r\n List<ReferrerModel> cpmList = new ArrayList<ReferrerModel>();\r\n pageDataList_.setPage(page);\r\n int i = 1;\r\n \tfor (Object[] o : list) {\r\n \t\tReferrerModel referrer = new ReferrerModel();\r\n \t\treferrer.setId(i);\r\n \t\treferrer.setSaleCode(o[0]==null?\"\":o[0].toString());\r\n \t\treferrer.setSaleName(o[1]==null?\"\":o[1].toString());\r\n \t\treferrer.setRealName(o[2]==null?\"\":o[2].toString());\r\n \t\treferrer.setPhone(o[3]==null?\"\":o[3].toString());\r\n \t\treferrer.setRecommendCode(o[4]==null?\"\":o[4].toString());\r\n \t\treferrer.setReferrer(o[5]==null?\"\":o[5].toString());\r\n \t\treferrer.setReferrerPhone(o[6]==null?\"\":o[6].toString());\r\n \t\treferrer.setCodeUsedTimes(o[7]==null?0:Integer.parseInt(o[7].toString()));\r\n \t\tcpmList.add(referrer);\r\n\t\t\ti++;\r\n \t}\r\n\t\tpageDataList_.setList(cpmList);\r\n\t\treturn pageDataList_;\r\n\t}", "private void listar(HttpPresentationComms comms, String _operacion) throws HttpPresentationException, KeywordValueException {\n/* 219 */ activarVista(\"consulta\");\n/* 220 */ if (_operacion.equals(\"X\")) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 225 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 226 */ Collection<PrcRecursoDTO> arr = ob.cargarTodos();\n/* 227 */ HTMLTableSectionElement hte = this.pagHTML.getElementDetalle();\n/* 228 */ int cuantas = 0;\n/* 229 */ Iterator<PrcRecursoDTO> iterator = arr.iterator();\n/* 230 */ while (iterator.hasNext()) {\n/* 231 */ PrcRecursoDTO reg = (PrcRecursoDTO)iterator.next();\n/* 232 */ HTMLElement eltr = (HTMLElement)this.pagHTML.createElement(\"tr\");\n/* 233 */ eltr.appendChild(newtd(\"\" + reg.getIdRecurso()));\n/* 234 */ String url = \"PrcRecurso.po?_operacion=V&idRecurso=\" + reg.getIdRecurso() + \"\";\n/* 235 */ eltr.appendChild(newtdhref(\"\" + reg.getNombreIdTipoRecurso(), url));\n/* 236 */ eltr.appendChild(newtd(\"\" + reg.getDescripcionRecurso()));\n/* 237 */ eltr.appendChild(newtd(\"\" + reg.getNombreIdProcedimiento()));\n/* 238 */ eltr.appendChild(newtd(\"\" + reg.getNombreEstado()));\n/* 239 */ hte.appendChild(eltr);\n/* 240 */ cuantas++;\n/* */ } \n/* 242 */ arr.clear();\n/* 243 */ this.pagHTML.setTextNroRegistros(\"\" + cuantas);\n/* */ }", "public PageList<User> getUserPageList(User user, int pageSize, int pageNum) throws DataAccessException;", "Page<LevelElementDTO> findAll(Pageable pageable);", "Page<SeminarioDTO> findAll(Pageable pageable);", "public List<Pagos> findAll(){\n return pagoMongoRepository.findAll();\n }", "public void inOrderTraverseIterative();", "public List<MotivoLlamadoAtencion> load(int startIndex, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 59 */ List<MotivoLlamadoAtencion> lista = new ArrayList();\r\n/* 46: 60 */ boolean ordenar = sortOrder == SortOrder.ASCENDING;\r\n/* 47: */ \r\n/* 48: 62 */ filters.put(\"idOrganizacion\", String.valueOf(AppUtil.getOrganizacion().getId()));\r\n/* 49: 63 */ lista = MotivoLlamadoAtencionBean.this.servicioMotivoLlamadoAtencion.obtenerListaPorPagina(startIndex, pageSize, sortField, ordenar, filters);\r\n/* 50: */ \r\n/* 51: 65 */ MotivoLlamadoAtencionBean.this.listaMotivoLlamadoAtencion.setRowCount(MotivoLlamadoAtencionBean.this.servicioMotivoLlamadoAtencion.contarPorCriterio(filters));\r\n/* 52: */ \r\n/* 53: 67 */ return lista;\r\n/* 54: */ }", "private ResultPagingVO readCommonCtrlItemAndPropList(HttpServletRequest req, String objectType) {\n\n\t\tResultPagingVO resultVO = new ResultPagingVO();\n\t\tHashMap<String, Object> options = new HashMap<String, Object>();\n\n\t\t// << options >>\n\t\tString searchKey = ((req.getParameter(\"keyword\") != null) ? req.getParameter(\"keyword\").replace(\"_\", \"\\\\_\")\n\t\t\t\t: \"\");\n\n\t\t// search keyword\n\t\toptions.put(\"searchKey\", searchKey);\n\n\t\t// << paging >>\n\t\tString paramOrderColumn = req.getParameter(\"orderColumn\");\n\t\tString paramOrderDir = req.getParameter(\"orderDir\");\n\t\tString paramStart = StringUtils.defaultString(req.getParameter(\"start\"), \"0\");\n\t\tString paramLength = StringUtils.defaultString(req.getParameter(\"length\"), \"10\");\n\n\t\t// << Order >>\n\t\tif (\"chConfName\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.OBJ_NM\");\n\t\t} else if (\"chModUser\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.MOD_USER_ID\");\n\t\t} else if (\"chRegUser\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.REG_USER_ID\");\n\t\t} else if (\"chConfId\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.OBJ_ID\");\n\t\t} else if (\"chModDate\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.MOD_DT\");\n\t\t} else {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.OBJ_ID\");\n\t\t}\n\n\t\tif (\"DESC\".equalsIgnoreCase(paramOrderDir)) {\n\t\t\toptions.put(\"paramOrderDir\", \"DESC\");\n\t\t} else {\n\t\t\toptions.put(\"paramOrderDir\", \"ASC\");\n\t\t}\n\t\tif (\"desc\".equalsIgnoreCase(paramOrderDir)) {\n\t\t\toptions.put(\"defaultOrderValue\", \"힣힣힣힣힣힣힣\");\n\t\t\toptions.put(\"defaultOrderSecondValue\", \"힣힣힣힣힣힣힢\");\n\t\t} else {\n\t\t\toptions.put(\"defaultOrderValue\", null);\n\t\t\toptions.put(\"defaultOrderSecondValue\", null);\n\t\t}\n\t\toptions.put(\"paramStart\", Integer.parseInt(paramStart));\n\t\toptions.put(\"paramLength\", Integer.parseInt(paramLength));\n\n\t\toptions.put(\"mngObjTp\", objectType);\n\n\t\ttry {\n\n\t\t\tresultVO = ctrlMstService.readCtrlItemAndPropListPaged(options);\n\t\t\tresultVO.setDraw(String.valueOf(req.getParameter(\"page\")));\n\t\t\tresultVO.setOrderColumn(paramOrderColumn);\n\t\t\tresultVO.setOrderDir(paramOrderDir);\n\t\t\tresultVO.setRowLength(paramLength);\n\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error in readClientConfList : {}, {}, {}\", GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR), ex.toString());\n\t\t\tresultVO = null;\n\t\t}\n\n\t\treturn resultVO;\n\t}", "@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }", "@Override\n\tpublic List<MetodoPagamento> findAllOcupados() {\n\t\treturn null;\n\t}" ]
[ "0.62856895", "0.6170135", "0.6099991", "0.59257877", "0.5925083", "0.5860622", "0.5801208", "0.5794122", "0.57271624", "0.57227135", "0.5713196", "0.56409204", "0.56372786", "0.5633591", "0.56270796", "0.560472", "0.5600611", "0.5596433", "0.55943066", "0.5585984", "0.5568472", "0.5555688", "0.55470407", "0.55463046", "0.55379623", "0.5513527", "0.55100286", "0.5507427", "0.5503325", "0.5488208", "0.54852015", "0.54744714", "0.5439697", "0.5432763", "0.5428198", "0.54277086", "0.54235315", "0.53995556", "0.53974587", "0.53960997", "0.539266", "0.53871363", "0.53745425", "0.5373632", "0.53668195", "0.53610665", "0.533661", "0.53312963", "0.533108", "0.5328814", "0.5325247", "0.5320283", "0.53061646", "0.5305942", "0.530422", "0.52924496", "0.5270783", "0.5266576", "0.5265127", "0.52648443", "0.526303", "0.52549607", "0.5253576", "0.52493936", "0.52453244", "0.5242101", "0.52384937", "0.52359414", "0.52318263", "0.5226517", "0.52263516", "0.52244884", "0.5223357", "0.5222471", "0.5222404", "0.52211255", "0.5216259", "0.52124465", "0.5194979", "0.5194979", "0.51873714", "0.5186684", "0.51835316", "0.51827276", "0.5177573", "0.5172635", "0.5170235", "0.5169154", "0.5164133", "0.5161403", "0.5161045", "0.5160099", "0.51594114", "0.5158594", "0.5155769", "0.51537323", "0.51537305", "0.51517403", "0.5147949", "0.5147425", "0.51381105" ]
0.0
-1
Se encarga de recuperar la lista paginada y ordenado de recursos.
public ListaResponse<G> listar();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ResultMap<BaseNode> listChildren(Pagination pagination);", "@Override // Métodos que fazem a anulação\n\tpublic void pagaIR() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "List<Registration> allRegTrailPagination(long idTrail, int currentPage, int elementPerPage);", "List<Registration> allRegUserPagination(long idUser, int currentPage, int elementPerPage);", "@Command\n\t@NotifyChange(\"*\")\n\tpublic void paginarLista(){\n\t\tint page=pagAnalistas.getActivePage();\n\t\tcambiarAnalistas(page, null, null);\n\t}", "public List<Pregunta> getPreguntasRecientes(int page, int pageSize);", "@Override\n protected void onResume() {\n getList(currentPage.toString(), tag);\n super.onResume();\n }", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "void findWithPagination(Pagination<Task, Project> pagination);", "public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }", "Page getList(ViewResourceSearchVO viewResourceSearchVO) throws Exception;", "@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "public List getList(int start, int pernum, SearchParam param);", "List<RiceCooker> getPerPage(long startRow, long maxRows);", "private void pagination(){\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n }\n\n @Override\n public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n if (dy>0){\n LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();\n int lastItem = layoutManager.findLastCompletelyVisibleItemPosition(); //finds last visible item\n int currentTotalCount = layoutManager.getItemCount(); //find total number of displayed items\n\n if (mLoadingItems){\n if (currentTotalCount > previousTotal){\n mLoadingItems = false;\n previousTotal = currentTotalCount;\n }\n }\n if (!mLoadingItems && (currentTotalCount <= (lastItem +view_threshold))) {\n mLoadingItems = true;\n //Increment number of items on the list\n firstItemVisible = firstItemVisible+10;\n lastItemVisible = lastItemVisible+10;\n //Update adapter\n jsonParse();\n }\n }\n }\n });\n }", "@GetMapping(\"/pagina\")\t\n\tpublic ResponseEntity<?> listar(Pageable pageable) {\n\t\tPageable pageableEnv = PageRequest.of(pageable.getPageNumber() - 1, pageable.getPageSize());\n\t\treturn ResponseEntity.ok().body(service.findAll(pageableEnv));\n\t}", "public List<DetallesFacturaContratoVenta> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 32: */ {\r\n/* 33: 51 */ List<DetallesFacturaContratoVenta> listaDetallesFacturaContratoVenta = new ArrayList();\r\n/* 34: */ \r\n/* 35: 53 */ CriteriaBuilder criteriaBuilder = this.em.getCriteriaBuilder();\r\n/* 36: 54 */ CriteriaQuery<DetallesFacturaContratoVenta> criteriaQuery = criteriaBuilder.createQuery(DetallesFacturaContratoVenta.class);\r\n/* 37: 55 */ Root<DetallesFacturaContratoVenta> from = criteriaQuery.from(DetallesFacturaContratoVenta.class);\r\n/* 38: */ \r\n/* 39: 57 */ Fetch<Object, Object> contratoVenta = from.fetch(\"contratoVenta\", JoinType.LEFT);\r\n/* 40: 58 */ Fetch<Object, Object> empresa = contratoVenta.fetch(\"empresa\", JoinType.LEFT);\r\n/* 41: 59 */ Fetch<Object, Object> cliente = empresa.fetch(\"cliente\", JoinType.LEFT);\r\n/* 42: 60 */ contratoVenta.fetch(\"agenteComercial\", JoinType.LEFT);\r\n/* 43: 61 */ contratoVenta.fetch(\"subempresa\", JoinType.LEFT);\r\n/* 44: 62 */ Fetch<Object, Object> direccionEmpresa = contratoVenta.fetch(\"direccionEmpresa\", JoinType.LEFT);\r\n/* 45: 63 */ direccionEmpresa.fetch(\"ubicacion\", JoinType.LEFT);\r\n/* 46: 64 */ contratoVenta.fetch(\"canal\", JoinType.LEFT);\r\n/* 47: 65 */ contratoVenta.fetch(\"zona\", JoinType.LEFT);\r\n/* 48: 66 */ contratoVenta.fetch(\"condicionPago\", JoinType.LEFT);\r\n/* 49: */ \r\n/* 50: 68 */ List<Expression<?>> empresiones = obtenerExpresiones(filters, criteriaBuilder, from);\r\n/* 51: 69 */ criteriaQuery.where((Predicate[])empresiones.toArray(new Predicate[empresiones.size()]));\r\n/* 52: */ \r\n/* 53: 71 */ agregarOrdenamiento(sortField, sortOrder, criteriaBuilder, criteriaQuery, from);\r\n/* 54: */ \r\n/* 55: 73 */ CriteriaQuery<DetallesFacturaContratoVenta> select = criteriaQuery.select(from);\r\n/* 56: */ \r\n/* 57: 75 */ TypedQuery<DetallesFacturaContratoVenta> typedQuery = this.em.createQuery(select);\r\n/* 58: 76 */ agregarPaginacion(startIndex, pageSize, typedQuery);\r\n/* 59: */ \r\n/* 60: 78 */ listaDetallesFacturaContratoVenta = typedQuery.getResultList();\r\n/* 61: 81 */ for (DetallesFacturaContratoVenta dfcv : listaDetallesFacturaContratoVenta)\r\n/* 62: */ {\r\n/* 63: 83 */ CriteriaQuery<DetalleContratoVenta> cqDetalle = criteriaBuilder.createQuery(DetalleContratoVenta.class);\r\n/* 64: 84 */ Root<DetalleContratoVenta> fromDetalle = cqDetalle.from(DetalleContratoVenta.class);\r\n/* 65: 85 */ fromDetalle.fetch(\"producto\", JoinType.LEFT);\r\n/* 66: */ \r\n/* 67: 87 */ cqDetalle.where(criteriaBuilder.equal(fromDetalle.join(\"contratoVenta\"), dfcv.getContratoVenta()));\r\n/* 68: 88 */ CriteriaQuery<DetalleContratoVenta> selectContratoVenta = cqDetalle.select(fromDetalle);\r\n/* 69: */ \r\n/* 70: 90 */ List<DetalleContratoVenta> listaDetalleContratoVenta = this.em.createQuery(selectContratoVenta).getResultList();\r\n/* 71: 91 */ dfcv.getContratoVenta().setListaDetalleContratoVenta(listaDetalleContratoVenta);\r\n/* 72: */ }\r\n/* 73: 94 */ return listaDetallesFacturaContratoVenta;\r\n/* 74: */ }", "List<T> findPage(int pageNumber);", "public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;", "LiveData<PagedList<Response>> pagedList();", "private void paginate() {\n List<ItemModel> old = adapter.getItems();\n List<ItemModel> New = new ArrayList<>(addList());\n CardStackCallback callback = new CardStackCallback(old, New);\n DiffUtil.DiffResult result = DiffUtil.calculateDiff(callback);\n adapter.setItems(New);\n result.dispatchUpdatesTo(adapter);\n }", "public interface PaginatedResult<T> {\n\n\t/**\n\t * Get the contents as an array of component type\n\t */\n\tpublic T[] items();\n\n\t/**\n\t * Obtain params required to perform the given relative query\n\t */\n\tpublic abstract PaginatedResult<T> first() throws AblyException;\n\tpublic abstract PaginatedResult<T> current() throws AblyException;\n\tpublic abstract PaginatedResult<T> next() throws AblyException;\n\n\tpublic abstract boolean hasFirst();\n\tpublic abstract boolean hasCurrent();\n\tpublic abstract boolean hasNext();\n}", "private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\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\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);", "public abstract ArrayList<T> findAll(int limit, int offset);", "Page<PathHistory> findAll(Pageable pageable);", "private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }", "private static void traverse(ItemInfo rootItem, List<ItemInfo> results, int depth, String extraAttributes) throws Exception {\n Objects.requireNonNull(extraAttributes);\n\n final Collection<ItemInfo> children = new ArrayList<>();\n\n// final URL itemURL\n// = UriBuilder\n// .fromUri(rootItem.href.replace(\" \", \"%20\"))\n// .queryParam(\"attributes\", extraAttributes)\n// .build()\n// .toURL();\n\n final HttpURLConnection getItemConnection = (HttpURLConnection) rootItem.href.openConnection();\n getItemConnection.setConnectTimeout(PlatformTools.getDefaultConnectionTimeoutms());\n getItemConnection.setReadTimeout(PlatformTools.getDefaultReadTimeoutms());\n getItemConnection.setRequestProperty(\"Accept\", \"application/hal+json\");\n\n final int itemStatus = getItemConnection.getResponseCode();\n if (HttpURLConnection.HTTP_OK == itemStatus) {\n final String rawItemPageResults = PlatformTools.getContent(getItemConnection);\n final JSONObject itemResult = JSONObject.fromObject(rawItemPageResults);\n results.add(new ItemInfo(itemResult, depth));\n\n final JSONObject embedded = (JSONObject) itemResult.get(\"_embedded\");\n JSONObject collection = null;\n if (null != embedded) {\n collection = (JSONObject) embedded.get(\"loc:collection\");\n }\n // The item to traverse is a folder:\n if (null != collection) {\n // Get the items of the folder pagewise:\n JSONObject embeddedItems = (JSONObject) collection.get(\"_embedded\");\n if (null != embeddedItems) {\n do {\n final Object itemsObject = embeddedItems.get(\"loc:item\");\n if (null != itemsObject) {\n if (itemsObject instanceof JSONArray) {\n final JSONArray items = (JSONArray) itemsObject;\n\n final Collection<ItemInfo> itemPage = new ArrayList<>(items.size());\n for (final Object item : items) {\n final JSONObject folderItem = (JSONObject) item;\n itemPage.add(new ItemInfo(folderItem, depth + 1));\n }\n children.addAll(itemPage);\n } else {\n children.add(new ItemInfo((JSONObject) itemsObject, depth + 1));\n }\n }\n\n final JSONObject linkToNextPage = (JSONObject) collection.getJSONObject(\"_links\").get(\"next\");\n if (null != linkToNextPage) {\n final HttpURLConnection itemNextPageConnection = (HttpURLConnection) new URL(linkToNextPage.getString(\"href\").replace(\" \", \"%20\")).openConnection();\n itemNextPageConnection.setConnectTimeout(PlatformTools.getDefaultConnectionTimeoutms());\n itemNextPageConnection.setReadTimeout(PlatformTools.getDefaultReadTimeoutms());\n itemNextPageConnection.setRequestProperty(\"Accept\", \"application/hal+json\");\n\n final int itemNextPageStatus = itemNextPageConnection.getResponseCode();\n if (HttpURLConnection.HTTP_OK == itemNextPageStatus) {\n final String rawNextItemPageResults = PlatformTools.getContent(itemNextPageConnection);\n collection = JSONObject.fromObject(rawNextItemPageResults);\n embeddedItems = (JSONObject) collection.get(\"_embedded\");\n } else {\n collection = null;\n }\n } else {\n collection = null;\n }\n } while (null != collection && null != embeddedItems);\n }\n }\n\n for (final ItemInfo item : children) {\n if (item.hasChildren) {\n traverse(item, results, depth + 1, extraAttributes);\n }\n }\n\n for (final ItemInfo item : children) {\n if (!item.hasChildren) {\n results.add(item);\n }\n }\n } else {\n LOG.log(Level.INFO, \"Get item failed for item <{0}>. -> {1}\", new Object[] {rootItem.href, PlatformTools.getContent(getItemConnection)});\n }\n }", "private List<Node<T>> completaCamino(Node<T> ret, List<Node<T>> camino) {\r\n\t\tboolean comp = true;// Comprobacion\r\n\t\tcamino.add(ret);// Aņadimos el nodo al camino\r\n\t\twhile (comp) {\r\n\t\t\tif (ret.getParent() != null) {// Mientras no sea la raiz\r\n\t\t\t\tcamino.add(ret.getParent(), 1);// Aņade al inicio de la lista\r\n\t\t\t\tret = ret.getParent();// Hace que el padre sea el nuevo nodo\r\n\t\t\t} else if (ret.getParent() == null) {// Si es la raiz\r\n\t\t\t\tcomp = false;// Cancela\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn camino;\r\n\t}", "public ObservableList<Pagadores> carregaPagadores() {\n\t\tcon = Conexao.conectar();\n\t\tObservableList<Pagadores> resultadoPagadores = FXCollections.observableArrayList();\n\t\ttry {\n\t\t\tString query = \"SELECT * FROM pagadores WHERE estpagador = ? ORDER BY agente\";\n\t\t\tprepStmt = con.prepareStatement(query); // create a statement\n\t\t\tprepStmt.setString(1, \"A\");\n\t\t\trs = prepStmt.executeQuery();\n\t\t\t\t\t\t // extract data from the ResultSet\n\t\t\twhile(rs.next()) {\n\t\t\t\tPagadores temp = new Pagadores();\n\t\t\t\ttemp.setCodPagador(rs.getInt(\"codpagador\"));\n\t\t\t\ttemp.setEstPagador(rs.getString(\"estpagador\"));\n\t\t\t\ttemp.setRecDescr(rs.getString(\"recdescr\"));\n\t\t\t\t\n\t\t\t\ttemp.setValContrato(rs.getDouble(\"valcontrato\"));\n\t\t\t\ttemp.setContratoInic(DateUtils.asLocalDate(rs.getDate(\"contratoinic\")));\n\t\t\t\ttemp.setContratoFim(DateUtils.asLocalDate(rs.getDate(\"contratofim\")));\n\t\t\t\t\n\t\t\t\ttemp.setNomeContrato(rs.getString(\"nomecontrato\"));\n\t\t\t\ttemp.setContaVinc(rs.getInt(\"contavinc\"));\n\t\t\t\ttemp.setCentroReceb(rs.getInt(\"centroreceb\"));\n\t\t\t\t\n\t\t\t\ttemp.setSubCentroRec(rs.getInt(\"subcentrorec\"));\n\t\t\t\ttemp.setDataLanc(DateUtils.asLocalDate(rs.getDate(\"datalanc\")));\n\t\t\t\ttemp.setDiaVenc(rs.getInt(\"diavenc\"));\n\t\t\t\ttemp.setAgente(rs.getString(\"agente\"));\n\t\t\t\t\n\t\t\t\tresultadoPagadores.add(temp);\n\t\t\t}\n\t\t\treturn resultadoPagadores;\n\t\t} catch(Exception e) {\n\t\t\tMessageBox.show(\"Erro ao ler pagadores 59\", e.getMessage());\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tprepStmt.close();\n\t\t\t\t//conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "List<JournalPage> getAllPages();", "@Override\r\n\tpublic List<TypeModePaiement> listeAllPagination(int page) {\n\t\treturn null;\r\n\t}", "public List<T> getPageElementsList();", "Page<RefTarifDTO> findAll(Pageable pageable);", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "List<ProductView> getAllByPage(PageableAndSortable pageableAndSortable) throws ProductException;", "@PreAuthorize(\"@userAuthorize.canList(#searchCriterias)\")\n\t@RequestMapping(value = \"/listWithCriteriasByPage\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> listWithCriteriasByPage(@RequestBody List<SearchCriteria> searchCriterias, Pageable pageable) {\n\t\tPage<User> users = userService.listWithCriterasByPage(searchCriterias, pageable);\n\t\t// return.\n\t\treturn new ResponseEntity<Page<User>>(users, HttpStatus.OK);\n\t}", "@Override\n\tpublic ArrayList<Parent> queryAllOrderPage(int begin, int size) {\n\t\treturn parentDao.queryAllOrderPage(begin, size);\n\t}", "private List<PreDocumentoEntrata> ricercaSinteticaPreDocumentoEntrata() {\n\t\tRicercaSinteticaPreDocumentoEntrataResponse resRSPD = ricercaSinteticaPreDocumentoEntrata(0);\t\t\n\t\tList<PreDocumentoEntrata> result = resRSPD.getPreDocumenti();\n\t\t\n\t\tfor(int i = 1; i < resRSPD.getTotalePagine(); i++) {\t\t\t\n\t\t\tresRSPD = ricercaSinteticaPreDocumentoEntrata(i);\n\t\t\tresult.addAll(resRSPD.getPreDocumenti());\t\t\t\n\t\t}\n\t\treturn result;\n\t}", "List<E> page(Page page, Long...params);", "public List<UserVO> pagingUser(Criteria cri);", "void findWithPagination(Pagination<Activity, Assignment> pagination);", "Page<EtatOperation> findAll(Pageable pageable);", "public List<Object> retrievePagingList(PageBean pageBean) ;", "List<Activity> findAllPageable(int page, int size);", "Page<Accessprofile> listWithCriterasByPage(List<SearchCriteria> searchCriterias, Pageable pageable);", "public List<String> iterateProgramPageList();", "@Override\n\tpublic Page<RegiaoEntity> Lista(PageRequest page) {\n\t\treturn null;\n\t}", "private List<Node<T>> auxiliarRecorridoIn(Node<T> nodo, List<Node<T>> lista, Node<T> raiz) {\r\n\t\t\r\n\t\tif (nodo.getChildren() != null) {\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tauxiliarRecorridoIn(hijos.get(i), lista, raiz);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn lista;\r\n\t}", "private Hashtable<String, String> cargarRecursos() {\n Hashtable<String, String> recursosTemp = new Hashtable<String, String>(); \n \n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA, ConstantesWS.RECURSOS_MENU_ASOCIAR_FACTURA);\n recursosTemp.put(ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB, ConstantesWS.RECURSOS_MENU_ABM_USUARIOS_WEB);\n return recursosTemp;\n }", "@Override\n\tpublic void realizarPago() {\n\t}", "private ArrayList<Integer> getPageLinks() {\n int numberOfPages = sqlData.getNumberOfPages();\n\n int n = (pageNumInt / numberOfPages);\n Integer startPage = n * numberOfPages;\n\n ArrayList<Integer> pageLinks = new ArrayList<Integer>();\n\n // iterate and add to the array\n for(int i=0; i < numberOfPages; i++) {\n pageLinks.add(++startPage); \n }\n\n return pageLinks;\n \n }", "@DirectMethod\r\n\tpublic List<MovimientoDto> obtenerPagos(int iIdEmpresa, int iIdEmpRaiz, int iIdBanco, \r\n\t\t\tString sIdDivisa, String sIdChequera, String sTipoBusqueda, int idUsuario)\r\n\t{\r\n\t\tif (!Utilerias.haveSession(WebContextManager.get())) \r\n\t\t\treturn null;\r\n\t\tList<MovimientoDto> listConsPag = new ArrayList<MovimientoDto>(); \r\n\t\ttry\r\n\t\t{\r\n\t\t\tif (Utilerias.haveSession(WebContextManager.get())) {\r\n\t\t\tParamBusquedaFondeoDto dtoBus = new ParamBusquedaFondeoDto();\r\n\t\t\tCoinversionService coinversionService = (CoinversionService) contexto.obtenerBean(\"coinversionBusinessImpl\");\r\n\t\t\tdtoBus.setIdEmpresa(funciones.validarEntero(iIdEmpresa));\r\n\t\t\tdtoBus.setIdBanco(funciones.validarEntero(iIdBanco));\r\n\t\t\tdtoBus.setIdChequera(funciones.validarCadena(sIdChequera));\r\n\t\t\tdtoBus.setIdEmpresaRaiz(funciones.validarEntero(iIdEmpRaiz));\r\n\t\t\tdtoBus.setSTipoBusqueda(funciones.validarCadena(sTipoBusqueda));\r\n\t\t\tdtoBus.setIdDivisa(funciones.validarCadena(sIdDivisa));\r\n\t\t\tdtoBus.setIdUsuario(idUsuario);\r\n\t\t\t\r\n\t\t\tlistConsPag = coinversionService.obtenerPagos(dtoBus);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tbitacora.insertarRegistro(new Date().toString() + \" \" + Bitacora.getStackTrace(e) \r\n\t\t\t\t\t+ \"P:Coinversion, C:CoinversionAction, M:obtenerPagos\");\r\n\t\t}\r\n\t\treturn listConsPag;\r\n\t}", "public static String paginate(HttpServletRequest request, HttpServletResponse response) {\n List page = FastList.newInstance();\n Paginator paginator = PaginatorFactory.getPaginator(request);\n String action = UtilCommon.getParameter(request, \"action\");\n String pageNumberString = UtilCommon.getParameter(request, \"pageNumber\");\n \n if (paginator != null) {\n try {\n if (pageNumberString != null) {\n try {\n long pageNumber = Long.parseLong(pageNumberString);\n page = paginator.getPageNumber(pageNumber);\n }\n catch (NumberFormatException e) {\n Debug.logWarning(\"Failed to get page numer [\" + pageNumberString + \"] to to format error: \" + e.getMessage(), module);\n page = paginator.getCurrentPage();\n }\n }\n else if (action == null || \"getCurrentPage\".equals(action)) {\n page = paginator.getCurrentPage();\n }\n else if (\"getNextPage\".equals(action)) {\n page = paginator.getNextPage();\n }\n else if (\"getPreviousPage\".equals(action)) {\n page = paginator.getPreviousPage();\n }\n else if (\"getFirstPage\".equals(action)) {\n page = paginator.getFirstPage();\n }\n else if (\"getLastPage\".equals(action)) {\n page = paginator.getLastPage();\n }\n else {\n Debug.logWarning(\"Paginate action [\" + action + \"] not supported.\", module);\n page = paginator.getCurrentPage();\n }\n }\n catch (ListBuilderException e) {\n return doListBuilderExceptionResponse(request, response, paginator, e);\n }\n }\n return doPaginationResponse(request, response, paginator, page);\n }", "public List<CategoriaArticuloServicio> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 34: */ {\r\n/* 35:75 */ return this.categoriaArticuloServicioDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 36: */ }", "Page<Livre> findAll(Pageable pageable);", "public interface PagedResult<T> {\r\n\r\n\t/*\r\n\t * Result code\r\n\t */\r\n\t\r\n\tpublic static final int RESULT_CODE_OK = 0;\r\n\t\r\n\tpublic static final int RESULT_CODE_KO = -1;\r\n\t\r\n\tpublic static final int FIRST_PAGE_INDEX = 1;\r\n\t\r\n\t/**\r\n\t * The method getElementCount() returns this value if the element count is unavalable\r\n\t */\r\n\tpublic final static Integer ELEMENT_COUNT_UNAVAILABLE = -1;\r\n\t\r\n\t/**\r\n\t * <p>The position of the first element of the current pages ( (currentPage-1) * perPage )</p> \r\n\t * \r\n\t * @return\toffset of the first element in this page\r\n\t */\r\n\tpublic Integer getOffset();\r\n\t\r\n\t/**\r\n\t * <p>Maximum number of elements in a page</p>\r\n\t * \r\n\t * @return\tmaximum number of elements in a page\r\n\t */\r\n\tpublic Integer getPerPage();\r\n\r\n\t/**\r\n\t * <p>Total number of elements in all pages</p>\r\n\t * \r\n\t * @return\ttotal number of elements in all pages\r\n\t */\r\n\tpublic Long getElementCount();\r\n\t\r\n\t/**\r\n\t * <p>Position of current page ( in the range 1 - n )</p>\r\n\t * \r\n\t * @return\tposition of current page\r\n\t */\r\n\tpublic Integer getCurrentPage();\t\r\n\t\r\n\t/**\r\n\t * <p>Total number of pages</p>\r\n\t * \r\n\t * @return\ttotal number of pages\r\n\t */\r\n\tpublic Integer getPageCount();\t\r\n\t\r\n\t/**\r\n\t * <p>Number of elements in current page</p>\r\n\t * \r\n\t * @return\tthe size of the current page\r\n\t */\r\n\tpublic Integer getCurrentPageSize();\r\n\t\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic Iterator<T> getPageElements();\r\n\r\n\t/**\r\n\t * <p>Elements in the current page</p>\r\n\t * \r\n\t * @return\telements in the current page\r\n\t */\r\n\tpublic List<T> getPageElementsList();\r\n\t\r\n\t/**\r\n\t * <p>Iterator over page numbers ( 1 - n )</p>\r\n\t * \r\n\t * @return\titerator over page numbers ( 1 - n )\r\n\t */\r\n\tpublic Iterator<Integer> getPageCountIterator();\r\n\t\r\n\t/**\r\n\t * Result code for this page\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic int getResultCode();\r\n\t\r\n\t/**\r\n\t * Additional info of this page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic Map<String, Object> getInfo();\r\n\t\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isLastPage();\r\n\t\r\n\t/** \r\n\t * <code>true</code> if this is the last page.\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFirstPage();\t\r\n\t\r\n\t\r\n\t// ******* additiona method for virtual paging *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * VIRTUAL PAGING IS A METHOD WHERE A VIRTUAL PAGE IS MAPPED INTO A BIGGER PAGE *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * Virtual search key\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic String getVirtualSearchKey();\r\n\t\r\n\tpublic Integer getRealPerPage();\r\n\t\r\n\tpublic Integer getRealCurrentPage();\r\n\t\r\n\tpublic PagedResult<T> getVirtualPage( int currentPage );\r\n\t\r\n\tpublic boolean isSupportVirtualPaging();\r\n\t\r\n\t\r\n\t// ******* additiona method for full result *******\r\n\t\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t// * FULL RESULT IS A METHOD OF ACCESS PAGE WHERE ALL ELEMENTS ARE ACCESSIBLE ONLY ITERATING *\r\n\t// *******************************************************************************************\r\n\t// *******************************************************************************************\r\n\t\r\n\t/**\r\n\t * <code>true</code> if the the page contains the full result\r\n\t * \r\n\t * @return\r\n\t */\r\n\tpublic boolean isFullResult();\r\n\r\n}", "List<? extends Page> getPages();", "public ObservableList<Pagadores> carregaPagadores(int centro, int subCentro) {\n\t\tcon = Conexao.conectar();\n\t\tObservableList<Pagadores> resultadoPagadores = FXCollections.observableArrayList();\n\t\ttry {\n\t\t\tString query = \"SELECT * FROM pagadores WHERE estpagador > ? AND centroreceb = ? AND subcentrorec = ?\";\n\t\t\tprepStmt = con.prepareStatement(query); // create a statement\n\t\t\tprepStmt.setString(1, \"\");\n\t\t\tprepStmt.setInt(2, centro);\n\t\t\tprepStmt.setInt(3, subCentro);\n\t\t\trs = prepStmt.executeQuery();\n\t\t\t\t\t\t // extract data from the ResultSet\n\t\t\twhile(rs.next()) {\n\t\t\t\tPagadores temp = new Pagadores();\n\t\t\t\ttemp.setCodPagador(rs.getInt(\"codpagador\"));\n\t\t\t\ttemp.setEstPagador(rs.getString(\"estpagador\"));\n\t\t\t\ttemp.setRecDescr(rs.getString(\"recdescr\"));\n\t\t\t\t\n\t\t\t\ttemp.setValContrato(rs.getDouble(\"valcontrato\"));\n\t\t\t\ttemp.setContratoInic(DateUtils.asLocalDate(rs.getDate(\"contratoinic\")));\n\t\t\t\ttemp.setContratoFim(DateUtils.asLocalDate(rs.getDate(\"contratofim\")));\n\t\t\t\t\n\t\t\t\ttemp.setNomeContrato(rs.getString(\"nomecontrato\"));\n\t\t\t\ttemp.setContaVinc(rs.getInt(\"contavinc\"));\n\t\t\t\ttemp.setCentroReceb(rs.getInt(\"centroreceb\"));\n\t\t\t\t\n\t\t\t\ttemp.setSubCentroRec(rs.getInt(\"subcentrorec\"));\n\t\t\t\ttemp.setDataLanc(DateUtils.asLocalDate(rs.getDate(\"datalanc\")));\n\t\t\t\ttemp.setDiaVenc(rs.getInt(\"diavenc\"));\n\t\t\t\ttemp.setAgente(rs.getString(\"agente\"));\n\t\t\t\t\n\t\t\t\tresultadoPagadores.add(temp);\n\t\t\t}\n\t\t\treturn resultadoPagadores;\n\t\t} catch(Exception e) {\n\t\t\tMessageBox.show(\"Erro ao ler pagadores 59\", e.getMessage());\n\t\t\treturn null;\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tprepStmt.close();\n\t\t\t\t//conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "List<Item<T>> addItemsForPage(final long page);", "public void inOrderTraverseRecursive();", "Pages getPages();", "@Override\r\n\tpublic List<Node<T>> getPostOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\treturn auxiliarRecorridoPost(raiz, lista);\r\n\t}", "@Override\r\n\tprotected JSON_Paginador getJson_paginador() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Signuptable> findPage(String where, int startIndex, int pageSize) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tcurPage = 1;\n\t\t\t\tmList.clear();\n\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(), curPage,\n\t\t\t\t\t\tpageSize, NetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t}", "@Override\n\tpublic Page<RegiaoEntity> Lista(String paramLike, PageRequest page) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic ActionForward execute(HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tint pageSize = 10; // 한 페이지 당 출력될 글의 개수 지정\r\n\t\t\r\n\t\tString pageNum = request.getParameter(\"pageNum\"); // 페이지 번호를 받아온다.\r\n\t\tif(pageNum == null) {\r\n\t\t\tpageNum = \"1\"; // 페이지 번호를 눌러서 들어오지 않으면 게시판 1page를 보여준다.\r\n\t\t}\r\n\t\t\r\n\t\t// 페이지 번호를 사용해서 페이징 처리 시 연산을 수행할 것이므로\r\n\t\t// 페이지 번호값을 정수타입으로 변경\r\n\t\tint currentPage = Integer.parseInt(pageNum);\r\n\t\t\r\n\t\t// 해당 페이지에 출력되는 글들 중 가장 먼저 출력되는 글의 레코드 번호\r\n\t\tint startRow = (currentPage - 1) * pageSize + 1;\r\n\t\t// 현재 페이지 : 1\r\n\t\t// (1 - 1) * pageSize + 1 ---------> 1\r\n\t\t// 현재 페이지 : 2\r\n\t\t// (2 - 1) * pageSize + 1 ---------> 11\r\n\t\t\r\n\t\tint count = 0;\r\n\t\t// count : 총 글의 개수를 저장할 변수\r\n\t\tint number = 0;\r\n\t\t// number : 해당 페이지에 가장 먼저 출력되는 글의 번호\r\n\t\t\r\n\t\tList<ReservationInfo> reservationList = null; // 글 정보를 저장할 리스트\r\n\t\t// 해당 페이지에 출력되는 글 목록을 저장할 컬렉션\r\n\t\t\r\n\t\t// 비지니스 로직 처리를 위해 서비스 객체 생성\r\n\t\tReservationListService reservationListService = new ReservationListService();\r\n\t\t\r\n\t\tcount = reservationListService.getReservationCount(); // 총 예약의 개수를 가져온다.\r\n\t\tif(count > 0) { \r\n\t\t\t// 예약이 하나라도 있으면 리스팅할 예약 정보 얻어오기\r\n\t\t\treservationList = reservationListService.getReservationList(startRow, pageSize); // 해당 페이지의 레코드 10개씩 가져온다.\r\n\t\t}\r\n\t\t\r\n\t\t// 전체 페이지에서 현재페이지 -1을 해서 pageSize를 곱한다.\r\n\t\tnumber = count - (currentPage - 1) * pageSize;\r\n\t\t// 총 글의 개수 : 134\r\n\t\t// 현재 페이지 : 1\r\n\t\t// 134 - (1 - 1) * 10 -------> 134\r\n\t\t\r\n\t\tint startPage = 0;\r\n\t\tint pageCount = 0;\r\n\t\tint endPage = 0;\r\n\t\t\r\n\t\tif(count > 0) { // 글이 하나라도 존재하면...\r\n\t\t\tpageCount = count / pageSize + (count % pageSize == 0 ? 0 : 1);\r\n\t\t\t// 총 페이지 개수를 구함.\r\n\t\t\t// ex) 총 글의 개수 13개이면 페이지는 2개 필요..\r\n\t\r\n\t\t\tstartPage = ((currentPage -1) / pageSize) * pageSize + 1;\r\n\t\t\t// 현재 페이지 그룹의 첫번째 페이지를 구함.\r\n\t\t\t// [1][2][3][4][5][6][7]...[10] -------> 처음 페이지 그룹\r\n\t\t\t// 다음 페이지 스타트 페이지 : [11][12][13]....[20]\r\n\t\t\t\t\t\r\n\t\t\tint pageBlock = 10;\r\n\t\t\tendPage = startPage + pageBlock - 1;\r\n\t\t\t\r\n\t\t\t// 마지막 페이지 그룹인 경우..\r\n\t\t\tif(endPage > pageCount) endPage = pageCount;\r\n\t\t}\r\n\t\t\r\n\t\t// 포워딩 하기 전, 가져 온 글 공유\r\n\t\trequest.setAttribute(\"reservationList\", reservationList);\r\n\t\tPageInfo pageInfo = new PageInfo(); // 페이지에 관한 정보를 처리하는 객체 생성\r\n\t\tpageInfo.setCount(count);\r\n\t\tpageInfo.setCurrentPage(currentPage);\r\n\t\tpageInfo.setEndPage(endPage);\r\n\t\tpageInfo.setNumber(number);\r\n\t\tpageInfo.setPageCount(pageCount);\r\n\t\tpageInfo.setStartPage(startPage);\r\n\t\t\r\n\t\trequest.setAttribute(\"pageInfo\", pageInfo);\r\n\t\tActionForward forward = new ActionForward();\r\n\t\tforward.setUrl(\"/pc/reservationList.jsp\"); // list.jsp 페이지 포워딩\r\n\t\t\r\n\t\treturn forward;\r\n\t}", "Page<Accessprofile> listAllByPage(Pageable pageable);", "public void buscarDocentes() {\r\n try {\r\n List<DocenteProyecto> docenteProyectos = docenteProyectoService.buscar(new DocenteProyecto(\r\n sessionProyecto.getProyectoSeleccionado(), null, null, Boolean.TRUE, null));\r\n if (docenteProyectos.isEmpty()) {\r\n return;\r\n }\r\n for (DocenteProyecto docenteProyecto : docenteProyectos) {\r\n DocenteProyectoDTO docenteProyectoDTO = new DocenteProyectoDTO(docenteProyecto, null,\r\n docenteCarreraService.buscarPorId(new DocenteCarrera(docenteProyecto.getDocenteCarreraId())));\r\n docenteProyectoDTO.setPersona(personaService.buscarPorId(new Persona(docenteProyectoDTO.getDocenteCarrera().getDocenteId().getId())));\r\n sessionProyecto.getDocentesProyectoDTO().add(docenteProyectoDTO);\r\n }\r\n sessionProyecto.setFilterDocentesProyectoDTO(sessionProyecto.getDocentesProyectoDTO());\r\n } catch (Exception e) {\r\n }\r\n }", "@PostMapping(\"/J314Authorities.pag\")\n\t@Timed\n\t\n\tpublic ResultExt< Page< J314AuthorityPoj >> getAllPag(HttpServletRequest request,HttpServletResponse response, @Valid @RequestBody J314AuthorityCritPaged pag)\n\t{\n\t\t\n\t\tString params=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\n\t\tContexto ctx = Contexto.init();\n\t\tctx.put(Contexto.REQUEST,request);\n\t\tctx.put(Contexto.RESPONSE,response);\n\t\tctx.put(Contexto.CLAVE_SEGURIDAD,\"REST_ENTITY_J314AUTHORITY_GETALLPAG\");\n\t\tctx.put(Contexto.URL_SOLICITADA,\"/J314Authorities.pag\");\n\t\tResult< Page< J314AuthorityPoj >> res=new Result<>();\n\t\tif (log.isInfoEnabled()) log.info(\"Entrada en REST POST:getAllPag(\"+params+\")\"+params);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif(!verificaPermisos(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\"))\n\t\t\t{\n\t\t\t\tres.addError(new ErrorSinPermiso(\"REST_ENTITY_J314AUTHORITY_GETALLPAG\",\"/J314Authorities.pag\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tparams=UtilParams.paramsToString(\"J314AuthorityCritPaged\",pag);\n\t\t\t\tif (log.isInfoEnabled()) log.info(\"Verificado en REST POST:getAllPag(\"+params+\")\"+params);\n\n\t\t\t\tJ314AuthorityCritPaged pag_ = pag;\n\n\t\t\t\tResult< Page< J314Authority > > res_=service.findAll(pag_);\n\t\t\t\tres.setInfoEWI(res_);\n\n\t\t\t\tres.setData(J314AuthorityPoj.toPOJOPage(res_.getData()));\n\n\t\t\t}\n\t\t\taddTiempoSesion();\n\t\t}\tcatch(Exception e)\n\t\t{\n\t\t\tres.addError(new ErrorGeneral(e));\n\t\t\tif (log.isErrorEnabled()) log.error(\"Error en REST POST:getAllPag(\"+params+\"). Excepcion:\"+UtilException.printStackTrace(e));\n\t\t}\n\t\tif (log.isInfoEnabled()) log.info(\"Salida de REST POST:getAllPag(\"+params+\"). Resultado:\"+res.toString());\n\n\t\tResultExt< Page< J314AuthorityPoj > > resFin=new ResultExt<>(res,ctx.getAs(\"ticketStr\"));\n\t\tContexto.close();\n\t\treturn resFin;\n\t}", "public List<Maquina> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 34: */ {\r\n/* 35: 73 */ return this.maquinaDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 36: */ }", "public List<Reporteador> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 52: */ {\r\n/* 53: 71 */ return this.reporteadorDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 54: */ }", "public List<ItemsResponse> getListItems(ItemsRequest req) throws DAOException {\n\t\tlogger.debug(\" --- getListItems [ HNotaDAO ] --- \" );\n\t\tlogger.debug(\" --- request : \"+req.toString()+\" --- \" );\n\t\t\n\t\t\n\t\tList<ItemsResponse> lista = null;\n\t\tStringBuilder query = new StringBuilder();\n\n\t\tint limit = req.getLimit();\n\t\tint page = req.getPage();\n\n\t\tif (limit == 0 || page == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tint to = limit * page;\n\t\tint from = (to - limit) + 1;\n\n\t\tquery.append(\" SELECT * FROM (SELECT @rownum:=@rownum+1 rank , q.* \");\n\t\tquery.append(\" \t\tFROM ( SELECT n.FC_ID_CONTENIDO AS id , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_TITULO AS title, \");\n query.append(\" \t\t\t n.FC_CN AS user , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_DESCRIPCION AS description , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FD_FECHA_PUBLICACION AS date , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_TIPO_NOTA AS typeItem, \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_FRIENDLY_URL AS url_item , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_ID_ESTATUS_NOTA AS status , \");\n\t\tquery.append(\" \t\t\t\t\t\tn.FC_IMAGEN_PRINCIPAL AS image , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_ID_CATEGORIA AS idCategories , \");\n\t\tquery.append(\" \t\t\t\t\t\tcategoria.FC_DESCRIPCION AS descCategories, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_DESCRIPCION AS descSport, \");\n\t\tquery.append(\" \t\t\t\t\t\tdeporte.FC_ID_DEPORTE AS idSport \");\n\t\tquery.append(\" \t\t\t\tFROM yog_ba_h_nota n \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_categoria categoria ON n.FC_ID_CATEGORIA = categoria.FC_ID_CATEGORIA \");\n\t\tquery.append(\" \t\t\t\tLEFT JOIN yog_ba_c_deporte deporte ON n.FC_ID_DEPORTE = deporte.FC_ID_DEPORTE \");\n\t\tquery.append(\" \t\t \t\t WHERE 1=1 \");\n\t\t\n\t\tif (req.getType().equals(\"categoria\")) {\n\t\t\tquery.append(\" AND categoria.FC_ID_CATEGORIA = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\t\n\t\tif (req.getType().equals(\"deporte\")) {\n\t\t\tquery.append(\" AND deporte.FC_ID_DEPORTE = '\" + req.getId() + \"' \");\n\t\t}\n\t\t\n\t\tif (req.getStatus() != null && !req.getStatus().equals(\"\"))\n\t\t\tquery.append(\" AND n.FC_ID_ESTATUS_NOTA = '\" + req.getStatus() + \"' \");\n\n\t\tquery.append(\" ORDER BY FD_FECHA_PUBLICACION DESC ) AS q ,(SELECT @rownum:=0) num ) r \");\n\t\tquery.append(\" WHERE r.rank >= \" + from + \" AND r.rank <= \" + to + \" \");\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t\ttry {\n\n\t\t\tlista = jdbcTemplate.query(query.toString(), new BeanPropertyRowMapper<ItemsResponse>(ItemsResponse.class));\n\n\t\t} catch (Exception e) {\n\n\t\t\tlogger.error(\"--- Error getListItems [ HNotaDAO ] :\", e);\n\n\t\t\tthrow new DAOException(e.getMessage());\n\n\t\t}\n\n\t\treturn lista;\n\n\t}", "@Override\n public int doStartTag() throws JspException {\n\n int pageCount = (this.recordCount + this.pageSize - 1) / this.pageSize;\n StringBuilder sb = new StringBuilder();\n\n if (this.recordCount != 0 && this.recordCount > this.pageSize) {\n sb.append(\"<ol class=\\\"paginator\\\">\");\n if (this.pageNo > pageCount) {\n this.pageNo = pageCount;\n }\n if (this.pageNo < 1) {\n this.pageNo = 1;\n }\n HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();\n\n url = request.getAttribute(\"originalUrl\").toString();\n url += \"?\";\n if (StringUtil.isNotEmpty(request.getQueryString())) {\n String queryString = request.getQueryString();\n url += queryString.replaceAll(\"page=[0-9]*\", \"\");\n if (!url.endsWith(\"&\") && !url.endsWith(\"?\")) {\n url += \"&\";\n }\n }\n\n if (this.pageNo > 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--prev\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo - 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n int start = 1;\n if (this.pageNo > 4) {\n start = this.pageNo - 1;\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=1'>1</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=2'>2</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n int end = this.pageNo + 1;\n if (end > pageCount) {\n end = pageCount;\n }\n for (int i = start; i <= end; i++) {\n if (this.pageNo == i) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number paginator__item--current\\\"><span class=\\\"paginator__item__text\\\">\" + i + \"</span></li>\");\n } else {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + i + \"'>\").append(i).append(\"</a></li>\");\n }\n }\n if (end < pageCount - 2) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n if (end < pageCount - 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (pageCount - 1) + \"'>\").append((pageCount - 1) + \"</a></li>\");\n }\n if (end < pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + pageCount + \"'>\").append(pageCount + \"</a></li>\");\n }\n if (this.pageNo != pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--next\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo + 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n }\n if (anchor != null) {\n sb.append(\"<script type='text/javascript'>$('.paginator a').each(function(){var href=$(this).attr('href');$(this).attr('href',href+'\" + anchor + \"')});</script>\");\n }\n sb.append(\"</ol>\");\n try {\n this.pageContext.getOut().println(sb.toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n\n e.printStackTrace();\n }\n return 0;\n }", "public void getChallanOnloadList(TaxChallan taxChallan,HttpServletRequest request) {\r\n\t\tObject[][]listData = null;\r\n\t\tArrayList<Object> list = new ArrayList();\r\n\t\ttry {\r\n\t\t\tString query = \"SELECT CHALLAN_CODE ,DECODE(CHALLAN_MONTH ,1,'JANUARY',2,'FEBRUARY',3,'MARCH',4,'APRIL',5, \"\r\n\t\t\t\t\t+ \" 'MAY',6,'JUNE',7,'JULY',8,'AUGUST', 9,'SEPTEMBER',10,'OCTOBER',11,'NOVEMBER',12,'DECEMBER'), \"\r\n\t\t\t\t\t+ \" CHALLAN_YEAR, NVL(DIV_NAME,' '), DIV_ID, CHALLAN_MONTH, ROWNUM, TO_CHAR(NVL(CHALLAN_TOTALTAX,0),9999999990.99) FROM HRMS_TAX_CHALLAN \"\r\n\t\t\t\t\t+ \" INNER JOIN HRMS_DIVISION ON HRMS_DIVISION.DIV_ID = HRMS_TAX_CHALLAN.CHALLAN_DIVISION_ID \"\r\n\t\t\t\t\t+ \" ORDER BY CHALLAN_YEAR DESC\";\r\n\t\t\tlistData = getSqlModel().getSingleResult(query);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlogger.error(\"exception in listData query\",e);\r\n\t\t} //end of catch\r\n\t\t\r\n\t\tif(listData !=null && listData.length >0){\r\n\t\t\t\r\n\t\t\t\tString[] pageIndex = Utility.doPaging(taxChallan.getMyPage(), listData.length, 20);\r\n\t\t\t\tif (pageIndex == null) {\r\n\t\t\t\t\tpageIndex[0] = \"0\";\r\n\t\t\t\t\tpageIndex[1] = \"20\";\r\n\t\t\t\t\tpageIndex[2] = \"1\";\r\n\t\t\t\t\tpageIndex[3] = \"1\";\r\n\t\t\t\t\tpageIndex[4] = \"\";\r\n\t\t\t\t} //end of if\r\n\t\t\t\trequest.setAttribute(\"totalPage\", Integer.parseInt(String\r\n\t\t\t\t\t\t.valueOf(pageIndex[2])));\r\n\t\t\t\trequest.setAttribute(\"pageNo\", Integer.parseInt(String\r\n\t\t\t\t\t\t.valueOf(pageIndex[3])));\r\n\r\n\t\t\t\tif (pageIndex[4].equals(\"1\"))\r\n\t\t\t\t\ttaxChallan.setMyPage(\"1\");\r\n\t\t\t\r\n\t\t\t//int count=0;\r\n\t\t\tfor (int i = Integer.parseInt(pageIndex[0]); i < Integer.parseInt(pageIndex[1]); i++) {\r\n\t\t\t\tTaxChallan bean = new TaxChallan();\r\n\t\t\t\tbean.setChallanListCode(String.valueOf(listData[i][0]));\r\n\t\t\t\tbean.setChallanListMonth(String.valueOf(listData[i][1]));\r\n\t\t\t\tbean.setChallanListYear(String.valueOf(listData[i][2]));\r\n\t\t\t\tbean.setChallanListDivName(String.valueOf(listData[i][3]));\r\n\t\t\t\tbean.setChallanListDivId(String.valueOf(listData[i][4]));\r\n\t\t\t\tbean.setChallanListMonthId(String.valueOf(listData[i][5]));\r\n\t\t\t\tbean.setListRowNum(String.valueOf(listData[i][6]));\r\n\t\t\t\tbean.setListTotalTax(String.valueOf(listData[i][7]));\r\n\t\t\t\tlist.add(bean);\r\n\t\t\t\t//count++;\r\n\t\t\t} //end of loop\r\n\t\t\ttaxChallan.setTotalListRecords(String.valueOf(listData.length));\r\n\t\t\ttaxChallan.setIteratorlist(list);\r\n\t\t\t//request.setAttribute(\"addQuestionTotalPages\",(list.size() % scriptPageNo == 0)?(list.size()/scriptPageNo):(list.size()/scriptPageNo)+1);\r\n\t\t}else{\r\n\t\t\ttaxChallan.setListNoData(\"true\");\r\n\t\t} //end of else\r\n\t\t\r\n\t}", "void nextPage() throws IndexOutOfBoundsException;", "public abstract void onLoadMore(int page, int totalItemsCount);", "public abstract void onLoadMore(int page, int totalItemsCount);", "Page<T> findAll(Pageable pageable);", "@PreAuthorize(\"hasAnyRole('ADMIN')\")\n\t@RequestMapping(value=\"/page\",method=RequestMethod.GET) \n\tpublic ResponseEntity<Page<ClienteDTO>> findPage(\n\t\t\t@RequestParam(value=\"page\", defaultValue=\"0\") Integer page, \n\t\t\t@RequestParam(value=\"linesPerPage\", defaultValue=\"24\") Integer linesPerPage, //24 pq eh multiplo de 1, 2 3 e 4\n\t\t\t@RequestParam(value=\"orderBy\", defaultValue=\"nome\") String orderBy, \n\t\t\t@RequestParam(value=\"direction\", defaultValue=\"ASC\") String directionOrder) { //asc eh ascendente \n\t\t\n\t\tPage<Cliente> list = service.findPage(page,linesPerPage,orderBy,directionOrder);\n\t\t\n\t\tPage<ClienteDTO> listDTO = list.map(obj->new ClienteDTO(obj));\n\t\t\n\t\treturn ResponseEntity.ok().body(listDTO); \n\t\t\n\t}", "public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }", "Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;", "@Override\n\tpublic Page<?> pagination(Integer pagenumber, Integer rows, String sortdireccion, String sortcolumn,\n\t\t\tObject filter) {\n\t\treturn null;\n\t}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction, Pagination pagination);", "Page<Fotografia> findAll(Pageable pageable);", "private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "@Override\r\n\tpublic List<ReviewVO> listPage(int page) throws Exception {\n\t\tif(page<=0) {\r\n\t\t\tpage=1;\r\n\t\t}\r\n\t\t\r\n\t\tpage = (page-1)*10; // 한 페이지에 10개의 글 보이기\r\n\t\t\r\n\t\treturn ss.selectList(\"listPage\", page);\r\n\t}", "@Override\n\tpublic void onLoadMore() {\n\t\tpage++;\n\t\texecutorService.submit(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tgetResultByKeyword(page);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "Page<LevelElementDTO> findAll(Pageable pageable);", "@Override\r\n\tpublic PageDataList<ReferrerModel> referrerList(int pageNumber,int pageSize,ReferrerModel model) {\n\t\tString strSql = \" select w.id,w.name,u.real_name,u.mobile_phone,p.coupon_code, \" +\r\n\t\t\t\t\" i.real_name as invite_user,i.mobile_phone invite_mobile_phone,p.used_times from rd_user_invite ui \" +\r\n\t\t\t\t\" join rd_user u on ui.user_id = u.user_id \" +\r\n\t\t\t\t\" join rd_user i on ui.invite_user = i.user_id \" +\r\n\t\t\t\t\" LEFT JOIN ehb_wealth_user wu ON ui.user_id = wu.user_id \" + \r\n\t\t\t\t\" LEFT JOIN ehb_zc_wealth_manager_user m ON wu.id = m.wealth_user_id \" +\r\n\t\t\t\t\" left join ehb_zc_wealth_manager w on m.wealth_manager_id = w.id \" + \r\n\t\t\t\t\" left join rd_user_promot p on ui.invite_user = p.user_id where 1=1 \";\r\n\t\tif (!StringUtil.isBlank(model.getSearchName())) {\r\n\t \tstrSql += \" and (u.mobile_phone like '%\" + model.getSearchName() + \"%' \" + \r\n \t \" or u.real_name like '%\" + model.getSearchName() + \"%') \";\r\n\t } \r\n\t\tQuery query = em.createNativeQuery(strSql);\r\n\t\tPage page = new Page(query.getResultList().size(), pageNumber,pageSize);\r\n\t\tquery.setFirstResult((pageNumber - 1) * pageSize);\r\n\t\tquery.setMaxResults(pageSize);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Object[]> list = query.getResultList();\r\n\t\tPageDataList<ReferrerModel> pageDataList_ = new PageDataList<ReferrerModel>();\r\n List<ReferrerModel> cpmList = new ArrayList<ReferrerModel>();\r\n pageDataList_.setPage(page);\r\n int i = 1;\r\n \tfor (Object[] o : list) {\r\n \t\tReferrerModel referrer = new ReferrerModel();\r\n \t\treferrer.setId(i);\r\n \t\treferrer.setSaleCode(o[0]==null?\"\":o[0].toString());\r\n \t\treferrer.setSaleName(o[1]==null?\"\":o[1].toString());\r\n \t\treferrer.setRealName(o[2]==null?\"\":o[2].toString());\r\n \t\treferrer.setPhone(o[3]==null?\"\":o[3].toString());\r\n \t\treferrer.setRecommendCode(o[4]==null?\"\":o[4].toString());\r\n \t\treferrer.setReferrer(o[5]==null?\"\":o[5].toString());\r\n \t\treferrer.setReferrerPhone(o[6]==null?\"\":o[6].toString());\r\n \t\treferrer.setCodeUsedTimes(o[7]==null?0:Integer.parseInt(o[7].toString()));\r\n \t\tcpmList.add(referrer);\r\n\t\t\ti++;\r\n \t}\r\n\t\tpageDataList_.setList(cpmList);\r\n\t\treturn pageDataList_;\r\n\t}", "public PageList<User> getUserPageList(User user, int pageSize, int pageNum) throws DataAccessException;", "private void listar(HttpPresentationComms comms, String _operacion) throws HttpPresentationException, KeywordValueException {\n/* 219 */ activarVista(\"consulta\");\n/* 220 */ if (_operacion.equals(\"X\")) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 225 */ PrcRecursoDAO ob = new PrcRecursoDAO();\n/* 226 */ Collection<PrcRecursoDTO> arr = ob.cargarTodos();\n/* 227 */ HTMLTableSectionElement hte = this.pagHTML.getElementDetalle();\n/* 228 */ int cuantas = 0;\n/* 229 */ Iterator<PrcRecursoDTO> iterator = arr.iterator();\n/* 230 */ while (iterator.hasNext()) {\n/* 231 */ PrcRecursoDTO reg = (PrcRecursoDTO)iterator.next();\n/* 232 */ HTMLElement eltr = (HTMLElement)this.pagHTML.createElement(\"tr\");\n/* 233 */ eltr.appendChild(newtd(\"\" + reg.getIdRecurso()));\n/* 234 */ String url = \"PrcRecurso.po?_operacion=V&idRecurso=\" + reg.getIdRecurso() + \"\";\n/* 235 */ eltr.appendChild(newtdhref(\"\" + reg.getNombreIdTipoRecurso(), url));\n/* 236 */ eltr.appendChild(newtd(\"\" + reg.getDescripcionRecurso()));\n/* 237 */ eltr.appendChild(newtd(\"\" + reg.getNombreIdProcedimiento()));\n/* 238 */ eltr.appendChild(newtd(\"\" + reg.getNombreEstado()));\n/* 239 */ hte.appendChild(eltr);\n/* 240 */ cuantas++;\n/* */ } \n/* 242 */ arr.clear();\n/* 243 */ this.pagHTML.setTextNroRegistros(\"\" + cuantas);\n/* */ }", "public void inOrderTraverseIterative();", "Page<SeminarioDTO> findAll(Pageable pageable);", "public List<Pagos> findAll(){\n return pagoMongoRepository.findAll();\n }", "public List<MotivoLlamadoAtencion> load(int startIndex, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters)\r\n/* 44: */ {\r\n/* 45: 59 */ List<MotivoLlamadoAtencion> lista = new ArrayList();\r\n/* 46: 60 */ boolean ordenar = sortOrder == SortOrder.ASCENDING;\r\n/* 47: */ \r\n/* 48: 62 */ filters.put(\"idOrganizacion\", String.valueOf(AppUtil.getOrganizacion().getId()));\r\n/* 49: 63 */ lista = MotivoLlamadoAtencionBean.this.servicioMotivoLlamadoAtencion.obtenerListaPorPagina(startIndex, pageSize, sortField, ordenar, filters);\r\n/* 50: */ \r\n/* 51: 65 */ MotivoLlamadoAtencionBean.this.listaMotivoLlamadoAtencion.setRowCount(MotivoLlamadoAtencionBean.this.servicioMotivoLlamadoAtencion.contarPorCriterio(filters));\r\n/* 52: */ \r\n/* 53: 67 */ return lista;\r\n/* 54: */ }", "@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }", "private ResultPagingVO readCommonCtrlItemAndPropList(HttpServletRequest req, String objectType) {\n\n\t\tResultPagingVO resultVO = new ResultPagingVO();\n\t\tHashMap<String, Object> options = new HashMap<String, Object>();\n\n\t\t// << options >>\n\t\tString searchKey = ((req.getParameter(\"keyword\") != null) ? req.getParameter(\"keyword\").replace(\"_\", \"\\\\_\")\n\t\t\t\t: \"\");\n\n\t\t// search keyword\n\t\toptions.put(\"searchKey\", searchKey);\n\n\t\t// << paging >>\n\t\tString paramOrderColumn = req.getParameter(\"orderColumn\");\n\t\tString paramOrderDir = req.getParameter(\"orderDir\");\n\t\tString paramStart = StringUtils.defaultString(req.getParameter(\"start\"), \"0\");\n\t\tString paramLength = StringUtils.defaultString(req.getParameter(\"length\"), \"10\");\n\n\t\t// << Order >>\n\t\tif (\"chConfName\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.OBJ_NM\");\n\t\t} else if (\"chModUser\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.MOD_USER_ID\");\n\t\t} else if (\"chRegUser\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.REG_USER_ID\");\n\t\t} else if (\"chConfId\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.OBJ_ID\");\n\t\t} else if (\"chModDate\".equalsIgnoreCase(paramOrderColumn)) {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.MOD_DT\");\n\t\t} else {\n\t\t\toptions.put(\"paramOrderColumn\", \"M.OBJ_ID\");\n\t\t}\n\n\t\tif (\"DESC\".equalsIgnoreCase(paramOrderDir)) {\n\t\t\toptions.put(\"paramOrderDir\", \"DESC\");\n\t\t} else {\n\t\t\toptions.put(\"paramOrderDir\", \"ASC\");\n\t\t}\n\t\tif (\"desc\".equalsIgnoreCase(paramOrderDir)) {\n\t\t\toptions.put(\"defaultOrderValue\", \"힣힣힣힣힣힣힣\");\n\t\t\toptions.put(\"defaultOrderSecondValue\", \"힣힣힣힣힣힣힢\");\n\t\t} else {\n\t\t\toptions.put(\"defaultOrderValue\", null);\n\t\t\toptions.put(\"defaultOrderSecondValue\", null);\n\t\t}\n\t\toptions.put(\"paramStart\", Integer.parseInt(paramStart));\n\t\toptions.put(\"paramLength\", Integer.parseInt(paramLength));\n\n\t\toptions.put(\"mngObjTp\", objectType);\n\n\t\ttry {\n\n\t\t\tresultVO = ctrlMstService.readCtrlItemAndPropListPaged(options);\n\t\t\tresultVO.setDraw(String.valueOf(req.getParameter(\"page\")));\n\t\t\tresultVO.setOrderColumn(paramOrderColumn);\n\t\t\tresultVO.setOrderDir(paramOrderDir);\n\t\t\tresultVO.setRowLength(paramLength);\n\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error in readClientConfList : {}, {}, {}\", GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR), ex.toString());\n\t\t\tresultVO = null;\n\t\t}\n\n\t\treturn resultVO;\n\t}", "@Override\n\tpublic List<MetodoPagamento> findAllOcupados() {\n\t\treturn null;\n\t}" ]
[ "0.62866455", "0.61699396", "0.6099559", "0.5924592", "0.59223014", "0.5859627", "0.57984036", "0.579237", "0.57267153", "0.5721768", "0.57107085", "0.56381935", "0.5638089", "0.56317157", "0.5627069", "0.560265", "0.55997187", "0.55960184", "0.5594018", "0.5585099", "0.5566673", "0.55530536", "0.55461085", "0.5545089", "0.5536585", "0.55124044", "0.55120105", "0.5505261", "0.5503729", "0.5487349", "0.5484431", "0.54742914", "0.5438128", "0.54313296", "0.5427989", "0.54263914", "0.5422104", "0.53980196", "0.5397042", "0.53965974", "0.5391793", "0.53861374", "0.53740096", "0.5373896", "0.53646237", "0.5360729", "0.53361046", "0.5330603", "0.53292865", "0.53281844", "0.5326247", "0.53183126", "0.53054696", "0.53043807", "0.5302947", "0.52903163", "0.5271295", "0.5265775", "0.5264487", "0.5262598", "0.5262352", "0.5255463", "0.52550596", "0.5250256", "0.52440125", "0.5241845", "0.5235341", "0.5233608", "0.52297413", "0.5226269", "0.5225193", "0.5222595", "0.52222246", "0.52209306", "0.5219683", "0.5219303", "0.52143174", "0.5211912", "0.5193966", "0.5193966", "0.5187336", "0.5186237", "0.5182927", "0.51807463", "0.51763886", "0.5173656", "0.5169949", "0.5166705", "0.51622945", "0.51613754", "0.51601434", "0.51595384", "0.5158272", "0.51578015", "0.515616", "0.51552314", "0.5153727", "0.5149469", "0.51458067", "0.5145665", "0.51371855" ]
0.0
-1
Provide a suitable constructor (depends on the kind of dataset)
public PersoAdapter(List<Characters> myDataset){ compteur = 0; mDataset = myDataset.toArray(new Characters[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DataSet() {\r\n \r\n }", "public abstract DataType<T> newInstance();", "public abstract DataType<T> newInstance(String format);", "public AzureDataLakeStoreDataset() {\n }", "public DoubleMatrixDataset() {\r\n }", "protected abstract D createData();", "public AnalysisDatasets() {\n }", "public Data() {}", "private CategoryDataset createDataset( )\n\t {\n\t final DefaultCategoryDataset dataset = \n\t new DefaultCategoryDataset( ); \n\t \n\t dataset.addValue(23756.0, \"余杭\", \"闲林\");\n\t dataset.addValue(29513.5, \"余杭\", \"良渚\");\n\t dataset.addValue(25722.2, \"余杭\", \"瓶窑\");\n\t dataset.addValue(19650.9, \"余杭\", \"星桥\");\n\t dataset.addValue(19661.6, \"余杭\", \"崇贤\");\n\t dataset.addValue(13353.9, \"余杭\", \"塘栖\");\n\t dataset.addValue(25768.9, \"余杭\", \"勾庄\");\n\t dataset.addValue(12682.8, \"余杭\", \"仁和\");\n\t dataset.addValue(22963.1, \"余杭\", \"乔司\");\n\t dataset.addValue(19695.6, \"余杭\", \"临平\");\n\t \n\t return dataset; \n\t }", "public abstract DataType<T> newInstance(String format, Locale locale);", "private PieDataset createDataset() {\n\t\tDefaultPieDataset result = new DefaultPieDataset();\n\t\tresult.setValue(\"Linux\", 29);\n\t\tresult.setValue(\"Mac\", 20);\n\t\tresult.setValue(\"Windows\", 51);\n\t\treturn result;\n\n\t}", "public DatasetHelper(DatasetHelper another){\n id= another.id;\n hash = another.hash;\n catalogueId = another.catalogueId;\n sourceType = another.sourceType;\n sourceLang = another.sourceLang;\n model = ModelFactory.createDefaultModel().add(another.model);\n uriSchema = another.uriSchema;\n }", "public JsonDataset() {\r\n\t\tsuper();\r\n\t\tlogger.trace(\"JsonDataset() - start\");\r\n\t\tlogger.trace(\"JsonDataset() - end\");\r\n\t}", "public static CategoryDataset createDataset() {\r\n DefaultCategoryDataset dataset = new DefaultCategoryDataset();\r\n dataset.addValue(1.0, \"First\", \"C1\");\r\n dataset.addValue(4.0, \"First\", \"C2\");\r\n dataset.addValue(3.0, \"First\", \"C3\");\r\n dataset.addValue(5.0, \"First\", \"C4\");\r\n dataset.addValue(5.0, \"First\", \"C5\");\r\n dataset.addValue(7.0, \"First\", \"C6\");\r\n dataset.addValue(7.0, \"First\", \"C7\");\r\n dataset.addValue(8.0, \"First\", \"C8\");\r\n dataset.addValue(5.0, \"Second\", \"C1\");\r\n dataset.addValue(7.0, \"Second\", \"C2\");\r\n dataset.addValue(6.0, \"Second\", \"C3\");\r\n dataset.addValue(8.0, \"Second\", \"C4\");\r\n dataset.addValue(4.0, \"Second\", \"C5\");\r\n dataset.addValue(4.0, \"Second\", \"C6\");\r\n dataset.addValue(2.0, \"Second\", \"C7\");\r\n dataset.addValue(1.0, \"Second\", \"C8\");\r\n dataset.addValue(4.0, \"Third\", \"C1\");\r\n dataset.addValue(3.0, \"Third\", \"C2\");\r\n dataset.addValue(2.0, \"Third\", \"C3\");\r\n dataset.addValue(3.0, \"Third\", \"C4\");\r\n dataset.addValue(6.0, \"Third\", \"C5\");\r\n dataset.addValue(3.0, \"Third\", \"C6\");\r\n dataset.addValue(4.0, \"Third\", \"C7\");\r\n dataset.addValue(3.0, \"Third\", \"C8\");\r\n return dataset;\r\n }", "public Data() {\n \n }", "public Data() {\n }", "public Data() {\n }", "public UsersDataSet() {}", "public CategoricalResults(){\n\n }", "public CompositeData()\r\n {\r\n }", "private DatasetJsonConversion() {}", "public DataSet() {\n labels = new HashMap<>();\n locations = new HashMap<>();\n counter= new AtomicInteger(0);\n }", "public UnivariateStatsData() {\n super();\n }", "DataType createDataType();", "public DataType(String dataName) {\n /*try {\n basicType = this.getClass().getName();\n idForDataType = this.getClass().getName();\n } catch (Exception ex) {\n Logger.getLogger(DataType.class).fatal(\"Failed to generate a unique id: \" +\n ex.getMessage(),ex);\n }*/\n this.dataName = dataName;\n }", "public CLONDATAFactoryImpl() {\n\t\tsuper();\n\t}", "public DataSet(){\r\n\t\tdocs = Lists.newArrayList();\r\n//\t\t_docs = Lists.newArrayList();\r\n\t\t\r\n\t\tnewId2trnId = HashBiMap.create();\r\n\t\t\r\n\t\tM = 0;\r\n\t\tV = 0;\r\n\t}", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "public DataFactoryImpl() {\n\t\tsuper();\n\t}", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "private XYDataset createDataset() {\n\t\tfinal XYSeriesCollection dataset = new XYSeriesCollection( ); \n\t\tdataset.addSeries(trainErrors); \n\t\tdataset.addSeries(testErrors);\n\t\treturn dataset;\n\t}", "public CategoryDataset createDataset() {\n\t\tfinal DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\t\tProjectManagement projectManagement = new ProjectManagement();\n\t\tif (this.chartName == \"Earned Value\") {\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getEarnedValue(date), \"Earned Value\", date);\n\t\t\t}\n\t\t} else if (this.chartName == \"Schedule Variance\") {\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getScheduleVariance(date), \"Schedule Variance\", date);\n\t\t\t}\n\n\t\t} else {// Cost Variance\n\t\t\tfor (LocalDate date : dateList) {\n\t\t\t\tdataset.addValue(projectManagement.getCostVariance(date), \"Cost Variance\", date);\n\t\t\t}\n\t\t}\n\t\treturn dataset;\n\t}", "private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"[email protected]\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }", "public DataSet( int _height , int _width) throws FileNotFoundException {\n height = _height;\n width = _width;\n InitFile( \"src/com/algorithme/DataSet.txt\" );\n InitTargets();\n InitFeatures();\n System.out.println(\"Création de la DataSet\");\n }", "public InstanceGenerator(String datasetString)\n {\n if(datasetString.equals(\"__dummy__\")){\n mTraining = Util.createDummyInstances(50, 2, 1, 0, 0, 0, 0, 0);\n mTesting = Util.createDummyInstances(50, 2, 1, 0, 0, 0, 0, 1);\n }else{\n //It's a property string - parse it\n Properties props;\n try\n {\n props = Util.parsePropertyString(datasetString);\n }catch(Exception e){\n log.warn(\"It looks like you're using an old experiment that doesn't indicate the type of dataset that it is using\");\n loadZipFile(datasetString, \"last\");\n return;\n }\n\n String type = props.getProperty(\"type\");\n\n if(type == null){\n throw new RuntimeException(\"Dataset string does not contain a type\");\n }else if(type.equals(\"zipFile\")){\n loadZipFile(props.getProperty(\"zipFile\"), props.getProperty(\"classIndex\", \"last\"));\n }else if(type.equals(\"trainTestArff\")){\n loadTrainTestArff(props.getProperty(\"trainArff\"), props.getProperty(\"testArff\"), props.getProperty(\"classIndex\", \"last\"));\n }else{\n throw new RuntimeException(\"Unhandled type data set type '\" + type + \"'\");\n }\n }\n }", "public Datos(){\n }", "private XYDataset createDataset() {\n final XYSeriesCollection dataset = new XYSeriesCollection();\n //dataset.addSeries(totalDemand);\n dataset.addSeries(cerContent);\n //dataset.addSeries(cerDemand);\n dataset.addSeries(comContent);\n //dataset.addSeries(comDemand);\n dataset.addSeries(activation);\n dataset.addSeries(resolutionLevel);\n \n return dataset;\n }", "public StringData1() {\n }", "Reproducible newInstance();", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "@Test\n public void constructorTest() {\n // Given (cat data)\n String givenName = \"Zula\";\n Date givenBirthDate = new Date();\n Integer givenId = 0;\n\n // When (a cat is constructed)\n Cat cat = new Cat(givenName, givenBirthDate, givenId);\n\n // When (we retrieve data from the cat)\n String retrievedName = cat.getName();\n Date retrievedBirthDate = cat.getBirthDate();\n Integer retrievedId = cat.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public DatasetReader()\n\t{\n\t\treviews = new ArrayList<Review>();\n\t\tratings = new HashMap<Double,List<Double>>();\n\t\tproducts = new HashMap<String, Map<String,Double>>();\n\t\tproductRatings = new HashMap<String, List<Double>>();\n\t\treInstanceList = new ArrayList<ReviewInstance>();\n\t\treInstanceMap = new HashMap<String, ReviewInstance>();\n\t}", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\tpublic Data(String table) throws EmptyDatasetException, SQLException, EmptySetException, NoValueException{\r\n\t\tTableData tableData = new TableData(new DbAccess());\r\n\t\tdata = tableData.getDistinctTransazioni(table);\r\n\t\t\r\n\t\tTableSchema tableSchema = new TableSchema(new DbAccess(),table);\r\n\t\tnumberOfExamples=data.size();\r\n\t\t\r\n\t\tQUERY_TYPE min,max;\r\n\t\tmin = QUERY_TYPE.MIN;\r\n\t\tmax = QUERY_TYPE.MAX;\r\n\t\t\r\n\t\tfor (int i=0;i<tableSchema.getNumberOfAttributes();i++) {\r\n\t\t\tif(!tableSchema.getColumn(i).isNumber()) {\r\n\t\t\t\texplanatorySet.add((T) new DiscreteAttribute(tableSchema.getColumn(i).getColumnName(),i,(TreeSet)tableData.getDistinctColumnValues(table, tableSchema.getColumn(i))));\r\n\t\t\t}else {\r\n\t\t\t\texplanatorySet.add((T) new ContinuousAttribute(tableSchema.getColumn(i).getColumnName(),i,(float)tableData.getAggregateColumnValue(table,tableSchema.getColumn(i),min),(float)tableData.getAggregateColumnValue(table,tableSchema.getColumn(i),max)));\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t}", "public DataSet(String Filename)\n\t{\n\t\tc = new ArrayList<String>();\n\t\tBuildFromFile(Filename);\n\t}", "public SensorData() {\n\n\t}", "protected SingleStaticDataSet createDataset(final String start,\n\t\t\tfinal String end, final String string, final int intVal,\n\t\t\tfinal long longVal) {\n\t\ttry {\n\t\t\treturn new SingleStaticDataSet(Dates.parseDate(end, \"dd.MM.yyyy\"),\n\t\t\t\t\tDates.parseDate(end, \"dd.MM.yyyy\"), string, intVal, longVal);\n\t\t} catch (ParseException e) {\n\t\t\tfail(e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public Dataset(final int dimensions) {\n this.dimensions = dimensions;\n ntree = new NTree(dimensions);\n }", "public Contructor(int year, String name) {\n // constructor name must match class name and cannot have return type\n // all classes have constructor by default\n // f you do not create a class constructor yourself, Java creates one for you.\n // However, then you are not able to set initial values for object attributes.\n // constructor can also take parameters\n batchYear = year;\n studentName = name;\n }", "private void initDataset(){\n dataSet.add(\"Karin\");\n dataSet.add(\"Ingrid\");\n dataSet.add(\"Helga\");\n dataSet.add(\"Renate\");\n dataSet.add(\"Elke\");\n dataSet.add(\"Ursula\");\n dataSet.add(\"Erika\");\n dataSet.add(\"Christa\");\n dataSet.add(\"Gisela\");\n dataSet.add(\"Monika\");\n\n addDataSet.add(\"Anna\");\n addDataSet.add(\"Sofia\");\n addDataSet.add(\"Emilia\");\n addDataSet.add(\"Emma\");\n addDataSet.add(\"Neele\");\n addDataSet.add(\"Franziska\");\n addDataSet.add(\"Heike\");\n addDataSet.add(\"Katrin\");\n addDataSet.add(\"Katharina\");\n addDataSet.add(\"Liselotte\");\n }", "private PieDataset createDataset() {\n\t\tDefaultPieDataset result = new DefaultPieDataset();\n\n\t\tif (_controler != null) {\n\t\t\tfor (Object cat : _controler.getCategorieData()) {\n\n\t\t\t\tresult.setValue((String) cat, _controler.getTotal((String) cat));\n\n\t\t\t}\n\t\t}\n\t\treturn result;\n\n\t}", "public DataSet() {\n this.bars = new ArrayList<Bar>();\n this.reviews = new ArrayList<Review>();\n }", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "public DesastreData() { //\r\n\t}", "DataGenModel()\n {\n }", "protected abstract T create(ICalDataType dataType, SemiStructuredValueIterator it);", "public DataInt() {\n }", "@Override\n public BaseDataProvider creatDataProvider() {\n return null;\n }", "public LazyDataset(String name, int dtype, int[] shape, ILazyLoader loader) {\n \t\tthis.name = name;\n \t\tthis.shape = shape;\n \t\toShape = shape;\n \t\tthis.loader = loader;\n \t\tthis.dtype = dtype;\n \t\ttry {\n \t\t\tsize = AbstractDataset.calcSize(shape);\n \t\t} catch (IllegalArgumentException e) {\n \t\t\tsize = Integer.MAX_VALUE; // this indicates that the entire dataset cannot be read in! \n \t\t}\n \t}", "private PieDataset createDataset() {\n JOptionPane.showMessageDialog(null, \"teste\"+dados.getEntrada());\r\n \r\n DefaultPieDataset result = new DefaultPieDataset();\r\n result.setValue(\"Entrada\", dados.getEntrada());\r\n result.setValue(\"Saida\", dados.getSaida());\r\n result.setValue(\"Saldo do Periodo\", dados.getSaldo());\r\n return result;\r\n\r\n }", "defaultConstructor(){}", "abstract protected Dataset getNewCandidates();", "public HaplotypeData(String id, int noSites) { super(id, noSites, Comparable.class); }", "DataFactory getDataFactory();", "public MyAdapter(ArrayList<MyData> myDataset) {\n\n mDataset = myDataset;\n }", "@Import(ModelType.FEATURE_SELECTION)\n\tpublic static LinearDiscriminantAnalysis newInstance(Map<String, Object> params) {\n\t\tLinearDiscriminantAnalysis lda = new LinearDiscriminantAnalysis();\n\t\t\n\t\tlda.ldaMatrix = (double[][])params.get(\"lda\");\n\t\tlda.resultDimension = lda.ldaMatrix.length;\n\t\t\n\t\treturn lda;\n\t}", "public TradeData() {\r\n\r\n\t}", "protected abstract void construct();", "public MetaInfoReader(String dataset) {\n this(dataset, \"../output/tracker_data/\");\n }", "DataList createDataList();", "public MyAdapter(ArrayList<String> myDataset) {\n mDataset = myDataset;\n }", "public static CategoryDataset createSampleDataset() {\n \t\n \t// row keys...\n final String series1 = \"Expected\";\n final String series2 = \"Have\";\n final String series3 = \"Goal\";\n\n // column keys...\n final String type1 = \"Type 1\";\n final String type2 = \"Type 2\";\n final String type3 = \"Type 3\";\n final String type4 = \"Type 4\";\n final String type5 = \"Type 5\";\n final String type6 = \"Type 6\";\n final String type7 = \"Type 7\";\n final String type8 = \"Type 8\";\n\n // create the dataset...\n final DefaultCategoryDataset dataset = new DefaultCategoryDataset();\n\n dataset.addValue(1.0, series1, type1);\n dataset.addValue(4.0, series1, type2);\n dataset.addValue(3.0, series1, type3);\n dataset.addValue(5.0, series1, type4);\n dataset.addValue(5.0, series1, type5);\n dataset.addValue(7.0, series1, type6);\n dataset.addValue(7.0, series1, type7);\n dataset.addValue(8.0, series1, type8);\n\n dataset.addValue(5.0, series2, type1);\n dataset.addValue(7.0, series2, type2);\n dataset.addValue(6.0, series2, type3);\n dataset.addValue(8.0, series2, type4);\n dataset.addValue(4.0, series2, type5);\n dataset.addValue(4.0, series2, type6);\n dataset.addValue(2.0, series2, type7);\n dataset.addValue(1.0, series2, type8);\n\n dataset.addValue(4.0, series3, type1);\n dataset.addValue(3.0, series3, type2);\n dataset.addValue(2.0, series3, type3);\n dataset.addValue(3.0, series3, type4);\n dataset.addValue(6.0, series3, type5);\n dataset.addValue(3.0, series3, type6);\n dataset.addValue(4.0, series3, type7);\n dataset.addValue(3.0, series3, type8);\n\n return dataset;\n \n }", "DataPointType createDataPointType();", "public mainData() {\n }", "public DataAdapter() {\n }", "protected SimpleMatrix() {}", "public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }", "public abstract void build(ClassifierData<U> inputData);", "public TriangleData()\r\n {\r\n knownCount = 0;\r\n /*--------------------------------------------------------------------*\r\n Input is validated by set. \r\n Must be >= 0.0\r\n Is there a practical maximum?\r\n \r\n Can you throw an exception in a constructor?\r\n *--------------------------------------------------------------------*/\r\n set( DataID.DATA_A, 0.0 );\r\n set( DataID.DATA_B, 0.0 );\r\n set( DataID.DATA_C, 0.0 );\r\n\r\n }", "@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}", "public StringData() {\n\n }", "public MyAdapter(ArrayList<Pair<String, String>> myDataset) {\n mDataset = myDataset;\n }", "private Dataset createDataset1() {\n final RDF factory1 = createFactory();\n\n final IRI name = factory1.createIRI(\"http://xmlns.com/foaf/0.1/name\");\n final Dataset g1 = factory1.createDataset();\n final BlankNode b1 = createOwnBlankNode(\"b1\", \"0240eaaa-d33e-4fc0-a4f1-169d6ced3680\");\n g1.add(b1, b1, name, factory1.createLiteral(\"Alice\"));\n\n final BlankNode b2 = createOwnBlankNode(\"b2\", \"9de7db45-0ce7-4b0f-a1ce-c9680ffcfd9f\");\n g1.add(b2, b2, name, factory1.createLiteral(\"Bob\"));\n\n final IRI hasChild = factory1.createIRI(\"http://example.com/hasChild\");\n g1.add(null, b1, hasChild, b2);\n\n return g1;\n }", "public FilterData() {\n }", "public DataType<T> newInstance(Locale locale) {\r\n return newInstance(null, locale);\r\n }", "Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}", "Generalization createGeneralization();", "public Data(int n) {\n this(n, 0.5);\n }", "private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }", "public ComputerDataModel() {\n\n }", "public DatasetController(WorkbenchSession workbenchSession)\n\tthrows IllegalArgumentException {\n\t\tthis(workbenchSession, EntityType.UNKNOWN, DataType.UNKNOWN, null);\n\t}", "public DataRecord() {\n super(DataTable.DATA);\n }", "@Test\n public void constructorTest(){\n String retrievedName = doggy.getName();\n Date retrievedBirthDate = doggy.getBirthDate();\n Integer retrievedId = doggy.getId();\n\n // Then (we expect the given data, to match the retrieved data)\n Assert.assertEquals(givenName, retrievedName);\n Assert.assertEquals(givenBirthDate, retrievedBirthDate);\n Assert.assertEquals(givenId, retrievedId);\n }", "public InitialData(){}", "Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }", "DataModel createDataModel();", "static public InstanceGenerator create(String className, String datasetFileName)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(String.class).newInstance(datasetFileName);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "public AnalysisDef() {}", "public CompanyData() {\r\n }", "void DefaultConstructor(){}", "private static <T extends C14931j> T m43361c(Class<T> cls) {\n try {\n return (C14931j) cls.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);\n } catch (Exception e) {\n if (e instanceof InstantiationException) {\n throw new IllegalArgumentException(\"dataType doesn't have default constructor\", e);\n } else if (e instanceof IllegalAccessException) {\n throw new IllegalArgumentException(\"dataType default constructor is not accessible\", e);\n } else if (VERSION.SDK_INT < 19 || !(e instanceof ReflectiveOperationException)) {\n throw new RuntimeException(e);\n } else {\n throw new IllegalArgumentException(\"Linkage exception\", e);\n }\n }\n }", "ExpData createData(Container container, @NotNull DataType type);" ]
[ "0.6981773", "0.6863296", "0.67124796", "0.66222185", "0.65560454", "0.64244574", "0.6375118", "0.6374292", "0.63458383", "0.631461", "0.62963146", "0.624239", "0.6199679", "0.6154991", "0.61230665", "0.61189586", "0.61189586", "0.6094706", "0.6057815", "0.6029099", "0.6019398", "0.5981075", "0.5964154", "0.5954517", "0.5945519", "0.5935778", "0.5931538", "0.5928516", "0.5926815", "0.5906754", "0.5893473", "0.5877671", "0.5871379", "0.58603805", "0.5822822", "0.58206534", "0.5814924", "0.58134717", "0.5811501", "0.5809018", "0.5809018", "0.58063704", "0.5805995", "0.58011264", "0.57986766", "0.5796202", "0.5757808", "0.57539314", "0.57526773", "0.57413805", "0.5730558", "0.57249457", "0.57181656", "0.5710853", "0.5708752", "0.57047653", "0.5701621", "0.569227", "0.56900465", "0.5665407", "0.5632337", "0.5612142", "0.5608449", "0.55961895", "0.55861795", "0.5585127", "0.5584922", "0.55829924", "0.5579818", "0.5572222", "0.55698496", "0.5568243", "0.5562505", "0.55599964", "0.5557869", "0.55550015", "0.5553821", "0.5544464", "0.55387837", "0.5534888", "0.5534271", "0.55313987", "0.55305636", "0.5528545", "0.55182415", "0.5514377", "0.5513932", "0.55137265", "0.5507132", "0.54891366", "0.5486973", "0.5482461", "0.5474194", "0.5470571", "0.54688793", "0.5460453", "0.5459884", "0.5456212", "0.5455817", "0.5452516", "0.5452004" ]
0.0
-1
Create new views (invoked by the layout manager)
@Override public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { // create a new view View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.content_adapter, parent, false); ViewHolder vh = new ViewHolder(v); return vh; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "View createView();", "private void addViews() {\n\t}", "@Override\n public void Create() {\n\n initView();\n }", "ViewContainer createViewContainer();", "private void createView() {\n\t\tTabWidget tWidget = (TabWidget) findViewById(android.R.id.tabs);\r\n\t\tshowLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView = (ImageView) showLayout.getChildAt(0);\r\n\t\tTextView textView = (TextView) showLayout.getChildAt(1);\r\n\t\timageView.setImageResource(R.drawable.main_selector);\r\n\t\ttextView.setText(R.string.show);\r\n\r\n\t\taddLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView1 = (ImageView) addLayout.getChildAt(0);\r\n\t\tTextView textView1 = (TextView) addLayout.getChildAt(1);\r\n\t\timageView1.setImageResource(R.drawable.add_selector);\r\n\t\ttextView1.setText(R.string.add_record);\r\n\r\n\t\tchartLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView2 = (ImageView) chartLayout.getChildAt(0);\r\n\t\tTextView textView2 = (TextView) chartLayout.getChildAt(1);\r\n\t\timageView2.setImageResource(R.drawable.chart_selector);\r\n\t\ttextView2.setText(R.string.chart_show);\r\n\t}", "public abstract void initViews();", "private void initView() {\n\n LayoutInflater inflater = getLayoutInflater();\n final int screenWidth = MyUtils.getScreenMetrics(this).widthPixels;\n final int screenHeight = MyUtils.getScreenMetrics(this).heightPixels;\n for (int i = 0; i < 3; i++) {\n ViewGroup layout = (ViewGroup) inflater.inflate(\n R.layout.content_layout, myHorizontal, false);\n layout.getLayoutParams().width = screenWidth;\n TextView textView = (TextView) layout.findViewById(R.id.title);\n textView.setText(\"page \" + (i + 1));\n layout.setBackgroundColor(Color.rgb(255 / (i + 1), 255 / (i + 1), 0));\n createList(layout);\n myHorizontal.addView(layout);\n }\n }", "private void initViews() {\n\n }", "private void initViews() {\n\n\t}", "protected abstract void initViews();", "private void createView() {\n\t\tif (txtButtonCaption == null) {\n\t\t\tView v = LayoutInflater.from(getContext()).inflate(R.layout.ijoomer_voice_button, null);\n\n\t\t\tlnrPlayVoice = (LinearLayout) v.findViewById(R.id.lnrPlayVoice);\n\t\t\tlnrReportVoice = (LinearLayout) v.findViewById(R.id.lnrReportVoice);\n\n\t\t\ttxtButtonCaption = (IjoomerTextView) v.findViewById(R.id.txtButtonCaption);\n\t\t\timgPlay = (ImageView) v.findViewById(R.id.imgPlay);\n\t\t\tgifVoiceLoader = (IjoomerGifView) v.findViewById(R.id.gifVoiceLoader);\n\n\t\t\timgReport = (ImageView) v.findViewById(R.id.imgReport);\n\t\t\ttxtReportCaption = (IjoomerTextView) v.findViewById(R.id.txtReportCaption);\n\n\t\t\tpbrLoading = (ProgressBar) v.findViewById(R.id.pbrLoading);\n\n\t\t\taddView(v, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT));\n\t\t\tupdateView();\n\t\t\tsetActionListener();\n\t\t}\n\t}", "public void initViews(){\n }", "@Override\n public void Create() {\n initView();\n initData();\n }", "public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}", "private void createTileViews() {\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tTileView tv = new TileView(context, row, column);\n\t\t\t\ttileViews.add(tv);\n\t\t\t\ttableRow.get(row).addView(tv);\n\t\t\t} // end column\n\t\t\tparentLayout.addView(tableRow.get(row));\n\t\t} // end row\n\n\t}", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "private void InitView() {\n\t\tmLinearLayout = new LinearLayout(getContext());\n\t\t//mLinearLayout.setBackgroundResource(MusicApplication.getInstance().getBgResource());\n\t\t\n\t\t//Modify by LiYongNam 2012.9.19_start\n\t\tMusicUtil.setBackgroundOfView ( mLinearLayout, getContext() );\t\t\t\t\n\t\t//Modify by LiYongNam 2012.9.19_end\n\t\t\n\t\tmLinearLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tmLinearLayout.setPadding(1, 1, 1, Util.dipTopx(getContext(), 60));\n\t\t// 导航条\n\t\taddTitleBar(-1, \"编辑列表\", R.drawable.check_off, R.drawable.title_bar);\n\n\t\tmControlBar = new ControlBar(getContext());\n\t\tmControlBar.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tUtil.dipTopx(getContext(), 60)));\n\n//\t\taddControlButton(\"全选\", CONTROL1, 0);\n\t\taddControlButton(\"播放\", CONTROL2, 1);\n\t\taddControlButton(\"加入\", CONTROL3, 2);\n\t\taddControlButton(\"删除\", CONTROL4, 3);\n\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.live_layout, null);\r\n\t}", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "private void registerViews() {\n\t}", "public void onCreateClick(){\r\n\t\tmyView.advanceToCreate();\r\n\t}", "ViewElement createViewElement();", "private void setViews() {\n\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView v=inflater.inflate(R.layout.notepad_main, container, false);\r\n\t\tbody=(LineEditText) v.findViewById(R.id.body);\r\n\t\tdel=(Button) v.findViewById(R.id.delAll);\r\n\t\tdel.setOnClickListener(this);\r\n\t\treturn v;\r\n\t}", "@Override\n public void createInitialLayout(IPageLayout layout) {\n defineActions(layout);\n defineLayout(layout);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "public myView() {\n initComponents();\n CreatMenu();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmRoot = inflater.inflate(R.layout.mouse_layout, container, false); \n\t\tinitializeUI();\n\t\treturn mRoot; \n }", "@Override\n\tpublic View onMainCreateView(Activity activity) {\n\t\tlayout = new FrameLayout(activity);\n\t\treturn layout;\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater,\n\t\t\t@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.one, null);\n\t\treturn view;\n\t}", "@Override\n public View getView() {\n photoLayout = new LinearLayout(context);\n addPhotoButton = new Button(context);\n addPhotoButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dispatchTakePictureIntent();\n }\n });\n addPhotoButton.setText(\"Take a photo\");\n photoLayout.addView(addPhotoButton);\n// photoLayout.\n return photoLayout;\n }", "public abstract ArchECoreView newView(ArchECoreArchitecture architecture) throws ArchEException;", "private void loadViews(){\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tmContext = getActivity();\n\t\tll = new LinearLayout(getActivity());\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT,\n\t\t\t\tLinearLayout.LayoutParams.FILL_PARENT);\n\t\tthis.getActivity().addContentView(ll, params);\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.main_u_test, null);\r\n ViewUtils.inject(this, view);\r\n\r\n btnOne.setOnClickListener(this);\r\n btnTwo.setOnClickListener(this);\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_work, container, false);\n initializeViews(view);\n tvDone.setOnClickListener(this);\n tvBack.setOnClickListener(this);\n return view;\n }", "public void layout() {\n TitleLayout ll1 = new TitleLayout(getContext(), sourceIconView, titleTextView);\n\n // All items in ll1 are vertically centered\n ll1.setGravity(Gravity.CENTER_VERTICAL);\n ll1.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n ll1.addView(sourceIconView);\n ll1.addView(titleTextView);\n\n // Container layout for all the items\n if (mainLayout == null) {\n mainLayout = new LinearLayout(getContext());\n mainLayout.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,\n LayoutParams.WRAP_CONTENT));\n mainLayout.setPadding(adaptSizeToDensity(LEFT_PADDING),\n adaptSizeToDensity(TOP_PADDING),\n adaptSizeToDensity(RIGHT_PADDING),\n adaptSizeToDensity(BOTTOM_PADDING));\n mainLayout.setOrientation(LinearLayout.VERTICAL);\n }\n\n mainLayout.addView(ll1);\n\n if(syncModeSet) {\n mainLayout.addView(syncModeSpinner);\n }\n\n this.addView(mainLayout);\n }", "public abstract void initView();", "private void initView() {\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "protected void onLoadLayout(View view) {\n }", "protected abstract void initView();", "protected abstract void setupMvpView();", "private void init() {\n mainll = new LinearLayout(getContext());\n mainll.setId(View.generateViewId());\n mainll.setLayoutParams(new ActionBar.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT, ActionBar.LayoutParams.WRAP_CONTENT));\n mainll.setOrientation(LinearLayout.VERTICAL);\n\n map = new HashMap<>();\n\n RelativeLayout mainrl = new RelativeLayout(getContext());\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ActionBar.LayoutParams.MATCH_PARENT,\n ActionBar.LayoutParams.WRAP_CONTENT);\n\n params.addRule(RelativeLayout.BELOW, mainll.getId());\n\n save = new Button(getContext());\n\n save.setLayoutParams(params);\n save.setText(\"save\");\n\n mainrl.addView(mainll);\n mainrl.addView(save);\n addView(mainrl);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.add, container, false);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.xxh_gamelayout3, container, false);\n\t}", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\t\n\t\tView arrangeOrderLayout = inflater.inflate(R.layout.arrange_order, container, false);\n\t\tinitButton(arrangeOrderLayout);\n\t\tinitListView(arrangeOrderLayout);\n\t\treturn arrangeOrderLayout;\n\t}", "interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) \n {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.main); \n createLayout();\n }", "@Override\n public View onCreateView(LayoutInflater inflater,\n @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n mRootView = inflater.inflate(getLayoutId(), null);\n x.view().inject(this, mRootView);\n return mRootView;\n }", "private void createWidgets() {\n\n\t\tJPanel filmPanel = createFilmPanel();\n\t\tJPanel musicPanel = createMusicPanel();\n\t\tJPanel unclassPanel = createUnclassifiedPanel();\n\n\t\tthis.add(filmPanel);\n\t\tthis.add(musicPanel);\n\t\tthis.add(unclassPanel);\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tView layout = inflater.inflate(R.layout.fragment_assistant, container, false);\r\n\t\tlayout.findViewById(R.id.kaniu).setOnClickListener(this);\r\n\t\tlayout.findViewById(R.id.img_add).setOnClickListener(this);\r\n\t\tinitListView(layout);\r\n\t\treturn layout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_top_matrix, container, false);\n\n\n //Wire up the UI widgets so they can handle events later\n wireWidgets(v);\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.first_step_layout, container, false);\n initView();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_new_design, container, false);\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.main_fhmx, container, false);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View layout = inflater.inflate(R.layout.fragment_explore, container, false);\n PlantasInit(getContext());\n rv = layout.findViewById(R.id.homerv);\n rv.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayout.VERTICAL,false));\n return layout;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_topo_structure,\n\t\t\t\tcontainer, false);\n\t\tnodeView = (topoStructureView) view.findViewById(R.id.topoStructureView);\n\t\tif (MainActivity.serialPortConnect)\n\t\t\tnew Thread(new MyThread()).start();\n\t\t\n\t\treturn view;\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(getLayoutViewId());\n// presenter = getPresenter(typePresenter);\n init();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_factories, container, false);\n initViews();\n return view;\n }", "private View onRealCreateView(Context context, String name, AttributeSet attrs) {\n View view = null;\n try {\n if (-1 == name.indexOf('.')) {\n if (\"View\".equals(name)) {\n view = LayoutInflater.from(context).createView(name, \"android.view.\", attrs);\n }\n if (view == null) {\n view = LayoutInflater.from(context).createView(name, \"android.widget.\", attrs);\n }\n if (view == null) {\n view = LayoutInflater.from(context).createView(name, \"android.webkit.\", attrs);\n }\n } else {\n view = LayoutInflater.from(context).createView(name, null, attrs);\n }\n\n LogUtils.i(\"about to create \" + name);\n\n } catch (Exception e) {\n LogUtils.e(\"error while create 【\" + name + \"】 : \" + e.getMessage());\n view = null;\n }\n return view;\n }", "void initView();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_info, container, false);\n //Initialise UI elements\n saveButton = view.findViewById(R.id.save_button);\n saveButton.setOnClickListener(this);\n EditText titleEdit = view.findViewById(R.id.maze_title_edit);\n loadingScreen = view.findViewById(R.id.loading_screen);\n titleEdit.addTextChangedListener(createMazeTextWatcher);\n publicToggle = view.findViewById(R.id.public_switch);\n initPublicToggle();\n return view;\n }", "private View creatView(ViewGroup parent) {\n\t\tView convertView;\n\t\tViewHolder vh = new ViewHolder();\n\t\tconvertView = LayoutInflater.from(mContext).inflate(R.layout.message_function_layout, parent, false);\n\t\tvh.mImageView = (ImageView)convertView.findViewById(R.id.message_function_btn);\n\t\tvh.mTextView = (TextView)convertView.findViewById(R.id.message_function_name);\n\t\tconvertView.setTag(vh);\n\t\treturn convertView;\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.day_layout, container,false);\n setPieMap(v);\n loadDatas();\n simulator();\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException 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}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_upload_new, container, false);\n findViewByIds(view);\n return view;\n }", "@SuppressLint(\"ResourceAsColor\")\r\n\tprivate void initView() {\n\t\tfriendOneBtn = (Button)getActivity().findViewById(R.id.friend_one_btn);\r\n\t\tfriendTwoBtn = (Button) getActivity().findViewById(R.id.friend_two_btn);\r\n\t\tcursorImage = (ImageView)getActivity().findViewById(R.id.cursor);\r\n\t\t// 进入添加好友页\r\n\t\tfriendOneBtn.setOnClickListener(listener);\r\n\t\tfriendTwoBtn.setOnClickListener(listener);\r\n\t\t\r\n\t\tunreadLabel = (TextView) getActivity().findViewById(R.id.unread_msg_number);\r\n unreadAddressLable = (TextView) getActivity().findViewById(R.id.unread_address_number);\r\n ImageView addContactView = (ImageView) getView().findViewById(R.id.iv_new_contact);\r\n\t\t// 进入添加好友页\r\n\t\taddContactView.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tstartActivity(new Intent(getActivity(), AddContactActivity.class));\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_add_plant_from_database, container, false);\n mContext = getActivity();\n mongoDbSetup = MongoDbSetup.getInstance(mContext);\n findPlantsList();\n findWidgets(v);\n\n return v;\n\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.stage_layout, null);\r\n\t}", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "protected Scene createView() {\n\t\treturn null;\n\t}", "private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.be_admin_printers, container, false);\n\n /** RETURN THE VIEW INSTANCE TO SETUP THE LAYOUT **/\n return view;\n }", "@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}", "private void createNewVisualPane(int solverId) {\n }", "private void createComponents() {\n view = new JPanel(new GridBagLayout());\n\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.gridx = 0;\n constraints.gridy = 0;\n constraints.weightx = 1;\n constraints.weighty = 1;\n constraints.fill = GridBagConstraints.BOTH;\n\n view.add(new JPanel(), constraints);\n\n constraints.gridy = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 1;\n constraints.weighty = 4;\n constraints.weightx = 6;\n view.add(renderMain(), constraints);\n\n constraints.gridx = 2;\n constraints.weightx = 1;\n constraints.weighty = 1;\n view.add(new JPanel(), constraints);\n\n constraints.gridx = 0;\n constraints.gridy = 2;\n view.add(renderBottom(), constraints);\n\n registerEvents();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_add_new_incident, container, false);\n\n initView(view);\n incidentData();\n\n return view;\n }", "protected void prepareChildViews() {\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_ins_tructor_event_create, container, false);\n }", "public void createInitialLayout(IPageLayout layout) {\n \n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_create_class, container, false);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_main, container, false);\n\n\t\t// instantiate the graphical components\n\t\tedtMessage = (EditText) view.findViewById(R.id.edtMessage);\n\t\tbtnAdd = (Button) view.findViewById(R.id.btnAdd);\n\t\t// Instantiate the listView\n\t\tlsvResult = (ListView) view.findViewById(R.id.lsvResult);\n\t\thumans = new ArrayList<Human>();\n\t\t// Human tempH;\n\t\t// for (int i = 0; i < 800; i++) {\n\t\t// tempH = new Human(\"toto \" + i, \"No message, noFuture\", i);\n\t\t// humans.add(tempH);\n\t\t// }\n\t\t\n\t\treturn view;\n\t}", "private void initBaseLayout()\n {\n add(viewPaneWrapper, BorderLayout.CENTER);\n \n currentLayoutView = VIEW_PANE;\n currentSearchView = SEARCH_PANE_VIEW;\n showMainView(VIEW_PANE);\n showSearchView(currentSearchView);\n }", "private void initializeClasses() {\n navigator.addView(JournalView.NAME, JournalView.class);\n navigator.addView(MedicationView.NAME, MedicationView.class);\n\n }", "protected abstract void initContentView(View view);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n return inflater.inflate(R.layout.frag_new_entries, container, false);\n }", "@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)//allows toolbar to work\n private void viewCreator() {\n toolbar = (Toolbar) findViewById(R.id.toolbar_main);\n lists = (ListView) findViewById(R.id.list);\n\n }", "public void createNewTask(View view) {\n try{\n newTaskLayout.checkTaskLayoutIsValid();\n ImageView taskImage = (ImageView) findViewById(R.id.imageViewBoard);\n String layoutImagePath = takeScreenshot(taskImage);\n newTaskLayout.setImagePath(layoutImagePath);\n\n // save new task\n HashMap<String, Integer> instructions = convertSpinnersToHashMap();\n Task newTask = new Task(newTaskLayout, instructions);\n Task.saveTask(getApplicationContext(), newTask);\n\n // alert user task created and return to task menu.\n Toast.makeText(this, \"new task created\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(getApplicationContext(), TaskOptionsActivity.class));\n } catch (TaskLayoutException | InstructionsRequiredException e) {\n // layout was not valid on insufficient instructions set.\n makeMessageDialogue(e.getMessage());\n }\n }", "private void initView() {\n\t\tsetContentView(R.layout.activity_taskmanager);\n\n\t\tlv_datas = (ListView) findViewById(R.id.lv_taskmanager);\n\t\ttv_showInfo = (TextView) findViewById(R.id.tv_taskmanager_showInfo);\n\n\t\tmpb_mem = (MessProgress) findViewById(R.id.mpb_taskmanager_runningmem);\n\t\tmpb_num = (MessProgress) findViewById(R.id.mpb_taskmanager_runningnum);\n\t\t// progressbar\n\t\tll_process = (LinearLayout) findViewById(R.id.ll_progressbar_root);\n\n\t\tsd_drawer = (SlidingDrawer) findViewById(R.id.slidingDrawer1);\n\t\tiv_arrow1 = (ImageView) findViewById(R.id.iv_drawer_arrow1);\n\t\tiv_arrow2 = (ImageView) findViewById(R.id.iv_drawer_arrow2);\n\n\t\tsci_showsystem = (SettingCenterItem) findViewById(R.id.sci_taskmanager_showsystem);\n\t\tsci_screenoffclear = (SettingCenterItem) findViewById(R.id.sci_taskmanager_screenoffclear);\n\n\t\tmAdapter = new MyAdapter();\n\t\tlv_datas.setAdapter(mAdapter);\n\n\t\tmAM = (ActivityManager) getSystemService(ACTIVITY_SERVICE);\n\t}", "ViewComponent createViewComponent();" ]
[ "0.73328626", "0.72904646", "0.72535104", "0.6896283", "0.6842287", "0.6789703", "0.67565185", "0.669897", "0.66757303", "0.66693926", "0.65974694", "0.6590284", "0.657908", "0.6563214", "0.65365493", "0.64850044", "0.64722437", "0.64562106", "0.6448075", "0.6448075", "0.6396124", "0.6390823", "0.6373174", "0.6370242", "0.63591546", "0.63543946", "0.6342781", "0.6308275", "0.63056237", "0.63021344", "0.630085", "0.62754714", "0.626569", "0.62488306", "0.62426597", "0.6240596", "0.62397856", "0.6230667", "0.6221561", "0.62160146", "0.6212883", "0.62113285", "0.6197371", "0.6192618", "0.61828816", "0.616616", "0.61659515", "0.6165634", "0.6163483", "0.61621535", "0.615907", "0.6157282", "0.6153591", "0.614981", "0.61435896", "0.61423576", "0.6134131", "0.613354", "0.61291647", "0.61288077", "0.6128404", "0.61262286", "0.6126201", "0.6122649", "0.612102", "0.61142033", "0.6113672", "0.6112218", "0.61013424", "0.609941", "0.60951227", "0.6092979", "0.60915303", "0.6089254", "0.6082341", "0.60777736", "0.60747266", "0.60686517", "0.60662246", "0.6066123", "0.60607505", "0.60582787", "0.6051914", "0.60509336", "0.605004", "0.6047976", "0.60461754", "0.60452324", "0.60339594", "0.6032018", "0.60302913", "0.6020628", "0.6020299", "0.6019824", "0.6013275", "0.60106796", "0.6008123", "0.59936786", "0.59821665", "0.59806734", "0.5980531" ]
0.0
-1
Replace the contents of a view (invoked by the layout manager)
@Override public void onBindViewHolder(ViewHolder holder, int position) { // - get element from your dataset at this position // - replace the contents of the view with that element Picasso.get().load(mDataset[position].getImgUrl()).into(holder.imageView); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setView(View view);", "void updateView();", "void updateView();", "void setView(View v);", "@Override\n\tpublic void setView(View view) {\n\n\t}", "public void refreshView(){\n\t\tView v = getView();\n\t\tif(v != null){\n\t\t\tv.invalidate();\n\t\t}\n\t}", "public void replaceView(){\n ((GameView) observers.get(0)).dispose();\n observers.remove(0);\n this.addObserver(new GameView(this));\n }", "public void updateView(ClientView view);", "public void updateViews() {\n updateViews(null);\n }", "public abstract void refreshView();", "public void switchView(View view) {\r\n\t\tthis.currentView = view;\r\n\t\trenderView();\r\n\t}", "@Override\n\tpublic void setCustomView(View view, LayoutParams layoutParams) {\n\t\t\n\t}", "public void reloadView() {\n container.revalidate();\n container.repaint();\n }", "@Override\r\n\tpublic void addView(View v) {\r\n\t\tview = v;\r\n\t}", "@Override\n\tpublic void refreshView() {\n\n\t}", "void insertView(ViewFrame view);", "@Override\n\tprotected void refreshView() {\n\t\t\n\t}", "@Override\n\tpublic void setCustomView(View view) {\n\t\t\n\t}", "private void setContentView(View view) {\n mContentView = view;\n }", "public void setView(FruitView newView){\n\t\tthis.view = newView;\n\t}", "public @Override void replace(int index, int length, View[] views) {\n if (length < 0) {\n throw new IllegalArgumentException(\"length=\" + length + \" < 0\"); // NOI18N\n }\n \n if (length == 0 && (views == null || views.length == 0)) { // nothing to do\n return;\n }\n\n // make sure that the children are populated\n GapBoxViewChildren ch = getChildren();\n\n // Handle raplace in children only if either length > 0\n // or insertLength > 0 or both are > 0\n ch.replace(index, length, views);\n }", "@Override\n\tprotected void RefreshView() {\n\t\t\n\t}", "public void showContent(View view) {\r\n\t\tcontentView.removeAllViews();\r\n\t\tcontentView.addView(view);\r\n\t\tthis.scrollRight();\r\n\t}", "public void configure(T aView) { aView.setText(\"Label\"); }", "protected final void setView(View v) {\n rootView.setView(v);\n painted = false;\n editor.revalidate();\n editor.repaint();\n }", "public void applyLayout(final View _drawerLayout, Activity _act,boolean replaceContentView) {\n\n if(replaceContentView)\n {\n final FrameLayout content = (FrameLayout) _drawerLayout.findViewById(R.id.content);\n View rootView = _act.findViewById(android.R.id.content).getRootView();\n\n ViewGroup viewGroup = (ViewGroup) ((ViewGroup) _act\n .findViewById(android.R.id.content)).getChildAt(0);\n ((ViewGroup) viewGroup.getParent()).removeViewInLayout(viewGroup);\n\n // View viewGrou = _act.getLayoutInflater().inflate(resId,null);\n content.addView(viewGroup);\n\n }\n\n _act.setContentView(_drawerLayout); // Set layout to Activity\n }", "private void setViews() {\n\n }", "void resetView();", "public void setView(View view) {\n\t\tthis.view = view;\n\t}", "void assignToView(View view) {\n int pass = mPass - 1;\n // prepare the view for display while rendering\n prepare(view, mParam, pass);\n // update the view with whatever work we have already done\n if (pass >= 0)\n update(view, mRender, pass);\n // check if we have work left to do\n if (mPass < mPasses) {\n // add the view to our set\n mViews.add(view);\n // tag the view so that we can cancel the task later if we need\n // to\n setTask(view, this);\n // all set, queue us up\n enqueue();\n }\n }", "@Override\n\tpublic boolean updateView(View contentView) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void updateView( View view ) {\n\t\t\n\t\tif ( mStyleBackground != null ) {\n\t\t\tview.setBackgroundColor( mStyleBackground.mBackground );\n\t\t}\n\t\t\n\t\tObject object = view.getTag();\n\t\tif ( object instanceof ViewHolder ) {\n\t\t\tViewHolder holder = (ViewHolder)object;\n\t\t\tlayoutImageView( view, R.id.imageViewCancelButton, mStyleCancelButton, android.R.drawable.ic_menu_close_clear_cancel );\n\t\t\tlayoutImageView( holder.mLeftIcon, mStyleImageLeft, mDataImageLeft );\n\t\t\tlayoutImageView( holder.mRightIcon, mStyleImageRight, mDataImageRight );\n\t\t\tlayoutTextView( holder.mMajorTextLeft, mStyleTextMajor, mDataTextMajor );\n\t\t\tlayoutTextView( holder.mMinorTextLeft, mStyleTextMinor, mDataTextMinor );\n\t\t\tlayoutTextView( holder.mMajorTextRight, mStyleTextMajorRight, mDataTextMajorRight );\n\t\t\tlayoutTextView( holder.mMinorTextRight, mStyleTextMinorRight, mDataTextMinorRight );\t\n\t\t\tif ( holder.mViewType != getViewType() ) {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t\tmButtonPanelBar = new ThreeButtonPanelBar(view);\n\t\t\tif ( mButtonPanelBar != null ) {\n\t\t\t\tmButtonPanelBar.SetBackgroundColor( 0x00000000 ); // TODO read from style\n\t\t\t\tmButtonPanelBar.RemoveAllButtons();\n\t\t\t\tfor ( int i=0; i<mButtons.size(); i++ ) {\n\t\t\t\t\tmButtonPanelBar.AddButton( mButtons.get(i) );\n\t\t\t\t}\t\t\t\t\n\t\t\t\tmButtonPanelBar.updateUI();\n\t\t\t} else {\n\t\t\t\tLogger.e( TAG, \"updateView() - NPE button panel bar\" );\n\t\t\t}\n\t\t} else {\n\t\t\tLogger.e( TAG, \"updateView() - object mismatch\" ); \n\t\t}\n\t\t\t\n\t\tview.forceLayout();\n\t\tview.invalidate();\n\t}", "public void setView(final String view) \n {\n\tthis.view = view;\n }", "void changeGadgetView(int gadgetId, ContainerView view);", "public void updateArticleView(ServerObj serverObj){\n View v = getView();\n// String[] data = Ipsum.Articles;\n// article.setText(data[position]);\n// currentPosition = position;\n currentServerObj=serverObj;\n LinearLayout containerOfContents= (LinearLayout) v.findViewById(R.id.container_of_contents);\n containerOfContents.removeAllViews();\n ContentsViewBuilder contentsViewBuilder=new ContentsViewBuilder(activity);\n Log.d(\"myPavilion\",\"serverObj\"+serverObj.getJson());\n View contentsView=contentsViewBuilder.getView(serverObj.getContentsObj());\n containerOfContents.addView(contentsView);\n\n }", "@Override\n public void onViewSelected (int wordPosition) {\n // replace the fragment\n replaceFragment(wordPosition);\n }", "public void setEmptyView(View emptyView);", "@Test\n public void testChangeView() {\n Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();\n appContext.setTheme(R.style.Theme_Entree);\n MenuBarsView v = new MenuBarsView(appContext, null, null);\n\n View dummy = new View(appContext, null);\n dummy.setId(View.generateViewId());\n v.changeView(dummy);\n\n assertTrue(dummy.getParent() == v);\n }", "protected void setView(@NonNull T view) {\n mView = view;\n }", "public void setView(Component view){\n int n=getComponentCount();\n for(int i=n-1;i>=0;i--){\n remove(getComponent(i));\n }\n isViewSizeSet=false;\n if(view!=null){\n super.addImpl(view,null,-1);\n viewListener=createViewListener();\n view.addComponentListener(viewListener);\n }\n if(hasHadValidView){\n // Only fire a change if a view has been installed.\n fireStateChanged();\n }else if(view!=null){\n hasHadValidView=true;\n }\n viewChanged=true;\n revalidate();\n repaint();\n }", "protected final void addView(final PlainView theView)\r\n {\r\n //\r\n _theViews.addElement(theView);\r\n }", "private void addViews() {\n\t}", "private void changeView(){\r\n\t\t\tm.changeView(Views.GAME, gameType, game);\r\n\t}", "@Override\n public void setView(@NonNull final View view) {\n mNextView = view;\n }", "public void setPatchedView(final PatchBase patch, int w, int h) {\n\t\tfinal LayoutParams params = new LayoutParams(w, h);\n\n\t\tremoveAllViews();\n\t\taddView(patch.getView(), 0, params);\n\n\t\tpatch.setViewListener(new PatchViewListener() {\n\t\t\t@Override\n\t\t\tpublic void onChange(View v) {\n\t\t\t\tremoveAllViews();\n\t\t\t\taddView(v, 0, params);\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void view() {\n\t\t\n\t}", "protected void setCurrentView( final View view )\n {\n updater.setCurrentView( view );\n }", "public void setView(JPanel panel,IRefresh cont)\n\t{\n\t\tcont.refreshView();\n\t\tthis.setView(panel);\n\t}", "public void setView(View v)\n {\n\tthis.view = v;\n\tif (this.view != null)\n\t{\n\t addActionListeners();\n\t}\n }", "public void configure(T aView) { aView.setText(\"Button\"); }", "void setView(PopupView<T> view);", "public void setViewResource(int layout) {\n/* 114 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void updateView(Intent intent)\n {\n \n }", "protected void onLoadLayout(View view) {\n }", "protected abstract void onInflated(View view);", "protected void refreshView() {\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tApplication application = context.getApplication();\r\n\t\tViewHandler viewHandler = application.getViewHandler();\r\n\t\tUIViewRoot viewRoot = viewHandler.createView(context, context.getViewRoot().getViewId());\r\n\t\tcontext.setViewRoot(viewRoot);\r\n\t\tcontext.renderResponse();\r\n\t}", "@Override\r\n\tpublic void updateView(int parseInt, int parseInt2, String string) {\n\r\n\t}", "@Override\n public void send(VirtualView view) {\n view.update(this);\n }", "void doRefreshContent();", "@Override\n protected void onLayout(boolean changed, int l, int t, int r, int b) {\n }", "public void setView(final BwView val) {\n view = val;\n }", "private void viewChange() {\n currentView = (TextView) findViewById(R.id.currView);\n currentView.setText(counters.get(counterPosition).toString());\n }", "@Override\r\n\tpublic void setView(ViewProduct v) {\n\t\tthis.view = v;\r\n\t}", "public void updateConicalView();", "void setPlayerView(View v);", "public void setView(View view) {\n mView = view;\n mViewSpacingSpecified = false;\n }", "private void refreshView() {\n if (!wasInvalidatedBefore) {\n wasInvalidatedBefore = true;\n invalidate();\n }\n }", "public void showInstruction(View view) {\n }", "public void setView(CMView _view) {\n mView = _view;\n }", "public interface DelegateReplace {\n public LayoutImpl replaceWith (LayoutImpl impl);\n}", "@Override\n\t\tpublic void layout(int l, int t, int r, int b) {\n\t\t\tsuper.layout(l, t, r, b);\n\t\t\tLog.e(\"FYF\", getId() + \" ImageView layout\");\n\t\t}", "public interface updateParentView {\n void updateParentView();\n }", "public void setCurrentView(@NonNull SliceChildView currentView) {\n removeView(mCurrentView);\n mCurrentView = currentView;\n mCurrentView.setPolicy(mViewPolicy);\n addView(mCurrentView, getChildLp(mCurrentView));\n applyConfigurations();\n }", "public abstract void prepare(View view);", "public Builder setContentView(View v) {\r\n this.contentView = v;\r\n return this;\r\n }", "public void updateContent(View theView) {\n if (getArguments() != null) {\n Credentials credentials = (Credentials) getArguments().get(\"key\");\n EditText etEmail = theView.findViewById(R.id.edit_text_email);\n etEmail.setText(credentials.getEmail());\n\n EditText etPass = theView.findViewById(R.id.edit_text_password);\n etPass.setText(credentials.getPassword());\n }\n }", "@Override\n public void send(Gui view) {\n view.update(this);\n }", "@Override\n public void receiveView(View new_view) {\n remoteExecutor.execute(() -> super.receiveView(new_view));\n }", "@Override\r\n\tpublic void setContentView(View view) {\r\n\t\tsuper.setContentView(view);\r\n\t\tapplyCustomTitle();\r\n\t}", "private void switchToContentView() {\n no_content.setVisibility(View.GONE);\n mRecyclerView.setVisibility(View.VISIBLE);\n }", "void updateView () {\n updateScore();\n board.clearTemp();\n drawGhostToBoard();\n drawCurrentToTemp();\n view.setBlocks(board.getCombined());\n view.repaint();\n }", "private void updateViews() {\n titleTextView.setText(currentVolume.getTitle());\n descTextView.setText(Html.fromHtml(currentVolume.getDesc(), Html.FROM_HTML_MODE_COMPACT));\n authorsTextView.setText(currentVolume.getAuthors());\n\n retrieveImage();\n }", "void updateItem(E itemElementView);", "void setScoreView(View v);", "protected <V extends View> V view( final int childViewIndex )\n {\n return updater.view( childViewIndex );\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.root_fragment, container, false);\n//replace root_frame with newGameView\n FragmentTransaction transaction = getFragmentManager()\n .beginTransaction();\n transaction.replace(R.id.root_frame, new NewGameView());\n transaction.commit();\n\n return view;\n }", "public interface ViewLayout {\r\n\r\n\t/** \r\n\t * Creates a reference to the view which layout should be calculated.\r\n\t * \r\n\t * @param view\r\n\t * \t\tthe view which layout should be calculated.\r\n\t */\r\n\tpublic void setView(View view);\r\n\t\r\n\t/**\r\n\t * Layouts the view components on the parent panel by assigning\r\n\t * them positions.\r\n\t * \r\n\t * @param parent\r\n\t * \t\tthe displaying parent container of the view\r\n\t */\r\n\tpublic void layoutContainer(Container parent);\r\n\r\n}", "protected abstract void initContentView(View view);", "public void setView(JPanel panel) {\n\t\t\n\t\tif (mainView.loadingPanel.isVisible())\n\t\t\tmainView.loadingPanel.setVisible(false);\n\t\t\n\t\tmainView MV= mainViewCont.MainView;\n\t\t\n\t\tMV.frame.remove(MV.slideContainer);\n\t\n\t\tMV.slideContainer = new SlideContainer();\n\t\tMV.slideContainer.setBounds(0, 0, 677, 562);\n\t\t\n\t\tMV.frame.add(MV.slideContainer);\n\t\t\n\t\tMV.slideContainer.add(panel);\n\t\t\n\t}", "private void swapViewFX(String viewName, GenericViewFX controller) throws IOException {\r\n FXMLLoader loader = new FXMLLoader();\r\n loader.setLocation(CtrlPresentation.class.getResource(\"/presentation/view/\" + viewName + \".fxml\"));\r\n loader.setController(controller);\r\n controller.setStage(primaryStage);\r\n BorderPane layoutFX = loader.load();\r\n baseLayout.setCenter(layoutFX);\r\n controller.display();\r\n }", "private void updateView(View view, int viewIndex, int indexAdjustment){\r\n \ttry{\r\n\t\t\tRelativeLayout headerRelativeLayout = (RelativeLayout) view.findViewById(R.id.header_relative_layout);\r\n\t\t\tButton previousButton = (Button) view.findViewById(R.id.previous_button);\r\n\t\t\tTextView notificationCountTextView = (TextView) view.findViewById(R.id.notification_count_text_view);\r\n\t\t\tButton nextButton = (Button) view.findViewById(R.id.next_button);\r\n\t\t\t//if(_debug) Log.v(_context, \"NotificationViewFlipper.updateView() viewIndex: \" + viewIndex + \" indexAdjustment: \" + indexAdjustment);\r\n\t \tint totalviews = this.getChildCount();\r\n\t \tint currentView = viewIndex + 1;\r\n\t \tboolean isFirstView = isFirstView(viewIndex + indexAdjustment);\r\n\t \tboolean isLastView = isLastView(viewIndex + indexAdjustment);\r\n\t \t//Special cases when a View is removed.\r\n\t \tif(indexAdjustment > 0){ // Removing the last View.\r\n\t \t\ttotalviews--;\r\n\t \t\tisLastView = true;\r\n\t \t\tif(!isFirstView) isFirstView = isFirstView(viewIndex);\r\n\t \t}else if(indexAdjustment < 0){ // Removing the first or other View.\r\n\t \t\ttotalviews--;\r\n\t \t\tcurrentView += indexAdjustment;\r\n\t \t\tif(!isLastView) isLastView = isLastView(viewIndex);\r\n\t \t}\r\n\t \t//Update the navigation buttons and notification count text.\r\n\t \tif(isFirstView){\r\n\t \t\tpreviousButton.setVisibility(View.INVISIBLE);\r\n\t \t}else{\r\n\t \t\tpreviousButton.setVisibility(View.VISIBLE);\r\n\t \t}\r\n\t \tnotificationCountTextView.setText(String.valueOf(currentView) + \"/\" + String.valueOf(totalviews));\r\n\t \tif(isLastView){\r\n\t \t\tnextButton.setVisibility(View.INVISIBLE);\r\n\t \t}else{\r\n\t \t\tnextButton.setVisibility(View.VISIBLE);\r\n\t \t}\r\n\t \t//Hide notification header row if single notification.\r\n\t \tif(_preferences.getBoolean(Constants.HIDE_SINGLE_MESSAGE_HEADER_KEY, false)){\r\n\t\t \tif(totalviews == 1){\r\n\t\t \t\theaderRelativeLayout.setVisibility(View.GONE);\r\n\t\t \t}else{\r\n\t\t \t\theaderRelativeLayout.setVisibility(View.VISIBLE);\r\n\t\t \t}\r\n\t \t}\r\n \t}catch(Exception ex){\r\n \t\tLog.e(_context, \"NotificationViewFlipper.updateView() ERROR: \" + ex.toString());\r\n \t}\r\n\t}", "private void setupView(JLabel view, int w, int h, int x, int y) {\n\n view.setSize(w,h);\n view.setLocation(x,y);\n\n add(view);\n\n }", "void mo12147a(View view);", "public void reconstructViews() {\n for (int i = 0; i < getChildCount(); i++) {\n VerificationCustomItem item = (VerificationCustomItem) getChildAt(i);\n item.reconstructView();\n }\n }", "static public View inflateLayout(int Presid,View PlayoutView) //~1410I~\r\n { //~1410I~\r\n if (Dump.Y) Dump.println(\"AView:inflateLayout2 res=\"+Integer.toHexString(Presid)+\",view=\"+PlayoutView.toString());//~@@@@R~\r\n \tAG.setCurrentView(Presid,PlayoutView); //~1410I~\r\n return PlayoutView; //~1410I~\r\n }", "public void setView(IHUDView view) {\n\n this.view = view;\n stateChange(uiStateManager.getState());\n playerAttributeChange();\n }", "private void setText(View view, String text) {\n\t\t((TextView) view.findViewById(android.R.id.text1)).setText(text);\n\t}", "@Override\n\tprotected void repaintView(ViewGraphics g) {\n\t}", "private void syncCardsWithViews()\n\t{\n\t\t\n\t\t// Remove all cards from all views\n\t\tremoveCardsFromViews();\n\t\t\n\t\t// Add all cards to all views\n\t\taddCardsToViews();\n\t\t\n\t\t// Repaint everything\n\t\trepaintViews();\n\t\t\n\t}", "@Override\r\n\t\tpublic void layout(int l, int t, int r, int b) {\n\t\t\tLog.v(\"MyView01>layout\",\"f-1\");\r\n\t\t\tsuper.layout(l, t, r, b);\r\n\t\t\tLog.v(\"MyView01>layout\",\"f-2\");\r\n\t\t}", "public Builder setContentView(View v) {\n this.contentView = v;\n return this;\n }" ]
[ "0.70212805", "0.69806224", "0.69806224", "0.69289434", "0.68319106", "0.67423284", "0.6719235", "0.66682535", "0.6551954", "0.65405315", "0.64150465", "0.6410784", "0.6404721", "0.6383419", "0.6347588", "0.62931347", "0.62602854", "0.6247691", "0.6201184", "0.6193189", "0.6168005", "0.61335725", "0.60727906", "0.6069784", "0.6045309", "0.6032655", "0.6012653", "0.6000149", "0.5997012", "0.59918636", "0.5984929", "0.59628755", "0.59541595", "0.5952714", "0.594424", "0.59363836", "0.593423", "0.59263325", "0.5904159", "0.58898973", "0.5888842", "0.58741045", "0.58675635", "0.58420146", "0.5840409", "0.5837671", "0.58279896", "0.58159184", "0.5781201", "0.57691556", "0.57547665", "0.5728029", "0.57225806", "0.5721411", "0.5711445", "0.570855", "0.5704864", "0.5701569", "0.5687936", "0.56814045", "0.5678997", "0.5663085", "0.56627446", "0.5661271", "0.564907", "0.56473327", "0.5625513", "0.5624278", "0.56206393", "0.56058145", "0.5599781", "0.5596002", "0.5589035", "0.55673146", "0.55670774", "0.5552151", "0.5551916", "0.5551144", "0.5548319", "0.55462", "0.55455995", "0.5544914", "0.55444247", "0.55328166", "0.55232346", "0.55212575", "0.55186397", "0.5516319", "0.5512571", "0.55109304", "0.55012554", "0.54970354", "0.5489542", "0.54885495", "0.5486917", "0.5483459", "0.5479976", "0.54781044", "0.5476813", "0.54678416", "0.5465982" ]
0.0
-1
Return the size of your dataset (invoked by the layout manager)
@Override public int getItemCount() { return mDataset.length; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int dimensions() {\n return this.data[0].length;\n }", "Dimension getSize();", "Dimension getSize();", "public int getDataSize() {\n\t\treturn (int)this.getSize(data);\n\t}", "public int getSize() {\n\t\treturn width + length;\n\t}", "public int get_size() {\r\n return this.dimension * 2 * sizeof_float + 4 * sizeof_float + sizeof_dimension + sizeof_int;\r\n }", "public int getSize() {\n return rows * cols;\n }", "public int getMaxSize(){\n\t\treturn ds.length;\n\t}", "public int dataSize() {\n\t\treturn _dataSet.dataSize();\n\t}", "public int getSetSize(){ return Integer.parseInt(setSize.getText()); }", "public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}", "@Override\n\tpublic int getSize() {\n\t\treturn datas.size();\n\t}", "public static int numDimensions_data() {\n return 1;\n }", "public int size() {\n\treturn slices*rows*columns;\n}", "public double getSize()\n\t{\n\t\treturn size;\n\t}", "public int size() {\n return dataSize;\n }", "public int getSize() {\n\t\treturn point3D.size();\r\n\t}", "public int getSize()\n\t{\n\t\treturn setSize;\n\t}", "public long getDataSize() {\n return dataSize;\n }", "public static int totalSize_data() {\n return (480 / 8);\n }", "public static int elementSize_data() {\n return (8 / 8);\n }", "int getDimensionsCount();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getSize();", "public int getLayoutMeasure(){\n\t\treturn this.getWaypointsMeasures(edges) + this.getShapesMeasures(shapes); \n\t}", "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int get_data_header_size() {\r\n return sizeof_dimension;\r\n }", "public Dimension3d getSize() {\n return size;\n }", "public double getSize() \n {\n return size;\n }", "public int getSize() {\n return this.size;\n }", "public int getSize()\n {\n return this.size;\n }", "double getSize();", "public int dataSize() {\n\t\treturn data.size();\n\t}", "public int getSize() {\r\n return this.size;\r\n }", "public double getSize() {\n return size_;\n }", "public int getSize() {\r\n return size;\r\n }", "public int getSize() {\n return size;\n }", "public abstract int layoutWidth();", "public static int size_infos_size_data() {\n return (8 / 8);\n }", "public static int size_dataType() {\n return (8 / 8);\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize() {\n\t\treturn grid.length;\n\t}", "public double getSize() {\n return size_;\n }", "public int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize() {\n\n return size;\n }", "private int getSize() {\r\n\t\treturn this.size;\r\n\t}", "public int getSize() {\n return size;\n }", "public int getSize() {\r\n\t\treturn size;\r\n\t}", "private int getSize() {\n\t\t\treturn size;\n\t\t}", "public int getSize()\n\t{\n\t\treturn this.size;\n\t}", "public int getSize()\r\n {\r\n return size;\r\n }", "public int getSize(){\n\t\treturn this.size;\n\t}", "@Override\r\n\tpublic int getSize() {\n\t\treturn gridSize;\r\n\t}", "public double getSize() {\n return getElement().getSize();\n }", "public int getSize()\r\n {\r\n return size;\r\n }", "public float getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "public int getSize() {\n\t\treturn this.size;\n\t}", "int numberOfDimensions();", "public int getSize() { \n return size;\n }", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public int getSize() {\n\t\treturn size;\n\t}", "public Dimension getSize()\n {\n return new Dimension(300, 150);\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize()\n {\n return size;\n }", "public int getSize() {\n return size;\n }", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "public int getSize()\n\t{\n\t\treturn size;\n\t}", "public int getSize() {\r\n \treturn size;\r\n }", "public final int getSize() {\n return size;\n }" ]
[ "0.719257", "0.7191435", "0.7191435", "0.71319205", "0.70511466", "0.703889", "0.70376277", "0.70316404", "0.69887304", "0.6944777", "0.6941705", "0.6907277", "0.6902444", "0.6875115", "0.6853177", "0.6835908", "0.6815191", "0.6796607", "0.67855346", "0.67652303", "0.67640096", "0.6752597", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6736978", "0.6729281", "0.67163813", "0.6705456", "0.66758347", "0.66710544", "0.666482", "0.6663775", "0.66540253", "0.6649658", "0.6646885", "0.6642602", "0.66401887", "0.6638177", "0.6636482", "0.6632758", "0.66296726", "0.6628891", "0.6628891", "0.6628891", "0.6628891", "0.6628891", "0.6628891", "0.6628891", "0.6628891", "0.6626507", "0.66175497", "0.66120774", "0.66120774", "0.6611607", "0.6610007", "0.6607739", "0.6603356", "0.6602904", "0.6600355", "0.6600253", "0.6596626", "0.65859145", "0.6584446", "0.658381", "0.65758914", "0.65735686", "0.65735686", "0.65735686", "0.65735686", "0.65735686", "0.6566874", "0.6565898", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.65619844", "0.6558963", "0.65585244", "0.65585244", "0.65585244", "0.6556619", "0.6552398", "0.6552398", "0.6552008", "0.6546904" ]
0.0
-1
TODO Find correct name
@ReflectiveMethod(name = "I", types = {}) public boolean I(){ return (boolean) NMSWrapper.getInstance().exec(nmsObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "protected abstract String name ();", "abstract public String named();", "@Override\n\tString name();", "@Override\n protected String getName() {return _parms.name;}", "@Override\n String getName();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "abstract String name();", "@Override\n public void perish() {\n \n }", "public String getName() {\n/* 209 */ return this.name;\n/* */ }", "@Override\r\n String getName();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract String getName();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public abstract String getName();", "public String getName () { return this.name; }", "@Override\n\tpublic void anular() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public String getName() {\n/* 57 */ return this.name;\n/* */ }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override \n public String getName() {\n return NAME;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName(){\n return Name; \n }", "public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }", "@Override\n public String getName();", "@Override\n public String getName() {\n return name();\n }", "@Override\n public void func_104112_b() {\n \n }", "protected abstract String getName();", "abstract public String getName();", "abstract public String getName();", "abstract public String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "String getName() ;", "public String getName(){return this.name;}", "public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }", "public void mo38117a() {\n }", "@Override\n public String getName() {\n return name();\n }", "private Rekenhulp()\n\t{\n\t}", "public void method_4270() {}", "public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }", "@Override\n public abstract String getName();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo41079d();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public String getName() { return _name; }", "@Override\n\tprotected void interr() {\n\t}", "@Override \r\n\tpublic String getName() {\r\n\t\treturn \"Bazooka\";\r\n\t}", "public abstract String mo13682d();", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Override\n public String getName() {\n return super.getName();\n }", "public abstract String mo118046b();", "@Override\n public void init() {\n\n }", "public String getName(){ return name; }", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public String getName ();", "@Override\n public int describeContents() { return 0; }", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n }" ]
[ "0.5991456", "0.5880368", "0.58532566", "0.58496195", "0.5740335", "0.57321703", "0.56900704", "0.5684384", "0.5682005", "0.5682005", "0.567981", "0.5672165", "0.56573975", "0.565536", "0.5643238", "0.56334233", "0.5630895", "0.56235874", "0.5622865", "0.5618608", "0.5590941", "0.557671", "0.556469", "0.5564603", "0.5561052", "0.5559213", "0.555129", "0.5550069", "0.5535704", "0.5505642", "0.54890716", "0.54881877", "0.5482319", "0.5482319", "0.5481668", "0.54794544", "0.54794544", "0.54794544", "0.54794544", "0.54785925", "0.5472275", "0.5470767", "0.5468134", "0.5456829", "0.54545504", "0.5454535", "0.5449014", "0.54458016", "0.5443097", "0.5441793", "0.5420144", "0.54089373", "0.5403492", "0.54011625", "0.53972423", "0.5396198", "0.5394877", "0.53944135", "0.5392614", "0.53787196", "0.53779197", "0.53761697", "0.5375016", "0.53710294", "0.5369644", "0.5369644", "0.5369644", "0.5369644", "0.536626", "0.5365298", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.5361618", "0.5361499", "0.53613406", "0.5357053", "0.5356864", "0.5355111", "0.5354933" ]
0.0
-1
TODO Find correct name
@ReflectiveMethod(name = "a", types = {NMSWorld.class, int.class}) public NMSTileEntity a(NMSWorld world, int i){ return new NMSTileEntity(NMSWrapper.getInstance().exec(nmsObject, world, i)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "protected abstract String name ();", "abstract public String named();", "@Override\n\tString name();", "@Override\n protected String getName() {return _parms.name;}", "@Override\n String getName();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "abstract String name();", "@Override\n public void perish() {\n \n }", "public String getName() {\n/* 209 */ return this.name;\n/* */ }", "@Override\r\n String getName();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract String getName();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public abstract String getName();", "public String getName () { return this.name; }", "@Override\n\tpublic void anular() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public String getName() {\n/* 57 */ return this.name;\n/* */ }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override \n public String getName() {\n return NAME;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName(){\n return Name; \n }", "public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }", "@Override\n public String getName();", "@Override\n public String getName() {\n return name();\n }", "@Override\n public void func_104112_b() {\n \n }", "protected abstract String getName();", "abstract public String getName();", "abstract public String getName();", "abstract public String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "String getName() ;", "public String getName(){return this.name;}", "public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }", "public void mo38117a() {\n }", "@Override\n public String getName() {\n return name();\n }", "private Rekenhulp()\n\t{\n\t}", "public void method_4270() {}", "public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }", "@Override\n public abstract String getName();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo41079d();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public String getName() { return _name; }", "@Override\n\tprotected void interr() {\n\t}", "@Override \r\n\tpublic String getName() {\r\n\t\treturn \"Bazooka\";\r\n\t}", "public abstract String mo13682d();", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Override\n public String getName() {\n return super.getName();\n }", "public abstract String mo118046b();", "@Override\n public void init() {\n\n }", "public String getName(){ return name; }", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public String getName ();", "@Override\n public int describeContents() { return 0; }", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n }" ]
[ "0.5991456", "0.5880368", "0.58532566", "0.58496195", "0.5740335", "0.57321703", "0.56900704", "0.5684384", "0.5682005", "0.5682005", "0.567981", "0.5672165", "0.56573975", "0.565536", "0.5643238", "0.56334233", "0.5630895", "0.56235874", "0.5622865", "0.5618608", "0.5590941", "0.557671", "0.556469", "0.5564603", "0.5561052", "0.5559213", "0.555129", "0.5550069", "0.5535704", "0.5505642", "0.54890716", "0.54881877", "0.5482319", "0.5482319", "0.5481668", "0.54794544", "0.54794544", "0.54794544", "0.54794544", "0.54785925", "0.5472275", "0.5470767", "0.5468134", "0.5456829", "0.54545504", "0.5454535", "0.5449014", "0.54458016", "0.5443097", "0.5441793", "0.5420144", "0.54089373", "0.5403492", "0.54011625", "0.53972423", "0.5396198", "0.5394877", "0.53944135", "0.5392614", "0.53787196", "0.53779197", "0.53761697", "0.5375016", "0.53710294", "0.5369644", "0.5369644", "0.5369644", "0.5369644", "0.536626", "0.5365298", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.5361618", "0.5361499", "0.53613406", "0.5357053", "0.5356864", "0.5355111", "0.5354933" ]
0.0
-1
TODO Find correct name
@ReflectiveMethod(name = "b", types = {}) public int b(){ return (int) NMSWrapper.getInstance().exec(nmsObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "protected abstract String name ();", "abstract public String named();", "@Override\n\tString name();", "@Override\n protected String getName() {return _parms.name;}", "@Override\n String getName();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "abstract String name();", "@Override\n public void perish() {\n \n }", "public String getName() {\n/* 209 */ return this.name;\n/* */ }", "@Override\r\n String getName();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract String getName();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public abstract String getName();", "public String getName () { return this.name; }", "@Override\n\tpublic void anular() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public String getName() {\n/* 57 */ return this.name;\n/* */ }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override \n public String getName() {\n return NAME;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName(){\n return Name; \n }", "public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }", "@Override\n public String getName();", "@Override\n public String getName() {\n return name();\n }", "@Override\n public void func_104112_b() {\n \n }", "protected abstract String getName();", "abstract public String getName();", "abstract public String getName();", "abstract public String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "String getName() ;", "public String getName(){return this.name;}", "public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }", "public void mo38117a() {\n }", "@Override\n public String getName() {\n return name();\n }", "private Rekenhulp()\n\t{\n\t}", "public void method_4270() {}", "public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }", "@Override\n public abstract String getName();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo41079d();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public String getName() { return _name; }", "@Override\n\tprotected void interr() {\n\t}", "@Override \r\n\tpublic String getName() {\r\n\t\treturn \"Bazooka\";\r\n\t}", "public abstract String mo13682d();", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Override\n public String getName() {\n return super.getName();\n }", "public abstract String mo118046b();", "@Override\n public void init() {\n\n }", "public String getName(){ return name; }", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public String getName ();", "@Override\n public int describeContents() { return 0; }", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n }" ]
[ "0.5991456", "0.5880368", "0.58532566", "0.58496195", "0.5740335", "0.57321703", "0.56900704", "0.5684384", "0.5682005", "0.5682005", "0.567981", "0.5672165", "0.56573975", "0.565536", "0.5643238", "0.56334233", "0.5630895", "0.56235874", "0.5622865", "0.5618608", "0.5590941", "0.557671", "0.556469", "0.5564603", "0.5561052", "0.5559213", "0.555129", "0.5550069", "0.5535704", "0.5505642", "0.54890716", "0.54881877", "0.5482319", "0.5482319", "0.5481668", "0.54794544", "0.54794544", "0.54794544", "0.54794544", "0.54785925", "0.5472275", "0.5470767", "0.5468134", "0.5456829", "0.54545504", "0.5454535", "0.5449014", "0.54458016", "0.5443097", "0.5441793", "0.5420144", "0.54089373", "0.5403492", "0.54011625", "0.53972423", "0.5396198", "0.5394877", "0.53944135", "0.5392614", "0.53787196", "0.53779197", "0.53761697", "0.5375016", "0.53710294", "0.5369644", "0.5369644", "0.5369644", "0.5369644", "0.536626", "0.5365298", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.5361618", "0.5361499", "0.53613406", "0.5357053", "0.5356864", "0.5355111", "0.5354933" ]
0.0
-1
TODO Find correct name
@ReflectiveMethod(name = "c", types = {}) public boolean c(){ return (boolean) NMSWrapper.getInstance().exec(nmsObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "protected abstract String name ();", "abstract public String named();", "@Override\n\tString name();", "@Override\n protected String getName() {return _parms.name;}", "@Override\n String getName();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "abstract String name();", "@Override\n public void perish() {\n \n }", "public String getName() {\n/* 209 */ return this.name;\n/* */ }", "@Override\r\n String getName();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract String getName();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public abstract String getName();", "public String getName () { return this.name; }", "@Override\n\tpublic void anular() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public String getName() {\n/* 57 */ return this.name;\n/* */ }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override \n public String getName() {\n return NAME;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName(){\n return Name; \n }", "public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }", "@Override\n public String getName();", "@Override\n public String getName() {\n return name();\n }", "@Override\n public void func_104112_b() {\n \n }", "protected abstract String getName();", "abstract public String getName();", "abstract public String getName();", "abstract public String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "String getName() ;", "public String getName(){return this.name;}", "public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }", "public void mo38117a() {\n }", "@Override\n public String getName() {\n return name();\n }", "private Rekenhulp()\n\t{\n\t}", "public void method_4270() {}", "public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }", "@Override\n public abstract String getName();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo41079d();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public String getName() { return _name; }", "@Override\n\tprotected void interr() {\n\t}", "@Override \r\n\tpublic String getName() {\r\n\t\treturn \"Bazooka\";\r\n\t}", "public abstract String mo13682d();", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Override\n public String getName() {\n return super.getName();\n }", "public abstract String mo118046b();", "@Override\n public void init() {\n\n }", "public String getName(){ return name; }", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public String getName ();", "@Override\n public int describeContents() { return 0; }", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n }" ]
[ "0.5991456", "0.5880368", "0.58532566", "0.58496195", "0.5740335", "0.57321703", "0.56900704", "0.5684384", "0.5682005", "0.5682005", "0.567981", "0.5672165", "0.56573975", "0.565536", "0.5643238", "0.56334233", "0.5630895", "0.56235874", "0.5622865", "0.5618608", "0.5590941", "0.557671", "0.556469", "0.5564603", "0.5561052", "0.5559213", "0.555129", "0.5550069", "0.5535704", "0.5505642", "0.54890716", "0.54881877", "0.5482319", "0.5482319", "0.5481668", "0.54794544", "0.54794544", "0.54794544", "0.54794544", "0.54785925", "0.5472275", "0.5470767", "0.5468134", "0.5456829", "0.54545504", "0.5454535", "0.5449014", "0.54458016", "0.5443097", "0.5441793", "0.5420144", "0.54089373", "0.5403492", "0.54011625", "0.53972423", "0.5396198", "0.5394877", "0.53944135", "0.5392614", "0.53787196", "0.53779197", "0.53761697", "0.5375016", "0.53710294", "0.5369644", "0.5369644", "0.5369644", "0.5369644", "0.536626", "0.5365298", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.5361618", "0.5361499", "0.53613406", "0.5357053", "0.5356864", "0.5355111", "0.5354933" ]
0.0
-1
TODO Find correct name
@ReflectiveMethod(name = "d", types = {}) public boolean d(){ return (boolean) NMSWrapper.getInstance().exec(nmsObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "protected abstract String name ();", "abstract public String named();", "@Override\n\tString name();", "@Override\n protected String getName() {return _parms.name;}", "@Override\n String getName();", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "abstract String name();", "@Override\n public void perish() {\n \n }", "public String getName() {\n/* 209 */ return this.name;\n/* */ }", "@Override\r\n String getName();", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "abstract String getName();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public abstract String getName();", "public String getName () { return this.name; }", "@Override\n\tpublic void anular() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public String getName() {\n/* 57 */ return this.name;\n/* */ }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override \n public String getName() {\n return NAME;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName(){\n return Name; \n }", "public String getName()\n/* */ {\n/* 62 */ return this.name;\n/* */ }", "@Override\n public String getName();", "@Override\n public String getName() {\n return name();\n }", "@Override\n public void func_104112_b() {\n \n }", "protected abstract String getName();", "abstract public String getName();", "abstract public String getName();", "abstract public String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "public abstract String name();", "String getName() ;", "public String getName(){return this.name;}", "public String getName()\n/* */ {\n/* 109 */ return this.name;\n/* */ }", "public void mo38117a() {\n }", "@Override\n public String getName() {\n return name();\n }", "private Rekenhulp()\n\t{\n\t}", "public void method_4270() {}", "public String getName()\n/* */ {\n/* 59 */ return this.name;\n/* */ }", "@Override\n public abstract String getName();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract String mo41079d();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public String getName() {\n return null;\n }", "@Override\n public String getName() {\n return null;\n }", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public String getName() { return _name; }", "@Override\n\tprotected void interr() {\n\t}", "@Override \r\n\tpublic String getName() {\r\n\t\treturn \"Bazooka\";\r\n\t}", "public abstract String mo13682d();", "public String getName() {\n/* */ return this.field_176894_i;\n/* */ }", "@Override\n public String getName() {\n return super.getName();\n }", "public abstract String mo118046b();", "@Override\n public void init() {\n\n }", "public String getName(){ return name; }", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "public String getName(){return name;}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "public abstract String getName();", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public String getName ();", "@Override\n public int describeContents() { return 0; }", "protected boolean func_70814_o() { return true; }", "@Override\n protected void initialize() {\n }" ]
[ "0.5991456", "0.5880368", "0.58532566", "0.58496195", "0.5740335", "0.57321703", "0.56900704", "0.5684384", "0.5682005", "0.5682005", "0.567981", "0.5672165", "0.56573975", "0.565536", "0.5643238", "0.56334233", "0.5630895", "0.56235874", "0.5622865", "0.5618608", "0.5590941", "0.557671", "0.556469", "0.5564603", "0.5561052", "0.5559213", "0.555129", "0.5550069", "0.5535704", "0.5505642", "0.54890716", "0.54881877", "0.5482319", "0.5482319", "0.5481668", "0.54794544", "0.54794544", "0.54794544", "0.54794544", "0.54785925", "0.5472275", "0.5470767", "0.5468134", "0.5456829", "0.54545504", "0.5454535", "0.5449014", "0.54458016", "0.5443097", "0.5441793", "0.5420144", "0.54089373", "0.5403492", "0.54011625", "0.53972423", "0.5396198", "0.5394877", "0.53944135", "0.5392614", "0.53787196", "0.53779197", "0.53761697", "0.5375016", "0.53710294", "0.5369644", "0.5369644", "0.5369644", "0.5369644", "0.536626", "0.5365298", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.536213", "0.5361618", "0.5361499", "0.53613406", "0.5357053", "0.5356864", "0.5355111", "0.5354933" ]
0.0
-1
Removes only our private highlights
public void removeHighlights(JTextComponent textComp) { Highlighter hilite = textComp.getHighlighter(); Highlighter.Highlight[] hilites = hilite.getHighlights(); for (int i=0; i<hilites.length; i++) { if (hilites[i].getPainter() instanceof MyHighlightPainter) { hilite.removeHighlight(hilites[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllHighlights() {}", "@Override\n public void removeHighlight()\n {\n }", "public void removeHighlight() {\n if (highlightWord == null) {\r\n return;\r\n }\r\n \r\n for (int i = 0; i < highlightWord.length(); i++) {\r\n if (hightlightDir == Ranker.RIGHT) {\r\n cells[highlightX][highlightY + i].highlight((char) 0);\r\n } else {\r\n cells[highlightX + i][highlightY].highlight((char) 0);\r\n }\r\n }\r\n repaint();\r\n }", "public void removeHighlight(Object tag) {}", "public void removeAllHighlights() {\n while (!highlights.isEmpty()) {\n HighlightImpl hElem = highlights.getElem(0);\n Rectangle highlightBounds = getBoundsByHighlight(hElem);\n highlights.remove(0);\n repaintComponent(highlightBounds);\n }\n }", "public void clear() {\n\t\thighlightsByToken.clear();\n\t}", "void unhighlight(SpellCheckWord word)\n\t{\n\t\tHighlighter highlighter = getHighlighter();\n\t\tHighlighter.Highlight[] highlights = highlighter.getHighlights();\n\n \tfor (int i = 0; i < highlights.length; i++) \n \t{\n \t\tif(highlights[i].getStartOffset() == word.startLocation) \n \t\t{\n highlighter.removeHighlight(highlights[i]);\n word.missingWord = false;\n \t\t}\n \t\t}\n\t}", "private void removeHighlights(FilterBypass fb, int left, int right) {\n ((StyledDocument)fb.getDocument()).setCharacterAttributes(left, (right-left), attributeScheme[11], true);\n }", "public void removeHighlights(String highlighterName, int beginOffset, int endOffset) {\n getLock().getWriteLock();\n try {\n List<PHighlight> removeList = highlights.getNamedHighlightsOverlapping(highlighterName, beginOffset, endOffset);\n IdentityHashMap<PAnchor, Object> deadAnchors = new IdentityHashMap<PAnchor, Object>();\n for (PHighlight highlight : removeList) {\n highlight.collectAnchors(deadAnchors);\n highlights.remove(highlight);\n }\n getTextBuffer().getAnchorSet().removeAll(deadAnchors);\n if (removeList.size() == 1) {\n repaintHighlight(removeList.get(0));\n } else if (removeList.size() > 1) {\n repaint();\n }\n } finally {\n getLock().relinquishWriteLock();\n }\n }", "private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }", "public void unHighLight() {\r\n\t\tAcideFileEditorManager fileEditorManager = AcideMainWindow\r\n\t\t\t\t.getInstance().getFileEditorManager();\r\n\t\t// checks if the Asserted database panel is open\r\n\t\tif (AcideMainWindow.getInstance().isAssertedDatabaseOpened()) {\r\n\t\t\tAcideAssertedDatabasePanel assertedDatabase = AcideMainWindow\r\n\t\t\t\t\t.getInstance().getAssertedDatabasePanel();\r\n\t\t\t// checks if the Asserted database panel is showing\r\n\t\t\tif (assertedDatabase.isShowing())\r\n\t\t\t\tassertedDatabase.repaint();\r\n\t\t}\r\n\t\t// Iterates the lines on the lines map\r\n\t\tfor (String f : _fileLines.keySet()) {\r\n\t\t\t// Searches for the file in the file editor manager\r\n\t\t\tfor (int i = 0; i < fileEditorManager.getNumberOfFileEditorPanels(); i++) {\r\n\t\t\t\tif (fileEditorManager.getFileEditorPanelAt(i).getAbsolutePath() != null\r\n\t\t\t\t\t\t&& new File(fileEditorManager.getFileEditorPanelAt(i)\r\n\t\t\t\t\t\t\t\t.getAbsolutePath()).equals(new File(f))) {\r\n\t\t\t\t\t// Unhighlights the lines\r\n\t\t\t\t\tAcideTextComponent text = fileEditorManager\r\n\t\t\t\t\t\t\t.getFileEditorPanelAt(i).getActiveTextEditionArea();\r\n\r\n\t\t\t\t\tfor (Highlighter.Highlight h : text.getHighlighter()\r\n\t\t\t\t\t\t\t.getHighlights())\r\n\t\t\t\t\t\ttext.getHighlighter().removeHighlight(h);\r\n\t\t\t\t\ttext.repaint();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void removeHighlighted(int projectID, int userId, UserType userType);", "public void clearAccessibleSelection() {\n // To be fully implemented in a future release\n }", "public abstract void clearSelection(TextAppearance appearance);", "private void clearHighlightAfterMove() {\n //clear start\n getTileAt(start).clear();\n for (Move m : possibleMoves) {\n getTileAt(m.getDestination()).clear();\n }\n }", "void clear() {\n\t\tif (textArea!=null) {\n\t\t\tRSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter)\n\t\t\t\t\t\t\t\t\t\t\t\t\ttextArea.getHighlighter();\n\t\t\th.clearMarkOccurrencesHighlights();\n\t\t}\n\t}", "public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }", "public boolean isUnderlined() { return false; }", "void setRemoveHighlightListener(RemoveHighlightListener listener);", "public void filterOutSelection() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel == null || sel.size() == 0) { getRTParent().pop(); repaint(); return; }\n Set<Bundle> new_bundles = new HashSet<Bundle>();\n if (sel != null && sel.size() > 0) {\n new_bundles.addAll(myrc.bs.bundleSet());\n Iterator<String> it = sel.iterator();\n\twhile (it.hasNext()) new_bundles.removeAll(myrc.entity_counter_context.getBundles(it.next()));\n getRTParent().setSelectedEntities(new HashSet<String>());\n\tgetRTParent().push(myrc.bs.subset(new_bundles));\n repaint();\n }\n }", "public void disableDashedHighlightLine() { this.mHighlightDashPathEffect = null; }", "private synchronized void removeContext()\n{\n if (for_editor == null) return;\n\n BoardLog.logD(\"BALE\",\"Remove rename\");\n\n for_editor.setRenameContext(null);\n for_editor.removeCaretListener(this);\n for_editor.removeMouseListener(edit_mouser);\n for_editor.removeKeyListener(edit_keyer);\n for_editor = null;\n for_document = null;\n if (cur_menu != null) {\n cur_menu.setVisible(false);\n cur_menu = null;\n }\n}", "public void removeHighlighter(Highlighter hl) {\r\n boolean success = highlighters.remove(hl);\r\n if (success) {\r\n /* PENDING: duplicates? */\r\n hl.removeChangeListener(getHighlighterChangeListener());\r\n fireStateChanged();\r\n }\r\n /* should log if this didn't succeed. Maybe */\r\n }", "public void removeHighlight(final Object obj) {\n Highlight highlight = highlights.getElem(obj);\n if (highlight != null) {\n Rectangle highlightBounds = getBoundsByHighlight(highlight);\n highlights.remove(highlight);\n repaintComponent(highlightBounds);\n }\n }", "public void remove(ClangToken t) {\n\t\thighlightsByToken.remove(getKey(t));\n\t}", "public void remove() {\r\n // rather than going through replace(), just reinitialize the StyledText,\r\n // letting the old data structures fall on the floor\r\n fCharBuffer = new CharBuffer();\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fParagraphBuffer = new ParagraphBuffer(fCharBuffer);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = fDamagedRange[1] = 0;\r\n }", "private static void removeCurrentColors(){\n\t\tIterator<ArrayList<Peg>> itr = possibleCombinations.iterator();\n\t\twhile(itr.hasNext()){\n\t\t\tArrayList <Peg> victim=itr.next();\n\t\t\tfor(int i=0; i<aiGuess.size(); i++){\n\t\t\t\t\n\t\t\t\tif(victim.contains(aiGuess.get(i))){\n\t\t\t\t\titr.remove();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void filterUserInputText(AttributedString text) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar ch = text.charAt(i);\n\t\t\tif (ch == '\\t' || (!multiline && (ch == '\\n' || ch == '\\r'))) {\n\t\t\t\ttext.delete(Range.make(i, 1));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tsuper.filterUserInputText(text);\n\t}", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionBackground() {\n return Color.BLACK;\n }", "protected void lightsOut(int line) {\r\n for (int i = 0; i < 16; i++) {\r\n code.unhighlight(i);\r\n }\r\n code.highlight(line);\r\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }", "@Override\n public void unhighlight() {\n\n // @tag ADJACENT : Removed highlight adjacent\n // boolean highlightedAdjacently = (highlighted == HIGHLIGHT_ADJACENT);\n if (highlighted == HIGHLIGHT_NONE) {\n return;\n }\n // @tag ADJACENT : Removed highlight adjacent\n /*\n * if (!highlightedAdjacently) { // IF we are highlighted as an adjacent\n * node, we don't need to deal // with our connections. if\n * (ZestStyles.checkStyle(getNodeStyle(),\n * ZestStyles.NODES_HIGHLIGHT_ADJACENT)) { // unhighlight the adjacent\n * edges for (Iterator iter = sourceConnections.iterator();\n * iter.hasNext();) { GraphConnection conn = (GraphConnection)\n * iter.next(); conn.unhighlight(); if (conn.getDestination() != this) {\n * conn.getDestination().unhighlight(); } } for (Iterator iter =\n * targetConnections.iterator(); iter.hasNext();) { GraphConnection conn\n * = (GraphConnection) iter.next(); conn.unhighlight(); if\n * (conn.getSource() != this) { conn.getSource().unhighlight(); } } } }\n */\n if (parent.getItemType() == GraphItem.CONTAINER) {\n ((GraphContainer) parent).unhighlightNode(this);\n } else {\n ((Graph) parent).unhighlightNode(this);\n }\n highlighted = HIGHLIGHT_NONE;\n updateFigureForModel(nodeFigure);\n\n }", "void clearSelection();", "public void unsetItalic()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ITALIC$6, 0);\n }\n }", "public void disableHighlightButton(ImageButton imageButtonNotClicked) {\n imageButtonNotClicked.clearColorFilter();\n }", "public static void removeHighlightsAllFrames(WebContents webContents) {\n List<RenderFrameHost> renderFrameHosts =\n webContents.getMainFrame().getAllRenderFrameHosts();\n\n for (RenderFrameHost renderFrameHost : renderFrameHosts) {\n TextFragmentReceiver producer =\n renderFrameHost.getInterfaceToRendererFrame(TextFragmentReceiver.MANAGER);\n producer.removeFragments();\n }\n }", "public void removeAccessibleSelection(int i) {\n // To be fully implemented in a future release\n }", "public void removePrincipleLines() {\n removeFromPane(firstLineFirstPart);\n removeFromPane(firstLineSecondPart);\n removeFromPane(secondLine);\n removeFromPane(thirdLineFirstPart);\n removeFromPane(thirdLineSecondPart);\n removeFromPane(dottedLine1);\n removeFromPane(dottedLine2);\n removeFromPane(dottedLine3);\n }", "public static void resetAllHighlight(){\n\t\tfor (Case[] casesLignes: cases){\n\t\t\tfor(Case casePlateau: casesLignes){\n\t\t\t\tcasePlateau.resetHighlight();\n\t\t\t}\n\t\t}\n\t}", "@VisibleForTesting\n void cancelProvisionalSelection() {\n mProvisionalSelection.clear();\n }", "public void removeSelection() {\n this.selection = null;\n }", "void deleteUnusedTags();", "public void removeCharacterStyles() {\r\n fStyleBuffer = new StyleBuffer(this, AttributeMap.EMPTY_ATTRIBUTE_MAP);\r\n fTimeStamp += 1;\r\n fDamagedRange[0] = 0;\r\n fDamagedRange[1] = length();\r\n }", "public abstract void removeSelection(IContentFactory factory,\n TextAppearance appearance);", "private static String cleanHighlightingMarks(final String hlText) {\n String hlLiteral = hlText;\n int indexPre = hlLiteral.indexOf(HL_PRE);\n while (indexPre > -1) {\n int indexPost = hlLiteral.indexOf(HL_POST, indexPre + HL_PRE.length());\n if (indexPost > -1) {\n String post = hlLiteral.substring(indexPost + HL_POST.length());\n String pre = hlLiteral.substring(0, indexPost);\n Matcher preMatcher = HL_PRE_REGEX.matcher(pre);\n pre = preMatcher.replaceFirst(\"\");\n hlLiteral = pre + post;\n }\n indexPre = hlLiteral.indexOf(HL_PRE);\n }\n return hlLiteral;\n }", "private static void HideCursor(TextEditor This)\r\n {\r\n if (!TextEditor._ThreadLocalStore.HideCursor &&\r\n SystemParameters.MouseVanish && \r\n This.UiScope.IsMouseOver)\r\n { \r\n TextEditor._ThreadLocalStore.HideCursor = true; \r\n SafeNativeMethods.ShowCursor(false);\r\n } \r\n }", "private void removeOldMouseGrabber() {\n Object oldLogger = ReflectionUtil.changeIllegalAccessLogger(null);\n AppContext context = AppContext.getAppContext();\n try {\n Field field = BasicPopupMenuUI.class.getDeclaredField(\"MOUSE_GRABBER_KEY\");\n field.setAccessible(true);\n Object value = field.get(null);\n Object mouseGrabber = context.get(value);\n if (mouseGrabber != null) {\n Method method = mouseGrabber.getClass().getDeclaredMethod(\"uninstall\");\n method.setAccessible(true);\n method.invoke(mouseGrabber);\n }\n context.put(value, null);\n } catch (NoSuchFieldException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {\n e.printStackTrace();\n } finally {\n ReflectionUtil.changeIllegalAccessLogger(oldLogger);\n }\n }", "public void unsetBoldItalic()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BOLDITALIC$8, 0);\n }\n }", "public static void toggleHighlightState() {\n toggleHighlightState(!highlighted.getValue());\n }", "public Highlighter.Highlight[] getHighlights()\n/* */ {\n/* 86 */ return null;\n/* */ }", "public void erase() {\n g2.setPaint(Color.white);\r\n }", "public void unsetBold()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BOLD$4, 0);\n }\n }", "private void unmarkForSecOp() {\n\t\tthis.secOpFlag = false;\n\t\tthis.secopDoc = null;\n\t}", "@Override\n protected void processUnselect() {\n \n }", "void unsetComments();", "@VisibleForTesting\n protected void applyProvisionalSelection() {\n mSelection.addAll(mProvisionalSelection);\n mProvisionalSelection.clear();\n }", "public DefaultHighlighter() {\n setDrawsLayeredHighlights(true);\n }", "void unsetLegs();", "@Override\n public void deselectGolem() {\n }", "public void onAllAnnotationsRemoved() {\n/* 441 */ if (!this.mPdfViewCtrl.isUndoRedoEnabled()) {\n/* */ return;\n/* */ }\n/* */ \n/* */ try {\n/* 446 */ JSONObject jsonObj = new JSONObject();\n/* 447 */ if (this.mContext != null) {\n/* 448 */ String strRemoveAnnotations = this.mContext.getResources().getString(R.string.undo_redo_annots_remove);\n/* 449 */ jsonObj.put(\"Action\", strRemoveAnnotations);\n/* */ } \n/* 451 */ jsonObj.put(\"Action event\", \"remove_all_annotations\");\n/* */ \n/* 453 */ if (Utils.isNullOrEmpty(jsonObj.toString())) {\n/* 454 */ AnalyticsHandlerAdapter.getInstance().sendException(new Exception(\"takeUndoSnapshot with an empty string\"));\n/* */ }\n/* */ \n/* 457 */ takeUndoSnapshot(jsonObj.toString());\n/* 458 */ if (this.mToolManager.getAnnotManager() != null) {\n/* 459 */ this.mToolManager.getAnnotManager().onLocalChange(\"delete\");\n/* */ }\n/* 461 */ if (sDebug)\n/* 462 */ Log.d(TAG, \"snapshot: \" + jsonObj.toString()); \n/* 463 */ } catch (Exception e) {\n/* 464 */ AnalyticsHandlerAdapter.getInstance().sendException(e);\n/* */ } \n/* */ }", "public void removeAllOriginalTextWriter() {\r\n\t\tBase.removeAll(this.model, this.getResource(), ORIGINALTEXTWRITER);\r\n\t}", "public void clearAllSquares()\n\t{\n\t\t/* loop through all rows and columns and remove all the highlighting */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tclearSquare(i, j);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void filterUserInputText(AttributedString text) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar ch = text.charAt(i);\n\t\t\tif (ch == '\\t' || ch == '\\n' || ch == '\\r') {\n\t\t\t\ttext.delete(Range.make(i, 1));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tsuper.filterUserInputText(text);\n\t}", "@Override\n\tpublic void unselect() {\n\t}", "@Override\r\n\tpublic Image getHighlightImage() {\n\t\treturn null;\r\n\t}", "public void removeAllSeconderyColorsFromBoard() {\n\t\tArrayList<Tile> boardTiles= getAllBoardTiles();\n\t\tif(!this.coloredTilesList.isEmpty()) {\n\t\t\tboardTiles.retainAll(coloredTilesList);\n\t\t\tfor(Tile t :boardTiles) {\n\t\t\t\tTile basicTile= new Tile.Builder(t.getLocation(), t.getColor1()).setPiece(t.getPiece()).build();\n\t\t\t\treplaceTileInSameTileLocation(basicTile);\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tthis.coloredTilesList=null;\n\t\tthis.coloredTilesList=new ArrayList<Tile>();\n\t\tthis.orangeTiles=null;\n\t\tthis.orangeTiles=new ArrayList<Tile>();\n\n\t}", "void unsetSpokes();", "public void clearSelection()\n\t{\n\t\tgetObject().clearSelection();\n\t\treturn;\n\t}", "@Override\n\tpublic void undo() {\n\t\tlight.off();\n\t}", "void removeAllRawLicenses();", "private void uninstall()\r\n {\r\n // do not listen to any other key strokes\r\n editor.getViewer().removeVerifyKeyListener(this);\r\n\r\n editor.getViewer().getTextWidget().removeFocusListener(this);\r\n\r\n editor.setStatusMessage(\"\");\r\n }", "private static void stripUnlikelyCandidates(Document doc) {\n if (true) {\n return; // Temporarily disabled; see comment above.\n }\n\n for (Element child : doc.select(\"body\").select(\"*\")) {\n String className = child.className().toLowerCase();\n String id = child.id().toLowerCase();\n if (ExtractionHelpers.NEGATIVE_CSS_CLASSES_AND_IDS.matcher(className).find() || ExtractionHelpers.NEGATIVE_CSS_CLASSES_AND_IDS.matcher(id).find()) {\n Log.printAndRemove(child, \"stripUnlikelyCandidates\");\n }\n }\n }", "public void setHighlight(boolean high);", "@Override\n public void cleanup(boolean okToContinue, boolean menuHidden)\n {\n if (menuHidden) {\n Iterator<FrameEltSelnFig<?>> figures;\n\n // If an element was contextually selected, clear the highlight\n if (contextSelection.getElementSelectionCount() > 0) {\n figures = contextSelection.getSelectedFigures();\n\n while (figures.hasNext()) {\n FrameEltSelnFig<?> eltFig = figures.next();\n eltFig.dynamicHighlight(false);\n }\n }\n\n // Check for selected widgets that are highlighted\n if (selection.getElementSelectionCount() > 0) {\n figures = selection.getSelectedFigures();\n\n while (figures.hasNext()) {\n FrameEltSelnFig<?> eltFig = figures.next();\n eltFig.dynamicHighlight(false);\n }\n }\n }\n\n super.cleanup(okToContinue, menuHidden);\n }", "public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}", "public void remove (int offs, int len) throws BadLocationException\r\n {\n super.remove (offs, len);\r\n if (offs < selectionStartIndex)\r\n {\r\n selectionStartIndex -= len;\r\n fetchSuggestion (getContent ().getString (0, selectionStartIndex), new SimpleAttributeSet (),\r\n getCaretPosition ());\r\n } else\r\n {\r\n component.getHighlighter ().removeAllHighlights ();\r\n super.remove (offs, getLength () - offs);\r\n }\r\n if (offs > selectionStartIndex)\r\n selectionStartIndex = getLength ();\r\n }", "protected void removeSelection() {\n\t\tBEAN oldBean = getInternalValue();\n\t\tsetInternalValue(null);\n\t\ttextField.setValue(null);\n\t\tif (searchListener != null) {\n\t\t\tsearchListener.remove(oldBean);\n\t\t}\n\t}", "public void removeFromClipboard() { genericClipboard(SetOp.REMOVE); }", "public void deactivate() {\n\t\tSystem.out.println(\"WordReader.deactivate\");\n\t}", "public void clearSelection() {\n buttonGroup.clearSelection();\n }", "public void unsetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STYLECODE$16);\n }\n }", "public void unsetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(STYLECODE$16);\n }\n }", "public void supprimerJoueur() {\n cercle.setStroke(Color.TRANSPARENT);\n isVisible = false;\n }", "public void reset() {\n\t\tfor (int i = 0; i < markedElements.size(); i++) {\n\t\t\tif (markedElements.get(i) instanceof Word) {\n\t\t\t\tWord word = (Word) markedElements.get(i);\n\t\t\t\teditor.setCaretPosition(word.getEndPosition() + 1);\n\t\t\t\tint start = word.getStartPosition();\n\t\t\t\tint end = word.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof FunctionWord) {\n\t\t\t\tFunctionWord fword = (FunctionWord) markedElements.get(i);\n\t\t\t//\tif(fword.getWord().getEndPosition()!= fword.getEndPosition()) {\n\t\t\t\t\t// fword ist teil eines gr��eren Wortes-> Endposition als caretposition verwenden\n\t\t\t//\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t//\telse {\n\t\t\t\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t\tint start = fword.getStartPosition();\n\t\t\t\tint end = fword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof ConstitutiveWord) {\n\t\t\t\tConstitutiveWord cword = (ConstitutiveWord) markedElements\n\t\t\t\t\t\t.get(i);\n\t\t\t\teditor.setCaretPosition(cword.getEndPosition() + 1);\n\t\t\t\tint start = cword.getStartPosition();\n\t\t\t\tint end = cword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof IllocutionUnit) {\n\t\t\t\tIllocutionUnit iu = (IllocutionUnit) markedElements.get(i);\n\t\t\t\tfor (int j = 0; j < iu.getTokens().size(); j++) {\n\t\t\t\t\tToken token = (Token) iu.getTokens().get(j);\n\t\t\t\t\tint start = token.getStartPosition();\n\t\t\t\t\tint end = token.getEndPosition();\n\t\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN,\n\t\t\t\t\t\t\ttrue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmarkedElements.clear();\n\t\tdesignText(Model.getIllocutionUnitRoots());\n\t}", "public void hidePrimaryLines(){\n\t\tLinkedList<Line> primary = lineLists.get(0);\n\t\tfor (Line l : primary){\n\t\t\tl.setVisible(false);\n\t\t}\n\t\tshowPrimaryLines = false;\n\t}", "public void deselectObjects() {\n if (contextMenu != null) {\n contextMenu.hide();\n contextMenu = null;\n }\n\n // Deselect all objects\n objectsProperty.stream().forEach(ov -> ov.setSelected(false));\n hintsProperty.stream().forEach(hv -> hv.setSelected(false));\n }", "public boolean getHighlight();", "protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {\n\n Container c = getContainer();\n if (c instanceof JPasswordField) {\n JPasswordField f = (JPasswordField) c;\n if (!f.echoCharIsSet()) {\n return super.drawUnselectedText(g, x, y, p0, p1);\n }\n if (f.isEnabled()) {\n g.setColor(f.getForeground());\n } else {\n g.setColor(f.getDisabledTextColor());\n }\n char echoChar = f.getEchoChar();\n int n = p1 - p0;\n for (int i = 0; i < n; i++) {\n x = drawEchoCharacter(g, x, y, echoChar);\n }\n }\n return x;\n }", "public void removeWord()\n {\n \tlastRow = -1;\n \tlastColumn = -1;\n \t\n \tguess = \"\";\n \tguessWordArea.setText( \"\" );\n \t\n \t//Reset the letters that have been used for a word\n \tused = new boolean[BOARD_SIZE][BOARD_SIZE];\n \t//Change the background colour of all of the buttons in the grid\n \tfor( int i = 0; i < BOARD_SIZE; i++ )\n \t{\n \t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n \t\t{\n \t\t\tgridButtons[i][j].setBackground( restart.getBackground() ); //The restart button will always have the default background\n \t\t}\n \t}\n }", "public void clearSelection() {\n getElement().clearSelection();\n }", "public void emptySelectionLists() {\n\t\tArrayList selectionsCopy = new ArrayList();\n\t\tselectionsCopy.addAll(selections);\n\t\tIterator it = selectionsCopy.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tXsdNode node = (XsdNode) it.next();\n\t\t\tunselectNode(node);\n\t\t}\n\t\tlineNode = null;\n\t\telementFilters = new HashMap();\n\t}", "public void discard() {\r\n\t\tif(this.markedStack.isEmpty()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis.markedStack.removeLast();\r\n\t}", "public void allOff() {\r\n\t\tsetAllColor(0, 0, 0);\r\n\t}" ]
[ "0.7664994", "0.7344703", "0.67764384", "0.669842", "0.63936776", "0.6383417", "0.6265745", "0.6262969", "0.619809", "0.60155714", "0.5901876", "0.5858836", "0.58517194", "0.5823537", "0.5624865", "0.56097245", "0.5556393", "0.5525043", "0.55152845", "0.54855615", "0.54227465", "0.5422483", "0.5350593", "0.53408486", "0.5302321", "0.52673614", "0.5252685", "0.5233202", "0.52327484", "0.52275926", "0.52275926", "0.52275926", "0.52275926", "0.5201115", "0.52007324", "0.52007324", "0.52007324", "0.52007324", "0.51927507", "0.51906806", "0.51904553", "0.51886046", "0.51833457", "0.514627", "0.51200867", "0.5115533", "0.5097979", "0.50969934", "0.50797945", "0.5076423", "0.50752866", "0.5067626", "0.50627154", "0.5060665", "0.5055034", "0.5050047", "0.5049065", "0.50464845", "0.5002738", "0.50010556", "0.49911904", "0.49900463", "0.49898547", "0.49896362", "0.4988429", "0.4983406", "0.49740714", "0.4973708", "0.49718416", "0.49629894", "0.49522424", "0.49479136", "0.49463046", "0.49460393", "0.49297932", "0.49258628", "0.49111032", "0.49107197", "0.48933113", "0.4892341", "0.4891538", "0.48914924", "0.4879676", "0.48763722", "0.48702812", "0.48592904", "0.48534197", "0.48497316", "0.48497316", "0.48463333", "0.48437712", "0.4837764", "0.48338518", "0.48315248", "0.48287925", "0.48249817", "0.4824295", "0.48217055", "0.4820242", "0.4805262" ]
0.6553517
4
methode qui fait les suggestions
public void sug() { texttt.addMouseListener( new MouseAdapter() { public void mouseClicked(MouseEvent e) { if ( SwingUtilities.isLeftMouseButton(e) ) { try { int offset = texttt.viewToModel( e.getPoint() ); System.out.println( texttt.modelToView( offset ) ); int start = Utilities.getWordStart(texttt, offset); int end = Utilities.getWordEnd(texttt, offset); String word = texttt.getDocument().getText(start, end-start); System.out.println( "Selected word: " + word); boolean trouver = false; for(int i = 0; i < dictionnaire.length; i++) { if(word.equalsIgnoreCase(dictionnaire[i])) { trouver = true; } } //Si le mot est inconnu, on affiche les cinq plus proches suggestions en distance. if(trouver == false) { int suggestions[][] = new int[dictionnaire.length][2]; for(int i = 0; i < dictionnaire.length; i++) { suggestions[i][0] = i; suggestions[i][1] = distance(word, dictionnaire[i]); } Arrays.sort(suggestions, (a, b) -> Integer.compare(a[1], b[1])); JPopupMenu popup = new JPopupMenu(); for(int i = 0; i < 5; i++) { JMenuItem suggestion = new JMenuItem("" + dictionnaire[suggestions[i][0]]); suggestion.addActionListener(new Suggestion(suggestion, start, end)); popup.add(suggestion); } popup.show(texttt, e.getX(), e.getY()); } int rowStart = Utilities.getRowStart(texttt, offset); int rowEnd = Utilities.getRowEnd(texttt, offset); System.out.println( "Row start offset: " + rowStart ); System.out.println( "Row end offset: " + rowEnd ); texttt.select(rowStart, rowEnd); } catch(BadLocationException e1) { System.err.println("On ne peut pas lire le texte à l'index indiqué."); } } } }); texttt.addCaretListener( new CaretListener(){ public void caretUpdate(CaretEvent e) { int caretPosition = texttt.getCaretPosition(); Element root = texttt.getDocument().getDefaultRootElement(); int row = root.getElementIndex( caretPosition ); int column = caretPosition - root.getElement( row ).getStartOffset(); System.out.println( "Row : " + ( row + 1 ) ); System.out.println( "Column: " + ( column + 1 ) ); } }); texttt.addKeyListener( new KeyAdapter() { public void keyPressed(KeyEvent e) { System.out.println( texttt.getDocument().getDefaultRootElement().getElementCount() ); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void findSuggestions(String query) {\n \t\tif (suggestionsLoaderClient != null) {\n \t\t\tif (query.length() == 0) {\n \t\t\t\tsuggestionsLoaderClient.doLoadSuggestions(\"default-query\",\n \t\t\t\t\t\tlimit);\n \t\t\t} else {\n \t\t\t\tsuggestionsLoaderClient.doLoadSuggestions(query, limit);\n \t\t\t}\n \t\t}\n \t}", "private void suggestCategory() {\n String[] allCat = {\"Pizza\", \"Pasta\", \"Dessert\", \"Salad\", \"SoftDrinks\"};\n// for (ItemDTO i : allDetails) {\n// names.add(i.getName());\n// }\n\n TextFields.bindAutoCompletion(txtCat, allCat);\n }", "void suggest(T value);", "private String getSuggestions() {\r\n\t\tDbHandler dbHandler = new DbHandler(new AndroidFileIO(this));\r\n\t\tTable data;\r\n\t\ttry {\r\n\t\t\tdata = dbHandler.generateDataTable(\"mentalrate\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t\tRulesFinder finder = new RulesFinder(data);\r\n\t\tIterator<Rule> rulesIter = finder.findRules().iterator();\r\n\r\n\t\tString msg = \"\";\r\n\t\twhile (rulesIter.hasNext()) {\r\n\t\t msg += RuleTranslator.humanReadable(rulesIter.next())+\"\\n\";\r\n\t\t}\r\n\t System.out.println(msg);\r\n\t\treturn msg;\r\n\t}", "public String getSearchHint();", "@Override\n public List<String> getSuggestions(CommandSource arg0, String arg1, Location<World> arg2) throws CommandException {\n return Collections.emptyList();\n }", "public Suggestion (Text text, String[] suggestions) {\n\t\tthis.text = text;\n\t\tthis.suggestions = suggestions;\n\t}", "private void refreshSuggestions() {\n \t\tString text = textBox.getText();\n \t\tif (text.equals(currentText)) {\n \t\t\treturn;\n \t\t} else {\n \t\t\tcurrentText = text;\n \t\t}\n \t\tfindSuggestions(text);\n \t}", "List<Company> getSuggestionsToFollow();", "public interface ISimpleSuggestionPluginProvider extends ISuggestionPluginProvider {\n\n Collection<String> getSuggestions(String input, SuggestionRequestContext context);\n\n}", "@Override\n\tpublic void suggestExchange() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\t\t\t\n\t\t}", "private void searchSuggestionListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchSuggestionListMouseClicked\n String selectedWord = this.getSearchSuggestionList().getSelectedValue();\n \n // find the definiiton of the word\n for(int i = 0 ; i < queryResult.size() ; i++)\n {\n if(queryResult.get(i).getWord().equals(selectedWord))\n {\n String definition = queryResult.get(i).getDefinition();\n definitionTextArea.setText(definition);\n i = queryResult.size();\n }\n }\n \n // select the same word in the all word list \n ListModel<String> modelList = getAllWordsList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getAllWordsList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n List<String> suggest = new ArrayList<String>();\n //Loop in The Suggest List\n for (String search:suggestList)\n {\n if (search.toLowerCase().contains(materialSearchBar.getText().toLowerCase()))\n suggest.add(search);\n }\n materialSearchBar.setLastSuggestions(suggest);\n\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n List<String> suggest = new ArrayList<String>();\n for (String search : suggestionList) {\n if (search.toLowerCase().contains(product_list_search_bar.getText().toLowerCase().trim()))\n suggest.add(search);\n }\n product_list_search_bar.setLastSuggestions(suggest);\n\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n List<String> suggest = new ArrayList<>();\n for (String search : suggestList){\n //if thke text in the search bar is the same as in the suggestList, add it to suggest\n if (search.toLowerCase().contains(materialSearchBar.getText().toLowerCase())){\n suggest.add(search);\n\n materialSearchBar.setLastSuggestions(suggest);\n }\n }\n\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n List<String> suggest = new ArrayList<String>();\n //Loop in The Suggest List\n for (String search:suggestList)\n {\n if (search.toLowerCase().contains(materialSearchBar.getText().toLowerCase()))\n suggest.add(search);\n }\n materialSearchBar.setLastSuggestions(suggest);\n\n }", "public List<String> suggestions(FacesContext pContext,\n UIComponent pComponent, String pPrefix) {\n \n if (StringUtil.isEmptyOrNull(pPrefix)) {\n pPrefix = \"*\";\n }\n \n List<String> suggestionList = new ArrayList<String>();\n List<Software> softResults = Collections.emptyList();\n List<PN> PNResults = Collections.emptyList();\n List<TypePC> lTypePCResults = Collections.emptyList();\n \n if (!StringUtil.isEmptyOrNull(pPrefix)) {\n \n switch (getReferenceTypeChosen()) {\n \n case SOFTWARE:\n softResults = softBean.suggestionListSoftware(pPrefix);\n for (Software s : softResults) {\n suggestionList.add(s.getCompleteName());\n }\n break;\n \n case MANUFACTURERPN_TYPEARTICLE:\n PNResults = articleBean.suggestionListManufacturerPN(pPrefix);\n for (PN pn : PNResults) {\n suggestionList.add(pn.getIdentifier());\n }\n break;\n \n case AIRBUSPN_TYPEARTICLE:\n PNResults = articleBean.suggestionListAirbusPN(pPrefix);\n for (PN pn : PNResults) {\n suggestionList.add(pn.getIdentifier());\n }\n break;\n \n case TYPEPC:\n lTypePCResults = articleBean.suggestionListTypePC(pPrefix);\n for (TypePC lType : lTypePCResults) {\n suggestionList.add(lType.getLabel());\n }\n break;\n \n default:\n \n }\n }\n \n Collections.sort(suggestionList);\n return suggestionList;\n \n }", "private void searchWord()\n {\n String inputWord = searchField.getText();\n \n if(inputWord.isEmpty())\n queryResult = null;\n \n else\n {\n char firstLetter = inputWord.toUpperCase().charAt(0);\n \n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetter)\n {\n queryResult = lexiNodeTrees.get(i).searchWord(inputWord, false);\n i = lexiNodeTrees.size(); // escape the loop\n }\n }\n }\n \n // update the list on the GUI\n if(queryResult != null)\n {\n ArrayList<String> words = new ArrayList<>();\n for(WordDefinition word : queryResult)\n {\n words.add(word.getWord());\n }\n \n // sort the list of words alphabetically \n Collections.sort(words);\n \n // display the list of wordsin the UI\n DefaultListModel model = new DefaultListModel();\n for(String word : words)\n {\n model.addElement(word);\n }\n\n this.getSearchSuggestionList().setModel(model);\n }\n \n else\n this.getSearchSuggestionList().setModel( new DefaultListModel() );\n }", "private void createSuggestionsList() {\r\n\t\tmListView = new LabeledListViewElement(this);\r\n\t\tmInputBar.addView(mListView);\r\n\r\n\t\tmListView.setOnItemClickListener(new OnItemClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int pos, long id) {\r\n\t\t\t\tString query = adapter.getItemAtPosition(pos).toString();\r\n\t\t\t\tif(query.contains(\" \"))\r\n\t\t\t\t\tsearch(query);\r\n\t\t\t\telse{\r\n\t\t\t\t\tmInputBar.setInputText(query + \" \");\r\n\t\t\t\t\tmInputBar.setCursorAtEnd();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t}", "private void searchFunction() {\n\t\t\r\n\t}", "@Override\n public void afterTextChanged(Editable s) {\n List<String> mListSuggest = new ArrayList<>();\n for (String search : mSearchList){\n if (search.toLowerCase().contains(mSearchBar.getText().toLowerCase()))\n mListSuggest.add(search);\n }\n\n mSearchBar.setLastSuggestions(mListSuggest);\n }", "private List<ICompletionProposal> getSuggestions(ITextViewer viewer,\n \t\t\tint offset, String prefix) throws BadLocationException {\n \n \t\tProperties properties = loadProposalFile();\n \n \t\tMap<String, String> filteredSuggestions = new HashMap<String, String>();\n \n \t\tfor (Entry<Object, Object> property : properties.entrySet()) {\n \t\t\tif (((String) property.getValue()).startsWith(prefix)) {\n \t\t\t\tfilteredSuggestions.put((String) property.getKey(),\n \t\t\t\t\t\t(String) property.getValue());\n \t\t\t}\n \t\t}\n \n \t\tList<ICompletionProposal> suggestions = createProposals(viewer,\n \t\t\t\tfilteredSuggestions, offset, prefix);\n \n \t\treturn suggestions;\n \t}", "public Suggestion (CCombo combo, String[] suggestions) {\n\t\tthis.combo = combo;\n\t\tthis.suggestions = suggestions;\n\t}", "@Override\n\tpublic void updateSuggestFuncOracle() {\n\t\tif (searchSuggestFuncTextBox != null) {\n\t\t\tMultiWordSuggestOracle multiWordSuggestOracle = (MultiWordSuggestOracle) searchSuggestFuncTextBox\n\t\t\t\t\t.getSuggestOracle();\n\t\t\tmultiWordSuggestOracle.clear();\n\t\t\tmultiWordSuggestOracle.addAll(funcNameMap.values());\n\t\t}\n\t}", "void itemSuggested(String autoCompleteString, boolean keepPopupVisible, boolean triggerAction);", "private void configureSuggestion(final boolean requestedExplicitly) {\n myView.removeSuggestions();\n final RangeInfo rangeInfo = findNearestRangeInfo();\n final String text = getTextByRange(rangeInfo);\n\n final SuggestionInfo suggestionInfo = rangeInfo.getSuggestions();\n if (suggestionInfo == null || (!suggestionInfo.isShowSuggestionsAutomatically() && !requestedExplicitly)) {\n return;\n }\n final List<String> suggestions = new ArrayList<String>(suggestionInfo.getSuggestions());\n if (text != null && !requestedExplicitly) {\n filterLeaveOnlyMatching(suggestions, text);\n }\n // TODO: Place to add history\n if (!suggestions.isEmpty()) {\n // No need to display empty suggestions\n myView\n .displaySuggestions(new SuggestionsBuilder(suggestions), suggestionInfo.isShowAbsolute(), text);\n }\n }", "public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {\n fetchTags(req, callback);\n }", "@Override\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n\n List<String> suggest = new ArrayList<>();\n for (String search : suggestList) {\n if (search.toLowerCase().contains(materialSearchBar.getText().toLowerCase()))\n suggest.add(search);\n }\n materialSearchBar.setLastSuggestions(suggest);\n\n }", "@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);", "public interface FriendAutoCompleterFactory {\n\n /**\n * Returns a FriendLibraryAutocompleter that will supply suggestions based\n * on category.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch);\n\n /**\n * Returns a FriendLibraryPropertyAutocompleter that will supply suggestions\n * based on category and FilePropertyKey combination.\n */\n public abstract AutoCompleteDictionary getDictionary(SearchCategory categoryToSearch,\n FilePropertyKey filePropertyKey);\n\n}", "@Override\n protected void query(CompletionResultSet completionRS, Document doc, int caretOffset) {\n // First, we retrieve the filters defined for the hAtom microformat completion\n String strFilter = Filter.EMPRTY_STRING;\n Filter filter = Filter.getFilter();\n \n try {\n StyledDocument styledDoc = (StyledDocument) doc; \n // Get the filter's text based on actual carte position.\n strFilter = filter.getText(styledDoc, caretOffset);\n \n } catch (Exception ex) {\n ex.printStackTrace();\n // if an error occurs, an empty filter is set, so that the completion popup \n // will be filled with all the hAtom keywords.\n strFilter = Filter.EMPRTY_STRING;\n }\n\n // Lista completa dei tag/parole chiave hAtom\n List<String> hatomTags = TagCache.getCache().getTagList();\n\n // Gets the hAtom keywords that match the given filter value.\n for (String tag : hatomTags) {\n boolean startWithFilter = tag.startsWith(strFilter); \n if (!tag.equals(Filter.EMPRTY_STRING) && startWithFilter) {\n completionRS.addItem(new HatomCompletionItem(tag, filter.getFilterOffset(), caretOffset));\n }\n }\n\n // This is required by the Netbeans API docs.\n // After finish() is invoked, no further modifications to the result set are allowed.\n completionRS.finish();\n\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n List<String> mListSuggest = new ArrayList<>();\n for (String search : mSearchList){\n if (search.toLowerCase().contains(mSearchBar.getText().toLowerCase()))\n mListSuggest.add(search);\n }\n\n mSearchBar.setLastSuggestions(mListSuggest);\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "@Override\n public void onGetSuggestionResult(MKSuggestionResult mkSuggestionResult, int i) {\n if (getActivity() != null && mkSuggestionResult != null\n && mkSuggestionResult.getAllSuggestions() != null) {\n mSuggestAdapter.clear();\n List<MKSuggestionInfo> sugList = mkSuggestionResult.getAllSuggestions();\n for (MKSuggestionInfo info : sugList) {\n if (info.key != null) {\n mSuggestAdapter.add(info.key);\n }\n }\n mSuggestAdapter.notifyDataSetChanged();\n }\n }", "@Override\n\tpublic void search() {\n\t}", "public void requestSuggestions(SuggestOracle.Request req, SuggestOracle.Callback callback) {\n fetchPostalCodes(req, callback);\n }", "public void search() {\r\n \t\r\n }", "@Override\n\t\tpublic void onGetSuggestionResult(MKSuggestionResult arg0, int arg1) {\n\n\t\t}", "public void showSuggestionList() {\n \t\tif (isAttached()) {\n \t\t\tcurrentText = null;\n \t\t\trefreshSuggestions();\n \t\t}\n \t}", "public String[][] findSuggestions(String w) {\n ArrayList<String> suggestions = new ArrayList<>();\n String word = w.toLowerCase();\n // parse through the word - changing one letter in the word\n for (int i = 0; i < word.length(); i++) {\n // go through each possible character difference\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n // get the character that will change in the word\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n \n // if the selected character is not the same as the character to change - avoids getting the same word as a suggestion\n if (c != word.charAt(i)) {\n // change the character in the word\n String check = word.substring(0, i) + c.toString() + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - adding one letter to the word\n for (int i = 0; i < word.length(); i++) {\n // if the loop is not on the last charcater\n if (i < word.length() - 1) {\n // check words with one character added between current element and next element\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word.substring(0, i) + c.toString() + ((i < word.length()) ? word.substring(i, word.length()) : \"\");\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n // if the loop is on the last character\n else {\n // check the words with one character added to the end of the word\n for (int j = 0; j < Node.NUM_VALID_CHARS; j++) {\n Character c = (char) ((j < 26) ? j + 'a' : '\\'');\n\n // add the character to the word\n String check = word + c;\n\n // if the new word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n }\n }\n \n // parse through the word - removing one letter from the word\n for (int i = 0; i < word.length(); i++) {\n // remove the chracter at the selected index from the word\n String check = word.substring(0, i) + ((i + 1 < word.length()) ? word.substring(i + 1, word.length()) : \"\");\n\n // if the chenged word is in the dictionary, add it to the list of suggestions\n if (this.checkDictionary(check)) {\n suggestions.add(check);\n }\n }\n \n String[][] rtn = new String[suggestions.size()][1];\n for (int i = 0, n = suggestions.size(); i < n; i++) {\n rtn[i][0] = suggestions.get(i);\n }\n \n return rtn;\n }", "public String getSuggestedText() {\n return suggestedText;\n }", "public void refreshSuggestionList() {\n \t\tif (isAttached()) {\n \t\t\trefreshSuggestions();\n \t\t}\n \t}", "public void suggestions(String mispelledPattern) \r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t// String scanned to find the pattern.\r\n\t\t\tString line = \" \";\r\n\t\t\tString reg_ex = \"[\\\\w]+[@$%^&*()!?=.{}\\b\\n\\t]*\";\r\n\r\n\t\t\t// Create a Pattern object\r\n\t\t\tPattern pat = Pattern.compile(reg_ex);\r\n\t\t\t// Creating matcher object.\r\n\t\t\tMatcher my_match = pat.matcher(line);\r\n\t\t\tint file_Number = 0;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tFile my_directory = new File(\"C:\\\\Users\\\\Asmita\\\\eclipse-workspace\\\\MyWebSearchEngine\\\\src\\\\HTMLFiles\");\r\n\t\t\t\tFile[] fileArray = my_directory.listFiles();\r\n\t\t\t\tfor (int i = 0; i < fileArray.length; i++)\r\n\r\n\t\t\t\t{\r\n\t\t\t\t\tfindWord(fileArray[i], file_Number, my_match, mispelledPattern);\r\n\t\t\t\t\tfile_Number++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSet keys = new HashSet();\r\n\t\t\t\tInteger val = 0;\r\n\t\t\t\tInteger value = 1;\r\n\t\t\t\t\r\n\t\t\t\tint counter = 0;\r\n\r\n\t\t\t\tSystem.out.println(\"\\nDid you mean? \");\r\n\t\t\t\tfor (Map.Entry entry : numbers.entrySet()) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (val == entry.getValue()) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (value == entry.getValue()) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (counter == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" or \" + entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} \r\n\t\t\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Exception:\" + e);\r\n\t\t\t} \r\n\t\t\tfinally \r\n\t\t\t{\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch (Exception e) \r\n\t\t{\r\n\r\n\t\t}\r\n\t}", "void AddSuggestion(String babyName) {\n\r\n\tT.insert(babyName);\r\n\t\r\n\r\n }", "public void showSuggestionsFromServer() {\n \t\tsuggestionReadyCallback.onSuggestionsReady();\n \t}", "public void updateNewSuggestParamOracle() {\n\t\tif (searchSuggestDefineTextBox != null) {\n\t\t\tCQLSuggestOracle cqlSuggestOracle = new CQLSuggestOracle(parameterNameMap.values());\n\t\t}\n\t}", "public void refreshSuggestions() {\n resetSections(/* alwaysAllowEmptySections = */false);\n }", "public void setSuggestedValues (String suggestedValues) {\n this.suggestedValues = suggestedValues;\n }", "private void loadSuggestions(final ArrayList<MutualFund_CustomClass> mSuggestionArrayList) {\n new VolleyClass(MainActivity.this, \"MainActivity\").volleyPostData(\"<YOUR_WEBSERVICE_URL>\", /*\"<YOUR_JSON_OBJECT>\"*/, new VolleyResponseListener() {\n @Override\n public void onResponse(JSONObject response) throws JSONException {\n for (int i = 0; i < response.getJSONArray(\"data\").length(); i++) {\n mutualFundHouseObj = new MutualFund_CustomClass();\n mutualFundHouseObj.setFundId(response.getJSONArray(\"data\").optJSONObject(i).optString(\"fundid\"));\n mutualFundHouseObj.setFundName(response.getJSONArray(\"data\").optJSONObject(i).optString(\"fundname\"));\n mSuggestionArrayList.add(mutualFundHouseObj);\n }\n //INSTANTIATING CUSTOM ADAPTER\n mMutualFundAdapter = new MutualFund_CustomAdapter(MainActivity.this, mSuggestionArrayList);\n mAutoCompleteTextView.setThreshold(1);//will start working from first character\n mAutoCompleteTextView.setAdapter(mMutualFundAdapter);//setting the adapter data into the AutoCompleteTextView\n\n }\n\n @Override\n public void onError(String message, String title) {\n\n }\n });\n }", "protected boolean hasSuggestions() {\n return hasIntrinsicSuggestions() || hasExtrinsicSuggestions();\n }", "public String getSuggestSelection() {\n/* 113 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n\tpublic void testSearchBasedOnRequest2() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tPreference prefs = prefManager.getUserPreference();\n\t\tprefs.setThreshold(10000);\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"lokeyanhao\", prefs, true);\n\t\tassertTrue(sugg.size() > 0);\n\t\tassertTrue(sugg.get(0).getType() == Suggestion.ENTITY);\n\t}", "public void execFuzzySearchCustomWordFunc(){\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n map.put(\"searchParam\",this.searchParam);\n }\n\n int idenfilter = 0 ;\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n idenfilter = 1;\n map.put(\"species\",this.searchSpecies.trim());\n }\n\n\n if(this.searchTrait != null && this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n idenfilter =1;\n List traitlist = new ArrayList();\n if(this.searchTrait.indexOf(\",\")>-1){\n String [] traits = this.searchTrait.split(\",\");\n if(traits != null && traits.length>0){\n for(String tr:traits){\n traitlist.add(tr);\n }\n }\n }else{\n traitlist.add(this.searchTrait);\n }\n map.put(\"traitlist\", traitlist) ;\n }\n\n if(this.pvalue != null && this.pvalue.equals(\"null\")==false && this.pvalue.length()>0 ){\n idenfilter =1;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n //this is search customword\n List<SearchItemBean> searchlist = (List<SearchItemBean>) baseService.findResultList(\"cn.big.gvk.dm.Search.selectCustomWordBySearch\",map);\n if( searchlist != null ){\n gwasAssociationList = new ArrayList<GwasAssociationBean>() ;\n mapGeneBeanList = new ArrayList<MapGeneBean>();\n for(SearchItemBean tmpbean : searchlist){\n if(tmpbean != null ){\n if(tmpbean.getItemType() == 1){\n //selecTraitByFuzzySearch\n Map cmp = new HashMap();\n cmp.put(\"traitId\", tmpbean.getItemId());\n GwasAssociationBean tmpgwas = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selecTraitByFuzzySearch\",cmp);\n if(tmpgwas != null ){\n //trait count\n Map cmap = new HashMap();\n cmap.put(\"traitId\",tmpgwas.getTraitId()) ;\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n\n }\n GwasAssociationBean tg_bean = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByTraitId\",cmap);\n if(tg_bean != null ){\n tmpgwas.setTraitCount(tg_bean.getGwasCount());\n }\n\n List<TermInformationBean> tilist = (List<TermInformationBean>)baseService.findResultList(\"cn.big.gvk.dm.Term.selectTermDefinition\",tmpgwas.getTraitId());\n String s=\"\";\n if(tilist != null && tilist.size()>0 ){\n for(TermInformationBean tb:tilist ){\n if(tb!= null && tb.getTermDefinition() != null ){\n s+= tb.getTermDefinition() +\";\";\n }\n\n }\n }\n if(s.length()>0){\n s= s.substring(0, s.length()-1) ;\n }\n tmpgwas.setTermDefinition(s);\n\n //study count\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByTraitid\",cmap);\n if(tg_bean1 != null ){\n tmpgwas.setGwasCount(tg_bean1.getGwasCount());\n }\n gwasAssociationList.add(tmpgwas) ;\n }\n }else if(tmpbean.getItemType() == 2){\n Map cmp = new HashMap();\n cmp.put(\"gid\",tmpbean.getItemId()) ;\n MapGeneBean mgb = (MapGeneBean) baseService.findObjectByObject(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",cmp);\n if(mgb != null ){\n Map t = new HashMap();\n t.put(\"gId\",mgb.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n mgb.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n mgb.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n mgb.setPublicationCount(publication.getPublicationCount());\n }\n mapGeneBeanList.add(mgb) ;\n\n }\n\n }\n }\n }\n }\n\n StringBuffer sb = new StringBuffer();\n //generate hidden html table and then use tableExport.js export\n if(gwasAssociationList != null && gwasAssociationList.size()>0){\n for(GwasAssociationBean gwas : gwasAssociationList){\n sb.append(gwas.getTraitName()).append(\"\\t\").append(gwas.getTermDefinition()).append(\"\\t\").append(gwas.getTraitCount()).append(\"\\t\").append(gwas.getGwasCount()).append(\"\\n\");\n }\n }\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n\n\n }", "@Test\n\tpublic void testSearchBasedOnRequest1() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tPreference prefs = prefManager.getUserPreference();\n\t\tprefs.setThreshold(10000);\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"Flavorful\", prefs, true);\n\t\tassertTrue(sugg.size() > 0);\n\t\tassertTrue(sugg.get(0).getType() == Suggestion.SENTENCE);\n\t}", "private void populateAdapter(String query) {\n // Create a matrixcursor, add suggtion strings into cursor\n final MatrixCursor c = new MatrixCursor(new String[]{ BaseColumns._ID, SearchManager.SUGGEST_COLUMN_TEXT_1 });\n List<String> suggestions = History.getSuggestion(query);\n String str = \"\";\n for (int i=0;i<suggestions.size();i++){\n c.addRow(new Object[] {i, suggestions.get(i)});\n str += suggestions.get(i);\n }\n Toast.makeText(context, str,Toast.LENGTH_SHORT).show();\n mAdapter.changeCursor(c);\n }", "public void search() {\n }", "public void getSuggestedFriends(String un, UserFriends uf) {\n MongoCollection<Document> collRU = db.getCollection(\"registeredUser\");\n\n if (!uf.suggestion.isEmpty())\n uf.suggestion.clear();\n\n FindIterable<Document> allDocs = collRU.find(); // get all documents\n MongoCursor<Document> cursor = allDocs.iterator(); // set up cursor to iterate rows of documents\n try {\n while (cursor.hasNext()) {\n String nextUsername = cursor.next().getString(\"username\");\n if (!nextUsername.equals(un) && !uf.friendsList.contains(nextUsername)) {\n uf.suggestion.add(nextUsername);\n }\n }\n } finally {\n cursor.close();\n }\n }", "public List<Question> autocompleteQuestion(String text) {\n List<Question> questions = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n questions = dbb.autocompleteQuestion(text);\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return questions;\n }", "public void update() {\n suggestions = model.getDebtRepaymentSuggestions();\n }", "public String getSuggestedValues () {\n return suggestedValues;\n }", "@Override\n public boolean onSuggestionSelect(int position) {\n return true;\n }", "public void generateList(SearchAutoCompleteListener searchAutoCompleteListener) {\n RequestQueue queue= RequestQueueSingleton.getInstance(this.context).getRequestQueue();\n queue.cancelAll(\"search\");\n if (this.nameOrCode.length() > 0) {\n StringRequest request = new StringRequest(Request.Method.GET,\n Api.autoCompleteString +\"?q=\"+this.nameOrCode,\n (String response) -> {\n try {\n JSONObject data = new JSONObject(response);\n JSONArray placearray = data.getJSONArray(\"places\");\n\n if (placearray.length() == 0) {\n Log.d(TAG,\"Place Not Found\");\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n } else {\n ArrayList<Place> searchPlaces = JsonUtils.getPlaces(placearray);\n searchAutoCompleteListener.onPlaceListReceived(searchPlaces);\n }\n } catch (JSONException e) {\n searchAutoCompleteListener.onFailure(JsonUtils.logError(TAG,response));\n }\n },\n error ->{\n Log.d(TAG,JsonUtils.handleResponse(error));\n searchAutoCompleteListener.onFailure(JsonUtils.handleResponse(error));\n }){\n };\n request.setTag(\"search\");\n queue.add(request);\n }\n }", "public String[] showSuggestionDialog(String room){\n\t\tframe.enableSuggestBtn(false);\n\t\tgame.endTurn();\n\t\tString characterSuggestion = showCharacterSuggestions(room);\n\t\tString weaponSuggestion = showWeaponSuggestions(room);\n\t\treturn new String[]{frame.unDave(characterSuggestion), frame.unDave(weaponSuggestion)};\n\t}", "public interface DictionaryCorrectior {\n\n\t/**\n\t * get correction word that have the most possibility from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String getCorrectionWord(String misspell);\n\t\n\t\n\t\n\t/**\n\t * get a list of correction words from the misspelled text\n\t * @author liyuan\n\t * \n\t */\n\tpublic String[] getCorrectionList(String misspell);\n}", "@RequestMapping(\"/suggestions\")\n public SuggestionWrapper greeting(@RequestParam(value=\"q\", defaultValue=\"\") String strQuery,\n \t\t @RequestParam(value=\"latitude\", defaultValue=\"\") String strLatitude,\n \t\t @RequestParam(value=\"longitude\", defaultValue=\"\") String strLongitude)\n {\n \tList<City> lstCity = m_citiesHandler.findCitiesStartsWith(strQuery);\n\n // Calculate the score for each city\n m_citiesHandler.calculateScore(lstCity, strQuery, strLatitude, strLongitude);\n \n \t// Convert the City class into suggestions\n List<Suggestion> lstSuggestions = m_citiesHandler.convertToSuggestions(lstCity);\n \n // Sort the list by score \n Collections.sort(lstSuggestions, Suggestion.SuggestionScoreComparator);\n \n // Keep 5 best options\n lstSuggestions = lstSuggestions.subList(0, Math.min(5, lstSuggestions.size()));\n \n // Return the suggestions\n SuggestionWrapper cWrapper = new SuggestionWrapper();\n cWrapper.setSuggestions(lstSuggestions);\n return cWrapper;\n }", "@Test\n\tpublic void testSearchBasedOnRequest4() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"Flavorful\", null, true);\n\t\tassertTrue(sugg.size() == 0);\n\t}", "public void complete() {\r\n\t\tcomplete(suggestBox.getText());\r\n\t}", "private void addCustomWords() {\r\n\r\n }", "@Ignore @Test\n public void doCompletion() {\n controller.getCompletionList(INPUT,ONTOLOGY,FIELD,bean);\n List<CompletionTerm> compList = bean.getCompletionTermList();\n Assert.assertNotNull(compList);\n Assert.assertTrue(\"Should have >0 comp terms\",compList.size()>0);\n boolean containsInput = false;\n for (CompletionTerm t : compList)\n containsInput |= t.toString().contains(INPUT);\n Assert.assertTrue(\"Should contain \"+INPUT,containsInput);\n }", "@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tvalidarAvance(s.toString());\n\t\t\t\t\t\t\t\t\t\n\t\t\t}", "public void addSuggestionSelection(String cardName) {\n SuspectCard suspect = findSuspectCard(cardName);\n RoomCard room = findRoomCard(currentPlayersTurn.getPiece().getLocation().getBelongsTo().getName());\n WeaponCard weapon = findWeaponCard(cardName);\n\n this.suggestionChoices.setRoom(room);\n if (findRoomCard(cardName) != null) {\n logMessage(\"The room for a suggestion can only be the room you are currently in.\");\n return;\n }\n if (suspect != null) {\n this.suggestionChoices.setSuspect(suspect);\n logMessage(currentPlayersTurn.getPiece().getName() + \" selected \"\n + cardName + \" as part of their suggestion.\");\n return;\n }\n if (weapon != null) {\n this.suggestionChoices.setWeapon(weapon);\n logMessage(currentPlayersTurn.getPiece().getName() + \" selected \"\n + cardName + \" as part of their suggestion.\");\n return;\n }\n }", "public void SearchTutor() {\n\t\t\n\t}", "protected abstract void showHint();", "@Override\n public void onSearchConfirmed(CharSequence text) {\n searchForFoods(text);\n }", "public void checkSuggestions(UIComponent uiComponent)\r\n {\r\n if (uiComponent instanceof Html5BaseInputText)\r\n {\r\n Html5BaseInputText component = (Html5BaseInputText) uiComponent;\r\n\r\n /*\r\n * if 'datalist' is defined, then other suggestion mechanisms(with f:selectItem(s) children or 'suggestions'\r\n * attribute) should not be used\r\n */\r\n String idOfDatalist = component.getDataList();\r\n if (idOfDatalist != null && !idOfDatalist.isEmpty() && shouldGenerateDatalist(component))\r\n {\r\n // WIKI: put a wiki page about this error\r\n throw new FacesException(\r\n \"Either \\\"list\\\" attribute or \\\"suggestions\\\" attribute and children with type SelectItem mechanism can be used for suggestions. Component \" + RendererUtils.getPathToComponent(uiComponent) + \"has both!\");\r\n }\r\n }\r\n else\r\n {\r\n throw new IllegalArgumentException(\r\n \"Component \" + RendererUtils.getPathToComponent(uiComponent) + \" is not instance of Html5BaseInputText. HtmlTextInputSuggestionRendererHelper is unable to check suggestions.\");\r\n }\r\n\r\n }", "private void IntentSuggestions() {\n\n if (isValidPhone(content_txt.getText().toString())) {\n sugg_button.setText(\"Call\");\n\n }\n else {\n isValidURL(content_txt.getText().toString());\n sugg_button.setText(\"Open in Browser\");\n\n }\n }", "private void allWordsListMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_allWordsListMouseClicked\n \n String selectedWord = this.getAllWordsList().getSelectedValue();\n char firstLetterOfWord = selectedWord.charAt(0);\n \n // find the index of the corresponding tree tot he first letter of the word\n int index = -1;\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetterOfWord)\n {\n index = i;\n i = lexiNodeTrees.size();\n }\n }\n \n // find the word in the tree\n WordDefinition wordQuery = lexiNodeTrees.get(index).searchWord(selectedWord, true).get(0);\n \n // update definition field\n this.getDefinitionTextArea().setText(wordQuery.getDefinition());\n \n // display the word in the search field as well\n this.getSearchField().setText(selectedWord);\n \n // get search suggestion too\n searchWord();\n \n // select the same word in the search suggestion list \n ListModel<String> modelList = getSearchSuggestionList().getModel();\n \n for(int i = 0 ; i < modelList.getSize() ; i++)\n {\n if(modelList.getElementAt(i).equals(selectedWord))\n {\n getSearchSuggestionList().setSelectedIndex(i);\n i = modelList.getSize();\n }\n }\n \n }", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\t\t\tString keyWords = etDialogSearch.getText()\r\n\t\t\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\t\t\tif (!keyWords.equals(\"\")) {\r\n\t\t\t\t\t\t\t\tList<Note> notes = databaseHelper\r\n\t\t\t\t\t\t\t\t\t\t.searchNotes(keyWords);\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < notes.size(); i++) {\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(notes.get(i).toString());\r\n\t\t\t\t\t\t\t\t\tdialogAdapter = new NoteAdapter(\r\n\t\t\t\t\t\t\t\t\t\t\tNoteListActivity.this, notes, false);\r\n\t\t\t\t\t\t\t\t\tlvDialog.setAdapter(dialogAdapter);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t\t}", "private void loadAutoCompleteData() {\n List<String> labelsItemName = db.getAllItemsNames();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsItemName);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchItem.setAdapter(dataAdapter);\n\n // List - Get Menu Code\n List<String> labelsMenuCode = db.getAllMenuCodes();\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter1 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsMenuCode);\n\n // Drop down layout style - list view with radio button\n dataAdapter1.setDropDownViewResource(android.R.layout.simple_list_item_1);\n\n // attaching data adapter to spinner\n autoCompleteTextViewSearchMenuCode.setAdapter(dataAdapter1);\n\n POS_LIST = ArrayAdapter.createFromResource(this, R.array.poscode, android.R.layout.simple_spinner_item);\n spnr_pos.setAdapter(POS_LIST);\n\n // barcode\n List<String> labelsBarCode = db.getAllBarCodes();\n ArrayAdapter<String> dataAdapter11 = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1,\n labelsBarCode);\n dataAdapter11.setDropDownViewResource(android.R.layout.simple_list_item_1);\n autoCompleteTextViewSearchItemBarcode.setAdapter(dataAdapter11);\n\n }", "@In String search();", "@Override\n\tpublic List<Literature> searchKeywords() {\n\t\treturn null;\n\t}", "@Override\n public void onTextChanged(CharSequence userInput, int start, int before, int count) {\n System.out.println(\"User input: \" + userInput);\n\n MainActivity mainActivity = ((MainActivity) context);\n /*String query= \"\";\n if(who == 1)\n query = mainActivity.from;\n else if(who == 2)\n query = mainActivity.to;\n */\n ArrayList<String> ddlSuggestions = Map.getSimilarNamesFromName(userInput.toString());\n\n // update the adapater\n if(who == 1) {\n mainActivity.fromAdapter = new ArrayAdapter<String>(mainActivity, android.R.layout.simple_dropdown_item_1line, ddlSuggestions);\n mainActivity.fromAdapter.notifyDataSetChanged();\n mainActivity.fromAutoComplete.setAdapter(mainActivity.fromAdapter);\n System.out.println(\"Called1\");\n } else if(who == 2) {\n mainActivity.toAdapter = new ArrayAdapter<String>(mainActivity, android.R.layout.simple_dropdown_item_1line, ddlSuggestions);\n mainActivity.toAdapter.notifyDataSetChanged();\n mainActivity.toAutoComplete.setAdapter(mainActivity.toAdapter);\n System.out.println(\"Called2\");\n }\n }", "@Override\n public void onSearchTermChanged() {\n }", "public String[] getCorrectionList(String misspell);", "public SuggestedTerm(String term, int editDistance){\n this.term = term;\n this.editDistance = editDistance;\n }", "public void setSuggestions(ArrayList<PersonDTO>persons){\n personsMap=new HashMap<>();\n for(PersonDTO person:persons){\n personsMap.put(person.getName()+\" \"+person.getSurname(),person);\n }\n }", "public void setSuggestion(String value) {\n setAttributeInternal(SUGGESTION, value);\n }", "public void execFuzzySearchTraitFunc(){\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n System.out.println(\"=============search param\"+this.searchParam );\n map.put(\"searchParam\",this.searchParam);\n }\n\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n map.put(\"species\",this.searchSpecies);\n System.out.println(\"species=\"+this.searchSpecies);\n }\n\n if(this.searchTrait != null&& this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n\n\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null && this.pvalue.equals(\"null\")==false&& this.pvalue.length()>0){\n\n\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n\n\n gwasAssociationList =(List<GwasAssociationBean>) baseService.findResultList(\"cn.big.gvk.dm.GwasAssociation.selecTraitByFuzzySearch\",map);\n\n if(gwasAssociationList != null && gwasAssociationList.size()>0){\n\n for(GwasAssociationBean gwas: gwasAssociationList){\n\n //trait count\n Map cmap = new HashMap();\n cmap.put(\"traitId\",gwas.getTraitId()) ;\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n\n }\n GwasAssociationBean tg_bean = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByTraitId\",cmap);\n if(tg_bean != null ){\n gwas.setTraitCount(tg_bean.getGwasCount());\n }\n\n List<TermInformationBean> tilist = (List<TermInformationBean>)baseService.findResultList(\"cn.big.gvk.dm.Term.selectTermDefinition\",gwas.getTraitId());\n String s=\"\";\n if(tilist != null && tilist.size()>0 ){\n for(TermInformationBean tb:tilist ){\n if(tb!= null && tb.getTermDefinition() != null ){\n s+= tb.getTermDefinition() +\";\";\n }\n\n }\n }\n if(s.length()>0){\n s= s.substring(0, s.length()-1) ;\n }\n gwas.setTermDefinition(s);\n\n //study count\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByTraitid\",cmap);\n if(tg_bean1 != null ){\n gwas.setGwasCount(tg_bean1.getGwasCount());\n }\n\n }\n\n\n }\n\n StringBuffer sb = new StringBuffer();\n if(this.gwasAssociationList != null && this.gwasAssociationList.size()>0){\n for(GwasAssociationBean gwas: gwasAssociationList){\n sb.append(gwas.getTraitName()).append(\"\\t\").append(gwas.getTermDefinition()).append(\"\\t\")\n .append(gwas.getTraitCount()).append(\"\\t\").append(gwas.getGwasCount()).append(\"\\n\");\n }\n }\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n\n }", "void search();", "void search();", "public String getSuggestion() {\n return (String)getAttributeInternal(SUGGESTION);\n }", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "public List<T> suggestFriends(T name) {\n List<T> fSuggestions = new ArrayList<>();\n List<T> names = map.get(name);\n for(T n: names) {\n List<T> fNames = map.get(n);\n for(T fn: fNames) {\n if(!names.contains(fn) && !fn.equals(name)) {\n fSuggestions.add(fn);\n }\n }\n }\n return fSuggestions;\n }", "private void initAutoCompleteAdapter(){\n adapterAcGeneric = new GenericAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_generics.setThreshold(0);\n ac_generics.setAdapter(adapterAcGeneric);\n ac_generics.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n genericName = adapterAcGeneric.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_generics.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n genericName = \"\";\n handlerGeneric.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerGeneric.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerGeneric = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_generics.getText())) {\n // Log.d(\"DEBUG\", \"in generic\");\n makeApiCall(ac_generics.getText().toString(), 1);\n }\n }\n return false;\n }\n });\n\n\n adapterAcCompany = new CompanyAcAdapter(getActivity(),\n android.R.layout.simple_dropdown_item_1line);\n ac_companies.setThreshold(0);\n ac_companies.setAdapter(adapterAcCompany);\n ac_companies.setOnItemClickListener(\n new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n //selectedText.setText(autoSuggestAdapter.getObject(position));\n companyName = adapterAcCompany.getObject(position);\n makeApiCallForSearch();\n CommonMethods.hideKeybaord(getActivity());\n }\n });\n ac_companies.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int\n count, int after) {\n }\n @Override\n public void onTextChanged(CharSequence s, int start, int before,\n int count) {\n companyName = \"\";\n handlerCompany.removeMessages(TRIGGER_AUTO_COMPLETE);\n handlerCompany.sendEmptyMessageDelayed(TRIGGER_AUTO_COMPLETE,\n AUTO_COMPLETE_DELAY);\n }\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n handlerCompany = new Handler(new Handler.Callback() {\n @Override\n public boolean handleMessage(Message msg) {\n if (msg.what == TRIGGER_AUTO_COMPLETE) {\n if (!TextUtils.isEmpty(ac_companies.getText())) {\n //Log.d(\"DEBUG\", \"in company\");\n makeApiCall(ac_companies.getText().toString(), 2);\n }\n }\n return false;\n }\n });\n\n\n ac_companies.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"1\");\n makeApiCall(\"\", 2);\n\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n ac_generics.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View view, boolean hasFocus) {\n if (hasFocus) {\n Log.d(\"DEBUG\", \"2\");\n makeApiCall(\"\", 1);\n // Toast.makeText(getActivity(), \"Got the focus\", Toast.LENGTH_SHORT).show();\n } else {\n // Toast.makeText(getActivity(), \"Lost the focus\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n\n }", "public ArrayListFoodAdapter(Context context, FoodDAO foodDAO, AutoCompleteTextView refAutocomplete) {\n super(foodDAO.getAllFood());\n this.foodDAO = foodDAO;\n mResults = foodDAO.getAllFood();\n// refAutocomplete.setAdapter(this);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_participant, menu);\n sv = (SearchView) MenuItemCompat.getActionView(menu.findItem(R.id.action_busqueda));\n contentResolver = getContentResolver();\n// Cursor cursor = contentResolver.query(ParticipantContent.buildParticipantUri(\"_\"),\n// null, null, null, null);\n mCursorAdapter = participantFragment.recList.getAdapter();\n// = new CustomCursorSearchAdapter(\n// getApplicationContext(), layout, cursor,\n// from, to, 0);\n //sv.setSuggestionsAdapter(mCursorAdapter);\n sv.setOnSuggestionListener(new SearchView.OnSuggestionListener() {\n @Override\n public boolean onSuggestionSelect(int position) {\n// Cursor cursor = (Cursor) sv.getSuggestionsAdapter().getItem(position);\n// String feedName = cursor.getString(1);\n// sv.setQuery(feedName, false);\n// sv.clearFocus();\n return true;\n }\n\n @Override\n public boolean onSuggestionClick(int position) {\n// Cursor c = mCursorAdapter.getCursor();\n// if (c.moveToPosition(position)) {\n// String cad = c.getString(1);\n// Util.log(TAG, cad);\n// Util.enviar(ParticipantActivity.this, cad, \"\", \"\", \"\");\n// sv.clearFocus();\n// }\n return true;\n }\n });\n sv.setOnSearchClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n }\n });\n sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n\n @Override\n public boolean onQueryTextSubmit(String arg0) {\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String arg0) {\n populateAdapter(arg0);\n return true;\n }\n });\n\n return true;\n }", "public void updateNewSuggestFuncOracle() {\n\t\tif (searchSuggestFuncTextBox != null) {\n\t\t\tCQLSuggestOracle cqlSuggestOracle = new CQLSuggestOracle(funcNameMap.values());\n\t\t}\n\t}" ]
[ "0.69448435", "0.6917489", "0.67831314", "0.6753838", "0.668573", "0.6580611", "0.6560577", "0.6535319", "0.6515792", "0.65066", "0.64775", "0.6459303", "0.64523435", "0.6441421", "0.63866436", "0.6353077", "0.63521934", "0.6348765", "0.63352144", "0.6304979", "0.6303775", "0.6297823", "0.62975645", "0.62889224", "0.62728083", "0.6268765", "0.62613", "0.6213626", "0.6209758", "0.6209212", "0.61544085", "0.6122382", "0.61155504", "0.6102975", "0.6087973", "0.6065206", "0.60554653", "0.6051032", "0.6039009", "0.6035831", "0.6012022", "0.601048", "0.60093325", "0.6006343", "0.6002462", "0.59975517", "0.59843886", "0.5974328", "0.597368", "0.59692395", "0.5965783", "0.5965619", "0.59545034", "0.59447235", "0.5941144", "0.59268767", "0.5926795", "0.5895469", "0.5891543", "0.5888427", "0.5882004", "0.5868714", "0.58587205", "0.5858026", "0.58443904", "0.58428335", "0.58402777", "0.5822725", "0.5820385", "0.5800962", "0.5799647", "0.578115", "0.577648", "0.5775957", "0.5768089", "0.57666117", "0.57479763", "0.5742799", "0.5726854", "0.57215345", "0.5720342", "0.57198095", "0.56948346", "0.56857854", "0.5675676", "0.56723154", "0.5671299", "0.56268144", "0.56230366", "0.56176764", "0.56166416", "0.5610088", "0.5610088", "0.56082034", "0.5604036", "0.55997604", "0.5596937", "0.55904037", "0.55828905", "0.558052" ]
0.5882632
60
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.regist); signupbutton = (ImageView) findViewById(R.id.regist_okbutton); id = (EditText) findViewById(R.id.regist_userid); password = (EditText) findViewById(R.id.regist_userpassword); passwordre = (EditText) findViewById(R.id.regist_userpasswordre); email = (EditText) findViewById(R.id.regist_useremail); userProfile = (ImageView) findViewById(R.id.regist_userimage); pictureSelector = new PictureSelector(this, true); imageSelectDialog = pictureSelector.createDialog(); userProfile.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { imageSelectDialog.show(); } }); signupbutton.setOnClickListener(new Button.OnClickListener() { @Override public void onClick(View v) { String idStr = id.getText().toString(); String passStr = password.getText().toString(); String passReStr = passwordre.getText().toString(); String emailStr = email.getText().toString(); if (idStr.equals("") || passStr.equals("") || emailStr.equals("") || passReStr.equals("")) { Toast.makeText(RegistActivity.this, "모든 항목을 입력해 주십시오.", Toast.LENGTH_LONG).show(); return; } if (!passStr.equals(passReStr)) { Toast.makeText(RegistActivity.this, "비밀번호와 비밀번호 확인에 입력하신 비밀번호가 서로 다릅니다.", Toast.LENGTH_LONG).show(); return; } DataRequester.registerID(idStr, passStr, emailStr, pictureSelector.getFileName(), RegistActivity.this); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "protected void onCreate() {\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\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}", "@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\tsetview();\r\n\t}", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n public void onCreate() {\n initData();\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 public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "protected void onFirstTimeLaunched() {\n }", "@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }", "@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 public void onActivityCreated(Activity activity, Bundle bundle) {}", "@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 onActivityCreated(Activity activity, Bundle bundle) {\n }", "@Override\n public void onCreate() {\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}", "@Override\n public void onCreate() {\n\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}", "public void onCreate() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@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\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}", "@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }", "@Override\n public void onCreate()\n {\n\n\n }", "@Override\n\tprotected void onCreate() {\n\t}", "@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\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "public void onCreate();", "public void onCreate();", "@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 public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\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\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}", "@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}", "@Override\n 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 }", "@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 }", "@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 }", "@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 }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@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\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }", "@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\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.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }", "@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\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@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 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\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }" ]
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879", "0.74805456", "0.7475343", "0.7469598", "0.7469598", "0.7455178", "0.743656", "0.74256307", "0.7422192", "0.73934627", "0.7370002", "0.73569906", "0.73569906", "0.7353011", "0.7347353", "0.7347353", "0.7333878", "0.7311508", "0.72663945", "0.72612154", "0.7252271", "0.72419256", "0.72131634", "0.71865886", "0.718271", "0.71728176", "0.7168954", "0.7166841", "0.71481615", "0.7141478", "0.7132933", "0.71174103", "0.7097966", "0.70979583", "0.7093163", "0.7093163", "0.7085773", "0.7075851", "0.7073558", "0.70698684", "0.7049258", "0.704046", "0.70370424", "0.7013127", "0.7005552", "0.7004414", "0.7004136", "0.69996923", "0.6995201", "0.69904065", "0.6988358", "0.69834954", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69820535", "0.69783133", "0.6977392", "0.69668365", "0.69660246", "0.69651115", "0.6962911", "0.696241", "0.6961096", "0.69608897", "0.6947069", "0.6940148", "0.69358927", "0.6933102", "0.6927288", "0.69265485", "0.69247025" ]
0.0
-1
Created by RookieWangZhiWei on 2018/7/26.
public interface ActionService { boolean add(ActionDto actionDto); boolean remove(Long id); boolean modify(ActionDto actionDto); ActionDto getById(Long id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\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 grabar() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo4359a() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n protected void initialize() \n {\n \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 }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@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 }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo6081a() {\n }", "Petunia() {\r\n\t\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n }", "public void mo55254a() {\n }", "public Pitonyak_09_02() {\r\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "Constructor() {\r\n\t\t \r\n\t }", "private void poetries() {\n\n\t}", "@Override\n public void initialize() {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo9848a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private TMCourse() {\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}", "private void init() {\n\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public contrustor(){\r\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "protected void mo6255a() {\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n public void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n public void initialize() { \n }", "private UsineJoueur() {}", "@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 public String toString() {\n return \"\";\n }", "private zza.zza()\n\t\t{\n\t\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private void m50366E() {\n }", "@Override\n public void initialize() {}" ]
[ "0.6237934", "0.6110282", "0.58466095", "0.58440113", "0.5831396", "0.5831396", "0.5783648", "0.57823515", "0.57525706", "0.57416445", "0.5740759", "0.5719454", "0.571015", "0.567804", "0.5677113", "0.56700313", "0.5658321", "0.56476676", "0.56389123", "0.5635297", "0.5635297", "0.5635297", "0.5635297", "0.5635297", "0.5635297", "0.5635297", "0.56303495", "0.5622637", "0.56117463", "0.56026745", "0.5591273", "0.5583747", "0.55686706", "0.5566353", "0.5566353", "0.5566353", "0.5566353", "0.5566353", "0.5566353", "0.55462486", "0.5545107", "0.5545107", "0.5544113", "0.55358166", "0.55349165", "0.5533261", "0.55186945", "0.55087113", "0.5483695", "0.54827213", "0.5481041", "0.546321", "0.5462382", "0.5449699", "0.544813", "0.5447157", "0.54261804", "0.5425948", "0.5425343", "0.5425343", "0.5424871", "0.5421716", "0.5421716", "0.5421716", "0.5421716", "0.5421716", "0.5419396", "0.54095143", "0.5408646", "0.53992325", "0.53971916", "0.5396254", "0.5396254", "0.5396254", "0.5395695", "0.5395695", "0.5395695", "0.5394246", "0.5386473", "0.5384047", "0.5384047", "0.53818464", "0.53767216", "0.5373968", "0.535718", "0.5354809", "0.53482753", "0.5347609", "0.5346026", "0.5335551", "0.5335551", "0.5335551", "0.5335268", "0.5335183", "0.5332372", "0.5316314", "0.53160083", "0.53131145", "0.531065", "0.5300802", "0.52927965" ]
0.0
-1
static hier weghalen veranderd de uitkomst van 333 naar 3.
public MijnKlasse() { mijnMethode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int nonStatic( int x ) {\n return x * 3;\n }", "static int getInt(){\n return j;\n }", "public int mo3356c() {\n return 0;\n }", "private int aleatorizarNaipe() {\n\t\tint aux;\n\t\taux = r.getIntRand(4);\n\t\treturn aux;\n\t}", "static void feladat3() {\n\t}", "static int test()\n\t{\n\n\t\treturn 20;\n\t}", "@Override\n\tpublic long unidadesComida() {\n\t\treturn 3;\n\t}", "public int getNotaFinal()\r\n {\n return 4;\r\n }", "public int getNotaFinal()\r\n {\n return 4;\r\n }", "public int arn() {\n return 383;\n }", "public void int3_m() {\n\t\t\n\t}", "public int mo1534c() {\n return 2;\n }", "static void m1(int a){\n\t\ta=Static11.a;\nSystem.out.println(a);\n\t}", "public int mo23323u() {\n return ((Integer) this.f13965a.mo23249a(C7196pb.f13722Lc)).intValue();\n }", "public int mo3360e() {\n return 0;\n }", "private static void staticFun()\n {\n }", "public int getThirdL() {\n/* 72 */ return this.thirdL;\n/* */ }", "public Long getKinkenriyou03() {\r\n return kinkenriyou03;\r\n }", "p3(){ \n cnt++; // Increment the static variable by 1 for each object creation. \n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "static void feladat9() {\n\t}", "public static int getLicznikTur() { return LicznikTur; }", "public abstract long mo24412e();", "static Long m3303w() throws C1108a {\n if (f3061kc == null) {\n throw new C1108a();\n }\n try {\n return (Long) f3061kc.invoke(null, new Object[0]);\n } catch (IllegalAccessException e) {\n throw new C1108a(e);\n } catch (InvocationTargetException e2) {\n throw new C1108a(e2);\n }\n }", "int RandomGeneratorZeroToThree (){\n\t\t int randomInt = 0;\n\t\t Random randomGenerator = new Random();\n\t\t for (int idx = 1; idx <= 10; ++idx) {\n\t\t\t randomInt = randomGenerator.nextInt(4);\n\n\t\t }\n\t\t return randomInt;\n\t }", "public int generateRoshambo(){\n ;]\n\n }", "public static int getPerson_to_play()\n {\n return person_to_play;\n }", "static zzadp m7436a() {\n return f12388a.get();\n }", "public int mo3361f() {\n return 1;\n }", "int generarNumeroNota();", "public abstract Integer mo36212o();", "public int getThirdR() {\n/* 66 */ return this.thirdR;\n/* */ }", "private Integer randomBilirrubina(){\n\t\t\tint Min = 0, Max = 14;\n\t\t\treturn Min + (int)(Math.random() * ((Max - Min) + 1));\n\t\t}", "static void feladat6() {\n\t}", "public int zzz() {\n int i;\n int i2;\n int i3;\n int i4 = 0;\n int zzz = super.zzz();\n if (this.zzbuI == null || this.zzbuI.length <= 0) {\n i = zzz;\n } else {\n i2 = 0;\n i3 = 0;\n for (String str : this.zzbuI) {\n if (str != null) {\n i3++;\n i2 += zzsn.zzgO(str);\n }\n }\n i = (zzz + i2) + (i3 * 1);\n }\n if (this.zzbuJ != null && this.zzbuJ.length > 0) {\n i3 = 0;\n zzz = 0;\n for (String str2 : this.zzbuJ) {\n if (str2 != null) {\n zzz++;\n i3 += zzsn.zzgO(str2);\n }\n }\n i = (i + i3) + (zzz * 1);\n }\n if (this.zzbuK != null && this.zzbuK.length > 0) {\n i3 = 0;\n for (int zzz2 : this.zzbuK) {\n i3 += zzsn.zzmx(zzz2);\n }\n i = (i + i3) + (this.zzbuK.length * 1);\n }\n if (this.zzbuL == null || this.zzbuL.length <= 0) {\n return i;\n }\n i2 = 0;\n while (i4 < this.zzbuL.length) {\n i2 += zzsn.zzas(this.zzbuL[i4]);\n i4++;\n }\n return (i + i2) + (this.zzbuL.length * 1);\n }", "public void mo55256a(C3586j3 j3Var) {\n }", "public void mo55256a(C3586j3 j3Var) {\n }", "public void mo55256a(C3586j3 j3Var) {\n }", "StaticVariable(){\n count++;//incrementing the value of static variable\n System.out.println(count);\n }", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "private void info3(int i) {\n\t\t\n\t}", "void runTime3()throws RuntimeException{\n\t\tint[]numList= {45,78,99};\n\t\tSystem.out.println(numList[5]);\n\t}", "private static String localUnique(){\n\t\tfinal long counterValue = instanceCounter.getAndIncrement();\n\t\tString unique = uniqueTop + String.format(\"%08d\", counterValue);\n\t\treturn unique;\t\t\n\t}", "public final int getSarakeMuuttujatAihe() {\r\n return sarakeMuuttujatAihe;\r\n }", "public abstract long mo20901UQ();", "public int mo3384v() {\n return 0;\n }", "public void mo4683c() {\n mo4679a(3);\n }", "float getKeliling() {\n\t\treturn super.sisi * 3;\n\t}", "public Long getTesuryo03() {\r\n return tesuryo03;\r\n }", "static void feladat5() {\n\t}", "static public int getGUEST() {\n return 2;\n }", "public abstract long mo9229aD();", "@Test\n public void testGetNum() throws Exception {\n CountNumbersWithUniqueDigits countNumbersWithUniqueDigits = new CountNumbersWithUniqueDigits();\n assertEquals(81, countNumbersWithUniqueDigits.getNum(10, 2));\n assertEquals(9, countNumbersWithUniqueDigits.getNum(10, 1));\n }", "private String getCampo3() {\r\n String campo = this.campoLivre.substring(15);\r\n return boleto.getDigitoCampo(campo);\r\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 }", "long getUnknown12();", "public int getNumber() {\n\t\treturn 666;\n\t}", "public int mo36g() {\n return 2;\n }", "public abstract long mo24410c();", "private int getMY() {\n\t\treturn 0;\r\n\t}", "public int liczbaelnastosie() {\n\t\treturn 0;\n\t}", "public float getThirdSSN(){\n\t\t return ThirdSSN;\n\t\t }", "public void mo55254a() {\n }", "public void setKinkenriyou03(Long kinkenriyou03) {\r\n this.kinkenriyou03 = kinkenriyou03;\r\n }", "static public int getHobgoblinStr(){\n str = rand.nextInt(3) + 3;\n return str;\n }", "public abstract long mo9743h();", "private int m128159c(int i) {\n if (this.f104224n != 1) {\n int currentItem = this.f104236z.getCurrentItem();\n if (currentItem == this.f104222l) {\n if (this.f104225o == 1) {\n this.f104224n = 6;\n } else {\n this.f104224n = 2;\n }\n } else if (currentItem == this.f104223m) {\n if (this.f104225o == 1) {\n this.f104224n = 5;\n } else {\n this.f104224n = 3;\n }\n }\n if (this.f104224n == 3 && (i > 1 || (this.f104198H & 1) == 0)) {\n this.f104224n = 4;\n }\n }\n return this.f104224n;\n }", "private static void LessonInstanceVsStatic() {\n System.out.println(MathHelper.E);\n System.out.println(MathHelper.PI);\n System.out.println(MathHelper.square(5));\n //Three helper methods for StringHelper\n System.out.println(StringHelper.removeLeadingAndTrailingSpaces(\" Hello \"));\n System.out.println(StringHelper.removeAllSpace(\" He ll o !\"));\n System.out.println(StringHelper.yelling(\"hello\"));\n //Three helper methods for MathHelper\n System.out.println(MathHelper.cubed(5));\n System.out.println(MathHelper.areaOfRectangle(2,3));\n System.out.println(MathHelper.perimeterOfRectangle(4, 5));\n\n }", "public int m224a() {\n return 1;\n }", "public int getLongueur()\n\t{\n\t\treturn longueur_;\n\t}", "static void feladat4() {\n\t}", "public static void c3() {\n\t}", "static private int makeInt(int b3, int b2, int b1, int b0) {\n return (((b3 ) << 24) |\n ((b2 & 0xff) << 16) |\n ((b1 & 0xff) << 8) |\n ((b0 & 0xff) ));\n }", "public int mo5158c() {\n return this.f3124a;\n }", "int method20()\n {\n return 579190;\n }", "static int returnFive() {\r\n return 5;\r\n }", "public int getNumeroInicial()\r\n/* 180: */ {\r\n/* 181:194 */ return this.numeroInicial;\r\n/* 182: */ }", "public Long getKinkenriyou23() {\r\n return kinkenriyou23;\r\n }", "public int mo33136c() {\n return this.f23891d;\n }", "public int getStaticCharsCount() {\n return 0;\n }", "private static boolean checkBy3 (int a) {\n return a % 3 == 0;\n }", "static void q4(){\t\n\t}", "public abstract long mo24409b();", "public static int setStudentNumber(){\n countNumbers++;//1 2 3\n return countNumbers;\n\n }", "public int getPyscleunik() {\r\r\r\r\r\r\r\n return pyscleunik;\r\r\r\r\r\r\r\n }", "public abstract long mo9755t();", "static void feladat7() {\n\t}", "int getNombreLignesPlateau();", "static void q7(){\n\t}", "@Override\n\tpublic int xuatLuong() {\n\t\treturn 3000;\n\t}", "public int valeurPiece() {\n return 3;\n }", "public abstract int mo9747l();", "public int mo615a() {\n return this.f444a;\n }", "private String getCampo3() {\n String campo = this.campoLivre.substring(15);\n System.out.println(\"campo3 \" + campo);\n return boleto.getDigitoCampo(campo);\n }", "public int getTrangthaiChiTiet();" ]
[ "0.6142994", "0.6017995", "0.58093405", "0.58092576", "0.57079506", "0.5685249", "0.5683568", "0.5660025", "0.5660025", "0.5586454", "0.557498", "0.55690056", "0.55487454", "0.55051494", "0.5496327", "0.5479342", "0.547049", "0.5444995", "0.54422003", "0.5431913", "0.5420697", "0.5407047", "0.54050255", "0.54037744", "0.5394302", "0.53868043", "0.5370175", "0.53680897", "0.53677356", "0.5333709", "0.53044623", "0.53013855", "0.5296861", "0.5293558", "0.5286164", "0.52794206", "0.52794206", "0.52794206", "0.5277674", "0.5269208", "0.5263658", "0.5251307", "0.52497345", "0.5247148", "0.52426875", "0.5242456", "0.5241685", "0.52351516", "0.5226929", "0.5224111", "0.5208233", "0.5205198", "0.5204606", "0.52027935", "0.5202482", "0.5202482", "0.5202482", "0.5202482", "0.5202482", "0.5202482", "0.5202482", "0.52014977", "0.51935434", "0.51854867", "0.5182788", "0.51815146", "0.5171731", "0.51681507", "0.51656073", "0.51635045", "0.5160953", "0.5156552", "0.51562893", "0.5152334", "0.51500976", "0.51500714", "0.5149808", "0.514036", "0.5133472", "0.512494", "0.5120806", "0.5110836", "0.51093674", "0.51075536", "0.5105244", "0.5103278", "0.5093868", "0.5093192", "0.5092498", "0.5088901", "0.5087456", "0.5086147", "0.50845414", "0.50670236", "0.50662327", "0.5066225", "0.5065199", "0.5062577", "0.5061372", "0.5057752", "0.5057309" ]
0.0
-1
fill combobox on initialize
public void initialize() { fillCombobox(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "private void initComboBoxes()\n\t{\n\t\tsampling_combobox.getItems().clear();\n\t\tsampling_combobox.getItems().add(\"Random\");\n\t\tsampling_combobox.getItems().add(\"Cartesian\");\n\t\tsampling_combobox.getItems().add(\"Latin Hypercube\");\n\n\t\t// Set default value.\n\t\tsampling_combobox.setValue(\"Random\");\n\t}", "private void fillComboBox() {\n List<String> times = this.resultSimulation.getTimes();\n this.timesComboBox.getItems().addAll(times);\n this.timesComboBox.getSelectionModel().select(0);\n }", "@FXML\n\tprivate void initialize() {\n\t\tlistNomType = FXCollections.observableArrayList();\n\t\tlistIdType=new ArrayList<Integer>();\n\t\ttry {\n\t\t\tfor (Type type : typeDAO.recupererAllType()) {\n listNomType.add(type.getNomTypeString());\n listIdType.add(type.getIdType());\n }\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tcomboboxtype.setItems(listNomType);\n\n\t}", "public static void fillComboBox() {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tresults = statement.executeQuery(\"Select PeopleName from people \");\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tString peopleName = results.getString(\"PeopleName\");\r\n\t\t\t\tcomboBox.addItem(peopleName);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t \te.printStackTrace();\r\n\t\t}\r\n\t}", "public ComboBox1() {\n initComponents();\n agregarItems();\n\n }", "public void fillCombobox() {\n List<String> list = new ArrayList<String>();\n list.add(\"don't link\");\n if (dataHandler.persons.size() == 0) {\n list.add(\"No Persons\");\n ObservableList obList = FXCollections.observableList(list);\n cmb_linkedPerson.setItems(obList);\n cmb_linkedPerson.getSelectionModel().selectFirst();\n } else {\n for (int i = 0; i < dataHandler.persons.size(); i++) {\n list.add(dataHandler.persons.get(i).getName());\n ObservableList obList = FXCollections.observableList(list);\n cmb_linkedPerson.setItems(obList);\n cmb_linkedPerson.getSelectionModel().selectFirst();\n }\n }\n }", "private void fillComboBox() {\n jComboBoxFilterChains.setModel(new DefaultComboBoxModel(ImageFilterManager.getObject().getListOfFilters().toArray()));\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n loadTable();\n ObservableList<String> opt = FXCollections.observableArrayList(\n \"A01\",\n \"A02\",\n \"A02\",\n \"A03\",\n \"A04\",\n \"B01\",\n \"B02\",\n \"B03\",\n \"B04\",\n \"C01\",\n \"C02\",\n \"C03\",\n \"C04\",\n \"D01\",\n \"D02\",\n \"D03\",\n \"D04\");\n \n cb1.setItems(opt);\n \n \n \n \n ObservableList<String> options = FXCollections.observableArrayList();\n Connection cnx = Myconn.getInstance().getConnection();\n String e=\"\\\"\"+\"Etudiant\"+\"\\\"\";\n ResultSet rs = cnx.createStatement().executeQuery(\"select full_name from user where role=\"+e+\"\");\n while(rs.next()){\n options.add(rs.getString(\"full_name\"));\n \n }\n// ObservableList<String> options = FXCollections.observableArrayList(\"Option 1\",\"Option 2\",\"Option 3\");\n comboE.setItems(options);\n } catch (SQLException ex) {\n Logger.getLogger(SoutenanceController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "private void initData() {\n\t\tcomboBoxInit();\n\t\tinitList();\n\t}", "void fillCombo_name(){\n combo_name.setItems(FXCollections.observableArrayList(listComboN));\n }", "public void Bindcombo() {\n\n MyQuery1 mq = new MyQuery1();\n HashMap<String, Integer> map = mq.populateCombo();\n for (String s : map.keySet()) {\n\n jComboBox1.addItem(s);\n\n }\n\n }", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "public void fillPLComboBox(){\n\t\tmonths.add(\"Select\");\n\t\tmonths.add(\"Current Month\");\n\t\tmonths.add(\"Last Month\");\n\t\tmonths.add(\"Last 3 Months\");\n\t\tmonths.add(\"View All\");\n\t}", "public void populateQualityCombo() {\n\n // Making a list of poster qualities\n List<KeyValuePair> qualityList = new ArrayList<KeyValuePair>() {{\n\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w92, \"Thumbnail\\t[ 92x138 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w154, \"Tiny\\t\\t\\t[ 154x231 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w185, \"Small\\t\\t[ 185x278 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w342, \"Medium\\t\\t[ 342x513 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w500, \"Large\\t\\t[ 500x750 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w780, \"xLarge\\t\\t[ 780x1170 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_original, \"xxLarge\\t\\t[ HD ]\"));\n }};\n\n // Converting the list to an observable list\n ObservableList<KeyValuePair> obList = FXCollections.observableList(qualityList);\n\n // Filling the ComboBox\n cbPosterQuality.setItems(obList);\n\n // Setting the default value for the ComboBox\n cbPosterQuality.getSelectionModel().select(preferences.getInt(\"mediaQuality\", 3));\n }", "private void initializeComboboxes() {\n ObservableList<Integer> options = FXCollections.observableArrayList(vertexesCurrentlyOnScreen);\n startingVertex = new ComboBox<>(options);\n finalVertex = new ComboBox<>(options);\n startingVertex.setBorder((new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5)))));\n finalVertex.setBorder(new Border(new BorderStroke(Color.LIGHTGRAY, BorderStrokeStyle.SOLID, new CornerRadii(2), new BorderWidths(1.5))));\n }", "public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n counselorDetailsBEAN = new CounselorDetailsBEAN();\n counselorDetailsBEAN = Context.getInstance().currentProfile().getCounselorDetailsBEAN();\n ENQUIRY_ID = counselorDetailsBEAN.getEnquiryID();\n // JOptionPane.showMessageDialog(null, ENQUIRY_ID);\n countryCombo();\n cmbCountry.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n \n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n //JOptionPane.showMessageDialog(null, cmbCountry.getSelectionModel().getSelectedItem().toString());\n String[] parts = cmbCountry.getSelectionModel().getSelectedItem().toString().split(\",\");\n String value = parts[0];\n locationcombo(value);\n }\n\n private void locationcombo(String value) {\n List<String> locations = SuggestedCourseDAO.getLocation(value);\n for (String s : locations) {\n location.add(s);\n }\n cmbLocation.setItems(location);\n }\n\n });\n cmbLocation.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n universityCombo(cmbLocation.getSelectionModel().getSelectedItem().toString());\n }\n\n private void universityCombo(String value) {\n List<String> universities = SuggestedCourseDAO.getUniversities(value);\n for (String s : universities) {\n university.add(s);\n }\n cmbUniversity.setItems(university);\n }\n \n });\n cmbUniversity.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n levetCombo(cmbUniversity.getSelectionModel().getSelectedItem().toString());\n }\n\n private void levetCombo(String value) {\n List<String> levels = SuggestedCourseDAO.getLevels(value);\n for (String s : levels) {\n level.add(s);\n }\n cmbLevel.setItems(level);\n }\n });\n\n }", "public void fillCompBox() {\n\t\tcomboBoxName.removeAllItems();\n\t\tint counter = 0;\n\t\tif (results.getResults() != null) {\n\t\t\tList<String> scenarios = new ArrayList<String>(results.getResults().keySet());\n\t\t\tCollections.sort(scenarios);\n\t\t\tfor (String s : scenarios) {\n\t\t\t\tcomboBoxName.insertItemAt(s, counter);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n //Agrega valores a los combobox\n ObservableList<String> list = FXCollections.observableArrayList(\"1\",\"2\");\n cbCantidad.setItems(list);\n \n ObservableList<String> list2 = FXCollections.observableArrayList(\"Visible\", \"Oculto\");\n cbVisibilidad.setItems(list2);\n }", "private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t\tfecha = new Date();\r\n\t\t\r\n\t\tlistaBancos = new ArrayList<SelectItem>();\r\n\t\tlistaRegiones = new ArrayList<SelectItem>();\r\n\t\tlistaCiudades = new ArrayList<SelectItem>();\r\n\t\tlistaComunas = new ArrayList<SelectItem>();\r\n\t\t\r\n\t\tfor(EmpresaDTO empresa : configJProcessService.selectEmpresasByOrganizacion(1))\r\n\t\t\tlistaBancos.add(new SelectItem(empresa.getId(), empresa.getNombre()));\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODOcomboBoxCh\n remplirTableView();\n comboBoxCh.getItems().addAll(\"Code Adherent\", \"Nom Adherent\");\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //Preenche o comboBox sexo\r\n cb_sexo.setItems(listSexo);\r\n cb_uf.setItems(listUf);\r\n cb_serie.setItems(listSerie);\r\n\r\n// // Preenche o comboBox UF\r\n// this.cb_uf.setConverter(new ConverterDados(ConverterDados.GET_UF));\r\n// this.cb_uf.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n//\r\n// //Preenche o comboBox Serie\r\n// this.cb_serie.setConverter(new ConverterDados(ConverterDados.GET_SERIE));\r\n// this.cb_serie.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n this.codAluno.setCellValueFactory(cellData -> cellData.getValue().getCodigoProperty().asObject());\r\n this.nomeAluno.setCellValueFactory(cellData -> cellData.getValue().getNomeProperty());\r\n this.sexoAluno.setCellValueFactory(cellData -> cellData.getValue().getSexoProperty());\r\n this.enderecoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnderecoProperty());\r\n this.cepAluno.setCellValueFactory(cellData -> cellData.getValue().getCepProperty());\r\n this.nascimentoAluno.setCellValueFactory(cellData -> cellData.getValue().getNascimentoProperty());\r\n this.ufAluno.setCellValueFactory(cellData -> cellData.getValue().getUfProperty());\r\n this.maeAluno.setCellValueFactory(cellData -> cellData.getValue().getMaeProperty());\r\n this.paiAluno.setCellValueFactory(cellData -> cellData.getValue().getPaiProperty());\r\n this.telefoneAluno.setCellValueFactory(cellData -> cellData.getValue().getTelefoneProperty());\r\n this.serieAluno.setCellValueFactory(cellData -> cellData.getValue().getSerieProperty());\r\n this.ensinoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnsinoProperty());\r\n\r\n //bt_excluir.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n //bt_editar.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n }", "public void fillComBox1()\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tconnection = SqlServerConnection.dbConnecter();\r\n\t\t\t\t\r\n\t\t\t\tString sql=\"select * from addLocation\";\r\n\t\t\t\tPreparedStatement pst=connection.prepareStatement(sql);\r\n\t\t\t\tResultSet rs=pst.executeQuery();\r\n\t\t\t\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\troomcombo2.addItem(rs.getString(\"RoomName\"));\r\n\t\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "@PostConstruct\r\n private void init() {\n this.ccTypes = new ArrayList<SelectItem>();\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_A, getCCTypeLabel(CreditCardType.CARD_A)));\r\n this.ccTypes.add(new SelectItem(CreditCardType.CARD_B, getCCTypeLabel(CreditCardType.CARD_B)));\r\n\r\n // Initialize categories select items\r\n this.categories = new ArrayList<SelectItem>();\r\n this.categories.add(new SelectItem(\"cat_it\", getCategoryLabel(\"cat_it\")));\r\n this.categories.add(new SelectItem(\"cat_gr\", getCategoryLabel(\"cat_gr\")));\r\n this.categories.add(new SelectItem(\"cat_at\", getCategoryLabel(\"cat_at\")));\r\n this.categories.add(new SelectItem(\"cat_mx\", getCategoryLabel(\"cat_mx\")));\r\n }", "public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gender.getItems().setAll(\"laki-laki\",\"perempuan\");\n status.getItems().setAll(\"admin\",\"user\");\n // bind the selected fruit label to the selected fruit in the combo box.\n //selectedFruit.textProperty().bind(fruitCombo.getSelectionModel().selectedItemProperty());\n\n\n }", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "private void setUpComboBox2() {\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>());\n jComboBox1.addItem(\"Unit Test\");\n jComboBox1.addItem(\"Quiz\");\n jComboBox1.addItem(\"Assignment\");\n jComboBox1.addItem(\"Other\");\n }", "private void setupComboBox() {\n nodeSelectComboBox.setEditable(true);\n\n getNodes();\n\n // Set to all nodes\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet())));\n nodeSelectComboBox.setOnAction(param -> {\n longName = nodeSelectComboBox.getValue();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n // Filter nodes based on user input\n nodeSelectComboBox.setOnKeyReleased(param -> {\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet()).stream()\n .filter(longName -> showNode(longName, nodeSelectComboBox.getValue())).collect(Collectors.toList())));\n });\n }", "public OnlineCon() {\n initComponents();\n fillcombo();\n }", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public void initialize(URL url, ResourceBundle rb) {\r\n \r\n choiceBoxLabel.setText(\"\");\r\n //choiceBox.getItems().add(\"salut\");\r\n try {\r\n PreparedStatement pt = c.prepareStatement(\"select * from service\");\r\n ResultSet rs = pt.executeQuery();\r\n while (rs.next()) {\r\n comboBox_service.getItems().add(rs.getString(2));\r\n } } catch (SQLException ex) {\r\n Logger.getLogger(service.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n // choiceBox_service.setValue(choiceBox_service.getValue());\r\n \r\n //comboBox_listRdv();\r\n listRdvReserved();\r\n \r\n \r\n }", "private void inicializarCombos() {\n\t\tlistaGrupoUsuario = GrupoUsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tfor (GrupoUsuario grupo : listaGrupoUsuario) {\n\t\t\tthis.observableListaGrupoUsuario.add(grupo.getNombre());\n\t\t}\n\t\tthis.comboGrupoUsuario.setItems(this.observableListaGrupoUsuario);\n\t\tnew AutoCompleteComboBoxListener(comboGrupoUsuario);\n\n\t\tObservableList<String> status = FXCollections.observableArrayList(\"Bloqueado\",\"Activo\",\"Baja\");\n\t\tthis.comboStatus.setItems(status);\n\t\tthis.comboEmpleados.setItems(FXCollections.observableArrayList(this.listaEmpleados));\n\t}", "public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n ratingcombobox.getItems().addAll(\"1\",\"2\",\"3\",\"4\",\"5\");\r\n }", "private void buildCountryComboBox() {\n ResultSet rs = DatabaseConnection.performQuery(\n session.getConn(),\n Path.of(Constants.QUERY_SCRIPT_PATH_BASE + \"SelectCountryByID.sql\"),\n Collections.singletonList(Constants.WILDCARD)\n );\n\n ObservableList<Country> countries = FXCollections.observableArrayList();\n try {\n if (rs != null) {\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n countries.add(new Country(id, name));\n }\n }\n } catch (Exception e) {\n Common.handleException(e);\n }\n\n countryComboBox.setItems(countries);\n\n countryComboBox.setConverter(new StringConverter<>() {\n @Override\n public String toString(Country item) {\n return item.getCountryName();\n }\n\n @Override\n public Country fromString(String string) {\n return null;\n }\n });\n }", "private void renderCombobox(){\r\n\r\n\t\tCollection<String> sitesName= new ArrayList<String>();\r\n\t\t\tfor(SiteDto site : siteDto){\r\n\t\t\t\tsitesName.add(site.getSiteName());\r\n\t\t\t}\r\n\t\t\r\n\t\tComboBox siteComboBox = new ComboBox(\"Select Site\",sitesName);\r\n\t\tsiteName = sitesName.iterator().next();\r\n\t\tsiteComboBox.setValue(siteName);\r\n\t\tsiteComboBox.setImmediate(true);\r\n\t\tsiteComboBox.addValueChangeListener(this);\r\n\t\tverticalLayout.addComponent(siteComboBox);\r\n\t}", "public ItemPro() {\n initComponents();\n comboFill();\n }", "@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }", "private void setClientsIntoComboBox() {\n if (mainModel.getClientList() != null) {\n try {\n mainModel.loadClients();\n cboClients.getItems().clear();\n cboClients.getItems().addAll(mainModel.getClientList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the clients.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "private void initComboBox() {\n\t\tsynchronized (realTimeComboModel.files) {\n\t\t\trealTimeComboModel.files.clear();\n\t\t\t\n\t\t\tSet<TopComponent> comps = TopComponent.getRegistry().getOpened();\n\t\t\tfor (TopComponent tc : comps) {\n\t\t\t\tNode[] arr = tc.getActivatedNodes();\n\t\t\t\tif (arr != null) {\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\t\t\tDataObject dataObject = (DataObject) arr[j].getCookie(DataObject.class);\n\t\t\t\t\t\tFile file = new File(dataObject.getPrimaryFile().getPath());\n\t\t\t\t\t\tif (file.exists() && file.isFile()/* && !temp.contains(file.getName())*/) {\n\t\t\t\t\t\t\trealTimeComboModel.files.add(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomboBox.setRenderer(new RealTimeComboRenderer()); // if no this line, combobox will show nothing after refeshing with few files\n\t}", "public CustomComboBoxModel() {\n\t\t// TODO Auto-generated constructor stub\n\t\tZipcodeDAO dao = new ZipcodeDAO();\n\t\tdatas = dao.allSido();\n\t}", "private void preencherComboEstados() {\n\t\tList<Estado> listEstado;\n\t\tObservableList<Estado> oListEstado;\n\t\tEstadosDAO estadosDao;\n\n\t\t//Instancia a DAO estados\n\t\testadosDao = new EstadosDAO();\n\n\t\t//Chama o metodo para listar todos os estados\n\t\tlistEstado = estadosDao.selecionar();\n\n\t\t//Verifica se a lista de estados está vazia\n\t\tif(listEstado.isEmpty()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Atribui a lista retornada ao observablearray\n\t\toListEstado = FXCollections.observableArrayList(listEstado);\n\n\t\t//Adiciona os itens no combobx\n\t\tcboEstado.setItems(oListEstado);\n\n\t\t//Seleciona o primeio item do combobox\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "private void initializeOrganFilterComboBox() {\n organFilterComboBox.setItems(organs);\n organFilterComboBox.getItems()\n .addAll(organString, \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\",\n \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\", \"Bone Marrow\", \"Connective Tissue\");\n organFilterComboBox.getSelectionModel().select(0);\n }", "private void fillChoicebox(String item, ChoiceBox cBox) {\n List<Component> test = cRegister.searchRegisterByName(item);\n ObservableList<String> temp = FXCollections.observableArrayList();\n temp.add(\"Ikke valgt\");\n for (Component i : test) {\n temp.add(i.getNavn());\n }\n\n cBox.setItems(temp);\n cBox.setValue(\"Ikke valgt\");\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n val.addRequiredValidator(txtDescription);\n btnAdd.setText(\"CREATE\");\n enableOption(false);\n LinkedList<String> col = new LinkedList<>();\n// col.addFirst(\"ALL\");\n// col.add(\"DATE\");\n// col.add(\"DESCRIPTION\");\n col.addFirst(\"DESCRIPTION\");\n cmbColumn.getItems().addAll(col);\n MyUtils.selectComboBoxValue(cmbColumn, \"DESCRIPTION\");\n fillTable();\n lblName.setText(\"Welcome \"+DiaryFXMLController.curUser.getUname());\n// JOptionPane.showMessageDialog(null, \"\"+currUsr.getUid()+\"==\"+currUsr.getUname()+\"==\"+currUsr.getPass());\n }", "private void setStaticFirstComboView() {\n \t\tgetView().getCombo_viewChoice1().clear();\n \t\tgetView().getCombo_viewChoice1().addItem(\"Professeur\");\n \t\tgetView().getCombo_viewChoice1().addItem(\"Local\");\n \t\tgetView().getCombo_viewChoice1().addItem(\"Classe\");\n \t\n \t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n ArrayList<String> opciones = new ArrayList<String>();\n opciones.add(\"Por id\");\n opciones.add(\"Por nombre\");\n opciones.add(\"Por cedula\");\n cmbTipoBusqueda.getItems().clear();\n cmbTipoBusqueda.getItems().addAll(opciones);\n cargarTodos(); \n }", "private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }", "private void fillSubjectCombo() throws SQLException, ClassNotFoundException {\n ArrayList<Subject> subjectList = SubjectController.getAllSubject();\n //subjectList.removeAllItems();\n for (Subject subject : subjectList) {\n subjectCombo.addItem(subject);\n\n }\n }", "private void carregarComboMarca(){\r\n\t\tMarcaEquipamentoDAO marcaDAO = new MarcaEquipamentoDAO(FormEquipamento.this);\r\n\t\tlistaCombo = marcaDAO.listar() ;\r\n\t\tif (!listaCombo.isEmpty()){\r\n\t\t\tArrayAdapter<MarcaEquipamento> adaptador = new ArrayAdapter<MarcaEquipamento>(FormEquipamento.this , \r\n\t\t\t\t\tandroid.R.layout.simple_spinner_item, \r\n\t\t\t\t\tlistaCombo );\r\n\t\t\tadaptador.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\t\t\tcomboMarca.setAdapter(adaptador);\r\n\t\t}\r\n\t}", "@Override\r\n public void initialize(URL location, ResourceBundle rb) {\r\n\r\n cityComboBox.setItems(Data.getCountries());\r\n DivisionComboBox.setItems(Data.getDivisions());\r\n\r\n Connection connection;\r\n try {\r\n connection = Database.getConnection();\r\n ResultSet rs = connection.createStatement().executeQuery(\"SELECT Customer_ID, Customer_Name, Address, Postal_Code, Phone, c.Division_ID, Division, o.Country_ID, o.Country\\n\" +\r\n \"FROM customers c INNER JOIN first_level_divisions f ON c.Division_ID = f.Division_ID\\n\" +\r\n \"INNER JOIN countries o ON o.Country_ID = f.Country_ID ORDER BY Customer_ID;\");\r\n while (rs.next()) {\r\n customersTable.add(new Customer(rs.getInt(\"Customer_ID\"),\r\n rs.getString(\"Customer_Name\"),\r\n rs.getString(\"Address\"),\r\n rs.getString(\"Division\"),\r\n rs.getString(\"Postal_Code\"),\r\n rs.getString(\"Country\"),\r\n rs.getString(\"Phone\"),\r\n rs.getInt(\"Division_ID\")));\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AddCustomerController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n custIDCol.setCellValueFactory(new PropertyValueFactory<>(\"id\"));\r\n custNameCol.setCellValueFactory(new PropertyValueFactory<>(\"name\"));\r\n custAddress1Col.setCellValueFactory(new PropertyValueFactory<>(\"address\"));\r\n custCityCol.setCellValueFactory(new PropertyValueFactory<>(\"division\"));\r\n custZipCol.setCellValueFactory(new PropertyValueFactory<>(\"zip\"));\r\n custCountryCol.setCellValueFactory(new PropertyValueFactory<>(\"country\"));\r\n custPhoneCol.setCellValueFactory(new PropertyValueFactory<>(\"phone\"));\r\n\r\n customersTableView.setItems(customersTable);\r\n }", "private void setupComboBox(){\n\n //enhanced for loop populates book comboBox with books\n for(Book currentBook : books){ //iterates through books array\n bookCB.addItem(currentBook.getTitle()); //adds book titles to comboBox\n }\n\n //enhanced for loop populates audio comboBox with audio materials\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n audioCB.addItem(currentAudio.getAuthor()); //adds audio authors to comboBox\n }\n\n //enhanced for loop populates video comboBox with video materials\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n videoCB.addItem(currentVideo.getTitle()); //adds video titles to comboBox\n }\n }", "private void setUsersIntoComboBox() {\n if (mainModel.getUserList() != null) {\n try {\n mainModel.loadUsers();\n cboUsers.getItems().clear();\n cboUsers.getItems().addAll(mainModel.getUserList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the users.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "private void defaultdata()\n {\n try\n {\n \n StageBao stage_bao =\n new BaoFactory().createStageBao(); //create building bao object\n List<StageDto> stage_list =\n stage_bao.viewAll(); //get all building from DB\n \n stageComboBox.removeAllItems(); //remove all item from building combobox\n\n if(stage_list!=null&&!stage_list.isEmpty())\n {\n for(int i = 0; i<stage_list.size(); i++)\n {\n stageComboBox.addItem(stage_list.get(i).getNumber());\n }\n\n stageComboBox.setSelectedIndex(-1); //select no thing in this combo\n }\n \n \n DepartmentBao depart_bao = new BaoFactory().createDepartmentBao();\n List<DepartmentDto> depart_list = depart_bao.viewAll();\n DepartComboBox.removeAllItems();\n\n if(depart_list!=null&&!depart_list.isEmpty())\n {\n for(int i = 0; i<depart_list.size(); i++)\n {\n DepartComboBox.addItem(depart_list.get(i).getName());\n }\n DepartComboBox.setSelectedIndex(-1);\n }\n\n \n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n }\n\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n comboBoxCh.getItems().addAll(\"id_Livre\", \"id_Auteur\", \"titre\");\n remplirTableView();\n }", "public void setupMealSelectionCombobox(ComboBox<Recipe> mealSelection){\n setupPlannerMealComboboxs(mealSelection);\n }", "public String init() {\n\t\ttry{\n\t\t for (int i = 0; i < table_names.size(); i++)\n\t\t combo_box.addItem(table_names.get(count++));\n\t }\n\t\t//if the ArrayList of table_names is empty, then it will throw a NullPointerException\n\t\tcatch (NullPointerException nullpointer){\n\t\t\tnullpointer.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t text_box.setEditable(false);\n\t//\t select_table.addActionListener(new ActionListener() {\n\t//\t public void actionPerformed(ActionEvent e) {\n\t//\t if (count < table_names.size())\n\t//\t combo_box.addItem(table_names.get(count++));\n\t//\t }\n\t//\t });\n\t\t combo_box.addActionListener(new ActionListener() {\n\t\t public void actionPerformed(ActionEvent e) {\n\t\t text_box.setText(\"\"+ ((JComboBox) e.getSource()).getSelectedItem());\n\t\t table_name=(String) ((JComboBox) e.getSource()).getSelectedItem();\n\t\t }\n\t\t });\n\t\t if (table_name!=\"\"){\n\t\t \tset_table_name(table_name);\n\t\t \treturn table_name;\n\t\t }\n\t\t else\n\t\t \treturn \"\";\n\t\t}\n\t \n\t }", "private void fillComboBox(ServiceManager serviceManager){\n for (String vendingMachineName : serviceManager.getVmManager().getVendingMachineNames()) {\n getItems().add(vendingMachineName); \n }\n }", "public Create_Course() {\n initComponents();\n comboBoxLec();\n comboBoxDep();\n }", "private void loadCustomerCombo() {\n ArrayList<CustomerDTO> allCustomers;\n try {\n allCustomers = ctrlCustomer.get();\n for (CustomerDTO customer : allCustomers) {\n custIdCombo.addItem(customer.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(PlaceOrderForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public UpdateSalesman() {\n initComponents();\n \n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n con=CrudOperation.createConnection();\n fillCombo();\n }", "@FXML\n\tpublic void initialize() {\n\t\t\n\t\tcbCores.getItems().add(\"Azul\");\n\t\tcbCores.getItems().add(\"Vermelho\");\n\t\tcbCores.getItems().add(\"Verde\");\n\t\t\n\t\tcbCores1.getItems().add(\"Azul\");\n\t\tcbCores1.getItems().add(\"Vermelho\");\n\t\tcbCores1.getItems().add(\"Verde\");\n\t\t\n\t\t//cbCores.setItems(FXCollections.observableArrayList(cbCores));\n\t}", "public GrafosTP1UI() {\n initComponents();\n control = new Controlador();\n jComboBox1.setSelectedIndex(0); \n }", "@Override\r\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tpKindChoiceBox.setValue(\"전체\");\r\n\t\tpKindChoiceBox.setItems(productKindList);\r\n\t\tsearchKindComboBox.setItems(searchKindList);\r\n\t\t\r\n\t\tTableColumn<ProductDataModel, Integer> tcP_id = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(0);\r\n\t\tTableColumn<ProductDataModel, String> tcKind = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(1);\r\n\t\tTableColumn<ProductDataModel, String> tcTitle = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(2);\r\n\t\tTableColumn<ProductDataModel, String> tcGenre = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(3);\n\t\tTableColumn<ProductDataModel, Integer> tcAgeG = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(4);\r\n\t\tTableColumn<ProductDataModel, String> tcRdate = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(5);\r\n\t\tTableColumn<ProductDataModel, String> tcIsrental = (TableColumn<ProductDataModel, String>) rsvListTable.getColumns().get(6);\r\n\t\tTableColumn<ProductDataModel, Integer> tcRentalCnt = (TableColumn<ProductDataModel, Integer>) rsvListTable.getColumns().get(7);\r\n\t\ttcP_id.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"p_id\"));\r\n\t\ttcKind.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"kind\"));\r\n\t\ttcTitle.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"title\"));\r\n\t\ttcGenre.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"genre\"));\n\t\ttcAgeG.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"age_grade\"));\r\n\t\ttcRdate.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"release\"));\r\n\t\ttcIsrental.setCellValueFactory(new PropertyValueFactory<ProductDataModel, String>(\"isRental\"));\r\n\t\ttcRentalCnt.setCellValueFactory(new PropertyValueFactory<ProductDataModel, Integer>(\"rentalCnt\"));\r\n\t\t\r\n\t\tpds = db.selectProductDatas();\r\n\t\tfor(ProductDatas pd : pds){\r\n\t\t\tproductList.add(new ProductDataModel(pd));\r\n\t\t}\r\n\t\trsvListTable.setItems(productList);\r\n\t\t\r\n\t}", "@Override\n\tpublic void initialize(URL location, ResourceBundle resources) {\n\t\tcombobox.setItems(list);\n\t\tcombobox2.setItems(list2);\n\t\t\n\t}", "private void initializeComponents() {\n\n startHourSpinner.setValue( DEFAULT_START_HOUR );\n endHourSpinner.setValue( DEFAULT_END_HOUR );\n \n //Add the time freq\n TimeFreq[] theFreqArr = new TimeFreq[ ]{ new TimeFreq(TimeFreq.HOURLY), new TimeFreq(TimeFreq.DAILY), new TimeFreq(TimeFreq.WEEKLY), new TimeFreq(TimeFreq.MONTHLY) };\n freqCombo.setModel(new javax.swing.DefaultComboBoxModel( theFreqArr ));\n \n addListListeners();\n \n }", "void populateLittlesComboBox(JComboBox box) {\n box.addItem(\"Clear\");\n TreeMap<String, ArrayList<String>> sortedlittles = new TreeMap<>();\n sortedlittles.putAll(matching.littlesPreferences);\n for (Map.Entry lilprefs : sortedlittles.entrySet()) {\n String littleName = lilprefs.getKey().toString();\n box.addItem(littleName);\n }\n }", "private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }", "private void createComboMemBank() {\r\n\t\tcomboMemBank = new Combo(sShell, SWT.READ_ONLY);\r\n\t\t\r\n\t\tcomboMemBank.setBounds(new Rectangle(54, 55, 92, 21));\r\n\t\tString items[] = new String[]{ \"Reserved\", \"EPC\", \"TID\", \"User\" };\r\n\t\tcomboMemBank.setItems(items);\r\n\t\tcomboMemBank.select(1);\r\n\r\n\t\t\r\n\t}", "public void combo(){\r\n // Define rendering of the list of values in ComboBox drop down. \r\n cbbMedicos.setCellFactory((comboBox) -> {\r\n return new ListCell<Usuario>() {\r\n @Override\r\n protected void updateItem(Usuario item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (item == null || empty) {\r\n setText(null);\r\n } else {\r\n setText(item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico());\r\n }\r\n }\r\n };\r\n });\r\n\r\n // Define rendering of selected value shown in ComboBox.\r\n cbbMedicos.setConverter(new StringConverter<Usuario>() {\r\n @Override\r\n public String toString(Usuario item) {\r\n if (item == null) {\r\n return null;\r\n } else {\r\n return item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico();\r\n }\r\n }\r\n\r\n @Override\r\n public Usuario fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }\r\n });\r\n }", "private void setComboBox(JComboBox<String> comboBox) {\n comboBox.addItem(\"Select an item\");\n for (Product product : restaurant.getProducts()) {\n comboBox.addItem(product.getName());\n }\n }", "@FXML\n void loadComboBoxLocationValues() {\n ArrayList<Location> locations = LocationDAO.LocationSEL(-1);\n comboBoxLocation.getItems().clear();\n if (!locations.isEmpty())\n for (Location location : locations) {\n comboBoxLocation.getItems().addAll(location.getLocationID());\n }\n }", "public void initializeComboSize() {\n\t\tsizeOptions.clear();\n\t\tfor (int i = 0; i < restaurant.getSizes().size(); i++) {\n\t\t\tif (restaurant.getSizes().get(i) != null) {\n\t\t\t\tsizeOptions.add(restaurant.getSizes().get(i));\n\t\t\t}\n\t\t}\n\t\tComboSize.setItems(sizeOptions);\n\t}", "public void setComboBoxPertemuan() {\n if (listPertemuanCount == null) {\n framePresensi.getPertemuanComboBox().setModel(new DefaultComboBoxModel());\n } else {\n framePresensi.getPertemuanComboBox().setModel(new ComboboxPertemuan().getPertemuan(listPertemuanCount));\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // T\n cb_periodo.setItems(FXCollections.observableArrayList(Arrays.asList(\"Manhã\" , \"Tarde\")));\n }", "public BlackRockCityMapUI ()\n {\n initComponents ();\n cbYear.setSelectedItem (\"2023\");\n\n }", "private void fillcbGrupo() {\n\t\tcbGrupoContable.setNullSelectionAllowed(false);\n\t\tcbGrupoContable.setInputPrompt(\"Seleccione Grupo Contable\");\n\t\tfor (GruposContablesModel grupo : grupoimpl.getalls()) {\n\t\t\tcbGrupoContable.addItem(grupo.getGRC_Grupo_Contable());\n\t\t\tcbGrupoContable.setItemCaption(grupo.getGRC_Grupo_Contable(), grupo.getGRC_Nombre_Grupo_Contable());\n\t\t}\n\t}", "public DLQL_SuaMon() {\n initComponents();\n try {\n cbbLoai = con.GetAllLoaiMonAn();\n DefaultComboBoxModel md = new DefaultComboBoxModel();\n cbxLoaiMon.setModel(md);\n for (int i = 0; i < cbbLoai.size(); i++) {\n cbxLoaiMon.addItem(cbbLoai.get(i).getTenLoai());\n }\n cbxLoaiMon.setSelectedItem(con.GetLoaiByMa(StoreData.currentMonAn.getMaLoai()).getTenLoai());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Không LOAD được combo Loại\");\n }\n txtTenMon.setText(StoreData.currentMonAn.getTenMon());\n txtDonGia.setText(Integer.toString(StoreData.currentMonAn.getDonGia()));\n txtDVT.setText(StoreData.currentMonAn.getdVT());\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n workerTypeComboBox.setItems(workerTypes);\n userIDComboBox.setItems(userIDObservableList);\n }", "private void initialize() {\r\n\t\t\r\n\t\tfinal List<Caixa> listaCaixa = new CaixaService(JPAUtil.createEntityManager()).getList();\r\n\t\t\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 321, 190);\r\n\t\tframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tfinal JComboBox cmbCaixa = new JComboBox();\r\n\t\tcmbCaixa.setBounds(10, 11, 285, 20);\r\n\t\tframe.getContentPane().add(cmbCaixa);\r\n\t\t\r\n\t\tString[] itensCombo = new String[listaCaixa.size()];\r\n\t\tfor(int i=0;i<listaCaixa.size();i++) {\r\n\t\t\titensCombo[i]=listaCaixa.get(i).getNome();\r\n\t\t}\r\n\t\t\r\n\t\tDefaultComboBoxModel<String> comboBoxModel = new DefaultComboBoxModel<String>(itensCombo);\r\n\t\tcmbCaixa.setModel(comboBoxModel);\r\n\t\t\r\n\t\t\r\n\t\tJButton btnVerTodos = new JButton(\"Ver todos os caixas\");\r\n\t\tbtnVerTodos.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tTelaCaixaVendaRelatorio tela = new TelaCaixaVendaRelatorio();\r\n\t\t\t\ttela.getFrame().setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerTodos.setBounds(10, 117, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerTodos);\r\n\t\t\r\n\t\tJButton btnVerCaixaSelecionado = new JButton(\"Ver caixa selecionado\");\r\n\t\tbtnVerCaixaSelecionado.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTelaCaixaVendaRelatorio telaCaixaVendaRelatorio = new TelaCaixaVendaRelatorio(listaCaixa.get(cmbCaixa.getSelectedIndex()));\r\n\t\t\t\t\ttelaCaixaVendaRelatorio.getFrame().setVisible(true);\r\n\t\t\t\t}catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVerCaixaSelecionado.setBounds(10, 83, 285, 23);\r\n\t\tframe.getContentPane().add(btnVerCaixaSelecionado);\r\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 703, 720);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tc1 = new JComboBox();\r\n\t\tc1.setModel(new DefaultComboBoxModel(Month.values()));\r\n\t\tc1.setBounds(330, 211, 215, 32);\r\n\t\tframe.getContentPane().add(c1);\r\n\t\tc1.addItemListener(this);\r\n\t\t\r\n\t\tl1 = new JLabel(\"ans\");\r\n\t\tl1.setBounds(353, 289, 162, 46);\r\n\t\tframe.getContentPane().add(l1);\r\n\t}", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n montoOrigen.requestFocus();\r\n cbOrigen.getItems().add(\"Dolar\");\r\n cbOrigen.getItems().add(\"Euro\");\r\n cbOrigen.getItems().add(\"Yen\");\r\n cbOrigen.getItems().add(\"BitCoin\");\r\n cbOrigen.setValue(\"Dolar\");\r\n \r\n cmbResultado.getItems().add(\"Dolar\");\r\n cmbResultado.getItems().add(\"Euro\");\r\n cmbResultado.getItems().add(\"Yen\");\r\n cmbResultado.getItems().add(\"BitCoin\");\r\n cmbResultado.setValue(\"Euro\");\r\n \r\n //montoOrigen.setText(String.valueOf(fOrigen));\r\n //montoResultado.setText(String.valueOf(fResultado));\r\n }", "public void loadComboBoxCourses(){\r\n //Para cargar un combobox\r\n CircularDoublyLinkList tempCourses = new CircularDoublyLinkList();\r\n tempCourses = Util.Utility.getListCourse();\r\n String temporal = \"\";\r\n if(!tempCourses.isEmpty()){\r\n try {\r\n for (int i = 1; i <= tempCourses.size(); i++) {\r\n Course c = (Course)tempCourses.getNode(i).getData(); \r\n temporal = c.getId()+\"-\"+c.getName();\r\n this.cmbCourses.getItems().add(temporal);\r\n }\r\n } catch (ListException ex) {\r\n Logger.getLogger(NewStudentController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n cmbCourses.setValue(temporal);\r\n cmbCourses.getSelectionModel().select(\"Courses\");\r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n showPromotion();\n showCombo();\n showComboPart();\n \n }", "@FXML\r\n private void initialize() {\n this.departureBox.setItems(TRAIN.cityNamesLIST()); //setting the arraylist: departureList as a parameter for the departureBox\r\n departureBox.setValue(\"la\");\r\n arrivalsBox.setItems(TRAIN.cityNamesLIST()); //setting the arraylist: arrivalsList as a parameter for the departureBox\r\n arrivalsBox.setValue(\"ar\");\r\n }", "public void loadData(){\n mTipoEmpleadoList=TipoEmpleado.getTipoEmpleadoList();\n ArrayList<String> tipoEmpleadoName=new ArrayList();\n for(TipoEmpleado tipoEmpleado: mTipoEmpleadoList)\n tipoEmpleadoName.add(tipoEmpleado.getDescripcion()); \n mFrmMantenerEmpleado.cmbEmployeeType.setModel(new DefaultComboBoxModel(tipoEmpleadoName.toArray()));\n \n \n }", "public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }", "private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }", "public UpdateHospede() {\n initComponents();\n this.setLocationRelativeTo(null);\n String tDoc[]=new String[tipoDoc.length];\n for(int i=0;i<tipoDoc.length;i++){\n tDoc[i]=tipoDoc[i];\n }\n tipoDocCB.setModel(new javax.swing.DefaultComboBoxModel<>(tDoc));\n this.setLocationRelativeTo(null);\n }", "private ObservableList<String> fillComboBox() {\n\t\tObservableList<String> list = FXCollections.observableArrayList();\n\t\t\n\t\t/* Test Cases */\n\t\t\tlist.addAll(\"Item Code\", \"Description\");\n\t\t\n\t\treturn list;\n\t}", "public Groupe() {\n \n initComponents();\n FillCombo();\n conect=scl.obtenirconnexion();\n }", "public void initialize() \n\t{\n\t\tObservableList<TipoProyeccion> observableTipoProyeccion = \n\t\t\t\tFXCollections.observableArrayList(TipoProyeccion.values());\n\t\t//Amarro el observable list con el ChoiceBox\n\t\tchbTipoProyeccion.setItems(observableTipoProyeccion);\n\t\t\n\t\tList<Cine.Sala> listaSalasNoObservables = Context.getInstance().getCine().getListaSalas();\n\t\tObservableList<Cine.Sala> listaObservableSalas = FXCollections.observableArrayList(listaSalasNoObservables);\n\t\t\n\t\tchbSala.setItems(listaObservableSalas);\n\t\t\n\t\t/*SpinnerValueFactory<Integer> spnValueFactoryInteger = \n\t\t\t\tnew IntegerSpinnerValueFactory(1,10,1);\n\t\tspnSala.setValueFactory(spnValueFactoryInteger);\n\t\t*/\n\t\t\n\t\t//Creo un metodo falso para cargar peliculas (hasta mientras).\n\t\t//cargarPeliculas();\n\t\t\n\t\t//Ahora si cargo las peliculas de verdad ingresadas \n\t\t//por medio de la vista viewPelicula\n\t\tObservableList<Pelicula> listaObservablePeliculas = \n\t\t\t\tFXCollections.observableArrayList(Context.getInstance().getListaPeliculas());\n\t\tchbPelicula.setItems(listaObservablePeliculas);\n\t\t\n\t\t//Metodo para inicializar hora con valores max y min. \n\t\t//Luego amarro propiedad de texto de label a propiedad valor del Slider.\n\t\tinicializarHora();\n\t\t\n\t\tinicializarMinutos();\n\t\t\n\t\tdateProyeccion.setValue(LocalDate.now());\n\t}", "public void buildConsultantComboBox(){\r\n combo_user.getSelectionModel().selectFirst(); // Select the first element\r\n \r\n // Update each timewindow to show the string representation of the window\r\n Callback<ListView<User>, ListCell<User>> factory = lv -> new ListCell<User>(){\r\n @Override\r\n protected void updateItem(User user, boolean empty) {\r\n super.updateItem(user, empty);\r\n setText(empty ? \"\" : user.getName());\r\n }\r\n };\r\n \r\n combo_user.setCellFactory(factory);\r\n combo_user.setButtonCell(factory.call(null)); \r\n }" ]
[ "0.8462818", "0.82958466", "0.8218005", "0.79889977", "0.7898145", "0.78331834", "0.7793709", "0.77345234", "0.7685164", "0.7619531", "0.7612522", "0.7597053", "0.75406355", "0.75258046", "0.7388195", "0.7371811", "0.73049617", "0.73029274", "0.7299047", "0.7272465", "0.72671586", "0.72455716", "0.7211517", "0.71806866", "0.7159732", "0.7145358", "0.714124", "0.71344924", "0.7128372", "0.71281993", "0.7117558", "0.7102103", "0.7070674", "0.7046016", "0.7039475", "0.7009004", "0.7008767", "0.6983751", "0.6976273", "0.6972124", "0.69695634", "0.6954551", "0.6946812", "0.6944733", "0.69354916", "0.6934445", "0.6932975", "0.69213325", "0.69073755", "0.6888956", "0.68848544", "0.6884337", "0.6882965", "0.68800956", "0.68711203", "0.68681026", "0.6864086", "0.68610454", "0.68572336", "0.68464583", "0.6846287", "0.6841326", "0.6821178", "0.6804602", "0.68039566", "0.679822", "0.6792403", "0.6791971", "0.6785725", "0.67852145", "0.67794997", "0.6774281", "0.6773337", "0.6772904", "0.67694646", "0.67691267", "0.67471814", "0.6742969", "0.6737053", "0.67360145", "0.6734953", "0.6731152", "0.6728074", "0.67127895", "0.6707575", "0.6703168", "0.66993445", "0.66910744", "0.66876286", "0.6687312", "0.66808844", "0.667846", "0.6676798", "0.66747904", "0.66605616", "0.66599554", "0.6657595", "0.665641", "0.6646987", "0.66445386" ]
0.8790238
0
opens the new person dialog to add a new person
public void act_newPerson(ActionEvent actionEvent) { try { Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("newPersonGUI.fxml")); Stage stage = new Stage(); stage.setTitle("New Person"); stage.setScene(new Scene(root, 400, 300)); stage.setResizable(false); stage.show(); stage.setOnHiding(new EventHandler<WindowEvent>() { @Override public void handle(WindowEvent event) { event.consume(); fillCombobox(); } }); } catch (IOException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n private void handleNewPerson() {\n Shops tempShops = new Shops();\n boolean okClicked = mainApp.showPersonEditDialog(tempShops);\n if (okClicked) {\n mainApp.getPersonData().add(tempShops);\n }\n }", "public Dialog createAddPersonDialog(String title, String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getMyAcitivty());\n builder.setTitle(title);\n builder.setMessage(msg);\n\n // Use an EditText view to get user input.\n final EditText input = new EditText(getMyAcitivty());\n input.setText(\"\");\n builder.setView(input);\n\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int whichButton) {\n String value = input.getText().toString();\n Log.d(TAG, \"user input: \" + value);\n inputDialogResult = value;\n launchTrainingActivity();\n// AlertDialog dg =\n// SelectServerAlertDialog.createDialog(\n// getContext(),\n// \"Pick a Server\",\n// getAllIps(),\n// launchTrainingActivityAction,\n// cancelAction,\n// true);\n// dg.show();\n }\n });\n builder.setNegativeButton(\"Cancel\", SelectServerAlertDialog.cancelAction);\n return builder.create();\n }", "public void addRelationshipDialog() { new RelationshipDialog(); }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\n\t\t\t\t\tString nomSaisi = txtNomPersonnel.getText();\n\t\t\t\t\tString motDePasseSaisi = txtMotDePassePersonnel.getText();\n\t\t\t\t\tString roleChoisi = comboRoles.getSelectedItem().toString();\n\n\t\t\t\t\tif (!nomSaisi.isEmpty() && !motDePasseSaisi.isEmpty() && !roleChoisi.isEmpty()) {\n\t\t\t\t\t\t//ajout d'un nouveau personnel dans la bdd\n\t\t\t\t\t\tPersonnelMger.getInstance().addPersonnel(nomSaisi, motDePasseSaisi, roleChoisi);\n\t\t\t\t\t\t//fermer la boite de dialogue\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\talert.showMessageDialog(null, \"Cet identifiant existe déjà !\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String name = name_et.getText().toString().trim();\n //String name = text.replaceAll(\"\\\\d+\", \"\").replaceAll(\"(.)([A-Z])\", \"$1 $2\");\n\n //adding new Person to database\n //Person addNewPerson = new Person(name);\n //reference.push().setValue(addNewPerson);\n }", "private void addPerson(){\r\n\t\tpeople.add(new Person(this));\r\n\t\t// fire the listeners so the screen updates\r\n\t\t// when addPerson is called (by the button click)\r\n\t\tpersonTableModel.fireTableRowsInserted(0,0);\r\n\t}", "private void onAddPatient() {\n\t\tGuiManager.openFrame(GuiManager.FRAME_ADD_PATIENT);\n\t}", "public Person registerOwner() {\n registerOwnerButton.setOnAction(e -> {\n if (validatePersonData() == DataControl.SUCCESS) {\n String birthNo = birthNoField.getText();\n String firstName = firstNameField.getText();\n String lastName = lastNameField.getText();\n String telephoneNo = telephoneNoField.getText();\n String email = emailField.getText();\n String zipCode = zipCodeField.getText();\n String streetAddress = streetAddressField.getText();\n person = new Person(birthNo, firstName, lastName, telephoneNo,\n email, zipCode, streetAddress);\n MessageDialog.showMessageDialog(\"Registrert\",\n \"Du har nå registrert en person ny eier av bilen.\",\n MessageDialog.INFORMATION_ICON,\n MessageDialog.OK_OPTION);\n stage.close();\n } else {\n if (MessageDialog.showMessageDialog(\"Ugyldig\",\n \"Ugyldig informasjon. Ønsker du å gjøre om?\",\n MessageDialog.INFORMATION_ICON,\n MessageDialog.YES__NO_OPTION) ==\n MessageDialog.YES_OPTION) {\n // do nothing after closing dialog\n } else {\n stage.close();\n }\n }\n });\n stage.showAndWait();\n return person;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.add) {\n AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(\"新增聯絡人\");\n\n LinearLayout linearLayout = new LinearLayout(this);\n linearLayout.setOrientation(LinearLayout.VERTICAL);\n linearLayout.setPadding(80,10,50,10);\n final EditText editText_name = new EditText(this);\n final EditText editText_phone = new EditText(this);\n editText_name.setHint(\"請輸入聯絡人名稱\");\n editText_phone.setHint(\"請輸入電話號碼\");\n editText_phone.setInputType(EditorInfo.TYPE_CLASS_NUMBER);\n linearLayout.addView(editText_name);\n linearLayout.addView(editText_phone);\n dialog.setView(linearLayout);\n\n dialog.setPositiveButton(\"新增\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if (editText_phone.getText().toString().matches(\"(09)+[\\\\d]{8}\")) {\n ContactPerson contactPerson = new ContactPerson(editText_name.getText().toString(), editText_phone.getText().toString());\n contactDB.insert(contactPerson);\n } else {\n Toast.makeText(MainActivity.this, \"輸入電話號碼格式錯誤\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n dialog.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setCancelable(false);\n dialog.show();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@FXML\n\tpublic void addInvestor() {\n\t\tString iName = name.getText();\n\t\tString iSurname = surname.getText();\n\t\tString iPesel = pesel.getText();\n\t\tString iBudget = budget.getText();\n\t\tif (iName.isEmpty()) {\n\t\t\tshowErrorDialog(\"Provide valid name\");\n\t\t} else if (iSurname.isEmpty()) {\n\t\t\tshowErrorDialog(\"Provide valid surname\");\n\t\t} else if (!NumberUtils.isPESEL(iPesel)) {\n\t\t\tshowErrorDialog(\"Given PESEL is not valid\");\n\t\t} else if (!NumberUtils.isNumeric(iBudget)) {\n\t\t\tshowErrorDialog(\"Given budget is not valid\");\n\t\t} else {\n\t\t\tInvestor investor = new Investor(iName, iSurname, iPesel, iBudget);\n\t\t\tPseudoDB.addNewInwestor(investor);\n\t\t\tPseudoDB.showAllInvestors();\n\t\t\tStage stage = (Stage) closePopUpIco.getScene().getWindow();\n\t\t\tBlurUtils.unblur();\n\t\t\tstage.close();\n\t\t}\n\n\t}", "private void openAddDialog(){\n DialogFragment dialog = new AddLocationDialog();\n dialog.show(getFragmentManager(), getText(R.string.map_ask_add).toString());\n }", "@Override\n public void onClick(View view) {\n if (mAddDialog == null) {\n mAddDialog = new XPopup.Builder(MainActivity.this)\n .asInputConfirm(getString(R.string.add_random_title)\n , getString(R.string.add_random_content)\n , new OnInputConfirmListener() {\n @Override\n public void onConfirm(String text) {\n if (mAdapter != null) {\n mAdapter.addData(new BaseModel(text, 1));\n }\n }\n }).show();\n } else {\n mAddDialog.show();\n }\n }", "public void openAddGroupeDialog() {\n Log.d(\"DEBUG\", \"Ouverture du dialog d'ajout de groupe\");\n new AddGroupeDialog(this, this.getActivity()).show();\n }", "@FXML\n\tprivate void handleAdd() {\n\t\tshowCustomerInfoDialog(null);\t\n\t}", "public void popupAdd() {\n builder = new AlertDialog.Builder(getView().getContext());\n View views = getLayoutInflater().inflate(R.layout.departmentpopup, (ViewGroup) null);\n DepartmentName = (EditText) views.findViewById(R.id.department_name);\n DepartmentId = (EditText) views.findViewById(R.id.department_id);\n pbar =views.findViewById(R.id.departmentProgress);\n Button button =views.findViewById(R.id.save_depart);\n saveButton = button;\n button.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n addDeparatments();\n }\n });\n builder.setView(views);\n AlertDialog create =builder.create();\n dialog = create;\n create.show();\n }", "public void savePerson()\r\n { \r\n\t/*get values from text fields*/\r\n\tname = tfName.getText();\r\n\taddress = tfAddress.getText();\r\n\tphone = Integer.parseInt(tfPhone.getText());\r\n\temail = tfEmail.getText();\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null, \"Please enter person name.\");\r\n\t}else\r\n {\r\n\r\n\t /*create a new PersonInfo object and pass it to PersonDAO to save it*/\r\n\t PersonInfo person = new PersonInfo(name, address, phone, email);\r\n\t pDAO.savePerson(person);\r\n\r\n\t JOptionPane.showMessageDialog(null, \"Record added\");\r\n }\r\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\taddMember();\n\t\t\t\t\t\t}", "public void onAddParticipant() {\n ParticipantDialog participantDialog = ParticipantDialog.getNewInstance();\n Optional<Participant> result = participantDialog.showAndWait();\n if (!result.isPresent()) {\n return;\n }\n\n if (controller.addParticipant(result.get())) {\n return;\n }\n\n AlertHelper.showError(LanguageKey.ERROR_PARTICIPANT_ADD, null);\n }", "public AddNewPerson() {\r\n super();\r\n initComponents();\r\n Image icon = getToolkit().getImage(getClass().getResource(\"/images/app_icon_32.png\"));\r\n setIconImage(icon);\r\n setLocation(250, 100);\r\n setVisible(true);\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception 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}", "private void newLabButton(){\n NewLabNameTextfield.setText(\"\");\n NewLabDialog.setVisible(true);\n NewLabNameTextfield.requestFocusInWindow();\n }", "public PersonInformationDialog() {\n\t\tthis.setModal(true);\n\t\tthis.setTitle(\"Saisie\");\n\t\tthis.setSize(350, 140);\n\t\tthis.setResizable(false);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\n\t\tJPanel pan = new JPanel();\n\t\tpan.setBorder(BorderFactory\n\t\t\t\t.createTitledBorder(\"Informations de la personne\"));\n\t\tpan.setLayout(new GridLayout(2, 2));\n\t\tthis.name = new JTextField();\n\t\tJLabel nomLabel = new JLabel(\"Saisir un nom :\");\n\t\tpan.add(nomLabel);\n\t\tpan.add(this.name);\n\t\tthis.firstName = new JTextField();\n\t\tJLabel prenomLabel = new JLabel(\"Saisir un prenom :\");\n\t\tpan.add(prenomLabel);\n\t\tpan.add(this.firstName);\n\n\t\tJPanel control = new JPanel();\n\t\tthis.okButton = new JButton(\"Valider\");\n\t\tthis.okButton.setPreferredSize(new Dimension(90, 30));\n\t\tcontrol.add(this.okButton);\n\t\tthis.okButton.addActionListener(this);\n\n\t\tthis.cancelButton = new JButton(\"Annuler\");\n\t\tthis.cancelButton.setPreferredSize(new Dimension(90, 30));\n\t\tcontrol.add(this.cancelButton);\n\t\tthis.cancelButton.addActionListener(this);\n\n\t\tJSplitPane split = new JSplitPane();\n\t\tsplit.setOrientation(JSplitPane.VERTICAL_SPLIT);\n\t\tsplit.setTopComponent(pan);\n\t\tsplit.setBottomComponent(control);\n\t\tsplit.setDividerSize(0);\n\t\tsplit.setEnabled(false);\n\t\tthis.add(split);\n\t}", "@FXML\n private void openCreateUser(ActionEvent event) {\n CreateUserController createusercontroller = new CreateUserController();\n User user = createusercontroller.openCreateUser(event, roleTap);\n\n if (user != null) {\n userList.add(user);\n UsermanagementUtilities.setFeedback(event, user.getName().getFirstName()+LanguageHandler.getText(\"userCreated\"), true);\n } else {\n UsermanagementUtilities.setFeedback(event, LanguageHandler.getText(\"userNotCreated\"), false);\n\n }\n }", "public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}", "public void showAddCustomerDialog() {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApplication.class.getResource(\"view/AddCustomerDialog.fxml\"));\n\t\t\tAnchorPane page = (AnchorPane) loader.load();\n\t\t\tStage dialogStage = new Stage();\n\t\t\tdialogStage.setTitle(\"Add Customer\");\n\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\tdialogStage.initOwner(primaryStage);\n\t\t\tScene scene = new Scene(page);\n\t\t\tdialogStage.setScene(scene);\n\t\t\tAddCustomerDialogController controller = loader.getController();\n\t\t\tcontroller.setDialogStage(dialogStage);\n\t\t\tdialogStage.showAndWait();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "public void newStudentButtonPushed() {\r\n String firstName = firstNameTextField.getText();\r\n String lastName = lastNameTextField.getText();\r\n LocalDate birthdayDate = birthdayDatePicker.getValue();\r\n \r\n // Firts Name Validation\r\n if (firstName != null && (firstName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"First Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Last Name Validation\r\n if (lastName != null && (lastName.length() < MIN_CHARS)) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Last Name is not correct \"\r\n + \"(empty name or shorter that three characters)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Date Validation\r\n if (birthdayDate == null || birthdayDate.isAfter(\r\n LocalDate.now().minusYears(MIN_YEARS_OLD))) {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setTitle(\"Invalid Input\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\r\n \"Date is not correct \"\r\n + \"(empty date or student < 17 years old)!\");\r\n alert.showAndWait();\r\n \r\n return;\r\n }\r\n \r\n // Construct new student\r\n Student newStudent = new Student(firstName, lastName, birthdayDate);\r\n \r\n try {\r\n newStudent = covidMngrService.addStudent(newStudent);\r\n \r\n // Get all the items from the table as a list, then add the \r\n // new student to the list\r\n tableView.getItems().add(newStudent);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(StudentMainCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增员工\",\"输入员工信息,用空格分开,例如:001 Manager Tommy f 312039\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Staff values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"','\"+str[3]+\"','\"+str[4]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowStaff();\r\n\t\t\t}", "public void createFriend(ActionEvent actionEvent) {\n Friend f = new Friend(getName.getText(),getPhone.getText());\n listFriends.getItems().add(f);\n getName.clear();\n getPhone.clear();\n }", "public void newuserclicked(View view) {\n Intent myuserIntent = new Intent(this, UserCreation.class);\n startActivity(myuserIntent);\n }", "@FXML public void addUser(ActionEvent e) {\n\t\tuserNameTxt.setVisible(true);\n\t\tsaveB.setVisible(true);\n\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tString name = nameET.getText().toString();\n\t\tString number = numberET.getText().toString();\n\t\tPerson p = new Person(name, number);\n\t\tswitch (v.getId()) {\n\n\t\tcase R.id.buttonInsert:\n\t\t\tLog.d(\"RituNavi\", \"\" + p.getName() + p.getNumber());\n\t\t\ttry {\n\t\t\t\tinsert(p);\n\t\t\t} catch (RemoteException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OperationApplicationException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tview();\n\t\t\tbreak;\n\n\t\tcase R.id.buttonDelete:\n\t\t\tLog.d(\"RituNavi\", \"\" + p.getName() + p.getNumber());\n\t\t\tdelete(name);\n\t\t\tview();\n\t\t\tbreak;\n\n\t\tcase R.id.buttonQuery:\n\t\t\tLog.d(\"RituNavi\", \"\" + p.getName() + p.getNumber());\n\t\t\tview();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }", "private static boolean addNewProject() {\n\t\tString[] options = new String[] {\"Ongoing\",\"Finished\",\"Cancel\"};\n\t\tint choice = JOptionPane.showOptionDialog(frame, \"Select new project type\" , \"Add new Project\", \n\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[2]);\n\t\t\n\t\tNewProjectDialog dialog;\n\t\t\n\t\tswitch(choice) {\n\t\tcase 0:\n\t\t\tdialog = new NewProjectDialog(\"o\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tdialog = new NewProjectDialog(\"f\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private void newJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newJMenuItemActionPerformed\n // TODO add your handling code here:\n //Event handler for Adding a new employee \n try\n {\n //Create and display a new AddDialog\n boolean empExists = false;\n AddEmployee addEmployee = new AddEmployee(this, true);\n addEmployee.setVisible(true);\n Employee newEmployee = addEmployee.getEmployee();\n String employeeName = newEmployee.getName();\n empExists = findEmployee(employeeName) != null;\n if(newEmployee != null && empExists == false)\n { \n employees.add(newEmployee);\n displayEmployee();\n saveEmployee();\n }\n else\n {\n String first = employeeName + \" already exists.\";\n String second = \"No update was made.\";\n displayResults(first, second);\n employeeJList.setVisible(true);\n employeeJList.setSelectedIndex(0);\n }\n }\n catch(NullPointerException nullex)\n {\n JOptionPane.showMessageDialog(null, \"Employee not added\", \"Input error\",\n JOptionPane.WARNING_MESSAGE);\n employeeJList.setVisible(true);\n employeeJList.setSelectedIndex(0); \n }\n }", "public void btn_newEntry() throws IOException, SQLException {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewEntry.fxml\"));\n Parent parent = fxmlLoader.load();\n NewEntryController newEntryController = fxmlLoader.<NewEntryController>getController();\n newEntryController.setPresenter(presenter);\n newEntryController.fillComboBox();\n this.stageNewEntry = new Stage();\n stageNewEntry.setTitle(bundle.getString(\"entryNew.title\"));\n stageNewEntry.setScene(new Scene(parent, 400, 400));\n stageNewEntry.setAlwaysOnTop(true);\n stageNewEntry.setResizable(false);\n stageNewEntry.initModality(Modality.APPLICATION_MODAL);\n stageNewEntry.getIcons().add(new Image(String.valueOf(this.getClass().getResource(\"images/logo.png\"))));\n stageNewEntry.show();\n }", "private void addBotionActionPerformed(ActionEvent e) {\n new AddUser().setVisible(true);\n this.dispose();\n }", "protected void addUser(ActionEvent ae) {\n\t\tAddUsersFrm auf=new AddUsersFrm();\n\t\tauf.setVisible(true);\n\t\tdesktopPane.add(auf);\n\t}", "private void onAddClicked() {\r\n\t\t\r\n\t\tString givenName = Window.showStudentDialog();\r\n\t\t\r\n\t\tif (givenName != null) {\r\n\t\t\t\r\n\t\t\tif(!chart.addStudentName(givenName)) {\r\n\t\t\t\tWindow.msg(\"There are no seats available.\");\r\n\t\t\t}\r\n\t\t\tupdate();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tSystem.out.println(\"新增用户\");\r\n\t\t\t\tInputDialog id1=new InputDialog(sShell,\"新增用户\",\"输入用户信息,用空格分开,例如:pdl 666 管理员\",\"\",null);\r\n\t\t\t\tif(id1.open()==0){\r\n\t\t\t\t\tinput=id1.getValue();\r\n\t\t\t\t\tif(input.equals(\"\")) return;\r\n\t\t\t\t}\r\n\t\t\t\telse return;\r\n\t\t\t\tString str[]=input.split(\" \");\r\n\t\t\t\tCommonADO ado=CommonADO.getCommonADO();\r\n\t\t\t\tString sql=\"insert into Users values('\"+str[0]+\"','\"+str[1]+\"','\"+str[2]+\"')\";\r\n\t\t\t\tado.executeUpdate(sql);\r\n\t\t\t\tshowUser();\r\n\t\t\t}", "@FXML\n private void handleEditPerson() {\n Shops selectedShops = personTable.getSelectionModel().getSelectedItem();\n if (selectedShops != null) {\n boolean okClicked = mainApp.showPersonEditDialog(selectedShops);\n if (okClicked) {\n showPersonDetails(selectedShops);\n }\n\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"No Selection\");\n alert.setHeaderText(\"No Shops Selected\");\n alert.setContentText(\"Please select a person in the table.\");\n \n alert.showAndWait();\n }\n }", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "@Override\n public void onClick(View view) {\n FragmentManager fm = getSupportFragmentManager();\n EditNameDialog editNameDialog = new EditNameDialog();\n editNameDialog.show(fm, \"fragment_edit_name\");\n }", "@FXML\n private void add() {\n\n var firstName = firstNameTextField.getText();\n var lastName = lastNameTextField.getText();\n\n // validate params\n if (firstName.isBlank() ||\n lastName.isBlank()) {\n alertDialog.show(\"All Fields are Required!\");\n return;\n }\n\n loadingImageView.setVisible(true); // show the loading animation\n\n // make an http request to add new author\n AuthorRequest\n .getInstance()\n .add(firstName, lastName)\n .thenAcceptAsync(success -> Platform.runLater(() -> {\n loadingImageView.setVisible(false);\n String message;\n if (success) {\n message = \"Successful!\";\n // clear all form fields\n firstNameTextField.clear();\n lastNameTextField.clear();\n } else message = \"Something went wrong!\";\n alertDialog.show(message); // show response\n }));\n\n }", "public void addPerson() {\n\t\tSystem.out.println(\"*****ADD RECORDS*****\");\n\t\tSystem.out.println(\"How many records you want to add?\");\n\t\tint numOfRecods = sc.nextInt();\n\t\tcount = 0;\n\t\tfor (int i = 1; i <= numOfRecods; i++) {\n\t\t\tSystem.out.println(\"Enter the First name\");\n\t\t\tString firstName = sc.next();\n\t\t\tperson.setFirstName(firstName);\n\n\t\t\tSystem.out.println(\"Enter the Last name\");\n\t\t\tString lastName = sc.next();\n\t\t\tperson.setLastName(lastName);\n\n\t\t\tSystem.out.println(\"Enter your Address\");\n\t\t\tString address = sc.next();\n\t\t\tperson.setAddress(address);\n\n\t\t\tSystem.out.println(\"Enter your City\");\n\t\t\tString city = sc.next();\n\t\t\tperson.setCity(city);\n\n\t\t\tSystem.out.println(\"Enter your State\");\n\t\t\tString state = sc.next();\n\t\t\tperson.setState(state);\n\n\t\t\tSystem.out.println(\"Enter your Zip Code\");\n\t\t\tint zipcode = sc.nextInt();\n\t\t\tperson.setZip(zipcode);\n\n\t\t\tSystem.out.println(\"Enter your Phone Number\");\n\t\t\tlong phone = sc.nextLong();\n\t\t\tperson.setPhoneNo(phone);\n\n\t\t\tdetails[count++] = new Person(firstName, lastName, address, city, state, zipcode, phone);\n\t\t\tSystem.out.println(i + \" records added successfully\");\n\t\t}\n\t\tSystem.out.println(\"All records are added successfully\\n\");\n\t}", "public void actionPerformed(ActionEvent event) {\n try {\n anEmplist.add(new Manager(nameField.getText(),\n Double.parseDouble(salaryField.getText()),\n Double.parseDouble(bonusField.getText())));\n System.out.println(\"New manager successfully added.\");\n frame.dispose();\n }\n catch (Exception e) {\n System.out.println(\"Unable to add Employee. Please make\"\n + \" sure that all fields are filled out with valid\"\n + \" input.\");\n frame.dispose();\n }\n }", "public void addUserBtn(){\n\t\t\n\t\t// TODO: ERROR CHECK\n\t\t\n\t\tUserEntry user = new UserEntry(nameTF.getText(), (String)usertypeCB.getValue(), emailTF.getText());\n\t\tAdminController.userEntryList.add(user);\n\t\t\n\t\t\n\t\t// Create a UserEntry and add it to the observable list\n\t\tAdminController.userList.add(user);\t\t\n\t\t\n\t //AdminController.adminTV.setItems(AdminController.userList);\n\t\t\n\t\t//Close current stage\n\t\tAdminController.addUserStage.close();\n\t\t\n\t}", "public void insert()\n {\n CInsertUser cInsertUser = new CInsertUser();\n window.dispose();\n }", "private void MoodRatingAddNoteDialog() {\n FragmentManager manager = getFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_add_note\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n fragmentAddNote fraAddNoteDialog = new fragmentAddNote();\n fraAddNoteDialog.setTargetFragment(this, DIALOG_ADDNOTE);\n\n fraAddNoteDialog.show(getFragmentManager().beginTransaction(), \"fragment_add_note\");\n }", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString userName = input.getText().toString();\r\n\t\t\t\tString userColour = sprCoun.getSelectedItem()\r\n\t\t\t\t\t\t.toString();\r\n\t\t\t\tString userLangName = userLang;\r\n\r\n\t\t\t\tcontext.addNewUser(userName, userColour);\r\n\t\t\t\t\r\n\t\t\t\talertDialog.dismiss();\r\n\t\t\t}", "private void AddPerson (MouseEvent evt)\n {\n if(currentPlayers < nPlayers && !textfield1.getText().equals(\"\"))\n {\n Names[currentPlayers] = textfield1.getText();\n currentPlayers++;\n editorpane1.setText(editorpane1.getText()+textfield1.getText()+'\\n');\n }\n else\n {\n if(currentPlayers == nPlayers)\n {\n label2.setText(\"Max number of players reached\");\n }\n else\n {\n if(textfield1.getText().equals(\"\"))\n {\n label2.setText(\"Add a Name\");\n }\n }\n }\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "@FXML\n\t private void loadaddmember(ActionEvent event) throws IOException {\n\t \tloadwindow(\"views/addmember.fxml\", \"Add new Member\");\n\t }", "@FXML\r\n\tvoid openCreateUser(ActionEvent event) {\r\n\t\tParent root = null;\r\n\t\tnewWindow = new Stage();\r\n\t\ttry {\r\n\t\t\troot = FXMLLoader.load(getClass().getResource(\"3.1-AddISUsersScreen.fxml\"));\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tISUsers = new Scene(root);\r\n\t\tnewWindow.setTitle(\"Create IS User\");\r\n\t\tnewWindow.setScene(ISUsers);\r\n\t\tnewWindow.setResizable(false);\r\n\t\tnewWindow.initOwner((Stage) ((Node) event.getSource()).getScene().getWindow());\r\n\t\tnewWindow.initModality(Modality.WINDOW_MODAL);\r\n\t\tnewWindow.show();\r\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tLong employeeID = (Long) employeeTable.getValueAt(employeeTable.getSelectedRow(), 6);\n\t\t\t\taddUserDialog.setEmployeeID(employeeID);\n\t\t\t\taddUserDialog.setVisible(true);\n\t\t\t}", "public NewEmployeeDialog(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n currentEmployeeCode = \"\";\n populatePositionComboBox ();\n putDialogToCenter();\n }", "public void newProjectAction() throws IOException {\n\t\tfinal FXMLSpringLoader loader = new FXMLSpringLoader(appContext);\n\t\tfinal Dialog<Project> dialog = loader.load(\"classpath:view/Home_NewProjectDialog.fxml\");\n\t\tdialog.initOwner(newProject.getScene().getWindow());\n\t\tfinal Optional<Project> result = dialog.showAndWait();\n\t\tif (result.isPresent()) {\n\t\t\tlogger.trace(\"dialog 'new project' result: {}\", result::get);\n\t\t\tprojectsObservable.add(result.get());\n\t\t}\n\t}", "public static void showNew() {\n\t\tif (DIALOG == null) {\n\t\t\tDIALOG = new NewDialog();\n\t\t}\n\t\tDIALOG.setVisible(true);\n\t\tDIALOG.toFront();\n\t}", "public AddUser(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n setTitle(\"Add User\");\n }", "NewAccountPage openNewAccountPage();", "public void addTeacherWindow(ControllerAdmin controllerAdmin) throws SQLException, ClassNotFoundException {\n JFrame addFrame = new JFrame();\n\n JButton jButtonCanceled = new JButton(\"Annuler\");\n jButtonCanceled.setBounds(380, 240, 100, 28);\n JButton jButtonAdd = new JButton(\"Ajouter\");\n jButtonAdd.setBounds(490, 240, 100, 28);\n\n JLabel jLabelIdStudent = new JLabel(\"Saissisez l'ID du professeur à créer : \");\n jLabelIdStudent.setBounds(20, 20, 250, 28);\n\n JTextField jTextFieldId = new JTextField();\n jTextFieldId.setBounds(280, 20, 200, 28);\n\n JLabel jLabelEmail = new JLabel(\"Saissisez l'Email du professeur : \");\n jLabelEmail.setBounds(20, 48, 250, 28);\n\n JTextField jTextFielEmailPart1 = new JTextField();\n jTextFielEmailPart1.setBounds(280, 48, 100, 28);\n JTextField jTextFielEmailPart2 = new JTextField(\"@ece.fr\");\n jTextFielEmailPart2.setBounds(380, 48, 100, 28);\n\n JLabel jLabelPassword = new JLabel(\"Saissisez le mot de passe du professeur : \");\n jLabelPassword.setBounds(20, 80, 280, 28);\n\n JTextField jTextFieldPassword = new JTextField();\n jTextFieldPassword.setBounds(280, 80, 200, 28);\n\n JLabel jLabelLastName = new JLabel(\"Saissisez le nom du professeur : \");\n jLabelLastName.setBounds(20, 108, 250, 28);\n\n JTextField jTextFieldLastName = new JTextField();\n jTextFieldLastName.setBounds(280, 108, 200, 28);\n\n JLabel jLabelFirstName = new JLabel(\"Saissisez le prénom du professeur : \");\n jLabelFirstName.setBounds(20, 140, 250, 28);\n\n JTextField jTextFieldFirstName = new JTextField();\n jTextFieldFirstName.setBounds(280, 140, 200, 28);\n\n JLabel jLabelSelectPromo = new JLabel(\"Selectionner une matière :\");\n jLabelSelectPromo.setBounds(20, 170, 250, 28);\n\n ArrayList<String> promotions = controllerAdmin.getAllIdCourse();\n String[] strCourse = new String[promotions.size()];\n for (int j = 0; j < promotions.size(); j++) {\n strCourse[j] = promotions.get(j);\n }\n JComboBox jComboBoxSelectCourse = new JComboBox(strCourse);\n jComboBoxSelectCourse.setBounds(280, 170, 100, 28);\n\n addFrame.add(jButtonCanceled);\n addFrame.add(jButtonAdd);\n addFrame.add(jLabelIdStudent);\n addFrame.add(jTextFieldId);\n addFrame.add(jLabelEmail);\n addFrame.add(jTextFielEmailPart1);\n addFrame.add(jTextFielEmailPart2);\n addFrame.add(jLabelPassword);\n addFrame.add(jTextFieldPassword);\n addFrame.add(jLabelLastName);\n addFrame.add(jTextFieldLastName);\n addFrame.add(jLabelFirstName);\n addFrame.add(jTextFieldFirstName);\n addFrame.add(jLabelSelectPromo);\n addFrame.add(jComboBoxSelectCourse);\n\n jButtonCanceled.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n addFrame.dispose();\n }\n });\n jButtonAdd.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n User user = new User();\n if (!jTextFieldId.getText().equals(\"\") && !jTextFielEmailPart1.getText().equals(\"\") && !jTextFieldFirstName.getText().equals(\"\") && !jTextFieldLastName.getText().equals(\"\")){\n if(!user.alreadyExist(jTextFieldId.getText())){\n Teacher teacher = new Teacher(jTextFieldId.getText(), jTextFielEmailPart1.getText() + jTextFielEmailPart2.getText(), jTextFieldPassword.getText(), jTextFieldLastName.getText(), jTextFieldFirstName.getText(), \"TEACHER\", Objects.requireNonNull(jComboBoxSelectCourse.getSelectedItem()).toString());\n teacher.createTeacher();\n }}\n else {\n addTeacherWindow(controllerAdmin);\n System.out.println(\"Erreur Id deja utilise\");\n AlertePopUp alertePopUp = new AlertePopUp();\n alertePopUp.AddFailId.setVisible(true);\n\n }\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n addFrame.dispose();\n }\n });\n\n addFrame.setTitle(\"Ajout d'un professeur\");\n addFrame.setSize(600,300);\n addFrame.setLocation(200, 100);\n addFrame.setLayout(null);\n addFrame.setVisible(true);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if(item.getItemId() == R.id.add){\n LayoutInflater inflater = LayoutInflater.from(this);\n\n View dialogView = inflater.inflate(R.layout.dialog, null);\n\n final AlertDialog alert = new AlertDialog.Builder(this).create();\n\n final EditText name = (EditText) dialogView.findViewById(R.id.name);\n final EditText ph = (EditText) dialogView.findViewById(R.id.ph);\n final EditText dob = (EditText) dialogView.findViewById(R.id.dob);\n\n Button save = (Button) dialogView.findViewById(R.id.save);\n Button cancel = (Button) dialogView.findViewById(R.id.cancel);\n\n save.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n\n String strName = name.getText().toString();\n String strPh = ph.getText().toString();\n String strDOB = dob.getText().toString();\n\n Details d = new Details(strName, strPh, strDOB);\n details.add(d);\n adapter.notifyDataSetChanged();\n alert.dismiss();\n }\n });\n\n cancel.setOnClickListener(new OnClickListener() {\n public void onClick(View v) {\n\n alert.cancel();\n }\n });\n\n alert.setTitle(\"Enter the Details\");\n\n alert.setView(dialogView);\n\n alert.show();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@GetMapping(\"/list/showFormForAdd\")\n\tpublic String showFormForAdd(Model theModel) {\n\t\tPerson thePerson = new Person();\n\t\ttheModel.addAttribute(\"person\", thePerson);\n\n\t\treturn \"person-form\";\n\t}", "private void newDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.addmark));\n\t\tfinal EditText input = new EditText(this);\n\t\tinput.setHint(getString(R.string.pleasemark));\n\t\tbuilder.setView(input);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tif (input.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\t\taddTag(input.getText().toString());\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.successaddmark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.pleasemark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tnewDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "void lookupAndSaveNewPerson();", "public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }", "private void usernameTakenDialog() {\n Dialog dialog = new Dialog(\"Username taken\", cloudSkin, \"dialog\") {\n public void result(Object obj) {\n System.out.println(\"result \" + obj);\n }\n };\n dialog.text(\"This username has already been taken, try a new one.\");\n dialog.button(\"OK\", true);\n dialog.show(stage);\n }", "public void onClick(View v) {\n\t\tString name = nameField.getText().toString();\n\t\tString email = emailField.getText().toString();\n\t\tSQLiteHelper sqh = new SQLiteHelper(this);\n\t\tsqh.addFriend(name, email);\n\t\tnew AddMeToHisPF().execute(email);\n\t\tfinish();\n\t}", "private void createNewUser() {\n ContentValues contentValues = new ContentValues();\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.GENDER, getSelectedGender());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.PIN, edtConfirmPin.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.LAST_NAME, edtLastName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.FIRST_NAME, edtFirstName.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.STATUS, spnStatus.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.DATE_OF_BIRTH, edtDateOfBirth.getText().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.BLOOD_GROUP, spnBloodGroup.getSelectedItem().toString().trim());\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.IS_DELETED, \"N\");\n contentValues.put(DataBaseConstants.Constants_TBL_PATIENTS.MOBILE_NUMBER, edtMobileNumber.getText().toString());\n contentValues.put(DataBaseConstants.Constants_TBL_CATEGORIES.CREATE_DATE, Utils.getCurrentDateTime(Utils.DD_MM_YYYY));\n\n dataBaseHelper.saveToLocalTable(DataBaseConstants.TableNames.TBL_PATIENTS, contentValues);\n context.startActivity(new Intent(CreatePinActivity.this, LoginActivity.class));\n }", "public void verifyAddNewRequestPopUp() {\n try {\n openAddNewRequestWindow();\n waitForVisibleElement(addNewRequestWindow, \"Add new request popup\");\n } catch (Exception e) {\n NXGReports.addStep(\"Verify add new request\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tAddNewMajorDialog addNewMajorDialog=new AddNewMajorDialog(userId);\n\t\t\t\t\n\t\t\t\taddNewMajorDialog.addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void windowClosed(WindowEvent e) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\trefresh(jt);\n\t\t\t\t\t\t}\n\t\t\t\t});\t\n\t\t\t\t\n\t\t\t}", "@FXML\n public void actionOk() {\n //we need to be able to handle the edit case so if it isn't null just update\n if (contact != null) {\n contact.setFirstName(firstNameField.getText());\n contact.setMiddleName(middleNameField.getText());\n contact.setLastName(lastNameField.getText());\n\n contact.setHomePhone(homePhoneField.getText());\n contact.setWorkPhone(workPhoneField.getText());\n contact.setHomeAddress(homeAddressField.getText());\n contact.setWorkAddress(workAddressField.getText());\n contact.setPersonalEmail(personalEmailField.getText());\n contact.setWorkEmail(workEmailField.getText());\n okClicked = true;\n } else {\n //otherwise just create a new contact (not editing)\n Contact theContact = new Contact(firstNameField.getText(), middleNameField.getText(), lastNameField.getText(), homePhoneField.getText(), workPhoneField.getText(), homeAddressField.getText(), workAddressField.getText(), personalEmailField.getText(), workEmailField.getText());\n main.getContactData().add(theContact);\n }\n //close the new contact window\n stage.close();\n }", "public UserDialog(JFrame parent){\n\t\t\tsuper(parent, \"New user\");\n\t\t\tadd(new JPanel(), BorderLayout.NORTH);\n\t\t\tadd(new UserDatapanel(),BorderLayout.CENTER);\n\t\t\tadd(getButtonPanel(),BorderLayout.SOUTH);\n\t\t\tsetSize(500,300);\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n infoDialog = new javax.swing.JDialog();\n jLabel1 = new javax.swing.JLabel();\n fnameLabel = new javax.swing.JLabel();\n lname = new javax.swing.JLabel();\n fname = new javax.swing.JLabel();\n fnameLabel3 = new javax.swing.JLabel();\n fnameLabel4 = new javax.swing.JLabel();\n fnameLabel5 = new javax.swing.JLabel();\n birthYear = new javax.swing.JLabel();\n birthTown = new javax.swing.JLabel();\n birthCountry = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n maritalstatus = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n peopleList = new javax.swing.JList<>();\n\n jLabel1.setText(\"Person Information\");\n\n fnameLabel.setText(\"Name\");\n\n fname.setText(\"jLabel2\");\n\n fnameLabel3.setText(\"Birth year\");\n\n fnameLabel4.setText(\"Birth Town\");\n\n fnameLabel5.setText(\"Birth Country\");\n\n birthYear.setText(\"jLabel2\");\n\n birthTown.setText(\"jLabel2\");\n\n jLabel2.setText(\"Marital Status\");\n\n maritalstatus.setText(\"jLabel3\");\n\n jButton1.setText(\"Back\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout infoDialogLayout = new javax.swing.GroupLayout(infoDialog.getContentPane());\n infoDialog.getContentPane().setLayout(infoDialogLayout);\n infoDialogLayout.setHorizontalGroup(\n infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(infoDialogLayout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(infoDialogLayout.createSequentialGroup()\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fnameLabel)\n .addComponent(fnameLabel3)\n .addComponent(fnameLabel4)\n .addComponent(fnameLabel5)\n .addComponent(jLabel2))\n .addGap(21, 21, 21)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(maritalstatus)\n .addComponent(birthTown)\n .addComponent(birthYear)\n .addGroup(infoDialogLayout.createSequentialGroup()\n .addComponent(fname)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(lname, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(birthCountry, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(85, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, infoDialogLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n infoDialogLayout.setVerticalGroup(\n infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(infoDialogLayout.createSequentialGroup()\n .addGap(42, 42, 42)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(infoDialogLayout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fnameLabel)\n .addComponent(fname)))\n .addComponent(lname, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fnameLabel3)\n .addComponent(birthYear))\n .addGap(18, 18, 18)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fnameLabel4)\n .addComponent(birthTown))\n .addGap(18, 18, 18)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fnameLabel5)\n .addComponent(birthCountry, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(infoDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(maritalstatus))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n peopleList.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n peopleListMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(peopleList);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 282, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 355, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "public void OpenRegisterNewCompany() throws IOException {\n Parent tripViewParent = FXMLLoader.load(getClass().getResource(\"companyRegister.fxml\")); // Carregando o arquivo fxml\n\n // Pegando informações da stage\n Stage window = new Stage();\n window.setResizable(false);\n window.setScene(new Scene(tripViewParent));\n window.show();\n }", "public void add(ActionEvent e) {\r\n Customer newCustomer = new Customer();\r\n newCustomer.setContactfirstname(tempcontactfirstname);\r\n newCustomer.setContactlastname(tempcontactlastname);\r\n save(newCustomer);\r\n addRecord = !addRecord;\r\n }", "public void addButtonClicked() {\n //region Description\n String name = person_name.getText().toString().trim();\n if (name.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Name\", Toast.LENGTH_LONG).show();\n return;\n }\n String no = contact_no.getText().toString().trim();\n if (no.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Contact No.\", Toast.LENGTH_LONG).show();\n return;\n }\n String nName = nickName.getText().toString().trim();\n if (nName.equals(\"\")) {\n nName = \"N/A\";\n }\n String Custno = rootNo.getText().toString().trim();\n if (Custno.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Customer No.\", Toast.LENGTH_LONG).show();\n return;\n }\n float custNo = Float.parseFloat(Custno);\n\n String Fees = monthly_fees.getText().toString().trim();\n if (Fees.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the monthly fees\", Toast.LENGTH_LONG).show();\n return;\n }\n int fees = Integer.parseInt(Fees);\n\n String Balance = balance_.getText().toString().trim();\n if (Balance.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the balance\", Toast.LENGTH_LONG).show();\n return;\n }\n int balance = Integer.parseInt(Balance);\n String date = startdate.getText().toString().trim();\n if (startdate.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the Start Date\", Toast.LENGTH_LONG).show();\n return;\n }\n //endregion\n dbHendler.addPerson(new PersonInfo(name, no, custNo, fees, balance, areaId, date, nName), this);\n person_name.setText(\"\");\n contact_no.setText(\"\");\n rootNo.setText(\"\");\n monthly_fees.setText(\"\");\n balance_.setText(\"\");\n nickName.setText(\"\");\n // Toast.makeText(getApplicationContext(), name + \" Saved\", Toast.LENGTH_LONG).show();\n\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}", "private void showDepartmentalPerson(){\r\n \r\n PersonBaseWindow personBaseWindow = null;\r\n try{\r\n if( ( personBaseWindow = (PersonBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.PERSON_BASE_FRAME_TITLE))!= null ){\r\n if( personBaseWindow.isIcon() ){\r\n personBaseWindow.setIcon(false);\r\n }\r\n personBaseWindow.setSelected( true );\r\n return;\r\n }\r\n personBaseWindow = new PersonBaseWindow(mdiForm);\r\n personBaseWindow.setVisible(true);\r\n }catch(Exception exception){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n }\r\n }", "public void actionPerformed(ActionEvent e){\n\t\t\topenAdd();\n\t\t}", "@Override\n public void onClick(View v) {\n\n String firstName = firstName_et.getText().toString();\n String lastName = lastName_et.getText().toString();\n String emailId = email_et.getText().toString();\n\n addMember(firstName, lastName, emailId);\n\n }", "public void popAddHeritage()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Agregar herencia\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopAddHeritage.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.setResizable(false);\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.close(); \n \n }", "@FXML\r\n\tprivate void newEmployee(ActionEvent event) {\r\n\t\tnewEmployee = true;\r\n\t\tputEditables(true);\r\n\t\teraseFieldsContent();\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tbtDelete.setDisable(true);\r\n\t}", "public void addPerson(String name, String id) {\n if (personIds.contains(id)) {\n return;\n }\n personNames.add(name);\n personIds.add(id);\n personPhotos.add(getBitmapFromId(context, id));\n personSelections.add(new HashSet<Integer>());\n }", "public void onSelectionCreate(ActionEvent event) throws SQLException {\n //TODO think about creating league model class to get id easily\n if(chooseAgeGroupCreate.getValue() != null && chooseCityBoxCreate.getValue() != null){\n chooseLeagueBoxCreate.setDisable(false);\n chooseLeagueTeamBoxCreate.getItems().clear();\n chooseLeagueBoxCreate.getItems().clear();\n ObservableList<String> leagueList = DatabaseManager.getLeagues(user, chooseCityBoxCreate.getValue().toString(), chooseAgeGroupCreate.getValue());\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate .setButtonCell(new ListCell<String>() {\n @Override\n protected void updateItem(String item, boolean empty) {\n super.updateItem(item, empty) ;\n if (empty || item == null) {\n setText(\"Choose League\");\n } else {\n setText(item);\n }\n }\n });\n if(leagueList.size() != 0){\n chooseLeagueBoxCreate.getItems().addAll(leagueList);\n }\n }\n }", "@FXML\n\tpublic void buttonCreateIngredient(ActionEvent event) {\n\t\tString empty = \"\";\n\t\tString ingredientName = txtIngredientName.getText();\n\t\tIngredient ingredient = restaurant.returnIngredient(ingredientName);\n\n\t\tif (ingredient == null) {\n\t\t\tif (!ingredientName.equals(empty)) {\n\t\t\t\tIngredient objIngredient = new Ingredient(ingredientName);\n\t\t\t\ttry {\n\t\t\t\t\tboolean found = restaurant.addIngredient(objIngredient);\n\t\t\t\t\tIngredient ingredientAdded = restaurant.returnIngredient(ingredientName);// returns the ingredient\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// already added\n\t\t\t\t\tif (found == false) {\n\t\t\t\t\t\tingredientsOptions.add(ingredientName);\n\t\t\t\t\t\tingredientAdded.setCreatedByUser(restaurant.returnUser(empleadoUsername));\n\t\t\t\t\t\tingredientAdded.setEditedByUser(restaurant.returnUser(empleadoUsername));\n\t\t\t\t\t\ttxtIngredientName.setText(\"\");\n\n\t\t\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\t\t\tdialog.setContentText(\"El ingrediente \" + objIngredient.getName()\n\t\t\t\t\t\t\t\t+ \" ha sido añadido a la lista de ingredientes del restaurante\");\n\t\t\t\t\t\tdialog.setTitle(\"Ingrediente añadido\");\n\t\t\t\t\t\tdialog.show();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * restaurant.getIngredients().add(objIngredient);\n\t\t\t\t * ingredientsOptions.add(ingredientName); txtIngredientName.setText(\"\");\n\t\t\t\t * \n\t\t\t\t * Dialog<String> dialog=createDialog();\n\t\t\t\t * dialog.setContentText(\"El ingrediente \"+objIngredient.getName()\n\t\t\t\t * +\" ha sido añadido a la lista de ingredientes del restaurante\");\n\t\t\t\t * dialog.setTitle(\"Ingrediente añadido\"); dialog.show();\n\t\t\t\t */\n\t\t\t} else {\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"El ingrediente a crear debe tener un nombre \");\n\t\t\t\tdialog.setTitle(\"Error, Campo sin datos\");\n\t\t\t\tdialog.show();\n\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"El ingrediente ya existe\");\n\t\t\tdialog.setTitle(\"Error, Ingrediente existente\");\n\t\t\tdialog.show();\n\t\t\ttxtIngredientName.setText(\"\");\n\t\t}\n\t}", "public void addPerson(String name){\n Person newPerson = new Person(name,this.x1,this.x2);\n for(Person p : personList){\n if(p.equals(newPerson)){\n System.out.println(\"Error! The person already exists.\");\n }\n }\n personList.add(newPerson);\n }", "private void showContactsAddUserDialog(final String strKey, String strName, String strNumber) {\n\t\t/* Contacts Add User Dialog */\n\t\tif(m_dlgContactsAddUserDialog == null) {\n\t\t\t/* Tab Contacts Fragment */\n\t\t\tm_dlgContactsAddUserDialog = new ContactsAddUserDialog(getContext(), NameSpace.TAB_CONTACTS_FRAGMENT, strKey, strName, strNumber, new ContactsAddUserDialog.OnContactsAddUserEventListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onContactsAddUserEvent(boolean bResponse) {\n\n\t\t\t\t\t/* Contacts Add User Dialog */\n\t\t\t\t\tif(m_dlgContactsAddUserDialog != null)\n\t\t\t\t\t\tm_dlgContactsAddUserDialog = null;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tm_dlgContactsAddUserDialog.setOnDismissListener(new OnDismissListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\t/* Contacts Add User Dialog */\n\t\t\t\t\tif(m_dlgContactsAddUserDialog != null)\n\t\t\t\t\t\tm_dlgContactsAddUserDialog = null;\n\n\t\t\t\t\t/* Send Custom Broadcast Message(System Key Hide Action) */\n\t\t\t\t\tsendCustomBroadcastMessage(NameSpace.SYSTEM_KEY_HIDE_ACTION);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t/* Contacts Add User Dialog */\n\t\t\tm_dlgContactsAddUserDialog.show();\n\t\t}\n\t}", "@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n\n String loc_name = ((AddLocationDialog)dialog).getNameFromUser();\n //if user enters nothing\n if ( loc_name.length() != 0){\n location.setName(loc_name);\n }\n\n //put a marker if a user adds to favorite\n Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(\n location.getLatLng().latitude,\n location.getLatLng().longitude))\n .title(location.getName()));\n\n marker.showInfoWindow();\n\n //Save the marker in shared preferences\n addMarkerToPref(marker);\n }", "public ViewSavingAccountJPanel(Person person) {\n initComponents();\n DisplaySavingAccount(person);\n \n }", "public void addNewAssingment() throws IOException {\r\n\t\tconnectionmain.showTeacherGUIAssWindow();\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (addName.equals(e.getSource())) {\n\t\t\tadd\t= JOptionPane.showInputDialog(null,\"What Name Would You Like To Add To The Guest Book?\");\n\t\t\tnames.add(add);\n\t\t}\n\t\tif(viewNames.equals(e.getSource())){\n\t\t\tfor (int i =1; i < names.size(); i++) {\n\t\t\t\tString s = names.get(i);\n\t\t\t\tSystem.out.println(\"Guest Book Names: \"+s+\" \"+i); \n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private void saveNewPerson() {\r\n\r\n\t\tSystem.out.println(\"Start Save new Patient...\");\r\n\r\n\t\ttry {\r\n\t\t\tIPerson p1 = new Person(\"admin\", new Role(Roles.ADMINISTRATOR,\r\n\t\t\t\t\t\"Hauptadministrator\"), \"Passwort\", \"[email protected]\", \"Vorname\",\r\n\t\t\t\t\t\"Nachname\", \"Organisation\", \"Abteilung\", \"Fachrichtung\",\r\n\t\t\t\t\t\"Strasse\", \"3e\", \"54321\", \"Ort\");\r\n\r\n\t\t\tp1.save();\r\n\t\t} catch (BusinesslogicException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} catch (DatabaseException e) {\r\n\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"New Patient saved!!\");\r\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tthis.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\r\n\t\tsetContentView(R.layout.adduser);\r\n\t\tButton back = (Button) findViewById(R.id.button1);\r\n\t\r\n Button add = (Button) findViewById(R.id.add);\r\n Button clear = (Button) findViewById(R.id.clearlist);\r\n final EditText gname = (EditText) findViewById(R.id.givenname);\r\n final EditText name = (EditText) findViewById(R.id.surname);\r\n gname.requestFocus();\r\n final EditText number = (EditText) findViewById(R.id.num);\r\n \r\n back.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t});\r\n add.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tString temp=number.getText().toString();\r\n\t\t\t\tif(number.getText().toString().matches(\"\")||name.getText().toString().matches(\"\")||gname.getText().toString().matches(\"\"))\r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"complete all fields and try again!\",Toast.LENGTH_LONG).show();\r\n\t\t\t\telse if(MainActivity.db.isPersonnel(temp)){\r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Number is repeated! Try a different number\",Toast.LENGTH_LONG).show();\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//Personnel temp;\r\n\t\t\t\t\t//int num=0;\r\n\t\t\t\t\t//num = Integer.parseInt(number.getText().toString());\r\n\t\t\t\t\t//temp = getPersonnel(num);\r\n\t\t\t\t\tMainActivity.db.add(new Personnel(Integer.parseInt(number.getText().toString()),name.getText().toString(),gname.getText().toString()));\r\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"added\",Toast.LENGTH_LONG).show();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n clear.setOnClickListener(new OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tgname.setText(\"\");\r\n\t\t\t\tname.setText(\"\");\r\n\t\t\t\tnumber.setText(\"\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "private void openCreateAccountDialog()\n {\n testDialog();\n\n }", "public void popAddAttribute()throws IOException {\n final Stage dialog = new Stage();\n dialog.setTitle(\"Agregar relación\");\n \n Parent root = FXMLLoader.load(getClass().getResource(\"/view/PopAddAttribute.fxml\"));\n \n Scene xscene = new Scene(root);\n \n dialog.setResizable(false);\n dialog.initModality(Modality.APPLICATION_MODAL);\n dialog.initOwner((Stage) root.getScene().getWindow());\n \n dialog.setScene(xscene);\n dialog.showAndWait();\n dialog.setResizable(false);\n dialog.resizableProperty().setValue(Boolean.FALSE);\n dialog.close(); \n \n }", "@Override\n public void onClick(View view) {\n\n NoteData newNote = new NoteData();\n String header = tagNewHeader.getText().toString();\n String note = tagNewNotes.getText().toString();\n newNote.setNote(header\n + DocumentPOJOUtils.DOC_NOTE_HEADER_DELIMITER\n + note\n );\n newNote.setOwner(globalVariable.getCurrentUser().getName());\n\n TabbedDocumentDialog listener = MappingUtilities.getTabbedDialog(getFragmentManager().getFragments());\n listener.onFinishEditDialog(newNote);\n CreateDocNotesDialog.super.dismiss();\n\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson addNewControlPersonsExt();", "@RequestMapping(value = \"/person/add\", method = RequestMethod.GET)\r\n\tpublic String addPerson(Model model) {\r\n\t\treturn \"groefnia/person/add\";\r\n\r\n\t}" ]
[ "0.76880664", "0.691988", "0.6833796", "0.67212677", "0.667176", "0.65718555", "0.65353996", "0.6529483", "0.65003127", "0.64871985", "0.6472421", "0.6281034", "0.62680674", "0.6217627", "0.6215071", "0.6203304", "0.62020934", "0.6188822", "0.618359", "0.6177302", "0.6172185", "0.61658406", "0.616463", "0.6147913", "0.61106014", "0.605864", "0.60539085", "0.60481316", "0.60375077", "0.6020373", "0.6006994", "0.59912187", "0.5982603", "0.5980713", "0.59740156", "0.5964802", "0.5957351", "0.5955132", "0.5953663", "0.59523994", "0.59245765", "0.59132415", "0.59104055", "0.590502", "0.5879092", "0.58780426", "0.5876378", "0.5873026", "0.5871495", "0.58611053", "0.58582026", "0.58581287", "0.5855734", "0.58494794", "0.5840862", "0.5839595", "0.58327466", "0.5832358", "0.5825427", "0.58246964", "0.58223706", "0.5822024", "0.5821176", "0.5813995", "0.5811871", "0.58085406", "0.5808402", "0.58071", "0.5787318", "0.57856685", "0.5777011", "0.5776491", "0.57666725", "0.57522196", "0.57516867", "0.5745492", "0.5744872", "0.5744752", "0.57434875", "0.5741781", "0.5738002", "0.5734403", "0.5728314", "0.57240546", "0.57219464", "0.5721326", "0.5705458", "0.57021946", "0.5700681", "0.5699053", "0.569712", "0.56957936", "0.5684168", "0.5683285", "0.5669058", "0.5663582", "0.56615627", "0.5657257", "0.5650938", "0.5650714" ]
0.63196063
11
fill combobox with persons
public void fillCombobox() { List<String> list = new ArrayList<String>(); list.add("don't link"); if (dataHandler.persons.size() == 0) { list.add("No Persons"); ObservableList obList = FXCollections.observableList(list); cmb_linkedPerson.setItems(obList); cmb_linkedPerson.getSelectionModel().selectFirst(); } else { for (int i = 0; i < dataHandler.persons.size(); i++) { list.add(dataHandler.persons.get(i).getName()); ObservableList obList = FXCollections.observableList(list); cmb_linkedPerson.setItems(obList); cmb_linkedPerson.getSelectionModel().selectFirst(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void fillComboBox() {\r\n\t\ttry {\r\n\t\t\tStatement statement = connection.createStatement();\r\n\t\t\tresults = statement.executeQuery(\"Select PeopleName from people \");\r\n\t\t\twhile (results.next()) {\r\n\t\t\t\tString peopleName = results.getString(\"PeopleName\");\r\n\t\t\t\tcomboBox.addItem(peopleName);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t \te.printStackTrace();\r\n\t\t}\r\n\t}", "public void datosCombobox() {\n listaColegios = new ColegioDaoImp().listar();\n for (Colegio colegio : listaColegios) {\n cbColegio.addItem(colegio.getNombre());\n }\n }", "private void initCombobox() {\n comboConstructeur = new ComboBox<>();\n comboConstructeur.setLayoutX(100);\n comboConstructeur.setLayoutY(250);\n\n\n BDDManager2 bddManager2 = new BDDManager2();\n bddManager2.start(\"jdbc:mysql://localhost:3306/concession?characterEncoding=utf8\", \"root\", \"\");\n listeConstructeur = bddManager2.select(\"SELECT * FROM constructeur;\");\n bddManager2.stop();\n for (int i = 0; i < listeConstructeur.size(); i++) {\n comboConstructeur.getItems().addAll(listeConstructeur.get(i).get(1));\n\n\n }\n\n\n\n\n\n\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "public void setComboBoxValues() {\n String sql = \"select iName from item where iActive=? order by iName asc\";\n \n cbo_iniName.removeAllItems();\n try {\n pst = conn.prepareStatement(sql);\n pst.setString(1,\"Yes\");\n rs = pst.executeQuery();\n \n while (rs.next()) {\n cbo_iniName.addItem(rs.getString(1));\n }\n \n }catch(Exception e) {\n JOptionPane.showMessageDialog(null,\"Item list cannot be loaded\");\n }finally {\n try{\n rs.close();\n pst.close();\n \n }catch(Exception e) {}\n }\n }", "public void Bindcombo() {\n\n MyQuery1 mq = new MyQuery1();\n HashMap<String, Integer> map = mq.populateCombo();\n for (String s : map.keySet()) {\n\n jComboBox1.addItem(s);\n\n }\n\n }", "void fillCombo_name(){\n combo_name.setItems(FXCollections.observableArrayList(listComboN));\n }", "public void carregaCidadeSelecionada(String nome) throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list);\n \n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbCidadeEditar.setSelectedItem(nome);\n \n \n \n \n }", "public void buildConsultantComboBox(){\r\n combo_user.getSelectionModel().selectFirst(); // Select the first element\r\n \r\n // Update each timewindow to show the string representation of the window\r\n Callback<ListView<User>, ListCell<User>> factory = lv -> new ListCell<User>(){\r\n @Override\r\n protected void updateItem(User user, boolean empty) {\r\n super.updateItem(user, empty);\r\n setText(empty ? \"\" : user.getName());\r\n }\r\n };\r\n \r\n combo_user.setCellFactory(factory);\r\n combo_user.setButtonCell(factory.call(null)); \r\n }", "public void fillExistCombo() {\n String comboQuery = \"select * from Customer where fname = fname\";\n try {\n prepState = run.connect().prepareStatement(comboQuery);\n resSet = prepState.executeQuery();\n\n while (resSet.next()) {\n custCombo.addItem(resSet.getString(2));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"SQLException: \" + ex.getMessage());\n }\n }", "public void carregaEstadoSelecionado(String nome) throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUfEditar.addItem(list);\n \n \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n cbUfEditar.setSelectedItem(nome);\n \n \n \n }", "public void carrega_cidade() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUF.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidade.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidade.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n Conexao.desConectar();\n \n }", "private void setUsersIntoComboBox() {\n if (mainModel.getUserList() != null) {\n try {\n mainModel.loadUsers();\n cboUsers.getItems().clear();\n cboUsers.getItems().addAll(mainModel.getUserList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the users.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "public void listarIgrejaComboBox() {\n\n IgrejasDAO dao = new IgrejasDAO();\n List<Igrejas> lista = dao.listarIgrejas();\n cbIgrejas.removeAllItems();\n\n for (Igrejas c : lista) {\n cbIgrejas.addItem(c);\n }\n }", "private void fillComboBox() {\n List<String> times = this.resultSimulation.getTimes();\n this.timesComboBox.getItems().addAll(times);\n this.timesComboBox.getSelectionModel().select(0);\n }", "private void fillSubjectCombo() throws SQLException, ClassNotFoundException {\n ArrayList<Subject> subjectList = SubjectController.getAllSubject();\n //subjectList.removeAllItems();\n for (Subject subject : subjectList) {\n subjectCombo.addItem(subject);\n\n }\n }", "private void carregaComboDentista() {\n CtrPessoa ctrD = new CtrPessoa();\n ArrayList<Pessoa> result = ctrD.getPessoa(\"\", new Dentista());\n\n ObservableList<Pessoa> dentistas = FXCollections.observableArrayList(result);\n\n if (!result.isEmpty()) {\n cbDentista.setItems(dentistas);\n cbDentista.setValue(cbDentista.getItems().get(0)); //inicializando comboBox\n }\n }", "public void carrega_estado() throws SQLException{\n String sql = \"SELECT * FROM tb_estados\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n ResultSet rs = preparador.executeQuery();\n //passando valores do banco para o objeto result; \n try{ \n while(rs.next()){ \n \n String list = rs.getString(\"uf\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbUF.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n \n Conexao.desConectar();\n }", "public void combo(){\r\n // Define rendering of the list of values in ComboBox drop down. \r\n cbbMedicos.setCellFactory((comboBox) -> {\r\n return new ListCell<Usuario>() {\r\n @Override\r\n protected void updateItem(Usuario item, boolean empty) {\r\n super.updateItem(item, empty);\r\n if (item == null || empty) {\r\n setText(null);\r\n } else {\r\n setText(item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico());\r\n }\r\n }\r\n };\r\n });\r\n\r\n // Define rendering of selected value shown in ComboBox.\r\n cbbMedicos.setConverter(new StringConverter<Usuario>() {\r\n @Override\r\n public String toString(Usuario item) {\r\n if (item == null) {\r\n return null;\r\n } else {\r\n return item.getNombre_medico()+ \" \" + item.getApellido_medico()+\" \"+item.getApMaterno_medico();\r\n }\r\n }\r\n\r\n @Override\r\n public Usuario fromString(String string) {\r\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\r\n }\r\n });\r\n }", "public void buildConsultantData(){\r\n // Connect to database and perform select query on user table\r\n Database db = new Database();\r\n Connection connection = null;\r\n try{\r\n connection = db.jdbc_connection.connect();\r\n Statement statement = connection.createStatement(); // Set up statement\r\n \r\n String sql = \"SELECT userID, userName FROM user\";\r\n ResultSet results = statement.executeQuery(sql); \r\n \r\n while(results.next()) { \r\n int id = results.getInt(\"userID\");\r\n String name = results.getString(\"userName\");\r\n \r\n User user = new User(id, name);\r\n user_list.add(user);\r\n }\r\n \r\n combo_user.setItems(user_list);\r\n \r\n }catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }finally {\r\n try {\r\n connection.close();\r\n } catch (Exception e2) { // Closing databse error handling\r\n System.err.println(e2.getMessage());\r\n }\r\n } \r\n }", "public void fillPLComboBox(){\n\t\tmonths.add(\"Select\");\n\t\tmonths.add(\"Current Month\");\n\t\tmonths.add(\"Last Month\");\n\t\tmonths.add(\"Last 3 Months\");\n\t\tmonths.add(\"View All\");\n\t}", "private void fillChoicebox(String item, ChoiceBox cBox) {\n List<Component> test = cRegister.searchRegisterByName(item);\n ObservableList<String> temp = FXCollections.observableArrayList();\n temp.add(\"Ikke valgt\");\n for (Component i : test) {\n temp.add(i.getNavn());\n }\n\n cBox.setItems(temp);\n cBox.setValue(\"Ikke valgt\");\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n loadTable();\n ObservableList<String> opt = FXCollections.observableArrayList(\n \"A01\",\n \"A02\",\n \"A02\",\n \"A03\",\n \"A04\",\n \"B01\",\n \"B02\",\n \"B03\",\n \"B04\",\n \"C01\",\n \"C02\",\n \"C03\",\n \"C04\",\n \"D01\",\n \"D02\",\n \"D03\",\n \"D04\");\n \n cb1.setItems(opt);\n \n \n \n \n ObservableList<String> options = FXCollections.observableArrayList();\n Connection cnx = Myconn.getInstance().getConnection();\n String e=\"\\\"\"+\"Etudiant\"+\"\\\"\";\n ResultSet rs = cnx.createStatement().executeQuery(\"select full_name from user where role=\"+e+\"\");\n while(rs.next()){\n options.add(rs.getString(\"full_name\"));\n \n }\n// ObservableList<String> options = FXCollections.observableArrayList(\"Option 1\",\"Option 2\",\"Option 3\");\n comboE.setItems(options);\n } catch (SQLException ex) {\n Logger.getLogger(SoutenanceController.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }", "private void loadlec() {\n try {\n\n ResultSet rs = DBConnection.search(\"select * from lecturers\");\n Vector vv = new Vector();\n//vv.add(\"\");\n while (rs.next()) {\n\n// vv.add(rs.getString(\"yearAndSemester\"));\n String gette = rs.getString(\"lecturerName\");\n\n vv.add(gette);\n\n }\n //\n jComboBox1.setModel(new DefaultComboBoxModel<>(vv));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void combo() {\n cargaCombo(combo_habitacion, \"SELECT hh.descripcion\\n\" +\n \"FROM huespedes h\\n\" +\n \"LEFT JOIN estadia_huespedes eh ON eh.huespedes_id = h.id\\n\" +\n \"LEFT JOIN estadia_habitaciones ehh ON eh.id_estadia = ehh.id_estadia\\n\" +\n \"LEFT JOIN estadia e ON e.id = ehh.id_estadia \\n\" +\n \"LEFT JOIN habitaciones hh ON hh.id = ehh.id_habitacion\\n\" +\n \"WHERE eh.huespedes_id = \"+idd+\" AND e.estado ='A'\\n\" +\n \"ORDER BY descripcion\\n\" +\n \"\",\"hh.descripcion\");\n cargaCombo(combo_empleado, \"SELECT CONCAT(p.nombre, ' ',p.apellido) FROM persona p\\n\" +\n \"RIGHT JOIN empleado e ON e.persona_id = p.id\", \"empleado\");\n cargaCombo(combo_producto, \"SELECT producto FROM productos order by producto\", \"producto\");\n }", "public void iniciar_combo() {\n try {\n Connection cn = DriverManager.getConnection(mdi_Principal.BD, mdi_Principal.Usuario, mdi_Principal.Contraseña);\n PreparedStatement psttt = cn.prepareStatement(\"select nombre from proveedor \");\n ResultSet rss = psttt.executeQuery();\n\n cbox_proveedor.addItem(\"Seleccione una opción\");\n while (rss.next()) {\n cbox_proveedor.addItem(rss.getString(\"nombre\"));\n }\n \n PreparedStatement pstt = cn.prepareStatement(\"select nombre from sucursal \");\n ResultSet rs = pstt.executeQuery();\n\n \n cbox_sucursal.addItem(\"Seleccione una opción\");\n while (rs.next()) {\n cbox_sucursal.addItem(rs.getString(\"nombre\"));\n }\n \n PreparedStatement pstttt = cn.prepareStatement(\"select id_compraE from compra_encabezado \");\n ResultSet rsss = pstttt.executeQuery();\n\n \n cbox_compra.addItem(\"Seleccione una opción\");\n while (rsss.next()) {\n cbox_compra.addItem(rsss.getString(\"id_compraE\"));\n }\n \n PreparedStatement ps = cn.prepareStatement(\"select nombre_moneda from moneda \");\n ResultSet r = ps.executeQuery();\n\n \n cbox_moneda.addItem(\"Seleccione una opción\");\n while (r.next()) {\n cbox_moneda.addItem(r.getString(\"nombre_moneda\"));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n \n }", "public void mostrarUsuarios(JComboBox cbx) {\n //cbx.addItem(\"Selecciona\".toUpperCase());\n modeloCombo = new DefaultComboBoxModel(sUsuario.MostrarTipoUsuarios());\n cbx.setModel(modeloCombo);\n mComboRoll = (M_ComboRoll) cbx.getSelectedItem();\n }", "private void comboCarrega() {\n\n try {\n con = BancoDeDados.getConexao();\n //cria a string para inserir no banco\n String query = \"SELECT * FROM servico\";\n\n PreparedStatement cmd;\n cmd = con.prepareStatement(query);\n ResultSet rs;\n\n rs = cmd.executeQuery();\n\n while (rs.next()) {\n JCservico.addItem(rs.getString(\"id\") + \"-\" + rs.getString(\"modalidade\"));\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro de SQL \" + ex.getMessage());\n }\n }", "public void fillComBox1()\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\tconnection = SqlServerConnection.dbConnecter();\r\n\t\t\t\t\r\n\t\t\t\tString sql=\"select * from addLocation\";\r\n\t\t\t\tPreparedStatement pst=connection.prepareStatement(sql);\r\n\t\t\t\tResultSet rs=pst.executeQuery();\r\n\t\t\t\r\n\t\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\troomcombo2.addItem(rs.getString(\"RoomName\"));\r\n\t\t\t\t\t}\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "public Usuarios() {\n try {\n initComponents();\n String c_est, c_mun, c_ciu, id1;\n this.setLocationRelativeTo(null);\n String[] datos = new String[2];\n a = new Archivos();\n lineas = new String[9];\n lineas = a.Leer();\n m = new ManejadorSQL(lineas[2], lineas[1], lineas[3], lineas[4], lineas[5], lineas[7], lineas[6]);\n m.setLineas(lineas);\n ResultSet b_esta = m.Select(\"tblsit_estado order by nb_estado\", \"id_estado,nb_estado\");//Seleccionamos los estados para el combo box\n while (b_esta.next()) {\n datos[0] = b_esta.getString(1);\n datos[1] = b_esta.getString(2);\n u_c_estado.addItem(datos[1]); // agregamos los estados\n //System.out.println(datos[0]);\n }\n DefaultComboBoxModel modeloCombo = new DefaultComboBoxModel();// TODO add your handling code here:\n modeloCombo.addElement(\"Seleccionar\");\n u_ciudad.setModel(modeloCombo);\n u_c_municipio.setModel(modeloCombo);\n \n } catch (Exception ex) {\n Logger.getLogger(Usuarios.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void fillcbGrupo() {\n\t\tcbGrupoContable.setNullSelectionAllowed(false);\n\t\tcbGrupoContable.setInputPrompt(\"Seleccione Grupo Contable\");\n\t\tfor (GruposContablesModel grupo : grupoimpl.getalls()) {\n\t\t\tcbGrupoContable.addItem(grupo.getGRC_Grupo_Contable());\n\t\t\tcbGrupoContable.setItemCaption(grupo.getGRC_Grupo_Contable(), grupo.getGRC_Nombre_Grupo_Contable());\n\t\t}\n\t}", "private void cargaComboBoxTipoGrano() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoGranoEntity p\");\n java.util.List<TipoGranoEntity> listaTipoGranoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoGranoEntity tipoGrano : listaTipoGranoEntity) {\n miVectorTipoLaboreo.add(tipoGrano.getTgrNombre());\n cbxSemillas.addItem(tipoGrano);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }", "private void buildCountryComboBox() {\n ResultSet rs = DatabaseConnection.performQuery(\n session.getConn(),\n Path.of(Constants.QUERY_SCRIPT_PATH_BASE + \"SelectCountryByID.sql\"),\n Collections.singletonList(Constants.WILDCARD)\n );\n\n ObservableList<Country> countries = FXCollections.observableArrayList();\n try {\n if (rs != null) {\n while (rs.next()) {\n int id = rs.getInt(\"Country_ID\");\n String name = rs.getString(\"Country\");\n countries.add(new Country(id, name));\n }\n }\n } catch (Exception e) {\n Common.handleException(e);\n }\n\n countryComboBox.setItems(countries);\n\n countryComboBox.setConverter(new StringConverter<>() {\n @Override\n public String toString(Country item) {\n return item.getCountryName();\n }\n\n @Override\n public Country fromString(String string) {\n return null;\n }\n });\n }", "public void carregaCidadeModificada() throws SQLException{\n String sql = \"SELECT nome FROM tb_cidades where uf='\"+cbUfEditar.getSelectedItem()+\"'\"; \n PreparedStatement preparador = Conexao.conectar().prepareStatement(sql);\n \n ResultSet rs = preparador.executeQuery();\n cbCidadeEditar.removeAllItems();\n //passando valores do banco para o objeto result; \n try{ \n \n while(rs.next()){ \n \n String list = rs.getString(\"nome\"); //resgatando estado \n \n //popula combo_estadof com as informações colhidas \n cbCidadeEditar.addItem(list); \n \n } \n } catch (Exception e){ \n JOptionPane.showMessageDialog(null, \"Impossivel carregar Estados!\", \n \"ERROR - \", JOptionPane.ERROR_MESSAGE); \n } \n \n }", "private void ComboBoxLoader (){\n try {\n if (obslistCBOCategory.size()!=0)\n obslistCBOCategory.clear();\n /*add the records from the database to the ComboBox*/\n rset = connection.createStatement().executeQuery(\"SELECT * FROM category\");\n while (rset.next()) {\n String row =\"\";\n for(int i=1;i<=rset.getMetaData().getColumnCount();i++){\n row += rset.getObject(i) + \" \";\n }\n obslistCBOCategory.add(row); //add string to the observable list\n }\n\n cboCategory.setItems(obslistCBOCategory); //add observable list into the combo box\n //text alignment to center\n cboCategory.setButtonCell(new ListCell<String>() {\n @Override\n public void updateItem(String item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n setText(item);\n setAlignment(Pos.CENTER);\n Insets old = getPadding();\n setPadding(new Insets(old.getTop(), 0, old.getBottom(), 0));\n }\n }\n });\n\n //listener to the chosen list in the combo box and displays it to the text fields\n cboCategory.getSelectionModel().selectedItemProperty().addListener((obs, oldValue, newValue)->{\n if(newValue!=null){\n Scanner textDisplay = new Scanner((String) newValue);\n txtCategoryNo.setText(textDisplay.next());\n txtCategoryName.setText(textDisplay.nextLine());}\n\n });\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }", "private void loadCustomerCombo() {\n ArrayList<CustomerDTO> allCustomers;\n try {\n allCustomers = ctrlCustomer.get();\n for (CustomerDTO customer : allCustomers) {\n custIdCombo.addItem(customer.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(PlaceOrderForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }", "public void fillCompBox() {\n\t\tcomboBoxName.removeAllItems();\n\t\tint counter = 0;\n\t\tif (results.getResults() != null) {\n\t\t\tList<String> scenarios = new ArrayList<String>(results.getResults().keySet());\n\t\t\tCollections.sort(scenarios);\n\t\t\tfor (String s : scenarios) {\n\t\t\t\tcomboBoxName.insertItemAt(s, counter);\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t}", "private void fillComboBox(ServiceManager serviceManager){\n for (String vendingMachineName : serviceManager.getVmManager().getVendingMachineNames()) {\n getItems().add(vendingMachineName); \n }\n }", "private void populateProfession() {\n try {\n vecProfessionKeys = new Vector();\n StringTokenizer stk = null;\n vecProfessionLabels = new Vector();\n //MSB -09/01/05 -- Changed configuration file.\n // config = new ConfigMgr(\"customer.cfg\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"PROFESSION\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n if (stk != null) {\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecProfessionKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecProfessionLabels.add(value);\n }\n }\n cbxProfession.setModel(new DefaultComboBoxModel(vecProfessionLabels));\n } catch (Exception e) {}\n }", "private void initializeOrganFilterComboBox() {\n organFilterComboBox.setItems(organs);\n organFilterComboBox.getItems()\n .addAll(organString, \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\",\n \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\", \"Bone Marrow\", \"Connective Tissue\");\n organFilterComboBox.getSelectionModel().select(0);\n }", "public void llenarComboBox(){\n TipoMiembroComboBox.removeAllItems();\n TipoMiembroComboBox.addItem(\"Administrador\");\n TipoMiembroComboBox.addItem(\"Editor\");\n TipoMiembroComboBox.addItem(\"Invitado\");\n }", "public RegisterCashierFrame() {\n initComponents();\n lblUsername.setText(\"Hello \"+UserProfile.getUserName());\n super.setLocationRelativeTo(null);\n try {\n EmpList = Empdao.getCashierData();\n \n for (Object a : EmpList.keySet())\n jComboBox1.addItem((String) a);\n \n \n }\n catch(SQLException ex) {\n JOptionPane.showMessageDialog(null, \"Error in SQl\"+ex, \"Input Error\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n \n }", "@SuppressWarnings(\"unchecked\")\n private void addComboBox() throws Exception{\n\n Connection con = Coagent.getConnection();\n PreparedStatement query = con.prepareStatement(\"SELECT Publisher_Name FROM publishers;\");\n ResultSet result = query.executeQuery();\n\n while(result.next()){\n jComboBoxAdd.addItem(result.getString(1));\n }\n }", "private void cargaComboTipoDocumento() {\n\t\tcomboTipoDoc = new JComboBox();\n\t\tfor (TipoDocumentoDTO tipoDocumentoDTO : tip) {\n\t\t\tcomboTipoDoc.addItem(tipoDocumentoDTO.getAbreviacion());\n\t\t}\n\n\t}", "public void populateChoiceBoxes() {\n subjects.setItems(FXCollections.observableArrayList(\"Select\", \"computers\", \"not-computers\", \"subjects\"));\n className.setItems(FXCollections.observableArrayList(\"Select\", \"101\", \"202\", \"303\", \"505\"));\n subjects.getSelectionModel().select(0);\n className.getSelectionModel().select(0);\n this.points.setPromptText(Integer.toString(100));\n\n }", "public void widgetSelected(SelectionEvent e) {\n\t\tdoctorcombo.removeAll();\n\t\tint i = subject.getSelectionIndex();\n\t\t if(i == 0){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(0));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(0),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 1){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(1));\n\t\t\t\tfor (int k = 0; k < j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(1),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t else if(i == 2){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(2));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(2),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 3){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(3));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(3),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t}\n\t\t\t}\n\t\t else if(i == 4){\n\t\t\t\tint j = pdtabledaoimpl.findByname1(subject.getItem(4));\n\t\t\t\tfor(int k = 0; k< j; k++){\n\t\t\t\t\tString ss = pdtabledaoimpl.findByname2(subject.getItem(4),j,k);\n\t\t\t\t\tdoctorcombo.add(ss, k);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}", "public void fillNameBox(){\n for(UserAccount userAccount : userAccounts) {\n nameBox.addItem(userAccount.getEmail());\n }\n }", "private void fillComboBox() {\n jComboBoxFilterChains.setModel(new DefaultComboBoxModel(ImageFilterManager.getObject().getListOfFilters().toArray()));\n }", "public FrmEjemploCombo() {\n initComponents();\n \n cargarAutos();\n }", "private void consultantsFieldFill(){\n ObservableList<String> userList = FXCollections.observableArrayList();\n userList.add(\"All\");\n //Query and get results\n String query = \"SELECT * FROM user\";\n QueryDB.returnQuery(query);\n ResultSet result = QueryDB.getResult();\n try {\n while (result.next()) {\n userList.add(result.getString(\"userName\"));\n }\n }\n catch (SQLException e){\n dialog(\"ERROR\",\"SQL Error\",\"Error: \"+ e.getMessage());\n }\n consultantsField.setItems(userList);\n }", "public void setvalues(){\n Connection con= getConnection();\n Statement pst1;\n ResultSet rs1;\n \n try{\n \n String qry1=\"SELECT DISTINCT(`StudentGroup`) FROM `sessions`\";\n \n pst1=con.prepareStatement(qry1);\n rs1=pst1.executeQuery(qry1);\n\n combo_studentGroup.removeAllItems();\n \n while(rs1.next()){\n combo_studentGroup.addItem(rs1.getString(\"StudentGroup\"));\n }\n \n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n \n }", "private void rebuildIDSComboBox(){\n\t\tfinal List<OWLNamedIndividual> IDSes = ko.getIDSes();\n\t\t\n\t\tcomboBox.setModel(new DefaultComboBoxModel() {\n\t\t\t@Override\n\t\t\tpublic Object getElementAt(int index){\n\t\t\t\treturn IDSes.get(index);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic int getSize(){\n\t\t\t\treturn IDSes.size();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void cargaComboBoxTipoLaboreo() {\n Session session = Conexion.getSessionFactory().getCurrentSession();\n Transaction tx = session.beginTransaction();\n\n Query query = session.createQuery(\"SELECT p FROM TipoLaboreoEntity p\");\n java.util.List<TipoLaboreoEntity> listaTipoLaboreoEntity = query.list();\n\n Vector<String> miVectorTipoLaboreo = new Vector<>();\n for (TipoLaboreoEntity tipoLaboreo : listaTipoLaboreoEntity) {\n miVectorTipoLaboreo.add(tipoLaboreo.getTpoNombre());\n cboMomentos.addItem(tipoLaboreo);\n\n// cboCampania.setSelectedItem(null);\n }\n tx.rollback();\n }", "private void defaultdata()\n {\n try\n {\n \n StageBao stage_bao =\n new BaoFactory().createStageBao(); //create building bao object\n List<StageDto> stage_list =\n stage_bao.viewAll(); //get all building from DB\n \n stageComboBox.removeAllItems(); //remove all item from building combobox\n\n if(stage_list!=null&&!stage_list.isEmpty())\n {\n for(int i = 0; i<stage_list.size(); i++)\n {\n stageComboBox.addItem(stage_list.get(i).getNumber());\n }\n\n stageComboBox.setSelectedIndex(-1); //select no thing in this combo\n }\n \n \n DepartmentBao depart_bao = new BaoFactory().createDepartmentBao();\n List<DepartmentDto> depart_list = depart_bao.viewAll();\n DepartComboBox.removeAllItems();\n\n if(depart_list!=null&&!depart_list.isEmpty())\n {\n for(int i = 0; i<depart_list.size(); i++)\n {\n DepartComboBox.addItem(depart_list.get(i).getName());\n }\n DepartComboBox.setSelectedIndex(-1);\n }\n\n \n }\n \n catch(Exception e)\n {\n e.printStackTrace();\n }\n\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "private void setClientsIntoComboBox() {\n if (mainModel.getClientList() != null) {\n try {\n mainModel.loadClients();\n cboClients.getItems().clear();\n cboClients.getItems().addAll(mainModel.getClientList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the clients.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }", "public void initialize() {\n fillCombobox();\n }", "private void setComboBox(JComboBox<String> comboBox) {\n comboBox.addItem(\"Select an item\");\n for (Product product : restaurant.getProducts()) {\n comboBox.addItem(product.getName());\n }\n }", "public void loadData(){\n mTipoEmpleadoList=TipoEmpleado.getTipoEmpleadoList();\n ArrayList<String> tipoEmpleadoName=new ArrayList();\n for(TipoEmpleado tipoEmpleado: mTipoEmpleadoList)\n tipoEmpleadoName.add(tipoEmpleado.getDescripcion()); \n mFrmMantenerEmpleado.cmbEmployeeType.setModel(new DefaultComboBoxModel(tipoEmpleadoName.toArray()));\n \n \n }", "public void setupMealSelectionCombobox(ComboBox<Recipe> mealSelection){\n setupPlannerMealComboboxs(mealSelection);\n }", "private void preencherComboEstados() {\n\t\tList<Estado> listEstado;\n\t\tObservableList<Estado> oListEstado;\n\t\tEstadosDAO estadosDao;\n\n\t\t//Instancia a DAO estados\n\t\testadosDao = new EstadosDAO();\n\n\t\t//Chama o metodo para listar todos os estados\n\t\tlistEstado = estadosDao.selecionar();\n\n\t\t//Verifica se a lista de estados está vazia\n\t\tif(listEstado.isEmpty()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Atribui a lista retornada ao observablearray\n\t\toListEstado = FXCollections.observableArrayList(listEstado);\n\n\t\t//Adiciona os itens no combobx\n\t\tcboEstado.setItems(oListEstado);\n\n\t\t//Seleciona o primeio item do combobox\n\t\tcboEstado.getSelectionModel().select(0);\n\t}", "public ComboBox1() {\n initComponents();\n agregarItems();\n\n }", "public void plannerDisplayComboBoxs(){\n Days dm = weekList.getSelectionModel().getSelectedItem();\n if (dm.isBreakfastSet()){\n //find Recipe set for breakfast in the Days in the comboBox and display it in the comboBox\n Recipe breakfast = findRecipeFromID(dm.getBreakfast().getId(), breakfastCombo);\n breakfastCombo.getSelectionModel().select(breakfast);\n }\n\n if (dm.isLunchSet()){\n //find Recipe set for lunch in the Days in the comboBox and display it in the comboBox\n Recipe lunch = findRecipeFromID(dm.getLunch().getId(), lunchCombo);\n lunchCombo.getSelectionModel().select(lunch);\n }\n\n if (dm.isDinnerSet()){\n //find Recipe set for dinner in the Days in the comboBox and display it in the comboBox\n Recipe dinner = findRecipeFromID(dm.getDinner().getId(), dinnerCombo);\n dinnerCombo.getSelectionModel().select(dinner);\n }\n }", "public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}", "private void llenarCombo() {\n cobOrdenar.removeAllItems();\n cobOrdenar.addItem(\"Fecha\");\n cobOrdenar.addItem(\"Nro Likes\");\n cobOrdenar.setSelectedIndex(-1); \n }", "void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }", "public void riempiProceduraComboBox(){\n Statement stmt;\n ResultSet rst;\n String query = \"SELECT P.schema, P.nomeProcedura FROM Procedura P\";\n \n proceduraComboBox.removeAllItems();\n try{\n stmt = Database.getDefaultConnection().createStatement();\n rst = stmt.executeQuery(query);\n \n while(rst.next()){\n //le Procedure nella comboBox saranno mostrate secondo il modello: nomeSchema.nomeProcedura\n //in quanto Procedure appartenenti a Schemi diversi possono avere lo stesso nome\n proceduraComboBox.addItem(rst.getString(1)+\".\"+rst.getString(2));\n }\n proceduraComboBox.setSelectedIndex(-1);\n \n stmt.close();\n }catch(SQLException e){\n mostraErrore(e);\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gender.getItems().setAll(\"laki-laki\",\"perempuan\");\n status.getItems().setAll(\"admin\",\"user\");\n // bind the selected fruit label to the selected fruit in the combo box.\n //selectedFruit.textProperty().bind(fruitCombo.getSelectionModel().selectedItemProperty());\n\n\n }", "private void renderCombobox(){\r\n\r\n\t\tCollection<String> sitesName= new ArrayList<String>();\r\n\t\t\tfor(SiteDto site : siteDto){\r\n\t\t\t\tsitesName.add(site.getSiteName());\r\n\t\t\t}\r\n\t\t\r\n\t\tComboBox siteComboBox = new ComboBox(\"Select Site\",sitesName);\r\n\t\tsiteName = sitesName.iterator().next();\r\n\t\tsiteComboBox.setValue(siteName);\r\n\t\tsiteComboBox.setImmediate(true);\r\n\t\tsiteComboBox.addValueChangeListener(this);\r\n\t\tverticalLayout.addComponent(siteComboBox);\r\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n counselorDetailsBEAN = new CounselorDetailsBEAN();\n counselorDetailsBEAN = Context.getInstance().currentProfile().getCounselorDetailsBEAN();\n ENQUIRY_ID = counselorDetailsBEAN.getEnquiryID();\n // JOptionPane.showMessageDialog(null, ENQUIRY_ID);\n countryCombo();\n cmbCountry.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n \n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n //JOptionPane.showMessageDialog(null, cmbCountry.getSelectionModel().getSelectedItem().toString());\n String[] parts = cmbCountry.getSelectionModel().getSelectedItem().toString().split(\",\");\n String value = parts[0];\n locationcombo(value);\n }\n\n private void locationcombo(String value) {\n List<String> locations = SuggestedCourseDAO.getLocation(value);\n for (String s : locations) {\n location.add(s);\n }\n cmbLocation.setItems(location);\n }\n\n });\n cmbLocation.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n universityCombo(cmbLocation.getSelectionModel().getSelectedItem().toString());\n }\n\n private void universityCombo(String value) {\n List<String> universities = SuggestedCourseDAO.getUniversities(value);\n for (String s : universities) {\n university.add(s);\n }\n cmbUniversity.setItems(university);\n }\n \n });\n cmbUniversity.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n levetCombo(cmbUniversity.getSelectionModel().getSelectedItem().toString());\n }\n\n private void levetCombo(String value) {\n List<String> levels = SuggestedCourseDAO.getLevels(value);\n for (String s : levels) {\n level.add(s);\n }\n cmbLevel.setItems(level);\n }\n });\n\n }", "public void setComboBoxPertemuan() {\n if (listPertemuanCount == null) {\n framePresensi.getPertemuanComboBox().setModel(new DefaultComboBoxModel());\n } else {\n framePresensi.getPertemuanComboBox().setModel(new ComboboxPertemuan().getPertemuan(listPertemuanCount));\n }\n }", "private void populateFullname() {\n dataBaseHelper = new DataBaseHelper(this);\n List<String> lables = dataBaseHelper.getFN();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, lables);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n fullname.setAdapter(dataAdapter);\n\n }", "private void PopulateComboBoxData(){\r\n \r\n jLabel1.setText(courseActionObj.getCourseID() + \" \" + courseActionObj.getCourseName());\r\n //Step1: Populate jComboBox1 in Homework related stats tab and jComboBox4 in max score students tab\r\n //Step2: Populate jComboBox2 in Student related stats tab\r\n String sCouseId = courseActionObj.getCourseID();\r\n try {\r\n //To load the list of homeworks in select homework dropdown\r\n query = \"SELECT assignment_id, assignment_name from assignment where course_id ='\" \r\n + sCouseId +\"'\";\r\n \r\n rs = stmt.executeQuery(query);\r\n while (rs.next()) {\r\n Homeworks.add(rs.getString(\"assignment_id\"));\r\n jComboBox1.addItem(rs.getString(\"assignment_name\"));\r\n jComboBox4.addItem(rs.getString(\"assignment_name\"));\r\n }\r\n \r\n \r\n //To load the list of students in select student dropdown.\r\n query = \"select db.user_id, db.user_name from dbuser db, enrollment e \" +\r\n \"where db.user_id = e.student_id and \" +\r\n \"e.course_id = '\" + sCouseId +\"'\";\r\n rs = stmt.executeQuery(query);\r\n while (rs.next()) {\r\n Students.add(rs.getString(\"user_id\"));\r\n jComboBox2.addItem(rs.getString(\"user_name\"));\r\n }\r\n \r\n } catch (Exception oops) {\r\n System.out.println(\"Prof_Report.java:PopulateComboBoxData() \" + oops);\r\n\r\n }\r\n \r\n \r\n }", "private void carregaComboUfs() {\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Inhumas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goianira\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goiânia\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"Campinas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"São José dos Campos\"));\n\t\t\n\t\t\n\t\tfor (Municipio municipio : listaDeMunicipios) {\n\t\t\tif(!listaDeUfs.contains(municipio.getUf())) {\n\t\t\t\tlistaDeUfs.add(municipio.getUf());\n\t\t\t}\n\t\t}\n\t\t\n\t\tcmbUfs.addItem(\"--\");\n\t\tfor (String uf : listaDeUfs) {\n\t\t\tcmbUfs.addItem(uf);\n\t\t}\n\t}", "public void addItemsCitas(){\n cmbPacientes.removeAllItems();\n cmbPacientes.addItem(\"Seleccione una opcion\");\n cmbPacientes.addItem(\"Paciente\");\n cmbPacientes.addItem(\"Doctor\");\n cmbPacientes.addItem(\"Mostrar todo\");\n }", "public void LoadDataToComBo(DefaultComboBoxModel cbx) {\n cbx.removeAllElements();\n String sql = \"select * from SuKien\\n\"\n + \"where TrangThai = 1 and AnSk = 1\";\n List<SuKien> list = selectSuKien(sql);\n for (int i = 0; i < list.size(); i++) {\n SuKien sk = list.get(i);\n cbx.addElement(sk);\n }\n }", "private void displayEmployee()\n {\n employeeJComboBox.removeAllItems();\n int location = employeeJComboBox.getSelectedIndex();\n String[] namesArray = new String[employees.size()];\n for(int i = 0; i < employees.size(); i++)\n {\n namesArray[i] = employees.get(i).getName();\n employeeJComboBox.addItem(namesArray[i]);\n }\n if(location < 0)\n {\n employeeJComboBox.setSelectedIndex(0);\n }\n else\n {\n employeeJComboBox.setSelectedIndex(location);\n }\n }", "private void setUpComboBox2() {\n jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>());\n jComboBox1.addItem(\"Unit Test\");\n jComboBox1.addItem(\"Quiz\");\n jComboBox1.addItem(\"Assignment\");\n jComboBox1.addItem(\"Other\");\n }", "private void inicializarCombos() {\n\t\tlistaGrupoUsuario = GrupoUsuarioDAO.readTodos(this.mainApp.getConnection());\n\t\tfor (GrupoUsuario grupo : listaGrupoUsuario) {\n\t\t\tthis.observableListaGrupoUsuario.add(grupo.getNombre());\n\t\t}\n\t\tthis.comboGrupoUsuario.setItems(this.observableListaGrupoUsuario);\n\t\tnew AutoCompleteComboBoxListener(comboGrupoUsuario);\n\n\t\tObservableList<String> status = FXCollections.observableArrayList(\"Bloqueado\",\"Activo\",\"Baja\");\n\t\tthis.comboStatus.setItems(status);\n\t\tthis.comboEmpleados.setItems(FXCollections.observableArrayList(this.listaEmpleados));\n\t}", "private void listadoRol(JComboBox cbb) throws SQLException {\n\t\tint selected = cbb.getSelectedIndex();\n\t\tDefaultComboBoxModel model = (DefaultComboBoxModel) cbb.getModel();\n\t\tif (!coordUsuario.listaRol().isEmpty()) {\n\t\tlistaRol = coordUsuario.listaRol();\n\t\t // Borrar Datos Viejos\n\t model.removeAllElements();\n\t for (int i=0;i<listaRol.size();i++) {\n\t model.addElement(listaRol.get(i).getNombre());\n\t }\n\t // setting model with new data\n\t cbb.setModel(model);\n\t cbb.setRenderer(new MyComboBox(\"Rol\")); \n \tcbb.setSelectedIndex(selected); \n\t}}", "public void addZoneCommitte() {\n\t\t\tid = new JComboBox<Integer>();\n\t\t\tAutoCompleteDecorator.decorate(id);\n\t\t\tid.setBackground(Color.white);\n\t\t\tJButton save = new JButton(\"Save members \");\n\t\t\tfinal Choice position = new Choice();\n\t\t\tfinal JTextField txtLevel = new JTextField(10), txtPhone = new JTextField(10);\n\t\t\tfinal Choice chczon = new Choice();\n\n\t\t\ttry {\n\t\t\t\tString sql = \"select * from Zone;\";\n\t\t\t\tResultSet rs = null;\n\t\t\t\t// Register jdbc driver\n\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t// open connection\n\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tchczon.add(rs.getString(\"Name\"));\n\t\t\t\t}\n\t\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\t}\n\n\t\t\t// select zone before proceeding\n\t\t\tObject[] zone = { new JLabel(\"Zone\"), chczon };\n\t\t\tint option = JOptionPane.showConfirmDialog(this, zone, \"Choose zone..\", JOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\n\t\t\tif (option == JOptionPane.OK_OPTION) {\n\n\t\t\t\ttry {\n\t\t\t\t\tString sql = \"select * from Registration where Zone=?;\";\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t// open connection\n\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\tstmt.setString(1, chczon.getSelectedItem());\n\t\t\t\t\trs = stmt.executeQuery();\n\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tid.addItem(Integer.parseInt(rs.getString(\"RegNo\")));\n\t\t\t\t\t}\n\t\t\t\t\tif (id.getItemCount() > 0) {\n\t\t\t\t\t\tsql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\n\t\t\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} catch (SQLException | ClassNotFoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tid.addItemListener(new ItemListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tString sql = \"select * from Registration where RegNo=?;\";\n\t\t\t\t\t\t\tstmt = con.prepareStatement(sql);\n\t\t\t\t\t\t\tstmt.setInt(1, Integer.parseInt(id.getSelectedItem().toString()));\n\t\t\t\t\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\t\t\t\t\trs.beforeFirst();\n\t\t\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\t\t\ttxtFname.setText(rs.getString(\"BaptismalName\"));\n\t\t\t\t\t\t\t\ttxtSname.setText(rs.getString(\"OtherNames\"));\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// If save button clicked, get the inputs from the text fields\n\t\t\t\tsave.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// ID = Integer.parseInt(IDs.getSelectedItem().toString());\n\t\t\t\t\t\tint RegNo = Integer.parseInt(id.getSelectedItem().toString());\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Insertion to database\n\t\t\t\t\t\t */\n\n\t\t\t\t\t\tif (txtPhone.getText().isEmpty() | txtLevel.getText().isEmpty()) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Phone Number or Level cannot be empty\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t// Register jdbc driver\n\t\t\t\t\t\t\t\tClass.forName(DRIVER_CLASS);\n\t\t\t\t\t\t\t\t// open connection\n\t\t\t\t\t\t\t\tcon = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\t\t\t\t\t\tString sql = \"INSERT INTO `Zone committee`(`ID`, `BaptismalName`, `OtherName`, `Phone`, `Position`, `Level`, `Zone`)\"\n\t\t\t\t\t\t\t\t\t\t+ \" VALUES (?,?,?,?,?,?,?);\";\n\t\t\t\t\t\t\t\tstmt = (PreparedStatement) con.prepareStatement(sql);\n\t\t\t\t\t\t\t\tstmt.setInt(1, RegNo);\n\t\t\t\t\t\t\t\tstmt.setString(2, txtFname.getText().toString().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(3, txtSname.getText().toString().toUpperCase());\n\n\t\t\t\t\t\t\t\tstmt.setInt(4, Integer.parseInt(txtPhone.getText().toString()));\n\t\t\t\t\t\t\t\tstmt.setString(5, position.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(6, txtLevel.getText().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.setString(7, chczon.getSelectedItem().toUpperCase());\n\t\t\t\t\t\t\t\tstmt.executeUpdate();\n\t\t\t\t\t\t\t\tshowZonecomm();\n\t\t\t\t\t\t\t\tid.setSelectedIndex(0);\n\t\t\t\t\t\t\t\ttxtFname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtSname.setText(\"\");\n\t\t\t\t\t\t\t\ttxtLevel.setText(\"\");\n\t\t\t\t\t\t\t\ttxtPhone.setText(\"\");\n\t\t\t\t\t\t\t\tposition.select(0);\n\t\t\t\t\t\t\t} catch (SQLException | ClassNotFoundException e2) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Member exists in the committee list!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// add items to the choice box\n\t\t\t\tposition.add(\"Chairperson\");\n\t\t\t\tposition.add(\"Vice chairperson\");\n\t\t\t\tposition.add(\"Secretary\");\n\t\t\t\tposition.add(\"Vice secretary\");\n\t\t\t\tposition.add(\"Treasurer\");\n\t\t\t\tposition.add(\"Member\");\n\t\t\t\tposition.select(\"Member\");\n\n\t\t\t\tObject[] inputfields = { new JLabel(\"Type ID and press ENTER\"), id, labBaptismalName, txtFname,\n\t\t\t\t\t\tlabOtherName, txtSname, labPhone, txtPhone, new JLabel(\"Level\"), txtLevel, labPosition, position };\n\n\t\t\t\tJOptionPane.showOptionDialog(this, inputfields, \"Enter zone committee members\", JOptionPane.DEFAULT_OPTION,\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, new Object[] { save }, null);\n\t\t\t}\n\n\t\t}", "private ObservableList<String> fillComboBox() {\n\t\tObservableList<String> list = FXCollections.observableArrayList();\n\t\t\n\t\t/* Test Cases */\n\t\t\tlist.addAll(\"Item Code\", \"Description\");\n\t\t\n\t\treturn list;\n\t}", "public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n //Preenche o comboBox sexo\r\n cb_sexo.setItems(listSexo);\r\n cb_uf.setItems(listUf);\r\n cb_serie.setItems(listSerie);\r\n\r\n// // Preenche o comboBox UF\r\n// this.cb_uf.setConverter(new ConverterDados(ConverterDados.GET_UF));\r\n// this.cb_uf.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n//\r\n// //Preenche o comboBox Serie\r\n// this.cb_serie.setConverter(new ConverterDados(ConverterDados.GET_SERIE));\r\n// this.cb_serie.setItems(AlunoDAO.executeQuery(null, AlunoDAO.QUERY_TODOS));\r\n this.codAluno.setCellValueFactory(cellData -> cellData.getValue().getCodigoProperty().asObject());\r\n this.nomeAluno.setCellValueFactory(cellData -> cellData.getValue().getNomeProperty());\r\n this.sexoAluno.setCellValueFactory(cellData -> cellData.getValue().getSexoProperty());\r\n this.enderecoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnderecoProperty());\r\n this.cepAluno.setCellValueFactory(cellData -> cellData.getValue().getCepProperty());\r\n this.nascimentoAluno.setCellValueFactory(cellData -> cellData.getValue().getNascimentoProperty());\r\n this.ufAluno.setCellValueFactory(cellData -> cellData.getValue().getUfProperty());\r\n this.maeAluno.setCellValueFactory(cellData -> cellData.getValue().getMaeProperty());\r\n this.paiAluno.setCellValueFactory(cellData -> cellData.getValue().getPaiProperty());\r\n this.telefoneAluno.setCellValueFactory(cellData -> cellData.getValue().getTelefoneProperty());\r\n this.serieAluno.setCellValueFactory(cellData -> cellData.getValue().getSerieProperty());\r\n this.ensinoAluno.setCellValueFactory(cellData -> cellData.getValue().getEnsinoProperty());\r\n\r\n //bt_excluir.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n //bt_editar.disableProperty().bind(tabelaAluno.getSelectionModel().selectedItemProperty().isNull());\r\n }", "private void startupForm() {\n pers = new PersonManager();\n myCountries = new CountryManager();\n initComponents();\n setLocationRelativeTo(null);\n //Load the Surname lists\n List<String> surnames = pers.getSurnameList();\n this.setTitle(\"View Contacts\");\n //Step through the List and add surnames\n for (String str : surnames) {\n this.surnameCombo.addItem(str);\n }\n this.forenameCombo.removeAllItems();\n this.sectionCombo.removeAllItems();\n this.surnameCombo.setSelectedItem(\"\");\n this.forenameCombo.setSelectedItem(\"\");\n this.sectionCombo.setSelectedItem(\"\");\n this.fillCountryTables();\n }", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "private void popuniComboZaMesto() {\n try {\n jComboMesto.removeAllItems();\n List<MestoEntity> mesta = Controller.ucitajListuMesta();\n \n for (IDomainEntity mesto : mesta) {\n if(mesto instanceof MestoEntity)\n jComboMesto.addItem((MestoEntity) mesto);\n }\n } catch (Exception ex) {\n Logger.getLogger(FKupac.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void setupComboBox(){\n\n //enhanced for loop populates book comboBox with books\n for(Book currentBook : books){ //iterates through books array\n bookCB.addItem(currentBook.getTitle()); //adds book titles to comboBox\n }\n\n //enhanced for loop populates audio comboBox with audio materials\n for(AudioVisualMaterial currentAudio : audio){ //iterates through audio array\n audioCB.addItem(currentAudio.getAuthor()); //adds audio authors to comboBox\n }\n\n //enhanced for loop populates video comboBox with video materials\n for(AudioVisualMaterial currentVideo : video){ //iterates through video array\n videoCB.addItem(currentVideo.getTitle()); //adds video titles to comboBox\n }\n }", "private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel2 = new javax.swing.JLabel();\n nameLabel = new javax.swing.JLabel();\n performButton = new javax.swing.JButton();\n availableNames = new javax.swing.JComboBox<>();\n\n setMaximumSize(new java.awt.Dimension(435, 600));\n setMinimumSize(new java.awt.Dimension(435, 600));\n setPreferredSize(new java.awt.Dimension(435, 600));\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 1, 11)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Знайти за назвою\");\n jLabel2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n nameLabel.setText(\"Назва:\");\n\n performButton.setText(\"Виконати\");\n performButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n performButtonActionPerformed(evt);\n }\n });\n\n availableNames.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(140, 140, 140)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(40, 40, 40)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(10, 10, 10)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(150, 150, 150)\n .addComponent(performButton, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(10, 10, 10)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(availableNames, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(40, 40, 40)\n .addComponent(performButton))\n );\n\n nameLabel.getAccessibleContext().setAccessibleName(\"id\");\n\n getAccessibleContext().setAccessibleParent(this);\n }", "public void mostrarCategoria(JComboBox<Categoria>jComboBoxCategoria){\n \n try{\n con = ConexionBD.getConexion();\n String sql=\"SELECT * FROM categorias WHERE id_estado = 1 ORDER BY id_categoria\";\n sent = con.createStatement();\n ResultSet rs = sent.executeQuery(sql);\n \n \n while (rs.next()){\n jComboBoxCategoria.addItem(\n new Categoria (\n rs.getString(\"id_categoria\"), \n rs.getString(\"nombre_categoria\")\n )\n );\n }\n \n }catch(SQLException e){\n JOptionPane.showMessageDialog(null,\"error\");\n \n \n \n }\n \n }", "private void napuniCbPozoriste() {\n\t\t\r\n\t\tfor (Pozoriste p:Kontroler.getInstanca().vratiPozorista())\r\n\t\t\t\r\n\t\t\tcbPozoriste.addItem(p.getImePozorista());\r\n\t}", "private void configureCombo(ComboBox<BeanModel> combo, String label){\r\n\t\t\t\tcombo.setValueField(\"id\");\r\n\t\t\t\tcombo.setDisplayField(\"name\");\r\n\t\t\t\tcombo.setFieldLabel(label);\r\n\t\t\t\tcombo.setTriggerAction(TriggerAction.ALL);\t\r\n\t\t\t\tcombo.setEmptyText(\"choose a customer ...\");\r\n\t\t\t\tcombo.setLoadingText(\"loading please wait ...\");\r\n\t\t\t}", "public void wypelnij(){\n ArrayList<ComboUserInsert> tmp = a.getAllUsers();\n for(int i = 0 ; i < tmp.size(); i++){\n uzytkownicy.addItem(tmp.get(i));\n }\n uzytkownicy.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n Object item = uzytkownicy.getSelectedItem();\n chosen_id = ((ComboUserInsert)item).id;\n }\n });\n }", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "public void loadComboBoxCourses(){\r\n //Para cargar un combobox\r\n CircularDoublyLinkList tempCourses = new CircularDoublyLinkList();\r\n tempCourses = Util.Utility.getListCourse();\r\n String temporal = \"\";\r\n if(!tempCourses.isEmpty()){\r\n try {\r\n for (int i = 1; i <= tempCourses.size(); i++) {\r\n Course c = (Course)tempCourses.getNode(i).getData(); \r\n temporal = c.getId()+\"-\"+c.getName();\r\n this.cmbCourses.getItems().add(temporal);\r\n }\r\n } catch (ListException ex) {\r\n Logger.getLogger(NewStudentController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n \r\n cmbCourses.setValue(temporal);\r\n cmbCourses.getSelectionModel().select(\"Courses\");\r\n }", "private void setupComboBox() {\n nodeSelectComboBox.setEditable(true);\n\n getNodes();\n\n // Set to all nodes\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet())));\n nodeSelectComboBox.setOnAction(param -> {\n longName = nodeSelectComboBox.getValue();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n // Filter nodes based on user input\n nodeSelectComboBox.setOnKeyReleased(param -> {\n nodeSelectComboBox.setItems(FXCollections.observableList(new LinkedList<String>(nodeIDs.keySet()).stream()\n .filter(longName -> showNode(longName, nodeSelectComboBox.getValue())).collect(Collectors.toList())));\n });\n }", "private JComboBox<Cliente> crearComboClientes() {\n\n JComboBox<Cliente> combo = new JComboBox<>(new Vector<>(almacen.getClientes()));\n combo.setMaximumSize(new Dimension(500, 40));\n\n combo.setRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n Cliente cliente = (Cliente) value;\n this.setText(cliente != null ? cliente.getNombre() : \"No existen clientes\");\n\n return resultado;\n }\n });\n\n return combo;\n }", "private void createComboMemBank() {\r\n\t\tcomboMemBank = new Combo(sShell, SWT.READ_ONLY);\r\n\t\t\r\n\t\tcomboMemBank.setBounds(new Rectangle(54, 55, 92, 21));\r\n\t\tString items[] = new String[]{ \"Reserved\", \"EPC\", \"TID\", \"User\" };\r\n\t\tcomboMemBank.setItems(items);\r\n\t\tcomboMemBank.select(1);\r\n\r\n\t\t\r\n\t}", "@FXML\n\tprivate void initialize() {\n\t\tlistNomType = FXCollections.observableArrayList();\n\t\tlistIdType=new ArrayList<Integer>();\n\t\ttry {\n\t\t\tfor (Type type : typeDAO.recupererAllType()) {\n listNomType.add(type.getNomTypeString());\n listIdType.add(type.getIdType());\n }\n\t\t} catch (ConnexionBDException e) {\n\t\t\tnew Popup(e.getMessage());\n\t\t}\n\t\tcomboboxtype.setItems(listNomType);\n\n\t}" ]
[ "0.8459618", "0.73503", "0.73214465", "0.7260643", "0.7137049", "0.7000498", "0.6979443", "0.69500285", "0.6914347", "0.6907064", "0.6868959", "0.6808377", "0.67946315", "0.6743316", "0.67203575", "0.6718636", "0.671581", "0.6691324", "0.6685827", "0.66854846", "0.6682449", "0.66653776", "0.6636202", "0.66199124", "0.65999657", "0.6597715", "0.65940684", "0.65797585", "0.65739053", "0.6568843", "0.65676135", "0.65668213", "0.65664786", "0.65308636", "0.6476386", "0.647588", "0.6464459", "0.6454589", "0.6454057", "0.6453753", "0.64536", "0.64380085", "0.6429514", "0.64200604", "0.641476", "0.64033365", "0.6402593", "0.63977945", "0.6396963", "0.6396366", "0.638891", "0.6377163", "0.6372147", "0.635373", "0.6344145", "0.6339334", "0.63388985", "0.63357294", "0.63354206", "0.63304365", "0.63283426", "0.6326753", "0.6321788", "0.63032424", "0.6299962", "0.62860096", "0.62843585", "0.6278645", "0.626672", "0.62600684", "0.62536454", "0.6251274", "0.6248885", "0.6246798", "0.62462074", "0.6224975", "0.6210082", "0.6205383", "0.6193676", "0.6193069", "0.61897427", "0.6183169", "0.6179636", "0.6175749", "0.6165182", "0.61559564", "0.61430764", "0.6129922", "0.6106448", "0.6100861", "0.6084841", "0.608429", "0.6082503", "0.6068053", "0.6067838", "0.6064924", "0.606209", "0.6060029", "0.6054577", "0.6029129" ]
0.81794786
1
onPostExecute displays the results of the AsyncTask.
@Override protected void onPostExecute(String result) { // Toast.makeText(getBaseContext(), "Data Sent!", Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onPostExecute() {\n }", "protected void onPostExecute() {\r\n\t}", "protected void onPostExecute() {\n }", "protected void onPostExecute() {\n }", "@Override\n protected void onPostExecute(String result) {\n // tvResult.setText(result);\n }", "protected void onPostExecute(Void v) {\n\n }", "protected void onPostExecute(Void v) {\n\n }", "@Override\n protected void onPostExecute(String result) {\n }", "@Override\n\t protected void onPostExecute(String result) {\n\t }", "protected void onPostExecute(String resultado) {\n\t\t\ttextView.setText(\"\");\n\t\t\ttextView.setTextColor(Color.BLACK);\n\t\t\ttextView.setText(getString(R.string.main_1) +\"\\n\"+ getString(R.string.visit_final)+\"\\n\"+ getString(R.string.code)+ \" \"+ getString(R.string.participant)+ \": \"+partCaso.getParticipante().getParticipante().getCodigo());\n\t\t\tmVisitaFinalCasoAdapter = new VisitaFinalCasoAdapter(getApplication().getApplicationContext(), R.layout.complex_list_item, mVisitaFinalCaso);\n\t\t\tsetListAdapter(mVisitaFinalCasoAdapter);\n\t\t\tdismissProgressDialog();\n\t\t}", "protected void onPostExecute(String result) {\n }", "@Override\n protected void onPostExecute(Void result) {\n // This is where we would process the results if needed.\n this.progressDialog.dismiss();\n }", "protected void onPostExecute(Void v) {\n }", "@Override\n protected void onPostExecute(String result) {\n\n }", "@Override\n protected void onPostExecute(String result) {\n\n }", "@Override\n protected void onPostExecute(String result) {\n }", "@Override\n protected void onPostExecute(String result) {\n }", "@Override\n protected void onPostExecute(String result) {\n }", "protected void onPostExecute(Void v) {\n\n\n }", "@Override\n protected void onPostExecute(String result) {\n if (result.equals(\"SUCCESS\")) {\n\n }\n // Do things like hide the progress bar or change a TextView\n }", "protected void onPostExecute(Integer results) {\r\n\r\n\t\t\t// StatusTextView.setText(\"Map: \" + results);\r\n\t\t\tuiUpdate();\r\n\r\n\t\t}", "@Override\n protected void onPostExecute(String result) {\n tvContenidoTarea.setText(result); // txt.setText(result);\n // might want to change \"executed\" for the returned string passed\n // into onPostExecute() but that is upto you\n }", "protected void onPostExecute(String result) {\r\n\r\n\t\t}", "protected void onPostExecute(Void result) {\n }", "protected void onPostExecute(Long result) {\n\t\t\t USCG_QuestionsActivity.this.setContentView(R.layout.activity_uscg__questions);\r\n\t\t // Show the question and answers\r\n\t\t\t showQuesAndAnswers();\r\n\t\t }", "@Override\n protected void onPostExecute(Void result) {\n\n }", "protected void onPostExecute(String result){\n }", "protected void onPostExecute(String resultado) {\n dismissProgressDialog();\n showResult(resultado);\n }", "protected void onPostExecute(String resultado) {\n dismissProgressDialog();\n showResult(resultado);\n }", "@Override\n\t\tprotected void onPostExecute(Boolean result) {\n\t\t\tshowResult(result);\n\t\t}", "public void onPostExecute(Result result) {\n }", "public void onPostExecute(Result result) {\n }", "public void onPostExecute(Result result) {\n }", "@Override\r\n protected void onPostExecute(String result) {\n\r\n }", "@Override\n\t protected void onPostExecute(String result) \n\t {\n\t \tmHandler.post(updateList);\n\t \t\n\t //mProgress.setVisibility(View.GONE);\n\n\t }", "@Override protected void onPostExecute(String returnVal) {\r\n //Print the response code as toast popup \r\n //android.widget.Toast.makeText(\r\n // mContext, \"[myAsyncTask.onPostExecute] Response: \" + returnVal,\r\n // android.widget.Toast.LENGTH_LONG\r\n //).show();\r\n if (gHandlers != null) gHandlers.onPostExecute(returnVal);\r\n }", "@Override\n protected void onPostExecute(Void aVoid) {\n }", "@Override\n protected void onPostExecute(List<Parkingspot> result){\n\n if(result != null) {\n for (Parkingspot parkingspot : result) {\n Log.i(TAG, \"Address: \" + parkingspot.getAddress() + \" Location: \"\n + parkingspot.getLocation());\n\n }\n }\n }", "@Override\r\n\t\tprotected void onPostExecute(Void result) \r\n\t\t{\n\t\t}", "@Override\n protected void onPostExecute(Void result) {\n super.onPostExecute(result);//Run the generic code that should be ran when the task is complete\n onCompleteListener.onAsyncTaskComplete(result);//Run the code that should occur when the task is complete\n }", "@Override\r\n protected void onPostExecute(String result) {\n\r\n }", "protected void onPostExecute(String args) {\r\n\t\t\thideLoading();\r\n\t\t\tListItemAdapter adapter = new ListItemAdapter(\r\n\t\t\t\t\tMyChannelsTabletActivity.this, R.layout.my_channels_item_tablet,\r\n\t\t\t\t\tchannels);\r\n\t\t\t// updating listview\r\n\t\t\tgvChannel.setAdapter(adapter);\r\n\t\t\tif(channels.size()==0){\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"No results\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t}", "@Override\r\n\t\tprotected void onPostExecute(Void result)\r\n\t\t{\n\t\t}", "protected void onPostExecute(String result) {\n\t\t\t\t\tquestions = SiQuoiaJSONParser.parseLeaderboard(result);\n\t\t\t\t\t\n\t\t\t\t\t//sets my listAdapter to the list\n\t\t\t leaderboardAdapter = new SiQuoiaLeaderboardAdapter(SiQuoiaLeaderboardActivity.this,R.layout.leaderboard_list,questions);\n\t\t\t leaderboardList = (ListView) findViewById(R.id.leaderboardList);\n\t\t\t leaderboardList.setAdapter(leaderboardAdapter); \n\t\t\t\t\t\n\t\t\t\t\t//close progress dialog\n\t\t\t\t\tprogressBar.dismiss();\n\t\t\t}", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\n\t\t\n\t}", "@Override\n\tprotected void onPostExecute(String result) {\n\t\tLog.d(TAG, result);\n\t}", "protected void onPostExecute (String result) \n\t{\n\t\t\n\t\tif(result == null)\n\t\t{\n\t\t\t\n\t\t\tLog.e(\"post execution \", \"result null\");\n\t\t\t//ThreadClassForHttpRequest http = new ThreadClassForHttpRequest(view, txt_titles, txt_links, txt_path, frameAnimation);\n\t\t\t//http.execute(parameters);\n\t\t\tToast.makeText(context, \"Yahoo Response Failure\", Toast.LENGTH_LONG).show();\n\t\t\tframeAnimation.stop();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tframeAnimation.stop();\n\t\tfor(int i=0; i<9; i++)\n\t\t{\n\t\t\tview[i].setImageBitmap(pic[i]);\n\t\t}\n\t\t\n\t\ttxt_links.setText(allLinks);\n\t\ttxt_titles.setText(allTitles);\n\t\tString path;\n\t\tpath = txt_path.getText().toString();\n\t\t\n\t\tpath = path + \"-->#\" + parameters[0] + \"#\" + parameters[1];\n\t\t\n\t\ttxt_path.setText(path);\n\t\t\n\t\t//Log.e(\"thread titles\", allTitles);\n\t\t\n\t}", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tpdia.dismiss();\n\t\t\tif (result.equals(\"success\")) {\n\t\t\t\t//lvFeed = (ListView) findViewById(R.id.lvFeed);\n\t\t\t\t//lvFeed.setAdapter(new FeedAdapter(mContext, mActivity, feedContent));\n\t\t\t} else\n\t\t\t\tToast.makeText(mContext, result, Toast.LENGTH_SHORT).show();\n\t\t\tsuper.onPostExecute(result);\n\t\t}", "@Override\r\n\tprotected void onPostExecute(String result) {\n\t\tsuper.onPostExecute(result);\r\n\t}", "@Override\n protected void onPostExecute(String result) {\n Log.i(\"this is the result\", \"HULA\");\n //Do anything with response..\n }", "@Override\n protected void onPostExecute(String s) {\n super.onPostExecute(s);\n dialog.dismiss(); // to stop showing the progressbar After process is completed\n tvResult.setText(s);\n tvResult.setVisibility(View.VISIBLE);\n Toast.makeText(MainActivity.this, \"Process Done\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n protected void onPostExecute(String result) {\n temptext.setText(result+data);\n }", "@Override\n protected void onPostExecute(String result) {\n if(dialog.isShowing())\n {\n dialog.dismiss();\n }\n //Check to see if the result is null. If it is not then we know we got some data back and can display it to the user.\n if(result!=null)\n {\n lyrics.setText(result);\n }\n //Something went wrong and we can display a toast to the user detailing this.\n else\n {\n Toast.makeText(getApplicationContext(), \"Unable to get lyrics\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n // below method will run when service HTTP request is complete, will then bind tweet text in arrayList to ListView\n protected void onPostExecute(String strFromDoInBg) {\n ListView list = (ListView)findViewById(R.id.tweetList);\n ArrayAdapter<String> tweetArrayAdapter = new ArrayAdapter<String>(Tweets.this, android.R.layout.simple_expandable_list_item_1, items);\n list.setAdapter(tweetArrayAdapter);\n }", "protected void onPostExecute(Void result) {\n if (dialog.isShowing()) {\n dialog.dismiss();\n }\n ReadWordDataBase();\n DisplayList();\n }", "@Override\n\t\t protected void onPostExecute(Void result) {\n\t\t \t\n\t\t super.onPostExecute(result); \n\t\t }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif (result != null) {\n\t\t\t\tToast.makeText(getActivity(), \"Tai thanh cong!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t} else {\n\t\t\t\tToast.makeText(getActivity(), \"That bai\", Toast.LENGTH_SHORT)\n\t\t\t\t\t\t.show();\n\t\t\t}\n\t\t\ttoggleShowProgressDialog(false);\n\t\t}", "@Override\n protected void onPostExecute(String result)\n {\n //Toast.makeText(OTPActivity.this, result.toString(), Toast.LENGTH_LONG).show();\n }", "@Override\n\tprotected void onPostExecute(Void result) {\n\t\tsuper.onPostExecute(result);\n\t\tstatus.setText(debug);\n\t}", "@Override\r\n\tprotected void onPostExecute(String result)\r\n\t{\r\n\t\tprogress.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\t}", "protected void onPostExecute(String file_url) {\n // dismiss the dialog after getting all products\n pDialog.dismiss();\n // updating UI from Background Thread\n\n Emp = (TextView) findViewById(R.id.empresa);\n cal = (TextView) findViewById(R.id.calle);\n num = (TextView) findViewById(R.id.Numero);\n ciu = (TextView) findViewById(R.id.ciudad);\n prov = (TextView) findViewById(R.id.provincia);\n prob = (TextView) findViewById(R.id.problema);\n\n\n\n Emp.setText(empresa);\n cal.setText(calle);\n num.setText(numero);\n ciu.setText(ciudad);\n prov.setText(provincia);\n prob.setText(problema);\n\n\n\n\n }", "@Override\r\n\tprotected void onPostExecute(String result) {\r\n\t\tprogressDialog.setMessage(\"Finalizado!\");\r\n\t\t// fecha o dialog\r\n\t\tprogressDialog.dismiss();\r\n\t\tsuper.onPostExecute(result);\r\n\t}", "protected void onPostExecute(Long result) {\n\t }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t}", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t}", "@Override\n protected void onPostExecute(Void result) {\n listview = (ListView) findViewById(R.id.listview);\n // Pass the results into an ArrayAdapter\n adapter = new ArrayAdapter<String>(ClientsFromEntrenadorSuperAdmin.this,\n R.layout.item);\n // Retrieve object \"name\" from Parse.com database\n for (ParseObject clients : ob) {\n adapter.add((String) clients.get(\"Nom\") + \" \" + clients.get(\"Cognom\"));\n }\n // Binds the Adapter to the ListView\n listview.setAdapter(adapter);\n // Close the progressdialog\n mProgressDialog.dismiss();\n // Capture button clicks on ListView items\n }", "@Override\n\tpublic void onTaskPostExecute() {\n\t\tLog.i(TAG, \"post executing\");\n\t\tupdateAdapter();\n\t\tspinner.setVisibility(View.GONE);\n\t\tlistView.setVisibility(View.VISIBLE);\n\t\tlistView.onLoadMoreComplete();\n\t}", "protected void onPostExecute(Void v) {\n Log.v(\"Result\",response);\n }", "@Override\n protected void onPostExecute(String result) {\n Gson gson = new Gson(); //iz Jsona napravi objekte unutar jave\n ArhivaRoot arhivaRoot = gson.fromJson(result, ArhivaRoot.class);\n\n textView.setText(joinRows(arhivaRoot.getRows()));\n mProgressDialog.dismiss();\n }", "@Override\r\n protected void onPostExecute(Void result) {\n\r\n }", "@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t}", "@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t}", "@Override\n protected void onPostExecute(String result) {\n con.findViewById(R.id.progressBarr).setVisibility(View.INVISIBLE);\n if(result==null){Toast.makeText(con, \"ERROR! text ansver is null\", Toast.LENGTH_LONG).show(); return;}\n // Toast.makeText(getBaseContext(),result,Toast.LENGTH_SHORT).show();\n setMyScroll(result);\n\n }", "@Override\n\t \t\tprotected void onPostExecute(Void result) {\n\t \t\t\tlistView.setVisibility(View.INVISIBLE);\n\t \t\t\tToast.makeText(getActivity(),\n\t \t\t\t\t\tgetResources().getString(R.string.saved),\n\t \t\t\t\t\tToast.LENGTH_LONG).show();\n\t \t\t\tupdate.setVisibility(View.VISIBLE);\n\t \t\t\tupdate.setText(getResources().getString(R.string.saved));\n\t \t\t\tmProgressDialog.dismiss();\n\t \t\t}", "protected void onPostExecute(String file_url) {\n\t\t\tpDialog.dismiss();\r\n\t\t\tTextView[] tv = new TextView[3];\r\n\t\t\ttv[0] = (TextView) v.findViewById(R.id.UserName);\r\n\t\t\ttv[1] = (TextView) v.findViewById(R.id.UserSex);\r\n\t\t\ttv[2] = (TextView) v.findViewById(R.id.Userlocation);\r\n\t\t\t// for(int i=0;i<memberlist.size();i++)\r\n\t\t\t// {\r\n\t\t\t// tv[i].setText(memberlist.get(i).toString());\r\n\t\t\t// }\r\n\t\t\tfor (HashMap<String, String> map : memberlist) {\r\n\t\t\t\tObject tagNickName = map.get(TAG_NICKNAME);\r\n\t\t\t\tObject tagSex = map.get(TAG_SEX);\r\n\t\t\t\tObject tagAddress = map.get(TAG_ADDRESS);\r\n\t\t\t\ttv[0].setText(tagNickName.toString());\r\n\t\t\t\ttv[1].setText(tagSex.toString());\r\n\t\t\t\ttv[2].setText(tagAddress.toString());\r\n\t\t\t}\r\n\r\n\t\t\t// updating UI from Background Thread\r\n\r\n\t\t}", "protected void onPostExecute(String result) {\n onTaskCompleted(result,jsoncode);\n }", "@Override\n protected void onPostExecute(String s) {\n\n\n mainInterface.onResultsFound(pokemons);\n }", "public void onPostExecute(ArrayList<String> predictions) {\n \t\t\trouteViewProgressBar.setVisibility(View.INVISIBLE);\n \n \t\t\tif (predictions.size() == 1 && predictions.get(0).equals(\"-1\")) {\n \t\t\t\tToast.makeText(ctx, \"Error, Server Down?\", Toast.LENGTH_LONG)\n \t\t\t\t\t\t.show();\n \t\t\t\tpredictions.clear();\n \t\t\t}\n \n \t\t\tif (predictions.size() == 0 || predictions.get(0).equals(\"error\")) {\n \t\t\t\tfirstArrival.setText(\"--\");\n \t\t\t\tsecondArrival.setText(\"\");\n \t\t\t\tthirdArrival.setText(\"\");\n \t\t\t\tfourthArrival.setText(\"\");\n \n \t\t\t} else {\n \t\t\t\tfirstArrival.setText(predictions.get(0).toString());\n \t\t\t\tif (predictions.size() > 1)\n \t\t\t\t\tsecondArrival.setText(predictions.get(1).toString());\n \t\t\t\telse\n \t\t\t\t\tsecondArrival.setText(\"\");\n \t\t\t\tif (predictions.size() > 2)\n \t\t\t\t\tthirdArrival.setText(predictions.get(2).toString());\n \t\t\t\telse\n \t\t\t\t\tthirdArrival.setText(\"\");\n \t\t\t\tif (predictions.size() > 3)\n \t\t\t\t\tfourthArrival.setText(predictions.get(3).toString());\n \t\t\t\telse\n \t\t\t\t\tfourthArrival.setText(\"\");\n \t\t\t}\n \t\t}", "public void onPostExecute(String fromDoInBackground){\n CovAdt.notifyDataSetChanged();\n pb.setVisibility(View.INVISIBLE);\n }", "@Override\r\n\t protected void onPostExecute(String result) {\r\n\t super.onPostExecute(result);\r\n\t \r\n\t ParserTask parserTask = new ParserTask();\r\n\t \r\n\t // Invokes the thread for parsing the JSON data\r\n\t parserTask.execute(result);\r\n\t }", "protected void onPostExecute(String result) {\n showOpinionCreatedMessage(Integer.parseInt(result));\n }", "protected void onPostExecute(Long result) {\n }", "protected void onPostExecute(Long result) {\n }", "protected void onPostExecute(Long result) {\n\t\t}", "protected void onPostExecute(String res) {\n\t\t super.onPostExecute(res);\r\n\t\t \r\n\r\n\t\t try {\r\n\t\t\t JSONObject responseObject = json.getJSONObject(\"responseData\");\r\n\t\t\t JSONArray resultArray = responseObject.getJSONArray(\"results\");\r\n\r\n\t\t\t // listImages = getImageList(resultArray);\r\n\t//\t\t SetListViewAdapter(listImages);\r\n\t\t } catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\t\n\t\t\tbtnListaj.setVisibility(View.VISIBLE);\n\t\t\tbtnDodadi.setVisibility(View.VISIBLE);\n\t\t\t\n\t\t\tpb=(ProgressBar) findViewById(R.id.pbLoading);\n\t\t\tpb.setVisibility(View.INVISIBLE);\n\t\t\t\n\t\t\tString jsonResponse=GetAllMestaTask.entityToString(response.getEntity());\n\t\t\t\n\t\t\tKategorija.kategorii=fromJSONtoKategorija(jsonResponse);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tif (mpProgress.isShowing())\n\t\t\t\tmpProgress.dismiss();\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif (result != null) {\n\n\t\t\t\t// Toast.makeText(mContext, \"Response-\"+result, 1000).show();\n\t\t\t\t// System.out.println(\"Response=\"+result);\n\t\t\t\tFragment_Tickets.imgButtonOpen.performClick();\n\n\t\t\t} else {\n//\t\t\t\tToast.makeText(mContext, \"No response from server\", 1000).show();\n//\t\t\t\tSystem.out.println(\"No response from server\");\n\t\t\t}\n\t\t}", "protected void onPostExecute(List<Opinion> result) {\n if (result.size() == 0) {\n showEmptyListMessage();\n } else {\n // seleccionamos el listView\n ListView lv = (ListView) findViewById(R.id.aOpinionListViewOpinion);\n\n // cogemos los datos con el ListSearchAdapter y los mostramos\n ListOpinionAdapter customAdapter = new ListOpinionAdapter(getApplication(), R.layout.activity_opinion_item, result);\n lv.setAdapter(customAdapter);\n }\n }", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tif (m_notifArray.size() > 0 && m_notifArray != null) {\n\t\t\t\tm_tvNoData.setVisibility(View.INVISIBLE);\n\t\t\t\tm_lvList.setVisibility(View.VISIBLE);\n\t\t\t\tm_notifAdapter = new NotificationListAdapter(m_context,\n\t\t\t\t\t\tm_notifArray);\n\t\t\t\tm_lvList.setAdapter(m_notifAdapter);\n\t\t\t} else {\n\n\t\t\t\tm_lvList.setVisibility(View.INVISIBLE);\n\t\t\t\tm_tvNoData.setText(result);\n\t\t\t\tm_tvNoData.setVisibility(View.VISIBLE);\n\n\t\t\t}\n\t\t\tm_progDialog.dismiss();\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tprogressLayout.setVisibility(View.GONE);\n\t\t\ttextDescription.setText(videoDescription);\n\n\t\t}", "@Override\n protected void onPostExecute(String result) {\n Log.i(TAG, \"STATUS IS: \" + result);\n }", "@Override\n protected void onPostExecute(String result){\n ParserTask parserTask = new ParserTask(viewHolder);\n\n // Start parsing the Google places in JSON format\n // Invokes the \"doInBackground()\" method of ParserTask\n parserTask.execute(result);\n }", "@Override\n protected void onPostExecute(final Void unused) {\n super.onPostExecute(unused);\n Log.i(\"Dict\", \"Done processing\");\n delegate.processFinish(result);\n }", "@Override\n\t\t\t\tprotected void onPostExecute(Void result)\n\t\t\t\t{\n\t\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t}", "@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tpdia.dismiss();\n\t\t\tif (result.equals(\"success\")) {\n\t\t\t\tViewPagerAdapter adapter = new ViewPagerAdapter(mContext, mActivity, circle_names, circle_urls );\n\t\t\t ViewPager pager = \n\t\t\t (ViewPager)findViewById( R.id.viewpager );\n\t\t\t TitlePageIndicator indicator = \n\t\t\t (TitlePageIndicator)findViewById( R.id.titles );\n\t\t\t pager.setAdapter( adapter );\n\t\t\t pager.setCurrentItem(1);\n\t\t\t indicator.setViewPager( pager );\n\t\t\t} else {\n\t\t\t\tToast.makeText(mContext, result, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\tsuper.onPostExecute(result);\n\t\t}", "@Override\n\tprotected void onPostExecute() {\n\n\t\tprogressDialog.dismiss();\n\n\t\ttry {\n\n\t\t\tgetResult();\n\n\t\t\tif (completionListener != null) {\n\t\t\t\tcompletionListener.onDownloadAllDataComplete(true);\n\t\t\t}\n\n\t\t} catch (Exception error) {\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\tbuilder.setTitle(string.error)\n\t\t\t\t\t.setMessage(context.getString(string.datasync_dialog_cantsync) + error.getMessage())\n\t\t\t\t\t.setCancelable(false).setPositiveButton(string.ok, new DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tif (completionListener != null) {\n\t\t\t\t\t\t\t\tcompletionListener.onDownloadAllDataComplete(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t}\n\n\t}", "@Override\n protected void onPostExecute(String result) {\n\n try {\n // To display message after response from server\n if (!result.contains(\"ERROR\")) {\n if (responseJSON.equalsIgnoreCase(\"success\")) {\n db.open();\n db.Update_OutletExpenseIsSync();\n db.close();\n }\n if (common.isConnected()) {\n AsyncOutletSaleWSCall task = new AsyncOutletSaleWSCall();\n task.execute();\n }\n } else {\n if (result.contains(\"null\"))\n result = \"Server not responding.\";\n common.showAlert(StockAdjustmentList.this, result, false);\n common.showToast(\"Error: \" + result);\n }\n } catch (Exception e) {\n common.showAlert(StockAdjustmentList.this,\n \"Unable to fetch response from server.\", false);\n }\n\n Dialog.dismiss();\n }", "@Override\n protected void onPostExecute(String result) {\n super.onPostExecute(result);\n\n ParserTask parserTask = new ParserTask();\n\n // Invokes the thread for parsing the JSON data\n parserTask.execute(result);\n mProgressDialog.dismiss();\n }", "@Override\r\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tshowtalk.setText(result);\r\n\t\t}", "protected void onPostExecute(String results) {\n\t\t\tUserFindActivity.this.parsePopulateListView(results);\n\t\t\treturn;\n\t\t}" ]
[ "0.7649192", "0.76296836", "0.75975955", "0.75975955", "0.7501419", "0.748076", "0.748076", "0.7468351", "0.74647146", "0.7443889", "0.7442882", "0.7421545", "0.7395976", "0.7393925", "0.7393925", "0.7391538", "0.7391538", "0.7391538", "0.7375527", "0.7374658", "0.7366173", "0.73450255", "0.7342979", "0.73423916", "0.7288492", "0.7278674", "0.72751963", "0.7267071", "0.7267071", "0.7264735", "0.72536045", "0.72536045", "0.72536045", "0.7245613", "0.7242131", "0.7230533", "0.721488", "0.7213056", "0.72000235", "0.7195841", "0.7194329", "0.7189162", "0.7185806", "0.7180225", "0.7165588", "0.7148677", "0.7135936", "0.7131243", "0.71293443", "0.712659", "0.7119612", "0.7112257", "0.709991", "0.70933807", "0.70755965", "0.7061729", "0.7035254", "0.7035085", "0.70080125", "0.7004012", "0.69918", "0.6991544", "0.69911045", "0.69784296", "0.69784296", "0.6969316", "0.6967272", "0.6963578", "0.69632936", "0.6958562", "0.6952097", "0.6952097", "0.6949189", "0.69355", "0.69315195", "0.69295096", "0.692621", "0.6915911", "0.690723", "0.6905658", "0.69016147", "0.6895431", "0.6895431", "0.68930185", "0.68878317", "0.6876086", "0.6868476", "0.68586093", "0.68572587", "0.6856805", "0.68534434", "0.68529934", "0.68461114", "0.6845598", "0.68375385", "0.6832498", "0.6824284", "0.68174285", "0.68122", "0.68051755" ]
0.70629716
55
Cek x1 between x2 sama x3 apa ga
private boolean between(int x1, int x2, int x3) { return (x1 >= x3 && x1 <= x2) || (x1 <= x3 && x1 >= x2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n int a;\n int b;\n int c;\n a = doDai(\"Nhap canh a\");\n b = doDai(\"Nhap canh b\");\n c = doDai(\"Nhap canh c\");\n if (((a + b) < c) || ((a + c) < b) || ((c + b) < a)) {\n System.out.println(\"khong the la 3 canh cua 1 tam giac \");\n } else {\n System.out.println(\"Canh tam giac hop le\");\n }\n }", "private boolean checkConnection(int x1, int x2) {\n\t\treturn (xStartValue <= x1 && xEndValue >= x1) || (xStartValue <= x2 && xEndValue >= x2) ||\n\t\t\t\t(x1 <= xStartValue && x2 >= xStartValue) || (x1 <= xEndValue && x2 >= xEndValue);\n\t\t\n\t}", "String isIntersect(pair pair1){\n\t\tString s;\n\t\tif(pair1.z==true){\n\t\t\tif(pair1.x>=xRange.x && pair1.x<=xRange.y){ s=\"mid\";\n\t\t\treturn s;\n\t\t\t}\n\t\t\telse if(pair1.x<xRange.x){s=\"right\";\n\t\t\treturn s;\n\t\t\t}\n\t\t\telse{s=\"left\";\n\t\t\treturn s;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t}\n\t\telse{\n\t\t\tif(pair1.y>=yRange.x && pair1.y<=yRange.y){ s=\"mid\";\n\t\t\treturn s;}\n\t\t\telse if(pair1.y<yRange.x){s=\"right\";\n\t\t\treturn s;\n\t\t\t} \n\t\t\telse{s=\"left\";\n\t\t\treturn s;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t}\t\t\t\t \n\t}", "private int betweenPoints(int value,Individual ind) {\n\t\tfor(int i=_point1; i<_point2;i++) {\n\t\t\tif(value==ind.getGene(i)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "public void boundsLex(int [] a , IntDomainVar [] x , int [] b,int j) throws ContradictionException{\n\n int i =0;\n\n\n while( i< n && a[i]==b[i]){\n\n\n if((x[i].getInf()==a[i] || x[i].updateInf(a[i], this, false)) &&\n (x[i].getSup()==b[i] || x[i].updateSup(b[i], this, false))){\n i++;\n }else{\n this.fail();\n }\n\n }\n\n\n if(i<n )\n if ((x[i].getInf()==a[i] || x[i].updateInf(a[i], this, false)) &&\n (x[i].getSup()==b[i] || x[i].updateSup(b[i], this, false))){\n }else{\n this.fail();\n }\n\n\n if(i==n || x[i].getNextDomainValue(a[i])<b[i]){\n return ;\n }\n\n i+=1;\n\n while(i<n && (b[i]+1 <= a[i]-1) && x[i].getInf()==b[i] && x[i].getSup()==a[i]){\n if(x[i].removeInterval(b[i]+1,a[i]-1, this, false)){\n i++;\n }else{\n this.fail();\n\n }\n }\n\n if(i<n) {\n if (b[i] + 1 <= a[i] - 1 && x[i].getInf() <= b[i] &&\n b[i] <= x[i].getSup() && x[i].getSup() >= a[i] && a[i] >= x[i].getInf()) {\n if (!x[i].removeInterval(b[i] + 1, a[i] - 1, this, false)) {\n this.fail();\n }\n }\n }\n\n }", "public static Interval intersection(Interval in1, Interval in2){\r\n double a = in1.getFirstExtreme();\r\n double b = in1.getSecondExtreme();\r\n double c = in2.getFirstExtreme();\r\n double d = in2.getSecondExtreme();\r\n char p1 = in1.getFEincluded();\r\n char p2 = in1.getSEincluded();\r\n char p3 = in2.getFEincluded();\r\n char p4 = in2.getSEincluded();\r\n \r\n if (a==c && b==d){\r\n if (a==b){\r\n if (p1=='[' && p3=='[' && p2==']' && p4==']'){\r\n return new Interval(in1);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,b,p1==p3?p1:'(',p2==p4?p2:')');\r\n }\r\n }else if (a<c && b<=c){\r\n if (b==c && p2==']' && p3=='['){\r\n return new Interval(b,b,p3,p2);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else if (a<=c && b<d){\r\n if (a==c){\r\n return new Interval(a,b,p1==p3?p1:'(',p2);\r\n }else{\r\n return new Interval(c,b,p3,p2);\r\n }\r\n }else if(a<c && b==d){\r\n return new Interval(c,b,p3,p2==p4?p2:')');\r\n }else if(a<=c && b>d){\r\n if (a==c){\r\n return new Interval(a,d,p1==p3?p1:'(',p4);\r\n }else{\r\n return new Interval(in2);\r\n }\r\n }else if (a>c && b<=d){\r\n if (b==d){\r\n return new Interval(a,b,p1,p2==p4?p2:')');\r\n }else{\r\n return new Interval(in1);\r\n }\r\n }else if (a<=d && b>d){\r\n if (a==d){\r\n if (p1=='[' && p4==']'){\r\n return new Interval(a,a,p1,p4);\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }else{\r\n return new Interval(a,d,p1,p4);\r\n }\r\n }else{\r\n return new Interval(0,0,'(',')');\r\n }\r\n }", "public static int area_intersection(int blx1, int bly1, int trx1,int try1, int blx2, int bly2,int trx2,int try2){\r\n\t\tint base = 0, height = 0, area = 0;\r\n\t\r\n\t\tif (blx2>=blx1 && blx2<=trx1){\r\n\t\t\tif (bly2>=bly1 && bly2<=try1){\r\n\tif (trx2<=trx1 && trx2>=blx1){\r\n\tbase = trx2 - blx2;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\telse{\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tif( blx1>=blx2 && blx1<=trx2){\r\n\tbase = trx1 - blx1;\r\n\theight = try2 - bly2;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (blx1>=blx2 && blx1<=trx2){\r\n\t if( bly1>=bly2 && bly1<=try2){\r\n\tbase = trx1 - blx1;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t }\r\n\tif( trx2>=blx1 && trx2<=trx1){\r\n\tbase = trx2 - blx1;\r\n\theight = try2 - bly1;\r\n\tarea = base * height;\r\n\t}\r\n\t\t}\r\n\t//end\r\n\r\n\t\telse if (bly2>=bly1 && bly2<=try1){\r\n\tbase = trx1 - blx2;\r\n\theight = try1 - bly1;\r\n\tarea = base * height;\r\n\t\t}\r\n\t//end\r\n\r\n\t\t//else if(trx1 - blx2)==0 || (try1 - bly1)==0 || !(trx1>blx2 and trx2>trx1 && bly2<=bly1){\r\n\t//area = 0\r\n\t\t//}\r\n\t//end\r\n\t \r\n\t//if( area && area<=2147483647 )\r\n\t//area\r\n\t//else\r\n\t//-1\r\n\t//end\r\n\r\n\t\treturn area;\r\n\t}", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "private double getStartX() {\n\t\treturn Math.min(x1, x2);\n\t}", "static String kangaroo(int x1, int v1, int x2, int v2) {\n int x=x1-x2;\n int v=v2-v1;\n if(v!=0){\n if(x%v==0 && x/v>0){\n return \"YES\";\n }else {return \"NO\";}\n\n }else {return \"NO\";}\n\n }", "private void SearchCtes(){\n double d1=0.0;\n boolean elev=false;\n boolean c1=true;\n boolean c2=false;\n boolean c3=false;\n String A=\"\";\n String B=\"\";\n String C=\"\";\n int i=0;\n int j=0;\n while(this.Eq.charAt(i)!='=') {\n //j=i;\n if(this.Eq.charAt(i)=='+'||this.Eq.charAt(i)=='D'){\n i++;\n }\n if(this.Eq.charAt(i)=='^'){\n elev=true;\n i++;\n }\n if(this.Eq.charAt(i)=='2'&&elev) {//final do D^2\n if(A==\"\"){\n this.a=0.0;\n }else{\n this.a=Integer.parseInt(A);\n } \n elev=false; \n c1=false;\n c2=true;\n i++;\n }\n if(this.Eq.charAt(i)=='1'&&elev) {//final do D^1\n if(B==\"\"){\n this.b=0.0;\n }else{\n this.b=Integer.parseInt(B);\n } \n elev=false; \n c2=false;\n c3=true;\n i++;\n }\n if(c1&&!elev){\n A+=this.Eq.charAt(i);\n }\n if(c2&&!elev){\n B+=this.Eq.charAt(i);\n }\n if(c3&&!elev){\n C+=this.Eq.charAt(i);\n }\n i++;\n } \n if(C==\"\"){\n this.c=0.0;\n }else{\n this.c=Integer.parseInt(C);\n } \n }", "private String getDiabetesRange(int befMealValue, int aftMealValue) {\n String range=\"\";\n\n if(befMealValue<=69 && aftMealValue <= 100){\n range=\"low\";\n }\n else if((befMealValue>=70 && befMealValue<=130) && (aftMealValue <=180))\n {\n range=\"normal\";\n }\n else if(befMealValue>=131 && aftMealValue>=181){\n range=\"high\";\n }\n return range;\n }", "int test(S2Point a0, S2Point ab1, S2Point a2, S2Point b0, S2Point b2);", "public static void main(String[] args) {\n int[] test1 = {1};\n int[] test2 = {0, 10};\n int[] test3 = {1,3,6};\n SolutionSmallestRange1 solutionSmallestRange1 = new SolutionSmallestRange1();\n System.out.println(solutionSmallestRange1.smallestRangeI(test1, 0));\n System.out.println(solutionSmallestRange1.smallestRangeI(test2, 2));\n System.out.println(solutionSmallestRange1.smallestRangeI(test3, 3));\n \n\t}", "private boolean contains(int from1, int to1, int from2, int to2) {\n\t\treturn from2 >= from1 && to2 <= to1;\n\t}", "public static void main(String[] args) {\n double [][]x;\r\n int N,M,A,B,Imin;\r\n Scanner inp = new Scanner(System.in);\r\n System.out.print(\"N=\"); N=inp.nextInt();\r\n System.out.print(\"M=\"); M=inp.nextInt();\r\n System.out.print(\"A=\"); A=inp.nextInt();\r\n System.out.print(\"B=\"); B=inp.nextInt();\r\n x=new double[N][M];\r\n for (int i=0; i<N; i++)\r\n for (int j=0; j<M; j++)\r\n {\r\n System.out.print(\"x(\"+i+\",\"+j+\")=\");\r\n x[i][j]=inp.nextDouble();\r\n }\r\n inp.close();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n for (int j=0; j<M; j++)\r\n {Imin=0;\r\n for (int i=1; i<N; i++)\r\n {if (x[i][j]<x[Imin][j])\r\n\r\n Imin=i;\r\n System.out.println(\"Минимальный элемент в \" + j + \" столбце \" + \"x(\"+Imin+\",\"+j+\")=\" + x[Imin][j]);\r\n }\r\n if ((x[Imin][j]>=A)&&(x[Imin][j]<=B))\r\n System.out.println(j);\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n System.out.println(\"Номера столбцов, в которых минимальный элемент попадает в интервал от \" + A + \" до \" + B);\r\n\r\n\r\n\r\n }", "Condition between(QueryParameter parameter, Object x, Object y);", "@Override\n protected void doAlgorithmA1() {\n int xP = 0;\n int yP = 0;\n\n\n //Taking the variable out of the list that are in the bounds\n //Testing that the bound has variables\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n xP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX().getPosition();\n }\n int xU = 0;\n int xL = 0;\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n yP = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY().getPosition();\n }\n int yU = 0;\n int yL = 0;\n int cright = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCright();\n int cleft = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getCleft();\n\n\n\n for (Variable variable : csp.getVars()) {\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getX() != null) {\n if (variable.getPosition() == xP) {\n xU = variable.getUpperDomainBound();\n xL = variable.getLowerDomainBound();\n }\n }\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex).getY() != null) {\n if (variable.getPosition() == yP) {\n yU = variable.getUpperDomainBound();\n yL = variable.getLowerDomainBound();\n }\n }\n }\n\n boolean first = false;\n boolean second = false;\n\n //Testing if the bound is true, false or inconclusive\n\n if (xL + cleft >= yU + cright) {\n first = true;\n }\n if (xU + cleft < yL + cright) {\n second = true;\n }\n\n //are first and second not equal is the bound not inconclusive\n if (first != second) {\n if (first) { //a true Simple Bound was found\n //checks if it was the last constraint in a csp\n //If so the csp is true\n //else check the next constraint and do this method again\n if (csp.getSimpleConstraints().size() - 1 == cIndex) {\n System.out.println(\"P is satisfiable\");\n System.out.println(System.nanoTime()-startTime);\n return;\n } else {\n bIndex = 0;\n cIndex++;\n unit=false;\n doAlgorithmA1();\n }\n } else if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) { //a false Simple Bound was found\n //\n bIndex = 0;\n cIndex = 0;\n if (isInconclusive) {\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n doAlgorithmA2();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n } else {//an inconclusive Simple Bound was found\n //checks if the bound wasn't already inconclusive\n if(!isInconclusive){\n unit=true;\n unitSB = csp.getSimpleConstraints().get(cIndex).getSimpleBounds().get(bIndex);\n }else {\n unit=false;\n }\n isInconclusive = true;\n\n if (csp.getSimpleConstraints().get(cIndex).getSimpleBounds().size() - 1 == bIndex) {\n cIndex = 0;\n bIndex = 0;\n if(unit){\n doDeduction();\n }else {\n doAlgorithmA3();\n }\n } else {\n bIndex++;\n doAlgorithmA1();\n }\n }\n }", "public static void main(String[] args) {\n int i = 140;\n int j = 150;\n int k = 200;\n\n if (i>j){\n System.out.println(\"I is greater then J\");\n }\n else {\n System.out.println(\"I is Less then J \");\n }\n\n System.out.println(\"------------------------//Example of multiple conditions...---------------------------------------\");\n if (k>j){\n System.out.println(\"K is greater then J\");\n }\n else if (j==k){\n System.out.println(\"I is Equal to K\");\n }\n else {\n System.out.println(\"I is Less then to K \");\n }\n }", "private double intersect(double start0, double end0, double start1, double end1)\n {\n double length = Double.min(end0, end1) - Double.max(start0, start1);\n return Double.min(Double.max(0, length), 1.0);\n }", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=400.5;\n boolean aMin=a<b && a<c; //if a is less than both b and c,then is the minimum\n boolean bMin=b<a && b<c;//if b is less then booth a and c, then b is the minimum\n boolean cMin=c<a && c<b;//if\n if(aMin){\n System.out.println(a+\"is the minimum number\");}\n if(bMin){\n System.out.println(b+\"is the minimum number\");}\n if(cMin){\n System.out.println(c+\"is the minimum number\");}\n\n }", "static String catAndMouse(int x, int y, int z) {\nint PosCatA ;\nint PosCatB ;\nString wins = null;\nPosCatA = Math.abs(z-x);\nPosCatB = Math.abs(z-y);\nif(PosCatA > PosCatB)\n{\n wins = \"Cat B\";\n}\nif(PosCatB > PosCatA)\n{\n wins = \"Cat A\";\n}\nif ( PosCatA == PosCatB)\n{\n wins= \"Mouse C\";\n}\n return wins;\n }", "public void hitunganRule2(){\n penebaranBibitSedikit = 1200;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu Penebaran Bibit\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen Lama\r\n if ((hariPanenLama >=100) && (hariPanenLama <=180)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a2 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a2 = nPanen;\r\n }\r\n \r\n //tentukan Z2\r\n z2 = (penebaranBibitSedikit + hariPanenLama) * 700;\r\n System.out.println(\"a2 = \" + String.valueOf(a2));\r\n System.out.println(\"z2 = \" + String.valueOf(z2));\r\n }", "public static void ordIntercambio(int [] Grado1, int NNEstudent){\nint i,j;\nfor(i=0; i<NNEstudent-1; i++){\nfor(j=i+1; j<NNEstudent; j++){\nif(Grado1[i]> Grado1[j]){\nintercambiar(Grado1,i,j);\n}}}}", "public float getX2() {\r\n return (c + 2*b + 3*a)/3;\r\n }", "static int lcs(int x, int y, String s1, String s2)\n {\n // your code here\n \n int len1 = x;\n \n int len2 = y;\n \n int dp[][] = new int[len1+1][len2+1];\n \n for(int i=0;i<=len1;i++){\n dp[i][0] = 0;\n }\n \n for(int i=0;i<=len2;i++){\n dp[0][i] = 0;\n }\n \n for(int i=1;i<=len1;i++){\n for(int j=1;j<=len2;j++){\n \n if(s1.charAt(i-1)==s2.charAt(j-1)){\n dp[i][j]=1+dp[i-1][j-1];\n }\n else {\n dp[i][j] = Math.max(dp[i-1][j],dp[i][j-1]);\n }\n \n }\n }\n \n return dp[len1][len2];\n }", "public static void main(String[] args) {\n \n Scanner T = new Scanner(System.in); \n int a,b,c;\n \n System.out.println(\"Ingresa el valor de A\");\n a = T.nextInt();\n System.out.println(\"Ingresa el valor de B\");\n b = T.nextInt();\n System.out.println(\"Ingresa el valor de C\");\n c = T.nextInt();\n \n /*Comparacion mayor*/\n if(a > b && a > c){\n System.out.println(\"El mayor es A con \"+a);\n }else if(b > a && b > c){\n System.out.println(\"El mayor es B con \"+b);\n }else{\n System.out.println(\"El mayor es C con \"+c);\n }\n \n /*Comparacion intermedio*/\n if(a> b && a<c || a<b && a>c){\n System.out.println(\"El intermedio es A \"+a);\n }else if(b > a && b<c || b<a && b>c){\n System.out.println(\"El intermedio es B \"+b);\n }else{\n System.out.println(\"El intermedio es C \"+c);\n\n }\n \n /*Comparacion menor*/\n if(a < b && a < c){\n System.out.println(\"El menor es A con\"+a);\n }else if(b < a && b < c){\n System.out.println(\"El menor es B con\"+b);\n }else{\n System.out.println(\"El menor es C con\"+c);\n }\n \n }", "public double getXOverlap(double oldx1, double oldx2, double x1, double x2)\r\n {\r\n\r\n if (oldx1 > (this.x + width))\r\n {\r\n if (x1<(this.x + width))\r\n return (this.x + width)-x1;\r\n else\r\n return 0;\r\n }\r\n else\r\n {\r\n if (x2 > this.x)\r\n return this.x - x2;\r\n else\r\n return 0;\r\n\r\n }\r\n }", "private static int calcReturn(int x) {\n if ( x < 0 )\n return Expr.CMP_LESS ;\n if ( x > 0 )\n return Expr.CMP_GREATER ;\n return Expr.CMP_EQUAL ;\n }", "public Family(int x1, int x2){\n this.x1 = x1;\n this.x2 = x2;\n this.range = x2 - x1; // Number of doors occupied by the family\n }", "public void Ganhou() {\n\t\tString[] g = new String[10]; \n\t\tg[0] = m[0][0] + m[0][1] + m[0][2];\n\t\tg[1] = m[1][0] + m[1][1] + m[1][2];\n\t\tg[2] = m[2][0] + m[2][1] + m[2][2];\n\t\t\n\t\tg[3] = m[0][0] + m[1][0] + m[2][0];\n\t\tg[4] = m[0][1] + m[1][1] + m[2][1];\n\t\tg[5] = m[0][2] + m[1][2] + m[2][2];\n\t\t\n\t\tg[6] = m[0][0] + m[1][1] + m[2][2];\n\t\tg[7] = m[2][0] + m[1][1] + m[0][2];\n\t\tg[8] = \"0\";\n\t\tg[9] = \"0\";\n\t\t\n\t\tfor(int i= 0; i<10; i++) {\n\t\t\tif(g[i].equals(\"XXX\")){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"X GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\temp = 0; \n\t\t\t\tbreak;\n\t\t\t} else if (g[i].equals(\"OOO\")) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"O GANHOU\");\n\t\t\t\tacabou = true;\n\t\t\t\tbreak;\n\t\t\t} \n\t\t}\n\t\t\n\t\tif (emp == 9) {\n\t\t\tJOptionPane.showMessageDialog(null,\"EMPATOU\");\t\n\t\t\tacabou = true;\n\t\t}\n\t}", "int range(){\n return fuelcap*mpg;\n }", "public float getX1() {\r\n return (b + 3*a)/3;\r\n }", "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 }", "@Override\n\tpublic String visitCompexpr(CompexprContext ctx) {\n\t\t\n\t\tif(ctx.getChildCount()==3)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tif(ctx.getChild(1).getText().equals(\"==\"))\n\t\t\t{\n\t\t\t\treturn \"EQL \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\">=\"))\n\t\t\t{\n\t\t\t\treturn \"GTE \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\"<=\"))\n\t\t\t{\n\t\t\t\treturn \"LTE \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\"<\"))\n\t\t\t{\n\t\t\t\treturn \"LT \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\">\"))\n\t\t\t{\n\t\t\t\treturn \"GT \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t\telse if(ctx.getChild(1).getText().equals(\"~=\"))\n\t\t\t{\n\t\t\t\treturn \"NE \"+visit(ctx.getChild(0)) +\" \"+visit(ctx.getChild(2));\n\t\t\t}\n\t\t}\n\t\telse if(ctx.getChildCount()==1)\n\t\t{\n\t\t\n\t\t\treturn ctx.getChild(0).getText();\n\t\t}\n\t\treturn \"\";\n\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint k = 3;\n\t\t\n\t\tint max = Integer.MIN_VALUE, min = Integer.MAX_VALUE;\n\t\t\n\t\tint arr[] = new int[k];\n\t\t\n\t\tfor(int i = 0; i < k; i++) {\n\t\t\tif(max < arr[i])\n\t\t\t\tmax = arr[i];\n\t\t\tif(min > arr[i])\n\t\t\t\tmin = arr[i];\n\t\t}\n\t\t\n\t\t\n\t\tint [][] arr1 = {{3,8},{10,11},{1,3},{2,4}};\n\t\t\n\t\tSystem.out.println(selection(arr1));\n\t}", "private boolean isBetween(float a, float b, float c) {\n return b >= a ? c >= a && c <= b : c >= b && c <= a;\n }", "public static void main(String[] args) {\n\t\tint a[]={2,1,9,5,11,4,6,7,5};\r\n\t\tint min1=a[1],min2=a[0];\r\n\t\tfor(int i=0;i<a.length; i++)\r\n\t\t{\r\n\t\t\tif(a[i]<min1)\r\n\t\t\t{\r\n\t\t\t\tmin2=min1;\r\n\t\t\t\tmin1=a[i];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(a[i]<min2)\r\n\t\t\t\t{\r\n\t\t\t\t\tmin2=a[i];\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\tSystem.out.println(min2);\r\n\t\t\tSystem.out.println(min1);\r\n\t\t}", "public void hitunganRule3(){\n penebaranBibitBanyak = 1900;\r\n hariPanenSedang = 120;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang !=80) && (hariPanenSedang <=120)) {\r\n nPanen = (hariPanenSedang - 110) / (120 - 80);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a3 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a3 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z3 = (penebaranBibitBanyak + hariPanenSedang) * 150;\r\n System.out.println(\"a3 = \" + String.valueOf(a3));\r\n System.out.println(\"z3 = \" + String.valueOf(z3));\r\n }", "private boolean intersects(int from1, int to1, int from2, int to2) {\n\t\treturn from1 <= from2 && to1 >= from2 // (.[..)..] or (.[...]..)\n\t\t\t\t|| from1 >= from2 && from1 <= to2; // [.(..]..) or [..(..)..\n\t}", "protected <E> String OneDegreeHeuristics(CSP<E> csp, String var1, String var2){\r\n\t\tint x=0;\r\n\t\tint y=0;\r\n\t\tfor(Constraint i:csp.constraints) {\r\n\t\t\tList<String> constraint = i.getScope();\r\n\t\t\tfor(String j:constraint){\r\n\t\t\t\tif(j.equals(var1)) {\r\n\t\t\t\t\tx++;\r\n\t\t\t\t}\r\n\t\t\t\tif(j.equals(var2)) {\r\n\t\t\t\t\ty++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(x>y) {\r\n\t\t\treturn var1;\r\n\t\t}\r\n\t\treturn var2;\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Üçgen cizebilmek için 1.kenar uzunlugunu giriniz\");\n\t\tdouble num1 = scan.nextInt();\t\n\t\tSystem.out.println(\"Üçgen cizebilmek için 2.kenar uzunlugunu giriniz\");\n\t\tdouble num2 = scan.nextInt();\n\t\tSystem.out.println(\"Üçgen cizebilmek için 3.kenar uzunlugunu giriniz\");\n\t\tdouble num3 = scan.nextInt();\n\t\t\n\t\t\n\t\t\n\t\tif((num1+num2>num3 && num1-num2<num3) && (num2+num3>num1 && num2-num3<num1) && (num1+num3>num2 &&num1-num3<num2)) {\n\t\t\tif (num1==num2 && num2==num3) {\n\t\t\tSystem.out.println(\"Eskenar ücgen cizilebilir\");\n\t\t\t}else if(num1 == num2 || num2== num1 || num1==num3) {\n\t\t\t\tSystem.out.println(\"Ikizkenar ücgen cizilebilir\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Ucgen cizilebilir\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"Ucgen cizilemez\");\n\t\t}\n\t\t\n\t\t\n\t\tscan.close();\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t int a, b;\n\t int arr[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };\n\t int range[][]={{3,7}, {4,6}, {5,5}};\n\n\t for (int i = 0; i < range.length; i++){\n\t \t\n\t \ta = range[i][0];\n\t \tb = range[i][1];\n\n\t\t\tfor(int j = 0; j < (b-a)/2; j++){\n\t\t\t\tint temp = arr[a-1+j];\n\t\t\t\tarr[a-1+j] =arr[b-1-j]; \n\t\t\t\tarr[b-1-j] = temp;\n\t\t\t}\n\t }\n\n\t\tSystem.out.print (\"결과 : \"+\"[ \");\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++ ) {\n\t\t\tSystem.out.print (arr[i] + \" \" );\n\n\t\t}\n\t\tSystem.out.print (\"]\");\n\t}", "public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}", "public double adicao (double numero1, double numero2){\n\t}", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n Range range0 = Range.of((-1259L));\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1259L));\n long long0 = new Long((-1259L));\n range1.getEnd();\n Range range2 = range0.intersection(range1);\n List<Range> list0 = range2.split(255L);\n range2.complementFrom(list0);\n Range range3 = range1.asRange();\n String string0 = null;\n range3.intersection(range1);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range2.getEnd(range_CoordinateSystem1);\n // Undeclared exception!\n try { \n Range.parseRange(\"[ -1259 .. -1258 ]/SB\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // can not parse [ -1259 .. -1258 ]/SB into a Range\n //\n verifyException(\"org.jcvi.jillion.core.Range\", e);\n }\n }", "public int a(bzl ☃, bzg bzg1, int i, int j) {\r\n/* 13 */ if (i == -bzg1.a() && j == -bzg1.b() && bzg1.a() > -bzg1.c() && bzg1.a() <= 0 && bzg1.b() > -bzg1.d() && bzg1.b() <= 0) {\r\n/* 14 */ return 1;\r\n/* */ }\r\n/* */ \r\n/* 17 */ return (☃.a(10) == 0) ? 1 : bzy.c;\r\n/* */ }", "public boolean checkAcross() {\r\n\t\tif (p1[0] + p1[1] + p1[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[3] + p1[4] + p1[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[6] + p1[7] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[1] + p2[2] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[3] + p2[4] + p2[5] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[6] + p2[7] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\r\n\t\treturn false;\r\n\t}", "private double calcG(int a, int b) {\n return a % 2 == 0 && b % 2 == 0 ? 20 : a % 2 == 1 && b % 2 == 1 ? 1 : 5;\n }", "boolean inBetween(float a, float b, float c){\n\t\tif (a<b && b<c)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "private boolean processXRange()\n\t{\n\t\tint startRow=0,startCol=0,endRow=0,endCol=0;\n\t\t/**Used to tokenize the text received from the\n\t\tx axis value text field.*/\n\t\tStringTokenizer st=new StringTokenizer(xValue.getText(),\",:\");\n\t\ttry\n\t\t{\n\t\t\tif(!st.hasMoreTokens())\n\t\t\t\treturn false;\n\t\t\tstartRow=Integer.parseInt(st.nextToken());\n\n\t\t\tif(!st.hasMoreTokens())\n\t\t\t\treturn false;\n\t\t\tstartCol=Integer.parseInt(st.nextToken());\n\n\t\t\tif(!st.hasMoreTokens())\n\t\t\t\treturn false;\n\t\t\tendRow=Integer.parseInt(st.nextToken());\n\n\t\t\tif(!st.hasMoreTokens())\n\t\t\t\treturn false;\n\t\t\tendCol=Integer.parseInt(st.nextToken());\n\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t//System.out.println(startRow+\"--\"+startCol+\"--\"+endRow+\"--\"+endCol);\n\t\tif(startRow<0 || startCol<0 || endRow<0 || endCol<0)\n\t\t\treturn false;\n\t\tif(startRow!=endRow && startCol!=endCol)\n\t\t\treturn false;\n\t\tif(endRow>49||endCol>17)\n\t\t\treturn false;\n\t\tif(endRow<startRow)\n\t\t{\n\t\t\tint temp;\n\t\t\ttemp=endRow;\n\t\t\tendRow=startRow;\n\t\t\tstartRow=temp;\n\t\t}\n\t\telse if(endCol<startCol)\n\t\t{\n\t\t\tint temp;\n\t\t\ttemp=endCol;\n\t\t\tendCol=startCol;\n\t\t\tstartCol=temp;\n\t\t}\n\t\tif(startRow==endRow)\n\t\t{\n\t\t\txvalues=new String[endCol-startCol+2];\n\t\t\txvalues[0]=new String(\"YESVAL\");\n\t\t\tfor(int i=0;i<(endCol-startCol+1);i++)\n\t\t\t\txvalues[i+1]=new String(ws.data[startRow][startCol+i].toString());\n\t\t}\n\t\telse\n\t\t{\n\t\t\txvalues=new String[endRow-startRow+2];\n\t\t\txvalues[0]=new String(\"YESVAL\");\n\t\t\tfor(int i=0;i<(endRow-startRow+1);i++)\n\t\t\t\txvalues[i+1]=new String(ws.data[startRow+i][startCol].toString());\n\t\t}\n\t\treturn true;\n\t}", "private void stage1_2() {\n\n\t\tString s = \"E $:( 3E0 , 3E0 ) ( $:( 3E0 , 3E0 ) \";\n\n//\t s = SymbolicString.makeConcolicString(s);\n\t\tStringReader sr = new StringReader(s);\n\t\tSystem.out.println(s);\n\t\tFormula formula = new Formula(s);\n\t\tMap<String, Decimal> actual = formula.getVariableValues();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t//(20,10)(30,18)\n\t\tint x1=0,y1=10,x2,y2,i=0;\n\t\t\n\t\t/*System.out.print(\"Enter the X1 : \");\n\t\tx1 = sc.nextInt();\n\t\tSystem.out.print(\"Enter the Y1 : \");\n\t\ty1 = sc.nextInt();*/\n\t\t\n\t\t\n\t\t/*System.out.print(\"Enter the X2 : \");\n\t\tx2 = sc.nextInt();\n\t\tSystem.out.print(\"Enter the Y2 : \");\n\t\ty2 = sc.nextInt();\n\t\tint dellY, dellX;\n\t\tdellX =x2 - x1;\n\t\tdellY=y2 -y1;\n\t\tint dInitial, dNew, dellD;\n\t\tdInitial = 2*dellY - dellX;\n\t\tdNew = dInitial;\n\t\tdellD = 2*(dellY - dellX);\n\t\t\n//\t\tint a,b;\n\t\tSystem.out.println(\"Dell Of X : \"+dellX);\n\t\tSystem.out.println(\"Dell Of Y : \"+dellY);\n\t\tSystem.out.println(\"D initial : \"+dInitial);\n\t\tSystem.out.println(\"D new value : \"+dNew);\n\t\t*/\n\t\t\n\t\t\n\t\tint R = 1- 10;\n\t\tint pK =R;\n\t\tint pK1 =R;\n\t\t\n\t\tSystem.out.println(\"(index ) ( P_k ) ( P_k1 ) (X_k+1 ) ( Y_k+1 ) ( X , Y ) \");\n\t\tSystem.out.println();\n\t\t\n\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t//x++;\n\t\twhile(!(x1>=y1)) {\n\t\t\ti++;\n\t\t\t\n\t\t\t\n\t\t\tif(pK<0) {\n\t\t\t\tx1++;\n\t\t\t\tpK1 =pK + 2*x1 + 1;\n\t\t\t\t//System.out.println(\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1);\n\t\t\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"=\"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ty1--;\n\t\t\t\tx1++;\n\t\t\t\tpK1 = pK + 2*x1 + 1 - 2*y1;\n\t\t\t\t//System.out.println(\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"-\"+2*y1);\n\t\t\t\tSystem.out.println(\" \"+i+\" \"+pK+\" \"+\"pK1= \"+pK+\" + \"+2*x1+\"+\"+1+\"=\"+pK1+\" \"+2*x1+\" \"+2*y1+\" (\"+x1+\",\"+y1+\")\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tpK = pK1;\n\t\t\t\n\t\t\t\n\t\t}\n\n\t}", "public int[] choisir(int[] coord)\r\n {\r\n int[] res = new int[3]; //tableau a rendre\r\n int x = coord[0];\r\n int y = coord[1]; //récupération des coordonnées\r\n int[] voisinage= new int[4]; //tableau qui regardera les cases adjacentes à la case cherchée\r\n voisinage[0] = getValHaut(x,y);\r\n voisinage[1] = getValDroite(x,y);\r\n voisinage[2] = getValBas(x,y);\r\n voisinage[3] = getValGauche(x,y);\r\n System.out.println(\"je choisis la case \"+x+\" \"+y+\"\");\r\n for(int i = 0; i<voisinage.length; i++ ) //parcours des possibilités si on joue sans créer d'opportunités adverses\r\n {\r\n if (Vision[x][y][i+1] == 0) //si il n'y a pas de trait déja tracé\r\n {\r\n if (voisinage[i] != 2) //si la case adjacente n'a pas déja deux traits dessinés\r\n {\r\n switch (i) //switch pour réagir selon la case a jouer\r\n {\r\n case 0:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n\r\n case 1:\r\n res[0]=x+1;\r\n res[1]=y;\r\n break;\r\n\r\n case 2:\r\n res[0]=x;\r\n res[1]=y+1;\r\n break;\r\n\r\n case 3:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n }\r\n //fin du switch sur i\r\n\r\n res[2]=i%2;\r\n return res;\r\n }\r\n //fin du si la case adjacente a déja 2 traits dessinés\r\n }\r\n //si il n'y a pas de trait déja tracé\r\n }\r\n //fin du for de parcours des possibilités de jouers sans créer d'opportunités adverses\r\n\r\n for(int i=0; i<voisinage.length ; i++ ) //Parcours des possibilités sans recherche d'opportunités\r\n {\r\n if (Vision[x][y][i+1] == 0) {\r\n switch (i) //switch pour réagir selon la case a jouer\r\n {\r\n case 0:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n\r\n case 1:\r\n res[0]=x+1;\r\n res[1]=y;\r\n break;\r\n\r\n case 2:\r\n res[0]=x;\r\n res[1]=y+1;\r\n break;\r\n\r\n case 3:\r\n res[0]=x;\r\n res[1]=y;\r\n break;\r\n }\r\n //fin du switch sur i\r\n\r\n res[2]=i%2;\r\n return res;\r\n }\r\n }\r\n //fin du parcours de possibilité sans recherche\r\n return tabVide;\r\n }", "protected boolean getSomething(int par1, int par2, int par3, int par4, int x, int y)\r\n {\r\n int var7 = this.guiLeft;\r\n int var8 = this.guiTop;\r\n x -= var7;\r\n y -= var8;\r\n return x >= par1 - 1 && x < par1 + par3 + 1 && y >= par2 - 1 && y < par2 + par4 + 1;\r\n }", "private static String cal(int x, int y) {\n\t\tint max =0;\n\t\tif(Math.abs((int)x) > Math.abs((int)y)) max= Math.abs((int)x);\n\t\telse max = Math.abs((int)y);\n\t\t\n\t\tint max_code= max;\n\t\tmax = 2*max+1;\n\t\t\n\t\tint n = max;\n\t\tmax = (int)Math.pow((double)max, (double)2);\n\t\t\n\t\tint start = max;\n\t\tint res;\n\t\t\n\t\t\n\t\tif( x==max_code && y>-max_code){\n\t\tres = start-(max_code-y);\n\t\t}\n\t\telse if(y == -max_code && y<max_code) {\n\t\t\tstart -=(n-1);\n\t\t\tres = start-(max_code-x);\n\t\t}\n\t\telse if(x ==-max_code && y<max_code) {\n\t\t\tstart -=2*(n-1);\n\t\t\tres = start -(max_code+y);\n\t\t}\n\t\telse {\n\t\t\tstart-=3*(n-1);\n\t\t\tres = start - (max_code+x);\n\t\t}\n\tint unit =0, temp=res;\n\twhile(true) {\n\t\ttemp /=10;\n\t\tunit++;\n\t\tif(temp ==0)break;\n\t}\n\tString res_st = Integer.toString(res);\n\tfor(int i=0; i<max_unit-unit; i++) {\n\t\tres_st = \" \"+res_st;\n\t}\n\t\t\n\t\t\n\t\treturn res_st;\n\t}", "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d사이에있는 2는 2칸 띄어쓰기 %d는 정수형\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean columnFitsIn(int x1, int x2){\n return x1 < columnBoundaryX1+(AVGCharDistance/2)&&x2>columnBoundaryX2-(AVGCharDistance/2);\n }", "public void searchByRange(Integer currentLine, int k1, int k2) {\r\n\t\t//Check if user typed values k1>k2 and swap if needed\r\n\t\tif(k1>k2) {\r\n\t\t\t//Temporary variable for storing k1 value\r\n\t\t\tint temp=k1;\r\n\t\t\t//Swap values of k1 & k2\r\n\t\t\tk1=k2;\r\n\t\t\tk2=temp;\r\n\t\t}\r\n\t\t//Base case\r\n\t\tif(increaseCompares() && currentLine==-1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//Recurse for left subtree first\r\n\t\tif(increaseCompares() && k1<getKey(currentLine)) {\r\n\t\t\tsearchByRange(getLeft(currentLine),k1,k2);\r\n\t\t}\r\n\t\t//If node's data lies in range, then print data\r\n\t\tif(increaseCompares() && (k1<=getKey(currentLine) && k2>=getKey(currentLine))) {\r\n\t\t\tSystem.out.print(getKey(currentLine)+ \",\");\r\n\t\t}\r\n\t\t//Recurse for right subtree\r\n\t\tif(increaseCompares() && k2>getKey(currentLine)) {\r\n\t\t\tsearchByRange(getRight(currentLine),k1,k2);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint x=5, y=10;\n\t\t\n\t\tx=x+y;\n\t\ty=x-y;\n\t\tx=x-y;\n\t\t\n\t\tSystem.out.println(\"x = \"+x+\" and y = \"+y);\n\t\t\n\t\t\n\t\tString a=\"Sabeen\", b=\"Sadiq\";\n\t\t\n\t\t\n\t\t\n\n\t}", "@Test\n public void test81() throws Throwable {\n Line2D.Double line2D_Double0 = new Line2D.Double(228.0, 0.0, 228.0, 0.0);\n LogAxis logAxis0 = new LogAxis(\"8dVi7isYx7'@IN\");\n CombinedRangeCategoryPlot combinedRangeCategoryPlot0 = new CombinedRangeCategoryPlot((ValueAxis) logAxis0);\n combinedRangeCategoryPlot0.setAnchorValue((-725.5571138));\n }", "public static String xIntercepts(double a, double b, double c) {\n\t\tdouble root1 = (\t(-1*b)\t+\t(sqrt\t( exponent(b, 2)\t-(4*a*c)\t)))\t/2*a;\r\n\t\tdouble root2 = (\t(-1*b)\t-\t(sqrt\t( exponent(b, 2)\t-(4*a*c)\t)))\t/2*a;\r\n\t\tif (root1 == root2) { \r\n\t\t\treturn (root1+\"\");\r\n\t\t}\r\n\t\telse return (root1 +\" and \"+root2);\r\n\t}", "public static String distance(String x1, String x2){\n\n }", "private static String lettre2Chiffre1(String n) {\n\t\tString c= new String() ;\n\t\tswitch(n) {\n\t\tcase \"A\": case \"J\":\n\t\t\tc=\"1\";\n\t\t\treturn c;\n\t\tcase \"B\": case \"K\": case \"S\":\n\t\t\tc=\"2\";\n\t\t\treturn c;\n\t\tcase \"C\": case\"L\": case \"T\":\n\t\t\tc=\"3\";\n\t\t\treturn c;\n\t\tcase \"D\": case \"M\": case \"U\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\tcase \"E\": case \"N\": case \"V\":\n\t\t\tc=\"5\";\n\t\t\treturn c;\n\t\tcase \"F\": case \"O\": case \"W\":\n\t\t\tc=\"6\";\n\t\t\treturn c;\n\t\tcase \"G\": case \"P\": case \"X\":\n\t\t\tc=\"7\";\n\t\t\treturn c;\n\t\tcase \"H\": case \"Q\": case \"Y\":\n\t\t\tc=\"8\";\n\t\t\treturn c;\n\t\tcase \"I\": case \"R\": case \"Z\":\n\t\t\tc=\"4\";\n\t\t\treturn c;\n\t\t\t\n\t\t}\n\t\treturn c;\n\t\t\n\t\n\t\t}", "public Snippet visit(GreaterThanEqualExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t\t Snippet f0 = n.identifier.accept(this, argu);\n\t\t n.nodeToken.accept(this, argu);\n\t\t Snippet f2 = n.identifier1.accept(this, argu);\n\t\t _ret.returnTemp = f0.returnTemp+\" >= \"+f2.returnTemp;\n\t return _ret;\n\t }", "public void speedRange1()\n\t{\n\t\trange = (gen.nextInt(upper1 - lower1)+1) + lower1;\n\t\tspeedBalloonY1 = range;\n\t}", "public static void main(String[] args) {\n var equacaoUm = (Math.pow(((3+2)*6), 2) / (3*2));\n var equacaoDois = Math.pow(((1-5)*(2-7)) / 2, 2);\n var equacaoSuperiorPotencializada = Math.pow((equacaoUm - equacaoDois), 3);\n var equacaoGeral = equacaoSuperiorPotencializada / Math.pow(10, 3);\n\n System.out.println(\"Resultado Equação 1: \" + equacaoUm);\n System.out.println(\"Resultado Equação 2: \" + equacaoDois);\n System.out.println(\"Resultado da Equação e Potencialização Superior: \" + equacaoSuperiorPotencializada);\n System.out.println(\"O resultado é: \" + equacaoGeral);\n }", "void calculateRange() {\n //TODO: See Rules\n }", "public static void main(String[] args) {\n\t\ttriangulo x,y;\n\t\tx = new triangulo();\n\t\ty = new triangulo();\n\t\tLocale.setDefault(Locale.US);\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Digite as medidas Triangulo X\");\n\t\tx.a = sc.nextDouble();\n\t\tx.b = sc.nextDouble();\n\t\tx.c = sc.nextDouble();\n\t\tSystem.out.println(\"Digite as medidas Triangulo Y\");\n\t\ty.a = sc.nextDouble();\n\t\ty.b = sc.nextDouble();\n\t\ty.c = sc.nextDouble();\n\t\t// Area do Triangulo X\n\t\tdouble areax = x.area();\n\t\t// Area do Triangulo Y\n\t\tdouble areay = y.area();\n\t\t\n\t\tSystem.out.printf(\"Triangulo X %.4f %n\",areax);\n\t\tSystem.out.printf(\"Triangulo Y %.4f %n\",areay);\n\t\t\n\t\tif (areax > areay) {\n\t\t\tSystem.out.printf(\"Maior Area é a X %.4f\", areax);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"Maior Area é a Y %.4f\" , areay);\n\t\t}\n\t\tsc.close();\n\t}", "@Test\n public void overweightCategoryFirstRangeInKgAndCm() {\n\n driver.findElement(By.xpath(\"//input[@name='wg']\")).sendKeys(\"85.6\");\n driver.findElement(By.xpath(\"//input[@name='ht']\")).sendKeys(\"185\");\n driver.findElement(By.xpath(\"//input[@name='cc']\")).click();\n Assert.assertEquals(driver.findElement(By.name(\"desc\")).getAttribute(\"value\"), \"Your category is Overweight\",\n \"actual text is not: Your category is Overweight\");\n }", "static String[] cavityMap(String[] grid) {\r\n \tString[] ret = new String[grid.length];\r\n \t\r\n \tfor (int i = 0; i < grid.length; i++) {\r\n \t\tif (i == 0 || i == grid.length-1) { //first or last row\r\n \t\t\tret[i] = grid[i];\r\n \t\t} else {\r\n \t\t\tchar[] beforeRow = grid[i-1].toCharArray();\r\n \t\t\tchar[] actualRow = grid[i].toCharArray();\r\n \t\t\tchar[] nextRow = grid[i+1].toCharArray();\r\n \t\t\tfor (int j = 0; j < actualRow.length; j++) {\r\n \t\t\t\tif (j > 0 && j < actualRow.length -1) {\r\n \t\t\t\t\tint upper = Character.getNumericValue(beforeRow[j]);\r\n \t\t\t\t\tint lower = Character.getNumericValue(nextRow[j]);\r\n \t\t\t\t\tint left = Character.getNumericValue(actualRow[j-1]);\r\n \t\t\t\t\tint right = Character.getNumericValue(actualRow[j+1]);\r\n \t\t\t\t\tint actual = Character.getNumericValue(actualRow[j]);\r\n \t\t\t\t\tif (actual > upper && actual > lower && actual > left && actual > right) {\r\n \t\t\t\t\t\tactualRow[j] = 'X';\r\n \t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t}\r\n \t\t\t\tif (ret[i] == null)\r\n \t\t\t\t\tret[i] = actualRow[j]+\"\";\r\n \t\t\t\telse\r\n \t\t\t\t\tret[i] = ret[i]+actualRow[j];\r\n \t\t\t}\r\n \t\t} \t\t\r\n \t}\r\n \t\r\n \treturn ret;\r\n }", "static void computeLCS(String x, String y,int m, int n,int[][] c,char[][] b) {\n \r\n\t\tfor (int i = 0; i <= m; i++) {\r\n\t\t\tfor (int j = 0; j <= n; j++) {\r\n\t\t\t\tc[i][j]=0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 1; i <= m; i++) {\r\n\t\t\tfor (int j = 1; j <= n; j++) {\r\n\t\t\t\tif(x.charAt(i-1) == y.charAt(j-1)) {\r\n\t\t\t\t\tc[i][j]=c[i-1][j-1]+1;\r\n\t\t\t\t\tb[i][j]='/';\r\n\t\t\t\t}\r\n\t\t\t\telse if(c[i-1][j] >= c[i][j-1]) {\r\n\t\t\t\t\tc[i][j]=c[i-1][j];\r\n\t\t\t\t\tb[i][j]='|';\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tc[i][j]=c[i][j-1];\r\n\t\t\t\t\tb[i][j]='-';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n//\t\tfor (int i = 0; i <= m; i++) {\r\n//\t\t\tfor (int j = 0; j <= n; j++) {\r\n//\t\t\t\tSystem.out.print(c[i][j]);\r\n//\t\t\t}\r\n//\t\t\tSystem.out.println();\r\n//\t\t}\r\n \r\n\t}", "private int calculateAce(int startValue, int aces) {\n\t\tif (aces ==0) {\n\t\t\treturn 0;\n\t\t}\n\t\tint value = startValue;\n\t\t\n\t\t\tif (value + 11 > 21) {\n\t\t\t\treturn aces;\n\t\t\t} else {\n\t\t\t\treturn 10 + aces;\n\t\t\t}\n\t\t\t\n\t}", "private static String[] assertCondition(String c,int andGroupNo) throws Exception {\n\t\tif (c.trim().equals(\"\")) return new String[0];\n\t\tString h=\"(?<=[\\\\d\\\\w '\\\"])\",t=\"(?=[\\\\d\\\\w '\\\"])\";\n\t\tPattern lessThen=Pattern.compile(h+\"<\"+t),greaterThen=Pattern.compile(h+\">\"+t)\n\t\t\t\t,unequal=Pattern.compile(h+\"\\\\(<>|!=\\\\)\"+t),equal=Pattern.compile(h+\"=\"+t)\n\t\t\t\t,lessEqual=Pattern.compile(h+\"<=\"+t),greaterEqual=Pattern.compile(h+\">=\"+t);\n\t\tint lt=matchCounter(lessThen.matcher(c))\n\t\t\t\t,le=matchCounter(lessEqual.matcher(c))\n\t\t\t\t,gt=matchCounter(greaterThen.matcher(c))\n\t\t\t\t,ge=matchCounter(greaterEqual.matcher(c))\n\t\t\t\t,eq=matchCounter(equal.matcher(c))\n\t\t\t\t,ue = matchCounter(unequal.matcher(c));\n\t\tif((lt+le+ge+gt+eq+ue)==1) {\n\t\t\tString[] res= new String[4],vars=c.split(h+\"=|=|!=|<=|>=|<>|>|<\"+t);\n\t\t\tif (lt==1){ res[0]=\"<\";res[1]=vars[0].trim();res[2]=vars[1].trim();}\n\t\t\tif (le==1){ res[0]=\"<=\";res[1]=vars[0].trim();res[2]=vars[1].trim();}\n\t\t\tif (gt==1){ res[0]=\">\";res[1]=vars[0].trim();res[2]=vars[1].trim();}\n\t\t\tif (ge==1){ res[0]=\">=\";res[1]=vars[0].trim();res[2]=vars[1].trim();}\n\t\t\tif (eq==1){ res[0]=\"=\";res[1]=vars[0].trim();res[2]=vars[1].trim();}\n\t\t\tif (ue==1){ res[0]=\"!=\";res[1]=vars[0].trim();res[2]=vars[1].trim();}\n\t\t\tres[3]= String.valueOf(andGroupNo);\n\t\t\treturn res;\n\t\t}\n\t\telse throw new Exception(\"Can't determine the condition\");\n\t}", "private static boolean checkOccurrenceRange(int min1, int max1, int min2, int max2) {\n/* 1159 */ if (min1 >= min2 && (max2 == -1 || (max1 != -1 && max1 <= max2)))\n/* */ {\n/* */ \n/* 1162 */ return true;\n/* */ }\n/* 1164 */ return false;\n/* */ }", "public static void main(String[] args) {\n\t\t\n\t\tint x = 13;\n\t\tint y = 15;\n\t\tint z = 12;\n\t\t\n/*\t\tif(x>y && x>z) {\n\t\t}\n\t\t\n\t\tif (y>x && y>z) {\n\t\t}\n\t\t\n\t\tif(z>x && z>y) {\n\t\t}*/\n\t\t\n\t\t\n\t\tif(x>y && x>z) {\n\t\t\tSystem.out.println(\"X is greater\");\n\t\t}\n\t\telse if(y>z) {\n\t\t\tSystem.out.println(\"Y is greater\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Z is greater\");\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\r\n\t\t\r\n\t\tList<Range> ranges = new ArrayList<Range>();\r\n\t\tRange range1 = new Range(5,8);\r\n\t\tranges.add(range1);\r\n\t\t\r\n\t\tRange range2 = new Range(10,12);\r\n\t\tranges.add(range2);\r\n\t\t\r\n\t\tRange range3 = new Range(1,6);\r\n\t\tranges.add(range3);\r\n\t\t\r\n\t\tMultipleGroups multiple1 = new MultipleGroups(ranges);\r\n\t\t\r\n\t\tSystem.out.println(multiple1.contains(2));\r\n\t\tSystem.out.println(multiple1.contains(9));\r\n\t\tSystem.out.println(multiple1.contains(6));\r\n\r\n\t}", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }", "private boolean isInRange(int a, int b, int c) {\n return c >= a ;\n }", "private int annaEtaisyys(int x1, int y1, int x2, int y2)\n\t{\n\t\tdouble a = x1 - x2;\n\t\tdouble b = y1 - y2;\n\t\t\n\t\treturn (int) Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n\t}", "public Course(String c, String g, String g2){\n raw = c;\n for(int x = 0; x < raw.length(); x++){\n if(x > 5){\n if(raw.charAt(x) == 't' && raw.charAt(x-1) == 'e' && raw.charAt(x-2) == 'D'){\n cname = raw.substring(0, x-4);\n break;\n }\n }\n }\n\n for(int x = 0; x < g.length(); x++){\n if(g.charAt(x) == ' '){\n grade1 = g.substring(0,x);\n }\n }\n for(int x = 0; x < g2.length(); x++){\n if(g2.charAt(x) == ' '){\n grade1 = g.substring(0,x);\n }\n }\n System.out.println(\"grade1 : \" + grade1);\n System.out.println(\"grade2 : \" + grade2);\n cClassify();\n gpaCalc(grade1, 1);\n gpaCalc(grade2, 2);\n\n }", "public static String chajara(int x1, int y1,String in){\n x=x1;\n y=y1;\n //converts string to array\n String[] input = new String[x*y];\n for (int i = 0; i < input.length; i++) {\n input[i]=in.substring(i,i+1);\n }\n\n return convert(calculate(input));\n }", "static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}", "public static void main(String[] args) throws Exception{\n Scanner scan = new Scanner(System.in);\n //DecimalFormat form = new DecimalFormat(\"0.000\");\n \n int n = scan.nextInt();\n for(int i = 0; i < n; i++)\n {\n int nAnt = scan.nextInt();\n double xMax = -1000;\n double xMin = 1000;\n double yMax = -1000;\n double yMin = 1000;\n for(int j = 0; j < nAnt; j++)\n {\n double x = scan.nextDouble();\n double y = scan.nextDouble();\n if(x > xMax)\n xMax = x;\n if(x < xMin)\n xMin = x;\n if(y > yMax)\n yMax = y;\n if(y < yMin)\n yMin = y;\n }\n double xLen = xMax - xMin;\n double yLen = yMax - yMin;\n String area = \"\"+(xLen * yLen);\n String per = \"\"+(xLen * 2 + yLen * 2);\n System.out.println(\"Case \"+(i+1)+\": Area \"+area+\", Perimeter \"+per);\n }\n System.exit(0);\n }", "public static void main(String[] args) {\n\t\t int a[][]= {{2,4,5},{3,0,7},{1,2,9}}; //then identify colomn of min num \n\t\t\tint min=a[0][0];//i.e 2 //find max num in identified colomn\n int mincolomnNo = 0; \n\t\t\t\n\t\t for(int i=0;i<3;i++)\n\t\t {\n\t\t\t for(int j=0;j<3;j++)\n\t\t\t {\n\t\t\t\t \n\t\t\t\t\t if(a[i][j]<min)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t min =a[i][j];//swap\n\t\t\t\t\t\t mincolomnNo=j;\n\t\t\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t \n\t\t }//here o/p is zero\n\t\t System.out.println(min);\n\t\t \n\t\t int max=a[0][mincolomnNo];\n\t\t int k=0;\n\t\t while(k<3)\n\t\t {\n\t\t\t if(a[k][mincolomnNo]>max)\n\t\t\t {\n\t\t\t\t max=a[k][mincolomnNo];\n\t\t\t }\n\t\t\t k++;\n\t\t }\n\t\t \n\t\t \n\t\t System.out.println(max);\n\t\t }", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "public static void main(String[] args) {\n\t\tint a = Integer.parseInt(args[0]);\n\t\tint c = Integer.parseInt(args[1]);\n\t\tint m = Integer.parseInt(args[2]);\n\t\tint x0 = Integer.parseInt(args[3]);\n\t\tint n = Integer.parseInt(args[4]);\n\n\t\t// conditions 1, 2, and 3 as defined in header comment\n\t\tboolean condition1 = (a > 0 && c > 0);\n\t\tboolean condition2 = (a < m && c < m && x0 < m);\n\t\tboolean condition3 = gcd(c, m) == 1;\n\n\t\t// with conditions checked, and since x % y = x % (-y)\n\t\t// under java's modulus operator, we will take the\n\t\t// absolute value of m to prevent any possible\n\t\t// exceptions resulting from negative values for m\n\t\tif (m < 0) {\n\t\t\tm *= -1;\n\t\t}\n\n\t\t// create 10 buckets to tally the LCF's distribution\n\t\t// each bucket is initialized to 0\n\t\tint[] distribution = new int[10];\n\n\t\t// find distribution\n\t\tint x = x0; // function initial value\n\t\tfor (int i = 1; i <= n; i++) {\n\t\t\tx = (a * x + c) % m; // x has value x_i\n\n\t\t\t// since we want outputs from 0 to m-1\n\t\t\t// inclusive, and since java's modulus\n\t\t\t// operator produces negative output only\n\t\t\t// when the dividend is negative, and since\n\t\t\t// negative values for x_0 are acceptable;\n\t\t\t// we must perform negative checks on x\n\t\t\tif (x < 0) { // -m < x < 0\n\t\t\t\tx += m; // 0 < x < m\n\t\t\t}\n\n\t\t\t// find bucket for this x\n\t\t\tint bucket = 9;\n\n\t\t\t// since x < m, 10x < 10m\n\t\t\t// in this way, each bucket has a range\n\t\t\t// differing by at most 1 from each other\n\t\t\t// bucket\n\t\t\twhile (10 * x < bucket * m) {\n\t\t\t\tbucket--;\n\t\t\t}\n\t\t\t// increment count for the bucket of this x\n\t\t\tdistribution[bucket]++;\n\t\t}\n\n\t\t// calculate V as defined in header comment\n\t\tdouble v = pearsonChiSquare(distribution, n);\n\n\t\t// assemble output\n\t\tString output = \"\";\n\n\t\t// report condition check results\n\t\tif (condition1 && condition2 && condition3) {\n\t\t\toutput += \"Conditions satisfied\";\n\t\t} else { // at least one condition not satisfied\n\t\t\tif (!condition1) {\n\t\t\t\toutput += \"Condition 1 not satisfied\";\n\t\t\t}\n\n\t\t\tif (!condition2) {\n\t\t\t\t// check if line break needed\n\t\t\t\tif (!condition1) {\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\n\t\t\t\toutput += \"Condition 2 not satisfied\";\n\t\t\t}\n\n\t\t\tif (!condition3) {\n\t\t\t\t// check if line break needed\n\t\t\t\tif (!(condition1 && condition2)) {\n\t\t\t\t\toutput += \"\\n\";\n\t\t\t\t}\n\n\t\t\t\toutput+= \"Condition 3 not satisfied\";\n\t\t\t}\n\t\t}\n\n\n\t\t// report V and decide function suitability\n\n\t\t// format V\n\t\tDecimalFormat fourPlaces = new DecimalFormat(\"0.0000\");\n\t\toutput += \"\\nV = \" + fourPlaces.format(v) + \"; \";\n\n\t\t// report conclusion\n\t\toutput += \"this function is \";\n\t\tif (v >= 3.325 && v <= 16.92) {\n\t\t\toutput += \"ok\";\n\t\t} else if (v >= 2.088 && v <= 21.67) {\n\t\t\toutput += \"suspicious\";\n\t\t} else {\n\t\t\toutput += \"rejected\";\n\t\t}\n\n\t\t// print report to standard output\n\t\tSystem.out.println(output);\n\t}", "@Test\n public void testBetween1() throws Exception {\n String sql = \"SELECT a from db.g where a BETWEEN 1000 AND 2000\";\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 verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node criteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, BetweenCriteria.ID);\n verifyElementSymbol(criteriaNode, BetweenCriteria.EXPRESSION_REF_NAME, \"a\");\n verifyConstant(criteriaNode, BetweenCriteria.LOWER_EXPRESSION_REF_NAME, 1000);\n verifyConstant(criteriaNode, BetweenCriteria.UPPER_EXPRESSION_REF_NAME, 2000);\n \n verifySql(\"SELECT a FROM db.g WHERE a BETWEEN 1000 AND 2000\", fileNode);\n }", "public void findDirX(double x1, double x2){\r\n\t\tif((x1-x2)>0){\r\n\t\t\t//se la x del primo pianeta Ŕ > della x del secondo il pianeta dovrÓ decrementare la propria x per avvicinarcisi\r\n\t\t\tthis.dirX=\"-\";\r\n\t\t}else{\r\n\t\t\tthis.dirX=\"+\";\r\n\t\t}\r\n\t}", "private static void checkFromToBounds(int paramInt1, int paramInt2, int paramInt3) {\n/* 386 */ if (paramInt2 > paramInt3) {\n/* 387 */ throw new ArrayIndexOutOfBoundsException(\"origin(\" + paramInt2 + \") > fence(\" + paramInt3 + \")\");\n/* */ }\n/* */ \n/* 390 */ if (paramInt2 < 0) {\n/* 391 */ throw new ArrayIndexOutOfBoundsException(paramInt2);\n/* */ }\n/* 393 */ if (paramInt3 > paramInt1) {\n/* 394 */ throw new ArrayIndexOutOfBoundsException(paramInt3);\n/* */ }\n/* */ }", "private int firstB(String fa)\n{\n Calendar cal=new GregorianCalendar();\n int y1=(cal.get(Calendar.YEAR)%2000)/10;\n int y2=(cal.get(Calendar.YEAR)%2000)%10;\n int flag1=0,flag2=0,flag3=0;\n String temp1=\"\"+fa.charAt(0);\n String temp2=\"\"+fa.charAt(1);\n String temp3=\"\"+fa.charAt(2);\n if(temp1.equalsIgnoreCase(String.valueOf(y1)))\n {\n flag1=1;\n }\n if(temp2.equalsIgnoreCase(\"F\") || temp2.equalsIgnoreCase(\"U\")|| temp2.equalsIgnoreCase(\"K\"))\n {\n flag2=1;\n }\n if(temp3.equalsIgnoreCase(\"\"+y2))\n {\n flag3=1;\n }\n if(flag1+flag2+flag3==3){\n return 1;\n }\n else{\n return 0;\n }\n \n}", "public static void main(String[] args) {\n int result=sumavg(50,50,49);\n if (result>70)\n \tSystem.out.println(\"grade1\");\n else if (result>=50) System.out.println(\"GradeII\");\n else System.out.println(\"GradeIII\");\n \n\t}", "@Test\n\tpublic void testRomeTaxiRangeTupleBuilder3() throws ParseException {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ROME_TAXI_RANGE);\n\n\t\ttupleBuilder.setPadding(1.0);\n\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ROME_TAXI_2, \"1\");\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ROME_TAXI_1, \"1\");\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNotNull(tuple2);\n\t\tAssert.assertEquals(Integer.toString(1), tuple2.getKey());\n\n\t\tfinal Hyperrectangle exptectedBox = new Hyperrectangle(1388790007027d, 1388790009029d,\n\t\t\t\t40.91924450823211, 42.92924450823211,\n\t\t\t\t11.5027184734508, 15.5527184734508);\n\n\t\tAssert.assertEquals(exptectedBox, tuple2.getBoundingBox());\n\t}", "public void hitunganRule4(){\n penebaranBibitBanyak = 1900;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenLama >=80) && (hariPanenLama <=120)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a4 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a4 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z4 = (penebaranBibitBanyak + hariPanenLama) * 500;\r\n System.out.println(\"a4 = \" + String.valueOf(a4));\r\n System.out.println(\"z4 = \" + String.valueOf(z4));\r\n }", "public void speedRange3()\n\t{\n\t\trange = (gen.nextInt(upper3 - lower3)+1) + lower3;\n\t\tspeedBalloonY3 = range;\n\t}", "public void compute2() {\n\n ILineString lsInitiale = this.geom;\n ILineString lsLisse = Operateurs.resampling(lsInitiale, 1);\n // ILineString lsLisse = GaussianFilter.gaussianFilter(lsInitiale, 10, 1);\n // ILineString\n // lsLisse=LissageGaussian.AppliquerLissageGaussien((GM_LineString)\n // lsInitiale, 10, 1, false);\n\n logger.debug(\"Gaussian Smoothing of : \" + lsInitiale);\n\n // On determine les séquences de virages\n List<Integer> listSequence = determineSequences(lsLisse);\n\n // On applique le filtre gaussien\n\n // On crée une collection de points qui servira à découper tous les\n // virages\n\n if (listSequence.size() > 0) {\n List<Integer> listSequenceFiltre = filtrageSequences(listSequence, 1);\n DirectPositionList dplPointsInflexionLsLissee = determinePointsInflexion(\n lsInitiale, listSequenceFiltre);\n\n for (IDirectPosition directPosition : dplPointsInflexionLsLissee) {\n this.jddPtsInflexion.add(directPosition.toGM_Point().getPosition());\n // dplPtsInflexionVirages.add(directPosition);\n }\n\n // jddPtsInflexion.addAll(jddPtsInflexionLsInitiale);\n\n }\n // dplPtsInflexionVirages.add(lsInitiale.coord().get(lsInitiale.coord().size()-1));\n\n }", "private static void checkMapAndSum(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1413 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1414 */ throw new XMLSchemaException(\"rcase-MapAndSum.2\", new Object[] {\n/* 1415 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1416 */ Integer.toString(max1), \n/* 1417 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1418 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1421 */ int count1 = dChildren.size();\n/* 1422 */ int count2 = bChildren.size();\n/* */ \n/* 1424 */ for (int i = 0; i < count1; i++) {\n/* */ \n/* 1426 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* 1427 */ int j = 0; while (true) { if (j < count2) {\n/* 1428 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* */ try {\n/* 1430 */ particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);\n/* */ \n/* */ break;\n/* 1433 */ } catch (XMLSchemaException xMLSchemaException) {}\n/* */ j++;\n/* */ continue;\n/* */ } \n/* 1437 */ throw new XMLSchemaException(\"rcase-MapAndSum.1\", null); }\n/* */ \n/* */ } \n/* */ }", "private static Node1 lca(Node1 root, int v1, int v2) {\n\t\tif (root.data < v1 && root.data < v2) return lca(root.right, v1, v2); //if root is smaller than vertexes\n\t\tif (root.data > v1 && root.data > v2) return lca(root.left, v1, v2); //if root is bigger than vertexes\n\t\treturn root; //else if is between vertexes the root is the lowest common divisor\n\t}", "public static void main(String[] arhg) {\n\n Conta p1 = new Conta();\n p1.setNumConta(1515);\n p1.abrirConta(\"cp\");\n p1.setDono(\"wesley\");\n p1.deposita(500);\n // p1.saca(700); -> irá gera um erro pois o valor de saque especificado é superior ao valor que tem na conta\n\n p1.estadoAtual();\n }", "private static Double[] getABC(XasScanParameters parameters) throws Exception {\n\t\tDouble[] abc = null;\n\t\ttry {\n\t\t\tif (parameters.isABGiven()) {\n\t\t\t\tabc = gda.exafs.scan.ExafsScanRegionCalculator.calculateABC(parameters.getElement(), parameters\n\t\t\t\t\t\t.getEdge(), parameters.getEdgeEnergy(), parameters.getA(), parameters.getB(),\n\t\t\t\t\t\tparameters.getC(), true);\n\t\t\t} else {\n\t\t\t\tabc = gda.exafs.scan.ExafsScanRegionCalculator.calculateABC(parameters.getElement(), parameters\n\t\t\t\t\t\t.getEdge(), parameters.getEdgeEnergy(), parameters.getGaf1(), parameters.getGaf2(), parameters\n\t\t\t\t\t\t.getGaf3(), false);\n\t\t\t}\n\t\t\treturn abc;\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Exception while calculating exafs data points: \" + e.getMessage());\n\t\t}\n\t}" ]
[ "0.5382248", "0.5318756", "0.52966875", "0.5239349", "0.5209848", "0.5172905", "0.5168737", "0.50598013", "0.49837464", "0.49728185", "0.49648148", "0.49550506", "0.49414697", "0.4938312", "0.49329272", "0.4904218", "0.48940074", "0.48822242", "0.4876995", "0.48686206", "0.48518237", "0.4851068", "0.4846288", "0.48433718", "0.48428464", "0.4834136", "0.48268378", "0.4818762", "0.48099208", "0.48045468", "0.48003381", "0.47994727", "0.47963125", "0.47957358", "0.477944", "0.47778004", "0.47649935", "0.47606662", "0.47564664", "0.47325662", "0.47324663", "0.47183013", "0.47177052", "0.47131115", "0.47120133", "0.47077745", "0.47050747", "0.47011796", "0.4700237", "0.46917015", "0.4690057", "0.46820927", "0.46762162", "0.46720067", "0.46694544", "0.4668863", "0.4668578", "0.46661505", "0.46574646", "0.4638685", "0.46384534", "0.46320376", "0.46291387", "0.46269104", "0.46253043", "0.46230277", "0.461926", "0.4616042", "0.460841", "0.46043688", "0.46040517", "0.46033993", "0.46019554", "0.46009138", "0.4591636", "0.45882824", "0.4587994", "0.45865798", "0.4586555", "0.45859852", "0.45858476", "0.4583796", "0.45827046", "0.45779824", "0.45742992", "0.45696414", "0.45634383", "0.4559926", "0.45544735", "0.4545302", "0.4545063", "0.45416915", "0.45406598", "0.45399463", "0.45398396", "0.45341066", "0.45290372", "0.4528186", "0.4528113", "0.45276475" ]
0.58908767
0
Cek apakah cell diisi oleh worm lain
private boolean isCellOccupied(Cell c) { Worm[] opponentWorms = opponent.worms; Worm[] playerWorms = player.worms; int i = 0; int j = 0; boolean foundOpponentWorm = false; boolean foundPlayerWorm = false; while ((i < opponentWorms.length) && (!foundOpponentWorm)) { if ((opponentWorms[i].position.x == c.x) && (opponentWorms[i].position.y == c.y)) { foundOpponentWorm = true; } else { i++; } } while ((j < playerWorms.length) && (!foundPlayerWorm)) { if ((playerWorms[j].position.x == c.x) && (playerWorms[j].position.y == c.y)) { foundPlayerWorm = true; } else { j++; } } return (foundOpponentWorm || foundPlayerWorm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }", "public void echantillon_zone(){\n\n JLabel lbl_Echantillon = new JLabel(\"Offre d'\\u00E9chantillons :\");\n lbl_Echantillon.setBounds(340, 170, 119, 16);\n add(lbl_Echantillon);\n\n // MODEL\n final DefaultTableModel model = new DefaultTableModel();\n final DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();\n rightRenderer.setHorizontalAlignment(JLabel.RIGHT);\n Object[][] o = new Object[sizeVector][2];\n for(int i = 0; i < sizeVector; i++){\n o[i][0] = medicaments.get(i)[0];\n o[i][1] = medicaments.get(i)[1];\n }\n // TABLE DATA\n model.setDataVector(o, new Object[]{\"M\\u00E9dicament\",\"Qt\\u00E9\"});\n\n\n // TABLE\n result_table = new JTable(model);\n result_table.setBounds(475, 170, 200, 150);\n result_table.getColumnModel().getColumn(1).setMaxWidth(40);\n result_table.getColumnModel().getColumn(1).setCellRenderer(rightRenderer);\n result_table.setEnabled(false);\n add(result_table);\n\n\n // SCROLLPANE\n JScrollPane apne= new JScrollPane(result_table);\n apne.setBounds(475, 170, 200, 150);\n add(apne);\n\n\n }", "public void update(GameModel model) {\n assert model.getRowCount() == this.rowCount && model.getColumnCount() == this.columnCount;\n //\n for (int row = 0; row < this.rowCount; row++){\n for (int column = 0; column < this.columnCount; column++){\n CellValue value = model.getCellValue(row, column);\n if (value == CellValue.WALL) {\n this.cellViews[row][column].setImage(this.wallImage);\n }\n else if (value == CellValue.PISTOLA) {\n this.cellViews[row][column].setImage(this.pistolaImage);\n }\n else if (value == CellValue.ALIENEGG) {\n this.cellViews[row][column].setImage(this.alienEggImage);\n }\n else {\n this.cellViews[row][column].setImage(null);\n }\n //verifique en qué dirección va astronauta y muestre la imagen correspondiente\n if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && (GameModel.getLastDirection() == GameModel.Direction.RIGHT || GameModel.getLastDirection() == GameModel.Direction.NONE)) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.LEFT) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.UP) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.DOWN) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n //hacer que los OVNIS \"parpadeen\" hacia el final de ovniEatingMode (mostrar imágenes OVNI regulares en actualizaciones alternas del contador)\n if (GameModel.isOvniEatingMode() && (Controller.getovniEatingModeCounter() == 6 ||Controller.getovniEatingModeCounter() == 4 || Controller.getovniEatingModeCounter() == 2)) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n //mostrar OVNIS azules en ovniEatingMode\n else if (GameModel.isOvniEatingMode()) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n }\n //display imágenes OVNIS regulares de lo contrario\n else {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n }\n }\n }", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "public void updateDataCell();", "private void update() {\n // Set for each cell\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n cell.setBackground(BKGD_DARK_GRAY);\n cell.setForeground(Color.WHITE);\n cell.setFont(new Font(\"Halvetica Neue\", Font.PLAIN, 36));\n cell.setBorder(new LineBorder(Color.BLACK, 0));\n cell.setHorizontalAlignment(JTextField.CENTER);\n cell.setCaretColor(new Color(32, 44, 53));\n cell.setDragEnabled(false);\n cell.setTransferHandler(null);\n\n // Add subgrid separators\n CellPosition pos = cell.getPosition();\n if (pos.getColumn() == 2 || pos.getColumn() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 2, new Color(146, 208, 80)));\n } else if (pos.getRow() == 2 || pos.getRow() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(146, 208, 80)));\n }\n if ((pos.getColumn() == 2 && pos.getRow() == 2) || (pos.getColumn() == 5 && pos.getRow() == 5)\n || (pos.getColumn() == 2 && pos.getRow() == 5) || (pos.getColumn() == 5 && pos.getRow() == 2)) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 2, new Color(146, 208, 80)));\n }\n\n // Validate User's Cell Input + Mouse Listeners\n cell.removeKeyListener(cellKeyListener);\n cell.removeMouseListener(cellMouseListener);\n if (cell.isLocked()) {\n cell.setEditable(false);\n cell.setHighlighter(null);\n } else {\n cell.setBackground(BKGD_LIGHT_GRAY);\n cell.addMouseListener(cellMouseListener);\n cell.addKeyListener(cellKeyListener);\n }\n if (cell.isEmpty()) {\n cell.setText(\"\");\n } else {\n cell.setText(String.valueOf(cell.getUserValue()));\n }\n\n // Adds cell to the view's grid\n this.view.getGamePanel().getGrid().add(cell);\n }\n\n }", "private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }", "public ZonaFasciculataCells() {\r\n\r\n\t}", "Rey(){\r\n \r\n color_rey=Color.BLANCO;\r\n posicion_rey.fila=1;\r\n posicion_rey.columna='e';\r\n \r\n }", "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 affichageLabyrinthe () {\n\t\t//Affiche le nombre de coups actuel sur la console et sur la fenetre graphique\n\t\tSystem.out.println(\"Nombre de coups : \" + this.laby.getNbCoups() + \"\\n\");\t\t\n\t\tthis.enTete.setText(\"Nombre de coups : \" + this.laby.getNbCoups());\n\n\t\t//Affichage dans la fenêtre et dans la console du labyrinthe case par case, et quand la case est celle ou se trouve le mineur, affiche ce dernier\n\t\tfor (int i = 0 ; i < this.laby.getHauteur() ; i++) {\n\t\t\tString ligne = new String();\n\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() ; j++) {\n\t\t\t\tif (i != this.laby.getMineur().getY() || j != this.laby.getMineur().getX()) {\n\t\t\t\t\tligne = ligne + this.laby.getLabyrinthe()[i][j].graphismeCase();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.laby.getLabyrinthe()[i][j]=new Case();\n\t\t\t\t\tligne = ligne + this.laby.getMineur().graphismeMineur();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tif (grille.getComponentCount() < this.laby.getLargeur()*this.laby.getHauteur()) {\n\t\t\t\t\tgrille.add(new JLabel());\n\t\t\t\t\t((JLabel)grille.getComponents()[i*this.laby.getLargeur()+j]).setIcon(this.laby.getLabyrinthe()[i][j].imageCase(themeJeu));\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ligne);\n\t\t}\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getMineur().imageCase(themeJeu));\n\t}", "public void mouseExited(MouseEvent e) {\n if (isDraging){// ger fal kardane khanehaye drag shode ba raftane dobare ruye Anha\n setNotCopying();\n if(mlpp1<mlp1){// baraye raftan be paein\n for(int p=mlpp1;p<=mlp1; p++){\n if(mlpp2<mlp2)// baraye raftan be paein samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be pain samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane raftan be paein\n if(mlpp1>mlp1){// baraye raftan be bala\n for(int p=mlpp1;p>=mlp1; p--){\n if(mlpp2<mlp2)// baraye raftan be bala samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be bala samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane harekat be bala.\n if(mlpp2<mlp2)// baraye raftan be rast\n for(int k=mlpp2 ; k<=mlp2;k++){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye harekat be chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane geyre fa'al kardane khane haye drag shode\n if(e.getSource()==jtf[mlp1][mlp2]) // agar az samte paein az khane sabz kharej shod-\n if(jtf[mlp1][mlp2].getBackground()==Color.green)//- range an bayad be abi tabdil shawad.\n jtf[mlp1][mlp2].setBackground(Color.blue);\n }", "private void Mostra() {\n mat = matriz.getMatriz();\n\n for (int lin = 0; lin < 9; lin++) {\n for (int col = 0; col < 9; col++) {\n array_texto[lin][col].setEditable(true);\n array_texto[lin][col].setText(mat[lin][col]);\n array_texto[lin][col].setBackground(Color.white);\n\n for (char letra : array_texto[lin][col].getText().toCharArray()) {\n if ((letra < 1 || letra > 9)) {\n array_texto[lin][col].setEditable(false);\n array_texto[lin][col].setBackground(Color.LIGHT_GRAY);\n }\n }\n }\n }\n }", "public void openCell(Integer xOpen, Integer yOpen){\n \r\n if(isValidCell(xOpen,yOpen)){\r\n // System.out.println(\" openCell(). es celda Valida\");\r\n if(grid[xOpen][yOpen].isMine()){\r\n // System.out.println(\" openCell().Perdiste, habia una mina en g[\"+xOpen+\"][\"+yOpen+\"]\");\r\n //grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n grid[xOpen][yOpen].setNumber(9);\r\n this.gs = gameStatus.LOSE;\r\n }else{\r\n // System.out.println(\" openCell().No es mina, puede continuar\");\r\n if( grid[xOpen][yOpen].getStatus() == Status.CLOSE ){//si esta cerrado, contar las minas\r\n // System.out.println(\" openCell().Esta cerrada, puede abrirse\");\r\n \r\n int minas = getMines(xOpen,yOpen); //error\r\n this.grid[xOpen][yOpen].setNumber(minas);\r\n \r\n if(minas == 0){ //abre las celdas de alrededor\r\n // System.out.println(\" openCell().Tiene 0 minas alrededor, hay que explotar\");\r\n for(int i=xOpen-1; i<=xOpen+1; i++){\r\n for(int j=yOpen-1; j<=yOpen+1 ;j++){\r\n if( i== xOpen && j==yOpen){\r\n grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n revealedCells++;\r\n }else\r\n openCell(i,j);\r\n }\r\n }\r\n }else{\r\n // System.out.println(\" openCell().La celda tiene un numero >0, puede abrise\");\r\n \r\n grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n revealedCells++;\r\n \r\n }\r\n } \r\n }\r\n }else{\r\n // System.out.println(\" openCell().Es una celda no valida\");\r\n }\r\n }", "static void pritlnSouSuoBiaoToWindow()\n {\n System.out.println(\"\");\n System.out.println(\"方向状态到状态路径表 outToATable\");\n \n String[]tableHeads=\n {\n \"编号\",\"矩阵\",\"0号\",\"1号\",\"2号\",\"3号\",\"4号\",\"5号\",\"6号\",\"7号\",\"8号\",\"9号\",\"10号\",\"11号\",\"12号\",\"13号\",\"14号\",\"15号\",\"16号\",\"17号\",\"18号\",\"19号\",\"20号\",\"21号\",\"22号\",\"23号\" \n }\n ;\n Vector tableHeadName=new Vector();\n \n for(int l=0;l<tableHeads.length;l++)\n {\n tableHeadName.add(tableHeads[l]);\n }\n \n \n Vector row=new Vector();\n //row.add(tableHeadName);\n for(int i=0;i<statusJuZhenList.size();i++)\n {\n //if(statusJuZhenList.size ()==24){System.out.println(\"24个状态\");}\n Vector cell=new Vector();\n \n cell.add(String.valueOf(i));\n \n int[][]intArray ;\n intArray=(int[][])(statusJuZhenList.get(i));\n String statusJuZhenToString=\"\" ;\n for(int j=0;j<3;j++)\n {\n statusJuZhenToString+=\"[ \" ;\n for(int k=0;k<3;k++)\n {\n statusJuZhenToString+=String.valueOf(intArray[k][j])+\",\" ;\n }\n statusJuZhenToString+=\" ],\" ;\n }\n cell.add(statusJuZhenToString);\n \n //public static Vector[][]souSuoBiao=new Vector[24][24];\n for(int j=0;j<statusJuZhenList.size();j++)\n {\n Vector luJingArray=(Vector)souSuoBiao[i][j];\n String iToJAllLuJing=luJingArray.toString();\n cell.add(iToJAllLuJing);\n }\n \n \n \n \n row.add(cell);\n }\n \n \n DefaultTableModel tableModel=new DefaultTableModel();\n tableModel.setDataVector(row,tableHeadName);\n \n \n MoFang.theMainFrame.totlePanel.table2.setModel(tableModel);\n MoFang.theMainFrame.totlePanel.table2.setGridColor(Color.cyan);\n \n \n }", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }", "static void drawCellID() { // draws a cross at each cell centre\n\t\tfloat xc,yc;\n\t\t//GeneralPath path = new GeneralPath();\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// Label Cell number\n\t\t\t\tTextRoi TROI = new TextRoi((int)xc, (int)yc, (\"\"+i),new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tTROI.setNonScalable(false);\n\t\t\t\tOL.add(TROI);\n\t\t\t}\n\t\t}\n\t}", "public void showEdit() {\n DefaultTableCellRenderer alignCenter= new DefaultTableCellRenderer();\n alignCenter.setHorizontalAlignment(JLabel.CENTER);\n\n try {\n //register driver yang akan dipakai\n Class.forName(DriverDB);\n\n //menyambungkan ke database\n connectDB = DriverManager.getConnection(URL,USERNAME,PASSWORD);\n\n //mengatur table head atau nama kolom\n DefaultTableModel kerangkaTabel = new DefaultTableModel();\n kerangkaTabel.addColumn(\"Nomer\");\n kerangkaTabel.addColumn(\"Judul Buku\");\n kerangkaTabel.addColumn(\"Tanggal Pinjam\");\n kerangkaTabel.addColumn(\"Tanggal Harus Kembali\");\n kerangkaTabel.addColumn(\"Tanggal Kembali\");\n kerangkaTabel.addColumn(\"Denda\");\n kerangkaTabel.addColumn(\"Biaya Sewa\");\n\n //perintah sql nya\n statmt= connectDB.createStatement();\n String sql = \"SELECT * FROM sewabuku\";\n\n //eksekusi perintah sql\n setHasil= statmt.executeQuery(sql);\n\n //nomor urut untuk di dalam tabel\n //supaya tidak menggunakan id\n int no_urut=1;\n while (setHasil.next()){\n kerangkaTabel.addRow(new Object[] {\n //setHasil.getString(\"id\"),\n no_urut,\n setHasil.getString(\"judul\"),\n setHasil.getString(\"tanggal_pinjam\"),\n setHasil.getString(\"tanggal_harus_kembali\"),\n setHasil.getString(\"tanggal_kembali\"),\n setHasil.getString(\"denda\"),\n setHasil.getString(\"biaya_sewa\")\n });\n no_urut++;\n\n }\n setHasil.close();\n connectDB.close();\n statmt.close();\n\n //set table model tadi ke dalam JTables\n tableDanAksi.setModel(kerangkaTabel);\n\n //mengatur tinggi tiap baris\n tableDanAksi.setRowHeight(30);\n\n\n //mengatur penempatan teks/teks alignment tiap kolom, index kolom dimulai dari 0\n\n /*indeks 0 : kolom nomer\n * indeks 1 : kolom nama buku\n * indeks 2 : kolom tanggal pinjam\n * indeks 3 : kolom tanggal harus kembali\n * indeks 4 : kolom tanggal kembali\n * indeks 5 : kolom denda\n * indeks 6 : kolom sewa*/\n tableDanAksi.getColumnModel().getColumn(0).setCellRenderer(alignCenter);\n tableDanAksi.getColumnModel().getColumn(2).setCellRenderer(alignCenter);\n tableDanAksi.getColumnModel().getColumn(3).setCellRenderer(alignCenter);\n tableDanAksi.getColumnModel().getColumn(4).setCellRenderer(alignCenter);\n\n //mengatur lebar kolom\n TableColumnModel setKolom = tableDanAksi.getColumnModel();\n setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n\n\n }catch (SQLException eksepsi){\n System.out.println(eksepsi.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void keyPressed(KeyEvent e){\n keyCode= e.getKeyCode();// kode kelidi ke feshar dade mishawad ra darad.\n /* dar dasturate in If, kelide Enter wa ArrowKeys Fa'al mishawand-*/\n if(cellSelCounter==1 &&(e.getSource()==jp || e.getSource()==jtf[klp1][klp2]))\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){\n if(i!=-1 && i!=30)\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.yellow){\n if(i<=29 && i>=0 && j>=0 && j<=25){// nabayad az mahdudeye Khaneha Kharej shod.\n if(keyCode==10 || keyCode==40){ // 10 baraye kelide Enter wa 40 baraye kelide DownArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);// khanye gabli sefid mishawad.\n if(++i!=30)// nabayad az mahdudeye khaneha kharej shod.\n jtf[i][j].setBackground(Color.blue);// khaneye paeini abi mishawad.\n jp.grabFocus();\n }\n if(keyCode==39 && jtf[i][j].getBackground()!=Color.yellow){// 39 baraye kelide RightArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n if(++j!=26)\n jtf[i][j].setBackground(Color.blue);\n jp.grabFocus();\n }\n if(keyCode==37 && jtf[i][j].getBackground()!=Color.yellow){// 37 baraye kelide LeftArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n if(--j!=-1)\n jtf[i][j].setBackground(Color.blue);\n jp.grabFocus();\n }\n if(keyCode==38){// 38 baraye kelide UpArrowKey\n jtf[i][j].setEnabled(false);\n setNotEdit();\n jtf[i][j].setBackground(Color.white);\n if(--i!=-1)\n jtf[i][j].setBackground(Color.blue);\n jp.grabFocus();\n }\n }//payane if(i<=29 && i>=0 && j>=0 && j<=25).\n }// payane if(jtf[i][j].getBackground()...\n cellSelCounter=1;\n }// payane Barresiye Kelidhaye jahati wa Enter\n /* ba estefade az dasture ife zir, Kelidhaye harfi wa ragami barresi mishawad*/\n if(cellSelCounter==1 && e.getSource()==jp && !e.isAltDown() && !e.isControlDown() && !e.isShiftDown())\n if(/*kelide A-Z*/(keyCode>=65 && keyCode<=90) || /*Kelide 1-9*/(keyCode>=48 && keyCode<=57) ||\n /*Kelid NUMpad*/(keyCode>=96 && keyCode<=105) || (/* backSpace */keyCode==8) || (/* Space */keyCode==32))\n for(int i=0;i<30;i++) // bazadane yeki az kelidhaye-\n for(int j=0;j<26;j++) // -harfi ya adadi waya BackSpase ya Space-\n if(jtf[i][j].getBackground()==Color.blue){// -khaneye fa'al gable neweshtan mishawad.\n jtf[i][j].setBackground(Color.yellow);\n jtf[i][j].setEnabled(true);\n jtf[i][j].grabFocus();\n if(keyCode!=8)// agar kelide BackSpace Bashad, matn pak mishawad.\n jtf[i][j].setText(\"\"+e.getKeyChar());\n else\n jtf[i][j].setText(\"\");\n setEdit();\n setNotSaved();\n setTxp(i, j);\n cellSelCounter=1;\n }// payane barresiye kelidhaye harfi wa adadi\n if(keyCode==27 && (e.getSource()==jp || e.getSource()==jtf[klp1][klp2]) )\n for(int i=0; i<30; i++)// agare kelide Escape (Esc) zade shawad, tamamiye khaneha geyre fal mishawand\n for(int j=0; j<26; j++){\n if(jtf[i][j].getBackground()==Color.yellow)\n jtf[i][j].setText(\"\");\n jtf[i][j].setEnabled(false);\n jtf[i][j].setBackground(Color.white);\n jp.grabFocus();\n setNotEdit();\n setNotSelected();\n }// payane barresiye Kelide Esc\n if (e.isControlDown())// kelidhaye miyanBor Shenasaie maishwand\n switch(keyCode){\n case (int)'N':// Menuye New\n new AL(1).actionPerformed(null);\n break;\n case (int)'O':// menuye Open\n new AL(2).actionPerformed(null);\n break;\n case (int)'S':// menuye Save\n if (e.isShiftDown())// agar Shift ham gerefte shawad, Save as Entekhab migardad\n new AL(4).actionPerformed(null);\n else// agar fagat control gerefte shawad, save entekhab mishawad.\n new AL(3).actionPerformed(null);\n break;\n case (int)'X':// menuye Cut\n new AL(6).actionPerformed(null);\n break;\n case (int)'C':// Menuye Copy\n new AL(7).actionPerformed(null);\n break;\n case (int)'V':// Menuye Paste\n new AL(8).actionPerformed(null);\n break;\n case (int)'A':\n new AL(14).actionPerformed(null);\n break;\n case 49:// 49 baraye kelide 1 wa menuye Max ast\n new AL(9).actionPerformed(null);\n break;\n case 50:// 50 baraye kelide 2 wa menuye Min ast\n new AL(10).actionPerformed(null);\n break;\n case 51:// 51 baraye kelide 3 wa menuye Sum ast\n new AL(11).actionPerformed(null);\n break;\n case 52:// 52 baraye kelide 4 wa menuye Average ast\n new AL(12).actionPerformed(null);\n break;\n case 53:// 53 baraye kelide 5 wa menuye Count ast\n new AL(13).actionPerformed(null);\n break;\n } // payane Barresiye ShortKeys\n if(e.isAltDown()) // barresiye menoye Exit wa Kelide F4\n if (keyCode==115)\n new AL(5).actionPerformed(null);// menoye Exit farakhani mishawad\n }", "public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }", "public void stampa() {\n GridPane matrice = new GridPane();\n buildGriglia(matrice);\n Text scritta;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (getElementAt(griglia, i, j).cerchio.isVisible()) {\n scritta = new Text(\"1\");\n }\n else {\n scritta = new Text(\"0\");\n }\n matrice.add(scritta, j, i);\n }\n }\n Scene scene3 = new Scene(matrice, N * 100, N * 100);\n Stage stage3 = new Stage();\n stage3.setTitle(\"Matrice di occupazione:\");\n stage3.setScene(scene3);\n stage3.show();\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "@Override \r\n public void setUI(TableUI ui) \r\n {\n super.setUI(new BasicTableUI(){ \r\n public void paint(Graphics g, JComponent c) { \r\n Rectangle r=g.getClipBounds(); \r\n int firstRow=table.rowAtPoint(new Point(0,r.y)); \r\n int lastRow=table.rowAtPoint(new Point(0,r.y+r.height)); \r\n // -1 is a flag that the ending point is outside the table \r\n if (lastRow<0) \r\n lastRow=table.getRowCount()-1; \r\n for (int i=firstRow; i<=lastRow; i++) \r\n paintRow(i,g); \r\n } \r\n private void paintRow(int row, Graphics g) \r\n { \r\n Rectangle r=g.getClipBounds(); \r\n for (int i=0; i<table.getColumnCount();i++) \r\n { \r\n Rectangle r1=table.getCellRect(row,i,true); \r\n if (r1.intersects(r)) // at least a part is visible \r\n { \r\n int sk=i;//((CTable)table).map.visibleCell(red,i); \r\n paintCell(row,sk,g,r1); \r\n // increment the column counter \r\n //i+=((CTable)table).map.span(row,sk)-1; \r\n //i++; \r\n } \r\n } \r\n } \r\n private void paintCell(int row, int column, Graphics g,Rectangle area) \r\n { \r\n int verticalMargin = table.getRowMargin(); \r\n int horizontalMargin = table.getColumnModel().getColumnMargin(); \r\n \r\n Color c = g.getColor(); \r\n g.setColor(table.getGridColor()); \r\n g.drawRect(area.x,area.y,area.width-1,area.height-1); \r\n g.setColor(c); \r\n \r\n area.setBounds(area.x + horizontalMargin/2, \r\n area.y + verticalMargin/2, \r\n area.width - horizontalMargin, \r\n area.height - verticalMargin); \r\n \r\n if (table.isEditing() && table.getEditingRow()==row && \r\n table.getEditingColumn()==column) \r\n { \r\n Component component = table.getEditorComponent(); \r\n component.setBounds(area); \r\n component.validate(); \r\n } \r\n else \r\n { \r\n TableCellRenderer renderer = table.getCellRenderer(row, column); \r\n Component component = table.prepareRenderer(renderer, row, column); \r\n if (component.getParent() == null) \r\n rendererPane.add(component); \r\n rendererPane.paintComponent(g, component, table, area.x, area.y, \r\n area.width, area.height, true); \r\n } \r\n } \r\n }); \r\n }", "private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n setTitle(\"Читатели\");\n ResultSet rs = DBConnection.executeQuery(\"select * from readers\");\n model = new ResultSetTableModel(rs);\n model.setColumnNameLabel(\"Фамилия Имя Отчество\", 1);\n model.setColumnNameLabel(\"Паспорт\", 2);\n model.setColumnNameLabel(\"Дата рождения\", 3);\n model.setColumnNameLabel(\"Телефон\", 4);\n model.setColumnNameLabel(\"Образование\", 5);\n model.setColumnNameLabel(\"Учёная степень\", 6);\n model.setColumnNameLabel(\"Зал\", 7);\n jTable3.setModel(model);\n \n\n ResultSet rs2 = DBConnection.executeQuery(\"select id,name from rooms\");\n jTable3.getColumnModel().getColumn(7).setCellEditor(MyJComboCell.generate(rs2,\"id\",\"name\"));\n jTable3.getColumnModel().getColumn(7).setCellRenderer(new MyCellRenderer(rs2,\"id\",\"name\"));\n }", "void testDrawCell(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.indexHelp(0, 0).drawCell(2),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 2, Cnst.boardHeight / 2,\r\n OutlineMode.SOLID, Color.ORANGE)));\r\n t.checkExpect(this.game3.indexHelp(0, 0).drawCell(3),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 3, Cnst.boardHeight / 3,\r\n OutlineMode.SOLID, Color.GREEN)));\r\n t.checkExpect(this.game5.indexHelp(0, 0).drawCell(4),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 4, Cnst.boardHeight / 4,\r\n OutlineMode.SOLID, Color.PINK)));\r\n t.checkExpect(this.game2.indexHelp(-1, -1).drawCell(1), new EmptyImage());\r\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\t \r\n\t\t\t def_t = new DefaultTableModel();\r\n def_t.setColumnIdentifiers(t_tab_b);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tString req = \"select NOM, NRC, NIF, ADRESSE , TEL, CODE_F from TRANS_FOURNISSEUR order by NOM\";\r\n\t\t\t\tResultSet\trst = FirstPg.con.createStatement().executeQuery(req); \r\n\t\t\t\t\r\n\t\t\t\twhile(rst.next()){\r\n \t if(!rst.getString(6).equals(\"Inconnu\"))def_t.addRow(new Object[]{rst.getString(1),rst.getString(2),rst.getString(3),rst.getString(4),rst.getString(5),rst.getString(6)});\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t tab_fact.setModel(def_t);\r\n\t\t\t\r\n for(int i = 0; i< tab_fact.getRowCount();i++){\r\n \t changeSizeh(25,tab_fact,i);\r\n }\r\n\t\t\t} catch (SQLException 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\t\r\n\t\t}", "public int getCell() {\n return this.cell;\n }", "public data_kelahiran() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI)this.getUI()).setNorthPane(null);\n autonumber();\n data_tabel();\n lebarKolom();\n \n \n \n }", "protected void narisi(Graphics2D g, double wp, double hp) {\n\n FontMetrics fm = g.getFontMetrics();\n\n int hPisava = fm.getAscent();\n\n double xColumn = 0.0;\n double yColumn = sirinaStolpca(wp, hp);\n\n for(int i = 0; i < podatki.length; i++){\n\n g.setColor(Color.ORANGE);\n g.fillRect((int)xColumn,(int)(hp - visinaStolpca(i, wp, hp)), (int) sirinaStolpca(wp, hp), (int) visinaStolpca(i, wp, hp));\n\n g.setColor(Color.RED);\n g.drawRect((int)((i)*sirinaStolpca(wp, hp)),(int) (hp-visinaStolpca(i, wp, hp)), (int)sirinaStolpca(wp, hp), (int)visinaStolpca(i, wp, hp));\n\n g.setColor(Color.BLUE);\n if(i < podatki.length - 1){\n double startCrtaX = sredinaVrha(i, wp, hp)[0];\n double startCrtaY = sredinaVrha(i, wp, hp)[1];\n\n double endCrtaX = sredinaVrha(i + 1, wp, hp)[0];\n double endCrtaY = sredinaVrha(i+1, wp, hp)[1];\n\n g.drawLine((int)startCrtaX,(int) startCrtaY,(int) endCrtaX,(int) endCrtaY);\n\n }\n\n g.setColor(Color.BLACK);\n\n String toWrite = Integer.toString(i+1);\n double wNapis=fm.stringWidth(toWrite);\n double xNapis=xColumn+(xColumn-wNapis)/2;\n double yNapisLowerLine=hp-hPisava;\n xColumn+=sirinaStolpca(wp, hp);\n g.drawString(toWrite,ri (xNapis),ri(yNapisLowerLine));\n\n }\n\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 }", "private void MembentukListHuruf(){\n for(int i = 0; i < Panjang; i ++){\n Huruf Hrf = new Huruf();\n Hrf.CurrHrf = Kata.charAt(i);\n if(!IsVertikal){\n //horizontal\n Hrf.IdX = StartIdxX;\n Hrf.IdY = StartIdxY+i;\n }else{\n Hrf.IdX = StartIdxX+i;\n Hrf.IdY = StartIdxY;\n }\n // System.out.println(\"iniii \"+Hrf.IdX+\" \"+Hrf.IdY+\" \"+Hrf.CurrHrf+\" \"+NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].AddNoSoal(NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].Huruf=Hrf.CurrHrf;\n \n }\n }", "private void tampilkan() {\n //To change body of generated methods, choose Tools | Templates.\n DefaultTableModel tabelpegawai = new DefaultTableModel();\n tabelpegawai.addColumn(\"NAMA\");\n tabelpegawai.addColumn(\"ALAMAT\");\n tabelpegawai.addColumn(\"HP\");\n tabelpegawai.addColumn(\"BBM\");\n tabelpegawai.addColumn(\"SITUS\");\n \n \n try {\n conek getCnn = new conek();\n con= null;\n con= (com.mysql.jdbc.Connection) getCnn.getConnection();\n String sql = \"select * from toko \";\n Statement stat = con.createStatement();\n ResultSet res=stat.executeQuery(sql);\n while (res.next()){\n tabelpegawai.addRow(new Object[]{res.getString(1),res.getString(2),res.getString(3),res.getString(4),res.getString(5)});\n }\n jTable1.setModel(tabelpegawai);\n } catch(Exception e){}\n }", "private void setFondAndSizen(WritableCell lb) throws WriteException {\n\t\tWritableFont font1 = new WritableFont(WritableFont.TIMES,10); \n\t\tCellFormat format = lb.getCellFormat();\n\t\tif (format == null || !format.getClass().equals(WritableCellFormat.class)) {\n\t\t\tWritableCellFormat format0=new WritableCellFormat(font1); \n\t\t\tlb.setCellFormat(format0);\n\t\t}\n\t\tWritableCellFormat format1 = (WritableCellFormat)lb.getCellFormat();\n\t\t//把水平对齐方式指定为靠左\n\t\t format1.setAlignment(Alignment.LEFT); \n\t\t//把垂直对齐方式指定为居中\n\t\t format1.setVerticalAlignment(jxl.format.VerticalAlignment.BOTTOM);\n\t\t //设置自动换行\n\t\t format1.setWrap(true); \n\t}", "public void afficherLru() {\n\t\tint nbrCols = listEtape.size();\n\t\tint nbrRows = 0;\n\t\tfor(ArrayList<Processus> list: listEtape) {\n\t\t\tif(list.size() > nbrRows) nbrRows = list.size(); \n\t\t}\n\t\t\n\t\taddColsRows(resultPane, nbrCols+1, nbrRows);\n\t\taddPanelForResult(resultPane);\n\t\n\n\t\tresultPane.setStyle(\"-fx-background-color: #23CFDC\");\n\n\t\t// Affichage du résultat\n\t\tfor(int i=0; i< listEtape.size();i++) {\n\t\t\tArrayList<Processus> list = listEtape.get(i); \n\t\t\tfor(int j=0; j<list.size(); j++) {\n\t\t\t\tProcessus p = list.get(j); \n\t\t\t\tLabel label = new Label(\"\" + p.getValue());\n\n\t\t\t\tresultPane.add(label, i+1, j);\n\t\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t\t}\n\t\t}\n\t\tresultPane.setVisible(true);\n\t\tgenere = true;\n\t}", "private void markGrid(int row, int col, boolean p1Turn) {\n if (col == 1) {\n if (row == 5) {\n r6c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c1.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n } else if (col == 2) {\n if (row == 5) {\n r6c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c2.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 3) {\n if (row == 5) {\n r6c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c3.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 4) {\n if (row == 5) {\n r6c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c4.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 5) {\n if (row == 5) {\n r6c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c5.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 6) {\n if (row == 5) {\n r6c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c6.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n else if (col == 7) {\n if (row == 5) {\n r6c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 4) {\n r5c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 3) {\n r4c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 2) {\n r3c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 1) {\n r2c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n if (row == 0) {\n r1c7.setBackground(p1Turn ? Color.YELLOW : Color.RED);\n }\n }\n if (game.checkForWin()) { // This shows the final screen when the algorithm declares a win; buttons are disabled\n textOutput.setText(\"Game Over! \" + (game.getPlayerOneTurn() ? \" Player 1 Wins!\" : \" Player 2 Wins!\"));\n a1Button.setEnabled(false);\n a2Button.setEnabled(false);\n a3Button.setEnabled(false);\n a4Button.setEnabled(false);\n a5Button.setEnabled(false);\n a6Button.setEnabled(false);\n a7Button.setEnabled(false);\n }\n else {\n textOutput.setText(game.getPlayerOneTurn() ? \"Player 1 Turn\" : \"Player 2 Turn\"); // If there is no win, the turn alternates\n }\n game.setPlayerOneTurn();\n }", "void getCounter(){// wazifeye in mthod, shomaresh ast.\n selectedCellCounter=0;\n emptyCellCounter=0;\n charCounter=0;\n for(int i=0; i<30;i++)\n for(int j=0; j<26;j++){\n if(jtf[i][j].getText().length()==0)\n ++emptyCellCounter;\n else\n charCounter+=jtf[i][j].getText().length();\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.green)\n ++selectedCellCounter;\n }\n }", "public nhanvien() {\n initComponents();\n laysodong();\n if(count % 5 ==0 )\n {\n sotrang = count/5;\n }\n else\n {\n sotrang=count/5 + 1;\n }\n DAO_NV.dolentable(tblnhanvien,1);\n lbltrang.setText(\"1\");\n lblsotrang.setText(\"1/\"+sotrang);\n jButton3.setEnabled(false);\n jButton1.setEnabled(false);\n \n \n \n \n\n }", "public void ukloniHranu() {\n\t\tthis.tabla[iHrana][jHrana] = '.';\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tJButton b = (JButton)(e.getSource());\n\n\t\t// Traccia il perimetro con dei muri e svuota l'interno della mappa.\n\t\tif(b.getText().equals(\"Pulisci\")) {\n\t\t\tfor (int i = 0; i < nr; i++) {\n\t\t\t\tfor (int j = 0; j < nc; j++) {\n\t\t\t\t\tif ((j == nc - 1) || (j == 0) || (i == 0) || (i == nr - 1)) {\n\t\t\t\t\t\tcells[i][j].setIcon(iconWall);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcells[i][j].setIcon(iconNull);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Randomize della mappa\n\t\tif(b.getText().equals(\"Randomize\")) {\n\t\t\tint percWall;\n\t\t\tint percExit;\n\t\t\tint percDebris;\n\t\t\tint percSurvivor;\n\t\t}\n\t\t// Crea il file CLIPS del mondo creato e fa partire l'interfaccia per l'esecuzione di RubyRescue.\n\t\tif(b.getText().equals(\"Fatto\")) {\n\t\t\tif (controlMap()) {\n\t\t\t\tString debrisContent = \"\";\n\t\t\t\tString world = \"\";\n\t\t\t\tString contains;\n\t\t\t\tImageIcon icon;\n\t\t\t\ttry {\n\t\t\t\t\t// Le parti STATICHE del programma CLIPS. Le altre vengono aggiornate automaticamente\n\t\t\t\t\tFileReader in1 = new FileReader(getClass().getResource(\"/clp/Parte1.clp\").getPath());\n\t\t\t\t\tFileReader in3 = new FileReader(getClass().getResource(\"/clp/Parte3.clp\").getPath());\n\t\t\t\t\tFileReader in5 = new FileReader(getClass().getResource(\"/clp/Parte5.clp\").getPath());\n\t\t\t\t\tFileReader in7 = new FileReader(getClass().getResource(\"/clp/Parte7.clp\").getPath());\n\n\t\t\t\t\tFileReader in1c = new FileReader(getClass().getResource(\"/clpclips/Parte1.clp\").getPath());\n\t\t\t\t\tFileReader in3c = new FileReader(getClass().getResource(\"/clpclips/Parte3.clp\").getPath());\n\t\t\t\t\tFileReader in5c = new FileReader(getClass().getResource(\"/clpclips/Parte5.clp\").getPath());\n\t\t\t\t\tFileReader in7c = new FileReader(getClass().getResource(\"/clpclips/Parte7.clp\").getPath());\n\n\t\t\t\t\t// File di output.\n\t\t\t\t\tout = new FileWriter(getClass().getResource(\"/rules/Ruby.clp\").getPath());\n\t\t\t\t\toutClips = new FileWriter(getClass().getResource(\"/rules/RubyClips.clp\").getPath());\n\t\t\t\t\t// Scrittura parte statica 1.\n\t\t\t\t\tint c, cc;\n\t\t\t\t\tc = in1.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in1.read();\n\t\t\t\t\t}\n\t\t\t\t\tin1.close();\n\t\t\t\t\tcc = in1c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in1c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin1c.close();\n\n\t\t\t\t\t// Scrittura parte dinamica 2. Trasformazione del mondo in codice CLIPS\n\t\t\t\t\tout.write(\"\\n;Mondo creato con RubyRescueWorldCreation.java\\n\");\n\t\t\t\t\tDate date = new Date();\n\t\t\t\t\tout.write(\";Data: \"+ date +\"\\n\");\n\t\t\t\t\toutClips.write(\"\\n;Mondo creato con RubyRescueWorldCreation.java\\n\");\n\t\t\t\t\toutClips.write(\";Data: \"+ date +\"\\n\");\n\t\t\t\t\tint entryR = 0;\n\t\t\t\t\tint entryC = 0;\n\t\t\t\t\tString direction = \"\";\n\t\t\t\t\tfor (int i = 0; i < nr; i++) {\n\t\t\t\t\t\tfor (int j = 0; j < nc; j++) {\n\t\t\t\t\t\t\ticon = (ImageIcon) (cells[i][j].getIcon());\n\t\t\t\t\t\t\tcontains = icon.getDescription();\n\n\t\t\t\t\t\t\tif (contains.equals(\"entry\")) {\n\t\t\t\t\t\t\t\tentryR = i;\n\t\t\t\t\t\t\t\tentryC = j;\n\t\t\t\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\t\t\t\tdirection = \"down\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (j == 0) {\n\t\t\t\t\t\t\t\t\tdirection = \"right\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (i == (nr - 1)) {\n\t\t\t\t\t\t\t\t\tdirection = \"up\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (j == (nc - 1)) {\n\t\t\t\t\t\t\t\t\tdirection = \"left\";\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\tif (contains.equals(\"debris\")) {\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"\\n(debriscontent (pos-r \" + i + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(pos-c \" + j + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(person no) \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(digged no))\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (contains.equals(\"debrisYes\")) {\n\t\t\t\t\t\t\t\tcontains = \"debris\";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"\\n(debriscontent (pos-r \" + i + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(pos-c \" + j + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(person Person-\" + i + \"-\" + j + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(digged no))\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tworld = world + \"\\n(cell (pos-r \" + i + \") \";\n\t\t\t\t\t\t\tworld = world + \"(pos-c \" + j + \") \";\n\t\t\t\t\t\t\tworld = world + \"(contains \" + contains + \"))\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tworld = world + debrisContent;\n\t\t\t\t\tout.write(world);\n\t\t\t\t\toutClips.write(world);\n\n\t\t\t\t\t// Scrittura parte statica 3.\n\t\t\t\t\tc = in3.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in3.read();\n\t\t\t\t\t}\n\t\t\t\t\tin3.close();\n\t\t\t\t\tcc = in3c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in3c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin3c.close();\n\n\t\t\t\t\t// Inserimento parte dinamica 4.\n\t\t\t\t\tString agentStatus = \"(agentstatus (pos-r \"+entryR+\") (pos-c \"+entryC+\")\";\n\t\t\t\t\tagentStatus = agentStatus + \"(time 0)(direction \"+direction+\") (load no)))\\n\";\n\t\t\t\t\tout.write(agentStatus);\n\t\t\t\t\toutClips.write(agentStatus);\n\n\t\t\t\t\t// Scrittura parte statica 5\n\t\t\t\t\tc = in5.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in5.read();\n\t\t\t\t\t}\n\t\t\t\t\tin5.close();\n\t\t\t\t\tcc = in5c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in5c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin5c.close();\n\n\t\t\t\t\t// Scrittura parte dinamica 6.\n\t\t\t\t\tString mapEntry = \"(assert (map (pos-r \"+entryR+\")(pos-c \"+entryC+\")\";\n\t\t\t\t\tmapEntry = mapEntry + \"(contains entry)))\\n\";\n\t\t\t\t\tout.write(mapEntry);\n\t\t\t\t\toutClips.write(mapEntry);\n\n\t\t\t\t\t// Scrittura parte statica 7.\n\t\t\t\t\tc = in7.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in7.read();\n\t\t\t\t\t}\n\t\t\t\t\tin7.close();\n\t\t\t\t\tcc = in7c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in7c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin7c.close();\n\n\t\t\t\t\t// Chiusura file di output.\n\t\t\t\t\tout.close();\n\t\t\t\t\toutClips.close();\n\n\t\t\t\t\tsetVisible(false);\n\n\t\t\t\t\t// Parte l'esecuzione del programma CLIPS\n\t\t\t\t\tString titleFrame = e.getActionCommand();\n\t\t\t\t\tif (titleFrame.equals(\"Fatto\")) {\n\t\t\t\t\t\ttitleFrame = \"(mappa non salvata)\";\n\t\t\t\t\t}\n\t\t\t\t\trrwe = new RubyRescueWorldExecution(cells, titleFrame);\n\t\t\t\t} catch(Exception eee) {\n\t\t\t\t\tSystem.out.println(eee.getMessage());\n\t\t\t\t}\n\t\t\t}//if (controlMap == true)\n\t\t\telse {\n\t\t\t\tJOptionPane op = new JOptionPane();\n\t\t\t\top.showMessageDialog(null, errorMapMessage, \"Attento\", 2);\n\t\t\t}\n\t\t}\n\n\t\t// Risettaggio dei parametri del mondo.\n\t\tif(b.getText().equals(\"Reimposta\")) {\n\t\t\tsetVisible(false);\n\t\t\tnew RubyRescueWorldParameters();\n\t\t}\n\n\t\t// Uscita.\n\t\tif(b.getText().equals(\"Esci\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private static void setTableWithData()\n {\n /* Se establecen el tamaño de la tabla */\n table.setSize(1280, 630);\n table.setMaximumSize(new Dimension(1280, 630));\n table.setMinimumSize(new Dimension(1280, 630));\n\n /* Se garantiza que cada fila (album) tiene un alto proporcional de acuerdo con el numero de cancioens */\n Iterator iteratorPerRow = listSizePerRow.iterator();\n int sizePerRow, i;\n i = 0;\n while (iteratorPerRow.hasNext())\n {\n sizePerRow = (Integer) iteratorPerRow.next(); \n table.setRowHeight(i, sizePerRow);\n i++;\n }\n\n /* Se setea el ancho de cada columna */\n setSize(table, JSoundsMainWindowViewController.ALBUM_COVER_COLUMN, 200);\n setSize(table, JSoundsMainWindowViewController.ALBUM_INFO_COLUMN, 230);\n setSize(table, JSoundsMainWindowViewController.NUMBER_SONG_COLUMN, 50);\n setSize(table, JSoundsMainWindowViewController.LIST_SONG_COLUMN, 400);\n setSize(table, JSoundsMainWindowViewController.GENDER_SONG_COLUMN, 230);\n\n /* Renderizado del la imagen del album */\n JLabelTableRenderer jltcr = new JLabelTableRenderer();\n jltcr.setVerticalAlignment(SwingConstants.TOP);\n jltcr.setHorizontalAlignment(SwingConstants.CENTER);\n\n table.getColumnModel().getColumn(0).setCellRenderer(jltcr);\n\n\n /* Renderizados de cada columna */\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.ALBUM_INFO_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.NUMBER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LIST_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.GENDER_SONG_COLUMN).setCellEditor(new JListTableEditor());\n\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellRenderer(new JListTableRenderer());\n table.getColumnModel().getColumn(JSoundsMainWindowViewController.LAST_PLAYED_SONG_COLUMN).setCellEditor(new JListTableEditor()); \n }", "public Complementos() {\n initComponents();\n String cabecera []={\"Producto\",\"Precio\"};\nString datos[][]={};\nboolean t=true;\nboolean f=false;\nmodelo = new Tablachida(datos,cabecera);\ntabla.setModel(modelo);\nTableColumnModel columnModel = tabla.getColumnModel();\ncolumnModel.getColumn(0).setPreferredWidth(250);\ntabla.setRowHeight(40);\n\n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < inc.length; i++) {\n\t\t\t\t\tg.setColor(new Color(220 - i * 50, 220 - i * 50, 220 - i * 50));\n\t\t\t\t\tg.fillOval(inc[i][0], inc[i][1], 30, 30);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.yellow);\n\t\t\t\tg.fillOval(x, h, 30, 30);\n\n\t\t\t\t// 장애물\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.fillRect(0, 480, 800, 20);\n\t\t\t\tg.fillRect(400, 200, 50, 300);\n\t\t\t\tg.fillRect(300, 350, 100, 30);\n\t\t\t\t//\n\t\t\t\tGraphics2D g2 = bi.createGraphics();\n//\t\t\t\tthis.paintAll(g2);\n\t\t\t}", "private void esconderBotao() {\n\t\tfor (int i = 0; i < dificuldade.getValor(); i++) {// OLHAM TODOS OS BOTOES\r\n\t\t\tfor (int j = 0; j < dificuldade.getValor(); j++) {\r\n\t\t\t\tif (celulaEscolhida(botoes[i][j]).isVisivel() && botoes[i][j].isVisible()) {// SE A CELULA FOR VISIVEL E\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// O BOTAO FOR VISIVEL,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ESCONDE O BOTAO\r\n\t\t\t\t\tbotoes[i][j].setVisible(false);//DEIXA BOTAO INVISIVEL\r\n\t\t\t\t\tlblNumeros[i][j].setVisible(true);//DEIXA O LABEL ATRAS DO BOTAO VISIVEL\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setTable(){\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void Win() {\n\t\tfor (int i=0; i<x; i++) {\n\t\t\tfor (int j=0; j<y; j++) {\n\t\t\t\tif (!this.c[i][j].uncovered) {\n\t\t\t\t\tif (this.c[i][j].valeur==-1) {\n\t\t\t\t\t\t//Aggrandir la taille de police des cases minées\n\t\t\t\t\t\tthis.c[i][j].setFont(\n\t\t\t\t\t\t\tthis.c[i][j].getFont().deriveFont(\n\t\t\t\t\t\t\t\tthis.c[i][j].getFont().getStyle(), 40\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tthis.c[i][j].removeMouseListener(this.c[i][j].a);\n\t\t\t\t\t\tthis.c[i][j].setText(\"\\u2620\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.c[i][j].Uncover();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public CetakPenjualan() {\n initComponents();\ntampilDataPen();\nthis.setResizable(false);\n }", "private void continuarInicializandoComponentes() {\n javax.swing.table.TableColumn columna1 = tablaDetalle.getColumn(\"Id\");\n columna1.setPreferredWidth(10); \n javax.swing.table.TableColumn columna2 = tablaDetalle.getColumn(\"Tipo\");\n columna2.setPreferredWidth(250); \n javax.swing.table.TableColumn columna3 = tablaDetalle.getColumn(\"Número\");\n columna3.setPreferredWidth(50); \n DefaultTableCellRenderer tcrr = new DefaultTableCellRenderer();\n tcrr.setHorizontalAlignment(SwingConstants.RIGHT);\n DefaultTableCellRenderer tcrc = new DefaultTableCellRenderer();\n tcrc.setHorizontalAlignment(SwingConstants.CENTER);\n tablaDetalle.getColumnModel().getColumn(0).setCellRenderer(tcrc);\n tablaDetalle.getColumnModel().getColumn(2).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(3).setCellRenderer(tcrr);\n tablaDetalle.getColumnModel().getColumn(4).setCellRenderer(tcrr);\n }", "public void mouseClicked(MouseEvent e) {\n if(e.getSource()==jtf[mlp1][mlp2]){\n if(!e.isControlDown()){\n if(e.getSource()!=jtf[txp1][txp2] || !isEditing)\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 setNotSelected();\n jtf[i][j].setBackground(Color.white);\n cellSelCounter=1;\n }\n if(e.getClickCount()==3){ // dar surati ke sebar-\n jtf[mlp1][mlp2].grabFocus(); // -click shawad, matne dakhele-\n jtf[mlp1][mlp2].setEnabled(true); // -khaneye excel, entekhab mishawad.\n jtf[mlp1][mlp2].setBackground(Color.yellow);\n jtf[mlp1][mlp2].select(0, 20);\n setEdit();\n setNotSelected();\n setNotSaved();\n setTxp(mlp1, mlp2);\n }// payane if(e.getClickCount()==3).\n if(e.getClickCount()==2){ // dar surate DoubleClick-\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); // alamat gozari mishawad.\n }// payane if(e.getClickCount()==2).\n if(e.getClickCount()==1){\n if(jtf[mlp1][mlp2].getBackground()!=Color.yellow){\n jtf[mlp1][mlp2].setBackground(Color.blue);\n setSelected();\n setNotEdit();\n }\n }\n }// payane if(!e.isControlDown()).\n }// payane if marbut be Khane haye Excel.\n if(e.getSource()==jmEdit) // agar bar rue menuye Edit click shawad-\n jmEdit.grabFocus(); // -angah Focus ra dar ekhtiyar migirad.\n if(e.getSource()==jmFunction) // agar bar rue menuye Function click shawad-\n jmFunction.grabFocus(); // -angah Focus ra dar ekhtiyar migirad.\n if(e.getSource()==jmFile) // agar bar rue menuye File click shawad-\n jmFile.grabFocus(); // -angah Focus ra dar ekhtiyar migirad.\n }", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public abstract boolean isOneCell();", "@Override\r\n\t/**\r\n\t * metodo para las acciones dentro del juego\r\n\t */\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\n\t\tticks++;\r\n\t\t//que pasa si el juego empieza\r\n\t\tif (started)\r\n\t\t{ \r\n\t\t\t//pinta las columnas\r\n\t\t\tfor (int i = 0; i < columns.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tRectangle column = columns.get(i);\r\n\t\t\t\t//aparicion de las columnas\r\n\t\t\t\tcolumn.x -= speed;\r\n\t\t\t}\r\n\t\t\t//control del salto\r\n\t\t\tif (ticks % 2 == 0 && yMotion < 15)\r\n\t\t\t{\r\n\t\t\t\tyMotion += 2;\r\n\t\t\t}\r\n\t\t\t//limpia las columnas que han pasado y crea de nuevas\r\n\t\t\tfor (int i = 0; i < columns.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tRectangle column = columns.get(i);\r\n\r\n\t\t\t\tif (column.x + column.width < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcolumns.remove(column);\r\n\r\n\t\t\t\t\tif (column.y == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\taddColumn(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//direccion en la que salta el pajaro\r\n\t\t\tif (Menu.dificultad == \"Invertido\") {\r\n\t\t\t\t//aqui al saltar baja\r\n\t\t\t\tbird.y -= yMotion;\r\n\t\t\t}else {\r\n\t\t\t\t//aqui al saltar sube\r\n\t\t\t\tbird.y += yMotion;\r\n\t\t\t}\r\n\r\n\t\t\t// Sirve para la puntuacion, por error de sumar 2\r\n\t\t\tint a;\r\n\t\t\tint b;\r\n\t\t\t\r\n\t\t\tfor (Rectangle column : columns)\r\n\t\t\t{\t\r\n\t\t\t\tif (Menu.dificultad == \"dificil\") {\r\n\t\t\t\t\ta = 5;\r\n\t\t\t\t\tb = 10;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ta = 10;\r\n\t\t\t\t\tb = 5;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (column.y == 0 && bird.x + bird.width / 2 > column.x + column.width / 2 - a && bird.x + bird.width / 2 < column.x + column.width / 2 + b)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\treprocol.Play();\r\n\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Error: \" + e1.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscore++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//cuando toca columna\r\n\t\t\t\tif (column.intersects(bird))\r\n\t\t\t\t{\r\n\t\t\t\t\t//muere\r\n\t\t\t\t\tgameOver = true;\r\n\r\n\t\t\t\t\tif (bird.x <= column.x)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbird.x = column.x - bird.width;\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\ttry {\r\n\t\t\t\t\t\t\t//para el sonido de las columnas\r\n\t\t\t\t\t\t\treprocol.Stop();\r\n\t\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (column.y != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbird.y = column.y - bird.height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (bird.y < column.height)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbird.y = column.height;\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\r\n\r\n\t\t\tif (bird.y > HEIGHT - 120 || bird.y < 0)\r\n\t\t\t{\r\n\t\t\t\tgameOver = true;\r\n\t\t\t}\r\n\r\n\t\t\tif (bird.y + yMotion >= HEIGHT - 120)\r\n\t\t\t{\r\n\t\t\t\tbird.y = HEIGHT - 120 - bird.height;\r\n\t\t\t\tgameOver = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\trenderer.repaint();\r\n\t}", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "@Override\n public void mouseClicked(MouseEvent e) {\n int fila_point = tabla_resultados.rowAtPoint(e.getPoint());\n int columna_point = tabla_resultados.columnAtPoint(e.getPoint());\n\n if (fila_point > -1 && columna_point == 2) {\n codigo2 = (String) model.getValueAt(fila_point, columna_point = 0);\n descripcion = (String) model.getValueAt(fila_point, columna_point = 1);\n InformacionFresaRadios informacionfresaradios = new InformacionFresaRadios();\n informacionfresaradios.setVisible(true);\n codigo2 = \"\";\n }\n\n if (fila_point > -1 && columna_point == 3) {\n pdf.contar();\n if (pdf.limite <= 49) {\n codigo2 = (String) model.getValueAt(fila_point, columna_point = 0);\n descripcion = (String) model.getValueAt(fila_point, columna_point = 1);\n String canti = JOptionPane.showInputDialog(null, \"¿Cuantas unidades del codigo \" + codigo2 + \"\\n desea agregar a la cotización?\", \"Cantidad\", JOptionPane.QUESTION_MESSAGE);\n if (isNumeric(canti)) {\n k = Integer.parseInt(canti);\n } else {\n System.out.println(\"no es posible transformar el string\" + canti + \"a un número entero\");\n }\n boolean n = isNumeric(canti);\n if (isNumeric(canti) && n == true && k > 0) {\n pdf.AddRowToJTable(new Object[]{\"\", codigo2, \"\", \"\", \"\", \"\", canti});\n pdf.cargar_nombre();\n pdf.calcular_total();\n } else {\n JOptionPane.showMessageDialog(null, \"Debe ingresar un valor numérico mayor a 0\", \"Advertencia\", HEIGHT);\n }\n } else {\n JOptionPane.showMessageDialog(null, \"No es posible agregar mas items a la cotización\", \"Advertencia\", HEIGHT);\n }\n }\n }", "private void setzeBeschriftungen(){ \t\t\t\n\t\tif (jRBtnLinie.isSelected()) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// wenn linie gewählt ist: ..\n\t\t\tjLPositionX1.setText(\"Startpunkt x:\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// .. verschiedene labels für die textfelder anpassen für parameter-werte (x1,y1,x2,y2) [y1 bleibt immer gleich]\n\t\t\tjLPositionX2.setText(\"Endpunkt x:\");\n\t\t\tjLPositionY2.setText(\" y:\");\n\t\t} else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// wenn rechteck, oval, kreis:..\n\t\t\tjLPositionX1.setText(\"Position x:\");\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ... labels anpassen auf parameter-werte (x1, y1, breite, höhe) [y1 bleibt immer gleich]\t\t\t\t\n\t\t\tjLPositionX2.setText(\"Breite:\");\n\t\t\tjLPositionY2.setText(\"Höhe:\");\n\t\t}\n\t}", "private void showCells(Integer x, Integer y){\n if(cells[x][y].getBombCount()!=0){\n return;\n }\n if (x >= 0 && x < grid.gridSize-1 && y >= 0 && y < grid.gridSize && !cells[x + 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x + 1][y]);\n\n if (x > 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize && !cells[x - 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x - 1][y]);\n\n if (x >= 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize-1 && !cells[x][y + 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y + 1]);\n\n if (x >= 0 && x < grid.gridSize && y > 0 && y < grid.gridSize && !cells[x][y - 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y - 1]);\n }", "public Cell(){\n \tthis.shot=false;\n }", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "public void atualizaJogo() {\n\t\t \t int[][] tabuleiro = new int[4][4];\n\t\t \t tabuleiro = jogo.getTabuleiro();\n\t\t \t \n\t\t \t for(int i = 0; i < 4; i++) {\n\t\t \t\t\tfor(int j = 0; j < 4; j++) {\n\t\t \t\t\t\tif(tabuleiro[i][j] == 0) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/0.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 4) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/4.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 8) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/8.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 16) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/16.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 32) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/32.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 64) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/64.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 128) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/128.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 256) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/256.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 512) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/512.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 1024) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/1024.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t\tif(tabuleiro[i][j] == 2048) {\n\t\t \t\t\t\t\tbotao[i][j].setIcon(new ImageIcon(\"src/Imagens/2048.jpg\"));\n\t\t \t\t\t\t}\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t }", "private void tablesice() {\n //Modificamos los tamaños de las columnas.\n tablastock.getColumnModel().getColumn(0).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(1).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(2).setMinWidth(100);\n tablastock.getColumnModel().getColumn(3).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(4).setMaxWidth(70);\n tablastock.getColumnModel().getColumn(5).setMaxWidth(70);\n }", "@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }", "private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }", "public InterfazdelJuego() {\n super(\"Batalla de acorazados 1.0\");\n initComponents();\n stickers=new JLabel[10][10];\n setLocationRelativeTo(null);\n llenarMapa();\n cajaDeTexto.setBackground(Color.BLACK);\n cajaDeTexto.setForeground(Color.CYAN);\n \n \n }", "private void vulKeuzeBordIn()\n {\n String[] lijstItems = dc.geefLijstItems();\n for (int i = 0; i < canvasKeuzeveld.length; i++)\n {\n for (int j = 0; j < canvasKeuzeveld[i].length; j++)\n {\n GraphicsContext gc = canvasKeuzeveld[i][j].getGraphicsContext2D();\n //checkImage(j + 1, gc);\n vulIn(lijstItems[j], gc);\n }\n }\n //dc.geefLijstItems();\n }", "public void paramTable() {\n jTable2.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_SUBSEQUENT_COLUMNS);\n mode = (DefaultTableModel) jTable2.getModel();\n dtcm = (DefaultTableColumnModel) jTable2.getColumnModel();\n\n jTable2.setRowHeight(40);\n largeurColoneMax(dtcm, 0, 70);\n largeurColoneMax(dtcm, 3, 50);\n largeurColoneMax(dtcm, 4, 100);\n largeurColoneMax(dtcm, 6, 90);\n largeurColoneMax(dtcm, 9, 70);\n\n TableCellRenderer tbcProjet = getTableCellRenderer();\n TableCellRenderer tbcProjet2 = getTableHeaderRenderer();\n for (int i = 0; i < jTable2.getColumnCount(); i++) {\n TableColumn tc = jTable2.getColumnModel().getColumn(i);\n tc.setCellRenderer(tbcProjet);\n tc.setHeaderRenderer(tbcProjet2);\n\n }\n\n }", "public JPanelChuyen() {\n initComponents();\n thoiGianDao = new ThoiGianHoatDongDao();\n tbmChuyen = (DefaultTableModel) jtbChuyen.getModel();\n dpNgayBatDau.setEnabled(false);\n ChuyenDao.loadDSChuyenVaoBang(LopKetNoi.select(\"select * from Chuyen\"), tbmChuyen);\n }", "public void setGFXCell(GFXDataCell gfxCell);", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "private void lightAvailable(Cell myCell, Button myButton) {\n Platform.runLater(() -> {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j].setDisable(true);\n }\n }\n int x = myCell.getX();\n int y = myCell.getY();\n myButton.setDisable(false);\n myButton.setStyle(\"-fx-border-color:red\");\n myButton.setDisable(true);\n for (int i = x - 1; i < x + 2; i++) {\n for (int j = y - 1; j < y + 2; j++) {\n //control if the cell exists\n if (((i != x) || (j != y)) && (i >= 0) && (i <= 4) && (j >= 0) && (j <= 4)) {\n //control there is not dome\n if ((!getTable().getTableCell(i, j).isComplete())) {\n //control there is not a pawn of my same team\n if (!((getTable().getTableCell(i, j).getPawn() != null) &&\n (getTable().getTableCell(i, j).getPawn().getIdGamer() == myCell.getPawn().getIdGamer()))) {\n cells.add(getTable().getTableCell(i, j));\n }\n }\n }\n }\n }\n if (getGod().getName().equalsIgnoreCase(\"zeus\") && effetto && currentMove.getAction() == Mossa.Action.BUILD) {\n myButton.setStyle(\"-fx-border-color:blue\");\n myButton.setDisable(false);\n myButton.setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:yellow\");\n });\n myButton.setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:blue\");\n });\n } else {\n for (Cell lightMe : cells) {\n\n bt[lightMe.getX()][lightMe.getY()].setDisable(false);\n bt[lightMe.getX()][lightMe.getY()].setStyle(\"-fx-border-color:yellow\");\n int a = lightMe.getX();\n int b = lightMe.getY();\n initButtons();\n bt[a][b].setOnAction(e -> {\n for (int c = 0; c < 5; c++) {\n for (int d = 0; d < 5; d++) {\n bt[c][d].setStyle(\"-fx-border-color:trasparent\");\n initButtons();\n }\n }\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:red\");\n button.setOnMouseClicked(null);\n button.setOnMouseEntered(null);\n button.setOnMouseExited(null);\n int x1 = GridPane.getRowIndex(button);\n int y1 = GridPane.getColumnIndex(button);\n aggiornaMossa(table.getTableCell(x1, y1));\n Platform.runLater(() -> {\n submitAction.setDisable(false);\n });\n });\n\n }\n }\n });\n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tint row = table.getSelectedRow();\n\t\t\t\tint col = table.getSelectedColumn();\n\t\t\t\tString masv = (String) table.getValueAt(row, 0);\n\t\t\t\tString hoten = (String) table.getValueAt(row, 1);\n\t\t\t\tString ngaysinh = (String) table.getValueAt(row, 2);\n\t\t\t\tString gioitinh = (String) table.getValueAt(row, 3);\n\t\t\t\tString diachi = (String) table.getValueAt(row, 4);\n\t\t\t\tString malop = (String) table.getValueAt(row, 5);\n\t\t\t\ttxt_masv.setText(masv);\n\t\t\t\ttxt_hoten.setText(hoten);\n\t\t\t\ttxt_ngaysinh.setText(ngaysinh);\n\t\t\t\ttxt_gioitinh.setText(gioitinh);\n\t\t\t\ttxt_diachi.setText(diachi);\n\t\t\t\ttxt_malop.setText(malop);\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void funkcie() {\n\t\tTableColumn<Znamka, String> datumColumn = new TableColumn<>(\"Datum pisomky\");\n\t\tdatumColumn.setMinWidth(velkostPolickaX - 1);\n\t\tdatumColumn.setCellValueFactory(new PropertyValueFactory<>(\"datumS\"));\n\n\t\tTableColumn<Znamka, Double> hodnotaColumn = new TableColumn<Znamka, Double>(\"Hodnota\");\n\t\thodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\thodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"hodnotaS\"));\n\n\t\tTableColumn<Znamka, Double> maxHodnotaColumn = new TableColumn<Znamka, Double>(\"Max. Hodnota\");\n\t\tmaxHodnotaColumn.setMinWidth(velkostPolickaX - 1);\n\t\tmaxHodnotaColumn.setCellValueFactory(new PropertyValueFactory<>(\"maxHodnotaS\"));\n\n\t\ttabulkaZiak.getColumns().addAll(hodnotaColumn, maxHodnotaColumn, datumColumn);\n\n\t\tvyberPredmetov.setItems(((Ziak) aktualnyPouzivatel).vratMenoPredmetov());\n\t\tvyberPredmetov.getSelectionModel().selectedIndexProperty()\n\t\t\t\t.addListener((ChangeListener<Number>) (ov, value, new_value) -> {\n\t\t\t\t\ttabulkaZiak.setItems(((Ziak) aktualnyPouzivatel).vratZnamkyPredmetu((int) new_value));\n\t\t\t\t});\n\t\tvyberPredmetov.getSelectionModel().selectFirst();\n\t}", "private void tbnthemActionPerformed(java.awt.event.ActionEvent evt) {\n \n if(PrimaryKeyMa()== true)\n \n { \n if(cboloai.getSelectedIndex() == 0 ) \n {\n \n try {\n danhsach.themGV( new GVCoHuu( ChuyenStringSangDate(tfngayvao.getText()) , Double.parseDouble(tfluongcb.getText()) , tfma.getText().trim(),tften.getText().trim(), Integer.parseInt(tfsogio.getText()), gt) );\n } catch (ParseException ex) {\n Logger.getLogger(GiaoDien.class.getName()).log(Level.SEVERE, null, ex);\n }\n } \n else {\n danhsach.themGV( new GVThinhGiang( tfmahopdong.getText().trim() , tfma.getText().trim(),tften.getText().trim() , Integer.parseInt(tfsogio.getText()), gt));\n } \n lberrorma.setText(null);\n RemoveAllTable();\n napDulieu();\n Refresh();\n EnabledXoa();\n }else {\n tfma.setText(null);\n lberrorma.setText(\"Mã đã tồn tại !\");\n }\n \n }", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tint row = table1.getSelectedRow();\n\t\t\t\tint col = table1.getSelectedColumn();\n\t\t\t\tString magv = (String) table1.getValueAt(row, 0);\n\t\t\t\tString tengv = (String) table1.getValueAt(row, 1);\n\t\t\t\tString gioitinh = (String) table1.getValueAt(row, 2);\n\t\t\t\tString phone = (String) table1.getValueAt(row, 3);\n\t\t\t\tString email = (String) table1.getValueAt(row, 4);\n\t\t\t\tString phanloaigv = (String) table1.getValueAt(row, 5);\n\t\t\t\ttxt_magv.setText(magv);\n\t\t\t\ttxt_tengv.setText(tengv);\n\t\t\t\ttxt_gioitinhgv.setText(gioitinh);\n\t\t\t\ttxt_phone.setText(phone);\n\t\t\t\ttxt_email.setText(email);\n\n\t\t\t\ttxt_phanloaigv.setText(phanloaigv);\n\n\t\t\t}", "private void botol() {\n if (liter==0){\n\n wliter.setText(\"1L\");\n wbattery.setImageResource(R.drawable.ic_battery_20);\n Toast.makeText(this,\"Air Sedikit\", Toast.LENGTH_SHORT).show();\n }\n else if (liter==1){\n wliter.setText(\"2L\");\n wbattery.setImageResource(R.drawable.ic_battery_50);\n\n }\n else if (liter==2){\n wliter.setText(\"3L\");\n wbattery.setImageResource(R.drawable.ic_battery_60);\n\n }\n else if (liter==3){\n wliter.setText(\"4L\");\n wbattery.setImageResource(R.drawable.ic_battery_80);\n ;\n }\n else if (liter==4){\n wliter.setText(\"5L\");\n wbattery.setImageResource(R.drawable.ic_battery_90);\n\n }\n else if (liter==5){\n wliter.setText(\"6L\");\n wbattery.setImageResource(R.drawable.ic_battery_full);\n Toast.makeText(this,\"Air Sudah Penuh\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }", "protected abstract void narisi(Graphics2D g, double wPlatno, double hPlatno);", "public void updateGridX();", "private void popuniTabelu() {\n try {\n List<PutnikEntity> putnici=Controller.vratiSvePutnike();\n TableModel tm=new PutnikTableModel(putnici);\n jtblPutnici.setModel(tm);\n } catch (Exception ex) {\n Logger.getLogger(FIzaberiLet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void mouseEntered(MouseEvent e) {\n int creasing=0;\n\n if (isDraging){ // agar bar ruye khane ha Draging surat girad, khaneha entekhab migardand.\n setCopying(); // copy otomatik anjam pazir ast.\n setNotSaved();\n if(mlpp1<mlp1){ // baraye harekate be paein.\n for(int p=mlpp1;p<=mlp1; p++){\n if(mlpp2<mlp2) // baraye harekat be rast wa paein.\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.blue);\n setNotCopying();\n setNotAutoCopy();// copy otomatik anjam pazir nist chon bish az yek sotun entekhab shode ast.\n ++cellSelCounter;\n }\n if(mlpp2>mlp2) // baraye harekat be chap wa paein.\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.blue);\n ++cellSelCounter;\n setNotCopying();\n setNotAutoCopy();// copy otomatik anjam pazir nist chon bish az yek sotun entekhab shode ast.\n }\n jtf[p][mlpp2].setBackground(Color.blue);\n if(e.getSource()==jtf[mlp1][mlp2])// agar Object khane bashad, gosheye paen samte rast baresi mishawad.\n if((tmpx>=(3*jtf[0][0].getWidth()/4)) && tmpy>=(3*jtf[0][0].getHeight()/4) &&isCopying){\n if(isAutoCopying){\n jtf[mlp1][mlp2].setText(\"\"+(long)(allNum[index-1]+dfc*creasing));\n creasing++;\n }else{\n jtf[mlp1][mlp2].setText(allText[txtCreasing]);\n if(txtCreasing>txtIndex-1)\n txtCreasing=0;\n }\n }else{\n setNotAutoCopy();\n setNotCopying();\n }\n ++cellSelCounter;\n }//payane for(int p=mlpp1;p<=mlp1; p++).\n if(!isAutoCopying && isCopying)\n txtCreasing++;\n } // payane harekat be paein.\n if(mlpp1>mlp1){ // baraye harekat be bala.\n for(int p=mlpp1;p>=mlp1; p--){\n if(mlpp2<mlp2) // baraye harekat be bala samte rast.\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.blue);\n setNotCopying();\n setNotAutoCopy();\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye harekat be bala samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.blue);\n setNotCopying();\n setNotAutoCopy();\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.blue);\n ++cellSelCounter;\n }\n } // payane harekat be bala\n if(mlpp2<mlp2){ // baraye harekat fagat be rast\n for(int k=mlpp2 ; k<=mlp2;k++){\n jtf[mlpp1][k].setBackground(Color.blue);\n if(e.getSource()==jtf[mlp1][mlp2])// baraye gusheye paeine khane samte rast\n if((tmpx>=(3*jtf[0][0].getWidth()/4)) && tmpy>=(3*jtf[0][0].getHeight()/4) && isCopying){\n if(isAutoCopying){\n jtf[mlp1][mlp2].setText(\"\"+(long)(allNum[index-1]+dfc*creasing));\n creasing++;\n }else{\n jtf[mlp1][mlp2].setText(allText[txtCreasing]);\n if(txtCreasing>txtIndex-1)\n txtCreasing=0;\n }\n }else{\n setNotAutoCopy();\n setNotCopying();\n }\n ++cellSelCounter;\n }\n if(!isAutoCopying && isCopying)\n txtCreasing++;\n } // payane harekat fagat be rast\n if(mlpp2>mlp2) // fagat baraye harekat be chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[mlpp1][k].setBackground(Color.blue);\n ++cellSelCounter;\n }\n } // payane amale Dragin\n if(e.getSource()==jtf[mlp1][mlp2] && !isEditing)\n jp.grabFocus();\n if (e.getSource()==jmEdit){ // fagat dar surate wojude khaneye gable neweshtan-\n if (isEditing){ // -menuye Edit Fa'al mishawad.\n jmiCut.setEnabled(true);\n jmiCopy.setEnabled(true);\n jmiPaste.setEnabled(true);\n }\n else{\n jmiCut.setEnabled(false);\n jmiCopy.setEnabled(false);\n jmiPaste.setEnabled(false);\n }\n jmEdit.grabFocus();\n }\n if(e.getSource()==jmFunction){\n setNotSelected();\n setNotEdit();\n jmFunction.grabFocus();\n for(int i=0; i<30; i++)\n for(int j=0; j<26; j++){ // khanehaye zard bayad abi shawand.\n if(jtf[i][j].getBackground()==Color.yellow){\n jtf[i][j].setBackground(Color.blue);\n jtf[i][j].setEnabled(false);\n }\n if(jtf[i][j].getBackground()==Color.blue) // agar khaneye abi wojud dasht-\n setSelected(); // -angah Function bayad fa'al shawad.\n }\n if(!isSelected){// fa'al wa geyre fa'al sazi menuye Function.\n jmiMax.setEnabled(false);\n jmiMin.setEnabled(false);\n jmiSum.setEnabled(false);\n jmiAve.setEnabled(false);\n jmiCount.setEnabled(false);\n }\n else{\n jmiMax.setEnabled(true);\n jmiMin.setEnabled(true);\n jmiSum.setEnabled(true);\n jmiAve.setEnabled(true);\n jmiCount.setEnabled(true);\n }\n }// payane jmiFunction.\n }", "public ekran() {\n initComponents();\n jTable2.setVisible(false);\n setBackground(Color.GREEN);\n setTitle(\"Agencja Nieruchomości\");\n setResizable(false);\n jTextArea1.setCaretPosition(jTextArea1.getDocument().getLength());\n ImageIcon imic = new ImageIcon(getClass().getResource(\"/images/Icon.png\"));\n Image img = imic.getImage();\n this.setIconImage(img);\n //connection = new connection(); // Zainisjowanie komponentu connection definiującego metody start_connectio i stop_connection\n \n }", "public void statoIniziale()\n {\n int r, c;\n for (r=0; r<DIM_LATO; r++)\n for (c=0; c<DIM_LATO; c++)\n {\n if (eNera(r,c))\n {\n if (r<3) // le tre righe in alto\n contenutoCaselle[r][c] = PEDINA_NERA;\n else if (r>4) // le tre righe in basso\n contenutoCaselle[r][c] = PEDINA_BIANCA;\n else contenutoCaselle[r][c] = VUOTA; // le 2 righe centrali\n }\n else contenutoCaselle[r][c] = VUOTA; // caselle bianche\n }\n }", "public void tampil_tb_mahasiswa(){\n Object []baris = {\"No Bp\",\"Nama\",\"Tempat Lahir\",\"Tanggal Lhair\",\"Jurusan\",\"Tanggal Masuk\"};\n tabmode = new DefaultTableModel(null, baris);\n //tb_mahasiswa.setModel(tabmode);\n try {\n Connection con = new koneksi().getConnection();\n String sql = \"select * from tb_mahasiswa order by no_bp asc\";\n java.sql.Statement stat = con.createStatement();\n java.sql.ResultSet hasil = stat.executeQuery(sql);\n while (hasil.next()){\n String no_bp = hasil.getString(\"no_bp\");\n String nama = hasil.getString(\"nama\");\n String tempat_lahir = hasil.getString(\"tempat_lahir\");\n String tanggal_lahir = hasil.getString(\"tanggal_lahir\");\n String jurusan = hasil.getString(\"jurusan\"); \n String tanggal_masuk = hasil.getString(\"tanggal_masuk\");\n String[] data = {no_bp, nama, tempat_lahir, tanggal_lahir, jurusan, tanggal_masuk};\n tabmode.addRow(data);\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Menampilkan data GAGAL\",\"Informasi\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "@Override\r\n\t\t\t\t public boolean isCellEditable(int row, int column) {\n\t\t\t\t return column == 3 || column == 4;\r\n\t\t\t\t }", "public AfficheEleve() {\n try {\n Connector1.initialise();\n // UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n initComponents();\n paramTable();\n this.setVisible(true);\n this.setSize(MainFrame.jDesktopPane1.getWidth() - 50, MainFrame.jDesktopPane1.getHeight() - 50);\n effaceTable(jTable2, mode);\n affiche();\n clouleurFondEcran();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"ERROR \\n\" + e.getMessage());\n }\n\n\n }", "public void pulisci() {\n Cella c;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n c = getElementAt(griglia, i, j);\n c.cerchio.setVisible(false);\n }\n }\n }", "public void setCell(boolean upR, boolean upL, boolean doR, boolean doL){\n upperRight = upR;\n upperLeft = upL;\n downerRight = doR;\n downerLeft = doL;\n }", "private void mostraResultado() {\n int linha = jTableResultados.getSelectedRow();\n if (linha >= 0) {\n int a = new Integer(\"\" + jTableResultados.getValueAt(linha, 0));\n double c0 = Double.parseDouble(\"\" + jTableResultados.getValueAt(linha, 1));\n double c1 = Double.parseDouble(\"\" + jTableResultados.getValueAt(linha, 2));\n telaSemivariograma.getJTextFieldAlcance().setText(\"\" + a);\n telaSemivariograma.getJTextFieldEfeitoPepita().setText(\"\" + c0);\n telaSemivariograma.getJTextFieldContribuicao().setText(\"\" + c1);\n telaSemivariograma.getJSliderAlcance().setValue(a);\n telaSemivariograma.getJSliderEfeitoPepita().setValue((int) (c0 * 10000));\n telaSemivariograma.getJSliderContribuicao().setValue((int) (c1 * 10000));\n if (telaSemivariograma.isVisible()) {\n telaSemivariograma.setVisible(false);\n }\n telaSemivariograma.setVisible(true);\n }\n }", "@Override\n public void run() {\n viewDelegate.setView(cell, 'O');\n isPlayerTurn = true;\n }", "public char drawCell ()\n {\n final char ALIVE_SYMBOL = '\\u25A0';\n final char DEAD_SYMBOL = '\\u25A1';\n if (cellStatus)\n {\n return ALIVE_SYMBOL;\n }\n else\n {\n return DEAD_SYMBOL;\n }// end of if (cellStatus)\n }", "private void setMediumDifficultyGridUp1(){\n\t\tmediumDifficulty1 = new SudokuGrid();\n\t\tCell[][] _matrix = {{new Cell(6), new Cell(0), new Cell(0), new Cell(0), new Cell(1), new Cell(0), new Cell(0), new Cell(7), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(8), new Cell(0), new Cell(5), new Cell(7), new Cell(0), new Cell(0), new Cell(0), new Cell(4), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(2), new Cell(0), new Cell(5), new Cell(0), new Cell(0), new Cell(6), new Cell(0), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(3), new Cell(0), new Cell(0), new Cell(0), new Cell(4), new Cell(7), new Cell(0), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(7), new Cell(0), new Cell(0), new Cell(3), new Cell(0), new Cell(8), new Cell(0), new Cell(0), new Cell(2)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(0), new Cell(9), new Cell(1), new Cell(0), new Cell(0), new Cell(0), new Cell(5), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(0), new Cell(2), new Cell(0), new Cell(0), new Cell(1), new Cell(0), new Cell(8), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(7), new Cell(0), new Cell(0), new Cell(0), new Cell(5), new Cell(3), new Cell(0), new Cell(6)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(6), new Cell(0), new Cell(0), new Cell(2), new Cell(0), new Cell(0), new Cell(0), new Cell(7)}};\n\t\tmediumDifficulty1.set_matrix(_matrix);\n\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tObject ob=e.getSource();\r\n\t\tif(ob==b1)\r\n\t\t{\r\n\t\t\tObject data[]= {\"111\",\"222\",333,\"444\"};\r\n\t tm.addRow(data);\r\n\t\t}else if(ob==b2)\r\n\t\t{\r\n\t\t\tObject data[]= {\"가가가\",\"나나나\",333,\"다다다\"};\r\n\t tm.addRow(data);\r\n\t\t}\r\n\t}", "private void vulTabel() {\n\t\ttblSessies.setItems(sc.getSessieObservableLijst());\n\t\tclnTitel.setCellValueFactory(cel -> cel.getValue().getTitelProperty());\n\t\tclnVerantwoordelijke.setCellValueFactory(cel -> cel.getValue().getVerantwoordelijkeNaamProperty());\n\t\tclnStartdatum.setCellValueFactory(cel -> cel.getValue().getStartDatumProperty());\n\t\tclnDuur.setCellValueFactory(cel -> cel.getValue().getDuurProperty());\n\t\ttblSessies.getSelectionModel().selectedItemProperty().addListener((obs, oldV, newV) -> {\n\t\t\tsc.setSessie(newV);\n\t\t});\n\t\tthis.setVgrow(tblSessies, Priority.SOMETIMES);\n\t}", "public static void spelen() {\n\t\tfor(int x=0;x<10;x++){\n\t\t\tfor(int y=0;y<10;y++){\n\t\t\t\tspelerGridArray[x][y] = 0;\n\t\t\t}\n\t\t}\n\t\tmainPanel.grid1.buttonListener();\n\t\tmainPanel.grid1.enabledGrid(true);\n\t\tmainPanel.grid2.enabledGrid(false);\n\t}", "public interface Cell<T> {\n /**\n * находится ли в данной ячейке бомба\n */\n boolean isBomb();\n\n /**\n * игрок предположил, что в данной ячейку бомба\n */\n boolean isBombCell();\n\n /**\n * игрок предположил, что данная ячейка пустая\n */\n boolean isEmptyCell();\n\n /**\n * устанавливаем значение, что в ячейке бомба\n */\n void BombCell();\n\n /**\n * устанавливаем значение пустой ячейки\n */\n void EmptyCell();\n\n /**\n * рисуем ячейку\n */\n void draw(T point, boolean real);\n}", "@Override\r\n public void paint(Graphics g) {\n super.paint(g);\r\n Color col = new Color(255, 255, 255);//color gris\r\n g.drawLine(0, 20, 245, 20);//pinta una linea en la parte superior de la ventana\r\n Dimension size = getSize();//encapsula el tamñao de un objeto\r\n int parteSuperiorTablero = (int) size.getHeight() - altoTablero * alturaPieza();\r\n\r\n for (int i = 0; i < altoTablero; ++i) {\r\n for (int j = 0; j < anchoTablero; ++j) {\r\n PiezasTetris pieza = dimensionar(j, altoTablero - i - 1);\r\n if (pieza != PiezasTetris.NoPieza) {\r\n pintarPiezas(g, 0 + j * anchoPieza(),\r\n parteSuperiorTablero + i * alturaPieza(), pieza);\r\n }\r\n }\r\n }\r\n\r\n if (piezaActual.getPieza() != PiezasTetris.NoPieza) {\r\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n pintarPiezas(g, 0 + x * anchoPieza(),\r\n parteSuperiorTablero + (altoTablero - y - 1) * alturaPieza(),\r\n piezaActual.getPieza());\r\n }\r\n }\r\n }", "private void actionBiggerCells() {\n layoutPanel.changeCellSize(true);\n }", "public void controlla_bersaglio() {\n\n if ((x[0] == bersaglio_x) && (y[0] == bersaglio_y)) {\n punti++;\n posiziona_bersaglio();\n }\n }" ]
[ "0.66393876", "0.6599299", "0.6520953", "0.6339712", "0.6334278", "0.6309627", "0.63094586", "0.6307593", "0.62905794", "0.6259299", "0.625329", "0.6239566", "0.62293345", "0.6178133", "0.6170946", "0.6169891", "0.61662096", "0.61396575", "0.6069441", "0.60595316", "0.6059181", "0.6056063", "0.6032562", "0.6025715", "0.6020394", "0.60124075", "0.6006685", "0.5990771", "0.598754", "0.59824157", "0.59664786", "0.5951488", "0.5944954", "0.5944736", "0.59274304", "0.5925272", "0.59214574", "0.5914859", "0.59058696", "0.5903298", "0.58926284", "0.5880427", "0.5877483", "0.58758557", "0.5857499", "0.58560807", "0.5849608", "0.58448935", "0.58388144", "0.5837021", "0.5832455", "0.5825947", "0.58202565", "0.581626", "0.58124834", "0.58089674", "0.5799934", "0.5794727", "0.5794022", "0.57834786", "0.57824653", "0.57771045", "0.57690465", "0.5764125", "0.5761959", "0.57503796", "0.57437044", "0.5740415", "0.5740112", "0.5735036", "0.5730798", "0.57278144", "0.5721652", "0.5716117", "0.57057995", "0.5705288", "0.57012147", "0.5694916", "0.56868", "0.56795573", "0.56774426", "0.5674751", "0.56741655", "0.56707203", "0.56703055", "0.56676185", "0.5664678", "0.5657769", "0.56575537", "0.5656955", "0.5653462", "0.5652079", "0.56500757", "0.564946", "0.5645318", "0.56429607", "0.5632798", "0.5626062", "0.56241065", "0.5623528", "0.56229043" ]
0.0
-1
Cek apakah cell surrounded by dirt
private boolean isSurroundedByDirtAndLava() { List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y); int i = 0; boolean isAllDirt = true; while (i < surrounding.size() && (isAllDirt)) { if (!isDirt(surrounding.get(i)) && !isLava(surrounding.get(i))) { isAllDirt = false; } else { i++; } } return isAllDirt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void drawCellID() { // draws a cross at each cell centre\n\t\tfloat xc,yc;\n\t\t//GeneralPath path = new GeneralPath();\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// Label Cell number\n\t\t\t\tTextRoi TROI = new TextRoi((int)xc, (int)yc, (\"\"+i),new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tTROI.setNonScalable(false);\n\t\t\t\tOL.add(TROI);\n\t\t\t}\n\t\t}\n\t}", "protected void narisi(Graphics2D g, double wp, double hp) {\n\n FontMetrics fm = g.getFontMetrics();\n\n int hPisava = fm.getAscent();\n\n double xColumn = 0.0;\n double yColumn = sirinaStolpca(wp, hp);\n\n for(int i = 0; i < podatki.length; i++){\n\n g.setColor(Color.ORANGE);\n g.fillRect((int)xColumn,(int)(hp - visinaStolpca(i, wp, hp)), (int) sirinaStolpca(wp, hp), (int) visinaStolpca(i, wp, hp));\n\n g.setColor(Color.RED);\n g.drawRect((int)((i)*sirinaStolpca(wp, hp)),(int) (hp-visinaStolpca(i, wp, hp)), (int)sirinaStolpca(wp, hp), (int)visinaStolpca(i, wp, hp));\n\n g.setColor(Color.BLUE);\n if(i < podatki.length - 1){\n double startCrtaX = sredinaVrha(i, wp, hp)[0];\n double startCrtaY = sredinaVrha(i, wp, hp)[1];\n\n double endCrtaX = sredinaVrha(i + 1, wp, hp)[0];\n double endCrtaY = sredinaVrha(i+1, wp, hp)[1];\n\n g.drawLine((int)startCrtaX,(int) startCrtaY,(int) endCrtaX,(int) endCrtaY);\n\n }\n\n g.setColor(Color.BLACK);\n\n String toWrite = Integer.toString(i+1);\n double wNapis=fm.stringWidth(toWrite);\n double xNapis=xColumn+(xColumn-wNapis)/2;\n double yNapisLowerLine=hp-hPisava;\n xColumn+=sirinaStolpca(wp, hp);\n g.drawString(toWrite,ri (xNapis),ri(yNapisLowerLine));\n\n }\n\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "public BoardCell draw(Graphics g, boolean specialColor) { \n\t\tx = (width * column);\n\t\ty = (height * row);\n\n\t\tif(specialColor) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\n\t\t//if is not doorway\n\t\tif(this.isWalkway) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(handleColor(Color.YELLOW, specialColor));\n\t\t\t//x, y, width, height\n\t\t\tg.fillRect(x, y, width, height);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(x, y, width, height);\n\t\t}\n\t\t\n\t\t//if is doorway\n\t\telse if (this.isDoorway && this.isRoom){\n\t\t\t//display doorway direction\n\t\t\tswitch (this.doorDirection) {\n\t\t\t//display each cell's direction image\n\t\t\tcase LEFT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width + 10, height );\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x , y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x + 20, y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y + 20, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if the cell is a room\n\t\tif(this.isRoom && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.fillRect(x, y, width, height );\n\t\t}\n\t\t//if is closet\n\t\tif(this.isCloset && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\t\t//draw the players and the player colors\n\t\tif(this.isPlayer) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(this.playerColor);\n\t\t\tg.fillOval(x, y, width, height);\n\t\t}\n\t\t\n\t\t//this displays the room name\n\t\tif(isNameDrawer && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.BLUE);\n\t\t\tg.drawString(board.getLegend().get(initial), x, y);\n\t\t\treturn this;\n\t\t} \n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public void addNotDefinedCells()\r\n {\r\n if (getCrosstabElement() == null) return;\r\n\r\n // First of all we have to calc what cells we have and in what position they are...\r\n int cellGridWidth = getCrosstabElement().getColumnGroups().size();\r\n int cellGridHeight = getCrosstabElement().getRowGroups().size();\r\n\r\n // We assume that cell D/D (detail/detail) is defined.\r\n // Cell x,y is the cell with totalColumnGroup = colums(x) and totalRowGroup the rows(y)\r\n\r\n for (int y = cellGridHeight; y >= 0; --y)\r\n {\r\n\r\n\r\n for (int x = cellGridWidth; x >= 0; --x)\r\n {\r\n\r\n String totalRowGroupName = \"\";\r\n if (y < cellGridHeight) totalRowGroupName = ((CrosstabGroup)getCrosstabElement().getRowGroups().get(y)).getName();\r\n\r\n String totalColumnGroupName = \"\";\r\n if (x < cellGridWidth) totalColumnGroupName = ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(x)).getName();\r\n\r\n CrosstabCell cell = findCell( totalRowGroupName,\r\n totalColumnGroupName);\r\n\r\n if (cell == null)\r\n {\r\n // we have to find a cell on the same row that matchs the width to inherit by...\r\n int cellHeight = getRowHeight( totalRowGroupName );\r\n int cellWidth = getColumnWidth( totalColumnGroupName );\r\n\r\n\r\n // look for a good row cell with the same width on the same row...\r\n CrosstabCell templateCell = null;\r\n for (int k=x+1; k < cellGridWidth; ++k)\r\n {\r\n templateCell = findCell( totalRowGroupName,\r\n ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(k)).getName());\r\n if (templateCell == null)\r\n {\r\n continue;\r\n }\r\n\r\n if (templateCell.getWidth() == cellWidth)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( totalRowGroupName, \"\");\r\n if (templateCell != null && templateCell.getWidth() != cellWidth) templateCell = null;\r\n }\r\n\r\n if (templateCell == null) // Look on the same column...\r\n {\r\n for (int k=y+1; k < cellGridHeight; ++k)\r\n {\r\n templateCell = findCell( ((CrosstabGroup)getCrosstabElement().getRowGroups().get(k)).getName(),\r\n totalColumnGroupName);\r\n\r\n if (templateCell.getHeight() == cellHeight)\r\n {\r\n // FOUND IT!\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( \"\", totalColumnGroupName);\r\n if (templateCell != null && templateCell.getHeight() != cellHeight) templateCell = null;\r\n }\r\n }\r\n\r\n if (templateCell == null)\r\n {\r\n // Default not found!!!! Our cell will be void!\r\n cell = new CrosstabCell();\r\n cell.setParent( this.getCrosstabElement());\r\n cell.setWidth(cellWidth);\r\n cell.setHeight(cellHeight);\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n }\r\n else\r\n {\r\n cell = templateCell.cloneMe();\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n cell.setParent( this.getCrosstabElement());\r\n\r\n // Duplicate all elements of this cell, and reassign parent cell...\r\n int currentElements = getCrosstabElement().getElements().size();\r\n for (int i=0; i<currentElements; ++i)\r\n {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n // WARNING this copy does not support container and group elements!!!\r\n if (re.getCell() == templateCell)\r\n {\r\n re = re.cloneMe();\r\n cell.setColumnTotalGroup(totalColumnGroupName );\r\n cell.setRowTotalGroup(totalRowGroupName );\r\n re.setCell( cell );\r\n getCrosstabElement().getElements().add(re);\r\n }\r\n }\r\n }\r\n\r\n getCrosstabElement().getCells().add( cell );\r\n }\r\n }\r\n }\r\n\r\n }", "public void mouseExited(MouseEvent e) {\n if (isDraging){// ger fal kardane khanehaye drag shode ba raftane dobare ruye Anha\n setNotCopying();\n if(mlpp1<mlp1){// baraye raftan be paein\n for(int p=mlpp1;p<=mlp1; p++){\n if(mlpp2<mlp2)// baraye raftan be paein samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be pain samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane raftan be paein\n if(mlpp1>mlp1){// baraye raftan be bala\n for(int p=mlpp1;p>=mlp1; p--){\n if(mlpp2<mlp2)// baraye raftan be bala samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be bala samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane harekat be bala.\n if(mlpp2<mlp2)// baraye raftan be rast\n for(int k=mlpp2 ; k<=mlp2;k++){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye harekat be chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane geyre fa'al kardane khane haye drag shode\n if(e.getSource()==jtf[mlp1][mlp2]) // agar az samte paein az khane sabz kharej shod-\n if(jtf[mlp1][mlp2].getBackground()==Color.green)//- range an bayad be abi tabdil shawad.\n jtf[mlp1][mlp2].setBackground(Color.blue);\n }", "private void drawBuilding(Graphics2D g2d, int x, int y, Cell c, Color color) {\n try {\r\n \tg2d.setPaint(Color.CYAN.darker());\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbageString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(color);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tfor (int i = 0; i < inc.length; i++) {\n\t\t\t\t\tg.setColor(new Color(220 - i * 50, 220 - i * 50, 220 - i * 50));\n\t\t\t\t\tg.fillOval(inc[i][0], inc[i][1], 30, 30);\n\t\t\t\t}\n\t\t\t\tg.setColor(Color.yellow);\n\t\t\t\tg.fillOval(x, h, 30, 30);\n\n\t\t\t\t// 장애물\n\t\t\t\tg.setColor(Color.red);\n\t\t\t\tg.fillRect(0, 480, 800, 20);\n\t\t\t\tg.fillRect(400, 200, 50, 300);\n\t\t\t\tg.fillRect(300, 350, 100, 30);\n\t\t\t\t//\n\t\t\t\tGraphics2D g2 = bi.createGraphics();\n//\t\t\t\tthis.paintAll(g2);\n\t\t\t}", "public void generateAntHill(int x, int y, String colour) {\n for (int i = 0; i < 11; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[x*130+y+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[x*130+y+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next change the two rows above and below the centre\n for (int i = 0; i < 10; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next rows inset by one on the right\n for (int i = 0; i < 9; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left none on the right\n for (int i = 0; i < 8; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the right and none on the left\n for (int i = 0; i < 7; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left and none on the right\n for (int i = 0; i < 6; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n }", "public void drawCell(Graphics2D g) {\n\n\t\tStroke oldStroke = g.getStroke();\n\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(0);\n\t\t// If the cell is a circle we fill the circle with the Java API\n\t\tif (e.reference instanceof Circle2) {\n\t\t\tCircle2 c = (Circle2) e.reference;\n\t\t\tg.setColor(cellColor);\n\t\t\tg.fillOval((int) (c.centre.x - c.radius),\n\t\t\t\t\t(int) (c.centre.y - c.radius), (int) (2 * c.radius),\n\t\t\t\t\t(int) (2 * c.radius));\n\t\t}\n\t\t// In case it is an arbitary cell we approximate that cell with 1000\n\t\t// vertical line segments\n\t\telse {\n\t\t\tList<Segment2> verticalLines = verticalLinesinCell();\n\t\t\tList<Segment2> segmentsInCell = partitionCellIntoSegments(verticalLines);\n\n\t\t\tfor (Segment2 s : segmentsInCell) {\n\t\t\t\tGraphicsContext gc = new GraphicsContext();\n\t\t\t\tgc.setForegroundColor(cellColor);\n\t\t\t\ts.draw(g, gc);\n\t\t\t}\n\t\t}\n\n\t\tg.setStroke(oldStroke);\n\t}", "@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "void testDrawCell(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.indexHelp(0, 0).drawCell(2),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 2, Cnst.boardHeight / 2,\r\n OutlineMode.SOLID, Color.ORANGE)));\r\n t.checkExpect(this.game3.indexHelp(0, 0).drawCell(3),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 3, Cnst.boardHeight / 3,\r\n OutlineMode.SOLID, Color.GREEN)));\r\n t.checkExpect(this.game5.indexHelp(0, 0).drawCell(4),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 4, Cnst.boardHeight / 4,\r\n OutlineMode.SOLID, Color.PINK)));\r\n t.checkExpect(this.game2.indexHelp(-1, -1).drawCell(1), new EmptyImage());\r\n }", "@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "@Override\r\n public void paint(Graphics g) {\n super.paint(g);\r\n Color col = new Color(255, 255, 255);//color gris\r\n g.drawLine(0, 20, 245, 20);//pinta una linea en la parte superior de la ventana\r\n Dimension size = getSize();//encapsula el tamñao de un objeto\r\n int parteSuperiorTablero = (int) size.getHeight() - altoTablero * alturaPieza();\r\n\r\n for (int i = 0; i < altoTablero; ++i) {\r\n for (int j = 0; j < anchoTablero; ++j) {\r\n PiezasTetris pieza = dimensionar(j, altoTablero - i - 1);\r\n if (pieza != PiezasTetris.NoPieza) {\r\n pintarPiezas(g, 0 + j * anchoPieza(),\r\n parteSuperiorTablero + i * alturaPieza(), pieza);\r\n }\r\n }\r\n }\r\n\r\n if (piezaActual.getPieza() != PiezasTetris.NoPieza) {\r\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n pintarPiezas(g, 0 + x * anchoPieza(),\r\n parteSuperiorTablero + (altoTablero - y - 1) * alturaPieza(),\r\n piezaActual.getPieza());\r\n }\r\n }\r\n }", "private void dibujarReina(Graphics g) {\n\t\tint x = (fila - 1) * 50 + 10;\r\n\t\tint y = (columna - 1) * 50 + 40;\r\n\t\tg.drawLine(x + 5, y + 45, x + 45, y + 45);\r\n\t\tg.drawLine(x + 5, y + 45, x + 5, y + 5);\r\n\t\tg.drawLine(x + 45, y + 45, x + 45, y + 5);\r\n\t\tg.drawLine(x + 5, y + 35, x + 45, y + 35);\r\n\t\tg.drawLine(x + 5, y + 5, x + 15, y + 20);\r\n\t\tg.drawLine(x + 15, y + 20, x + 25, y + 5);\r\n\t\tg.drawLine(x + 25, y + 5, x + 35, y + 20);\r\n\t\tg.drawLine(x + 35, y + 20, x + 45, y + 5);\r\n\t\tg.drawOval(x + 20, y + 20, 10, 10);\r\n\t}", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "protected abstract void narisi(Graphics2D g, double wPlatno, double hPlatno);", "public char drawCell ()\n {\n final char ALIVE_SYMBOL = '\\u25A0';\n final char DEAD_SYMBOL = '\\u25A1';\n if (cellStatus)\n {\n return ALIVE_SYMBOL;\n }\n else\n {\n return DEAD_SYMBOL;\n }// end of if (cellStatus)\n }", "public interface Cell<T> {\n /**\n * находится ли в данной ячейке бомба\n */\n boolean isBomb();\n\n /**\n * игрок предположил, что в данной ячейку бомба\n */\n boolean isBombCell();\n\n /**\n * игрок предположил, что данная ячейка пустая\n */\n boolean isEmptyCell();\n\n /**\n * устанавливаем значение, что в ячейке бомба\n */\n void BombCell();\n\n /**\n * устанавливаем значение пустой ячейки\n */\n void EmptyCell();\n\n /**\n * рисуем ячейку\n */\n void draw(T point, boolean real);\n}", "@Override\r\n public final void draw(final Diamond d, final BufferedImage paper) {\n String red;\r\n String green;\r\n String blue;\r\n if (Integer.toHexString(d.getBorderColor().getRed()).length() == 1) {\r\n red = \"0\" + Integer.toHexString(d.getBorderColor().getRed());\r\n } else {\r\n red = Integer.toHexString(d.getBorderColor().getRed());\r\n }\r\n if (Integer.toHexString(d.getBorderColor().getGreen()).length() == 1) {\r\n green = \"0\" + Integer.toHexString(d.getBorderColor().getGreen());\r\n } else {\r\n green = Integer.toHexString(d.getBorderColor().getGreen());\r\n }\r\n if (Integer.toHexString(d.getBorderColor().getBlue()).length() == 1) {\r\n blue = \"0\" + Integer.toHexString(d.getBorderColor().getBlue());\r\n } else {\r\n blue = Integer.toHexString(d.getBorderColor().getBlue());\r\n } \r\n String color = \"#\" + red + green + blue;\r\n draw(new Line((String.valueOf(d.getX())),\r\n String.valueOf(d.getY() - (d.getDiagVerticala() / 2)),\r\n String.valueOf(d.getX() - (d.getDiagOrizontala() / 2)), String.valueOf(d.getY()),\r\n color, String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX() - (d.getDiagOrizontala() / 2))),\r\n String.valueOf(d.getY()), String.valueOf(d.getX()),\r\n String.valueOf(d.getY() + (d.getDiagVerticala() / 2)), color,\r\n String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX())),\r\n String.valueOf(d.getY() + (d.getDiagVerticala() / 2)),\r\n String.valueOf(d.getX() + (d.getDiagOrizontala() / 2)), String.valueOf(d.getY()),\r\n color, String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n draw(new Line((String.valueOf(d.getX() + (d.getDiagOrizontala() / 2))),\r\n String.valueOf(d.getY()), String.valueOf(d.getX()),\r\n String.valueOf(d.getY() - (d.getDiagVerticala() / 2)), color,\r\n String.valueOf(d.getBorderColor().getAlpha()), paper), paper);\r\n\r\n floodFill(d.getX(), d.getY(), d.getFillColor(), d.getBorderColor(), paper);\r\n }", "@Override\r\n\tpublic void dibujar(Entorno ent, Coordenada c) {\n\t\tent.dibujarRectangulo(c.getX(), c.getY(), 20, 20, 0, Color.YELLOW);\r\n\t}", "@Override\n public void paintComponent(Graphics g){\n // Paint the well\n g.setColor(Color.DARK_GRAY);\n g.fillRoundRect(0, 0, 338, 546, 8, 8);\n\n for (int i = 1; i < 21; i++){\n for (int j = 1; j < 13; j++){\n g.setColor(Color.BLACK);\n g.fillRoundRect(26 * j - 13, 26 * i - 13, 25, 25, 2, 2);\n }\n }\n\n drawPiece(g);\n }", "public ZonaFasciculataCells() {\r\n\r\n\t}", "void initData() {\r\n this.unconnectedCells = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.BLUE, true), new EndCell(0, 1),\r\n new EndCell(-1, 1), new EndCell(0, 1), new EndCell(1, 1)));\r\n\r\n this.cells1 = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1), new EndCell(2,-1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.RED, true),\r\n new Cell(1, 0, Color.RED, false), new EndCell(2, 0),\r\n new EndCell(-1, 1), new Cell(0, 1, Color.BLUE, false),\r\n new Cell(1, 1, Color.RED, false), new EndCell(2, 1),\r\n new EndCell(-1, 2), new EndCell(0, 2), new EndCell(1, 2), new EndCell(2, 2)));\r\n\r\n this.floodedCells = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1), new EndCell(2,-1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.RED, true),\r\n new Cell(1, 0, Color.RED, true), new EndCell(2, 0),\r\n new EndCell(-1, 1), new Cell(0, 1, Color.BLUE, true),\r\n new Cell(1, 1, Color.RED, true), new EndCell(2, 1),\r\n new EndCell(-1, 2), new EndCell(0, 2), new EndCell(1, 2), new EndCell(2, 2)));\r\n\r\n this.halfFlooded = new ArrayList<ACell>(Arrays.asList(\r\n new EndCell(-1,-1), new EndCell(0,-1), new EndCell(1, -1), new EndCell(2,-1),\r\n new EndCell(-1, 0), new Cell(0, 0, Color.PINK, true),\r\n new Cell(1, 0, Color.CYAN, true), new EndCell(2, 0),\r\n new EndCell(-1, 1), new Cell(0, 1, Color.CYAN, true),\r\n new Cell(1, 1, Color.PINK, false), new EndCell(2, 1),\r\n new EndCell(-1, 2), new EndCell(0, 2), new EndCell(1, 2), new EndCell(2, 2)));\r\n\r\n this.mtACell = new ArrayList<ACell>();\r\n\r\n this.c1 = new Cell(0, 0, Color.PINK, false);\r\n this.c2 = new Cell(1, 0, Color.GREEN, false);\r\n this.c3 = new Cell(0, 1, Color.CYAN, false);\r\n this.e1 = new EndCell(0, 0);\r\n\r\n this.runGame = new FloodItWorld();\r\n this.runGame.initializeBoard();\r\n\r\n this.game1 = new FloodItWorld(20);\r\n this.game1.initializeBoard();\r\n\r\n this.game2 = new FloodItWorld(1, 100, new Random(20),\r\n 2, 3);\r\n this.game2.initializeBoard();\r\n\r\n this.game3 = new FloodItWorld(1, 10, new Random(21),\r\n 3, 8);\r\n this.game3.initializeBoard();\r\n\r\n this.game5 = new FloodItWorld(5, 5, new Random(23),\r\n 4, 2);\r\n this.game5.initializeBoard();\r\n this.game6 = new FloodItWorld(this.unconnectedCells,\r\n 0, 5, new Random(24), new ArrayList<Color>(Arrays.asList(Color.BLUE)),1, 1,\r\n new ArrayList<ACell>());\r\n this.game7 = new FloodItWorld(this.cells1, 0, 3, new Random(25),\r\n new ArrayList<Color>(Arrays.asList(Color.BLUE, Color.RED)), 2, 2,\r\n new ArrayList<ACell>());\r\n this.game7.stitchCells();\r\n\r\n this.game8 = new FloodItWorld(this.floodedCells, 0, 3, new Random(26),\r\n new ArrayList<Color>(Arrays.asList(Color.BLUE, Color.RED)), 2, 2,\r\n new ArrayList<ACell>());\r\n this.game8.stitchCells();\r\n\r\n this.game9 = new FloodItWorld(this.halfFlooded, 0, 3, new Random(27),\r\n new ArrayList<Color>(Arrays.asList(Color.PINK, Color.BLUE)), 2, 2,\r\n new ArrayList<ACell>());\r\n this.game9.stitchCells();\r\n }", "public void putInJail() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n \n //Top Bar - Row 0\n drawHBar(0, 255, 0, 0);\n \n //Bottom Bar - Final Row-3 [Width of the line]\n drawHBar(rows-3, 255, 0, 0);\n \n //----------------------------------------------//\n \n //Leftmost Vertical Bar - Col 0\n drawVBar(0, 255, 0, 0);\n \n //Rightmost Vertical Bar - Final Col-4\n drawVBar(cols-4, 255, 0, 0);\n \n //---------------------------------------------//\n \n //Compute the number of bars needed\n int numBars = Math.round((cols-8)/50);\n //System.out.println(\"NumBars: \" + numBars);\n \n //Compute the static spacing needed\n int spacingValue = ((cols-8)/(numBars+1));\n //System.out.println(\"SpacingValue: \" + spacingValue);\n \n //Draw numBars number of vertical bars spacingValue apart\n int ii = 0;\n int loopingSpacer = spacingValue;\n \n while(ii < numBars){\n //System.out.println(\"LoopingSpacer is \" + loopingSpacer + \" Run Counter is: \" + ii);\n drawVBar(loopingSpacer, 255, 0, 0);\n \n loopingSpacer = loopingSpacer + spacingValue;\n ii = ii + 1;\n }\n \n }", "private Container[] generateFourCellsWithOpenLineCircuit() {\n createCells();\n\n cell1.setNeighbourAt( cell2, NeighbourPosition.RIGHT );\n cell2.setNeighbourAt( cell3, NeighbourPosition.BOTTOM );\n\n cell4 = createCell( new HorizontalLine(\"\") );\n cell3.setNeighbourAt( cell4, NeighbourPosition.LEFT );\n cell4.setNeighbourAt( cell1, NeighbourPosition.TOP );\n\n Container[] cells = { cell1, cell2, cell3, cell4 };\n return cells;\n }", "public abstract WorldImage drawCell(int blocks);", "@Override\n public void start(Stage teater){\n GridPane brettGP = new GridPane();\n boolean hvittFelt = false;\n for(int y = 0; y < 10; y ++){\n for(int x = 0; x < 10; x++){\n if(x == 0 || x == 9){\n if(y == 0 || y == 9){\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE / 2,\n Settinger.RUTE_BREDDE / 2);\n r.setFill(Color.DARKGREY);\n brettGP.add(r, x, y);\n }\n else{\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE / 2,\n Settinger.RUTE_BREDDE);\n r.setFill(Color.DARKGREY);\n StackPane stack = new StackPane();\n stack.getChildren().add(r);\n Text tekst = new Text(Integer.toString(9 - y));\n tekst.setFont(new Font(12));\n tekst.setTextAlignment(TextAlignment.CENTER);\n stack.getChildren().add(tekst);\n brettGP.add(stack, x, y);\n }\n }\n else{\n if(y == 0 || y == 9){\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE / 2);\n r.setFill(Color.DARKGREY);\n StackPane stack = new StackPane();\n stack.getChildren().add(r);\n Text tekst = new Text(Character.toString((char)(x + 64)));\n tekst.setFont(new Font(12));\n tekst.setTextAlignment(TextAlignment.CENTER);\n stack.getChildren().add(tekst);\n brettGP.add(stack, x, y);\n }\n else{\n Rectangle varselFargeR = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE);\n varselFargeR.setFill(Color.RED);\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE);\n if(hvittFelt){ r.setFill(Color.WHITE); }\n else{ r.setFill(Color.GREY); }\n StackPane stack = new StackPane();\n feltene[x - 1][8 - y] = stack;\n stack.getChildren().add(varselFargeR);\n stack.getChildren().add(r);\n brettGP.add(stack, x, y);\n hvittFelt = !hvittFelt;\n }\n\n }\n }\n hvittFelt = !hvittFelt;\n }\n\n statusFelt = new Text(\"Tekstfeltet\");\n statusFelt.setWrappingWidth(Settinger.BRETT_BREDDE + Settinger.RUTE_BREDDE);\n //statusFelt.setY(Settinger.BRETT_BREDDE + 100);\n statusFelt.setFont(new Font(16));\n statusFelt.setTextAlignment(TextAlignment.CENTER);\n\n hoyreTekstFelt = new Text(\"Høyre\");\n hoyreTekstFelt.setWrappingWidth(Settinger.RUTE_BREDDE * 12);\n hoyreTekstFelt.setFont(new Font(10));\n\n\n\n\n Pane hovedKulisse = new Pane();\n GridPane layoutGP = new GridPane();\n layoutGP.add(brettGP, 0, 0);\n layoutGP.add(hoyreTekstFelt, 1, 0);\n layoutGP.add(statusFelt, 0, 1);\n\n hovedKulisse.getChildren().add(layoutGP);\n\n\n Scene scene = new Scene(hovedKulisse);\n teater.setScene(scene);\n teater.setTitle(\"Java-sjakk\");\n teater.show();\n\n // STARTER OPP SJAKK LOGIKK:\n administrator = new Administrator(this);\n partiet = administrator.hentParti();\n stilling = administrator.hentStilling();\n hoyreTekstFelt.setText(stilling.toString());\n //hoyreTekstFelt.setText(stilling.hentEvalStreng());\n // OPPSETT FERDIG, STARTER AUTOSJAKK:\n if(partiet.hentAutomatisk(0)){ autoTrekk(); }\n\n }", "int cellFromDistance(int d) {\n int d2 = d - GUTTER_SIZE;\n if (d2 < 0) {\n return -1;\n } else {\n d2 /= (CELL_SIZE + GUTTER_SIZE);\n int next = cellDistance(d2 + 1);\n if (next - d <= GUTTER_SIZE)\n return -1;\n else\n return d2;\n }\n }", "@Override\r\n\tpublic void drawCell(Graphics2D g2) {\n\t\tAffineTransform original = g2.getTransform();\r\n\t\t\r\n\t\tg2.translate(pos.x,pos.y);\r\n\t\tif(scale<=0) {\r\n\t\t\tscale=0;\r\n\t\t}\r\n\t\t\r\n\t\tif(scale>=1) {\r\n\t\t\tscale=1;\r\n\t\t}\r\n\t\tg2.scale(scale, scale);\r\n\t\t\r\n\t\tAffineTransform point = g2.getTransform();\r\n\t\t\r\n\t\thitBox = outline.createTransformedArea(point);\r\n\t\t\r\n\t\tg2.setColor(new Color(232,65,143));\r\n\t\tif(passable) g2.setColor(new Color(70,59,71));\r\n\t\tg2.fill(cellBody);\r\n\t\t\r\n\t\tg2.setTransform(original);\r\n\t\t\r\n\t}", "public void drawTileVH(Tile t, int x, int y, int cellSize, PGraphics pdf)\n {\n for(int i = 0; i < t.getW(); i++)\n {\n for(int j = 0; j < t.getH(); j++)\n {\n if(t.getPattern()[t.getW()-1-i][t.getH()-1-j])\n pdf.rect(x+i*cellSize, y+j*cellSize, cellSize*1.1f, cellSize*1.1f);\n }\n }\n }", "public void aapne() {\n trykketPaa = true;\n setBackground(new Background(new BackgroundFill(Color.LIGHTGRAY, CornerRadii.EMPTY, Insets.EMPTY)));\n if (bombe) {\n setText(\"x\");\n Color moerkeregroenn = Color.rgb(86, 130, 3, 0.5);\n setBackground(new Background(new BackgroundFill(moerkeregroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n } else if (bombeNaboer == 0) {\n setText(\" \");\n } else {\n setText(bombeNaboer + \"\");\n if (bombeNaboer == 1) {\n setTextFill(Color.BLUE);\n } else if (bombeNaboer == 2) {\n setTextFill(Color.GREEN);\n } else if (bombeNaboer == 3) {\n setTextFill(Color.RED);\n } else if (bombeNaboer == 4) {\n setTextFill(Color.DARKBLUE);\n } else if (bombeNaboer == 5) {\n setTextFill(Color.BROWN);\n } else if (bombeNaboer == 6) {\n setTextFill(Color.DARKCYAN);\n }\n }\n }", "static void drawCrosses() { // draws a cross at each cell centre\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfloat xc,yc;\n\t\t\t//GeneralPath path = new GeneralPath();\n\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// label cell position\n\t\t\t\tjava.awt.geom.GeneralPath Nshape = new GeneralPath();\n\t\t\t\tNshape.moveTo(xc-arm, yc);\n\t\t\t\tNshape.lineTo(xc+arm, yc);\n\t\t\t\tNshape.moveTo(xc, yc-arm);\n\t\t\t\tNshape.lineTo(xc, yc+arm);\n\n\t\t\t\tRoi XROI = new ShapeRoi(Nshape);\n\t\t\t\tOL.add(XROI);\n\t\t\t}\n\t\t}\n\t}", "private Boolean pointNotMyCell(Position3D cell,int d, int r, int c) {\n return !(d == cell.getDepthIndex() && c == cell.getColumnIndex() && r == cell.getRowIndex());\n }", "int cellDistance(int cell) {\n int d = GUTTER_SIZE;\n d += cell * (CELL_SIZE + GUTTER_SIZE);\n return d;\n }", "@Override\n public Shape getCelkoveHranice() {\n return new Rectangle2D.Double(super.getX() + 22, super.getY() + 45, 45, 45);\n }", "public void drawCell()\n {\n // if mouse is not inside tile area dont draw anything\n if(showHover)\n {\n noStroke();\n \n rect(firstCellPosition[0]+hover[0]*cellSize,firstCellPosition[1]+hover[1]*cellSize,cellSize-1,cellSize-1);\n \n if(brushSize == 1)\n {\n if(!pattern[hover[0]][hover[1]])\n {\n pattern[hover[0]][hover[1]] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]][hover[1]] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+hover[0]*cellSize,firstCellPosition[1]+hover[1]*cellSize,cellSize-1,cellSize-1);\n }\n if(brushSize == 2)\n {\n for(int i = 0; i < 2; i++)\n {\n for(int j = 0; j < 2; j++)\n {\n if(hover[0]+i < xCells && hover[1]+j < yCells)\n {\n if(!pattern[hover[0]+i][hover[1]+j])\n {\n pattern[hover[0]+i][hover[1]+j] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]+i][hover[1]+j] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+(hover[0]+i)*cellSize,firstCellPosition[1]+(hover[1]+j)*cellSize,cellSize-1,cellSize-1);\n }\n }\n }\n }\n if(brushSize == 3)\n {\n for(int i = -1; i < 2; i++)\n {\n for(int j = -1; j < 2; j++)\n {\n if(hover[0]+i < xCells && hover[1]+j < yCells &&\n hover[0]+i >= 0 && hover[1]+j >= 0 )\n {\n if(!pattern[hover[0]+i][hover[1]+j])\n {\n pattern[hover[0]+i][hover[1]+j] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]+i][hover[1]+j] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+(hover[0]+i)*cellSize,firstCellPosition[1]+(hover[1]+j)*cellSize,cellSize-1,cellSize-1);\n }\n }\n }\n }\n }\n }", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "Cell(int x, int y, Color color, boolean flooded) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "public RedCell()\n {\n super(1, Greenfoot.getRandomNumber(2) + 1);\n setRotation(Greenfoot.getRandomNumber(360));\n }", "public void tekst_ekranu(Graphics dbg)\n {\n dbg.setColor(Color.BLACK);\n int y=(int)Math.round(getHeight()*0.04);\n dbg.setFont(new Font(\"TimesRoman\",Font.PLAIN,y));\n dbg.drawString(\"zycie \"+liczba_zyc,(int)Math.round(getWidth()*0.01),y);\n dbg.drawString(\"punkty \"+liczba_punktow,(int)Math.round(getWidth()*0.2),y);\n dbg.drawString(\"czas \"+(int)Math.round(czas_gry),(int)Math.round(getWidth()*0.4),y);\n dbg.drawString(\"naboje \"+liczba_naboi,(int)Math.round(getWidth()*0.6),y);\n dbg.drawString(\"poziom \"+poziom,(int)Math.round(getWidth()*0.8),y);\n }", "private void drawRecyclingCenter(Graphics2D g2d, int x, int y, Cell c) {\n try {\r\n \tg2d.setPaint(Color.WHITE);\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbagePointsString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(Color.BLACK);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "ArrayList<ArrayList<Cell>> cells(ArrayList<ArrayList<Double>> d) {\n ArrayList<ArrayList<Cell>> result1 = new ArrayList<ArrayList<Cell>>();\n for (int i = 0; i < d.size(); i = i + 1) {\n ArrayList<Cell> result = new ArrayList<Cell>();\n for (int j = 0; j < d.get(i).size(); j = j + 1) {\n double height = d.get(i).get(j);\n if (height <= 0.0) {\n result.add(new OceanCell(height, i, j));\n }\n else {\n result.add(new Cell(height, i, j));\n }\n }\n result1.add(result);\n }\n return result1;\n }", "public void paintComponent(final Graphics the_graphics)\n {\n super.paintComponent(the_graphics);\n final Graphics2D g2d = (Graphics2D) the_graphics;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, \n RenderingHints.VALUE_ANTIALIAS_ON);\n g2d.setFont(my_font);\n g2d.setColor(Color.WHITE);\n g2d.setStroke(new BasicStroke(STROKE_SIZE));\n g2d.drawString(PIECE_STRING, (getWidth() / (STROKE_SIZE * STROKE_SIZE)) - \n (PIECE_STRING.length() / STROKE_SIZE), (int) (getHeight() * LABEL_STARTING_Y));\n \n for (int y = Piece.NUMBER_OF_BLOCKS - 1; 0 <= y; y--) \n {\n for (int x = 0; x < Piece.NUMBER_OF_BLOCKS; x++) \n {\n for (int i = 0; i < Piece.NUMBER_OF_BLOCKS; i++) \n {\n final Point block = my_board.nextPiece().blocks()[i];\n if (block.x() == x && block.y() == y) \n {\n g2d.setColor(my_board.nextPiece().color());\n g2d.fill(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n g2d.setColor(Color.DARK_GRAY);\n g2d.draw(new Rectangle2D.Double((x * getWidth() * BLOCK_SIZE_CONSTANT) + \n (int) (getWidth() * BLOCK_STARTING_X), (getHeight() / 2) + \n (float) (getWidth() * BLOCK_SIZE_CONSTANT) - (y * getWidth() * \n BLOCK_SIZE_CONSTANT), getWidth() * BLOCK_SIZE_CONSTANT, getWidth() * \n BLOCK_SIZE_CONSTANT));\n } \n }\n }\n }\n }", "@Override\r\n public final void draw(final Circle s, final BufferedImage paper) {\n\r\n int xc = s.getX();\r\n int yc = s.getY();\r\n int r = s.getRaza();\r\n int x = 0, y = r;\r\n final int trei = 3;\r\n int doi = 2;\r\n int d = trei - doi * r;\r\n while (y >= x) {\r\n if (checkBorder(xc + x, yc + y, paper)) {\r\n paper.setRGB(xc + x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc + y, paper)) {\r\n paper.setRGB(xc - x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + x, yc - y, paper)) {\r\n paper.setRGB(xc + x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc - y, paper)) {\r\n paper.setRGB(xc - x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc + x, paper)) {\r\n paper.setRGB(xc + y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc - x, paper)) {\r\n paper.setRGB(xc + y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc + x, paper)) {\r\n paper.setRGB(xc - y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc - x, paper)) {\r\n paper.setRGB(xc - y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n\r\n x++;\r\n if (d > 0) {\r\n y--;\r\n final int patru = 4;\r\n final int zece = 10;\r\n d = d + patru * (x - y) + zece;\r\n } else {\r\n final int patru = 4;\r\n final int sase = 6;\r\n d = d + patru * x + sase;\r\n }\r\n if (checkBorder(xc + x, yc + y, paper)) {\r\n paper.setRGB(xc + x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc + y, paper)) {\r\n paper.setRGB(xc - x, yc + y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + x, yc - y, paper)) {\r\n paper.setRGB(xc + x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - x, yc - y, paper)) {\r\n paper.setRGB(xc - x, yc - y, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc + x, paper)) {\r\n paper.setRGB(xc + y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc + y, yc - x, paper)) {\r\n paper.setRGB(xc + y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc + x, paper)) {\r\n paper.setRGB(xc - y, yc + x, s.getBorderColor().getRGB());\r\n }\r\n if (checkBorder(xc - y, yc - x, paper)) {\r\n paper.setRGB(xc - y, yc - x, s.getBorderColor().getRGB());\r\n }\r\n\r\n }\r\n floodFill(xc, yc, s.getFillColor(), s.getBorderColor(), paper);\r\n }", "public void drawCell(Graphics g) {\n if (isVisited()) { // visited cells are white\n setCellColor(g, Color.WHITE);\n }\n if (isSolution()) { // cells that are part of the most optimal solution are yellow\n setCellColor(g, Color.YELLOW);\n }\n\n // draw the walls if there are any\n int col2 = col * CELL_DIMS;\n int row2 = row * CELL_DIMS;\n\n g.setColor(Color.BLACK); // walls are black\n if (walls[0]) // north wall\n g.drawLine(col2, row2, col2 + CELL_DIMS, row2);\n if (walls[1]) // east wall\n g.drawLine(col2 + CELL_DIMS, row2, col2 + CELL_DIMS, row2 + CELL_DIMS);\n if (walls[2]) // south wall\n g.drawLine(col2 + CELL_DIMS, row2 + CELL_DIMS, col2, row2 + CELL_DIMS);\n if (walls[3]) // west wall\n g.drawLine(col2, row2 + CELL_DIMS, col2, row2);\n }", "protected void paintComponent(Graphics g) {\r\n\t\t super.paintComponent(g);\r\n\r\n\t\t g.setColor(new Color(cespedcorto[0],cespedcorto[1],cespedcorto[2]));\r\n\t\t g.fillRect(0, 0, TAMCELDA * CELDASCOL,TAMCELDA * CELDASFILA);\r\n\t\t g.setColor(Color.BLACK);\r\n\t\t for (int i = 0; i < CELDASFILA; i ++) { \r\n\t\t for (int j = 0; j < CELDASCOL; j ++) {\r\n\t\t g.drawRect( j * TAMCELDA, i * TAMCELDA, TAMCELDA, TAMCELDA);// Dibujamos las casillas vacías\r\n\t\t if(getvectorjardin()[i][j].getcelda() == 1){// si es cesped largo\r\n\t\t \tg.setColor(new Color(cespedlargo[0],cespedlargo[1],cespedlargo[2]));\r\n\t\t \tg.fillRect( j * TAMCELDA + 1, i * TAMCELDA + 1, TAMCELDA - 1, TAMCELDA - 1);\r\n\t\t \tg.setColor(Color.BLACK);\r\n\t\t }\r\n\t\t if(getvectorjardin()[i][j].getcelda() == 2){//si es obstaculo\r\n\t\t \tg.setColor(new Color(obstaculo[0],obstaculo[1],obstaculo[2]));\r\n\t\t \tg.fillRect( j * TAMCELDA + 1, i * TAMCELDA + 1, TAMCELDA - 1, TAMCELDA - 1);\r\n\t\t \tg.setColor(Color.BLACK);\r\n\t\t }\r\n\t\t if((getvectorjardin()[i][j].getcelda() == 3)&& (numeromaximodecortacesped == 0)){// si es el unico cortacesped\r\n\t\t \tnumeromaximodecortacesped = 1;\r\n\t\t \tg.setColor(new Color(cortacesped[0],cortacesped[1],cortacesped[2]));\r\n\t\t \tg.fillRect( j * TAMCELDA + 1, i * TAMCELDA + 1, TAMCELDA - 1, TAMCELDA - 1);\r\n\t\t \tg.setColor(Color.BLACK);\r\n\t\t \tposinicialI = i;\r\n\t\t \tposinicialJ = j;\r\n\t\t }\r\n\t\t if(getvectorjardin()[i][j].getcelda() == 0){\r\n\t\t \tg.setColor(new Color(cespedcorto[0],cespedcorto[1],cespedcorto[2]));\r\n\t\t \tg.fillRect( j * TAMCELDA + 1, i * TAMCELDA + 1, TAMCELDA - 1, TAMCELDA - 1);\r\n\t\t \tg.setColor(Color.BLACK);\r\n\t\t }\r\n\t\t if(numeromaximodecortacesped == 1){\r\n\t\t \tg.setColor(new Color(cortacesped[0],cortacesped[1],cortacesped[2]));\r\n\t\t \tg.fillRect( posinicialJ * TAMCELDA + 1, posinicialI * TAMCELDA + 1, TAMCELDA - 1, TAMCELDA - 1);\r\n\t\t \tg.setColor(Color.BLACK);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t }", "public void draw(Graphics g)\n {\n for (int row = 4; row < 24; row++) {\n for (int col = 0; col < 10; col++) {\n if (cells[row][col] != null) {\n cells[row][col].draw(getCellXCoord(col), getCellYCoord(row), g);\n }\n }\n }\n }", "public void buildDome() {\n if (this.getLevel() == 3) {\n buildInCell();\n } else {\n this.dome = true;\n this.setFreeSpace(false);\n }\n }", "@Override\n\tpublic String toString() {\n\t\tString cad=tractor.getRow() + \" \" + tractor.getColumn() + \" \" + getK() + \" \" + getMax() + \" \" + getRows() + \n\t\t\t\t\" \" + getColumns() + \"\\n\";\n\t\tfor (int i=0;i<cells.length;i++) {\n\t\t\tfor (int j=0;j<cells[0].length;j++) {\n\t\t\t\tcad+=cells[i][j].getSand()+ \" \";\n\t\t\t}\n\t\t\tcad+=\"\\n\";\n\t\t} \n\t\treturn cad;\n\t}", "public void disperse() {\t\t\n\t\tfor (int r = 0; r < rows; r++){\n\t\t\tfor (int c = 1; c < cols; c++){\n\t\t\t\tint sum = values[r+1][c-1] + values[r+1][c] + values[r+1][c+1];\n\t\t\t\tif(r < rows - fireLevel + 14){\n\t\t\t\t\tvalues[r][c] = (sum / 3) - 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tvalues[r][c] = (int)((sum / 3.0) - 0.0); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (values[r][c] < 0) values[r][c] = 0;\n\t\t\t\tg2.setColor(colors[values[r][c]]);\n\t\t\t\tif(values[r][c] > 5){\n\t\t\t\t\tg2.fillRect(c*res,r*res,res,res);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n void drawShape(BufferedImage image, int color) {\n Point diem2 = new Point(diem.getX()+canh, diem.getY());\n Point td = new Point(diem.getX()+canh/2, diem.getY());\n \n \n Point dinh = new Point(td.getX(), td.getY()+h);\n \n Point diem_thuc = Point.convert(diem);\n Point diem_2_thuc = Point.convert(diem2);\n Point dinh_thuc = Point.convert(dinh);\n Point td_thuc = Point.convert(td);\n \n Line canh1=new Line(dinh_thuc, diem_thuc);\n canh1.drawShape(image, ColorConstant.BLACK_RGB);\n Line canh2=new Line(diem_thuc, diem_2_thuc);\n canh2.drawShape(image, ColorConstant.BLACK_RGB);\n Line canh3=new Line(diem_2_thuc, dinh_thuc);\n canh3.drawShape(image, ColorConstant.BLACK_RGB);\n int k =5;\n for(int i =canh1.getPoints().size()-5;i>=5;i--){\n \n for(int j = 0;j<canh*5/2-5;j++){\n \n Point ve = new Point(td_thuc.getX()-canh*5/2+j+5, td_thuc.getY()-k);\n if(ve.getX()>canh1.getPoints().get(i).getX()+5){\n Point.putPoint(ve, image, color);\n }\n }\n k++;\n }\n k=5;\n for(int i =canh3.getPoints().size()-5;i>=5;i--){\n \n for(int j = 0;j<canh*5/2-5;j++){\n Point ve = null;\n \n ve = new Point(td_thuc.getX()+canh*5/2-j-5, td_thuc.getY()-k);\n if(ve.getX()<canh3.getPoints().get(i).getX()-5){\n Point.putPoint(ve, image, color);\n }\n }\n k++;\n }\n }", "public void render() {\n // Every cell is an individual quad\n for (int x = 0; x < z.length-1; x++)\n {\n beginShape(QUAD_STRIP);\n for (int y = 0; y < z[x].length; y++)\n {\n // one quad at a time\n // each quad's color is determined by the height value at each vertex\n // (clean this part up)\n stroke(0xffff69b4);\n stroke(0xffbbbbbb);\n float currentElevation = z[x][y];\n float currentShade = map(currentElevation, -120, 120, 0, 255);\n // fill(currentShade, 255);\n noFill();\n float xCoordinate = x*scl-w/2;\n float yCoordinate = y*scl-h/2;\n vertex(xCoordinate, yCoordinate, z[x][y]);\n vertex(xCoordinate + scl, yCoordinate, z[x+1][y]);\n }\n endShape();\n }\n }", "public static void main(String[] args) throws Exception {\n\t\tString fileBase = \"GasWaterElectricity3\";\r\n\t\t//String fileBase = \"000cwHDLdata\";\r\n\t\tBufferedReader b = new BufferedReader(\r\n\t\t\t\tnew FileReader(fileBase+\".txt\"));\r\n\t\tPrintStream fo = new PrintStream(fileBase+\".svg\");\r\n\t\tStringBuffer chips = new StringBuffer();\r\n\t\tStringBuffer joins = new StringBuffer();\r\n\t\tint joinCount = 1;\r\n\t\tStringBuffer paths = new StringBuffer();\r\n\t\tString ln ;\r\n\t\twhile ((ln = b.readLine()) != null){\r\n\t\t\tString [] wrds = ln.split(\"\\\\s+\");\r\n\t\t\tif (wrds.length==0) continue; // A blank line\r\n\t\t\tint x0,y0,x1,y1;\r\n\t\t\tdouble t = 0.1;\r\n\t\t\tswitch (wrds[0])\r\n\t\t\t{\r\n\t\t\tcase \"D\":\r\n\t\t\t\tgridW = Integer.parseInt(wrds[1]);\r\n\t\t\t\tgridH = Integer.parseInt(wrds[2]);\r\n\t\t\t\tbreak;\t\t\t\t\r\n\t\t\tcase \"C\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tchips.append(String.format(\"<rect x='%f' y='%f' width='%f' height='%f' rx='.2' ry='.2' fill='pink' stroke='black' stroke-width='.2'/>\\n\",\r\n\t\t\t\t\t\tx0+t,y0+t,x1+1-x0-2*t,y1+1-y0-2*t));\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"J\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tx1 = Integer.parseInt(wrds[3]);\r\n\t\t\t\ty1 = Integer.parseInt(wrds[4]);\r\n\t\t\t\tdouble f = 0.04;\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+.5));\r\n\t\t\t\tjoins.append(String.format(\"<circle cx='%f' cy='%f' r='.4' fill='white' stroke='blue' stroke-width='.1'/>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+.5));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx0+.5,y0+0.7f,f,f,joinCount));\r\n\t\t\t\tjoins.append(String.format(\"<g transform='translate(%f,%f) scale(%f,%f)'><text text-anchor='middle'>%d</text></g>\\n\",\r\n\t\t\t\t\t\tx1+.5,y1+0.7f,f,f,joinCount++));\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"#\"://A comment, ignore\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"T\":\r\n\t\t\t\tx0 = Integer.parseInt(wrds[1]);\r\n\t\t\t\ty0 = Integer.parseInt(wrds[2]);\r\n\t\t\t\tStringBuffer p = new StringBuffer();\r\n\t\t\t\tp.append(\"M\"+(x0+.5)+\" \"+(y0+.5)+\" l\");\r\n\t\t\t\tfor(int i=3;i<wrds.length;i++)\r\n\t\t\t\t\tfor(int j=0;j<wrds[i].length();j++){\r\n\t\t\t\t\t\tswitch (wrds[i].charAt(j))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase 'N':\r\n\t\t\t\t\t\t\tp.append(\" 0 -1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'E':\r\n\t\t\t\t\t\t\tp.append(\" l 1 0\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'S':\r\n\t\t\t\t\t\t\tp.append(\" 0 1\");\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 'W':\r\n\t\t\t\t\t\t\tp.append(\" -1 0\");\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\tpaths.append(String.format(\"<path stroke='gray' stroke-width='.2' fill='none' d='%s'/>\\n\",p));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tb.close();\r\n\t\tfo.printf(\"<svg width='10cm' height='10cm' viewBox='0 0 %d %d' xmlns='http://www.w3.org/2000/svg' version='1.1'>\\n\",\r\n\t\t\t\tgridW,gridH);\r\n\t\tString s=\"\";\r\n\t\tfor(int i=0;i<gridW;i++)\r\n\t\t\ts += String.format(\"M %d 0 l 0 %d \",i,gridH);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\ts=\"\";\r\n\t\tfor(int i=0;i<gridH;i++)\r\n\t\t\ts += String.format(\"M 0 %d l %d 0 \",i,gridW);\r\n\t\tfo.printf(\"<path stroke='blue' stroke-width='.02' fill='none' d='%s'/>\", s);\r\n\t\tfo.print(chips);\r\n\t\tfo.print(paths);\r\n\t\tfo.print(joins);\r\n\t\tfo.print(\"</svg>\");\r\n\t\tfo.close();\r\n\t}", "public void fillAntarDashaTable(PdfContentByte canvas,AstroBean astrobean,ColorElement mycolor) {\n\t\tLinkedHashMap<String, Vector<MahaDashaBean>> antardashaDetailHashTable = null;\n\n\n\n\t\ttry {\n\n\t\t\tantardashaDetailHashTable = astrobean.getAntardashaDetailHashTable();\n\t\t} catch (Exception ex) {\n\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t\tPlanet[] planetName = Planet.values();\n\t\tint j = 0;\n\n\t\tVector<MahaDashaBean> antardashavector = null;\n\n\n\t\tIterator it = antardashaDetailHashTable.values().iterator();\n\t\twhile (it.hasNext()) {\n\n\n\t\t\tantardashavector = (Vector) it.next();\n\t\t\t// logger.info(\"Plane Name is\"+planetName[j].toString());\n\t\t\tPdfPTable mahadashaTable = null;\n\n\t\t\t\t\n\t\t\tswitch (j) {\n\t\t\t\t\t\n\t\t\t\tcase 0:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 50, (toXYCord(210)),mycolor);\n\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 1:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 225, (toXYCord(210)),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 2:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 400, (toXYCord(210)),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 3:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 50, toXYCord(380),mycolor);\n\t\t\t\t\tbreak;\n\n\n\t\t\t\tcase 4:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 225, toXYCord(380),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 5:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 400, toXYCord(380),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 6:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 50, toXYCord(550),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 7:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 225, toXYCord(550),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\tgenerateMahadashaAndAntardashaTable(antardashavector, canvas, antardashavector.get(j).getParent(), 400, toXYCord(550),mycolor);\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tj++;\n\n\t\t}\n\t\t//\t}\n}", "public void paintComponent(Graphics g){\n\t\t\n\t\t// chama paintComponent para assegurar que o painel é exibido corretamente\n\t\tsuper.paintComponent(g);\n\t\tint width = getWidth(); // largura total \n\t\tint height = getHeight(); // altura total\n\t\tint meio1 = (width/2);\n\t\tint meio2 = (height/2);\n\t\t// desenha uma linha a partir do canto superior esquerdo até o inferior direito\n\t\tg.drawLine(0, 0, width, height);\n\n\t\t// desenha uma linha a partir do canto inferior esquerdo até o superior direito\n\t\tg.drawLine(0, height, width, 0);\n\t\t\n\t\t// A parte, cria uma linha Horizontal\n\t\tg.drawLine(0, meio2, width, meio2);\n\t\t// A parte, cria uma linha Vertical\n\t\tg.drawLine(meio1, 0, meio1, height);\n\t\t\n\t}", "@Override\n\tpublic void render(GameContainer gc, Graphics g) {\n\t\tfloat x = getX(), y = getY(), width = getWidth(), height = getHeight();\n\t\tg.setColor(new Color(0.5f, 0.5f, 0.5f, 0.8f));\n\t\tg.fillRoundRect(x, y, width, height, 5);\n\t\t\n\t\tg.setColor(Color.black);\n\t\tg.drawString(\"Map needs to be drawn below\", x + (width - g.getFont().getWidth(\"Map needs to be drawn below\")) * 0.5f , y + 20);\n\t\tg.drawString(\"Orange - current cell\", x + 20, y + 50);\n\t\tg.drawString(\"Green - explored cell\", x + 20, y + 70);\n\t\tg.drawString(\"White - unexplored cell\", x + 20, y + 90);\n\t\tg.drawString(\"Line - connection\", x + 20, y + 110);\n\t\tg.drawString(\"Dot - contains item\", x + 20, y + 130);\n\t\t\n\t\tg.setColor(Color.orange);\n\t\tg.fillRoundRect(x + width/2 - 3, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.green);\n\t\tg.fillRoundRect(x + width/2 - 3 + 50, y + height/2 - 3, 46, 46, 5);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.white);\n\t\tg.fillRoundRect(x + width/2 - 3 + 100, y + height/2 - 3 + 50, 46, 46, 5);\n\t\t\n\t\tg.setColor(Color.darkGray);\n\t\tg.fillRoundRect(x + width/2, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 50, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2, 40, 40, 5);\n\t\tg.fillRoundRect(x + width/2 + 100, y + height/2 + 50, 40, 40, 5);\n\t\t\n\t\tg.drawLine(x + width/2 + 40, y + height/2 + 20, x + width/2 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 40 + 50, y + height/2 + 20, x + width/2 + 50 + 50, y + height/2 + 20);\n\t\tg.drawLine(x + width/2 + 120, y + height/2 + 40, x + width/2 +\t120, y + height/2 + 50);\n\t\t\n\n g.setColor(Color.cyan);\n g.fillOval(x + width/2 - 3 + 120, y + height/2 + 17, 6, 6);\n\t\t\n\t}", "@Override\n\tpublic void debugDraw(Graphics g) {\n\t\tfor(int i = 0; i < CELL_SIDE_COUNT; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < CELL_SIDE_COUNT; j++)\n\t\t\t{\n\t\t\t\t//Place code for debug drawing here\n\t\t\t}\n\t\t}\n\t}", "public void pintarRines(Graphics2D pG) {\n\n\n double cos = 0.829;\n double sin = 0.559;\n int radius = DIAMETER / 2;\n int diameter1 = 2 * DIAMETER / 5;\n int diameter2 = DIAMETER / 5;\n int diameter3 = DIAMETER / 10;\n int delta0 = DIAMETER / 5;\n int delta1 = radius - diameter1 / 2;\n int delta2 = radius - diameter2 / 2;\n int delta3 = radius - diameter3 / 2;\n int d2 = (int) (diameter1 * cos / 2);\n int d1 = (int) (diameter1 * sin / 2);\n\n // Points\n int x1 = x + radius - d2; // Represents the x value in QII and QIII\n int y1 = y + radius - d1; // Represents the y value in QI and QII\n int x2 = x + radius + d2; // Represents the x value in QI and QIV\n int y2 = y + radius + d1; // Represents the y value in QIII and QIV\n int vertX = x+ radius;\n int topY = y + radius - diameter1/2;\n int bottomY = y + radius+diameter1/2;\n\n // Paints circle with diameter1\n pG.setColor(new Color(14, 14, 14));\n pG.fillOval(x + delta1, y + delta1, diameter1, diameter1);\n\n\n // Paint circle with diamater 2\n pG.setColor(Color.DARK_GRAY);\n pG.fillOval(x + delta2, y + delta2, diameter2, diameter2);\n\n\n pG.setColor(Color.DARK_GRAY);\n BasicStroke stroke = new BasicStroke(DIAMETER / 15);\n pG.setStroke(stroke);\n pG.drawLine(x1, y1, x2, y2);\n pG.drawLine(x1,y2,x2,y1);\n pG.drawLine(vertX, topY, vertX, bottomY);\n\n // Draw center donut shape\n pG.setColor(Color.GRAY);\n BasicStroke stroke1 = new BasicStroke(DIAMETER / 50);\n pG.setStroke(stroke1);\n pG.drawOval(x + delta3, y + delta3, diameter3, diameter3);\n\n\n }", "private void drawPiece(int row, int col, Graphics g, Color color){\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\r\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\r\n g.setColor(color);\r\n g.fillOval((col*tileSize)+2, (row*tileSize)+2, tileSize-4, tileSize-4);\r\n }", "private void addCotationAndComment(){\n contentTable = new PdfPTable(1);\n table = new PdfPTable(5);\n\n //*** cotation ***\n Vector items = new Vector();\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_LEFT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_RIGHT\");\n items.add(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_LEFT\");\n\n if(verifyList(items)){\n\n // title\n table.addCell(createItemNameCell(getTran(\"leprosy\",\"cotationdesinfirmites\"),2));\n\n // dedicated table\n PdfPTable cotationTable = new PdfPTable(8);\n\n // header\n cotationTable.addCell(emptyCell(2));\n cotationTable.addCell(createHeaderCell(getTran(\"web\",\"right\"),3));\n cotationTable.addCell(createHeaderCell(getTran(\"web\",\"left\"),3));\n\n //***** row 1 : Oeil *****\n cell = createHeaderCell(getTran(\"leprosy\",\"oeil\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"oeil_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_OEIL_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"oeil_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 2 : Main *****\n cell = createHeaderCell(getTran(\"leprosy\",\"main\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"main_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_MAIN_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"main_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 3 : Pied *****\n cell = createHeaderCell(getTran(\"leprosy\",\"pied\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_RIGHT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"pied_\"+itemValue).toLowerCase():\"\"),3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_PIED_LEFT\");\n cotationTable.addCell(createValueCell((itemValue.length()>0?getTran(\"leprosy\",\"pied_\"+itemValue).toLowerCase():\"\"),3));\n\n //***** row 4 : Totals *****\n cell = createHeaderCell(getTran(\"web\",\"total\"),2);\n cell.setHorizontalAlignment(PdfPCell.ALIGN_LEFT);\n cotationTable.addCell(cell);\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_RIGHT\");\n cotationTable.addCell(createValueCell(itemValue,3));\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COTATION_TOTAL_LEFT\");\n cotationTable.addCell(createValueCell(itemValue,3));\n\n // add cotationTable\n cell = createCell(new PdfPCell(cotationTable),3,PdfPCell.ALIGN_CENTER,PdfPCell.BOX);\n cell.setColspan(5);\n cell.setPadding(3);\n table.addCell(cell);\n }\n\n //*** commet ***\n itemValue = getItemValue(IConstants_PREFIX+\"ITEM_TYPE_LEPROSYBEGIN_COMMENT\");\n if(itemValue.length() > 0){\n addItemRow(table,getTran(\"Web\",\"comment\"),itemValue);\n }\n\n // add table to transaction\n if(table.size() > 0){\n if(contentTable.size() > 0) contentTable.addCell(emptyCell());\n contentTable.addCell(createCell(new PdfPCell(table),1,PdfPCell.ALIGN_CENTER,PdfPCell.NO_BORDER));\n tranTable.addCell(new PdfPCell(contentTable));\n addTransactionToDoc();\n }\n }", "void Cell(boolean R, int x, int y, Bridge bridge);", "private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }", "public void drawTile(Tile t, int x, int y, int cellSize, PGraphics pdf)\n {\n for(int i = 0; i < t.getW(); i++)\n {\n for(int j = 0; j < t.getH(); j++)\n {\n if(t.getPattern()[i][j])\n pdf.rect(x+i*cellSize, y+j*cellSize, cellSize*1.1f, cellSize*1.1f);\n }\n }\n }", "public void paint () {\n\t\tPaint.clear();\n\t\t\n\t\tPaint.setColor(Color.WHITE);\n\t\tPaint.fillRect(0,0,numcols_ * cellsize_,numrows_ * cellsize_);\n\t\tPaint.setColor(Color.GRAY);\n\t\tPaint.drawRect(0,0,numcols_ * cellsize_ - 1,numrows_ * cellsize_ - 1);\n\n\t\tfor ( int row = 0 ; row < numrows_ ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < numcols_ ; col++ ) {\n\t\t\t\tint x = col * cellsize_;\n\t\t\t\tint y = row * cellsize_;\n\n\t\t\t\tThing thing = at(row,col);\n\t\t\t\tif ( thing != null ) {\n\t\t\t\t\tthing.paint(x,y,cellsize_,cellsize_);\n\t\t\t\t}\n\t\t\t\tPaint.setColor(Color.GRAY);\n\t\t\t\tPaint.drawRect(x,y,cellsize_,cellsize_);\n\t\t\t}\n\t\t}\n\n\t}", "private void createNonDoorCells(Rectangle cellSize) {\r\n\r\n\t\tfor (int i = 0; i < this.roomCells.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.roomCells[i].length; j++) {\r\n\t\t\t\tif (this.roomCells[i][j] == null) {\r\n\r\n\t\t\t\t\tPoint coordinate = new Point(i * cellSize.width, j * cellSize.height);\r\n\t\t\t\t\tGameLocation location = new GameLocation(coordinate, this.roomId);\r\n\r\n\t\t\t\t\tif (this.stepablePolygon.contains(coordinate)) {\r\n\r\n\t\t\t\t\t\tthis.roomCells[i][j] = new Cell(location, CellProperty.Stepable);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthis.roomCells[i][j] = new Cell(location, CellProperty.NoProperty);\r\n\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}", "public Cell diagonal(UTTTSubBoard board, List<Cell> cells) {\n Iterator iterator = cells.iterator();\n while(iterator.hasNext()) {\n Cell cell = (Cell) iterator.next();\n\n int x = cell.getCell().getRow();\n int y = cell.getCell().getRow();\n\n if ((x + y)%2 == 0){ \n\n if (x == 1 && y == 1){\n int firstXIndexToCheck = ((((x+1)%3)+3)%3);\n int secondXIndexToCheck = ((((x-1)%3)+3)%3);\n\n int firstYIndexToCheck = ((((y+1)%3)+3)%3);\n int secondYIndexToCheck = ((((y-1)%3)+3)%3);\n\n Coords firstCoord = new Coords(firstXIndexToCheck, firstYIndexToCheck);\n Coords secondCoord = new Coords(secondXIndexToCheck, secondYIndexToCheck);\n Coords thirdCoord = new Coords(secondXIndexToCheck, firstYIndexToCheck);\n Coords fourthCoord = new Coords(firstXIndexToCheck, secondYIndexToCheck);\n \n Cell firstCell = board.getCell(firstCoord);\n Cell secondCell = board.getCell(secondCoord);\n Cell thirdCell = board.getCell(thirdCoord);\n Cell fourthCell = board.getCell(fourthCoord);\n\n if (firstCell.getPlayer() == PlayerEnum.ME && secondCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n else if (thirdCell.getPlayer() == PlayerEnum.ME && fourthCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n // else if (firstCell.getPlayer() == PlayerEnum.ME || secondCell.getPlayer() == PlayerEnum.ME\n // || thirdCell.getPlayer() == PlayerEnum.ME || fourthCell.getPlayer() == PlayerEnum.ME) {\n // matchedCells.add(cell);\n // }\n }\n\n else {\n\n int firstXIndexToCheck = ((((x+1)%3)+3)%3);\n int secondXIndexToCheck = ((((x-1)%3)+3)%3);\n\n int firstYIndexToCheck = ((((y+1)%3)+3)%3);\n int secondYIndexToCheck = ((((y-1)%3)+3)%3);\n\n Coords firstCoord = new Coords(firstXIndexToCheck, firstYIndexToCheck);\n Coords secondCoord = new Coords(secondXIndexToCheck, secondYIndexToCheck);\n\n Cell firstCell = board.getCell(firstCoord);\n Cell secondCell = board.getCell(secondCoord);\n\n if (firstCell.getPlayer() == PlayerEnum.ME && secondCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n else if (firstCell.getPlayer() == PlayerEnum.ME || secondCell.getPlayer() == PlayerEnum.ME) {\n matchedCells.add(cell);\n }\n\n }//else\n }\n }\n return null;\n }", "public WorldImage drawCell(int blocks) {\r\n return new EmptyImage();\r\n }", "public void drawTileH(Tile t, int x, int y, int cellSize, PGraphics pdf)\n {\n for(int i = 0; i < t.getW(); i++)\n {\n for(int j = 0; j < t.getH(); j++)\n {\n if(t.getPattern()[t.getW()-1-i][j])\n pdf.rect(x+i*cellSize, y+j*cellSize, cellSize*1.1f, cellSize*1.1f);\n }\n }\n }", "private void paintBeanMachine(){\n Line baseLine = new Line();\n\n baseLine.startXProperty().bind(widthProperty().multiply(0.2));\n baseLine.startYProperty().bind(heightProperty().multiply(0.8));\n baseLine.endXProperty().bind(widthProperty().multiply(0.8));\n baseLine.endYProperty().bind(heightProperty().multiply(0.8));\n\n // distance gap per circle\n double distance = (baseLine.getEndX() - baseLine.getStartX()) / SLOTS;\n ballRadius = distance / 2;\n\n //Draw pegs\n DoubleBinding dist = baseLine.endXProperty().subtract(baseLine.startXProperty()).divide(SLOTS);\n Circle[] pegs = new Circle[factorialSum(SLOTS)];\n int index = 0;\n\n for(int row = 0; row < SLOTS; row++){\n DoubleBinding y = baseLine.startYProperty().subtract(heightProperty().multiply(0.2).divide(row + 1));\n\n for(int col = 0; col < SLOTS - row; col++){\n Circle peg = new Circle(5, Color.BLUE);\n\n peg.centerXProperty().bind(baseLine.startXProperty()\n .add(dist.multiply(row).multiply(0.5))\n .add(dist.divide(2))\n .add(dist.multiply(row)));\n peg.centerYProperty().bind(y);\n\n //peg = new Circle(x, y, mWidth * 0.012, Color.BLUE);\n System.out.println(index);\n pegs[index++] = peg;\n\n Line line = new Line();\n line.startXProperty().bind(peg.centerXProperty());\n line.startYProperty().bind(peg.centerYProperty());\n line.endXProperty().bind(peg.centerXProperty());\n line.endYProperty().bind(baseLine.startYProperty());\n getChildren().add(line);\n }\n }\n\n /*\n for(int i = 1; i <= SLOTS; i++){\n double x = baseLine.getStartX() + (i * distance * 0.50) + distance / 2;\n double y = baseLine.getStartY() - (distance * i) - distance / 2;\n\n for(int j = 0; j <= SLOTS - i; j++){\n Circle peg = new Circle(5, Color.BLUE);\n DoubleBinding dist = baseLine.endXProperty().subtract(baseLine.startXProperty()).divide(SLOTS);\n\n peg.centerXProperty().bind(baseLine.startXProperty()\n .add(dist.multiply(i).multiply(0.5))\n .add(dist.divide(2)));\n peg.centerYProperty().bind(baseLine.startYProperty()\n .subtract(dist.multiply(i))\n .subtract(dist.divide(2)));\n\n //peg = new Circle(x, y, mWidth * 0.012, Color.BLUE);\n System.out.println(index);\n pegs[index++] = peg;\n x += distance;\n }\n }\n */\n\n distance = distance + (distance / 2) - pegs[0].getRadius();\n // Connect the base of the triangle with lowerLine\n // NOT including left most and right most line\n Line[] lines = new Line[SLOTS - 1];\n for (int i = 0; i < SLOTS - 1; i++) {\n double x1 = pegs[i].getCenterX() + pegs[i].getRadius() * Math.sin(Math.PI);\n double y1 = pegs[i].getCenterY() - pegs[i].getRadius() * Math.cos(Math.PI);\n lines[i] = new Line(x1, y1, x1, y1 + distance);\n\n }\n // Draw right most and left most most line\n Line[] sides = new Line[6];\n sides[0] = new Line(\n baseLine.getEndX(), baseLine.getEndY(),\n baseLine.getEndX(), baseLine.getEndY() - distance);\n sides[1] = new Line(\n baseLine.getStartX(), baseLine.getStartY(),\n baseLine.getStartX(), baseLine.getStartY() - distance);\n\n //Draw left side line\n /*\n for(int i = 2; i < 4; i++){\n double x = pegs[pegs.length - i].getCenterX();\n double y = pegs[pegs.length - i].getCenterY() - distance;\n sides[i] = new Line(x, y, sides[i - 2].getEndX(), sides[i - 2].getEndY());\n }\n */\n\n // Draw the upper 2 lines on top of the triangle\n /*\n for (int i = 4; i < sides.length; i++){\n sides[i] = new Line(\n sides[i-2].getStartX(), sides[i-2].getStartY(),\n sides[i-2].getStartX(), sides[i-2].getStartY() - (distance * 0.6)\n );\n }\n */\n\n getChildren().addAll(baseLine);\n getChildren().addAll(pegs);\n //getChildren().addAll(lines);\n //getChildren().addAll(sides);\n }", "public void drawTileV(Tile t, int x, int y, int cellSize, PGraphics pdf)\n {\n for(int i = 0; i < t.getW(); i++)\n {\n for(int j = 0; j < t.getH(); j++)\n {\n if(t.getPattern()[i][t.getH()-1-j])\n pdf.rect(x+i*cellSize, y+j*cellSize, cellSize*1.1f, cellSize*1.1f);\n }\n }\n }", "protected void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\t\r\n\t\tInsets ins = this.getInsets();\r\n\t\tint varX = ins.left+5;\r\n\t\tint varY = ins.top+5;\r\n\r\n\t\tif ( pozicijaIgraca.equals(\"gore\")){\t\t\t\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()+5;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 120, varY + 100);\r\n\t\t} else {\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()/2;\r\n\t\t\t\tvarY = varY + karta.getHeight()/10;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 100 , varY + 90);\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "private void drawCritter(Canvas canvas, Critter critter, int cell_x, int cell_y) {\n\t\tGraphicsContext gc = canvas.getGraphicsContext2D();\n\t\tdouble cell_width = canvas.getWidth()/Params.world_width;\n\t\tdouble cell_height = canvas.getHeight()/Params.world_width;\n\n\t\tdouble length, padding = cell_width/10, x_offset = padding/2, y_offset = padding/2;\n\t\tif(cell_width<cell_height){\n\t\t\tlength = cell_width;\n\t\t\ty_offset += (cell_height-cell_width)/2;\n\t\t}else{\n\t\t\tlength = cell_height;\n\t\t\tx_offset += (cell_width-cell_height)/2;\n\t\t}\n\n\t\tgc.setStroke(critter.viewOutlineColor());\n\t\tgc.setFill(critter.viewFillColor());\n\n\t\tswitch (critter.viewShape()){\n\t\t\tcase CIRCLE: \tdrawCircle(gc, x_offset + cell_x*cell_width, y_offset + cell_y*cell_height, length-padding);\n\t\t\t\t\t\t \tbreak;\n\t\t\tcase SQUARE: \tdrawSquare(gc, x_offset + cell_x*cell_width, y_offset + cell_y*cell_height, length-padding);\n\t\t\t\t\t\t\tbreak;\n\t\t\tcase TRIANGLE: \tdrawTriangle(gc, x_offset + cell_x*cell_width, y_offset + cell_y*cell_height, length-padding);\n\t\t\t\t\t\t\tbreak;\n\t\t\tcase DIAMOND: \tdrawDiamond(gc, x_offset + cell_x*cell_width, y_offset + cell_y*cell_height, length-padding);\n\t\t\t\t\t\t\tbreak;\n\t\t\tcase STAR:\t\tdrawStar(gc, x_offset + cell_x*cell_width, y_offset + cell_y*cell_height, length-padding);\n\t\t\t\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n\tpublic void draw(RoomBlocks grid) {\n\t\trenderer.setProjectionMatrix(CameraHolder.instance().getOrtho().combined);\n//\t\tCont tot = new Cont();\n\t\tColor color = new Color();\n\n\t\t\n\t\tDimensions dim = grid.getDimensions().toRoomWorldDimmensions();\n\t\tgrid.forEach(bl -> {\n//\t\t\t\n\t\t\tint x = (GeneratorConstants.ROOM_BLOCK_SIZE * bl.getX()) + GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\n\t\t\tx = (dim.getW() - x) + dim.getX();\n\t\t\t\n\t\t\tint pseudWorldRoomY = grid.getDimensions().getY() * Configuration.getLevelGridElementContentSize();\n\t\t\tint y = (bl.getY() + pseudWorldRoomY) * (GeneratorConstants.ROOM_BLOCK_SIZE);\n\t\t\t\n\t\t\tShapeType shType = ShapeType.Filled;\n\t\t\tboolean render = false;\n\t\t\t\n\t\t\tif(bl.isDoor()) {\n\t\t\t\trender = true;\n\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t} else if(bl.isWall()) {\n//\t\t\t\trender = true;\n//\t\t\t\tcolor.set(1, 1, 1, 1);\n//\t\t\t\tshType = ShapeType.Line;\n\t\t\t} else if(bl.getMetaInfo() != null) {//TODO\n\t\t\t\t\n\t\t\t\tif(bl.getMetaInfo().getType().equals(\".\")) {\n\t\t\t\t\trender = true;\n\t\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t\t} else if(!bl.getMetaInfo().getType().equals(\"x\")) {\n\t\t\t\t\t\n\t\t\t\t\tBrush brush = Configuration.brushesPerTile.get(bl.getMetaInfo().getType().charAt(0));\n\t\t\t\t\tif(brush != null) {// && bl.getOwner() != null\n\t\t\t\t\t\t\n//\t\t\t\t\t\tif(bl.getOwner() != null) {\n//\t\t\t\t\t\t\tSystem.out.println(\"owner: \" + brush.tile);\n//\t\t\t\t\t\t}\t\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t\t\trender = true;\n\t\t\t\t\t\tcolor.set(brush.color[0], brush.color[1], brush.color[2], 1);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(render) {\n\t\t\t\t\n\t\t\t\tint size = GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\t\n\t\t\t\trenderer.begin(shType);\n\t\t\t\trenderer.setColor(color);\n\t\t\t\trenderer.rect(x, y, size, size);\n\t\t\t\trenderer.end();\n\t\t\t}\n\t\t\t\n//\t\t\tif(bl.getOwner() != null ) {\n//\t\t\t\tfinal int fx = x;\n//\t\t\t\tfinal int fy = y;\n//\t\t\t\t\n//\t\t\t\tbl.getOwner().forEachItems(itm -> {//desenhando os items\n//\t\t\t\t\trenderer.begin(ShapeType.Filled);\n//\t\t\t\t\trenderer.setColor(itm.color[0], itm.color[1], itm.color[2], 1);\n//\t\t\t\t\trenderer.rect(fx + itm.dx, fy + itm.dy, itm.width, itm.height);\n//\t\t\t\t\trenderer.end();\t\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t}\t\t\t\n\t\t});\n\t}", "public PdfPTable fillAspecttable(DashaStrength dashaBean,ColorElement mycolor) {\n\t\tPdfPTable rahuAndKetutable = null;\n\t\ttry {\n\n\t\t\tFont fontaspectHead = new Font();\n\t\t\tfontaspectHead.setSize(this.getTableHeadingfont());\n\t\t\tfontaspectHead.setColor(mycolor.fillColor(this.getTableHeadingColor()));\n\n\t\t\tFont fontaspect = new Font();\n\t\t\tfontaspect.setSize(this.getTableDatafont());\n\t\t\tfontaspect.setColor(mycolor.fillColor(this.getTableDataColor()));\n\t\t\trahuAndKetutable = new PdfPTable(2);\n\t\t\t// rahuAndKetutable.getDefaultCell().setBorderWidth(1);\n\t\t\trahuAndKetutable.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableHeadingBgcolor()));\n\t\t\trahuAndKetutable.addCell(new Phrase(new Chunk(\"Rahu\", fontaspectHead)));\n\n\t\t\trahuAndKetutable.addCell(new Phrase(new Chunk(\"Ketu\", fontaspectHead)));\n\t\t\trahuAndKetutable.completeRow();\n\n\n\t\t\tPdfPTable aspectTable = new PdfPTable(2);\n\t\t\tfloat wid[] = {20, 70};\n\t\t\taspectTable.setWidths(wid);\n\n\t\t\tPdfPTable sourceTableRahu = new PdfPTable(1);\n\t\t\t// sourceTableRahu.getDefaultCell().setBorderWidth(0);\n\t\t\tString RahuValue = dashaBean.getRahuSource();\n\t\t\tsourceTableRahu.addCell(new Phrase(new Chunk(RahuValue, fontaspect)));\n\t\t\taspectTable.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableDataBgcolor()));\n\t\t\taspectTable.addCell(sourceTableRahu);\n\t\t\tPdfPTable sourceTableAspect = new PdfPTable(1);\n\t\t\tString abctest=dashaBean.getAspectRahu();\n\t\t\tlogger.debug(\"HEREEE MEEEEEEEEEE>> \"+abctest);\n\t\t\tString[] RahuAspect = dashaBean.getAspect(Planet.toPlanets(\"Rahu\"));\n\t\t\tif (RahuAspect != null) {\n\t\t\t\tString RahuAspectstr = \"\";\n\t\t\t\tlogger.debug(\"HEREEEEEE >>>>>> \"+RahuAspect[0]);\n\n\t\t\t\tfor (int i = 0; i < RahuAspect.length; i++) {\n\t\t\t\t\tRahuAspectstr +=RahuAspect[i]+\"\\n\";\n\t\t\t\t}\n\t\t\t\tsourceTableAspect.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableDataBgcolor()));\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"A : \" +RahuAspectstr, fontaspect)));\n\t\t\t} else {\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"A : \"+\"NA\", fontaspect)));\n\t\t\t}\n\n\n\t\t\tString[] RahuConjuction = dashaBean.getConjuction(Planet.toPlanets(\"Rahu\"));\n\n\t\t\tif (RahuConjuction != null) {\n\t\t\t\tString RahuConjuctionstr = \"\";\n\n\t\t\t\tfor (int i = 0; i < RahuConjuction.length; i++) {\n\t\t\t\t\tRahuConjuctionstr += RahuConjuction[i]+\"\\n\";\n\n\t\t\t\t}\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"C : \" + RahuConjuctionstr, fontaspect)));\n\t\t\t} else {\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"C : NA\", fontaspect)));\n\t\t\t}\n\t\t\tString RahuSignLoard = dashaBean.getSignLoard(Planet.toPlanets(\"Rahu\"));\n\t\t\tString RahuRashiLoard = dashaBean.getRashiLoard(Planet.toPlanets(\"Rahu\"));\n\t\t\tif (RahuSignLoard != null) {\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"S : \" + RahuSignLoard, fontaspect)));\n\t\t\t} else {\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"S : NA\", fontaspect)));\n\n\t\t\t}\n\n\t\t\tif (RahuRashiLoard != null) {\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"R : \" + RahuRashiLoard, fontaspect)));\n\n\t\t\t} else {\n\t\t\t\tsourceTableAspect.addCell(new Phrase(new Chunk(\"R : NA\", fontaspect)));\n\t\t\t}\n\n\n\t\t\taspectTable.addCell(sourceTableAspect);\n\t\t\trahuAndKetutable.addCell(aspectTable);\n\t\t\t//******************************************for the ketu ***************************************************//\n\n\n\t\t\tPdfPTable aspectTable2 = new PdfPTable(2);\n\n\t\t\taspectTable2.setWidths(wid);\n\t\t\tPdfPTable sourceTableKetu = new PdfPTable(1);\n\t\t\tString KetuValue = dashaBean.getKetuSource();\n\t\t\tsourceTableKetu.addCell(new Phrase(new Chunk(KetuValue, fontaspect)));\n\t\t\taspectTable2.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableDataBgcolor()));\n\t\t\taspectTable2.addCell(sourceTableKetu);\n\n\t\t\tPdfPTable sourceTableKetuAspect = new PdfPTable(1);\n\t\t\tString[] KetuAspect = dashaBean.getAspect(Planet.toPlanets(\"Ketu\"));\n\t\t\tif (KetuAspect != null) {\n\t\t\t\tString KetuAspectstr = \"\";\n\t\t\t\tlogger.info(\"HEREEEEEE >>>>>> \"+KetuAspect[0]);\n\n\t\t\t\tfor (int i = 0; i < KetuAspect.length; i++) {\n\t\t\t\t\tKetuAspectstr += KetuAspect[i]+\"\\n\";\n\t\t\t\t}\n\t\t\t\tsourceTableKetuAspect.getDefaultCell().setBackgroundColor(mycolor.fillColor(getTableDataBgcolor()));\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"A : \" + KetuAspectstr, fontaspect)));\n\t\t\t} else {\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"A : NA\", fontaspect)));\n\t\t\t}\n\n\n\t\t\tString[] KetuConjuction = dashaBean.getConjuction(Planet.toPlanets(\"Ketu\"));\n\n\t\t\tif (KetuConjuction != null) {\n\t\t\t\tString KetuConjuctionstr = \"\";\n\n\t\t\t\tfor (int i = 0; i < KetuConjuction.length; i++) {\n\t\t\t\t\tKetuConjuctionstr += KetuConjuction[i]+\"\\n\";\n\n\t\t\t\t}\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"C : \" + KetuConjuctionstr, fontaspect)));\n\t\t\t} else {\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"C : NA\", fontaspect)));\n\t\t\t}\n\t\t\tString KetuSignLoard = dashaBean.getSignLoard(Planet.toPlanets(\"Ketu\"));\n\t\t\tString KetuRashiLoard = dashaBean.getRashiLoard(Planet.toPlanets(\"Ketu\"));\n\n\n\t\t\tif (KetuSignLoard != null) {\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"S : \" + KetuSignLoard, fontaspect)));\n\t\t\t} else {\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"S : NA\", fontaspect)));\n\n\t\t\t}\n\n\n\n\t\t\tif (KetuRashiLoard != null) {\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"R : \" + KetuRashiLoard, fontaspect)));\n\n\t\t\t} else {\n\t\t\t\tsourceTableKetuAspect.addCell(new Phrase(new Chunk(\"R : NA\", fontaspect)));\n\t\t\t}\n\n\n\t\t\taspectTable2.addCell(sourceTableKetuAspect);\n\n\t\t\trahuAndKetutable.addCell(aspectTable2);\n\t\t\trahuAndKetutable.completeRow();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\t\treturn rahuAndKetutable;\n\n\n\t}", "public abstract boolean isOneCell();", "private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyValues.HEX_SCALE + MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE;\n double posy = 2*MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE ;\n HexCell startCell = new HexCell(0,0, this);\n startCell.changePosition(posx, posy);\n boardCells[0][0] = startCell;\n for (int i = 0; i< x-1; i++) {\n HexCell currentCell = new HexCell(i+1, 0, this);\n boardCells[i+1][0] = currentCell;\n //i mod 2 = 0: Bottom\n if (i % 2 == 0) {\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT_RIGHT );\n } else {\n //i mod 2 =1: Top\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.TOP_RIGHT );\n }\n }\n for(int i = 0; i < x; i++){\n for(int j = 0; j < y-1; j++){\n HexCell currentCell = new HexCell(i, j+1, this);\n //System.out.println(Integer.toString(i) + Integer.toString(j));\n boardCells[i][j+1] = currentCell;\n boardCells[i][j].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT);\n }\n }\n }", "private Boolean pointNotCorner(Position3D cell,int d, int r, int c) {\n\n return d == cell.getDepthIndex() && (r == cell.getRowIndex() || c == cell.getColumnIndex());\n }", "private void paintCourbeCroix() {\n\t\tfloat x, y;\n\t\tint i, j;\n\t\tint k, l;\n\t\t\n\t\t\n\t\tfor(x=xMin; x<=xMax; x++) { //Une croix pour chaque x entier dans le repere\n\t\t\ty = parent.getY(x);\n\t\t\t\n\t\t\tif(y>yMin && y<yMax) { //Si le point est dans le repere\n\t\t\t\ti = convertX(x);\n\t\t\t\tj = convertY(y);\n\t\t\t\t\n\t\t\t\tfor(k=i-2, l=j-2; l<=j+2; k++, l++)\t// * *\n\t\t\t\t\tpaintPointInColor(k, l);\t\t// * *\n\t\t\t\t\t\t\t\t\t\t\t\t\t// *\n\t\t\t\tfor(k=i+2, l=j-2; l<=j+2; k--, l++)\t// * *\n\t\t\t\t\tpaintPointInColor(k, l);\t\t// * *\n\t\t\t}\n\t\t}\t\n\t}", "public String checkCheese() {\n\n\n int j = 1;\n\n while (j < _cheese.getY() + 2) {\n\n for (int i = 1; i < _cheese.getX() + 1; i++) {\n\n int i2 = i;\n int j2 = j;\n\n\n if (_cheese.getCellArray()[i2][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2].isVisited()) {\n int temp1 = i2;\n int temp2 = j2;\n _holeCount++;\n while ((\n\n (_cheese.getCellArray()[i2 + 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2].isVisited()) ||\n\n\n (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2 + 1].isVisited()) ||\n\n\n (_cheese.getCellArray()[i2][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) ||\n\n (_cheese.getCellArray()[i2 - 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 - 1][j2 + 1].isVisited()) ||\n\n (_cheese.getCellArray()[i2 - 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 - 1][j2].isVisited()) ||\n\n (_cheese.getCellArray()[i2 - 1][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 - 1][j2 - 1].isVisited()) ||\n\n (_cheese.getCellArray()[i][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i][j2 - 1].isVisited()) ||\n\n (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2 + 1].isVisited())\n\n )) {\n if (_cheese.getCellArray()[i2 + 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2].isVisited()) {\n _cheese.getCellArray()[i2 + 1][j2].setVisited(true);\n i2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2 + 1][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 + 1][j2 + 1].setVisited(true);\n i2++;\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2][j2 + 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 - 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 - 1][j2 + 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 - 1][j2].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 - 1][j2].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 - 1][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 - 1][j2 - 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2][j2 - 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2][j2 - 1].setVisited(true);\n j2++;\n _holeCount++;\n } else if (_cheese.getCellArray()[i2 + 1][j2 + 1].getCheeseCell() == \"*\" && !_cheese.getCellArray()[i2][j2 + 1].isVisited()) {\n _cheese.getCellArray()[i2 + 1][j2 + 1].setVisited(true);\n j2++;\n\n }\n\n\n }\n _cheese.getCellArray()[temp1][temp2].setVisited(true);\n if (_holeCount > _biggestHole) {\n _biggestHole = _holeCount;\n }\n }\n _cheese.getCellArray()[i2][j2].setVisited(true);\n\n\n }\n\n\n j++;\n }\n\n\n return \"hole-count: \" + _holeCount + \"\\n\" +\n \"biggest hole edge: \" + _biggestHole;\n\n }", "public void setGFXCell(GFXDataCell gfxCell);", "public double Baricentro() {\n if (puntos.size() <= 2) {\n return 0;\n } else {\n // Inicializacion de las areas\n double areaPonderada = 0;\n double areaTotal = 0;\n double areaLocal;\n // Recorrer la lista conservando 2 puntos\n Punto2D antiguoPt = null;\n for (Punto2D pt : puntos) {\n if (antiguoPt != null) {\n // Cálculo deñ baricentro local\n if (antiguoPt.y == pt.y) {\n // Es un rectángulo, el baricentro esta en\n // centro\n areaLocal = pt.y * (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n } else {\n // Es un trapecio, que podemos descomponer en\n // un reactangulo con un triangulo\n // rectangulo adicional\n // Separamos ambas formas\n // Primer tiempo: rectangulo\n areaLocal = Math.min(pt.y, antiguoPt.y) + (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n //Segundo tiempo: triangulo rectangulo\n areaLocal = (pt.x - antiguoPt.x) * Math.abs(pt.y - antiguoPt.y) / 2.0;\n areaTotal += areaLocal;\n if (pt.y > antiguoPt.y) {\n // Baricentro a 1/3 del lado pt\n areaPonderada += areaLocal * (2.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n } else {\n // Baricentro a 1/3 dek lado antiguoPt\n areaPonderada += areaLocal * (1.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n }\n }\n }\n antiguoPt = pt;\n }\n // Devolvemos las coordenadas del baricentro\n return areaPonderada / areaTotal;\n }\n }", "public int getCell() {\n return this.cell;\n }", "private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}", "public void putCellInGoodPlace(JmtCell cell, int x, int y, boolean flag) {\n \t\tif (sp > 9) {\r\n \t\t\tsp = 0;\r\n \t\t}\r\n \t\tint oldPointX = 0;\r\n \t\tint oldPointY = 0;\r\n \t\tboolean inGroup = false;\r\n \t\t// Il flag stato creato per capire sapere se e' una block regione e\r\n \t\t// quindi utilizzare\r\n \t\t// il vecchio metodo oppure se e' una cella quindi flag=true allora uso\r\n \t\t// il nuovo\r\n \t\t// System.out.println(\"------------PUT CELL IN GOOD PLACE\r\n \t\t// ----------------------\");\r\n \r\n \t\tif (flag) {\r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tRectangle bounds2 = new Rectangle((int) bounds.getX() - 20, (int) bounds.getY(), (int) bounds.getWidth() + 38, (int) bounds.getHeight());\r\n \r\n \t\t\toldPointX = x;\r\n \t\t\toldPointY = y;\r\n \t\t\t// ---------inzio\r\n \t\t\t// Object[] cells=(graph).getDescendants(graph.getRoots());\r\n \t\t\t// for(int j=0;j<cells.length;j++){\r\n \t\t\t// if((cells[j] instanceof JmtCell) &&(cells[j]!=cell)){\r\n \t\t\t// Rectangle\r\n \t\t\t// boundcell=GraphConstants.getBounds(((JmtCell)cells[j]).getAttributes()).getBounds();\r\n \t\t\t// if(boundcell.intersects(bounds2)){\r\n \t\t\t// System.out.println(\"true\");\r\n \t\t\t// }\r\n \t\t\t// }\r\n \t\t\t// }\r\n \r\n \t\t\t// ---------------fine\r\n \t\t\t// check if a cell isInGroup\r\n \t\t\tif (isInGroup(cell)) {\r\n \r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \r\n \t\t\t// Qua ho le celle e archi che intersecano la mia cella\r\n \t\t\t// selezionata..bounds (molto efficente dal punto di vista della\r\n \t\t\t// pesantezza)\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds2));\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\tresetOverLapping = 0;\r\n \t\t\twhile (overlapping.length > 0) {\r\n \r\n \t\t\t\t// Moves bounds until it doesn't overlap with anything\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (int j = 0; j < overlapping.length; j++) {\r\n \r\n \t\t\t\t\tresetOverLapping++;\r\n \t\t\t\t\t// resetOverLapping is inserted for an anormall behavior of\r\n \t\t\t\t\t// Tool\r\n \t\t\t\t\t// in fact, if you disable this variable you can see that\r\n \t\t\t\t\t// the tools\r\n \t\t\t\t\t// stop and \"for cycle\" will be repeated infinite times\r\n \t\t\t\t\tif (resetOverLapping > 50) {\r\n \t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// System.out.println(\"---flag in for---\");\r\n \t\t\t\t\t// if(overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t// &&((JmtEdge)overlapping[j]).intersects((EdgeView)(graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t// false),\r\n \t\t\t\t\t// GraphConstants.getBounds(((JmtCell)cell).getAttributes())))\r\n \t\t\t\t\t// System.out.println(\"Intersect TRUE\");\r\n \r\n \t\t\t\t\t// Puts last to last corner of overlapping cells\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtCell && overlapping[j] != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \r\n \t\t\t\t\tif (!inGroup && overlapping[j] instanceof JmtCell && overlapping[j] != cell) {\r\n \r\n \t\t\t\t\t\tRectangle2D b = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\t// Consider only rectangles that intersects with given\r\n \t\t\t\t\t\t// bound\r\n \t\t\t\t\t\tif (b.intersects(bounds2)) {\r\n \t\t\t\t\t\t\tlast.setLocation(new Point(oldPointX, oldPointY));\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// inizio a controllare se l intersezione e' un lato\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t\t\t&& overlapping[j] != cell\r\n \t\t\t\t\t\t\t&& !isInGroup(overlapping[j])\r\n \t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\tGraphConstants.getBounds(cell.getAttributes())) && ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\tboolean access = false;\r\n \t\t\t\t\t\tboolean access2 = false;\r\n \r\n \t\t\t\t\t\t// Nonostatne SourceCell e SinkCell estendano JMTCell\r\n \t\t\t\t\t\t// avevo problemi di nullPointerException per questo\r\n \t\t\t\t\t\t// verifico di che\r\n \t\t\t\t\t\t// tipo sono\r\n \r\n \t\t\t\t\t\tif (cell instanceof SourceCell\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SourceCell) cell).getAttributes()))) {\r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\t\t\t// _______INIZIO_____\r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SourceCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\tsp = sp + 2;\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\taccess = true;\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (cell instanceof SinkCell) {\r\n \r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)) {\r\n \r\n \t\t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SinkCell) cell).getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SinkCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\taccess2 = true;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!isInGroup(overlapping[j]) && !access && !access2 && overlapping[j] instanceof JmtEdge) {\r\n \t\t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t\t\t\t\t\t\tfalse), GraphConstants.getBounds(cell.getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\taccess = access2 = false;\r\n \r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tif ((intersectionPoints == null) || intersectionPoints.size() <= 0) {\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(cell.getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\t;\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\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}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} // end if of edge\r\n \t\t\t\t}\r\n \r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \r\n \t\t\t// Puts this cell in found position\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t} else {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tif (isInGroup(cell)) {\r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \r\n \t\t\tif (overlapping == null) {\r\n \r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\twhile (overlapping.length > 0) {\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (Object element : overlapping) {\r\n \t\t\t\t\tif (element instanceof JmtCell && element != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (!inGroup && element instanceof JmtCell && element != cell) {\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \t\t\t\t\tif (isInGroup(element) && element instanceof JmtEdge) {\r\n \t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(element, false), GraphConstants\r\n \t\t\t\t\t\t\t\t\t\t.getBounds(cell.getAttributes()))) {\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtEdge) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\t// ___\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t}\r\n \r\n \t}", "public void displayRectangles() {\n\n\n int arr[] = IntStream.of(findDuplicates(TricolourController.BloodCells)).distinct().toArray(); //takes only the unique values from the array\n int arrWhite[] = IntStream.of(findDuplicates(TricolourController.WhiteCells)).distinct().toArray();\n int rIndex = 0;\n int lIndex = 0;\n int numCells = 0;\n\n for(int num : arrWhite) {\n System.out.println(num);\n }\n\n for(int j=0; j < arr.length - 1; j++) {\n for (int i = 0; i < TricolourController.BloodCells.length; i++) {\n if (TricolourController.BloodCells[i] == arr[j]) {\n int x = i % width, y = i / width;\n if (r[rIndex] == null) {\n r[rIndex] = new Rectangle(x, y, 1, 1);\n numCells++;\n }\n else {\n if (x > r[rIndex].getX() + r[rIndex].getWidth()) r[rIndex].setWidth(x - r[rIndex].getX());\n if (x < r[rIndex].getX()) {\n r[rIndex].setWidth(r[rIndex].getX() + r[rIndex].getWidth() - x);\n r[rIndex].setX(x);\n }\n if (y > r[rIndex].getY() + r[rIndex].getHeight()) r[rIndex].setHeight(y - r[rIndex].getY());\n }\n }\n }\n if (r[rIndex] != null) {\n r[rIndex].setFill(Color.TRANSPARENT);\n if(r[rIndex].getWidth() * r[rIndex].getHeight() > 2500) {\n r[rIndex].setStroke(Color.BLUE);\n }\n else r[rIndex].setStroke(Color.DARKGREEN);\n\n r[rIndex].setTranslateX(ImageViewTri.getLayoutX());\n r[rIndex].setTranslateY(ImageViewTri.getLayoutY());\n ((Pane) ImageViewTri.getParent()).getChildren().add(r[rIndex++]);\n RedCellText.setText(String.valueOf(numCells));\n }\n l[lIndex] = new Label();\n l[lIndex].setText(String.valueOf(numCells));\n l[lIndex].setTextFill(Color.BLACK);\n l[lIndex].setTranslateX(r[rIndex - 1].getX());\n l[lIndex].setTranslateY(r[rIndex - 1].getY());\n\n ((Pane) ImageViewTri.getParent()).getChildren().add(l[lIndex++]);\n }\n\n//Handles the white cell rectangles.\n int whitenumcells = 0;\n for(int j=0; j < arrWhite.length - 1; j++) {\n for (int i = 0; i < TricolourController.WhiteCells.length; i++) {\n if (TricolourController.WhiteCells[i] == arrWhite[j]) {\n int x = i % width, y = i / width;\n if (r[rIndex] == null) {\n r[rIndex] = new Rectangle(x, y, 1, 1);\n whitenumcells++;\n }\n else {\n if (x > r[rIndex].getX() + r[rIndex].getWidth()) r[rIndex].setWidth(x - r[rIndex].getX());\n if (x < r[rIndex].getX()) {\n r[rIndex].setWidth(r[rIndex].getX() + r[rIndex].getWidth() - x);\n r[rIndex].setX(x);\n }\n if (y > r[rIndex].getY() + r[rIndex].getHeight()) r[rIndex].setHeight(y - r[rIndex].getY());\n }\n }\n }\n if (r[rIndex] != null) {\n r[rIndex].setFill(Color.TRANSPARENT);\n r[rIndex].setStroke(Color.YELLOW);\n\n r[rIndex].setTranslateX(ImageViewTri.getLayoutX());\n r[rIndex].setTranslateY(ImageViewTri.getLayoutY());\n ((Pane) ImageViewTri.getParent()).getChildren().add(r[rIndex++]);\n WhiteCellText.setText(String.valueOf(whitenumcells));\n }\n l[lIndex] = new Label();\n l[lIndex].setText(String.valueOf(whitenumcells));\n l[lIndex].setTextFill(Color.BLACK);\n l[lIndex].setTranslateX(r[rIndex - 1].getX());\n l[lIndex].setTranslateY(r[rIndex - 1].getY());\n\n ((Pane) ImageViewTri.getParent()).getChildren().add(l[lIndex++]);\n }\n }", "public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\n }", "@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }", "private void paintNull(Graphics g, int j, int i) {\n // Image img=imgVec[NULL_ST];\n // if(img==null){\n // img=createImage(ISIZE,ISIZE);\n // imgVec[NULL_ST]=img;\n // Graphics ig=img.getGraphics();\n g.setColor(Color.black);\n g.fillRect(j * CELL_SIZE, i * CELL_SIZE, CELL_SIZE, CELL_SIZE);\n // }\n // g.drawImage(img,j * DIM, i * DIM,this);\n }", "public Couple cellContent(int x, int y);", "public TileTurbineDynamoCoil() {\n\t\tsuper();\n\t}", "private void drawWalls(Graphics g) {\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].getNorth()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding+doorX, i*heightBlock+padding, j*widthBlock+padding+doorWidth, i*heightBlock+padding);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding+widthBlock, i*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getEast()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding+doorX, (j+1)*widthBlock+padding, i*heightBlock+padding+doorWidth);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine((j+1)*widthBlock+padding, i*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getSouth()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding+doorX, (i+1)*heightBlock+padding, j*widthBlock+padding+doorWidth, (i+1)*heightBlock+padding);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, (i+1)*heightBlock+padding, (j+1)*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t\tif(grid[i][j].getWest()!=null) {\n\t\t\t\t\tg.setColor(Color.decode(\"#CC3300\"));//Brown\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding+doorX, j*widthBlock+padding, i*heightBlock+padding+doorWidth);\n\t\t\t\t}else {\n\t\t\t\t\tg.setColor(Color.BLACK);\n\t\t\t\t\tg.drawLine(j*widthBlock+padding, i*heightBlock+padding, j*widthBlock+padding, (i+1)*heightBlock+padding);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addTurtle(double d, double height) {\n\t\t\n\t}", "public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }", "public void paint(Graphics g){\n \n for (int r=0; r < hexes.length; r++){ \n for (int c=0; c < hexes[r].length; c++){\n int x = (c*(55+HORIZONTAL_GAP))+(200-((2-(Math.abs(r-2)))*(55+HORIZONTAL_GAP)/2));\n int y = (r*(45+VERTICAL_GAP))+50;\n g.drawImage(hexes[r][c],x,y,this);\n g.drawImage(rolls[r][c],x+15,y+20,this);\n } \n }\n }", "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 }" ]
[ "0.6289478", "0.6240765", "0.6055103", "0.5952884", "0.5941357", "0.593108", "0.5912544", "0.5910715", "0.5864401", "0.58552456", "0.58551013", "0.58427227", "0.5834613", "0.58307636", "0.58176345", "0.5801446", "0.5757662", "0.57106656", "0.5673035", "0.5659197", "0.56533164", "0.5651766", "0.56491697", "0.5642411", "0.563316", "0.56077385", "0.5605835", "0.5593232", "0.55930483", "0.5590487", "0.55871993", "0.5581332", "0.5581266", "0.5574091", "0.5565092", "0.55419624", "0.5540155", "0.5538117", "0.553046", "0.55250144", "0.55187714", "0.55183357", "0.5516367", "0.5509801", "0.5501404", "0.55013704", "0.5498993", "0.54870045", "0.5481622", "0.5475142", "0.5469692", "0.5459955", "0.5458994", "0.54578537", "0.54515684", "0.54487586", "0.544501", "0.54289824", "0.54145646", "0.5410381", "0.5407603", "0.54011416", "0.5393516", "0.5388766", "0.53870463", "0.5382908", "0.53809035", "0.53760195", "0.5374296", "0.53741676", "0.53729254", "0.5372378", "0.5367381", "0.53513473", "0.5347173", "0.53455484", "0.53414536", "0.53327984", "0.5330586", "0.5330045", "0.53297096", "0.53278345", "0.5324066", "0.53213817", "0.5319767", "0.53142", "0.53102726", "0.5308257", "0.53074735", "0.53046805", "0.53005916", "0.52965325", "0.52952266", "0.5294302", "0.5287505", "0.5286649", "0.52800226", "0.5279078", "0.5277059", "0.527587", "0.52729255" ]
0.0
-1
Cek apakah cell surrounded by deep space
private boolean isSurroundedByDeepSpace() { List<Cell> surrounding = getSurroundingCells(currentWorm.position.x, currentWorm.position.y); int i = 0; boolean isAllDeepSpace = true; while (i < surrounding.size() && (isAllDeepSpace)) { if (!isDeepSpace(surrounding.get(i))) { isAllDeepSpace = false; } else { i++; } } return isAllDeepSpace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic boolean takeCellSpace() {\n\t\treturn true;\n\t}", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "public void addNotDefinedCells()\r\n {\r\n if (getCrosstabElement() == null) return;\r\n\r\n // First of all we have to calc what cells we have and in what position they are...\r\n int cellGridWidth = getCrosstabElement().getColumnGroups().size();\r\n int cellGridHeight = getCrosstabElement().getRowGroups().size();\r\n\r\n // We assume that cell D/D (detail/detail) is defined.\r\n // Cell x,y is the cell with totalColumnGroup = colums(x) and totalRowGroup the rows(y)\r\n\r\n for (int y = cellGridHeight; y >= 0; --y)\r\n {\r\n\r\n\r\n for (int x = cellGridWidth; x >= 0; --x)\r\n {\r\n\r\n String totalRowGroupName = \"\";\r\n if (y < cellGridHeight) totalRowGroupName = ((CrosstabGroup)getCrosstabElement().getRowGroups().get(y)).getName();\r\n\r\n String totalColumnGroupName = \"\";\r\n if (x < cellGridWidth) totalColumnGroupName = ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(x)).getName();\r\n\r\n CrosstabCell cell = findCell( totalRowGroupName,\r\n totalColumnGroupName);\r\n\r\n if (cell == null)\r\n {\r\n // we have to find a cell on the same row that matchs the width to inherit by...\r\n int cellHeight = getRowHeight( totalRowGroupName );\r\n int cellWidth = getColumnWidth( totalColumnGroupName );\r\n\r\n\r\n // look for a good row cell with the same width on the same row...\r\n CrosstabCell templateCell = null;\r\n for (int k=x+1; k < cellGridWidth; ++k)\r\n {\r\n templateCell = findCell( totalRowGroupName,\r\n ((CrosstabGroup)getCrosstabElement().getColumnGroups().get(k)).getName());\r\n if (templateCell == null)\r\n {\r\n continue;\r\n }\r\n\r\n if (templateCell.getWidth() == cellWidth)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( totalRowGroupName, \"\");\r\n if (templateCell != null && templateCell.getWidth() != cellWidth) templateCell = null;\r\n }\r\n\r\n if (templateCell == null) // Look on the same column...\r\n {\r\n for (int k=y+1; k < cellGridHeight; ++k)\r\n {\r\n templateCell = findCell( ((CrosstabGroup)getCrosstabElement().getRowGroups().get(k)).getName(),\r\n totalColumnGroupName);\r\n\r\n if (templateCell.getHeight() == cellHeight)\r\n {\r\n // FOUND IT!\r\n break;\r\n }\r\n else\r\n {\r\n templateCell = null;\r\n }\r\n }\r\n if (templateCell == null)\r\n {\r\n templateCell = findCell( \"\", totalColumnGroupName);\r\n if (templateCell != null && templateCell.getHeight() != cellHeight) templateCell = null;\r\n }\r\n }\r\n\r\n if (templateCell == null)\r\n {\r\n // Default not found!!!! Our cell will be void!\r\n cell = new CrosstabCell();\r\n cell.setParent( this.getCrosstabElement());\r\n cell.setWidth(cellWidth);\r\n cell.setHeight(cellHeight);\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n }\r\n else\r\n {\r\n cell = templateCell.cloneMe();\r\n cell.setColumnTotalGroup( totalColumnGroupName);\r\n cell.setRowTotalGroup( totalRowGroupName );\r\n cell.setParent( this.getCrosstabElement());\r\n\r\n // Duplicate all elements of this cell, and reassign parent cell...\r\n int currentElements = getCrosstabElement().getElements().size();\r\n for (int i=0; i<currentElements; ++i)\r\n {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n // WARNING this copy does not support container and group elements!!!\r\n if (re.getCell() == templateCell)\r\n {\r\n re = re.cloneMe();\r\n cell.setColumnTotalGroup(totalColumnGroupName );\r\n cell.setRowTotalGroup(totalRowGroupName );\r\n re.setCell( cell );\r\n getCrosstabElement().getElements().add(re);\r\n }\r\n }\r\n }\r\n\r\n getCrosstabElement().getCells().add( cell );\r\n }\r\n }\r\n }\r\n\r\n }", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\n }", "public Couple cellContent(int x, int y);", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyValues.HEX_SCALE + MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE;\n double posy = 2*MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE ;\n HexCell startCell = new HexCell(0,0, this);\n startCell.changePosition(posx, posy);\n boardCells[0][0] = startCell;\n for (int i = 0; i< x-1; i++) {\n HexCell currentCell = new HexCell(i+1, 0, this);\n boardCells[i+1][0] = currentCell;\n //i mod 2 = 0: Bottom\n if (i % 2 == 0) {\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT_RIGHT );\n } else {\n //i mod 2 =1: Top\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.TOP_RIGHT );\n }\n }\n for(int i = 0; i < x; i++){\n for(int j = 0; j < y-1; j++){\n HexCell currentCell = new HexCell(i, j+1, this);\n //System.out.println(Integer.toString(i) + Integer.toString(j));\n boardCells[i][j+1] = currentCell;\n boardCells[i][j].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT);\n }\n }\n }", "private int padWithEmptyCells(Composite parent, int col) {\n for (; col < NUM_COL; ++col) {\n emptyCell(parent);\n }\n col = 0;\n return col;\n }", "public int getColspan() \n {\n return 1;\n }", "@Override\n public void normalCell() {\n gCell.setFill(Color.BLACK);\n }", "GroupCell createGroupCell();", "public void putCellInGoodPlace(JmtCell cell, int x, int y, boolean flag) {\n \t\tif (sp > 9) {\r\n \t\t\tsp = 0;\r\n \t\t}\r\n \t\tint oldPointX = 0;\r\n \t\tint oldPointY = 0;\r\n \t\tboolean inGroup = false;\r\n \t\t// Il flag stato creato per capire sapere se e' una block regione e\r\n \t\t// quindi utilizzare\r\n \t\t// il vecchio metodo oppure se e' una cella quindi flag=true allora uso\r\n \t\t// il nuovo\r\n \t\t// System.out.println(\"------------PUT CELL IN GOOD PLACE\r\n \t\t// ----------------------\");\r\n \r\n \t\tif (flag) {\r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tRectangle bounds2 = new Rectangle((int) bounds.getX() - 20, (int) bounds.getY(), (int) bounds.getWidth() + 38, (int) bounds.getHeight());\r\n \r\n \t\t\toldPointX = x;\r\n \t\t\toldPointY = y;\r\n \t\t\t// ---------inzio\r\n \t\t\t// Object[] cells=(graph).getDescendants(graph.getRoots());\r\n \t\t\t// for(int j=0;j<cells.length;j++){\r\n \t\t\t// if((cells[j] instanceof JmtCell) &&(cells[j]!=cell)){\r\n \t\t\t// Rectangle\r\n \t\t\t// boundcell=GraphConstants.getBounds(((JmtCell)cells[j]).getAttributes()).getBounds();\r\n \t\t\t// if(boundcell.intersects(bounds2)){\r\n \t\t\t// System.out.println(\"true\");\r\n \t\t\t// }\r\n \t\t\t// }\r\n \t\t\t// }\r\n \r\n \t\t\t// ---------------fine\r\n \t\t\t// check if a cell isInGroup\r\n \t\t\tif (isInGroup(cell)) {\r\n \r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \r\n \t\t\t// Qua ho le celle e archi che intersecano la mia cella\r\n \t\t\t// selezionata..bounds (molto efficente dal punto di vista della\r\n \t\t\t// pesantezza)\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds2));\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\tresetOverLapping = 0;\r\n \t\t\twhile (overlapping.length > 0) {\r\n \r\n \t\t\t\t// Moves bounds until it doesn't overlap with anything\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (int j = 0; j < overlapping.length; j++) {\r\n \r\n \t\t\t\t\tresetOverLapping++;\r\n \t\t\t\t\t// resetOverLapping is inserted for an anormall behavior of\r\n \t\t\t\t\t// Tool\r\n \t\t\t\t\t// in fact, if you disable this variable you can see that\r\n \t\t\t\t\t// the tools\r\n \t\t\t\t\t// stop and \"for cycle\" will be repeated infinite times\r\n \t\t\t\t\tif (resetOverLapping > 50) {\r\n \t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// System.out.println(\"---flag in for---\");\r\n \t\t\t\t\t// if(overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t// &&((JmtEdge)overlapping[j]).intersects((EdgeView)(graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t// false),\r\n \t\t\t\t\t// GraphConstants.getBounds(((JmtCell)cell).getAttributes())))\r\n \t\t\t\t\t// System.out.println(\"Intersect TRUE\");\r\n \r\n \t\t\t\t\t// Puts last to last corner of overlapping cells\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtCell && overlapping[j] != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \r\n \t\t\t\t\tif (!inGroup && overlapping[j] instanceof JmtCell && overlapping[j] != cell) {\r\n \r\n \t\t\t\t\t\tRectangle2D b = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\t// Consider only rectangles that intersects with given\r\n \t\t\t\t\t\t// bound\r\n \t\t\t\t\t\tif (b.intersects(bounds2)) {\r\n \t\t\t\t\t\t\tlast.setLocation(new Point(oldPointX, oldPointY));\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// inizio a controllare se l intersezione e' un lato\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t\t\t&& overlapping[j] != cell\r\n \t\t\t\t\t\t\t&& !isInGroup(overlapping[j])\r\n \t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\tGraphConstants.getBounds(cell.getAttributes())) && ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\tboolean access = false;\r\n \t\t\t\t\t\tboolean access2 = false;\r\n \r\n \t\t\t\t\t\t// Nonostatne SourceCell e SinkCell estendano JMTCell\r\n \t\t\t\t\t\t// avevo problemi di nullPointerException per questo\r\n \t\t\t\t\t\t// verifico di che\r\n \t\t\t\t\t\t// tipo sono\r\n \r\n \t\t\t\t\t\tif (cell instanceof SourceCell\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SourceCell) cell).getAttributes()))) {\r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\t\t\t// _______INIZIO_____\r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SourceCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\tsp = sp + 2;\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\taccess = true;\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (cell instanceof SinkCell) {\r\n \r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)) {\r\n \r\n \t\t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SinkCell) cell).getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SinkCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\taccess2 = true;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!isInGroup(overlapping[j]) && !access && !access2 && overlapping[j] instanceof JmtEdge) {\r\n \t\t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t\t\t\t\t\t\tfalse), GraphConstants.getBounds(cell.getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\taccess = access2 = false;\r\n \r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tif ((intersectionPoints == null) || intersectionPoints.size() <= 0) {\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(cell.getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\t;\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\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}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} // end if of edge\r\n \t\t\t\t}\r\n \r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \r\n \t\t\t// Puts this cell in found position\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t} else {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tif (isInGroup(cell)) {\r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \r\n \t\t\tif (overlapping == null) {\r\n \r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\twhile (overlapping.length > 0) {\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (Object element : overlapping) {\r\n \t\t\t\t\tif (element instanceof JmtCell && element != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (!inGroup && element instanceof JmtCell && element != cell) {\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \t\t\t\t\tif (isInGroup(element) && element instanceof JmtEdge) {\r\n \t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(element, false), GraphConstants\r\n \t\t\t\t\t\t\t\t\t\t.getBounds(cell.getAttributes()))) {\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtEdge) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\t// ___\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t}\r\n \r\n \t}", "public abstract Cell getOverlappedCell(Rectangle rect);", "private void drawRecyclingCenter(Graphics2D g2d, int x, int y, Cell c) {\n try {\r\n \tg2d.setPaint(Color.WHITE);\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbagePointsString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(Color.BLACK);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "void table(){\n fill(0);\n rect(width/2, height/2, 600, 350); // boarder\n fill(100, 0 ,0);\n rect(width/2, height/2, 550, 300); //Felt\n \n \n}", "private TableCell getTextWrappingCell(){\r\n\t\tTableCell cell = new TableCell<>();\r\n Text text = new Text();\r\n text.setStyle(\"-fx-fill: -fx-text-background-color;\");\r\n cell.setGraphic(text);\r\n cell.setPrefHeight(Control.USE_COMPUTED_SIZE);\r\n text.wrappingWidthProperty().bind(cell.widthProperty());\r\n text.textProperty().bind(cell.itemProperty());\r\n return cell;\r\n\t}", "Cell(int x, int y, Color color, boolean flooded) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "public Cell containingCell() {\n return new Cell(x() / SUBCELL_COUNT, y() / SUBCELL_COUNT);\n }", "public String abbreviatedCellText() {\r\n\t\treturn \" \";//returns 10 spaces because the cell has to be empty\r\n\t}", "public void drawCell(Graphics2D g) {\n\n\t\tStroke oldStroke = g.getStroke();\n\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(0);\n\t\t// If the cell is a circle we fill the circle with the Java API\n\t\tif (e.reference instanceof Circle2) {\n\t\t\tCircle2 c = (Circle2) e.reference;\n\t\t\tg.setColor(cellColor);\n\t\t\tg.fillOval((int) (c.centre.x - c.radius),\n\t\t\t\t\t(int) (c.centre.y - c.radius), (int) (2 * c.radius),\n\t\t\t\t\t(int) (2 * c.radius));\n\t\t}\n\t\t// In case it is an arbitary cell we approximate that cell with 1000\n\t\t// vertical line segments\n\t\telse {\n\t\t\tList<Segment2> verticalLines = verticalLinesinCell();\n\t\t\tList<Segment2> segmentsInCell = partitionCellIntoSegments(verticalLines);\n\n\t\t\tfor (Segment2 s : segmentsInCell) {\n\t\t\t\tGraphicsContext gc = new GraphicsContext();\n\t\t\t\tgc.setForegroundColor(cellColor);\n\t\t\t\ts.draw(g, gc);\n\t\t\t}\n\t\t}\n\n\t\tg.setStroke(oldStroke);\n\t}", "public ZonaFasciculataCells() {\r\n\r\n\t}", "static void drawCellID() { // draws a cross at each cell centre\n\t\tfloat xc,yc;\n\t\t//GeneralPath path = new GeneralPath();\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// Label Cell number\n\t\t\t\tTextRoi TROI = new TextRoi((int)xc, (int)yc, (\"\"+i),new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tTROI.setNonScalable(false);\n\t\t\t\tOL.add(TROI);\n\t\t\t}\n\t\t}\n\t}", "private Container[] generateFourCellsWithOpenLineCircuit() {\n createCells();\n\n cell1.setNeighbourAt( cell2, NeighbourPosition.RIGHT );\n cell2.setNeighbourAt( cell3, NeighbourPosition.BOTTOM );\n\n cell4 = createCell( new HorizontalLine(\"\") );\n cell3.setNeighbourAt( cell4, NeighbourPosition.LEFT );\n cell4.setNeighbourAt( cell1, NeighbourPosition.TOP );\n\n Container[] cells = { cell1, cell2, cell3, cell4 };\n return cells;\n }", "private void drawBuilding(Graphics2D g2d, int x, int y, Cell c, Color color) {\n try {\r\n \tg2d.setPaint(Color.CYAN.darker());\r\n \tg2d.fill(cellBorder);\r\n g2d.setPaint(Color.DARK_GRAY);\r\n g2d.draw(cellBorder);\r\n String msg = c.getGarbageString();\r\n g2d.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,\r\n java.awt.RenderingHints.VALUE_ANTIALIAS_ON);\r\n java.awt.Font font = new java.awt.Font(\"Serif\", java.awt.Font.PLAIN, 11);\r\n g2d.setFont(font);\r\n g2d.setPaint(color);\r\n g2d.drawString(msg,dx-40,dy);\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n }\r\n \r\n }", "public char drawCell ()\n {\n final char ALIVE_SYMBOL = '\\u25A0';\n final char DEAD_SYMBOL = '\\u25A1';\n if (cellStatus)\n {\n return ALIVE_SYMBOL;\n }\n else\n {\n return DEAD_SYMBOL;\n }// end of if (cellStatus)\n }", "private static void flagCell(String[] grid, int i, int j) {\r\n\t\tif (j < 0 || j > 127 || i < 0 || i > 127 || grid[i].charAt(j) != '1') return; // boundary test + value test\r\n\t\tStringBuilder sb = new StringBuilder(grid[i]);\r\n\t\tsb.setCharAt(j, 'x');\r\n\t\tgrid[i] = sb.toString();\r\n\t\tflagCell(grid, i, j-1);// flag left cell\r\n\t\tflagCell(grid, i-1, j); // flag upper cell\r\n\t\tflagCell(grid, i, j+1);// flag right cell\r\n\t\tflagCell(grid, i+1, j);// flag bottom cell\r\n\t}", "Cell(int x, int y, Color color, boolean flooded, ACell left, ACell top, ACell right,\r\n ACell bottom) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = left;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n }", "@Override\n public ColorCell getCell(int row, int column) {\n List<Pair> pairs = prototypes.get(current).getSegments().get(0).getPairs();\n return new ColorCell(row, column, Color.BLUE, Collections.emptyList(), pairs);\n }", "private void compactVertically (List<List<NodeRealizer>> cellColumns)\n {\n for (List<NodeRealizer> cellColumn : cellColumns)\n {\n int centerIndex = (cellColumn.size () - 1) / 2;\n NodeRealizer centerRealizer = cellColumn.get (centerIndex);\n double minY = centerRealizer.getY () - GAP;\n double maxY = centerRealizer.getY () + centerRealizer.getHeight () + GAP;\n for (int i = 1; i <= centerIndex; i++)\n {\n NodeRealizer topRealizer = cellColumn.get (centerIndex - i);\n topRealizer.setY (minY - topRealizer.getHeight ());\n minY -= topRealizer.getHeight () + GAP;\n NodeRealizer bottomRealizer = cellColumn.get (centerIndex + i);\n bottomRealizer.setY (maxY);\n maxY += bottomRealizer.getHeight () + GAP;\n }\n if (cellColumn.size () % 2 == 0)\n {\n NodeRealizer bottomRealizer = cellColumn.get (cellColumn.size () - 1);\n bottomRealizer.setY (maxY);\n }\n }\n }", "protected void m9196a(ec ecVar) {\n boolean z = this.f3908e;\n this.f3908e = true;\n try {\n int cellHeight;\n int b;\n if (this.this$0.b.isHorizontale()) {\n cellHeight = this.this$0.b.getCellHeight();\n b = m9194b(ecVar, cellHeight);\n } else {\n b = this.this$0.b.getLargeurColonneZR();\n cellHeight = m9193a(ecVar, b);\n }\n LayoutParams layoutParams = getLayoutParams();\n if (!(cellHeight == layoutParams.height && b == layoutParams.width)) {\n layoutParams.height = cellHeight;\n layoutParams.width = b;\n requestLayout();\n }\n this.f3908e = z;\n } catch (Throwable th) {\n this.f3908e = z;\n }\n }", "EndCell(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "public void updateGrid() {\r\n if (getCrosstabElement() == null) return;\r\n\r\n try {\r\n getColumns().clear();\r\n getRows().clear();\r\n int current_x = 0;\r\n int current_y = 0;\r\n\r\n // Adjusting cells dimensions...\r\n CrosstabCell mainCell = findCell(\"\",\"\");\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n cell.setParent( this.getCrosstabElement());\r\n\r\n if (cell.getType() == cell.DETAIL_CELL) {\r\n if (cell.getHeight() == 0) cell.setHeight( getRowHeight( cell.getRowTotalGroup() ) );\r\n if (cell.getWidth() == 0) cell.setWidth( getColumnWidth( cell.getColumnTotalGroup() ) );\r\n }\r\n }\r\n\r\n addNotDefinedCells();\r\n\r\n getColumns().add( new Integer(current_x) );\r\n\r\n for (int i=0; i<getCrosstabElement().getRowGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getRowGroups().elementAt(i);\r\n cg.getHeaderCell().setLeft( current_x );\r\n cg.getTotalCell().setLeft( current_x );\r\n current_x = current_x + cg.getSize();\r\n getColumns().add( new Integer(current_x) );\r\n }\r\n\r\n ArrayList columnWidths = new ArrayList();\r\n for (int i=getCrosstabElement().getColumnGroups().size()-1; i>=0; --i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getColumnGroups().elementAt(i);\r\n\r\n if (i == getCrosstabElement().getColumnGroups().size()-1)\r\n {\r\n columnWidths.add( new Integer( getColumnWidth(\"\")));\r\n }\r\n if (!cg.getTotalPosition().equals(\"Start\"))\r\n {\r\n columnWidths.add( new Integer( getColumnWidth(cg.getName())));\r\n }\r\n else\r\n {\r\n columnWidths.add(0, new Integer( getColumnWidth(cg.getName())));\r\n }\r\n\r\n }\r\n\r\n for (int i=0; i<columnWidths.size(); ++i)\r\n {\r\n current_x += ((Integer)columnWidths.get(i)).intValue();\r\n getColumns().add( new Integer(current_x));\r\n }\r\n if (getCrosstabElement().getColumnGroups().size() == 0) getColumns().add( new Integer(current_x += getColumnWidth(\"\")));\r\n\r\n // Look for all rows...\r\n\r\n getRows().add( new Integer(current_y) );\r\n for (int i=0; i<getCrosstabElement().getColumnGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getColumnGroups().elementAt(i);\r\n cg.getHeaderCell().setTop( current_y );\r\n cg.getTotalCell().setTop( current_y );\r\n current_y = current_y + cg.getSize();\r\n getRows().add( new Integer(current_y) );\r\n\r\n }\r\n\r\n ArrayList rowHeights = new ArrayList();\r\n for (int i=getCrosstabElement().getRowGroups().size()-1; i>=0; --i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getRowGroups().elementAt(i);\r\n\r\n if (i == getCrosstabElement().getRowGroups().size()-1)\r\n {\r\n rowHeights.add( new Integer( getRowHeight(\"\")));\r\n }\r\n if (!cg.getTotalPosition().equals(\"Start\"))\r\n {\r\n rowHeights.add( new Integer( getRowHeight(cg.getName())));\r\n }\r\n else\r\n {\r\n rowHeights.add(0, new Integer( getRowHeight(cg.getName())));\r\n }\r\n }\r\n\r\n for (int i=0; i<rowHeights.size(); ++i)\r\n {\r\n current_y += ((Integer)rowHeights.get(i)).intValue();\r\n getRows().add( new Integer(current_y));\r\n }\r\n if (getCrosstabElement().getRowGroups().size() == 0) getRows().add( new Integer(current_y += getRowHeight(\"\")));\r\n\r\n int columnGroups = getCrosstabElement().getColumnGroups().size();\r\n int rowGroups = getCrosstabElement().getRowGroups().size();\r\n\r\n\r\n\r\n\r\n int currentTopRowNumber = columnGroups;\r\n int currentBottomRowNumber = columnGroups + rowGroups + 1;\r\n\r\n for (int i=0; i<getCrosstabElement().getRowGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getRowGroups().elementAt(i);\r\n\r\n cg.getHeaderCell().setLeftIndex( i );\r\n cg.getHeaderCell().setLeft( ((Integer)getColumns().get(i)).intValue() );\r\n cg.getHeaderCell().setTopIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentTopRowNumber+1 : currentTopRowNumber );\r\n cg.getHeaderCell().setTop( ((Integer)getRows().get( cg.getHeaderCell().getTopIndex() )).intValue() );\r\n cg.getHeaderCell().setRightIndex( i+1 );\r\n cg.getHeaderCell().setWidth( cg.getSize() );\r\n cg.getHeaderCell().setBottomIndex( (cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentBottomRowNumber : currentBottomRowNumber - 1 );\r\n cg.getHeaderCell().setHeight( ((Integer)getRows().get( cg.getHeaderCell().getBottomIndex() )).intValue() -cg.getHeaderCell().getTop());\r\n\r\n cg.getTotalCell().setLeftIndex( i );\r\n cg.getTotalCell().setLeft( cg.getHeaderCell().getLeft());\r\n cg.getTotalCell().setTopIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentTopRowNumber : currentBottomRowNumber-1 );\r\n cg.getTotalCell().setTop( ((Integer)getRows().get( cg.getTotalCell().getTopIndex() )).intValue() );\r\n cg.getTotalCell().setRightIndex( rowGroups );\r\n cg.getTotalCell().setWidth( ((Integer)getColumns().get( rowGroups)).intValue() - cg.getTotalCell().getLeft() );\r\n cg.getTotalCell().setBottomIndex( (cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentTopRowNumber +1 : currentBottomRowNumber );\r\n cg.getTotalCell().setHeight( ((Integer)getRows().get( cg.getTotalCell().getBottomIndex() )).intValue() - cg.getTotalCell().getTop() );\r\n\r\n if (cg.getTotalPosition().equals(\"Start\")) currentTopRowNumber++;\r\n else currentBottomRowNumber--;\r\n\r\n // Update all cells with rowTotalGroup this group\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n if (cell.getRowTotalGroup().equals(cg.getName())) {\r\n\r\n cell.setTop(cg.getTotalCell().getTop());\r\n cell.setHeight( cg.getTotalCell().getHeight());\r\n }\r\n }\r\n }\r\n\r\n int currentLeftColumnNumber = rowGroups;\r\n int currentRightColumnNumber = columnGroups + rowGroups + 1;\r\n for (int i=0; i<getCrosstabElement().getColumnGroups().size(); ++i) {\r\n CrosstabGroup cg = (CrosstabGroup)getCrosstabElement().getColumnGroups().elementAt(i);\r\n\r\n // Count preceding total rows...\r\n\r\n cg.getHeaderCell().setLeftIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentLeftColumnNumber+1 : currentLeftColumnNumber );\r\n cg.getHeaderCell().setLeft( ((Integer)getColumns().get( cg.getHeaderCell().getLeftIndex())).intValue() );\r\n cg.getHeaderCell().setTopIndex( i );\r\n cg.getHeaderCell().setTop( ((Integer)getRows().get( i )).intValue() );\r\n cg.getHeaderCell().setRightIndex((cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentRightColumnNumber : currentRightColumnNumber - 1);\r\n cg.getHeaderCell().setWidth( ((Integer)getColumns().get(cg.getHeaderCell().getRightIndex()) ).intValue() -cg.getHeaderCell().getLeft());\r\n cg.getHeaderCell().setBottomIndex( i+1 );\r\n cg.getHeaderCell().setHeight( cg.getSize());\r\n\r\n cg.getTotalCell().setLeftIndex( (cg.getTotalPosition().equals(\"Start\")) ? currentLeftColumnNumber : currentRightColumnNumber-1 );\r\n cg.getTotalCell().setLeft( ((Integer)getColumns().get( cg.getTotalCell().getLeftIndex() )).intValue() );\r\n cg.getTotalCell().setTopIndex( i );\r\n cg.getTotalCell().setTop( ((Integer)getRows().get( i)).intValue() );\r\n cg.getTotalCell().setRightIndex((cg.isHasTotal() && cg.getTotalPosition().equals(\"Start\")) ? currentLeftColumnNumber +1 : currentRightColumnNumber);\r\n cg.getTotalCell().setWidth( ((Integer)getColumns().get( cg.getTotalCell().getRightIndex() )).intValue() - cg.getTotalCell().getLeft() );\r\n cg.getTotalCell().setBottomIndex( columnGroups );\r\n cg.getTotalCell().setHeight( ((Integer)getRows().get( columnGroups)).intValue() - cg.getTotalCell().getTop() );\r\n\r\n if (cg.getTotalPosition().equals(\"Start\")) currentLeftColumnNumber++;\r\n else currentRightColumnNumber--;\r\n\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n if (cell.getColumnTotalGroup().equals(cg.getName())) {\r\n cell.setLeft(cg.getTotalCell().getLeft());\r\n cell.setWidth( cg.getTotalCell().getWidth());\r\n }\r\n }\r\n\r\n }\r\n\r\n // Update coordinates for the A0 cell\r\n\r\n if (getCrosstabElement().getRowGroups().size() > 0)\r\n {\r\n mainCell.setTopIndex(((CrosstabGroup)getCrosstabElement().getRowGroups().lastElement()).getHeaderCell().getTopIndex() );\r\n mainCell.setTop(((CrosstabGroup)getCrosstabElement().getRowGroups().lastElement()).getHeaderCell().getTop());\r\n }\r\n else\r\n {\r\n mainCell.setTop(getCrosstabElement().getColumnGroups().size());\r\n mainCell.setTop(((Integer)getRows().get(getCrosstabElement().getColumnGroups().size())).intValue() );\r\n }\r\n mainCell.setBottomIndex(mainCell.getTopIndex() + 1);\r\n\r\n if (getCrosstabElement().getColumnGroups().size() > 0)\r\n {\r\n mainCell.setLeftIndex(((CrosstabGroup)getCrosstabElement().getColumnGroups().lastElement()).getHeaderCell().getLeftIndex() );\r\n mainCell.setLeft(((CrosstabGroup)getCrosstabElement().getColumnGroups().lastElement()).getHeaderCell().getLeft());\r\n }\r\n else\r\n {\r\n mainCell.setLeftIndex(getCrosstabElement().getRowGroups().size());\r\n mainCell.setLeft(((Integer)getColumns().get(getCrosstabElement().getRowGroups().size())).intValue());\r\n }\r\n mainCell.setRightIndex(mainCell.getLeftIndex() + 1);\r\n\r\n\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n\r\n if (cell.getType() == cell.DETAIL_CELL)\r\n {\r\n if (cell.getRowTotalGroup().equals(\"\")) {\r\n\r\n cell.setTop(mainCell.getTop());\r\n cell.setTopIndex(mainCell.getTopIndex());\r\n cell.setBottomIndex(mainCell.getBottomIndex());\r\n }\r\n if (cell.getColumnTotalGroup().equals(\"\")) {\r\n\r\n cell.setLeft(mainCell.getLeft());\r\n cell.setLeftIndex(mainCell.getLeftIndex());\r\n cell.setRightIndex(mainCell.getRightIndex());\r\n }\r\n\r\n cell.setTopIndex( getTotalRowTopIndex(cell.getRowTotalGroup()) );\r\n cell.setBottomIndex( cell.getTopIndex() +1);\r\n\r\n cell.setLeftIndex( getTotalColumnLeftIndex(cell.getColumnTotalGroup()) );\r\n cell.setRightIndex( cell.getLeftIndex() +1);\r\n }\r\n }\r\n\r\n // adding DEFAULT NO DATA CELL....\r\n CrosstabCell detailCell = findCell( \"\", \"\");\r\n boolean found = false;\r\n for (int i=0; i<getCrosstabElement().getCells().size(); ++i)\r\n {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(i);\r\n if (cell.getType() == cell.NODATA_CELL)\r\n {\r\n cell.setTop( 0 );\r\n cell.setLeft( 0 );\r\n cell.setWidth( this.getCrosstabElement().getWidth() );\r\n cell.setHeight( this.getCrosstabElement().getHeight());\r\n cell.setTopIndex( 0 );\r\n cell.setLeftIndex( 0 );\r\n cell.setBottomIndex( 0 );\r\n cell.setRightIndex( 0 );\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found)\r\n {\r\n CrosstabCell defaultWhenNoDataCell= detailCell.cloneMe();\r\n defaultWhenNoDataCell.setType( defaultWhenNoDataCell.NODATA_CELL);\r\n defaultWhenNoDataCell.setParent( this.getCrosstabElement());\r\n defaultWhenNoDataCell.setName(null);\r\n defaultWhenNoDataCell.setTop( 0 );\r\n defaultWhenNoDataCell.setLeft( 0 );\r\n defaultWhenNoDataCell.setWidth( this.getCrosstabElement().getWidth() );\r\n defaultWhenNoDataCell.setHeight( this.getCrosstabElement().getHeight());\r\n defaultWhenNoDataCell.setTopIndex( 0 );\r\n defaultWhenNoDataCell.setLeftIndex( 0 );\r\n defaultWhenNoDataCell.setBottomIndex( 0 );\r\n defaultWhenNoDataCell.setRightIndex( 0 );\r\n getCrosstabElement().getCells().add(defaultWhenNoDataCell);\r\n }\r\n\r\n found = false;\r\n\r\n // adding DEFAULT HEADER CELL....\r\n for (int i=0; i<getCrosstabElement().getCells().size(); ++i)\r\n {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(i);\r\n if (cell.getType() == cell.CT_HEADER_CELL)\r\n {\r\n cell.setTop( 0 );\r\n cell.setTopIndex( 0 );\r\n cell.setLeft( 0 );\r\n cell.setLeftIndex( 0 );\r\n cell.setRightIndex( getCrosstabElement().getRowGroups().size() );\r\n cell.setWidth( ((Integer)getColumns().get( cell.getRightIndex() )).intValue() );\r\n cell.setBottomIndex( getCrosstabElement().getColumnGroups().size() );\r\n cell.setHeight( ((Integer)getRows().get( cell.getBottomIndex() )).intValue() );\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found)\r\n {\r\n\r\n CrosstabCell crossTabHeaderCell= new CrosstabCell();\r\n crossTabHeaderCell.setType( crossTabHeaderCell.CT_HEADER_CELL);\r\n crossTabHeaderCell.setParent( this.getCrosstabElement());\r\n crossTabHeaderCell.setName(null);\r\n crossTabHeaderCell.setTop( 0 );\r\n crossTabHeaderCell.setTopIndex( 0 );\r\n crossTabHeaderCell.setLeft( 0 );\r\n crossTabHeaderCell.setLeftIndex( 0 );\r\n crossTabHeaderCell.setRightIndex( getCrosstabElement().getRowGroups().size() );\r\n crossTabHeaderCell.setWidth( ((Integer)getColumns().get( crossTabHeaderCell.getRightIndex() )).intValue() );\r\n crossTabHeaderCell.setBottomIndex( getCrosstabElement().getColumnGroups().size() );\r\n crossTabHeaderCell.setHeight( ((Integer)getRows().get( crossTabHeaderCell.getBottomIndex() )).intValue() );\r\n getCrosstabElement().getCells().add(crossTabHeaderCell);\r\n }\r\n\r\n getRowBands().clear();\r\n\r\n for (int i=1; i<getRows().size(); ++i)\r\n {\r\n Vector rowBandContents = new Vector();\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n if (cell.getBottomIndex() == i)\r\n {\r\n rowBandContents.add(cell);\r\n }\r\n }\r\n getRowBands().add(rowBandContents);\r\n }\r\n\r\n getColumnBands().clear();\r\n\r\n for (int i=1; i<getColumns().size(); ++i)\r\n {\r\n Vector columnBandContents = new Vector();\r\n for (int k=0; k<getCrosstabElement().getCells().size(); ++k) {\r\n CrosstabCell cell = (CrosstabCell)getCrosstabElement().getCells().elementAt(k);\r\n if (cell.getRightIndex() == i)\r\n {\r\n columnBandContents.add(cell);\r\n }\r\n }\r\n getColumnBands().add(columnBandContents);\r\n }\r\n\r\n\r\n\r\n // Update all elements positions...\r\n for (int i=0; i< getCrosstabElement().getElements().size(); ++i) {\r\n ReportElement re = (ReportElement)getCrosstabElement().getElements().elementAt(i);\r\n\r\n re.getPosition().x = re.getRelativePosition().x + re.getCell().getLeft()+10;\r\n re.getPosition().y = re.getRelativePosition().y + re.getCell().getTop()+10;\r\n\r\n re.setPosition(re.position);\r\n re.trasform(new java.awt.Point(0,0),TransformationType.TRANSFORMATION_RESIZE_SE);\r\n\r\n }\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n updateSize();\r\n\r\n }", "public void printGridAsChild()\n\t{\n\t\tfor ( int y = 0; y < height; y++)\n\t\t{\n\t\t\tSystem.out.print( \"\\t\" );\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\t// If x & y are the same as the empty tile coordinates, print empty tile\n\t\t\t\tif ( x == x0 && y == y0 ) System.out.print( \" \" );\n\t\t\t\t// Else print element of grid\n\t\t\t\telse System.out.print( grid[x][y] + \" \" );\n\t\t\t}\n\t\t\tSystem.out.print( \"\\n\" );\n\t\t}\n\t\tSystem.out.print( \"\\n\" );\n\t}", "private void printMCell(MCell mc) throws XMLStreamException {\n String text = mc.getContent().getSValue();\n AttributedString attributedString = new AttributedString(text);\n attributedString.addAttribute(TextAttribute.FONT, mc.getFont());\n AttributedCharacterIterator paragraph = attributedString.getIterator();\n int paragraphStart = paragraph.getBeginIndex();\n int paragraphEnd = paragraph.getEndIndex();\n LineBreakMeasurer lineMeasurer =\n new LineBreakMeasurer(paragraph, new FontRenderContext(null, true, true));\n lineMeasurer.setPosition(paragraphStart);\n Rectangle2D bounds = mc.getBounds();\n float cellWidth = (float) bounds.getWidth();\n TextLayout layout = null;\n int numLines = 0;\n float height = 0;\n while (lineMeasurer.getPosition() < paragraphEnd) {\n numLines++;\n layout = lineMeasurer.nextLayout(cellWidth);\n height += layout.getAscent() + layout.getDescent() + layout.getLeading();\n }\n height -= layout.getLeading();\n float drawPosY = (float) bounds.getY(); // + topMargin;\n switch (mc.getVerticalAlignment()) {\n case MCell.CellFormat.TOP:\n break;\n case MCell.CellFormat.CENTER:\n drawPosY += ((float) bounds.getHeight() - height) * 0.5F;\n break;\n case MCell.CellFormat.BOTTOM:\n drawPosY += ((float) bounds.getHeight() - height);\n break;\n }\n\n double[] d = new double[6];\n AffineTransform transform = new AffineTransform();\n mc.getTransform(transform);\n transform.getMatrix(d);\n\n Font font = mc.getFont();\n writer.writeStartElement(\"text\");\n writer.writeAttribute(\"id\", mc.getEntityID());\n writer.writeAttribute(\"font-family\", font.getFamily());\n writer.writeAttribute(\"font-size\", \"\" + font.getSize());\n writer.writeAttribute(\"fill\",\n String.format(\"#%06x\", mc.getFontColor().getRGB() & 0xffffff));\n writer.writeAttribute(\"transform\",\n String.format(\n \"matrix(%.2f, %.2f, %.2f, %.2f, %.2f, %.2f)\",\n d[0], d[1], d[2], d[3], d[4], d[5]));\n writer.writeEmptyElement(\"dm:cell-dimension\");\n writer.writeAttribute(\"x\", String.format(\"%.2f\", bounds.getX()));\n writer.writeAttribute(\"y\", String.format(\"%.2f\", bounds.getY()));\n writer.writeAttribute(\"width\", String.format(\"%.2f\", bounds.getWidth()));\n writer.writeAttribute(\"height\", String.format(\"%.2f\", bounds.getHeight()));\n writer.writeAttribute(\"visible\", mc.isVisible() ? \"true\" : \"false\");\n String halign = null;\n switch (mc.getHorizontalAlignment()) {\n case MCell.CellFormat.LEFT:\n halign = \"left\";\n break;\n case MCell.CellFormat.CENTER:\n halign = \"center\";\n break;\n case MCell.CellFormat.RIGHT:\n halign = \"right\";\n break;\n default:\n assert false;\n }\n String valign = null;\n switch (mc.getVerticalAlignment()) {\n case MCell.CellFormat.TOP:\n valign = \"top\";\n break;\n case MCell.CellFormat.CENTER:\n valign = \"center\";\n break;\n case MCell.CellFormat.BOTTOM:\n valign = \"bottom\";\n break;\n default:\n assert false;\n }\n writer.writeEmptyElement(\"dm:cell-format\");\n writer.writeAttribute(\"halign\", halign);\n writer.writeAttribute(\"valign\", valign);\n int textStart = 0;\n int textEnd = 0;\n lineMeasurer.setPosition(paragraphStart);\n float leftBound = (float) bounds.getX(); // + leftMargin;\n while (lineMeasurer.getPosition() < paragraphEnd) {\n\n layout = lineMeasurer.nextLayout(cellWidth);\n drawPosY += layout.getAscent();\n float drawPosX = leftBound;\n if (mc.getHorizontalAlignment() == MCell.CellFormat.CENTER) {\n drawPosX += (cellWidth - layout.getVisibleAdvance()) * 0.5F;\n } else if (mc.getHorizontalAlignment() == MCell.CellFormat.RIGHT) {\n drawPosX += (cellWidth - layout.getVisibleAdvance());\n }\n writer.writeStartElement(\"tspan\");\n writer.writeAttribute(\"x\", String.format(\"%.2f\", drawPosX));\n writer.writeAttribute(\"y\", String.format(\"%.2f\", drawPosY));\n textEnd += layout.getCharacterCount();\n writer.writeCharacters(text.substring(textStart, textEnd));\n textStart = textEnd;\n writer.writeEndElement();\n drawPosY += layout.getDescent() + layout.getLeading();\n }\n writer.writeEndElement();\n }", "private void addColumn() {\n for (int j = 0; j < gridHeight; j++) {\n EscapeBlock block = new EscapeBlock(gridWidth,j);\n block.setLocation(margin + gridWidth * (Block.length+1) ,\n margin + topMargin + j * (Block.length+1)); \n this.add(block);\n grid.get(j).add(block);\n }\n gridWidth++;\n }", "@Override\r\n\tpublic void drawCell(Graphics2D g2) {\n\t\tAffineTransform original = g2.getTransform();\r\n\t\t\r\n\t\tg2.translate(pos.x,pos.y);\r\n\t\tif(scale<=0) {\r\n\t\t\tscale=0;\r\n\t\t}\r\n\t\t\r\n\t\tif(scale>=1) {\r\n\t\t\tscale=1;\r\n\t\t}\r\n\t\tg2.scale(scale, scale);\r\n\t\t\r\n\t\tAffineTransform point = g2.getTransform();\r\n\t\t\r\n\t\thitBox = outline.createTransformedArea(point);\r\n\t\t\r\n\t\tg2.setColor(new Color(232,65,143));\r\n\t\tif(passable) g2.setColor(new Color(70,59,71));\r\n\t\tg2.fill(cellBody);\r\n\t\t\r\n\t\tg2.setTransform(original);\r\n\t\t\r\n\t}", "public void find_empty_cells(int j) {\n\n int current_col = j % cols;\n int cell;\n\n if (current_col > 0) {\n cell = j - cols - 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j - 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols - 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n }\n\n cell = j - cols;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n if (current_col < (cols - 1)) {\n cell = j - cols + 1;\n if (cell >= 0)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + cols + 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n\n cell = j + 1;\n if (cell < all_cells)\n if (field[cell] > MINE_CELL) {\n field[cell] -= COVER_FOR_CELL;\n if (field[cell] == EMPTY_CELL)\n find_empty_cells(cell);\n }\n }\n\n }", "public abstract AwtCell getEmpty();", "public Cell(int x,int y){\r\n this.x = x;\r\n this.y = y;\r\n level = 0;\r\n occupiedBy = null;\r\n }", "public java.lang.String getCellspacing()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CELLSPACING$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public abstract boolean isOneCell();", "private Cell scanHorizontal(Figure value) {\n Figure oppositeValue = game.getOppositeFigure(value);\n int emptyString = 0;\n int emptyRow = 0;\n int emptyCnt;\n for (int string = 0; string < game.getFieldSize(); string++) {\n emptyCnt = 0;\n for (int row = 0; row < game.getFieldSize(); row++) {\n Figure fieldValue = game.getFieldValue(string,row);\n if (fieldValue.equals(oppositeValue)) {\n emptyCnt = 0;\n break;\n } else if (fieldValue.equals(EMPTY)) {\n emptyCnt++;\n if (emptyCnt < 2) { //too much empty cells\n emptyRow = row;\n emptyString = string;\n } else {\n break;\n }\n }\n }\n if (emptyCnt == 1) {\n return new Cell(emptyString, emptyRow);\n }\n }\n return scanFirstDiagonal(value);\n }", "protected AccountingLineTableCell createPaddingCell() {\n AccountingLineTableCell cell = new AccountingLineTableCell();\n cell.setColSpan(2);\n cell.setNeverEmpty(true);\n return cell;\n }", "VariableCell createVariableCell();", "void expandDotCell(int i, int j) {\n if (LOG.isDebugEnabled())\n LOG.debug(\"Expanding dot cell ({}, {})\", i, j);\n\n /*\n * (1) If the dot is just to the left of a non-terminal variable, we look for theorems or axioms\n * in the Chart that may apply and extend the dot position. We look for existing axioms over all\n * spans (k,j), i < k < j.\n */\n for (int k = i + 1; k < j; k++) {\n extendDotItemsWithProvedItems(i, k, j, false);\n }\n\n /*\n * (2) If the the dot-item is looking for a source-side terminal symbol, we simply match against\n * the input sentence and advance the dot.\n */\n Node<Token> node = input.getNode(j - 1);\n for (Arc<Token> arc : node.getOutgoingArcs()) {\n\n int last_word = arc.getLabel().getWord();\n int arc_len = arc.getHead().getNumber() - arc.getTail().getNumber();\n\n // int last_word=foreign_sent[j-1]; // input.getNode(j-1).getNumber(); //\n\n if (null != dotcells.get(i, j - 1)) {\n // dotitem in dot_bins[i][k]: looking for an item in the right to the dot\n\n\n for (DotNode dotNode : dotcells.get(i, j - 1).getDotNodes()) {\n\n // String arcWord = Vocabulary.word(last_word);\n // Assert.assertFalse(arcWord.endsWith(\"]\"));\n // Assert.assertFalse(arcWord.startsWith(\"[\"));\n // logger.info(\"DotChart.expandDotCell: \" + arcWord);\n\n // List<Trie> child_tnodes = ruleMatcher.produceMatchingChildTNodesTerminalevel(dotNode,\n // last_word);\n\n List<Trie> child_tnodes = null;\n\n Trie child_node = dotNode.trieNode.match(last_word);\n if (null != child_node) {\n addDotItem(child_node, i, j - 1 + arc_len, dotNode.antSuperNodes, null,\n dotNode.srcPath.extend(arc));\n }\n }\n }\n }\n }", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "private Cell get_bottom_left_diagnoal_cell(int row, int col) {\n return get_cell(++row, --col);\n }", "int cellDistance(int cell) {\n int d = GUTTER_SIZE;\n d += cell * (CELL_SIZE + GUTTER_SIZE);\n return d;\n }", "public void draw(){\n\t\t\tint x = getPreferredSize().width/2;\n\t\t\tint y = 10;\n\t\t\tif (root() != null)\n\t\t\t\tpreOrderCell(root(), x, y, root().getColor());\n\t\t\tjgraph.getGraphLayoutCache().insert(cells.values().toArray());\n\t\t\tjgraph.getGraphLayoutCache().insert(nullnodes.toArray());\n\t\t}", "private List<Integer> getCells(Edge e) {\r\n\t\treturn getCells(e.getMBR());\r\n\t}", "public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }", "public String abbreviatedCellText() {\r\n\t\treturn \" \";\r\n\t}", "abstract public void colorize(TCell c);", "void testDrawCell(Tester t) {\r\n initData();\r\n t.checkExpect(this.game2.indexHelp(0, 0).drawCell(2),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 2, Cnst.boardHeight / 2,\r\n OutlineMode.SOLID, Color.ORANGE)));\r\n t.checkExpect(this.game3.indexHelp(0, 0).drawCell(3),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 3, Cnst.boardHeight / 3,\r\n OutlineMode.SOLID, Color.GREEN)));\r\n t.checkExpect(this.game5.indexHelp(0, 0).drawCell(4),\r\n new FrameImage(new RectangleImage(Cnst.boardWidth / 4, Cnst.boardHeight / 4,\r\n OutlineMode.SOLID, Color.PINK)));\r\n t.checkExpect(this.game2.indexHelp(-1, -1).drawCell(1), new EmptyImage());\r\n }", "@Override\n public void redCell() {\n gCell.setFill(Color.ORANGERED);\n }", "public void printCells()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n System.out.println(\"Columns: \" + columns + \"Row: \" + rows + \" \" + cellGrid[columns][rows].isAlive());\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "private int getWestCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif (cellNumber % getGridWidth() != 0) {\n\t\t\treturn (cellNumber - 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\treturn (cellNumber + getGridWidth() - 1);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "static void drawCrosses() { // draws a cross at each cell centre\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfloat xc,yc;\n\t\t\t//GeneralPath path = new GeneralPath();\n\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// label cell position\n\t\t\t\tjava.awt.geom.GeneralPath Nshape = new GeneralPath();\n\t\t\t\tNshape.moveTo(xc-arm, yc);\n\t\t\t\tNshape.lineTo(xc+arm, yc);\n\t\t\t\tNshape.moveTo(xc, yc-arm);\n\t\t\t\tNshape.lineTo(xc, yc+arm);\n\n\t\t\t\tRoi XROI = new ShapeRoi(Nshape);\n\t\t\t\tOL.add(XROI);\n\t\t\t}\n\t\t}\n\t}", "public void generateAntHill(int x, int y, String colour) {\n for (int i = 0; i < 11; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[x*130+y+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[x*130+y+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next change the two rows above and below the centre\n for (int i = 0; i < 10; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next rows inset by one on the right\n for (int i = 0; i < 9; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left none on the right\n for (int i = 0; i < 8; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the right and none on the left\n for (int i = 0; i < 7; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left and none on the right\n for (int i = 0; i < 6; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n }", "private static void createCell(Workbook wb, Row row, int column, HorizontalAlignment halign, VerticalAlignment valign) {\n Cell cell = row.createCell(column);\n cell.setCellValue(\"Align It\");\n CellStyle cellStyle = wb.createCellStyle();\n //水平对其\n// cellStyle.setAlignment(halign);\n //垂直对齐\n// cellStyle.setVerticalAlignment(valign);\n cell.setCellStyle(cellStyle);\n }", "private static void drawTableCompenents() {\n\t\ttopColumn = new JLabel(\"location\");\r\n\t\ttopColumn.setLocation(200, 0);\r\n\t\tExtension.instance.add(topColumn);\r\n\t}", "public void drawCell(Graphics g) {\n if (isVisited()) { // visited cells are white\n setCellColor(g, Color.WHITE);\n }\n if (isSolution()) { // cells that are part of the most optimal solution are yellow\n setCellColor(g, Color.YELLOW);\n }\n\n // draw the walls if there are any\n int col2 = col * CELL_DIMS;\n int row2 = row * CELL_DIMS;\n\n g.setColor(Color.BLACK); // walls are black\n if (walls[0]) // north wall\n g.drawLine(col2, row2, col2 + CELL_DIMS, row2);\n if (walls[1]) // east wall\n g.drawLine(col2 + CELL_DIMS, row2, col2 + CELL_DIMS, row2 + CELL_DIMS);\n if (walls[2]) // south wall\n g.drawLine(col2 + CELL_DIMS, row2 + CELL_DIMS, col2, row2 + CELL_DIMS);\n if (walls[3]) // west wall\n g.drawLine(col2, row2 + CELL_DIMS, col2, row2);\n }", "@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}", "public Point findEmptyCell(){\n int height = Math.min(labyrinth.getCells().length,LabyrinthFactory.HEIGHT-2);\n int widht = Math.min(labyrinth.getCells()[0].length, LabyrinthFactory.WIDTH);\n while(true) {\n int x = ThreadLocalRandom.current().nextInt(0, widht-2);\n int y = ThreadLocalRandom.current().nextInt(0, height-2);\n if (!labyrinth.getCell(x, y).isSolid()) {\n return new Point(x, y);\n }\n }\n }", "public Point2D getCellCoordinates(JmtCell cell) {\r\n \t\tRectangle2D bounds = GraphConstants.getBounds(cell.getAttributes());\r\n \t\treturn new Point2D.Double(bounds.getMinX(), bounds.getMinY());\r\n \t}", "public Cell(int col, int row){ // constructor\n this.col = col;\n this.row = row;\n }", "public void displayBoard() {\n System.out.printf(\"%20s\",\"\"); // to add spacing\n for(int i = 0; i < space[0].length; i++) //Put labels for number axis\n {\n System.out.printf(\"%4d\",i+1);\n }\n System.out.println();\n for(int row = 0; row < this.space.length; row++) { //Put letter labels and appropriate coordinate values\n System.out.print(\" \"+ (char)(row+'A') + \"|\");\n for (String emblem: this.space[row]) //coordinate values\n System.out.print(emblem + \" \");\n System.out.println();\n }\n }", "private void insertCell(PdfPTable table,String text,int align,int colspan,Font font){\r\n \r\n PdfPCell cell = new PdfPCell(new Phrase(text.trim(),font));\r\n cell.setHorizontalAlignment(align);\r\n cell.setColspan(colspan);\r\n if (text.trim().equalsIgnoreCase(\"\")) {\r\n cell.setMinimumHeight(10f);\r\n }\r\n table.addCell(cell);\r\n }", "public void testGetCell()\n {\n // All cells should be empty to start.\n for (int i = 0; i < 3; i++)\n {\n for (int j = 0; j < 3; j++)\n {\n assertTrue(b1.getCell(i, j) == Cell.EMPTY);\n }\n }\n\n\n }", "private void compactHorizontally (List<List<NodeRealizer>> cellColumns)\n {\n int centerIndex = (cellColumns.size () - 1) / 2;\n List<NodeRealizer> minXList = cellColumns.get (centerIndex);\n List<NodeRealizer> maxXList = cellColumns.get (centerIndex);\n for (int i = 1; i <= centerIndex; i++)\n {\n List<NodeRealizer> leftList = cellColumns.get (centerIndex - i);\n moveToRight (leftList, minXList);\n minXList = leftList;\n List<NodeRealizer> rightList = cellColumns.get (centerIndex + i);\n moveToLeft (rightList, maxXList);\n maxXList = rightList;\n }\n if (cellColumns.size () % 2 == 0)\n {\n List<NodeRealizer> rightList = cellColumns.get (cellColumns.size () - 1);\n moveToLeft (rightList, maxXList);\n }\n }", "public StringBuffer2D printBoard(){\n StringBuffer2D sb = new StringBuffer2D();\n StringBuffer2D lettersHeader = makeLettersHeader();\n //hardcoded numberLegend width\n sb.insert(lettersHeader,2,0);\n //top row\n int actualWidth = getActualWidth(true)+1;\n //System.out.println(\" \");\n //top border\n try{\n for(int y=0;y<board.getHeight();++y){\n int startY = lettersHeader.getHeight() + y*getActualHeight();\n //LEFT number headers\n StringBuffer2D numberLegend = makeNumberLegend(y+1);\n sb.insert(numberLegend, 0, startY);\n for(int x=0;x<board.getWidth();++x){\n Position position = new Position(x,y);\n StringBuffer2D dispCell = displayCell(position);\n int startX = numberLegend.getWidth() + x*actualWidth;\n sb.replace(dispCell, startX, startY, maxWidth, startY+getActualHeight());\n }\n }\n }catch(PositionOutOfBoundsException e){\n e.printStackTrace();\n }\n return sb;\n }", "private Cell get_bottom_cell(int row, int col) {\n return get_cell(++row, col);\n }", "public WorldImage drawCell(int blocks) {\r\n return new EmptyImage();\r\n }", "private Cell get_top_left_diagnoal_cell(int row, int col) {\n return get_cell(--row, --col);\n }", "private String thCell(final String contents) {\n return thCell(contents, \"\");\n }", "private void UpdateSurround(int row, int col) {\n\t\t\n\t\t// updates the 3 positions below the bomb\n\t\tif(row - 1 >= 0) {\n\t\t\tif(grid[row-1][col] < 9)\n\t\t\t\tgrid[row-1][col] = grid[row-1][col] + 1;\n\t\t\tif(col - 1 >= 0) {\n\t\t\t\tif(grid[row-1][col-1] < 9)\n\t\t\t\t\tgrid[row-1][col-1] = grid[row-1][col-1] + 1;\n\t\t\t}\n\t\t\tif(col + 1 < width) {\n\t\t\t\tif(grid[row-1][col+1] < 9)\n\t\t\t\t\tgrid[row-1][col+1] = grid[row-1][col+1] + 1;\n\t\t\t}\n\t\t}\n\t\t// updates the 3 positions above the bomb\n\t\tif(row + 1 < height) {\n\t\t\tif(grid[row+1][col] < 9)\n\t\t\t\tgrid[row+1][col] = grid[row+1][col] + 1;\n\t\t\tif(col - 1 >= 0) {\n\t\t\t\tif(grid[row+1][col-1] <9)\n\t\t\t\t\tgrid[row+1][col-1] = grid[row+1][col-1] + 1;\n\t\t\t}\n\t\t\tif(col + 1 < width) {\n\t\t\t\tif(grid[row+1][col+1] < 9)\n\t\t\t\t\tgrid[row+1][col+1] = grid[row+1][col+1] + 1;\n\t\t\t}\n\t\t}\n\t\t// updates position to the left\n\t\tif(col - 1 >= 0) {\n\t\t\tif(grid[row][col-1] < 9)\n\t\t\t\tgrid[row][col-1] = grid[row][col-1] + 1;\n\t\t}\n\t\t// updates position to the right\n\t\tif(col + 1 < width) {\n\t\t\tif(grid[row][col+1] < 9)\n\t\t\t\tgrid[row][col+1] = grid[row][col+1] + 1;\n\t\t}\n\t}", "static void printGrid (int[][] G){\n for(int i=1; i<G.length; i++){\n for (int j=1; j<G[i].length; j++){\n if (G[i][j]==0){\n System.out.print(\"- \");\n } else System.out.print(G[i][j]+\" \");\n if ( j==3) System.out.print(\" \");\n if ( j==6) System.out.print(\" \");\n if ( j==9) System.out.print(\"\\n\");\n }\n if ( i==3) System.out.print(\"\\n\");\n if ( i==6) System.out.print(\"\\n\");\n }\n }", "public Rectangle2D getCellDimension(JmtCell cell) {\r\n \t\treturn GraphConstants.getBounds(cell.getAttributes());\r\n \t}", "public int getCell() {\n return this.cell;\n }", "public abstract WorldImage drawCell(int blocks);", "private void emptyCell(Composite parent) {\n new Label(parent, SWT.NONE);\n }", "private void showCells(Integer x, Integer y){\n if(cells[x][y].getBombCount()!=0){\n return;\n }\n if (x >= 0 && x < grid.gridSize-1 && y >= 0 && y < grid.gridSize && !cells[x + 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x + 1][y]);\n\n if (x > 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize && !cells[x - 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x - 1][y]);\n\n if (x >= 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize-1 && !cells[x][y + 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y + 1]);\n\n if (x >= 0 && x < grid.gridSize && y > 0 && y < grid.gridSize && !cells[x][y - 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y - 1]);\n }", "public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }", "@Override\n public void printGrid(){\n for(int row = 0; row < rows; row++){\n System.out.print(\"\\n\");\n if(row==0){\n char row_char='A';\n System.out.print(\" |\");\n for(int i=0; i<rows; i++){\n System.out.print(\"[\" + row_char + \"]\");\n row_char++;\n }\n System.out.print(\"\\n\");\n System.out.print(\"---|\");\n for(int i=0; i<rows;i++){\n System.out.print(\"---\");\n }\n System.out.print(\"\\n\");\n }\n\n for(int column = 0; column < columns; column++){\n if (column==0){System.out.print(\"[\"+row+\"]|\");}\n System.out.print(grid[row][column]);\n }\n }\n }", "void growCells() {\n for (Cell cell : cells) {\n cell.grow();\n }\n }", "protected void narisi(Graphics2D g, double wp, double hp) {\n\n FontMetrics fm = g.getFontMetrics();\n\n int hPisava = fm.getAscent();\n\n double xColumn = 0.0;\n double yColumn = sirinaStolpca(wp, hp);\n\n for(int i = 0; i < podatki.length; i++){\n\n g.setColor(Color.ORANGE);\n g.fillRect((int)xColumn,(int)(hp - visinaStolpca(i, wp, hp)), (int) sirinaStolpca(wp, hp), (int) visinaStolpca(i, wp, hp));\n\n g.setColor(Color.RED);\n g.drawRect((int)((i)*sirinaStolpca(wp, hp)),(int) (hp-visinaStolpca(i, wp, hp)), (int)sirinaStolpca(wp, hp), (int)visinaStolpca(i, wp, hp));\n\n g.setColor(Color.BLUE);\n if(i < podatki.length - 1){\n double startCrtaX = sredinaVrha(i, wp, hp)[0];\n double startCrtaY = sredinaVrha(i, wp, hp)[1];\n\n double endCrtaX = sredinaVrha(i + 1, wp, hp)[0];\n double endCrtaY = sredinaVrha(i+1, wp, hp)[1];\n\n g.drawLine((int)startCrtaX,(int) startCrtaY,(int) endCrtaX,(int) endCrtaY);\n\n }\n\n g.setColor(Color.BLACK);\n\n String toWrite = Integer.toString(i+1);\n double wNapis=fm.stringWidth(toWrite);\n double xNapis=xColumn+(xColumn-wNapis)/2;\n double yNapisLowerLine=hp-hPisava;\n xColumn+=sirinaStolpca(wp, hp);\n g.drawString(toWrite,ri (xNapis),ri(yNapisLowerLine));\n\n }\n\n }", "@Override\n\tpublic String toString(){\n\t\t// return a string of the board representation following these rules:\n\t\t// - if printed, it shows the board in R rows and C cols\n\t\t// - every cell should be represented as a 5-character long right-aligned string\n\t\t// - there should be one space between columns\n\t\t// - use \"-\" for empty cells\n\t\t// - every row ends with a new line \"\\n\"\n\t\t\n\t\t\n\t\tStringBuilder sb = new StringBuilder(\"\");\n\t\tfor (int i=0; i<numRows; i++){\n\t\t\tfor (int j =0; j<numCols; j++){\n\t\t\t\tPosition pos = new Position(i,j);\n\t\t\t\t\n\t\t\t\t// use the hash table to get the symbol at Position(i,j)\n\t\t\t\tif (grid.contains(pos))\n\t\t\t\t\tsb.append(String.format(\"%5s \",this.get(pos)));\n\t\t\t\telse\n\t\t\t\t\tsb.append(String.format(\"%5s \",\"-\")); //empty cell\n\t\t\t}\n\t\t\tsb.append(\"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\n\t}", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "void getCounter(){// wazifeye in mthod, shomaresh ast.\n selectedCellCounter=0;\n emptyCellCounter=0;\n charCounter=0;\n for(int i=0; i<30;i++)\n for(int j=0; j<26;j++){\n if(jtf[i][j].getText().length()==0)\n ++emptyCellCounter;\n else\n charCounter+=jtf[i][j].getText().length();\n if(jtf[i][j].getBackground()==Color.blue || jtf[i][j].getBackground()==Color.green)\n ++selectedCellCounter;\n }\n }", "MemberCell createMemberCell();", "public Cell gap(int x, int y, Cell parent) {\n return new Cell(Boolean.FALSE, x, y, parent, parent.globalScore - 1);\n }", "public void displayColonies() {\r\n\t\tchar[][] temp;\r\n\t\tint count;\r\n\r\n\t\tfor (int row = 0; row < slideData.length; row++) {\r\n \t\t\tfor (int col = 0; col < slideData[0].length; col++) {\r\n \t\t\tif (slideData[row][col] == COLONY) {\r\n \t\t \t\tcount = collectCells(row, col);\r\n \t\t\tSystem.out.println(\"Colony at (\" + row + \",\" + col + \") with size \" + count);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void createNonDoorCells(Rectangle cellSize) {\r\n\r\n\t\tfor (int i = 0; i < this.roomCells.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.roomCells[i].length; j++) {\r\n\t\t\t\tif (this.roomCells[i][j] == null) {\r\n\r\n\t\t\t\t\tPoint coordinate = new Point(i * cellSize.width, j * cellSize.height);\r\n\t\t\t\t\tGameLocation location = new GameLocation(coordinate, this.roomId);\r\n\r\n\t\t\t\t\tif (this.stepablePolygon.contains(coordinate)) {\r\n\r\n\t\t\t\t\t\tthis.roomCells[i][j] = new Cell(location, CellProperty.Stepable);\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tthis.roomCells[i][j] = new Cell(location, CellProperty.NoProperty);\r\n\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}", "public org.apache.xmlbeans.XmlString xgetCellspacing()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CELLSPACING$28);\n return target;\n }\n }", "public void paint () {\n\t\tPaint.clear();\n\t\t\n\t\tPaint.setColor(Color.WHITE);\n\t\tPaint.fillRect(0,0,numcols_ * cellsize_,numrows_ * cellsize_);\n\t\tPaint.setColor(Color.GRAY);\n\t\tPaint.drawRect(0,0,numcols_ * cellsize_ - 1,numrows_ * cellsize_ - 1);\n\n\t\tfor ( int row = 0 ; row < numrows_ ; row++ ) {\n\t\t\tfor ( int col = 0 ; col < numcols_ ; col++ ) {\n\t\t\t\tint x = col * cellsize_;\n\t\t\t\tint y = row * cellsize_;\n\n\t\t\t\tThing thing = at(row,col);\n\t\t\t\tif ( thing != null ) {\n\t\t\t\t\tthing.paint(x,y,cellsize_,cellsize_);\n\t\t\t\t}\n\t\t\t\tPaint.setColor(Color.GRAY);\n\t\t\t\tPaint.drawRect(x,y,cellsize_,cellsize_);\n\t\t\t}\n\t\t}\n\n\t}", "public int getCellSize(){\n return cellSize;\n }", "void clearCell(int x, int y);", "private Cell get_bottom_right_diagnoal_cell(int row, int col) {\n return get_cell(++row, ++col);\n }" ]
[ "0.6259073", "0.6203919", "0.6155627", "0.61238414", "0.6108305", "0.60720736", "0.60071707", "0.591616", "0.5901456", "0.5839755", "0.5799108", "0.57850397", "0.5778539", "0.5752612", "0.57256943", "0.5665148", "0.56591296", "0.5631325", "0.5631236", "0.5614948", "0.5607268", "0.5592567", "0.55726427", "0.55604726", "0.55517596", "0.5548233", "0.55400825", "0.5526706", "0.5512515", "0.5512047", "0.5509605", "0.55085987", "0.55043614", "0.5477527", "0.54694045", "0.5445708", "0.54411036", "0.542668", "0.54241717", "0.54231584", "0.54182935", "0.54136944", "0.5411157", "0.5409418", "0.5402349", "0.54013747", "0.5396984", "0.5391594", "0.53851837", "0.5384679", "0.53776467", "0.53717405", "0.5359278", "0.53510404", "0.53473157", "0.5346956", "0.53257334", "0.5308824", "0.5308369", "0.5302721", "0.5298473", "0.5296243", "0.5292537", "0.529188", "0.52906084", "0.52870697", "0.5283405", "0.52798986", "0.52739227", "0.5267611", "0.52622336", "0.52596706", "0.52575094", "0.52561265", "0.52541554", "0.52501917", "0.52486587", "0.52422506", "0.52380353", "0.523768", "0.5233085", "0.523077", "0.5227637", "0.5225035", "0.52186763", "0.5215343", "0.5212931", "0.5210318", "0.520494", "0.52028376", "0.519726", "0.5192246", "0.51922286", "0.5186492", "0.5184527", "0.51818806", "0.51788324", "0.51753473", "0.51732874", "0.5171777", "0.51691365" ]
0.0
-1
Cari posisi worm lawan yang health nya minimum
private Position getPositionWormMinHealth(ArrayList<Worm> worms) { Worm wormWithMinHealth = worms.get(0); int i; for (Worm worm : worms) { if (worm.health < wormWithMinHealth.health) { wormWithMinHealth = worm; } } return (wormWithMinHealth.position); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double minimumDue(){\n return ((this.creditHours*this.feePerCreditHour)-this.scholarshipAmount+((this.healthInsurancePerAnnum*4)/12))/2;\n }", "private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }", "protected abstract float _getGrowthChance();", "private static int maxHealth(int health){\r\n int mHealth = 0;\r\n mHealth = health + 5;\r\n return mHealth; \r\n }", "private void checkIfHungry(){\r\n\t\tif (myRC.getEnergonLevel() * 2.5 < myRC.getMaxEnergonLevel()) {\r\n\t\t\tmission = Mission.HUNGRY;\r\n\t\t}\r\n\t}", "public void setMinimumWaterRequirement(double w) {\n this.Minimum_Water_Requirement = w;\n }", "public int getWorth() { return 1; }", "public void insurance() {\n\t\tSystem.out.println(\"Min ins is 500\");\n\t}", "boolean isSetWagerMinimum();", "boolean isSetSingleBetMinimum();", "double getMin();", "double getMin();", "void setNilSingleBetMinimum();", "public int calculateMinimumHP(int[][] A) {\n\n\t\tif (A == null || A.length == 0 || A[0].length == 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tint m = A.length;\n\t\tint n = A[0].length;\n\t\tint[][] minHealth = new int[m][n];\n\t\t//We added 1 extra because minimum 1 is needed\n\t\t// if a[m-1][n-1]=-5, then we need 6\n\t\t// if a[m-1][n-1]=-50, then we need 51\n\t\t// if a[m-1][n-1]=0, then we need 1\n\t\t// if a[m-1][n-1]=30, then we need 1\n\t\tminHealth[m - 1][n - 1] = Math.max(-A[m - 1][n - 1] + 1, 1);\n\n\t\t// We calculate minHeath in the last column\n\t\t// We already calculated for m-2 to let's do between m-2 to 0\n\t\tfor (int i = m - 2; i >= 0; i--) {\n\t\t\t// The power gets added.\n\t\t\t// If the power is very large, its no use. Overall we need only 1\n\t\t\t// If i,n-1 needs health(-ve value),\n\t\t\t// then it will addup to minHealth[i+1][n-1]\n\t\t\tminHealth[i][n - 1] = Math.max(minHealth[i + 1][n - 1] - A[i][n - 1], 1);\n\t\t}\n\n\t\t//similarly for last row\n\t\tfor (int i = n - 2; i >= 0; i--) {\n\t\t\tminHealth[m - 1][i] = Math.max(minHealth[m - 1][i + 1] - A[m - 1][i], 1);\n\t\t}\n\n\t\tfor (int i = m - 2; i >= 0; i--) {\n\t\t\tfor (int j = n - 2; j >= 0; j--) {\n\t\t\t\tminHealth[i][j] = Math.min(minHealth[i + 1][j], minHealth[i][j + 1]) - A[i][j];\n\t\t\t\t// If minHealthNeeded <=0, then it means we have extra power.\n\t\t\t\t// We only need 1 extra power\n\t\t\t\tminHealth[i][j] = Math.max(minHealth[i][j], 1);\n\t\t\t}\n\t\t}\n\n\t\treturn minHealth[0][0];\n\t}", "public float getChlorophyllMin() {\n return chlorophyllMin;\n }", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "@Test\r\n\tpublic void calculLostPointsByOneRuleBelowMinTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(2f, 0.5f, 3f), new Integer(1)),\r\n\t\t\t\tnew Float(0));\r\n\t}", "public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}", "public void setMinAmount(int min) {\n _min = min;\n }", "int getMines() {return mines;}", "int getMinigameDefenseChancesLeft();", "public PrimEdge calculateMinimum() {\n int minWage = Integer.MAX_VALUE;\n PrimEdge result = null;\n for (Map.Entry<Integer, PrimEdge> entry : dtable.entrySet()) {\n if (entry.getValue().getWage() < minWage) {\n result = entry.getValue();\n minWage = entry.getValue().getWage();\n }\n }\n return result;\n }", "private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }", "private double getMinThreshold() {\n return minThreshold;\n }", "public long minimumHealth(int[] damages, int armor) {\n long total = 1;\n int max = 0;\n for (int damage : damages) {\n total += damage;\n max = Math.max(max, damage);\n }\n\n return total - Math.min(armor, max);\n }", "ProbeLevel minimumLevel();", "private int min(int profondeur)\n\t{\n\t\tif(profondeur == 0 || grille.fin())\n\t\t{\n\t\t\treturn eval();\n\t\t}\n\t\tint min_val = 1000;\n\t\tfor(int y = 0; y < grille.getTaille(); y++)\n\t\t{\n\t\t\tfor(int x = 0; x < grille.getTaille(); x++)\n\t\t\t{\n\t\t\t\tCoordonnee test = new Coordonnee(x, y);\n\t\t\t\tif(grille.getCase(test).getContenu() == grille.getCaseVide())\n\t\t\t\t{\n\t\t\t\t\tgrille.jouer(test, '?');\n\t\t\t\t\tint val = max(profondeur-1);\n\t\t\t\t\t//System.out.println(\" = \" + val);\n\t\t\t\t\t//grille.afficher();\n\t\t\t\t\tif(val < min_val)\n\t\t\t\t\t{\n\t\t\t\t\t\tmin_val = val;\n\t\t\t\t\t}\n\t\t\t\t\tannuler(test);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn min_val;\n\t}", "public int getMinAmount() {\n return _min;\n }", "public Integer getMinHealthyPercentage() {\n return this.minHealthyPercentage;\n }", "public void minimum()\n\t{\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tif(rowTick[i]==8888)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<n;j++)\n\t\t\t\t{\n\t\t\t\t\tif(columnTick[j]==0)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cost[i][j]<min)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmin=cost[i][j];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "@Override\n public int getBasicValue() {\n return minBonus;\n }", "public abstract int getMinimumValue();", "static void sueldo7diasl(){\nSystem.out.println(\"Ejemplo estructura Condicional Multiple 1 \");\nString descuenta=\"\";\n//datos de entrada xd\nint ganancias= teclado.nextInt();\nif(ganancias<=150){\ndescuenta=\"0.5\";\n}else if (ganancias>150 && ganancias<300){\n descuenta=\"0.7\";}\n else if (ganancias>300 && ganancias<450){\n descuenta=\"0.9\";}\n //datos de salida:xd\n System.out.println(\"se le descuenta : \"+descuenta);\n}", "default int minimumHit(Player player) {\n\t\treturn -1;\n\t}", "@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}", "public static void main(String[] args) {\n int currentLimit = 45 ; // try 45 , 65 ,90\n\n if (currentLimit >70 ) {\n System.out.println(\" you are speeding more than 70 --POINT TAKEN !! \");\n } else if (currentLimit > 60 ) {\n //System.out.println(\"your speed is less thank 70 but more than 60 \");\n System.out.println(\"your are speeding more than 60 and less than 70 -- WARNING TAKEN\");\n } else {\n System.out.println(\"KEEP DRIVING\");\n }\n\n\n }", "public static void main(String[] args) {\n\t\t\t\r\n\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\t\tSystem.out.println(\"Bitte geben Sie ihr Körpergewicht in KG an: \");\r\n\t\t\tdouble Gewicht = sc.nextDouble();\r\n\t\t\tSystem.out.print(\"Bitte geben Sie ihre Körpergröße in m an: \");\r\n\t\t\tdouble Groesse = sc.nextDouble();\r\n\t\t\tSystem.out.print(\"Bitte geben Sie ihr Alter an: \");\r\n\t\t\tdouble Alter = sc.nextDouble();\r\n\t\t\t\r\n\t\t\tdouble BMI = Gewicht/(Groesse*Groesse);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Der BMI Beträgt \" + BMI);\r\n\t\t\tSystem.out.println(\"__________________________\");\r\n\r\n\t\tif (Alter >= 19 && Alter <= 24) {\r\n\t\t\tif (BMI >= 19 && BMI <= 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 19) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (Alter >= 25 && Alter <= 34) {\r\n\t\t\tif (BMI >= 20 && BMI <= 25) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 20) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 25) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 35 && Alter <= 44) {\r\n\t\t\tif (BMI >= 21 && BMI <= 26) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 21) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 26) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 45 && Alter <= 54) {\r\n\t\t\tif (BMI >= 22 && BMI <= 27) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 22) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 27) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 55 && Alter <= 64) {\r\n\t\t\tif (BMI >= 23 && BMI <= 28) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 23) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 28) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\telse if (Alter >= 64) {\r\n\t\t\tif (BMI >= 24 && BMI <= 29) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt im optimalen Bereich\");\r\n\t\t\t} else if (BMI < 24) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt unterhalb des optimalen Berecihs\");\r\n\t\t\t} else if (BMI > 29) {\r\n\t\t\t\tSystem.out.println(\"Ihr BMI liegt oberhalb des optimalen Berecihs\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}", "int getMindestvertragslaufzeit();", "public void lowCredit(){\n if (getBalance() < minAmount){\n System.out.println(\"Your current account is running low on credit\");\n }\n }", "private double getMin() {\n return min;\n }", "@Test\n\tpublic void testMinimum() {\n\t\tassertEquals(75, g1.minimum(), .001);\n\t\tassertEquals(64, g2.minimum(), .001);\n\t\tassertEquals(52, g3.minimum(), .001);\n\t}", "public int getHealthGain();", "public int getLevel(){\n \t\treturn (strength + intelligence + stamina + Math.abs(charm) + Math.abs(cuteness))/5;\n \t}", "float getWetness();", "int askForTempMin();", "public float getMinAvailability()\n\t{\n\t\treturn piecePicker.getMinAvailability();\n\t}", "public int lowHit(int start)\r\n {\r\n damage = ((int)(Math.random() * 100) % 20 + 35);\r\n int hp = start - damage; \r\n \r\n //modified to turn hp to 0 once it drops below or equals 0.\r\n if(hp <= 0)\r\n hp = 0;\r\n return hp;\r\n }", "protected void calcMinMax() {\n }", "void setNilMultipleBetMinimum();", "public int getMaxHealth();", "@Override\n public int status() {\n if (currentLoad <= maxLoad && currentLoad >= 0.6 * maxLoad) return GOOD;\n if (currentLoad < 0.6 * maxLoad && currentLoad >= 0.1 * maxLoad) return CHECK;\n else return BAD;\n }", "int minNoteValue();", "public int setChlorophyllMin(Float chlorophyllMin) {\n try {\n setChlorophyllMin(chlorophyllMin.floatValue());\n } catch (Exception e) {\n setChlorophyllMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return chlorophyllMinError;\n }", "public int GetMinVal();", "public int getMinimun(){\n int lowGrade = grades[0]; //assume que grades[0] é a menor nota\n \n //faz um loop pelo array de notas\n for(int grade: grades){\n //se nota for mais baixa que lowGrade, essa note é atribuida a lowGrade\n if(grade < lowGrade){\n lowGrade = grade;\n }\n }\n \n return lowGrade;\n }", "int range(){\n return fuelcap*mpg;\n }", "public void tensionRangeCheck(){\n if(motor.get() < 0){\n if(Bottom_Limit_Switch.get() | tenPot.pidGet()> tenPotMAX ){\n motor.set(0.0);\n }\n }else if(motor.get() > 0){\n if(Top_Limit_Switch.get() | tenPot.pidGet()< tenPotMIN){\n motor.set(0.0);\n }\n }\n }", "public void setMin( float min )\n {\n this.min = min;\n show_text();\n }", "double getLowerThreshold();", "public boolean nearMaxMin() {\n double water = this.levelMessage.getDoubleParameter();\n double no = (this.configuration.getMaximalLimitLevel()\n - this.configuration.getMaximalNormalLevel()) / 4;\n if (water > this.configuration.getMaximalLimitLevel()\n || water > this.configuration.getMaximalLimitLevel() - no) {\n return true;\n } else if (water < this.configuration.getMinimalLimitLevel()\n || water < this.configuration.getMinimalLimitLevel() + no) {\n\n return true;\n }\n return false;\n }", "public double getMinimumValue() { return this.minimumValue; }", "int getSoilMoistureLevel(int soilMoistureMM);", "public int getHealthCost();", "@Override\n\t\t\tpublic double reward(State s1, Action a, State s2) {\n\t\t\t\tif ((Double)s2.get(\"x\") >= 0.5) {\n\t\t\t\t\treturn 100;\n\t\t\t\t}\n\t\t\t\tif ((Double)s2.get(\"x\") == mcGen.physParams.xmin) {\n\t\t\t\t\treturn -100;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}", "@Override\n public int maxHealth() {\n return 25;\n }", "boolean isNilSingleBetMinimum();", "boolean isSetMultipleBetMinimum();", "private void calculeStatAdd() {\n resourceA = this.getContext().getGame().getPlayer(idPlayer).getInventory().getValueRessource(type);\n int win = resourceA - resourceB;\n int diff = (resourceB - resourceA) + value;\n this.getContext().getStats().incNbRessourceWinPlayers(idPlayer,type,win);\n this.getContext().getStats().incNbRessourceExtendMaxPlayers(idPlayer,type,diff);\n }", "public int getMaxHealth() {\n \t\treturn (int)(maxHealthModifier + (stamina/2 + strength/4)*Math.PI);\n \t}", "public void controllore() {\n if (puntiVita > maxPunti) puntiVita = maxPunti;\n if (puntiFame > maxPunti) puntiFame = maxPunti;\n if (puntiFelicita > maxPunti) puntiFelicita = maxPunti;\n if (soldiTam < 1) {\n System.out.println(\"Hai finito i soldi\");\n System.exit(3);\n }\n //controlla che la creatura non sia morta, se lo è mette sonoVivo a false\n if (puntiVita <= minPunti && puntiFame <= minPunti && puntiFelicita <= minPunti) sonoVivo = false;\n }", "org.apache.xmlbeans.XmlDecimal xgetSingleBetMinimum();", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=400.5;\n boolean aMin=a<b && a<c; //if a is less than both b and c,then is the minimum\n boolean bMin=b<a && b<c;//if b is less then booth a and c, then b is the minimum\n boolean cMin=c<a && c<b;//if\n if(aMin){\n System.out.println(a+\"is the minimum number\");}\n if(bMin){\n System.out.println(b+\"is the minimum number\");}\n if(cMin){\n System.out.println(c+\"is the minimum number\");}\n\n }", "public void randomizeSearchDifficulty(int minimum){\n\t\tint roll=minimum+dice.nextInt(floorTag+20);\r\n\t\tsetSearchDifficulty(roll);\r\n\t}", "public double Rule1 (double hargabaru, double kualitas){\n double alfa1 = Math.min(miuHBMahal(hargabaru), miuKualBagus(kualitas));\r\n double hasil = hasilHSMahal(alfa1);\r\n hasil = alfa1 * hasil;\r\n alfatotal = alfatotal + alfa1;\r\n System.out.println(\"Alfa1 : \"+alfa1);\r\n System.out.println(hasil);\r\n return hasil;\r\n\r\n }", "private double getMinInitProb(){\r\n\t\treturn probThreshold;\r\n\t}", "public static void main(String[] args) {\n double a=100;\n double b=200;\n double c=300;\nboolean aIsMedium = (a>b && a<c) || (a>c && a<b);\nboolean bIsMedium = (b<c && b>a) || (b>c && b<a);\nboolean cIsMedium = (c>a && c<b) || (c>b && c<a);\n\n double medium=0;\n\n if(aIsMedium){\n //System.out.println(a);\n medium= a;\n }\n if (bIsMedium){\n // System.out.println(b);\n medium= b;\n }\n if (cIsMedium){\n //System.out.println(c);\n medium=c;\n }\n System.out.println(medium+ \" is medium number\");\n }", "int min() {\n return min;\r\n }", "private void calculerChemin() {\n suiteDeDeplacement.clear();\n int[][] empreinte = lab.getEmpreinte();\n lee(empreinte, x / Case.TAILLE, y / Case.TAILLE, cibleX, cibleY);\n }", "private Worm getFirstWormInRangeSpecial() {\n \n int count = 0;\n Worm targetWorm = null;\n\n //Jika worm saat ini adalah Agent (bisa menggunakan Banana Bomb)\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[1].bananaBombs.count;\n int range = gameState.myPlayer.worms[1].bananaBombs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.health <= 0) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n\n //Jika worm saat ini adalah Technician (bisa menggunakan Snowball)\n if (gameState.myPlayer.worms[2].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[2].snowballs.count;\n int range = gameState.myPlayer.worms[2].snowballs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.roundsUntilUnfrozen > 1) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n \n return targetWorm;\n\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void calcularSalario(){\n // 1% do lucro mensal\n double percentagemLucro = 0.01 * lucroMensal;\n // valor fixo igual ao dobro do dos empregados sem especialização, acrescido\n //de um prémio que corresponde a 1% do lucro mensal nas lojas da região.\n setSalario(1600 + percentagemLucro);\n\n }", "public int getMinAmount() {\n return minAmount;\n }", "private void applyLvlUpCost() {\n }", "public int setChlorophyllMin(Integer chlorophyllMin) {\n try {\n setChlorophyllMin(chlorophyllMin.floatValue());\n } catch (Exception e) {\n setChlorophyllMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return chlorophyllMinError;\n }", "private boolean checkGreedyWinRate() {\r\n return myTotal.get(0) > enTotal.get(0)+2 && (myself.health > 50 || myself.health > opponent.health);\r\n }", "public int minimumPenalty() {\n return dp[dp.length-1];\n }", "private boolean checkGreedyDefense() {\r\n return enTotal.get(2)+1 < myTotal.get(2) && enTotal.get(0)+1 < myTotal.get(0);\r\n }", "public void setMinHealthyPercentage(Integer minHealthyPercentage) {\n this.minHealthyPercentage = minHealthyPercentage;\n }", "public float getSilicateMin() {\n return silicateMin;\n }", "public boolean lowQuantity(){\r\n if(getToolQuantity() < 40)\r\n return true;\r\n return false;\r\n }", "public double constrainDemand(double slope, double trialprice)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to constrainDemand : \" + \"Agent\");\r\n/* 175 */ if (this.demand > 0.0D) {\r\n/* 176 */ if (this.demand * trialprice > this.cash - this.mincash)\r\n/* */ {\r\n/* 178 */ if (this.cash - this.mincash > 0.0D) {\r\n/* 179 */ this.demand = ((this.cash - this.mincash) / trialprice);\r\n/* 180 */ slope = -this.demand / trialprice;\r\n/* */ }\r\n/* */ else\r\n/* */ {\r\n/* 184 */ this.demand = 0.0D;\r\n/* 185 */ slope = 0.0D;\r\n/* */ }\r\n/* */ \r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* */ }\r\n/* 192 */ else if ((this.demand < 0.0D) && (this.demand + this.position < this.minholding))\r\n/* */ {\r\n/* */ \r\n/* 195 */ this.demand = (this.minholding - this.position);\r\n/* 196 */ slope = 0.0D;\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* 200 */ return this.demand;\r\n/* */ }", "int calculateMinimumHP(int[][] dungeon) {\n int m = dungeon.length;\n assert (m > 0);\n int n = dungeon[0].length;\n int[] dp = new int[n + 1];\n for (int j = n - 1; j >= 0; j--) dp[j] = Integer.MAX_VALUE;\n dp[n] = 1;\n\n for (int i = m - 1; i >= 0; i--) {\n for (int j = n - 1; j >= 0; j--)\n dp[j] = Math.max(1, Math.min(dp[j], dp[j + 1]) - dungeon[i][j]);\n //System.out.println(Arrays.toString(dp));\n dp[n] = Integer.MAX_VALUE;\n }\n return dp[0];\n }", "@Test\n public void dpsAtStartingLevel_valid_shouldPass(){\n RPGCharacter warrior = CreateCharacter.createChar(4);\n double num = 1 * 1.05;\n assertEquals(num, warrior.getDamage(),0);\n\n }", "public int getMinimumValue() {\n/* 276 */ return -this.s.getMaximumValue();\n/* */ }", "E minVal();", "public int calculateMinimumHP(ArrayList<ArrayList<Integer>> grid) {\n\t\t\t\t int m =grid.size(), n = grid.get(0).size();\n\t\t\t\t int[][][] dp = new int[m+1][n+1][2];\n\t\t\t\t \n\t\t\t\t dp[0][0][0] = 0;\n\t\t\t\t dp[0][0][1] = 0;\n\t\t\t\t dp[0][1][0] = 1; // start with life\n\t\t\t\t dp[0][1][1] = 0; // balance life\n\t\t\t\t dp[1][0][0] = 1;\n\t\t\t\t dp[1][0][1] = 0;\n\t\t\t\t for(int i=2;i<dp[0].length;i++){\n\t\t\t\t\t dp[0][i][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[0][i][1] = 0;\n\t\t\t\t }\n\t\t\t\t for(int i=2;i<dp.length;i++){\n\t\t\t\t\t dp[i][0][0] = Integer.MAX_VALUE;\n\t\t\t\t\t dp[i][0][1] = 0;\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for(int i=1;i<dp.length;i++){\n\t\t\t\t\t for(int j=1;j<dp[0].length;j++){\n\t\t\t\t\t\t \n\t\t\t\t\t\t if(grid.get(i-1).get(j-1) < 0){\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0] - grid.get(i-1).get(j-1) - fromCell[1];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+ grid.get(i-1).get(j-1)>0?fromCell[1]+ grid.get(i-1).get(j-1):0;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t int[] fromCell = dp[i-1][j][0]< dp[i][j-1][0]?dp[i-1][j]:dp[i][j-1];\n\t\t\t\t\t\t\t dp[i][j][0] = fromCell[0];\n\t\t\t\t\t\t\t dp[i][j][1] = fromCell[1]+grid.get(i-1).get(j-1);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t return dp[m][n][0];\n\t\t\t\t \n\t\t\t }", "private static int calcMagicPower(Thing caster, Thing spell) {\r\n \t\tGame.assertTrue(spell.getFlag(\"IsSpell\"));\r\n \t\tdouble sk=0;\r\n \t\tif (caster!=null) {\r\n \t\t\tsk=calcMagicSkill(caster,spell);\r\n \t\t} \r\n \t\t\r\n \t\t// minimum skill\r\n \t\tint skillMin=spell.getStat(\"SkillMin\");\r\n \t\tif (sk<skillMin) sk=skillMin;\r\n \t\t\r\n \t\tsk=sk*spell.getStat(\"PowerMultiplier\")/100.0 \r\n \t\t\t\t+spell.getStat(\"PowerBonus\");\r\n \t\t\r\n \t\tif (sk<0) sk=0;\r\n \t\treturn (int)sk;\r\n \t}", "public void validateMinimum() {\n/* */ double newMin;\n/* */ try {\n/* 373 */ newMin = Double.parseDouble(this.minimumRangeValue.getText());\n/* 374 */ if (newMin >= this.maximumValue) {\n/* 375 */ newMin = this.minimumValue;\n/* */ }\n/* */ }\n/* 378 */ catch (NumberFormatException e) {\n/* 379 */ newMin = this.minimumValue;\n/* */ } \n/* */ \n/* 382 */ this.minimumValue = newMin;\n/* 383 */ this.minimumRangeValue.setText(Double.toString(this.minimumValue));\n/* */ }" ]
[ "0.62218803", "0.6197779", "0.61816657", "0.6179069", "0.6174933", "0.61311305", "0.61254174", "0.61153466", "0.61113137", "0.6097045", "0.6096761", "0.6096761", "0.60962164", "0.60922956", "0.608403", "0.60823137", "0.6078594", "0.606191", "0.60598737", "0.6022473", "0.60194206", "0.60115045", "0.59914124", "0.5990079", "0.5972957", "0.5940468", "0.5932755", "0.5929423", "0.5925591", "0.59239256", "0.5907299", "0.5902426", "0.5900558", "0.59001666", "0.58992004", "0.5877842", "0.5877212", "0.5875862", "0.586973", "0.5862192", "0.5857976", "0.5856412", "0.58478725", "0.5831875", "0.5828397", "0.58259255", "0.5823164", "0.58174974", "0.5809477", "0.5808016", "0.58064467", "0.58057064", "0.5805413", "0.5802366", "0.58003414", "0.57936716", "0.57886815", "0.5788174", "0.5783701", "0.5781466", "0.5774947", "0.57715416", "0.5766356", "0.5766012", "0.5761795", "0.57549566", "0.57526237", "0.57516026", "0.57504535", "0.5745966", "0.5736926", "0.57348406", "0.573226", "0.57321066", "0.5728755", "0.57286656", "0.57277846", "0.57227045", "0.5721976", "0.5721071", "0.5716882", "0.5716882", "0.5715668", "0.5714939", "0.5713628", "0.5710094", "0.5707905", "0.57073134", "0.5701478", "0.5687716", "0.5683216", "0.5673282", "0.56725526", "0.56639946", "0.566047", "0.5659169", "0.5658388", "0.565716", "0.5650422", "0.56500155" ]
0.6161279
5
Mencari target untuk dilempar snowball
private Cell getSnowballTarget() { Cell[][] blocks = gameState.map; int mostWormInRange = 0; Cell chosenCell = null; for (int i = currentWorm.position.x - 5; i <= currentWorm.position.x + 5; i++) { for (int j = currentWorm.position.y - 5; j <= currentWorm.position.y + 5; j++) { if (isValidCoordinate(i, j) && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) { List<Cell> affectedCells = getSurroundingCells(i, j); affectedCells.add(blocks[j][i]); int wormInRange = 0; for (Cell cell : affectedCells) { for (Worm enemyWorm : opponent.worms) { if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y && enemyWorm.roundsUntilUnfrozen == 0 && enemyWorm.health > 0) wormInRange++; } for (Worm myWorm : player.worms) { if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0) wormInRange = -5; } } if (wormInRange > mostWormInRange) { mostWormInRange = wormInRange; chosenCell = blocks[j][i]; } } } } return chosenCell; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void target() {\n\t\t// find distance to flower\n\t\tdouble dist = grid.getDistance(grid.getLocation(this),\n\t\t\t\t\t\t\t\t\t grid.getLocation(targetFlower));\n\t\t// if close to flower start harvesting nectar\n\t\tif(dist < 3) {\n\t\t\tstate = \"HARVESTING\";\n\t\t}\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\telse if(dist > 200){\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// else keep moving toward flower\n\t\telse{\n\t\t\tmoveTowards(grid.getLocation(targetFlower), 3);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private int end_round() {\n if(gameClock.displayTime() <= 0) {\n return 2;\n }\n \n for(target t : targets) {\n if(!t.is_hit()) return 0;\n }\n \n return 1;\n }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "N getTarget();", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "private void updateCurrentTarget(){\n switch (state){\n case States.DEAD:\n currentTarget = currentLocation;\n break;\n case States.FIGHT:\n if (targetEnemy != null)\n currentTarget = targetEnemy.getCurrentLocation();\n else\n currentTarget = targetBuilding.getLocation();\n break;\n case States.RETREAT:\n currentTarget = new Point(20,20);\n break;\n case States.LOSS:\n currentTarget = new Point(20,20);\n break;\n case States.WIN:\n currentTarget = village.getCenter();\n break;\n case States.IDLE:\n currentTarget = targetBuilding.getLocation();\n }\n }", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "@Override\n public ControllerViewEvent getTargetEffectOne() {\n ArrayList<Square> possibleTarget = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().getSquareColour()) && !getOwner().getPosition().getNextSquare(i).findRoomPlayers().isEmpty())\n possibleTarget.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTarget), Encoder.encodeSquareTargetsY(possibleTarget));\n }", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "public void moveOneStep() {\r\n\r\n // detects what direction the ball moves and switches it.\r\n double xDirection, yDirection;\r\n if (v.getDx() < 0) {\r\n xDirection = -r;\r\n } else {\r\n xDirection = r;\r\n }\r\n if (v.getDy() < 0) {\r\n yDirection = -r;\r\n } else {\r\n yDirection = r;\r\n }\r\n // if the ball is in the paddle because they move towards each other, the ball moves to the top of the paddle.\r\n Rectangle danger;\r\n // finding the paddle.\r\n for (Collidable c: environment.getCollidables()) {\r\n if (c.getCollisionRectangle().getUpperLeft().getY() == 550) {\r\n danger = c.getCollisionRectangle();\r\n // moving the ball up if its in the paddle.\r\n if (center.getY() > danger.getUpperLeft().getY()\r\n && center.getX() > danger.getUpperLeft().getX()\r\n && center.getX() < danger.getUpperRight().getX()) {\r\n this.center = new Point(center.getX(), danger.getUpperLeft().getY() - r);\r\n }\r\n }\r\n }\r\n Line yTrajectory = new Line(center.getX(), center.getY() + yDirection,\r\n center.getX() + v.getDx(), center.getY() + yDirection + v.getDy());\r\n Line xTrajectory = new Line(center.getX() + xDirection, center.getY(),\r\n center.getX() + v.getDx() + xDirection, center.getY() + v.getDy());\r\n // the collision is on the y field.\r\n if (environment.getClosestCollision(yTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(yTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(yTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(this.center.getX(),\r\n bangedPoint.getY() - yDirection - v.getDy());\r\n }\r\n // the collision is on the x field.\r\n if (environment.getClosestCollision(xTrajectory) != null) {\r\n Collidable bangedCollidable = environment.getClosestCollision(xTrajectory).collisionObject();\r\n Point bangedPoint = environment.getClosestCollision(xTrajectory).collisionPoint();\r\n this.setVelocity(bangedCollidable.hit(this, bangedPoint, this.v));\r\n this.center = new Point(bangedPoint.getX() - xDirection - v.getDx(),\r\n this.center.getY());\r\n }\r\n this.center = this.getVelocity().applyToPoint(this.center);\r\n }", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n\tpublic void testTargetsOneStep() {\r\n\t\tboard.calcTargets(24, 17, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 18)));\t\r\n\t\t\r\n\t\tboard.calcTargets(10, 24, 1);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 24)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 23)));\t\t\t\r\n\t}", "public static void hint(int[][] map, int x, int y) {\n\t\t// show neighbor of this shot\n\t\tfor (int i = -1; i < 2; i++) {\n\t\t\tfor (int j = -1; j < 2; j++) {\n\n\t\t\t\tif (x + i < 0 || y + j < 0 || x + i > 9 || y + j > 9) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (map[x + i][y + j] == 0) {\n\t\t\t\t\tmap[x + i][y + j] = 3;\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\"x axis is \" + (x + i) + \" and y axis is \" + (y + j) + \"\" + \", it is not the target!\");\n\t\t\t\t} else if (map[x + i][y + j] == 1) {\n\t\t\t\t\t// map[x + i][y + j] = MINE_FOUND;\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"x axis is \" + (x + i) + \" and y axis is \" + (y + j) + \"\" + \", this is a target!\");\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------\");\n\t\t// print all the previous shots.\n\t\tfor (int i = 0; i < map.length; i++) {\n\t\t\tfor (int j = 0; j < map[i].length; j++) {\n\t\t\t\tif (map[i][j] == 3) {\n\t\t\t\t\tSystem.out.println(\"x axis is \" + i + \" and y axis is \" + j + \"\" + \", it is not the target!\");\n\t\t\t\t} else if (map[i][j] == 2) {\n\t\t\t\t\tSystem.out.println(\"x axis is \" + i + \" and y axis is \" + j + \"\" + \", it is a found target!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n // size of square board\n int N = 6;\n int[] knightPos= {4, 5};\n int[] targetPos= {1, 1};\n System.out.println(minStepToReachTarget(knightPos, targetPos, N));\n \n N = 201;\n knightPos = new int[] {200, 200};\n targetPos = new int[] {0, 0};\n System.out.println(minStepToReachTarget(knightPos, targetPos, N));\n }", "public void approachTargetWithVision() {\n final double STEER_P = 0.005; \n final double DRIVE_P = 0.05; \n final double DESIRED_TARGET_AREA = 4; // Area of the target when the robot reaches the wall\n final double MAX_DRIVE = 0.75; // Simple speed limit so we don't drive too fast\n final double STEER_I = 0.005;\n final double DRIVE_I = 0.0;\n final double STEER_D = 0.02;\n final double xError;\n final double aError;\n double DRIVE_INTEGRAL = 0;\n\n \n\n double tv = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tv\").getDouble(0);\n double tx = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"tx\").getDouble(0);\n double ta = NetworkTableInstance.getDefault().getTable(\"limelight\").getEntry(\"ta\").getDouble(0);\n xError = tx;\n aError = (DESIRED_TARGET_AREA - ta);\n // SmartDashboard.putNumber(\"TA\", ta);\n // SmartDashboard.putNumber(\"TA Error\", aError);\n SmartDashboard.putNumber(\"TX Error\", xError);\n STEER_INTEGRAL = STEER_INTEGRAL + (xError*0.02);\n DRIVE_INTEGRAL = DRIVE_INTEGRAL + (aError * 0.02);\n STEER_DERIVATIVE = (xError - STEER_ERROR_PRIOR)/0.02;\n SmartDashboard.putNumber(\"Integral\", STEER_INTEGRAL);\n SmartDashboard.putNumber(\"Derivative\", STEER_DERIVATIVE);\n SmartDashboard.putNumber(\"TA\", ta);\n\n\n if (tv < 1.0) {\n m_LimelightHasValidTarget = false;\n drive_cmd = 0.0;\n steer_cmd = 0.0;\n } else {\n m_LimelightHasValidTarget = true;\n // Start with proportional steering\n steer_cmd = (xError * STEER_P) + (STEER_INTEGRAL * STEER_I) + (STEER_DERIVATIVE * STEER_D);\n\n // try to drive forward until the target area reaches our desired area\n drive_cmd = (aError * DRIVE_P) + (DRIVE_INTEGRAL * DRIVE_I);\n // don't let the robot drive too fast into the goal\n if (drive_cmd > MAX_DRIVE){\n drive_cmd = MAX_DRIVE;\n }\n }\n\n Robot.driveTrain.setLeftMotors(-drive_cmd - steer_cmd);\n Robot.driveTrain.setRightMotors(-drive_cmd + steer_cmd);\n\n STEER_ERROR_PRIOR = xError;\n\n }", "@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "@Override\n public ControllerViewEvent getTargetEffectTwo() {\n ArrayList<Square> possibleTargets = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquarePlayers().isEmpty())\n possibleTargets.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTargets), Encoder.encodeSquareTargetsY(possibleTargets));\n }", "@Test\r\n\tpublic void testTargetsTwoSteps() {\r\n\t\tboard.calcTargets(10, 1, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 0)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\t\r\n\t\tboard.calcTargets(17, 13, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 14)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(16, 14)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(16, 12)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(15, 13)));\r\n\t}", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public Vector getTargets(){\n return targets;\n }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "public void skystonePos1() {\n // This method will drive the robot to Skystone Position 1 (Closest to the bridge)\n // Blinked in: Change color SOLID BLUE to indicate we successfully Drove to the stone\n }", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "@Test\n\tpublic void testTargetsOneStep() {\n\t\tboard.calcTargets(7, 6, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(7, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 5)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(6, 6)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(8, 6)));\t\n\n\n\t\tboard.calcTargets(14, 24, 1);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(2, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(15, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(14, 23)));\t\t\t\n\t}", "public void loop(){\n\n test1.setPower(1);\n test1.setTargetPosition(150);\n\n\n }", "int getTargetPos();", "private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }", "public void ExecuteAction()\n {\n ActionTarget oTarget = mVecTargets.get( 0 );\n\n // Check if attack lands: compute chance of hitting the target\n if ( RandomGenerator.GetInstance().GetRandom( 1, 100 ) <=\n mSourceUnit.GetHitChance( oTarget.mCell.GetUnit() ) )\n {\n // Get the attack information from the attacking unit\n double dFinalDamage = Math.max(\n 1,\n mSourceUnit.GetUnit().GetResultingAttributes().GetStrength() -\n oTarget.mCell.GetUnit().GetUnit().GetResultingAttributes().GetPhysicalDef() );\n\n // Check critical chance\n if ( RandomGenerator.GetInstance().GetRandom( 1, 100 ) <=\n mSourceUnit.GetCritChance() )\n {\n dFinalDamage *= 1.5;\n oTarget.mActionStatus = ActionStatus.STATUS_CRITICAL;\n }\n else\n {\n oTarget.mActionStatus = ActionStatus.STATUS_SUCCESS;\n }\n\n // Add random portion to damage (10% of base damage)\n dFinalDamage = RandomGenerator.GetInstance().GetRandom(\n dFinalDamage - ( dFinalDamage / 10 ),\n dFinalDamage + ( dFinalDamage / 10 ) );\n mDamage = oTarget.mCell.GetUnit().ApplyDamage( dFinalDamage );\n\n // Add Slow status to target\n oTarget.mCell.GetUnit().SetStatus( new UnitStatusSlow(\n SLOW_TURN_DURATION,\n oTarget.mCell.GetUnit(),\n SLOW_PERCENTAGE ) );\n\n }\n else\n {\n mDamage = 0;\n oTarget.mActionStatus = ActionStatus.STATUS_MISS;\n }\n\n NotifyActionUpdate();\n ResetAttackArray();\n mSourceUnit.SetActionPerformed();\n }", "@Test\n\tpublic void testTargetsTwoSteps() {\n\t\tboard.calcTargets(7, 6, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(5, 6)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 5)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 5)));\n\t\tassertTrue(targets.contains(board.getCellAt(9, 6)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 4)));\n\t\tboard.calcTargets(14, 24, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t\ttarget = pointEntity(caster,50);\r\n\t\tif (target == null) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trefund = true;\r\n\t\t\tdead = true;\r\n\t\t\tif (refined)\r\n\t\t\t\tsteprange = 240;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_DEACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_ACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tdist = target.getLocation().distance(caster.getLocation());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public Living getTarget();", "private void targetLostResponse(){\n\t\tswitch(state){\r\n\t\tcase(PURSUIT):\r\n\t\t\tstate=HUNTING;\r\n\t\t\tTile[] targetChoices=adjacentUnseenTiles(level(),targetTile);\r\n\t\t\tif(targetChoices[0]==null)\r\n\t\t\t\tstate=IDLE;\r\n\t\t\ttargetLostResponse();\r\n\t\t\tbreak;\r\n\t\tcase(HUNTING):\t//TODO: after reaching target tile, guess a new target tile, up to a point. (define what that point is) Eventually resume wandering.\r\n\t\t\tif(targetTile!=null){\r\n\t\t\t\tif(!targetTile.equalTo(monster.currentTile)){\r\n\t\t\t\t\tsaveMove();\r\n\t\t\t\t\tmonster.moveTowards(targetTile);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//if(!monster.currentTile.equalTo(plannedPath[0]))\r\n\t\t\t\t\t//\tmonster.moveTowards(plannedPath[0]);\r\n\t\t\t\t\tstate=IDLE;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstate=IDLE;\r\n\t\t\t\ttargetLostResponse();\r\n\t\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase(IDLE):\r\n\t\t\twander();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void manageTestTarget(){ \n if(labelArray[TEST_TARGET_LOCATION].getIcon()==iconSet.getGrayIcon()){\n labelArray[TEST_TARGET_LOCATION].setIcon(iconSet.getTestTargetIcon());\n System.out.println(\"Test Start\");\n } \n else{\n testTargetDelay++;\n System.out.println(\"DELAY:\" + testTargetDelay);\n }\n }", "@Test\n void testTrackBallYMax(){\n goalie.TrackBallSetDirection(new Vector(45,450),new Vector(-0.5f,0.5f));\n // test if goalie direction is positive\n assertEquals(1,goalie.getNext_direction().getY());\n }", "private void move (Point3D target){\n double xPos = drone.getTranslateX();\n double yPos = drone.getTranslateY();\n double zPos = drone.getTranslateZ();\n Point3D from = new Point3D(xPos, yPos, zPos); // get p1\n Point3D to = target;\n Duration duration = Duration.seconds(calculateDistance(from, to) / getSpeed());\n animate(createMoveAnimation(to, duration));\n\n }", "public void setShotsOnTarget (int shotsOnTarget) {\r\n\t\tthis.shotsOnTarget = shotsOnTarget;\r\n\t}", "public void goToSprite(Sprite target) { \n goToXY(target.pos.x,target.pos.y);\n }", "protected void targetClosestPlanet ()\r\n {\r\n double closestTargetDistance = getWorld().getWidth();\r\n double distanceToActor;\r\n\r\n // search the whole World for planets\r\n planets = (ArrayList)getWorld().getObjects(TargetPlanet.class);\r\n\r\n if (planets.size() > 0)\r\n {\r\n // Loop through the objects in the ArrayList to find the closest target\r\n for (TargetPlanet o : planets)\r\n {\r\n // Cast for use in generic method\r\n Actor a = (Actor) o;\r\n\r\n //if looking for nearest planet OR nearest unconquered planet and current planet is not on the same team\r\n if(findNearestPlanet || (!findNearestPlanet && !sameTeamCheck(o.getState())))\r\n {\r\n // Measure distance from me\r\n distanceToActor = SpaceWorld.getDistance(this, a);\r\n\r\n // if target planet closer than current target is found, target will change\r\n if (distanceToActor < closestTargetDistance)\r\n {\r\n planet = o;\r\n closestTargetDistance = distanceToActor;\r\n }\r\n }\r\n }\r\n }\r\n }", "public double castFireball(){\n this.mana -= fireball.manaCost;\n return fireball.hit();\n }", "public Target()\n\t{\n\t\tx = 2.0;\n\t\ty = 2.0;\n\t\tangle = 0.0;\n\t\tdistance = 0.0;\n\t\tnullTarget=true;\n\t}", "public void throwAt(Player target);", "@Test\n void testTrackBallYMin() {\n goalie.TrackBallSetDirection(new Vector(45,187), new Vector(-0.5f,0.5f));\n // test if goalie direction is negative\n assertEquals(-1, goalie.getNext_direction().getY());\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic double getTargetHeight(Target t) {\n \tdouble h = 0;\n \tdouble T = 0, B = 0;\n\t\tArrayList<Integer> YLocal;\n\t\tArrayList<Integer> XLocal;\n\t\tArrayList<Integer> heightLocal;\n\t\tsynchronized(YLock){\n\t\t\tYLocal = (ArrayList<Integer>) Y.clone();\n\t\t}\n\t\t\n\t\tsynchronized(XLock){\n\t\t\tXLocal = (ArrayList<Integer>) X.clone();\n\t\t}\n\t\t\n\t\tsynchronized(heightLock){\n\t\t\theightLocal = (ArrayList<Integer>) Y.clone();\n\t\t}\n\t\t\n \tif (targets.length > 1) {\n \t\tfor (int i = 0; i < targets.length; i++) {\n \t\t\tswitch (t) {\n \t\t\tcase Boiler:\n \t\t\t\t//TODO: Fix this stuff\n \t\t\t\tbreak;\n \t\t\tcase Gear:\n \t\t\t\tif (Math.abs(XLocal.get(i) - XLocal.get(i+1)) <= 5) {\n \t\t\t\t\tT = (YLocal.get(targets[i]) + heightLocal.get(targets[i]) / 2);\n \t\t\t\t\tB = (YLocal.get(targets[i+1]) + heightLocal.get(targets[i+1]) / 2);\n \t\t\t\t} else if (Math.abs(XLocal.get(i+1) - XLocal.get(i+2)) <= 5) {\n \t\t\t\t\tT = (YLocal.get(targets[i]) + heightLocal.get(targets[i]) / 2);\n \t\t\t\t\tB = (YLocal.get(targets[i]) + heightLocal.get(targets[i]) / 2);\n \t\t\t\t} else {\n \t\t\t\t\treturn heightLocal.get(i);\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t}\n \t\t}\n \t}\n \th = T - B;\n\t\treturn h;\n }", "@Override\n public void run(Game game, Map<String, List<Targetable>> targets) {\n\n }", "public void setTargetSpd(float targetSpd)\n\t{\n\t\tthis.targetSpd = targetSpd;\n\t}", "public void launchBall() {\n\n\t\tint contBlue = 0, contRed = 0, red = 0, blue = 0, maxScore = 0;\n\t\t// You can modify this value to play more matches (Important: Odd/Uneven value)\n\t\tint bestOf = 5;\n\n\t\tfor (int i = 0; i < bestOf; i++) {\n\n\t\t\tSystem.out.println(\"Red team launch\");\n\t\t\tred = (int) (Math.random() * (200 - 0));\n\t\t\tSystem.out.println(red);\n\t\t\tmaxScore = (red > maxScore) ? red : maxScore;\n\n\t\t\tSystem.out.println(\"Blue team launch\");\n\t\t\tblue = (int) (Math.random() * (200 - 0));\n\t\t\tSystem.out.println(blue);\n\t\t\t// Find the highest score between bluePoints and redPoints\n\t\t\tmaxScore = (blue > maxScore) ? blue : maxScore;\n\t\t\t// Count which team has more score than the other one\n\t\t\tif (red > blue)\n\n\t\t\t\tcontRed++;\n\n\t\t\telse\n\n\t\t\t\tcontBlue++;\n\n\t\t}\n\t\tint option;\n\t\t// Try: Throw error if you introduce a String or Char instead Integer\n\t\ttry {\n\t\t\tdo {\n\t\t\t\tSystem.out.println(\"What ratio was the highest score? (1.0-50/2.50-100/3.100-150/4.150-200)\");\n\t\t\t\toption = scanner.nextInt();\n\t\t\t\t// Minigame to hit the ratio of highest score\n\t\t\t\tswitch (option) {\n\n\t\t\t\tcase 1: {\n\n\t\t\t\t\tif (maxScore >= 0 && maxScore < 50)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase 2: {\n\t\t\t\t\tif (maxScore >= 50 && maxScore < 100)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t\tcase 3: {\n\t\t\t\t\tif (maxScore >= 100 && maxScore < 150)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tcase 4: {\n\t\t\t\t\tif (maxScore >= 150 && maxScore <= 200)\n\t\t\t\t\t\tSystem.out.println(\"You win, the highest score is: \" + maxScore);\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.println(\"Sorry, that's not the highest score\");\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\n\t\t\t\tdefault:\n\n\t\t\t\t\tSystem.err.println(\"Insert valid value\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} while (option > 4 || option < 1);\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Please, insert an Intenger value\");\n\t\t\tscanner.next();\n\t\t}\n\t\tSystem.out.println(\"The highest score was \" + maxScore);\n\n\t\tSystem.out.println(\"The match is over Blue: \" + contBlue + \" wins, y Red: \" + contRed + \" wins\");\n\t\t// Show which team won\n\t\tif (contRed > contBlue) {\n\n\t\t\tSystem.out.println(\"Red wins\");\n\t\t\tthis.redWins = contRed;\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"Blue wins\");\n\t\t\tthis.blueWins = contBlue;\n\n\t\t}\n\t}", "public ArrayList<Target> getAlienPlaces(BlipModel model)\r\n/* 434: */ {\r\n/* 435:515 */ int angle = (int)model.getAngle();\r\n/* 436:516 */ float x = model.getX() - 0.5F;\r\n/* 437:517 */ float y = model.getY() - 0.5F;\r\n/* 438: */ \r\n/* 439:519 */ ArrayList<Target> targets = new ArrayList();\r\n/* 440:521 */ if (checkAlienPlacementTile(x, y)) {\r\n/* 441:523 */ targets.add(new Target(x, y));\r\n/* 442: */ }\r\n/* 443:525 */ if (checkAlienPlacementTile(x, y + 1.0F)) {\r\n/* 444:527 */ targets.add(new Target(x, y + 1.0F));\r\n/* 445: */ }\r\n/* 446:529 */ if (checkAlienPlacementTile(x, y - 1.0F)) {\r\n/* 447:531 */ targets.add(new Target(x, y - 1.0F));\r\n/* 448: */ }\r\n/* 449:533 */ if (checkAlienPlacementTile(x + 1.0F, y)) {\r\n/* 450:535 */ targets.add(new Target(x + 1.0F, y));\r\n/* 451: */ }\r\n/* 452:537 */ if (checkAlienPlacementTile(x - 1.0F, y)) {\r\n/* 453:539 */ targets.add(new Target(x - 1.0F, y));\r\n/* 454: */ }\r\n/* 455:541 */ if (checkAlienPlacementTile(x + 1.0F, y + 1.0F)) {\r\n/* 456:543 */ targets.add(new Target(x + 1.0F, y + 1.0F));\r\n/* 457: */ }\r\n/* 458:545 */ if (checkAlienPlacementTile(x - 1.0F, y + 1.0F)) {\r\n/* 459:547 */ targets.add(new Target(x - 1.0F, y + 1.0F));\r\n/* 460: */ }\r\n/* 461:549 */ if (checkAlienPlacementTile(x + 1.0F, y - 1.0F)) {\r\n/* 462:551 */ targets.add(new Target(x + 1.0F, y - 1.0F));\r\n/* 463: */ }\r\n/* 464:553 */ if (checkAlienPlacementTile(x - 1.0F, y - 1.0F)) {\r\n/* 465:555 */ targets.add(new Target(x - 1.0F, y - 1.0F));\r\n/* 466: */ }\r\n/* 467:558 */ return targets;\r\n/* 468: */ }", "public void setTarget(double x, double y) {\n\t\tkin.target = new Vector2d(x, y);\n\t}", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "public void movement()\n\t{\n\t\tballoonY = balloonY + speedBalloonY1;\n\t\tif(balloonY > 700)\n\t\t{\n\t\t\tballoonY = -50;\n\t\t\tballoonX = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon2Y = balloon2Y + speedBalloonY2;\n\t\tif(balloon2Y > 700)\n\t\t{\n\t\t\tballoon2Y = -50;\n\t\t\tballoon2X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon3Y = balloon3Y + speedBalloonY3;\n\t\tif(balloon3Y > 700)\n\t\t{\n\t\t\tballoon3Y = -50;\n\t\t\tballoon3X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon4Y = balloon4Y + speedBalloonY4;\n\t\tif(balloon4Y > 700)\n\t\t{\n\t\t\tballoon4Y = -50;\n\t\t\tballoon4X = (gen.nextInt(900)-75);\n\t\t}\n\t\t\n\t\tballoon5Y = balloon5Y + speedBalloonY5;\n\t\tif(balloon5Y > 700)\n\t\t{\n\t\t\tballoon5Y = -50;\n\t\t\tballoon5X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "protected boolean findTarget(){\n\t\t// shoot units\n\t\tfloat tmpDist = -1;\n\t\tUnit tmpUnit = null;\n\t\tfor(Unit u:Game.map.get(tileId).unitMap){ // loop through units on\n\t\t\t\t\t\t\t\t\t\t\t\t\t// maptile\n\t\t\tif(this.id == u.id)\n\t\t\t\tcontinue;\n\t\t\tif(this.ownerId == u.ownerId)\n\t\t\t\tcontinue;\n\t\t\tif(u.dead)\n\t\t\t\tcontinue;\n\t\t\tVector3f tmp = Vector3f.sub(this.modelPos, u.modelPos, null);\n\t\t\tif(tmpDist == -1 || tmp.length() < tmpDist){\n\t\t\t\ttmpUnit = u;\n\t\t\t\ttmpDist = tmp.length();\n\t\t\t}else\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(tmpDist != -1 && tmpDist <= range && tmpUnit != null){\n\t\t\tthis.hostile = tmpUnit;\n\t\t\tthis.target = this.hostile.modelPos;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void timerAction(){\n \n timerEnd();\n \n if (timerCounter == TEST_TARGET_APPERANCE + testTargetDelay){\n manageTestTarget();\n }\n \n if (timerCounter == TEST_TARGET_DISAPPERANCE + testTargetDelay){\n labelArray[TEST_TARGET_LOCATION].setIcon(iconSet.getGrayIcon());\n //System.out.println(\"Test End\");\n }\n //creates clickable red target in random, non occupied location\n //and handles removal of unclicked, expired targets\n int randRedTarget = generator.nextInt(100);\n while(labelArray[randRedTarget].getIcon()!=iconSet.getGrayIcon()){\n //System.out.println(\"Already a target in place\");\n randRedTarget = generator.nextInt(100);\n }\n labelArray[randRedTarget].setIcon(iconSet.getRedTargetIcon());\n \n if (timerCounter<ACTIVE_RED_TARGET_TOTAL){\n activeRedTarget[timerCounter] = randRedTarget;\n }\n \n if (timerCounter>=ACTIVE_RED_TARGET_TOTAL){\n if(labelArray[activeRedTarget[0]].getIcon()!=iconSet.getGrayIcon()){\n labelArray[activeRedTarget[0]].setIcon(iconSet.getGrayIcon());\n }\n for(int i = 0; i < activeRedTarget.length-1; i++){\n activeRedTarget[i] = activeRedTarget[i+1];\n }\n activeRedTarget[ACTIVE_RED_TARGET_TOTAL-1] = randRedTarget;\n }\n\n if (timerCounter%4==0){\n manageBlueTargets();\n }\n \n timerCounter++;\n \n if (timerCounter%4==0){\n manageGreenTargets();\n }\n \n System.out.println(\"Timer: \" + timerCounter); \n }", "public Balloon acquireTarget() {\r\n\r\n\t\tBalloon closest = null;\r\n\t\tfloat closestDistance = 1000;\r\n\t\tif (balloons != null) {\r\n\t\t\tfor (Balloon balloons : balloons) {\r\n\t\t\t\tif (isInRange(balloons) && findDistance(balloons) < closestDistance && balloons.getHiddenHealth() > 0) {\r\n\t\t\t\t\tclosestDistance = findDistance(balloons);\r\n\t\t\t\t\tclosest = balloons;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (closest != null) {\r\n\t\t\t\ttargeted = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\r\n\t}", "public void swarm(double targetX, double targetY){\n double distance = getDistance(x,targetX,y,targetY);\n double xScale = (targetX - x)/distance;\n double yScale = (targetY - y)/distance;\n\n dx = xScale * speed;\n dy = yScale * speed;\n\n }", "Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);", "@Test\n\tpublic void testTargetsFourSteps() {\n\t\tboard.calcTargets(14, 24, 4);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 20)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 23)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t}", "public void basicMode (ColorId colorPlayerTarget , String squareCoordinatesAsStringPlayertoMove, String squareCoordinatesAsStringTargetToMove, boolean withFragWar)\n {\n boolean rememberToMoveTarget = false;\n\n int xPlayer = 0;\n int yPlayer = 0;\n\n int xTarget = 0;\n int yTarget = 0;\n\n\n // if the strings are not null it means i have to move the player and/or the target. I extract the coordinates to use later\n if (squareCoordinatesAsStringPlayertoMove != null)\n {\n xPlayer = MethodsWeapons.getXFromString(squareCoordinatesAsStringPlayertoMove);\n yPlayer = MethodsWeapons.getYFromString(squareCoordinatesAsStringPlayertoMove);\n }\n\n if (squareCoordinatesAsStringTargetToMove != null)\n {\n xTarget = MethodsWeapons.getXFromString(squareCoordinatesAsStringTargetToMove);\n yTarget = MethodsWeapons.getXFromString(squareCoordinatesAsStringTargetToMove);\n }\n\n\n //I will damage the target\n if(this.player.getSquare().getGameBoard().isTerminatorMode() && colorPlayerTarget.equals(ColorId.PURPLE))\n doDamage(player.getSquare().getGameBoard().getTermi(),2);\n else\n doDamage(player.getSquare().getGameBoard().getAllPlayer().stream().filter(player1 -> player1.getColor().equals(colorPlayerTarget)).collect(Collectors.toList()).get(0),2);\n\n // I set a flag to remeber to move the target later. I'' doing this beacuse the fragmenting grenade will damage all the targets before to move the target of the basic mode\n if (squareCoordinatesAsStringTargetToMove != null)\n rememberToMoveTarget = true;\n\n //If this flag is true i will damage all the targets in the original square\n if (withFragWar)\n for (Player playerIterate : player.getSquare().getGameBoard().getAllPlayer().stream().filter(player1 -> player1.getColor().equals(colorPlayerTarget)).collect(Collectors.toList()).get(0).getSquare().getPlayerList())\n {\n if(this.player.getSquare().getGameBoard().isTerminatorMode() && playerIterate.getColor().equals(ColorId.PURPLE))\n doDamage(player.getSquare().getGameBoard().getTermi(),1);\n else\n doDamage(playerIterate, 1);\n\n this.player.setAmmoYellow(this.player.getAmmoYellow() - 1);\n }\n\n //i will move the owner of the weapon if he decided to (so the string is not null)\n if (squareCoordinatesAsStringPlayertoMove != null)\n {\n moveTarget(this.player, xPlayer, yPlayer);\n player.setAmmoBlue(this.player.getAmmoBlue() - 1);\n }\n\n //if the flag is true i will finally move the target to another square at distance 1 that the shooter chose\n if (rememberToMoveTarget)\n {\n if(this.player.getSquare().getGameBoard().isTerminatorMode() && colorPlayerTarget.equals(ColorId.PURPLE))\n moveTarget(player.getSquare().getGameBoard().getTermi(), xTarget, yTarget);\n else\n moveTarget(player.getSquare().getGameBoard().getAllPlayer().stream().filter(player1 -> player1.getColor().equals(colorPlayerTarget)).collect(Collectors.toList()).get(0), xTarget, yTarget);\n }\n\n this.isLoaded = false;\n\n }", "public void toSelectingAttackTarget() {\n }", "@Test\n public void alienAttacksMultipleTargets() throws FileNotFoundException,\n URISyntaxException, DisconnectedException {\n // preparo il terreno\n MatchController matchController = new MatchController() {\n @Override\n public void initMatch(PartyController partyController)\n throws FileNotFoundException, URISyntaxException {\n this.partyController = partyController;\n this.match = new Match();\n this.turnController = new TurnController(this);\n ZoneFactory zf = new TemplateZoneFactory(\n EftaiosGame.DEFAULT_MAP);\n this.zoneController = new ZoneController(zf);\n\n }\n\n @Override\n public void checkEndGame() {\n }\n\n @Override\n protected void notifyAPlayerAbout(Player player, String about) {\n }\n\n @Override\n protected void showCardToParty(Card card) {\n }\n\n @Override\n protected void updateDeckView(Player player) {\n }\n\n @Override\n protected void sendMapVariationToPlayer(Player player, Sector sec,\n SectorHighlight highlight) {\n }\n\n @Override\n protected void sendViewModelToAPlayer(Player p, ViewModel content) {\n }\n };\n\n PlayerCard alien = new PlayerCard(PlayerRace.ALIEN, null);\n PlayerCard human = new PlayerCard(PlayerRace.HUMAN, null);\n Party party = new Party(\"test\", new EftaiosGame(), false);\n PartyController partyController = PartyController.createNewParty(party);\n party.addToParty(UUID.randomUUID(), \"player1\");\n party.addToParty(UUID.randomUUID(), \"player2\");\n party.addToParty(UUID.randomUUID(), \"player3\");\n party.addToParty(UUID.randomUUID(), \"player4\");\n party.addToParty(UUID.randomUUID(), \"player5\");\n party.addToParty(UUID.randomUUID(), \"player6\");\n List<Player> players = new ArrayList<Player>(party.getMembers()\n .keySet());\n Player player1 = players.get(0);\n Player player2 = players.get(1);\n Player player3 = players.get(2);\n Player player4 = players.get(3);\n Player player5 = players.get(4);\n Player player6 = players.get(5);\n player1.setIdentity(alien);// attaccante\n player2.setIdentity(alien);// alieno in loco\n player3.setIdentity(alien);// alieno difeso\n player4.setIdentity(human);// umano indifeso\n player5.setIdentity(human);// umano altrove\n player6.setIdentity(human);// umano difeso\n ItemCard defenseCard1 = new ItemCard(Item.DEFENSE);\n ItemCard defenseCard2 = new ItemCard(Item.DEFENSE);\n ItemCard spotlightCard = new ItemCard(Item.SPOTLIGHT);\n ItemCard card2 = new ItemCard(Item.SEDATIVES);\n ItemCard card3 = new ItemCard(Item.ATTACK);\n player3.getItemsDeck().getCards().add(defenseCard1);\n player4.getItemsDeck().getCards().add(spotlightCard);\n player4.getItemsDeck().getCards().add(card2);\n player4.getItemsDeck().getCards().add(card3);\n player6.getItemsDeck().getCards().add(defenseCard2);\n\n matchController.initMatch(partyController);\n\n Turn turn = new Turn(player1, matchController.getMatch().getTurnCount());\n matchController.getTurnController().setTurn(turn);\n matchController.getTurnController().getTurn().setMustMove(false);\n HexPoint point = HexPoint.fromOffset(1, 1);\n Sector sec = new Sector(null, point);\n HexPoint point2 = HexPoint.fromOffset(2, 3);\n Sector sec2 = new Sector(null, point2);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player1, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player2, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player3, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player4, sec);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player5, sec2);\n matchController.getZoneController().getCurrentZone()\n .movePlayer(player6, sec);\n matchController.getTurnController().getTurn().setCanAttack(true);\n ActionRequest action = new ActionRequest(ActionType.ATTACK, null, null);\n // eseguo l'azione\n Attack atk = new Attack() {\n @Override\n protected void notifyInChatByCurrentPlayer(String what) {\n }\n\n @Override\n protected void notifyCurrentPlayerByServer(String what) {\n }\n };\n atk.initAction(matchController, action);\n if (atk.isValid())\n atk.processAction();\n // verifico gli esiti\n assertTrue(player1.getKillsCount() == 1);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player1).equals(sec));\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player2) == matchController.endingSector);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player3) == matchController.endingSector);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player4) == matchController.endingSector);\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player5).equals(sec2));\n assertTrue(matchController.getZoneController().getCurrentZone()\n .getCell(player6).equals(sec));\n assertFalse(matchController.getMatch().getDeadPlayer()\n .contains(player1));\n assertTrue(matchController.getMatch().getDeadPlayer().contains(player2));\n assertTrue(matchController.getMatch().getDeadPlayer().contains(player3));\n assertTrue(matchController.getMatch().getDeadPlayer().contains(player4));\n assertFalse(matchController.getMatch().getDeadPlayer()\n .contains(player5));\n assertFalse(matchController.getMatch().getDeadPlayer()\n .contains(player6));\n assertTrue(matchController.getMatch().getDeadPlayer().size() == 3);\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(defenseCard1));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(defenseCard2));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(spotlightCard));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(card2));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket()\n .contains(card3));\n assertTrue(matchController.getMatch().getItemsDeck().getBucket().size() == 5);\n assertFalse(player3.getItemsDeck().getCards().contains(defenseCard1));\n assertFalse(player4.getItemsDeck().getCards().contains(spotlightCard));\n assertFalse(player4.getItemsDeck().getCards().contains(card2));\n assertFalse(player4.getItemsDeck().getCards().contains(card3));\n assertFalse(player6.getItemsDeck().getCards().contains(defenseCard2));\n }", "private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void attack(Creature target) {\r\n\t\t//Check if attacker is within 1 tile\r\n\t\tint destx = (int) (target.getXlocation()/Tile.TILEWIDTH);\r\n\t\tint desty = (int) (target.getYlocation()/Tile.TILEHEIGHT);\r\n\t\tVector2i start = new Vector2i((int) (creature.getXlocation() / Tile.TILEWIDTH), (int) (creature.getYlocation()/ Tile.TILEHEIGHT));\r\n\t\t//FIND SHORTEST DISTANCE\r\n\t\tVector2i destination = null; \t\t\r\n\t\tdouble shortest = 100000; \t\t\t\t\t\t\t\t\t\t //Set huge\r\n\t\tbyte Direction = 2;\t\t\t\t\t\t\t\t\t\t\t\t //default Look DOWN\r\n\t\tdouble temp = getDistance(start, new Vector2i(destx+1, desty)); //Check first\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx+1, desty).isSolid() && !checkCollision(destx+1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx+1, desty);\r\n\t\t\tDirection = 1;\t\t\t\t\t\t\t\t\t\t\t\t //Look LEFT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx-1, desty)); \t\t //Check second\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx-1, desty).isSolid() && !checkCollision(destx-1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx-1, desty);\r\n\t\t\tDirection = 3;\t\t\t\t\t\t\t\t\t\t\t\t //Look RIGHT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty+1)); \t\t //Check third\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty+1).isSolid() && !checkCollision(destx, desty+1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty+1);\r\n\t\t\tDirection = 0;\t\t\t\t\t\t\t\t\t\t\t\t //Look UP\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty-1)); \t\t //Check fourth\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty-1).isSolid() && !checkCollision(destx, desty-1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty-1);\r\n\t\t\tDirection = 2;\t\t\t\t\t\t\t\t\t\t\t\t //Look DOWN\r\n\t\t}\r\n\t\t//SET PATH FOR SHORTEST DISTANCE\r\n\t\tList<Node> path = pf.findPath(start, destination);\r\n\t\t//FOLLOW SHORTEST DISTANCE PATH\r\n\t\tfollowPath(path);\r\n\t\t//IF ATTACKER HAS ARRIVED\r\n\t\tif (creature.getxMove() == 0 && creature.getyMove() == 0) {\r\n\t\t\t//face target -> \r\n\t\t\tcreature.setLastDirection(Direction);\r\n\t\t\t//attack\r\n\t\t\tcreature.setAttacking(true);\r\n\t\t} else {\r\n\t\t\tcreature.setAttacking(false);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setScatterTarget(){\n\t\tthis.setTarget(22*Constants.SQUARE_SIDE,0); \n\t}", "public void setTargetPos(final int target) {\n \n switch(target){\n // Set target position right from current position\n case T_RIGHT:\n if(this.columnT < this.buffer.get(lineT).size()) // Check if position exists\n this.columnT++;\n break;\n // Set target position left from current position\n case T_LEFT:\n if(this.columnT > 0) // Check if position exists\n this.columnT--;\n break;\n // Set target position up from current position\n case T_UP:\n if(this.lineT > 0) { // Check if position exists\n this.lineT--;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position down from current position\n case T_DOWN:\n if(this.lineT < this.buffer.size() - 1) { // Check if position exists\n this.lineT++;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position to first position\n case T_HOME:\n this.columnT = 0;\n break;\n // Set target position to last position\n case T_END:\n this.columnT = this.buffer.get(lineT).size();\n break;\n default:\n System.out.println(\"Invalid target position\");\n break;\n }\n }", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "public void movement2()\n\t{\n\t\tballoon6Y = balloon6Y + speedBalloonY1;\n\t\tif(balloon6Y > 700)\n\t\t{\n\t\t\tballoon6Y = -100;\n\t\t\tballoon6X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon7Y = balloon7Y + speedBalloonY2;\n\t\tif(balloon7Y > 700)\n\t\t{\n\t\t\tballoon7Y = -100;\n\t\t\tballoon7X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon8Y = balloon8Y + speedBalloonY3;\n\t\tif(balloon8Y > 700)\n\t\t{\n\t\t\tballoon8Y = -100;\n\t\t\tballoon8X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon9Y = balloon9Y + speedBalloonY4;\n\t\tif(balloon9Y > 700)\n\t\t{\n\t\t\tballoon9Y = -100;\n\t\t\tballoon9X = (gen.nextInt(900)-75);\n\t\t}\n\t\tballoon10Y = balloon10Y + speedBalloonY5;\n\t\tif(balloon10Y > 700)\n\t\t{\n\t\t\tballoon10Y = -100;\n\t\t\tballoon10X = (gen.nextInt(900)-75);\n\t\t}\n\t}", "public void runPuzzleMovement( Screw screw, float screwVal, Platform p );", "public void setTargetY(double y) {\r\n\t\ttargetY = y;\r\n\t}", "protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}", "public static void target() {\n Scanner escaner = new Scanner(System.in);\n Random aleatorio = new Random();\n int cantidadParticipantesTarget;\n int decisionTiro;\n int probabilidadesTiro;\n int[] punteosParticipantesTarget = new int[4];\n String[] nombresParticipantesTarget = new String[4];\n boolean decisionNumeroParticipantes;\n\n do {\n System.out.println(\"Bienvenido al juego de Target\");\n System.out.println(\"El juego consiste en tiros hacia un tablero de 5 zonas\");\n System.out.println(\"Zonas: 0,10,20,30,40 puntos respectivamente\");\n System.out.println(\"El juego se basa en probabilidades y la descripciones del tiro\");\n System.out.println(\"Puedes elegir el tipo que creas mas conveniente para ganar\");\n System.out.println(\"Gana el primero a llegar a 200 puntos, y si ambos llegan al mismo tiempo ambos ganan\");\n System.out.println(\"Intenta jugarlo\");\n System.out.println(\" xxxxxxxxxxxxxxx \");\n System.out.println(\" x x \");\n System.out.println(\" xx xxxxxxxxxxxxx xx \");\n System.out.println(\" xxx x x xxx \");\n System.out.println(\" xxxx x xxxxxxxxx x xxxx \");\n System.out.println(\" xxxxx x x x x xxxxx \");\n System.out.println(\" xxxxx x x x x x xxxxx \");\n System.out.println(\" xxxxx x x x x xxxxx \");\n System.out.println(\" xxxx x xxxxxxxxx x xxxx \");\n System.out.println(\" xxx x x xxx \");\n System.out.println(\" xx xxxxxxxxxxxxx xx \");\n System.out.println(\" x x \");\n System.out.println(\" xxxxxxxxxxxxxxx \");\n System.out.println(\"Cuantos jugadores participaran? (minimo 1 persona, maximo 4 personas)\");\n cantidadParticipantesTarget = Integer.parseInt(escaner.nextLine());\n\n //Ciclo y condicion que nos permite saber si la cantidad de jugadores estan establecidas en el limite\n if ((cantidadParticipantesTarget > 0) && (cantidadParticipantesTarget < 5)) {\n decisionNumeroParticipantes = true;\n } else {\n System.out.println(\"Parece que has salido del rango de participantes admitidos, vuelve a ingresar\");\n decisionNumeroParticipantes = false;\n }\n\n } while (decisionNumeroParticipantes == false);\n\n System.out.println(\"\\n\\n\\n\\n\");\n //ingresamos los nombres y los asignamos a nuestra variable global, depende de cuantos jugadores esten jugando esa sera su magnitud\n for (int contador = 0; contador < cantidadParticipantesTarget; contador++) {\n System.out.println(\"Ingrese el Nombre del Jugador No.-\" + (contador + 1));\n nombresParticipantesTarget[contador] = asignarNombres();\n }\n System.out.println(\"\\n\\n\\n\\n\");\n\n decisionNumeroParticipantes = true;\n\n//Ciclo que empieza el juego en General, no terminara hasta que decisionNumeroParticipantes = false\n while (decisionNumeroParticipantes == true) {\n\n //Este for nos indica los turnos de los participantes, con magnitud de cantidadParticipantesTarget que son los participantes establecidos\n for (int turno = 0; turno < cantidadParticipantesTarget; turno++) {\n System.out.println(\"\\n\\nTURNO DE \" + nombresParticipantesTarget[turno]);\n System.out.println(\"Tipo de Tiro Descripcion Resultado del Tiro\");\n System.out.println(\"(Ingresa el valor mostrado) \\n\");\n System.out.println(\" 1 Rapido con el dardo arriba Al centro o fallo completo\");\n System.out.println(\" del brazo \");\n System.out.println(\" 2 Controlado con el dardo arriba En zonas de 10,20 o 30 puntos\");\n System.out.println(\" del brazo\");\n System.out.println(\" 3 Con el dardo bajo el brazo En cualquier zona incluyendo fallo completo\");\n decisionTiro = Integer.parseInt(escaner.nextLine());\n\n //decision del tipo de tiro segun la descripcion\n //para decidir estos tiros utilizamos la variable probabilidadesTiro para determinar el destino del tiro y lo asignamos segun cada caso\n switch (decisionTiro) {\n\n case 1:\n System.out.println(nombresParticipantesTarget[turno] + \" ha usado tipo de tiro 1\");\n probabilidadesTiro = aleatorio.nextInt(2) + 1;\n if (probabilidadesTiro == 1) {\n System.out.println(\"FUE TIRO AL CENTRO, PERFECTO!\");\n System.out.println(\"Obtienes 40 puntos\");\n punteosParticipantesTarget[turno] += 40;\n } else {\n System.out.println(\"OH NO!, HAS FALLADO POR COMPLETO EL TIRO\");\n System.out.println(\"Obtienes 0 puntos\");\n }\n\n break;\n\n case 2:\n probabilidadesTiro = aleatorio.nextInt(3) + 1;\n System.out.println(nombresParticipantesTarget[turno] + \" ha usado tipo de tiro 2\");\n\n switch (probabilidadesTiro) {\n case 1:\n System.out.println(\"HAS ACERTADO EN LA ZONA DE 10 PUNTOS, BIEN HECHO!\");\n punteosParticipantesTarget[turno] += 10;\n break;\n\n case 2:\n System.out.println(\"HAS ACERTADO EN LA ZONA DE 20 PUNTOS, MUY BIEN HECHO!\");\n punteosParticipantesTarget[turno] += 20;\n break;\n\n default:\n System.out.println(\"HAS ACERTADO EN LA ZONA DE 30 PUNTOS, GENIAL!\");\n punteosParticipantesTarget[turno] += 30;\n }\n break;\n\n default:\n System.out.println(nombresParticipantesTarget[turno] + \" ha usado tipo de tiro 3\");\n probabilidadesTiro = aleatorio.nextInt(5) + 1;\n\n switch (probabilidadesTiro) {\n case 1:\n System.out.println(\"FUE TIRO AL CENTRO, PERFECTO!\");\n System.out.println(\"Obtienes 40 puntos\");\n punteosParticipantesTarget[turno] += 40;\n break;\n\n case 2:\n System.out.println(\"HAS ACERTADO EN LA ZONA DE 30 PUNTOS, GENIAL!\");\n punteosParticipantesTarget[turno] += 30;\n break;\n\n case 3:\n System.out.println(\"HAS ACERTADO EN LA ZONA DE 20 PUNTOS, MUY BIEN HECHO!\");\n punteosParticipantesTarget[turno] += 20;\n break;\n\n case 4:\n System.out.println(\"HAS ACERTADO EN LA ZONA DE 10 PUNTOS, BIEN HECHO!\");\n punteosParticipantesTarget[turno] += 10;\n break;\n\n default:\n System.out.println(\"OH NO!, HAS FALLADO POR COMPLETO EL TIRO\");\n System.out.println(\"Obtienes 0 puntos\");\n }\n }\n }\n\n//Despues de cada turno mostramos la tabla de jugadores, el punteo que llevan , y su estado es decir si han ganado o no\n System.out.println(\"\\n\\n\");\n System.out.println(\" Jugador Punteo Estado\");\n for (int contador = 0; contador < cantidadParticipantesTarget; contador++) {\n System.out.print(nombresParticipantesTarget[contador] + \" \" + punteosParticipantesTarget[contador]);\n\n if (punteosParticipantesTarget[contador] >= 200) {\n System.out.println(\" HA GANADO\");\n decisionNumeroParticipantes = false;\n asignarPunteo(1, nombresParticipantesTarget[contador]);\n } else {\n System.out.println(\" NO HA GANADO\");\n }\n\n }\n escaner.nextLine();\n\n }\n\n System.out.println(\"FIN DEL JUEGO\");\n\n }", "public void target()\n {\n if(noRotation == false)\n {\n if(timer % 3 == 0)\n {\n int currentRotation = getRotation();\n turnTowards(xMouse, yMouse);\n int newRotation = getRotation();\n if (Math.abs(currentRotation-newRotation) > 180)\n {\n if (currentRotation < 180) currentRotation += 360;\n else newRotation += 360;\n }\n if(currentRotation != newRotation)\n { \n setRotation(currentRotation+direction()*8);\n }\n }\n }\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }", "TrgPlace getTarget();", "public void win()\r\n {\n Actor win;\r\n win=getOneObjectAtOffset(0,0,Goal.class);\r\n if (win !=null)\r\n {\r\n World myWorld=getWorld();\r\n Congrats cong=new Congrats();\r\n myWorld.addObject(cong,myWorld.getWidth()/2,myWorld.getHeight()/2); //(Greenfoot,2013) \r\n \r\n Greenfoot.stop();\r\n Greenfoot.playSound(\"finish.wav\"); //(Sound-Ideas,2014)\r\n \r\n }\r\n }", "public Spatial getTarget() {\r\n return target;\r\n }", "@Test\r\n\tpublic void testTargets22_2() {\r\n\t\tBoardCell cell = board.getCell(2, 2);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 3)));\r\n\r\n\t}", "public void pointToSprite(Sprite target) {\n pointToXY((int)target.pos.x,(int)target.pos.y);\n }", "@Override\n\tpublic int getScore(int target) {\n\t\tdouble d = toBound(target);\n\t\tif (d < 0 && d + height > 0){\n\t\t\treturn -50;\n\t\t} else {\n\t\t\treturn 5;\n\t\t}\n\t}", "public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }", "public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}", "public TurnToTarget() {\n forceDone = false;\n turnToTarget = new TurnToAngle(0);\n }", "private void wentOffWall() {\n //random location\n b.numX = r.nextInt(2400) + 100;\n b.numY = r.nextInt(1400) + 100;\n //random speed\n b.xSpeed = this.newSpeed();\n b.ySpeed = this.newSpeed();\n }", "public MapLocation getEnemySwarmTarget() {\n\t\tdouble a = Math.sqrt(vecEnemyX * vecEnemyX + vecEnemyY * vecEnemyY) + .001;\n\n\t\treturn new MapLocation((int) (vecEnemyX * 7 / a) + br.curLoc.x,\n\t\t\t\t(int) (vecEnemyY * 7 / a) + br.curLoc.y);\n\n\t}", "public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }", "public void updateMob(Vector3f target,float tpf) {\n //System.out.println(\"updateMob called with state = \" + this.state);\n switch(this.state) {\n case -1:\n //dead state\n this.handle.removeFromParent();\n this.mobControl.destroy();\n this.state = -2;\n break;\n case 0:\n //default state\n if(this.health < 0f) {\n this.changeState(-1);\n }\n Vector3f temp = target.subtract(this.handle.getLocalTranslation());\n \n this.mobControl.setWalkDirection(Vector3f.ZERO);\n this.setRootPos(this.mobControl.getPhysicsLocation());\n //System.out.println(\"id = \"+ this.id + \". State = 0 (STANDBY) - Dist \" + temp.length());\n if( temp.length() < 50) {\n this.initSeekBehavior();\n }\n break;\n case 1:\n //run seek behavior\n Vector3f temp2 = target.subtract(this.handle.getLocalTranslation());\n //System.out.println(\"id = \"+ this.id + \". State = 1 (SEEK) - Dist \" + temp2.length());\n if( temp2.length() < 70) {\n this.updateSeekBehavior(target, tpf);\n } else {\n this.changeState(0);\n } \n break;\n case 2:\n //melee attack\n }\n }", "@Test\r\n\tpublic void testTargets33_1() {\r\n\t\tBoardCell cell = board.getCell(3, 3);\r\n\t\tboard.calcTargets(cell, 1);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 2)));\r\n\r\n\t}", "public void setHoodTargetAngle(double target){\r\n\t\thoodTarget = target;\r\n\t}", "public void jump()\r\n\t{\t\r\n\t\t//que pasa si morimos:\r\n\t\tif (gameOver)\r\n\t\t{\t//si morirmos repintamos el pajaro\r\n\t\t\tif (Menu.jugador.equals(\"cide\") || Menu.jugador.equals(\"Cide\") || Menu.jugador.equals(\"CIDE\")) {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 75, 75);\r\n\t\t\t} else {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 50, 50);\r\n\t\t\t}\r\n\t\t\t//limiamos las columnas que se habian pintado antes\r\n\t\t\tcolumns.clear();\r\n\t\t\t//movimiento a cero\r\n\t\t\tyMotion = 0;\r\n\t\t\t//puntuacion a cero\r\n\t\t\tscore = 0;\r\n\t\t\t//creacion de las nuevas columnas\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\t//vivimos\r\n\t\t\tgameOver = false;\r\n\t\t}\r\n\r\n\t\t//ymotion es el salto del pajaro\r\n\t\tif (!started)\r\n\t\t{\r\n\t\t\tstarted = true;\r\n\t\t}\r\n\t\telse if (!gameOver)\r\n\t\t{\r\n\t\t\tif (yMotion > 0) {\r\n\t\t\t\tyMotion = 0;\r\n\t\t\t}\r\n\t\t\tyMotion -= 10;\r\n\t\t}\r\n\t}", "public void command (int action, Point2D.Float target) throws PPException{\n\t\tif (PPNative.Unit_ActionOnPosition (id, action, target.x, target.y) == -1)\n\t\t\tthrow new PPException (\"command -> \"+PPNative.GetError());\n\t}", "@Test\r\n\tpublic void testTargets11_2() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 0)));\r\n\r\n\t}", "private void intelligentDecideMove() {\n\t\tMonster target=nearestEnemy();\r\n\t\tif(target!=null){\t\t\t\t//FIRST PRIORITY: pursue the target if it can be seen.\r\n\t\t\tswitchStates(PURSUIT);\r\n\t\t\ttargetTile=new Tile(target.currentTile);\r\n\t\t\t//saveMove();\r\n\t\t\tmonster.moveTowards(target);\r\n\t\t}\r\n\t\t\t\r\n\t\telse{\r\n\t\t\ttargetLostResponse();\r\n\t\t\t}\r\n\t}", "public void onScannedRobot(ScannedRobotEvent e)\n {\n BadBoy en = (BadBoy)enemies.get(e.getName());\n \n if(en == null){\n en = new BadBoy();\n enemies.put(e.getName(), en);\n }\n \n \n en.hp = true;\n en.energy = e.getEnergy();\n en.pos = hallarPunto(myPos, e.getDistance(), getHeadingRadians() + e.getBearingRadians());\n \n // normal target selection: the one closer to you is the most dangerous so attack him\n //si no le queda vida al objetivo actual CHANGE TARGET m8\n \n if(!objetivo.hp || e.getDistance() < myPos.distance(objetivo.pos)) {\n objetivo = en;\n }\n \n \n }", "@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}", "public int getShotsOnTarget () {\r\n\t\treturn shotsOnTarget;\r\n\t}" ]
[ "0.6707348", "0.6294612", "0.6283718", "0.6072719", "0.60175127", "0.5935137", "0.59272116", "0.59171873", "0.5878305", "0.586592", "0.58566654", "0.5845434", "0.58185875", "0.58183855", "0.58180773", "0.57798636", "0.5761515", "0.5758705", "0.57578695", "0.57552195", "0.5743613", "0.57308394", "0.57256806", "0.5717839", "0.56920534", "0.5691892", "0.5665311", "0.5662837", "0.5662327", "0.565668", "0.56533986", "0.56212413", "0.5609299", "0.56076777", "0.5593639", "0.55874795", "0.5579767", "0.55696213", "0.55643004", "0.5559224", "0.5556608", "0.5546697", "0.5531551", "0.5531461", "0.5521647", "0.5521238", "0.55124116", "0.5510771", "0.55060357", "0.5500059", "0.549661", "0.54963285", "0.5489935", "0.5483405", "0.54788214", "0.5463048", "0.546219", "0.5460667", "0.54598457", "0.5453103", "0.5449067", "0.5445744", "0.5444811", "0.5444437", "0.544347", "0.5441914", "0.54381025", "0.5425115", "0.5419007", "0.54151624", "0.54137015", "0.54130566", "0.54124635", "0.5412169", "0.5406119", "0.5405959", "0.5404551", "0.5403948", "0.5398125", "0.53960663", "0.5394923", "0.53932756", "0.5390501", "0.53880703", "0.53867775", "0.5384886", "0.53801095", "0.53721607", "0.53713137", "0.5367559", "0.5365788", "0.536553", "0.5363664", "0.5359254", "0.535695", "0.53528935", "0.53526074", "0.5352381", "0.53519857", "0.53449" ]
0.62163574
3
Mencari target untuk dilempar banana bomb
private Cell getBananaTarget() { Cell[][] blocks = gameState.map; int mostWormInRange = 0; Cell chosenCell = null; boolean wormAtCenter; for (int i = currentWorm.position.x - currentWorm.bananaBomb.range; i <= currentWorm.position.x + currentWorm.bananaBomb.range; i++){ for (int j = currentWorm.position.y - currentWorm.bananaBomb.range; j <= currentWorm.position.y + currentWorm.bananaBomb.range; j++){ wormAtCenter = false; if (isValidCoordinate(i, j) && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) { List<Cell> affectedCells = getBananaAffectedCell(i, j); int wormInRange = 0; for (Cell cell : affectedCells) { for (Worm enemyWorm : opponent.worms) { if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y && enemyWorm.health > 0) wormInRange++; if (enemyWorm.position.x == i && enemyWorm.position.y == j) wormAtCenter = true; } for (Worm myWorm : player.worms) { if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0) wormInRange = -5; } } if (wormInRange > mostWormInRange) { mostWormInRange = wormInRange; chosenCell = blocks[j][i]; } else if (wormInRange == mostWormInRange && wormAtCenter) { chosenCell = blocks[j][i]; } } } } return chosenCell; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }", "public void plantBomb()\n {\n if(this.getBombs() > 0)\n {\n bController.addBomb(this.getxPos(), this.getyPos(), 25);\n this.setBombs(getBombs() - 1);\n }\n }", "@Override\n public void action() throws Exception {\n if (!can_hit || count > 0)\n count++;\n if (count == 100) {\n can_hit = true;\n }\n else if (count == this.bombCountLimit) {\n bombPlaced--;\n count = 0;\n }\n\n if(Gdx.input.isKeyJustPressed(Input.Keys.SPACE)){\n go_ia=!go_ia;\n }\n if(go_ia){\n ia_count++;\n if(ia_count==11)\n ia_count=0;\n }\n if(go_ia&&ia_count==10) {\n\n int move = -1;\n int mode = 0;\n\n\n\n log.info(\"count bomb: \" + count);\n\n double enemyDist = sqrt(pow((playerX - enemyX), 2)+pow((playerY - enemyY), 2));\n if(powerUpFree) {\n currentGoalX = goalX;\n currentGoalY = goalY;\n if(deepSearch){\n currentGoalX = 1;\n currentGoalY = 1;\n }\n if(enemyDist < 7 && !enemyClean){\n if(enemyDist <= bombRange && sqrt(pow((playerX - goalX), 2)+pow((playerY - goalY), 2)) > 2)\n mode = 2;\n\n }\n }\n\n\n\n if (!can_hit) {\n mode = 1;\n log.info(\"can't hit\");\n }\n else if(doorLocked) {\n mode = 3;\n }\n /*if (count > 0 && count <= this.bombCountLimit && (playerX!=bombGoalX || playerY!=bombGoalY)){\n currentGoalX = bombGoalX;\n currentGoalY = bombGoalY;\n log.info(\"bomb goal\");\n }*/\n\n\n\n\n log.info(\"CURRENT goal x: \" + currentGoalX +\", CURRENT goal y: \" + currentGoalY);\n log.info(\"CURRENT bombgoal x: \" + bombGoalX +\", current bombgoal y: \" + bombGoalY);\n log.info(\"CURRENT player x: \" + playerX +\", current player y: \" + playerY);\n log.info(\"powerup free: \" + powerUpFree);\n log.info(\"CURRENT ENEMY: [\" + enemyX + \", \" + enemyY + \"] \");\n\n ArrayList<Action> actions = new ArrayList<>();\n ArrayList<Wall> walls = new ArrayList<>();\n ArrayList<EnemyPath> enemyPaths = new ArrayList<>();\n ArrayList<Around> around = new ArrayList<>();\n\n playerX = this.x/40;\n playerY = this.y/40;\n\n for( int i = 0; i < 4; i++ ){\n if (can_move[i]) {\n if (mode != 1 || checkSafe(i))\n actions.add(new Action(i));\n walls.add(new Wall(i, 0));\n }\n else if (can_destroy[i]){\n walls.add(new Wall(i, 1));\n if (mode != 1 || checkSafe(i))\n actions.add(new Action(i));\n }\n else\n walls.add(new Wall(i, 3));\n if(freeAround[i])\n around.add(new Around(i, 0));\n else\n around.add(new Around(i, 2));\n\n if ( !enemyFree[i] && enemyDist > bombRange)\n enemyPaths.add(new EnemyPath(i, 1));\n if( !enemyFree[i] && enemyDist <= bombRange || (bombRange == 1 && enemyDist <= 2))\n enemyPaths.add(new EnemyPath(i, 2));\n else if (enemyDist <= bombRange)\n enemyPaths.add(new EnemyPath(i, 1));\n else if(enemyFree[i])\n enemyPaths.add(new EnemyPath(i, 0));\n }\n if(sqrt(pow((playerX - bombGoalX), 2)+pow((playerY - bombGoalY), 2)) > bombRange ||\n mode != 1 || (playerX != bombGoalX && playerY != bombGoalY))\n actions.add(new Action(4));\n\n ai.load_fact( new Position(playerX, playerY),\n actions,\n makeDistances(buildDistances(currentGoalX, currentGoalY)),\n makeBombDistances(buildDistances(bombX, bombY)),\n makeEnemyDistances(buildDistances(enemyX, enemyY)),\n walls,\n around,\n enemyPaths,\n new Mode(mode)\n );\n\n AnswerSets answers = ai.getAnswerSets();\n while(answers.getAnswersets().get(0).getAnswerSet().isEmpty()){\n ai.load_fact( new Position(playerX, playerY),\n actions,\n makeDistances(buildDistances(currentGoalX, currentGoalY)),\n makeBombDistances(buildDistances(bombX, bombY)),\n makeEnemyDistances(buildDistances(enemyX, enemyY)),\n walls,\n around,\n enemyPaths,\n new Mode(mode)\n );\n answers = ai.getAnswerSets();\n }\n\n for (AnswerSet an : answers.getAnswersets()) {\n Pattern pattern = Pattern.compile(\"^choice\\\\((\\\\d+)\\\\)\");\n Matcher matcher;\n for (String atom : an.getAnswerSet()) {\n //System.out.println(atom);\n matcher = pattern.matcher(atom);\n\n if (matcher.find()) {\n log.info(\"DLV output: \" + matcher.group(1));\n move = Integer.parseInt(matcher.group(1));\n }\n }\n }\n if (move == 1) {\n set_allCan_move(0, true);\n this.x += 40;\n }\n else if (move == 2) {\n set_allCan_move(0, true);\n this.y += 40;\n }\n else if (move == 3) {\n set_allCan_move(0, true);\n this.y -= 40;\n }\n else if (move == 0) {\n set_allCan_move(0, true);\n this.x -= 40;\n }\n else if (move == 4 && can_hit && (playerX != goalX || playerY != goalY)) {\n ai_hit = true;\n can_hit = false;\n this.bombX=playerX;\n this.bombY=playerY;\n this.bombGoalX=playerX;\n this.bombGoalY=playerY;\n bombPlaced++;\n }\n moves.add(move);\n ai.clear();\n }\n else{\n playerX = this.x/40;\n playerY = this.y/40;\n }\n\n\n if (Gdx.input.isKeyPressed(Input.Keys.A)&&can_move[0]) {\n set_allCan_move(0, true);\n this.x -= 5;\n }\n if (Gdx.input.isKeyPressed(Input.Keys.D)&&can_move[1]) {\n set_allCan_move(0, true);\n this.x += 5;\n }\n if (Gdx.input.isKeyPressed((Input.Keys.W))&&can_move[2]) {\n this.y += 5;\n set_allCan_move(0, true);\n }\n if (Gdx.input.isKeyPressed((Input.Keys.S))&&can_move[3]){\n set_allCan_move(0, true);\n this.y -= 5;\n }\n if (Gdx.input.isKeyPressed((Input.Keys.Z)) && can_hit) {\n can_hit = false;\n this.bombX=playerX;\n this.bombY=playerY;\n this.bombGoalX=playerX;\n this.bombGoalY=playerY;\n bombPlaced++;\n }\n\n if (Gdx.input.isKeyPressed((Input.Keys.N)))\n log.info(\"CURRENT ENEMY: [\" + enemyX + \", \" + enemyY + \"] \");\n }", "public int useBomb(){\n //do harm while the animation start\n //cause harm to the boss\n println(\"BEFORE Main.boss.health: \"+Main.boss.health);\n int count = 0;\n if ((Main.boss.alive) && (Main.boss.posY != -1)){\n Main.boss.decreaseHealth(10);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n bossKilled = true;\n }\n }\n println(\"AFTER Main.boss.health: \"+Main.boss.health);\n //remove all bullets\n Main.boss.emptyBullets();\n //kill all the enemies\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n count ++;\n }\n // fill(0,0,0);\n // rect(0,0,width,height);\n return count;\n }", "public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}", "private void tryToKillStuff(final Bomb b) {\n \t\tfor (Bomb bomb : bombs)\n \t\t\tif (bomb != b && !bomb.isCurrentlyExploding())\n \t\t\t\tif (eac.isInExplosionArea(b, bomb)) {\n \t\t\t\t\tbomb.goBomf();\n \t\t\t\t}\n \n \t\tif (eac.isInExplosionArea(b, bman.get(0))) {\n \t\t\talive = false;\n \t\t\tgui.lost();\n \t\t}\n \t}", "public Bomb(){\n this.num_uses = 2147483647; // Constant set num times we can use this\n }", "public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }", "public void placeBombIntent(View v){\n\n if(!myTurn){\n showToast(\"Wait for your turn imbecile\");\n return;\n }\n if(bombs>0 && canPlaceBomb){\n if(!bombIntent){\n showToast(\"Touch a tile to place a bomb\");\n bombIntent = true;\n }else{\n showToast(\"No longer placing bombs\");\n bombIntent = false;\n }\n }\n }", "private void GenerateBomb(){\n\t\t\n\t\t//Update for the bomb powerup\n\t\tint randGen = rand.nextInt((int)((float)BOMB_FREQUENCY * RANDOM_DEVIATION));\n\t\trandGen = (rand.nextBoolean()) ?-randGen :randGen;\n\t\t\n\n\t\t\n\t\tif(timeSinceLastSpawns.get(CollectibleType.Bomb.ordinal()).intValue() > (BOMB_FREQUENCY + randGen)){\n\t\t\t\n\n\t\t\ttimeSinceLastSpawns.set(CollectibleType.Bomb.ordinal(), 0);\n\t\t\t\n\t\t\t//SPAWN BOMB COLLECTIBLE HERE\n\t\t}\n\t}", "private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "@Test\n public void testBombCommand() {\n List<Country> l_countryList = new ArrayList();\n\n //creating a new country object\n Country l_country = new Country();\n l_country.setD_continentIndex(1);\n l_country.setD_countryIndex(1);\n l_country.setD_countryName(\"india\");\n List<String> l_neighborList = new ArrayList();\n l_neighborList.add(\"china\");\n\n //added neighbour of country \n l_country.setD_neighbourCountries(l_neighborList);\n l_countryList.add(l_country);\n d_player.setD_ownedCountries(l_countryList);\n\n d_orderProcessor.processOrder(\"boMb china\".trim(), d_gameData);\n d_gameData.getD_playerList().get(0).issue_order();\n Order l_order = d_gameData.getD_playerList().get(0).next_order();\n assertEquals(true, l_order.executeOrder());\n\n //checking number of armies after using bomb card\n for (Map.Entry<Integer, Continent> l_continent : d_gameData.getD_warMap().getD_continents().entrySet()) {\n for (Country l_countryName : l_continent.getValue().getD_countryList()) {\n if (l_countryName.getD_countryName().equals(\"china\")) {\n assertEquals(5, l_countryName.getD_noOfArmies());\n }\n }\n }\n }", "private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void onScannedRobot(ScannedRobotEvent e)\n {\n BadBoy en = (BadBoy)enemies.get(e.getName());\n \n if(en == null){\n en = new BadBoy();\n enemies.put(e.getName(), en);\n }\n \n \n en.hp = true;\n en.energy = e.getEnergy();\n en.pos = hallarPunto(myPos, e.getDistance(), getHeadingRadians() + e.getBearingRadians());\n \n // normal target selection: the one closer to you is the most dangerous so attack him\n //si no le queda vida al objetivo actual CHANGE TARGET m8\n \n if(!objetivo.hp || e.getDistance() < myPos.distance(objetivo.pos)) {\n objetivo = en;\n }\n \n \n }", "public Torpedo(Board mygame, StarShip owner, int attack, StarShip target) {\n super(mygame, owner, attack);\n this.target = target;\n this.setSprite(\"torpedo\");\n }", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void toSelectingAttackTarget() {\n }", "public MangKaib(Main game){\n super(game);\n taust = new Taust(0,0,600,400);\n taust.checkLevel();// checkime, mis areaga tegu on peale uue tausta loomist\n mobSpawner.lisaMobInfo(); // laeme mob info.\n //game, width height draw x draw y, elud, damage, nimi, exp\n mangija = new Player(game, 97,174,50,370,100,10);\n mspawner = new mobSpawner(game, Mobid[13].getWidth(), Mobid[13].getHeight(), 450, 370, km[13].elud, km[13].dpsMin, km[13].dpsMax, km[13].mobSpeed, km[13].nimi, km[13].mobXp, km[13].mobGold,km[13].mobGold);\n magicAttack = new magicAttack(game,(mangija.x+mangija.width-15),(mangija.y-(mangija.height/2)),40,20,1,mangija.damage);\n kLiides = new uiBox(0,400,600,200);\n kLiides2 = new uiSide(600,0,200,600);\n uusRida = new Tekstid(0,420);//420 v 590\n }", "private GameObject spawnBoss(LogicEngine in_logicEngine,LevelManager in_manager)\r\n\t{\n\t\tGameObject go = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/redcube.png\",in_logicEngine.SCREEN_WIDTH/2,LogicEngine.rect_Screen.getHeight()+50,0);\r\n\t\tboss = go;\r\n\t\t\r\n\t\tboss.i_animationFrameRow = 1;\r\n\t\tboss.i_animationFrame =0;\r\n\t\tboss.i_animationFrameSizeWidth =75;\r\n\t\tboss.i_animationFrameSizeHeight =93;\r\n\t\t\r\n\t\tboss.v.setMaxForce(1);\r\n\t\tboss.v.setMaxVel(5);\r\n\t\tboss.stepHandlers.add( new BounceOfScreenEdgesStep());\r\n\t\t\r\n\t\t\r\n\t\tboss_arrive.setAttribute(\"arrivedistance\", \"50\", null);\r\n\t\tboss.stepHandlers.add( new CustomBehaviourStep(boss_arrive));\r\n\t\tboss.isBoss = true;\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(boss, 150, 40, true,1);\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\tc.f_numberOfHitpoints = 200;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\tc.f_numberOfHitpoints = 250;\r\n\t\t\r\n\t\tif(Difficulty.isMedium())\r\n\t\t\ti_bossBubbleEvery = 125;\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t\ti_bossBubbleEvery = 100;\r\n\t\t\r\n\t\t\r\n\t\tc.addHitpointBossBar(in_logicEngine);\r\n\t\tc.setExplosion(Utils.getBossExplosion(boss));\r\n\t\tboss.collisionHandler = c;\r\n\t\t\r\n\t\tboss.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\t\t//initial velocity of first one \r\n\t\tboss.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tGameObject Tadpole1 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\tGameObject Tadpole2 = in_manager.spawnTadpole(in_logicEngine);\r\n\t\t\r\n\t\tGameObject Bubble = null;\r\n\t\t\r\n\t\t\r\n\t\tBubble = spawnBossBubble(in_logicEngine, 0, 3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tTadpole1.v.setVel(new Vector2d(-10,5));\r\n\t\tTadpole2.v.setVel(new Vector2d(10,5));\r\n\t\tBubble.v.setVel(new Vector2d(0,-5));\r\n\t\t\r\n\t\tLaunchShipsStep l1 = new LaunchShipsStep(Tadpole1 , 50, 5, 1, false);\r\n\t\tLaunchShipsStep l2 = new LaunchShipsStep(Tadpole2, 50, 5, 1, true);\r\n\t\tLaunchShipsStep l3 = new LaunchShipsStep(Bubble, i_bossBubbleEvery, 1, 1, true);\r\n\t\tl1.b_addToBullets = true;\r\n\t\tl2.b_addToBullets = true;\r\n\t\t\r\n\t\tboss.stepHandlers.add(l1);\r\n\t\tboss.stepHandlers.add(l2);\r\n\t\tboss.stepHandlers.add(l3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\td_eye = new Drawable();\r\n\t\td_eye.i_animationFrameSizeHeight=8;\r\n\t\td_eye.i_animationFrameSizeWidth=8;\r\n\t\td_eye.i_animationFrameRow = 3;\r\n\t\td_eye.str_spritename = \"data/\"+GameRenderer.dpiFolder+\"/eye.png\";\r\n\t\t\r\n\t\tboss.visibleBuffs.add(d_eye);\r\n\t\t\r\n\t\treturn boss;\r\n\t}", "public void attack(RobotReference target) {\n if (target != null) {\n turnToVector(target.getLocation());\n pointGunToVector(target.getLocation());\n setAhead(60);\n fire(3);\n\n\n }\n }", "public void command (int action, Unit target) throws PPException{\n\t\tif (PPNative.Unit_ActionOnUnit (id, action, target.getId()) == -1)\n\t\t\tthrow new PPException (\"command -> \"+PPNative.GetError());\n\t}", "public void mo1610b() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 4).sendToTarget();\r\n }\r\n }", "public void ExecuteAction()\n {\n ActionTarget oTarget = mVecTargets.get( 0 );\n\n // Check if attack lands: compute chance of hitting the target\n if ( RandomGenerator.GetInstance().GetRandom( 1, 100 ) <=\n mSourceUnit.GetHitChance( oTarget.mCell.GetUnit() ) )\n {\n // Get the attack information from the attacking unit\n double dFinalDamage = Math.max(\n 1,\n mSourceUnit.GetUnit().GetResultingAttributes().GetStrength() -\n oTarget.mCell.GetUnit().GetUnit().GetResultingAttributes().GetPhysicalDef() );\n\n // Check critical chance\n if ( RandomGenerator.GetInstance().GetRandom( 1, 100 ) <=\n mSourceUnit.GetCritChance() )\n {\n dFinalDamage *= 1.5;\n oTarget.mActionStatus = ActionStatus.STATUS_CRITICAL;\n }\n else\n {\n oTarget.mActionStatus = ActionStatus.STATUS_SUCCESS;\n }\n\n // Add random portion to damage (10% of base damage)\n dFinalDamage = RandomGenerator.GetInstance().GetRandom(\n dFinalDamage - ( dFinalDamage / 10 ),\n dFinalDamage + ( dFinalDamage / 10 ) );\n mDamage = oTarget.mCell.GetUnit().ApplyDamage( dFinalDamage );\n\n // Add Slow status to target\n oTarget.mCell.GetUnit().SetStatus( new UnitStatusSlow(\n SLOW_TURN_DURATION,\n oTarget.mCell.GetUnit(),\n SLOW_PERCENTAGE ) );\n\n }\n else\n {\n mDamage = 0;\n oTarget.mActionStatus = ActionStatus.STATUS_MISS;\n }\n\n NotifyActionUpdate();\n ResetAttackArray();\n mSourceUnit.SetActionPerformed();\n }", "public Living getTarget();", "@Override\n public void attack(Creature target) {\n // Zombies attack any creature they land on,\n // as long as it isn't an instance of the Plant class\n // They inflict 10 points of damage when they attack\n if ((target != null) && !(target instanceof Plant)){\n target.takeDamage(10);\n }\n }", "@Test\n public void test_chooseBadTargetOnSacrifice_WithTargets_AI() {\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 3);\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n //addTarget(playerA, \"Mountain\"); AI must select targets\n\n //setStrictChooseMode(true); AI must select targets\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerA, \"Mountain\", 1);\n assertPermanentCount(playerA, \"Mountain\", 3 - 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }", "public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }", "void execute(Combat combat, Unit source, Unit target);", "private void manageBlueTargets(){\n int randBlueTarget = generator.nextInt(100);\n \n while(labelArray[randBlueTarget].getIcon()!=iconSet.getGrayIcon()){\n randBlueTarget = generator.nextInt(100);\n } \n labelArray[randBlueTarget].setIcon(iconSet.getBlueTargetIcon());\n\n if (blueTargetCounter<ACTIVE_BLUE_TARGET_TOTAL){\n activeBlueTarget[blueTargetCounter] = randBlueTarget;\n }\n\n if (blueTargetCounter>=ACTIVE_BLUE_TARGET_TOTAL){\n if(labelArray[activeBlueTarget[0]].getIcon()!=iconSet.getGrayIcon()){\n labelArray[activeBlueTarget[0]].setIcon(iconSet.getGrayIcon());\n }\n for(int i = 0; i < activeBlueTarget.length-1; i++){\n activeBlueTarget[i] = activeBlueTarget[i+1];\n }\n activeBlueTarget[ACTIVE_BLUE_TARGET_TOTAL-1] = randBlueTarget;\n }\n \n blueTargetCounter++;\n }", "private static void defineInitialAttackTarget() {\n\t\tUnit buildingToAttack = MapExploration.getNearestEnemyBuilding();\n\n\t\t// We know some building of CPU that we can attack.\n\t\tif (buildingToAttack != null) {\n\t\t\tchangeNextTargetTo(buildingToAttack);\n\t\t}\n\n\t\t// No building to attack found, safely decide not to attack.\n\t\telse {\n\t\t\tchangeStateTo(STATE_PEACE);\n\t\t}\n\t}", "private void BombAction(Bomb n, int i, int j) {\n\t\tModel model = this.board.getModel(i, j + 1);\n\t\tif (model instanceof AbstractZombie) {\n\t\t\tthis.board.removeModel(n, i, j);\n\t\t\tmodel.setHp(-1);\n\n\t\t}\n\t}", "public void attack(Creature target) {\r\n\t\t//Check if attacker is within 1 tile\r\n\t\tint destx = (int) (target.getXlocation()/Tile.TILEWIDTH);\r\n\t\tint desty = (int) (target.getYlocation()/Tile.TILEHEIGHT);\r\n\t\tVector2i start = new Vector2i((int) (creature.getXlocation() / Tile.TILEWIDTH), (int) (creature.getYlocation()/ Tile.TILEHEIGHT));\r\n\t\t//FIND SHORTEST DISTANCE\r\n\t\tVector2i destination = null; \t\t\r\n\t\tdouble shortest = 100000; \t\t\t\t\t\t\t\t\t\t //Set huge\r\n\t\tbyte Direction = 2;\t\t\t\t\t\t\t\t\t\t\t\t //default Look DOWN\r\n\t\tdouble temp = getDistance(start, new Vector2i(destx+1, desty)); //Check first\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx+1, desty).isSolid() && !checkCollision(destx+1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx+1, desty);\r\n\t\t\tDirection = 1;\t\t\t\t\t\t\t\t\t\t\t\t //Look LEFT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx-1, desty)); \t\t //Check second\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx-1, desty).isSolid() && !checkCollision(destx-1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx-1, desty);\r\n\t\t\tDirection = 3;\t\t\t\t\t\t\t\t\t\t\t\t //Look RIGHT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty+1)); \t\t //Check third\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty+1).isSolid() && !checkCollision(destx, desty+1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty+1);\r\n\t\t\tDirection = 0;\t\t\t\t\t\t\t\t\t\t\t\t //Look UP\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty-1)); \t\t //Check fourth\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty-1).isSolid() && !checkCollision(destx, desty-1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty-1);\r\n\t\t\tDirection = 2;\t\t\t\t\t\t\t\t\t\t\t\t //Look DOWN\r\n\t\t}\r\n\t\t//SET PATH FOR SHORTEST DISTANCE\r\n\t\tList<Node> path = pf.findPath(start, destination);\r\n\t\t//FOLLOW SHORTEST DISTANCE PATH\r\n\t\tfollowPath(path);\r\n\t\t//IF ATTACKER HAS ARRIVED\r\n\t\tif (creature.getxMove() == 0 && creature.getyMove() == 0) {\r\n\t\t\t//face target -> \r\n\t\t\tcreature.setLastDirection(Direction);\r\n\t\t\t//attack\r\n\t\t\tcreature.setAttacking(true);\r\n\t\t} else {\r\n\t\t\tcreature.setAttacking(false);\r\n\t\t}\r\n\t}", "public Contig getTarget() { return target; }", "N getTarget();", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "public static void main(String[] args) {\n Hero aventurier = new Hero(200, 100);\n Equipement epee = new Equipement(\"epee\", 0);\n Monsters sorciere = new Monsters(\"witch\", 180, 0);\n Monsters barbare = new Monsters(\"olaf\", 160, 0);//Degat et point attaque sont à 0 car ils prendront les valeurs du random\n\n\n System.out.println(\"Bienvenue dans le dongeon\");\n System.out.println(\"Vous avez \" + aventurier.getPointDeVie() + \" Point de vie, \" + aventurier.getFlasqueDeau() + \" flasques pour combatre vos ennemies et une \");\n\n // i=room ;si pointdevie > room-->room+1 sinon game over(pas besoin de creer une classe)\n int i = 1;\n do {\n\n if (aventurier.getPointDeVie() > 0) ;\n {\n System.out.println(\"Room\" + i);\n\n Monsters enemieActuel = barbare;\n//nbr aleatoire entre sorcier et monster\n Random random = new Random();\n int nbrAl = random.nextInt(2 );\n//si nbr=0 = sorcier sinon barbare\n if (nbrAl == 0) {\n enemieActuel = sorciere;\n //sinon barbare\n } else {\n enemieActuel = barbare;\n }\n\n\n //Si barbare faire le do while\n\n if (enemieActuel == barbare) {\n\n do { //Faire des degats aleatoire grace au random à l'aide de l'epee\n epee.setDegat((int) (5 + (Math.random() * 30)));//comme .set dega=0 on lui donne la valeur de math.random\n int degat = epee.getDegat(); //.get renvoi la valeur au int nommer degat\n barbare.setPointDeVie(barbare.getPointDeVie() - degat);//vie - degat\n System.out.println(\"Il reste au barbare \" + barbare.getPointDeVie());//nouvelle valeur de point de vie\n\n\n //idem avec l'aventurier\n barbare.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = barbare.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n // tant que les Pvie de l'aventurier >= 0 et idem barbare continuer le combat\n } while (aventurier.getPointDeVie() >= 0 && barbare.getPointDeVie() >= 0);\n //à la fin du combat si pvie de l'aventurier sont >0 et que i (room) egale 5 \"gagné\"\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n\n //Si juste pvie de l'aventurier > 0 --->room suivante\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n //on redonne les valeurs de depart pdeVie pour la nouvelle room\n aventurier.setPointDeVie(200);\n barbare.setPointDeVie(180);\n i+=1;\n }\n\n // sinon room = 6 pour envoyer le sout \"game over\"\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n\n\n\n }\n\n //IDEM avec sorciere\n else {\n do {\n\n\n aventurier.setFlasqueDeau((int) (5 + (Math.random() * 30)));\n int degat = aventurier.getFlasqueDeau();\n sorciere.setPointDeVie(sorciere.getPointDeVie() - degat);\n System.out.println(\"Il reste à la sorciere \" + sorciere.getPointDeVie());\n\n sorciere.setPointAttaque((int) (5 + (Math.random() * 30)));\n int pointDattaque = sorciere.getPointAttaque();\n aventurier.setPointDeVie(aventurier.getPointDeVie() - pointDattaque);\n System.out.println(\"il vous reste \" + aventurier.getPointDeVie());\n\n } while (aventurier.getPointDeVie() >= 0 && sorciere.getPointDeVie() >= 0);\n if (aventurier.getPointDeVie() > 0 && i==5) {\n System.out.println(\"Bravo vous avez gagné ! =)\");\n }else if (aventurier.getPointDeVie() > 0 ){\n System.out.println(\"Bravo tu passes à la pièce suivante\");\n aventurier.setPointDeVie(200);\n sorciere.setPointDeVie(160);\n i+=1;\n }\n else {\n System.out.println(\"Game Over\");\n i = 6;\n }\n }\n } } while (i <= 5 && aventurier.getPointDeVie() > 0);\n\n\n }", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "@Test\n public void test_BoostOnDies() {\n addCard(Zone.HAND, playerA, \"Silumgar Scavenger\", 1); // {4}{B}\n addCard(Zone.BATTLEFIELD, playerA, \"Swamp\", 5);\n //\n addCard(Zone.BATTLEFIELD, playerA, \"Balduvian Bears\", 1);\n\n // cast and exploit\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Silumgar Scavenger\");\n setChoice(playerA, true); // yes, exploit\n addTarget(playerA, \"Balduvian Bears\");\n\n checkPermanentCounters(\"boost\", 1, PhaseStep.BEGIN_COMBAT, playerA, \"Silumgar Scavenger\", CounterType.P1P1, 1);\n checkAbility(\"boost\", 1, PhaseStep.BEGIN_COMBAT, playerA, \"Silumgar Scavenger\", HasteAbility.class, true);\n\n setStopAt(1, PhaseStep.END_TURN);\n setStrictChooseMode(true);\n execute();\n }", "public void remTarget(){\n rem(DmpDMSAG.__target);\n }", "public void onAgress(IPokemob mob, EntityLivingBase target)\r\n {\r\n }", "public boolean canBombThisEnemyAndRunSafe(Player p1, Player p2){\n Maze maze = state.getMaze();\n Cell[][] tabcells = maze.getCells();\n //Cells in range of p1 corresponds to the cells p1 can put a bomb on associated with the number of moves needed\n //to go to the cell where p1 would be when putting the bomb\n ArrayList<Journey> journeysinrangeofp1 = new ArrayList<Journey>();\n //Available moves to flee represents how many moves p1 would still have to run away from its bomb\n int availablemovestoflee;\n //Available cells to flee represents the cells p1 can run to after putting the bomb\n List<Cell> availablecellstoflee = new ArrayList<>();\n List<Cell> bombingavailableslots = new ArrayList<Cell>();\n //Bombing available slots corresponds to the cells where a bomb could be placed to kill p2\n for(int i = 0; i<=p1.getBombRange();i++){\n if((p2.getX()-i)>=0){\n bombingavailableslots.add(tabcells[p2.getX()-i][p2.getY()]);\n }\n if((p2.getX()+i)<maze.getWidth()){\n bombingavailableslots.add(tabcells[p2.getX()+i][p2.getY()]);\n }\n if((p2.getY()-i)>=0){\n bombingavailableslots.add(tabcells[p2.getX()][p2.getY()-i]);\n }\n if((p2.getY()+i)<maze.getHeight()){\n bombingavailableslots.add(tabcells[p2.getX()][p2.getY()+i]);\n }\n }\n journeysinrangeofp1 = getReacheableCellsInRangeWithPath(tabcells[p1.getX()][p1.getY()],p1.getNumberMoveRemaining()+1);\n for(Journey j:journeysinrangeofp1){\n if(bombingavailableslots.contains(j.getDestinationcell())){\n availablemovestoflee = p1.getNumberMoveRemaining() - j.getNbmoves();\n availablecellstoflee = getReacheableCellsInRange(j.getDestinationcell(), availablemovestoflee);\n for(Cell c: availablecellstoflee){\n if(wouldBeSafeFromBomb(p1,j.getDestinationcell(),c)){\n if(isSafeFromAllPlayersExcept(c,p1,p2)){\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void test_chooseBadTargetOnSacrifice_WithoutTargets_AI() {\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Atarka Monument\", 1); // {T}: Add {R} or {G}.\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n //addTarget(playerA, \"Mountain\"); no lands to sacrifice\n\n //setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }", "void removeBomb();", "@Test\n public void test_chooseBadTargetOnSacrifice_WithoutTargets_User() {\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Atarka Monument\", 1); // {T}: Add {R} or {G}.\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n //addTarget(playerA, \"Mountain\"); no lands to sacrifice\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }", "public void execute() {\n\t\tif (getTargetEnemies() != null && getTargetEnemies().size() > 0) {\n\t\t\tBuff buff = new Buff(getHero().getId(), null, Buff.SPEED, getAbility().getValue(), CHARGE_DURATION, \"0\", 0);\n\t\t\tThread buffDurationThread = new Thread(() -> {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(CHARGE_DURATION);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tgetHero().removeBuff(buff);\n\t\t\t\tgetGameServer().sendGameStatus();\n\t\t\t\tLog.i(TAG, \"Removed buff, now have these many buffs left : \" + getHero().getBuffs().size());\n\t\t\t});\n\t\t\tbuffDurationThread.start();\n\n\t\t\tgetHero().getBuffs().add(buff);\n\n\t\t\t// Set the cooldown for this ability\n\t\t\tgetAbility().setMillisLastUse(getTime());\n\t\t\tgetAbility().setTimeWhenOffCooldown(\"\" + (getTime() + getAbility().calculateCooldown(getHero(), this)));\n\n\t\t\t// Send castbar information\n\t\t\tgetGameServer().sendCastBarInformation(getHero().getId(), getAbility());\n\n\t\t\t// Add animation to list\n\t\t\tgetGameServer().getAnimations().add(new GameAnimation(\"CHARGE\", 0, getHero().getId(), null, 1));\n\t\t}else{\n\t\t\tLog.i(TAG, \"Hero had no target, canceling ability\");\n\t\t}\n\t\tsuper.execute();\n\t}", "@Override\n public void attack(int damage)\n {\n EntityPirate target = this.world.getClosestTarget(this, EntityPirate.class, 50, true);\n //System.out.println(target.toString());\n \n float newtonForce = 1200F; //The amount of force applied to the projectile\n \n if(target != null)\n {\n Vector2 difference = target.getPos().cpy().sub(this.getPos()); //Get the difference vector\n difference.nor().scl(newtonForce); //Normalize it to a unit vector, and scale it\n new EntityWaterBomb(this.world, this.getPos().x, this.getPos().y, difference.x, difference.y, this, damage); \n } // target\n }", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public void turnoZombie(){\n int cont = 0;\n\n while(cont < zombies.size()){\n Zombie tmp = (Zombie) zombies.get(cont);\n //System.out.println(\"Zombie \" + cont + \" | posx: \" + tmp.posX + \" | posy: \" + tmp.posY);\n\n //===============Ataque=========================\n\n int[] target = objetivoAtaque(tmp);\n\n if(target != null){\n Soldado objetivo = (Soldado) tablero[target[0]][target[1]].personaje;\n tmp.atacar(objetivo);\n if(objetivo.vida <= 0){\n soldados.remove(tablero[target[0]][target[1]].personaje);\n tablero[target[0]][target[1]].personaje = null;\n }\n cont++;\n continue;\n }\n\n //===============Vision=========================\n\n int[] destino = vision(tmp);\n\n if(destino != null){\n moverZombie(tmp, destino[0], destino[1]);\n cont++;\n System.out.println(\"Ví algo\");\n System.out.println(\"Zombie \" + cont + \" | posx: \" + destino[0] + \" | posy: \" + destino[1]);\n }\n\n //===============Escucha=========================\n else{\n\n int[] destino2 = escuchar(tmp);\n\n if(destino2 != null){\n moverZombie(tmp, destino2[0], destino2[1]);\n cont++;\n System.out.println(\"Escuché algo\");\n System.out.println(destino2[0] + \", \" + destino2[1]);\n }\n\n //===============Random=========================\n else{\n\n moverZombie(tmp, tmp.posX, tmp.posY + 2);\n cont++;\n System.out.println(\"Random\");\n System.out.println(tmp.posX + \", \" + tmp.posY);\n }\n\n }\n\n }\n this.mostrar();\n }", "public void activar(Bomberman b) {\n \tmapa.destruirPowerUp(celda);\n \tcelda=null;\n \tb.masacrallity();\n \tb.aumentarPuntaje(puntosAOtorgar);\n }", "private void deliverBomb(Player me, Location location) \n {\n for (int i = 0; i < NUMBER_OF_BOMBS; i++) \n {\n double plusX = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n \t plusX = (0 - plusX);\n }\t\t\t\n double plusZ = Math.random() * 5;\n if ((Math.random() * 10) < 6) \n {\n plusZ = (0 - plusZ);\n }\n Location newLocation = new Location(location.getWorld(),\n location.getX() + plusX, \n location.getY() + (Math.random() + 20),\n location.getZ() + plusZ);\n // This spawns the creeper at the location provided\n me.getWorld().spawn(newLocation, Creeper.class);\n } \n }", "private void target() {\n\t\t// find distance to flower\n\t\tdouble dist = grid.getDistance(grid.getLocation(this),\n\t\t\t\t\t\t\t\t\t grid.getLocation(targetFlower));\n\t\t// if close to flower start harvesting nectar\n\t\tif(dist < 3) {\n\t\t\tstate = \"HARVESTING\";\n\t\t}\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\telse if(dist > 200){\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// else keep moving toward flower\n\t\telse{\n\t\t\tmoveTowards(grid.getLocation(targetFlower), 3);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}", "public void checkBombs(final Integer tile){\n if(bombs_location.contains(tile)){\n if(invulnerable){\n showTimedAlertDialog(\"PHEW!\", \"Your GODMODE saved your life\", 5);\n invulnerable = false;\n return;\n }\n invulnerable = false;\n Lejos.makeSound_Boom();\n hp = hp-1;\n DrawHP();\n bombs_location.remove(tile);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n MultiplayerManager.getInstance().SendMessage(\"bomb_remove \" + revertTile(tile).toString());\n }\n }, 1000);\n if(hp==0){\n onLose();\n }\n showTimedAlertDialog(\"PWNED!\", \"You just stepped on a mine\", 3);\n }\n }", "public void killed(Target target){\r\n\t\tif(this.crashed(target.getShape()))\r\n\t\t\tthis.lives--;\r\n\t}", "public void attackTargetCharacter() {\n }", "public Bonus (){\n\t\tsuper (); \n\t\t//TODO [CORRECCION] Tiene una clase Config, utilizarla para estos valores fijos.\n\t\tthis.tiempoDeVida = Config.BONUS_VIDA; // cantidad de turnos\n\t\tPosicion posicion = new Posicion(randX.nextInt(), randY.nextInt());\n\t\tTamanio tamanio = new Tamanio(Config.BONUS_ANCHO, Config.BONUS_ALTO);\n\t\tthis.setPosicion(posicion);\n\t\tthis.setTamanio(tamanio);\n\t}", "public void toSelectingAttackTarget(INodeTargetEnemy targetMenu) {\n }", "@EventHandler\n public void onEntityTarget(EntityTargetLivingEntityEvent e) {\n if (!plugin.getConfig().getBoolean(\"Protections.MobTargeting\"))\n return;\n if (!(e.getEntity() instanceof Monster))\n return;\n if (!(e.getTarget() instanceof Player))\n return;\n Player player = (Player) e.getTarget();\n if (player == null) return;\n if (!plugin.getPlayer(player).isAFK())\n return;\n e.setCancelled(true);\n }", "public void moveBoss() {\n\t\tdouble position = boss.getTranslateY();\n\t\tspeed = Math.random()*30;\n\t\tif(position > 600-70) {\n\t\t\tRandom r = new Random();\n\t\t\tboss.setTranslateY(-6);\n\t\t\tboss.setTranslateX(r.nextInt(900));\n\t\t}else {\n\t\tboss.setTranslateY(position + speed);\n\t\t}\n\t}", "BossEnemy(){\n super();\n totallyDied = true;\n }", "public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }", "public GameObject spawnBomber(LogicEngine in_logicEngine){\n\t\tGameObject ship = new GameObject(\"data/\"+GameRenderer.dpiFolder+\"/bomber.png\",((float)LogicEngine.SCREEN_WIDTH)+50,LogicEngine.SCREEN_HEIGHT-50,0);\r\n\t\tship.i_animationFrameSizeHeight = 58;\r\n\t\tship.i_animationFrameSizeWidth = 58;\r\n\t\t\r\n\t\t//fly back and forth\r\n\t\tLoopWaypointsStep s = new LoopWaypointsStep();\r\n\t\ts.waypoints.add(new Point2d(-30,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\ts.waypoints.add(new Point2d(LogicEngine.SCREEN_WIDTH+50,LogicEngine.SCREEN_HEIGHT-50));\r\n\t\t\r\n\t\tship.b_mirrorImageHorizontal = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(s);\r\n\t\tship.v.setMaxForce(5.0f);\r\n\t\tship.v.setMaxVel(5.0f);\r\n\t\tship.allegiance = GameObject.ALLEGIANCES.ENEMIES;\r\n\r\n\r\n\t\t//tadpole bullets\r\n\t\tGameObject go_tadpole = this.spawnTadpole(in_logicEngine);\r\n\t\tgo_tadpole.stepHandlers.clear();\r\n\t\tFlyStraightStep fly = new FlyStraightStep(new Vector2d(0,-0.5f));\r\n\t\tfly.setIsAccelleration(true);\r\n\t\t\r\n\t\t\r\n\t\tif(Difficulty.isHard())\r\n\t\t{\tgo_tadpole.v.setMaxVel(5);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\telse\r\n\t\t{\tgo_tadpole.v.setMaxVel(10);\r\n\t\t\tgo_tadpole.v.setMaxForce(5);\r\n\t\t}\r\n\t\tgo_tadpole.stepHandlers.add(fly);\r\n\t\tgo_tadpole.v.setVel(new Vector2d(-2.5f,0f));\r\n\t\t\r\n\t\t\r\n\t\t//bounce on hard and medium\r\n\t\tif(Difficulty.isHard() || Difficulty.isMedium())\r\n\t\t{\r\n\t\t\tBounceOfScreenEdgesStep bounce = new BounceOfScreenEdgesStep();\r\n\t\t\tbounce.b_sidesOnly = true;\r\n\t\t\tgo_tadpole.stepHandlers.add(bounce);\r\n\t\t}\r\n\t\t\r\n\t\t//drop bombs\r\n\t\tLaunchShipsStep launch = new LaunchShipsStep(go_tadpole, 20, 5, 3, true);\r\n\t\tlaunch.b_addToBullets = true;\r\n\t\tlaunch.b_forceVelocityChangeBasedOnParentMirror = true;\r\n\t\t\r\n\t\tship.stepHandlers.add(launch);\r\n\t\tship.rotateToV=true;\r\n\t\t\r\n\t\t//give it some hp\r\n\t\tHitpointShipCollision c = new HitpointShipCollision(ship, 50, 50f);\r\n\t\tc.setSimpleExplosion();\r\n\t\tship.collisionHandler = c;\r\n\t\t\r\n\t\tin_logicEngine.objectsEnemies.add(ship);\r\n\t\t\r\n\t\treturn ship;\r\n\t\r\n\t}", "@Test\n public void test_chooseBadTargetOnSacrifice_WithTargets_User() {\n // Redcap Melee deals 4 damage to target creature or planeswalker. If a nonred permanent is dealt damage this way, you sacrifice a land.\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Mountain\", 3);\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n addTarget(playerA, \"Mountain\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerA, \"Mountain\", 1);\n assertPermanentCount(playerA, \"Mountain\", 3 - 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }", "private void placeBomb() {\n\t\tint x = ran.nextInt(worldWidth);\n\t\tint y = ran.nextInt(worldHeight);\n\n\t\tif (!tileArr[x][y].hasBomb()) {\n\t\t\ttileArr[x][y].setBomb(true);\n\n\t\t\tindex.add(\"Index\" + x + \",\" + y); // ADDED COMPONENT\n\t\t\trevealed.put(index, true);\n\t\t\tindex.removeFirst();\n\n\t\t} else {\n\t\t\tindex.add(\"Index\" + x + \",\" + y); // ADDED COMPONENT\n\t\t\trevealed.put(index, false);\n\t\t\tindex.removeFirst();\n\t\t\tplaceBomb();\n\t\t}\n\n\t}", "@Test\n public void bateauAtNoBateau() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux ba = new ContreTorpilleur(new Place[]{new Place(\"A5\")}, j, p, true);\n g.setListBateaux(Collections.singletonList(ba));\n\n Bateaux b = j.bateauAt(new Place(\"A6\"), g);\n\n assertNull(\"Il n'y a pas de bateau ici\", b);\n }", "@Override\n public Action getAction(Actor actor, GameMap map) {\n Dinosaur dino = (Dinosaur) actor;\n dinoClass = dino.getClass();\n here = map.locationOf(dino);\n\n Action ret = null;\n for(Exit exit: here.getExits()){\n if (map.isAnActorAt(exit.getDestination())) {\n //make sure they're not trying to mate with Player\n if(map.getActorAt(exit.getDestination()).getDisplayChar() != '@'){\n Dinosaur target = (Dinosaur) map.getActorAt(exit.getDestination());\n //if they are the same species\n if (!target.isPregnant() && target.getDisplayChar() == dino.getDisplayChar()\n && target.getGender() != dino.getGender() && !(target instanceof BabyDinosaur)){\n //if Pterodactyls are trying to mate, make sure their on a tree\n if(target instanceof Pterodactyl){\n Pterodactyl pteroOne = (Pterodactyl) target;\n Pterodactyl pteroTwo = (Pterodactyl) dino;\n if(pteroOne.getOnTree() && pteroTwo.getOnTree()){\n ret= new MateAction(target);\n }\n }\n else{\n ret= new MateAction(target);\n }\n }\n }\n }\n }\n //if no breeding they'll just move closer to a target OR return null if no target\n if(ret == null){\n ret = moveCloser(dino, map);\n }\n return ret;\n }", "private void manageTestTarget(){ \n if(labelArray[TEST_TARGET_LOCATION].getIcon()==iconSet.getGrayIcon()){\n labelArray[TEST_TARGET_LOCATION].setIcon(iconSet.getTestTargetIcon());\n System.out.println(\"Test Start\");\n } \n else{\n testTargetDelay++;\n System.out.println(\"DELAY:\" + testTargetDelay);\n }\n }", "public boolean isBomb() {\n return type.equalsIgnoreCase(\"bomb\");\n }", "public void act() { \n check = borde(flag);\n if(check == true )\n restaura();\n moveRandom(move);\n if(animationE % 3 == 0){\n checkanimation();\n } \n animationE++; \n alive=checkfire();\n if(alive == true){\n enemyoff();\n } \n \n }", "Target target();", "public DumbEnemy(){\n setImage(new GreenfootImage(SPRITE_W,SPRITE_H));\n }", "public void boom() {\n\t\tboom.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = boom;\n\t}", "@Test\n public void bateauAtBateau() {\n Player p = new Player();\n List<Player> pL = new ArrayList<>();\n pL.add(p);\n Jeux j = new Jeux(ModeDeJeux.MONO_JOUEUR, pL);\n Grille g = new Grille(10, 10, j, p);\n\n Bateaux ba = new ContreTorpilleur(new Place[]{new Place(\"A5\")}, j, p, true);\n g.setListBateaux(Collections.singletonList(ba));\n\n Bateaux b = j.bateauAt(new Place(\"A5\"), g);\n\n assertEquals(\"Il n'y a pas de bateau ici\", ba, b);\n }", "@Override\n\tpublic void findTarget(List<Combat> other) {\n\t}", "private void showBomb() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (state[i][j] == 'X')\n stateGame[i][j] = 'X';\n }\n }\n }", "public void hitBJ() {\n\t\tif (blackjack.isOkBet()) {\n\t\t\tif (blackjack.getCount(1, false, 21)) {\n\t\t\t\t((BlackjackView) manager.getPanel(Constants.BJ_VIEW_NAME)).addCard(blackjack.giveCard(1), 1);\n\t\t\t\tif (blackjack.getCount(1, true, 21)) {\n\t\t\t\t\tblackjack.playerLoses();\n\t\t\t\t\tJOptionPane.showMessageDialog(manager.getPanel(Constants.BJ_VIEW_NAME), \"You lose!\", \"BUSTED\",\n\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\tresetBJTable();\n\t\t\t\t}\n\t\t\t}\n\t\t} else\n\t\t\tJOptionPane.showMessageDialog(manager.getPanel(Constants.BJ_VIEW_NAME), \"You must bet something\", \"ERROR\",\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t}", "public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }", "public Boolean makeAttackAction(UnitActor target) {\n if (this.isInRange(target)) {\n PlayBoardActor current = lazyPlayboardActor.get();\n long pvStart = target.getPv();\n current.getPlayBoard().applyAttack(this.point, target.getPoint());\n this.addAction(Actions.sequence(getActionAttack(target), target.getAfterAttack(pvStart - target.getPv())));\n this.disable(true);\n this.setIdle();\n return true;\n } else {\n return false;\n }\n }", "public void shootAimingBullet(){\n bossBullet = new BossBullet(bossBulletImage,this.getXposition() + 100, this.getYposition() + 100, 8, player, true);\n bulletList.add(bossBullet);\n }", "@Override\n void planted() {\n super.planted();\n TimerTask Task = new TimerTask() {\n @Override\n public void run() {\n\n for (Drawable drawables : gameState.getDrawables()) {\n if (drawables instanceof Zombie) {\n int distance = (int) Math.sqrt(Math.pow((drawables.x - x), 2) + Math.pow((drawables.y - y), 2));\n if (distance <= explosionradious) {\n ((Zombie) drawables).hurt(Integer.MAX_VALUE);\n }\n }\n }\n\n life = 0;\n }\n\n };\n\n Timer timer = new Timer();\n timer.schedule(Task, 2000);\n }", "public void getBattlecryEffect(Board b, Minion own, Minion target)\n\t {\n\t\t \t//own.addToHandAfterDead=true;//we have to check the energy...(done in doDeathrattles2\n\t return;\n\t }", "protected boolean findTarget(){\n\t\t// shoot units\n\t\tfloat tmpDist = -1;\n\t\tUnit tmpUnit = null;\n\t\tfor(Unit u:Game.map.get(tileId).unitMap){ // loop through units on\n\t\t\t\t\t\t\t\t\t\t\t\t\t// maptile\n\t\t\tif(this.id == u.id)\n\t\t\t\tcontinue;\n\t\t\tif(this.ownerId == u.ownerId)\n\t\t\t\tcontinue;\n\t\t\tif(u.dead)\n\t\t\t\tcontinue;\n\t\t\tVector3f tmp = Vector3f.sub(this.modelPos, u.modelPos, null);\n\t\t\tif(tmpDist == -1 || tmp.length() < tmpDist){\n\t\t\t\ttmpUnit = u;\n\t\t\t\ttmpDist = tmp.length();\n\t\t\t}else\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(tmpDist != -1 && tmpDist <= range && tmpUnit != null){\n\t\t\tthis.hostile = tmpUnit;\n\t\t\tthis.target = this.hostile.modelPos;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public void chooseAction(){\n healthDecay = getHealth() - 5;\n //now scan for Nazguls\n\n if(healthDecay == 0){\n death(this);\n }\n int scan_result = scan();\n\n if(scan_result == 1){\n move();\n }\n\n if(scan_result == 0 && healthDecay < 75){\n stay();\n }\n\n if(scan_result == 0 && hobbitCounter == 15){\n replicate();\n hobbitCounter = 0;\n }\n\n else{\n move();\n \n }\n hobbitCounter = hobbitCounter + 1;\n }", "public abstract void attack(Vector2 spawnPos, Vector2 target);", "public void go(){\r\n\t\t\r\n\t\tif(position.go(b.getN())){\r\n\t\t\tElement e =b.getSection(position).giveMePitOrWumpus();\t\t\r\n\t\t\tif(e instanceof Wumpus){\r\n\t\t\t\tWumpus w = (Wumpus)e;\r\n\t\t\t\tif (w.isAlive()){\r\n\t\t\t\t\talive = false;\r\n\t\t\t\t\tSystem.out.println(\"Wumpus kills you without mercy.END.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(e instanceof Pit){\r\n\t\t\t\talive = false;\r\n\t\t\t\tSystem.out.println(\"You have fallen into an endless pit.END.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Ooops, there is a wall on your way.\");\r\n\t}", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public void checkIfAlive()\n {\n if(this.health<=0)\n {\n targetable=false;\n monstersWalkDistanceX=0;\n monstersWalkDistanceY=0;\n this.health=0;\n new TextureChanger(this,0);\n isSelected=false;\n if(monsterType==1)\n {\n visible=false;\n }\n if(gaveResource==false) {\n int gameResource = Board.gameResources.getGameResources();\n Board.gameResources.setGameResources(gameResource + resourceReward);\n gaveResource=true;\n }\n }\n }", "public void blame(int action) {\n if (action == 0) {\n this.eatable *= 0.75;\n this.playable *= 1.25;\n this.ignorable *= 1.25;\n } else if (action == 1) {\n this.eatable *= 1.25;\n this.playable *= 0.75;\n this.ignorable *= 1.25;\n } else {\n this.eatable *= 1.25;\n this.playable *= 1.25;\n this.ignorable *= 0.75;\n }\n }", "@Override\n\tpublic void updateContext(ExtendedAgentContext bc) {\n\t\tHero h = bc.getHero();\n\t\tAbility lagunaBlade = h.getAbility(5);\n\n\t\tList<BaseEntity> entitiesInAttackRange = bc.findEntitiesInRadius(h, lagunaBlade.getCastRange());\n\n\t\tArrayList<BaseEntity> heroesInRange = new ArrayList<>();\n\t\tfor (BaseEntity e : entitiesInAttackRange) {\n\t\t\tif (e.getTeam() == bc.getEnemyTeam()) {\n\t\t\t\tif (e.isHero()) {\n\t\t\t\t\theroesInRange.add((BaseEntity) e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tBaseEntity woundedHero = null;\n\t\tif (heroesInRange.size() > 0)\n\t\t\twoundedHero = heroesInRange.stream().min((a, b) -> Integer.compare(a.getHealth(), b.getHealth())).get();\n\n\t\tTarget target = new Target();\n\t\ttarget.setEntity(woundedHero);\n\t\ttarget.setAbility(h.getAbility(0));\n\t\tthis.context.setTarget(target);\n\t}", "public void goToSprite(Sprite target) { \n goToXY(target.pos.x,target.pos.y);\n }", "@Override\n public void run() {\n destination nextState = desembarque.whatShouldIDo(id,finalDest, nMalasTotal,log);\n bagCollect getBag = null;\n switch (nextState) {\n case WITH_BAGGAGE:\n \n // System.out.println(\"tenho bagagem -----------------\");\n do {\n if ( (getBag=recolha.goCollectABag(id,log) ) == bagCollect.MINE) {\n nMalasEmPosse++;\n }\n //System.out.println(\"ID: \" + id + \" posse: \" + nMalasEmPosse + \" total: \" + nMalasTotal);\n //System.out.println(getBag.toString());\n\n } while (nMalasEmPosse < nMalasTotal && getBag != bagCollect.NOMORE);\n if (nMalasEmPosse < nMalasTotal) {\n recolha.reportMissingBags(id, nMalasTotal - nMalasEmPosse,log);\n }\n transicao.goHome(id,log);\n break;\n case IN_TRANSIT:\n int ticket; //bilhete para entrar no autocarro.\n ticket = transferencia.takeABus(log,id);\n auto.enterTheBus( log,ticket,id);\n auto.leaveTheBus(id, log,ticket);\n transicao.prepareNextLeg(id,log);\n break;\n case WITHOUT_BAGGAGE:\n transicao.goHome(id,log);\n break;\n }\n }", "private void bombDifficulty(int maxBombs) {\r\n int randomRow;\r\n int randomCol;\r\n for(int bombAmount = 0; bombAmount < maxBombs;){\r\n randomRow = rand.nextInt(map.length-1);\r\n randomCol = rand.nextInt(map[0].length-1);\r\n if(map[randomRow][randomCol].getSafe() == false){\r\n //Do nothing. Checks if same row col is not chosen again\r\n }\r\n else {\r\n map[randomRow][randomCol].setSafe(false);\r\n if (TESTING_MODE) {\r\n map[randomRow][randomCol].setVisual(bomb);\r\n\r\n }\r\n bombAmount++;\r\n }\r\n }\r\n }", "protected void attackEnemy(Path toOp) {\n int opX = toOp.getStep(toOp.getLength() - 1).getX();\n int opY = toOp.getStep(toOp.getLength() - 1).getY();\n if (this.player.getX() == opX || this.player.getY() == opY) {\n // in the same row or column\n if (toOp.getLength() <= this.player.getFirePower() + 1) {\n // and is reachable\n this.player.placeBomb(map);\n// System.out.println(\"Player #\"+player.getPID()+\" will attack block [\"+opX+\", \"+opY+\"]\");\n }\n }\n }", "public Water_Hero(RefLinks refLink, float x, float y)\r\n {\r\n ///Apel al constructorului clasei de baza\r\n super(refLink, x,y, Character.DEFAULT_CREATURE_WIDTH, Character.DEFAULT_CREATURE_HEIGHT);\r\n\r\n ///Seteaza imaginea de start a eroului\r\n image = Assets.heroLeft;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea implicita(normala)\r\n normalBounds.x = 16;\r\n normalBounds.y = 16;\r\n normalBounds.width = 16;\r\n normalBounds.height = 32;\r\n\r\n ///Stabilieste pozitia relativa si dimensiunea dreptunghiului de coliziune, starea de atac\r\n attackBounds.x = 10;\r\n attackBounds.y = 10;\r\n attackBounds.width = 38;\r\n attackBounds.height = 38;\r\n\r\n jumpingTimer = new Timer();\r\n\r\n lista_dinamic_element = new ArrayList<CollisionItem>();\r\n\r\n lista_static_element = new ArrayList<CollisionItem>();\r\n list_fire = new ArrayList<CollisionItem>();\r\n }", "public void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n puntiFelicita -= 30;\n soldiTam -= 150;\n }\n case 2 -> {\n puntiVita += 30;\n puntiFelicita -= 15;\n soldiTam -= 70;\n }\n case 3 -> {\n puntiVita += 10;\n puntiFelicita -= 5;\n soldiTam -= 40;\n }\n }\n checkStato();\n }", "TrgPlace getTarget();", "private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }", "public void jump()\r\n\t{\t\r\n\t\t//que pasa si morimos:\r\n\t\tif (gameOver)\r\n\t\t{\t//si morirmos repintamos el pajaro\r\n\t\t\tif (Menu.jugador.equals(\"cide\") || Menu.jugador.equals(\"Cide\") || Menu.jugador.equals(\"CIDE\")) {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 75, 75);\r\n\t\t\t} else {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 50, 50);\r\n\t\t\t}\r\n\t\t\t//limiamos las columnas que se habian pintado antes\r\n\t\t\tcolumns.clear();\r\n\t\t\t//movimiento a cero\r\n\t\t\tyMotion = 0;\r\n\t\t\t//puntuacion a cero\r\n\t\t\tscore = 0;\r\n\t\t\t//creacion de las nuevas columnas\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\t//vivimos\r\n\t\t\tgameOver = false;\r\n\t\t}\r\n\r\n\t\t//ymotion es el salto del pajaro\r\n\t\tif (!started)\r\n\t\t{\r\n\t\t\tstarted = true;\r\n\t\t}\r\n\t\telse if (!gameOver)\r\n\t\t{\r\n\t\t\tif (yMotion > 0) {\r\n\t\t\t\tyMotion = 0;\r\n\t\t\t}\r\n\t\t\tyMotion -= 10;\r\n\t\t}\r\n\t}" ]
[ "0.64476013", "0.630486", "0.6034359", "0.60337514", "0.60249746", "0.6007852", "0.58734095", "0.586343", "0.58628726", "0.5851951", "0.5843623", "0.582788", "0.5820788", "0.58144236", "0.58070827", "0.5756838", "0.57048", "0.57021517", "0.5689534", "0.5667478", "0.5664562", "0.56445056", "0.5604923", "0.55995", "0.5590576", "0.5585193", "0.5579886", "0.55781186", "0.55700463", "0.5567068", "0.55368835", "0.5530621", "0.5518468", "0.5506922", "0.55052954", "0.5499866", "0.54989684", "0.54778576", "0.54467434", "0.54297227", "0.5406528", "0.540124", "0.5400213", "0.5397802", "0.53886485", "0.5387847", "0.5372744", "0.53724545", "0.5371545", "0.5367076", "0.5358003", "0.5357979", "0.5353423", "0.5343785", "0.5341162", "0.5339464", "0.532251", "0.5303574", "0.5299996", "0.5291768", "0.52879447", "0.52867573", "0.52830935", "0.52823275", "0.52773905", "0.5274391", "0.5273326", "0.5266208", "0.52630806", "0.52572155", "0.5249053", "0.5248568", "0.52448606", "0.5242736", "0.5236069", "0.52360594", "0.5232275", "0.5232008", "0.52309906", "0.5226133", "0.52256435", "0.5224379", "0.52231187", "0.5218824", "0.5217854", "0.52131873", "0.52059984", "0.52038586", "0.51964736", "0.51897466", "0.51883274", "0.51842594", "0.51818395", "0.51815635", "0.51736593", "0.51702166", "0.51680136", "0.5167595", "0.5166535", "0.5166225" ]
0.5363884
50
Mencari cell yang terdapat power up
private Cell searchPowerUp() { for (Cell[] row : gameState.map) { for (Cell column : row) { if (column.powerUp != null) return column; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void powerdown() {\n monitor.sendPowerdown();\n }", "void powerOn();", "public void power()\r\n {\r\n powerOn = true;\r\n }", "@Override\n\tpublic void powerUp(int PowerId) {\n\n\t}", "public void power() {\r\n\t\tpowerOn = !powerOn;\r\n\t}", "public void setPowerUp(object_type powerUp) {\n this.powerUp = powerUp;\n }", "@Override\r\n\tpublic void power() {\n\t\tSystem.out.println(\"Power off\");\r\n\t\t\r\n\t}", "private void newPowerUp() {\r\n int row = 0;\r\n int column = 0;\r\n do {\r\n row = Numbers.random(0,maxRows-1);\r\n column = Numbers.random(0,maxColumns-1);\r\n } while(isInSnake(row,column,false));\r\n powerUp = new Location(row,column,STOP);\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }", "@Override\r\n\tpublic void powerOff() {\n\r\n\t\tSystem.out.println(\"ig tv power off\");\r\n\r\n\t}", "@Override\r\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"ig tv power on\");\r\n\t}", "public void deactivatePowerup()\r\n\t{\r\n\t\thasPowerup = false;\r\n\t\tcurrentPowerup = null;\r\n\t}", "public void setPowerup(Powerup p)\n\t{\n\t\titsPowerup = p;\n\t}", "@Override\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"samsongTV powerOn\");\n\n\t}", "public void powerOn() \n {\n try \n {\n // your code here\n \tSystem.out.println(\"Powering on virtual machine '\"+vm.getName() +\"'. Please wait...\"); \n \tTask t=vm.powerOnVM_Task(null);\n \tif(t.waitForTask()== Task.SUCCESS)\n \t{\n\t \tSystem.out.println(\"Virtual machine powered on.\");\n\t \tSystem.out.println(\"====================================\");\n \t}\n \telse\n \t\tSystem.out.println(\"Power on failed / VM already powered on...\");\n } \n catch ( Exception e ) \n { \n \tSystem.out.println( e.toString() ) ;\n }\n }", "public void activatePowerup(Powerup p)\r\n\t{\r\n\t\thasPowerup = true;\r\n\t\tcurrentPowerup = p;\r\n\t}", "@Override\n\tpublic void powerOff() {\n\t\tSystem.out.println(\"samsongTV powerOff\");\n\n\t}", "EDataType getActivePower();", "public void changePowerUp(boolean powerUpQuestion)\n {\n this.currentState = ClientStateName.POWERUP;\n setChanged();\n notifyObservers(currentState);\n }", "public void move() {\n\t\t\tRandom rand = new Random();//random number generator\n\t\t\tint value = rand.nextInt(500000);//there is a 1 in 500000 chance there will be a new powerup every frame.\n\t\t\tif (value==0) {//if the value is 0\n\t\t\t\tRandom ran = new Random();//make a random number generator and a power up vairable\n\t\t\t\tPowerUp currentPowerUp = null;\n\t\t\t\tint type = ran.nextInt(3);//switch the 1 for the amount of types made.\n\t\t\t\tif (type==0) {//add the powerup depending on the random number. There are 3 types\n\t\t\t\t\tcurrentPowerUp = new PowerUp(healthPowerUp, 0);//this adds a life\n\t\t\t\t}\n\t\t\t\telse if (type==1) {\n\t\t\t\t\tcurrentPowerUp = new PowerUp(longPowerUp, 1);//this makes the slider wider\n\t\t\t\t} else if (type==2) {\n\t\t\t\t\tcurrentPowerUp = new PowerUp(bonusPointsPowerUp, 2);//this just adds points\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//set x and y\n\t\t\t\t//make a random x\n\t\t\t\tint newX = ran.nextInt(401) - 201 + GamePlay.getScreenWidth()/2; //-200 to 200 variance from center\n\t\t\t\tint newY = ran.nextInt(201) - 101 + GamePlay.getScreenHeight()/4;//-100 to 100 variance from the 25% of top distance line.\n\t\t\t\tif (currentPowerUp!=null) {\n\t\t\t\t\tcurrentPowerUp.setX(newX);\n\t\t\t\t\tcurrentPowerUp.setY(newY);\n\t\t\t\t\tpowerUps.add(currentPowerUp);//add the powerups to an array list\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"PowerUp error.\");//if the variable is null, something went wrong.\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//move all powerUps down by ball speed\n\t\t\tfor (PowerUp power: powerUps) {\n\t\t\t\tpower.setY(power.getY() + ballSpeed);\n\t\t\t}\n\t\t\t\n\t\t\t//check if the powerups are off the screen. remove if they are. \n\t\t\tfor (int r = powerUps.size()-1; r>=0; r--) {\n\t\t\t\tif (powerUps.get(r).getY() > GamePlay.getScreenHeight()-h) {\n\t\t\t\t\tpowerUps.remove(r);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//death of a ball\n\t\t\tif (ball.getY()>GamePlay.getScreenHeight() && pause==false) {\n\t\t\t\tdeath();\n\t\t\t}\n\t\t\t\n\t\t\t//no bricks left\n\t\t\tif (blocks.size()==0) {\n\t\t\t\t//you leveled up!\n\t\t\t\tlevelUp();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//wall collision check for ball\n\t\t\t//right wall\n\t\t\tif (ball.rightCollide(GamePlay.getScreenWidth())) {//seperated for later use if wanted.\n\t\t\t\tballVX*=-1;\n\t\t\t} else if (ball.leftCollide(0)) {//left wall\n\t\t\t\tballVX*=-1;\n\t\t\t}\n\t\t\t\n\t\t\tif (ball.topCollide(0)) {//top wall\n\t\t\t\tballVY*=-1;\n\t\t\t} //dont check bottom wall because that is the death of a ball.\n\t\t\t\n\t\t\t//collision with the slider.\n\t\t\tif (ball.getRect().intersects(slider.getRect()) && ball.getY()+ball.getHeight() <= slider.getY()+ballSpeed) {//intersected bool needed\n\t\t\t\tballVY*=-1;\n\t\t\t\tballVX+=sliderVX;//add the slider velocity to the ball velocity, giving user some control over angle. \n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//collision with the powerups\n\t\t\t\n\t\t\tfor (int a = powerUps.size()-1; a>=0; a--) {//iterate thrpough the powerups\n\t\t\t\tPowerUp power = powerUps.get(a);\n\t\t\t\tif (power.getRect().intersects(slider.getRect())) {//if the powerups rect intersects, the slider caught it. Remove from screen\n\t\t\t\t\t//THIS MEANS THEY CAUGHT THE POWERUP\n\t\t\t\t\tif (power.getType()==\"HEALTH\" && power.getIntersected()==false) {\n\t\t\t\t\t\tpower.setIntersected(true);\n\t\t\t\t\t\tif (lives<5)\n\t\t\t\t\t\t\tlives+=1;//add a life up to 5\n\t\t\t\t\t\tpowerUps.remove(a);\n\t\t\t\t\t} else if (power.getType()==\"LONG\" && power.getIntersected()==false) {\n\t\t\t\t\t\tpower.setIntersected(true);\n\t\t\t\t\t\textended = true;//extended flag to say the slider is extended. extend the slider's width by the adjust amount preset globally\n\t\t\t\t\t\tslider.resize(slider.getWidth()+adjust, slider.getHeight());\n\t\t\t\t\t\tslider.setX(slider.getX()-adjust/2);\n\t\t\t\t\t\textendTimer.restart();//restart the entend timer\n\t\t\t\t\t\tpowerUps.remove(a);\n\t\t\t\t\t} else if (power.getType()==\"BONUS\" && power.getIntersected()==false) {\n\t\t\t\t\t\tpower.setIntersected(true);\n\t\t\t\t\t\tscore+=100;//add a 100 points.\n\t\t\t\t\t\tpowerUps.remove(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//collision with blocks\n\t\t\t\n\t\t\tboolean changed = false;//this is a flag to see if any collisions occured this frame\n\t\t\tfor (Block block:blocks) {\n\t\t\t\tRectangle r = block.getRect();\t\t\n\t\t\t\tif (r.intersects(ball.getRect())) {//if the rects intersected, something hit something. However, we don't know from what direction\n\t\t\t\t\t//since the vy is always going to be by 1, we can check if it is equal. There is no multiples to deal with. \n\t\t\t\t\t\n\t\t\t\t\t//this checks if it was colliding from the bottom. Check the bottom edge of block and top of the ball\n\t\t\t\t\tif (ball.getY() + 2 >= block.getBottom() && ball.getY() -2 <= block.getBottom() && ball.getIntersected()==false) {\n\t\t\t\t\t\t//bottom collision\n\t\t\t\t\t\tballVY*=-1;//reflect back\n\t\t\t\t\t\tscore += block.downColor();//change the color, adjust score\n\t\t\t\t\t\tball.setIntersected(true);//set the intersected flag so it will not trigger again for the same stimuli\n\t\t\t\t\t\tball.setY(ball.getY() + ballVY);//set the y to remove the ball from collision\n\t\t\t\t\t\tchanged=true;//set the changed flag to true\n\t\t\t\t\t\thitSound.play();//play a sound\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (ball.getY() + ball.getHeight() + 2 >=block.getTop() && ball.getY() + ball.getHeight() -2 <=block.getTop() && ball.getIntersected()==false) {\n\t\t\t\t\t\t//this checks if it was colliding on the top. Check bottom edge of ball and top of block.\n\t\t\t\t\t\tballVY*=-1;//reflect back\n\t\t\t\t\t\tscore += block.downColor();//change the color, adjust score\n\t\t\t\t\t\tball.setIntersected(true);//set the intersected flag so it will not trigger again for the same stimuli\n\t\t\t\t\t\tball.setY(ball.getY() + ballVY);//set the y to remove the ball from collision\n\t\t\t\t\t\tchanged=true;//set the changed flag to true\n\t\t\t\t\t\thitSound.play();//play a sound\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (changed==false && ball.getIntersected()==false) {\n\t\t\t\t\t\t//this must mean it is on the left or right\n\t\t\t\t\t\t//it doesn't matter which one, the change is the exact same!\n\t\t\t\t\t\tballVX*=-1;//flip the x direction\n\t\t\t\t\t\tscore+=block.downColor();//change color, adjust score\n\t\t\t\t\t\tball.setIntersected(true);//set the intersected flag\n\t\t\t\t\t\tball.setX(ball.getX() + ballVX);\n\t\t\t\t\t\tchanged=true;//set the changed flag\n\t\t\t\t\t\thitSound.play();//play the sound\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}//end the for.\n\t\t\tif (changed==false) {//if no changes, reset the flag.\n\t\t\t\tball.setIntersected(false);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//move everything as per velocity\n\t\t\tif (slider.getX() > 10 && sliderVX<0) {\n\t\t\t\tslider.setX(slider.getX() + sliderVX*ballSpeed*2);//the slider can move twice as fast as the ball.\n\t\t\t} else if ((slider.getX()+slider.getWidth()) < GamePlay.getScreenWidth()-10 && sliderVX>0) {\n\t\t\t\tslider.setX(slider.getX() + sliderVX*ballSpeed*2);\n\t\t\t}\n\t\t\tif (ready) {\n\t\t\t\tball.setX(ball.getX() + ballVX);\n\t\t\t\tball.setY(ball.getY() + ballVY);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "@Override\n public void activatePowerUp() {\n myGame.getStatusDisplay().getMyProgress().updateScoreMultiplier(SCORE_MULTIPLIED_COUNTER);\n }", "public void checkPowerups(final Integer tile){\n if(powerup_location.contains(tile)){\n Integer randomPowerup = returnRandom(0,4);\n switch (randomPowerup){\n case(0):\n showTimedAlertDialog(\"Powerup Picked!\", \"+HEALTH\", 3);\n if(hp<3){\n hp = hp +1;\n DrawHP();\n }\n Lejos.makeSound_Powerup_hp();\n break;\n case(1):\n showTimedAlertDialog(\"Powerup Picked!\", \"+BOMBS\", 3);\n if(bombs<3){\n bombs = bombs+1;\n DrawBombs();\n }\n Lejos.makeSound_Powerup_bomb();\n break;\n case(2):\n showTimedAlertDialog(\"Powerup Picked!\", \"CONFUSION\", 3);\n powerup_confusion = true;\n ImageView img_confusion = findImageButton(\"confusion_container\");\n img_confusion.setImageDrawable(getResources().getDrawable(R.drawable.confusion));\n Lejos.makeSound_Powerup_confusion();\n break;\n case(3):\n showTimedAlertDialog(\"Powerup Picked!\", \"GOD MODE\", 3);\n powerup_godmode = true;\n ImageView img_god = findImageButton(\"godmode_container\");\n img_god.setImageDrawable(getResources().getDrawable(R.drawable.godmode));\n Lejos.makeSound_Powerup_godmode();\n break;\n }\n powerup_location.remove(tile);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n MultiplayerManager.getInstance().SendMessage(\"powerup_remove \" + tile.toString());\n }\n }, 1000);\n }\n }", "void addEventPowerUp(DefaultPowerUp powerUp);", "@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }", "private NotifySuspendedCommandControllerPowerState() {\n\n\t}", "public void powerOff() \n {\n try \n {\n // your code here\n \tSystem.out.println(\"Powering off virtual machine '\"+vm.getName() +\"'. Please wait...\"); \n \tTask t=vm.powerOffVM_Task();\n \tif(t.waitForTask()== Task.SUCCESS)\n \t{\n\t \tSystem.out.println(\"Virtual machine powered off.\");\n\t \tSystem.out.println(\"====================================\");\n \t}\n \telse\n \t\tSystem.out.println(\"Power off failed / VM already powered on...\");\n \t\n } catch ( Exception e ) \n { \n \tSystem.out.println( e.toString() ) ; \n }\n }", "public void raise(){\r\n elevatorTalon1.set(basePWM);\r\n elevatorTalon2.set(basePWM * pwmModifier);\r\n }", "public void sendPowerUpdate()\n\t{\n\t\tif (!this.worldObj.isRemote)\n\t\t{\n\t\t\tPacketHandler.sendPacketToClients(ResonantInduction.PACKET_TILE.getPacket(this, SimplePacketTypes.RUNNING.name, this, this.functioning), worldObj, new Vector3(this), 64);\n\t\t}\n\t}", "@Override\n public void deactivatePowerUp() {\n powerController.updatePowerUpHappening();\n myGame.getStatusDisplay().getMyProgress().updateScoreMultiplier(NORMAL_SCORE_COUNTER);\n }", "public object_type getPowerUp() {\n return powerUp;\n }", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tTXZPowerManager\n\t\t\t\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t\t\t\t.notifyPowerAction(\n\t\t\t\t\t\t\t\t\t\t\t\tPowerAction.POWER_ACTION_WAKEUP);\n\t\t\t\t\t\t\t\tLog.d(\"RituNavi\", \"ͬ������������\");\n\t\t\t\t\t\t\t\tToast.makeText(MainTestActivity.this,\n\t\t\t\t\t\t\t\t\t\t\"ͬ������������\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\t// showProgress();\n\t\t\t\t\t\t\t}", "@Test\n public void canUseSpecialPowerTrue() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n workerHephaestus.build(nextWorkerCell);\n assertTrue(workerHephaestus.canUseSpecialPower());\n }", "public void setPowerups(Powerup powerups) {\n this.powerups = powerups;\n }", "public void placePowerStation() {\n this.powerStation = true;\n\n }", "void unsetPowerBox();", "public void askForPowerUpAsAmmo() {\n mainPage.setRemoteController(senderRemoteController);\n mainPage.setMatch(match);\n if (!mainPage.isPowerUpAsAmmoActive()) { //check if there is a PowerUpAsAmmo already active\n Platform.runLater(\n () -> {\n try {\n mainPage.askForPowerUpAsAmmo();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n );\n }\n\n }", "@Test\n public void canUseSpecialPowerFalseNoMoveNoBuild() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n //no move, no build\n assertFalse(workerHephaestus.canUseSpecialPower());\n }", "@Test\n public void canUseSpecialPowerFalseNoBuild() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.setHasMoved(true);\n //no Build\n assertFalse(workerHephaestus.canUseSpecialPower());\n }", "public void goToSleep() {\n mPowerManager.goToSleep(SystemClock.uptimeMillis());\n }", "public void updateEnergy(boolean up){\n\t\tif (up){\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbChange\");\n\t\t}\n\t\telse{\n\t\t\tElement elfade = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrbFade\");\n\t\t\telfade.startEffect(EffectEventId.onCustom,null,\"OrbFade\");\n\t\t\tElement el = nifty.getScreen(\"hud\").findElementByName(\"EnergyOrb\");\n\t\t\tel.startEffect(EffectEventId.onCustom);\n\t\t}\n\t}", "private void eToPower()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.eToPower ();\n\t\t\tupdateText();\n\t\t\tsetLeftValue();\n\t\t}\n\t}", "public abstract void PowerOn();", "public static void sleepReset()\r\n\t{\r\n\t\t//FileRegister.setDataInBank(2, Speicher.getPC() + 1);\r\n\t\t//Speicher.setPC(Speicher.getPC()+1);\r\n\t\tFileRegister.setDataInBank(1, 8, FileRegister.getBankValue(1, 8) & 0b00001111); // EECON1\r\n\t}", "public void afectarPowerUp(PowerUp p) {\n\t\tp.activar();\n\t\tp.eliminar();\n\t}", "public void setHasPowerUp(boolean hasPowerUp) {\n\t\tthis.hasPowerUp = hasPowerUp;\n\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString cell = etCell.getText().toString();\n\t\t\t\tapp.getClient().sendConfMsg(cell);\n\t\t\t\tThread thread = new Thread(new Runnable() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tint tick = 60;\n\t\t\t\t\t\twhile (tick != 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\ttick--;\n\t\t\t\t\t\t\t\tMessage message = new Message();\n\t\t\t\t\t\t\t\tmessage.what = tick;\n\t\t\t\t\t\t\t\thUI.sendMessage(message);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t\tthread.start();\n\t\t\t}", "public void teleopPeriodic() {\n driverScreen.updateLCD();\n }", "public boolean doPowerUpStuff() {\n System.out.println(\"* Performing robot stuff that we would do on power up.\");\n // Home motors, move stuff to starting position, etc.\n // System.out.println(\"Robot wheelbase in inches: \" + m_robotGeometry.wheelbaseInches);\n return true;\n }", "public void getPowerUp(PowerUp powerUp) \n\t{\n\t\tswitch(powerUp.getType())\n\t\t{\n\t\t\tcase 0:\n\t\t\t\t\n\t\t\t\tif(weapon != PROTON_WEAPON)\n\t\t\t\t\tbulletPool.clear(weapon);\n\t\t\t\t\n\t\t\t\tweapon = PROTON_WEAPON;\n\t\t\t\tfireRate = 5;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1:\n\t\t\t\t\n\t\t\t\tif(weapon != VULCAN_WEAPON)\n\t\t\t\t\tbulletPool.clear(weapon);\n\t\t\t\t\n\t\t\t\tweapon = VULCAN_WEAPON;\n\t\t\t\tfireRate = 3;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\t\n\t\t\t\tif(weapon != GAMMA_WEAPON)\n\t\t\t\t\tbulletPool.clear(weapon);\n\t\t\t\t\n\t\t\t\tweapon = GAMMA_WEAPON;\n\t\t\t\tfireRate = 8;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\thealth += (health+20>100)?0: 20;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\t\n\t\t\t\tif(speedBoost == 0)\n\t\t\t\t\tspeedBoost = 3;\n\t\t\t\t\n\t\t\t\tspeedBoostCounter =0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\tSoundManager.getInstance().playSound(\"powerup\", false);\n\t}", "private void hours(){\n \n companyDriver.startHourStage();\n this.close();\n }", "void onApPowerStateChange(PowerState state);", "public void Power() {\n if (Estado == false){\r\n Estado = true;\r\n } else if (Estado == true){\r\n Estado = false;\r\n }\r\n }", "public void powerOff() { //power_off\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.OFF));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.OFF) {\n isTurningOff = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }", "public void bridge$lambda$0$KswMcuListener() {\n SystemProperties.set(\"sys.powerctl\", \"shutdown\");\n }", "public void update() {\r\n\r\n\t\tfor(int p=0;p<200;p++) {\r\n\t\t\tfor(int k=0;k<200;k++) {\r\n\r\n\t\t\t\tif(tileMap[p][k].getBuilding()!=null) {\r\n\t\t\t\t\tBuilding m=tileMap[p][k].getBuilding();\r\n\t\t\t\t\t//update the buildings\r\n\t\t\t\t\ttileMap[p][k].getBuilding().update();\r\n\r\n\t\t\t\t\t//Check if battery is giving off power\r\n\t\t\t\t\tif( (m instanceof LowTierBattery) || (m instanceof LargeBattery) || (m instanceof IndustrialGradeBattery) ) {\r\n\r\n\t\t\t\t\t\t//If it's a Battery\r\n\t\t\t\t\t\tLowTierBattery f =(LowTierBattery) tileMap[p][k].getBuilding();\t\r\n\r\n\t\t\t\t\t\t//Check if its getting power and charging\r\n\t\t\t\t\t\tif(checkPowerLine(p,k,3)) {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,true); //If it is then give off power\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tpowerSwitcher(p,k,2,f.getCapacity()>0); ///if it isnt then only give power if there is capacity\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//If a building is generating power add power to tiles;\r\n\t\t\t\t\t}else if( (m instanceof SteamEngine) || (m instanceof HandCrankGenerator) || (m instanceof SteamTurbine) || (m instanceof WindTurbine) ) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,3,((PoweredBuilding) m).getPower()); //Adds power or remove power based on the status of the generators\r\n\r\n\t\t\t\t\t\t//Powerline only get power from other powerline or buildings\r\n\t\t\t\t\t}else if(m instanceof PowerLine) {\r\n\r\n\t\t\t\t\t\tpowerSwitcher(p,k,5,checkPowerLine(p,k,5)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t}else if(m instanceof LargePowerLine) {\r\n\t\t\t\t\t\tpowerSwitcher(p,k,10,checkPowerLine(p,k,10)); //Checks if the powerline is powered by other buildings then give it to powerSwitch method\r\n\r\n\t\t\t\t\t\t//If its just a powered building enable it if the tile under it is powered;\r\n\t\t\t\t\t}else if((m instanceof PoweredBuilding)) {\r\n\t\t\t\t\t\t((PoweredBuilding) tileMap[p][k].getBuilding()).setPower(tileMap[p][k].getPowered());\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t\t//Pipe movement\r\n\t\t\t\t\tif(m instanceof Pipe ) {\r\n\t\t\t\t\t\tpipeCheck(p,k,m);\r\n\t\t\t\t\t}else if(m.getOutputInventorySize()>0) {\r\n\t\t\t\t\t\tbuildingPipeCheck(p,k,m);\r\n\t\t\t\t\t}\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public boolean togglePower() {\r\n if(power) {\r\n pioneerclient.sendCommand(\"PF\");\r\n return false;\r\n } else {\r\n pioneerclient.sendCommand(\"PO\");\r\n return true;\r\n }\r\n\t}", "public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}", "void setPowerBox(boolean powerBox);", "void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }", "public void shutdownProcess() {\n Timer shutdownTimer = new Timer();\n TimerTask shutdownTask = new TimerTask() {\n @Override\n public void run() {\n finishShutdown();\n }\n };\n if (this.offlineButton.isSelected() == false) {\n this.online = false;\n this.statusLed.setStatus(\"warning\");\n this.setOutputPower(0);\n this.offlineButton.setSelected(true);\n }\n this.statusLed.setSlowBlink(true);\n this.offlineButton.setDisable(true);\n this.shutdownButton.setDisable(true);\n shutdownTimer.schedule(shutdownTask, 10000l);\n }", "@Override\n\tpublic void upgrade() {\n\t\tthis.power += 5;\n\t}", "private View.OnClickListener clickPower() {\n return new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (v.getTag() != null) {\n Tag buttonTag = (Tag) v.getTag();\n DeviceDataSet dataSet = buttonTag.getDataSet();\n\n int id = dataSet.getId();\n String type = dataSet.getType();\n int state = dataSet.getState();\n\n state++;\n if (state > INT_STATUS_EIN) {\n state = INT_STATUS_AUS;\n }\n String msgState = rh.updateSingleValue(type, TAG_STATE, Integer.toString(state), id);\n if (!catchError(context, msgState)) {\n switchImage(type, state, (ImageView) v);\n dataSet.setState(state);\n buttonTag.setDataSet(dataSet);\n v.setTag(buttonTag);\n }\n buttonChanger(id, type);\n }\n }\n };\n }", "protected void onGetRatedPowerConsumptionOfHPUnitInWintertime(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void setPower(boolean power){\n this.power = power;\n }", "public void onTriggerChange() {\n findViewById(R.id.temp).post(new Runnable() {\n public void run() {\n ConsumerIrManager mCIR = ScaryUtil.getConsumerIRService(getApplicationContext());\n if (m_Inst.power) {\n TransmissionCode data = ScaryUtil.getIRCode(m_Inst.sequence, m_Inst.temp); // (TransmissionCode)samsung.get(m_Inst.temp);\n ScaryUtil.transmit(getApplicationContext(),data);\n }\n }\n });\n }", "private static void setNormalState() {\n InitialClass.arduino.serialWrite('0');\n InitialClass.arduino.serialWrite('6');\n InitialClass.arduino.serialWrite('2');\n InitialClass.arduino.serialWrite('8');\n InitialClass.arduino.serialWrite('C');\n InitialClass.arduino.serialWrite('A');\n InitialClass.arduino.serialWrite('4');\n /// hide animated images of scada\n pumpForSolutionOn.setVisible(false);\n pumpForTitrationOn.setVisible(false);\n mixerOn.setVisible(false);\n valveTitrationOpened.setVisible(false);\n valveSolutionOpened.setVisible(false);\n valveWaterOpened.setVisible(false);\n valveOutOpened.setVisible(false);\n\n log.append(\"Клапана закрыты\\nдвигатели выключены\\n\");\n\n }", "public void setPower(int power) {\n\t\t\r\n\t}", "@Test\n public void canUseSpecialPowerFalseNoMove() {\n nextWorkerCell.setLevel(0);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n //no move\n workerHephaestus.build(nextWorkerCell);\n assertFalse(workerHephaestus.canUseSpecialPower());\n }", "public PowerUp()\n {\n powerUp = new Rectangle();\n Random gen = new Random();\n int x = gen.nextInt(9);\n switch(x){\n case 0: type = \"Life\"; break;\n case 1: type = \"Laser\"; break;\n case 2: type = \"Gun\"; break;\n case 3: type = \"Long\"; break;\n case 4: type = \"Multi\"; break;\n case 5: type = \"Catch\"; break;\n case 6: type = \"Slow\"; break;\n case 7: type = \"Flip\"; break;\n case 8: type = \"Bomb\"; break;\n }\n text = new Rectangle();\n }", "public void setPower(JsonObject instanceInfo) {\n itemPower = instanceInfo.getAsJsonObject(\"instance\").getAsJsonObject(\"data\").getAsJsonObject(\"primaryStat\").getAsJsonPrimitive(\"value\").toString();\n }", "@Override\n\tpublic void exec() {\n\t\tauto.changerEtat(\"trS\");\n\t}", "public void aggiornaMossa(Cell cella) {\n currentMove.setIdPawn(currentPawn);\n currentMove.setTargetX(cella.getX());\n currentMove.setTargetY(cella.getY());\n Platform.runLater(() -> {\n// jumpMove.setDisable(true);\n submitAction.setDisable(true);\n });\n\n }", "public void onWakeUp() {\n\t\tbehaviour.onWakeUp();\n\t}", "public void uruchomGre()\n\t{\n\t\tustawPojazdNaPoczatek();\n\t\tplanszaWidokHND.repaint();\n\t\twToku = true;\n\t\tzegar.start();\n\t\tpauza = false;\n\t}", "private void setScreenProperty(boolean on) throws DeviceNotAvailableException {\n CLog.d(\"set svc power stay on \" + on);\n mTestDevice.executeShellCommand(\"svc power stayon \" + on);\n }", "private void lightAvailable(Cell myCell, Button myButton) {\n Platform.runLater(() -> {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j].setDisable(true);\n }\n }\n int x = myCell.getX();\n int y = myCell.getY();\n myButton.setDisable(false);\n myButton.setStyle(\"-fx-border-color:red\");\n myButton.setDisable(true);\n for (int i = x - 1; i < x + 2; i++) {\n for (int j = y - 1; j < y + 2; j++) {\n //control if the cell exists\n if (((i != x) || (j != y)) && (i >= 0) && (i <= 4) && (j >= 0) && (j <= 4)) {\n //control there is not dome\n if ((!getTable().getTableCell(i, j).isComplete())) {\n //control there is not a pawn of my same team\n if (!((getTable().getTableCell(i, j).getPawn() != null) &&\n (getTable().getTableCell(i, j).getPawn().getIdGamer() == myCell.getPawn().getIdGamer()))) {\n cells.add(getTable().getTableCell(i, j));\n }\n }\n }\n }\n }\n if (getGod().getName().equalsIgnoreCase(\"zeus\") && effetto && currentMove.getAction() == Mossa.Action.BUILD) {\n myButton.setStyle(\"-fx-border-color:blue\");\n myButton.setDisable(false);\n myButton.setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:yellow\");\n });\n myButton.setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:blue\");\n });\n } else {\n for (Cell lightMe : cells) {\n\n bt[lightMe.getX()][lightMe.getY()].setDisable(false);\n bt[lightMe.getX()][lightMe.getY()].setStyle(\"-fx-border-color:yellow\");\n int a = lightMe.getX();\n int b = lightMe.getY();\n initButtons();\n bt[a][b].setOnAction(e -> {\n for (int c = 0; c < 5; c++) {\n for (int d = 0; d < 5; d++) {\n bt[c][d].setStyle(\"-fx-border-color:trasparent\");\n initButtons();\n }\n }\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:red\");\n button.setOnMouseClicked(null);\n button.setOnMouseEntered(null);\n button.setOnMouseExited(null);\n int x1 = GridPane.getRowIndex(button);\n int y1 = GridPane.getColumnIndex(button);\n aggiornaMossa(table.getTableCell(x1, y1));\n Platform.runLater(() -> {\n submitAction.setDisable(false);\n });\n });\n\n }\n }\n });\n }", "java.lang.String getTxpower();", "public void runShutdown() {\n readCharacteristic(blecharMap, GattAttributes.SHUTDOWN);\n }", "public static void poweroff(NetSocket socket) {\n String data = \"CS01*868807049006736*0008*POWEROFF,20190814114414I4021\";\n String deviceId = \"868807049006736\";\n send(socket, data, deviceId);\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n if(switchesSubsystem.readyToFire()) {\n \t\tSmartDashboard.putString(\"DB/String \"+0, \"ready to fire\");\n \t} else {\n \t\tSmartDashboard.putString(\"DB/String \"+0, \"reloading\");\n \t}\n \n SmartDashboard.putString(\"DB/String \"+1, \"Wound switch: \" + switchesSubsystem.isBarDown());\n \tSmartDashboard.putString(\"DB/String \"+2, \"Taut switch: \" + switchesSubsystem.isTaut());\n \tSmartDashboard.putString(\"DB/String \"+3, \"Fired switch: \" + switchesSubsystem.isLauncherFired());\n }", "public void powerOn() { //power_on\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.ON));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.ON) {\n isTurningOn = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }", "protected void onGetRatedPowerConsumptionOfHPUnitInSummertime(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void superCOPower(){\r\n SCOP = true;\r\n }", "@Override\r\n\tpublic void onMachine() {\n System.out.println(\"Please On the machine to cook \");\r\n grillmachine.setState(grillmachine.getOnState());\r\n\t}", "public void sendIOTCloudShutDownMssg() {\n \tTextDataMessage message = new TextDataMessage();\n message.setText(IOTCloudShutDownMssg);\n \n sendPublicMessage(message);\n }", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void turnOnCooler() {\n oilPompController.turnPompsOn();\n breakController.turnOff();\n mainPowerController.turnOn();\n supportPowerController.turnOn();\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n System.out.println(\"Waiting to stand up was interrupted.\");\n }\n supportPowerController.turnOff();\n System.out.println(\"System is running.\");\n }", "@Override\n public void powerOn() {\n if(isOn)System.out.println(\"The Projector is already ON!\");\n else{\n System.out.println(\"The Projector is now ON!\");\n isOn = true;\n }\n }", "public void switchPowerLevel()\n {\n // If power level is 1, set this.powerLevel to 3 - 1 = 2.\n // If power level is 2, set this.powerLevel to 3 - 2 = 1.\n this.powerLevel = (3 - this.powerLevel);\n }", "@Override\n protected void initialize() {\n Robot.powerCellManipulator.stopIntake();\n }", "public void ApplyMovement() {\n long currTime = SystemClock.uptimeMillis();\n if(currTime - lastUpdateTime < 16){\n return;\n }\n lastUpdateTime = currTime;\n\n\n double tl_power_raw = movement_y-movement_turn+movement_x*1.5;\n double bl_power_raw = movement_y-movement_turn- movement_x*1.5;\n double br_power_raw = -movement_y-movement_turn-movement_x*1.5;\n double tr_power_raw = -movement_y-movement_turn+movement_x*1.5;\n\n\n\n\n //find the maximum of the powers\n double maxRawPower = Math.abs(tl_power_raw);\n if(Math.abs(bl_power_raw) > maxRawPower){ maxRawPower = Math.abs(bl_power_raw);}\n if(Math.abs(br_power_raw) > maxRawPower){ maxRawPower = Math.abs(br_power_raw);}\n if(Math.abs(tr_power_raw) > maxRawPower){ maxRawPower = Math.abs(tr_power_raw);}\n\n //if the maximum is greater than 1, scale all the powers down to preserve the shape\n double scaleDownAmount = 1.0;\n if(maxRawPower > 1.0){\n //when max power is multiplied by this ratio, it will be 1.0, and others less\n scaleDownAmount = 1.0/maxRawPower;\n }\n tl_power_raw *= scaleDownAmount;\n bl_power_raw *= scaleDownAmount;\n br_power_raw *= scaleDownAmount;\n tr_power_raw *= scaleDownAmount;\n\n\n //now we can set the powers ONLY IF THEY HAVE CHANGED TO AVOID SPAMMING USB COMMUNICATIONS\n topLeft.setPower(tl_power_raw);\n bottomLeft.setPower(bl_power_raw);\n bottomRight.setPower(br_power_raw);\n topRight.setPower(tr_power_raw);\n }", "public void act() \n {\n setLocation(getX(),getY()+1);\n givePower();\n delete();\n }", "protected void takeDown(){\n\n\t}", "protected void takeDown(){\n\n\t}", "public void loop(){\n\n test1.setPower(1);\n test1.setTargetPosition(150);\n\n\n }", "public int up(int graus) {\r\n if (graus < 71) { //limite de elevação 85º\r\n if (graus < 10) {\r\n String up1 = \"!00\" + graus + \"U*\";\r\n System.out.println(\"UP = \" + up1);\r\n return serialPort.enviaDados(up1);\r\n } else {\r\n String up2 = \"!0\" + graus + \"U*\";\r\n System.out.println(\"UP = \" + up2);\r\n return serialPort.enviaDados(up2);\r\n }\r\n } else {\r\n System.out.println(\" EXCEDE O LIMITE DE ELEVAÇÃO PERMITIDO\");\r\n return 0;\r\n }\r\n }", "public void fall()\n {\n powerUp.setBounds(powerUp.x,powerUp.y + 2, 65, 29);\n text.setBounds(powerUp.x,powerUp.y + 2, 65, 29);\n }", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "@Override\r\n\tpublic void volume() {\n\t\tSystem.out.println(\"Turn up\");\r\n\t\t\r\n\t}", "public void enableKillSwitch(){\n isClimbing = false;\n isClimbingArmDown = false;\n Robot.isKillSwitchEnabled = true;\n }", "protected void execute() {\n \tRobot.chassisSubsystem.shootHighM.set(0.75);\n \tif(timeSinceInitialized() >= 1.25){\n \t\tRobot.chassisSubsystem.liftM.set(1.0);\n \t}\n }" ]
[ "0.6815057", "0.664108", "0.6527553", "0.6511345", "0.64032495", "0.63413256", "0.6329486", "0.63148886", "0.6280256", "0.6230064", "0.6228317", "0.61648154", "0.61327064", "0.61023164", "0.6092503", "0.60702306", "0.59931755", "0.59590584", "0.59452426", "0.59331286", "0.5913953", "0.59121984", "0.5908599", "0.590746", "0.58881223", "0.58605784", "0.58569014", "0.5845656", "0.5830593", "0.5793053", "0.5756591", "0.5735166", "0.5732864", "0.57315665", "0.5729754", "0.5718678", "0.5705189", "0.5700951", "0.56794685", "0.5679412", "0.56772125", "0.5676757", "0.5665824", "0.5655642", "0.56416076", "0.56329626", "0.56301314", "0.56284004", "0.5628365", "0.56281364", "0.56231534", "0.5618383", "0.56054693", "0.56044924", "0.5601412", "0.5595199", "0.55855656", "0.55458635", "0.5545178", "0.5540174", "0.55380434", "0.5531039", "0.5529983", "0.5511602", "0.54738003", "0.54561466", "0.54541266", "0.54508585", "0.54306406", "0.54140776", "0.54127365", "0.5403828", "0.540102", "0.5388648", "0.5378692", "0.5366284", "0.5361499", "0.5359732", "0.5357905", "0.5355651", "0.53527963", "0.5352642", "0.534998", "0.53481424", "0.534657", "0.5346317", "0.5346277", "0.5342345", "0.5339387", "0.5337015", "0.5325139", "0.5324705", "0.5324705", "0.53188753", "0.5317063", "0.531499", "0.5307955", "0.53066754", "0.5306029", "0.53053945" ]
0.54711616
65
Dari surrounding cells, dipilih cell buat move/dig
private Cell chooseCell(List<Cell> surroundingCells, int destinationX, int destinationY) { boolean diagonalChosen = false; Cell chosenCell = surroundingCells.get(0); int i = 0; // Mencari cell yang bisa membawa ke cell tujuan while (i < surroundingCells.size() && !diagonalChosen) { // Karena move diagonal bakal paling efektif, kalo bisa // diagonal yang dipilih yang diagonal. Cell currentCell = surroundingCells.get(i); if (between(currentCell.x, destinationX, currentWorm.position.x) && between(currentCell.y, destinationY, currentWorm.position.y)) { chosenCell = currentCell; if (currentCell.x != currentWorm.position.x && currentCell.y != currentWorm.position.y) { diagonalChosen = true; } } i++; } return chosenCell; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int cellFromDistance(int d) {\n int d2 = d - GUTTER_SIZE;\n if (d2 < 0) {\n return -1;\n } else {\n d2 /= (CELL_SIZE + GUTTER_SIZE);\n int next = cellDistance(d2 + 1);\n if (next - d <= GUTTER_SIZE)\n return -1;\n else\n return d2;\n }\n }", "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }", "public void setNeighbors(){\t\t\t\t\n\t\tint row = position[0];\n\t\tint column = position[1];\t\t\n\t\tif(column+1 < RatMap.SIDELENGTH){\n\t\t\teastCell = RatMap.getMapCell(row,column+1);\t\t\t\n\t\t}else{\n\t\t\teastCell = null;\n\t\t}\t\n\t\tif(row+1 < RatMap.SIDELENGTH){\n\t\t\tnorthCell = RatMap.getMapCell(row+1,column);\n\t\t}else{\n\t\t\tnorthCell = null;\n\t\t}\t\n\t\tif(column-1 > -1){\n\t\t\twestCell = RatMap.getMapCell(row, column-1);\t\t\t\n\t\t}else{\n\t\t\twestCell = null;\n\t\t}\n\t\tif(row-1 > -1){\n\t\t\tsouthCell = RatMap.getMapCell(row-1, column);\n\t\t}else{\n\t\t\tsouthCell = null;\n\t\t}\n\t}", "public void getPossibleMoves() { \n\t\t\tsuper.getPossibleMoves();\n\t\t\tfor (int i = 0; i < Math.abs(xrange); i++) {\n\t\t\t\tif (currentx + xrange - ((int) Math.pow(-1,color)*i) >= 0) { \n\t\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + xrange - ((int) Math.pow(-1,color)*i) ][currenty]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( currentx - 1 >= 0 && currenty - 1 >= 0 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1].isOccupiedByOpponent()) {\t// Diagonol left space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty - 1]);\n\t\t\t}\n\t\t\tif (currentx - 1 >= 0 && currenty + 1 <= 7 &&\n\t\t\t\t\tGameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1].isOccupiedByOpponent()) { \t//Diagonol right space occupied\n\t\t\t\tGameWindow.potentialMoves.add(GameWindow.GridCells[currentx + ((int) Math.pow(-1,color)) ][currenty + 1]);\n\t\t\t}\n\t\t\t\n\t}", "public void printVisitedCells()\r\n\t{\r\n\t\tSystem.out.print(\"+ +\");\r\n\t\tfor (int i = 1; i < this.getWidth(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.print(\"-+\");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\r\n\t\tfor (int i = 0; i < this.getHeight(); i++)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\t// if cells are connected, no wall is printed in between them\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.WEST))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"|\");\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif(c.getDiscoveryTime() != -1)\r\n\t\t\t\t\tSystem.out.print(c.getDiscoveryTime() % 10);\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"|\");\r\n\t\t\t\r\n\t\t\tfor (int j = 0; j < this.getWidth(); j++)\r\n\t\t\t{\r\n\t\t\t\tCell c = this.getCellAt(i, j);\r\n\t\t\t\tSystem.out.print(\"+\");\r\n\r\n\t\t\t\tif (c.hasDoorwayTo(Cell.SOUTH) || c == this.getCellAt(getHeight()-1, getWidth()-1))\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(\"-\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"+\");\r\n\t\t}\r\n\t}", "public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }", "int cellDistance(int cell) {\n int d = GUTTER_SIZE;\n d += cell * (CELL_SIZE + GUTTER_SIZE);\n return d;\n }", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "private void getKingJumpPos(Point kingPoint, Orientation or, Movement m, JumpPosition jumpPosit,Color c, boolean b) throws CloneNotSupportedException {\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n Color oposite = c==Color.black?Color.red:Color.black;\n \n Point soldierPoint , nextPoint;\n for(OrientationMove orM:orientationMoveCombs){\n Point currentPoint = foo;\n for(int i=0;i<8;i++){\n if(i!=0) currentPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n if( !isValidSquare(currentPoint.x, currentPoint.y)) \n break;\n if( !isEmpty(new Soldier(currentPoint.x, currentPoint.y, Color.white), gamePieces)) \n break;\n //soldierPoint = getXandYgivenOrientation(currentPoint, or,m);\n\n soldierPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n nextPoint = getXandYgivenOrientation(soldierPoint, orM.or,orM.m);\n Soldier foe = new Soldier(soldierPoint.x, soldierPoint.y, oposite);\n if(isJumpable(soldierPoint, orM.or, orM.m, c , jumpPosit))\n addAllRelevantSquares(jumpPosit, foo, nextPoint, soldierPoint, orM.or, orM.m ,oposite );\n\n\n nextPoint = getXandYgivenOrientation(soldierPoint, or,m);\n if(!isEmpty(soldierPoint, gamePieces, jumpPosit.jumpPosition)\n &&!isEmpty(nextPoint, gamePieces, jumpPosit.jumpPosition)) break; \n }\n }\n \n \n \n //If it is, add it to the movement path\n// if(isJumpable(soldierPoint, or, m, c , jumpPositions)){ \n// addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n// }\n \n }", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "public void move(FightCell cell);", "public void populateNeighbors(Cell[][] cells) {\n\t\tint limitHoriz = cells[0].length;\n\t\tint limitVert = cells.length;\n\t\t// above left\n\t\tif (myRow > 0 && myRow < limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) {\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol +1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t\t// ADD 8 cells to neighbors (see the diagram from the textbook)\n\t\t\t}\n\t\t\tif (myCol == 0) { // left edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow+1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // right edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow -1][myCol]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == 0) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // top edge not corner\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol-1]);\n\t\t\t\tneighbors.add(cells[myRow+1][myCol -1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // top left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow][myCol + 1]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow + 1][myCol+1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // top right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow +1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow +1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t}\n\t\t}\n\t\tif (myRow == limitVert - 1) {\n\t\t\tif (myCol > 0 && myCol < limitHoriz - 1) { // bottom edge\n\t\t\t\t// ADD 5 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == 0) { // bottom left corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol+1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t\tneighbors.add(cells[myRow][myCol +1]);\n\t\t\t}\n\t\t\tif (myCol == limitHoriz - 1) { // bottom right corner\n\t\t\t\t// ADD 3 cells to neighbors (see the diagram from the textbook)\n\t\t\t\tneighbors.add(cells[myRow-1][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow][myCol -1]);\n\t\t\t\tneighbors.add(cells[myRow - 1][myCol]);\n\t\t\t}\n\t\t}\n\t}", "public Cell diagonal(UTTTSubBoard board, List<Cell> cells) {\n Iterator iterator = cells.iterator();\n while(iterator.hasNext()) {\n Cell cell = (Cell) iterator.next();\n\n int x = cell.getCell().getRow();\n int y = cell.getCell().getRow();\n\n if ((x + y)%2 == 0){ \n\n if (x == 1 && y == 1){\n int firstXIndexToCheck = ((((x+1)%3)+3)%3);\n int secondXIndexToCheck = ((((x-1)%3)+3)%3);\n\n int firstYIndexToCheck = ((((y+1)%3)+3)%3);\n int secondYIndexToCheck = ((((y-1)%3)+3)%3);\n\n Coords firstCoord = new Coords(firstXIndexToCheck, firstYIndexToCheck);\n Coords secondCoord = new Coords(secondXIndexToCheck, secondYIndexToCheck);\n Coords thirdCoord = new Coords(secondXIndexToCheck, firstYIndexToCheck);\n Coords fourthCoord = new Coords(firstXIndexToCheck, secondYIndexToCheck);\n \n Cell firstCell = board.getCell(firstCoord);\n Cell secondCell = board.getCell(secondCoord);\n Cell thirdCell = board.getCell(thirdCoord);\n Cell fourthCell = board.getCell(fourthCoord);\n\n if (firstCell.getPlayer() == PlayerEnum.ME && secondCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n else if (thirdCell.getPlayer() == PlayerEnum.ME && fourthCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n // else if (firstCell.getPlayer() == PlayerEnum.ME || secondCell.getPlayer() == PlayerEnum.ME\n // || thirdCell.getPlayer() == PlayerEnum.ME || fourthCell.getPlayer() == PlayerEnum.ME) {\n // matchedCells.add(cell);\n // }\n }\n\n else {\n\n int firstXIndexToCheck = ((((x+1)%3)+3)%3);\n int secondXIndexToCheck = ((((x-1)%3)+3)%3);\n\n int firstYIndexToCheck = ((((y+1)%3)+3)%3);\n int secondYIndexToCheck = ((((y-1)%3)+3)%3);\n\n Coords firstCoord = new Coords(firstXIndexToCheck, firstYIndexToCheck);\n Coords secondCoord = new Coords(secondXIndexToCheck, secondYIndexToCheck);\n\n Cell firstCell = board.getCell(firstCoord);\n Cell secondCell = board.getCell(secondCoord);\n\n if (firstCell.getPlayer() == PlayerEnum.ME && secondCell.getPlayer() == PlayerEnum.ME){\n return cell;\n }\n else if (firstCell.getPlayer() == PlayerEnum.ME || secondCell.getPlayer() == PlayerEnum.ME) {\n matchedCells.add(cell);\n }\n\n }//else\n }\n }\n return null;\n }", "public void paradiseMove(){\n if (!getCurrentMainCellCoordinates().equals(new DiscreteCoordinates(11, 9))) {\n move(30);\n }\n }", "private int getNorthWestCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif ((cellNumber >= getGridWidth()) && (cellNumber % getGridWidth() != 0)) {\n\t\t\treturn (cellNumber - getGridWidth() - 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\tif (cellNumber >= getGridWidth()) { //move west, then north\n\t\t\t\t\treturn (cellNumber - 1);\n\t\t\t\t}\n\t\t\t\tif (cellNumber % getGridWidth() != 0) { //move north, then west\n\t\t\t\t\treturn (getGridSize() - getGridWidth() + cellNumber - 1);\n\t\t\t\t}\n\t\t\t\treturn (getGridSize() - 1); //upper left corner\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public void solve() {\n for (int i = 0; i < rowsCount; i++) {\n for (int j = 0; j < colsCount; j++) {\n\n // if the current Cell contains a mine, let's skip this iteration.\n if (this.cells[i][j].hasMine()) continue;\n\n // for all non-mine cells, set the default value to 0\n cells[i][j].setValue('0');\n\n // let's get all Cells surrounding the current Cell,\n // checking if the other Cells have a mine.\n // if there is a mine Cell touching the current Cell,\n // proceed to update the value of the current Cell.\n Cell topCell = get_top_cell(i, j);\n if (topCell != null && topCell.hasMine() == true) update_cell(i, j);\n\n Cell trdCell = get_top_right_diagnoal_cell(i, j);\n if (trdCell != null && trdCell.hasMine() == true) update_cell(i, j);\n\n Cell rightCell = get_right_cell(i, j);\n if (rightCell != null && rightCell.hasMine() == true) update_cell(i, j);\n\n Cell brdCell = get_bottom_right_diagnoal_cell(i, j);\n if (brdCell != null && brdCell.hasMine() == true) update_cell(i, j);\n\n Cell bottomCell = get_bottom_cell(i, j);\n if (bottomCell != null && bottomCell.hasMine() == true) update_cell(i, j);\n\n Cell bldCell = get_bottom_left_diagnoal_cell(i, j);\n if (bldCell != null && bldCell.hasMine() == true) update_cell(i, j);\n\n Cell leftCell = get_left_cell(i, j);\n if (leftCell != null && leftCell.hasMine() == true) update_cell(i, j);\n\n\n Cell tldCell = get_top_left_diagnoal_cell(i, j);\n if (tldCell != null && tldCell.hasMine() == true) update_cell(i, j);\n }\n }\n\n // print the solution to System out\n print_solution();\n }", "private int getNorthEastCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif ((cellNumber >= getGridWidth()) && (cellNumber % getGridWidth() != (getGridWidth()-1))) {\n\t\t\treturn (cellNumber - getGridWidth() + 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\tif (cellNumber >= getGridWidth()) { //move east, then north\n\t\t\t\t\treturn (cellNumber - 2*getGridWidth() + 1);\n\t\t\t\t}\n\t\t\t\tif (cellNumber % getGridWidth() != (getGridWidth()-1)) { //move north, then east\n\t\t\t\t\treturn (getGridSize() - getGridWidth() + cellNumber + 1);\n\t\t\t\t}\n\t\t\t\treturn (getGridSize() - getGridWidth()); //upper right corner\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public synchronized void moveDown(){\n if (!this.isAtBottom()){\n for (int j = 1; j < 25; j++){\n for (int i = 1; i < 13; i++){\n if (this.movable[i][j]){\n this.map[i][j - 1] = this.map[i][j];\n this.movable[i][j - 1] = this.movable[i][j];\n this.colors[i][j - 1] = this.colors[i][j];\n\n this.map[i][j] = false;\n this.movable[i][j] = false;\n this.colors[i][j] = null;\n\n }\n }\n }\n }\n this.piecePositionY--;\n repaint();\n }", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public void mouseExited(MouseEvent e) {\n if (isDraging){// ger fal kardane khanehaye drag shode ba raftane dobare ruye Anha\n setNotCopying();\n if(mlpp1<mlp1){// baraye raftan be paein\n for(int p=mlpp1;p<=mlp1; p++){\n if(mlpp2<mlp2)// baraye raftan be paein samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be pain samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane raftan be paein\n if(mlpp1>mlp1){// baraye raftan be bala\n for(int p=mlpp1;p>=mlp1; p--){\n if(mlpp2<mlp2)// baraye raftan be bala samte rast\n for(int k=mlpp2;k<=mlp2;k++){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye raftan be bala samte chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[p][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n jtf[p][mlpp2].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane harekat be bala.\n if(mlpp2<mlp2)// baraye raftan be rast\n for(int k=mlpp2 ; k<=mlp2;k++){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n if(mlpp2>mlp2)// baraye harekat be chap\n for(int k=mlpp2;k>=mlp2;k--){\n jtf[mlpp1][k].setBackground(Color.white);\n ++cellSelCounter;\n }\n }// payane geyre fa'al kardane khane haye drag shode\n if(e.getSource()==jtf[mlp1][mlp2]) // agar az samte paein az khane sabz kharej shod-\n if(jtf[mlp1][mlp2].getBackground()==Color.green)//- range an bayad be abi tabdil shawad.\n jtf[mlp1][mlp2].setBackground(Color.blue);\n }", "private Cell[][] updateCellLocation(Cell[][] grid) {\n\n //Iterate through the grid\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n grid[x][y].setXCord(x); //Set the new X co-ordinate\n grid[x][y].setYCord(y); //Set the new Y co-ordinate\n }\n }\n\n return grid;\n }", "public int CalcDistance ( )\r\n\t{\r\n\t\tfor ( int i = 0; i<size; i++ )\r\n\t\t{\r\n\t\t\tfor ( int offR = 0; offR <= size/2; offR++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor ( int offR = size-1; offR >= size/2; offR-- )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\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 maze [currentRow] [currentCol].getDistanceToExit();\r\n\t}", "private void makeEntranceAndExit() {\n int rowView = calcRowViewAndWalk(rowEntry, Direction.up);\r\n int colView = calcColViewAndWalk(colEntry, Direction.up);\r\n setCell(rowView, colView, Cell.corridor);\r\n \r\n rowView = calcRowViewAndWalk(rowExit, Direction.down);\r\n colView = calcColViewAndWalk(colExit, Direction.down);\r\n setCell(rowView, colView, Cell.corridor);\r\n }", "public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}", "private void fillBoardWithCells(){\n double posx = MyValues.HORIZONTAL_VALUE*0.5*MyValues.HEX_SCALE + MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE;\n double posy = 2*MyValues.DIAGONAL_VALUE*MyValues.HEX_SCALE ;\n HexCell startCell = new HexCell(0,0, this);\n startCell.changePosition(posx, posy);\n boardCells[0][0] = startCell;\n for (int i = 0; i< x-1; i++) {\n HexCell currentCell = new HexCell(i+1, 0, this);\n boardCells[i+1][0] = currentCell;\n //i mod 2 = 0: Bottom\n if (i % 2 == 0) {\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT_RIGHT );\n } else {\n //i mod 2 =1: Top\n boardCells[i][0].placeHexCell(currentCell, MyValues.HEX_POSITION.TOP_RIGHT );\n }\n }\n for(int i = 0; i < x; i++){\n for(int j = 0; j < y-1; j++){\n HexCell currentCell = new HexCell(i, j+1, this);\n //System.out.println(Integer.toString(i) + Integer.toString(j));\n boardCells[i][j+1] = currentCell;\n boardCells[i][j].placeHexCell(currentCell, MyValues.HEX_POSITION.BOT);\n }\n }\n }", "@Override\n\tprotected void fallBeginInGrid(int j) {\n\t\tint i = 0;\n\t\tint empty = -1;\n\t\tIDiamond diamondCur = null;\n\t\tIDiamond diamondPre = null;\n\t\tIDiamond firstDiamond = null;\n\t\n\t\tif (screen.colHeight[j] < 8) {\n\t\t\tfirstDiamond = null;\n\t\t\tdiamondCur = null;\n\t\t\tdiamondPre = null;\n\t\t\tfor (i = 0 ; i < 8 ; i++) { // vong for danh cho grid\n\t\t\t\tint flag1 = screen.inGridFlag[i][j];\n\t\t\t\tint value = screen.grid[i][j];\n\t\t\t\tint dType = diamondType(value);\n\t\t\t\tif (flag1 == Effect.EMPTY) {\n\t\t\t\t\tif (empty == -1) empty = i; \n\t\t\t\t} \n\t\t\t\tif (empty > -1) {\n\t\t\t\t\tif (Operator.getBit(Effect.FIXED_POS, flag1) > 0 && screen.logic.grid[i][j] != -1 && dType != IDiamond.ROCK_DIAMOND) {\n\t\t\t\t\t\tdiamondCur = screen.logic.savedDiamonds.newObject(\n\t\t\t\t\t\t\t\tscreen.gridPos.x + j * screen.DIAMOND_WIDTH\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_WIDTH / 2,\n\t\t\t\t\t\t\t\tscreen.gridPos.y + i\n\t\t\t\t\t\t\t\t\t\t* screen.DIAMOND_HEIGHT\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_HEIGHT / 2,\n\t\t\t\t\t\t\t\tscreen.DIAMOND_WIDTH,\n\t\t\t\t\t\t\t\tscreen.DIAMOND_HEIGHT, screen);\n\t\t\t\t\t\tdiamondCur.setDestination(screen.gridPos.x + j\n\t\t\t\t\t\t\t\t* screen.DIAMOND_WIDTH\n\t\t\t\t\t\t\t\t+ screen.DIAMOND_WIDTH / 2,\n\t\t\t\t\t\t\t\tscreen.gridPos.y + empty\n\t\t\t\t\t\t\t\t\t\t* screen.DIAMOND_HEIGHT\n\t\t\t\t\t\t\t\t\t\t+ screen.DIAMOND_HEIGHT / 2);\n\t\t\t\t\t\tfallDown = true;\n\t\t\t\t\t\tdiamondCur.setDiamondValue(screen.logic.grid[i][j]);\n//\t\t\t\t\t\tMyAnimation animation = gAssets.getDiamondAnimation(screen.logic.grid[i][j], screen.getGameID());\n//\t\t\t\t\t\tdiamondCur.setSprite(animation);\n\t\t\t\t\t\tdiamondCur.setAction(Diamond.FALL);\n\t\t\t\t\t\t\n\t\t\t\t\t\tchangeStatusBeforeFall(i, j);\n//\t\t\t\t\t\tif (diamondType(screen.logic.grid[i][j]) == IDiamond.SOIL_DIAMOND) {\n//\t\t\t\t\t\t\tMissionDiamond lScreen = (MissionDiamond) screen;\n//\t\t\t\t\t\t\t((SharpenDiamond)lScreen.mission).remove(i, j);\n//\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (diamondType(screen.logic.grid[i][j]) == IDiamond.BUTTERFLY_DIAMOND) {\n\t\t\t\t\t\t\tinstance.spider.removeButterfly(i * 8 + j);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tscreen.inGridFlag[i][j] = 0;\n\t\t\t\t\t\tscreen.logic.grid[i][j] = -1;\n\t\t\t\t\t\tempty++;\n\t\t\t\t\t\t// phan xau chuoi\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (firstDiamond == null) firstDiamond = diamondCur;\n\t\t\t\t\t\tdiamondCur.setPreDiamond(diamondPre);\n\t\t\t\t\t\tif (diamondPre != null) diamondPre.setNextDiamond(diamondCur);\n\t\t\t\t\t\tdiamondPre = diamondCur;\n\t\t\t\t\t\t\n\t\t\t\t\t} else if (flag1 > Effect.EMPTY || dType == IDiamond.ROCK_DIAMOND) {\n\t\t\t\t\t\tempty = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (inGridHead[j] == null) {// chua ton tai danh sach truoc do\n\t\t\t\tinGridHead[j] = firstDiamond;// dau danh sach hien tai la firstDiamond\n\t\t\t\tinGridTail[j] = diamondCur;// cuoi danh sach hien tai la diamondCur\n\t\t\t} else {// ton tai danh sach truoc do\n\t\t\t\tif (firstDiamond != null) {// phai ton tai danh sach hien tai\n\t\t\t\t\tif (firstDiamond.getPosY() < inGridHead[j].getPosY()) {// danh sach hien taio truoc\n\t\t\t\t\t\t// noi o dau danh sach cu\n\t\t\t\t\t\tinGridHead[j].setPreDiamond(diamondCur); \n\t\t\t\t\t\tdiamondCur.setNextDiamond(inGridHead[j]);\n\t\t\t\t\t\t// sua dau\n\t\t\t\t\t\tinGridHead[j] = firstDiamond;\n\t\t\t\t\t} else {// danh sach hien tai o sau\n\t\t\t\t\t\t// noi p duoi danh sach cu\n\t\t\t\t\t\tinGridTail[j].setNextDiamond(firstDiamond);\n\t\t\t\t\t\tfirstDiamond.setPreDiamond(inGridTail[j]);\n\t\t\t\t\t\t// sua duoi\n\t\t\t\t\t\tinGridTail[j] = diamondCur;\n\t\t\t\t\t}\n\t\t\t\t\t// moc noi roi trong vao danh sach roi ngoai\n\t\t\t\t\tif (outGridHead[j] != null) {// ton tai danh sach roi ngoai\n\t\t\t\t\t\toutGridHead[j].setPreDiamond(inGridTail[j]);\n\t\t\t\t\t\tinGridTail[j].setNextDiamond(outGridHead[j]);\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}", "private int getWestCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif (cellNumber % getGridWidth() != 0) {\n\t\t\treturn (cellNumber - 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\treturn (cellNumber + getGridWidth() - 1);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private int getSouthWestCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif ((cellNumber < getGridSize() - getGridWidth()) && (cellNumber % getGridWidth() != 0)) {\n\t\t\treturn (cellNumber + getGridWidth() - 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\tif (cellNumber < getGridSize() - getGridWidth()) { //move west, then south\n\t\t\t\t\treturn (cellNumber + 2*getGridWidth() - 1);\n\t\t\t\t}\n\t\t\t\tif (cellNumber % getGridWidth() != (getGridWidth()-1)) { //move south, then west\n\t\t\t\t\treturn (cellNumber % getGridWidth() - 1);\n\t\t\t\t}\n\t\t\t\treturn (0); //lower left corner\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private int getNorthCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif (cellNumber >= getGridWidth()) {\n\t\t\treturn (cellNumber - getGridWidth());\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\treturn (getGridSize() - getGridWidth() + cellNumber);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}", "private static int[][] distanceGrid(final int[][] board) {\n final int numRows = board.length;\n final int numCols = board[0].length;\n\n final int distance = 0;\n\n final int[][] distanceGrid = new int[numRows][numCols];\n for (final int[] row : distanceGrid) {\n Arrays.fill(row, INACCESSABLE_SPACE_DISTANCE);\n }\n // For each space on the board\n for (int r = 0; r < numRows; r++) {\n nextBoardSpace:\n for (int c = 0; c < numCols; c++) {\n ArrayList<int[]> explored = new ArrayList<>();\n Queue<int[]> toExplore = new LinkedList<>();\n Map<String,Integer> dists = new HashMap<>();\n\n // Add the space to the explore queue\n toExplore.add(new int[] {r, c, 0});\n \n // While there is more to explore\n while (!toExplore.isEmpty()) {\n int[] currExplor = toExplore.remove();\n explored.add(currExplor);\n int explRow = currExplor[0];\n int explCol = currExplor[1];\n int explDist = currExplor[2];\n\n String key = Arrays.toString(new int[] {explRow, explCol});\n dists.put(key, 1);\n \n // If the space contains a player's move, add the distance to the \n //distanceGrid, and continue on the next boardspace\n if (board[explRow][explCol] > 0) {\n distanceGrid[r][c] = explDist;\n continue nextBoardSpace;\n }\n \n // Otherwise, if the space is empty, add it's neighbours to the queue\n if (board[explRow][explCol] == 0) {\n ArrayList<int[]> neighbours = Utils.neighbours(explRow, explCol, numRows, numCols);\n for (int[] neighbour : neighbours) {\n int[] temp = new int[] {neighbour[0], neighbour[1], explDist+1};\n if (dists.containsKey(key)) continue;\n toExplore.add(temp);\n }\n }\n }\n\n // If a path to one of our spaces is not found, space is inaccessable\n if (board[r][c] != 0) {\n distanceGrid[r][c] = -1;\n }\n\n }\n }\n return distanceGrid;\n }", "private static void fillDistances(CellData[][] cells) {\n\t\tSet<Pair<Integer, Integer>> currentLayer = new HashSet<>();\n\t\tfor (int x = 0; x < cells.length; x++) {\n\t\t\tfor (int y = 0; y < cells[0].length; y++) {\n\t\t\t\tif (cells[x][y].getType() == TrackCell.PRE_START_LINE) {\n\t\t\t\t\tcells[x][y].offerDistanceToFinish(1);\n\t\t\t\t\tcurrentLayer.add(Pair.of(x, y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint currentDistance = 1;\n\t\twhile (true) {\n\t\t\t// iterate over the current layer cells and fill in the next layer\n\t\t\tSet<Pair<Integer, Integer>> nextLayer = new HashSet<>();\n\t\t\tfor (Pair<Integer, Integer> curLayerCell : currentLayer) {\n\t\t\t\tint x = curLayerCell.getLeft();\n\t\t\t\tint y = curLayerCell.getRight();\n\t\t\t\tTrackCell from = cells[x][y].getType();\n\t\t\t\tif (isNavigableFrom(cells, x - 1, y, from)\n\t\t\t\t\t\t&& cells[x - 1][y]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x - 1, y));\n\t\t\t\t}\n\t\t\t\tif (isNavigableFrom(cells, x + 1, y, from)\n\t\t\t\t\t\t&& cells[x + 1][y]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x + 1, y));\n\t\t\t\t}\n\t\t\t\tif (isNavigableFrom(cells, x, y - 1, from)\n\t\t\t\t\t\t&& cells[x][y - 1]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x, y - 1));\n\t\t\t\t}\n\t\t\t\tif (isNavigableFrom(cells, x, y + 1, from)\n\t\t\t\t\t\t&& cells[x][y + 1]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x, y + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (nextLayer.isEmpty()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrentLayer = nextLayer;\n\t\t\tcurrentDistance++;\n\t\t}\n\n\t}", "public void seekWalls() {\n\t\t for (int j=0; j<visited[0].length; j++){\n\t\t\tfor (int i=visited.length-1; i>=0; i--) {\t\t\t\n\t\t\t\tif (i!=0 && j!= visited[0].length-1) {//general position\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;//not break!!!!! return to exit !\n\t\t\t\t\t}\n\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (i==0 && j!= visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i][j+1]) == maxComb && !isFree(i,j,4)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'E';\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if (i!=0 && j== visited[0].length-1) {\n\t\t\t\t\tif (map.get(visited[i][j]) + map.get(visited[i-1][j]) == maxComb && !isFree(i,j,2)) {\n\t\t\t\t\t\twallRow = i+1;\n\t\t\t\t\t\twallCol = j+1;\n\t\t\t\t\t\twallSide = 'N';\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\telse {//if (i==0 && j== visited[0].length-1) {\n\t\t\t\t\t//no solution\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void openCell(Integer xOpen, Integer yOpen){\n \r\n if(isValidCell(xOpen,yOpen)){\r\n // System.out.println(\" openCell(). es celda Valida\");\r\n if(grid[xOpen][yOpen].isMine()){\r\n // System.out.println(\" openCell().Perdiste, habia una mina en g[\"+xOpen+\"][\"+yOpen+\"]\");\r\n //grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n grid[xOpen][yOpen].setNumber(9);\r\n this.gs = gameStatus.LOSE;\r\n }else{\r\n // System.out.println(\" openCell().No es mina, puede continuar\");\r\n if( grid[xOpen][yOpen].getStatus() == Status.CLOSE ){//si esta cerrado, contar las minas\r\n // System.out.println(\" openCell().Esta cerrada, puede abrirse\");\r\n \r\n int minas = getMines(xOpen,yOpen); //error\r\n this.grid[xOpen][yOpen].setNumber(minas);\r\n \r\n if(minas == 0){ //abre las celdas de alrededor\r\n // System.out.println(\" openCell().Tiene 0 minas alrededor, hay que explotar\");\r\n for(int i=xOpen-1; i<=xOpen+1; i++){\r\n for(int j=yOpen-1; j<=yOpen+1 ;j++){\r\n if( i== xOpen && j==yOpen){\r\n grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n revealedCells++;\r\n }else\r\n openCell(i,j);\r\n }\r\n }\r\n }else{\r\n // System.out.println(\" openCell().La celda tiene un numero >0, puede abrise\");\r\n \r\n grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n revealedCells++;\r\n \r\n }\r\n } \r\n }\r\n }else{\r\n // System.out.println(\" openCell().Es una celda no valida\");\r\n }\r\n }", "@Override\r\n\tpublic boolean movement(BoardCells[][] chessBoard, Piece targetPiece, int fromX,int fromY,int toX,int toY) {\t\t\r\n\t\t//DEBUG -- System.out.println(\"\"+fromX+fromY+\" \"+toX+toY);\r\n\t\t\r\n\t\tif(fromY == toY){\t\t\t\r\n\t\t\tif(fromX > toX) {\r\n\t\t\t\tfor(int i = fromX-1; i>toX; i--) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t} else if (fromX < toX) {\r\n\t\t\t\tfor(int i = fromX+1; i<toX; i++) {\r\n\t\t\t\t\tif(chessBoard[8-fromY][i].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\tif(fromX == toX) {\t\t\t\t\r\n\t\t\tif(fromY > toY) {\t\r\n\t\t\t\tfor(int i = fromY-1; i>toY; i--) {\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t} else if (fromY < toY) {\t\t\t\t\r\n\t\t\t\tfor(int i = fromY+1; i<toY; i++) {\t\t\t\t\t\r\n\t\t\t\t\tif(chessBoard[8-i][toX].getPiece() != null) {\t\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(getPieceID().equals(\"bR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"bKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"bK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(getPieceID().equals(\"wR\")) {\r\n\t\t\t\t\tfor(int i = 0; i<9 ;i++) {\r\n\t\t\t\t\t\tfor (int j = 0; j<9; j++){\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece() != null) {\r\n\t\t\t\t\t\t\tif(chessBoard[8-i][j].getPiece().getPieceID().equals(\"wKc\")) {\r\n\t\t\t\t\t\t\t\t//Piece king = chessBoard[8-i][j].getPiece();\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//DEBUG -- System.out.println(king.getPieceID()+color+\" \"+king );\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tchessBoard[8-i][j].getPiece().setPieceID(\"wK\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\treturn true;\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn false;\t\t\r\n\t}", "private void findWay(MazeCell[] surrounds) {\r\n for (int i = 0; i < surrounds.length; i++) {\r\n if (surrounds[i].isMovable && surrounds[i].getFootprint()) {\r\n int d = faceDir.ordinal();\r\n faceDir = Direction.values()[(d + i) % 4];\r\n }\r\n }\r\n }", "private static float[] findNewPosition(Cell cell){\n int cA = cell.angleInDegree+90;\n cA = (cA>360) ? cA-360 : (cA<0) ? cA+360 : cA;\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //define position of new cell based on angle\n float angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //check that cell in not outside of tissue\n int hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n int hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n while(Field.noMatter[hX][hY]){\n //if outside of tissue, try another angle\n cA=diceRoller.nextInt(360);\n angs[0] = cA;\n angs[1] = (cA+180>360) ? cA+180-360 : (cA+180<0) ? cA+180+360 : cA+180;\n\n //redefine cell position\n angRad = (float) Math.toRadians(angs[1]);\n pos[0]=(float) (cell.x+2*Pars.rad*(Math.cos(angRad)));\n pos[1]=(float) (cell.y+2*Pars.rad*(Math.sin(angRad)));\n\n //update hex mesh point to check within tissue\n hX=Functions.getHexCoordinates('x',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n hY=Functions.getHexCoordinates('y',pos[0], pos[1],Pars.numPointsW,Pars.numPointsH,Pars.hexSide,Pars.hexDiag);\n }\n\n return pos;\n }", "public ArrayList<Cell> fillNeighbors(Biochip grid, Cell cell, double value, int dest_x, int dest_y){\n\t\tint i = grid.findRow(cell); \n\t\tint j = grid.findColumn(cell); \n\t\tArrayList<Cell> new_filled_cells = new ArrayList<Cell>();\n\t\t//System.out.println(\"fill for : \" + i + \" \" + j); \n\n\t\t// right neighbor - only if it has one \n\t\tif (j+1<grid.width){\n\t\t\tCell right_n = grid.getCell(i, j+1);\n\t\t\tif (right_n.isFaulty==false && right_n.value<0){\n\t\t\t\t\tright_n.value = value; \n\t\t\t\t\tif (grid.findColumn(right_n)==dest_y && grid.findRow(right_n)==dest_x){\n\t\t\t\t\t\treturn new ArrayList<Cell>();\n\t\t\t\t\t}\n\t\t\t\t\telse new_filled_cells.add(right_n);\n\t\t\t}\n\t\t}\n\t\t// left neighbor - only if it has one\n\t\tif (j-1>=0){\n\t\t\tCell left_n = grid.getCell(i, j-1);\n\t\t\tif (left_n.isFaulty==false && left_n.value<0){\n\t\t\t\tleft_n.value = value; \n\t\t\t\tif (grid.findColumn(left_n)==dest_y && grid.findRow(left_n)==dest_x){\n\t\t\t\t\treturn new ArrayList<Cell>();\n\t\t\t\t}\n\t\t\t\telse new_filled_cells.add(left_n);\n\t\t\t}\n\t\t}\n\t\t// up neighbor\n\t\tif (i-1>=0){\n\t\t\tCell up_n = grid.getCell(i-1, j);\n\t\t\tif (up_n.isFaulty==false && up_n.value<0){\n\t\t\t\tup_n.value = value;\n\t\t\t\tif (grid.findColumn(up_n)==dest_y && grid.findRow(up_n)==dest_x){\n\t\t\t\t\treturn new ArrayList<Cell>();\n\t\t\t\t}\n\t\t\t\telse new_filled_cells.add(up_n);\n\t\t\t}\n\t\t}\n\t\t// down neighbor\n\t\tif (i+1<grid.height){\n\t\t\tCell down_n = grid.getCell(i+1, j);\n\t\t\tif (down_n.isFaulty==false && down_n.value<0){\n\t\t\t\tdown_n.value = value; \n\t\t\t\tif (grid.findColumn(down_n)==dest_y && grid.findRow(down_n)==dest_x){\n\t\t\t\t\treturn new ArrayList<Cell>();\n\t\t\t\t}\n\t\t\t\telse new_filled_cells.add(down_n);\n\t\t\t}\n\t\t}\n\t\t\n\t//\tthis.printGrid(grid);\n\t\treturn new_filled_cells; \n\n\t}", "private static boolean checkCellsNotNull(\n \t\t\tde.fhhannover.inform.hnefatafl.vorgaben.Move currentMove){\n \t\t\t\tif (currentMove.getFromCell() == null ||\n \t\t\t\t\tcurrentMove.getToCell() == null){\n \t\t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t\treturn true;\t\t\n \t}", "public abstract void manageCell(int x, int y, int livingNeighbours);", "@Override\n\tpublic List<Cell> calcNeighbors(int row, int col) {\n\t\tList<Cell> neighborLocs = new ArrayList<>();\n\t\tint shift_constant = 1 - 2*((row+col) % 2);\n\t\tif(!includesDiagonals) {\n\t\t\tfor(int a = col - 1; a <= col + 1; a++) {\n\t\t\t\tif(a == col)\n\t\t\t\t\taddLocation(row + shift_constant,a,neighborLocs);\n\t\t\t\telse \n\t\t\t\t\taddLocation(row,a,neighborLocs);\n\t\t\t}\n\t\t\treturn neighborLocs;\n\t\t}\n\t\tfor(int b = col - 2; b <= col + 2; b++) {\n\t\t\tfor(int a = row; a != row + 2*shift_constant; a += shift_constant) {\n\t\t\t\tif(a == row && b == col)\n\t\t\t\t\tcontinue;\n\t\t\t\taddLocation(a,b,neighborLocs);\n\t\t\t}\n\t\t}\n\t\tfor(int b = col -1; b <= col + 1; b++) {\n\t\t\taddLocation(row - shift_constant,b,neighborLocs);\n\t\t}\n\t\treturn neighborLocs;\n\t}", "public void findNeighbours(ArrayList<int[]> visited , Grid curMap) {\r\n\t\tArrayList<int[]> visitd = visited;\r\n\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS cur pos:\" +Arrays.toString(nodePos));\r\n\t\t//for(int j=0; j<visitd.size();j++) {\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +Arrays.toString(visited.get(j)));\r\n\t\t\t//System.out.println(\"FROM FIND NEIGHBOURS getvstd\" +Arrays.toString(visited.get(j)));\r\n\t\t//}\r\n\t\t//System.out.println(\"FROM FIND NEIGHBOURS\" +visited);\r\n\t\tCell left=curMap.getCell(0, 0);\r\n\t\tCell right=curMap.getCell(0, 0);\r\n\t\tCell upper=curMap.getCell(0, 0);\r\n\t\tCell down=curMap.getCell(0, 0);\r\n\t\t//the getStart() method returns x,y coordinates representing the point in x,y axes\r\n\t\t//so if either of [0] or [1] coordinate is zero then we have one less neighbor\r\n\t\tif (nodePos[1]> 0) {\r\n\t\t\tupper=curMap.getCell(nodePos[0], nodePos[1]-1) ; \r\n\t\t}\r\n\t\tif (nodePos[1] < M-1) {\r\n\t\t\tdown=curMap.getCell(nodePos[0], nodePos[1]+1);\r\n\t\t}\r\n\t\tif (nodePos[0] > 0) {\r\n\t\t\tleft=curMap.getCell(nodePos[0] - 1, nodePos[1]);\r\n\t\t}\r\n\t\tif (nodePos[0] < N-1) {\r\n\t\t\tright=curMap.getCell(nodePos[0]+1, nodePos[1]);\r\n\t\t}\r\n\t\t//for(int i=0;i<visitd.size();i++) {\r\n\t\t\t//System.out.println(Arrays.toString(visitd.get(i)));\t\r\n\t\t//}\r\n\t\t\r\n\t\t//check if the neighbor is wall,if its not add to the list\r\n\t\tif(nodePos[1]>0 && !upper.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] - 1}))) {\r\n\t\t\t//Node e=new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1},curMap);\r\n\t\t\t//if(e.getVisited()!=true) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] - 1}, curMap)); // father of the new nodes is this node\r\n\t\t\t//}\r\n\t\t}\r\n\t\tif(nodePos[1]<M-1 &&!down.isWall() && (!exists(visitd,new int[] {nodePos[0], nodePos[1] + 1}))){\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0], nodePos[1] + 1}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]>0 && !left.isWall() && (!exists(visitd,new int[] {nodePos[0] - 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] - 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\tif(nodePos[0]<N-1 && !right.isWall() && (!exists(visitd,new int[] {nodePos[0] + 1, nodePos[1]}))) {\r\n\t\t\tNodeChildren.add(new Node(this , this.N , this.M , new int[] {nodePos[0] + 1, nodePos[1]}, curMap));\r\n\t\t}\r\n\t\t//for(int i=0; i<NodeChildren.size();i++) {\r\n\t\t\t//System.out.println(\"Paidia sth find:\" + Arrays.toString(NodeChildren.get(i).getNodePos()));\r\n\t\t//}\r\n\t\t\t\t\t\t\r\n\t}", "private int getSouthCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif (cellNumber < getGridSize() - getGridWidth()) {\n\t\t\treturn (cellNumber + getGridWidth());\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\treturn (cellNumber % getGridWidth());\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public void loopThroughEdge()\n {\n int margin = 2;\n\n if (getX() < margin) //left side\n { \n setLocation(getWorld().getWidth()+ margin, getY());\n }\n else if (getX() > getWorld().getWidth() - margin) //right side\n {\n setLocation(margin, getY());\n }\n\n if (getY() < margin) //top side\n { \n setLocation(getX(), getWorld().getHeight() - margin);\n }\n else if(getY() > getWorld().getHeight() - margin) //bottom side\n { \n setLocation(getX(), margin);\n }\n }", "public void move(Cell[][] maze) {\n // check monster still alive or not\n if (!alive) {\n return;\n }\n //four directions: left, right, up, down\n int[][] dirs = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};\n // a list to store all valid directions to move\n List<int[]> validDir = new ArrayList<>();\n for (int[] dir : dirs) {\n int newRow = this.current_row + dir[0];\n int newCol = this.current_column + dir[1];\n // try finding a location where is not wall, not the previous location, not a place 3 sides surrounded by walls\n // and save it to valid directions list\n if (maze[newRow][newCol].getValue() != 1 && !(newRow == pre_row && newCol == pre_column)\n && validNextMove(newRow, newCol, maze)) {\n int[] newLocation = new int[]{newRow, newCol};\n validDir.add(newLocation);\n }\n }\n //If there is no valid move choice, the monster has to backtrack\n if (validDir.size() == 0) {\n this.current_row = this.pre_row;\n this.current_column = this.pre_column;\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n } else {\n // randomly select a valid direction to move\n Random random = new Random();\n int ranNum = random.nextInt(validDir.size());\n int[] newLoc = validDir.get(ranNum);\n int newRow = newLoc[0];\n int newCol = newLoc[1];\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n this.current_row = newRow;\n this.current_column = newCol;\n }\n }", "private void UpdateSurround(int row, int col) {\n\t\t\n\t\t// updates the 3 positions below the bomb\n\t\tif(row - 1 >= 0) {\n\t\t\tif(grid[row-1][col] < 9)\n\t\t\t\tgrid[row-1][col] = grid[row-1][col] + 1;\n\t\t\tif(col - 1 >= 0) {\n\t\t\t\tif(grid[row-1][col-1] < 9)\n\t\t\t\t\tgrid[row-1][col-1] = grid[row-1][col-1] + 1;\n\t\t\t}\n\t\t\tif(col + 1 < width) {\n\t\t\t\tif(grid[row-1][col+1] < 9)\n\t\t\t\t\tgrid[row-1][col+1] = grid[row-1][col+1] + 1;\n\t\t\t}\n\t\t}\n\t\t// updates the 3 positions above the bomb\n\t\tif(row + 1 < height) {\n\t\t\tif(grid[row+1][col] < 9)\n\t\t\t\tgrid[row+1][col] = grid[row+1][col] + 1;\n\t\t\tif(col - 1 >= 0) {\n\t\t\t\tif(grid[row+1][col-1] <9)\n\t\t\t\t\tgrid[row+1][col-1] = grid[row+1][col-1] + 1;\n\t\t\t}\n\t\t\tif(col + 1 < width) {\n\t\t\t\tif(grid[row+1][col+1] < 9)\n\t\t\t\t\tgrid[row+1][col+1] = grid[row+1][col+1] + 1;\n\t\t\t}\n\t\t}\n\t\t// updates position to the left\n\t\tif(col - 1 >= 0) {\n\t\t\tif(grid[row][col-1] < 9)\n\t\t\t\tgrid[row][col-1] = grid[row][col-1] + 1;\n\t\t}\n\t\t// updates position to the right\n\t\tif(col + 1 < width) {\n\t\t\tif(grid[row][col+1] < 9)\n\t\t\t\tgrid[row][col+1] = grid[row][col+1] + 1;\n\t\t}\n\t}", "private void showCells(Integer x, Integer y){\n if(cells[x][y].getBombCount()!=0){\n return;\n }\n if (x >= 0 && x < grid.gridSize-1 && y >= 0 && y < grid.gridSize && !cells[x + 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x + 1][y]);\n\n if (x > 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize && !cells[x - 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x - 1][y]);\n\n if (x >= 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize-1 && !cells[x][y + 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y + 1]);\n\n if (x >= 0 && x < grid.gridSize && y > 0 && y < grid.gridSize && !cells[x][y - 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y - 1]);\n }", "public void updateCellState(Move move)\r\n\t{\r\n\t\tCellState color = this.grid[move.getMovedMarbleInitialPosition(0).getX()][move.getMovedMarbleInitialPosition(0).getY()];\r\n\t\t\r\n\t\tfor(int i = 0;i < move.getMovedMarblesCount();i++)\r\n\t\t{\r\n\t\t\tthis.grid[move.getMovedMarbleInitialPosition(i).getX()][move.getMovedMarbleInitialPosition(i).getY()] = CellState.EMPTY;\r\n\t\t}\r\n\t\tfor(int i = 0; i < move.getMovedMarblesFinalCount();i++)\r\n\t\t{\r\n\t\t\tif(isPositionValid(move.getMovedMarbleFinalPosition(i)))\r\n\t\t\t{\r\n\t\t\t\tthis.grid[move.getMovedMarbleFinalPosition(i).getX()][move.getMovedMarbleFinalPosition(i).getY()] = color;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(color == CellState.BLACK_MARBLE) this.blackMarblesCount --;\r\n\t\t\t\tif(color == CellState.WHITE_MARBLE) this.whiteMarblesCount --;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void checkEdges() {\n\n //Check for alive cells on right hand side\n for (int y = 0; y < height; y++) {\n if (getCell(this.width - 1, y).isAlive()) {\n grid = increaseWidthRight(grid);\n break;\n }\n }\n\n //Check for alive cells on left side\n for (int y = 0; y < height; y++) {\n if (getCell(0, y).isAlive()) {\n grid = increaseWidthLeft(grid);\n break;\n }\n }\n\n // Check for alive cells at bottom\n for (int x = 0; x < width; x++) {\n if (getCell(x, this.height - 1).isAlive()) {\n grid = increaseHeightBottom(grid);\n break;\n }\n }\n\n //Check for alive cells at top\n for (int x = 0; x < width; x++) {\n if (getCell(x, 0).isAlive()) {\n grid = increaseHeightTop(grid);\n break;\n }\n }\n\n }", "public void step() {\n\t\t// calculate new values\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = cells[x + (y * gridX)];\n\t\t\t\tCell newCell = newCells[x + (y * gridX)];\n\n\t\t\t\tint neighborCount = sameNeighborCount(x, y);\n\n\t\t\t\tif (c.isActive) {\n\t\t\t\t\tif (neighborCount < 2) {\n\t\t\t\t\t\t// all alone, die of loneliness\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t\telse if (neighborCount > 3) {\n\t\t\t\t\t\tnewCell.isActive = false;\n\t\t\t\t\t\tnewCell.cellColor = app.color(deadColor);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Dead cells can be reborn if surrounded by enough neighbors of the same\n\t\t\t\t\t// color. The cell will be reborn using the most prominent color.\n\t\t\t\t\tint populousColor = mostPopulousColor(x, y);\n\t\t\t\t\tif (populousColor > Integer.MIN_VALUE) {\n\t\t\t\t\t\tnewCell.isActive = true;\n\t\t\t\t\t\tnewCell.cellColor = populousColor;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// update to new state\n\t\tfor (int i = 0; i < cells.length; i++) {\n\t\t\tcells[i].isActive = newCells[i].isActive;\n\t\t\tcells[i].cellColor = newCells[i].cellColor;\n\t\t}\n\t}", "public void move() {\n if (!canMove) {\n return;\n }\n int moveX = currDirection == EAST ? PACE : currDirection == WEST ? -PACE : 0;\n int moveY = currDirection == NORTH ? PACE : currDirection == SOUTH ? -PACE : 0;\n if (grid == null || grid.isOutside(currX + moveX, currY + moveY)) {\n return;\n }\n currX += moveX;\n currY += moveY;\n }", "void move(View view,int pos)\n {\n int incoming_row=pos/4;\n int incoming_column=pos%4;\n\n //here the move need to be left , right ,bottom and top ,but not side ways\n //also movement should be to immediate block and not at some distant block in the grid\n //for eg. ball at 0x0 should be only permitted to 0x1 and 1x0 and no where else\n if((incoming_row==row_curent+1 && incoming_column==column_current) ||\n (incoming_row==row_curent-1 && incoming_column==column_current) ||\n (incoming_column==column_current+1 && incoming_row==row_curent) ||\n (incoming_column==column_current-1 && incoming_row==row_curent)) {\n\n //Based on successful block selection we need to move the ball to the selected position\n //by setting its parameters\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(100, 100);\n lp.setMargins((int) view.getX() + view.getWidth() / 10, (int) view.getY() + view.getHeight() / 10, 0, 0);\n redball.setLayoutParams(lp);\n\n //Now that ball has moved to the new position, we need to update the current row and current column\n row_curent = incoming_row;\n column_current = incoming_column;\n\n //to remove the visted nodes\n view.setVisibility(View.GONE);\n\n //when we traverse through we need to add or subtract the values of grid to life of the ball (HP)\n //if the value of text field is not 100 move go through this if loop\n if(Float.parseFloat(((TextView)view.findViewById(R.id.item_text)).getText().toString())!=100f) {\n hp_value = hp_value + Float.parseFloat(((TextView) view.findViewById(R.id.item_text)).getText().toString());\n\n //This is cool feature , every time you land on a negative value on grid phone will vibrate\n if(Float.parseFloat(((TextView)view.findViewById(R.id.item_text)).getText().toString())<0f)\n {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n v.vibrate(VibrationEffect.createOneShot(500, VibrationEffect.DEFAULT_AMPLITUDE));\n } else {\n //deprecated in API 26\n v.vibrate(500);\n }\n\n }\n }\n //we reached the goal that is 100\n else {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(won);\n toast.show();\n resetValues();\n }\n\n }\n else\n {\n //To handle far away and side ways hop\n Toast.makeText(MainActivity.this, \"Sorry , can't hop side ways or far away field\", Toast.LENGTH_SHORT).show();\n }\n }", "public void printCells()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n System.out.println(\"Columns: \" + columns + \"Row: \" + rows + \" \" + cellGrid[columns][rows].isAlive());\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public BoardCell draw(Graphics g, boolean specialColor) { \n\t\tx = (width * column);\n\t\ty = (height * row);\n\n\t\tif(specialColor) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.cyan);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\n\t\t//if is not doorway\n\t\tif(this.isWalkway) {\n\t\t\tsuper.repaint();\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(handleColor(Color.YELLOW, specialColor));\n\t\t\t//x, y, width, height\n\t\t\tg.fillRect(x, y, width, height);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawRect(x, y, width, height);\n\t\t}\n\t\t\n\t\t//if is doorway\n\t\telse if (this.isDoorway && this.isRoom){\n\t\t\t//display doorway direction\n\t\t\tswitch (this.doorDirection) {\n\t\t\t//display each cell's direction image\n\t\t\tcase LEFT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width + 10, height );\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x , y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x + 20, y, doorWidth, height);\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tg.setColor(handleColor(Color.GRAY, specialColor));\n\t\t\t\tg.fillRect(x, y, width, height);\n\t\t\t\tg.setColor(Color.BLUE);\n\t\t\t\tg.fillRect(x, y + 20, width, doorHeight);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//if the cell is a room\n\t\tif(this.isRoom && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.gray);\n\t\t\tg.fillRect(x, y, width, height );\n\t\t}\n\t\t//if is closet\n\t\tif(this.isCloset && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.RED);\n\t\t\tg.fillRect(x, y, width, height);\n\t\t}\n\t\t//draw the players and the player colors\n\t\tif(this.isPlayer) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(this.playerColor);\n\t\t\tg.fillOval(x, y, width, height);\n\t\t}\n\t\t\n\t\t//this displays the room name\n\t\tif(isNameDrawer && !this.isDoorway) {\n\t\t\tsuper.paintComponent(g);\n\t\t\tg.setColor(Color.BLUE);\n\t\t\tg.drawString(board.getLegend().get(initial), x, y);\n\t\t\treturn this;\n\t\t} \n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public void checkCellStatus()\r\n {\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n checkNeighbours(rows, columns);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "private void carvePath(Cell cell) {\n\n\t\tsetCellVisited(cell);\n\t\tif (cell.tunnelTo != null) {\n\t\t\tcell = cell.tunnelTo;\n\t\t\tsetCellVisited(cell);\n\t\t}\n\t\tint dir = randomlyChoseNeighbour(cell);\n\t\tCell neigh;\n\t\twhile (dir != -1) {\n\t\t\tneigh = cell.neigh[dir];\n\t\t\tcell.wall[dir].present = false;\n\t\t\tcarvePath(neigh);\n\t\t\tdir = randomlyChoseNeighbour(cell);\n\n\t\t}\n\t}", "private List<Cell> getSurroundingCells(int x, int y) {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = x - 1; i <= x + 1; i++) {\n for (int j = y - 1; j <= y + 1; j++) {\n // Don't include the current position i != x && j != y &&\n if ( isValidCoordinate(i, j)) {\n if (i == x && j == y) {\n continue;\n } else {\n cells.add(gameState.map[j][i]);\n }\n }\n }\n }\n return cells;\n }", "public void minotaurMove(boolean[][] maze, Player p){\r\n int distRow = _curPos.getRow() - p.getPlayerPosition().getRow();\r\n int distCol = _curPos.getCol() - p.getPlayerPosition().getCol();\r\n if(_curPos.getRow()== 0 && _curPos.getCol()==14) {\r\n _curPos = new Position(0,14);\r\n }\r\n else {\r\n if(distRow > 0){\r\n if(!maze[_curPos.getRow() - 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n else{\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else{\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n }\r\n }\r\n else if(distRow == 0){\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow() + 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n else if(!maze[_curPos.getRow() - 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n else{\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n }\r\n else{\r\n if(!maze[_curPos.getRow() + 1][_curPos.getCol()]){\r\n _curPos.setRow(_curPos.getRow() + 1);\r\n }\r\n else{\r\n if(distCol > 0 && !maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() + 1]){\r\n _curPos.setCol(_curPos.getCol() + 1);\r\n }\r\n else if(!maze[_curPos.getRow()][_curPos.getCol() - 1]){\r\n _curPos.setCol(_curPos.getCol() - 1);\r\n }\r\n else{\r\n _curPos.setRow(_curPos.getRow() - 1);\r\n }\r\n }\r\n }\r\n }\r\n }", "@Test\n\t\t\tpublic void doorwayAdjacentSpots() {\n\t\t\t\t//Tests a left doorway for the spot to its left\n\t\t\t\tSet<BoardCell> testList = board.getAdjList(0, 18);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(0, 17)));\n\t\t\t\t//Tests a right door for the spot on its right\n\t\t\t\ttestList = board.getAdjList(17, 4);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(17, 5)));\n\t\t\t\t//Tests a down door for the space below\n\t\t\t\ttestList = board.getAdjList(5, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(6, 15)));\n\t\t\t\t//Tests an up door with the space above\n\t\t\t\ttestList = board.getAdjList(14, 9);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(13, 9)));\n\t\t\t\n\t\t\t}", "void move(int row, int col) {\n\n int rowdiff = row - this._row; int coldiff = col - this.column;\n if (((Math.abs(rowdiff)) > 1) || (Math.abs(coldiff)) > 1);\n || (row >= _side) || (col >= _side) || (row < 0) || (col < 0);\n || ((Math.abs(coldiff)) == 1) && ((Math.abs(rowdiff)) == 1))); {\n throw new java.lang.IllegalArgumentException();\n } \n else if (rowdiff == 1) && (coldiff == 0)//up method\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(2)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(2))) {\n up_method(cube)\n } else if (isPaintedFace(2) == true) {\n _facePainted[2] == false\n grid[row][col] == true\n up_method(cube)\n }\n else {\n _facePainted[2] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if ((rowdiff == -1) && (coldiff == 0)) //down method\n\n { \n if (((isPaintedSquare(row, col) && isPaintedFace(4)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(4))) {\n up_method(cube)\n } else if (isPaintedFace(4) == true) {\n _facePainted[4] == false\n grid[row][col] == true\n up_method(cube)\n } else {\n _facePainted[4] == true\n grid[row][col] == false \n up_method(cube)\n }\n }\n else if (rowdiff == 0) && (coldiff == -1) { //left method\n if (((isPaintedSquare(row, col) && isPaintedFace(5)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(5))) {\n up_method(cube)\n } else if (isPaintedFace(5) == true) {\n _facePainted[5] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[5] == true\n grid[row][col] == false \n up_method(cube)}\n }\n else if ((rowdiff == 0) && (coldiff == 1)) { //right method\n if (((isPaintedSquare(row, col) && isPaintedFace(6)) || \n (!isPaintedSquare(row, col) && !isPaintedFace(6))) {\n up_method(cube)\n } else if (isPaintedFace(6) == true) {\n _facePainted[6] == false\n grid[row][col] == true\n up_method(cube)}\n else {\n _facePainted[6] == true\n grid[row][col] == false \n up_method(cube)\n \n }\n }\n\n\n }", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "private void drunkenWalk(int x, int y) {\n\t\tRoom r = rooms[y][x];\n\t\tr.visited = true;\n\t\tUtil.shuffleArray(r.doors);\n\t\tfor(int i = 0; i < r.doors.length; i++) {\n\t\t\tDoor d = r.doors[i];\n\t\t\tboolean outOfBounds = false;\n\t\t\tRoom neighbor;\n\t\t\tDirection oppositeDir;\n\t\t\tint neighborX = x;\n\t\t\tint neighborY = y;\n\t\t\tswitch(d.dir) {\n\t\t\tcase LEFT:\n\t\t\t\toppositeDir = Direction.RIGHT;\n\t\t\t\tneighborX--;\n\t\t\t\tif (neighborX < 0) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\toppositeDir = Direction.LEFT;\n\t\t\t\tneighborX++;\n\t\t\t\tif (neighborX >= cols) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\toppositeDir = Direction.DOWN;\n\t\t\t\tneighborY--;\n\t\t\t\tif (neighborY < 0) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\toppositeDir = Direction.UP;\n\t\t\t\tneighborY++;\n\t\t\t\tif (neighborY >= rows) {\n\t\t\t\t\toutOfBounds = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\toppositeDir = Direction.UP;\n\t\t\t\toutOfBounds = true;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\t\t\tif (outOfBounds) {\n\t\t\t\td.isWall = true;\n\t\t\t} else {\n\t\t\t\tneighbor = rooms[neighborY][neighborX];\n\t\t\t\tif (!neighbor.visited) {\n\t\t\t\t\td.isWall = false;\n\t\t\t\t\tdrunkenWalk(neighborX, neighborY);\n\t\t\t\t} else {\n\t\t\t\t\td.isWall = connectionType(oppositeDir, neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private MapCell nextCell(MapCell cell) {\r\n\t\t\r\n\t\t//This is an array that holds the possible neighbouring tiles.\r\n\t\tMapCell[] potentialCells = {null,null,null,null};\r\n\t\t\r\n\t\t//This variable is an indicator. If it remains -1, that means no possible neighbouring tiles were found.\r\n\t\tint next = -1; \r\n\t\t\t\r\n\t\t//If the cell is a north road, check that its neighbour to the north is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another north road.\r\n\t\tif(cell.getNeighbour(0)!=null && cell.isNorthRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(0).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(0).isIntersection()||cell.getNeighbour(0).isDestination()||cell.getNeighbour(0).isNorthRoad()) {\r\n\r\n\t\t\t\t\t//Add the north neighbour to the array of potential next tiles.\r\n\t\t\t\t\tpotentialCells[0] = cell.getNeighbour(0);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is an east road, check that its neighbour to the east is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another east road.\r\n\t\t} else if (cell.getNeighbour(1)!=null && cell.isEastRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(1).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(1).isIntersection()||cell.getNeighbour(1).isDestination()||cell.getNeighbour(1).isEastRoad()) {\r\n\r\n\t\t\t\t\t//Add the east neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[1] = cell.getNeighbour(1);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is a south road, check that its neighbour to the south is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another south road.\r\n\t\t} else if (cell.getNeighbour(2)!=null && cell.isSouthRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(2).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(2).isIntersection()||cell.getNeighbour(2).isDestination()||cell.getNeighbour(2).isSouthRoad()) {\r\n\r\n\t\t\t\t\t//Add the south neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[2] = cell.getNeighbour(2);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the cell is a west road, check that its neighbour to the west is not null or marked. Then, see if it's either\r\n\t\t//an intersection, the destination, or another west road.\r\n\t\t} else if (cell.getNeighbour(3)!=null && cell.isWestRoad()) {\r\n\r\n\t\t\tif(!cell.getNeighbour(3).isMarked()) {\r\n\r\n\t\t\t\tif(cell.getNeighbour(3).isIntersection()||cell.getNeighbour(3).isDestination()||cell.getNeighbour(3).isWestRoad()) {\r\n\r\n\t\t\t\t\t//Add the west neighbour to the potential next tiles.\r\n\t\t\t\t\tpotentialCells[3] = cell.getNeighbour(3);\r\n\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t//If the current cell is an intersection, go through all 4 of its potential neighbours.\r\n\t\t} else {\r\n\r\n\t\t\tfor(int i = 0; i<4; i++) {\r\n\r\n\t\t\t\t//Check that the neighbour isn't null or marked.\r\n\t\t\t\tif(cell.getNeighbour(i)!=null) {\r\n\r\n\t\t\t\t\tif(!cell.getNeighbour(i).isMarked()) {\r\n\r\n\t\t\t\t\t\t//Check to see if the neighbour is either an intersection, or a one-way road in the proper orientation to\r\n\t\t\t\t\t\t//continue the path.\r\n\t\t\t\t\t\tif(cell.getNeighbour(i).isIntersection()||cell.getNeighbour(i).isDestination()||(i==0\r\n\t\t\t\t\t\t\t\t&&cell.getNeighbour(i).isNorthRoad())||(i==1&&cell.getNeighbour(i).isEastRoad())||(i==2\r\n\t\t\t\t\t\t\t\t&&cell.getNeighbour(i).isSouthRoad())||(i==3&&cell.getNeighbour(i).isWestRoad())) {\r\n\r\n\t\t\t\t\t\t\t//Add the tile to the possible next tiles.\r\n\t\t\t\t\t\t\tpotentialCells[i] = cell.getNeighbour(i);\r\n\t\t\t\t\t\t\tnext = 0;\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If no tiles were found, return null.\r\n\t\tif(next == -1) {\r\n\r\n\t\t\treturn null;\r\n\r\n\t\t//Otherwise, select one (or one of) the next possible tiles and return it.\r\n\t\t} else {\r\n\r\n\t\t\tfor(int i = 3; i >= 0; i--) {\r\n\r\n\t\t\t\tif(potentialCells[i]!=null) {\r\n\r\n\t\t\t\t\tnext = i;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\treturn potentialCells[next];\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "public HexCell getAdjacentCell(HexCell currentCell, MyValues.HEX_POSITION position){\n int cellX = currentCell.x;\n int cellY = currentCell.y;\n HexCell adjacentCell = null;\n switch (position){\n case TOP:\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX,\n cellY-1);\n }\n break;\n case BOT:\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX, cellY+1);\n }\n break;\n case TOP_LEFT:\n if(isInBound(cellX -1, x)){\n if(cellX % 2 ==0){\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX-1, cellY-1);\n }\n } else{\n adjacentCell = getCell(cellX-1, cellY);\n }\n }\n break;\n case TOP_RIGHT:\n if(isInBound(cellX +1, x)){\n if(cellX % 2 ==0){\n if(isInBound(cellY-1, y)){\n adjacentCell = getCell(cellX+1, cellY-1);\n }\n } else{\n adjacentCell = getCell(cellX+1, cellY);\n }\n }\n break;\n case BOT_LEFT:\n if(isInBound(cellX -1, x)){\n if(cellX % 2 ==1){\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX-1, cellY+1);\n }\n } else{\n adjacentCell = getCell(cellX-1, cellY);\n }\n }\n break;\n case BOT_RIGHT:\n if(isInBound(cellX +1, x)){\n if(cellX % 2 ==1){\n if(isInBound(cellY+1, y)){\n adjacentCell = getCell(cellX+1, cellY+1);\n }\n } else{\n adjacentCell = getCell(cellX+1, cellY);\n }\n }\n break;\n }\n return adjacentCell;\n }", "@Test\n\t\t\tpublic void adjacentToDoorwayTest() {\n\t\t\t\t//Tests with a space to the left of a leftward door\n\t\t\t\tSet<BoardCell> testList = board.getAdjList(11, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(11, 16)));\n\t\t\t\t//Tests with a space to the right of a rightward door\n\t\t\t\ttestList = board.getAdjList(12, 7);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(12, 6)));\n\t\t\t\t//Tests with a space below a downward door\n\t\t\t\ttestList = board.getAdjList(6, 15);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(5, 15)));\n\t\t\t\t//Tests with a space above an upward door\n\t\t\t\ttestList = board.getAdjList(15, 19);\n\t\t\t\tassertTrue(testList.contains(board.getCellAt(16, 19)));\n\t\t\t\n\t\t\t}", "private void updateMowerCords() {\n\t\tfor (int i = 0; i < this.map.size(); i++) {\r\n\t\t\tfor (int j = 0; j < this.map.get(i).size(); j++) {\r\n\t\t\t\tif (this.map.get(i).get(j) == this.mower) {\r\n\t\t\t\t\tthis.x = j;\r\n\t\t\t\t\tthis.y = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setNeighboringMines(){\n\t\t//cycle the board\n\t\tfor (int r = 0; r < board.length; r++)\n\t\t\tfor (int c = 0; c < board[r].length; c++){\n\t\t\t\tint neighborCount = 0;\n\t\t\t\tif(!board[r][c].isMine()) {\n\t\t\t\t\t//checks if there is mines touching\n\t\t\t\t\tneighborCount = neighboringMines(r, c);\n\t\t\t\t\tif (neighborCount > 0) {\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(true);\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines\n\t\t\t\t\t\t\t\t(neighborCount);\n\t\t\t\t\t} else if (neighborCount == 0) {\n\t\t\t\t\t\tboard[r][c].setNumNeighboringMines(0);\n\t\t\t\t\t\tboard[r][c].setIsNeighboringMine(false);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "public void updatePosition(){\n\t\t//maps the position to the closest \"grid\"\n\t\tif(y-curY>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY+GameSystem.GRID_SIZE;\n\t\t\tyGridNearest++;\n\t\t}\n\t\telse if(curX-x>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX-GameSystem.GRID_SIZE;\n\t\t\txGridNearest--;\n\t\t}\n\t\telse if(x-curX>=GameSystem.GRID_SIZE/2){\n\t\t\tcurX=curX+GameSystem.GRID_SIZE;\n\t\t\txGridNearest++;\n\t\t}\n\t\telse if(curY-y>=GameSystem.GRID_SIZE/2){\n\t\t\tcurY=curY-GameSystem.GRID_SIZE;\n\t\t\tyGridNearest--;\n\t\t}\n\t\t//sets the last completely arrived location grid\n\t\tif(y-yTemp>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp+GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY++;\n\t\t}\n\t\telse if(xTemp-x>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp-GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX--;\n\t\t}\n\t\telse if(x-xTemp>=GameSystem.GRID_SIZE){\n\t\t\txTemp=xTemp+GameSystem.GRID_SIZE;\n\t\t\tx=xTemp;\n\t\t\tlastX++;\n\t\t}\n\t\telse if(yTemp-y>=GameSystem.GRID_SIZE){\n\t\t\tyTemp=yTemp-GameSystem.GRID_SIZE;\n\t\t\ty=yTemp;\n\t\t\tlastY--;\n\t\t}\n\t\t//only updates nextX and nextY when the move buttons are being pressed down\n\t\t/*\n\t\tif(movable){\n\t\t\tif(direction.equals(\"right\")){\n\t\t\t\t\tnextX=lastX+1;\n\t\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"left\")){\n\t\t\t\tnextX=lastX-1;\n\t\t\t\tnextY=lastY;\n\t\t\t}\n\t\t\telse if(direction.equals(\"up\")){\n\t\t\t\tnextY=lastY-1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t\telse if(direction.equals(\"down\")){\n\t\t\t\tnextY=lastY+1;\n\t\t\t\tnextX=lastX;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t\n\t}", "public void move(Cell[][] board) {\n Cell[] nextCells = generateNeighbors(this.x, this.y);\n Cell nextCell = nextCells[rand.nextInt(4)];\n if (!this.objectFound) {\n if (nextCell != null && nextCell.isOccupied() && nextCell.occupiedBy instanceof Integer) {\n this.objectFound = true;\n this.goal = nextCell;\n } else if (nextCell != null && !nextCell.isOccupied()) {\n synchronized (board[this.x][this.y]) {\n board[this.x][this.y].resetCell();\n nextCell.occupiedBy = this;\n }\n }\n } else {\n // bfs to location\n System.out.println(\"BFS to goal\");\n }\n }", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "public void specialMove() {\n\t\tChessSquare initial = getSquare();\n\t\tChessSquare next;\n\t\t\n\t\tif(initial.getNorth() != null){\n\t\t\tnext = initial.getNorth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null && next.getWest().getOccupant() == null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t}\n\t\t\n\t\tif(initial.getSouth() != null){\n\t\t\tnext = initial.getSouth();\n\t\t\t\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getEast() != null)\n\t\t\t\tif((next.getEast().getOccupant() == null) || (!next.getEast().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\tif(next.getWest() != null)\n\t\t\t\tif((next.getWest().getOccupant() == null) || (!next.getWest().getOccupant().getColor().equals(this.getColor())))\n\t\t\t\t\tnext.removeOccupant();\n\t\t\t\n\t\t}\n\t\t\n\t\tnext = initial.getEast();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tnext = initial.getWest();\n\t\tif(next != null)\n\t\t\tif((next.getOccupant() == null) || (!next.getOccupant().getColor().equals(this.getColor())))\n\t\t\t\tnext.removeOccupant();\n\t\tsetCountdown(9);\n\t}", "public void drawCell(Graphics g) {\n if (isVisited()) { // visited cells are white\n setCellColor(g, Color.WHITE);\n }\n if (isSolution()) { // cells that are part of the most optimal solution are yellow\n setCellColor(g, Color.YELLOW);\n }\n\n // draw the walls if there are any\n int col2 = col * CELL_DIMS;\n int row2 = row * CELL_DIMS;\n\n g.setColor(Color.BLACK); // walls are black\n if (walls[0]) // north wall\n g.drawLine(col2, row2, col2 + CELL_DIMS, row2);\n if (walls[1]) // east wall\n g.drawLine(col2 + CELL_DIMS, row2, col2 + CELL_DIMS, row2 + CELL_DIMS);\n if (walls[2]) // south wall\n g.drawLine(col2 + CELL_DIMS, row2 + CELL_DIMS, col2, row2 + CELL_DIMS);\n if (walls[3]) // west wall\n g.drawLine(col2, row2 + CELL_DIMS, col2, row2);\n }", "private void moveRecursiveHelper (double pixels) {\n if (pixels <= 0 + PRECISION_LEVEL) return;\n \n Location currentLocation = getLocation();\n Location nextLocation = getLocation();\n Location nextCenter = nextLocation;\n nextLocation.translate(new Vector(getHeading(), pixels));\n Location[] replacements = { nextLocation, nextCenter };\n \n if (nextLocation.getY() < 0) {\n // top\n replacements = overrunsTop();\n }\n else if (nextLocation.getY() > myCanvasBounds.getHeight()) {\n // bottom\n replacements = overrunBottom();\n }\n else if (nextLocation.getX() > myCanvasBounds.getWidth()) {\n // right\n replacements = overrunRight();\n }\n else if (nextLocation.getX() < 0) {\n // left\n replacements = overrunLeft();\n }\n \n nextLocation = replacements[0];\n nextCenter = replacements[1];\n \n setCenter(nextCenter);\n double newPixels = pixels - (Vector.distanceBetween(currentLocation, nextLocation));\n if (myPenDown) {\n myLine.addLineSegment(currentLocation, nextLocation);\n }\n moveRecursiveHelper(newPixels);\n \n }", "public SubCell neighbor(Direction dir) {\n switch (dir) {\n case N:\n return new SubCell(x(), y() - 1);\n case E:\n return new SubCell(x() + 1, y());\n case S:\n return new SubCell(x(), y() + 1);\n case W:\n return new SubCell(x() - 1, y());\n default:\n return new SubCell(x(), y());\n }\n }", "private void drive(int e) {\r\n if (endx[e] + 120 >= width - radius[e] && directionend[e] == 0) {\r\n endx[e] += 20;\r\n endy[e] -= 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endy[e] + 120 >= height - radius[e] && directionend[e] == 1) {\r\n\r\n endx[e] += 20;\r\n endy[e] += 20;\r\n directionend[e]++;\r\n radius[e] -= 60;\r\n directionchanged[e] = true;\r\n } else if (endx[e] - 120 <= radius[e] && directionend[e] == 2) {\r\n endx[e] -= 20;\r\n endy[e] += 20;\r\n radius[e] -= 60;\r\n directionend[e]++;\r\n directionchanged[e] = true;\r\n } else if (endy[e] - 80 <= radius[e] && directionend[e] == 3) {\r\n endx[e] -= 20;\r\n endy[e] -= 20;\r\n radius[e] -= 60;\r\n directionend[e] = 0;\r\n directionchanged[e] = true;\r\n } else {\r\n directionchanged[e] = false;\r\n }\r\n }", "public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }", "private Boolean pointNotMyCell(Position3D cell,int d, int r, int c) {\n return !(d == cell.getDepthIndex() && c == cell.getColumnIndex() && r == cell.getRowIndex());\n }", "void ompleBlocsHoritzontals() {\r\n\r\n for (int i = 0; i < N; i = i + SRN) // for diagonal box, start coordinates->i==j \r\n {\r\n ompleBloc(i, i);\r\n }\r\n }", "public void putCellInGoodPlace(JmtCell cell, int x, int y, boolean flag) {\n \t\tif (sp > 9) {\r\n \t\t\tsp = 0;\r\n \t\t}\r\n \t\tint oldPointX = 0;\r\n \t\tint oldPointY = 0;\r\n \t\tboolean inGroup = false;\r\n \t\t// Il flag stato creato per capire sapere se e' una block regione e\r\n \t\t// quindi utilizzare\r\n \t\t// il vecchio metodo oppure se e' una cella quindi flag=true allora uso\r\n \t\t// il nuovo\r\n \t\t// System.out.println(\"------------PUT CELL IN GOOD PLACE\r\n \t\t// ----------------------\");\r\n \r\n \t\tif (flag) {\r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tRectangle bounds2 = new Rectangle((int) bounds.getX() - 20, (int) bounds.getY(), (int) bounds.getWidth() + 38, (int) bounds.getHeight());\r\n \r\n \t\t\toldPointX = x;\r\n \t\t\toldPointY = y;\r\n \t\t\t// ---------inzio\r\n \t\t\t// Object[] cells=(graph).getDescendants(graph.getRoots());\r\n \t\t\t// for(int j=0;j<cells.length;j++){\r\n \t\t\t// if((cells[j] instanceof JmtCell) &&(cells[j]!=cell)){\r\n \t\t\t// Rectangle\r\n \t\t\t// boundcell=GraphConstants.getBounds(((JmtCell)cells[j]).getAttributes()).getBounds();\r\n \t\t\t// if(boundcell.intersects(bounds2)){\r\n \t\t\t// System.out.println(\"true\");\r\n \t\t\t// }\r\n \t\t\t// }\r\n \t\t\t// }\r\n \r\n \t\t\t// ---------------fine\r\n \t\t\t// check if a cell isInGroup\r\n \t\t\tif (isInGroup(cell)) {\r\n \r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \r\n \t\t\t// Qua ho le celle e archi che intersecano la mia cella\r\n \t\t\t// selezionata..bounds (molto efficente dal punto di vista della\r\n \t\t\t// pesantezza)\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds2));\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\tresetOverLapping = 0;\r\n \t\t\twhile (overlapping.length > 0) {\r\n \r\n \t\t\t\t// Moves bounds until it doesn't overlap with anything\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (int j = 0; j < overlapping.length; j++) {\r\n \r\n \t\t\t\t\tresetOverLapping++;\r\n \t\t\t\t\t// resetOverLapping is inserted for an anormall behavior of\r\n \t\t\t\t\t// Tool\r\n \t\t\t\t\t// in fact, if you disable this variable you can see that\r\n \t\t\t\t\t// the tools\r\n \t\t\t\t\t// stop and \"for cycle\" will be repeated infinite times\r\n \t\t\t\t\tif (resetOverLapping > 50) {\r\n \t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\treturn;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// System.out.println(\"---flag in for---\");\r\n \t\t\t\t\t// if(overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t// &&((JmtEdge)overlapping[j]).intersects((EdgeView)(graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t// false),\r\n \t\t\t\t\t// GraphConstants.getBounds(((JmtCell)cell).getAttributes())))\r\n \t\t\t\t\t// System.out.println(\"Intersect TRUE\");\r\n \r\n \t\t\t\t\t// Puts last to last corner of overlapping cells\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtCell && overlapping[j] != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \r\n \t\t\t\t\tif (!inGroup && overlapping[j] instanceof JmtCell && overlapping[j] != cell) {\r\n \r\n \t\t\t\t\t\tRectangle2D b = GraphConstants.getBounds(((JmtCell) overlapping[j]).getAttributes());\r\n \t\t\t\t\t\t// Consider only rectangles that intersects with given\r\n \t\t\t\t\t\t// bound\r\n \t\t\t\t\t\tif (b.intersects(bounds2)) {\r\n \t\t\t\t\t\t\tlast.setLocation(new Point(oldPointX, oldPointY));\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// inizio a controllare se l intersezione e' un lato\r\n \t\t\t\t\tif (overlapping[j] instanceof JmtEdge\r\n \t\t\t\t\t\t\t&& overlapping[j] != cell\r\n \t\t\t\t\t\t\t&& !isInGroup(overlapping[j])\r\n \t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\tGraphConstants.getBounds(cell.getAttributes())) && ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\tboolean access = false;\r\n \t\t\t\t\t\tboolean access2 = false;\r\n \r\n \t\t\t\t\t\t// Nonostatne SourceCell e SinkCell estendano JMTCell\r\n \t\t\t\t\t\t// avevo problemi di nullPointerException per questo\r\n \t\t\t\t\t\t// verifico di che\r\n \t\t\t\t\t\t// tipo sono\r\n \r\n \t\t\t\t\t\tif (cell instanceof SourceCell\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SourceCell) cell).getAttributes()))) {\r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)) {\r\n \t\t\t\t\t\t\t\t// _______INIZIO_____\r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SourceCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\tsp = sp + 2;\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, false, true);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp, false,\r\n \t\t\t\t\t\t\t\t\t\t\tfalse, true, false);\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\taccess = true;\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (cell instanceof SinkCell) {\r\n \r\n \t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)) {\r\n \r\n \t\t\t\t\t\t\t\tif (((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j], false),\r\n \t\t\t\t\t\t\t\t\t\tGraphConstants.getBounds(((SinkCell) cell).getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(((SinkCell) cell).getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\taccess2 = true;\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tif (!isInGroup(overlapping[j]) && !access && !access2 && overlapping[j] instanceof JmtEdge) {\r\n \t\t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t\t&& ((JmtEdge) overlapping[j]).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(overlapping[j],\r\n \t\t\t\t\t\t\t\t\t\t\tfalse), GraphConstants.getBounds(cell.getAttributes()))) {\r\n \r\n \t\t\t\t\t\t\t\taccess = access2 = false;\r\n \r\n \t\t\t\t\t\t\t\tArrayList<Point2D> intersectionPoints = ((JmtEdge) overlapping[j]).getIntersectionVertexPoint();\r\n \t\t\t\t\t\t\t\tif ((intersectionPoints == null) || intersectionPoints.size() <= 0) {\r\n \t\t\t\t\t\t\t\t\tbounds.setLocation(new Point(oldPointX, oldPointY));\r\n \t\t\t\t\t\t\t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \t\t\t\t\t\t\t\t\tresetOverLapping = 0;\r\n \t\t\t\t\t\t\t\t\treturn;\r\n \t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\tPoint2D tmp = (intersectionPoints.get(0));\r\n \r\n \t\t\t\t\t\t\t\t\tRectangle2D cellBound = GraphConstants.getBounds(cell.getAttributes());\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxX = (int) cellBound.getMaxX();\r\n \t\t\t\t\t\t\t\t\tdouble vertexMaxY = (int) cellBound.getMaxY();\r\n \t\t\t\t\t\t\t\t\tdouble vertexHeight = (int) cellBound.getHeight();\r\n \t\t\t\t\t\t\t\t\tdouble vertexWidth = (int) cellBound.getWidth();\r\n \t\t\t\t\t\t\t\t\tboolean upperSideIntersaction = ((JmtEdge) overlapping[j]).getUpperSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean lowerSideIntersaction = ((JmtEdge) overlapping[j]).getLowerSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean leftSideIntersaction = ((JmtEdge) overlapping[j]).getLeftSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tboolean rightSideIntersaction = ((JmtEdge) overlapping[j]).getRightSideIntersaction();\r\n \t\t\t\t\t\t\t\t\tif (upperSideIntersaction && lowerSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxX - (int) (vertexWidth / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getX() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\t;\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (leftSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tint valoreIntermedio = ((int) vertexMaxY - (int) (vertexHeight / 2));\r\n \t\t\t\t\t\t\t\t\t\tif ((int) tmp.getY() < valoreIntermedio) {\r\n \r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\tfalse, true, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition2 = new Point(newPosition.x, newPosition.y + sp);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition2);\r\n \t\t\t\t\t\t\t\t\t\t\tsp = sp + 3;\r\n \t\t\t\t\t\t\t\t\t\t\t// bounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t\t// GraphConstants.setBounds(((SinkCell)cell).getAttributes(),\r\n \t\t\t\t\t\t\t\t\t\t\t// cellBounds);\r\n \t\t\t\t\t\t\t\t\t\t} else {\r\n \t\t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\t\ttrue, false, false, false);\r\n \t\t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (upperSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && rightSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint2D tmp1 = (intersectionPoints.get(1));\r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp1,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, false, true);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\r\n \t\t\t\t\t\t\t\t\t} else if (lowerSideIntersaction && leftSideIntersaction) {\r\n \r\n \t\t\t\t\t\t\t\t\t\tPoint newPosition = (this.overlapping).findFreePosition(((JmtEdge) overlapping[j]), cell, cellBound, tmp,\r\n \t\t\t\t\t\t\t\t\t\t\t\tfalse, false, true, false);\r\n \t\t\t\t\t\t\t\t\t\tbounds.setLocation(newPosition);\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}\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t} // end if of edge\r\n \t\t\t\t}\r\n \r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \r\n \t\t\t// Puts this cell in found position\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t} else {\r\n \r\n \t\t\tRectangle bounds = GraphConstants.getBounds(cell.getAttributes()).getBounds();\r\n \t\t\tif (isInGroup(cell)) {\r\n \t\t\t\tinGroup = true;\r\n \t\t\t}\r\n \r\n \t\t\t// Avoids negative starting point\r\n \t\t\tif (bounds.getX() < 20) {\r\n \t\t\t\tbounds.setLocation(20, (int) bounds.getY());\r\n \t\t\t}\r\n \t\t\tif (bounds.getY() < 0) {\r\n \t\t\t\tbounds.setLocation((int) bounds.getX(), 0);\r\n \t\t\t}\r\n \t\t\tObject[] overlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \r\n \t\t\tif (overlapping == null) {\r\n \r\n \t\t\t\treturn;\r\n \t\t\t}\r\n \r\n \t\t\tPoint2D zero = new Point(20, 0);\r\n \t\t\twhile (overlapping.length > 0) {\r\n \t\t\t\tPoint2D last = (Point2D) zero.clone();\r\n \t\t\t\tfor (Object element : overlapping) {\r\n \t\t\t\t\tif (element instanceof JmtCell && element != cell && inGroup) {\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtCell) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\tif (b2.getMaxX() > last.getX()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(b2.getMaxX(), last.getY());\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tif (b2.getMaxY() > last.getY()) {\r\n \t\t\t\t\t\t\t\tlast.setLocation(last.getX(), b2.getMaxY());\r\n \t\t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t}\r\n \t\t\t\t\tif (!inGroup && element instanceof JmtCell && element != cell) {\r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \t\t\t\t\tint numberOfChild = cell.getChildCount();\r\n \t\t\t\t\tif (isInGroup(element) && element instanceof JmtEdge) {\r\n \t\t\t\t\t\tif ((numberOfChild == 2)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getSource() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(0)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).getTarget() != cell.getChildAt(1)\r\n \t\t\t\t\t\t\t\t&& ((JmtEdge) element).intersects((EdgeView) (graph.getGraphLayoutCache()).getMapping(element, false), GraphConstants\r\n \t\t\t\t\t\t\t\t\t\t.getBounds(cell.getAttributes()))) {\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\tRectangle2D b2 = GraphConstants.getBounds(((JmtEdge) element).getAttributes());\r\n \t\t\t\t\t\tif (b2.intersects(bounds)) {\r\n \t\t\t\t\t\t\t// ___\r\n \t\t\t\t\t\t}\r\n \r\n \t\t\t\t\t\tlast.setLocation(new Point((int) (last.getX() + .5), (int) (last.getY() + .5)));\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\tif (last.equals(zero)) {\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\tbounds.setLocation(new Point((int) (last.getX()), (int) (last.getY())));\r\n \t\t\t\toverlapping = graph.getDescendants(graph.getRoots(bounds));\r\n \t\t\t}\r\n \t\t\tGraphConstants.setBounds(cell.getAttributes(), bounds);\r\n \r\n \t\t}\r\n \r\n \t}", "@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tint clickX = e.getX();\n\t\tint clickY = e.getY();\n\t\tint row = clickX/cellSize;\n\t\tint col = clickY/cellSize;\n\t\tgameLogic.setElement(row, col, 1);\n\t}", "public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}", "public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void watchCell(int x, int y) {\n // TODO Auto-generated method stub\n // Disable consequences of watchAroundCell\n for (int i = x - 1; i < x + 2; i++)\n for (int j = y - 1; j < y + 2; j++)\n if ((i >= 0) && (i < widthOfField) && (j >= 0)\n && (j < heightOfField))\n\n if (fieldManager.isCellOpenable(i, j))\n fieldInerface.putUnBlankButton(i, j);\n\n if (!(fieldManager.isCellOpenable(x, y) || fieldManager.isCellMarked(x,\n y))) {// If cell is opened\n // Checkout If number of marks around (visible)cell equal to number\n // of mines around (logical)cell open all cells around\n int k = 0;\n for (int i = x - 1; i < x + 2; i++)\n for (int j = y - 1; j < y + 2; j++)\n if ((i >= 0) && (i < widthOfField) && (j >= 0)\n && (j < heightOfField))\n\n if (fieldManager.isCellMarked(i, j))\n k++;\n // if it's true, open all cells around\n if (k == fieldManager.getEnv(x, y))\n for (int i = x - 1; i < x + 2; i++)\n for (int j = y - 1; j < y + 2; j++)\n if ((i >= 0) && (i < widthOfField) && (j >= 0)\n && (j < heightOfField))\n if (fieldManager.isCellOpenable(i, j))\n pushCell(i, j);\n }\n }", "public void move(int dir) {\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tint nextX = x[i] + dir;\n\t\t\tif (nextX < 0 || nextX >= 10)\n\t\t\t\treturn;\n\t\t\tif (Tetris.game.grid[nextX][y[i]] != 0)\n\t\t\t\treturn;\n\t\t}\n\t\tfor (int i = 0; i < 4; i++)\n\t\t\tx[i] += dir;\n\t}", "private int getSouthEastCell(Cell cell) {\n\t\tint cellNumber = cell.getNumber();\n\t\tif ((cellNumber < getGridSize() - getGridWidth()) && (cellNumber % getGridWidth() != (getGridWidth()-1))) {\n\t\t\treturn (cellNumber + getGridWidth() + 1);\n\t\t} else {\n\t\t\tif (isToroidal()) {\n\t\t\t\tif (cellNumber < getGridSize() - getGridWidth()) { //move east, then south\n\t\t\t\t\treturn (cellNumber + 1);\n\t\t\t\t}\n\t\t\t\tif (cellNumber % getGridWidth() != (getGridWidth()-1)) { //move south, then east\n\t\t\t\t\treturn (cellNumber % getGridWidth() + 1);\n\t\t\t\t}\n\t\t\t\treturn (0); //lower right corner\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private void visitor(Map map, int row, int column) throws NotValidCellException {\n try {\n // controllo le diagonali non visitati rispetto alla mia posizione attuale\n if(!map.isEmptyCell(row, column)) { //se la cella non è vuota,\n if (row < 1 && column < 1 ) { // controlla alto sinistra della mappa\n downrightcontrol(map, row, column); //controlla basso destra rispetto alla mia posizione attuale\n } else if (row > map.numRow() - 2 && column < 1 ) { //controlla basso sinistra sulla mappa\n uprightcontrol(map, row, column); //controlla alto destra rispetto alla mia posizione attuale\n } else if (row > 0 && row <= map.numRow() - 2 && column < 1) { //controlla centrale sinistra della mappa\n uprightcontrol(map, row, column);\n downrightcontrol(map, row, column);\n } else if (row < 1 && column > map.numColumn() - 2) { //controlla alto destra della mappa\n downleftcontrol(map, row, column); //controlla basso sinistra rispetto alla mia posizione attuale\n } else if (row > map.numRow() - 2 && column > map.numColumn() - 2) { //controlla basso destra della mappa\n upleftcontrol(map, row, column); //controlla alto sinistra rispetto alla mia posizione attuale\n } else if (row > 0 && row <= map.numRow() - 2 && column > map.numColumn() - 2) { //controlla centrale destra della mappa\n upleftcontrol(map, row, column);\n downleftcontrol(map, row, column);\n } else if (row < 1 && column > 0 && column <= map.numColumn() - 2) { //controlla alto centro della mappa\n downleftcontrol(map, row, column);\n downrightcontrol(map, row, column);\n } else if (row > map.numRow() - 2 && column > 0 && column <= map.numColumn() - 2) { //controlla basso centrale della mappa\n upleftcontrol(map, row, column);\n uprightcontrol(map, row, column);\n } else if (row > 0 && row < map.numRow() - 1 && column > 0 && column < map.numColumn() - 1) { //controlla centro mappa\n upleftcontrol(map, row, column);\n uprightcontrol(map, row, column);\n downleftcontrol(map, row, column);\n downrightcontrol(map, row, column);\n }\n }\n } catch (NotValidCellException e) {\n LOGGER.log(Level.SEVERE, e.toString()+\"\\nvisitor method in class ColorDiagonalStrategy\", e);\n throw new NotValidCellException();\n }\n }", "void oracle(){\n if (this.neighbors < 1){\n if (!isAlive()){\n observer.deleteCell(id);\n }\n }\n }", "void onMove(Sudoku.State state, Location loc, Numeral num);", "@Override\n public void lastMove( PlayerMove playerMove ) {\n int row = playerMove.getCoordinate().getRow();\n int col = playerMove.getCoordinate().getCol();\n int team = playerMove.getPlayerId();\n if(row%2 == 0 && col%2 == 0){\n if(team == 1){\n Dot n1 = board.getNode(new Coordinate(row+1,col));\n Dot n2 = board.getNode(new Coordinate(row -1,col));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n else {\n Dot n1 = board.getNode(new Coordinate(row, col + 1));\n Dot n2 = board.getNode(new Coordinate(row, col - 1));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n }\n else{\n if(team == 1){\n Dot n1 = board.getNode(new Coordinate(row,col+1));\n Dot n2 = board.getNode(new Coordinate(row ,col-1));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n else {\n Dot n1 = board.getNode(new Coordinate(row+1, col));\n Dot n2 = board.getNode(new Coordinate(row-1, col));\n n1.addNeighbor(n2);\n n2.addNeighbor(n1);\n }\n }\n\n }", "@Override\n\tprotected boolean moveRobot(boolean printEachStep) {\n\t\tboolean move=true;\n\t\tint incOrDecR = destRow > curRow ? 1 : -1, \n\t\t\tincOrDecC = destCol > curCol ? 1 : -1, \n\t\t\tcount = diagonalCount();\n\t\t\t// Move diagonally as close to the destination it can get to\n\t\t\tfor(int i=0; i<count; ++i) {\n\t\t\t\tif(move=grid.moveFromTo(this, curRow, curCol, \n\t\t\t\t\t\tblockedRow=curRow+incOrDecR, \n\t\t\t\t\t\tblockedCol=curCol+incOrDecC)) { \n\t\t\t\t\tcurRow+=incOrDecR; \n\t\t\t\t\tcurCol+=incOrDecC;\n\t\t\t\t\t--energyUnits;\n\t\t\t\t\tif(printEachStep)\n\t\t\t\t\t\tgrid.printGrid();\n\t\t\t\t} else {\n\t\t\t\t\treturn move; \n\t\t\t\t}\n\t\t\t}\n\t\tmove=super.moveRobot(printEachStep);\n\t\treturn move;\n\t}", "private void update() {\n // Set for each cell\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n cell.setBackground(BKGD_DARK_GRAY);\n cell.setForeground(Color.WHITE);\n cell.setFont(new Font(\"Halvetica Neue\", Font.PLAIN, 36));\n cell.setBorder(new LineBorder(Color.BLACK, 0));\n cell.setHorizontalAlignment(JTextField.CENTER);\n cell.setCaretColor(new Color(32, 44, 53));\n cell.setDragEnabled(false);\n cell.setTransferHandler(null);\n\n // Add subgrid separators\n CellPosition pos = cell.getPosition();\n if (pos.getColumn() == 2 || pos.getColumn() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 2, new Color(146, 208, 80)));\n } else if (pos.getRow() == 2 || pos.getRow() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(146, 208, 80)));\n }\n if ((pos.getColumn() == 2 && pos.getRow() == 2) || (pos.getColumn() == 5 && pos.getRow() == 5)\n || (pos.getColumn() == 2 && pos.getRow() == 5) || (pos.getColumn() == 5 && pos.getRow() == 2)) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 2, new Color(146, 208, 80)));\n }\n\n // Validate User's Cell Input + Mouse Listeners\n cell.removeKeyListener(cellKeyListener);\n cell.removeMouseListener(cellMouseListener);\n if (cell.isLocked()) {\n cell.setEditable(false);\n cell.setHighlighter(null);\n } else {\n cell.setBackground(BKGD_LIGHT_GRAY);\n cell.addMouseListener(cellMouseListener);\n cell.addKeyListener(cellKeyListener);\n }\n if (cell.isEmpty()) {\n cell.setText(\"\");\n } else {\n cell.setText(String.valueOf(cell.getUserValue()));\n }\n\n // Adds cell to the view's grid\n this.view.getGamePanel().getGrid().add(cell);\n }\n\n }", "public int move_diagonally(Square[][] squares, int [] move, Boolean turn) {\n\n /* going down and right = f4 h2 [4,5,6,7] */\n if (move[2] > move[0] && move[3] > move[1]) {\n ////System.out.println(\"Down right\");\n int x = move[0];\n int y = move[1];\n x++;\n y++;\n while (x < move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y++;\n }\n }\n /* going down and left */\n else if (move[2] > move[0] && move[3] < move[1]){\n ////System.out.println(\"Down Left\");\n int x = move[0];\n int y = move[1];\n x++;\n y--;\n while (x < move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x++;\n y--;\n }\n }\n /* going up and left */\n else if (move[2] < move[0] && move[3] < move[1]){\n ////System.out.println(\"Up Left\");\n int x = move[0];\n int y = move[1];\n x--;\n y--;\n while (x > move[2] && y > move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y--;\n }\n }\n /* going up and right c1 f4 [7,2,4,5] */\n else if (move[2] < move[0] && move[3] > move[1]){\n ////System.out.println(\"Up right\");\n int x = move[0];\n int y = move[1];\n x--;\n y++;\n while (x > move[2] && y < move[3]) {\n if (squares[x][y] instanceof Piece) {\n ////System.out.println(\"Piece in between \"+x + \" \" + y);\n return -1;\n }\n x--;\n y++;\n }\n }\n return 0;\n }", "public void setCell(boolean upR, boolean upL, boolean doR, boolean doL){\n upperRight = upR;\n upperLeft = upL;\n downerRight = doR;\n downerLeft = doL;\n }", "int removeObstacle(int numRows, int numColumns, List<List<Integer>> lot)\r\n {\r\n \tint m = 0;\r\n \tint n = 0;\r\n \tfor(List<Integer> rowList: lot) {\r\n \t\tfor(Integer num: rowList) {\r\n \t\t\tif(num == 9 ) {\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t\tn++;\r\n \t\t}\r\n \t\tm++;\r\n \t}\r\n \t// to store min cells required to be \r\n // covered to reach a particular cell \r\n int dp[][] = new int[numRows][numColumns]; \r\n \r\n // initially no cells can be reached \r\n for (int i = 0; i < numRows; i++) \r\n for (int j = 0; j < numColumns; j++) \r\n dp[i][j] = Integer.MAX_VALUE; \r\n \r\n // base case \r\n dp[0][0] = 1; \r\n \r\n for (int i = 0; i < lot.size(); i++) {\r\n \tList<Integer> columnList = lot.get(i);\r\n for (int j = 0; j < columnList.size(); j++) { \r\n \r\n // dp[i][j] != INT_MAX denotes that cell \r\n // (i, j) can be reached from cell (0, 0) \r\n // and the other half of the condition \r\n // finds the cell on the right that can \r\n // be reached from (i, j) \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (j + columnList.get(j)) < numColumns && (dp[i][j] + 1) \r\n < dp[i][j + columnList.get(j)]\r\n \t\t && columnList.get(j) != 0) \r\n dp[i][j + columnList.get(j)] = dp[i][j] + 1; \r\n \r\n if (dp[i][j] != Integer.MAX_VALUE && \r\n (i + columnList.get(j)) < numRows && (dp[i][j] + 1) \r\n < dp[i + columnList.get(j)][j] && columnList.get(j) != 0) \r\n dp[i + columnList.get(j)][j] = dp[i][j] + 1; \r\n } \r\n } \r\n \r\n if (dp[m - 1][n - 1] != Integer.MAX_VALUE) \r\n return dp[m - 1][n - 1]; \r\n \r\n return -1; \r\n }", "public void movePiece(Location a, Location b)\n {\n Square s1 = getSquare(a);\n Square s2 = getSquare(b);\n Piece p = s1.getPiece();\n if (p==null)\n return;\n int moveType = canMoveTo(p,b);\n boolean taking = getPiece(b)!=null;\n boolean fiftyMoveBreak = getPiece(b)!=null||p.getType()==Type.PAWN;\n s2.setPiece(s1.removePiece());\n p.setHasMoved(true);\n if (p.getType()==Type.PAWN)\n {\n if (mainBoard&&((p.white()&&getLocation(p).getRow()==0)\n || !p.white()&&getLocation(p).getRow()==7))\n promotePawn(p);\n else if (moveType==EN_PASSANT)\n {\n int row = a.getRow();\n int col = b.getCol();\n removePiece(new Location(row,col));\n taking = true;\n }\n }\n else if (moveType==KINGSIDE_CASTLING||moveType==QUEENSIDE_CASTLING)\n {\n Location rookLoc;\n Location rookDest;\n if (moveType==KINGSIDE_CASTLING)\n {\n rookLoc = b.farther(Direction.EAST);\n rookDest = b.farther(Direction.WEST);\n }\n else\n {\n rookLoc = new Location(b.getRow(),b.getCol()-2);\n rookDest = b.farther(Direction.EAST);\n }\n //movePiece(getLocation(rook),rookDest);\n getSquare(rookDest).setPiece(removePiece(rookLoc)); //moves the rook\n }\n if (mainBoard)\n {\n turn++;\n if (fiftyMoveBreak)\n fiftyMove= 0;\n else fiftyMove++;\n }\n for (Piece piece: getPieces())\n piece.setHasJustMoved(false);\n p.setHasJustMoved(true);\n if (mainBoard)\n {\n positions.add(toString());\n \n //this is all for the notation on the side\n notateMove(p,b,moveType,taking);\n /*JTable not = frame.getNotation();\n DefaultTableModel d = (DefaultTableModel)not.getModel();\n String notation;\n PieceColor color = p.getColor();\n if (color==PieceColor.WHITE)\n notation = turn/2+1+\". \"; //the turn number first, on the left\n else notation = \"\";\n if (moveType==QUEENSIDE_CASTLING)\n notation += \"0-0-0\";\n else if (moveType==KINGSIDE_CASTLING)\n notation += \"0-0\";\n else //normal move\n {\n if (p.getType()!=Type.PAWN)\n notation+=p.getType().toNotation(); //the type of piece (K,N,R,etc)\n if (taking)\n notation+=\"x\"; //this is if the move involves taking\n notation+=Location.LocToNot(b);\n }\n if (checkmate(colorGoing())) //notates # for checkmate\n notation+=\"#\";\n else if (inCheck(colorGoing())) //notates + for check\n notation+=\"+\";\n \n if (color==PieceColor.WHITE)\n d.addRow(new Object[]{notation,\"\"});\n else \n d.setValueAt(notation, (turn-1)/2, 1);*/\n }\n }", "private AntArea.Cell getCellInDirection(Pair<Integer, Integer> direction) {\n int newX = location.getKey() + direction.getKey();\n int newY = location.getValue() + direction.getValue();\n\n //Torus shape\n newX = newX < 0 ? antArea.getAreaWidth() - 1 : newX;\n newY = newY < 0 ? antArea.getAreaHeight() - 1 : newY;\n newX %= antArea.getAreaWidth();\n newY %= antArea.getAreaHeight();\n\n return antArea.getMap()[newX][newY];\n }", "private void discoverCells(Cell[][] view) {\n\t\t// Clear the lists of new Cells and Tasks from last timestep\n\t\tevents.clear();\n\t\tnewFuel.clear();\n\t\tnewWells.clear();\n\t\tnewStations.clear();\n\t\tnewTasks.clear();\n\n\t\t// Iterate over each Cell in the Tanker's view\n\t\tfor (int ix = 0; ix < view.length; ix++) {\n\t\t\tfor (int iy = 0; iy < view[0].length; iy++) {\n\t\t\t\tCell cell = view[ix][iy];\n\n\t\t\t\tboolean discovered = false;\n\n\t\t\t\t// Ignore empty Cells and Stations which have been discovered but have no Task\n\t\t\t\tif (cell instanceof EmptyCell) continue;\n\t\t\t\tif (discoveredPoints.contains(cell.getPoint())) {\n\t\t\t\t\tif (!(cell instanceof Station)) continue;\n\t\t\t\t\tif (((Station) cell).getTask() == null) continue;\n\t\t\t\t\tdiscovered = true;\n\t\t\t\t}\n\n\t\t\t\t// Add the current Cell to the set of discovered cells\n\t\t\t\tdiscoveredPoints.add(cell.getPoint());\n\n\t\t\t\t// Infer the Cell's Position from its position in the Tanker's view\n\t\t\t\tPosition cellPos = new Position(\n\t\t\t\t\t\tposition.x + (ix - VIEW_RANGE),\n\t\t\t\t\t\tposition.y - (iy - VIEW_RANGE) // this is why +y is usually down and not up\n\t\t\t\t);\n\n\t\t\t\t// Create a new entry in advance\n\t\t\t\tRunnerList2.Entry<Position> newEntry = new RunnerList2.Entry<>(cellPos.x, cellPos.y, cellPos);\n\n\t\t\t\t// Add Pumps to the map and create a new PumpEvent\n\t\t\t\tif (cell instanceof FuelPump) {\n\t\t\t\t\tevents.add(new PumpEvent(cellPos));\n\t\t\t\t\tnewFuel.add(newEntry);\n\n\t\t\t\t// Add Wells to the map and create a new WellEvent\n\t\t\t\t} else if (cell instanceof Well) {\n\t\t\t\t\tevents.add(new WellEvent(cellPos));\n\t\t\t\t\tnewWells.add(newEntry);\n\n\t\t\t\t// Add Stations to the map. If there is a Task, add it to the map and create a new\n\t\t\t\t// TaskEvent\n\t\t\t\t} else if (cell instanceof Station) {\n\t\t\t\t\tif (!discovered) newStations.add(newEntry);\n\n\t\t\t\t\tTask task = ((Station) cell).getTask();\n\t\t\t\t\tif (task != null && !discoveredTasks.contains(cellPos)) {\n\t\t\t\t\t\tdiscoveredTasks.add(cellPos);\n\t\t\t\t\t\tevents.add(new TaskEvent(cellPos, task.getWasteRemaining()));\n\t\t\t\t\t\tnewTasks.add(new RunnerList2.Entry<>(cellPos.x, cellPos.y, new TaskPosition(cellPos, task)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add all Cells in bulk to their respective lists\n\t\tfuelList.addAll(newFuel);\n\t\twellList.addAll(newWells);\n\t\tstationList.addAll(newStations);\n\t\tstationTaskList.addAll(newTasks);\n\t}" ]
[ "0.64605373", "0.64526755", "0.6378933", "0.6299775", "0.62199265", "0.61604124", "0.6157432", "0.6140022", "0.6133769", "0.60870147", "0.60786545", "0.6070697", "0.6064324", "0.6053474", "0.60476035", "0.6036219", "0.6034969", "0.59887296", "0.5986618", "0.5976107", "0.5972647", "0.5961163", "0.59572446", "0.5953557", "0.5945402", "0.59445083", "0.5942304", "0.593595", "0.59181464", "0.5905903", "0.59021366", "0.58974683", "0.58910316", "0.5884728", "0.5877906", "0.5850338", "0.58442384", "0.5842376", "0.584216", "0.58419114", "0.58372253", "0.5830416", "0.5826087", "0.5814469", "0.580273", "0.579635", "0.5793348", "0.57920927", "0.5789069", "0.5787119", "0.5783895", "0.5783407", "0.5780299", "0.5770692", "0.5770394", "0.5764916", "0.5761703", "0.5751238", "0.57478094", "0.5743995", "0.5740028", "0.5740002", "0.57274646", "0.57273376", "0.5709339", "0.56912225", "0.568194", "0.5679546", "0.56706345", "0.56673187", "0.56600463", "0.56518024", "0.5641508", "0.56393266", "0.563832", "0.5634938", "0.562386", "0.5622548", "0.5621409", "0.5620424", "0.5618841", "0.56171155", "0.5614924", "0.5613071", "0.5611442", "0.5608987", "0.5606064", "0.5603413", "0.5603075", "0.56030655", "0.56007606", "0.55954677", "0.55881447", "0.5587639", "0.5580503", "0.5570872", "0.55700916", "0.5561529", "0.55612427", "0.5557106" ]
0.61754423
5
Mencari worm lawan yang paling dekat dengan worm pemain
private Worm getClosestWorm() { Worm closestEnemy = null; double closestDistance = 1000; for (Worm enemyWorms : opponent.worms) { if (enemyWorms.health > 0) { double distance = 0; for (Worm myWorm : player.worms) { if (myWorm.health > 0) { distance += euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorms.position.x, enemyWorms.position.y); } } if (distance < closestDistance) { closestDistance = distance; closestEnemy = enemyWorms; } } } return closestEnemy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ektypwsiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR MEDICINE No.\" + (i+1) + \":\");\n\t\t\t\tmedicine[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMA FARMAKA PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void eisagwgiFarmakou() {\n\t\t// Elegxw o arithmos twn farmakwn na mhn ypervei ton megisto dynato\n\t\tif(numOfMedicine < 100)\n\t\t{\n\t\t\tSystem.out.println();\t\n\t\t\tmedicine[numOfMedicine] = new Farmako();\t\n\t\t\tmedicine[numOfMedicine].setCode(rnd.nextInt(1000000)); // To sistima dinei automata ton kwdiko tou farmakou\n\t\t\tmedicine[numOfMedicine].setName(sir.readString(\"DWSTE TO ONOMA TOU FARMAKOU: \")); // Zitaw apo ton xristi na mou dwsei to onoma tou farmakou\n\t\t\tmedicine[numOfMedicine].setPrice(sir.readPositiveFloat(\"DWSTE THN TIMH TOU FARMAKOU: \")); // Pairnw apo ton xristi tin timi tou farmakou\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos monadikotitas tou kwdikou tou farmakou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tif(medicine[i].getCode() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(10);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfMedicine++;\n\t\t}\n\t\t// An xeperastei o megistos arithmos farmakwn\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLA FARMAKA!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}", "private static PohonAVL seimbangkanKembaliKanan(PohonAVL p) {\n //...\n // Write your codes in here\n }", "static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }", "public Drakkar(){\r\n\t\tanguilas=m;\r\n\t}", "public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }", "private void ulangiEnkripsi() {\n this.tfieldP.setText(\"P\");\n this.tfieldQ.setText(\"Q\");\n this.tfieldN.setText(\"N\");\n this.tfieldTN.setText(\"TN\");\n this.tfieldE.setText(\"E\");\n this.tfieldD.setText(\"D\");\n this.tfieldLokasidannamafilehasilenkripsi.setText(\"Lokasi & Nama File Hasil Enkripsi\");\n this.tfieldLokasidannamafileenkripsi.setText(\"Lokasi & Nama File\");\n this.fileAsli = null;\n this.pbEnkripsi.setValue(0);\n this.enkripsi.setP(null);\n this.enkripsi.setQ(null);\n this.enkripsi.setN(null);\n this.enkripsi.setTn(null);\n this.enkripsi.setE(null);\n this.enkripsi.setD(null);\n }", "public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public void tampilKarakterA(){\r\n System.out.println(\"Saya mempunyai kaki empat \");\r\n }", "@Override\n\tpublic void bildir(){\n\t\tif(durum == true){\n\t\t\tSystem.out.println(\"Durum: Acik\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Durum: Kapali\");\n\t\t}\n\t\t\n\t}", "public void asetaTeksti(){\n }", "public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }", "public void bayar() {\n transaksi.setStatus(\"lunas\");\n setLunas(true);\n }", "public AutomatZustand()\r\n\t{\r\n\t\tthis.ew_lokal = Automat.eingabewort;\r\n\t}", "public void deskripsi() {\r\n System.out.println(this.nama + \" bekerja di Perusahaan \" + Employee.perusahaan + \" dengan usia \" + this.usia + \" tahun\");\r\n }", "void tampilKarakterA();", "private void hienThi() {\n try {\n if (isInsert) {\n txtMaThucAn.setText(ThucPhamController.hienMa());\n txtMaThucAn.setEnabled(false);\n hienTrangThai();\n } else {\n txtMaThucAn.setText(tp.getMathucpham());\n txtMaThucAn.setEnabled(false);\n txtTenThucAn.setText(tp.getTenthucpham());\n jSpinSoLuong.setValue(tp.getSoluong());\n String sDonGia = Integer.toString((int) tp.getDongia());\n txtDonGia.setText(sDonGia);\n hienTrangThai();\n if (tp.getTrangthai() == 1) {\n cbbTrangThai.setSelectedIndex(0);\n } else {\n cbbTrangThai.setSelectedIndex(1);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "private void xuLyThemSD(){\n if (checkNgay(txtNgaySD.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải thuộc dạng [YYYY-MM-DD].\\n Vui lòng kiểm tra lại!\");\n txtNgaySD.requestFocus();\n return;\n }//kiem tra ngay su dung\n \n if (checkGia(txtGiaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Ngày sử dụng phải là ký tự số.\\n Vui lòng kiểm tra lại!\");\n txtGiaDV.requestFocus();\n return;\n }//kiem tra gia dich vu\n \n \n SuDungService suDungService = new SuDungService();\n int x = suDungService.themSuDung(cbbMaDV.getSelectedItem().toString(),\n cbbMaKH.getSelectedItem().toString(),\n txtNgaySD.getText(), Float.valueOf(txtGiaDV.getText()));\n \n if (x>0){\n hienThiSuDung();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n cbbMaDV.requestFocus();\n return;\n }\n }", "public abstract String dohvatiKontakt();", "public static void main(String[] args) {\n\t\t\r\n\t\tclass Ulamek{\r\n\t\t\tprivate int licznik, mianownik;\r\n\r\n\t\t\tpublic void ustawLicznik (int l){\r\n\t\t\t\tlicznik=l;\r\n\t\t\t}\r\n\t\t\tpublic void ustawMianownik (int m){\r\n\t\t\t\tmianownik=m;\r\n\t\t\t}\r\n\t\t\tpublic void ustawUlamek (int u1, int u2){\r\n\t\t\t\tlicznik=u1;\r\n\t\t\t\tmianownik=u2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void wyswietl (){\r\n\t\t\t\t\r\n\t\t\t\tint przod, reszta, przod_dlugosc, mianownik_dlugosc, licznik_dlugosc;\r\n\t\t\t\tString przod_zamiana, mianownik_string, licznik_string;\r\n\t\t\t\tdouble wynik;\r\n\t\t\t\t\r\n\t\t\t\tif (mianownik!=0 && licznik !=0){\r\n\t\t\t\tprzod=licznik/mianownik;\r\n\t\t\t\treszta=licznik-(przod*mianownik);\r\n\t\t\t\tprzod_zamiana=\"\"+przod;\r\n\t\t\t\tprzod_dlugosc=przod_zamiana.length();\r\n\t\t\t\twynik=1.0*licznik/mianownik;\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t licznik++;\r\n\t\t\t\t\t}while (licznik!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(reszta);\r\n\t\t\t}\r\n\r\n\t\t\t\t//zamiana na stringa i liczenie\r\n\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//brak calości\r\n\t\t\t\tif(przod==0){\r\n\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\r\n\r\n\t\t\t\tif(przod!=0){\r\n\t\t\t\tSystem.out.print(\" \"+przod+\" \");\r\n\t\t\t\tint licznik3 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik3++;\r\n\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t System.out.print(\" = \"+wynik);\r\n\r\n\t\t\t System.out.println();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(reszta!=0){\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\tint licznik2 = 0;\r\n\t\t\t\tdo{\r\n\t\t\t\t\tif(reszta!=0){\r\n\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t licznik2++;\r\n\t\t\t\t\t\r\n\t\t\t\t}while (licznik2!=przod_dlugosc);\r\n\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t System.out.println();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//jezeli blad \r\n\t\t\t\t\tmianownik_string=\"\"+mianownik;\r\n\t\t\t\t\tmianownik_dlugosc=mianownik_string.length();\r\n\t\t\t\t\tlicznik_string=\"\"+licznik;\r\n\t\t\t\t\tlicznik_dlugosc=licznik_string.length();\r\n\t\t\t\t\tif(licznik_dlugosc>mianownik_dlugosc){\r\n\t\t\t\t\t\tmianownik_dlugosc=licznik_dlugosc;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//gora\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t//if(licznik==0){\r\n\t\t\t\t\t//System.out.print(\" \");\r\n\t\t\t\t\t//}\r\n\r\n\t\t\t\t\tSystem.out.println(licznik);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//srodek\r\n\t\t\t\t\tSystem.out.print(\" \"+\" \"+\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t\tint licznik3 = 0;\r\n\t\t\t\t\tdo{\r\n\t\t\t\t\t System.out.print(\"-\");\r\n\t\t\t\t\t licznik3++;\r\n\t\t\t\t\t}while (licznik3!=mianownik_dlugosc);\r\n\t\t\t\t System.out.print(\" = \"+\"ERR\");\r\n\r\n\t\t\t\t System.out.println();\r\n\t\t\t\t\t\r\n\t\t\t\t //dol\r\n\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t System.out.print(\" \");\r\n\t\t\t\t\t\tSystem.out.println(mianownik);\r\n\t\t\t\t\t System.out.println();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t Ulamek u1=new Ulamek();\r\n\t\t Ulamek u2=new Ulamek();\r\n\r\n\t\t u1.ustawLicznik(3);\r\n\t\t u1.ustawMianownik(5);\r\n\r\n\t\t u2.ustawLicznik(142);\r\n\t\t u2.ustawMianownik(8);\r\n\r\n\t\t u1.wyswietl();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t \r\n\t\t u2.wyswietl();\r\n\r\n\r\n\r\n\r\n\t\t u2.ustawUlamek(100,0);\r\n\r\n\r\n\t\t u2.wyswietl();\r\n\r\n\t}", "private void hienThiDichVuKhachHangSuDung(String maKH){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layDichVuKhachHangSuDung(maKH);\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaDV.addItem(suDungModel.getMaDV());\n }\n }", "public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void maakDambord() {\t\r\n\tbord.addSpeelBord(dambord.getSpeelbord());\r\n\tframe.pack();\r\n }", "static String cetak_nama1() {\n return \"Nama Saya : Aprianto\";\r\n }", "public void tampilBuku() {\n System.out.println(\"ID : \" + this.id);\n System.out.println(\"Judul : \" + this.judul);\n System.out.println(\"Tahun Terbit: \" + this.tahun);\n }", "public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "private void xuLyThemDV(){\n if (checkMaDV(txtMaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Mã dịch vụ phải thuộc dạng [DV+Số].\\n Vui lòn kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }//Kiem tra maDV \n \n if(checkTenDV(txtTenDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Tên dịch vụ không được bỏ trống!\");\n txtTenDV.requestFocus();\n return;\n }//Kiem tra tenDV\n \n DichVuService dichVuService = new DichVuService();\n if (dichVuService.kiemTraDichVuDaTonTai(txtMaDV.getText())==false){\n int x = dichVuService.themDV(txtMaDV.getText(), txtTenDV.getText());\n if(x>0){\n hienThiDichVu();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n txtMaDV.requestFocus();\n return;\n }\n }else{\n JOptionPane.showMessageDialog(null, \"Dịch vụ đã tồn tại. Vui lòng kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }\n \n }", "TipeLayanan(String deskripsi)\r\n {\r\n this.deskripsi = deskripsi;\r\n }", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "public void cambiarDificultad(){\r\n\t\tif (Menu.dificultad == \"facil\") {\r\n\t\t\tspeed = 10;\r\n\t\t\tspace = 350;\r\n\t\t}else if (Menu.dificultad == \"normal\") {\r\n\t\t\tspeed = 10;\r\n\t\t\tspace = 280;\r\n\t\t}else if (Menu.dificultad == \"dificil\") {\r\n\t\t\tspeed = 15 ;\r\n\t\t\tspace = 300;\r\n\t\t}else if (Menu.dificultad == \"Invertido\") {\r\n\t\t\tspeed = 10;\r\n\t\t\tspace = 280;\r\n\t\t}\r\n\t}", "public int MasalarmasaEkle(String masa_adi) {\n baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n int masa_no = 0;\r\n // masalar tablosundaki en son id ye gore masa_no yu getirir\r\n String sorgu = \"select masa_no from masalar where idmasalar= (select idmasalar from masalar order by idmasalar desc limit 0, 1)\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n while (rs.next()) {\r\n masa_no = rs.getInt(1);\r\n }\r\n masa_no = masa_no + 1;\r\n String sorgu2 = \"insert into masalar (masa_no, masa_adi) values (\" + masa_no + \", '\" + masa_adi + \"')\";\r\n ps = vb.con.prepareStatement(sorgu2);\r\n ps.executeUpdate();\r\n String sorgu3 = \"insert into masa_durum (masa_no, durum) values (\" + masa_no + \", 0)\";\r\n ps = vb.con.prepareStatement(sorgu3);\r\n ps.executeUpdate();\r\n return masa_no;\r\n } catch (Exception e) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, e);\r\n return 0;\r\n }\r\n finally{\r\n try {\r\n vb.con.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "public void tampilKarakterC(){\r\n System.out.println(\"Saya adalah binatang \");\r\n }", "@Override\r\n public void Story(){\r\n super.Story();\r\n System.out.println(\"=======================================================================================\");\r\n System.out.println(\"|| Arya harus bergegas untuk menyelamatkan seluruh warga. Dia tidak tau posisi warga ||\");\r\n System.out.println(\"|| yang harus diselamatkan ada pada ruangan yang mana. ||\");\r\n System.out.println(\"=======================================================================================\");\r\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "private void peliLoppuuUfojenTuhoamiseen() {\n if (tuhotut == Ufolkm) {\n ingame = false;\n Loppusanat = \"STEVE HOLT!\";\n }\n }", "public void splMatriksBalikan() {\n Matriks MKoef = this.Koefisien();\n Matriks MKons = this.Konstanta();\n\n if(!MKoef.IsPersegi()) {\n System.out.println(\"Matriks koefisien bukan matriks persegi, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\");\n this.Solusi = \"Matriks koefisien bukan matriks persegi, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\";\n } else {\n float det = MKoef.DeterminanKofaktor();\n if (det == 0) {\n System.out.println(\"Determinan matriks koefisien bernilai 0, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\");\n this.Solusi = \"Determinan matriks koefisien bernilai 0, sehingga tidak dapat diselesaikan dengan metode matriks balikan.\";\n } else {\n Matriks MBalikan = MKoef.BuatMatriksBalikan();\n Matriks MHsl = MBalikan.KaliMatriks(MKons);\n\n for (int i = 0; i < MHsl.NBrsEff; i++) {\n System.out.println(\"x\" + (i+1) + \" = \" + MHsl.M[i][0]);\n this.Solusi += \"x\" + (i+1) + \" = \" + MHsl.M[i][0] + \"\\n\";\n }\n }\n }\n }", "@Override\n public void onClick(View v) {\n if (!vKenalan()){\n dialog.show();\n berbicara.play(\"it seems like we haven't met yet, don't know it then don't love, let's know you first\");\n return;\n }\n // untuk toogle\n if (diam){\n bolehMendengarkan();\n diam = false;\n }else {\n tidakBolehMendengarkan();\n diam = true;\n }\n }", "public beranda() {\n initComponents();\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n st = DB.stm;\n ShowDataStore();\n ShowPermintaanStore();\n ShowPermintaanGudang();\n ShowDataStoreKurang15();\n }", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "private static void cajas() {\n\t\t\n\t}", "public static void main(String[] args) {\n mahasiswa mhs_erlinda = new mahasiswa ();\n mhs_erlinda.Alamat=\"Sukorejo\";//akses variabel biodata Alamat\n System.out.print (\"Alamat mahasiswa erlinda : \"+mhs_erlinda.Alamat);\n mhs_erlinda.NIM=\"2120180149\";//akses variabel biodata NIM\n System.out.print (\"NIM mahasiswa erlinda : \"+mhs_erlinda.NIM);\n \n mahasiswa mhs_diah = new mahasiswa ();\n mhs_diah.Alamat=\"Sumbang Timun\";//akses variabel biodata Alamat\n System.out.print (\"Alamat mahasiswa diah : \"+mhs_diah.Alamat);\n mhs_diah.NIM=\"2120180130\";//akses variabel biodata NIM\n System.out.print (\"NIM mahasiswa diah : \"+mhs_diah.NIM);\n \n mahasiswa mhs_arini = new mahasiswa ();\n mhs_arini.Alamat=\"Sukorejo\";//akses variabel biodata Alamat\n System.out.print (\"Alamat mahasiswa arini : \"+mhs_arini.Alamat);\n mhs_arini.NIM=\"2120180144\";//akses variabel biodata NIM\n System.out.print (\"NIM mahasiswa arini : \"+mhs_arini.NIM);\n \n mahasiswa mhs_erlin = new mahasiswa ();\n mhs_erlin.Alamat=\"Parengan Tuban\";//akses variabel biodata Alamat \n System.out.print (\"Alamat mahasiswa erlin : \"+mhs_erlin.Alamat);\n mhs_erlin.NIM=\"2120180140\";//akses variabel biodata NIM\n System.out.print (\"NIM mahasiswa erlin : \"+mhs_erlin.NIM);\n \n mahasiswa mhs_yani = new mahasiswa ();\n mhs_yani.Alamat=\"Sumengko Kalitidu\";//akses variabel biodata Alamat\n System.out.print (\"Alamat mahasiswa yani : \"+mhs_yani.Alamat);\n mhs_yani.NIM=\"2120180150\";//akses variabel biodata NIM\n System.out.print (\"NIM mahasiswa yani : \"+mhs_yani.NIM);\n }", "private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public String cekPengulangan(String kata) throws IOException{\n String hasil=\"\";\n if(cekUlangSemu(kata)){\n return kata+\" kata ulang semu \";\n }\n if(kata.contains(\"-\")){\n String[] pecah = kata.split(\"-\");\n String depan = pecah[0];\n String belakang = pecah[1];\n ArrayList<String> depanList = new ArrayList<String>();\n ArrayList<String> belakangList = new ArrayList<String>();\n if(!depan.equals(\"\")){\n depanList.addAll(morpParser.cekBerimbuhan(depan, 0));\n }\n if(!belakang.equals(\"\")){\n belakangList.addAll(morpParser.cekBerimbuhan(belakang, 0));\n }\n for(int i = 0; i < depanList.size(); i++){\n for(int j = 0; j < belakangList.size(); j++){\n if(depanList.get(i).equals(belakangList.get(j))){\n return depan+\" kata ulang penuh \";\n }\n }\n }\n if(depan.equals(belakang)){\n return depan+\" kata ulang penuh \";\n }\n char[] isiCharDepan = depan.toCharArray();\n char[] isiCharBelakang = belakang.toCharArray();\n boolean[] sama = new boolean[isiCharDepan.length];\n int jumlahSama=0;\n int jumlahBeda=0;\n for(int i =0;i<sama.length;i++){\n if(isiCharDepan[i]==isiCharBelakang[i]){\n sama[i]=true;\n jumlahSama++;\n }\n else{\n sama[i]=false;\n jumlahBeda++;\n }\n }\n \n if(jumlahBeda<jumlahSama && isiCharDepan.length==isiCharBelakang.length){\n return depan+\" kata ulang berubah bunyi \";\n }\n \n \n }\n else{\n if(kata.charAt(0)==kata.charAt(2)&&kata.charAt(1)=='e'){\n if((kata.charAt(0)=='j'||kata.charAt(0)=='t')&&!kata.endsWith(\"an\")){\n return kata.substring(2)+\" kata ulang sebagian \";\n }\n else if(kata.endsWith(\"an\")){\n return kata.substring(2,kata.length()-2)+\" kata ulang sebagian \";\n }\n \n }\n }\n return hasil;\n }", "public static void tambahDepan() {\n String NAMA;\n String ALAMAT;\n int UMUR;\n char JEKEL;\n String HOBI[] = new String[3];\n float IPK;\n Scanner masukan = new Scanner(System.in);\n int bacaTombol = 0;\n System.out.println(\"\\nTAMBAH DEPAN : \");\n System.out.print(\"Silakan masukkan nama anda : \");\n NAMA = masukan.nextLine();\n System.out.print(\"Silakan masukkan alamat anda: \");\n ALAMAT = masukan.nextLine();\n System.out.print(\"Silakan masukkan umur anda : \");\n UMUR = masukan.nextInt();\n System.out.print(\"Silakan masukkan Jenis Kelamin anda : \");\n\n try {\n bacaTombol = System.in.read();\n } catch (java.io.IOException e) {\n }\n\n JEKEL = (char) bacaTombol;\n System.out.println(\"Silakan masukkan hobi (maks 3) : \");\n System.out.print(\"hobi ke-0 : \");\n HOBI[0] = masukan.next();\n System.out.print(\"hobi ke-1 : \");\n HOBI[1] = masukan.next();\n System.out.print(\"hobike- 2 : \");\n HOBI[2] = masukan.next();\n System.out.print(\"Silakan masukkan IPK anda : \");\n IPK = masukan.nextFloat();\n\n // -- -- -- -- -- --bagian menciptakan & mengisi simpul baru--------------\n simpul baru;\n baru = new simpul();\n baru.nama = NAMA;\n baru.alamat = ALAMAT;\n baru.umur = UMUR;\n baru.jekel = JEKEL;\n baru.hobi[0] = HOBI[0];\n baru.hobi[1] = HOBI[1];\n baru.hobi[2] = HOBI[2];\n baru.ipk = IPK;\n\n //-- -- -- --bagian mencangkokkan simpul baru ke dalam simpul lama--- ----- --\n if (awal == null) // jika senarai masih kosong\n {\n awal = baru;\n akhir = baru;\n baru.kiri = null;\n baru.kanan = null;\n } else // jika senarai tidak kosong\n {\n baru.kanan = awal;\n awal.kiri = baru;\n awal = baru;\n awal.kiri = null;\n }\n }", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}", "public void dodajZmijuPocetak() {\n\t\tthis.zmija.add(new Cvor(1,4));\n\t\tthis.zmija.add(new Cvor(1,3));\n\t\tthis.zmija.add(new Cvor(1,2));\n\t\t\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\tthis.tabla[i][j] = 'O';\n\t\t\n\t\tfor (int k = 1; k < this.zmija.size(); k++) {\n\t\t\ti = this.zmija.get(k).i;\n\t\t\tj = this.zmija.get(k).j;\n\t\t\tthis.tabla[i][j] = 'o';\n\t\t}\t\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "protected static void HienThiChiTiet() {\n\t\t\n\t\ttry {\n\n\t\t\tdtm1.setRowCount(0);\n\n\t\t\tString Sql = \"select SanPham.TenSP, Soluong,DonGia,DVT, DonGia*Soluong from SanPham,HoaDonTiec,ChiTietHoaDonTiec where SanPham.MaSP=ChiTietHoaDonTiec.MaSP and HoaDonTiec.MaHD=ChiTietHoaDonTiec.MaHD and HoaDonTiec.MaHD=?\";\n\t\t\tPreparedStatement prepare = conn.prepareStatement(Sql);\n\t\t\tprepare.setString(1, maHD);\n\t\t\tResultSet result = prepare.executeQuery();\n\t\t\twhile (result.next()) {\n\t\t\t\tVector<Object> vec = new Vector<Object>();\n\t\t\t\tvec.add(result.getString(1));\n\t\t\t\tvec.add(result.getInt(2));\n\t\t\t\tvec.add(result.getInt(3));\n\t\t\t\tvec.add(result.getString(4));\n\t\t\t\tvec.add(result.getInt(5));\n\t\t\t\t//maHD = result.getString(8);\n\t\t\t\t\n\t\t\t\tdtm1.addRow(vec);\n\t\t\t\t//int i = tbl.getRowCount();\n\t\t\t\t//txtMaHD.setText(maHD);// hiển thị mã HD theo bàn\n\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}", "public void zapisUrok() {\r\n\r\n\t\taktualnyZostatok = getZostatok() * urokovaSadzba / 100;\r\n\t\tsetVklad(aktualnyZostatok);\r\n\r\n\t}", "public void visMedlemskabsMenu ()\r\n {\r\n System.out.println(\"Du har valgt medlemskab.\");\r\n System.out.println(\"Hvad Oensker du at foretage dig?\");\r\n System.out.println(\"1: Oprette et nyt medlem\");\r\n System.out.println(\"2: Opdatere oplysninger paa et eksisterende medlem\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }", "public PhanSo(){\n tuSo = 0;\n mauSo = 1;\n }", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic int hitungBiayaKopi(int jumlahHalaman) {\n\t\treturn jumlahHalaman * 750;\r\n\t}", "public void diagrafiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka sto farmakeio\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA FARMAKWN\");\n\t\t\t// Emfanizw ola ta famraka tou farmakeiou\n\t\t\tfor(int j = 0; j < numOfMedicine; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tmedicine[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU FARMAKOU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO FARMAKOU: \");\n\t\t\t}\n\t\t\t// Metakinw ta epomena farmaka mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfMedicine - 1; k++)\n\t\t\t{\n\t\t\t\tmedicine[k] = medicine[k+1]; // Metakinw to farmako sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfMedicine--; // Meiwse ton ari8mo twn farmakwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMA FARMAKA PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void alamatPerusahaan() {\r\n System.out.println(\"Karyawan bekerja di Perusahaan \" + Employee.perusahaan + \" yang beralamat di Jalan Astangkuri Jakarta\");\r\n }", "private void xuLyThanhToanDichVu() {\n if(checkGia(txtThanhToanDVSoLuongCu.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongCu.requestFocus();\n return;\n }//Kiem tra so luong cu\n \n if(checkGia(txtThanhToanDVSoLuongMoi.getText())== false){\n JOptionPane.showMessageDialog(null, \"Số lượng không hợp lệ. Vui lòng kiểm tra lại!\");\n txtThanhToanDVSoLuongMoi.requestFocus();\n return;\n }//kiem tra so luong moi\n \n float soLuongCu = Float.valueOf(txtThanhToanDVSoLuongCu.getText().trim());\n float soLuongMoi = Float.valueOf(txtThanhToanDVSoLuongMoi.getText().trim());\n float soLuong = soLuongMoi - soLuongCu;\n txtThanhToanDVSoLuong.setText(soLuong+\"\");\n tongCong += soLuong * Float.valueOf(txtThanhToanDVGiaDV.getText().trim());\n txtThanhToanTongCong.setText(tongCong+\" VNĐ\");\n \n }", "public void hitunganRule1(){\n penebaranBibitSedikit = 1200;\r\n hariPanenSedang = 50;\r\n \r\n //menentukan niu\r\n nBibit = (1500 - penebaranBibitSedikit) / (1500 - 500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenSedang >=40) && (hariPanenSedang <=80)) {\r\n nPanen = (hariPanenSedang - 40) / (80 - 40);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a1 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a1 = nPanen;\r\n }\r\n \r\n //tentukan Z1\r\n z1 = (penebaranBibitSedikit + hariPanenSedang) * 700;\r\n System.out.println(\"a1 = \" + String.valueOf(a1));\r\n System.out.println(\"z1 = \" + String.valueOf(z1));\r\n }", "private static PohonAVL seimbangkanKembaliKiri (PohonAVL p) {\n\t// Write your codes in here\n //...\n // Write your codes in here\n if(tinggi(p.kiri) <= (tinggi(p.kanan)+1)) return p;\n else{\n PohonAVL ki = p.kiri;\n PohonAVL ka = p.kanan;\n PohonAVL kiki = ki.kiri;\n PohonAVL kika = ki.kanan;\n if(tinggi(kiki) > tinggi(ka))\n return sisipkanTinggiSeimbang(0, p)\n }\n }", "public void DaneStartowe() {\n\t\tSystem.out.println(\"DaneStartowe\");\n\t\tPlansza.getNiewolnikNaPLanszy().setJedzenie(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getNiewolnikNaPLanszy().setUbrania(ZapisOdczyt.getPopulacjaStartowaNiewolnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setMaterialy(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getRzemieslnikNaPlanszy().setNarzedzia(ZapisOdczyt.getPopulacjaStartowaRzemieslnicy());\n\t\tPlansza.getArystokrataNaPlanszy().setZloto((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t\tPlansza.getArystokrataNaPlanszy().setTowary((int) (ZapisOdczyt.getPopulacjaStartowaArystokracja() + ZapisOdczyt.getArystokracjaWiekszaPopulacja()*ZapisOdczyt.getPopulacjaStartowaArystokracja()*0.01));\n\t}", "public void simpanDataBuku(){\n String sql = (\"INSERT INTO buku (judulBuku, pengarang, penerbit, tahun, stok)\" \n + \"VALUES ('\"+getJudulBuku()+\"', '\"+getPengarang()+\"', '\"+getPenerbit()+\"'\"\n + \", '\"+getTahun()+\"', '\"+getStok()+\"')\");\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }", "public void Ordenamiento() {\n\n\t}", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "public void mostrarAutomovil(){\r\n System.out.println(\"Marca: \" + automovil.getMarca());\r\n System.out.println(\"Modelo: \" + automovil.getModelo());\r\n System.out.println(\"Placa: \" + automovil.getPlaca());\r\n }", "public void hitunganRule4(){\n penebaranBibitBanyak = 1900;\r\n hariPanenLama = 110;\r\n \r\n //menentukan niu bibit\r\n nBibit = (penebaranBibitBanyak - 1500) / (3000 - 1500);\r\n \r\n //menentukan niu hari panen sedang\r\n if ((hariPanenLama >=80) && (hariPanenLama <=120)) {\r\n nPanen = (hariPanenLama - 100) / (180 - 100);\r\n }\r\n \r\n //tentukan alpha predikat (karena grafik segitiga)\r\n if (nBibit < nPanen) {\r\n a4 = nBibit;\r\n }else if (nBibit > nPanen) {\r\n a4 = nPanen;\r\n }\r\n \r\n //tentukan Z3\r\n z4 = (penebaranBibitBanyak + hariPanenLama) * 500;\r\n System.out.println(\"a4 = \" + String.valueOf(a4));\r\n System.out.println(\"z4 = \" + String.valueOf(z4));\r\n }", "bdm mo1784a(akh akh);", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public void testTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(){\n\t\tSkppPegawai objskp =new SkppPegawai();\n\n\t\tJSONArray data = objskp.getTampilkanJumlahSuratSKPPberdasarkanPenerbitnya(); \n\n\t\tshowData_skpp(data,\"penerbit\",\"jumlah_surat\");\n\t}", "public beli_kredit() {\n initComponents();\n koneksitoko();\n }", "public int Masaid_Bul(String masa_adi) throws SQLException {\n baglanti vb = new baglanti();\r\n try {\r\n \r\n vb.baglan();\r\n int masaid = 0;\r\n String sorgu = \"select idmasalar from masalar where masa_adi='\" + masa_adi + \"';\";\r\n\r\n ps = vb.con.prepareStatement(sorgu);\r\n\r\n rs = ps.executeQuery(sorgu);\r\n while (rs.next()) {\r\n masaid = rs.getInt(1);\r\n }\r\n\r\n return masaid;\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, e);\r\n return 0;\r\n }\r\n finally{\r\n vb.con.close();\r\n }\r\n }", "@Override\n public void cantidad_Defensa(){\n defensa=2+nivel+aumentoD;\n }", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "public static void caso12(){\n\n FilterManager fm= new FilterManager(\"resources/stopWordsList.txt\",\"resources/useCaseWeight.properties\");\n\t\tQualityAttributeBelongable qualityAttributeBelongable = new OntologyManager(\"file:resources/caso1.owl\",\"file:resources/caso1.repository\",fm);\n\t\tMap<QualityAttributeInterface,Double> map = qualityAttributeBelongable.getWordPertenence(\"pan\");\n\t\tif(map==null){\n\t\t\tSystem.out.println(\"El map es null\");\n\t\t}\n\t}", "public RekapKamar() {\n Koneksi DB = new Koneksi();\n DB.koneksi();\n con = DB.conn;\n stat = DB.stmn;\n initComponents();\n loadTabel();\n }", "public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }", "private void form_awal() {\n jnama.setEnabled(false);\n jalamat.setEnabled(false);\n jhp.setEnabled(false);\n jbbm.setEnabled(false);\n jsitus.setEnabled(false);\n \n btnsimpan.setEnabled(false);\n btnhapus.setEnabled(false);\n }", "public static void Latihan() {\n Model.Garis();\n System.out.println(Model.subTitel[0]);\n Model.Garis();\n\n System.out.print(Model.subTitel[1]);\n Model.nilaiTebakan = Model.inputUser.nextInt();\n\n System.out.println(Model.subTitel[2] + Model.nilaiTebakan);\n\n // Operasi Logika\n Model.statusTebakan = (Model.nilaiTebakan == Model.nilaiBenar);\n System.out.println(Model.subTitel[3] + Model.hasilTebakan(Model.TrueFalse) + \"\\n\\n\");\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public data_kelahiran() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI)this.getUI()).setNorthPane(null);\n autonumber();\n data_tabel();\n lebarKolom();\n \n \n \n }", "public FaseDescartes faseJuego();", "public RuimteFiguur() {\n kleur = \"zwart\";\n }", "private void xuLyHienThiGiaDVTheoMaKHVaMaDV(String maKH, String maDV) {\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layGiaDichVuTheoMaKHVaMaDV(maKH, maDV);\n \n for (SuDungModel suDungModel : suDungModels) {\n txtThanhToanDVGiaDV.setText(suDungModel.getGiaDV()+\"\");\n }\n }", "private void almacenarFallos() {\n BaseDatos bd = new BaseDatos(this);\n// Log.i(\"FALLOS\",\"Nmero de fallos final: \"+fallos);\n bd.updatePalabra(palabraActual.getId(),fallos);\n\n bd.close();\n }", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public void setAcideAmine(String codon) {\n switch (codon) {\n \n case \"GCU\" :\n case \"GCC\" :\n case \"GCA\" :\n case \"GCG\" : \n this.acideAmine = \"Alanine\";\n break;\n case \"CGU\" :\n case \"CGC\" :\n case \"CGA\" :\n case \"CGG\" :\n case \"AGA\" :\n case \"AGG\" :\n this.acideAmine = \"Arginine\";\n break;\n case \"AAU\" :\n case \"AAC\" :\n this.acideAmine = \"Asparagine\";\n break;\n case \"GAU\" :\n case \"GAC\" :\n this.acideAmine = \"Aspartate\";\n break;\n case \"UGU\" :\n case \"UGC\" :\n this.acideAmine = \"Cysteine\";\n break;\n case \"GAA\" :\n case \"GAG\" :\n this.acideAmine = \"Glutamate\";\n break;\n case \"CAA\" :\n case \"CAG\" :\n this.acideAmine = \"Glutamine\";\n break;\n case \"GGU\" :\n case \"GGC\" :\n case \"GGA\" :\n case \"GGG\" :\n this.acideAmine = \"Glycine\";\n break;\n case \"CAU\" :\n case \"CAC\" :\n this.acideAmine = \"Histidine\";\n break;\n case \"AUU\" :\n case \"AUC\" :\n case \"AUA\" :\n this.acideAmine = \"Isoleucine\";\n break;\n case \"UUA\" :\n case \"UUG\" :\n case \"CUU\" :\n case \"CUC\" :\n case \"CUA\" :\n case \"CUG\" :\n this.acideAmine = \"Leucine\";\n break;\n case \"AAA\" :\n case \"AAG\" :\n this.acideAmine = \"Lysine\";\n break;\n case \"AUG\" :\n this.acideAmine = \"Methionine\";\n break;\n case \"UUU\" :\n case \"UUC\" :\n this.acideAmine = \"Phenylalanine\";\n break;\n case \"CCU\" :\n case \"CCC\" :\n case \"CCA\" :\n case \"CCG\" :\n this.acideAmine = \"Proline\";\n break;\n case \"UAG\" :\n this.acideAmine = \"Pyrrolysine\";\n break;\n case \"UGA\" :\n this.acideAmine = \"Selenocysteine\";\n break;\n case \"UCU\" :\n case \"UCC\" :\n case \"UCA\" :\n case \"UCG\" :\n case \"AGU\" :\n case \"AGC\" :\n this.acideAmine = \"Serine\";\n break;\n case \"ACU\" :\n case \"ACC\" :\n case \"ACA\" :\n case \"ACG\" :\n this.acideAmine = \"Threonine\";\n break;\n case \"UGG\" :\n this.acideAmine = \"Tryptophane\";\n break;\n case \"UAU\" :\n case \"UAC\" :\n this.acideAmine = \"Tyrosine\";\n break;\n case \"GUU\" :\n case \"GUC\" :\n case \"GUA\" :\n case \"GUG\" :\n this.acideAmine = \"Valine\";\n break;\n case \"UAA\" :\n this.acideAmine = \"Marqueur\";\n break;\n }\n }", "public MatkaKokoelma() {\n tallentaja = new TXTTallentaja();\n matkat = new ArrayList<Matka>();\n matkojenkesto = 0.0;\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "public static void main(String[] args) {\n Mahasiswa Mahasiswa1 = new Mahasiswa();\r\n Mahasiswa1.nama = \"Lukman\";\r\n Mahasiswa1.nim = \"2015069001\";\r\n Mahasiswa1.jurusan = \"Teknik Mendengkur\";\r\n Mahasiswa1.Fakultas = \"Fakultas Tidur\";\r\n Mahasiswa1.angkatan = 2015;\r\n Mahasiswa1.univ = \"Universitas Rebahan\";\r\n Mahasiswa1.ipk = 3.69;\r\n Mahasiswa1.umur = 24;\r\n\r\n System.out.println(Mahasiswa1.nama);\r\n System.out.println(Mahasiswa1.nim);\r\n System.out.println(Mahasiswa1.jurusan);\r\n System.out.println(Mahasiswa1.Fakultas);\r\n System.out.println(Mahasiswa1.angkatan);\r\n System.out.println(Mahasiswa1.univ);\r\n System.out.println(Mahasiswa1.ipk);\r\n System.out.println(Mahasiswa1.umur);\r\n\r\n //bikin objek baru\r\n Mahasiswa Mahasiswa2 = new Mahasiswa();\r\n\r\n Mahasiswa2.nama = \"Budi\";\r\n Mahasiswa2.nim = \"2020069001\";\r\n Mahasiswa2.jurusan = \"Teknik Mendengkur\";\r\n Mahasiswa2.Fakultas = \"Fakultas Tidur\";\r\n Mahasiswa2.univ = \"Universitas Rebahan\";\r\n Mahasiswa2.ipk = 2.69;\r\n Mahasiswa2.umur = 17;\r\n\r\n System.out.println(Mahasiswa1.nama);\r\n System.out.println(Mahasiswa1.nim);\r\n System.out.println(Mahasiswa1.jurusan);\r\n System.out.println(Mahasiswa1.Fakultas);\r\n System.out.println(Mahasiswa1.angkatan);\r\n System.out.println(Mahasiswa1.univ);\r\n System.out.println(Mahasiswa1.ipk);\r\n System.out.println(Mahasiswa1.umur);\r\n\r\n }" ]
[ "0.642213", "0.64075005", "0.6391391", "0.6278171", "0.626237", "0.6236296", "0.6223493", "0.6222797", "0.6212173", "0.6186881", "0.6184031", "0.61324924", "0.6096297", "0.609425", "0.6075505", "0.60699284", "0.6059027", "0.60522765", "0.6051621", "0.6047542", "0.60457265", "0.60450435", "0.60374117", "0.6035918", "0.60340744", "0.60279745", "0.60071486", "0.6006891", "0.6006602", "0.6004451", "0.599657", "0.59926337", "0.59672683", "0.5961909", "0.59496504", "0.5936466", "0.5926301", "0.5923388", "0.591514", "0.5910928", "0.59078854", "0.59064", "0.590606", "0.5905608", "0.5895443", "0.5888814", "0.5882321", "0.5879756", "0.58758885", "0.5875596", "0.5872689", "0.58708227", "0.58675176", "0.5864448", "0.5861507", "0.5860155", "0.58573014", "0.58549315", "0.5851624", "0.58509636", "0.5848688", "0.58420825", "0.58400625", "0.5839867", "0.5839352", "0.5832349", "0.583034", "0.5826614", "0.58248144", "0.5820739", "0.5816712", "0.5814357", "0.58138233", "0.5813034", "0.58043075", "0.5798148", "0.5796427", "0.5796333", "0.5786547", "0.5781476", "0.5772774", "0.57597715", "0.5758055", "0.575718", "0.57563424", "0.57495326", "0.5746667", "0.5745473", "0.5740288", "0.57351255", "0.572709", "0.5722987", "0.57197803", "0.5718807", "0.57174236", "0.5711722", "0.5709148", "0.5703949", "0.5702083", "0.56998336", "0.5699368" ]
0.0
-1
Mencari cell yang terkena damage dari banana bomb
private List<Cell> getBananaAffectedCell(int x, int y) { ArrayList<Cell> cells = new ArrayList<>(); for (int i = x - 2; i <= x + 2; i++) { for (int j = y - 2; j <= y + 2; j++) { // Don't include the current position if (isValidCoordinate(i, j) && euclideanDistance(i, j, x, y) <= 2) { cells.add(gameState.map[j][i]); } } } return cells; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void damage(){\n\n LevelMap.getLevel().damage(dmg);\n //System.out.println(\"died\");\n setDie();\n }", "public int useBomb(){\n //do harm while the animation start\n //cause harm to the boss\n println(\"BEFORE Main.boss.health: \"+Main.boss.health);\n int count = 0;\n if ((Main.boss.alive) && (Main.boss.posY != -1)){\n Main.boss.decreaseHealth(10);\n if(Main.boss.health <= 0){\n Main.boss.alive = false;\n Main.boss.deadTime = millis();\n Main.score += 100;\n bossKilled = true;\n }\n }\n println(\"AFTER Main.boss.health: \"+Main.boss.health);\n //remove all bullets\n Main.boss.emptyBullets();\n //kill all the enemies\n for(int j = 0; j < Main.enemies.size(); j++){\n Enemy tempEnemy = Main.enemies.get(j);\n tempEnemy.alive = false;\n tempEnemy.deadTime = millis();\n count ++;\n }\n // fill(0,0,0);\n // rect(0,0,width,height);\n return count;\n }", "private void subtractEnemyMissile() {\n this.enemyMissile -= 1;\n }", "public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }", "@Override\n public int doDamage() {\n if (difficulty <5)\n return damage;\n else \n return damage*2;\n }", "private void subtractEnemySheild(int damage) {\n this.enemyShield -= damage;\n }", "void Death(){\r\n if (vie==0){\r\n this.plateau[this.x][this.y]='0';\r\n }\r\n }", "public void takedmg(int dmg){\n curHp -= dmg;\n }", "private void subtractEnemyHealth(int damage) {\n this.enemyShipHealth -= damage;\n }", "@Override\r\n\tpublic void damage(float amount) {\n\t\t\r\n\t}", "private void takeDamage(int damage){ health -= damage;}", "private void subtractPlayerMissile() {\n this.playerMissile -= 1;\n }", "protected void takeDamage(int damage)\n {\n health = health - damage;\n \n }", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public int giveDamage();", "public short getBowDamage();", "public void attack(int x, int y, int xx, int yy) {\n int result = ((MovablePiece)(controller.getBoard().getPiece(x, y))).attack(controller.getBoard().getPiece(xx,yy));\n int player;\n \n if(result < 4) {\n mc.playMusic(\"sounds\\\\Bomb.wav\");\n }\n \n if(result == 1) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getBoard().setPiece(controller.getBoard().getPiece(x, y), xx, yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(new ImageIcon(\"pieces\\\\\" + this.getName()));\n } else if(result == 2) {\n controller.getPlayer(controller.getTurn()).getMyGraveyard().setPiece(controller.getBoard().getPiece(xx, yy));\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(xx,yy);\n controller.getBoard().deletePiece(x, y);\n Cell[xx][yy].setIcon(null);\n Cell[xx][yy].setBackground(Color.white);\n } else if(result == 3){\n controller.getPlayer(prevTurn).getMyGraveyard().setPiece(controller.getBoard().getPiece(x, y));\n controller.getBoard().deletePiece(x, y);\n } else if(result == 5) {\n mc.playMusic(\"sounds\\\\Sorceress.wav\");\n try {\n Thread.sleep(4000);\n } catch (InterruptedException ex) {\n Logger.getLogger(Graphics.class.getName()).log(Level.SEVERE, null, ex);\n }\n piece = controller.getBoard().getTable()[xx][yy];\n if(piece.getLevel()< controller.getBoard().getPiece(x, y).getLevel() && piece.getLevel() != 0 ) {\n if(piece.getColour() == 'R') {\n piece.setColour('B');\n piece.setName(piece.getName().replace(\"R\", \"B\"));\n } else {\n piece.setColour('R');\n piece.setName(piece.getName().replace(\"B\", \"R\"));\n }\n piece.setIcon(piece.getName());\n }\n } else {\n /* NOTHING IS CHARGED */\n }\n Cell[x][y].setIcon(null);\n Cell[x][y].setBackground(Color.white);\n for(int i = 0; i < 12; i++) {\n RGrave[i].setToolTipText(controller.getPlayer(2).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('R')).getQuantity(i));\n BGrave[i].setToolTipText(controller.getPlayer(1).getMyGraveyard().getQuantity(i) + \"/\" + (new Collection('B')).getQuantity(i));\n }\n }", "public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }", "public void takeDamage(int damage) {\n Random rand = new Random();\n int game = rand.nextInt(51) + 75;\n double game2 = (double) game;\n double percDamage = game2/100.0;\n double realSomething = (double) damage;\n double actualDamageNotReal = realSomething * percDamage;\n int actualDamage = (int) actualDamageNotReal;\n int actualDmg = actualDamage - this.armour;\n if (actualDmg <= 0){\n actualDmg = 0;\n }\n this.health -= actualDmg;\n slowDisplay(String.format(\"%s takes %s damage, now at %s\\n\",this.name,actualDmg,this.health));\n\n }", "@Override\n\tpublic int calculateDamage() \n\t{\n\t\t// TODO Auto-generated method stub\n\t\treturn 0;\n\t}", "@Override\n\tpublic void damage(float f) {\n\t\t\n\t}", "public void takeDamage(double damage){\n damage -= this.armor;\n this.health -= damage;\n }", "@Override\n public void attack(int damage)\n {\n EntityPirate target = this.world.getClosestTarget(this, EntityPirate.class, 50, true);\n //System.out.println(target.toString());\n \n float newtonForce = 1200F; //The amount of force applied to the projectile\n \n if(target != null)\n {\n Vector2 difference = target.getPos().cpy().sub(this.getPos()); //Get the difference vector\n difference.nor().scl(newtonForce); //Normalize it to a unit vector, and scale it\n new EntityWaterBomb(this.world, this.getPos().x, this.getPos().y, difference.x, difference.y, this, damage); \n } // target\n }", "public void reduceHealth(int ammo_damage){\n this.health -= ammo_damage;\n }", "public int calcCharMagicDamage() \n\t{\n\t\treturn npcInt;\n\t}", "public void checkBombs(final Integer tile){\n if(bombs_location.contains(tile)){\n if(invulnerable){\n showTimedAlertDialog(\"PHEW!\", \"Your GODMODE saved your life\", 5);\n invulnerable = false;\n return;\n }\n invulnerable = false;\n Lejos.makeSound_Boom();\n hp = hp-1;\n DrawHP();\n bombs_location.remove(tile);\n final Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n MultiplayerManager.getInstance().SendMessage(\"bomb_remove \" + revertTile(tile).toString());\n }\n }, 1000);\n if(hp==0){\n onLose();\n }\n showTimedAlertDialog(\"PWNED!\", \"You just stepped on a mine\", 3);\n }\n }", "public void takeDamage(int damage);", "public void damagePlayer(int damage){\n hero.decreaseHp(damage);\n }", "public void hurt(int damage)\n {\n \t hp -= (damage - ( damage * armor / 100 ));\n \t //System.out.println(\"hp: \" + hp);\n }", "public int magicMissile();", "public void panic() {\n energy = 0;\n redBull = 0;\n gun = 1;\n target = 2;\n }", "public void getDamage(int damagePoint){\n hp-=damagePoint;\n if(hp==0){\n alive=false;\n }\n }", "private float setAttackAbsorption(HashMap content) {\n\t\tfloat change = calculateAbsorption();\n this.attackDamageModifier = baseDamageModifier + change;\n//System.out.println(\"attack: \" + this.attackDamageModifier);\n content.put(\"attack_damage_modifier\", \"\" + this.attackDamageModifier);\n\t\treturn change*ABSORPTION_PRICE_MULTIPLIER;\n }", "public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }", "public void applyDamage(int damage)\r\n\t{\r\n\r\n\t}", "private void subtractPlayerSheild(int damage) {\n this.playerShield -= damage;\n }", "private void subtractPlayerHealth(int damage) {\n this.playerShipHealth -= damage;\n }", "public int getDamage() {\n //TODO\n return 1;\n }", "public void effect() {\n if (course == 2) {\n //RIGHT\n x += fac;\n } else if (course == 5) {\n //LEFT\n x -= fac;\n } else {\n y = (int)(origY + fac * f * Math.tan(angle)) + offsetY;\n x = (int)(origX + fac * f) + offsetX;\n }\n boolean b = computeCell();\n\n if (b) {\n //Detect ennemy\n if (current != null) {\n Player p = current.getOccupied();\n if (p != null && p != thrower) {\n p.makeHimWait((Params.howLongBlockingMagician * 1000) / 2);\n this.destroy();\n }\n }\n }\n //Detect ennemy's cell\n if (current != null) {\n Team te = current.getOwner();\n if (te != thrower.getTeam() && current.getType() == 1) {\n current.setHp(current.getHp() - Params.archerDammage);\n if (current.getHp() <= 0) {\n current.setOwner(thrower.getTeam());\n current.setHp(thrower.getInitHP());\n }\n }\n if (current.isHeight()) {\n this.destroy();\n }\n } else {\n int bound = 10;\n //System.out.println(game.getWidth());\n if (this.x < -bound || this.x > game.getWidth() + bound || this.y < -bound ||\n this.y > game.getHeight() + bound) {\n this.destroy();\n }\n }\n\n f++;\n }", "void DropFood(){\r\n if (plateau[this.x][this.y]!='0' && this.charge!='0'){\r\n this.plateau[this.x][this.y]+=this.charge;\r\n this.charge=0;\r\n \r\n } \r\n }", "void takeDamage(int points) {\n this.health -= points;\n }", "public void damage(int amount) {\n \tshield = shield - amount;\n }", "public int getColDamage() {\n return collision_damage;\n }", "public int getDmg(){\r\n return enemyDmg;\r\n }", "public void takeDamage(double num) {\r\n \r\n int damage = (int)Math.round(num);\r\n this.health -= damage;\r\n this.state=this.color+16;\r\n if (damage <= 5) {\r\n if (this.playerNum == 1)\r\n this.positionX -= 40;\r\n else \r\n this.positionX += 40;\r\n }\r\n else if (this.playerNum == 1)\r\n this.positionX -= damage * 6;\r\n else\r\n this.positionX += damage * 6;\r\n \r\n }", "@Override\r\n\tpublic String attack(int damage) {\n\t\treturn damage +\"로 공격 합니다.\";\r\n\t}", "public void setHungerDamage(float hunger);", "private void bombDifficulty(int maxBombs) {\r\n int randomRow;\r\n int randomCol;\r\n for(int bombAmount = 0; bombAmount < maxBombs;){\r\n randomRow = rand.nextInt(map.length-1);\r\n randomCol = rand.nextInt(map[0].length-1);\r\n if(map[randomRow][randomCol].getSafe() == false){\r\n //Do nothing. Checks if same row col is not chosen again\r\n }\r\n else {\r\n map[randomRow][randomCol].setSafe(false);\r\n if (TESTING_MODE) {\r\n map[randomRow][randomCol].setVisual(bomb);\r\n\r\n }\r\n bombAmount++;\r\n }\r\n }\r\n }", "public void attack() {\n\t\t\n\t\tint row = getPosition().getRow();\n\t\tint column = getPosition().getColumn();\n\t\t\n\t\tgetPosition().setCoordinates(row + 1, column);\n\t\tsetPosition(getPosition()) ;\n\t\t// restore health\n\t\tsetHealth(100);\n\t\t// end hunter mode\n\t\tthis.hunter = false;\n\t\t\n\t}", "public void setBorderDamagePerBlock(double damage)\n {\n borderDamagePerBlock = damage;\n }", "public float getHungerDamage();", "@Override\n public void action() throws Exception {\n if (!can_hit || count > 0)\n count++;\n if (count == 100) {\n can_hit = true;\n }\n else if (count == this.bombCountLimit) {\n bombPlaced--;\n count = 0;\n }\n\n if(Gdx.input.isKeyJustPressed(Input.Keys.SPACE)){\n go_ia=!go_ia;\n }\n if(go_ia){\n ia_count++;\n if(ia_count==11)\n ia_count=0;\n }\n if(go_ia&&ia_count==10) {\n\n int move = -1;\n int mode = 0;\n\n\n\n log.info(\"count bomb: \" + count);\n\n double enemyDist = sqrt(pow((playerX - enemyX), 2)+pow((playerY - enemyY), 2));\n if(powerUpFree) {\n currentGoalX = goalX;\n currentGoalY = goalY;\n if(deepSearch){\n currentGoalX = 1;\n currentGoalY = 1;\n }\n if(enemyDist < 7 && !enemyClean){\n if(enemyDist <= bombRange && sqrt(pow((playerX - goalX), 2)+pow((playerY - goalY), 2)) > 2)\n mode = 2;\n\n }\n }\n\n\n\n if (!can_hit) {\n mode = 1;\n log.info(\"can't hit\");\n }\n else if(doorLocked) {\n mode = 3;\n }\n /*if (count > 0 && count <= this.bombCountLimit && (playerX!=bombGoalX || playerY!=bombGoalY)){\n currentGoalX = bombGoalX;\n currentGoalY = bombGoalY;\n log.info(\"bomb goal\");\n }*/\n\n\n\n\n log.info(\"CURRENT goal x: \" + currentGoalX +\", CURRENT goal y: \" + currentGoalY);\n log.info(\"CURRENT bombgoal x: \" + bombGoalX +\", current bombgoal y: \" + bombGoalY);\n log.info(\"CURRENT player x: \" + playerX +\", current player y: \" + playerY);\n log.info(\"powerup free: \" + powerUpFree);\n log.info(\"CURRENT ENEMY: [\" + enemyX + \", \" + enemyY + \"] \");\n\n ArrayList<Action> actions = new ArrayList<>();\n ArrayList<Wall> walls = new ArrayList<>();\n ArrayList<EnemyPath> enemyPaths = new ArrayList<>();\n ArrayList<Around> around = new ArrayList<>();\n\n playerX = this.x/40;\n playerY = this.y/40;\n\n for( int i = 0; i < 4; i++ ){\n if (can_move[i]) {\n if (mode != 1 || checkSafe(i))\n actions.add(new Action(i));\n walls.add(new Wall(i, 0));\n }\n else if (can_destroy[i]){\n walls.add(new Wall(i, 1));\n if (mode != 1 || checkSafe(i))\n actions.add(new Action(i));\n }\n else\n walls.add(new Wall(i, 3));\n if(freeAround[i])\n around.add(new Around(i, 0));\n else\n around.add(new Around(i, 2));\n\n if ( !enemyFree[i] && enemyDist > bombRange)\n enemyPaths.add(new EnemyPath(i, 1));\n if( !enemyFree[i] && enemyDist <= bombRange || (bombRange == 1 && enemyDist <= 2))\n enemyPaths.add(new EnemyPath(i, 2));\n else if (enemyDist <= bombRange)\n enemyPaths.add(new EnemyPath(i, 1));\n else if(enemyFree[i])\n enemyPaths.add(new EnemyPath(i, 0));\n }\n if(sqrt(pow((playerX - bombGoalX), 2)+pow((playerY - bombGoalY), 2)) > bombRange ||\n mode != 1 || (playerX != bombGoalX && playerY != bombGoalY))\n actions.add(new Action(4));\n\n ai.load_fact( new Position(playerX, playerY),\n actions,\n makeDistances(buildDistances(currentGoalX, currentGoalY)),\n makeBombDistances(buildDistances(bombX, bombY)),\n makeEnemyDistances(buildDistances(enemyX, enemyY)),\n walls,\n around,\n enemyPaths,\n new Mode(mode)\n );\n\n AnswerSets answers = ai.getAnswerSets();\n while(answers.getAnswersets().get(0).getAnswerSet().isEmpty()){\n ai.load_fact( new Position(playerX, playerY),\n actions,\n makeDistances(buildDistances(currentGoalX, currentGoalY)),\n makeBombDistances(buildDistances(bombX, bombY)),\n makeEnemyDistances(buildDistances(enemyX, enemyY)),\n walls,\n around,\n enemyPaths,\n new Mode(mode)\n );\n answers = ai.getAnswerSets();\n }\n\n for (AnswerSet an : answers.getAnswersets()) {\n Pattern pattern = Pattern.compile(\"^choice\\\\((\\\\d+)\\\\)\");\n Matcher matcher;\n for (String atom : an.getAnswerSet()) {\n //System.out.println(atom);\n matcher = pattern.matcher(atom);\n\n if (matcher.find()) {\n log.info(\"DLV output: \" + matcher.group(1));\n move = Integer.parseInt(matcher.group(1));\n }\n }\n }\n if (move == 1) {\n set_allCan_move(0, true);\n this.x += 40;\n }\n else if (move == 2) {\n set_allCan_move(0, true);\n this.y += 40;\n }\n else if (move == 3) {\n set_allCan_move(0, true);\n this.y -= 40;\n }\n else if (move == 0) {\n set_allCan_move(0, true);\n this.x -= 40;\n }\n else if (move == 4 && can_hit && (playerX != goalX || playerY != goalY)) {\n ai_hit = true;\n can_hit = false;\n this.bombX=playerX;\n this.bombY=playerY;\n this.bombGoalX=playerX;\n this.bombGoalY=playerY;\n bombPlaced++;\n }\n moves.add(move);\n ai.clear();\n }\n else{\n playerX = this.x/40;\n playerY = this.y/40;\n }\n\n\n if (Gdx.input.isKeyPressed(Input.Keys.A)&&can_move[0]) {\n set_allCan_move(0, true);\n this.x -= 5;\n }\n if (Gdx.input.isKeyPressed(Input.Keys.D)&&can_move[1]) {\n set_allCan_move(0, true);\n this.x += 5;\n }\n if (Gdx.input.isKeyPressed((Input.Keys.W))&&can_move[2]) {\n this.y += 5;\n set_allCan_move(0, true);\n }\n if (Gdx.input.isKeyPressed((Input.Keys.S))&&can_move[3]){\n set_allCan_move(0, true);\n this.y -= 5;\n }\n if (Gdx.input.isKeyPressed((Input.Keys.Z)) && can_hit) {\n can_hit = false;\n this.bombX=playerX;\n this.bombY=playerY;\n this.bombGoalX=playerX;\n this.bombGoalY=playerY;\n bombPlaced++;\n }\n\n if (Gdx.input.isKeyPressed((Input.Keys.N)))\n log.info(\"CURRENT ENEMY: [\" + enemyX + \", \" + enemyY + \"] \");\n }", "public void takeDamage(int damage) {\n\t\tlife = (life-damage<0)?0:life-damage;\n\t}", "public void takeDamage(int dmg){\r\n this.currHP -= dmg;\r\n }", "public void reduceHealth(int damage){\n health -= damage;\n }", "public void blame(int action) {\n if (action == 0) {\n this.eatable *= 0.75;\n this.playable *= 1.25;\n this.ignorable *= 1.25;\n } else if (action == 1) {\n this.eatable *= 1.25;\n this.playable *= 0.75;\n this.ignorable *= 1.25;\n } else {\n this.eatable *= 1.25;\n this.playable *= 1.25;\n this.ignorable *= 0.75;\n }\n }", "public void setDamage(int d) {\r\n this.damage = d;\r\n }", "public void move() {\n\t\tsetHealth(getHealth() - 1);\n\t\t//status();\n\t\tint row = getPosition().getRow() ;\n\t\tint column = getPosition().getColumn();\n\t\tint randomInt = (int)((Math.random()*2) - 1);\n\t\t\n\t\tif(hunter == false && row < 33) {\n\t\t\tif(row == 32) {\n\t\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(row == 0) {\n\t\t\t\tgetPosition().setCoordinates(row + 1 , randomInt);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 99) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column - 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\tif(column == 0) {\n\t\t\t\tgetPosition().setCoordinates(randomInt , column + 1);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t}\n\t\tif(hunter == false && row > 32) {\n\t\t\t//setHealth(100);\n\t\t\tgetPosition().setCoordinates(row -1 , randomInt);\n\t\t\tsetPosition(getPosition()) ;\n\t\t}\n\t\telse {\n\t\t\tif(row < 65 && hunter == true) {\n\t\t\t\tgetPosition().setCoordinates(row + 1, column);\n\t\t\t\tsetPosition(getPosition()) ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tgetPosition().setCoordinates(65, column);\n\t\t\t\tsetPosition(getPosition());\n\t\t\t\t//Check if there is a gazelle\n\t\t\t\tPair [][] range = {{Drawer.pairs[row+1][column-1],Drawer.pairs[row+1][column],\n\t\t\t\t\t\t\t Drawer.pairs[row+1][column+1]}, {\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column-1],\n\t\t\t\t\t\t\t Drawer.pairs[row+2][column],Drawer.pairs[row+2][column+1]}};\n\t\t\t\t\n\t\t\t\tfor(Pair [] line: range) {\n\t\t\t\t\tfor(Pair prey: line) {\n\t\t\t\t\t\tif(prey.getAnimal() instanceof Gazelle ) {\n\t\t\t\t\t\t\tattack();\n\t\t\t\t\t\t\tprey.getAnimal().die();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\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}\n\t\t}\n\t}", "void damagePlayer(int i) throws IOException {\n }", "PlayingSquare giveDamage(int damage);", "public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }", "public abstract int doDamage(int time, GenericMovableUnit unit, Unit target);", "public void bomb() {\n\t\tbomb.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = bomb;\n\t}", "public void repair(){\n if(health < 9) {\n this.health++;\n }\n }", "@Override\r\n public void onHit(int damage){\n if(box2body != null){\r\n hp -= damage;\r\n screen.getGameManager().get(\"Sounds/orc-34-hit.wav\", Sound.class).play();\r\n if(this.hp <= 0) {\r\n screen.bodiesToDelete.add(box2body);\r\n deleteFlag = true;\r\n screen.spawnedCreatures.remove(this);\r\n screen.getGameManager().get(\"Sounds/orc-32-death.wav\", Sound.class).play();\r\n\r\n //Award Experience\r\n screen.getPlayer().awardExperience(this.experienceValue);\r\n screen.getPlayer().increaseKillCount();\r\n }\r\n }\r\n //Attack player when damaged\r\n //Prevents player from sniping monsters using Wander AI\r\n if(currentState != State.ATTACKING){\r\n Vector2 orcPosition = new Vector2(box2body.getPosition().x, box2body.getPosition().y);\r\n Vector2 playerPosition = new Vector2(screen.getPlayer().box2body.getPosition().x, screen.getPlayer().box2body.getPosition().y);\r\n\r\n currentState = State.HASBEENATTACKED;\r\n velocity = new Vector2(playerPosition.x - orcPosition.x, playerPosition.y - orcPosition.y);\r\n box2body.setLinearVelocity(velocity.scl(speed));\r\n }\r\n }", "@EventHandler\n\tpublic void attackMobs(EntityDamageByEntityEvent e) {\n\t\tMessages messagesConfig = plugin.getMsgs();\n\n\t\tif (e.getCause().equals(EntityDamageEvent.DamageCause.PROJECTILE)) { //Just my magic code w(o.o)w\n\t\t\treturn;\n\t\t}else if (e.getDamager() instanceof Player) {\n\t\t\tPlayer p = (Player) e.getDamager();\n\t\t\tItemStack pInv = p.getInventory().getItemInMainHand();\n\n\t\t\tif (!pInv.getType().name().contains(\"SWORD\") && !pInv.getType().name().contains(\"AXE\")) {\n\t\t\t\tif (!(e.getEntity() instanceof Chicken)) {\n\t\t\t\t\te.setCancelled(true);\n\n\t\t\t\t\tif (canSendMessage(p.getUniqueId()))\n\t\t\t\t\t\tp.sendMessage(StringUtil.inColor(messagesConfig.getCantHitWithoutSword()));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public int damage(){\n int damage = 0;\n Random rand = new Random();\n int x = rand.nextInt(20) + 1;\n if (x == 1)\n damage = 50;\n return damage; \n }", "public void damageDevice() {\n\t\t\r\n\t}", "public void damage(int damageTaken) {\n //TODO: Create specific damage methods instead of damage calls everywhere(see damagedByBullet())\n if (!invincible) {\n this.hp -= damageTaken;\n }\n }", "public void recieveDamage(){\n this.health--;\n }", "@Override\n\tpublic int fight(Enemy e1) {\n\t\tint damage = 0;\n\t\tRandom randomNum = new Random();\n\t\tdamage = 6 + randomNum.nextInt(4);\n\t\ttry {\n\t\t\te1.takeDamage(damage);\n\t\t} catch (InvalidDamageException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn damage;\n\t}", "public void setDmg(int enemyDmg){\r\n this.enemyDmg = enemyDmg;\r\n }", "public void takeDamage(int amount){\r\n\t\tthis.life = this.life - amount;\r\n\t}", "public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }", "public void placeBombs(int difficulty){\r\n int randomRow;\r\n int randomCol;\r\n int maxBombs;\r\n if(difficulty == 1){\r\n maxBombs = 12;\r\n bombDifficulty(maxBombs);\r\n\r\n }\r\n if(difficulty == 2){\r\n maxBombs = 41;\r\n bombDifficulty(maxBombs);\r\n }\r\n if(difficulty == 3){\r\n maxBombs = 102;\r\n bombDifficulty(maxBombs);\r\n }\r\n\r\n }", "@Override\n\tpublic void takeDamage(double damage) {\n\n\t}", "public short getSiegeWeaponDamage();", "public int getDamage() {\n return damage;\n }", "public void hack(Entity e) {\r\n\t\te.modifyHp(10);\r\n\t}", "private void calculateDamage() {\n this.baseDamage = this.actualBaseDamage;\n this.applyPowers();\n this.baseDamage = Math.max(this.baseDamage - ((this.baseDamage * this.otherCardsPlayed) / this.magicNumber), 0);\n }", "public void die() {\n\t\tsetDead(true);\n\t\tsetHp(0);\n\t\tgetGraphicShapes().get(stats.getBODY()).setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetGraphicShapes().get(stats.getBODY()).setSize(stats.getHeight(), stats.getWidth());\n\t\tgetPhysicalRectangle().setLocation((int) getPosition().x(),\n\t\t\t\t(int) getPosition().y() + stats.getHeight() - stats.getWidth());\n\t\tgetPhysicalRectangle().setSize(stats.getHeight(), stats.getWidth());\n\t\tgetGraphicShapes().remove(stats.getWEAPON());\n\t}", "public void takeDamage()\n {\n if(getWorld()!= null)\n {\n if(this.isTouching(Enemies.class))\n {\n Life = Life - Enemies.damage;\n if(Life <=0)\n {\n getWorld().removeObject(this);\n Store.wealth += Game.credit;\n }\n }\n }\n }", "public int getDamage() {\n \t\treturn damage + ((int) 0.5*level);\n \t}", "@Override\n public int damage() {\n int newDamage=criticalStrike();\n return newDamage;\n }", "AbilityDamage getAbilityDamage();", "public void setBowDamage(short bowDamage);", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "public void getDamaged(float dmg) {\n\t\tStagePanel.addValueLabel(parentGP,dmg,Commons.cAttack);\n\t\tif(shield - dmg >= 0) {\n\t\t\tshield-=dmg;\n\t\t\tdmg = 0;\n\t\t}else {\n\t\t\tdmg-=shield;\n\t\t\tshield = 0;\n\t\t}\n\t\tif(health-dmg > 0) {\n\t\t\thealth-=dmg;\n\t\t}else {\n\t\t\thealth = 0;\n\t\t}\n\t\tSoundEffect.play(\"Hurt.wav\");\n\t}", "static void removeBomb(int x, int y)\r\n {\r\n Map<Integer,Integer> map = new HashMap<Integer, Integer>();\r\n damagedBombs.put(x, map); \r\n damagedBombs.get(x).put(y,0);\r\n \r\n /*\r\n if(twoSecondBombs.get(x) != null)\r\n twoSecondBombs.get(x).remove(y);\r\n \r\n if(oneSecondBombs.get(x) != null)\r\n oneSecondBombs.get(x).remove(y);\r\n */\r\n }", "public short getHandThrowDamage();", "public void takeDamage(int damage) {\r\n this.health -= damage;\r\n if(this.health < 0)\r\n this.health = 0;\r\n }", "@Override\n\tpublic String attack(Game game) {\n\t\tString text = \"\";\n\t\tremoved_laketile = new ArrayList<LakeTile>();\n\t\tremoved_position = new ArrayList<Position>();\n\t\tLakeTile[][] board = game.getPlayArea().getLakeTilesOnBoard();\n\t\tRandom r = new Random();\n\t\tint number_laketile_onboard = countLakeTileOnBoard(board);\n\t\tif (number_laketile_onboard == 0) {\n\t\t\treturn \"Passing Power Boat attacking but there is nothing on the board\";\n\t\t} else {\n\t\t\tint number_remove_laketile = r.nextInt(number_laketile_onboard) + 1;\n\t\t\tfor (int i = 0; i < number_remove_laketile; i++) {\n\t\t\t\tremoveALakeTile(game);\n\t\t\t}\n\t\t\ttext += showText();\n\t\t\treturn \"Passing Power Boat attacking on position ::\\n\" + text + \"\\n\";\n\t\t}\n\t}", "private void loseGame() {\n endTimer();\n for(int i=0; i < grid.gridSize; i++){\n for(int j=0; j < grid.gridSize; j++){\n cells[i][j].setPressed();\n if(!cells[i][j].getBomb() && cells[i][j].getFlagged()|| cells[i][j].getQuestion()){\n cells[i][j].setId(\"wrongBomb\");\n }\n else if(cells[i][j].getBomb() && !cells[i][j].getFlagged()&& !cells[i][j].getQuestion()){\n cells[i][j].setId(\"unmarkedBomb\");\n cells[i][j].setText(\"X\");\n }\n else if(cells[i][j].getBomb() && cells[i][j].getQuestion()|| cells[i][j].getFlagged()){\n cells[i][j].setId(\"winBomb\");\n }\n }\n }\n Image image1 = new Image(\"file:data/sad-unicorn.jpg\", 65,65,true,true);\n ImageView imageView1=new ImageView();\n imageView1.setImage(image1);\n Alert loseAlert=new Alert(Alert.AlertType.INFORMATION);\n loseAlert.setTitle(\"Game over\");\n loseAlert.setHeaderText(null);\n loseAlert.setGraphic(imageView1);\n loseAlert.setContentText(\"You hit a bomb!\");\n loseAlert.showAndWait();\n scoreboard.disableStart(false);\n }", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "boolean takeDamage(int dmg);", "@Override\n protected int strengthViability(Creature c){\n int baseViability = super.strengthViability(c);\n if (Elements.elementDamageMultiplier(c,bossFormation.getFrontCreature().getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST * 3);\n }\n if (Elements.elementDamageMultiplier(bossFormation.getFrontCreature(),c.getElement()) > 1){\n baseViability = (int)(baseViability * (double)Elements.DAMAGE_BOOST / 3);\n }\n return baseViability;\n }", "public int getDamage () {\n\t\treturn (this.puissance + stuff.getDegat());\n\t}" ]
[ "0.68088627", "0.65948457", "0.65839285", "0.6574748", "0.6494501", "0.6465288", "0.64378124", "0.643472", "0.63839376", "0.6340939", "0.63347894", "0.6257957", "0.6243476", "0.62047875", "0.62047875", "0.62047875", "0.62047875", "0.62047875", "0.61953276", "0.6193333", "0.61913365", "0.61591256", "0.6144061", "0.61421615", "0.6123986", "0.61174524", "0.6096295", "0.60910374", "0.60772365", "0.60596645", "0.60518837", "0.6046574", "0.60364664", "0.6029816", "0.60044974", "0.5996849", "0.5990258", "0.59841853", "0.59811926", "0.59803087", "0.59648967", "0.5959828", "0.59585446", "0.5945956", "0.59445906", "0.593426", "0.5923539", "0.5907299", "0.59038264", "0.58985895", "0.58972216", "0.5894967", "0.5894442", "0.58837533", "0.5882106", "0.58769375", "0.5872991", "0.5872661", "0.58608043", "0.58569455", "0.5853374", "0.5851982", "0.58348155", "0.583377", "0.5833534", "0.5826351", "0.58253044", "0.5819668", "0.5817555", "0.58160913", "0.58148414", "0.58040243", "0.5802897", "0.58017296", "0.5800174", "0.5799782", "0.57996297", "0.579888", "0.57924294", "0.57899266", "0.57836396", "0.5764714", "0.5751063", "0.57501626", "0.5748519", "0.57476294", "0.5745459", "0.5735126", "0.573402", "0.57324785", "0.5728082", "0.57227916", "0.57224995", "0.5715149", "0.5713573", "0.5711671", "0.5710092", "0.57010585", "0.56927913", "0.5691028", "0.56880736" ]
0.0
-1
Mengecek apakah terdapat worm pemain di arah d
private boolean isMyWormInShootingRange(Direction d) { MyWorm currentWorm = getCurrentWorm(gameState); // direction N(0, -1), NE(1, -1), E(1, 0), SE(1, 1), S(0, 1), SW(-1, 1), W(-1,0), NW(-1, -1) Worm[] myWorms = player.worms; int i = 0; boolean found = false; while ((i < myWorms.length) && (!found)) { int weaponRange = currentWorm.weapon.range; if(myWorms[i].id != currentWorm.id && myWorms[i].health > 0){ if ((d.name().equals("N")) && (between(myWorms[i].position.y, currentWorm.position.y - weaponRange, currentWorm.position.y) && currentWorm.position.x == myWorms[i].position.x)) { found = true; } else if ((d.name().equals("E")) && (between(myWorms[i].position.x, currentWorm.position.x + weaponRange, currentWorm.position.x) && currentWorm.position.y == myWorms[i].position.y)) { found = true; } else if ((d.name().equals("S")) && (between(myWorms[i].position.y, currentWorm.position.y + weaponRange, currentWorm.position.y) && currentWorm.position.x == myWorms[i].position.x)) { found = true; } else if ((d.name().equals("W")) && (between(myWorms[i].position.x, currentWorm.position.x - weaponRange, currentWorm.position.x) && currentWorm.position.y == myWorms[i].position.y)) { found = true; } else if ((d.name().equals("NE")) && (between(myWorms[i].position.x, currentWorm.position.x + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) { found = true; } else if ((d.name().equals("SE")) && (between(myWorms[i].position.x, currentWorm.position.x + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) { found = true; } else if ((d.name().equals("SW")) && (between(myWorms[i].position.x, currentWorm.position.x - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y + (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) { found = true; } else if ((d.name().equals("NW")) && (between(myWorms[i].position.x, currentWorm.position.x - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.x) && between(myWorms[i].position.y, currentWorm.position.y - (int) (weaponRange/Math.sqrt(2)), currentWorm.position.y) && isDiagonal(currentWorm, myWorms[i]))) { found = true; } } i++; } return found; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public void asetaTeksti(){\n }", "public void isiPilihanDokter() {\n String[] list = new String[]{\"\"};\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(list));\n\n /*Mengambil data pilihan spesialis*/\n String nama = (String) pilihPoliTujuan.getSelectedItem();\n String kodeSpesialis = ss.serviceGetIDSpesialis(nama);\n\n /* Mencari dokter where id_spesialis = pilihSpesialis */\n tmd.setData(ds.serviceGetAllDokterByIdSpesialis(kodeSpesialis));\n int b = tmd.getRowCount();\n\n /* Menampilkan semua nama berdasrkan pilihan sebelumnya */\n pilihNamaDokter.setModel(new javax.swing.DefaultComboBoxModel(ds.serviceTampilNamaDokter(kodeSpesialis, b)));\n }", "private void limpiarDatos() {\n\t\t\n\t}", "public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public dataPegawai() {\n initComponents();\n koneksiDatabase();\n tampilGolongan();\n tampilDepartemen();\n tampilJabatan();\n Baru();\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }", "public abstract String dohvatiKontakt();", "public void cambioLigas(){\n\t\ttry{\n\t\t\tmodelo.updatePartidosEmaitzak(ligasel.getSelectionModel().getSelectedItem().getIdLiga());\n\t\t}catch(ManteniException e){\n\t\t\t\n\t\t}\n\t\t\n\t}", "public RekapKamar() {\n Koneksi DB = new Koneksi();\n DB.koneksi();\n con = DB.conn;\n stat = DB.stmn;\n initComponents();\n loadTabel();\n }", "public void Ordenamiento() {\n\n\t}", "@Override\n\tvoid geraDados() {\n\n\t}", "private void ulangiEnkripsi() {\n this.tfieldP.setText(\"P\");\n this.tfieldQ.setText(\"Q\");\n this.tfieldN.setText(\"N\");\n this.tfieldTN.setText(\"TN\");\n this.tfieldE.setText(\"E\");\n this.tfieldD.setText(\"D\");\n this.tfieldLokasidannamafilehasilenkripsi.setText(\"Lokasi & Nama File Hasil Enkripsi\");\n this.tfieldLokasidannamafileenkripsi.setText(\"Lokasi & Nama File\");\n this.fileAsli = null;\n this.pbEnkripsi.setValue(0);\n this.enkripsi.setP(null);\n this.enkripsi.setQ(null);\n this.enkripsi.setN(null);\n this.enkripsi.setTn(null);\n this.enkripsi.setE(null);\n this.enkripsi.setD(null);\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "private void hienThiMaKHSuDungDV(){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layMaKHSuDungDVLoaiBoTrungLap();\n \n cbbThanhToanMaKH.removeAllItems();\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaKH.addItem(suDungModel.getMaKH());\n }\n }", "public Asiakas(){\n\t\tid++;\n\t\tbussiNumero = new Random().nextInt(OmaMoottori.bussienMaara);\n\t\tsaapumisaika = Kello.getInstance().getAika();\n\t}", "public tambahtoko() {\n initComponents();\n tampilkan();\n form_awal();\n }", "private void hienThi() {\n try {\n if (isInsert) {\n txtMaThucAn.setText(ThucPhamController.hienMa());\n txtMaThucAn.setEnabled(false);\n hienTrangThai();\n } else {\n txtMaThucAn.setText(tp.getMathucpham());\n txtMaThucAn.setEnabled(false);\n txtTenThucAn.setText(tp.getTenthucpham());\n jSpinSoLuong.setValue(tp.getSoluong());\n String sDonGia = Integer.toString((int) tp.getDongia());\n txtDonGia.setText(sDonGia);\n hienTrangThai();\n if (tp.getTrangthai() == 1) {\n cbbTrangThai.setSelectedIndex(0);\n } else {\n cbbTrangThai.setSelectedIndex(1);\n }\n }\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public beranda() {\n initComponents();\n koneksi DB = new koneksi();\n DB.config();\n con = DB.con;\n st = DB.stm;\n ShowDataStore();\n ShowPermintaanStore();\n ShowPermintaanGudang();\n ShowDataStoreKurang15();\n }", "public void tampilKarakterA(){\r\n System.out.println(\"Saya mempunyai kaki empat \");\r\n }", "public Drakkar(){\r\n\t\tanguilas=m;\r\n\t}", "public void datos_elegidos(){\n\n\n }", "public void tampil_siswa(){\n try {\n Connection con = conek.GetConnection();\n Statement stt = con.createStatement();\n String sql = \"select id from nilai order by id asc\"; // disini saya menampilkan NIM, anda dapat menampilkan\n ResultSet res = stt.executeQuery(sql); // yang anda ingin kan\n \n while(res.next()){\n Object[] ob = new Object[6];\n ob[0] = res.getString(1);\n \n comboId.addItem(ob[0]); // fungsi ini bertugas menampung isi dari database\n }\n res.close(); stt.close();\n \n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public formdatamahasiswa() {\n initComponents();\n }", "private void hienThiDichVuKhachHangSuDung(String maKH){\n SuDungService suDungService = new SuDungService();\n suDungModels = suDungService.layDichVuKhachHangSuDung(maKH);\n for (SuDungModel suDungModel : suDungModels) {\n cbbThanhToanMaDV.addItem(suDungModel.getMaDV());\n }\n }", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "public void bayar() {\n transaksi.setStatus(\"lunas\");\n setLunas(true);\n }", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "@Override\r\n public void Story(){\r\n super.Story();\r\n System.out.println(\"=======================================================================================\");\r\n System.out.println(\"|| Arya harus bergegas untuk menyelamatkan seluruh warga. Dia tidak tau posisi warga ||\");\r\n System.out.println(\"|| yang harus diselamatkan ada pada ruangan yang mana. ||\");\r\n System.out.println(\"=======================================================================================\");\r\n }", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "private DittaAutonoleggio(){\n \n }", "private void remplirUtiliseData() {\n\t}", "private static PohonAVL seimbangkanKembaliKanan(PohonAVL p) {\n //...\n // Write your codes in here\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "void hienThi() {\n LoaiVT.Open();\n ArrayList<LoaiVT> DSSP = LoaiVT.DSLOAIVT;\n VatTu PX = VatTu.getPX();\n \n try {\n txtMaVT.setText(PX.getMaVT());\n txtTenVT.setText(PX.getTenVT());\n txtDonVi.setText(PX.getDVT());\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n for(LoaiVT SP: DSSP){ \n cb.addElement(SP.getMaLoai());\n if(SP.getMaLoai().equals(PX.getMaLoai())){\n cb.setSelectedItem(SP.getMaLoai());\n }\n }\n cbMaloai.setModel(cb);\n } catch (Exception ex) {\n txtMaVT.setText(\"\");\n txtTenVT.setText(\"\");\n txtDonVi.setText(\"\");\n DefaultComboBoxModel cb = new DefaultComboBoxModel();\n cb.setSelectedItem(\"\");\n cbMaloai.setModel(cb);\n }\n \n \n }", "private static void cajas() {\n\t\t\n\t}", "public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public aplikasi_kun() {\n initComponents();\n }", "public void recibeOrden() {\r\n\t\tSystem.out.println(\"Ordene mi General\");\r\n\t}", "protected void agregarUbicacion(){\n\n\n\n }", "public data_kelahiran() {\n initComponents();\n ((javax.swing.plaf.basic.BasicInternalFrameUI)this.getUI()).setNorthPane(null);\n autonumber();\n data_tabel();\n lebarKolom();\n \n \n \n }", "public void simpanDataBuku(){\n String sql = (\"INSERT INTO buku (judulBuku, pengarang, penerbit, tahun, stok)\" \n + \"VALUES ('\"+getJudulBuku()+\"', '\"+getPengarang()+\"', '\"+getPenerbit()+\"'\"\n + \", '\"+getTahun()+\"', '\"+getStok()+\"')\");\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }", "public void limpiarCamposFormBusqueda() {\n\t}", "private void razia(){\n /* Mereset semua Error dan fokus menjadi default */\n mViewUser.setError(null);\n mViewPassword.setError(null);\n View fokus = null;\n boolean cancel = false;\n\n /* Mengambil text dari form User dan form Password dengan variable baru bertipe String*/\n String user = mViewUser.getText().toString();\n String password = mViewPassword.getText().toString();\n\n /* Jika form user kosong atau TIDAK memenuhi kriteria di Method cekUser() maka, Set error\n * di Form User dengan menset variable fokus dan error di Viewnya juga cancel menjadi true*/\n if (TextUtils.isEmpty(user)){\n mViewUser.setError(\"This field is required\");\n fokus = mViewUser;\n cancel = true;\n }else if(!cekUser(user)){\n mViewUser.setError(\"This Username is not found\");\n fokus = mViewUser;\n cancel = true;\n }\n\n /* Sama syarat percabangannya dengan User seperti di atas. Bedanya ini untuk Form Password*/\n if (TextUtils.isEmpty(password)){\n mViewPassword.setError(\"This field is required\");\n fokus = mViewPassword;\n cancel = true;\n }else if (!cekPassword(password)){\n mViewPassword.setError(\"This password is incorrect\");\n fokus = mViewPassword;\n cancel = true;\n }\n\n /* Jika cancel true, variable fokus mendapatkan fokus */\n if (cancel) fokus.requestFocus();\n else masuk();\n }", "private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}", "@Override\n\tpublic void bildir(){\n\t\tif(durum == true){\n\t\t\tSystem.out.println(\"Durum: Acik\");\t\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Durum: Kapali\");\n\t\t}\n\t\t\n\t}", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public beli_kredit() {\n initComponents();\n koneksitoko();\n }", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "public DanhSachHocPhanDaDangKi() {\n initComponents();\n updateTable();\n }", "Jugador consultarGanador();", "void tampilKarakterA();", "private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }", "public void xuLyThemPhieuThanhToan(){\n //Ngat chuoi\n String strTongTien = txtTongTien.getText().trim();\n String[] tongTien = strTongTien.split(\"\\\\s\");\n String strTienPhaiTra = txtTienPhaiTra.getText().trim();\n String[] tienPhaiTra = strTienPhaiTra.split(\"\\\\s\");\n\n //xu ly them vao data base\n PhieuThanhToanSevice phieuThanhToanSevice = new PhieuThanhToanSevice();\n int x = phieuThanhToanSevice.themPhieuThanhToan(txtMaPTT.getText().trim(),\n cbbMaPDK.getSelectedItem().toString(),\n Integer.valueOf(txtSoThang.getText().trim()),\n txtNgayTT.getText().trim(), Float.valueOf(tongTien[0]), Float.valueOf(tienPhaiTra[0]));\n\n if (x > 0) {\n JOptionPane.showMessageDialog(null, \"Thanh toán thành công\");\n } else {\n JOptionPane.showMessageDialog(null, \"Thanh toán thất bại\");\n return;\n }\n\n }", "public void tampilBuku() {\n System.out.println(\"ID : \" + this.id);\n System.out.println(\"Judul : \" + this.judul);\n System.out.println(\"Tahun Terbit: \" + this.tahun);\n }", "public static void Latihan() {\n Model.Garis();\n System.out.println(Model.subTitel[0]);\n Model.Garis();\n\n System.out.print(Model.subTitel[1]);\n Model.nilaiTebakan = Model.inputUser.nextInt();\n\n System.out.println(Model.subTitel[2] + Model.nilaiTebakan);\n\n // Operasi Logika\n Model.statusTebakan = (Model.nilaiTebakan == Model.nilaiBenar);\n System.out.println(Model.subTitel[3] + Model.hasilTebakan(Model.TrueFalse) + \"\\n\\n\");\n }", "private void mostrarEmenta (){\n }", "private void xuLyThemDV(){\n if (checkMaDV(txtMaDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Mã dịch vụ phải thuộc dạng [DV+Số].\\n Vui lòn kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }//Kiem tra maDV \n \n if(checkTenDV(txtTenDV.getText())==false){\n JOptionPane.showMessageDialog(null, \"Tên dịch vụ không được bỏ trống!\");\n txtTenDV.requestFocus();\n return;\n }//Kiem tra tenDV\n \n DichVuService dichVuService = new DichVuService();\n if (dichVuService.kiemTraDichVuDaTonTai(txtMaDV.getText())==false){\n int x = dichVuService.themDV(txtMaDV.getText(), txtTenDV.getText());\n if(x>0){\n hienThiDichVu();\n JOptionPane.showMessageDialog(null, \"Đã thêm!\");\n }else{\n JOptionPane.showMessageDialog(null, \"Thêm thất bại!\");\n txtMaDV.requestFocus();\n return;\n }\n }else{\n JOptionPane.showMessageDialog(null, \"Dịch vụ đã tồn tại. Vui lòng kiểm tra lại!\");\n txtMaDV.requestFocus();\n return;\n }\n \n }", "@NotifyChange({\"matkulKur\", \"addNew\", \"resetInputIcon\"}) \n @Command(\"batal\")\n public void batal(){\n if (isAddNew()==true) setMatkulKur(getTempMatkulKur()); //\n setResetInputIcon(false);\n setAddNew(false); //apapun itu buat supaya tambah baru selalu kondisi false\n }", "private void iniciaTela() {\n try {\n tfCod.setText(String.valueOf(reservaCliDAO.getLastId()));\n desabilitaCampos(false);\n DefaultComboBoxModel modeloComboCliente;\n modeloComboCliente = new DefaultComboBoxModel(funDAO.getAll().toArray());\n cbFunc.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(quartoDAO.getAll().toArray());\n cbQuarto.setModel(modeloComboCliente);\n modeloComboCliente = new DefaultComboBoxModel(cliDAO.getAll().toArray());\n cbCliente.setModel(modeloComboCliente);\n btSelect.setEnabled(false);\n verificaCampos();\n carregaTableReserva(reservaDAO.getAll());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void loadDataProduk(){\n kode_barang = txtKodeBarang.getText();\n nama_barang = txtNamaBarang.getText();\n merk_barang = txtMerkBarang.getText();\n jumlah_stok = Integer.parseInt(txtJumlahStok.getText());\n harga = Integer.parseInt(txtHarga.getText());\n \n }", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public kamar() {\n initComponents();\n datatableKamar();\n Validasi();\n }", "private void TampilData(){\n try{ //\n String sql = \"SELECT * FROM buku\"; // memanggil dari php dengan tabel buku\n stt = con.createStatement(); // membuat statement baru dengan mengkonekan ke database\n rss = stt.executeQuery(sql); \n while (rss.next()){ \n Object[] o = new Object [3]; // membuat array 3 dimensi dengan nama object\n \n o[0] = rss.getString(\"judul\"); // yang pertama dengan ketentuan judul\n o[1] = rss.getString(\"penulis\"); // yang kedua dengan ketentuan penulis\n o[2] = rss.getInt(\"harga\"); // yang ketiga dengan ketentuan harga\n model.addRow(o); // memasukkan baris dengan mengkonekan di tabel model\n } \n }catch(SQLException e){ // memanipulasi kesalahan\n System.out.println(\"ini error\"); // menampilkan pesan ini error\n }\n }", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "private void yas(){\n System.out.println(namn);\n \n try{\n String fraga = \"SELECT TEXT FROM INLAGG WHERE RUBRIK = 'Borttappad strumpa'\";\n String XD = db.fetchSingle(fraga);\n System.out.println(XD);\n txtInlagg.append(XD);\n }\n catch(InfException e){\n JOptionPane.showMessageDialog(null, \"Kunde ej hämta inlägg\");\n }\n }", "@Override\r\n\tpublic void horario() {\n\t\t\r\n\t}", "@RequestMapping(value = \"/kqdanhgia/{id}\",method = RequestMethod.GET)\r\n\tpublic String showkqdanhgia(@PathVariable(\"id\") String userb, Model model , HttpServletRequest request) {\n\t\tBangDanhGia bdg = choose.getBgd();\r\n\r\n\t\tif (bdg == null) {\r\n\t\t\tmodel.addAttribute(\"message\", \"Chưa ch�?n bảng đánh giá\");\r\n\t\t\treturn \"showkqdanhgia\";\r\n\t\t}\r\n\t\tmodel.addAttribute(\"bangdanhgia\", bdg);\r\n\t\tList<LoaiCauHoi> lchs = new ArrayList<LoaiCauHoi>(bdg.getLchs());\r\n\t\tCollections.sort(lchs);\r\n\t\tmodel.addAttribute(\"lchs\", lchs);\r\n\t\tmodel.addAttribute(\"nguoidang\", userb);\r\n\t\tList<BangDanhGiaKq> dgkqs = bdgkqService.findByUserb(userb);\r\n\t\tList<DisplayResult> kqs = new ArrayList<DisplayResult>();\r\n\t\tfor (CauHoi cauHoi : bdg.getCauhois()) {\r\n\t\t\tDisplayResult kq = new DisplayResult();\r\n\t\t\tkq.setCh(cauHoi);\r\n\t\t\tkq.setMch(cauHoi.getId());\r\n\t\t\tint a = 0, b = 0, c = 0, d = 0;\r\n\t\t\tfor (BangDanhGiaKq bangDanhGiaKq : dgkqs) {\r\n\t\t\t\tif (bangDanhGiaKq.getLoaiBang().getId() == bdg.getId()) {\r\n\t\t\t\t\tfor (CauHoiKq chkq : bangDanhGiaKq.getCauhoikqs()) {\r\n\t\t\t\t\t\tif (chkq.getCauhoi().getId().equals(cauHoi.getId())) {\r\n\t\t\t\t\t\t\tswitch (chkq.getKetqua()) {\r\n\t\t\t\t\t\t\tcase 'A':\r\n\t\t\t\t\t\t\t\ta++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'B':\r\n\t\t\t\t\t\t\t\tb++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'C':\r\n\t\t\t\t\t\t\t\tc++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 'D':\r\n\t\t\t\t\t\t\t\td++;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tkq.setNumA(((double) a / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungA(\"Rất Tốt : \" + kq.getNumA() + \"%\");\r\n\t\t\tkq.setNumB(((double) b / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungB(\"Tốt : \" + kq.getNumB() + \"%\");\r\n\t\t\tkq.setNumC(((double) c / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungC(\"Bình Thường : \" + kq.getNumC() + \"%\");\r\n\t\t\tkq.setNumD(((double) d / dgkqs.size()) * 100);\r\n\t\t\tkq.setNoidungD(\"Chưa Tốt : \" + kq.getNumD() + \"%\");\r\n\t\t\tkqs.add(kq);\r\n\t\t}\r\n\t\tlog.error(\"BangDanhGiakq : \" + dgkqs.toString());\r\n\t\tlog.info(\"bang ket qua : \" + kqs.toString());\r\n\t\tmodel.addAttribute(\"kqs\", kqs);\r\n\t\treturn \"showkqdanhgia\";\r\n\t}", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "public int MasalarmasaEkle(String masa_adi) {\n baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n int masa_no = 0;\r\n // masalar tablosundaki en son id ye gore masa_no yu getirir\r\n String sorgu = \"select masa_no from masalar where idmasalar= (select idmasalar from masalar order by idmasalar desc limit 0, 1)\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n while (rs.next()) {\r\n masa_no = rs.getInt(1);\r\n }\r\n masa_no = masa_no + 1;\r\n String sorgu2 = \"insert into masalar (masa_no, masa_adi) values (\" + masa_no + \", '\" + masa_adi + \"')\";\r\n ps = vb.con.prepareStatement(sorgu2);\r\n ps.executeUpdate();\r\n String sorgu3 = \"insert into masa_durum (masa_no, durum) values (\" + masa_no + \", 0)\";\r\n ps = vb.con.prepareStatement(sorgu3);\r\n ps.executeUpdate();\r\n return masa_no;\r\n } catch (Exception e) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, e);\r\n return 0;\r\n }\r\n finally{\r\n try {\r\n vb.con.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public form_utama_kasir() {\n initComponents(); \n koneksi DB = new koneksi(); \n con = DB.getConnection();\n aturtext();\n tampilkan();\n nofakturbaru();\n loadData();\n panelEditDataDiri.setVisible(false);\n txtHapusKodeTransaksi.setVisible(false);\n txtHapusQtyTransaksi.setVisible(false);\n txtHapusStokTersedia.setVisible(false);\n }", "public Raportet(String roli) {\n this.roli = roli;\n\n initComponents();\n validorolin();\n\n//mbushi kombot me shenime nga DB \n try {\n lidhja = new LidhjaMeDb();\n mbushekombon(lidhja.aktivitetet(), \"aktiviteti\", kmbaktiviteti);\n mbushekombon(lidhja.komunat(), \"komuna\", kmbkomunat);\n mbushekombon(lidhja.pergjigjjet(), \"pergjigjja\", kmbpergjigjja);\n \n LidhjaMeDb.mbyllelidhjen();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) {\n Pasien Dam = new Pasien(\"Puspaningsyas\");\r\n Dam.setTanggalLahir(1974, 1, 12);\r\n// String str = Dam.getNama();\r\n \r\n \r\n\r\n System.out.println(\"Umur = \" + Dam.getUsia());\r\n Dam.NomorRekamMedis();\r\n // System.out.println(str.substring(0, 3));\r\n\r\n// Pasien Dam2 = new Pasien(\"Dam\");\r\n// Dam2.setTanggalLahir(1999,3,13);\r\n// System.out.println(\"Umur = \" +Dam2.getUsia());\r\n }", "public void perbaruiDataKategori(){\n loadDataKategori();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksiDB.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"UPDATE tbl_kembali SET nm_kategori = '\"+ nmKategori +\"',\"\n + \"ala_kategori = '\"+ alaKategori +\"',\"\n + \"no_kategori = '\"+ noKategori +\"',\"\n + \"kame_kategori = '\"+ kameKategori +\"',\"\n + \"kd_kategori = '\"+ kdKategori +\"',\"\n + \"sewa_kategori = '\"+ sewaKategori +\"',\"\n + \"kembali_kategori = '\"+ lamKategori +\"'\"\n + \"WHERE lambat_kategori = '\" + lambatKategori +\"'\";\n PreparedStatement p = (PreparedStatement) koneksiDB.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataKategori();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }", "public Asignacion_usuario_Perfil1() {\n int CodigoAplicacion = 120;\n initComponents();\n llenadoDeCombos();\n llenadoDeTablas();\n \n\n \n }", "public void mostrarAutomovil(){\r\n System.out.println(\"Marca: \" + automovil.getMarca());\r\n System.out.println(\"Modelo: \" + automovil.getModelo());\r\n System.out.println(\"Placa: \" + automovil.getPlaca());\r\n }", "public Biodata() {\n initComponents();\n //pemanggilan fungsi koneksi database yang sudah kita buat pada class koneksi.java\n ConnectionDB DB = new ConnectionDB();\n DB.config();\n con = DB.con;\n stat = DB.stm;\n pst = DB.pst;\n data_table_mahasiswa();\n }", "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "void usada() {\n mazo.habilitarCartaEspecial(this);\n }", "public hesapekrani() {\n initComponents();\n getedits();\n \n \n }", "public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void hienThiCBBmaDV(){\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n cbbMaDV.removeAllItems();\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n cbbMaDV.addItem(dichVuModel.getMaDV());\n }\n }else{\n return;\n }\n }", "Reserva Obtener();", "public int Masaid_Bul(String masa_adi) throws SQLException {\n baglanti vb = new baglanti();\r\n try {\r\n \r\n vb.baglan();\r\n int masaid = 0;\r\n String sorgu = \"select idmasalar from masalar where masa_adi='\" + masa_adi + \"';\";\r\n\r\n ps = vb.con.prepareStatement(sorgu);\r\n\r\n rs = ps.executeQuery(sorgu);\r\n while (rs.next()) {\r\n masaid = rs.getInt(1);\r\n }\r\n\r\n return masaid;\r\n\r\n } catch (Exception e) {\r\n Logger.getLogger(masalar.class.getName()).log(Level.SEVERE, null, e);\r\n return 0;\r\n }\r\n finally{\r\n vb.con.close();\r\n }\r\n }", "public void eisagwgiFarmakou() {\n\t\t// Elegxw o arithmos twn farmakwn na mhn ypervei ton megisto dynato\n\t\tif(numOfMedicine < 100)\n\t\t{\n\t\t\tSystem.out.println();\t\n\t\t\tmedicine[numOfMedicine] = new Farmako();\t\n\t\t\tmedicine[numOfMedicine].setCode(rnd.nextInt(1000000)); // To sistima dinei automata ton kwdiko tou farmakou\n\t\t\tmedicine[numOfMedicine].setName(sir.readString(\"DWSTE TO ONOMA TOU FARMAKOU: \")); // Zitaw apo ton xristi na mou dwsei to onoma tou farmakou\n\t\t\tmedicine[numOfMedicine].setPrice(sir.readPositiveFloat(\"DWSTE THN TIMH TOU FARMAKOU: \")); // Pairnw apo ton xristi tin timi tou farmakou\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos monadikotitas tou kwdikou tou farmakou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tif(medicine[i].getCode() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(10);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfMedicine++;\n\t\t}\n\t\t// An xeperastei o megistos arithmos farmakwn\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLA FARMAKA!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "public void sendeSpielfeld();", "public DLQL_SuaMon() {\n initComponents();\n try {\n cbbLoai = con.GetAllLoaiMonAn();\n DefaultComboBoxModel md = new DefaultComboBoxModel();\n cbxLoaiMon.setModel(md);\n for (int i = 0; i < cbbLoai.size(); i++) {\n cbxLoaiMon.addItem(cbbLoai.get(i).getTenLoai());\n }\n cbxLoaiMon.setSelectedItem(con.GetLoaiByMa(StoreData.currentMonAn.getMaLoai()).getTenLoai());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, \"Không LOAD được combo Loại\");\n }\n txtTenMon.setText(StoreData.currentMonAn.getTenMon());\n txtDonGia.setText(Integer.toString(StoreData.currentMonAn.getDonGia()));\n txtDVT.setText(StoreData.currentMonAn.getdVT());\n }", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "public void rubahDataProduk(){\n loadDataProduk();\n \n //uji koneksi dan eksekusi perintah\n try{\n //test koneksi\n Statement stat = (Statement) koneksi.getKoneksi().createStatement();\n \n //perintah sql untuk simpan data\n String sql = \"UPDATE barang SET nama_barang = '\"+ nama_barang +\"',\"\n + \"merk_barang = '\"+ merk_barang +\"',\"\n + \"jumlah_stok = '\"+ jumlah_stok +\"',\"\n + \"harga = '\"+ harga +\"'\" \n + \"WHERE kode_barang = '\" + kode_barang +\"'\";\n PreparedStatement p = (PreparedStatement) koneksi.getKoneksi().prepareStatement(sql);\n p.executeUpdate();\n \n //ambil data\n getDataProduk();\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage());\n }\n }" ]
[ "0.6594296", "0.6451902", "0.64358133", "0.6433283", "0.6401013", "0.6400323", "0.6345458", "0.6280457", "0.6274441", "0.6260273", "0.625635", "0.62327194", "0.62303406", "0.62226266", "0.6196746", "0.6194739", "0.61802083", "0.61677957", "0.61619854", "0.61608154", "0.6134693", "0.6120093", "0.6113071", "0.61023146", "0.6096196", "0.6094404", "0.6081653", "0.6078432", "0.60653794", "0.6052766", "0.60527253", "0.6051381", "0.6045776", "0.60306793", "0.6017632", "0.6009276", "0.60043305", "0.5990336", "0.5987817", "0.59826666", "0.59798485", "0.59780866", "0.59778", "0.5975837", "0.5970995", "0.59678435", "0.5957931", "0.5952414", "0.5935448", "0.5930927", "0.5930915", "0.59231436", "0.59117514", "0.5908582", "0.5903923", "0.5899124", "0.58931977", "0.5878034", "0.5874906", "0.58694375", "0.5864074", "0.5863821", "0.5853577", "0.58472496", "0.5846328", "0.5843706", "0.58427566", "0.5841657", "0.5838145", "0.58361924", "0.58345026", "0.58335626", "0.5829728", "0.5829127", "0.58166057", "0.58149695", "0.58074933", "0.57988006", "0.57971966", "0.5796614", "0.57962734", "0.5789231", "0.57887864", "0.5786128", "0.57840437", "0.5781643", "0.5780548", "0.57759607", "0.57754016", "0.57736015", "0.5773224", "0.57724077", "0.5767447", "0.57662153", "0.57601833", "0.57583636", "0.5757595", "0.5757431", "0.57539093", "0.5753639", "0.5753237" ]
0.0
-1
Mengecek apakah worm 1 dan worm 2 diagonal
private boolean isDiagonal(Worm worm1, Worm worm2){ return Math.abs(worm1.position.x - worm2.position.x) == Math.abs(worm1.position.y - worm2.position.y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testCuatroEnRayaDiag2() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.min(i, 7);\n\t\t\tint sy = Math.min(13 - i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx - 4 >= 0)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx - l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx--;\n\t\t\t}\n\t\t}\n\t}", "void resDiagonale(){ \r\n for (int i = 0; i<N; i=i+nCarre) \r\n \tresCarre(i, i); \r\n }", "void iniciaMatriz() {\r\n int i, j;\r\n for (i = 0; i < 5; i++) {\r\n for (j = 0; j <= i; j++) {\r\n if (j <= i) {\r\n m[i][j] = 1;\r\n } else {\r\n m[i][j] = 0;\r\n }\r\n }\r\n }\r\n m[0][1] = m[2][3] = 1;\r\n\r\n// Para los parentesis \r\n for (j = 0; j < 7; j++) {\r\n m[5][j] = 0;\r\n m[j][5] = 0;\r\n m[j][6] = 1;\r\n }\r\n m[5][6] = 0; // Porque el m[5][6] quedo en 1.\r\n \r\n for(int x=0; x<7; x++){\r\n for(int y=0; y<7; y++){\r\n // System.out.print(\" \"+m[x][y]);\r\n }\r\n //System.out.println(\"\");\r\n }\r\n \r\n }", "@Test\n\tpublic void testCuatroEnRayaDiag1() {\n\t\t\n\t\tint []posX = new int[4];\n\t\tint []posY = new int[4];\n\t\tfor (int i = 1; i <= 12; ++i) {\n\t\t\tint sx = Math.max(1, i-5);\n\t\t\tint sy = Math.min(i, 6);\n\t\t\twhile ((sy - 4 >= 0) && (sx + 3 <= 7)) {\n\t\t\t\tfor (int l = 0; l < 4; ++l) {\n\t\t\t\t\tposX[l] = sx + l;\n\t\t\t\t\tposY[l] = sy - l;\n\t\t\t\t}\n\t\t\t\tpruebaCuatroEnRaya(posX, posY);\n\t\t\t\tsy--; sx++;\n\t\t\t}\n\t\t}\n\t}", "@Test\n\tpublic void testDiagonalIzquierda() {\n\n\t\ttablero.agregar(0, 0, jugador1);\n\t\ttablero.agregar(1, 2, jugador1);\n\t\ttablero.agregar(2, 1, jugador1);\n\n\t\tassertEquals(jugador1.getPieza(), reglas.getGanador(jugador1));\n\t}", "public void rotate(){\n\t\tint oneLoop = 0;\r\n\t\tmotherLoop: while(oneLoop == 0){\r\n\t\t\toneLoop = 1;\r\n\t\t// tworze i zeruje macierz 4x4\r\n\t\tint d = type == 1 ? 4 : 3;\t// dla podłużnego będzie klatka 4x4, dla reszty: 3x3\r\n\t\tif(type != 2 ){\t// a dla kwadratowego nic nie trzeba obracac\r\n\t\t\t// tworze macierz i przerzucam do niej klocka:\r\n\t\t\t// tworze i zeruje macierz dxd\r\n\t\t\tint[][] matrix = new int[d][d];\r\n\t\t\tfor(int i = 0 ; i < d ; i++)\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++)\r\n\t\t\t\t\tmatrix[i][j] = 0;\r\n\t\t\t// wyznaczam najmniejsze X i Y z tablic X[] i Y[]\r\n\t\t\tint minX = X[0], minY = Y[0];\r\n\t\t\tfor(int i = 1 ; i < d ; i++){\r\n\t\t\t\tif(X[i] < minX)\tminX = X[i];\r\n\t\t\t\tif(Y[i] < minY)\tminY = Y[i];\r\n\t\t\t}\r\n\t\t\t// przepisuje do czystej macierzy klocka, odejmujac najmniejsze X i Y\r\n\t\t\t// dzieki temu przystaje on do lewej i gornej krawedzi macierzy.\r\n\t\t\tfor(int i = 0 ; i < 4 ; i++)\r\n\t\t\t\tmatrix[Y[i]-minY][X[i]-minX] = 1;\r\n\t\t\t\r\n\t\t\t// dla przypadkow przy scianie przerywam calosc:\r\n\t\t\tif(minX + d > Board.getWidth()){\r\n\t\t\t\tSystem.out.println(\"Protestuje, bo: minX+d=\" +(minX+d)+ \", a Board.getWidth()=\" + Board.getWidth());\r\n\t\t\t\tbreak motherLoop;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(d==4){\t// dla dlugiego przycinam jeszcze raz\r\n\t\t\t\tif(matrix[3][0] == 1){\t// jest pionowo\r\n\t\t\t\t\tfor(int i = 0 ; i < 4 ; i++){\r\n\t\t\t\t\t\tmatrix[i][0] = 0;\r\n\t\t\t\t\t\tmatrix[i][1] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\t// jest poziomo\r\n\t\t\t\t\tfor(int i = 0 ; i < 4 ; i++){\r\n\t\t\t\t\t\tmatrix[0][i] = 0;\r\n\t\t\t\t\t\tmatrix[1][i] = 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// nowa macierz to macierz z klockiem obrocona o 90 stopni\r\n\t\t\tint[][] newMatrix = new int[d][d];\r\n\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\tnewMatrix[i][j] = matrix[j][d-i-1];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tboolean isFree = true;\t// sprawdzam czy nowy klocek nie naruszy statycznych klockow\r\n\t\t\tint index = 0;\r\n\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\tif(i+minY < Board.getHeight() && j+minX < Board.getWidth()){\r\n\t\t\t\t\t\tif(motherBoard.getField(j+minX, i+minY).getContent() == 2){\r\n\t\t\t\t\t\t\tisFree = false;\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\tif(isFree){\r\n\t\t\t\tindex = 0;\r\n\t\t\t\tfor(int i = 0 ; i < d ; i++){\r\n\t\t\t\t\tfor(int j = 0 ; j < d ; j++){\r\n\t\t\t\t\t\tif( minY >= 0 && j+minX < Board.getWidth() && i+minY < Board.getHeight()){\t// wymiary sie beda zgadzac z plansza.\r\n\t\t\t\t\t\t\tif(newMatrix[i][j] == 1){\r\n\t\t\t\t\t\t\t\tX[index] = j+minX;\r\n\t\t\t\t\t\t\t\tY[index] = i+minY;\r\n\t\t\t\t\t\t\t\tindex++;\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}\r\n\t}\r\n\t}", "public static void laukiHorizontalaIrudikatu(int neurria, char ikurra) {\n int altuera=neurria/2;\n int zabalera=neurria;\n for(int i=1; i<=altuera; i++){//altuera\n System.out.println(\" \");\n \n \n for(int j=1; j<=zabalera; j++){//zabalera\n \n System.out.print(ikurra);\n }\n\n}\n }", "public void circulos() {\n pushMatrix();\n translate(width/2, height/2);\n rotate(-h);\n noFill();\n strokeWeight(5);\n stroke(255);\n ellipse(10, 10, 20, 20);\n popMatrix();\n\n h = h + 0.3f;\n }", "public Squarelotron mainDiagonalFlip(int ring);", "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "public void Nivel3(){\n \n int cont = 0; \n\n while(cont<6){\n lv[0][cont] = 4;//pared arriba\n lv[7][cont] = 4;//pared abajo \n cont++;\n }\n cont=0;\n while(cont<8){\n lv[cont][0] = 4;//pared arriba\n lv[cont][5] = 4;//pared abajo \n cont++;\n }\n \n //metas\n lv[1][2] = 3;\n lv[1][3] = 3;\n lv[6][4] = 3;\n \n //cajas\n lv[6][5] = 2;\n lv[2][2] = 2;\n lv[5][4] = 2;\n \n //obstaculos\n lv[5][3] = 4;\n lv[5][2] = 4;\n lv[1][4] = 4;\n \n lv[6][1] =1;//jugador \n \n \n }", "public static void main(String[] args) {\n int[][] inp = new int[][] {\n {1,2,3},\n {5,6,7},\n {9,10,11}};\n \n int temp;\n \n\t for(int i = inp.length-1,j=0; i>=0 ; i--,j=0)\n {\n System.out.print(inp[i][j] + \" \");\n\t\t \n temp = i; // store old row where we started \n \n\t\t while(i+1 < inp.length && j+1 < inp[0].length)\n {\n System.out.print(inp[i+1][j+1] + \" \"); // keep print right diagonal\n i++;j++;\n }\n \n\t\t i = temp; // restore old row\n \n\t\t System.out.println();\n\t\t \n\t\t // special case - when we switch from processing row to processing column\n if(i == 0)\n {\n\t\t\t // now, column will go from 1 to inp[0].length-1\n\t\t\t \n for (int k = 1; k < inp[0].length; k++) {\n\n\t\t\t\t temp = k; // save old column\n \n\t\t\t\t System.out.print(inp[i][k] + \" \");\n\t\t\t\t \n\t\t\t\t // keep getting right diagonal\n while (i + 1 < inp.length && k + 1 < inp[0].length) {\n System.out.print(inp[i + 1][k + 1] + \" \");\n i++;\n k++;\n }\n \n\t\t\t\t k = temp;\n \n\t\t\t\t i = 0;\n \n\t\t\t\t System.out.println();\n\n }\n }\n }\n \n }", "@Override\r\n public void moverAyuda() {\n System.out.println(\"La reina puede mover hacia cualquier dirección en linea recta / diagonal\");\r\n }", "static void TwoDimTrav(int[][] arr, int row, int col){\n\n int[] dr = new int[]{ -1, 1, 0, 0};\n int[] dc = new int[]{ 0, 0, 1, -1};\n\n for(int i = 0; i < 4; i++){\n int newRow = row + dr[i];\n int newCol = col + dc[i];\n\n if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n continue;\n\n // do your code here\n\n }\n\n // All Directions\n // North, South, East, West, NW NE SW SE\n // dr = [ -1, 1, 0, 0 -1, -1, 1, 1 ]\n // dc = [ 0, 0, 1, -1 -1, 1, 1, -1 ]\n\n// int[] dr = new int[]{ -1, 1, 0, 0, -1, -1, 1, 1};\n// int[] dc = new int[]{ 0, 0, 1, -1, -1, 1, -1, 1};\n//\n// for(int i = 0; i < 8; i++){\n// int newRow = row + dr[i];\n// int newCol = col + dc[i];\n//\n// if(newRow < 0 || newCol < 0 || newRow >= arr.length || newCol >= arr[0].length)\n// continue;\n//\n// // do your code here\n//\n// }\n }", "private void visualizarm(){\r\n switch(this.opc){\r\n case 1:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t\\t\\t\\t\"+min+\":\"+seg+\"\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n System.out.printf(\"%s\\t\",mfacil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 2:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n System.out.printf(\"%s\\t\",mmedio[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 3:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\t6\\n\");\r\n System.out.printf(\"------------------------------------------------------------------------\\n\");\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n System.out.printf(\"%s\\t\",mdificil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n }\r\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public void testDiagonalPpalLlena( )\n {\n setupEscenario2( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 1, marcaJugador1 );\n triqui.marcarCasilla( 5, marcaJugador1 );\n triqui.marcarCasilla( 9, marcaJugador1 );\n assertTrue( triqui.diagonalPrincipalLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "public void testDiagonalSecundariaLlena( )\n {\n setupEscenario3( );\n triqui.limpiarTablero( );\n triqui.marcarCasilla( 3, marcaJugador1 );\n triqui.marcarCasilla( 5, marcaJugador1 );\n triqui.marcarCasilla( 7, marcaJugador1 );\n assertTrue( triqui.diagonalSecundariaLlena( marcaJugador1 ) );\n assertTrue( triqui.ganoJuego( marcaJugador1 ) );\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint [][] matrix={\r\n\t\t\t\t{10,15,2,76,-9},\r\n\t\t\t\t{85,-22,4,35,99},\r\n\t\t\t\t{64,68,31,7,-3},\r\n\t\t\t\t{1,53,94,33,8}\r\n\t\t};\r\n\t\t\r\n\t\tfor(int[] fila:matrix){\r\n\t\t\tSystem.out.println();//le da salto de linea cuando termina cada fila\r\n\t\t\tfor (int z:fila){\r\n\t\t\t\tSystem.out.print(z + \" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*int [][] matrix= new int[4][5];//primera dimension, segunda dimension\r\n\t\t\r\n\t\tmatrix [0][0]=5;\r\n\t\tmatrix [0][1]=18;\r\n\t\tmatrix [0][2]=29;\r\n\t\tmatrix [0][3]=80;\r\n\t\tmatrix [0][4]=3;\r\n\t\t\r\n\t\tmatrix [1][0]=-9;\r\n\t\tmatrix [1][1]=71;\r\n\t\tmatrix [1][2]=32;\r\n\t\tmatrix [1][3]=-24;\r\n\t\tmatrix [1][4]=62;\r\n\t\t\r\n\t\tmatrix [2][0]=54;\r\n\t\tmatrix [2][1]=22;\r\n\t\tmatrix [2][2]=-39;\r\n\t\tmatrix [2][3]=1;\r\n\t\tmatrix [2][4]=97;\r\n\t\t\r\n\t\tmatrix [3][0]=74;\r\n\t\tmatrix [3][1]=43;\r\n\t\tmatrix [3][2]=39;\r\n\t\tmatrix [3][3]=96;\r\n\t\tmatrix [3][4]=-63;\r\n\r\n\t\tfor (int i=0; i<4; i++){\r\n\t\t\tSystem.out.println();\r\n\t\t\tfor (int j=0; j<5; j++){\r\n\t\t\t\tSystem.out.print(matrix[i][j] + \" \");\r\n\t\t\t}\r\n\t\t}*/\r\n\t}", "public static int diagonale(int [][]plateau, int colonne, int ligne, final int Joueur)\r\n\t{\r\n\t\tint compteurBG = diagonaleC(plateau, colonne, ligne, Joueur, -1, 1);\r\n\t\tint compteurHD = diagonaleC(plateau, colonne, ligne, Joueur, 1, -1);\r\n\t\t// Pour avoir les mêmes chiffres de victoire dans tous les cas de victoire, je n'ai pas compter le jeton poser donc soustrait par 2\r\n\t\tint compteurBGHD = compteurBG + compteurHD-2;\r\n\t\t\r\n\t\tint compteurHG = diagonaleC(plateau, colonne, ligne, Joueur, -1, -1);\r\n\t\tint compteurBD = diagonaleC(plateau, colonne, ligne, Joueur, 1, 1);\r\n\r\n\t\tint compteurHGBD = compteurHG + compteurBD-2;\r\n\r\n\t\tif (compteurHGBD >= compteurBGHD)\r\n\t\t\treturn compteurHGBD;\r\n\t\telse\r\n\t\t\treturn compteurBGHD;\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter N:\");\n\t\tint n = sc.nextInt();\n\t\tSystem.out.println(\"Enter M:\");\n\t\tint m = sc.nextInt();\n\n\t\tint a = 1;\n\t\tint row = 0;\n\t\tint col = 0;\n\t\tint[][] arr = new int[n][m];\n \n\t\t// nad obratnia diagonal\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = row; j >= 0; j--) {\n\t\t\t\tarr[j][col] = a;\n\t\t\t\ta++;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t\trow++;\n\t\t\tcol = 0;\n\t\t}\n\t\t// ako e kvadratna matrica\n\t\tint rowLimit = 0;\n\t\tif (m % 2 == 0) {\n\t\t\trowLimit = 1;\n\t\t} else {\n\t\t\trowLimit = 0;\n\t\t}\n\t\t// pod obratnia diagonal\n\t\trow -= 1;\n\t\tcol += 1;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = row; j >= rowLimit; j--) {\n\t\t\t\tarr[j][col] = a;\n\t\t\t\ta++;\n\t\t\t\tcol++;\n\t\t\t}\n\t\t\trow = n - 1;\n\t\t\tcol = i + 2;\n\t\t\trowLimit++;\n\n\t\t}\n // print\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tfor (int j = 0; j < arr[0].length; j++) {\n\t\t\t\tSystem.out.print(arr[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tsc.close();\n\n\t}", "public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }", "public void matrizInversa(){\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n //System.out.println(\"\");getDeter();\n getMatriz()[i][j] = getMatrizAdjunta()[i][j]/getDeter();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inversa\");\n }", "public static void main(String[] args) {\t\t\r\n\t\tint row=8;\r\n\t\tint column=8;\t\t\r\n\t\tfor (int i=1; i<=row; i++) {\r\n\t\t\t\t\t\t\r\n\t\t\tfor (int j=1; i%2==1&&j<=column; j+=2) {\t\t\t\t\r\n\t\t \tSystem.out.print(\"B\");\r\n\t\t \tSystem.out.print(\"W\");\r\n\t\t\t}\t\r\n\t\t\tfor(int k=1;i%2==0 && k<=column; k+=2) {\r\n\t\t\t\tSystem.out.print(\"W\");\r\n\t\t\t\tSystem.out.print(\"B\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t/*!!!! BETTER !!!\r\n\t\t * \r\n\t\t * for(int i=1;i<=8;i++) {\r\n \r\n \t\t\t for(int j=1;j<=8;j++) {\r\n \t\t\t if ((i+j)%2!=0) {\r\n \t\t\t System.out.print(\"W \");\r\n \t\t\t }else {\r\n \t\t\t System.out.print(\"B \");\r\n \t\t }\r\n \t\t }\r\n \t \tSystem.out.println();\r\n\t\t }\r\n\r\n\t\t */\r\n\t}", "@Override\n\tpublic double calculaDiagonal() {\n\t\treturn 0;\n\t}", "public static void CheckWin(int matr[][],int posY,int posX){\n\t\t\tint temp;\n\t\t\t\n//************cerco orizzontali*****************ok\n\t\t\tSystem.out.println(posX);\n\t\t\t//se inserisco nella meta sx\n\t\t\tif (posX<4)\n\t\t\t{\n\t\t\t\tfor(int i=0;i<4;i++)\n\t\t\t\t{\n\t\t\t\t\ttemp =matr[posY][i];\n\t\t\t\t\tif(temp==matr[posY][i+1] && temp==matr[posY][i+2] && temp==matr[posY][i+3]){\n\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\tif(!win)System.out.println(\"orizzontale da sx verso dx\");\n\t\t\t\t\t\tbreak;}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t//se inserisco nella meta' dx\n\t\t\telse if (posX>=4){\n\t\t\t\tfor(int i=6;i>3;i--){\n\t\t\t\t\ttemp =matr[posY][i];\n\t\t\t\t\tif(temp==matr[posY][i-1] && temp==matr[posY][i-2] && temp==matr[posY][i-3]){\n\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\tif(!win)System.out.println(\"orizzontale da dx verso sx\");\n\t\t\t\t\t\tbreak;}}\n\t\t\t}\n\t\t\t\n//**********cerco verticale verso basso(posso fare 4 solo verso il basso)**********ok\n\t\t\tif(posY<=2 && win==true){\n\t\t\ttemp =matr[posY][posX];\n\t\t\t\tif (temp==matr[posY+1][posX] && temp==matr[posY+2][posX] && temp==matr[posY+3][posX]){\n\t\t\t\tChihaVinto(temp);\n\t\t\t\tif(!win){\n\t\t\t\t\tSystem.out.println(\"verticale\");\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\n\t\t\t//****************cazzooooooooooooooooooooo**************diagonali\n\t\t\tfor(int j=0;j<6;j++)\n\t\t\t{ if(!win)break;\n\t\t\t\tfor (int i=0;i<7;i++)\n\t\t\t\t{\n\t\t\t\t\ttemp=matr[j][i];\n\t\t\t\t\tif (temp != 0)\n\t\t\t\t\t{\t//basso sx\n\t\t\t\t\t\tif (j>2 && i<=3){\n\t\t\t\t\t\t\tif(temp==matr[j-1][i+1] && \n\t\t\t\t\t\t\t temp==matr[j-2][i+2] &&\n\t\t\t\t\t\t\t temp==matr[j-3][i+3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif (!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//alto sx\n\t\t\t\t\t\telse if(j<=2 && i<=3){\n\t\t\t\t\t\t\tif (temp==matr[j+1][i+1] &&\n\t\t\t\t\t\t\t\ttemp==matr[j+2][i+2] &&\n\t\t\t\t\t\t\t\ttemp==matr[j+3][i+3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif(!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//alto dx\n\t\t\t\t\t\telse if(j<=2 && i>=3){\n\t\t\t\t\t\t\tif (temp==matr[j+1][i-1] && \n\t\t\t\t\t\t\t\ttemp==matr[j+2][i-2] &&\n\t\t\t\t\t\t\t\ttemp==matr[j+3][i-3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif(!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//basso dx\n\t\t\t\t\t\telse if(j>2 && i>=3){\n\t\t\t\t\t\t\tif (temp==matr[j-1][i-1] &&\n\t\t\t\t\t\t\t\ttemp==matr[j-2][i-2] &&\n\t\t\t\t\t\t\t\ttemp==matr[j-3][i-3]){\n\t\t\t\t\t\t\t\tChihaVinto(temp);\n\t\t\t\t\t\t\t\tif(!win)break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.flush();\n\t\t}", "public static void main(String[] args) {\n\t\tint[][] m = Method.initRandomMatrix(5, 5, 20);\r\n\t\tMethod.print(m);\r\n\t\tSystem.out.println(\"Вариант отображения согласно заданию:\");\r\n\t\tfor (int i = 0; i < m.length; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tfor (int j = m[i].length - 1; j >= 0; j--) {\r\n\t\t\t\t\tSystem.out.print(m[i][j] + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < m[i].length; j++) {\r\n\t\t\t\t\tSystem.out.print(m[i][j] + \"\\t\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public char controlloDiagonale(char[][] scacchiera)\n {\n if (scacchiera[0][0]==scacchiera[1][1]&&scacchiera[1][1]==scacchiera[2][2]) return scacchiera[0][0];\n else if (scacchiera[0][2]==scacchiera[1][1]&&scacchiera[1][1]==scacchiera[2][0]) return scacchiera[0][2];\n return ' ';\n }", "public static void main(String [] args){\n\t\t\n\t\t\n\t\t\n\t\n\t\tint [] [] matrix = new int [5][5];\n\t\tint count= 1;\n\t for(int i= 0 ; i < matrix.length; i++){\n\t \tSystem.out.println(\"\");\n\t \tfor(int j=0; j<matrix.length; j++){\n\t \t\t matrix[i][j]= count;\n\t \t\t //System.out.print(matrix[i][j]+\" \");\n\t \t\t count++;\n\t \t}\n\t \t\n\t }\n\t\tcount = 0;\n\t\tint i= 0;\n \tint j =0;\n \tint topLevel=0;\n \tint leftLevel=0;\n \tint bottumLevel =0;\n \tint rightLevel= 0;\n\t while(count<25){\n\t \t\n\t \t\n\t \t//move L-R \n\t \ti=topLevel;\n\t \tj=leftLevel;\n\t \tfor(;j <= (matrix.length-1)-rightLevel ;j++){\n\t \t\tSystem.out.println(matrix[i][j]);\n\t \t\tcount ++;\n\t \t}\n\t \ttopLevel++;\n\t \t//move T-B\n\t \tfor(i=topLevel;i<=(matrix.length-1)-bottumLevel;i++){\n\t \t\tSystem.out.println(matrix[i][j-1]);\n\t \t\tcount ++;\n\t \t}\n\t \trightLevel++;\n\t //Move R-L \n\t \tif(i==j){\n\t \t\ti=j=i-1;\n\t \t\tfor(j=j-1;j>=leftLevel;j--){\n\t \t\t\tSystem.out.println(matrix[i][j]);\n\t \t\t\tcount ++;\n\t \t\t}\n\t \t\tbottumLevel++;\n\t \t}\n\t \t//Move B-T\n\t \tj++;\n\t \tfor(i=i-1;i>=topLevel;i--){\n\t \t\tSystem.out.println(matrix[i][j]);\n\t \t\tcount ++;\n\t \t}\n\t \tleftLevel++;\n\t \t\n\t \t\n\t \t\n\t }\n\t\t\n\t}", "public frmPrincipal2() {\n initComponents();\n dib = new Dibujo2(jpLienzo.getWidth(), jpLienzo.getHeight());\n mat = new int[8][12];\n for (int i=0;i<8;i++){\n for (int j=0;j<12;j++){\n mat[i][j] = 0;\n }\n }\n \n mat[2][6] = 1;\n //mat[2][3] = 1;\n //mat[2][4] = 1;\n \n /*\n mat[5][2] = 2;\n mat[5][3] = 2;\n mat[5][4] = 2;\n mat[6][4] = 2;\n */\n this.jpLienzo.add(dib);\n \n dib.setMat(mat);\n dib.repaint();\n }", "void matice(){\n\t\tfor(int i = 0;i<matice.length;i++){\n\t\t\tfor(int j =0; j< matice[i].length;j++){\n\t\t\t\tSystem.out.print(matice[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n int cols1, cols2, rows1, rows2, num_usu1, num_usu2;\r\n \r\n try{\r\n \r\n cols1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a primeira matriz:\"));\r\n rows1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a primeira matriz:\"));\r\n cols2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a segunda matriz:\"));\r\n rows2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a segunda matriz:\"));\r\n \r\n int[][] matriz1 = MatrixInt.newRandomMatrix(cols1, rows1);\r\n int[][] matriz2 = MatrixInt.newSequentialMatrix(cols2, rows2);\r\n \r\n System.out.println(\"Primeira matriz:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Segunda matriz:\");\r\n MatrixInt.imprimir(matriz2);\r\n System.out.println(\" \");\r\n \r\n MatrixInt.revert(matriz2);\r\n \r\n System.out.println(\"Matriz sequancial invertida:\");\r\n MatrixInt.imprimir(matriz2);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n \r\n num_usu1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero qualquer:\"));\r\n \r\n for1: for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 == matriz1[i][j]){\r\n System.out.println(\"O numero '\"+num_usu1+\"' foi encontardo na posição:\" + i);\r\n break for1;\r\n }else if(j == (matriz1[i].length - 1) && i == (matriz1.length - 1)){\r\n System.out.println(\"Não foi encontrado o numero '\"+num_usu1+\"' no vetor aleatorio.\");\r\n break for1;\r\n } \r\n }\r\n }\r\n \r\n String menores = \"\", maiores = \"\";\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 > matriz1[i][j]){\r\n menores = menores + matriz1[i][j] + \", \";\r\n }else if(num_usu1 < matriz1[i][j]){\r\n maiores = maiores + matriz1[i][j] + \", \";\r\n }\r\n }\r\n }\r\n System.out.println(\" \");\r\n System.out.print(\"Numeros menores que '\"+num_usu1+\"' :\");\r\n System.out.println(menores);\r\n System.out.print(\"Numeros maiores que '\"+num_usu1+\"' :\");\r\n System.out.println(maiores);\r\n \r\n num_usu2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero que exista na matriz aleatoria:\"));\r\n \r\n int trocas = MatrixInt.replace(matriz1, num_usu2, num_usu1);\r\n \r\n if (trocas == 0) {\r\n System.out.println(\" \");\r\n System.out.println(\"Não foi realizada nenhuma troca de valores.\");\r\n }else{\r\n System.out.println(\" \");\r\n System.out.println(\"O numero de trocas realizadas foi: \"+trocas);\r\n }\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n \r\n int soma_total = 0;\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n soma_total += matriz1[i][j];\r\n }\r\n \r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"A soma dos numeros da matriz foi: \" + soma_total);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria\");\r\n Exercicio2.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz sequencial\");\r\n Exercicio2.imprimir2(matriz2);\r\n \r\n }catch(Exception e){\r\n System.out.println(e);\r\n }\r\n \r\n \r\n \r\n }", "public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void sanjiao() {\n\t\t\tfor (int i = 1; i <5; i++) {\n\t\t\t\tfor(int j=1;j<=2*i-1;j++){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}", "public static void twoStarAlign() {\n if (star1DcEq != null && star2DcEq != null) {\r\n star3DcEq = ccm.starVectorProduct(star1DcEq, star2DcEq);\r\n }\r\n if (star1DcTel != null && star2DcTel != null) {\r\n star3DcTel = ccm.starVectorProduct(star1DcTel, star2DcTel);\r\n }\r\n if (star3DcTel == null || star3DcEq == null) {\r\n //GuiUpdater.updateLog(\"Error: Null Matrixes found. Check your input!!\", Color.RED);\r\n \tLog.e(TAG, \"Error: Null Matrix calculation for 3rd star. Possible null matrixes\");\r\n }\r\n\r\n //Construct two 3X3 matrix for eq direction cosines \r\n //and telescope direction cosines\r\n double star1DcEqD[] = star1DcEq.getColumnPackedCopy();\r\n double star2DcEqD[] = star2DcEq.getColumnPackedCopy();\r\n double star3DcEqD[] = star3DcEq.getColumnPackedCopy();\r\n double starsDcEqD[][] = {\r\n {star1DcEqD[0], star2DcEqD[0], star3DcEqD[0]},\r\n {star1DcEqD[1], star2DcEqD[1], star3DcEqD[1]},\r\n {star1DcEqD[2], star2DcEqD[2], star3DcEqD[2]}};\r\n Matrix eqDirectionCosines = new Matrix(starsDcEqD);\r\n\r\n double star1DcTelD[] = star1DcTel.getColumnPackedCopy();\r\n double star2DcTelD[] = star2DcTel.getColumnPackedCopy();\r\n double star3DcTelD[] = star3DcTel.getColumnPackedCopy();\r\n double starsDcTelD[][] = {\r\n {star1DcTelD[0], star2DcTelD[0], star3DcTelD[0]},\r\n {star1DcTelD[1], star2DcTelD[1], star3DcTelD[1]},\r\n {star1DcTelD[2], star2DcTelD[2], star3DcTelD[2]}};\r\n Matrix telDirectionCosines = new Matrix(starsDcTelD);\r\n\r\n T = telDirectionCosines.times(eqDirectionCosines.inverse());\r\n //GuiUpdater.updateLog(\"Two Star Alignment completed successfuly!\");\r\n Log.i(TAG, \"++ twoStarAlign() ++ \\nT=\");\r\n T.print(5, 2);\r\n }", "public void hreflect() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n int h= 0;\n int k= rows-1;\n //invariant: rows 0..h-1 and k+1.. have been inverted\n while (h < k) {\n // Swap row h with row k\n // invariant: pixels 0..c-1 of rows h and k have been swapped\n for (int c= 0; c != cols; c= c+1) {\n currentIm.swapPixels(h, c, k, c);\n }\n \n h= h+1; k= k-1;\n }\n }", "public void print2DUtil(Nodo raiz, int espacio) \r\n\t { \r\n\t // caso base \r\n\t if (raiz== null) \r\n\t return; \r\n\t \r\n\t // Distancia entre niveles\r\n\t espacio+= 8; \r\n\t \r\n\t // nodo derecho primero\r\n\t print2DUtil(raiz.getRight(), espacio); \r\n\t \r\n\t // imprime el nodo actual \r\n\t for (int i = 8; i < espacio; i++) \r\n\t System.out.print(\" \"); \r\n\t System.out.print(raiz.getClave() + \"\\n\"); \r\n\t \r\n\t // luego izquierdo\r\n\t print2DUtil(raiz.getLeft(), espacio); \r\n\t }", "public void conjoin()\n\t{\n\t\tint width = level2.width + level3.width;\n\t\tint height = level2.height;\n\t\tLevel level4 = new Level(width, height);\n\t\tlevel4.map = new byte[width][height];\n\t\t// level4.data = new byte[width][height];\n\t\tlevel4.xExit = width - 5;\n\t\tint k = 0;\n\t\tfor (int i = 0; i < width; i++)\n\t\t{\n\t\t\tif(i < level2.width)\n\t\t\t{\n\t\t\t\tlevel4.map[i] = level2.map[i].clone();\n\t\t\t\t//level4.data[i] = level2.data[i];\n\t\t\t\tlevel4.spriteTemplates[i] = level2.spriteTemplates[i];\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlevel4.map[i] = level3.map[k].clone();\n\t\t\t\t//level4.data[i] = level3.data[k];\n\t\t\t\tlevel4.spriteTemplates[i] = level3.spriteTemplates[k];\n\t\t\t\tk++;\n\t\t\t}\n\n\t\t}\n\t\tlevel = level4;\n\t}", "void setAdjForFourthType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, matrixOfSquares[1][1] , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], matrixOfSquares[2][0], null, null );\n matrixOfSquares[1][1].setCardinalSquare(matrixOfSquares[0][1], matrixOfSquares[2][1], null, matrixOfSquares[1][2] );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , null, matrixOfSquares[1][1], matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(null, matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][0].setCardinalSquare(matrixOfSquares[1][0],null, null, matrixOfSquares[2][1] );\n matrixOfSquares[2][1].setCardinalSquare(matrixOfSquares[1][1], null, matrixOfSquares[2][0], matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(null, null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n\n }", "public static long cross_hatched(long W, long H) {\r\n long sum = 0;\r\n \r\n // horizontals\r\n for (long w = 1L; w <= W; w++) {\r\n for (long h = 1L; h <= H; h++) {\r\n sum += (W - w + 1) * (H - h + 1);\r\n //System.out.println(\"hSuma (\" + w + \"x\" + h + \") = \" + ((W - w + 1) * (H - h + 1))); \r\n }\r\n }\r\n \r\n // Diagonals\r\n for (long n = 1L; n <= Math.min(W, H) * 2; n++) {\r\n for (long m = 1L; m <= n; m++) {\r\n double ancho_alto = (n + m) / 2.0;\r\n\r\n // Ancho diagonal impar\r\n if (n % 2 == 1) {\r\n // empieza en Y = 0\r\n double cabenx = Math.floor(W - 0.5 - ancho_alto + 1);\r\n double cabeny = Math.floor(H - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n } \r\n // empieza en Y = 0.5\r\n cabenx = Math.floor(W - ancho_alto + 1);\r\n cabeny = Math.floor(H - 0.5 - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n }\r\n }\r\n // Ancho diagonal par\r\n else {\r\n // Empieza en Y = 0\r\n double cabenx = Math.floor(W - ancho_alto + 1);\r\n double cabeny = Math.floor(H - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n } \r\n // Empieza en Y = 0.5\r\n cabenx = Math.floor(W - 0.5 - ancho_alto + 1);\r\n cabeny = Math.floor(H - 0.5 - ancho_alto + 1);\r\n if (cabenx > 0.0 && cabeny > 0.0) {\r\n sum += cabenx * cabeny * ((n != m) ? 2 : 1);\r\n } \r\n }\r\n }\r\n }\r\n // Diagonals squared\r\n System.out.println(\"Suma (\" + W + \"x\" + H + \") = \" + sum);\r\n return sum;\r\n }", "void setAdjForSecondType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, null , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], matrixOfSquares[0][3]);\n matrixOfSquares[0][3].setCardinalSquare(null,matrixOfSquares[1][3] , matrixOfSquares[0][2], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], null, null, matrixOfSquares[1][1] );\n matrixOfSquares[1][1].setCardinalSquare(null, matrixOfSquares[2][1], matrixOfSquares[1][0], null );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , matrixOfSquares[2][2], null, matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(matrixOfSquares[0][3], matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][1].setCardinalSquare(matrixOfSquares[1][1],null, null, matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(matrixOfSquares[1][2], null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n\n }", "public int[][] createMaze(int level){\n\t\t\n\t\tint[][] matriz = null;\n\t\t\n\t\tswitch (level) {\n\t\tcase 1:\n\t\t\tint[][] m1= {\n\t\t\t\t\t{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,1,0,1,0,1,0,1,0,1,0,1,0},{0,1,0,1,0,1,0,1,0,1,0,1,0},\n\t\t\t\t\t{0,1,0,1,0,1,6,1,0,1,0,1,0},{0,1,0,1,0,2,0,2,0,1,0,1,0},{0,2,0,2,0,3,0,3,0,2,0,2,0},\n\t\t\t\t\t{3,0,3,3,0,2,17,2,0,3,3,0,3},{7,0,2,2,0,3,0,3,0,2,2,0,7},{0,3,0,3,0,1,1,1,0,3,0,3,0},\n\t\t\t\t\t{0,1,0,1,0,1,0,1,0,1,0,1,0},{0,1,0,1,0,2,0,2,0,1,0,1,0},{0,1,0,1,0,0,0,0,0,1,0,1,0},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\n\t\t\tmatriz = m1;\t\t\t\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tint[][] m2= {\n\t\t\t\t\t{0,0,0,6,0,0,0,6,0,0,0,0,0},{0,1,0,6,0,0,0,1,0,1,0,1,0},{0,1,0,0,0,0,1,1,0,1,6,1,0},\n\t\t\t\t\t{0,0,0,1,0,17,0,0,0,6,0,0,0},{11,0,0,1,0,0,6,0,0,1,11,1,6},{11,11,0,0,0,1,0,0,6,0,11,0,0},\n\t\t\t\t\t{0,1,1,1,11,11,11,6,0,0,11,1,0},{0,0,0,6,11,1,0,1,0,1,0,1,0},{6,1,0,6,0,1,0,1,0,0,0,1,0},\n\t\t\t\t\t{0,1,0,1,0,1,1,1,0,1,6,1,0},{0,1,0,1,0,1,1,1,0,0,0,0,0},{0,1,0,0,0,0,0,0,0,1,0,1,0},\n\t\t\t\t\t{0,1,0,1,0,0,13,0,0,1,1,1,0},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m2;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tint[][] m3= {\n\t\t\t\t\t{0,17,0,0,1,0,0,0,1,0,0,0,0},{0,11,11,11,1,0,0,0,0,0,8,8,8},{1,11,11,11,0,0,0,0,0,0,0,0,0},\n\t\t\t\t\t{11,11,11,11,0,0,0,1,0,1,1,1,4},{11,11,11,11,1,1,1,2,0,1,0,5,0},{11,11,11,11,0,0,1,0,0,0,0,5,0},\n\t\t\t\t\t{0,11,0,0,0,0,6,6,6,0,0,11,0},{0,3,0,3,0,0,0,0,0,11,11,11,11},{1,4,5,1,4,5,2,2,2,11,11,11,11},\n\t\t\t\t\t{0,0,0,0,0,1,0,3,3,11,11,11,11},{1,0,0,9,0,0,0,2,2,11,11,11,0},{1,1,0,9,0,0,0,0,0,11,11,11,0},\n\t\t\t\t\t{6,1,1,0,0,0,13,0,0,1,0,0,0},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m3;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tint[][] m4= {\n\t\t\t\t\t{0,11,11,0,0,0,17,0,0,0,0,11,0},{11,11,0,0,3,1,1,3,3,0,0,0,11},{11,0,0,5,1,1,1,1,1,1,3,0,7},\n\t\t\t\t\t{7,0,0,1,1,1,1,1,1,1,1,4,0},{0,0,5,2,0,0,0,2,1,1,0,4,0},{12,0,5,0,9,0,9,0,1,4,0,0,0},\n\t\t\t\t\t{0,0,1,0,3,3,0,0,1,4,0,12,12},{0,0,1,1,1,1,1,1,1,1,0,0,0},{0,5,1,1,1,1,1,1,1,1,4,0,0},\n\t\t\t\t\t{0,2,2,1,1,1,1,1,1,2,2,0,0},{0,1,1,3,2,1,1,2,3,1,1,0,11},{11,0,2,2,0,0,0,0,2,2,0,11,11},\n\t\t\t\t\t{6,11,0,0,0,0,13,0,0,0,11,11,6},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m4;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tint[][] m5= {\n\t\t\t\t\t{0,0,0,0,1,1,0,0,0,0,0,0,0},{8,0,3,0,1,0,0,0,7,7,6,0,0},{6,0,1,0,0,0,1,0,0,0,17,0,0},\n\t\t\t\t\t{1,0,1,1,1,0,1,1,0,12,12,0,12},{2,0,0,0,2,0,0,0,0,12,0,0,0},{0,0,3,0,12,12,0,12,12,12,0,1,1},\n\t\t\t\t\t{1,1,0,0,12,1,0,1,4,0,0,0,0},{0,0,0,0,12,0,0,0,0,0,10,9,0},{12,12,12,0,12,0,6,0,1,0,10,0,0},\n\t\t\t\t\t{0,0,0,3,3,0,0,0,0,0,10,1,1},{0,0,0,0,1,2,2,2,1,3,0,0,0},{1,1,2,0,0,0,0,0,0,2,1,0,0},\n\t\t\t\t\t{2,0,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m5;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tint[][] m6= {\n\t\t\t\t\t{0,0,17,0,0,5,0,4,11,11,0,0,0},{0,4,10,0,4,0,0,0,5,11,4,5,11},{0,4,10,0,4,0,1,0,5,11,4,5,11},\n\t\t\t\t\t{0,1,0,0,1,0,6,0,1,11,0,1,11},{0,0,0,5,7,0,1,0,2,9,0,11,11},{1,1,4,0,0,11,1,11,0,0,5,1,1},\n\t\t\t\t\t{0,0,0,0,5,11,11,11,4,0,0,0,0},{6,1,1,0,2,11,11,11,2,5,1,1,6},{7,7,7,0,3,0,11,0,3,0,7,7,7},\n\t\t\t\t\t{0,1,0,0,1,0,0,0,1,0,0,0,0},{0,1,4,0,0,2,0,2,0,0,5,1,11},{0,0,2,0,0,0,0,0,0,0,11,11,11},\n\t\t\t\t\t{0,0,3,0,0,0,13,0,0,0,3,11,11},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m6;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tint[][] m7= {\n\t\t\t\t\t{0,0,0,17,0,0,0,7,7,0,0,0,0},{0,0,6,7,7,7,0,0,0,0,6,0,0},{0,0,6,0,0,0,11,0,7,6,6,0,0},\n\t\t\t\t\t{0,6,0,0,0,11,6,0,0,0,6,0,0},{0,0,0,0,11,6,6,0,0,0,7,6,0},{0,6,0,11,6,6,6,0,6,0,0,0,0},\n\t\t\t\t\t{0,10,0,6,6,0,0,0,6,6,0,0,0},{9,0,0,0,6,0,6,6,6,0,0,10,0},{0,10,6,0,0,0,6,6,11,0,0,6,0},\n\t\t\t\t\t{0,6,0,0,0,0,6,11,0,0,6,6,0},{0,7,7,6,0,0,11,0,0,6,0,0,0},{0,0,0,0,0,0,0,0,0,7,0,8,6},\n\t\t\t\t\t{8,8,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m7;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tint[][] m8= {\n\t\t\t\t\t{0,0,1,0,0,1,0,3,0,1,0,0,0},{11,1,1,1,0,1,0,8,0,1,4,0,0},{11,11,11,0,0,2,0,1,0,2,0,5,4},\n\t\t\t\t\t{11,12,12,12,12,12,12,12,12,12,12,0,12},{0,1,0,0,0,0,3,3,0,0,17,0,0},{0,0,1,0,0,5,1,1,2,1,2,7,7},\n\t\t\t\t\t{1,1,0,1,0,5,1,1,11,1,8,8,1},{0,0,0,6,0,8,0,11,11,11,11,0,0},{12,12,0,12,12,12,12,12,0,12,12,12,12},\n\t\t\t\t\t{11,11,0,5,0,0,3,3,0,0,0,0,0},{11,11,1,0,4,0,0,5,0,8,3,1,0},{11,8,1,0,4,0,0,0,0,2,0,1,0},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,3,0,2,0},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m8;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tint[][] m9= {\n\t\t\t\t\t{0,0,0,1,0,0,0,0,0,8,11,0,0},{1,0,0,17,0,0,8,11,10,6,9,0,1},{0,0,0,8,11,10,6,9,0,7,11,0,0},\n\t\t\t\t\t{0,0,10,6,9,0,7,11,0,0,0,0,0},{0,0,0,7,11,0,0,0,0,0,0,0,0},{0,0,0,11,8,11,0,11,8,11,0,0,0},\n\t\t\t\t\t{6,1,0,10,6,9,0,10,6,9,0,1,6},{0,0,0,11,7,11,0,11,7,11,0,0,0},{0,0,0,0,8,0,0,0,8,0,0,0,0},\n\t\t\t\t\t{1,0,0,10,6,9,0,10,6,9,0,0,1},{1,0,0,11,7,11,0,11,7,11,0,0,1},{0,0,3,0,0,0,0,0,0,0,3,0,0},\n\t\t\t\t\t{0,0,1,1,0,0,13,0,0,1,1,0,0},\n\t\t\t\t\t};\t\t\t\n\t\t\tmatriz = m9;\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tint[][] m10= {\n\t\t\t\t\t{0,0,17,0,0,0,0,0,0,0,0,0,0},{0,5,2,1,0,0,0,0,0,0,1,2,4},{5,2,0,0,1,0,11,11,0,1,0,0,5},\n\t\t\t\t\t{1,0,0,0,1,11,11,11,11,1,0,0,5},{1,0,0,5,1,11,6,6,11,1,4,0,1},{5,3,3,1,12,12,12,12,12,12,1,1,1},\n\t\t\t\t\t{0,1,1,1,6,6,1,6,6,1,1,1,4},{0,0,1,1,6,0,1,0,6,1,1,4,0},{0,0,1,1,1,1,1,1,1,1,1,4,0},\n\t\t\t\t\t{1,11,2,2,2,6,6,2,2,2,2,11,1},{1,11,11,11,11,11,11,11,11,11,11,11,1},{0,0,11,11,11,0,0,0,11,11,11,11,0},\n\t\t\t\t\t{0,0,0,4,0,0,13,0,0,0,4,0,0},\n\t\t\t\t\t};\n\t\t\tmatriz = m10;\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tint[][] m11= {\n\t\t\t\t\t{0,0,17,0,0,6,0,1,0,1,1,0,0},{0,5,1,1,1,1,0,1,0,0,0,0,0},{0,0,0,4,0,1,0,1,1,0,11,11,11},\n\t\t\t\t\t{0,5,0,0,0,0,0,6,0,11,11,11,11},{0,5,0,1,1,1,6,1,1,11,11,2,6},{0,2,2,2,6,0,0,1,0,11,11,0,5},\n\t\t\t\t\t{5,1,1,1,0,6,11,11,11,11,11,0,0},{0,0,0,6,0,0,11,11,11,11,11,1,0},{6,1,0,11,11,11,11,6,11,11,11,1,0},\n\t\t\t\t\t{5,1,11,11,11,11,11,0,0,0,0,1,4},{0,1,11,11,0,0,0,0,7,1,1,1,0},{0,0,11,11,0,0,0,0,0,1,0,5,0},\n\t\t\t\t\t{0,3,11,11,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m11;\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tint[][] m12= {\n\t\t\t\t\t{0,0,0,17,0,0,0,1,1,1,0,0,0},{0,1,1,1,3,0,3,0,0,1,0,0,0},{0,0,0,0,1,0,2,0,0,0,0,1,1},\n\t\t\t\t\t{0,12,12,12,12,12,0,1,4,0,0,1,7},{0,0,8,8,8,12,0,1,0,6,9,1,0},{1,0,1,1,1,12,12,12,0,12,1,1,0},\n\t\t\t\t\t{0,0,0,0,6,12,0,0,0,12,7,0,0},{12,12,12,0,12,12,1,1,0,12,0,0,0},{0,0,0,0,0,1,7,7,0,12,12,12,0},\n\t\t\t\t\t{1,1,1,0,0,0,0,0,0,0,0,0,0},{0,0,1,0,7,7,0,0,0,1,1,0,5},{1,0,0,0,0,0,0,0,0,1,0,0,1},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m12;\n\t\t\tbreak;\n\t\tcase 13:\n\t\t\tint[][] m13= {\n\t\t\t\t\t{0,0,0,0,3,0,0,0,3,0,0,0,0},{0,1,1,1,1,0,0,0,1,1,1,1,0},{0,1,0,0,0,0,1,0,0,0,0,6,0},\n\t\t\t\t\t{0,6,0,1,2,0,0,0,2,1,0,1,1},{0,1,0,4,11,8,6,8,11,5,0,6,1},{0,2,0,0,11,11,11,11,11,0,0,7,1},\n\t\t\t\t\t{1,8,0,0,11,11,11,11,11,0,0,3,1},{1,6,0,4,11,7,6,7,11,5,0,1,0},{1,1,0,1,3,0,0,0,3,1,0,6,0},\n\t\t\t\t\t{1,6,0,0,0,0,1,0,0,0,0,1,0},{1,1,1,1,1,0,0,0,1,1,1,6,6},{1,1,0,0,2,0,0,0,2,0,0,1,0},\n\t\t\t\t\t{1,1,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m13;\n\t\t\tbreak;\n\t\tcase 14:\n\t\t\tint[][] m14= {\n\t\t\t\t\t{0,0,17,0,0,0,0,0,0,0,0,0,0},{11,11,0,0,3,1,1,1,3,0,0,11,11},{11,0,0,5,1,1,1,1,1,4,0,0,11},\n\t\t\t\t\t{0,0,0,1,1,11,1,11,1,1,0,0,0},{0,0,0,1,11,11,1,11,11,1,0,0,0},{11,0,0,1,1,1,1,1,1,1,0,0,11},\n\t\t\t\t\t{11,11,0,0,1,11,1,11,1,0,0,11,11},{12,12,12,0,1,1,1,1,1,0,12,12,12},{0,0,0,0,5,5,5,5,5,0,0,0,0},\n\t\t\t\t\t{0,0,0,0,4,4,4,4,4,0,0,0,0},{10,10,10,0,0,0,0,0,0,0,9,9,9},{4,4,4,0,0,0,0,0,0,0,5,5,5},\n\t\t\t\t\t{9,9,9,10,0,0,13,0,0,9,10,10,10},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m14;\n\t\t\tbreak;\n\t\tcase 15:\n\t\t\tint[][] m15= {\n\t\t\t\t\t{0,0,17,0,1,1,0,0,1,0,0,0,0},{0,11,11,1,1,0,0,0,1,0,0,0,0},{11,11,11,11,11,11,11,11,1,1,0,0,0},\n\t\t\t\t\t{11,7,1,11,1,1,1,11,11,11,11,1,6},{11,11,1,11,11,11,7,11,11,1,9,1,0},{0,11,11,1,8,11,11,11,11,1,0,1,0},\n\t\t\t\t\t{0,1,1,1,1,1,11,11,1,1,4,11,11},{10,7,1,1,0,0,0,1,2,0,0,0,11},{0,1,0,1,0,7,3,2,11,11,1,4,11},\n\t\t\t\t\t{0,1,0,0,5,1,2,11,11,1,0,0,11},{0,1,1,4,5,2,11,11,3,11,1,11,11},{0,0,1,0,11,0,0,0,1,11,2,11,0},\n\t\t\t\t\t{0,0,2,0,0,0,13,0,0,11,11,11,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m15;\n\t\t\tbreak;\n\t\tcase 16:\n\t\t\tint[][] m16= {\n\t\t\t\t\t{0,0,17,0,0,0,0,0,0,0,0,0,0},{0,0,6,11,6,0,0,0,0,0,0,0,0},{0,0,0,11,0,11,8,0,0,0,0,0,0},\n\t\t\t\t\t{0,11,0,0,0,0,11,3,0,0,0,0,0},{0,11,11,0,0,11,0,11,8,0,0,0,0},{0,11,0,11,0,11,0,0,11,3,0,0,0},\n\t\t\t\t\t{0,11,0,0,11,0,0,0,11,11,8,0,0},{0,0,11,0,0,0,0,11,11,11,11,3,0},{0,0,0,11,0,0,11,0,11,11,11,11,0},\n\t\t\t\t\t{1,0,0,0,0,0,11,0,0,11,11,11,6},{1,1,0,0,0,0,0,11,0,11,11,11,11},{6,1,1,0,0,0,0,0,11,0,11,11,11},\n\t\t\t\t\t{6,6,1,1,0,0,13,0,11,0,0,11,11},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m16;\n\t\t\tbreak;\n\t\tcase 17:\n\t\t\tint[][] m17= {\n\t\t\t\t\t{0,0,0,0,3,0,0,0,0,0,3,0,0},{0,1,0,1,1,17,0,14,14,14,1,1,0},{0,1,0,0,1,0,6,14,14,14,14,14,0},\n\t\t\t\t\t{14,14,14,9,1,0,0,1,14,14,14,14,0},{14,14,14,14,14,14,1,1,5,4,0,0,0},{0,0,10,14,14,14,14,1,5,4,0,7,7},\n\t\t\t\t\t{1,1,1,1,14,14,14,14,14,14,14,1,1},{0,0,0,1,1,14,14,14,14,9,0,0,0},{0,1,1,1,0,14,14,14,1,1,0,1,0},\n\t\t\t\t\t{14,14,14,1,14,0,0,0,0,1,0,1,0},{14,14,14,14,14,7,0,7,0,0,3,1,0},{1,14,14,14,14,0,0,0,0,1,0,0,0},\n\t\t\t\t\t{1,1,9,0,0,0,13,0,0,1,0,1,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m17;\n\t\t\tbreak;\n\t\tcase 18:\n\t\t\tint[][] m18= {\n\t\t\t\t\t{0,0,17,0,0,0,0,0,6,6,6,11,0},{0,1,0,17,0,0,0,0,6,0,0,6,0},{1,11,1,0,0,0,1,1,1,1,0,6,0},\n\t\t\t\t\t{0,1,11,1,0,0,1,0,11,1,6,6,0},{0,0,1,0,11,6,1,11,0,1,0,0,0},{0,0,0,0,6,0,1,6,1,1,0,0,0},\n\t\t\t\t\t{0,0,1,1,6,1,0,6,0,0,0,0,0},{0,0,1,0,11,1,6,11,0,0,0,0,0},{6,6,6,11,0,1,0,0,1,1,0,0,0},\n\t\t\t\t\t{6,0,1,1,1,1,0,0,1,6,6,0,0},{6,0,0,6,0,0,0,0,0,6,1,1,0},{11,6,6,6,0,0,0,0,0,0,1,6,6},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,0,0,6,6},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m18;\n\t\t\tbreak;\n\t\tcase 19:\n\t\t\tint[][] m19= {\n\t\t\t\t\t{0,1,0,1,0,1,0,1,0,1,0,1,0},{0,1,17,1,0,1,0,1,0,1,0,1,0},{0,7,0,7,0,7,0,7,0,7,0,7,0},\n\t\t\t\t\t{3,0,3,0,1,0,0,0,1,0,3,0,3},{1,0,1,2,1,0,1,0,1,2,1,0,1},{7,0,7,0,6,0,7,0,6,0,7,0,7},\n\t\t\t\t\t{11,11,0,0,1,0,11,0,1,0,0,11,11},{11,11,11,11,1,2,11,2,1,11,11,11,11},{11,11,11,11,11,11,11,11,11,11,11,11,11},\n\t\t\t\t\t{3,0,3,0,1,11,11,11,1,0,3,0,3},{0,1,0,1,0,0,11,0,0,1,0,1,0},{0,1,0,1,0,0,0,0,0,1,0,1,0},\n\t\t\t\t\t{0,2,0,2,0,0,13,0,0,2,0,2,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m19;\n\t\t\tbreak;\n\t\tcase 20:\n\t\t\tint[][] m20= {\n\t\t\t\t\t{0,0,0,12,0,1,0,0,1,0,1,0,0},{0,0,0,17,0,0,0,0,1,0,6,0,0},{0,0,0,12,0,3,6,0,1,0,1,0,0},\n\t\t\t\t\t{7,0,1,12,0,6,0,3,2,0,1,0,0},{0,0,1,12,0,0,0,1,0,0,0,0,0},{1,0,1,12,12,0,12,12,12,12,0,0,1},\n\t\t\t\t\t{0,0,0,3,0,0,0,11,0,12,0,7,7},{1,1,5,1,0,6,11,11,11,12,0,3,3},{2,0,5,0,0,1,11,11,11,12,0,1,0},\n\t\t\t\t\t{0,8,0,0,0,1,0,11,0,12,0,11,0},{0,1,0,8,0,2,2,2,0,0,11,11,11},{0,1,0,1,0,0,0,0,0,12,11,11,11},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,12,0,11,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m20;\n\t\t\tbreak;\n\t\tcase 21:\n\t\t\tint[][] m21= {\n\t\t\t\t\t{0,0,0,3,3,3,0,0,3,0,0,0,0},{0,3,1,1,1,1,1,1,1,1,0,17,0},{0,11,11,11,11,11,11,11,11,1,1,0,0},\n\t\t\t\t\t{11,11,0,0,0,0,0,0,11,11,1,1,0},{11,0,6,0,0,6,0,0,0,11,11,11,0},{11,0,6,0,0,6,0,0,0,11,11,11,0},\n\t\t\t\t\t{11,0,0,11,0,0,0,0,11,11,1,1,4},{11,11,11,11,11,11,11,11,11,1,1,1,4},{1,11,11,1,1,11,11,11,1,1,1,1,0},\n\t\t\t\t\t{0,1,1,1,1,1,1,1,1,1,1,0,6},{6,0,1,6,1,1,1,1,1,1,4,0,6},{0,6,1,2,6,0,0,0,1,1,6,6,6},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m21;\n\t\t\tbreak;\n\t\tcase 22:\n\t\t\tint[][] m22= {\n\t\t\t\t\t{0,0,0,0,0,11,0,0,0,0,0,0,0},{0,0,0,0,11,6,11,0,0,0,17,0,0},{0,0,11,0,0,11,0,0,11,11,0,0,0},\n\t\t\t\t\t{0,11,1,11,0,0,0,11,1,1,11,0,0},{0,0,11,1,11,0,0,0,11,11,0,0,11},{11,0,0,11,0,0,11,0,0,0,0,11,6},\n\t\t\t\t\t{1,11,0,0,0,11,6,11,0,0,11,0,11},{6,1,11,0,0,0,11,0,0,11,6,11,0},{1,11,0,0,11,0,0,0,11,0,11,0,0},\n\t\t\t\t\t{11,0,0,11,1,11,0,11,1,11,0,0,0},{0,0,0,11,1,11,0,0,11,0,0,11,0},{0,11,0,0,11,0,0,0,0,0,11,6,11},\n\t\t\t\t\t{11,6,11,0,0,0,13,0,0,11,1,11,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m22;\n\t\t\tbreak;\n\t\tcase 23:\n\t\t\tint[][] m23= {\n\t\t\t\t\t{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,6,6,0,0,17,0,0,0},{0,0,0,0,0,0,6,0,0,0,0,0,0},\n\t\t\t\t\t{0,6,6,11,11,1,6,1,11,11,6,6,0},{0,0,0,6,11,11,6,11,11,6,0,0,0},{11,0,0,0,6,11,11,11,6,0,0,0,11},\n\t\t\t\t\t{6,11,0,0,0,11,11,11,0,0,0,11,6},{11,0,0,0,8,7,11,7,8,0,0,0,11},{0,0,0,0,6,0,8,0,6,0,0,0,0},\n\t\t\t\t\t{0,0,0,6,0,0,6,0,0,6,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0},\n\t\t\t\t\t{0,0,6,0,0,0,13,0,0,0,6,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m23;\n\t\t\tbreak;\n\t\tcase 24:\n\t\t\tint[][] m24= {\n\t\t\t\t\t{0,0,6,0,1,7,0,0,0,0,5,0,0},{0,17,1,0,1,11,0,2,1,1,1,0,0},{0,11,11,0,1,11,5,4,0,0,0,6,6},\n\t\t\t\t\t{11,11,11,11,11,11,1,1,1,0,5,1,0},{0,0,11,11,3,3,7,1,0,5,1,2,5},{1,7,0,3,2,2,0,0,0,1,2,0,5},\n\t\t\t\t\t{5,0,3,1,14,14,14,14,14,14,14,14,14},{5,0,2,0,14,14,14,14,14,14,14,14,14},{0,0,6,0,14,14,14,14,14,14,14,14,14},\n\t\t\t\t\t{1,0,1,0,14,14,14,14,14,14,14,14,14},{5,0,1,0,14,14,14,14,14,14,14,14,14},{5,0,1,0,0,0,0,0,14,14,14,14,14},\n\t\t\t\t\t{0,0,2,0,0,0,13,0,0,14,14,14,14},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m24;\n\t\t\tbreak;\n\t\tcase 25:\n\t\t\tint[][] m25= {\n\t\t\t\t\t{0,0,0,6,0,1,0,1,0,1,0,6,0},{0,1,0,1,0,0,0,0,0,6,0,0,0},{0,1,0,1,0,0,6,0,0,6,0,6,6},\n\t\t\t\t\t{0,1,17,0,0,1,0,6,1,0,0,0,6},{0,0,0,0,1,1,0,1,1,0,6,0,0},{0,0,6,0,1,0,0,1,1,0,1,1,0},\n\t\t\t\t\t{6,0,6,0,0,1,0,6,0,0,6,1,0},{0,0,1,1,0,1,0,0,0,1,6,0,0},{0,6,1,1,0,1,1,0,1,1,0,0,1},\n\t\t\t\t\t{0,1,0,0,0,1,6,0,0,0,0,1,1},{0,0,0,1,0,1,1,6,0,6,0,0,1},{1,0,1,1,0,0,0,0,0,1,6,0,0},\n\t\t\t\t\t{1,0,1,0,0,0,13,0,0,1,1,1,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m25;\n\t\t\tbreak;\n\t\tcase 26:\n\t\t\tint[][] m26= {\n\t\t\t\t\t{0,0,12,12,0,0,0,0,0,0,0,0,0},{8,0,0,12,11,0,4,0,0,17,0,0,0},{11,8,0,0,0,0,9,0,4,0,12,12,0},\n\t\t\t\t\t{11,11,0,7,3,5,0,0,9,11,12,0,0},{11,11,11,0,0,6,3,5,0,0,0,0,8},{11,11,7,8,0,5,0,6,3,0,0,8,11},\n\t\t\t\t\t{11,7,0,0,2,6,0,5,0,7,0,11,11},{0,0,0,0,0,4,2,6,0,0,11,11,11},{0,0,12,11,10,0,0,4,2,8,7,11,11},\n\t\t\t\t\t{0,12,12,0,5,0,10,0,0,0,0,0,11},{0,0,0,0,0,0,5,0,11,12,0,0,7},{6,0,0,0,0,0,0,0,0,12,12,0,0},\n\t\t\t\t\t{6,6,0,0,0,0,13,0,0,0,0,0,6},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m26;\n\t\t\tbreak;\n\t\tcase 27:\n\t\t\tint[][] m27= {\n\t\t\t\t\t{0,0,0,0,6,0,0,0,0,0,0,0,0},{6,6,0,0,6,0,17,6,6,0,0,0,0},{0,6,0,0,6,0,0,0,6,0,6,6,11},\n\t\t\t\t\t{0,6,0,0,6,6,6,0,11,0,6,0,0},{0,1,0,0,0,0,6,0,6,6,6,0,0},{11,6,6,0,6,1,6,1,1,0,0,0,0},\n\t\t\t\t\t{0,0,6,11,6,11,0,0,1,0,0,6,6},{0,0,6,0,0,11,0,0,6,0,0,6,0},{0,0,1,0,0,6,0,0,6,6,1,6,0},\n\t\t\t\t\t{11,6,6,6,11,11,1,6,6,0,1,6,0},{0,0,0,1,0,0,0,0,11,11,0,1,0},{0,0,0,6,0,0,0,0,0,11,0,1,0},\n\t\t\t\t\t{0,0,0,6,0,0,13,0,0,6,0,1,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m27;\n\t\t\tbreak;\n\t\tcase 28:\n\t\t\tint[][] m28= {\n\t\t\t\t\t{0,0,0,0,0,0,0,0,0,0,10,9,0},{0,0,0,0,0,0,8,0,0,17,6,0,0},{0,0,0,0,0,3,11,3,0,1,4,0,0},\n\t\t\t\t\t{0,0,0,0,8,11,11,11,8,1,4,0,0},{0,0,0,3,11,11,14,11,11,1,4,0,0},{0,0,8,11,11,14,14,14,11,11,4,0,0},\n\t\t\t\t\t{0,3,11,11,14,14,14,14,14,11,11,3,0},{8,11,11,14,14,14,14,14,14,14,11,11,8},{11,11,14,14,14,14,14,14,14,14,14,11,11},\n\t\t\t\t\t{0,11,14,14,14,14,14,14,14,14,14,11,0},{0,11,14,14,14,14,14,14,14,14,14,11,0},{0,11,14,14,14,0,0,0,14,14,14,11,0},\n\t\t\t\t\t{0,11,14,14,0,0,13,0,0,14,14,11,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m28;\n\t\t\tbreak;\n\t\tcase 29:\n\t\t\tint[][] m29= {\n\t\t\t\t\t{0,0,0,0,0,0,0,0,0,0,1,0,0},{0,1,12,12,0,6,0,1,0,0,17,0,0},{0,0,12,12,1,11,11,11,12,12,0,6,0},\n\t\t\t\t\t{0,0,0,0,0,11,11,11,12,12,1,0,0},{0,6,0,0,12,12,0,11,0,0,0,0,0},{11,11,1,0,12,12,6,0,0,0,0,1,0},\n\t\t\t\t\t{11,11,11,0,0,0,0,0,0,6,0,0,6},{0,1,12,12,0,1,0,0,0,0,0,0,0},{6,0,12,12,11,11,12,12,11,11,0,1,0},\n\t\t\t\t\t{0,0,0,0,11,0,12,12,11,11,12,12,0},{0,0,0,6,11,0,0,0,11,11,12,12,0},{0,0,1,0,1,0,0,0,0,0,0,0,0},\n\t\t\t\t\t{1,0,0,0,0,0,13,0,0,1,6,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m29;\n\t\t\tbreak;\n\t\tcase 30:\n\t\t\tint[][] m30= {\n\t\t\t\t\t{0,0,17,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,0,3,3,0,0,0,8,0,0},{0,8,8,0,3,11,11,8,0,3,11,3,0},\n\t\t\t\t\t{3,11,11,3,11,11,11,11,3,11,11,11,3},{11,11,11,11,11,11,11,11,11,11,11,11,11},{6,11,12,11,11,11,11,11,12,11,11,11,11},\n\t\t\t\t\t{11,11,12,12,12,11,11,11,12,12,12,11,6},{11,11,11,11,12,11,6,11,11,11,12,11,11},{11,11,11,11,11,11,11,11,11,11,11,11,11},\n\t\t\t\t\t{11,11,11,11,11,2,2,11,11,11,11,11,7},{7,11,11,11,2,0,0,2,11,11,11,7,0},{0,7,2,2,0,0,0,0,2,2,2,0,0},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m30;\n\t\t\tbreak;\n\t\tcase 31:\n\t\t\tint[][] m31= {\n\t\t\t\t\t{0,0,0,12,0,0,0,0,12,0,0,0,0},{12,12,0,12,0,12,12,12,12,0,12,12,12},{11,11,1,0,0,1,0,0,12,0,12,11,12},\n\t\t\t\t\t{11,12,12,12,12,0,6,0,0,1,11,11,11},{11,11,0,12,0,0,12,0,12,12,12,12,11},{12,12,17,12,0,12,12,0,0,12,0,0,0},\n\t\t\t\t\t{0,0,1,11,1,0,1,11,0,12,0,0,12},{0,12,12,11,12,12,12,12,0,11,1,0,12},{1,0,0,1,0,0,0,0,11,11,12,0,12},\n\t\t\t\t\t{12,12,0,12,12,0,12,1,12,12,12,0,0},{0,0,1,0,11,11,0,0,11,12,0,0,12},{0,12,12,12,11,0,0,0,0,12,0,12,12},\n\t\t\t\t\t{0,12,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m31;\n\t\t\tbreak;\n\t\tcase 32:\n\t\t\tint[][] m32= {\n\t\t\t\t\t{14,14,14,14,14,14,0,14,14,14,14,14,14},{14,14,14,14,14,14,14,14,14,14,14,14,14},{14,14,14,1,14,14,14,14,14,1,14,14,14},\n\t\t\t\t\t{14,1,0,1,0,1,14,1,0,1,0,1,14},{14,2,2,1,0,17,0,0,0,1,2,2,14},{14,14,14,1,3,1,6,1,3,1,14,14,14},\n\t\t\t\t\t{6,14,14,14,0,7,0,7,0,14,14,14,6},{14,14,14,14,0,3,0,3,0,14,14,14,14},{14,14,14,14,0,1,0,1,0,14,14,14,14},\n\t\t\t\t\t{14,14,14,1,0,0,3,0,0,1,14,14,14},{14,1,14,1,0,7,7,7,0,1,14,1,14},{0,1,3,1,0,0,0,0,0,1,3,1,0},\n\t\t\t\t\t{0,2,0,0,0,0,13,0,0,0,0,2,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m32;\n\t\t\tbreak;\n\t\tcase 33:\n\t\t\tint[][] m33= {\n\t\t\t\t\t{0,0,0,0,6,0,0,0,0,6,0,0,0},{0,6,0,0,0,6,0,0,6,11,11,0,0},{0,0,6,0,0,0,0,6,11,8,9,0,0},\n\t\t\t\t\t{0,0,0,6,0,11,11,11,11,11,0,10,0},{0,9,0,0,6,11,11,6,0,0,0,6,0},{0,7,9,11,0,6,0,0,6,0,0,10,0},\n\t\t\t\t\t{0,0,11,11,11,11,11,0,0,6,0,0,0},{0,8,9,11,0,6,11,0,0,0,6,0,0},{0,11,11,11,6,0,6,0,8,0,0,6,0},\n\t\t\t\t\t{11,11,11,6,0,0,0,0,10,0,0,0,0},{0,0,6,0,0,0,0,0,0,0,0,10,6},{0,0,0,0,0,0,0,0,0,8,9,0,0},\n\t\t\t\t\t{9,0,8,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m33;\n\t\t\tbreak;\n\t\tcase 34:\n\t\t\tint[][] m34= {\n\t\t\t\t\t{0,0,0,0,4,5,0,0,0,0,0,0,0},{4,4,4,5,0,4,0,0,4,4,0,0,0},{4,4,4,1,1,0,0,17,4,1,4,0,0},\n\t\t\t\t\t{5,5,0,1,4,0,0,5,4,1,1,0,0},{0,4,0,1,5,4,0,4,1,1,1,0,0},{0,4,5,0,0,1,4,1,5,5,1,0,0},\n\t\t\t\t\t{0,4,0,0,5,1,1,4,0,4,1,0,0},{0,5,0,0,4,1,1,4,0,4,1,0,0},{0,5,2,2,0,1,1,1,0,4,4,2,1},\n\t\t\t\t\t{0,5,0,0,5,4,1,5,4,4,4,5,5},{0,0,4,0,1,5,4,1,1,0,0,5,0},{0,0,4,5,4,0,0,0,1,4,0,4,0},\n\t\t\t\t\t{0,0,4,5,0,0,13,0,0,1,1,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m34;\n\t\t\tbreak;\n\t\tcase 35:\n\t\t\tint[][] m35= {\n\t\t\t\t\t{0,0,17,0,0,0,0,0,0,0,0,0,0},{0,0,0,0,1,0,1,0,0,0,0,0,0},{11,0,0,11,1,11,1,11,0,0,11,0,0},\n\t\t\t\t\t{1,11,11,1,1,1,1,1,11,11,1,11,0},{1,1,1,1,6,1,6,1,1,1,1,11,0},{12,12,12,1,1,1,1,1,12,12,12,11,0},\n\t\t\t\t\t{12,1,1,1,1,1,1,1,1,1,12,12,11},{1,1,1,12,1,1,1,12,1,1,1,11,11},{1,1,12,12,12,1,12,12,12,1,1,12,12},\n\t\t\t\t\t{11,12,12,11,11,11,11,11,12,12,11,12,11},{0,11,11,0,0,0,0,0,11,11,0,11,0},{0,0,0,0,0,0,0,0,0,0,0,0,0},\n\t\t\t\t\t{0,0,0,0,0,0,13,0,0,0,0,0,0},\n\t\t\t\t\t};\t\n\t\t\tmatriz = m35;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn matriz;\n\t}", "public void diagrafiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka sto farmakeio\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA FARMAKWN\");\n\t\t\t// Emfanizw ola ta famraka tou farmakeiou\n\t\t\tfor(int j = 0; j < numOfMedicine; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tmedicine[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU FARMAKOU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO FARMAKOU: \");\n\t\t\t}\n\t\t\t// Metakinw ta epomena farmaka mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfMedicine - 1; k++)\n\t\t\t{\n\t\t\t\tmedicine[k] = medicine[k+1]; // Metakinw to farmako sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfMedicine--; // Meiwse ton ari8mo twn farmakwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMA FARMAKA PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfor(int j=0;j<8;j++){\n\t\t\tfor(int i=0;i<8;i++){\n\t\t\t\t//上下两侧\n\t\t\t\tif(j==0||j==7){\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}else{\n\t\t\t\t\t//中间\n\t\t\t\t\tif(i>0&&i<7){\n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void makeBoard2d() {\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n this.board2d[i][j] = this.board[(i * 3) + j];\n }\n }\n }", "private void imprimirMatriz(int[][] m) {\n\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tSystem.out.println(\"M[\" + i + \"][\" + j + \"] = \" + m[i][j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t}", "public abstract double getDiagonal();", "public void oneTurn(){\n Integer[] previousTurn = Arrays.copyOf(this.board, this.board.length);\n\n // itero su previousTurn per costruire il board successivo\n for (int i=0;i<previousTurn.length;i++){\n\n // mi salvo la situazione della casella sx, se i==0 prendo l'ultima\n int left = previousTurn[previousTurn.length-1];\n if (i!=0)\n left = previousTurn[i-1];\n\n // mi salvo la situazione della casella dx, se i==ultima prendo zero\n int right = previousTurn[0];\n if (i!=previousTurn.length-1)\n right = previousTurn[i+1];\n \n // se a sx e dx c'è 0, metto 0\n // caso fine sottopopolazione (010->000)\n if (left == 0 && right == 0){\n this.board[i] = 0;\n \n // se a sx e dx c'è 1, metto 1 se c'era 0 e viceversa\n // caso nascita (101->111) e fine sovrappopolazione (111->101)\n } else if (left == 1 && right == 1)\n if (this.board[i] == 1)\n this.board[i] = 0;\n else\n this.board[i] = 1;\n \n // tutte le altre casistiche, lascio invariata la situazione\n \n }\n\n this.turn += 1;\n }", "public static void main(String[] args) {\n int height;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Nhập chiều cao hình tam giác\");\n height = scan.nextInt();\n for(int i = 1; i <= height; ++i) {\n for(int j = height; j >i; --j) \n System.out.print(\" \");\n for(int j = 1 ; j <= 2 * i - 1; ++j) \n System.out.print(\"*\");\n System.out.println(\"\");\n }\n }", "private int checkDiagonal() {\n if ((this.board[0][0] == this.board[1][1]) && this.board[0][0] == this.board[2][2]) {\n return this.board[0][0];\n } else if ((this.board[0][2] == this.board[1][1]) && this.board[0][2] == this.board[2][0]) {\n return this.board[0][2];\n } else {\n return 0;\n }\n }", "public void Makeboard() {\r\n\r\n Normalboard(new Point2(20, 300));\r\n Normalboard(new Point2(224, 391));\r\n Stingboard(new Point2(156, 209));\r\n Leftlboard(new Point2(88, 482));\r\n Rightboard(new Point2(292, 573));\r\n Regenerateboard(new Point2(360, 118));\r\n\r\n }", "public Squarelotron inverseDiagonalFlip(int ring);", "public static void pyramid2(int rowCount) {\n\t\tint number = 1;\n\t\tfor (int i = rowCount; i > 0; i--) {\n\t\t\tfor (int j = 1; j <= i; j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int k = 1; k <= number; k++) {\n\t\t\t\tSystem.out.print(k + \" \");\n\t\t\t}\n\t\t\tnumber++;\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void diagrafiGiatrou() {\n\t\t// Elegxw an yparxoun iatroi sto farmakeio\n\t\tif(numOfDoctors != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA IATRWN\");\n\t\t\t// Emfanizw olous tous giatrous\n\t\t\tfor(int j = 0; j < numOfDoctors; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA IATROU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tdoctor[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU IATROU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfDoctors)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO IATROU: \");\n\t\t\t}\n\t\t\t// Metakinw tous epomenous giatrous mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfDoctors - 1; k++)\n\t\t\t{\n\t\t\t\tdoctor[k] = doctor[k+1]; // Metakinw ton giatro sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfDoctors--; // Meiwse ton ari8mo twn giatrwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMOI GIATROI PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void rotate(int num) {\n for (int s = 0; s < num; s++) {\n int up = s; // 0 , 1\n int down = N - 1 - s;\n int left = s;\n int right = M - 1 - s;\n\n int tmp = map[s][s];\n for (int i = left; i < right; i++){ // 위\n map[up][i] = map[up][i + 1];\n }\n for (int i = up; i < down; i++){ // 오른쪽\n map[i][right] = map[i + 1][right];\n }\n for (int i = right; i > left; i--){ // 아래\n map[down][i] = map[down][i - 1];\n }\n for (int i = down; i > up; i--){ // 왼쪽\n map[i][left] = map[i - 1][left];\n }\n map[up + 1][left] = tmp;\n }\n }", "public boolean diag2(){\n\tboolean trouve=false;\n\tint i=0;\n\tObject tmp='@';\n\twhile(i<5 && !trouve){\n\t\tif(gc[i][gc.length-i-1]==tmp)\n\t\t\ttrouve=true;\n\t\telse\n\t\t\ti++;\n\t}\n\treturn trouve;\n}", "public void ZerarM() {\n\t\tfor(int i = 0;i<3;i++) {\n\t\t\tfor(int j = 0;j<3;j++) {\n\t\t\t\tthis.m[i][j] = \"0\";\n\t\t\t}\n\t\t}\n\t\tthis.emp = 0;\n\t\tJOptionPane.showMessageDialog(null,\"COMEÇOU\");\n\t}", "@Test\n\tpublic void diagLRWin_test()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.set(2,0, 'o');\n\t\tb.set(2,2, 'x');\n\t\tassertTrue(b.diagLRWin());\t\n\t}", "public void enemymoveAri(){\n\t\tint YEari = 0;\n\t\tint XEari = 0;\n\t\tfor(int i = 0 ; i < this.Ari.length;i++){\n\t\t\tfor(int p = 0; p < this.Ari.length;p++){\n\t\t\t\tif(this.Ari[i][p] == 1){\n\t\t\t\t\tYEari = i;\n\t\t\t\t\tXEari = p;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint move = fate.nextInt(4);// 0 is left, 1 is right , 2 is up , 3 is down\n\t\tswitch(move){//first block is up and down second block is left and right\n\t\t\tcase 0:\n\t\t\t\tif(this.area[YEari][XEari-1] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari][XEari-1] = 1;//to turn left\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tif(this.area[YEari][XEari+1] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari][XEari+1] = 1;//to turn right\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak; \n\t\t\tcase 2:\n\t\t\t\tif(this.area[YEari-1][XEari] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari-1][XEari] = 1;//to turn up\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tif(this.area[YEari+1][XEari] != \"[ ]\"){\n\t\t\t\t\tthis.Ari[YEari +1][XEari] = 1;//to turn down\n\t\t\t\t\tthis.Ari[YEari][XEari] = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}//end of switch\n\t}", "public static void pyramidUsingStart() {\n\t\t\t int rows = 5;\n\t\t\t for (int i = 1; i <=rows ; i++) {\n\t\t\t\tfor (int j = 1; j <= rows-i; j++) {\n\t\t\t\t\t//Printing Space\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\t\t/*Printing left start\n\t\t\t\t\t\n\t\t\t\t\t\t *\n\t\t\t\t\t\t **\n\t\t\t\t\t\t ***\n\t\t\t\t\t\t ****\n\t\t\t\t\t\t*****\n\t\t\t\t\t*/\n\t\t\t\t\tSystem.out.print(\"*\"+\"\");\n\t\t\t\t}\n\t\t\t\t//Rest of the right star\n\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*/\n\t\t\t\tfor (int j = 1; j <= i-1 ; j++) {\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\t//for new lines\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[][] matrrix = new int[n][n];\n\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n matrrix[i][j] = scanner.nextInt();\n }\n }\n int mainDiagonal = 0, secondDiagonal = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n if (i == j) {\n mainDiagonal += matrrix[i][j];\n }\n if (Math.abs(i + j) == (n - 1)) {\n secondDiagonal += matrrix[i][j];\n }\n }\n }\n System.out.println(Math.abs(mainDiagonal - secondDiagonal));\n\n }", "private void MembentukListHuruf(){\n for(int i = 0; i < Panjang; i ++){\n Huruf Hrf = new Huruf();\n Hrf.CurrHrf = Kata.charAt(i);\n if(!IsVertikal){\n //horizontal\n Hrf.IdX = StartIdxX;\n Hrf.IdY = StartIdxY+i;\n }else{\n Hrf.IdX = StartIdxX+i;\n Hrf.IdY = StartIdxY;\n }\n // System.out.println(\"iniii \"+Hrf.IdX+\" \"+Hrf.IdY+\" \"+Hrf.CurrHrf+\" \"+NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].AddNoSoal(NoSoal);\n TTS.Kolom[Hrf.IdX][Hrf.IdY].Huruf=Hrf.CurrHrf;\n \n }\n }", "private void menu2() {\r\n\t\tSystem.out.println(\" ---------WHICH ROOM?---------\");\r\n\t\tSystem.out.println(\"1) Move to North room.\");\r\n\t\tSystem.out.println(\"2) Move to East room.\");\r\n\t\tSystem.out.println(\"3) Move to South room.\");\r\n\t\tSystem.out.println(\"4) Move to West room.\");\r\n\t}", "public static void drawFullBoard()\n {\n char rowLetter=' '; //Letra de las filas.\n \n System.out.println(\" 1 2 3 4 \" ); //Imprime la parte superior del tablero.\n System.out.println(\" +-------+-------+\");\n \n \n for (int i = 0; i< BOARD_HEIGHT; i++) //Controla los saltos de fila.\n {\n switch(i)\n {\n case 0: rowLetter='A';\n break;\n case 1: rowLetter='B';\n break;\n case 2: rowLetter='C';\n break;\n case 3: rowLetter='D';\n break;\n }\n \n System.out.print(rowLetter);\n \n for (int j = 0; j < BOARD_WIDTH; j++ ) //Dibuja las filas.\n {\n if (boardPos[i][j]==0)\n {\n System.out.print(\"| · \");\n }\n else\n {\n System.out.print(\"| \" + boardPos[i][j] + \" \");\n }\n }\n System.out.println(\"|\");\n \n if (i==((BOARD_HEIGHT/2)-1)) //Si se ha dibujado la mitad del tablero.\n {\n System.out.println(\" +-------+-------+\"); //Dibuja una separación en medio del tablero.\n }\n }\n \n System.out.println(\" +-------+-------+\"); //Dibuja linea de fin del tablero.\n }", "void setAdjForFirstType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, null , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], null, null, matrixOfSquares[1][1] );\n matrixOfSquares[1][1].setCardinalSquare(null, matrixOfSquares[2][1], matrixOfSquares[1][0], matrixOfSquares[1][2] );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , null, matrixOfSquares[1][1], matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(null, matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][1].setCardinalSquare( matrixOfSquares[1][1], null, null, matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(null, null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n }", "@Override\n\tpublic double diagonal() {\n\t\treturn getBase()*Math.sqrt(2);\n\t}", "public char controlloVerticale(char[][] scacchiera)\n {\n for (int w=0;w<3;w++)\n {\n if (scacchiera[0][w]==scacchiera[1][w]&&scacchiera[1][w]==scacchiera[2][w]) return scacchiera[0][w];\n }\n return ' ';\n }", "private void createFinalLine() {\n //Up\n if (orOpActive.row > origin.row) {\n for (int i = origin.row + 1; i <= orOpActive.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n\n //Down\n if (orOpActive.row < origin.row) {\n for (int i = origin.row - 1; i >= orOpActive.row; i--) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n //Right\n if (orOpActive.column > origin.column) {\n for (int i = origin.column + 1; i <= orOpActive.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n //Left\n if (orOpActive.column < origin.column) {\n for (int i = origin.column - 1; i >= orOpActive.column; i--) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n }", "public static void pyramid1(int rowCount) {\n\t\tint number = 1;\n\t\tfor (int i = rowCount; i > 0; i--) {\n\n\t\t\tfor (int j = 1; j <= i; j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int k = 1; k <= number; k++) {\n\t\t\t\tSystem.out.print(number + \" \");\n\t\t\t}\n\t\t\tnumber++;\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void agregarVidaLogica(){\n int numvida = tam * tam;\n numvida*=0.05;\n System.out.println(numvida);\n for(int i=0;i<numvida;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=4;\n }\n }\n }", "@Test\n\tpublic void diagLRWin_test1()\n\t{\n\t\tb.set(0,1, 'x');\n\t\tb.set(0,2, 'o');\n\t\tb.set(1,2, 'x');\n\t\tassertFalse(b.diagLRWin());\t\n\t}", "public static void main(String[] args){\n java.util.Scanner read = new java.util.Scanner(System.in);\n\n char[][] one = {\n {' ',' ',' '},\n {' ','|',' '},\n {' ','|',' '},\n };\n char[][] two = {\n {' ','_',' '},\n {' ','_','|'},\n {'|','_',' '},\n };\n char[][] three = {\n {' ','_',' '},\n {' ','_','|'},\n {' ','_','|'},\n };\n char[][] four = {\n {' ',' ',' '},\n {'|','_','|'},\n {' ',' ','|'},\n };\n char[][] five = {\n {' ','_',' '},\n {'|','_',' '},\n {' ','_','|'},\n };\n char[][] six = {\n {' ','_',' '},\n {'|','_',' '},\n {'|','_','|'},\n };\n char[][] seven = {\n {' ','_',' '},\n {'|',' ','|'},\n {' ',' ','|'},\n };\n char[][] eighth = {\n {' ','_',' '},\n {'|','_','|'},\n {'|','_','|'},\n };\n char[][] nine = {\n {' ','_',' '},\n {'|','_','|'},\n {' ',' ','|'},\n };\n char[][] zero = {\n {' ','_',' '},\n {'|',' ','|'},\n {'|','_','|'},\n };\n\n double num = read.nextDouble();\n\n int k = 0;\n while(num>1 ) {\n num = num/10;\n k++;\n }\n char[][] canvas = new char[3][k*3];\n int[] dig = new int[k];\n for(int l= 0;l<k;l++){\n num = (num*10)-(((int)num)*10);\n dig[l] = (int)num;\n }\n\n\n //asignar para imprimir\n int w = 0;\n int o =0;\n //filas\n for(int n = 0;n<3;n++){\n w=0;\n o=0;\n //columnas\n while(w<k){\n //asignacion\n for(int j = 0;j<3;j++){\n if(dig[w] == 1) {\n canvas[n][o+j] = one[n][j];\n }\n else if(dig[w] == 2) {\n canvas[n][o+j] = two[n][j];\n }\n else if(dig[w] == 3) {\n canvas[n][o+j] = three[n][j];\n }\n else if(dig[w] == 4) {\n canvas[n][o+j] = four[n][j];\n }\n else if(dig[w] == 5) {\n canvas[n][o+j] = five[n][j];\n }\n else if(dig[w] == 6) {\n canvas[n][o+j] = six[n][j];\n }\n else if(dig[w] == 7) {\n canvas[n][o+j] = seven[n][j];\n }\n else if(dig[w] == 8) {\n canvas[n][o+j] = eighth[n][j];\n }\n else if(dig[w] == 9) {\n canvas[n][o+j] = nine[n][j];\n }\n else if(dig[w] == 0) {\n canvas[n][o+j] = zero[n][j];\n }\n }\n o+=3;\n w++;\n }\n }\n //print\n for(int u =0;u<3;u++)\n {\n for (int i = 0; i < k*3; i++) {\n System.out.print(canvas[u][i]);\n }\n System.out.println();\n }\n }", "private boolean combinacaoHorizontal(){\n\t\t\tfor(int i=0; i<3;i++){\n\t\t\t\tint linha=botoes[i][0].getTipo();\n\t\t\t\tint contagem=1;\n\t\t\t\tfor(int j=1;j<3;j++){\n\t\t\t\t\tint modelo=botoes[i][j].getTipo(); //Pega qual tipo -se X ou O- foi acionado e armazena\n\t\t\t\t\tif(modelo==BotaoJogo.VAZIO){\n\t\t\t\t\t\tcontinue; //Se for vazio, ja vai pra proxima verificacao\n\t\t\t\t\t}\n\t\t\t\t\tif(modelo==linha){ \n\t\t\t\t\t\tcontagem++; //Vai computando os botoes acionados nas linhas\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(contagem==3){ //Se computou que chegou a 3, houve combinacao na horizontal\n\t\t\t\t\tif(linha==1){\n\t\t\t\t\t\tSystem.out.println(\"\\n X EH O GANHADOR!\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"\\n O EH O GANHADOR!\");\n\t\t\t\t\t}\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public void draw(){\n for(int i = 1; i <= height; i++){\n for(int s = 1; s <= i; s++)\n System.out.print(\"*\");\n System.out.println();\n }\n }", "public void printIsoceles() {\n int n = rows;\n //the number of stars on the bottom row is just less than twice the number of rows\n //until you reach the number of stars needed for the bottom row increment each row by two stars starting with the first star (1, 3, 5, 7)\n for (int c = 1; c < n*2; c += 2 ) {\n //add the number of spaces based on what row you are. First row's number of spaces is half of the last row (which is n) minus one to account for center star. Rate of number of spaces decreasing is half that of the row increment. This number decreases as the row number increases.\n for (int d = 0; d < ((n-1)-c/2); d++){\n System.out.print(\" \");\n }\n //add the number of star for each iteration increasing the stars\n for (int k = 0; k < c ; k++){\n System.out.print(\"*\");\n }\n System.out.println();\n }\n }", "public static void main(String[] args) {\n int twoD[][] = new int [4][];\r\n twoD[0] = new int[1];\r\n twoD[1] = new int[2];\r\n twoD[2] = new int[3];\r\n twoD[3] = new int[4];\r\n System.out.println(\"2차원 배열에서 형의길이는\" + twoD.length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[0].length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[1].length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[2].length);\r\n System.out.println(\"첫 번쨰 형의 요소 수는\" + twoD[3].length);\r\n \r\n int i,j,k = 0;\r\n for( i=0; i < twoD.length; i++ )\r\n \tfor(j=0; j< twoD[0].length; j ++)\r\n \t{\r\n \t\ttwoD[i][j] = k;\r\n \t\tk++;\r\n \t\t}\r\n for(i=0; i < twoD.length; i++ )\r\n {\r\n \tfor(j=0; j < twoD[i].length; j++)\r\n \t\tSystem.out.println(twoD[i][j] + \" \");\r\n \tSystem.out.println();\r\n }\r\n\t}", "public void tetraederzeichnen(double ax,double ay,double bx,double by,double cx,double cy,double dx,double dy){\n double[][] arr_koordinaten_2d ={{ax,ay},{bx,by},{cx,cy},{dx,dy}};\n /**\n * Aufruf der Methode gestricheltodernicht\n *\n * Überprüft, welche Strecken von Punkt D sichtbar sind oder nicht.\n */\n\n boolean[] strichelnodernicht = cls_berechnen.gestricheltodernicht(arr_koordinaten_2d);\n\n /**Skaliert die Koordinaten zum Pixelformat mit Koordinatenursprung\n * ca in der Mitte der Zeichenfläche*/\n int sw=9; //skalierungswert\n ax= (sw+ax)*50;\n ay=(sw-ay)*50;\n bx= (sw+bx)*50;\n by=(sw-by)*50;\n cx= (sw+cx)*50;\n cy=(sw-cy)*50;\n dx= (sw+dx)*50;\n dy=(sw-dy)*50;\n\n /**\n * Erstellt Linienobjekte für die Kanten des Tetraeder Objekts...\n */\n Line line1 = new Line();\n Line line2 = new Line();\n Line line3 = new Line();\n Line line4 = new Line();\n Line line5 = new Line();\n Line line6 = new Line();\n\n /**\n * ... weißt ihnen die Koordinaten zu...\n */\n line1.setStartX(ax);\n line1.setStartY(ay);\n line1.setEndX(bx);\n line1.setEndY(by);\n\n line2.setStartX(ax);\n line2.setStartY(ay);\n line2.setEndX(cx);\n line2.setEndY(cy);\n\n line3.setStartX(bx);\n line3.setStartY(by);\n line3.setEndX(cx);\n line3.setEndY(cy);\n \n line4.setStartX(dx);\n line4.setStartY(dy);\n line4.setEndX(ax);\n line4.setEndY(ay);\n\n line5.setStartX(dx);\n line5.setStartY(dy);\n line5.setEndX(bx);\n line5.setEndY(by);\n\n line6.setStartX(dx);\n line6.setStartY(dy);\n line6.setEndX(cx);\n line6.setEndY(cy);\n \n if(!strichelnodernicht[0]){\n line4.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[1]){\n line5.getStrokeDashArray().addAll(5d,5d);}\n\n if(!strichelnodernicht[2]){\n line6.getStrokeDashArray().addAll(5d,5d);}\n\n /**\n * ... und fügt die Linien Objekte der Zeichenfläche hinzu\n */\n canvaspane.getChildren().add(line1);\n canvaspane.getChildren().add(line2);\n canvaspane.getChildren().add(line3);\n canvaspane.getChildren().add(line4);\n canvaspane.getChildren().add(line5);\n canvaspane.getChildren().add(line6);\n\n //zeichnet den Koordinatenursprung neu\n canvaspane.getChildren().add(l1);\n canvaspane.getChildren().add(l2);\n }", "public static void main(String[] args) {\n int[][] matrix = {{1,2}, {3,4}};\n // int[][] matrix = {{1,2}, {3,4}};\n// printMatrixDiagonal (matrix, matrix.length);\n int[] result = findDiagonalOrder (matrix);\n for ( int i:result ){\n System.out.println (i);\n }\n\n }", "@Override\n\tprotected void draw(Graphics2D g) {\n\t\tint medidaLado = GenericGame.getMedidaLado();\n\t\t\n\t\tfor (int i = 0; i <Juego.FILAS; i++) {\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawLine(0, medidaLado*i,GenericGame.Width,medidaLado*i);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawString(\"\"+i, 5, 30 + medidaLado*i);\n\t\t}\n\t\t\n\t\tfor (int j = 0; j < Juego.COLUMNAS; j++) {\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawLine(medidaLado*j,0, medidaLado*j,GenericGame.Height);\n\t\t\tg.setColor(Color.BLACK);\n\t\t\tg.drawString(\"\"+j, medidaLado*j, 30);\n\t\t}\n\t\t///\n\t\t//System.out.println(\"MATRIZ TABLERO \"+matrizTablero.length+\"_\" +matrizTablero[0].length);\n\t\t///game compoente\n\t\tint i = 0;\n\t\tfor (; i < matrizTablero.length; i++) \n\t\t{\n\t\t\n\t\t\tfor (int j = 0; j < matrizTablero[0].length; j++) \n\t\t\t{\n\t\t\t\t//System.out.print(\"[i\"+i+\",j\"+j);\n\t\t\t\t//System.out.print(\"- ip\"+(i*medidaLado)+\", jp\"+(j*medidaLado)+\"]\");\n\t\t\t\tif (matrizTablero[i][j] != 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tg.setColor(new Color( matrizTablero[i][j]));\t\t\t\t\t\n\t\t\t\t\tg.fillRect(j*medidaLado, i*medidaLado, medidaLado, medidaLado);\n\t\t\t\t\t\n\t\t\t\t\tg.setColor(Color.black);\n\t\t\t\t\tg.drawRect(j*medidaLado, i*medidaLado, medidaLado, medidaLado);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t//\tSystem.out.println();\n\t\t}\n\t\t///game compoente\n\t\t//System.out.println(\"I\"+i);\n\t\t\n\t}", "public void printMatriz(){\n for(int i = 0; i < 9; i++){\n for (int j = 0; j < 9; j++){\n if(matriz[i][j] != 0){\n //trata os espacamntos\n if((j+1)%3 == 0)\n System.out.printf(matriz[i][j] + \" \");\n else\n System.out.printf(matriz[i][j] + \" \");\n }else{\n if((j+1)%3 == 0)\n System.out.printf(\" \");\n else\n System.out.printf(\" \");\n }\n }\n if((i+1)%3 == 0){\n System.out.println(\"\\n\");\n }\n else\n System.out.println();\n\n }\n }", "public static void main(String[] args) {\n\t\tint a[][]=new int [5][5];\r\n\t\tfor(int i=0;i<a.length; i++)\r\n\t\t{\r\n\t\t\tfor (int j=0;j<a[i].length;j++)\r\n\t\t\t{\r\n\t\t\t\tif(i==0 ||j==0||i==4||j==4)\r\n\t\t\t\t{\r\n\t\t\t\t\ta[i][j]=1;\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tSystem.out.print(a[i][j]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public void createBoard() {\n for (int i = 0; i < rows; i++) {\n for (int j = 0; j <colls; j++) {\n if(i==0 || j == 0 || i == rows-1|| j == colls-1){\n board[i][j] = '*';\n } else {\n board[i][j] = ' ';\n }\n }\n }\n }", "public int[][] MatrisKuralaUygun(int[][] girdi) {\n\t\tint Kontrol = 0; // cali hucreler kontrol etmek icin\r\n\t\tint[][] output = new int[girdi.length][girdi[0].length]; // [row][colum]\r\n\t\tfor (int i = 0; i < girdi.length; i++) {\r\n\t\t\tfor (int j = 0; j < girdi[0].length; j++) {\r\n\t\t\t\tfor (int k = 1; k < output[0].length - 1; k++) {// bu dongu tek seferlik calisir bir eklemek veya\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// cikarmak icin\r\n\t\t\t\t\tif (j < 3 && i == 0) {// burda 0'inci satir icin // [0][0] saginda ve altiginda bakildi\r\n\t\t\t\t\t\tif (j != 2) {// hepsi Kontrola toplaniyor\r\n\t\t\t\t\t\t\tKontrol += girdi[i][j + k];\r\n\t\t\t\t\t\t} // [0][1] saginda ve solunda ve altinda hucrelere bakildi\r\n\t\t\t\t\t\tKontrol += girdi[i + k][j];//\r\n\t\t\t\t\t\tif (j != 0) { // [0][2] sol ve alt hucrelere\r\n\t\t\t\t\t\t\tKontrol += girdi[i][j - k];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (i == 1 && j == 0) {// birinci satir sifirinci dikey\r\n\t\t\t\t\t\tKontrol += girdi[i][j + k];\r\n\t\t\t\t\t\tKontrol += girdi[i + k][j]; // [1][0] ust ve alt ve sag hucrelere bakildi\r\n\t\t\t\t\t\tKontrol += girdi[i - k][j];\r\n\t\t\t\t\t} else if ((i == 1 || i == 2) && (j == 2 || j == 1)) {\r\n\t\t\t\t\t\tKontrol += girdi[i][j - k];\r\n\t\t\t\t\t\tKontrol += girdi[i + k][j];// [1][1] hem ust ve alt ve sag ve sol hucrelere bakildi\r\n\t\t\t\t\t\tif (j != 2) {\r\n\t\t\t\t\t\t\tKontrol += girdi[i][j + k];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tKontrol += girdi[i - k][j];\r\n\r\n\t\t\t\t\t} else if (i == 3 && (j < 3)) {// 2'inci satir icin\r\n\t\t\t\t\t\tif (j != 0) {\r\n\t\t\t\t\t\t\tKontrol += girdi[i][j - k];\r\n\t\t\t\t\t\t} // [2][1] hem ust ve sag ve sol hucrelere bakildi\r\n\t\t\t\t\t\tKontrol += girdi[i - k][j];\r\n\r\n\t\t\t\t\t\tif (j != 2) {\r\n\t\t\t\t\t\t\tKontrol += girdi[i][j + k];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (girdi[i][j] == 1 && Kontrol < 2) { // canli ise ve kontrol 2 den az ise\r\n\t\t\t\t\toutput[i][j] = 0;// sifir yazdir\r\n\t\t\t\t\tKontrol = 0;// Kontrol sifirlamamiz cok onemli yoksa kontrol hem artar\r\n\t\t\t\t} else if (girdi[i][j] == 1 && (Kontrol == 2 || Kontrol == 3)) { // canli ise ve kontrol 2 ve 3 ise\r\n\t\t\t\t\toutput[i][j] = 1;\r\n\t\t\t\t\tKontrol = 0;// burda onemli\r\n\t\t\t\t} else if (girdi[i][j] == 1 && Kontrol > 3) { // canli ise ve kontrol 3 den cok ise\r\n\t\t\t\t\toutput[i][j] = 0;\r\n\t\t\t\t\tKontrol = 0;\r\n\t\t\t\t} else if (girdi[i][j] == 0 && Kontrol == 3) { // canli ise ve kontrol 3 ise\r\n\t\t\t\t\toutput[i][j] = 1;\r\n\t\t\t\t\tKontrol = 0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\toutput[i][j] = girdi[i][j];// eger yukardaki kosulari girilmedi ise aynisi yazdir\r\n\r\n\t\t\t\t\tKontrol = 0;// ve yine Kontrol sifir\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn output;// dizi donduruyor\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\tint[][] arr=new int[5][5];\r\n\t\t\tint k=1;\r\n\t\t\tfor(int i=0; i<=2;i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=2-i;j<=i+2;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tarr[i][j]=k++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=3;i<=4;i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=i-2;j<=6-i;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tarr[i][j]=k++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//출력\r\n\t\t\tfor(int i=0;i<5;i++)\r\n\t\t\t{\r\n\t\t\t\tfor(int j=0;j<5;j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(arr[i][j]==0)\r\n\t\t\t\t\t\tSystem.out.print(\"\\t\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.print(arr[i][j]+\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t\t//줄간격\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t}", "public void print_board(){\n\t\tfor(int i = 0; i < size*size; i++){\n\t\t\tif(i%this.size == 0) System.out.println(); //just for divider\n\t\t\tfor(int j = 0; j < size*size; j++){\n\t\t\t\tif(j%this.size == 0) System.out.print(\" \"); //just for divider\n\t\t\t\tSystem.out.print(board[i][j]+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Enter n :\");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();\n\t\t\n\t\tint mat[][] = new int[num][num];\n\t\tint mirr[][] = new int[num][num];\n\t\t\n\t\tint sum =0;\n\t\t\n\t\tfor(int i =0; i<num;i++)\n\t\t{\n\t\t\tfor(int j=0;j<num;j++)\n\t\t\t{\n\t\t\t System.out.println(\"Enter \"+i+\"\"+j+\" matrix\");\n\t\t\t int data = scanner.nextInt();\n\t\t\t\tmat[i][j]=data;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t System.out.println(\"Original Matrix is :\");\n\t \n\t \n\t for(int i =0; i<num;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<num;j++)\n\t\t\t\t{\n\t\t\t\t \n\t System.out.print(mat[i][j]+\" \");\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t \n\t\t\n\t\t\n\t\tfor(int i =0; i<num;i++)\n\t\t{\n\t\t\tint img = 0;\n\t\t\tfor(int j=num-1;j>=0;j--)\n\t\t\t{\n\t\t\t \n\n int temp = mat[i][j];\n mirr[i][img]=temp;\n img++;\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t \n\t\t\n\t\t\n\t\t\n System.out.println(\"\\n2Mirror Matrix is :\");\n \n \n for(int i =0; i<num;i++)\n\t\t{\n\t\t\tfor(int j=0;j<num;j++)\n\t\t\t{\n\t\t\t \n System.out.print(mirr[i][j]+\" \");\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n \n \n \n\t}", "public static boolean checkDiagonal(){\nif(gamebd[0][0]==gamebd[1][1]&&gamebd[1][1]==gamebd[2][2]&&gamebd[0][0]>0)\r\n{\r\n\tif(gamebd[0][0]==player1)\r\n\t\tSystem.out.println(\"Player 1 won\");\r\n\telse\r\n\t\tSystem.out.println(\"Player 2 won\");\r\nreturn true;\t\t\r\n}\r\nif(gamebd[0][2]==gamebd[1][1]&&gamebd[1][1]==gamebd[2][0]&&gamebd[0][2]>0)\r\n{\r\n\tif(gamebd[0][2]==player1)\r\n\t\tSystem.out.println(\"Player 1 won\");\r\n\telse\r\n\t\tSystem.out.println(\"Player 2 won\");\r\n\treturn true;\t\r\n}\r\n\treturn false;\r\n}", "@Override\n\tpublic void onDrawFrame(GL10 gl) {\n\n\t\tgl.glClear(GL10.GL_COLOR_BUFFER_BIT);\n\t\tgl.glLineWidth(3);\n\t\t// gl.glPointSize(10);\n\t\tgl.glEnable(GL10.GL_POINT_SMOOTH);\n\t\tray.dibuja(gl);\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tif (m[i][j] != 0) {\n\t\t\t\t\tif (m[i][j]==1) {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcirculo.dibuja(gl,8);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(i==0 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,0);\n\t\t\t\t\t\tif(i==0 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,1);\n\t\t\t\t\t\tif(i==0 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,2);\n\t\t\t\t\t\tif(i==1 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,3);\n\t\t\t\t\t\tif(i==1 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,4);\n\t\t\t\t\t\tif(i==1 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,5);\n\t\t\t\t\t\tif(i==2 && j==0)\n\t\t\t\t\t\t\tcruz.dibuja(gl,6);\n\t\t\t\t\t\tif(i==2 && j==1)\n\t\t\t\t\t\t\tcruz.dibuja(gl,7);\n\t\t\t\t\t\tif(i==2 && j==2)\n\t\t\t\t\t\t\tcruz.dibuja(gl,8);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t/*if(sw){\n\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcruz.dibuja(gl);\n\t\t\t\t\t}*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t}", "public static void main(String[] args) {\n\t\tint row = 8;\r\n\t\tint [][]arr = new int[row][row];\t//8行8列\r\n\t\t\r\n\t\tfor(int i=0;i<row;i++){\t//外循环构造第一维数组\r\n\t\t\tfor(int j=0;j<=i;j++){\t//内循环构造第一维数组指向的第二维数组,每一行的列数和行数相等\r\n\t\t\t\t//第一列(j=0)和对角线列(j=i)的值都为1\r\n\t\t\t\tif(j==0 || j==i){\r\n\t\t\t\t\tarr[i][j] = 1;\r\n\t\t\t\t}\r\n\t\t\t\t//非第一列和对角线列的数组元素值,是其正上方的数(arr[i-1][j])和其左上角的数(arr[i-1][j-1])之和\r\n\t\t\t\telse{\r\n\t\t\t\t\tarr[i][j] = arr[i-1][j]+arr[i-1][j-1];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//打印输出\r\n\t\tfor(int i=0;i<row;i++){\r\n\t\t\tfor(int j=0;j<=i;j++){\r\n\t\t\t\tSystem.out.print(arr[i][j]+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}", "public static void updateVisibility(int k, int r, char[][] matrix) {\n\t int size= matrix[0].length ;\n\t \n\n\t \n\n\t\tfor (int i =k ;i>=0 ;i--) {//filling what's above the camera \n\t\t\tif (matrix[i][r]!='v' && matrix[i][r]!='c') {\n\t\t\t\tif (matrix[i][r]=='o')\n\t\t\t\t\tbreak;\n\t\t\tmatrix[i][r]='v';\n\t\t\t\n\n\t\t\t} \n\t\t}\n\t\t\t\n\n\t\t\tfor (int j =k ;j<size ;j++) {//filling what's under the camera \n\t\t\t\tif (matrix[j][r]!='v' && matrix[j][r]!='c') {\n\t\t\t\t\tif (matrix[j][r]=='o')\n\t\t\t\t\t\tbreak;\n\t\t\t\tmatrix[j][r]='v';\n\t\t\t\t\n\n\t\t\t} \t\n\t\t}\n\t\t\t\n\n\t\t\tfor (int x =r ;x>=0 ;x--) {//filling what's on the camera's left\n\t\t\t\tif (matrix[k][x]!='v' && matrix[k][x]!='c') {\n\t\t\t\t\tif (matrix[k][x]=='o')\n\t\t\t\t\t\tbreak;\n\t\t\t\tmatrix[k][x]='v';\n\t\t\t\t\n\n\t\t\t} \t\n\t\t}\n\n\t\t\tfor (int y =r ;y<size ;y++) {//filling what's on the camera's right\n\t\t\t\tif (matrix[k][y]!='v' && matrix[k][y]!='c') {\n\t\t\t\t\tif (matrix[k][y]=='o')\n\t\t\t\t\t\tbreak;\n\t\t\t\tmatrix[k][y]='v';\n\t\t\t\n\n\t\t\t} \t\n\t\t}\n\t\t\t\n\n\t\t\tint times =1 ; \n\t\t\tint cols = r;\n\t\t\tint rows=k;\n\t\t\n\n\t\t\twhile (rows-times>=0) {//filling what's on the camera's uper right diagonal\n\t\t\t\n\n\t\t\t\t\tif (cols+times>=size ||rows-times <0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (matrix[rows-times][cols+times] =='o')\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (matrix[rows-times][cols+times]=='-')\n\t\t\t\t\tmatrix[rows-times][cols+times]='v';\n\t\t\t\t\ttimes++;\n\t\t\t\t}\n\t\t\n\n\t\t\t\n\n\t\t\t\n\n\t\t\t times =1 ; \n\t\t\t cols = r;\n\t\t\t rows=k;\n\t\t\twhile (rows-times>=0) {\n\t\t\t//filling what's on the camera's uper left diagonal it should be one loop \n\t\t\t\tif (rows-times<0 ||cols-times<0 ) \n\t\t\t\t\tbreak;\n\t\t\t\tif (matrix[rows-times][cols-times] =='o')\n\t\t\t\t\tbreak; \n\t\t\t\tif (matrix[rows-times][cols-times]=='-')\n\t\t\t\t\tmatrix[rows-times][cols-times]='v';\n\t\t\t\ttimes++;\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\n\t\t\ttimes =1 ; \n\t\t\tcols = r;\n\t\t\trows = k ; \n\t\t\twhile (rows+times<size) {//filling what's on the camera's lower left diagonal\n\t\t\n\n\t\t\t\t\tif (cols-times<0||rows+times >=size)//////////check the size thing\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (matrix[rows+times][cols-times] =='o')\n\t\t\t\t\t\tbreak; \n\t\t\t\t\tif (matrix[rows+times][cols-times]=='-')\n\t\t\t\t\tmatrix[rows+times][cols-times]='v';\n\t\t\t\t\ttimes++;\n\t\t\t}\n\t\t\t\n\n\t\t\ttimes =1 ; \n\t\t\tcols = r;\n\t\t\trows = k ; \n\t\t\twhile (rows+times<size) {//filling what's on the camera's lower Right diagonal\n\t\t\n\n\t\t\t\t\tif (cols+times>=size||rows+times >=size)//////////check the size thing\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (matrix[rows+times][cols+times] =='o')\n\t\t\t\t\t\tbreak; \n\t\t\t\t\tif (matrix[rows+times][cols+times]=='-')\n\t\t\t\t\tmatrix[rows+times][cols+times]='v';\n\t\t\t\t\ttimes++;\n\t\t\t}\n\t\t\t\n\t }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the rows\");\n\t\tint rowsnumber = sc.nextInt();\n\t\tint m = 1;\n\n\t\t// pyramid\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = rowsnumber; k >= i; k--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(m++ + \" \");\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\n\t\t// reverse pyramid\n\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = 0; k <= i; k++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j < rowsnumber - i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// right angle\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t// left side right angle\n\t\tfor (int i = 0; i < rowsnumber; i++) {\n\t\t\tfor (int k = 2 * (rowsnumber - i); k >= 0; k--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\n\t}", "public boolean diag1(){\n\tboolean trouve=false;\n\tint i=0;\n\tObject tmp='@';\n\twhile(i<5 && !trouve){\n\t\tif(gc[i][i]==tmp)\n\t\t\ttrouve=true;\n\t\telse\n\t\t\ti++;\n\t}\n\treturn trouve;\n}", "public Regras()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1100, 457, 1); \n prepare();\n if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal\n som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)}\n else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo\n som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som)\n imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute)\n MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras\n }", "private void moveDiagonalMhos() {\n\n\t\t//Assign playerX and playerY to the X and Y of the player\n\t\tint playerX = getNewPlayerLocation()[0];\n\t\tint playerY = getNewPlayerLocation()[1];\n\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\n\t\t\t//set the default X and Y offsets to 0, and the move to NO_MOVEMENT\n\t\t\tint xOffset = 0;\n\t\t\tint yOffset = 0;\n\t\t\tchar move;\n\n\t\t\t//Check if the playerX is greater to mhoX (aligned on x-axis) (to find direction of diagonal move)\n\t\t\tif(playerX > mhoX) {\n\n\t\t\t\t//check if playerY is greater to mhoY (to find direction of diagonal move)\n\t\t\t\tif(playerY > mhoY) {\n\t\t\t\t\txOffset = 1;\n\t\t\t\t\tyOffset = 1;\n\t\t\t\t\tmove = Legend.DOWN_RIGHT;\n\t\t\t\t} else {\n\t\t\t\t\txOffset = 1;\n\t\t\t\t\tyOffset = -1;\n\t\t\t\t\tmove = Legend.UP_RIGHT;\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t//check if playerY is greater to mhoY (to find direction of diagonal move)\n\t\t\t\tif(playerY > mhoY) {\n\t\t\t\t\txOffset = -1;\n\t\t\t\t\tyOffset = 1;\n\t\t\t\t\tmove = Legend.DOWN_LEFT;\n\t\t\t\t} else {\n\t\t\t\t\txOffset = -1;\n\t\t\t\t\tyOffset = -1;\n\t\t\t\t\tmove = Legend.UP_LEFT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Only move the mho if its location is an instance of BlankSpace or Player\n\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof BlankSpace || newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\n\t\t\t\t//Assign the previous location as a BlankSpace\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\n\t\t\t\t//If the new location is a player, shrink the player and call gameOver()\n\t\t\t\tif(newMap[mhoX+xOffset][mhoY+yOffset] instanceof Player) {\n\t\t\t\t\tmoveList[mhoX+xOffset][mhoY+yOffset] = Legend.SHRINK;\n\t\t\t\t\tgameOver();\n\t\t\t\t}\n\n\t\t\t\t//Assign the new location as a mho\n\t\t\t\tnewMap[mhoX+xOffset][mhoY+yOffset] = new Mho(mhoX+xOffset, mhoY+yOffset, board);\n\n\t\t\t\t//Assign move to the mho's old location\n\t\t\t\tmoveList[mhoX][mhoY] = move;\n\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\n\t\t\t\t//Call moveDiagonalMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveDiagonalMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "private void aretes_aW(){\n\t\tthis.cube[4] = this.cube[16]; \n\t\tthis.cube[16] = this.cube[23];\n\t\tthis.cube[23] = this.cube[37];\n\t\tthis.cube[37] = this.cube[30];\n\t\tthis.cube[30] = this.cube[4];\n\t}", "public Layout() {\n\n //nao precisa colocar externo, apenas referencia com a linha 0\n for (int i = 0; i < 4; i++) {\n matrix[0][i] = Estados.EXTERNO;\n }\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = Estados.ROOM;\n }\n\n matrix[2][1] = Estados.ROOM_EMPTY;\n matrix[2][2] = Estados.ROOM_EMPTY2;\n\n matrix[2][0] = Estados.ACESSO_EXTERNO;\n matrix[2][3] = Estados.ACESSO_INTERNO;\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = Estados.ROOM;\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[4][i] = Estados.EXTERNO2;\n }\n\n }", "@Test\n\tpublic void diagRLWin_test()\n\t{\n\t\tb.set(0,2, 'x');\n\t\tb.set(1,0, 'o');\n\t\tb.set(1,1, 'x');\n\t\tb.set(2,1, 'o');\n\t\tb.set(2,0, 'x');\n\t\tassertTrue(b.diagRLWin());\t\n\t}", "public static void main(String[] args) {\n\n\t\t for(int i =1; i<=5;i++){\n\n\t\t /*for (int j = 1 ; j<=5 ; j++){\n\n\t\t System.out.print(j+\" \");\n\n\t\t }*/\n\n\t\t for (int l =5 ;l >i ; l--){\n\n\t\t System.out.print(\" \");\n\n\t\t }\n\n\t\t for (int k =1; k<=i;k++){\n\n\t\t System.out.print(i);\n\n\t\t System.out.print(\" \");\n\n\t\t }\n\n\t\t System.out.println(\" layer no :\"+i);\n\n\t\t }\n\n\t\t for(int i =5; i>=1;i--){\n\n\t\t for (int j = 1 ; j<=5 ; j++){\n\n\t\t System.out.print(j+\" \");\n\n\t\t }\n\n\t\t for (int l =i ;l <5 ; l++){\n\n\t\t System.out.print(\" \");\n\n\t\t }\n\n\t\t for (int k =1; k<=i;k++){\n\n\t\t System.out.print(\"*\");\n\n\t\t System.out.print(\" \");\n\n\t\t }\n \n\t\t System.out.println(\" layer no :\"+i); \n\n\t\t }\n\n\t}", "public static void matrixDis()\n\t{\n\t\t\n\t\tclade = clad[k];\n\t\t//System.err.println(\"\\n\\n\" + clade.cladeName);\n\n\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t{\n\t\t\tclade.Dc[c]=0;\n\t\t\tclade.Dn[c]=0;\n\t\t\t//clade.varDc[c]=0;\n\t\t\t//clade.varDn[c]=0;\n\t\t\tsum1 = sum2 = sum3 = 0;\n\t\t\tsumc1 = sumc2 = sumc3 = 0;\n\n\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\tsum2 += clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2 ;\n\t\t\t\tsumc2 += (clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2) + \n\t\t\t (clade.obsMatrix[c][i] * (clade.columnTotal[i] - clade.obsMatrix[c][i]));\t\n\t\t\t\n\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t{\t\n\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\n\t\t\t\t\tif (j != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum1 += (double) clade.obsMatrix[c][i] * clade.obsMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\tsum3 += clade.obsMatrix[c][i] * clade.obsMatrix[c][j];\t\t\t\n\t\t\t\t\t\tsumc1 += (double) clade.obsMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\tsumc3 += clade.obsMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.obsMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\n\t\t\t\n\t\t\tif (sum3 == 0.0)\n\t\t\t\tclade.Dc[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\n\t\n\t\t\tif (sumc3 == 0.0)\n\t\t\t\tclade.Dn[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t\t\t// \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \t\n\t\t}\t\t\n\n\t}", "public void creation(){\n\t for(int i=0; i<N;i++) {\r\n\t\t for(int j=0; j<N;j++) {\r\n\t\t\t tab[i][j]=0;\r\n\t\t }\r\n\t }\r\n\t resDiagonale(); \r\n \r\n\t //On remplit le reste \r\n\t conclusionRes(0, nCarre); \r\n \t\t\r\n\t \r\n\t isDone=true;\r\n }" ]
[ "0.6559045", "0.6428849", "0.6428136", "0.64119303", "0.6283477", "0.6227664", "0.6174776", "0.6158128", "0.606643", "0.6023626", "0.6018881", "0.59729224", "0.596554", "0.58902365", "0.58656466", "0.58217335", "0.5814681", "0.58009446", "0.5786907", "0.57576215", "0.5748543", "0.5720968", "0.5696291", "0.56846964", "0.5681763", "0.56749564", "0.5666085", "0.56624335", "0.56541985", "0.56477463", "0.5644731", "0.56169474", "0.56157166", "0.56149113", "0.5611283", "0.56051785", "0.56024855", "0.5568609", "0.5566476", "0.5552157", "0.554989", "0.5536784", "0.55279166", "0.55228835", "0.55190164", "0.55169016", "0.550511", "0.5501133", "0.5491508", "0.5487851", "0.5472142", "0.5467045", "0.5464694", "0.5449709", "0.5443035", "0.54328096", "0.543273", "0.5429739", "0.54198664", "0.5416909", "0.5393607", "0.538852", "0.5383006", "0.5377202", "0.53722847", "0.5372115", "0.53707206", "0.5370457", "0.5366753", "0.5364828", "0.5352745", "0.53488594", "0.53444946", "0.53435236", "0.53412974", "0.53398174", "0.5336738", "0.53361106", "0.5331226", "0.53296196", "0.5329202", "0.5323504", "0.53197896", "0.5305887", "0.53056335", "0.5295276", "0.5293702", "0.5286217", "0.52815396", "0.5275252", "0.5272069", "0.5269578", "0.52693486", "0.5267893", "0.526756", "0.5266951", "0.52663326", "0.5264593", "0.5263518", "0.5249658" ]
0.57366884
21
Mencari cell di sekitar currentWorm yang kosong
private Cell searchEmptySurrounding(){ List <Cell> blocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y); for (Cell block : blocks){ if(!isCellOccupied(block)) return block; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }", "public void update(GameModel model) {\n assert model.getRowCount() == this.rowCount && model.getColumnCount() == this.columnCount;\n //\n for (int row = 0; row < this.rowCount; row++){\n for (int column = 0; column < this.columnCount; column++){\n CellValue value = model.getCellValue(row, column);\n if (value == CellValue.WALL) {\n this.cellViews[row][column].setImage(this.wallImage);\n }\n else if (value == CellValue.PISTOLA) {\n this.cellViews[row][column].setImage(this.pistolaImage);\n }\n else if (value == CellValue.ALIENEGG) {\n this.cellViews[row][column].setImage(this.alienEggImage);\n }\n else {\n this.cellViews[row][column].setImage(null);\n }\n //verifique en qué dirección va astronauta y muestre la imagen correspondiente\n if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && (GameModel.getLastDirection() == GameModel.Direction.RIGHT || GameModel.getLastDirection() == GameModel.Direction.NONE)) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.LEFT) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.UP) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.DOWN) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n //hacer que los OVNIS \"parpadeen\" hacia el final de ovniEatingMode (mostrar imágenes OVNI regulares en actualizaciones alternas del contador)\n if (GameModel.isOvniEatingMode() && (Controller.getovniEatingModeCounter() == 6 ||Controller.getovniEatingModeCounter() == 4 || Controller.getovniEatingModeCounter() == 2)) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n //mostrar OVNIS azules en ovniEatingMode\n else if (GameModel.isOvniEatingMode()) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n }\n //display imágenes OVNIS regulares de lo contrario\n else {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n }\n }\n }", "private void win() {\r\n Player winner = board.win();\r\n if (winner == null)\r\n return;\r\n\r\n int winner_number;\r\n Label winner_info;\r\n Label loser_info;\r\n if (winner.getId() == 'U') {\r\n winner_info = player1info;\r\n loser_info = player2info;\r\n winner_number = 1;\r\n }\r\n else {\r\n winner_info = player2info;\r\n loser_info = player1info;\r\n winner_number = 2;\r\n }\r\n\r\n winner_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n winner_info.setText(\"You Won!!\");\r\n loser_info.setFont(new Font(\"Segoe UI Semibold\", 20));\r\n loser_info.setText(\"You Lost :)\");\r\n\r\n for (int i = 0; i < 17; ++i)\r\n for (int j = 0; j < 17; j++) {\r\n String id = \"#cell\" + ((i < 10) ? \"0\" + i : i) + ((j < 10) ? \"0\" + j : j);\r\n AnchorPane cell = (AnchorPane) (play.getScene().lookup(id));\r\n // remove functionality\r\n cell.setOnMouseClicked(null);\r\n cell.setOnMouseEntered(null);\r\n cell.setOnMouseExited(null);\r\n if (!cup_is_on) {\r\n if (i == 6) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"try\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: mediumaquamarine\");\r\n Label label = new Label(\"again?\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n else if(i == 8) {\r\n if (j == 6) {\r\n cell.setStyle(\"-fx-background-color: limegreen\");\r\n Label label = new Label(\"YES\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try {\r\n gotoNewGame(new Player(board.getPlayer1().getName(), 'U', 10),\r\n new Player(board.getPlayer2().getName(), 'D', 10));\r\n } catch (IOException ioException) { ioException.printStackTrace(); }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n else if (j == 8) {\r\n cell.setStyle(\"-fx-background-color: red\");\r\n Label label = new Label(\"NO\");\r\n label.setTextFill(Color.BLACK);\r\n label.setFont(new Font(\"Arial Rounded MT Bold\", 12));\r\n label.setAlignment(Pos.CENTER);\r\n label.setPrefSize(40, 40);\r\n label.setOnMouseClicked(event -> {\r\n try { gotoGameModes(); } catch (IOException ioException) {\r\n ioException.printStackTrace();\r\n }\r\n });\r\n cell.getChildren().add(label);\r\n if (bead1.getLayoutX() == cell.getLayoutX() && bead1.getLayoutY() == cell.getLayoutY())\r\n bead1.setVisible(false);\r\n if (bead2.getLayoutX() == cell.getLayoutX() && bead2.getLayoutY() == cell.getLayoutY())\r\n bead2.setVisible(false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (cup_is_on)\r\n cupOptimizer(winner_number);\r\n }", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "private Worm getFirstWormInRangeSpecial() {\n \n int count = 0;\n Worm targetWorm = null;\n\n //Jika worm saat ini adalah Agent (bisa menggunakan Banana Bomb)\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[1].bananaBombs.count;\n int range = gameState.myPlayer.worms[1].bananaBombs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.health <= 0) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n\n //Jika worm saat ini adalah Technician (bisa menggunakan Snowball)\n if (gameState.myPlayer.worms[2].id == gameState.currentWormId) {\n count = gameState.myPlayer.worms[2].snowballs.count;\n int range = gameState.myPlayer.worms[2].snowballs.range;\n for (Worm enemyWorm : opponent.worms) {\n\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, enemyWorm.position.x, enemyWorm.position.y) > range) {\n continue;\n }\n if (enemyWorm.roundsUntilUnfrozen > 1) {\n continue;\n }\n //AUTO NYERANG WORM YANG PERTAMAKALI DITEMUKAN DI DALAM RANGE\n targetWorm = enemyWorm;\n break;\n }\n\n }\n \n return targetWorm;\n\n }", "public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }", "void drawCurrentToBoard () {\n board.clearTemp();\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }", "public void placeWormOnAgar()\n {\n for (int x = 0; x < Agar.GRID_SIZE.width; x++)\n {\n for (int y = 0; y < Agar.GRID_SIZE.height; y++)\n {\n agar.wormCells[x][y] = SectorDisplay.EMPTY_CELL_VALUE;\n }\n }\n agar.wormCells[headSegment.x][headSegment.y] = Agar.WORM_SEGMENT_VALUE;\n for (int i = 0; i < NUM_BODY_SEGMENTS; i++)\n {\n BodySegment segment = bodySegments[i];\n agar.wormCells[segment.x][segment.y] = Agar.WORM_SEGMENT_VALUE;\n }\n }", "private Cell getSnowballTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n\n for (int i = currentWorm.position.x - 5; i <= currentWorm.position.x + 5; i++) {\n for (int j = currentWorm.position.y - 5; j <= currentWorm.position.y + 5; j++) {\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getSurroundingCells(i, j);\n affectedCells.add(blocks[j][i]);\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.roundsUntilUnfrozen == 0 && enemyWorm.health > 0)\n wormInRange++;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }", "private void update() {\n // Set for each cell\n for (Cell cell : this.view.getGamePanel().getViewCellList()) {\n cell.setBackground(BKGD_DARK_GRAY);\n cell.setForeground(Color.WHITE);\n cell.setFont(new Font(\"Halvetica Neue\", Font.PLAIN, 36));\n cell.setBorder(new LineBorder(Color.BLACK, 0));\n cell.setHorizontalAlignment(JTextField.CENTER);\n cell.setCaretColor(new Color(32, 44, 53));\n cell.setDragEnabled(false);\n cell.setTransferHandler(null);\n\n // Add subgrid separators\n CellPosition pos = cell.getPosition();\n if (pos.getColumn() == 2 || pos.getColumn() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 2, new Color(146, 208, 80)));\n } else if (pos.getRow() == 2 || pos.getRow() == 5) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 0, new Color(146, 208, 80)));\n }\n if ((pos.getColumn() == 2 && pos.getRow() == 2) || (pos.getColumn() == 5 && pos.getRow() == 5)\n || (pos.getColumn() == 2 && pos.getRow() == 5) || (pos.getColumn() == 5 && pos.getRow() == 2)) {\n cell.setBorder(BorderFactory.createMatteBorder(0, 0, 2, 2, new Color(146, 208, 80)));\n }\n\n // Validate User's Cell Input + Mouse Listeners\n cell.removeKeyListener(cellKeyListener);\n cell.removeMouseListener(cellMouseListener);\n if (cell.isLocked()) {\n cell.setEditable(false);\n cell.setHighlighter(null);\n } else {\n cell.setBackground(BKGD_LIGHT_GRAY);\n cell.addMouseListener(cellMouseListener);\n cell.addKeyListener(cellKeyListener);\n }\n if (cell.isEmpty()) {\n cell.setText(\"\");\n } else {\n cell.setText(String.valueOf(cell.getUserValue()));\n }\n\n // Adds cell to the view's grid\n this.view.getGamePanel().getGrid().add(cell);\n }\n\n }", "public void updateDataCell();", "private void displayBoard() {\r\n\r\n for (int r = 0; r < 8; r++) {\r\n for (int c = 0; c < 8; c++) {\r\n if (model.pieceAt(r, c) == null)\r\n board[r][c].setIcon(null);\r\n else if (model.pieceAt(r, c).player() == Player.WHITE) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(wPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(wRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(wKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(wBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(wQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(wKing);\r\n } else if (model.pieceAt(r, c).player() == Player.BLACK) {\r\n if (model.pieceAt(r, c).type().equals(\"Pawn\"))\r\n board[r][c].setIcon(bPawn);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Rook\"))\r\n board[r][c].setIcon(bRook);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Knight\"))\r\n board[r][c].setIcon(bKnight);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Bishop\"))\r\n board[r][c].setIcon(bBishop);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"Queen\"))\r\n board[r][c].setIcon(bQueen);\r\n\r\n if (model.pieceAt(r, c).type().equals(\"King\"))\r\n board[r][c].setIcon(bKing);\r\n }\r\n repaint();\r\n }\r\n }\r\n if (model.inCheck(Player.WHITE))\r\n JOptionPane.showMessageDialog(null, \"White King in Check\");\r\n if (model.inCheck(Player.BLACK))\r\n JOptionPane.showMessageDialog(null, \"Black King in Check\");\r\n if (model.movingIntoCheck())\r\n JOptionPane.showMessageDialog(null, \"Cannot move into check\");\r\n if (model.isComplete())\r\n JOptionPane.showMessageDialog(null, \"Checkmate\");\r\n }", "public void actionPerformed(ActionEvent e) {\n setTitle(\"Читатели\");\n ResultSet rs = DBConnection.executeQuery(\"select * from readers\");\n model = new ResultSetTableModel(rs);\n model.setColumnNameLabel(\"Фамилия Имя Отчество\", 1);\n model.setColumnNameLabel(\"Паспорт\", 2);\n model.setColumnNameLabel(\"Дата рождения\", 3);\n model.setColumnNameLabel(\"Телефон\", 4);\n model.setColumnNameLabel(\"Образование\", 5);\n model.setColumnNameLabel(\"Учёная степень\", 6);\n model.setColumnNameLabel(\"Зал\", 7);\n jTable3.setModel(model);\n \n\n ResultSet rs2 = DBConnection.executeQuery(\"select id,name from rooms\");\n jTable3.getColumnModel().getColumn(7).setCellEditor(MyJComboCell.generate(rs2,\"id\",\"name\"));\n jTable3.getColumnModel().getColumn(7).setCellRenderer(new MyCellRenderer(rs2,\"id\",\"name\"));\n }", "public void openCell(Integer xOpen, Integer yOpen){\n \r\n if(isValidCell(xOpen,yOpen)){\r\n // System.out.println(\" openCell(). es celda Valida\");\r\n if(grid[xOpen][yOpen].isMine()){\r\n // System.out.println(\" openCell().Perdiste, habia una mina en g[\"+xOpen+\"][\"+yOpen+\"]\");\r\n //grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n grid[xOpen][yOpen].setNumber(9);\r\n this.gs = gameStatus.LOSE;\r\n }else{\r\n // System.out.println(\" openCell().No es mina, puede continuar\");\r\n if( grid[xOpen][yOpen].getStatus() == Status.CLOSE ){//si esta cerrado, contar las minas\r\n // System.out.println(\" openCell().Esta cerrada, puede abrirse\");\r\n \r\n int minas = getMines(xOpen,yOpen); //error\r\n this.grid[xOpen][yOpen].setNumber(minas);\r\n \r\n if(minas == 0){ //abre las celdas de alrededor\r\n // System.out.println(\" openCell().Tiene 0 minas alrededor, hay que explotar\");\r\n for(int i=xOpen-1; i<=xOpen+1; i++){\r\n for(int j=yOpen-1; j<=yOpen+1 ;j++){\r\n if( i== xOpen && j==yOpen){\r\n grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n revealedCells++;\r\n }else\r\n openCell(i,j);\r\n }\r\n }\r\n }else{\r\n // System.out.println(\" openCell().La celda tiene un numero >0, puede abrise\");\r\n \r\n grid[xOpen][yOpen].setStatus(Status.REVEALED);\r\n revealedCells++;\r\n \r\n }\r\n } \r\n }\r\n }else{\r\n // System.out.println(\" openCell().Es una celda no valida\");\r\n }\r\n }", "public void echantillon_zone(){\n\n JLabel lbl_Echantillon = new JLabel(\"Offre d'\\u00E9chantillons :\");\n lbl_Echantillon.setBounds(340, 170, 119, 16);\n add(lbl_Echantillon);\n\n // MODEL\n final DefaultTableModel model = new DefaultTableModel();\n final DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer();\n rightRenderer.setHorizontalAlignment(JLabel.RIGHT);\n Object[][] o = new Object[sizeVector][2];\n for(int i = 0; i < sizeVector; i++){\n o[i][0] = medicaments.get(i)[0];\n o[i][1] = medicaments.get(i)[1];\n }\n // TABLE DATA\n model.setDataVector(o, new Object[]{\"M\\u00E9dicament\",\"Qt\\u00E9\"});\n\n\n // TABLE\n result_table = new JTable(model);\n result_table.setBounds(475, 170, 200, 150);\n result_table.getColumnModel().getColumn(1).setMaxWidth(40);\n result_table.getColumnModel().getColumn(1).setCellRenderer(rightRenderer);\n result_table.setEnabled(false);\n add(result_table);\n\n\n // SCROLLPANE\n JScrollPane apne= new JScrollPane(result_table);\n apne.setBounds(475, 170, 200, 150);\n add(apne);\n\n\n }", "public void setCurrentCell(\n\t\t\tint index )\n\t{\n\t}", "public boolean computeCell() {\n boolean b = false;\n int[] tab = null;\n switch (course) {\n case 4:\n tab = CMap.givePositionTale(x, y - (CMap.TH / 2));\n break;\n default:\n tab = CMap.givePositionTale(x, y - (CMap.TH / 2));\n break;\n }\n\n Cell c = game.getMap().getCell(tab);\n if (c != current) {\n current = c;\n b = true;\n }\n return b;\n }", "public void updateCell() {\n alive = !alive;\n simulator.getSimulation().changeState(xPosition, yPosition);\n setColor();\n }", "private void setMediumDifficultyGridUp1(){\n\t\tmediumDifficulty1 = new SudokuGrid();\n\t\tCell[][] _matrix = {{new Cell(6), new Cell(0), new Cell(0), new Cell(0), new Cell(1), new Cell(0), new Cell(0), new Cell(7), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(8), new Cell(0), new Cell(5), new Cell(7), new Cell(0), new Cell(0), new Cell(0), new Cell(4), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(2), new Cell(0), new Cell(5), new Cell(0), new Cell(0), new Cell(6), new Cell(0), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(3), new Cell(0), new Cell(0), new Cell(0), new Cell(4), new Cell(7), new Cell(0), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(7), new Cell(0), new Cell(0), new Cell(3), new Cell(0), new Cell(8), new Cell(0), new Cell(0), new Cell(2)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(0), new Cell(9), new Cell(1), new Cell(0), new Cell(0), new Cell(0), new Cell(5), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(0), new Cell(2), new Cell(0), new Cell(0), new Cell(1), new Cell(0), new Cell(8), new Cell(0)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(7), new Cell(0), new Cell(0), new Cell(0), new Cell(5), new Cell(3), new Cell(0), new Cell(6)},\n\t\t\t\t\t\t\t{new Cell(0), new Cell(6), new Cell(0), new Cell(0), new Cell(2), new Cell(0), new Cell(0), new Cell(0), new Cell(7)}};\n\t\tmediumDifficulty1.set_matrix(_matrix);\n\t}", "public void updateGridX();", "public void newGame() {\n\n\n inGame = true;\n mines_left = mines+ePirate+mPirate+hPirate;\n\n all_cells = rows * cols;\n field = new int[all_cells];\n\n for (int i = 0; i < all_cells; i++)\n field[i] = COVER_FOR_CELL;\n\n statusbar.setText(Integer.toString(mines_left));\n\n // draw the board -- pass to the undo array\n drawBoard(mines) ; // now rocks\n drawBoard(ePirate) ;\n drawBoard(mPirate) ;\n drawBoard(hPirate) ;\n\n }", "private void xuLyLayMaDichVu() {\n int result = tbDichVu.getSelectedRow();\n String maDV = (String) tbDichVu.getValueAt(result, 0);\n hienThiDichVuTheoMa(maDV);\n }", "public void win() {\n\n\t\t// exist next level?\n\t\tif (Project.project.getMaps().get(maptyp).size() > id + 1) {\n\t\t\tProject.project.startLevel(maptyp, id + 1);\n\n\t\t\t// save it\n\t\t\tif (Project.project.getMapLevel(maptyp) < id + 1) {\n\t\t\t\tProject.project.setMapLevel(maptyp, id + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tPWindow.window.setActScene(new MessageScene(\"Gewonnen\", \"\", new MenuMainScene()));\n\t\t}\n\t}", "private Cell getBananaTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n boolean wormAtCenter;\n\n for (int i = currentWorm.position.x - currentWorm.bananaBomb.range; i <= currentWorm.position.x + currentWorm.bananaBomb.range; i++){\n for (int j = currentWorm.position.y - currentWorm.bananaBomb.range; j <= currentWorm.position.y + currentWorm.bananaBomb.range; j++){\n wormAtCenter = false;\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getBananaAffectedCell(i, j);\n\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.health > 0)\n wormInRange++;\n if (enemyWorm.position.x == i && enemyWorm.position.y == j)\n wormAtCenter = true;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n } else if (wormInRange == mostWormInRange && wormAtCenter) {\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }", "public Board getCurrentBoard() {\n return boardIterator.board;\n }", "public abstract void gameLogic(Cell currentCell);", "void drawCurrentToTemp() {\n for (int r = 0; r < currentPiece.height; ++r)\n for (int c = 0; c < currentPiece.width; ++c)\n if (currentPiece.blocks[r][c] == 1)\n board.addTempBlock(new Block(currentPiece.color), r + currentRow, c + currentColumn);\n }", "@Override\n public void run() {\n viewDelegate.setView(cell, 'O');\n isPlayerTurn = true;\n }", "public void stampa() {\n GridPane matrice = new GridPane();\n buildGriglia(matrice);\n Text scritta;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n if (getElementAt(griglia, i, j).cerchio.isVisible()) {\n scritta = new Text(\"1\");\n }\n else {\n scritta = new Text(\"0\");\n }\n matrice.add(scritta, j, i);\n }\n }\n Scene scene3 = new Scene(matrice, N * 100, N * 100);\n Stage stage3 = new Stage();\n stage3.setTitle(\"Matrice di occupazione:\");\n stage3.setScene(scene3);\n stage3.show();\n }", "public MorphCell current()\n {\n return this.morphs.get(this.index);\n }", "public void aggiornaMossa(Cell cella) {\n currentMove.setIdPawn(currentPawn);\n currentMove.setTargetX(cella.getX());\n currentMove.setTargetY(cella.getY());\n Platform.runLater(() -> {\n// jumpMove.setDisable(true);\n submitAction.setDisable(true);\n });\n\n }", "@FXML\n\tpublic void gridUpdate() {\n\t\tfor (int i = 0; i < gridPlayer.getChildren().size(); i++)\n\t\t\tif (gridPlayer.getChildren().get(i).getClass() == st.getClass())\n\t\t\t\t((Text) (gridPlayer.getChildren().get(i))).setText(\"\");\n\n\t\tTournament current = Tournament.getInstance();\n\t\tTeam t = current.getTeams()[current.getMyTeamId()];\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t\tText playerName = new Text(t.getPlayers().get(i).getName());\n\t\t\tText overall = new Text(t.getPlayers().get(i).getOverall() + \"\");\n\t\t\tText nation = new Text(t.getPlayers().get(i).getNationality());\n\t\t\tText value = new Text(t.getPlayers().get(i).getValue() / 1000000 + \"m €\");\n\n\t\t\tif (i < 11) {\n\t\t\t\toverall.setStyle(\"-fx-font-weight: bold\");\n\t\t\t\tplayerName.setStyle(\"-fx-font-weight: bold\");\n\t\t\t\tnation.setStyle(\"-fx-font-weight: bold\");\n\t\t\t\tvalue.setStyle(\"-fx-font-weight: bold\");\n\t\t\t}\n\n\t\t\tFile nationImg = new File(\"img/flags/\" + nation.getText().toLowerCase().trim() + \".png\");\n\t\t\tImageView flag = new ImageView(new Image(nationImg.toURI().toString()));\n\t\t\tflag.setFitHeight(20);\n\t\t\tflag.setFitWidth(40);\n\n\t\t\tgridPlayer.add(playerName, 1, i);\n\t\t\tgridPlayer.add(overall, 2, i);\n\t\t\tgridPlayer.add(flag, 3, i);\n\t\t\tgridPlayer.add(value, 4, i);\n\t\t}\n\t}", "private CurrentBoard board() throws IOException, EncodeException {\n\n //obtain current board state to init POJO\n boolean[][] player = new boolean[model.BOARD_SIZE][model.BOARD_SIZE];\n boolean[][] occupied = new boolean[model.BOARD_SIZE][model.BOARD_SIZE];\n boolean[][] king = new boolean[model.BOARD_SIZE][model.BOARD_SIZE];\n for(int row = 0; row < model.getBoard().length; row++){\n for(int col = 0; col < model.getBoard()[row].length; col++) {\n player[row][col] = model.isPlayerOne(row, col);\n occupied[row][col] = model.squareIsOccupied(row, col);\n king[row][col] = model.squareHoldsKing(row,col);\n }\n }\n currentBoard.setDoubleJump(model.canDoubleJump);\n currentBoard.setPlayerOne(player);\n currentBoard.setKing(king);\n currentBoard.setOccupied(occupied);\n return currentBoard;\n }", "private void TEMrunInfo(){\n\n int idummy;\n idummy=TEM.runcht.cht.getCd().getVegtype(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_VEGETATION, 1);\n idummy=TEM.runcht.cht.getCd().getDrgtype(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_DRAINAGE, 1);\n idummy=TEM.runcht.cht.getCd().getGrdid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_GRD, 1);\n idummy=TEM.runcht.cht.getCd().getEqchtid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_EQCHT, 1);\n idummy=TEM.runcht.cht.getCd().getSpchtid(); \t \n \tstateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_SPCHT, 1);\n idummy=TEM.runcht.cht.getCd().getTrchtid(); \t \n \t stateTB.setValueAt(Integer.toString(idummy), GUIconfigurer.I_TRCHT, 1);\n \t \n float ddummy;\n ddummy=(float)TEM.runcht.initstate.getMossthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_MOSSTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getFibthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_FIBTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getHumthick(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_HUMTHICK, 1);\n ddummy=(float)TEM.runcht.initstate.getVegc(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_VEGC, 1);\n ddummy=(float)TEM.runcht.initstate.getVegn(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_VEGN, 1);\t\t\n ddummy=(float)TEM.runcht.initstate.getSoilc(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_SOILC, 1);\t \n ddummy=(float)TEM.runcht.initstate.getFibc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_FIBSOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getHumc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_HUMSOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getMinc(); \t \n \t\tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_MINESOILC, 1);\n ddummy=(float)TEM.runcht.initstate.getAvln(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_AVAILN, 1);\n ddummy=(float)TEM.runcht.initstate.getOrgn(); \t \n \tinitTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_SOILN, 1);\n\n //\n \tvegpar_bgc vbpar = new vegpar_bgc();\n \tsoipar_bgc sbpar = new soipar_bgc();\n \tTEM.runcht.cht.getBgcPar(vbpar, sbpar);\n\n ddummy=vbpar.getM1(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m1, 1);\n ddummy=vbpar.getM2(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m2, 1);\n ddummy=vbpar.getM3(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m3, 1);\n ddummy=vbpar.getM4(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_m4, 1);\n ddummy=sbpar.getFsoma(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsoma, 1);\n ddummy=sbpar.getFsompr(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsompr, 1);\n ddummy=sbpar.getFsomcr(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_fsomcr, 1); \t\t\n ddummy=sbpar.getSom2co2(); \t \n \tfixparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_som2co2, 1);\n \t\n //\n vegpar_cal vcpar = new vegpar_cal();\n soipar_cal scpar = new soipar_cal();\n TEM.runcht.cht.getCalPar(vcpar, scpar);\n\n ddummy=vcpar.getCmax(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_CMAX, 1);\n ddummy=vcpar.getNmax(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NMAX, 1);\n ddummy=vcpar.getKrb(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KRB, 1);\n ddummy=vcpar.getCfall(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_CFALL, 1);\n ddummy=vcpar.getNfall(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NFALL, 1);\n \t\n ddummy=scpar.getNup(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_NUP, 1);\n ddummy=scpar.getKdcfib(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCFIB, 1);\n ddummy=scpar.getKdchum(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCHUM, 1);\n ddummy=scpar.getKdcmin(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCMIN, 1);\n ddummy=scpar.getKdcslow(); \t \n \tcalparTB.setValueAt(Float.toString(ddummy), GUIconfigurer.I_KDCSLOW, 1);\n\t \t\t\n }", "private void updateALUTableScorboard() {\n\t\t// Get a copy of the memory stations\n\t\t// ALUStation[] temp_alu = alu_rs;\n\n\t\t// Update the table with current values for the stations\n\t\tfor (int i = 0; i < _lstFuStatusScorboard2.size(); i++) {\n\t\t\t// generate a meaningfull representation of busy\n\t\t\t// String busy_desc = (temp_alu[i].isBusy() ? \"Yes\" : \"No\" );\n\t\t\t// _FunctionUnitsModel.setColumnIdentifiers( new Object[]{\"Cycle\",\n\t\t\t// \"Name\",\"Busy\", \"Op\", \"Fi\", \"Fj\", \"Fk\", \"Qj\",\"Qk\",\"Rj\",\"Rk\"} );\n\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getTime(), i, 0);\n\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFu_name(), i, 1);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getBusy(), i, 2);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getOp(), i, 3);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFi(), i, 4);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFj(), i, 5);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getFk(), i, 6);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getQj(), i, 7);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getQk(), i, 8);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getRj(), i, 9);\n\t\t\t_FunctionUnitsModelScoreboard.setValueAt(_lstFuStatusScorboard2.get(i).getRk(), i, 10);\n\t\t}\n\t}", "private void lightAvailable(Cell myCell, Button myButton) {\n Platform.runLater(() -> {\n ArrayList<Cell> cells = new ArrayList<>();\n for (int i = 0; i < 5; i++) {\n for (int j = 0; j < 5; j++) {\n bt[i][j].setDisable(true);\n }\n }\n int x = myCell.getX();\n int y = myCell.getY();\n myButton.setDisable(false);\n myButton.setStyle(\"-fx-border-color:red\");\n myButton.setDisable(true);\n for (int i = x - 1; i < x + 2; i++) {\n for (int j = y - 1; j < y + 2; j++) {\n //control if the cell exists\n if (((i != x) || (j != y)) && (i >= 0) && (i <= 4) && (j >= 0) && (j <= 4)) {\n //control there is not dome\n if ((!getTable().getTableCell(i, j).isComplete())) {\n //control there is not a pawn of my same team\n if (!((getTable().getTableCell(i, j).getPawn() != null) &&\n (getTable().getTableCell(i, j).getPawn().getIdGamer() == myCell.getPawn().getIdGamer()))) {\n cells.add(getTable().getTableCell(i, j));\n }\n }\n }\n }\n }\n if (getGod().getName().equalsIgnoreCase(\"zeus\") && effetto && currentMove.getAction() == Mossa.Action.BUILD) {\n myButton.setStyle(\"-fx-border-color:blue\");\n myButton.setDisable(false);\n myButton.setOnMouseEntered(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:yellow\");\n });\n myButton.setOnMouseExited(e -> {\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:blue\");\n });\n } else {\n for (Cell lightMe : cells) {\n\n bt[lightMe.getX()][lightMe.getY()].setDisable(false);\n bt[lightMe.getX()][lightMe.getY()].setStyle(\"-fx-border-color:yellow\");\n int a = lightMe.getX();\n int b = lightMe.getY();\n initButtons();\n bt[a][b].setOnAction(e -> {\n for (int c = 0; c < 5; c++) {\n for (int d = 0; d < 5; d++) {\n bt[c][d].setStyle(\"-fx-border-color:trasparent\");\n initButtons();\n }\n }\n Button button;\n button = (Button) e.getSource();\n button.setStyle(\"-fx-border-color:red\");\n button.setOnMouseClicked(null);\n button.setOnMouseEntered(null);\n button.setOnMouseExited(null);\n int x1 = GridPane.getRowIndex(button);\n int y1 = GridPane.getColumnIndex(button);\n aggiornaMossa(table.getTableCell(x1, y1));\n Platform.runLater(() -> {\n submitAction.setDisable(false);\n });\n });\n\n }\n }\n });\n }", "public void updateBoard() {\n for(SnakePart s : snakePartList) {\n board[s.getSnakePartRowsOld()][s.getSnakePartCollsOld()] = ' ';\n board[s.getSnakePartRowsNew()][s.getSnakePartCollsNew()] = 'S';\n }\n \n for (SnakeEnemyPart e : snakeEnemyPartList) {\n board[e.getSnakeEnemyPartRowsOld()][e.getSnakeEnemyPartCollsOld()] = ' ';\n board[e.getSnakeEnemyPartRowsNew()][e.getSnakeEnemyPartCollsNew()] = 'E';\n }\n }", "public void showBoard() {\n for (int i = 0; i < booleanBoard.length; i++) {\n for (int j = 0; j < booleanBoard.length; j++) {\n if (strBoard[i][j].equals(\"possible move\") || strBoard[i][j].equals(\"castling\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.green);\n }\n if (strBoard[i][j].equals(\"possible kill\")) {\n gA.getBoard()[i][j].setBackgroundResource(R.color.red);\n }\n if (booleanBoard[i][j]) {\n if (figBoard[i][j].getColor().equals(\"white\")) {\n gA.getBoard()[i][j].setRotation(180);\n } else {\n gA.getBoard()[i][j].setRotation(0);\n }\n gA.getBoard()[i][j].setImageResource(figBoard[i][j].getImageResource());\n } else {\n gA.getBoard()[i][j].setImageResource(0);\n }\n }\n }\n }", "private void winGame(){\n endTimer();\n for(int i=0; i < grid.gridSize; i++) {\n for (int j = 0; j < grid.gridSize; j++) {\n if (cells[i][j].getBomb()) {\n cells[i][j].setId(\"winBomb\");\n cells[i][j].setText(\"X\");\n }\n }\n }\n Image image1 = new Image(\"file:data/unicorn.jpg\", 65,65,true,true);\n ImageView imageView1=new ImageView();\n imageView1.setImage(image1);\n Alert winAlert=new Alert(Alert.AlertType.INFORMATION);\n winAlert.setTitle(\"You Win!\");\n winAlert.setHeaderText(null);\n winAlert.setGraphic(imageView1);\n winAlert.setContentText(\"You cleared all the bombs! Your time was \"+(scoreboard.getTimeElapsed()-1)+\" seconds\");\n winAlert.showAndWait();\n scoreboard.disableStart(false);\n }", "public void jump()\r\n\t{\t\r\n\t\t//que pasa si morimos:\r\n\t\tif (gameOver)\r\n\t\t{\t//si morirmos repintamos el pajaro\r\n\t\t\tif (Menu.jugador.equals(\"cide\") || Menu.jugador.equals(\"Cide\") || Menu.jugador.equals(\"CIDE\")) {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 75, 75);\r\n\t\t\t} else {\r\n\t\t\t\tbird = new Rectangle(WIDTH / 2 - 10, HEIGHT / 2 - 10, 50, 50);\r\n\t\t\t}\r\n\t\t\t//limiamos las columnas que se habian pintado antes\r\n\t\t\tcolumns.clear();\r\n\t\t\t//movimiento a cero\r\n\t\t\tyMotion = 0;\r\n\t\t\t//puntuacion a cero\r\n\t\t\tscore = 0;\r\n\t\t\t//creacion de las nuevas columnas\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\taddColumn(true);\r\n\t\t\t//vivimos\r\n\t\t\tgameOver = false;\r\n\t\t}\r\n\r\n\t\t//ymotion es el salto del pajaro\r\n\t\tif (!started)\r\n\t\t{\r\n\t\t\tstarted = true;\r\n\t\t}\r\n\t\telse if (!gameOver)\r\n\t\t{\r\n\t\t\tif (yMotion > 0) {\r\n\t\t\t\tyMotion = 0;\r\n\t\t\t}\r\n\t\t\tyMotion -= 10;\r\n\t\t}\r\n\t}", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n \n Color color;\n ImageIcon image;\n \n switch ( terrain )\n {\n case SAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sand.jpg\")); break;\n case FOREST : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\")); break;\n case WETLAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/forest.jpg\")); break;\n case SCRUB : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\")); break;\n case WATER : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\")); break;\n case BRICK : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick.jpg\")); break;\n default : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/gray.jpg\")); break; \n }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column));\n lblText.setHorizontalTextPosition((int) CENTER_ALIGNMENT);\n lblText.setVerticalTextPosition((int) CENTER_ALIGNMENT);\n \n setVisible(true);\n \n //Kiwifruit\n if( row == 6 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick2.jpg\"));\n }\n \n if( row == 0 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n \n if( row == 7 && column == 0 || row == 7 && column == 7 || row == 6 && column == 6 || row == 8 && column == 3 || row == 9 && column == 3 || row == 9 && column == 4 || row == 9 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassk.jpg\"));\n }\n \n if( row == 2 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n //Trap\n if(\"T\".equals(game.getOccupantStringRepresentation(row, column))){\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/trap.jpg\"));\n lblText.setIcon(image);\n }\n //Food\n //if(game.getOccupantStringRepresentation(row, column) == \"apple\" ) {\n //image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n //}\n if( row == 6 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 5 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassm.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 2 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubs.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 8 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grasso.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n //Predator\n if( row == 2 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 9 && column == 7 ||row == 5 && column == 2 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassp.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 3 && column == 4 || row == 6 && column == 4 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 4 && column == 1) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/waters.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\"));\n }\n }\n //Mystical Creature\n if( row == 7 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brickf.jpg\"));\n }\n \n if( row == 4 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandph.jpg\"));\n }\n \n if( row == 0 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandm.jpg\"));\n }\n \n if( row == 4 && column == 6 || row == 6 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubp.jpg\"));\n }\n \n if( row == 8 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassd.jpg\"));\n }\n \n \n //Hazard\n if( squareExplored && row == 2 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n\n \n if( squareExplored && row == 3 && column == 5 || squareExplored && row == 7 && column == 4 || squareExplored && row == 6 && column == 5 || squareExplored && row == 7 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 1 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 5 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if ( squareVisible && !squareExplored ) \n {\n\n }\n lblText.setIcon(image);\n \n // set border colour according to \n // whether the player is in the grid square or not\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n }\n else\n {\n lblText.setText(\"\");\n lblText.setIcon(null);\n setBorder(normalBorder);\n }\n }", "public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }", "public Room getCurrentRoom(){\n\treturn rooms[gx][gy];\n }", "private void setWeeksCell(int row, int col, String text, boolean isCurrentWeek) {\n\t\tweeksTable.setText(row, col, text);\n\t\tweeksTable.getCellFormatter().setAlignment(row, col, HasHorizontalAlignment.ALIGN_RIGHT, HasVerticalAlignment.ALIGN_MIDDLE);\n\t\tif (isCurrentWeek) {\n\t\t\tweeksTable.getCellFormatter().addStyleName(row, col, style.currentWeek());\n\t\t\tweeksTable.getCellFormatter().removeStyleName(row, col, style.defaultWeek());\n\t\t}\n\t\telse {\n\t\t\tweeksTable.getCellFormatter().addStyleName(row, col, style.defaultWeek());\n\t\t\tweeksTable.getCellFormatter().removeStyleName(row, col, style.currentWeek());\t\n\t\t}\n\t}", "void placePowerStation() {\n this.board.get(powerRow).get(powerCol).placePowerStation();\n }", "private void getBoard() {\n gameBoard = BoardFactory.makeBoard();\n }", "public void setBeginningBoard() {\n clearBooleanBoard();\n\n figBoard[0][0] = new Rook(\"white\", 00, white[0]);\n figBoard[0][1] = new Knight(\"white\", 01, white[1]);\n figBoard[0][2] = new Bishop(\"white\", 02, white[2]);\n figBoard[0][4] = new King(\"white\", 04, white[3]);\n figBoard[0][3] = new Queen(\"white\", 03, white[4]);\n figBoard[0][5] = new Bishop(\"white\", 05, white[2]);\n figBoard[0][6] = new Knight(\"white\", 06, white[1]);\n figBoard[0][7] = new Rook(\"white\", 07, white[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[0][i] = true;\n gA.getBoard()[0][i].setRotation(180);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[1][i] = true;\n gA.getBoard()[1][i].setRotation(180);\n figBoard[1][i] = new Pawn(\"white\", 10 + i, white[8]);\n }\n\n figBoard[7][0] = new Rook(\"black\", 70, black[0]);\n figBoard[7][1] = new Knight(\"black\", 71, black[1]);\n figBoard[7][2] = new Bishop(\"black\", 72, black[2]);\n figBoard[7][4] = new King(\"black\", 74, black[3]);\n figBoard[7][3] = new Queen(\"black\", 73, black[4]);\n figBoard[7][5] = new Bishop(\"black\", 75, black[2]);\n figBoard[7][6] = new Knight(\"black\", 76, black[1]);\n figBoard[7][7] = new Rook(\"black\", 77, black[0]);\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[7][i] = true;\n gA.getBoard()[7][i].setRotation(0);\n }\n\n for (int i = 0; i < gA.getBoard().length; i++) {\n booleanBoard[6][i] = true;\n gA.getBoard()[6][i].setRotation(0);\n figBoard[6][i] = new Pawn(\"black\", 60 + i, black[8]);\n }\n\n clearFallenFigures();\n clearBoardBackground();\n clearStringBoard();\n showBoard(); //shows the figures\n showScore();\n setBoardClickable();\n\n if (beginner % 2 == 0)\n this.turn = 0;\n else this.turn = 1;\n\n beginner++;\n\n numberOfBlackFallen = 0;\n numberOfWhiteFallen = 0;\n fallenFiguresWhite = new ArrayList<Figure>();\n fallenFiguresBlack = new ArrayList<Figure>();\n\n showCheck();\n showTurn();\n }", "public void showEdit() {\n DefaultTableCellRenderer alignCenter= new DefaultTableCellRenderer();\n alignCenter.setHorizontalAlignment(JLabel.CENTER);\n\n try {\n //register driver yang akan dipakai\n Class.forName(DriverDB);\n\n //menyambungkan ke database\n connectDB = DriverManager.getConnection(URL,USERNAME,PASSWORD);\n\n //mengatur table head atau nama kolom\n DefaultTableModel kerangkaTabel = new DefaultTableModel();\n kerangkaTabel.addColumn(\"Nomer\");\n kerangkaTabel.addColumn(\"Judul Buku\");\n kerangkaTabel.addColumn(\"Tanggal Pinjam\");\n kerangkaTabel.addColumn(\"Tanggal Harus Kembali\");\n kerangkaTabel.addColumn(\"Tanggal Kembali\");\n kerangkaTabel.addColumn(\"Denda\");\n kerangkaTabel.addColumn(\"Biaya Sewa\");\n\n //perintah sql nya\n statmt= connectDB.createStatement();\n String sql = \"SELECT * FROM sewabuku\";\n\n //eksekusi perintah sql\n setHasil= statmt.executeQuery(sql);\n\n //nomor urut untuk di dalam tabel\n //supaya tidak menggunakan id\n int no_urut=1;\n while (setHasil.next()){\n kerangkaTabel.addRow(new Object[] {\n //setHasil.getString(\"id\"),\n no_urut,\n setHasil.getString(\"judul\"),\n setHasil.getString(\"tanggal_pinjam\"),\n setHasil.getString(\"tanggal_harus_kembali\"),\n setHasil.getString(\"tanggal_kembali\"),\n setHasil.getString(\"denda\"),\n setHasil.getString(\"biaya_sewa\")\n });\n no_urut++;\n\n }\n setHasil.close();\n connectDB.close();\n statmt.close();\n\n //set table model tadi ke dalam JTables\n tableDanAksi.setModel(kerangkaTabel);\n\n //mengatur tinggi tiap baris\n tableDanAksi.setRowHeight(30);\n\n\n //mengatur penempatan teks/teks alignment tiap kolom, index kolom dimulai dari 0\n\n /*indeks 0 : kolom nomer\n * indeks 1 : kolom nama buku\n * indeks 2 : kolom tanggal pinjam\n * indeks 3 : kolom tanggal harus kembali\n * indeks 4 : kolom tanggal kembali\n * indeks 5 : kolom denda\n * indeks 6 : kolom sewa*/\n tableDanAksi.getColumnModel().getColumn(0).setCellRenderer(alignCenter);\n tableDanAksi.getColumnModel().getColumn(2).setCellRenderer(alignCenter);\n tableDanAksi.getColumnModel().getColumn(3).setCellRenderer(alignCenter);\n tableDanAksi.getColumnModel().getColumn(4).setCellRenderer(alignCenter);\n\n //mengatur lebar kolom\n TableColumnModel setKolom = tableDanAksi.getColumnModel();\n setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n// setKolom.getColumn(0).setPreferredWidth(5);\n\n\n }catch (SQLException eksepsi){\n System.out.println(eksepsi.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void startEditingAtCell(Object cell) {\r\n \t\tgraph.startEditingAtCell(cell);\r\n \t\tif ((cell != null) && (cell instanceof JmtCell)) {\r\n \t\t\tJmtCell jcell = (JmtCell) cell;\r\n \t\t\tStationParameterPanel stationPanel = new jmt.gui.common.panels.StationParameterPanel(model, model,\r\n \t\t\t\t\t((CellComponent) jcell.getUserObject()).getKey());\r\n \t\t\t// Adds on the top a panel to change station name\r\n \t\t\tstationPanel.add(new StationNamePanel(model, ((CellComponent) jcell.getUserObject()).getKey()), BorderLayout.NORTH);\r\n \t\t\tdialogFactory.getDialog(stationPanel, \"Editing \" + jcell.getUserObject().toString() + \" Properties...\");\r\n \r\n \t\t\t// Updates cell dimensions if name was changed too much...\r\n \t\t\tHashtable<Object, Map> nest = new Hashtable<Object, Map>();\r\n \t\t\tDimension cellDimension = jcell.getSize(graph);\r\n \t\t\tMap attr = jcell.getAttributes();\r\n \t\t\tRectangle2D oldBounds = GraphConstants.getBounds(attr);\r\n \t\t\tif (oldBounds.getWidth() != cellDimension.getWidth()) {\r\n \t\t\t\tGraphConstants.setBounds(attr, new Rectangle2D.Double(oldBounds.getX(), oldBounds.getY(), cellDimension.getWidth(), cellDimension\r\n \t\t\t\t\t\t.getHeight()));\r\n \t\t\t\tnest.put(cell, attr);\r\n \t\t\t\tjcell.updatePortPositions(nest, GraphConstants.getIcon(attr), cellDimension);\r\n \t\t\t\tgraph.getGraphLayoutCache().edit(nest);\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Blocking region editing\r\n \t\telse if ((cell != null) && (cell instanceof BlockingRegion)) {\r\n \t\t\tObject regionKey = ((BlockingRegion) cell).getKey();\r\n \t\t\tdialogFactory.getDialog(new BlockingRegionParameterPanel(model, model, regionKey), \"Editing \" + model.getRegionName(regionKey)\r\n \t\t\t\t\t+ \" Properties...\");\r\n \t\t}\r\n \t}", "public int getCell() {\n return this.cell;\n }", "private void setNextGame() {\n Persistence db = Persistence.getInstance();\n game = db.getNextGame();\n\n // set the initial grid in the model\n grid = game.getInitial();\n\n // get rid of everything on the view grid\n view.clearGrid(true);\n\n // put givens for new game into view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n } // if given\n } // for j\n } // for i\n\n }", "public void currentWorld(WumpusWorld world) throws RemoteException {\n\t\twidth = world.getWidth();\n\t\theight = world.getHeight();\n\t\tif (frame == null) {\n\t\t\tframe = new Frame();\n\t\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\t\tpublic void windowClosing(WindowEvent evt) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t});\n\t\t\tframe.setTitle(\"The Wumpus Monitor\");\n\t\t\tframe.setLayout(new GridLayout(width * 2, height * 2));\n\t\t\tDimension d = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\tframe.setBounds(0, 0, d.width - 1, d.height - 1);\n\t\t} else {\n\t\t\tframe.removeAll();\n\t\t}\n\t\trooms = new DirectionalPanel[width][height][8];\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\trooms[row][col][0] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][1] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.EAST);\n\t\t\t\trooms[row][col][2] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][3] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.EAST);\n\t\t\t\tfor (int k = 4; k < 8; k++) {\n\t\t\t\t\trooms[row][col][k] = new DirectionalPanel(-1);\n\t\t\t\t}\n\t\t\t\tagentPositions.put(new Point(row, col), new HashSet());\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < world.getWidth(); row++) {\n\t\t\tfor (int turn = 0; turn < 2; turn++) {\n\t\t\t\tfor (int col = 0; col < world.getHeight(); col++) {\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn]);\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn + 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\tRoom room = world.getRoom(row, col);\n\t\t\t\tif (room.getPit()) {\n\t\t\t\t\taddImage(row, col, PIT_FILE, PIT_FILE);\n\t\t\t\t}\n\t\t\t\tif (room.getGold()) {\n\t\t\t\t\taddImage(row, col, GOLD_FILE, GOLD_FILE);\n\t\t\t\t}\n\t\t\t\tWumpus w = room.getWumpus();\n\t\t\t\tif (w != null) {\n\t\t\t\t\taddImage(row, col, w.getName(), WUMPUS_FILE);\n\t\t\t\t\tsetDirection(row, col, w.getName(), w.getDirection());\n\t\t\t\t\tPoint pos = new Point(w.getRow(), w.getColumn());\n\t\t\t\t\tagents.put(w.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(w);\n\t\t\t\t\tcheckStench(row + 1, col - 1, row - 1, col + 1);\n\t\t\t\t}\n\t\t\t\tSet explorers = room.getExplorers();\n\t\t\t\tfor (Iterator it = explorers.iterator(); it.hasNext(); ) {\n\t\t\t\t\tExplorer e = (Explorer) it.next();\n\t\t\t\t\taddImage(row, col, e.getName(), EXPLORER_FILE);\n\t\t\t\t\tsetDirection(row, col, e.getName(), e.getDirection());\n\t\t\t\t\tPoint pos = new Point(e.getRow(), e.getColumn());\n\t\t\t\t\tagents.put(e.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(e);\n\t\t\t\t}\n\t\t\t\tboolean breeze = false;\n\t\t\t\tif (row > 0 && world.getRoom(row - 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (row < world.getWidth() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row + 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col > 0 && world.getRoom(row, col - 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col < world.getHeight() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row, col + 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t}\n\t\t\t\tif (breeze) {\n\t\t\t\t\taddImage(row, col, BREEZE_FILE, BREEZE_FILE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tframe.show();\n\t\tthis.enabled = true;\n\t}", "public synchronized void switchCell()\n {\n cellValue = (cellValue == ALIVE) ? DEAD : ALIVE;\n }", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "private void refreshScreen() {\n app.getMainMenu().getTextField().clear();\n for (int key = 0; key < 96; key++) {\n app.getWorkSpace().getGridCell(key).unhighlightGridCell();\n app.getWorkSpace().getGridCell(key).updateState(app);\n }\n Storage.getInstance().writeObject(\"workspace\", app.getWorkSpace().getWorkSpaceMap());\n app.show();\n }", "public GoPlayingBoard getCurrentBoard() {\n \t\treturn currentBoard.clone();\n \t}", "public void Win() {\n\t\tfor (int i=0; i<x; i++) {\n\t\t\tfor (int j=0; j<y; j++) {\n\t\t\t\tif (!this.c[i][j].uncovered) {\n\t\t\t\t\tif (this.c[i][j].valeur==-1) {\n\t\t\t\t\t\t//Aggrandir la taille de police des cases minées\n\t\t\t\t\t\tthis.c[i][j].setFont(\n\t\t\t\t\t\t\tthis.c[i][j].getFont().deriveFont(\n\t\t\t\t\t\t\t\tthis.c[i][j].getFont().getStyle(), 40\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tthis.c[i][j].removeMouseListener(this.c[i][j].a);\n\t\t\t\t\t\tthis.c[i][j].setText(\"\\u2620\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.c[i][j].Uncover();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getBoardLocation() {return boardLocation;}", "public void setBoard() {\n bestPieceToMove = null;\n bestPieceFound = false;\n bestMoveDirectionX = 0;\n bestMoveDirectionY = 0;\n bestMoveFound = false;\n killAvailable = false;\n lightCounter = 12;\n darkCounter = 12;\n for (int y = 0; y < boardSize; y++) {\n for (int x = 0; x < boardSize; x++) {\n board[y][x] = new Field(x, y);\n if (y < 3 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.DARK, PieceType.MEN));\n } else if (y > 4 && board[y][x].getPlaceable()) {\n board[y][x].setPiece(new Piece(PieceColor.LIGHT, PieceType.MEN));\n }\n }\n }\n }", "public void updateBoard() {\n notifyBoardUpdate(board);\n }", "public void updateRoom(){\n for(Instrument ins : room.getInstruments()){\n String ext = \"\";\n if(!ins.getStatus()){\n ext = \"_1\";\n }\n JLabel tmp = new JLabel();\n tmp.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/gui/instruments/\"+ins.getType()+ext+\".png\"))); // NOI18N\n pnlGym.add(tmp);\n \n Instrument tmpins = ins;\n tmp.setToolTipText(ins.getType().toString());\n if(ins.getStatus() && customer!=null)\n tmp.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n \n \n \n AddInstrumentToWorkout add = new AddInstrumentToWorkout(customer, tmpins, workoutNum);\n iWindow.openWin(add);\n }\n \n });\n \n }\n }", "public void cellAlreadyOccupied(int worker) {\n notifyCellAlreadyOccupied(worker, getCurrentTurn().getCurrentPlayer().getNickname());\n }", "@Override\r\n public void mousePressed(MouseEvent e) {\n JTable target = (JTable) e.getSource();\r\n int row = target.getSelectedRow();\r\n int col = target.getSelectedColumn();\r\n\r\n //Update model\r\n model.updateGridAt(row, col);\r\n\r\n //Update view\r\n gameWindow.refreshBoard();\r\n }", "private void showCells(Integer x, Integer y){\n if(cells[x][y].getBombCount()!=0){\n return;\n }\n if (x >= 0 && x < grid.gridSize-1 && y >= 0 && y < grid.gridSize && !cells[x + 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x + 1][y]);\n\n if (x > 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize && !cells[x - 1][y].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x - 1][y]);\n\n if (x >= 0 && x < grid.gridSize && y >= 0 && y < grid.gridSize-1 && !cells[x][y + 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y + 1]);\n\n if (x >= 0 && x < grid.gridSize && y > 0 && y < grid.gridSize && !cells[x][y - 1].getBomb())\n clickCell(MouseButton.PRIMARY, cells[x][y - 1]);\n }", "public void testSetCell() {\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(9, 9);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.UNEXPLORED, maze1.getCell(test));\n test = new Location(1, 0);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n test = new Location(0, 1);\n maze1.setCell(test, MazeCell.WALL);\n assertEquals(MazeCell.WALL, maze1.getCell(test));\n \n \n \n maze1.setCell(test, MazeCell.CURRENT_PATH);\n assertEquals(MazeCell.CURRENT_PATH, maze1.getCell(test));\n maze1.setCell(test, MazeCell.FAILED_PATH);\n assertEquals(MazeCell.FAILED_PATH, maze1.getCell(test));\n \n }", "protected void initCurrentGP() {\n\t\t// centers the falling pieces at the top row\n\t\tcurrentPieceGridPosition = new int[]{0, 3};\n\t}", "public void buildInCell() {\n this.level++;\n if (this.level == 4) {\n this.setFreeSpace(false);\n }\n }", "private Worm getFirstWormInRange() {\n\n Set<String> cells = constructFireDirectionLines(currentWorm.weapon.range)\n .stream()\n .flatMap(Collection::stream)\n .map(cell -> String.format(\"%d_%d\", cell.x, cell.y))\n .collect(Collectors.toSet());\n\n for (Worm enemyWorm : opponent.worms) {\n String enemyPosition = String.format(\"%d_%d\", enemyWorm.position.x, enemyWorm.position.y);\n if (cells.contains(enemyPosition) && enemyWorm.health > 0) {\n return enemyWorm;\n }\n }\n\n return null;\n }", "public void morir()\r\n\t{\r\n\t\tif(this.grafico != null)\t\r\n\t\t\tthis.mover(4);\r\n\t}", "static void drawCellID() { // draws a cross at each cell centre\n\t\tfloat xc,yc;\n\t\t//GeneralPath path = new GeneralPath();\n\t\tif (currentStage[currentSlice-1]>1)\n\t\t{\n\t\t\tfor (int i=0;i<pop.N;i++)\n\t\t\t{\n\t\t\t\txc = (float) ( (Balloon)(pop.BallList.get(i)) ).x0;\n\t\t\t\tyc = (float) ( (Balloon)(pop.BallList.get(i)) ).y0;\n\t\t\t\tfloat arm = 5;\n\n\t\t\t\t// Label Cell number\n\t\t\t\tTextRoi TROI = new TextRoi((int)xc, (int)yc, (\"\"+i),new Font(\"SansSerif\", Font.BOLD, 12));\n\t\t\t\tTROI.setNonScalable(false);\n\t\t\t\tOL.add(TROI);\n\t\t\t}\n\t\t}\n\t}", "private Board getBoard() {\n return gameStatus.getBoard();\n }", "@Override\n public void executeState(Controller controller) {\n // controller.getGame().setEndTurn(false);\n\n controller.setUndoCheckFlag(false);\n controller.setGoOn(true);\n controller.getGame().setTargetSelected(null);\n controller.getGame().setTargetInUse(null);\n\n\n controller.getGame().setCurrentPlayer(controller.getNextPlayer(controller.getGame().getCurrentPlayer()));\n controller.saveAll();\n controller.setCanSkip(false);\n Player currentPlayer= controller.getGame().getCurrentPlayer();\n currentPlayer.setHasBeenMoved(false);\n currentPlayer.setHasBuilt(false);\n currentPlayer.setDefeat(false);\n currentPlayer.setInQue(false);\n\n\n Square square [][]=controller.getGame().getField().getSquares();\n\n for(int x=0; x<5;x++)\n for(int y=0; y<5; y++)\n square[x][y].setStart_level(square[x][y].getLevel());\n\n\n for(Worker w: currentPlayer.getWorkers()){\n w.setSquareNotAvailable(null);\n w.setMandatorySquare(null);\n w.resetHystoricPos();\n w.setCanBeMoved(true);\n w.setCanBuild(true);\n }\n\n currentPlayer.getGod().setCantDo(new ArrayList<>());\n\n\n\n }", "public void tabla_campos() {\n int rec = AgendarA.tblAgricultor.getSelectedRow();// devuelve un entero con la posicion de la seleccion en la tabla\n ccAgricultor = AgendarA.tblAgricultor.getValueAt(rec, 1).toString();\n crearModeloAgenda();\n }", "public String boardCellToString() {\n String str;\n Integer convertX, convertY;\n //adjusting the co'ordinates because the board starts at 1 not 0\n convertX=this.xCor + 1;\n convertY= this.yCor + 1;\n str = \"(\" + convertX.toString() + \",\" + convertY.toString() + \")\";\n return str;\n }", "public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }", "public Object getCurrentCellX() {\n\t\treturn x;\n\t}", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "void updateDevBoard(LightDevelopmentBoard board);", "public JPanelChuyen() {\n initComponents();\n thoiGianDao = new ThoiGianHoatDongDao();\n tbmChuyen = (DefaultTableModel) jtbChuyen.getModel();\n dpNgayBatDau.setEnabled(false);\n ChuyenDao.loadDSChuyenVaoBang(LopKetNoi.select(\"select * from Chuyen\"), tbmChuyen);\n }", "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 }", "public void actionPerformed(ActionEvent e) {\n\t\tJButton b = (JButton)(e.getSource());\n\n\t\t// Traccia il perimetro con dei muri e svuota l'interno della mappa.\n\t\tif(b.getText().equals(\"Pulisci\")) {\n\t\t\tfor (int i = 0; i < nr; i++) {\n\t\t\t\tfor (int j = 0; j < nc; j++) {\n\t\t\t\t\tif ((j == nc - 1) || (j == 0) || (i == 0) || (i == nr - 1)) {\n\t\t\t\t\t\tcells[i][j].setIcon(iconWall);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcells[i][j].setIcon(iconNull);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Randomize della mappa\n\t\tif(b.getText().equals(\"Randomize\")) {\n\t\t\tint percWall;\n\t\t\tint percExit;\n\t\t\tint percDebris;\n\t\t\tint percSurvivor;\n\t\t}\n\t\t// Crea il file CLIPS del mondo creato e fa partire l'interfaccia per l'esecuzione di RubyRescue.\n\t\tif(b.getText().equals(\"Fatto\")) {\n\t\t\tif (controlMap()) {\n\t\t\t\tString debrisContent = \"\";\n\t\t\t\tString world = \"\";\n\t\t\t\tString contains;\n\t\t\t\tImageIcon icon;\n\t\t\t\ttry {\n\t\t\t\t\t// Le parti STATICHE del programma CLIPS. Le altre vengono aggiornate automaticamente\n\t\t\t\t\tFileReader in1 = new FileReader(getClass().getResource(\"/clp/Parte1.clp\").getPath());\n\t\t\t\t\tFileReader in3 = new FileReader(getClass().getResource(\"/clp/Parte3.clp\").getPath());\n\t\t\t\t\tFileReader in5 = new FileReader(getClass().getResource(\"/clp/Parte5.clp\").getPath());\n\t\t\t\t\tFileReader in7 = new FileReader(getClass().getResource(\"/clp/Parte7.clp\").getPath());\n\n\t\t\t\t\tFileReader in1c = new FileReader(getClass().getResource(\"/clpclips/Parte1.clp\").getPath());\n\t\t\t\t\tFileReader in3c = new FileReader(getClass().getResource(\"/clpclips/Parte3.clp\").getPath());\n\t\t\t\t\tFileReader in5c = new FileReader(getClass().getResource(\"/clpclips/Parte5.clp\").getPath());\n\t\t\t\t\tFileReader in7c = new FileReader(getClass().getResource(\"/clpclips/Parte7.clp\").getPath());\n\n\t\t\t\t\t// File di output.\n\t\t\t\t\tout = new FileWriter(getClass().getResource(\"/rules/Ruby.clp\").getPath());\n\t\t\t\t\toutClips = new FileWriter(getClass().getResource(\"/rules/RubyClips.clp\").getPath());\n\t\t\t\t\t// Scrittura parte statica 1.\n\t\t\t\t\tint c, cc;\n\t\t\t\t\tc = in1.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in1.read();\n\t\t\t\t\t}\n\t\t\t\t\tin1.close();\n\t\t\t\t\tcc = in1c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in1c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin1c.close();\n\n\t\t\t\t\t// Scrittura parte dinamica 2. Trasformazione del mondo in codice CLIPS\n\t\t\t\t\tout.write(\"\\n;Mondo creato con RubyRescueWorldCreation.java\\n\");\n\t\t\t\t\tDate date = new Date();\n\t\t\t\t\tout.write(\";Data: \"+ date +\"\\n\");\n\t\t\t\t\toutClips.write(\"\\n;Mondo creato con RubyRescueWorldCreation.java\\n\");\n\t\t\t\t\toutClips.write(\";Data: \"+ date +\"\\n\");\n\t\t\t\t\tint entryR = 0;\n\t\t\t\t\tint entryC = 0;\n\t\t\t\t\tString direction = \"\";\n\t\t\t\t\tfor (int i = 0; i < nr; i++) {\n\t\t\t\t\t\tfor (int j = 0; j < nc; j++) {\n\t\t\t\t\t\t\ticon = (ImageIcon) (cells[i][j].getIcon());\n\t\t\t\t\t\t\tcontains = icon.getDescription();\n\n\t\t\t\t\t\t\tif (contains.equals(\"entry\")) {\n\t\t\t\t\t\t\t\tentryR = i;\n\t\t\t\t\t\t\t\tentryC = j;\n\t\t\t\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\t\t\t\tdirection = \"down\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (j == 0) {\n\t\t\t\t\t\t\t\t\tdirection = \"right\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (i == (nr - 1)) {\n\t\t\t\t\t\t\t\t\tdirection = \"up\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (j == (nc - 1)) {\n\t\t\t\t\t\t\t\t\tdirection = \"left\";\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\tif (contains.equals(\"debris\")) {\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"\\n(debriscontent (pos-r \" + i + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(pos-c \" + j + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(person no) \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(digged no))\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (contains.equals(\"debrisYes\")) {\n\t\t\t\t\t\t\t\tcontains = \"debris\";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"\\n(debriscontent (pos-r \" + i + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(pos-c \" + j + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(person Person-\" + i + \"-\" + j + \") \";\n\t\t\t\t\t\t\t\tdebrisContent = debrisContent + \"(digged no))\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tworld = world + \"\\n(cell (pos-r \" + i + \") \";\n\t\t\t\t\t\t\tworld = world + \"(pos-c \" + j + \") \";\n\t\t\t\t\t\t\tworld = world + \"(contains \" + contains + \"))\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tworld = world + debrisContent;\n\t\t\t\t\tout.write(world);\n\t\t\t\t\toutClips.write(world);\n\n\t\t\t\t\t// Scrittura parte statica 3.\n\t\t\t\t\tc = in3.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in3.read();\n\t\t\t\t\t}\n\t\t\t\t\tin3.close();\n\t\t\t\t\tcc = in3c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in3c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin3c.close();\n\n\t\t\t\t\t// Inserimento parte dinamica 4.\n\t\t\t\t\tString agentStatus = \"(agentstatus (pos-r \"+entryR+\") (pos-c \"+entryC+\")\";\n\t\t\t\t\tagentStatus = agentStatus + \"(time 0)(direction \"+direction+\") (load no)))\\n\";\n\t\t\t\t\tout.write(agentStatus);\n\t\t\t\t\toutClips.write(agentStatus);\n\n\t\t\t\t\t// Scrittura parte statica 5\n\t\t\t\t\tc = in5.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in5.read();\n\t\t\t\t\t}\n\t\t\t\t\tin5.close();\n\t\t\t\t\tcc = in5c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in5c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin5c.close();\n\n\t\t\t\t\t// Scrittura parte dinamica 6.\n\t\t\t\t\tString mapEntry = \"(assert (map (pos-r \"+entryR+\")(pos-c \"+entryC+\")\";\n\t\t\t\t\tmapEntry = mapEntry + \"(contains entry)))\\n\";\n\t\t\t\t\tout.write(mapEntry);\n\t\t\t\t\toutClips.write(mapEntry);\n\n\t\t\t\t\t// Scrittura parte statica 7.\n\t\t\t\t\tc = in7.read();\n\t\t\t\t\twhile (c != -1) {\n\t\t\t\t\t\tout.write(c);\n\t\t\t\t\t\tc = in7.read();\n\t\t\t\t\t}\n\t\t\t\t\tin7.close();\n\t\t\t\t\tcc = in7c.read();\n\t\t\t\t\twhile (cc != -1) {\n\t\t\t\t\t\toutClips.write(cc);\n\t\t\t\t\t\tcc = in7c.read();\n\t\t\t\t\t}\n\t\t\t\t\tin7c.close();\n\n\t\t\t\t\t// Chiusura file di output.\n\t\t\t\t\tout.close();\n\t\t\t\t\toutClips.close();\n\n\t\t\t\t\tsetVisible(false);\n\n\t\t\t\t\t// Parte l'esecuzione del programma CLIPS\n\t\t\t\t\tString titleFrame = e.getActionCommand();\n\t\t\t\t\tif (titleFrame.equals(\"Fatto\")) {\n\t\t\t\t\t\ttitleFrame = \"(mappa non salvata)\";\n\t\t\t\t\t}\n\t\t\t\t\trrwe = new RubyRescueWorldExecution(cells, titleFrame);\n\t\t\t\t} catch(Exception eee) {\n\t\t\t\t\tSystem.out.println(eee.getMessage());\n\t\t\t\t}\n\t\t\t}//if (controlMap == true)\n\t\t\telse {\n\t\t\t\tJOptionPane op = new JOptionPane();\n\t\t\t\top.showMessageDialog(null, errorMapMessage, \"Attento\", 2);\n\t\t\t}\n\t\t}\n\n\t\t// Risettaggio dei parametri del mondo.\n\t\tif(b.getText().equals(\"Reimposta\")) {\n\t\t\tsetVisible(false);\n\t\t\tnew RubyRescueWorldParameters();\n\t\t}\n\n\t\t// Uscita.\n\t\tif(b.getText().equals(\"Esci\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public abstract String getCurrentRow();", "@Override\n\tpublic int updateBoard(int num) {\n\t\treturn 0;\n\t}", "@Override\n\tprotected void activateBoard() {\n\t\tsuper.activateBoard();\n\t\taddMsg(\"Click on an origin cell\\n\");\n\t}", "@Override\n\tprotected void activateBoard() {\n\t\tsuper.activateBoard();\n\t\taddMsg(\"Click on an origin cell\\n\");\n\t}", "public void run() {\n GameBoard board = new GameBoard(nrows, ncols);\n\n\n }", "public void setBoard(Board board){this.board = board;}", "public void updateFloor(Position pos, Board board) {\n\t\t\tFloor_c curr = (Floor_c)board.get(pos);\n\t\t\t\n\t\t\tif(curr.isFull()) {\n\t\t\t\tcellLabels.get(pos.getColumn(), pos.getRow()).setText(board.get(pos).toString());\n\t\t\t\tcellLabels.get(pos.getColumn(), pos.getRow()).setBackground(Color.blue);\n\t\t\t}else {\n\t\t\t\tcellLabels.get(pos.getColumn(), pos.getRow()).setText(\"\");\n\t\t\t\tcellLabels.get(pos.getColumn(), pos.getRow()).setBackground(Color.gray);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "public void updateGridY();", "private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}", "private void refresh(int width, int height) {\n Integer numUnexposed = mainField.numUnexposed();\n nonminesLabel.setText(numUnexposed.toString());\n Integer numMarked = mainField.numMarked();\n if (numMarked < 0) {\n cellsUnmarked.setText(\"Too Many Marked!\");\n }\n else {\n cellsUnmarked.setText(numMarked.toString());\n }\n // iterate through all the buttons and update the text if it's an exposed cell\n for (int i = 0;i < width;i++) {\n for (int j = 0;j < height;j++) {\n int cellState = mainField.getCellState(i,j);\n if (cellState == mainField.EXPOSED) {\n Integer numValue = mainField.getValue(i,j);\n if (numValue == -1) {\n btArray[i][j].setText(\"B\");\n btArray[i][j].setStyle(\"-fx-background-color: #FF0000;\");\n }\n else if (numValue == 0) {\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n else {\n btArray[i][j].setText(numValue.toString());\n btArray[i][j].setStyle(\"-fx-background-color: #CCCCCC;\");\n }\n }\n }\n }\n }", "public void create() {\n\n\t\tthis.data = new Object[lb.getBoardLen()+3][3];\n\t\tdata[0][0] = \"RANK\";\n\t\tdata[0][1] = \"PLAYER\";\n\t\tdata[0][2] = \"POINTS\";\n\t\t\n\t\tfor (int i = 1; i <= lb.getBoardLen(); i++) {\n\t\t\tdata[i][0] = \"#\" + Integer.toString(i);\n\t\t\tdata[i][1] = lb.getUserPointsList().get(i-1).username;\n\t\t\tdata[i][2] = Integer.toString(lb.getUserPointsList().get(i-1).points);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif (Sfunctions.sUserPull(user.getUsername(), user.getPassword()).getWeek() == -1) {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"THE SEASON HAS ENDED.\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"THANKS FOR PLAYING!\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\telse {\n\t\t\tdata[lb.getBoardLen() + 1][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 1][2] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][0] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][1] = \"\";\n\t\t\tdata[lb.getBoardLen() + 2][2] = \"\";\n\t\t}\n\t\n\tJTable table = new JTable(data, headers);\n\ttable.setBackground(new Color(104, 0, 0));\n\ttable.setForeground(Color.WHITE);\n\ttable.setFont(textFont);\n\ttable.setShowGrid(false);\n\ttable.setEnabled(false);\n\n\t//Depending on where the ME is\n\tme_row = getRowByValue(table, user.getUsername());\n\ttable.setRowSelectionInterval(me_row, me_row);\n\t\n\t\n\n\t\n\tTableColumn column = null;\n\tfor (int i = 0; i < 3; i++) {\n\t column = table.getColumnModel().getColumn(i);\n\t if (i == 0) {\n\t \t\tcolumn.setPreferredWidth(60);\n\t }\n\t if (i == 1) {\n\t column.setPreferredWidth(210); //third column is bigger\n\t } else {\n\t \t\tcolumn.setPreferredWidth(80);\n\t }\n\t}\n\n\t\n\tthis.add(table);\n\tthis.setBackground(new Color(104, 0, 0));\n\t}", "public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }", "private void setCellText(final CellsGUI the_cell) {\r\n\r\n\t\t// if (the_cell == null)\r\n\t\t// return;\r\n\t\tCell cell = cellMap.get(the_cell.getToken().toString());\r\n\t\tmyCell = cell;\r\n\t\tif (myCell == null)\r\n\t\t\treturn;\r\n\t\tif (cell != null) {\r\n\t\t\tdouble value = 0;\r\n\t\t\tvalue = roundDecimal(cell.last_value);\r\n\t\t\tthe_cell.setText(Double.toString(value));\r\n\t\t} else {\r\n\t\t\tthe_cell.setText(\"\");\r\n\t\t}\r\n\r\n\t\tdouble cellValue = roundDecimal(myCell.last_value);\r\n\t\tString textValue = String.valueOf(cellValue);\r\n\r\n\t\tif (myCell.formula == null)\r\n\t\t\tthe_cell.setText(\"\");\r\n\t\telse\r\n\t\t\tthe_cell.setText(textValue);\r\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 }", "public void testSetCell()\r\n {\r\n board.loadBoardState(\"OOOO\",\r\n \"OOOO\",\r\n \"O+OO\",\r\n \"OOOO\");\r\n board.setCell(1, 2, MineSweeperCell.FLAGGED_MINE);\r\n assertBoard(board, \"OOOO\",\r\n \"OOOO\",\r\n \"OMOO\",\r\n \"OOOO\");\r\n }", "@Override\r\n\t/**\r\n\t * metodo para las acciones dentro del juego\r\n\t */\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\n\t\tticks++;\r\n\t\t//que pasa si el juego empieza\r\n\t\tif (started)\r\n\t\t{ \r\n\t\t\t//pinta las columnas\r\n\t\t\tfor (int i = 0; i < columns.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tRectangle column = columns.get(i);\r\n\t\t\t\t//aparicion de las columnas\r\n\t\t\t\tcolumn.x -= speed;\r\n\t\t\t}\r\n\t\t\t//control del salto\r\n\t\t\tif (ticks % 2 == 0 && yMotion < 15)\r\n\t\t\t{\r\n\t\t\t\tyMotion += 2;\r\n\t\t\t}\r\n\t\t\t//limpia las columnas que han pasado y crea de nuevas\r\n\t\t\tfor (int i = 0; i < columns.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tRectangle column = columns.get(i);\r\n\r\n\t\t\t\tif (column.x + column.width < 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcolumns.remove(column);\r\n\r\n\t\t\t\t\tif (column.y == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\taddColumn(false);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//direccion en la que salta el pajaro\r\n\t\t\tif (Menu.dificultad == \"Invertido\") {\r\n\t\t\t\t//aqui al saltar baja\r\n\t\t\t\tbird.y -= yMotion;\r\n\t\t\t}else {\r\n\t\t\t\t//aqui al saltar sube\r\n\t\t\t\tbird.y += yMotion;\r\n\t\t\t}\r\n\r\n\t\t\t// Sirve para la puntuacion, por error de sumar 2\r\n\t\t\tint a;\r\n\t\t\tint b;\r\n\t\t\t\r\n\t\t\tfor (Rectangle column : columns)\r\n\t\t\t{\t\r\n\t\t\t\tif (Menu.dificultad == \"dificil\") {\r\n\t\t\t\t\ta = 5;\r\n\t\t\t\t\tb = 10;\r\n\t\t\t\t} else {\r\n\t\t\t\t\ta = 10;\r\n\t\t\t\t\tb = 5;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (column.y == 0 && bird.x + bird.width / 2 > column.x + column.width / 2 - a && bird.x + bird.width / 2 < column.x + column.width / 2 + b)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\treprocol.Play();\r\n\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\tSystem.out.println(\"Error: \" + e1.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tscore++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//cuando toca columna\r\n\t\t\t\tif (column.intersects(bird))\r\n\t\t\t\t{\r\n\t\t\t\t\t//muere\r\n\t\t\t\t\tgameOver = true;\r\n\r\n\t\t\t\t\tif (bird.x <= column.x)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbird.x = column.x - bird.width;\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\ttry {\r\n\t\t\t\t\t\t\t//para el sonido de las columnas\r\n\t\t\t\t\t\t\treprocol.Stop();\r\n\t\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (column.y != 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbird.y = column.y - bird.height;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if (bird.y < column.height)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbird.y = column.height;\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\r\n\r\n\t\t\tif (bird.y > HEIGHT - 120 || bird.y < 0)\r\n\t\t\t{\r\n\t\t\t\tgameOver = true;\r\n\t\t\t}\r\n\r\n\t\t\tif (bird.y + yMotion >= HEIGHT - 120)\r\n\t\t\t{\r\n\t\t\t\tbird.y = HEIGHT - 120 - bird.height;\r\n\t\t\t\tgameOver = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\trenderer.repaint();\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int row = 0, col = 0;\n gridLocationFinder:\n for (row = 0; row < 3; row++) {\n for (col = 0; col < 3; col++) {\n if (e.getSource() == gridButtons[row][col])\n break gridLocationFinder; // break out of outer loop using labelled break\n }\n }\n if (gameModel.setCell(row, col, gameModel.currentPlayer())) // legal\n {\n JButton buttonPressed = (JButton) e.getSource();\n buttonPressed.setText(gameModel.currentPlayer().toString());\n buttonPressed.setEnabled(false); // disable pressing again\n\n // check for gameOver...display game over in statusBar or whose turn it now is\n statusBar.setText(gameModel.currentPlayer().toString());\n }\n\n }", "public void changeActiveMonster(){\n //todo\n }", "public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }", "@Override\r\n\t\t\tpublic void update(final ViewerCell cell) {\n\t\t\t}" ]
[ "0.62069976", "0.6008625", "0.5894852", "0.5887114", "0.5886005", "0.58567196", "0.5851223", "0.5722695", "0.57186234", "0.57184947", "0.5641433", "0.56232065", "0.5621388", "0.56163436", "0.5608603", "0.55915177", "0.55439806", "0.5529476", "0.55133045", "0.5500982", "0.5488553", "0.5479648", "0.54753643", "0.5452393", "0.5438591", "0.543847", "0.5424902", "0.54173076", "0.5415781", "0.5410945", "0.5405195", "0.54041576", "0.5394389", "0.5374334", "0.53644794", "0.53644127", "0.5358114", "0.53417736", "0.53345907", "0.5330949", "0.532727", "0.53203326", "0.531903", "0.5315929", "0.5313004", "0.5311848", "0.5300459", "0.52997416", "0.5275877", "0.5268265", "0.52678764", "0.5264917", "0.52553934", "0.52515835", "0.5249588", "0.5249157", "0.52362305", "0.5233114", "0.52264774", "0.5226449", "0.52214676", "0.52152747", "0.5208265", "0.5204927", "0.52043015", "0.52009946", "0.5198545", "0.51958776", "0.51944035", "0.51791364", "0.51767826", "0.51764166", "0.5166268", "0.51551366", "0.5152119", "0.5151598", "0.51468503", "0.5145813", "0.51443475", "0.5141954", "0.5141708", "0.5139927", "0.5138993", "0.5138362", "0.5138362", "0.5135481", "0.5134553", "0.512958", "0.5129212", "0.5123189", "0.51229936", "0.51177895", "0.5117341", "0.5117079", "0.5114411", "0.51120436", "0.5110035", "0.510703", "0.510595", "0.51035607", "0.51030993" ]
0.0
-1
TODO Autogenerated method stub
public void endContact(Contact contact) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public void preSolve(Contact contact, Manifold oldManifold) { }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", "0.6076905", "0.6041205", "0.6024897", "0.60200036", "0.59985113", "0.5967729", "0.5967729", "0.5965808", "0.5949083", "0.5941002", "0.59236866", "0.5909713", "0.59030116", "0.589475", "0.58857024", "0.58837134", "0.586915", "0.58575684", "0.5850424", "0.5847001", "0.5824116", "0.5810248", "0.5809659", "0.58069366", "0.58069366", "0.5800507", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.5792168", "0.57900196", "0.5790005", "0.578691", "0.578416", "0.578416", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5774115", "0.5761079", "0.57592577", "0.57592577", "0.5749888", "0.5749888", "0.5749888", "0.5748457", "0.5733414", "0.5733414", "0.5733414", "0.57209575", "0.57154554", "0.57149583", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.57140404", "0.571194", "0.57043016", "0.56993437", "0.5696782", "0.5687825", "0.5677794", "0.5673577", "0.5672046", "0.5669512", "0.5661156", "0.56579345", "0.5655569", "0.5655569", "0.5655569", "0.56546396", "0.56543446", "0.5653163", "0.56502634" ]
0.0
-1
TODO Autogenerated method stub
public void postSolve(Contact contact, ContactImpulse impulse) { }
{ "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
User: PangYi Date: 20191130 Time: 9:02 Description:
public interface AirHistoryMapper extends BaseMapper<AirHistory> { /** * 获取每日的空气站参数浓度值 * * @param tableName 表名 * @param deviceNo 设备号 * @param start 开始时间 * @param end 结束时间 * @return 信息 */ AirAvgModel getAvgToDay(@Param("tableName") String tableName, @Param("deviceNo") String deviceNo, @Param("start") LocalDateTime start, @Param("end") LocalDateTime end); /** * 获取空气站数据统计分析 * * @param tableName 表名 * @param deviceNo 设备号 * @param start 开始时间 * @param end 结束时间 * @return 信息 */ AirAccordMapperModel getAirAccord(@Param("tableName") String tableName, @Param("deviceNo") String deviceNo, @Param("start") LocalDateTime start, @Param("end") LocalDateTime end); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displaying date\n simpleformat = new SimpleDateFormat(\"dd/MMMM/yyyy\");\n String str = simpleformat.format(new Date());\n System.out.println(\"Current Date = \"+str);\n // current time\n simpleformat = new SimpleDateFormat(\"HH:mm:ss\");\n String strTime = simpleformat.format(new Date());\n System.out.println(\"Current Time = \"+strTime);\n // displaying hour in HH format\n simpleformat = new SimpleDateFormat(\"HH\");\n String strHour = simpleformat.format(new Date());\n System.out.println(\"Hour in HH format = \"+strHour);\n\n\n\n //formato ideal\n simpleformat = new SimpleDateFormat(\"dd/MM/yyyy - HH:mm:ss\");\n String strTimeDay = simpleformat.format(new Date());\n System.out.println(\"Dia e Hora = \" + strTimeDay);\n\n }", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "@NonNull\n public String toString(){\n return this.hora+\":\"+this.minutos+\" \"+this.segundos+\" Sec \"+this.dia+\"/\"+this.mes+\"/\"+this.anno;\n }", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "@Override\n\tpublic String getExtraInformation() {\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Deadline: \" + fmt.print(this.getDeadLine());\n\t}", "public static void showMeswithTime(String str){\r\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tString date = df.format(new Date());\r\n\t\tSystem.out.println(date+\" : \"+str);\r\n\t}", "@Override\n public String toString() {\n DateTimeFormatter df = DateTimeFormatter.ofPattern(\"dd MMM yyyy HHmm\");\n return \"[\" + super.getType() + \"]\" + super.toString() + \" (by: \" + df.format(this.date) + \")\";\n }", "@Override\n public String getResumeDate() {\n return operate_time;\n }", "private static String time() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"HH-mm-ss \");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "public String getCreatetime() {\r\n return createtime;\r\n }", "public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public Date getUserCreateTime() {\r\n return userCreateTime;\r\n }", "public String getCreatetime() {\n return createtime;\n }", "public String getCreatetime() {\n return createtime;\n }", "private static String getTimeStamp()\r\n\t{\r\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd_HH.mm.ss\");\r\n\t\tDate date = new Date();\r\n\t\treturn dateFormat.format(date);\r\n\t}", "public static String timestamp(){\n\t\tDate date = new Date();\n\t\tDateFormat hourdateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss \");\n\t\treturn hourdateFormat.format(date);\n\t}", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public String getTime(){\n return time;\n }", "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toString();\n }", "public Date getCreateTime()\n/* */ {\n/* 177 */ return this.createTime;\n/* */ }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"[\" + this.getTimestamp() + \"] \" + this.getOwnerName() + \" -> \" + this.getText();\n\t}", "long getCreateTime();", "long getCreateTime();", "String timeCreated();", "private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}", "@Override\r\n public String toString() {\r\n return timeStamp + username + \": \" + message;\r\n }", "public static void main(String[] args) {\n\t\tDate today = new Date();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy:MM:dd hh:MM:ss\");\n\t\tString s= sdf.format(today);\n\t\tSystem.out.println(s);\n\t}", "public String extraInfo(){\n return by.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "@Override\n public String getEndInfo() {\n return null;\n //return dateFormatter.stringFromDate(checkOutTime!)\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public String getCopyText(){\n // build text string (don't start with a blank as cursor is on\n // first date field\n StringBuilder sb = new StringBuilder();\n \n // add date\n sb.append(new SimpleDateFormat(\"dd MM yy\").format(this.getStartTime().getTime()));\n \n // 4 spaces between date and hours\n sb.append(\" \");\n \n // hours\n sb.append(Integer.toString(this.getHours()));\n \n // 3 spaces between hours and mins\n sb.append(\" \");\n \n // mins\n sb.append(this.getMinutesStr());\n\n // 2 spaces between hours and mins\n sb.append(\" \"); \n \n // add job number\n sb.append(this.getJobNoStr());\n \n // end of line\n sb.append(\"\\n\");\n \n // 15 spaces at start of second line\n sb.append(\" \");\n \n // description\n sb.append(this.getDescription());\n \n // end of line\n sb.append(\"\\n\");\n \n return sb.toString();\n }", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "Long getUserCreated();", "public String getBeginTime(){return beginTime;}", "private String getDateTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static void main(String[] args) {\n\n String time =\"16:49:40\".substring(0,2);\n System.out.println(time);\n\n }", "public static void main(String[] args) {\n\t String str = String.format(\"%tc\", new Date());\r\n\t System.out.printf(str);\r\n\t \r\n//\t // display time and date\r\n//\t System.out.printf(\" Today is : %1$s %2$tB %2$td, %2$tY\", \"Due date : \", new Date());\r\n//\r\n\r\n\t System.out.println( new SimpleDateFormat(\"E yyyy.MM.dd 'at' hh:mm:ss a zzz\").format(new Date()));\r\n\t System.out.println( new SimpleDateFormat(\"EEEE, MMMM d, yyyy\").format(new Date()));\r\n\t}", "public static String getTimeStamp() {\n\t\tDate date = new Date();\n\t\treturn date.toString().replaceAll(\":\", \"_\").replaceAll(\" \", \"_\");\n\n\t}", "public String parseUser(String userLine) {\n final int START_OF_USER_NAME = 6;\n \t\tString userName = userLine.substring(\n START_OF_USER_NAME, userLine.indexOf(\"Date: \") - 1).trim();\n \n \t\treturn userName;\n \t}", "@Override\n\tpublic String getTimeAndDate() throws RemoteException {\n\tDate date = new Date();\n\tSystem.out.println(date.toString());\n\treturn date.toString();\n\t}", "private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "@Override\n public String toString() {\n return this.getTimestamp().atZone(ZoneId.of(\"Europe/Vienna\")).format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy HH:mm\"))\n + \" \" + this.getFirstName()\n + \" \" + this.getLastName().substring(0,1) + \".\"\n //+ \", \" + this.getTelephoneNo()\n //+ \" (\" + this.getEmail() + \")\"\n ;\n }", "int getCreateTime();", "@Override\n public String toString() {\n return getUserName() + \" on \" + getDate() + \"\\n\" + message + \"\\nType: \" + getType();\n }", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public String getCreatetime() {\n\t\treturn createtime;\n\t}", "public String getModifytime() {\n return modifytime;\n }", "public int getUserTime() {\n\t\treturn this.userTime;\n\t}", "public Long getCreatetime() {\n return createtime;\n }", "public static String formatDateForDetails(Timestamp date) {\n SimpleDateFormat format = new SimpleDateFormat(\"dd MMM yyyy | hh:mm aaa\", Locale.getDefault());\n return format.format(new Date(date.getTime()));\n }", "@Override\n public String toString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'@'HH:mm:ss\");\n String userInformation = new String();\n Date date = new Date();\n userInformation = \"[\" + username + \" - \" +\n socket.getInetAddress().getHostAddress() +\n \":\" + socket.getPort() + \" - \" + formatter.format(date)\n + \"]: \";\n return userInformation;\n }", "String timeStamp() {\n\n\t\tCalendar now = Calendar.getInstance();\n\n\t\t String y = String.valueOf(now.get(now.YEAR));\n\t\t String mo = String.valueOf(now.get(now.MONTH)+1);\n\t\t String d = String.valueOf(now.get(now.DAY_OF_MONTH));\n\t\t String h = String.valueOf(now.get(now.HOUR_OF_DAY));\n\t\t String m = String.valueOf(now.get(now.MINUTE));\n\t\t String s = String.valueOf(now.get(now.SECOND));\n\t\t String ms = String.valueOf(now.get(now.MILLISECOND));\n\n\n\t return h + m + s + ms;\n\n\n\n }", "public static String fn_GetCurrentTimeStamp() {\n\t\tDate dte = new Date();\n\t\tDateFormat df = DateFormat.getDateTimeInstance();\n\t\tString strdte = df.format(dte);\n\t\tstrdte = strdte.replaceAll(\":\", \"_\");\n\t\treturn strdte;\n\t}", "String getCreated_at();", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}", "private String getCurrentTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public GETINFO(int time, String userName) {\n\t\tsuper(Operation.GETINFO);\n\t\tusername = userName;\n\t\tthis.time = time;\n\t\t //this.operation = Operation.GETINFO;\n\t}", "@Override\r\n public String toString() {\r\n return pontosTimeMandante + \" x \" + pontosTimeVisitante + \" - \" + (isFinalizado() ? \"Finalizado\" : \"Em andamento\");\r\n }", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "@Override\r\n\tpublic void description() {\n\t\tSystem.out.println(\"Seorang yang mengendarai kendaraan dan bekerja\");\r\n\t}", "public String TI()\n\t{\n\t\tDateTimeFormatter f = DateTimeFormatter.ofPattern(\"hh:mm a\");\n\t\tString ti = f.format(st);\n\t\tString ti2 = f.format(et);\n\t\treturn ti + \" - \" + ti2;\n \t}", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "private void PrintTimeToET() {\n\t\tfinal Calendar c = Calendar.getInstance();\n\t\tjetztStdTxt.setText(Integer.toString(c.get(Calendar.HOUR_OF_DAY)));\n\t\tjetztMinTxt.setText(Integer.toString(c.get(Calendar.MINUTE)));\n\n\t}", "public static void main(String[] args) throws ParseException {\n LocalDate dataAtual = LocalDate.now(); //temos a data atual aqui\n\n System.out.println(\"Data Atual: \" + dataAtual);\n\n LocalTime horaAtual = LocalTime.now(); //hora de agora\n\n System.out.println(\"Hora atual: \" + horaAtual.format(DateTimeFormatter.ofPattern(\"HH:mm:ss\")));\n\n LocalDateTime dataAutalHoraAtual = LocalDateTime.now();\n\n System.out.println(\"Hora e data atual: \" + dataAutalHoraAtual.format(DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm\")));\n }", "@Override\n public String toString() {\n return date.format(DateTimeFormatter.ofPattern(\"dd.MM.yyyy\")) + \" - \" + note;\n }", "public String getDate() {\n\t\treturn logInfoSplit[0] + \"_\" + logInfoSplit[1];\n\t}", "@Override\n public String toString(){\n String format = \"%1$-30s %2$-20s %3$-20s %4$-12s %5$-3s %6$-12s\";\n return String.format(format, this.title, this.stream, this.type,\n this.start_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)), \"-\", this.end_date.format(DateTimeFormatter.ofPattern(data.daTiFormat)));}", "public String toString() {\n return hour+\" \"+minute;\r\n }", "public String getTime() {\n\t}", "public static String getTimeStamp() {\r\n\r\n\t\tlong now = (System.currentTimeMillis() - startTime) / 1000;\r\n\r\n\t\tlong hours = (now / (60 * 60)) % 24;\r\n\t\tnow -= (hours / (60 * 60)) % 24;\r\n\r\n\t\tlong minutes = (now / 60) % 60;\r\n\t\tnow -= (minutes / 60) % 60;\r\n\r\n\t\tlong seconds = now % 60;\r\n\r\n\t return String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\r\n\t}", "String timeModified();", "@Override\n public String toString() {\n if (!this.by.equals(\"\")) {\n return \"[D]\" + getDescription() + \" (by: \" + this.by + \")\";\n } else {\n String dateToPrint = this.todoDate.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n return \"[D]\" + getDescription() + \" (by: \" + dateToPrint + \")\";\n }\n }", "public String info() {\n\t\t\tString instrumentsString = \" \";\n\t\t\tfor(Instruments i : Instruments.values()){\n\t\t\t\tinstrumentsString +=i.toString() + \"\\n\";\n\t\t\t}\n\t\t\treturn (\"База данных представляет из себя набор старцев(обьектов Olders),\" +\"\\n\"+\n \"каждый из которых имеет поля :\" +\"\\n\"+\n \"id(уникальный идентификатор)\" +\"\\n\"+\n \"name(имя старца)\" +\"\\n\"+\n \"userid(уникальный идентификатор пользователя, который является его владельцем)\" +\"\\n\"+\n \"dateofinit-дата инициализация старца\");\n\t\t}", "@Override\n public String toString(){\n return title + \"\\n\" + date;\n }", "private static void m1() {\n\n String d = \"2019/03/22 10:00-11:00\";\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm-HH:mm\");\n try {\n Date parse = df.parse(d);\n System.out.println(df.format(parse));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "private static String timeLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, TIME_STR, TIME);\n }", "public String getEventInfo()\n {\n return \"Event ID: \" + this.hashCode() + \" | Recorded User\\n\" + String.format(\"\\tName %s \\n\\tDate of Birth %s \\n\\tEmail %s \\n\\tContact Number %s \\n\\tAge %d \\nDate %s \\nTime %s \\nParty Size %d \\nEstablishment \\n\\tName: %s \\n\\tAddress: %s\",\n user.getName(), user.getDateOfBirthAsString(), user.getEmail(), user.getPhoneNumber(), \n user.getAge(), getEventDateAsString(), getEventTimeAsString(), partyNumber, establishment.getName(), establishment.getAddress());\n }", "public String getGUITimestampFormat();", "private void showTime(){\r\n System.out.println(df.format(getHours()) + \":\" + df.format(getMinutes()+ \"\\n\"));\r\n }", "public static void main(String[] args) {\n StringBuffer content = new StringBuffer();\n content.append(\"hi all:\");\n content.append(\"\\n\");\n content.append(\" 附件是\");\n Date cur = new Date();\n\n\n content.append(getDateByFormat(cur,\"MM\") + \"月\"+getDateByFormat(cur,\"dd\")+\"日\");\n content.append(\"oneday项目pv/uv\");\n\n System.out.println(content.toString());\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n public String obtenerMes(){\n this.mes = java.time.LocalDateTime.now().toString().substring(5,7);\n return this.mes;\n\n }", "public String getBeginTime() {\n/* 28 */ return this.beginTime;\n/* */ }", "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "public String getTime()\r\n\t{\r\n\t\treturn displayString;\r\n\t}", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "public static String timestamp() {\n\t\tString t = new SimpleDateFormat(\"yyyy-MM-dd HH-mm-ss\").format(new Date());\n\t\t// File f=new\n\t\t// File(String.format(\"%s.%s\",t,RandomStringUtils.randomAlphanumeric(8)));\n\t\tSystem.out.println(\"Time is :\" + t);\n\t\treturn t;\n\t}", "public static boolean isPassOneHour(String pass)\n {\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = new Date();\n String current = dateFormat.format(date);\n\n //Extract current data time all values\n\n int current_year = Integer.parseInt(current.substring(0, 4));\n int current_month = Integer.parseInt(current.substring(5,7))-1;\n int current_day = Integer.parseInt(current.substring(8,10));\n\n int current_hour = Integer.parseInt(current.substring(11,13));\n int current_minute = Integer.parseInt(current.substring(14,16));\n int current_seconds = Integer.parseInt(current.substring(17));\n\n //String pass = \"2016-10-05 10:14:00\";\n\n //Extract last update data (pass from parameter\n\n int year = Integer.parseInt(pass.substring(0, 4));\n int month = Integer.parseInt(pass.substring(5,7))-1;\n int day = Integer.parseInt(pass.substring(8,10));\n\n int hour = Integer.parseInt(pass.substring(11,13));\n int minute = Integer.parseInt(pass.substring(14,16));\n int seconds = Integer.parseInt(pass.substring(17));\n\n\n System.out.println(\"CURRENT: \" + current_year+\"/\"+current_month+\"/\"+current_day+\" \"+current_hour+\":\"+current_minute+\":\"+current_seconds);\n\n System.out.println(\"PASS: \" + year+\"/\"+month+\"/\"+day+\" \"+hour+\":\"+minute+\":\"+seconds);\n\n if (current_year == year)\n {\n if (current_month == month)\n {\n if (current_day == day)\n {\n if (current_hour > hour)\n {\n if ((current_hour - hour > 1))\n {\n //Bi ordu gutxienez\n System.out.println(\"Bi ordu gutxienez: \" + (current_hour) + \" / \" + hour);\n return true;\n }\n else\n {\n if (((current_minute + 60) - minute ) < 60)\n {\n //Ordu barruan dago\n System.out.println(\"Ordu barruan nago ez delako 60 minutu pasa: \" + ((current_minute + 60) - minute ));\n return false;\n }\n else\n {\n //Refresh\n System.out.println(\"Eguneratu, ordu bat pasa da gutxienez: \" + ((current_minute + 60) - minute ));\n return true;\n }\n }\n\n }\n }\n }\n }\n return false;\n }", "public String getSystemDateTime() {\n\t\tjava.text.SimpleDateFormat sdfDate = new java.text.SimpleDateFormat(\"yyyy/MM/dd\");\n java.text.SimpleDateFormat sdfTime = new java.text.SimpleDateFormat(\"HH:mm\");\n Date now = new Date();\n String strDate = sdfDate.format(now);\n String strTime = sdfTime.format(now);\n System.out.println(\"Date: \" + strDate);\n System.out.println(\"Time: \" + strTime); \n return \"date\"+strDate+\" \"+strTime;\n\t}", "public String toString() {\n\t\treturn time + \" - \" + name;\n\t}", "public static void main(String[] args)\r\n/* 96: */ {\r\n/* 97:104 */ SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n/* 98:105 */ String qiandaotime = df.format(new Date());\r\n/* 99:106 */ System.out.println(qiandaotime);\r\n/* 100: */ }", "public String toString(){\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(\"dd-MM-yyyy HH:mm\");\n\t\treturn \"Estimated completion: \" + fmt.print(super.getEstimatedEndTime());\n\t}", "public int getTime() { return _time; }" ]
[ "0.6188952", "0.61672103", "0.6139154", "0.6096982", "0.6086093", "0.60723037", "0.60056585", "0.593095", "0.59185123", "0.59055793", "0.5895581", "0.5849547", "0.5848497", "0.5836265", "0.5836265", "0.5832943", "0.580598", "0.580598", "0.5771698", "0.57696366", "0.57670367", "0.5738039", "0.57121706", "0.5712105", "0.57023007", "0.5700429", "0.5698739", "0.5698739", "0.5694801", "0.5690244", "0.567875", "0.5660851", "0.5647863", "0.5646403", "0.5633839", "0.5623982", "0.56198144", "0.56197184", "0.56193304", "0.5603909", "0.55882055", "0.55804545", "0.5579246", "0.55748576", "0.55723053", "0.55721545", "0.55655396", "0.5557787", "0.55448246", "0.5542412", "0.5512193", "0.55095696", "0.55095696", "0.5509299", "0.5505527", "0.5503734", "0.5501681", "0.5495615", "0.5495598", "0.5487795", "0.5483512", "0.5481297", "0.547826", "0.5474608", "0.5469373", "0.54679596", "0.5465873", "0.5464986", "0.54627264", "0.54627264", "0.5461851", "0.5458201", "0.54527414", "0.54499793", "0.5446734", "0.544495", "0.5444857", "0.544464", "0.5443915", "0.54400355", "0.5431415", "0.5429629", "0.5423379", "0.5414592", "0.541157", "0.54108256", "0.5407832", "0.54038674", "0.54002315", "0.5395525", "0.5393252", "0.53930056", "0.53902256", "0.5388432", "0.5388418", "0.5383469", "0.5382514", "0.53789544", "0.5378495", "0.5373002", "0.5369029" ]
0.0
-1
Adjust the size of the video so it fits on the screen
private void setDimension() { float videoProportion = getVideoProportion(); int screenWidth = getResources().getDisplayMetrics().widthPixels; int screenHeight = getResources().getDisplayMetrics().heightPixels; float screenProportion = (float) screenHeight / (float) screenWidth; ViewGroup.LayoutParams lp = mVideoPlayer.getLayoutParams(); if (videoProportion < screenProportion) { lp.height = screenHeight; lp.width = (int) ((float) screenHeight / videoProportion); } else { lp.width = screenWidth; lp.height = (int) ((float) screenWidth * videoProportion); } mVideoPlayer.setLayoutParams(lp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onVideoSizeChanged(MediaPlayer mp, int width, int height) {\n adjustSize(mVideoView, width, height, DisplayType.CENTER_INSIDE);\n //adjustSize(mVideoView, width, height, DisplayType.CENTER_CROP);\n //adjustSize(mVideoView, width, height, DisplayType.CENTER);\n //adjustSize(mVideoView, width, height, DisplayType.FIT_XY);\n }", "@Override\n public void onVideoSizeChanged(MediaPlayer player, int width, int height) {\n \n }", "public void setSize(VideoSize size) {\n this.size = size;\n }", "@Override\n\t\t\tpublic void onVideoSizeChanged(MediaPlayer mp, int width,\n\t\t\t\t\tint height) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onVideoSizeChanged(MediaPlayer mp, int width,\n\t\t\t\t\tint height) {\n\t\t\t\t\n\t\t\t}", "public static void setRecorderVideoSize(Size size){\n\t}", "@Override\n\t\t\tpublic void onVideoSizeChanged(MediaPlayer mp, int width, int height) {\n\t\t\t\tLog.d(TAG, \"onVideoSizeChanged called \" + width + \":\" + height);\n\t\t\t\tif (width == 0 || height == 0) {\n\t\t Log.e(TAG, \"invalid video width(\" + width + \") or height(\" + height + \")\");\n\t\t return;\n\t\t }\n\t\t mVideoWidth = width;\n\t\t mVideoHeight = height;\n\t\t playMedia(true);\n\t\t\t}", "@Override\r\n\t\tpublic void onVideoSizeChanged(int width, int height) {\n\t\t\tUtils.printLog(TAG, \"onVideoSizeChanged width =\" + width + \" height =\" + height+\" mVideoContrl.isbVideoDisplayByHardware()=\"+mVideoContrl.isbVideoDisplayByHardware());\r\n//\t\t\tmSurfaceView.setBackgroundColor(getResources().getColor(R.color.transparent_background));\r\n\r\n\t\t\tif(clienttype.contains(\"938\")|| clienttype.contains(\"838\")){\r\n\t\t\t\tif(mVideoContrl.isbVideoDisplayByHardware()){//0067739: 多屏互动:手机端推送用手机拍的视频(竖着拍)到电视,在电视端播放时图像里的景物和人都压得很扁,没做适配处理\r\n\t\t\t\t\tsetVideoDisplayFullScreen();\r\n\t\t\t\t\tmVideoContrl.setbVideoDisplayByHardware(false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetVideoDisplayRotate90();\r\n\t\t\t\t}\r\n\t\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n\t\t\t\t\tLog.d(TAG\t,\"onVideoSizeChanged mVideoContrl.getPlayMediaBean()=\"+mVideoContrl.getPlayMediaBean().mPath);\r\n\t\t\t\t}\r\n\t\t\t}\r\n//\t\t\tif(mVideoContrl.isbVideoDisplayByHardware()){//如果返回硬解标志,App不处理\r\n//\t\t\t\tmVideoContrl.setbVideoDisplayByHardware(false);\r\n//\t\t\t\treturn;\r\n//\t\t\t}\r\n//\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n//\t\t\t\tLog.d(TAG\t,\"onVideoSizeChanged mVideoContrl.getPlayMediaBean()=\"+mVideoContrl.getPlayMediaBean().mPath);\r\n//\t\t\t}\r\n//\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n//\t\t\t\tMediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();\r\n//\t\t\t\tmediaMetadataRetriever.setDataSource(mVideoContrl.getPlayMediaBean().mPath);\r\n//\t\t\t\tString rotation = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);\r\n//\t\t\t\tUtils.printLog(TAG, \"onVideoSizeChanged mediaMetadataRetriever rotation = \"+rotation);\r\n//\t\t\t\tif(rotation.equals(\"90\")||rotation.equals(\"270\")){\r\n//\t\t\t\t\tsetVideoDisplayRotate90();\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t}", "@Override\n public void resize(int width, int height) {\n camera.viewportWidth = width/25;\n camera.viewportHeight = height/25;\n camera.update();\n }", "default void onVideoSizeChanged(int oldWidth, int oldHeight, int width, int height) {\n }", "@Override\r\n public void getVideoSize(Point outSize)\r\n {\r\n outSize.set(videoSize.x, videoSize.y);\r\n }", "@Override\n public void resize(int width, int height) {game.screenPort.update(width, height, true);}", "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 onVideoPrepared(@NonNull MediaPlayer mp) {\n\n int videoWidth = mp.getVideoWidth();\n int videoHeight = mp.getVideoHeight();\n float videoProportion = (float) videoWidth / (float) videoHeight;\n int screenWidth = mLinearVideo.getWidth();\n int screenHeight = mLinearVideo.getHeight();\n float screenProportion = (float) screenWidth / (float) screenHeight;\n ViewGroup.LayoutParams lp = mVideoView.getLayoutParams();\n\n if (videoProportion > screenProportion) {\n lp.width = screenWidth;\n lp.height = (int) ((float) screenWidth / videoProportion);\n } else {\n lp.width = (int) (videoProportion * (float) screenHeight);\n lp.height = screenHeight;\n }\n\n mVideoView.setLayoutParams(lp);\n mPlayView.setVisibility(View.VISIBLE);\n mDuration = mVideoView.getDuration();\n setSeekBarPosition();\n setTimeFrames();\n setTimeVideo(0);\n\n if (mOnVideoListener != null) {\n mOnVideoListener.onVideoPrepared();\n }\n }", "@Override\r\n public void resize(int width, int height)\r\n {\r\n vistaJuego.update(width, height); // Esta por su parte permite actualizar las dimensiones de la camara y asi se ajuste el juego a la pantalla del dispositivo movil\r\n camara.update(); // De igual modo se actualiza la camara\r\n }", "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 }", "public void setTargetResolution(int w, int h) {\n captureW = w;\n captureH = h;\n }", "@Override\n\t\t\tpublic void doMyThings() {\n\t\t\t\tsetVideoScale(SCREEN_DEFAULT);\n\t\t\t}", "@Override\r\n\tpublic void onVideoSizeChanged(MediaPlayer mp, int width, int height) {\n\t\tLog.v(LOGTAG, \"onVideoSizeChanged Called\");\r\n\t}", "void setTubeUpDimension(double width, double height);", "@Override\n\t\t\t\t\tpublic void onVideoSizeChanged(MediaPlayer mp, int width, int height) {\n\t\t\t\t\t videoView.setBackgroundColor(Color.TRANSPARENT);\n\t\t\t\t\t}", "public void setDisplaySize(int width, int height)\r\n\t{\r\n\t\tint xDiff = (int) Math.abs(height - height*ASPECT);\r\n\t\tint yDiff = (int) Math.abs(width - width/ASPECT);\r\n\t\tif (xDiff < yDiff)\r\n\t\t{\r\n\t\t\tmMaxWidth = (int) (height*ASPECT);\r\n\t\t\tmMaxHeight = height;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmMaxWidth = width;\r\n\t\t\tmMaxHeight = (int)(width/ASPECT);\r\n\t\t}\r\n\t}", "void setTubeDownDimension(double width, double height);", "private void showVideoSizeOptionDialog() {\n\t\t// TODO Auto-generated method stub\n\t\tCharSequence title = res.getString(R.string.stream_set_res_vid);\n\n\t\tfinal String[] videoSizeUIString = uiDisplayResource.getVideoSize();\n\t\tif (videoSizeUIString == null) {\n\t\t\tWriteLogToDevice.writeLog(\"[Error] -- SettingView: \",\n\t\t\t\t\t\"videoSizeUIString == null\");\n\t\t\tpreviewHandler\n\t\t\t\t\t.obtainMessage(GlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t.sendToTarget();\n\t\t\treturn;\n\t\t}\n\t\tint length = videoSizeUIString.length;\n\n\t\tint curIdx = 0;\n\t\tUIInfo uiInfo = reflection.refecltFromSDKToUI(\n\t\t\t\tSDKReflectToUI.SETTING_UI_VIDEO_SIZE,\n\t\t\t\tcameraProperties.getCurrentVideoSize());\n\t\tfor (int i = 0; i < length; i++) {\n\t\t\tif (videoSizeUIString[i].equals(uiInfo.uiStringInSetting)) {\n\t\t\t\tcurIdx = i;\n\t\t\t}\n\t\t}\n\n\t\tDialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\tfinal String value = (String) reflection.refecltFromUItoSDK(\n\t\t\t\t\t\tUIReflectToSDK.SETTING_SDK_VIDEO_SIZE,\n\t\t\t\t\t\tvideoSizeUIString[arg1]);\n\t\t\t\targ0.dismiss();\n\t\t\t\tif (value.equals(\"2704x1524 15\")\n\t\t\t\t\t\t|| value.equals(\"3840x2160 10\")) {\n\t\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(\n\t\t\t\t\t\t\tcontext);\n\t\t\t\t\tbuilder.setMessage(R.string.not_support_preview);\n\t\t\t\t\tbuilder.setNegativeButton(R.string.setting_no,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tpreviewHandler\n\t\t\t\t\t\t\t\t\t\t\t.obtainMessage(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tbuilder.setPositiveButton(R.string.setting_yes,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t\tcameraProperties.setVideoSize(value);\n\t\t\t\t\t\t\t\t\tpreviewHandler\n\t\t\t\t\t\t\t\t\t\t\t.obtainMessage(\n\t\t\t\t\t\t\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\t\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\t\t\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tbuilder.create().show();\n\t\t\t\t} else {\n\t\t\t\t\tcameraProperties.setVideoSize(value);\n\t\t\t\t\tpreviewHandler.obtainMessage(\n\t\t\t\t\t\t\tGlobalApp.MESSAGE_UPDATE_UI_VIDEO_SIZE)\n\t\t\t\t\t\t\t.sendToTarget();\n\t\t\t\t\tsettingValueList = getSettingValue();\n\t\t\t\t\tif (optionListAdapter == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\toptionListAdapter.notifyDataSetChanged();\n\t\t\t\t}\n\t\t\t\t/**/\n\t\t\t}\n\t\t};\n\t\tshowOptionDialog(title, videoSizeUIString, curIdx, listener, false);\n\t}", "@Override\n\tpublic void resize(int width, int height) {\n\t\tui.setViewport(width, height);\n\t\tcamera.setToOrtho(false);\n\t}", "@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 uiViewport.update( width, height );\n uiCamera.update();\n }", "@Override\n public void onVideoSizeChanged(MediaPlayer mp, int arg1,\n int arg2) {\n progressBar.setVisibility(View.GONE);\n mp.start();\n }", "public void setSurfaceSize(int width, int height) {\n // synchronized to make sure these all change atomically\n synchronized (surfaceHolder) {\n canvasWidth = width;\n canvasHeight = height;\n }\n }", "@Override\n public void settings() {\n setSize(WIDTH, HEIGHT);\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tGdx.app.log(\"GameScreen\", \"resizing\");\n\t}", "@Override\r\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\r\n }", "void setVerticalResolution(int verticalResolution);", "private void setFrameSize(int width, int height){\r\n\t\tthis.framewidth=width;\r\n\t\tthis.frameheight=height;\r\n\t}", "@Override\n\tpublic void resize(int width, int height) {\n\t\tGdx.app.log(\"GameScreen\", \"Resizing\");\n\t}", "public void setFrameSize();", "@Override\n public void onPrepared(MediaPlayer mp) {\n mp.start();\n mp.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() {\n @Override\n public void onVideoSizeChanged(MediaPlayer mp, int arg1,\n int arg2) {\n // TODO Auto-generated method stub\n progressBar.setVisibility(View.GONE);\n mp.start();\n }\n });\n }", "public ParametersBuilder setMaxVideoSize(int maxVideoWidth, int maxVideoHeight) {\n this.maxVideoWidth = maxVideoWidth;\n this.maxVideoHeight = maxVideoHeight;\n return this;\n }", "@Override\n public void resize(int width, int height) {\n stage.getViewport().update(width, height, true);\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\tgamePort.update(width,height);\n\n\t}", "VideoSize getSize() {\n return size;\n }", "public void settings() { size(1200, 800); }", "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 setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }", "public void settings() {\r\n size(WIDTH, HEIGHT); // Set size of screen\r\n }", "public void setDesiredSize(int width, int height) {\n mDesiredWidth = width;\n mDesiredHeight = height;\n if (mRenderSurface != null) {\n mRenderSurface.resize(width, height);\n }\n }", "public void initSize() {\n WIDTH = 320;\n //WIDTH = 640;\n HEIGHT = 240;\n //HEIGHT = 480;\n SCALE = 2;\n //SCALE = 1;\n }", "@Override\n public void resize(int width, int height) {\n Gdx.app.log(TAG, \"Resized to width = \" + width + \" height = \" + height);\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 }", "@Override\n\tpublic void resize(int width, int height) {\n\t stage.getViewport().update(width, height, true);\n\t}", "@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}", "public double getVideoWidth() {\n return getElement().getVideoWidth();\n }", "public void setVideoPort(int port);", "public void setCameraPreviewSize(int width, int height) {\n Log.d(TAG, \"setCameraPreviewSize\");\n mIncomingWidth = width;\n mIncomingHeight = height;\n mIncomingSizeUpdated = true;\n }", "void setVResolution(short resolution);", "@Override\n public void resize(int w, int h) {\n mainStage.getViewport().update(w, h, true);\n userInterface.getViewport().update(w, h, true);\n }", "@Override\n public void resize(int width, int height) {\n bgViewPort.update(width, height, true);\n stage.getViewport().update(width, height, true);\n fonts.getFontViewport().update(width, height, true);\n }", "public synchronized void setManualFramingRect(int width, int height) {\n if (initialized) {\n Point screenResolution = getScreenResolution();\n if (width > screenResolution.x) {\n width = screenResolution.x;\n }\n if (height > screenResolution.y) {\n height = screenResolution.y;\n }\n int leftOffset = (screenResolution.x - width) / 2;\n int topOffset = (screenResolution.y - height) / 2;\n framingRect = new Rect(leftOffset, topOffset, leftOffset + width, topOffset + height);\n Log.d(TAG, \"Calculated manual framing rect: \" + framingRect);\n framingRectInPreview = null;\n } else {\n requestedFramingRectWidth = width;\n requestedFramingRectHeight = height;\n }\n }", "void setSize(float w, float h) {\n _w = w;\n _h = h;\n }", "public void setSize(float width, float height);", "public void resize_screen(){\r\n \tstop_scn_updates();\r\n \tscn_font_size = min_font_size+1;\r\n \twhile (scn_font_size < max_font_size){\r\n \t\tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \t\tcalc_screen_size();\r\n \t\tif (scn_image.getWidth() < main_panel_width\r\n \t\t\t&& scn_image.getHeight() < main_panel_height){\r\n \t\t\tscn_font_size++;\r\n \t\t} else {\r\n \t\t scn_font_size--;\r\n \t\t break;\r\n \t\t}\r\n \t} \t\r\n \tscn_font = new Font(tz390.z390_font,Font.BOLD,scn_font_size);\r\n \tcalc_screen_size();\r\n start_scn_updates();\r\n }", "@Override public void resize (int width, int height) {\n\t\tviewport.update(width, height, true);\n\t\tstage.getViewport().update(width, height, true);\n\t}", "public void SetResolution() {\r\n DisplayMetrics displayMetrics = new DisplayMetrics();\r\n WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);\r\n wm.getDefaultDisplay().getMetrics(displayMetrics);\r\n this.ScreenWidth = displayMetrics.widthPixels;\r\n this.ScreenHeight = displayMetrics.heightPixels;\r\n }", "@Override\n public void resize(int width, int height) {\n \n }", "@Override\n\tpublic void setResolution(Dimension size) {\n\n\t}", "public String getVideoResolution() {\n //Camera.Size s = mCamera.getParameters().getPreviewSize();\n //return s.width + \"x\" + s.height;\n if (mProfile == null)\n return null;\n return mProfile.videoFrameWidth + \"x\" + mProfile.videoFrameHeight;\n }", "@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 }", "public void setPreviewSize(int width, int height) {\n String v = Integer.toString(width) + \"x\" + Integer.toString(height);\n set(\"preview-size\", v);\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 }", "abstract public VideoDefinition createVideoDefinition(int width, int height);", "@Override\r\n public void setListener(NexVideoRenderer.IListener listener) {\r\n this.videoSizeListener = listener;\r\n }", "public void onPrepared(MediaPlayer mediaPlayer) {\n progressDialog.dismiss();\n //if we have a position on savedInstanceState, the video playback should start from here\n videoView.seekTo(position);\n if (position == 0) {\n } else {\n //if we come from a resumed activity, video playback will be paused\n videoView.pause();\n }\n// mediaController.setAnchorView(videoView);\n\n // TODO Auto-generated method stub\n int duration = mediaPlayer.getDuration() / 1000;\n int hours = duration / 3600;\n int minutes = (duration / 60) - (hours * 60);\n int seconds = duration - (hours * 3600) - (minutes * 60);\n String formatted = String.format(\"%02d:%02d\", minutes, seconds);\n //Toast.makeText(getApplicationContext(), \"duration is \" + formatted , Toast.LENGTH_LONG).show();\n textViewDuration.setText(formatted);\n initComponentVideo(videoView, floatingActionButton, appCompatSeekBarProgressBar, (int) java.util.concurrent.TimeUnit.MINUTES.toSeconds(minutes) + seconds, mediaPlayer, textViewDuration, smallPlayButton, soundButton, fullScreenButton);\n\n // appCompatSeekBarProgressBar.setProgress(videoView.getDuration());\n\n }", "public double getVideoLength(){\n\t\treturn videoLength;\n\t}", "@Override\n\tpublic void resize(int arg0, int arg1) {\n\t\t\n\t\t\n\t\t\n\t\tif (getScreen() == null)\n\t\t{\n\t\t\tSCREEN_WIDTH = arg0;\n\t \tSCREEN_HEIGHT = arg1;\n\t \t\n\t \tfloat w = 800, h = 550;\n\t \tif (SCREEN_WIDTH * h < SCREEN_HEIGHT * w)\n\t \t\tRATIO = (float)SCREEN_WIDTH / (float)w;\n\t \telse\n\t \t\tRATIO = (float)SCREEN_HEIGHT / (float)h;\n\t \t\n\t \tGdx.app.log(\"RATIO\", \"\"+RATIO);\n\t\t\tsetScreen(getLoadingScreen(DESTINATION.START,DESTINATION.NO));\n\t \t//setScreen(getStartScreen());\n\t\t}\n\t\telse\n\t\t\tthis.getScreen().resize(arg0, arg1);\n\t}", "public void setSurfaceSize(int width, int height) {\n\t\t// synchronized to make sure these all change atomically\n\t\tsynchronized (mSurfaceHolder) {\n\t\t\tmCanvasWidth = width;\n\t\t\tmCanvasHeight = height;\n\n\t\t\t// don't forget to resize the background image\n\t\t\tmBackgroundImage = Bitmap.createScaledBitmap(mBackgroundImage, width, height, true);\n\t\t}\n\t}", "private void basicSize(){\n setSize(375,400);\n }", "@NonNull\n public VideoSize getVideoSize() {\n throw new UnsupportedOperationException(\"getVideoSize is not implemented\");\n }", "private void initVideo(String videoPath) {\n JCVideoPlayerStandard.startFullscreen(this, JCVideoPlayerStandard.class,\n videoPath,\"\");\n\n\n\n\n\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 }", "@Override\n\t\t\t\tpublic void onPrepared(MediaPlayer mediaPlayer) {\n\t\t\t\t\tmediaPlayer.setPlaybackSpeed(1.0f);\n\t\t\t\t\tmVideoView.addTimedTextSource(subtitle_path);\n\t\t\t\t\tmVideoView.setTimedTextShown(true);\n\t\t\t\t\tmVideoView.setVideoLayout(VideoView.VIDEO_LAYOUT_STRETCH, 0);\n\n\t\t\t\t}", "public static boolean verifyVideoSize(Size option) {\n return (option.getWidth() <= 1080);\n }", "public void playMedia(boolean isplay) {\n\t\tSystem.err.println(\"height:- \"+mVideoHeight);\n\t\tSystem.err.println(\"width:- \"+mVideoWidth);\n\t\t\tif (isplay) {\n\t\t\t\tvideoviewer.changeVideoSize(mVideoWidth, mVideoHeight);\n\t\t\t\tvideoviewer.start();\n\t\t\t\ttimer.start();\n\t\t\t} else {\n\t\t\t\tvideoviewer.pause();\n\t\t\t\ttimer.cancel();\n\t\t\t}\n\t\t\n }", "public void settings() {\n size(640, 384);\n }", "@Override\n\tpublic void resize(float width, float height) {\n\t}", "public void setVideoDisplayRotate90() {\n float ratio = (float)panel_height/panel_width;\n RelativeLayout.LayoutParams params = null;\n int videoHeight = panel_height;\n int videoWidth = panel_height * panel_height / panel_width;\n Log.i(TAG, \"--- setVideoDisplayRotate90--- mScreenResolutionWidth:\" + panel_width + \" screenHeight:\"\n + panel_height + \" ratio:\" + ratio + \" videoWidth:\" + videoWidth);\n params = new RelativeLayout.LayoutParams(videoWidth , videoHeight);\n video_ly.setLayoutParams(params);\n }", "public void resize(int w, int h) {}", "public void setPreviewVideoDefinition(VideoDefinition vdef);", "protected abstract void onResize(int width, int height);", "public void settings() {\r\n size(750, 550);\r\n }", "@Override\n protected void onSizeChanged(int w, int h, int oldw, int oldh) {\n super.onSizeChanged(w, h, oldw, oldh);\n canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);\n drawCanvas = new Canvas(canvasBitmap);\n }", "@Override\n\tpublic void onResize(int width, int height) {\n\t}", "@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 static Point getMaxVideoSizeInViewport(boolean orientationMayChange, int viewportWidth,\n int viewportHeight, int videoWidth, int videoHeight) {\n if (orientationMayChange && (videoWidth > videoHeight) != (viewportWidth > viewportHeight)) {\n // Rotation is allowed, and the video will be larger in the rotated viewport.\n int tempViewportWidth = viewportWidth;\n viewportWidth = viewportHeight;\n viewportHeight = tempViewportWidth;\n }\n\n if (videoWidth * viewportHeight >= videoHeight * viewportWidth) {\n // Horizontal letter-boxing along top and bottom.\n return new Point(viewportWidth, Util.ceilDivide(viewportWidth * videoHeight, videoWidth));\n } else {\n // Vertical letter-boxing along edges.\n return new Point(Util.ceilDivide(viewportHeight * videoWidth, videoHeight), viewportHeight);\n }\n }", "@Override\n\tpublic void resize(int width, int height) {\n\t\trenderer.setSize(width, height);\n\t\tthis.width = width;\n\t\tthis.height = height;\n\t}", "@Override\n public void ChangeMode() {\n if (getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {\n\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n\n WindowManager.LayoutParams attrs = getWindow().getAttributes();\n attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;\n getWindow().setAttributes(attrs);\n getWindow().addFlags(\n WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);\n\n\n RelativeLayout.LayoutParams layoutParams =\n new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, RelativeLayout.LayoutParams.FILL_PARENT);\n layoutParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);\n layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n\n videoView.setLayoutParams(layoutParams);\n otherview.setVisibility(View.GONE);\n\n ivSendGift.setVisibility(View.GONE);\n\n\n } else {\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n WindowManager.LayoutParams attrs = getWindow().getAttributes();\n attrs.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);\n getWindow().setAttributes(attrs);\n getWindow().clearFlags(\n WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);\n\n\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT, 240);\n ivSendGift.setVisibility(View.VISIBLE);\n videoView.setLayoutParams(lp);\n otherview.setVisibility(View.VISIBLE);\n\n\n }\n }", "private void initVideoView(Context context) {\n IjkMediaPlayer.loadLibrariesOnce(null);\n IjkMediaPlayer.native_profileBegin(\"libijkplayer.so\");\n\n mAppContext = context.getApplicationContext();\n mActivity = (Activity) context;\n if (mActivity != null) {\n this.mBrightness = mActivity.getWindow().getAttributes().screenBrightness;\n }\n this.mAudioManager = (AudioManager) mAppContext.getSystemService(Context.AUDIO_SERVICE);\n this.mVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);\n if (mMediaController != null) {\n mMediaController.setVideoView(this);\n }\n screenWidthPixels = getScreenWidth(context);\n\n setRender(mCurrentRender);\n\n mVideoWidth = 0;\n mVideoHeight = 0;\n // REMOVED: getHolder().addCallback(mSHCallback);\n // REMOVED: getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);\n setFocusable(true);\n setFocusableInTouchMode(true);\n requestFocus();\n // REMOVED: mPendingSubtitleTracks = new Vector<Pair<InputStream, MediaFormat>>();\n setCurrentState(STATE_IDLE);\n mTargetState = STATE_IDLE;\n\n subtitleDisplay = new TextView(context);\n subtitleDisplay.setTextSize(16);\n subtitleDisplay.setShadowLayer(3, 5, 5, getResources().getColor(R.color.black));\n subtitleDisplay.setGravity(Gravity.CENTER);\n subtitleDisplay.setTextColor(getResources().getColor(R.color.white));\n// subtitleDisplay.setBackgroundResource(R.color.red);\n LayoutParams layoutParams_txt = new LayoutParams(\n LayoutParams.MATCH_PARENT,\n LayoutParams.WRAP_CONTENT,\n Gravity.BOTTOM);\n addView(subtitleDisplay, layoutParams_txt);\n }", "@Override\n public void resize(int width, int height) {\n\n }", "@Override\r\n public void resize(int width, int height) {\r\n\r\n }", "public void setPreferredVideoDefinition(VideoDefinition vdef);" ]
[ "0.780383", "0.7289982", "0.7071185", "0.7020116", "0.7020116", "0.67517483", "0.67335826", "0.670226", "0.6685272", "0.66461104", "0.6547677", "0.6506225", "0.6363502", "0.6343906", "0.63048", "0.61217874", "0.6103383", "0.609394", "0.6065931", "0.60241765", "0.6021636", "0.5980938", "0.5968805", "0.59607655", "0.5953337", "0.5939847", "0.5935328", "0.5910472", "0.5908696", "0.5908615", "0.59001285", "0.5898667", "0.58912176", "0.5869984", "0.58691067", "0.5865783", "0.5853222", "0.5848681", "0.58473086", "0.5838933", "0.5826886", "0.5799339", "0.5781668", "0.57738376", "0.57699156", "0.57577085", "0.5745626", "0.57451", "0.57200396", "0.5719246", "0.5715852", "0.57056636", "0.5705094", "0.57043314", "0.56820244", "0.56761134", "0.5676014", "0.56486505", "0.5648244", "0.56481224", "0.56247354", "0.56157345", "0.5612341", "0.5609449", "0.55970705", "0.5584754", "0.5577652", "0.5577652", "0.5567003", "0.55593276", "0.5558188", "0.5557928", "0.55499685", "0.5541814", "0.5537404", "0.5532248", "0.5521492", "0.5520419", "0.55187917", "0.5508523", "0.55015254", "0.5478008", "0.54774857", "0.54767716", "0.5473957", "0.5457615", "0.5451915", "0.5450337", "0.5450264", "0.5449556", "0.5449361", "0.54491943", "0.5446571", "0.5446455", "0.54447454", "0.5432554", "0.54258054", "0.54251945", "0.54216796", "0.54172385" ]
0.8113865
0
Control whether the EGL context is preserved when the GLSurfaceView is paused and resumed. If set to true, then the EGL context may be preserved when the GLSurfaceView is paused. Whether the EGL context is actually preserved or not depends upon whether the Android device that the program is running on can support an arbitrary number of EGL contexts or not. Devices that can only support a limited number of EGL contexts must release the EGL context in order to allow multiple applications to share the GPU. If set to false, the EGL context will be released when the GLSurfaceView is paused, and recreated when the GLSurfaceView is resumed. The default is false.
public void preserveEGLContextOnPause(boolean preserveOnPause) { int sdkVersion = android.os.Build.VERSION.SDK_INT; if (sdkVersion >= 11) { try { this.getClass().getMethod("setPreserveEGLContextOnPause", boolean.class).invoke(this, preserveOnPause); } catch (Exception e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean swap() {\r\n if (! mEgl.eglSwapBuffers(mEglDisplay, mEglSurface)) {\r\n\r\n /*\r\n * Check for EGL_CONTEXT_LOST, which means the context\r\n * and all associated data were lost (For instance because\r\n * the device went to sleep). We need to sleep until we\r\n * get a new surface.\r\n */\r\n int error = mEgl.eglGetError();\r\n switch(error) {\r\n case EGL11.EGL_CONTEXT_LOST:\r\n return false;\r\n case EGL10.EGL_BAD_NATIVE_WINDOW:\r\n // The native window is bad, probably because the\r\n // window manager has closed it. Ignore this error,\r\n // on the expectation that the application will be closed soon.\r\n Log.e(\"EglHelper\", \"eglSwapBuffers returned EGL_BAD_NATIVE_WINDOW. tid=\" + Thread.currentThread().getId());\r\n break;\r\n default:\r\n throw new EglBadSurfaceException(\"eglSwapBuffers error \" + error);\r\n }\r\n }\r\n return true;\r\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tmGLSurfaceView.onPause();\n\t}", "@Override\n protected void onPause() {\n super.onPause();\n mGLSurfaceView.onPause();\n }", "public boolean isCurrent(EGLSurface eglSurface) {\n return argonGLContext.equals(argonEGL.eglGetCurrentContext()) &&\n eglSurface.equals(argonEGL.eglGetCurrentSurface(EGL10.EGL_DRAW));\n }", "@Override\n public void onPause() {\n \tsuper.onPause();\n mGLSurfaceView.onPause();\n }", "@Override\n protected void onPause()\n {\n super.onPause();\n mGLSurfaceView.onPause();\n }", "@Override\n protected void onPause()\n {\n super.onPause();\n mGLSurfaceView.onPause();\n }", "public void notifyPausing() {\n if (mSurfaceTexture != null) {\n Log.d(TAG, \"renderer pausing -- releasing SurfaceTexture\");\n mSurfaceTexture.release();\n mSurfaceTexture = null;\n }\n if (mFullScreen != null) {\n mFullScreen.release(false); // assume the GLSurfaceView EGL context is about\n mFullScreen = null; // to be destroyed\n }\n mIncomingWidth = mIncomingHeight = -1;\n }", "@Override\n public void onResume() {\n \tsuper.onResume();\n mGLSurfaceView.onResume();\n }", "@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n mGLView.queueEvent(new Runnable() {\n @Override public void run() {\n // Tell the renderer that it's about to be paused so it can clean up.\n mRenderer.notifyPausing();\n }\n });\n mGLView.onPause();\n// Log.d(TAG, \"onPause complete\");\n }", "@Override\n protected void onResume() {\n super.onResume();\n mGLSurfaceView.onResume();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tourSurfaceView.onPause();\n\t}", "@Override\n protected void onResume()\n {\n super.onResume();\n mGLSurfaceView.onResume();\n }", "@Override\n protected void onResume()\n {\n super.onResume();\n mGLSurfaceView.onResume();\n }", "public boolean swapBuffers(EGLSurface eglSurface) {\n return argonEGL.eglSwapBuffers(argonGLDisplay, eglSurface);\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t\tourSurfaceView.resume();\n\t}", "@Override\n public void surfaceCreated(SurfaceHolder holder) {\n Log.d(TAG, \"surfaceCreated\");\n mRenderingPaused = false;\n mHolder = holder;\n updateRenderingState();\n }", "public boolean destroyLeakedSurfaces() {\n this.mTmpWindow = null;\n forAllWindows((Consumer<WindowState>) new Consumer() {\n /* class com.android.server.wm.$$Lambda$DisplayContent$rF1ZhFUTWyZqcBK8Oea3g5uNlM */\n\n @Override // java.util.function.Consumer\n public final void accept(Object obj) {\n DisplayContent.this.lambda$destroyLeakedSurfaces$16$DisplayContent((WindowState) obj);\n }\n }, false);\n return this.mTmpWindow != null;\n }", "public void release() {\n if (mEglDisplay != null && mEglSurface != null && mEglContext != null) {\n EGL14.eglMakeCurrent(this.mEglDisplay, this.mEglSurface, this.mEglSurface, this.mEglContext);\n EGL14.eglDestroySurface(mEglDisplay, mEglSurface);\n EGL14.eglDestroyContext(mEglDisplay, mEglContext);\n EGL14.eglTerminate(mEglDisplay);\n }\n EGL14.eglMakeCurrent(mEglDisplay, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT);\n }", "public void makeNothingCurrent() {\n if (!argonEGL.eglMakeCurrent(argonGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE,\n \t\tEGL10.EGL_NO_CONTEXT)) {\n throw new RuntimeException(\"eglMakeCurrent failed\");\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tourSurfaceView.onResume();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tourSurfaceView.pause();\n\n\t}", "@VisibleForTesting\n static void saveHomeSurfaceState(\n Bundle savedInstanceState, StartSurface startSurface, boolean isIncognito) {\n if (savedInstanceState == null || startSurface == null || isIncognito\n || !savedInstanceState.getBoolean(DID_CHANGE_TABLET_MODE)) {\n return;\n }\n\n savedInstanceState.putBoolean(RESUME_HOME_SURFACE_ON_MODE_CHANGE, true);\n }", "private boolean canResumeGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && isGamePaused();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tsurfaceView.resume();\n\t}", "public boolean isPaused();", "@Override\n public void onPause() {\n isFromPreviousRun = true;\n // Handle case: Pause view when flashing the torch\n if (isAlreadyFlashed && isCameraRecording) {\n\n // Double if here because sometimes the condition is right, but the timer had been cancel, prevent crash\n checkTimer();\n\n isAlreadyFlashed = false;\n }\n\n checkTimer();\n\n // Handle case: Pause view when camera is recording video //old code\n if (isCameraRecording) {\n\n // Temporary disable\n isCameraRecording = false;\n\n // Stop camera\n cameraView.stopRecording();\n\n isCameraRecording = true; // Restore\n }\n\n sensorManager.unregisterListener(this);\n super.onPause();\n }", "@SuppressWarnings(\"deprecation\")\n @Override\n protected void onDestroy() {\n super.onDestroy();\n isPaused = true;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.388 -0500\", hash_original_method = \"D0A5BC4F7F6AC39FDE4C2E9D6BB5947A\", hash_generated_method = \"67E24BB4C51F767EC1149075FE0D96C8\")\n \n public boolean eglMakeCurrent(EGLDisplay display, EGLSurface draw, EGLSurface read, EGLContext context){\n \taddTaint(display.getTaint());\n \taddTaint(draw.getTaint());\n \taddTaint(read.getTaint());\n \taddTaint(context.getTaint());\n \treturn getTaintBoolean();\n }", "@Override\r\n protected void onPause() {\r\n Log.d(LOGTAG, \"onPause\");\r\n super.onPause();\r\n\r\n if (mGlView != null) {\r\n mGlView.setVisibility(View.INVISIBLE);\r\n mGlView.onPause();\r\n }\r\n\r\n // Turn off the flash\r\n if (mFlashOptionView != null && mFlash) {\r\n // OnCheckedChangeListener is called upon changing the checked state\r\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {\r\n ((Switch) mFlashOptionView).setChecked(false);\r\n } else {\r\n ((CheckBox) mFlashOptionView).setChecked(false);\r\n }\r\n }\r\n\r\n try {\r\n vuforiaAppSession.pauseAR();\r\n } catch (ArException e) {\r\n Log.e(LOGTAG, e.getString());\r\n }\r\n }", "public boolean isUseOffscreenBuffer() {\n return paintStrategy instanceof OffscreenBufferStrategy;\n }", "@MainThread\n public boolean isSurfaceCreated() {\n return (mVideoView != null && isSurfaceCreated && !mVideoView.getHolder().isCreating() && mVideoView.getHolder().getSurface() != null);\n }", "public void enableCtxRecording();", "public void makeCurrent(EGLSurface eglSurface) {\n if (argonGLDisplay == EGL10.EGL_NO_DISPLAY) {\n // called makeCurrent() before create?\n Logger.debug(\"NOTE: makeCurrent w/o display\");\n }\n if (!argonEGL.eglMakeCurrent(argonGLDisplay, eglSurface, eglSurface, argonGLContext)) {\n throw new RuntimeException(\"eglMakeCurrent failed\");\n }\n }", "protected void onPause()\n {\n super.onPause();\n\n if (mGlView != null)\n {\n mGlView.setVisibility(View.INVISIBLE);\n mGlView.onPause();\n }\n\n if (mEstadoActualAPP == EstadoAPP.CAMERA_RUNNING)\n {\n actualizarEstadoAplicacion(EstadoAPP.CAMERA_STOPPED);\n }\n\n if (mFlash)\n {\n mFlash = false;\n setFlash(mFlash);\n }\n\n QCAR.onPause();\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.380 -0500\", hash_original_method = \"F2C45513A57BFF3B5C76E0152AB1D6FE\", hash_generated_method = \"DD976DED76E20815A49CC0DC51F1BCDD\")\n \n public boolean eglDestroyContext(EGLDisplay display, EGLContext context){\n \taddTaint(display.getTaint());\n \taddTaint(context.getTaint());\n \treturn getTaintBoolean();\n }", "public void pause() {\n // This must be safe to call multiple times.\n Util.validateMainThread();\n Log.d(TAG, \"pause()\");\n\n openedOrientation = -1;\n if (cameraInstance != null) {\n cameraInstance.close();\n cameraInstance = null;\n previewActive = false;\n }\n if (currentSurfaceSize == null && surfaceView != null) {\n SurfaceHolder surfaceHolder = surfaceView.getHolder();\n surfaceHolder.removeCallback(surfaceCallback);\n }\n if(currentSurfaceSize == null && textureView != null && Build.VERSION.SDK_INT >= 14) {\n textureView.setSurfaceTextureListener(null);\n }\n\n this.containerSize = null;\n this.previewSize = null;\n this.previewFramingRect = null;\n rotationListener.stop();\n\n fireState.previewStopped();\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tsurfaceView.pause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tmGLView.onPause();\n\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onDestroy();\n\t\tunReceiver();\n\t\tAppContext.getInstance().setSMSShow(false);\n\t}", "synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }", "synchronized void resumeGame() {\n myShouldPause = false;\n notify();\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif (DEBUG>=2) Log.d(TAG, \"onResumed'd\");\n\t\tIS_PAUSING = NO;\n\t\twl.acquire();\n\t\tpreview.onResume();\n\t}", "boolean getPausePreviewPref();", "void hasPausedPreview(boolean paused);", "@Override\n\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\truning = false;\n\t}", "public void release() {\n if (argonGLDisplay != EGL10.EGL_NO_DISPLAY) {\n // Android is unusual in that it uses a reference-counted EGLDisplay. So for\n // every eglInitialize() we need an eglTerminate().\n argonEGL.eglMakeCurrent(argonGLDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE,\n \t\tEGL10.EGL_NO_CONTEXT);\n argonEGL.eglDestroyContext(argonGLDisplay, argonGLContext);\n //EGL10.eglReleaseThread();\n argonEGL.eglTerminate(argonGLDisplay);\n }\n\n argonGLDisplay = EGL10.EGL_NO_DISPLAY;\n argonGLContext = EGL10.EGL_NO_CONTEXT;\n mEGLConfig = null;\n }", "boolean hasContext();", "boolean hasContext();", "public void applySurfaceChangesTransaction(boolean recoveringMemory) {\n WindowSurfacePlacer windowSurfacePlacer = this.mWmService.mWindowPlacerLocked;\n this.mTmpUpdateAllDrawn.clear();\n int repeats = 0;\n while (true) {\n repeats++;\n if (repeats > 6) {\n Slog.w(TAG, \"Animation repeat aborted after too many iterations\");\n clearLayoutNeeded();\n break;\n }\n if ((this.pendingLayoutChanges & 4) != 0) {\n this.mWallpaperController.adjustWallpaperWindows();\n }\n if ((this.pendingLayoutChanges & 2) != 0) {\n if (WindowManagerDebugConfig.DEBUG_LAYOUT) {\n Slog.v(TAG, \"Computing new config from layout\");\n }\n if (updateOrientationFromAppTokens()) {\n setLayoutNeeded();\n sendNewConfiguration();\n }\n }\n if ((this.pendingLayoutChanges & 1) != 0) {\n setLayoutNeeded();\n }\n if (repeats < 4) {\n performLayout(repeats == 1, false);\n } else {\n Slog.w(TAG, \"Layout repeat skipped after too many iterations\");\n }\n this.pendingLayoutChanges = 0;\n Trace.traceBegin(32, \"applyPostLayoutPolicy\");\n try {\n this.mDisplayPolicy.beginPostLayoutPolicyLw();\n forAllWindows(this.mApplyPostLayoutPolicy, true);\n this.pendingLayoutChanges |= this.mDisplayPolicy.finishPostLayoutPolicyLw();\n Trace.traceEnd(32);\n this.mInsetsStateController.onPostLayout();\n if (this.pendingLayoutChanges == 0) {\n break;\n }\n } catch (Throwable th) {\n Trace.traceEnd(32);\n throw th;\n }\n }\n this.mTmpApplySurfaceChangesTransactionState.reset();\n this.mTmpRecoveringMemory = recoveringMemory;\n Trace.traceBegin(32, \"applyWindowSurfaceChanges\");\n try {\n this.mIsRequestFullScreen = false;\n forAllWindows(this.mApplySurfaceChangesTransaction, true);\n this.mWmService.mAtmService.mHwATMSEx.notifyFullScreenStateChange(this.mDisplayId, this.mIsRequestFullScreen);\n this.mWmService.mHwWMSEx.handleWindowsAfterTravel(getDisplayId());\n Trace.traceEnd(32);\n prepareSurfaces();\n this.mLastHasContent = this.mTmpApplySurfaceChangesTransactionState.displayHasContent;\n this.mWmService.mDisplayManagerInternal.setDisplayProperties(this.mDisplayId, this.mLastHasContent, this.mTmpApplySurfaceChangesTransactionState.preferredRefreshRate, this.mTmpApplySurfaceChangesTransactionState.preferredModeId, true);\n boolean wallpaperVisible = this.mWallpaperController.isWallpaperVisible();\n if (wallpaperVisible != this.mLastWallpaperVisible) {\n this.mLastWallpaperVisible = wallpaperVisible;\n this.mWmService.mWallpaperVisibilityListeners.notifyWallpaperVisibilityChanged(this);\n }\n while (!this.mTmpUpdateAllDrawn.isEmpty()) {\n this.mTmpUpdateAllDrawn.removeLast().updateAllDrawn();\n }\n } catch (Throwable th2) {\n Trace.traceEnd(32);\n throw th2;\n }\n }", "public boolean isPaused() {\n return MotionViewer.this.isPaused();\n }", "@Override\n protected void onResume() {\n super.onResume();\n justAfterPause = false;\n }", "@Override\r\n\t\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\t\tIsRunning = false;\r\n\t\t}", "@Override\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\trunFlag = false;\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.384 -0500\", hash_original_method = \"F8BE74B02C97D5EFE0B64C835DE94243\", hash_generated_method = \"7BB38243A056BAD7E31B25917FA5A161\")\n \n public boolean eglDestroySurface(EGLDisplay display, EGLSurface surface){\n \taddTaint(display.getTaint());\n \taddTaint(surface.getTaint());\n \treturn getTaintBoolean();\n }", "public boolean isSurfaceWorld()\n {\n return false;\n }", "public boolean isPaused() {\n return _isPaused;\n }", "@Override\n public void onSaveInstanceState (Bundle savedInstanceState){\n super.onSaveInstanceState(savedInstanceState);\n\n savedInstanceState.putBoolean(\"useGpu\", mUtilizzoGPU.isChecked());\n }", "@Override\n\tpublic boolean isPauseScreen() {\n\t\treturn true;\n\t}", "public void disableCtxRecording();", "@Override\n public boolean isRunning() {\n return !paused;\n }", "protected void onPause() {\n super.onPause();\n SharedPreferences.Editor ed = mPrefs.edit();\n// ed.putBoolean(CreateSamplesView.SAMPLES_EXIST_KEY, ((CreateSamplesView)createSamplesView).samplesExist); //createSamplesView\n// ed.putBoolean(SMSWORD_EXIST_KEY, smsWordTableExist);\n ed.putBoolean(SAFE_MODE_KEY, safeMode);\n\n// if (((CreateSamplesView)createSamplesView).samplesExist) { //if samples were created during session, save contacts //createSamplesView\n//\t Set<String> exportContact = new HashSet<String>();\n//\t for (CreateSamplesContact contact : ((CreateSamplesView)createSamplesView).contacts)\n//\t \texportContact.add(contact.name + \"·*$\" + contact.phoneNumber); //token separator \n//\t ed.putStringSet(CreateSamplesView.EXPORT_CONTACT_KEY, exportContact);\n//\t \n//\t Set<String> exportSMS = new HashSet<String>(((CreateSamplesView)createSamplesView).sms);\n//\t ed.putStringSet(CreateSamplesView.EXPORT_SMS_KEY, exportSMS);\n// }\n\n ed.commit();\n }", "public boolean isPaused() {\n \t\treturn isPaused;\n \t}", "public interface EglBase {\n // EGL wrapper for an actual EGLContext.\n public interface Context { long getNativeEglContext(); }\n\n // According to the documentation, EGL can be used from multiple threads at the same time if each\n // thread has its own EGLContext, but in practice it deadlocks on some devices when doing this.\n // Therefore, synchronize on this global lock before calling dangerous EGL functions that might\n // deadlock. See https://bugs.chromium.org/p/webrtc/issues/detail?id=5702 for more info.\n public static final Object lock = new Object();\n\n // These constants are taken from EGL14.EGL_OPENGL_ES2_BIT and EGL14.EGL_CONTEXT_CLIENT_VERSION.\n // https://android.googlesource.com/platform/frameworks/base/+/master/opengl/java/android/opengl/EGL14.java\n // This is similar to how GlSurfaceView does:\n // http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.1_r1/android/opengl/GLSurfaceView.java#760\n public static final int EGL_OPENGL_ES2_BIT = 4;\n // Android-specific extension.\n public static final int EGL_RECORDABLE_ANDROID = 0x3142;\n\n // clang-format off\n public static final int[] CONFIG_PLAIN = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_RGBA = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_PIXEL_BUFFER = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_PIXEL_RGBA_BUFFER = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_ALPHA_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,\n EGL10.EGL_NONE\n };\n public static final int[] CONFIG_RECORDABLE = {\n EGL10.EGL_RED_SIZE, 8,\n EGL10.EGL_GREEN_SIZE, 8,\n EGL10.EGL_BLUE_SIZE, 8,\n EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,\n EGL_RECORDABLE_ANDROID, 1,\n EGL10.EGL_NONE\n };\n // clang-format on\n\n /**\n * Create a new context with the specified config attributes, sharing data with |sharedContext|.\n * If |sharedContext| is null, a root context is created. This function will try to create an EGL\n * 1.4 context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create(@Nullable Context sharedContext, int[] configAttributes) {\n return (EglBase14.isEGL14Supported()\n && (sharedContext == null || sharedContext instanceof EglBase14.Context))\n ? new EglBase14((EglBase14.Context) sharedContext, configAttributes)\n : new EglBase10((EglBase10.Context) sharedContext, configAttributes);\n }\n\n /**\n * Helper function for creating a plain root context. This function will try to create an EGL 1.4\n * context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }\n\n /**\n * Helper function for creating a plain context, sharing data with |sharedContext|. This function\n * will try to create an EGL 1.4 context if possible, and an EGL 1.0 context otherwise.\n */\n public static EglBase create(Context sharedContext) {\n return create(sharedContext, CONFIG_PLAIN);\n }\n\n /**\n * Explicitly create a root EGl 1.0 context with the specified config attributes.\n */\n public static EglBase createEgl10(int[] configAttributes) {\n return new EglBase10(null /* shaderContext */, configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.0 context with the specified config attributes\n * and shared context.\n */\n public static EglBase createEgl10(\n javax.microedition.khronos.egl.EGLContext sharedContext, int[] configAttributes) {\n return new EglBase10(new EglBase10.Context(sharedContext), configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.4 context with the specified config attributes.\n */\n public static EglBase createEgl14(int[] configAttributes) {\n return new EglBase14(null /* shaderContext */, configAttributes);\n }\n\n /**\n * Explicitly create a root EGl 1.4 context with the specified config attributes\n * and shared context.\n */\n public static EglBase createEgl14(\n android.opengl.EGLContext sharedContext, int[] configAttributes) {\n return new EglBase14(new EglBase14.Context(sharedContext), configAttributes);\n }\n\n void createSurface(Surface surface);\n\n // Create EGLSurface from the Android SurfaceTexture.\n void createSurface(SurfaceTexture surfaceTexture);\n\n // Create dummy 1x1 pixel buffer surface so the context can be made current.\n void createDummyPbufferSurface();\n\n void createPbufferSurface(int width, int height);\n\n Context getEglBaseContext();\n\n boolean hasSurface();\n\n int surfaceWidth();\n\n int surfaceHeight();\n\n void releaseSurface();\n\n void release();\n\n void makeCurrent();\n\n // Detach the current EGL context, so that it can be made current on another thread.\n void detachCurrent();\n\n void swapBuffers();\n\n void swapBuffers(long presentationTimeStampNs);\n}", "public static void pause() {\n\t\tmyWasPausedInPreview = false;\n\t\tif (myCurrentCamera != null) {\n\t\t\tif (myIsInPreview == true) {\n\t\t\t\tmyWasPausedInPreview = true;\n\t\t\t\tstop();\n\t\t\t}\n\n\t\t\tmyCurrentCamera.setPreviewCallbackWithBuffer(null);\n\t\t\tmyCurrentCamera.release();\n\t\t}\n\t}", "synchronized boolean isPaused(){\n\t\treturn paused;\n\t}", "public void makeContextCurrent(){\n glfwMakeContextCurrent(handle);\n }", "public boolean isPaused(){\r\n\t\tif (this.pauseGame(_p)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "@Override\r\n protected void onResume() {\r\n Log.d(LOGTAG, \"onResume\");\r\n super.onResume();\r\n\r\n // This is needed for some Droid devices to force portrait\r\n if (mIsDroidDevice) {\r\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\r\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\r\n }\r\n\r\n try {\r\n vuforiaAppSession.resumeAR();\r\n } catch (ArException e) {\r\n Log.e(LOGTAG, e.getString());\r\n }\r\n\r\n // Resume the GL view:\r\n if (mGlView != null) {\r\n mGlView.setVisibility(View.VISIBLE);\r\n mGlView.onResume();\r\n }\r\n }", "@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\t\tLog.d(TAG, \"onSurfaceCreated\");\r\n//\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Set color's clear-value to\r\n\t\tgl.glClearColor(0.f, 0.f, 0.f, 0.f);\r\n/////new/////\t\t\r\n\t\t gl.glBlendFunc(gl.GL_SRC_ALPHA, gl.GL_ONE_MINUS_SRC_ALPHA);\r\n\t\t gl.glEnable(gl.GL_BLEND);\r\n///////\t\t \r\n\t\tgl.glClearDepthf(1.0f); // Set depth's clear-value to farthest\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST); // Enables depth-buffer for hidden\r\n\t\t\t\t\t\t\t\t\t\t\t// surface removal\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL); // The type of depth testing to do\r\n\t\tgl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT, GL10.GL_NICEST); // nice\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// perspective\r\n\t\t// view\r\n\t\tgl.glShadeModel(GL10.GL_SMOOTH); // Enable smooth shading of color\r\n\t\tgl.glDisable(GL10.GL_DITHER); // Disable dithering for better\r\n\t\t\t\t\t\t\t\t\t\t// performance\r\n\t\t// You OpenGL|ES initialization code here\r\n\t\t// ......\r\n\t\tgl.glGenTextures(MAX_MODEL_NUM, texIDS, 0);\r\n\r\n//\t\tglview.loadTexture(gl); // Load image into Texture (NEW)\r\n\t\tgl.glEnable(gl.GL_TEXTURE_2D); // Enable texture (NEW)\r\n\t\t\r\n\t}", "public MonoscopicView(Context context, AttributeSet attributeSet) {\n super(context, attributeSet);\n setPreserveEGLContextOnPause(true);\n }", "public void makeCurrent(EGLSurface drawSurface, EGLSurface readSurface) {\n if (argonGLDisplay == EGL10.EGL_NO_DISPLAY) {\n // called makeCurrent() before create?\n \tLogger.debug(\"NOTE: makeCurrent w/o display\");\n }\n if (!argonEGL.eglMakeCurrent(argonGLDisplay, drawSurface, readSurface, argonGLContext)) {\n throw new RuntimeException(\"eglMakeCurrent(draw,read) failed\");\n }\n }", "public boolean isPaused()\n\t{\n\t\treturn isPaused;\n\t}", "public boolean isSurfaceWorld() {\n\t\treturn false;\n\t}", "@Override\n public void onActivityPaused(Activity ignored) {\n if (isAuthSticky) {\n activityPaused = true;\n }\n }", "public boolean isPaused() {\r\n return this.paused;\r\n }", "public boolean isRunning(){\n return !paused;\n }", "@Override\r\n public void onResume() {\r\n NexLog.d(LOG_TAG, \"onResume called\");\r\n activityPaused = false;\r\n }", "void onDetachedFromSurface();", "public void testPersistentSurfaceRecording() {\n assertTrue(testRecordFromSurface(true /* persistent */, false /* timelapse */));\n }", "public boolean isPaused() {\n return this.paused;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.396 -0500\", hash_original_method = \"3CBB90A352CD62A4CE70C5B74A91066B\", hash_generated_method = \"1120ADA1C3ACB2D19833DADC9E26C64A\")\n \n public boolean eglSwapBuffers(EGLDisplay display, EGLSurface surface){\n \taddTaint(display.getTaint());\n \taddTaint(surface.getTaint());\n \treturn getTaintBoolean();\n }", "public void keepOn(boolean isOn) {\n LOG(\"keepOn,isOn=\" + isOn);\n if (this.mCtx == null) {\n return;\n }\n if (isOn) {\n this.mCtx.getWindow().addFlags(128);\n } else if (!DataOsdGetPushCommon.getInstance().isMotorUp()) {\n LOG(\"keepOn,isMotorUp=false,will off screen!\");\n this.mCtx.getWindow().clearFlags(128);\n }\n }", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tisFlag = false;\n\t}", "public boolean useEncryption()\n {\n return encryptionContext != null && encryptionContext.isEnabled();\n }", "public synchronized boolean isPaused() {\n\t\treturn State.PAUSED.equals(state);\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\t\n\t\tsuper.onDestroy();\n\t\t\n\t\t// Log\n\t\tLog.d(\"TNActv.java\" + \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \"]\", \"onDestroy()\");\n\t\t\n\t\t/*----------------------------\n\t\t * 2. move_mode => falsify\n\t\t\t----------------------------*/\n\t\tif (move_mode == true) {\n\t\t\t\n\t\t\tmove_mode = false;\n\t\t\t\n\t\t\t// Log\n\t\t\tLog.d(\"TNActv.java\" + \"[\"\n\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t\t+ \"]\", \"move_mode => Now false\");\n\t\t\t\n\t\t}//if (move_mode == true)\n\n\t\tSharedPreferences prefs = \n\t\t\t\tthis.getSharedPreferences(MainActv.prefName_tnActv, MODE_PRIVATE);\n\t\t\n\t\tSharedPreferences.Editor editor = prefs.edit();\n\n\t\teditor.clear();\n\t\teditor.commit();\n\t\t\n\t\t// Log\n\t\tLog.d(\"MainActv.java\" + \"[\"\n\t\t\t\t+ Thread.currentThread().getStackTrace()[2].getLineNumber()\n\t\t\t\t+ \"]\", \"Prefs cleared: \" + MainActv.prefName_tnActv);\n\n\t\t/*********************************\n\t\t * 3. History mode => Off\n\t\t *********************************/\n\t\tint current_move_mode = Methods.get_pref(\n\t\t\t\t\t\t\tthis, \n\t\t\t\t\t\t\tMainActv.prefName_mainActv, \n\t\t\t\t\t\t\tMainActv.prefName_mainActv_history_mode,\n\t\t\t\t\t\t\t-1);\n\t\t\n\t\tif (current_move_mode == MainActv.HISTORY_MODE_ON) {\n\t\t\t\n\t\t\tboolean result = Methods.set_pref(\n\t\t\t\t\tthis, \n\t\t\t\t\tMainActv.prefName_mainActv, \n\t\t\t\t\tMainActv.prefName_mainActv_history_mode,\n\t\t\t\t\tMainActv.HISTORY_MODE_OFF);\n\n\t\t\tif (result == true) {\n\t\t\t\t// Log\n\t\t\t\tLog.d(\"TNActv.java\"\n\t\t\t\t\t\t+ \"[\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getLineNumber() + \"]\", \"Pref set: \" + MainActv.HISTORY_MODE_OFF);\n\t\t\t} else {//if (result == true)\n\t\t\t\t// Log\n\t\t\t\tLog.d(\"TNActv.java\"\n\t\t\t\t\t\t+ \"[\"\n\t\t\t\t\t\t+ Thread.currentThread().getStackTrace()[2]\n\t\t\t\t\t\t\t\t.getLineNumber() + \"]\", \"Set pref => Failed\");\n\t\t\t\t\n\t\t\t}//if (result == true)\n\t\t\t\n\t\t}//if (current_move_mode == 1)\n\t\t\n\t}", "private void initOpenGlView() {\n setEGLContextClientVersion(2);\n setPreserveEGLContextOnPause(true);\n System.out.println(\"************************************************************* init OpenGlView ********************\");\n// setRenderMode(GLSurfaceView.RENDERMODE_WHEN_DIRTY);\n// setEGLConfigChooser(8, 8, 8, 8, 0, 0); // added 10.05\n// getHolder().setFormat(PixelFormat.TRANSLUCENT); // // added 10.05\n }", "@Override\r\n\tpublic void onSurfaceCreated(GL10 gl, EGLConfig config) {\n\r\n\t\tgl.glDisable(GL10.GL_DITHER);\r\n\t\tgl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\r\n\t\tgl.glEnable(GL10.GL_DEPTH_TEST);\r\n\t\tgl.glDepthFunc(GL10.GL_LEQUAL);\r\n\t\tgl.glClearDepthf(1f);\r\n\t}", "@Override\n protected void onPause() {\n mapView.onPause();\n deactivate();\n super.onPause();\n }", "public void pauseApp() {\n theIsRunning = false;\n }", "public void setContextEnabled(Boolean contextEnabled) {\n this.contextEnabled = contextEnabled;\n }", "protected void onResume(){\n super.onResume();\n hideSystemUI();\n if (!coreView.isGamePaused()) //only resume game if there wasn't a manual pause prior to losing focus\n coreView.resume();\n }", "public boolean isPaused() {\r\n return paused;\r\n }", "@Override\n public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) {\n return false;\n }", "public void isPaused() { \r\n myGamePaused = !myGamePaused; \r\n repaint(); \r\n }", "public boolean isPaused() {\n return paused;\n }", "public void onPause() {\n releaseCamera();\n }", "private boolean canPauseGame() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n && gameStateManager.getState().equals(GameState.PLAY);\n }", "public void checkPaused()\n {\n paused = true;\n }" ]
[ "0.5651159", "0.55831075", "0.5560332", "0.5550565", "0.5519614", "0.5515531", "0.5515531", "0.5418922", "0.53542113", "0.5303119", "0.529968", "0.52873445", "0.5285267", "0.5285267", "0.5266547", "0.52208406", "0.52018285", "0.52000934", "0.5198786", "0.5134557", "0.5114113", "0.510683", "0.50658673", "0.5062555", "0.50446105", "0.50245374", "0.49996436", "0.4997356", "0.4991626", "0.4991461", "0.49904805", "0.49888277", "0.49870372", "0.4984832", "0.49655372", "0.49559775", "0.49183783", "0.4914659", "0.49052826", "0.4896692", "0.4895062", "0.4895062", "0.48742422", "0.48652646", "0.48581448", "0.48493606", "0.4834386", "0.48214805", "0.48214805", "0.48153484", "0.47988895", "0.47922507", "0.4787328", "0.478614", "0.47783417", "0.47726938", "0.47708604", "0.47572637", "0.47526157", "0.47511968", "0.47433755", "0.47429526", "0.47425804", "0.47392926", "0.47336733", "0.4726632", "0.4725527", "0.47175932", "0.470645", "0.47035646", "0.47033283", "0.46853247", "0.46832988", "0.46731585", "0.46724275", "0.46721146", "0.46678674", "0.466742", "0.46665946", "0.46567738", "0.46562737", "0.46471953", "0.4645423", "0.46221334", "0.46209097", "0.46198872", "0.46162593", "0.4612513", "0.45999518", "0.45986527", "0.4598286", "0.4596051", "0.45939973", "0.45931065", "0.45921472", "0.4591716", "0.45877576", "0.45810893", "0.4576805", "0.45605835" ]
0.716435
0
Called if the user changed the selection during the NEW or UPDATE state of the related table record.
public void onSelect(IClientContext context, IComboBox emitter) throws Exception { String comboState =emitter.getValue(); ISingleDataGuiElement field = (ISingleDataGuiElement)context.getGroup().findByName("requestOwner"); field.setRequired(!"New".equals(comboState)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void selectionChanged() {\r\n int fila = menuCursos.tablaCursos.getSelectedRow();\r\n try {\r\n actual=(Cursos) rs.get(fila);\r\n if(actual.getCodigo()!=null){\r\n MostrarRegistro();\r\n menuCursos.botonCursosBorrar.setEnabled(fila != -1);\r\n menuCursos.botonCursosModificar.setEnabled(fila != -1);\r\n }\r\n } catch (Exception e) {\r\n actual = null;\r\n }\r\n }", "public void selectionChanged(Selection selecton) {\r\n }", "@Override\n public void valueChanged(ListSelectionEvent e) {\n currentRow = recordList.getSelectedIndex();\n setRowValues(currentRow, currentColumn);\n if (selectionAction == WAITING_ON_SELECTION) {\n selectionAction = SENDING_SELECTION;\n }\n if (selectionAction == SENDING_SELECTION) {\n selectionAction = FINISHED_SELECTION;\n cellNotifier.select(currentRow, currentColumn); // Notify GUI to select\n }\n \n \n }", "private void notifySelectedUser() {\n\t\tfinal GHAGridRecord<SSOUser> selectedRecord = grid.getSelectedRecord();\n\t\tif (selectedRecord == null) {\n\t\t\tGHAErrorMessageProcessor.alert(\"record-not-selected\");\n\t\t\treturn;\n\t\t}\n\t\tnotifyUser(selectedRecord.toEntity());\n\t\thide();\n\t}", "@Override\n public void recordChanged(int row, int column, String newValue) {\n if (currentRow == row) {\n recordForm.setValueAt(newValue, column);\n// if (recordNotifier.needsSuggestion(row, column)) {\n// recordList.\n// }\n }\n }", "void selectedEntityChanged(String name);", "@Override\n\tpublic void selectionChanged(SelectionChangedEvent arg0) {\n\t\t\n\t}", "public void invSelected()\n {\n\t\t//informaPreUpdate();\n \tisSelected = !isSelected;\n\t\t//informaPostUpdate();\n }", "boolean beforeMasterSelectionChange();", "@Override\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!updating && button.isSelected()) {\n\t\t\t\t\t\tmodel.set(db);\n\t\t\t\t\t}\n\t\t\t\t\tif (!useRadioButtons) {\n\t\t\t\t\t\tlabel.setForeground(button.isSelected() ? selectedForeground : unselectedForeground);\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}", "@Override\n\tprotected void selectedProductChanged()\n\t{\n\t\tgetController().selectedProductChanged();\n\t}", "public void valueChanged(ListSelectionEvent e) {\n if (!e.getValueIsAdjusting()) {\n selRow = table.getSelectedRow();\n }\n }", "@Override\r\n\tpublic void adminSelectUpdate() {\n\t\t\r\n\t}", "void afterMasterSelectionChange();", "@Override\n public void changed(ObservableValue<? extends Boolean> observableValue, Boolean notSelected, Boolean selected) {\n if (selected){\n setEditOnIngredientsBrowseFields(true);\n ingredBrowseEditToggle.setText(\"Read Only\");\n } else {\n setEditOnIngredientsBrowseFields(false);\n ingredBrowseEditToggle.setText(\"Edit\");\n }\n }", "private void tblEntryVetoableChange(java.beans.PropertyChangeEvent evt)throws java.beans.PropertyVetoException {\n }", "@Override\r\n\tpublic void selectionChanged(IWorkbenchPart part, ISelection selection) {\n\r\n\t}", "@Override // ohos.data.resultset.AbsResultSet\r\n public void notifyChange() {\r\n super.notifyChange();\r\n }", "private void onParticipantsSelectionChange(Participant newValue) {\n boolean disabledBecauseOfSelection = newValue == null;\n buttonParticipantEdit.setDisable(disabledBecauseOfSelection);\n buttonParticipantRemove.setDisable(disabledBecauseOfSelection);\n }", "@Override\r\n\t\tpublic void userModelChanged() \r\n\t\t{\n\t\t\t\r\n\t\t}", "public void updateSelection() {\n\t\t\n\t}", "@After\n\t\t@ActionTrigger(action=\"WHEN-NEW-RECORD-INSTANCE\", function=KeyFunction.RECORD_CHANGE)\n\t\tpublic void spriden_recordChange()\n\t\t{\n\t\t\t\n\n\t\t\t\tSpridenAdapter spridenElement = (SpridenAdapter)this.getFormModel().getSpriden().getRowAdapter(true);\n\n\t\t\t\tif(spridenElement!=null){\n\n\t\t\t\tif ( spridenElement.getRowState().equals(DataRowStatus.INSERTED) )\n\t\t\t\t{\n\t\t\t\t\tif ( getBlockCurrentRecord(getCursorBlock()).notEquals(1) )\n\t\t\t\t\t{\n\t\t\t\t\t\tpreviousRecord();\n\t\t\t\t\t\tmessage(GNls.Fget(toStr(\"SOAIDNS-0002\"), toStr(\"FORM\"), toStr(\"At last record.\")), OutputMessageUserResponse.NO_ACKNOWLEDGE);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn ;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// \n\t\t\t\texecuteAction(\"QUERY_RECS\");\n\t\t\t}\n\t\t}", "@Override\n\tpublic void tableChanged(TableModelEvent arg0) {\n\t\t\n\t}", "private void fireSelectionChangeNotification () {\r\n\t\tif ( selectionChangeListener!=null)\r\n\t\t\tselectionChangeListener.execute();\r\n\t}", "@Override\r\n\tpublic void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "public boolean canSelectionChange() {\n return true;\n }", "protected void selectionChanged(IStructuredSelection selection) {\n \t}", "public void setSelectionChanged(boolean selectionChanged);", "@Override\n public void valueChanged(ListSelectionEvent e) {\n ListSelectionModel mSelectionModel = (ListSelectionModel)e.getSource();\n \n if (mSelectionModel.isSelectionEmpty() == false) {\n // Find out which indexes are selected.\n int mMinIndex = mSelectionModel.getMinSelectionIndex();\n int mMaxIndex = mSelectionModel.getMaxSelectionIndex();\n \n if (mMinIndex == mMaxIndex) {\n if (mSelectionModel.isSelectedIndex(mMinIndex)) {\n try {\n fillContactDetails(mMinIndex);\n } catch (SQLException ex) {\n Logger.getLogger(frmContacts.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n //Save the selected row for the case that the next action after this is cancel.\n pSelectedRow = mMinIndex;\n }\n }\n }\n }", "public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }", "@Override\n\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\tchange();\n\t\t\t\t}", "@Override\n\tpublic void selectionChanged(IAction action, ISelection selection) {\n\t}", "@Override\r\n public void selectionChanged(IAction action, ISelection selection) {\n }", "public void selectionChanged(IStructuredSelection selection) {\r\n\t\t\r\n\t\tsetEnabled(canOperateOn(selection));\r\n\t}", "public void itemStateChanged(ItemEvent e)\n {\n if(e.getStateChange() == ItemEvent.SELECTED)\n {\n String relationship = ((PSRelationshipInfo)e.getItem()).getName();\n\n PSProperties props = new PSProperties();\n props.setProperty(IPSConstants.PROPERTY_RELATIONSHIP, relationship);\n props.setProperty(\n IPSConstants.PROPERTY_CONTENTID,\n String.valueOf(m_contentItem.getId()));\n props.setProperty(\n IPSConstants.PROPERTY_REVISION,\n String.valueOf(m_contentItem.getRevision()));\n\n Iterator viewChangeListeners = m_viewChangeListeners.iterator();\n while(viewChangeListeners.hasNext())\n {\n ((IPSViewChangeListener)viewChangeListeners.next()).\n viewDataChanged(props);\n }\n \n // Update accessibility information on combobox\n AccessibleContext ctx = m_rsCombo.getAccessibleContext();\n ctx.setAccessibleName(relationship);\n }\n }", "protected void selectionChanged(ITextSelection selection) {}", "public void selectionChanged(SelectionChangedEvent event) {\n\t\t// System.out.println(event + \" on: \" + this);\n\t\tlastSelection = event.getSelection();\n\t\tif (keepSynched) {\n\t\t\tprocessSelection(lastSelection);\n\t\t}\n\t}", "private void updateStateUiAfterSelection() {\n stageManager.updateStateUi();\n eventBus.publish(EventTopic.DEFAULT, EventType.SELECTED_OBJECT_CHANGED);\n eventManager.fireEvent(EngineEventType.SELECTED_OBJECT_CHANGED);\n }", "@Override\n protected void updateModelFromUi(@Nullable Selection<DataType> selection) {\n try {\n selection.setSelected(theCheckBox.isChecked());\n Logger.debug(\"Updated selection: \" + selection.toString());\n\n } catch (Exception e) {\n Logger.error(\"Failed to update selection\", e);\n }\n }", "public void valueChanged(TreeSelectionEvent ev) {\n controller.removeSelectionListener(modelSelectionListener);\r\n controller.setSelectedFurniture(getSelectedFurniture());\r\n controller.addSelectionListener(modelSelectionListener);\r\n }", "void selectionModeChanged(SelectionMode mode);", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\t\t\r\n\t}", "public void valueChanged(javax.swing.event.ListSelectionEvent event) {\n\t\t\t\t\tif( event.getSource() == getJTablePlayList().getSelectionModel() ) {\n\t\t\t\t\t\tint selRow = getJTablePlayList().getSelectedRow();\n\t\t\t\t\t\tgetJButtonDelete().setEnabled( selRow >= 0 );\n\t\t\t\t\t\tgetJButtonEdit().setEnabled( selRow >= 0 );\n\t\t\t\t\t}\n\t\t\t\t}", "protected void onSelectionPerformed(boolean success) {\n }", "@Override\n public void selectionChanged(@Nonnull final FileEditorManagerEvent event) {\n PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(() -> {\n updateHistoryEntry(event.getOldFile(), event.getOldEditor(), event.getOldProvider(), false);\n updateHistoryEntry(event.getNewFile(), true);\n });\n }", "public void notifySelectionCorrect(boolean correct) {\n\t}", "private void SelectionChanged(String type) {\n try {\n VaadinSession.getCurrent().getLockInstance().lock();\n Listeners_Map.values().stream().forEach((filter) -> {\n filter.selectionChanged(type);\n });\n } finally {\n VaadinSession.getCurrent().getLockInstance().unlock();\n busyTask.setVisible(false);\n }\n\n }", "@DISPID(200)\r\n public void selectionChanged() {\r\n throw new UnsupportedOperationException();\r\n }", "public void valueChanged(ListSelectionEvent event) {\n String contratoId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 0).toString(); \n String clienteId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 6).toString(); \n String activo = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 8).toString(); \n \n \n if(activo.equalsIgnoreCase(\"1\")){\n radioActivoEdit.setSelected(true);\n }else if(activo.equalsIgnoreCase(\"0\")){\n radioInactivoEdit.setSelected(true);\n }\n \n lblClienteid.setText(clienteId);\n lblContratoId.setText(contratoId);\n \n }", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "public void selectionChanged(IAction action, ISelection selection) {\n\r\n\t}", "@Override\n\tpublic void selectionChanged(IAction arg0, ISelection arg1) {\n\n\t}", "public void selectedChanged(SelectEvent e) {\n\t\t\t\tm_Report.getStatusBar().repaint();\r\n\t\t\t}", "public void valueChanged (TreeSelectionEvent event)\n {\n updateSelection();\n }", "public void stateChanged (ChangeEvent e)\r\n\t {\t\t\r\n\t\t int index = tabbedPane.getSelectedIndex();\r\n\t\t m_selectionActive = (index == 0);\r\n\t }", "public void selectionChanged(IAction action, ISelection selection) {\n\t}", "public void valueChanged(ListSelectionEvent e) {\r\n\t\tif (e.getValueIsAdjusting() == false)\r\n\t\t\tsetSelectedObjects();\r\n\r\n\t\tgetTable().repaint();\r\n\t}", "protected void newRowSelected() {\r\n\t\tsetMessage(\"A new member can be added in this row.\");\r\n\t\tsetMemberActionsEnabled(false);\r\n\t}", "@Override\n public void changed( Change change ) {\n if ( !( change.isSelected()\n && change.isForInstanceOf( Node.class )\n && change.isForProperty( \"other\" ) ) ) {\n if ( change.isUpdated() ) {\n setFlowUpdated( true );\n }\n super.changed( change );\n }\n }", "private void enableSelectedRowForUpdate(ComponentEvent evt) {\n\t\tint tipoRolSeleccionado = getTblTipoRol().getSelectedRow(); \r\n\t\tif ( tipoRolSeleccionado != -1) {\r\n\t\t\ttipoRolSeleccionado = getTblTipoRol().convertRowIndexToModel(tipoRolSeleccionado); \r\n\t\t\ttipoRolIf = (TipoRolIf) tipoRolVector.get(tipoRolSeleccionado);\r\n\t\t\tgetTxtCodigo().setText(tipoRolIf.getCodigo());\r\n\t\t\tgetTxtNombre().setText(tipoRolIf.getNombre());\r\n\t\t\tgetTxtNemonico().setText(tipoRolIf.getNemonico());\r\n\t\t\t\r\n\t\t\tgetCmbFechaInicio().setDate(tipoRolIf.getFechaInicio());\r\n\t\t\tgetCmbFechaInicio().repaint();\r\n\t\t\t\r\n\t\t\tgetCmbFechaFin().setDate(tipoRolIf.getFechaFin());\r\n\t\t\tgetCmbFechaFin().repaint();\r\n\t\t\t\r\n\t\t\tString rubroEventual = tipoRolIf.getRubroEventual(); \r\n\t\t\tif ( rubroEventual != null ){\r\n\t\t\t\tif( RUBRO_EVENTUAL_SI.substring(0,1).equals(rubroEventual) ){\r\n\t\t\t\t\tgetCmbRubroEventual().setSelectedItem(RUBRO_EVENTUAL_SI);\r\n\t\t\t\t}else if( RUBRO_EVENTUAL_NO.substring(0,1).equals(rubroEventual) ){\r\n\t\t\t\t\tgetCmbRubroEventual().setSelectedItem(RUBRO_EVENTUAL_NO);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tgetCmbRubroEventual().setSelectedItem(null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tString provisionado = tipoRolIf.getRubroProvisionado();\r\n\t\t\tif ( provisionado != null ){\r\n\t\t\t\tif( TipoRolProvisionado.SI.getLetra().equals(provisionado) ){\r\n\t\t\t\t\tgetCmbRubroProvisionado().setSelectedItem(TipoRolProvisionado.SI);\r\n\t\t\t\t}else if( TipoRolProvisionado.NO.getLetra().equals(provisionado) ){\r\n\t\t\t\t\tgetCmbRubroProvisionado().setSelectedItem(TipoRolProvisionado.NO);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tgetCmbRubroProvisionado().setSelectedItem(null);\r\n\t\t\t}\r\n\t\t\tgetCmbRubroProvisionado().repaint();\r\n\t\t\t\r\n\t\t\tString formaPagoLetra = tipoRolIf.getFormaPago();\r\n\t\t\tif (formaPagoLetra != null){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTipoRolFormaPago formaPago = TipoRolFormaPago.getTipoRolPagoByLetra(formaPagoLetra);\r\n\t\t\t\t\tgetCmbFormaPago().setSelectedItem(formaPago);\r\n\t\t\t\t} catch (GenericBusinessException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSpiritAlert.createAlert(e.getMessage(), SpiritAlert.ERROR);\r\n\t\t\t\t}\r\n\t\t\t} else \r\n\t\t\t\tgetCmbFormaPago().setSelectedItem(null);\r\n\t\t\tgetCmbFormaPago().repaint();\r\n\t\t\t\r\n\t\t\tsetUpdateMode();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void selectionChanged(ICompletionProposal proposal, boolean smartToggle) {\n\t\ttry {\r\n\t\tTracer.info(this, \"Selection changed\" + proposal.getDisplayString());\r\n\t\tTracer.info(this, \"Selection contxt\" + proposal.getContextInformation());\r\n\r\n\t\t\r\n//\t\tSystem.out.println(proposal.getAdditionalProposalInfo());\r\n//\t\tif (proposal instanceof ICompletionProposalExtension2) {\r\n//\t\t\tICompletionProposalExtension2 anExtension2 = (ICompletionProposalExtension2) proposal;\r\n//\t\t\t\r\n//\t\t}\r\n//\t\tSystem.out.println(proposal.getContextInformation().getInformationDisplayString());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n \tpublic void valueChanged(ListSelectionEvent e) { \n \t\tListSelectionModel lsm = (ListSelectionModel) e.getSource();\n \n \t\tif (!lsm.isSelectionEmpty()) {\n \t\t\tint selection = table.convertRowIndexToModel(getSelection(lsm));\n \t\t\tnotifySelectionListeners(list.getPackage(selection));\t\n \t\t}\n \t}", "@DISPID(-2147412032) //= 0x800117c0. The runtime will prefer the VTID if present\n @VTID(9)\n void onselectionchange(\n @MarshalAs(NativeType.VARIANT) java.lang.Object p);", "protected void notifyDirty() {\n Event evt = new Event();\n evt.item = this;\n evt.widget = this;\n SelectionEvent event = new SelectionEvent(evt);\n for (SelectionListener listener : dirtyListener) {\n listener.widgetSelected(event);\n }\n }", "@Override\r\n public void valueChanged(ListSelectionEvent e) {\n selectionChanged();\r\n }", "@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}", "@Override\n public void focusLost(FocusEvent e) {\n String newValue = recordForm.getValueAt(currentColumn);\n recordNotifier.changeRecord(currentRow, currentColumn, newValue);\n }", "public void selectionChanged(IAction action, ISelection selection) {\n }", "public void editSelectedItem() {\n\t\tfinal ColumnInfo oldinfo = m_view.getSelectedItem();\n\t\tif (oldinfo != null) {\n\t\t\tfinal TableId tableid = m_view.getModel().getTableId();\n\t\t\tfinal TSConnection tsconn = m_view.getModel().getConnection();\n\t\t\tSQLCommandDialog dlg = SQLCommandDialog.createDialog(tsconn, true);\n\t\t\tdlg.setMessage(I18N.getLocalizedMessage(\"Modify Column\"));\n\n\t\t\tModelerFactory factory = ModelerFactory.getFactory(tsconn);\n\t\t\tfinal ColumnPanel panel = factory.createColumnPanel(tsconn, tableid, oldinfo, false);\n\t\t\tdlg.setPrimaryPanel(panel);\n\t\t\tdlg.addValidator(panel);\n\t\t\tdlg.setSize(dlg.getPreferredSize());\n\t\t\tdlg.addDialogListener(new SQLDialogListener() {\n\t\t\t\tpublic boolean cmdOk() throws SQLException {\n\t\t\t\t\tTSTable tablesrv = (TSTable) tsconn.getImplementation(TSTable.COMPONENT_ID);\n\t\t\t\t\tColumnInfo newinfo = panel.getColumnInfo();\n\t\t\t\t\ttablesrv.modifyColumn(tableid, newinfo, oldinfo);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tdlg.showCenter();\n\t\t\tif (dlg.isOk()) {\n\t\t\t\tSystem.out.println(\"AlterColumnsController.editSelected item: \" + tableid);\n\t\t\t\ttsconn.getModel(tableid.getCatalog()).reloadTable(tableid);\n\t\t\t\tm_view.getModel().setTableId(tableid);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void tableChanged(TableModelEvent e) {\n fireTableChanged(e);\n }", "private boolean userMadeChanges() {\n\t\treturn userMadeChanges(null);\n\t}", "@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(oDate.getSelection());\t\t\t\t\n\t\t\t\teachShipment.setExpectedShipDate(oDate.getSelection());;\n\t\t\t eachShipment.setExpectedRecievedDate(sDate.getSelection());\n\t\t\t eachShipment.setRecieptNumber(recieptText.getText());\n\t\t\t\teachShipment.setOrgId(orgId);\n\t\t\t\t//need to refactor to remove duplication later\n\t\t\t\t//possible try block\n\t\t\t\tList<DatabaseAccess> affectedTables = new ArrayList<DatabaseAccess>();\n\t\t\t\tStoreInDatabase sd = new StoreInDatabase();\n\t\t\t\taffectedTables.add(eachShipment);\n\t\t\t\tsd.writeToDatabase(affectedTables);\n\t\t\t}", "@Override\n\t\tpublic void widgetSelected(SelectionEvent event) {\n\n\t\t\tObject source = event.getSource();\n\n\t\t\tif (source == cbLRC) { //LR Charge value change\n\t\t\t\thandleLRCTypeChange();\n\t\t\t} else if (source == cbGSC) { //GSC value change\n\t\t\t\thandleGSCTypeChange();\n\t\t\t} else if (source == cbInsurance) { //Insurance Value Change\n\t\t\t\thandleInsuranceTypeChange();\n\t\t\t} else if (source == cbDHC) { //GSC value change\n\t\t\t\thandleDHCTypeChange();\n\t\t\t} else if (source == cbCCC) { //CC Charge Type change\n\t\t\t\thandleCCCTypeChange();\n\t\t\t} else if (source == cbDCC) { //DC Charge Type change\n\t\t\t\thandleDCCTypeChange();\n\t\t\t} else if (source == cbDDC) { //DD Charge Type change\n\t\t\t\thandleDDCTypeChange();\n\t\t\t} else if (source == cbIEC) { //IEC Charge Type change\n\t\t\t\thandleIECTypeChange();\n\t\t\t} else if (source == cbLoadingCharge) { //Loading Charge Type change\n\t\t\t\thandleLCTypeChange();\n\t\t\t} else if (source == btnAdd) {\n\t\t\t\tif(isValidArticle())\n\t\t\t\t\taddArticle();\n\t\t\t} else if (source == tblArticle) {\n\t\t\t\tviewEditTblArticle();\n\t\t\t}\n\t\t\tif (source == btnLRCPop) {\n\t\t\t\thandleLRCPop();\n\t\t\t} else if (source == btnGSCPop) {\n\t\t\t\thandleGSCPop();\n\t\t\t} else if (source == btnInsurancePop) {\n\t\t\t\thandleInsurancePop();\n\t\t\t} else if (source == btnDHCPop) {\n\t\t\t\thandleDHCPop();\n\t\t\t}\n\t\t}", "public void selectionJoueurChanged(ListSelectionEvent e)\n\t{\n\t\tif(tableJoueurs.getRowCount()<=0) return;\n\t\tint index = tableJoueurs.getSelectedRow();\t\t\n\t\t\tif (index == -1)\n\t\t\t{\n\t\t\t\teffacerSaisie();\n\t\t\t\treturn;\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\tindex = sorter.modelIndex(index);\n\tJoueur j = ((JoueursTableModel)sorter.getTableModel()).getJoueur(index);\t\t\n\tif(j==null)\n\t{\n\t\teffacerSaisie();\n\t}\n\telse\n\t{\n\tClassement clt = j.getClassement();\n\t\ttfNom.setText(j.getNom());\n\t\ttfPrenom.setText(j.getPrenom());\n\t\trbFeminin.setSelected(!j.isMasculin());\n\t\trbMasculin.setSelected(j.isMasculin());\n\t\tcbCategorie.setSelectedItem(j.getCategorie().getCategorie());\n\t\tcbClub.setSelectedItem(j.getClub());\n\t\tif (!j.isLicencie())\n\t\t{\n\t\t\trbNonLicencie.setSelected(true);\n\t\t}\n\t\telse if (!j.isClasse())\n\t\t{\n\t\t\trbLincencie.setSelected(true);\n\t\t\tif(j.getClassement()!=null)\n\t\t\t{\n\t\t\t\ttfCltNew.setText(\"\"+j.getClassement().getNewClassement());\n\t\t\t}\t\t\t\n\t\t\tcbCltOld.setSelectedIndex(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\trbLincencie.setSelected(true);\n\t\t\ttfCltNew.setText(Integer.toString(clt.getNewClassement()));\n\t\t\tcbCltOld.setSelectedItem(new Integer(clt.getOldClassement()));\n\t\t\ttfNumero.setText(Integer.toString(clt.getNumero()));\n\t\t}\n\t}\n\t}", "@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}", "protected void handleInvalidSelection(org.eclipse.jface.viewers.ISelection selection, org.eclipse.jface.viewers.ISelection newSelection) {\n\t}", "@DISPID(-2147412032) //= 0x800117c0. The runtime will prefer the VTID if present\n @VTID(10)\n @ReturnValue(type=NativeType.VARIANT)\n java.lang.Object onselectionchange();", "private void stateChanged() {\n\t\tfor (Row r : containingRows) {\n\t\t\tr.selectSquare(this);\n\t\t}\n\t}", "public void doUpdateOption(ActionEvent event) {\n selectedOptionEntityToUpdate = (OptionEntity) event.getComponent().getAttributes().get(\"optionEntityToUpdate\");\n allowChange = true;\n List<Subscription> subscriptions = selectedOptionEntityToUpdate.getSubscriptions();\n \n if(subscriptions.size() != 0) {\n allowChange = false;\n }\n System.out.println(\"I am at doUpdate\");\n }", "@Override\r\n\t\t\t\t\tpublic void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2) {\n\t\t\t\t\t\tproducts.setIs_activated(arg2);\r\n\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"UPDATE dbo.product SET is_activated='\"+arg2+\"' WHERE id=\"+products.getId())>0) {\r\n\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void selectionChanged(String id,boolean isSprinkler) {\n\t\t\t\tselectedId=id;\n\t\t\t\tisSprinklerSelected=isSprinkler;\n\t\t\t\t//get sprinkler/group details and populate controls\n\t\t\t\t\n\t\t\t\tif(isSprinklerSelected)//populate selected sprinkler details\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"s\");\n\t\t\t\t\t//reload Schedule panel and update panel\n\t\t\t\t\t\n\t\t\t\t\t//repopulate week panel(JTables)\n\t\t\t\t\t//newWeek.refreshWeek();\n\t\t\t\t\tschedulePane.removeAll();\n\t\t\t\t\tschedulePane.add(new Schedule(selectedId, isSprinklerSelected));\n\t\t\t\t\tschedulePane.repaint();\n\t\t\t\t\t\n\t\t\t\t\t//repopulate update panel\n\t\t\t\t\tpopulateSprinklerStatus();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse//populate selected group details\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"g\");\n\t\t\t\t\t//reload Week panel and update panel\n\t\t\t\t\t\n\t\t\t\t\t//repopulate week panel(JTables)\n\t\t\t\t\t//newWeek.refreshWeek();\n\t\t\t\t\t//System.out.println(\"selectionChanged:\"+selectedId);\n\t\t\t\t\tschedulePane.removeAll();\n\t\t\t\t\tschedulePane.add(new Schedule(selectedId, isSprinklerSelected));\n\t\t\t\t\tschedulePane.repaint();\n\t\t\t\t\t\n\t\t\t\t\t//repopulate update panel\n\t\t\t\t\tpopulateGroupStatus();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public RecordLedgerSelectionEvent(RecordLedgerTable source) {\n super(source);\n selectionEmpty = source.getSelectionModel().isSelectionEmpty();\n }", "public void valueChanged(ListSelectionEvent lse) {\r\n if(!lse.getValueIsAdjusting()) {\r\n int rowIndex = model.getMinSelectionIndex();\r\n \r\n if(rowIndex == -1) {\r\n return ;\r\n }\r\n\r\n for (int i = 0; i < record.length; i++) {\r\n record[i] = \r\n (String)tableModel.getValueAt(rowIndex, i);\r\n }\r\n\r\n nameTf.setText(record[0]);\r\n locationTf.setText(record[1]);\r\n specialtiesTf.setText(record[2]);\r\n sizeTf.setText(record[3]);\r\n rateTf.setText(record[4]);\r\n ownerTf.setText(record[5]);\r\n recNoTf.setText(record[6]);\r\n updateStatus(\"Choose record.\");\r\n }\r\n }", "private void onSelectPatient() {\n\t\tint selectedRowIndex = tablePatients.getSelectedRow();\n\n\t\tif (selectedRowIndex < 0) {\n\t\t\t// No row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(false);\n\t\t\tbuttonViewPatient.setEnabled(false);\n\t\t} else {\n\t\t\t// A row has been selected\n\t\t\tbuttonRemovePatient.setEnabled(true);\n\t\t\tbuttonViewPatient.setEnabled(true);\n\t\t}\n\t}", "@Override\r\n public void tableChanged(TableModelEvent e) {\n\r\n }", "public void selectionChanged(\r\n\t\t\t\t\t\t\tSelectionChangedEvent selectionChangedEvent) {\r\n\t\t\t\t\t\tsetSelection(selectionChangedEvent.getSelection());\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}", "@Override\n public void focusGained(FocusEvent e) {\n\n currentColumn = ((FormEntry.EntryField)e.getComponent()).getColumn();\n if (selectionAction == WAITING_ON_SELECTION) {\n selectionAction = SENDING_SELECTION;\n }\n if (selectionAction == SENDING_SELECTION) {\n selectionAction = FINISHED_SELECTION;\n cellNotifier.select(currentRow, currentColumn);\n }\n\n }", "public boolean isSelectionChanged();", "protected abstract void selectedCurrencyChanged();", "private void checkSelection() {\n \t\tboolean oldIsSelection = isSelection;\n \t\tisSelection = text.getSelectionCount() > 0;\n \t\tif (oldIsSelection != isSelection) {\n \t\t\tfireEnablementChanged(COPY);\n \t\t\tfireEnablementChanged(CUT);\n \t\t}\n \t}", "void onSelectedEventChange(@Nullable Event currentSelectedEvent);", "private boolean formSelectedAsChanged( HttpServletRequest request )\n {\n String strFormSelectedNewValue = request.getParameter( FormsConstants.PARAMETER_ID_FORM );\n boolean bIdFormHasChanged = false;\n if ( strFormSelectedNewValue != null )\n {\n bIdFormHasChanged = !strFormSelectedNewValue.equals( _strFormSelectedValue );\n _strFormSelectedValue = strFormSelectedNewValue;\n }\n\n return bIdFormHasChanged;\n }", "public void itemsSelected() {\n getEntitySelect().close();\n Collection<T> selectedValues = getEntitySelect().getResults().getSelectedValues();\n setReferencesToParentAndPersist((T[]) selectedValues.toArray());\n showAddSuccessful();\n }", "protected void saveSelection ()\t{\n\t\t//\tAlready disposed\n\t\tif (m_table == null)\n\t\t\treturn;\n\n\t\tm_results.addAll(getSelectedRowKeys());\n\n\t\t//\tSave Settings of detail info screens\n//\t\tsaveSelectionDetail();\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tupdateOkState();\r\n\t\t\t}", "private void linterSelected() {\n if (selectedLinter == null || !selectedLinter.equals(linterComboBox.getSelectedItem())) {\n selectedLinter = (String) linterComboBox.getSelectedItem();\n if (!GoLinterConfig.INSTANCE.getGoLinterExe().equals(linterComboBox.getSelectedItem()))\n modified = true;\n refreshLinterTable();\n }\n }", "public void stateChanged( ChangeEvent event )\n {\n // Update view with extended system games selected in the Single row system.\n int minRights = maltipsDocument.getMaltipsSystem().getSingleSystem().getMinInSingleRow();\n minComboBox.setSelectedIndex( minRights );\n \n int maxRights = maltipsDocument.getMaltipsSystem().getSingleSystem().getMaxInSingleRow();\n maxComboBox.setSelectedIndex( maxRights );\n }", "@Override\r\n public void changedUpdate(DocumentEvent e)\r\n {\n }" ]
[ "0.67247427", "0.6439475", "0.632956", "0.6156801", "0.61177105", "0.60266787", "0.60085595", "0.5987219", "0.5938364", "0.5880255", "0.58781636", "0.58611685", "0.5852221", "0.5831496", "0.58187044", "0.57883817", "0.5762883", "0.5762374", "0.57438993", "0.57371354", "0.57218516", "0.5715124", "0.5709934", "0.57047397", "0.57021457", "0.5699069", "0.569344", "0.5691205", "0.5691097", "0.5680393", "0.56735575", "0.5672518", "0.5670379", "0.56693274", "0.56671625", "0.5663814", "0.5659053", "0.56538093", "0.5652609", "0.5643483", "0.5634701", "0.5629723", "0.5628527", "0.5625007", "0.5612372", "0.5588647", "0.5571791", "0.55645", "0.5560672", "0.5559273", "0.5556754", "0.55507654", "0.55507654", "0.55471253", "0.5542908", "0.55306745", "0.5529141", "0.5524521", "0.550498", "0.54994845", "0.54991615", "0.5488455", "0.5482194", "0.54797775", "0.5476438", "0.54654765", "0.54598635", "0.5452877", "0.54403603", "0.5439127", "0.5433667", "0.5433489", "0.54334277", "0.542604", "0.5425906", "0.5418162", "0.54047424", "0.5399264", "0.53961813", "0.53948915", "0.5392705", "0.5389122", "0.53761876", "0.53707993", "0.53671", "0.53632796", "0.53619707", "0.5356158", "0.53535616", "0.5341937", "0.53300124", "0.5328455", "0.53273475", "0.5324036", "0.5323909", "0.5321712", "0.53171986", "0.5316488", "0.531531", "0.53072923", "0.53062445" ]
0.0
-1
first is setup for testfind matches this string has only one word the findmatches should recognize Next is setup for testtostring
@Before public void setUp() { dict = new Dictionary(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void StringFinder()\n {\n // String to be scanned to find the pattern.\n String TargetString = \"Find me in me this string me, test me\";\n String SearchExpression_literal = \"me\"; // Default Pattern (RegEx ) group\n\n // Create a Pattern object\n Pattern r = Pattern.compile(SearchExpression_literal);\n // Now create matcher object.\n Matcher m = r.matcher(TargetString);\n\n int SearchFindCounter = 0;\n /**\n * Matcher.find() Returns Boolean for every occurrence found\n */\n if (m.find())\n { \n \t System.out.println(\"Match Found\");\n }\n }", "@Test\n public void wordPatternTest() {\n String pattern = \"aaa\", str = \"aa aa aa aa\";\n boolean ans = instance.wordPattern(pattern, str);\n System.out.println(ans);\n }", "@Test\n\tpublic void SecondforWinnerchecker() {\n\t\tString stringOfTestingWord = (\"neword\");\n\t\tboolean ExpectedResult = true;\n\t\tboolean MethodResult = object1.Winnerchecker(stringOfTestingWord);\n\t\tassertEquals(ExpectedResult, MethodResult);\n\t}", "@Test\n public void testSpinOneWord() {\n final String actualResult = kata4.spinWord(\"This is another test\");\n final String expectedResult = \"This is rehtona test\";\n assertEquals(expectedResult, actualResult);\n }", "public GrandChildOfStringMatch() {}", "public void test_caselessmatch05() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch05.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[a-z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n\tpublic void singleWordGrepTest3() throws Exception {\n\t\t// word is 'mistress'\n\t\tHashSet<String> grepFound = loadGrepResults(\"mistress\");\n\t\tCollection<Page> index = queryTest.query(\"mistress\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}", "@Test \r\n public void shouldFindOneWordAtTheEnd() {\r\n \r\n String inputWord = \"bxxxxxxxe\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"be\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n \r\n assertEquals(\"be\", wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public void testReadAsString() throws Exception {\n\t\tString foundText = te.getTextAsString();\n\n\t\t// Turn the string array into a single string\n\t\tStringBuffer expectTextSB = new StringBuffer();\n\t\tfor(int i=0; i<allTheText.length; i++) {\n\t\t\texpectTextSB.append(allTheText[i]);\n\t\t\texpectTextSB.append('\\n');\n\t\t}\n\t\tString expectText = expectTextSB.toString();\n\n\t\t// Ensure they match\n\t\tassertEquals(expectText,foundText);\n\t}", "public void test_caselessmatch06() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch06.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', 'K', 'i')\"; \n \t \n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch04() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch04.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', '[A-Z]', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch07() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch07.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = \"matches('K', 'k', 'i')\";\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n public void testPatter(){\n String str = \"select * from t_user where deletea dropa\";\n str = str.toUpperCase();\n // String re = \"(update|delete|insert|drop|alter)\";\n // String re = \"(update\\\\b)|(delete\\\\b)|(insert)|(drop)|(alter)\";\n // String re = \"\\\\b[(update)|(delete)|(insert)|(drop)|(alter)\\\\b\";\n // System.out.println(str.indexOf(\"updatea\"));\n // System.out.println(\"update\".matches(str));\n // System.out.println(str.matches(re));\n /* System.out.println(re.matches(str));\n String[] ss = str.split(re);\n System.out.println(ss.length);\n for(String s: ss){\n System.out.println(s);\n }*/\n\n String re =\"(\\\\bupdate\\\\b)|(\\\\bdelete\\\\b)|(\\\\binsert\\\\b)|(\\\\bdrop\\\\b)|(\\\\balter\\\\b)\";\n Pattern p = Pattern.compile(re,Pattern.CASE_INSENSITIVE );\n Matcher m = p.matcher(str);\n System.out.println(m.find());\n\n }", "public void strComp() {\n\t\tSystem.out.printf(\"total word: %d\", userstring.size());\n\t\tint i = 0, j = 0, k = 0;\n\t\twhile (i < userstring.size() ) {\n\t\t\tif (userstring.get(i++).equalsIgnoreCase(masterString.get(j++))) {\n\t\t\t\t// user said correct word. update the array and total number of\n\t\t\t\t// matches\n\t\t\t\tmatchValues[k] = true;\n\t\t\t\ttotalCorrectMatches++;\n\t\t\t} \n\t\t\tk++;\n\t\t}\n\n\t}", "private String keywordFound(){\r\n\t\tString rtn = \"\";\r\n\t\tString tmp = \"\";\r\n\t\tint carr_pos = getCaretPosition();\r\n\t\t//estract part of text for keyword search\r\n\t\ttry { \r\n\t\tif(carr_pos>50)\r\n\t\t\ttmp = doc.getText(carr_pos-50,50);\r\n\t\telse\r\n\t\t\ttmp = doc.getText(0,carr_pos);\r\n\t\t}catch(BadLocationException a){\r\n\t\t\tSystem.out.println(\"exception\");\r\n\t\t\treturn rtn;\r\n\t\t};\r\n\t\t//Start check\r\n\t\tint i = 0;\r\n\t\tif(tmp.length() >= 2)i = tmp.length()-2;\t\r\n\t\twhile(checkOperator(tmp.charAt(i)) && i > 0){\r\n\t\t\trtn += tmp.charAt(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t\tif(i == 0)rtn += tmp.charAt(i);\t\t\r\n\t\treturn mirrorString(rtn);\r\n\t}", "@Test\n public void seeInfoAboutAisleFromSearch(){\n String itemTest = \"Potatoes\";\n String aisleCheck = \"Aisle: 2\";\n String aisleDescriptionCheck = \"Aisle Description: Between Aisle 1 and Frozen Aisle\";\n onView(withId(R.id.navigation_search)).perform(click());\n onView(withId(R.id.SearchView)).perform(typeText(itemTest));\n onData(anything()).inAdapterView(withId(R.id.myList)).atPosition(0).perform(click());\n onView(withText(\"VIEW MORE INFORMATION\")).perform(click());\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleCheck), isDisplayed())));\n onView(withId(android.R.id.message)).check(matches(allOf(withSubstring(aisleDescriptionCheck), isDisplayed())));\n onView(withText(\"OK\")).perform(click());\n }", "public void test_caselessmatch02() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch02.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public static void main(String[] args) {\n//\n// String pattern = \"abba\";\n// String s = \"dog cat cat fish\";\n\n\n// String pattern = \"aaaa\";\n// String s = \"dog cat cat dog\";\n\n String pattern = \"abba\";\n String s = \"dog dog dog dog\";\n\n// String pattern = \"e\";\n// String s = \"eukera\";\n\n boolean flag = wordPattern(pattern, s);\n\n System.out.println(flag);\n }", "@Test(timeout = 4000)\n public void test61() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Usually the address of the publisher or other type of institution. For major publishing houses, van Leunen recommends omitting the information entirely. For small publishers, on the other hand, you can help the reader by giving the complete address.\");\n assertEquals(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you can help th reader by giv th comples addres.\", string0);\n }", "@Test(timeout = 4000)\n public void test57() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "@Test\n\tpublic void secodFortheLine() {\n\t\tString stringOfTestingWord = (\"newword\");\n\t\tStringBuilder MethodResult = object1.theLine(stringOfTestingWord);\n\t\tStringBuilder ExpectedResult = new StringBuilder();\n\t\tfor (int i = 0; i < stringOfTestingWord.length(); i++) {\n\t\t\tExpectedResult.append(\"-\");\n\t\t}\n\t\tassertEquals(ExpectedResult.toString(), MethodResult.toString());\n\t}", "@RepeatedTest(20)\n void transformtoTStringTest(){\n assertEquals(st.transformtoString(),new TString(hello));\n assertEquals(bot.transformtoString(),new TString(bot.toString()));\n assertEquals(bof.transformtoString(),new TString(bof.toString()));\n assertEquals(f.transformtoString(),new TString(f.toString()));\n assertEquals(i.transformtoString(),new TString(i.toString()));\n assertEquals(bi.transformtoString(),new TString(bi.toString()));\n assertEquals(Null.transformtoString(), Null);\n }", "@Test\n\tvoid runRegExFoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"S(a|r|g)*on\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(30, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "public StrChecks(Audio_Store aud, String mString) {\n\t\ttotalCorrectMatches = 0;\n\t\tmasterString = new ArrayList<String>(Arrays.asList(mString.split(\" \")));\n\t\tmatchValues = new boolean[masterString.size()];\n\t\tArrays.fill(matchValues, false); // fill the array with false values\n\t\tuserstring = aud.getUserArrayList();\n\t\ttotalNumWords = masterString.size();\n\t}", "@Test\n\tpublic void singleWordGrepTest2() throws Exception {\n\t\t// word is 'crazy'\n\t\tHashSet<String> grepFound = loadGrepResults(\"crazy\");\n\t\tCollection<Page> index = queryTest.query(\"crazy\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}", "@Test\n public void testSpinTwoWords() {\n final String actualResult = kata4.spinWord(\"Hey fellow warriors\");\n final String expectedResult = \"Hey wollef sroirraw\";\n assertEquals(expectedResult, actualResult);\n }", "@Test\n public void repeatedSubstringPattern() {\n assertTrue(new Solution1().repeatedSubstringPattern(\"abcabcabcabc\"));\n }", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "@Test\n\tpublic void fortheLine() {\n\t\tString stringOfTestingWord = (\"aword\");\n\t\tStringBuilder MethodResult = object1.theLine(stringOfTestingWord);\n\t\tStringBuilder ExpectedResult = new StringBuilder();\n\t\tfor (int i = 0; i < stringOfTestingWord.length(); i++) {\n\t\t\tExpectedResult.append(\"-\");\n\t\t}\n\t\tassertEquals(ExpectedResult.toString(), MethodResult.toString());\n\n\t}", "@Test\n\tpublic void forWinnerchecker() {\n\t\tString stringOfTestingWord = (\"aword\");\n\t\tboolean ExpectedResult;\n\t\tExpectedResult = true;\n\t\tboolean MethodResult = object1.Winnerchecker(stringOfTestingWord);\n\t\tassertEquals(ExpectedResult, MethodResult);\n\t}", "public static void stringManipulations() {\n\t\tString str=\"hello naresh how are you\";\n\t\t// 012345678901234567890123 lengh=23\n\t\tString str2=\"hello naresh how are you\";\n\t\tString str3=\"Hello naresh how are you\";\n\t\t\n\t\tSystem.out.println(\"length of array :\"+str.length());\n\t\tSystem.out.println(\"char at 5th possition :\"+str.charAt(5));\n\t\tSystem.out.println(\"o char possition :\"+str.indexOf(\"o\"));//it si 1st occurance of O\n\t\t//here where the \"o\" possition is found that position will remains skips...\n\t\t//***in interviewer will ask i want 2nd \"o\" position at that time below statement\n\t\t//here directly we can give po\n\t\tSystem.out.println(\"2nd possition is :\"+str.indexOf(\"o\",str.indexOf(\"o\")+2));//2nd occurancy of o\n\t\t//2 nd 3rd occurancy search google\n\t\tSystem.out.println(str.indexOf(\"h\"));\n\t\tSystem.out.println(str.indexOf(\"how\"));\n\t\tSystem.out.println(str.indexOf(\"kjdsnfksd\"));//somany people think o/p is error or some exception but it will give \n\t\t//output is \"-1\"\n\t\t//string comparisum..\n\t\tSystem.out.println(str==str2);\n\t\tSystem.out.println(str==str3);\n\t\tSystem.out.println(str.equalsIgnoreCase(str3));//here cases (capt or small) ignored \n\t\t//substring\n\t\tSystem.out.println(str.substring(6, 12)); //it will give o/p char is in b/w\n\t\t//6 and 16\n\t\tSystem.out.println(str.trim());\n\t\t//it will trim the speaces befor anfter string bt it could not delete between speaces\n\t\tSystem.out.println(str2.replace(\" \", \"_\"));\n\t\tString[] strArray=str.split(\" \");\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tSystem.out.println(strArray[i]);\n\t\t}\n\t}", "public void test_caselessmatch13() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch13.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n public void testSpinNoneWord() {\n final String actualResult = kata4.spinWord(\"This is a test\");\n final String expectedResult = \"This is a test\";\n assertEquals(expectedResult, actualResult);\n }", "@Test\n public void sunnyday_string(){\n SetupMocks.setup();\n\n List<Token> tokens= new ArrayList<>();\n\n tokens.add(new Token(Token.TSTRG,1,1,null));\n\n\n tokens.add(new Token(Token.TILIT,1,1,null));\n\n Parser parser = new Parser(tokens);\n\n NPrintItemNode nPrintItemNode = new NPrintItemNode();\n nPrintItemNode.setnExprNode(NExprNode.INSTANCE());\n\n TreeNode printitem = nPrintItemNode.make(parser);\n\n assertEquals(TreeNode.NSTRG, printitem.getValue());\n\n }", "@Test(timeout = 4000)\n public void test41() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usually the address of the publisher or other type of institution. for major publishing houses, van leunen recommends omitting the information entirely. for small publishers, on the other hand, you &an help the reader by giving the complete address.\");\n assertEquals(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\", string0);\n }", "public void test_caselessmatch03() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch03.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n\tpublic void stringFilterTest(){\n\t\t\n\t\tList<IElement> result = filter.process(elements);\n\t\t\n\t\tAssert.assertNotNull(\"The result of filter is null!\",result);\n\t\tAssert.assertEquals(\"More results than expected, filter execution fail.\",\n\t\t\t\texpectedResultNum.intValue(),result.size());\n\t\t\n\t\t\n\t}", "public boolean matchAnyString() { return false; }", "@Test\n void labTask() {\n String s = \"abczefoh\";\n List<String> result = StringSplitter.labTask(s);\n\n String first = result.get(0);\n assertEquals(3, first.length());\n assertEquals('a', first.charAt(0));\n assertFalse(\"abc\".contains(String.valueOf(first.charAt(1))));\n assertEquals('c', first.charAt(2));\n\n String second = result.get(1);\n assertEquals(2, second.length());\n assertEquals('o', second.charAt(0));\n assertFalse(\"oh\".contains(String.valueOf(second.charAt(1))));\n\n String third = result.get(2);\n assertEquals(3, third.length());\n assertEquals('z', third.charAt(0));\n assertFalse(\"zef\".contains(String.valueOf(second.charAt(1))));\n assertEquals('f', third.charAt(2));\n }", "@Test\n\tvoid runRegExUnfoundText_LegalCase() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"Introuvable\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tArrayList<MatchResponse> response = a.search(\"books/babylon.txt\");\n\t\t\tassertEquals(0, response.size());\n\t\t} catch (Exception e) {\n\t\t\tfail();\n\t\t}\n\t\tactualScore += 10;\n\t}", "public void test_caselessmatch12() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch12.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test(timeout = 4000)\n public void test58() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The WWW Universal Resource Locator that points to the item being referenced. This often is used for technical reports to point to the ftp site where the postscript source of the report is located.\");\n assertEquals(\"th www univers resourc loc that point to th item being refer. th oft is us for techn report to point to th ftp sit whes th postscript sourc of th report is loc.\", string0);\n }", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"us for alphabes, cros refer, and creat a label when th ``author'' inform is mis. th field should not be confus with th key that appear in th cit command and at th begin of th databas entr.\");\n assertEquals(\"us for alphab, cro refer, and creat a label when th ``author'' inform is mi. th field should not be confus with th key that appear in th cit command and at th begin of th datab entr.\", string0);\n }", "public void test_caselessmatch01() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch01.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public static void main (String[] args)\n {\n String test = \"software\";\n \n CharSequence seq = \"soft\";\n boolean bool = test.contains(seq);\n System.out.println(\"Found soft?: \" + bool);\n \n // it returns true substring if found.\n boolean seqFound = test.contains(\"war\");\n System.out.println(\"Found war? \" + seqFound);\n \n // it returns true substring if found otherwise\n // return false.\n boolean sqFound = test.contains(\"wr\");\n System.out.println(\"Found wr?: \" + sqFound);\n }", "public void testStrings()\n {\n final ReportStringWriter rptr = new ReportStringWriter();\n\n final StringBuffer sb = new StringBuffer()\n .append(\"Cat food\").append('\\n');\n final Reader netRdr = new StringReader(sb.toString());\n final NamedEntityTree net = new NamedEntityTree();\n net.load(netRdr);\n\n StringReader txtRdr = new StringReader(\"Dog food. Eat more Cat food now.\");\n final Lexer lex = new Lexer();\n lex.load(txtRdr);\n lex.analyze();\n\n final Parser parser = new Parser();\n parser.parse(lex);\n\n net.recognize(rptr, net, 1, lex.getSymbolTable(), parser);\n\n assertEquals( \"ROOT:Cat:food\\n\",\n rptr.toString());\n }", "@Test\n public void testContainStringSimpleCase() throws Exception {\n Search search = mock(Search.class);\n Mockito.when(search.containsString((Pattern) any(), (Path) any())).thenCallRealMethod();\n Mockito.when(search.containsString(anyString(), (Path) any())).thenCallRealMethod();\n\n Path path = Paths.get(getClass().getResource(\"/containsString.test\").toURI());\n assertTrue(search.containsString(\"occurrence\", path));\n assertFalse(search.containsString(\"non-existent-string\", path));\n }", "@Test(timeout = 4000)\n public void test45() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th nam of a ser or ses of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-volum ses in which th book is publ.\");\n assertEquals(\"th nam of a ser or se of book. when cit an entir book, th th titl field giv it titl and an opt ser field giv th nam of a ser or mult-vol se in which th book is publ.\", string0);\n }", "public void test_caselessmatch09() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch09.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch14() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch14.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public static void main(String[] args) {\n\t\tMyString e = new MyString(\"Jayaseelan\");\n\n\t\t// Test #1\n\t\tint expected1 = 5;\n\t\t// theString = \"Jayaseelan\";\n\t\tint result1 = e.getVowelsCount();\n\t\tif (expected1 == result1) {\n\t\t\tSystem.out.println(\"test passes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"test fails\");\n\t\t}\n\n\t\t// Test #2\n\t\tint expected2 = 5;\n\n\t\tint result2 = e.getConsonantCount();\n\t\tif (expected2 == result2) {\n\t\t\tSystem.out.println(\"test passes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"test fails\");\n\t\t}\n\n\t\t// Test #3\n\t\tint expected3 = 1;\n\n\t\tint result3 = e.getNumCapitalLetters();\n\t\tif (expected3 == result3) {\n\t\t\tSystem.out.println(\"test passes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"test fails\");\n\t\t}\n\n\t\t// Test #4\n\t\tint expected4 = 10;\n\n\t\tint result4 = e.getLength();\n\t\tif (expected4 == result4) {\n\t\t\tSystem.out.println(\"test passes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"test fails\");\n\t\t}\n\n\t\t// Test #4\n\t\tint expected5 = 381;\n\n\t\tint result5 = e.getSumOfAllCharacters();\n\t\t// System.out.println(result5);\n\t\tif (expected4 == result4) {\n\t\t\tSystem.out.println(\"test passes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"test fails\");\n\t\t}\n\n\t\t// Test #5\n\t\tString expected6 = \"naleesayaJ\";\n\n\t\tString result6 = e.reverse();\n\t\t// System.out.println(result5);\n\t\tif (expected6.equals(result6)) {\n\t\t\tSystem.out.println(\"test passes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"test fails\");\n\t\t}\n\n\t}", "public void test_caselessmatch08() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch08.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "final void checkMatch(String input,String url,String title)\r\n {\r\n String searchLine=removeHTMLTags(input); // remove html tags before search.\r\n // If the line contains non - HTML text then search it.\r\n\tif(searchLine.length()>0)\r\n\t{\r\n\t if(app.matchCase) // Check if case sensitive search\r\n\t {\r\n\t if(app.matchWord) // Check if attempting to match whole word\r\n\t\t{\r\n\t\t if(searchLine.indexOf(\" \"+textToFind+\" \")!=-1 ||\r\n \t\t (searchLine.indexOf(textToFind)!=-1 && searchLine.length()==textToFind.length()) ||\r\n\t\t\t\t searchLine.indexOf(\" \"+textToFind)!=-1 && textToFind.charAt(textToFind.length()-1)==\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t searchLine.charAt(searchLine.length()-1))\r\n\t\t {\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\t\r\n\t\t }\r\n\t\t}\r\n\t\telse if(searchLine.indexOf(textToFind)!=-1)\r\n\t\t{\r\n\t\t // Found it display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t else\r\n\t {\r\n\t String lower1=searchLine.toLowerCase();\r\n\t\tString lower2=textToFind.toLowerCase();\r\n\t\t// Check if attempting to match the whole word.\r\n\t\tif(app.matchWord)\r\n\t\t{\r\n\t\t if(lower1.indexOf(\" \"+lower2+\" \")!=-1 || \r\n\t\t (lower1.indexOf(lower2)!=-1 && lower1.length()== lower2.length()) ||\r\n\t\t\t (lower1.indexOf(\" \"+lower2)!=-1 && lower2.charAt(lower2.length()-1) == \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t lower1.charAt(lower1.length()-1)))\r\n {\r\n\t\t // Found it display the match\r\n\t\t\tapp.addToList(url,searchLine,title);\r\n\t\t\thitsFound++;\r\n\t\t }\r\n\t\t}\r\n\t\telse if(lower1.indexOf(lower2)!=-1)\r\n\t\t{\r\n\t\t // Found it! Display the match\r\n\t\t app.addToList(url,searchLine,title);\r\n\t\t hitsFound++;\r\n\t\t}\r\n\t }\r\n\t}\r\n }", "public static void main(String[] args){\n String str = \"aasdfasdfasdfasdfas\";\n String pattern = \"aasdf.*asdf.*asdf.*asdf.*s\";\n// String str = \"mississippi\";\n// String pattern = \"mis*is*ip*.\";\n// String pattern = \"mis*is*p*.\";\n// String pattern = \"mis*is*ip*.\";\n// String str = \"aaaaaaaaaaaaac\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*c\";\n long time = System.currentTimeMillis();\n// String str = \"aaaaaaaaaaaaab\";\n// String pattern = \"a*a*a*a*a*a*a*a*a*a*b\";\n System.out.println(find(str,pattern));\n System.out.println(\"time: \" + (System.currentTimeMillis() - time));\n }", "public void test_caselessmatch11() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch11.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "public void test_caselessmatch15() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch15.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-true.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n\tpublic void singleWordGrepTest4() throws Exception {\n\t\t// word is 'undocumented'\n\t\tHashSet<String> grepFound = loadGrepResults(\"undocumented\");\n\t\tCollection<Page> index = queryTest.query(\"undocumented\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}", "@Test public void readStringDescriptionsNotJustSingleWord() {\n fail( \"Not yet implemented\" );\n }", "@Test\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ArrayStringFilter.Mode arrayStringFilter_Mode0 = ArrayStringFilter.Mode.EXACT;\n String[] stringArray0 = new String[6];\n stringArray0[0] = \"iul \";\n stringArray0[1] = \"iul \";\n stringArray0[2] = \"iul \";\n ArrayStringFilter arrayStringFilter0 = new ArrayStringFilter(arrayStringFilter_Mode0, stringArray0);\n String string0 = arrayStringFilter0.toString();\n Any any0 = new Any((Component) errorPage0, (CharSequence) \"EXACT:iul ,iul ,iul ,null,null,null\");\n }", "public abstract boolean isSingleCharMatcher();", "public GrandChildOfStringMatch(boolean makeUnique) {\n super(makeUnique);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you &an help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you &an help th reader by giv th compl addr.\", string0);\n }", "public void testSearchByContent() {\n Message m1 = new Message(\"test\",\"bla bla david moshe\",_u1);\n Message.incId();\n try {\n Thread.sleep(10);\n } catch (InterruptedException ex) {\n ex.printStackTrace();\n }\n Message m2 = new Message(\"test2\",\"bla2 bla david tikva moshe\",_u1);\n Message.incId();\n Message m3 = new Message(\"test2\",\"moshe cohen\",_u1);\n Message.incId();\n\n this.allMsgs.put(m1.getMsg_id(), m1);\n this.allMsgs.put(m2.getMsg_id(), m2);\n this.allMsgs.put(m3.getMsg_id(), m3);\n\n this.searchEngine.addData(m1);\n this.searchEngine.addData(m2);\n this.searchEngine.addData(m3);\n\n /* SearchHit[] result = this.searchEngine.searchByContent(\"bla2\", 0,1);\n assertTrue(result.length==1);\n assertTrue(result[0].getMessage().equals(m2));\n\n SearchHit[] result2 = this.searchEngine.searchByContent(\"bla david tikva\", 0,2);\n assertTrue(result2.length==1);\n assertEquals(result2[0].getScore(),3.0);\n //assertEquals(result2[1].getScore(),2.0);\n assertTrue(result2[0].getMessage().equals(m2));\n //assertTrue(result2[1].getMessage().equals(m1));\n\n SearchHit[] result3 = this.searchEngine.searchByContent(\"bla2 tikva\", 0, 5);\n assertTrue(result3.length==0);\n */\n\n/*\n SearchHit[] result4 = this.searchEngine.searchByContent(\"bla OR tikva\", 0, 5);\n assertTrue(result4.length==2);\n assertTrue(result4[0].getMessage().equals(m2));\n assertTrue(result4[1].getMessage().equals(m1));\n\n SearchHit[] result5 = this.searchEngine.searchByContent(\"bla AND cohen\", 0, 5);\n assertTrue(result5.length==0);\n\n result5 = this.searchEngine.searchByContent(\"bla AND moshe\",0,5);\n assertTrue(result5.length==2);\n assertTrue(result5[0].getScore() == result5[1].getScore());\n assertTrue(result5[0].getMessage().equals(m2));\n assertTrue(result5[1].getMessage().equals(m1));\n\n result5 = this.searchEngine.searchByContent(\"bla AND moshe\", 10, 11);\n assertTrue(result5.length==0);\n */\n\n }", "@Test\n\tpublic void testSearchWholeProgramOnlyWords() throws Exception {\n\n\t\tStringTableProvider provider = performSearch();\n\t\tStringTableModel model = (StringTableModel) getInstanceField(\"stringModel\", provider);\n\t\tGhidraTable table = (GhidraTable) getInstanceField(\"table\", provider);\n\n\t\ttoggleDefinedStateButtons(provider, true, true, false, false, true);\n\t\twaitForTableModel(model);\n\n\t\t// first entry\n\t\tAddress expectedAddress = addr(0x4040c0);\n\t\tAddressBasedLocation location =\n\t\t\t(AddressBasedLocation) getModelValue(model, 0, addressColumnIndex);\n\t\tif (!expectedAddress.equals(location.getAddress())) {\n\t\t\tprintContents(model);\n\t\t}\n\t\tassertEquals(expectedAddress, location.getAddress());\n\n\t\t// last entry\n\t\tassertEquals(\"00405db4\",\n\t\t\tgetModelValue(model, model.getRowCount() - 1, addressColumnIndex).toString());\n\n\t\t// check the table entries in some of the rows to make sure they are\n\t\t// populated correctly\n\n\t\t// row [0]\n\t\tassertEquals(null, getModelValue(model, 0, labelColumnIndex));\n\n\t\tCodeUnitTableCellData data =\n\t\t\t(CodeUnitTableCellData) getModelValue(model, 0, previewColumnIndex);\n\t\tassertEquals(\"?? 53h S\", data.getDisplayString());\n\t\tassertEquals(\"\\\"SING error\\\\n\\\\r\\\"\", getModelValue(model, 0, asciiColumnIndex));\n\n\t\tString stringData = (String) getModelValue(model, 0, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t// row [1]\n\t\tint row = findRow(model, addr(0x404328));\n\t\tassertEquals(\"00404328\", getModelValue(model, row, addressColumnIndex).toString());\n\t\tassertEquals(null, getModelValue(model, row, labelColumnIndex));\n\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);\n\t\tassertEquals(\"?? 4Dh M\", data.getDisplayString());\n\t\tassertEquals(\"\\\"Microsoft Visual C++ Runtime Library\\\"\",\n\t\t\tgetModelValue(model, row, asciiColumnIndex));\n\n\t\tstringData = (String) getModelValue(model, row, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t// row [6]\n\t\trow = findRow(model, addr(0x404fde));\n\t\tassertEquals(\"00404fde\", getModelValue(model, row, addressColumnIndex).toString());\n\t\tassertEquals(null, getModelValue(model, row, labelColumnIndex));\n\n\t\tdata = (CodeUnitTableCellData) getModelValue(model, row, previewColumnIndex);\n\t\tassertEquals(\"?? 0Ah\", data.getDisplayString());\n\t\tassertEquals(\"\\\"\\\\n\\\\rString6\\\\n\\\\r\\\"\", getModelValue(model, row, asciiColumnIndex));\n\n\t\tstringData = (String) getModelValue(model, row, isWordColumnIndex);\n\t\tassertEquals(\"true\", stringData);\n\n\t\t//********************************************************\n\t\t//***********TEST SELECTING ROW IN TABLE*******************\n\t\t// ********* test that selecting a row does the following:\n\t\t//**********************************************************\n\t\tselectRow(table, 0);\n\n\t\t// test that the row is really selected\n\t\tint[] ts = table.getSelectedRows();\n\t\tassertEquals(1, ts.length);\n\t\tassertEquals(0, ts[0]);\n\n\t\t// is the make string button enabled (should be)\n\t\tJButton makeStringButton = (JButton) findButton(provider.getComponent(), \"Make String\");\n\t\tassertTrue(makeStringButton.isEnabled());\n\n\t\t// is the make ascii button enabled\n\t\tJButton makeAsciiButton = (JButton) findButton(provider.getComponent(), \"Make Char Array\");\n\t\tassertTrue(makeAsciiButton.isEnabled());\n\n\t\tDockingAction makeStringAction =\n\t\t\t(DockingAction) getInstanceField(\"makeStringAction\", provider);\n\n\t\tint selectedRow = table.getSelectedRow();\n\n\t\tperformAction(makeStringAction, model);\n\n\t\t// test that the string was actually made correctly\n\t\tData d = listing.getDataAt(addr(0x4040c0));\n\t\tDataType dt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof StringDataType);\n\n\t\t// test that the string len is correct to get the end of chars\n\t\tassertEquals(13, d.getLength());\n\n\t\t// check that the selected row in the table moves to the next row\n\t\tts = table.getSelectedRows();\n\t\tassertEquals(1, ts.length);\n\t\tassertEquals(selectedRow + 1, ts[0]);\n\n\t\t// select the fourth row\n\t\tselectRows(table, addr(0x0404f27));\n\t\tselectedRow = table.getSelectedRow();\n\t\tperformAction(makeStringAction, model);\n\n\t\t// test that the string was actually made correctly\n\t\td = listing.getDataAt(addr(0x404f27));\n\t\tdt = d.getBaseDataType();\n\t\tassertTrue(dt instanceof UnicodeDataType);\n\n\t\t// test that the string len is correct to get the end of chars\n\t\tassertEquals(24, d.getLength());\n\n\t\t// test that the String Type is correct\n\t\tassertEquals(\"unicode\",\n\t\t\tgetModelValue(model, selectedRow, stringTypeColumnIndex).toString());\n\t}", "@Test //TEST TWO\n void testallLowerBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"dwarfhotot\"); //Dwarf Hotot\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }", "public void testFindByKeyword() {\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\");\n assertEquals(\"nam(s) of edit(s), typ as ind in th lat book. if ther is al an author field, then th edit field giv th edit of th bok or cllect in which th refer appear.\", string0);\n }", "@Test(timeout = 4000)\n public void test50() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"usu th addres of th publishes or other typ of institut. for major publish hous, van leun recommens omis th inform entir. for smal publishes, on th other hand, you can help th reader by giv th comples addres.\");\n assertEquals(\"usu th addr of th publish or other typ of institut. for major publ hous, van leun recommen om th inform entir. for smal publish, on th other hand, you can help th reader by giv th compl addr.\", string0);\n }", "@Test\n\tvoid testCheckIfWordIsValidAfterSubstitutions() {\n\t\t//\n\t\t// Test for CheckIfWordIsValidAfterSubstitutions\n\t\t//\n\t\tCheckIfWordIsValidAfterSubstitutions checker = new CheckIfWordIsValidAfterSubstitutions();\n\t\tassertTrue(checker.isValid(\"aabcbc\"));\n\t\tassertTrue(checker.isValid(\"abcabcababcc\"));\n\t\tassertFalse(checker.isValid(\"abccba\"));\n\t\tassertFalse(checker.isValid(\"cababc\"));\n\t\tassertFalse(checker.isValid(\"cba\"));\n\t\tassertFalse(checker.isValid(\"bca\"));\n\t\tassertFalse(checker.isValid(\"c\"));\n\t\tassertFalse(checker.isValid(\"z\"));\n\t\tassertFalse(checker.isValid(\"abz\"));\n\t\tassertTrue(checker.isValid(\"\"));\n\n\t\t//\n\t\t// Test for CheckIfWordIsValidAfterSubstitutions2\n\t\t//\n\t\tCheckIfWordIsValidAfterSubstitutions2 checker2 = new CheckIfWordIsValidAfterSubstitutions2();\n\t\tassertTrue(checker2.isValid(\"aabcbc\"));\n\t\tassertTrue(checker2.isValid(\"abcabcababcc\"));\n\t\tassertFalse(checker2.isValid(\"abccba\"));\n\t\tassertFalse(checker2.isValid(\"cababc\"));\n\t\tassertFalse(checker2.isValid(\"cba\"));\n\t\tassertFalse(checker2.isValid(\"bca\"));\n\t\tassertFalse(checker2.isValid(\"c\"));\n\t\tassertFalse(checker2.isValid(\"z\"));\n\t\tassertFalse(checker2.isValid(\"abz\"));\n\t\tassertTrue(checker2.isValid(\"\"));\n\t}", "@Test\n public void test_Contains() {\n System.out.println(\"Testing TracerIsotopes's contains(String checkString)\");\n String checkString = \"\";\n boolean expResult = false;\n boolean result = TracerIsotopes.contains(checkString);\n assertEquals(expResult, result);\n\n checkString=\"fractionMass\";\n result = TracerIsotopes.contains(checkString);\n assertEquals(expResult, result);\n \n checkString=\"concPb205t\";\n expResult=true;\n result = TracerIsotopes.contains(checkString);\n assertEquals(expResult, result); \n }", "public String containsAny(String str)\n {\n String[] words = {\"EDFFPOPUP\",\"SQLTRUE\", \"VLIST\", \"SCROLL\", \"NEXT\",\"FUNCTIONDFF\",\"DFFPOPUP\",\"FUNCTION\" ,\"SQL\",\"DFF\",\"SQLFUNCTION\"};\n\n List<String> list = Arrays.asList(words);\n for (String word: list ) {\n // boolean bFound = str.matches(word);\n boolean bFound = str.contains(word);\n if (bFound) {\n // bResult=bFound;\n str = str.replace(word, \"\");\n str = str.replaceAll(\"[\\\\$\\\\{\\\\}]\",\"\");\n str = str.replace(\"SQL\",\"\"); // todo : solve this sql remain after removing\n // Log.e(DEBUG_TAG, \"DEFAULT STRING = \"+ str +\" WORD =\" +word);\n break;\n }\n }\n return str;\n }", "@Test\n public void testMatch()\n {\n\n List<Match> matches;\n String password;\n PasswordMatcher matcher = new SpacialMatcher();\n\n password = \"aw3ennbft6y\";\n matches = matcher.match(configuration, password);\n\n assert matches.get(0).getToken().equals(\"aw3e\");\n assert matches.get(1).getToken().equals(\"ft6y\");\n assert SpacialMatch.class.cast(matches.get(0)).getShiftedNumber() == 0;\n assert SpacialMatch.class.cast(matches.get(1)).getShiftedNumber() == 0;\n assert SpacialMatch.class.cast(matches.get(0)).getTurns() == 2;\n assert SpacialMatch.class.cast(matches.get(1)).getTurns() == 2;\n\n\n password = \"aW3ennbfT6y\";\n matches = matcher.match(configuration, password);\n\n assert matches.get(0).getToken().equals(\"aW3e\");\n assert matches.get(1).getToken().equals(\"fT6y\");\n assert SpacialMatch.class.cast(matches.get(0)).getShiftedNumber() == 1;\n assert SpacialMatch.class.cast(matches.get(1)).getShiftedNumber() == 1;\n assert SpacialMatch.class.cast(matches.get(0)).getTurns() == 2;\n assert SpacialMatch.class.cast(matches.get(1)).getTurns() == 2;\n\n\n password = \"h\";\n matches = matcher.match(configuration, password);\n\n assert matches.isEmpty();\n\n\n password = \"hl5ca\";\n matches = matcher.match(configuration, password);\n\n assert matches.isEmpty();\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"th sponsor institut of a techn report.uas\");\n assertEquals(\"th spons institut of a techn report.ua\", string0);\n }", "public static String alexBrokenContest(String s){\n\t\tString[] names={\"Danil\", \"Olya\", \"Slava\", \"Ann\",\"Nikita\"};\n\t\tint count=0;\n\t\tfor (int i=0;i<5 ;i++)\n\t\t{\n\t\t\t\n\t\t\tint index = s.indexOf(name[i]);\n\t\t\twhile (index!=-1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tcount++;\n\t\t\t\tindex=s.indexOf(name[i],index+1);\n\t\t\t}\n\t\t}\n\t\tif(count==1)\n\t\t{\n\t\t\n\t\tSystem.out.println(\"YES\");\n\t\t}\n\t\telse\n\t\t{\n\n\t\tSystem.out.println(\"NO\");\n\t\t}\n\t}", "@Test\n void step() {\n Fb2ConverterStateMachine state = new Fb2ConverterStateMachine();\n StringBuilder sb = new StringBuilder();\n WordsTokenizer wt = new WordsTokenizer(getOriginalText());\n while (wt.hasMoreTokens()) {\n String word = wt.nextToken();\n if (state.step(word)) {\n sb.append(word).append(\" \");\n }\n }\n assertEquals(\"test 1 . text- 2 text 0 text 6111 222 \", sb.toString());\n }", "public static void main (String ... args) {\n\n String titulo = \"simple\";\n String pattern = \"abc\";\n String source = \"avsfvasdfabcwefewafabc\";\n find(titulo, pattern, source);\n\n ////////////////////////\n titulo = \"Digitos...\";\n pattern = \"\\\\d\";\n source = \"9a8d70sd98f723708\";\n find(titulo, pattern, source);\n\n titulo = \"NO Digitos...\";\n pattern = \"\\\\D\";\n source = \"9a8d70sd98f723708\";\n find(titulo, pattern, source);\n\n titulo = \"\";\n pattern = \"a?\";\n source = \"aba\";\n find(titulo, pattern, source);\n\n titulo = \"dot methacharacter\";\n pattern = \"a.c\";\n source = \"ac abc a c\";\n find(titulo, pattern, source);\n\n titulo =\"Operator ^ carat\";\n pattern = \"proj1([^,])*\";\n source = \"proj3.txt,proj1sched.pdf,proj1,prof2,proj1.java\";\n find(titulo, pattern, source);\n\n }", "public void test_caselessmatch10() throws Exception {\n String inputFile = \"/TestSources/emptydoc.xml\";\n String xqFile = \"/Queries/XQuery/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch10.xq\";\n String resultFile = \"/ExpectedTestResults/Functions/AllStringFunc/MatchStringFunc/MatchesFunc/caselessmatch-false.txt\";\n String expectedResult = getExpectedResult(resultFile);\n URL fileURL = bundle.getEntry(inputFile);\n loadDOMDocument(fileURL);\n \n // Get XML Schema Information for the Document\n XSModel schema = getGrammar();\n \n DynamicContext dc = setupDynamicContext(schema);\n \n String xpath = extractXPathExpression(xqFile, inputFile);\n String actual = null;\n try {\n \t \t XPath path = compileXPath(dc, xpath);\n \t\n \t Evaluator eval = new DefaultEvaluator(dc, domDoc);\n \t ResultSequence rs = eval.evaluate(path);\n \n actual = buildResultString(rs);\n \t\n } catch (XPathParserException ex) {\n \t actual = ex.code();\n } catch (StaticError ex) {\n actual = ex.code();\n } catch (DynamicError ex) {\n actual = ex.code();\n }\n \n assertEquals(\"XPath Result Error \" + xqFile + \":\", expectedResult, actual);\n \n \n }", "@Test\n public void testRedundant2version() {\n String ver2 = Textile.straighten_weft2(\"aad.bbd+d*ac\");\n assertEquals(\"d.bbac\",ver2);\n }", "public static void main(String[] args) {\n\t\t Pattern p = Pattern.compile(\"(a+)\");\r\n\t\t Matcher m = p.matcher(\"aaaaaba\");\r\n\t\t //System.out.println(m.matches())\r\n\t\t m.find();\t\t \r\n\t\t m.find();\r\n\t\t System.out.println(\"grCount \"+m.groupCount());\t \r\n\t\t MatchResult mr = m.toMatchResult();\r\n\t\t \r\n\t\t System.out.println(m.end());\r\n\t\t System.out.println(\"'\"+mr.group()+\"'\");\r\n\t\t System.out.println(\"start \"+mr.start(1));\r\n\t\t \r\n\t}", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"Name(s) of editor(s), typed as indicated in the LaTeX book. If there is also an author field, then the editor field gives the editor of the book or collection in which the reference appears.\");\n assertEquals(\"nam(s) of edit(s), typ as indic in th latic book. if ther is als an author field, then th edit field giv th edit of th book or collect in which th refer appear.\", string0);\n }", "@Test\n\tvoid testAddAndSearchWordDataStructureDesign() {\n\t\tAddAndSearchWordDataStructureDesign dict = new AddAndSearchWordDataStructureDesign();\n\t\tdict.addWord(\"bad\");\n\t\tdict.addWord(\"dad\");\n\t\tdict.addWord(\"mad\");\n\t\tassertFalse(dict.search(\"pad\"));\n\t\tassertTrue(dict.search(\"bad\"));\n\t\tassertTrue(dict.search(\".ad\"));\n\t\tassertTrue(dict.search(\"b..\"));\n\t}", "@Test\n public void spacesInKeywordTest() {\n tester.correct(\"Laaa Laaa Laaaa Li\" );\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"how something strange has been published. the first word should be capitalized.end\");\n assertEquals(\"how someth strang ha been publ. th first word should be capital.ens\", string0);\n }", "private String buildWordMatch(Matcher matcher, String word){\n return \"(\" + matcher.replaceAll(\"% \"+word+\" %\")\n + \" or \" + matcher.replaceAll(word+\" %\")\n + \" or \" + matcher.replaceAll(word)\n + \" or \" + matcher.replaceAll(\"% \"+word) + \")\" ;\n }", "@Test\n\t public void teststringAPI_success() {\n\t\tString testData = \"My data is right\";\n\t\tchar charData='a';\n\t\tString expected = \"My dt is right\";\n\t\tString actualStr=stringObj.stringAPI(testData, charData);\n\t\tSystem.out.println(actualStr);\n\t\tassertEquals(\"Got Expected Result\", expected, actualStr);\n\t }", "@Test\n public void shouldReturnTrue() {\n\t\tString test1=\"abcdefghi\";\n assertEquals(true,\n sut.binarySearch(test1,'d',0,test1.length()-1));\n }", "@Override\r\n\tpublic String testString(String string) {\n\t\treturn \"test -- hhh\";\r\n\t}", "@Test\n public void testFullTextSearch_on_a_field() {\n ReadResponse resp = factual.fetch(TABLE,\n new Query().field(\"name\").search(\"Fried Chicken\"));\n\n for (String name : resp.mapStrings(\"name\")) {\n assertTrue(name.toLowerCase().contains(\"frie\")\n || name.toLowerCase().contains(\"fry\")\n || name.toLowerCase().contains(\"chicken\"));\n }\n }", "@Override\n\tpublic void test() {\n String ret=reverseWords(\"the sky is blue \");\n return;\n\t}", "@Test\n\tpublic void findByPressWhereShouldReturnStringE1() {\n\t\tList<StringE1> stringE1s = repository.findByPressWhere(\"0|-----|-----|-----|-----|-----|-----|-----|\");\n\t\tassertThat(stringE1s).hasSize(1);\n\t}", "@Test\n\tpublic void phraseGrepTest1() throws Exception {\n\t\t// phrase is \"I am forced\"\n\t\tHashSet<String> grepFound = loadGrepResults(\"i+am+forced\");\n\t\tCollection<Page> index = queryTest.query(\"\\\"I am Forced\\\"\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// tests set equality \n\t\tassertEquals(indexFound, grepFound);\n\t}", "@Test\r\n\tvoid testsplitStringHandout2() {\n\t\tString input = Main.TEXT_2;\r\n\t\tString expected[] = {\"A\",\"long\",\"time\",\"ago\",\"in\",\"a\",\"galaxy\",\"far,\",\"far\",\"away...\"};\r\n\t\t\r\n\t\t// Use assertEquals to compare arrays\r\n\t\tassertArrayEquals(expected, Main.splitString(input) );\r\n\t\t\r\n\t\tassertEquals(7, Main.maxWordLength(Main.splitString(input)));\r\n\r\n\t}", "public interface StringBasic01 {\n\n\t/**\n\t * Palindrome is a String which give the same result by reading from left to right and from right to left.\n\t * Example: \"aabaa\" is a palindrome.\n\t * \"mom\" is a palindrome\n\t * \"radar\" is a palindrome\n\t * etc.\n\t * Using charAt(int position) function of Java String to check if a input String is palindrome\n\t *\n\t */\n\tstatic boolean isPalindrome(String s) {\n\t\tint i = 0, j = s.length() - 1;\n\t\twhile (i < j) {\n\t\t\tif (s.charAt(i) != s.charAt(j))\n\t\t\t\treturn false;\n\t\t\t++i;\n\t\t\t--j;\n\t\t}\n\t\treturn true;\n\t}\n\n\t\t/**\n\t\t * Given a paragraph of text, calculate how many sentences included in the paragraph.\n\t\t ** Example: paragraph = \"I have 2 pets, a cat and a dog. The cat's name is Milo. The dog's name is Ricky\";\n\t\t ** return should be 3.\n\t\t *\n\t\t * @param paragraph of text\n\t\t * @return the number of sentences\n\t\t * (Suggest: Using split function of String).\n\t\t */\n\n\t\tstatic int sentenceCount(String paragraph) {\n\t\t\tif (paragraph != null && !paragraph.isEmpty()) {\n\t\t\t\treturn paragraph.split(\"\\\\.\").length;\n\t\t\t}\n\t\t\telse return 0;\n\t\t}\n\n\t\t/**\n\t\t * Given a paragraph of text, which unfortunately contains bad writing style:\n\t\t * error1: each sentence doesn't begin with a capital letter\n\t\t * error2: there is space between commas and previous letter, like \"2 pets , a cat \"\n\t\t * error3: there is no space between commas and the next letter, like \"2 pets,a cat \"\n\t\t * error4: there is space between period and previous letter, like \"a dog .\"\n\t\t * error5: there is more than one space between words, like \"a dog\"\n\t\t * Write code to correct the paragraph.\n\t\t ** Example: paragraph = \"i have 2 pets , a cat and a dog. the cat's name is Milo . the dog's name is Ricky\"\n\t\t ** output = \"I have 2 pets, a cat and a dog. The cat's name is Milo. The dog's name is Ricky\"\n\t\t *\n\t\t * @param paragraph of wrong text\n\t\t * @return corrected paragraph\n\t\t * Suggest: using some of followings: split, replace, toUpperCase.\n\t\t */\n\t\tstatic String correctParagraph(String paragraph) {\n\n\t\t\tString newText = paragraph.replaceAll(\"\\\\s{2,}+\", \" \");\n\n\t\t\tnewText = newText.replaceAll(\"\\\\s+,\", \",\");\n\t\t\tnewText = newText.replaceAll(\"\\\\s+\\\\.\", \".\");\n\n\n\t\t\tString firstLetter = newText.substring(0, 1).toUpperCase();\n\t\t\tnewText = firstLetter + newText.substring(1);\n\n\t\t\tString[] sentences = newText.split(\"\\\\.\");\n\t\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\t\tString temp = sentences[i].trim();\n\t\t\t\tfirstLetter = temp.substring(0, 1).toUpperCase();\n\t\t\t\tsentences[i] = firstLetter + temp.substring(1);\n\t\t\t}\n\t\t\tStringBuilder newParagraph = new StringBuilder(sentences[0]);\n\t\t\tfor(int i = 1; i < sentences.length; i++){\n\t\t\t\tnewParagraph.append(\". \").append(sentences[i]);\n\t\t\t}\n\t\t\tnewText = newParagraph.append(\".\").toString();\n\n\t\t\treturn newText;\n\t\t}\n\n /**\n * Given an article and a keyword. Find how many times the key words appear in the articles\n * Example:\n * article = \"Business Insider teamed up with Zillow's rental site, HotPads, to find the\n * median rent for a one-bedroom apartment in each of the 49 US metro areas with the largest\n * populations (as determined by Zillow). We also used Data USA to find the median household\n * income in each of these areas.\n *\n * The data was compiled using HotPad's Repeat Rent Index. Each of the one-bedroom apartments\n * analyzed in the study has been listed for rent on HotPads for longer than a month.\"\n * keyword = \"one-bedroom\".\n * Because the word \"one-bedroom\" appears twice in the paragraph, therefore:\n * countAppearances should return 2.\n * @param article: String. like a newspaper article\n * @param keyword: keyword to find in the articles\n * @return the number of appearances\n * Suggest: use method indexOf\n */\n\n\n\tstatic int countAppearances(String article, String keyword) {\n\t\tif(keyword.isEmpty()){\n\t\t\treturn 0;\n\t\t}\n\t\tString newArticle = article.replace(keyword, \"\");\n\t\treturn (article.length() - newArticle.length())/keyword.length();\n\t}\n\n\n}", "@Test\n public void find() {\n String command = \" \" + FindCommand.COMMAND_WORD + \" n/\" + KEYWORD_MATCHING_STATIONARY + \" \";\n Model expectedModel = getModel();\n assertCommandSuccess(command, expectedModel, 1);\n assertSelectedCardUnchanged();\n\n /* Case: repeat previous find command where expense list is displaying the expense we are finding\n * -> 1 expense found\n */\n command = FindCommand.COMMAND_WORD + \" t/\" + KEYWORD_MATCHING_DINNER;\n assertCommandSuccess(command, expectedModel, 1);\n assertSelectedCardUnchanged();\n\n /* Case: repeat previous find command where expense list is displaying the expense we are finding\n * -> 0 expense found\n */\n command = FindCommand.COMMAND_WORD + \" d/\" + \"7/4/2019\";\n assertCommandSuccess(command, expectedModel, 0);\n assertSelectedCardUnchanged();\n\n /* Case: repeat previous find command where expense list is displaying the expense we are finding\n * -> 0 expense found\n */\n command = FindCommand.COMMAND_WORD + \" d/\"\n + KEYWORD_MATCHING_START_DATE + \":\" + \"26/04/2019\";\n assertCommandSuccess(command, expectedModel, 0);\n assertSelectedCardUnchanged();\n\n /* Case: find expense where expense list is not displaying the expense we are finding -> 0 expense found */\n command = FindCommand.COMMAND_WORD + \" n/\" + \"Invalid name\";\n assertCommandSuccess(command, expectedModel, 0);\n assertSelectedCardUnchanged();\n // /* Case: find multiple persons in address book, 2 keywords -> 2 persons found */\n // command = FindCommand.COMMAND_WORD + \" Benson Daniel\";\n // ModelHelper.setFilteredList(expectedModel, BENSON, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find multiple persons in address book, 2 keywords in reversed order -> 2 persons found */\n // command = FindCommand.COMMAND_WORD + \" Daniel Benson\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find multiple persons in address book, 2 keywords with 1 repeat -> 2 persons found */\n // command = FindCommand.COMMAND_WORD + \" Daniel Benson Daniel\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find multiple persons in address book, 2 matching keywords and 1 non-matching keyword\n // * -> 2 persons found\n // */\n // command = FindCommand.COMMAND_WORD + \" Daniel Benson NonMatchingKeyWord\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: undo previous find command -> rejected */\n // command = UndoCommand.COMMAND_WORD;\n // String expectedResultMessage = UndoCommand.MESSAGE_FAILURE;\n // assertCommandFailure(command, expectedResultMessage);\n //\n // /* Case: redo previous find command -> rejected */\n // command = RedoCommand.COMMAND_WORD;\n // expectedResultMessage = RedoCommand.MESSAGE_FAILURE;\n // assertCommandFailure(command, expectedResultMessage);\n //\n // /* Case: find same persons in address book after deleting 1 of them -> 1 person found */\n // executeCommand(DeleteCommand.COMMAND_WORD + \" 1\");\n // assertFalse(getModel().getEPiggy().getPersonList().contains(BENSON));\n // command = FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;\n // expectedModel = getModel();\n // ModelHelper.setFilteredList(expectedModel, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n /* Case: find person in address book, keyword is same as name but of different case -> 1 person found */\n // command = FindCommand.COMMAND_WORD + \" MeIeR\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find person in address book, keyword is substring of name -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" Mei\";\n // ModelHelper.setFilteredList(expectedModel);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find person in address book, name is substring of keyword -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" Meiers\";\n // ModelHelper.setFilteredList(expectedModel);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find person not in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" Mark\";\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find phone number of person in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" \" + DANIEL.getPhone().value;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find address of person in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" \" + DANIEL.getAddress().value;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find email of person in address book -> 0 persons found */\n // command = FindCommand.COMMAND_WORD + \" \" + DANIEL.getEmail().value;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find tags of person in address book -> 0 persons found */\n // List<Tag> tags = new ArrayList<>(DANIEL.getTags());\n // command = FindCommand.COMMAND_WORD + \" \" + tags.get(0).tagName;\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n //\n // /* Case: find while a person is selected -> selected card deselected */\n // showAllPersons();\n // //selectPerson(Index.fromOneBased(1));\n //assertFalse(getPersonListPanel().getHandleToSelectedCard().getName().equals(DANIEL.getName().fullName));\n // command = FindCommand.COMMAND_WORD + \" Daniel\";\n // ModelHelper.setFilteredList(expectedModel, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardDeselected();\n //\n // /* Case: find person in empty address book -> 0 persons found */\n // deleteAllPersons();\n // command = FindCommand.COMMAND_WORD + \" \" + KEYWORD_MATCHING_MEIER;\n // expectedModel = getModel();\n // ModelHelper.setFilteredList(expectedModel, DANIEL);\n // assertCommandSuccess(command, expectedModel);\n // assertSelectedCardUnchanged();\n\n /* Case: mixed case command word -> rejected */\n // command = \"FiNd Meier\";\n // assertCommandFailure(command, FindCommand.MESSAGE_USAGE);\n\n }", "public static void main(String[] args) {\n String myRegExString = \"[a-zA-Z\\\\s]+\";\n\n // This is the string we will check to see if our regex matches:\n String myString = \"The quick brown fox jumped over the lazy dog...\";\n\n // Create a Pattern object (compiled RegEx) and save it as 'p'\n Pattern p = Pattern.compile(myRegExString);\n\n // We need a Matcher to match our compiled RegEx to a String\n Matcher m = p.matcher(myString);\n\n // if our Matcher finds a match\n if (m.find()) {\n // Print the match\n System.out.println(m.group());\n }\n\n String s = \"Hello, Goodbye, Farewell\";\n Pattern p1 = Pattern.compile(\"\\\\p{Alpha}+\");\n Matcher m1 = p1.matcher(s);\n\n while( m.find() ){\n System.out.println(m1.group());\n }\n\n String s1 = \"Hello, Goodbye, Farewell\";\n String s2 = \"Hola, Adios, Hasta Luego\";\n\n String myDelimiter = \", \";\n\n String[] s1array = s1.split(myDelimiter);\n String[] s2array = s2.split(myDelimiter);\n\n System.out.println(\"s1array[0]: \" + s1array[0]);\n System.out.println(\"s1array[1]: \" + s1array[1]);\n System.out.println(\"s1array[2]: \" + s1array[2]);\n System.out.println(\"s2array[0]: \" + s2array[0]);\n System.out.println(\"s2array[1]: \" + s2array[1]);\n System.out.println(\"s2array[2]: \" + s2array[2]);\n\n }", "@Test //TEST ONE\n void testCapital1stLetterBreedName()\n {\n Rabbit_RegEx rabbit_breed = new Rabbit_RegEx();\n rabbit_breed.setBreedName(\"AmericanFuzzyLop\"); //American Fuzzy Lop, very cute!\n assertTrue(rabbit_breed.getBreedName().matches(\"^[A-Za-z][a-zA-Z-][a-zA-z- ]*\"));\n }", "public static void matchMaker()\n {\n \n }", "@Test\n public void testGetSourceTargetText()\n {\n OfflinePageData opd = new OfflinePageData();\n\n LeverageMatch match = new LeverageMatch();\n match.setMatchedText(\"Sample Document in Chinese\");\n match.setProjectTmIndex(Leverager.MT_PRIORITY);\n match.setOriginalSourceTuvId(-1);\n match.setMtName(\"Google_MT\");\n\n String sourceText = \"<segment segmentId=\\\"1\\\" wordcount=\\\"2\\\"><bpt i=\\\"1\\\" type=\\\"x-span\\\" x=\\\"1\\\">&lt;span style=&apos;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;&apos;&gt;</bpt>Sample Document<ept i=\\\"1\\\">&lt;/span&gt;</ept></segment>\";\n String targetText = \"<segment segmentId=\\\"1\\\" wordcount=\\\"2\\\"><bpt i=\\\"1\\\" type=\\\"x-span\\\" x=\\\"1\\\">&lt;span style=&apos;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;&apos;&gt;</bpt>Sample Document in Chinese<ept i=\\\"1\\\">&lt;/span&gt;</ept></segment>\";\n String userId = \"yorkadmin\";\n boolean isFromXliff = false;\n String sourceLocal = \"en_US\";\n String targetLocal = \"zh_CN\";\n\n ArrayList arr = opd.getSourceTargetText(null, match, sourceText,\n targetText, userId, isFromXliff, sourceLocal, targetLocal,\n true, 1000);\n Assert.assertSame(\"MT!\", (String) arr.get(2));\n\n arr = opd.getSourceTargetText(null, match, sourceText, targetText,\n userId, isFromXliff, sourceLocal, targetLocal, false, 1000);\n Assert.assertSame(\"Google_MT\", (String) arr.get(2));\n }", "@Test\n\tpublic void checkReverseString()\n\n\t{\n\t\tassertEquals(\"nitin si a doog yob \",test.testReverseString(\"nitin is a good boy\"));\n\t\t\n\t}", "@org.junit.Test\n\tpublic void testingStringLargest() {\n\t\tString result=object.largestWordInString(\"Game of Thrones\");\n\t\tassertEquals(\"Thrones\",result );\n\t}", "@org.junit.Test\n public void constrCompelemString1() {\n final XQuery query = new XQuery(\n \"fn:string(element elem {'a', element a {}, 'b'})\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertStringValue(false, \"ab\")\n );\n }" ]
[ "0.64625996", "0.6191497", "0.60960513", "0.5998174", "0.5940486", "0.58955026", "0.5883988", "0.5868994", "0.5847637", "0.58411235", "0.5837426", "0.5826407", "0.5821284", "0.5821254", "0.5787448", "0.57670957", "0.5765454", "0.5763264", "0.5742689", "0.57237804", "0.57223696", "0.57218295", "0.57206625", "0.57149506", "0.5703896", "0.5703828", "0.5698934", "0.5681729", "0.5665505", "0.5663935", "0.5659367", "0.56459767", "0.56403947", "0.5639903", "0.563645", "0.56323946", "0.5629944", "0.56228006", "0.56211996", "0.56160235", "0.5612755", "0.5612577", "0.56048775", "0.5599277", "0.55986303", "0.5590095", "0.5588665", "0.55861884", "0.55802345", "0.5575874", "0.5575507", "0.5574743", "0.5568588", "0.5563225", "0.55490613", "0.55461556", "0.5539819", "0.55291367", "0.5527695", "0.55252296", "0.5521754", "0.5518808", "0.5515217", "0.55068225", "0.5500544", "0.5495586", "0.5483564", "0.54736024", "0.5461901", "0.54593337", "0.5448635", "0.5447781", "0.54430956", "0.5440939", "0.54277885", "0.542743", "0.54223645", "0.54157037", "0.54152304", "0.54117054", "0.54069567", "0.5405168", "0.5399677", "0.53957725", "0.5394019", "0.53939164", "0.5389322", "0.5388358", "0.5382445", "0.53802496", "0.5378828", "0.5378684", "0.53751606", "0.5370616", "0.5365985", "0.5365192", "0.53582984", "0.5333652", "0.5331905", "0.53284705", "0.53246254" ]
0.0
-1
TODO Autogenerated method stub
@Override public Shape getHitbox() { 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
volume of a sphere (class method)
public static double volume(double radius){ return 4.0 / 3.0 * Math.PI * Math.pow(radius,3.0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract float volume();", "public abstract double volume();", "@Override\n\tpublic float volume() {\n\t\treturn (float) ((4/3) * Math.PI * Math.pow(radius, 3));\n\t}", "public double volume () {return (4/3)*Math.PI*this.r*this.r*this.r;}", "public abstract double calcVolume();", "public abstract double calcVolume();", "double volume(){\n\n return widgh*height*depth;\n\n }", "@Override\n\tpublic float volume() {\n\t\tfloat volume = (float) ((4/3) * Math.PI * Math.pow(this.radius, 3));\n\t\treturn volume;\n\t}", "public static double volumeOfSphere(double r) {\n double v = 4.0 / 3.0 * Math.PI * Math.pow(r, 3);\n v = (double) Math.round(v * 100) / 100;\n return v;\n }", "public double volume()\r\n {\r\n double volume = Math.pow(radius, 2) * (height / 3) * Math.PI;\r\n return volume;\r\n }", "double volume() {\n\treturn width*height*depth;\n}", "double volume(){\n return width*height*depth;\n }", "private double Volume() {\n\t\tdouble volume = (4f / 3f) * Math.PI * Math.pow(_radius, 3);\n\t\treturn volume;\n\t}", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "public abstract double getVolume();", "public double calcVolume(){\n double area=calcArea(); // calcArea of superclass used\r\n return area*h;\r\n }", "public float getSphereRadius();", "@Override\n\tpublic void calcularVolume() {\n\t\t\n\t}", "@Override\n\tpublic double getvolume(){\n\t\tdouble[] ab_cross_ac = calculate_vcp(getVector_AB(),getVector_AC());\n\t\t\n\t\t//dot product of ab_cross_ac and ad\n\t\tdouble S = calculate_vdp(ab_cross_ac,getVector_AD());\n\t\t\n\t\t//formula of tetrahedron's volume\n\t\treturn Math.abs(S)/6;\t\n\t}", "double volume() {\n\t\treturn 0;\n\t}", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public double get_volume(double r) {\n\t\treturn (Math.PI)*r*r*r*2/3;\t\t//dont 2/3*(Math.PI)*r*r*r -> ans 0\n\t}", "public double volume() {\n\t\treturn this.iWidth * this.iLength * this.iDepth\r\n\t}", "public double getVolume() { return volume; }", "public float getVolume()\n {\n return volume;\n }", "@Override\n\tpublic void volume() {\n\t\tsolido.volume = (solido.areaBase * altura) / 3;\n\t}", "public double getVolume()\n {\n return volume / 512;\n }", "public int volume() {\r\n int xLength = this.getMaximumPoint().getBlockX() - this.getMinimumPoint().getBlockX() + 1;\r\n int yLength = this.getMaximumPoint().getBlockY() - this.getMinimumPoint().getBlockY() + 1;\r\n int zLength = this.getMaximumPoint().getBlockZ() - this.getMinimumPoint().getBlockZ() + 1;\r\n\r\n int volume = xLength * yLength * zLength;\r\n return volume;\r\n }", "public int calculateVolume() {\n return (int) Math.pow(this.sideLength, 3) ;\n }", "public double getVolume() {\n\n double volume = 0;\n\n double[] v = this.getVertices();\n int[] f = this.getFaces();\n\n for (int i = 0; i < f.length; i += 6) {\n Vector3D v0 = new Vector3D(v[3 * f[i]], v[3 * f[i] + 1], v[3 * f[i] + 2]);\n Vector3D v1 = new Vector3D(v[3 * f[i + 2]], v[3 * f[i + 2] + 1], v[3 * f[i + 2] + 2]);\n Vector3D v2 = new Vector3D(v[3 * f[i + 4]], v[3 * f[i + 4] + 1], v[3 * f[i + 4] + 2]);\n\n v0 = v0.crossProduct(v1);\n volume += v0.dotProduct(v2);\n }\n\n return Math.abs(volume / 6.0);\n }", "public double getCyclinderVolume();", "public static void main(String [] args){\n\r\n Box box1 = new Box(10.0, 20.0, 15.0);\r\n Box box2 = new Box();\r\n Box box3 = new Box(7);\r\n\r\n double vol = box1.Volume();\r\n System.out.println(\"The Volume of box1: \"+vol);\r\n\r\n vol = box2.Volume();\r\n System.out.println(\"The Volume of box2: \"+vol);\r\n\r\n vol = box3.Volume();\r\n System.out.println(\"The Volume of Cube: \"+vol);\r\n\r\n \r\n \r\n }", "public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}", "public double getVolume() {\n\t\treturn height * depth * length;\n\n\t}", "public double getVolume()\n {\n return this.volume;\n }", "public double getVolume() {\n return volume;\n }", "public double get_volume(double r,double h) {\n\t\treturn (Math.PI)*r*r*h;\n\t}", "int getVolume();", "int getVolume();", "public static double cylinderVolume(double radius, double height){\n return Math.PI * square(radius) * height;\n }", "BigDecimal getVolume();", "public int getVolume();", "@Override\n public double getVolume() {\n return liquids\n .stream()\n .mapToDouble(Liquid::getVolume)\n .sum();\n }", "public float getVolume() {\n return 1.0f;\n }", "public double getVolume()\r\n\t{\r\n\t\treturn (super.getArea())*h;\r\n\t}", "public double getVolume() {\n return super.getLado1() * super.getLado2() * this.altura;\n }", "public double getVolumeOfPipe(){\n double lengthPipeInches = lengthOfPipe / 0.0254;\n \n double outerRadius = diameterOfPipe / 2;\n outerRadius = Math.pow(outerRadius,2);\n double outervolumeOfPipe = (Math.PI * outerRadius) * lengthPipeInches;\n \n //get the inner volume pi * r^2 * height\n double innerRadius = (diameterOfPipe / 2) * 0.9;\n innerRadius = Math.pow(innerRadius,2);\n double innervolumeOfPipe = (Math.PI * innerRadius) * lengthPipeInches; \n \n //get the total volume of raw materials\n double totalVolume = outervolumeOfPipe - innervolumeOfPipe;\n \n return totalVolume;\n }", "@Override\n\tpublic double volume() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double volume() {\n\t\treturn 0;\n\t}", "public double get_volume(int l,int b, int h) {\n\t\treturn l*b*h;\n\t}", "void volume(double volume) {\n execute(\"player.volume = \" + volume);\n }", "private void calculateVolume() {\n\n\t\t/*\n\n\t\t */\n\t\tfor(int i=0; i<this._prismoidsLength.size(); i++) \n\t\t\tthis._prismoidsVolumes.add(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\tthis._prismoidsLength.get(i).divide(3)\n\t\t\t\t\t\t\t.times(\n\t\t\t\t\t\t\t\t\tthis._prismoidsSectionsAreas.get(i).getEstimatedValue()\n\t\t\t\t\t\t\t\t\t+ this._prismoidsSectionsAreas.get(i+1).getEstimatedValue()\n\t\t\t\t\t\t\t\t\t+ Math.sqrt(\n\t\t\t\t\t\t\t\t\t\t\tthis._prismoidsSectionsAreas.get(i)\n\t\t\t\t\t\t\t\t\t\t\t.times(this._prismoidsSectionsAreas.get(i+1))\n\t\t\t\t\t\t\t\t\t\t\t.getEstimatedValue()\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t).getEstimatedValue(),\n\t\t\t\t\t\t\tSI.CUBIC_METRE\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\tfor(int i=0; i<this._prismoidsVolumes.size(); i++)\n\t\t\tthis._fuelVolume = this._fuelVolume\n\t\t\t\t\t\t\t\t\t\t.plus(this._prismoidsVolumes.get(i));\n\t\tthis._fuelVolume = this._fuelVolume.times(2);\n\t\t\n\t}", "public float getVolumeMultiplier();", "void setVolume(float volume);", "Double volume() {\n return execute(\"player.volume\");\n }", "@Override\n\tpublic float volume() {\n\t\treturn 0;\n\t}", "public double masse () {return this.volume()*this.element.masseVolumique();}", "int getVolume() {\n return this.volume;\n }", "public static double volumeOfCylinder(double radius, double height) {\n\n //calculating the volume.\n double rSquared = Math.pow(radius, 2); // To do the power. Radius is in the base\n // and the 2 is in the power\n\n //doing the equation to get the volume of a cylinder\n double volume = Math.PI * rSquared * height;\n\n return volume; //send back the answer\n }", "public double getVolume() {\n return (getArea() * height);\n }", "public double getVolume() {\n\t\treturn base.getArea() * height;\n\t}", "ModuleComponent volume();", "public static void halfVolume() {\n volume = 50;\n System.out.println(\"Volume: \" + volume);\n//end of modifiable zone(JavaCode)........E/30cff6a1-f5dd-43b9-94cb-285201f52ee7\n }", "public void getProjVolume() {\n projVolume = (4/3) * 3.14 * pow(projRadius, 3);\n }", "@Override\r\n public double obtenerVolumen() {\n return Math.pow(getA(), 3);//eleva al cubo\r\n }", "public float getSphereRadius() {\n\t\treturn sphereRadius;\n\t}", "@Override\r\n\tpublic float getVolume() {\n\t\treturn 0;\r\n\t}", "public int VolumeGet();", "public void setVolume(float volume) {\n }", "public long getPropertyVolumeUnity();", "public float getVolum() {\n return volum;\n }", "public int getVolume() {\n return volume;\n }", "public Pj3dSphere Sphere(int x)\r\n\t{\r\n \tPj3dSphere s = new Pj3dSphere(this, x);\r\n\t\treturn s;\r\n\t}", "@Override\r\n\tpublic void setVolume(float volume) {\n\t\t\r\n\t}", "public long getPropertyVolume();", "public Float getVolume() throws DynamicCallException, ExecutionException {\n return (Float)call(\"getVolume\").get();\n }", "public Sphere(float radius) {\n\t\tsuper();\n\t\tthis.radius = radius;\n\t}", "public static double volumeOfCylinder(double r, double h) {\n double v = Math.PI * Math.pow(r, 2) * h;\n v = (double) Math.round(v * 100) / 100;\n return v;\n }", "public static double volumeCylinder( double radius, double height ) {\n return Math.PI * areaCircle(radius) * height;\n }", "@Test public void volumeTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n Assert.assertEquals(28.67462334314945, pList.totalVolume(), 0.00001);\n Assert.assertEquals(9.558207781049816, pList.averageVolume(), 0.00001);\n \n PentagonalPyramidList2 pList2 = new PentagonalPyramidList2(\"ListName\", \n null, 0);\n Assert.assertEquals(0.0, pList2.averageVolume(), 0.00001);\n \n }", "public byte getVolume(){\r\n\t\treturn volume;\r\n\t}", "public double getTotalVolume() {\n return totalVolume;\n }", "public static void main(String args[]){\n\n Box mybox1 = new Box();\n Box mybox2 = new Box();\n\n double vol;\n\n // get volume of first box\n\n vol = mybox1.volume();\n System.out.println(\"Volume of box1 is \"+vol);\n\n // get volume of second box\n\n vol = mybox2.volume();\n System.out.println(\"Volume of box2 is \"+vol);\n }", "public Sphere(){\n\t\tradius = 128;\n\t\tlightScale = 1;\n\t\tambientLight = 0.3;\t\t\t// Amount of ambient light\n\t\tdiffuseLight = 0.7;\t\t\t// Amount of diffuse light\n\t\tlightSource = new double[]{0, 0, 128};\t// Place light 128 units away from origin\n\t}", "public void increaseVolume()\r\n {\r\n volume++;\r\n }", "public Sphere(Point3D c, double r)\r\n\t{\r\n\t\tsuper(r);\r\n\t\t_center = c;\r\n\t}", "public double averageVolume() {\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n return totalVolume() / numberOfIcosahedrons();\n }\n }", "public IntVec3Volume(IntVec3 start, IntVec3 end){\n this.start=start;\n this.end=end;\n }", "public float getSoundVolume() {\n return _soundVolume;\n }", "public static void main(String[] args) {\r\n\r\n Rectangle rect = new Rectangle(5, 10);\r\n Cuboid cub = new Cuboid(5,10,5);\r\n System.out.println(cub.getVolume());\r\n }", "int getOriginalVolume();", "public void setVolume(float volume) {\r\n\t\tthis.volume = volume;\r\n\t}", "public int getVolume() {\r\n\t\treturn volume;\r\n\t}", "private int getSphere(final Sector sector) {\n if (sector == null || String.valueOf(sector.getPoliticalSphere()).length() == 0) {\n return 3;\n }\n\n final char thisNationCodeLower = String.valueOf(sector.getNation().getCode()).toLowerCase().charAt(0);\n final char thisSectorCodeLower = String.valueOf(sector.getPoliticalSphere()).toLowerCase().charAt(0);\n int sphere = 1;\n\n // Check if this is not home region\n if (thisNationCodeLower != thisSectorCodeLower) {\n sphere = 2;\n\n final char thisNationCode = String.valueOf(sector.getNation().getCode()).toLowerCase().charAt(0);\n\n // Check if this is outside sphere of influence\n if (sector.getNation().getSphereOfInfluence().toLowerCase().indexOf(thisNationCode) < 0) {\n sphere = 3;\n }\n }\n\n return sphere;\n }", "public Sphere(String name, Material m, double radius, Vector3D pos){\n super();\n p = pos;\n r = radius;\n this.name = name;\n this.material = m;\n light = false;\n }", "public Sphere( double radius, Point3d center, Material material ) {\n \tsuper();\n \tthis.radius = radius;\n \tthis.center = center;\n \tthis.material = material;\n }", "@Override\n public double obtenerVolumen(){\n return (1.0 / 3.0) * c.obtenerArea() * c.obtenerAltura();\n }", "public void setVolume(int level);", "public Future<Float> getVolume() throws DynamicCallException, ExecutionException {\n return call(\"getVolume\");\n }" ]
[ "0.784995", "0.781405", "0.7747753", "0.7651648", "0.7556452", "0.7556452", "0.75471157", "0.7543277", "0.75290763", "0.74653", "0.74058324", "0.73883206", "0.7296775", "0.7276736", "0.72330314", "0.7118379", "0.70778465", "0.7065962", "0.6993731", "0.69514847", "0.6950927", "0.6950814", "0.6945059", "0.69429207", "0.6939719", "0.6857775", "0.6851843", "0.68290436", "0.6798552", "0.67981803", "0.6740399", "0.670106", "0.6689999", "0.6664161", "0.6664051", "0.66519386", "0.6645159", "0.6637034", "0.6625225", "0.6625225", "0.6616555", "0.65906703", "0.6586828", "0.65828145", "0.65756345", "0.65729815", "0.65658695", "0.655227", "0.65270025", "0.65270025", "0.6482978", "0.6452124", "0.64263344", "0.6419458", "0.64177054", "0.6415908", "0.6400416", "0.63556623", "0.63305116", "0.63258064", "0.6315583", "0.6295726", "0.6271119", "0.6261861", "0.625523", "0.6253909", "0.6203711", "0.6198721", "0.6195151", "0.6176283", "0.61755186", "0.61566985", "0.6156193", "0.6147042", "0.61360115", "0.6102947", "0.6084025", "0.6072947", "0.6065783", "0.6065178", "0.6059681", "0.6052363", "0.60485137", "0.60326517", "0.602487", "0.6021246", "0.60027504", "0.598838", "0.5970707", "0.59369123", "0.59207195", "0.5919509", "0.59068453", "0.5906042", "0.5874032", "0.58582413", "0.58564705", "0.58507216", "0.5821877", "0.5821303" ]
0.6801002
28
volume of a sphere (class method)
public static double surfaceArea(double radius){ return Math.PI * Math.pow(radius,2.0) * 4; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract float volume();", "public abstract double volume();", "@Override\n\tpublic float volume() {\n\t\treturn (float) ((4/3) * Math.PI * Math.pow(radius, 3));\n\t}", "public double volume () {return (4/3)*Math.PI*this.r*this.r*this.r;}", "public abstract double calcVolume();", "public abstract double calcVolume();", "double volume(){\n\n return widgh*height*depth;\n\n }", "@Override\n\tpublic float volume() {\n\t\tfloat volume = (float) ((4/3) * Math.PI * Math.pow(this.radius, 3));\n\t\treturn volume;\n\t}", "public static double volumeOfSphere(double r) {\n double v = 4.0 / 3.0 * Math.PI * Math.pow(r, 3);\n v = (double) Math.round(v * 100) / 100;\n return v;\n }", "public double volume()\r\n {\r\n double volume = Math.pow(radius, 2) * (height / 3) * Math.PI;\r\n return volume;\r\n }", "double volume() {\n\treturn width*height*depth;\n}", "double volume(){\n return width*height*depth;\n }", "private double Volume() {\n\t\tdouble volume = (4f / 3f) * Math.PI * Math.pow(_radius, 3);\n\t\treturn volume;\n\t}", "double volume()\n\t{\n\t\t\n\t\treturn width*height*depth;\n\t\t\n\t}", "public abstract double getVolume();", "public double calcVolume(){\n double area=calcArea(); // calcArea of superclass used\r\n return area*h;\r\n }", "public float getSphereRadius();", "@Override\n\tpublic void calcularVolume() {\n\t\t\n\t}", "@Override\n\tpublic double getvolume(){\n\t\tdouble[] ab_cross_ac = calculate_vcp(getVector_AB(),getVector_AC());\n\t\t\n\t\t//dot product of ab_cross_ac and ad\n\t\tdouble S = calculate_vdp(ab_cross_ac,getVector_AD());\n\t\t\n\t\t//formula of tetrahedron's volume\n\t\treturn Math.abs(S)/6;\t\n\t}", "double volume() {\n\t\treturn 0;\n\t}", "public void calcVolume() {\n this.vol = (0.6666666666666667 * Math.PI) * Math.pow(r, 3);\n }", "double Volume(){\r\n return Height * Width * Depth;\r\n }", "public double get_volume(double r) {\n\t\treturn (Math.PI)*r*r*r*2/3;\t\t//dont 2/3*(Math.PI)*r*r*r -> ans 0\n\t}", "public double volume() {\n\t\treturn this.iWidth * this.iLength * this.iDepth\r\n\t}", "public double getVolume() { return volume; }", "public float getVolume()\n {\n return volume;\n }", "@Override\n\tpublic void volume() {\n\t\tsolido.volume = (solido.areaBase * altura) / 3;\n\t}", "public double getVolume()\n {\n return volume / 512;\n }", "public static double volume(double radius){\r\n return 4.0 / 3.0 * Math.PI * Math.pow(radius,3.0);\r\n }", "public int volume() {\r\n int xLength = this.getMaximumPoint().getBlockX() - this.getMinimumPoint().getBlockX() + 1;\r\n int yLength = this.getMaximumPoint().getBlockY() - this.getMinimumPoint().getBlockY() + 1;\r\n int zLength = this.getMaximumPoint().getBlockZ() - this.getMinimumPoint().getBlockZ() + 1;\r\n\r\n int volume = xLength * yLength * zLength;\r\n return volume;\r\n }", "public int calculateVolume() {\n return (int) Math.pow(this.sideLength, 3) ;\n }", "public double getVolume() {\n\n double volume = 0;\n\n double[] v = this.getVertices();\n int[] f = this.getFaces();\n\n for (int i = 0; i < f.length; i += 6) {\n Vector3D v0 = new Vector3D(v[3 * f[i]], v[3 * f[i] + 1], v[3 * f[i] + 2]);\n Vector3D v1 = new Vector3D(v[3 * f[i + 2]], v[3 * f[i + 2] + 1], v[3 * f[i + 2] + 2]);\n Vector3D v2 = new Vector3D(v[3 * f[i + 4]], v[3 * f[i + 4] + 1], v[3 * f[i + 4] + 2]);\n\n v0 = v0.crossProduct(v1);\n volume += v0.dotProduct(v2);\n }\n\n return Math.abs(volume / 6.0);\n }", "public double getCyclinderVolume();", "public static void main(String [] args){\n\r\n Box box1 = new Box(10.0, 20.0, 15.0);\r\n Box box2 = new Box();\r\n Box box3 = new Box(7);\r\n\r\n double vol = box1.Volume();\r\n System.out.println(\"The Volume of box1: \"+vol);\r\n\r\n vol = box2.Volume();\r\n System.out.println(\"The Volume of box2: \"+vol);\r\n\r\n vol = box3.Volume();\r\n System.out.println(\"The Volume of Cube: \"+vol);\r\n\r\n \r\n \r\n }", "public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}", "public double getVolume() {\n\t\treturn height * depth * length;\n\n\t}", "public double getVolume()\n {\n return this.volume;\n }", "public double getVolume() {\n return volume;\n }", "public double get_volume(double r,double h) {\n\t\treturn (Math.PI)*r*r*h;\n\t}", "int getVolume();", "int getVolume();", "public static double cylinderVolume(double radius, double height){\n return Math.PI * square(radius) * height;\n }", "BigDecimal getVolume();", "public int getVolume();", "@Override\n public double getVolume() {\n return liquids\n .stream()\n .mapToDouble(Liquid::getVolume)\n .sum();\n }", "public float getVolume() {\n return 1.0f;\n }", "public double getVolume()\r\n\t{\r\n\t\treturn (super.getArea())*h;\r\n\t}", "public double getVolume() {\n return super.getLado1() * super.getLado2() * this.altura;\n }", "public double getVolumeOfPipe(){\n double lengthPipeInches = lengthOfPipe / 0.0254;\n \n double outerRadius = diameterOfPipe / 2;\n outerRadius = Math.pow(outerRadius,2);\n double outervolumeOfPipe = (Math.PI * outerRadius) * lengthPipeInches;\n \n //get the inner volume pi * r^2 * height\n double innerRadius = (diameterOfPipe / 2) * 0.9;\n innerRadius = Math.pow(innerRadius,2);\n double innervolumeOfPipe = (Math.PI * innerRadius) * lengthPipeInches; \n \n //get the total volume of raw materials\n double totalVolume = outervolumeOfPipe - innervolumeOfPipe;\n \n return totalVolume;\n }", "@Override\n\tpublic double volume() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double volume() {\n\t\treturn 0;\n\t}", "public double get_volume(int l,int b, int h) {\n\t\treturn l*b*h;\n\t}", "void volume(double volume) {\n execute(\"player.volume = \" + volume);\n }", "private void calculateVolume() {\n\n\t\t/*\n\n\t\t */\n\t\tfor(int i=0; i<this._prismoidsLength.size(); i++) \n\t\t\tthis._prismoidsVolumes.add(\n\t\t\t\t\tAmount.valueOf(\n\t\t\t\t\t\t\tthis._prismoidsLength.get(i).divide(3)\n\t\t\t\t\t\t\t.times(\n\t\t\t\t\t\t\t\t\tthis._prismoidsSectionsAreas.get(i).getEstimatedValue()\n\t\t\t\t\t\t\t\t\t+ this._prismoidsSectionsAreas.get(i+1).getEstimatedValue()\n\t\t\t\t\t\t\t\t\t+ Math.sqrt(\n\t\t\t\t\t\t\t\t\t\t\tthis._prismoidsSectionsAreas.get(i)\n\t\t\t\t\t\t\t\t\t\t\t.times(this._prismoidsSectionsAreas.get(i+1))\n\t\t\t\t\t\t\t\t\t\t\t.getEstimatedValue()\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t).getEstimatedValue(),\n\t\t\t\t\t\t\tSI.CUBIC_METRE\n\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\tfor(int i=0; i<this._prismoidsVolumes.size(); i++)\n\t\t\tthis._fuelVolume = this._fuelVolume\n\t\t\t\t\t\t\t\t\t\t.plus(this._prismoidsVolumes.get(i));\n\t\tthis._fuelVolume = this._fuelVolume.times(2);\n\t\t\n\t}", "public float getVolumeMultiplier();", "void setVolume(float volume);", "Double volume() {\n return execute(\"player.volume\");\n }", "@Override\n\tpublic float volume() {\n\t\treturn 0;\n\t}", "public double masse () {return this.volume()*this.element.masseVolumique();}", "int getVolume() {\n return this.volume;\n }", "public static double volumeOfCylinder(double radius, double height) {\n\n //calculating the volume.\n double rSquared = Math.pow(radius, 2); // To do the power. Radius is in the base\n // and the 2 is in the power\n\n //doing the equation to get the volume of a cylinder\n double volume = Math.PI * rSquared * height;\n\n return volume; //send back the answer\n }", "public double getVolume() {\n return (getArea() * height);\n }", "public double getVolume() {\n\t\treturn base.getArea() * height;\n\t}", "ModuleComponent volume();", "public static void halfVolume() {\n volume = 50;\n System.out.println(\"Volume: \" + volume);\n//end of modifiable zone(JavaCode)........E/30cff6a1-f5dd-43b9-94cb-285201f52ee7\n }", "public void getProjVolume() {\n projVolume = (4/3) * 3.14 * pow(projRadius, 3);\n }", "@Override\r\n public double obtenerVolumen() {\n return Math.pow(getA(), 3);//eleva al cubo\r\n }", "public float getSphereRadius() {\n\t\treturn sphereRadius;\n\t}", "@Override\r\n\tpublic float getVolume() {\n\t\treturn 0;\r\n\t}", "public int VolumeGet();", "public void setVolume(float volume) {\n }", "public long getPropertyVolumeUnity();", "public float getVolum() {\n return volum;\n }", "public int getVolume() {\n return volume;\n }", "public Pj3dSphere Sphere(int x)\r\n\t{\r\n \tPj3dSphere s = new Pj3dSphere(this, x);\r\n\t\treturn s;\r\n\t}", "@Override\r\n\tpublic void setVolume(float volume) {\n\t\t\r\n\t}", "public long getPropertyVolume();", "public Float getVolume() throws DynamicCallException, ExecutionException {\n return (Float)call(\"getVolume\").get();\n }", "public Sphere(float radius) {\n\t\tsuper();\n\t\tthis.radius = radius;\n\t}", "public static double volumeOfCylinder(double r, double h) {\n double v = Math.PI * Math.pow(r, 2) * h;\n v = (double) Math.round(v * 100) / 100;\n return v;\n }", "public static double volumeCylinder( double radius, double height ) {\n return Math.PI * areaCircle(radius) * height;\n }", "@Test public void volumeTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramid p1 = new PentagonalPyramid(\"PP1\", 1, 2);\n PentagonalPyramid p2 = new PentagonalPyramid(\"PP1\", 2, 3);\n PentagonalPyramid p3 = new PentagonalPyramid(\"PP1\", 3, 4);\n pArray[0] = p1;\n pArray[1] = p2;\n pArray[2] = p3;\n \n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 3);\n \n Assert.assertEquals(28.67462334314945, pList.totalVolume(), 0.00001);\n Assert.assertEquals(9.558207781049816, pList.averageVolume(), 0.00001);\n \n PentagonalPyramidList2 pList2 = new PentagonalPyramidList2(\"ListName\", \n null, 0);\n Assert.assertEquals(0.0, pList2.averageVolume(), 0.00001);\n \n }", "public byte getVolume(){\r\n\t\treturn volume;\r\n\t}", "public double getTotalVolume() {\n return totalVolume;\n }", "public static void main(String args[]){\n\n Box mybox1 = new Box();\n Box mybox2 = new Box();\n\n double vol;\n\n // get volume of first box\n\n vol = mybox1.volume();\n System.out.println(\"Volume of box1 is \"+vol);\n\n // get volume of second box\n\n vol = mybox2.volume();\n System.out.println(\"Volume of box2 is \"+vol);\n }", "public Sphere(){\n\t\tradius = 128;\n\t\tlightScale = 1;\n\t\tambientLight = 0.3;\t\t\t// Amount of ambient light\n\t\tdiffuseLight = 0.7;\t\t\t// Amount of diffuse light\n\t\tlightSource = new double[]{0, 0, 128};\t// Place light 128 units away from origin\n\t}", "public void increaseVolume()\r\n {\r\n volume++;\r\n }", "public Sphere(Point3D c, double r)\r\n\t{\r\n\t\tsuper(r);\r\n\t\t_center = c;\r\n\t}", "public double averageVolume() {\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n return totalVolume() / numberOfIcosahedrons();\n }\n }", "public IntVec3Volume(IntVec3 start, IntVec3 end){\n this.start=start;\n this.end=end;\n }", "public float getSoundVolume() {\n return _soundVolume;\n }", "public static void main(String[] args) {\r\n\r\n Rectangle rect = new Rectangle(5, 10);\r\n Cuboid cub = new Cuboid(5,10,5);\r\n System.out.println(cub.getVolume());\r\n }", "int getOriginalVolume();", "public void setVolume(float volume) {\r\n\t\tthis.volume = volume;\r\n\t}", "public int getVolume() {\r\n\t\treturn volume;\r\n\t}", "private int getSphere(final Sector sector) {\n if (sector == null || String.valueOf(sector.getPoliticalSphere()).length() == 0) {\n return 3;\n }\n\n final char thisNationCodeLower = String.valueOf(sector.getNation().getCode()).toLowerCase().charAt(0);\n final char thisSectorCodeLower = String.valueOf(sector.getPoliticalSphere()).toLowerCase().charAt(0);\n int sphere = 1;\n\n // Check if this is not home region\n if (thisNationCodeLower != thisSectorCodeLower) {\n sphere = 2;\n\n final char thisNationCode = String.valueOf(sector.getNation().getCode()).toLowerCase().charAt(0);\n\n // Check if this is outside sphere of influence\n if (sector.getNation().getSphereOfInfluence().toLowerCase().indexOf(thisNationCode) < 0) {\n sphere = 3;\n }\n }\n\n return sphere;\n }", "public Sphere(String name, Material m, double radius, Vector3D pos){\n super();\n p = pos;\n r = radius;\n this.name = name;\n this.material = m;\n light = false;\n }", "public Sphere( double radius, Point3d center, Material material ) {\n \tsuper();\n \tthis.radius = radius;\n \tthis.center = center;\n \tthis.material = material;\n }", "@Override\n public double obtenerVolumen(){\n return (1.0 / 3.0) * c.obtenerArea() * c.obtenerAltura();\n }", "public void setVolume(int level);", "public Future<Float> getVolume() throws DynamicCallException, ExecutionException {\n return call(\"getVolume\");\n }" ]
[ "0.78471684", "0.78109497", "0.7745064", "0.7648354", "0.75532717", "0.75532717", "0.7543771", "0.7540382", "0.75289315", "0.74621296", "0.74024004", "0.738512", "0.72936136", "0.7273168", "0.72298926", "0.71150476", "0.7079249", "0.7062493", "0.6990335", "0.69480854", "0.6947666", "0.6947572", "0.6942581", "0.69391197", "0.69362664", "0.68544835", "0.6849545", "0.6825717", "0.67988795", "0.6795256", "0.67946374", "0.6737514", "0.6698", "0.668799", "0.66658944", "0.66603804", "0.6648521", "0.6641677", "0.66348946", "0.66218805", "0.66218805", "0.6615208", "0.65870297", "0.65832555", "0.65798736", "0.6572856", "0.6569855", "0.6562374", "0.65491354", "0.65237087", "0.65237087", "0.648073", "0.6449981", "0.642318", "0.6416534", "0.6415625", "0.6412669", "0.63974303", "0.6353465", "0.6327079", "0.63243145", "0.63121945", "0.6292247", "0.6268124", "0.62597996", "0.62535065", "0.62516856", "0.62055624", "0.6195906", "0.6191767", "0.6174329", "0.61729676", "0.6153584", "0.6152574", "0.61511475", "0.6134166", "0.6100133", "0.6081716", "0.60754025", "0.6063992", "0.60634065", "0.60566896", "0.6048737", "0.6045036", "0.6030512", "0.6027919", "0.6018345", "0.6005403", "0.59862447", "0.59688586", "0.59349394", "0.5918977", "0.5916129", "0.5905039", "0.5902556", "0.58766717", "0.586088", "0.5859224", "0.584743", "0.58197737", "0.5818931" ]
0.0
-1