query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Timer timerProp = new Timer(500,new TimerPropListener());
public static void useDiceProp(int diceNumber1) { useDiceProp = true; diceNumber = diceNumber1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTimer() {\n\t\t\n\t}", "Timer getTimer();", "public void setTimer(int timer) {\n this.timer = timer;\n }", "private void setTimer() {\r\n timer = new Timer(TIMER_DELAY, new ActionListener() {\r\n public void actionPerformed(ActionEvent ae) {\r\n action();\r\n }\r\n });\r\n }", "public void timer()\n {\n timer += .1; \n }", "private void startTimer(){\n timer= new Timer();\r\n task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n waitDuration++;\r\n\r\n timerLabel.setText(Integer.toString(waitDuration));\r\n }\r\n };\r\n timer.scheduleAtFixedRate(task,1000,1000);\r\n }", "public void StartTimer() {\n\t\tCount = new Timer();\n\t}", "public void onTimerEvent();", "private void initTimer(){\r\n\t\ttimer = new Timer() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tdisplayNext();\r\n\t\t\t}\r\n\t\t};\r\n\t}", "@Override\r\n\tprotected void initEvent() {\n\t\ttimer = new Timer(1000, new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttimer_tick(e);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void setTimer(long ms) {\r\n\t\tthis.timer = ms;\r\n\t}", "@Override\n\tpublic void setTimer(Double d) {\n\t\t\n\t}", "public void start() {timer.start();}", "public void startTimer() {\n timer = new Timer();\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 1000, 1000); //\n }", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "private Timer() {\n myThread = new TimerThread();\n myThread.start();\n }", "public Timer() {}", "public Timer getTimer(){\n\t\treturn timer;\n\t}", "TimerStatus onTimer();", "public void setInterval(int anInterval)\n{\n // Set interval\n _interval = anInterval;\n \n // If timer present, change interval\n if(_timer!=null)\n _timer.setDelay(_interval);\n}", "private void initializeTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" initialising timer\");\n //create timer\n newTimer = new Timer(true);\n }", "private void startTimer() {\n Timer.addTimeout(endTime, this);\n }", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "public interface ITimerListener {\n void onTimer();\n}", "private void startTimer() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\t\t\tint currTime = 0;\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tjavafx.application.Platform.runLater(new Runnable () {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tcurrTime++;\n\t\t\t\t\t\ttimerLabel.setText(\"Time: \" + currTime);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}, 1000, 1000);\n\t}", "void startUpdateTimer();", "@Override\npublic void autonomousInit() {\n m_timer.reset();\n m_timer.start();\n}", "private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }", "private void setNewTimer() {\n if (!isSetNewTimerThreadEnabled) {\n return;\n }\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new TimerTask() {\n\n @Override\n public void run() {\n // Send the message to the handler to update the UI of the GameView\n GameActivity.this.handler.sendEmptyMessage(UPDATE);\n\n // For garbage collection\n System.gc();\n }\n\n }, 0, 17);\n }", "void startGameTimer()\n {\n Timer.destroyTimer(\"starting_game_timer\");\n Timer timer = Timer.createTimer(\"starting_game_timer\", startTimerSeconds);\n timer.addTimerListener(this);\n timer.start();\n }", "Timer(int tempTotalTime) {\n totalTime = tempTotalTime;\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n //initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "public TaskTimer\n getTimer() \n {\n return pTimer;\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, to wake up every 1 second\n timer.schedule(timerTask, 10000, 10000);\n }", "private static void timerTest1() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\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\tSystem.out.println(\"timertest1\");\n\t\t\t\ttimer.cancel();\n\n\t\t\t}\n\t\t}, 2000);\n\n\t}", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask,100,1000);\n\n }", "private void startTime()\n {\n timer.start();\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }", "public static void initTimer(){\r\n\t\ttimer = new Timer();\r\n\t timer.scheduleAtFixedRate(new TimerTask() {\r\n\t public void run() {\r\n\t \t//se o player coletar todas os lixos, o tempo para\r\n\t \tif(ScorePanel.getScore() == 100){\r\n\t \t\ttimer.cancel();\r\n\t \t}\r\n\t \t//se o Tempo se esgotar, é game over!!!\r\n\t \telse if (tempo == 0){\r\n\t \t timer.cancel();\r\n \t\tAvatar.noMotion();\r\n \t\t//System.exit(0);\r\n\t }\r\n\t \t//Senão, vai contando\r\n\t \telse{\r\n\t \tlbltimer.setText(\"Tempo: \"+ --tempo);\r\n\t }\r\n\t }\r\n\t\t}, 1000, 1000);\r\n\t}", "public Timer getOverallTimer();", "public void createTimer() {\n timer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (animal.changeScore()) {\n setNumber(animal.getPoints());\n }\n if (animal.getStop()) {\n System.out.println(\"Game Ended\");\n background.stopMusic();\n stop();\n background.stop();\n\n ArrayList list = null;\n try {\n list = scoreFile.sortFile(animal.getPoints());\n } catch (IOException e) {\n e.printStackTrace();\n }\n popUp(list);\n }\n }\n };\n }", "public void setupTimer() {\r\n\t\tmarcus.email.util.time.Timer actualTime = new marcus.email.util.time.Timer();\r\n\t\tactualTime.start();\r\n\t\tActionListener l = new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tlblTimeDate.setText(actualTime.getCurrentTime());\r\n\t\t\t}\r\n\t\t};\r\n\t\t//This is the Swing timer class that updates the actual timer\r\n\t\tTimer t = new Timer(100, l);\r\n\t\tt.start();\r\n\t}", "public void startTimer(){\n logger.trace(\"Sensor/\" + getModel().getId() + \" timer started\");\n if(newTimer != null){\n //newTimer = new Timer();\n if(timerTask != null) timerTask.cancel();\n newTimer.purge();\n timerTask = new TimerTask() {\n @Override\n public void run() {\n timerEngine();\n }\n };\n newTimer.schedule(timerTask,(getModel().getRefreshTime()*1000),(getModel().getRefreshTime()*1000)/2);\n }\n }", "private static void timerTest3() {\n\t\tTimer timer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\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\tSystem.out.println(\"timertest3\");\n\n\t\t\t}\n\t\t}, 2000, 1000);\n\n\t}", "public void startTimer() {\n\t\ttimer.start();\n\t}", "private void startTimer() {\n\n //call renewWord function once the timer is on\n renewWord();\n countDownTimer = new MyCountDown(totalTimeCountInMilliseconds, 50);\n countDownTimer.start();\n }", "public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, 10000);\n }", "public void startTimer()\n {\n\n timeVal = 0;\n timer = new Timer();\n\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n timeVal++;\n timeText.setText(\"Time: \" + timeVal);\n }\n }, 0, 1000);\n }", "public void startTimer() {\n startTime = System.currentTimeMillis();\n }", "@Override\n\tpublic void alter(LTimerContext timer) {\n\n\t}", "public void updateTimer() {\n\t\tif (pause) {\n\t\t\tthis.timer.stop();\n\t\t} else {\n\t\t\tthis.timer.start();\n\t\t}\n\t}", "public Timer getTimer() {\r\n\t\treturn timer;\r\n\t}", "public static void main(String[] args) \n { \n Timer timer = new Timer(); \n TimerTask task = new Helper(); \n\n timer.schedule(task, 3000, 5000); \n System.out.println(\"hi\");\n\n }", "public static void startTimer() {\n elapsedTime = 0;\r\n timerIsWorking = true;\r\n startTime = System.nanoTime() / 1000000; // ms\r\n }", "public int getTimer() {\n return timer;\n }", "private void initListener()\n {\n listenerTimer = new Timer();\n listenerTimer.schedule(new RemoteListner(this), 1000, 2000);\n }", "public TimerCheck() {\n super(\"timer_check\");\n PlayerMovementListener.EVENT.register(this);\n }", "public GameTimer getTimer()\n {\n return timer;\n }", "private static void timerTest4() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\tcalendar.set(Calendar.MINUTE, 20);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tDate time = calendar.getTime();\n\n\t\tTimer timer = new Timer();\n\t\tSystem.out.println(\"wait ....\");\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\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\tSystem.out.println(\"timertest4\");\n\n\t\t\t}\n\t\t}, time, 24 * 60 * 60 * 1000);\n\n\t}", "public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}", "public abstract void startInitTimer();", "public void start(){\n\t\ttimer = new Timer();\n\t\ttimer.schedule(this, 0, (long)66.6);\n\t}", "public interface Timer \n{\n\t/**\n\t * Add an observer to subject's list of observers.\n\t * @param oboserver\n\t */\n public void addTimeObserver(TimeObserver observer);\n /**\n\t * Remove an observer from the subject's list of observers.\n\t * @param oboserver\n\t */\n public void removeTimeObserver(TimeObserver observer);\n /**\n * Inform all observers of a change.\n */\n public void timeChanged();\n}", "public Timer()\r\n\t{\r\n\t\tcurrentstate = TIMER_STOP;\r\n\t}", "public GameThread(Timer timer)\n\t{\n\t\tthis.timer = timer;\n\t}", "private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }", "long getTimerPref();", "protected final void start(Timer timer) {\r\n timer.scheduleAtFixedRate(this, 5000L, 5000L);\r\n }", "private void setTimer(){\n\n //initialize the time variable\n int time = 10;\n\n //calculate the totaltime\n totalTimeCountInMilliseconds = time * 1000;\n\n //set the maximum time of the progress bar timer\n mProgressBar1.setMax( time * 1000);\n }", "private void forestIncomeTimerStart(){\n forestIncomeTimer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n\n\n forestModel.setWood(forestModel.getWood()\n .add(forestModel.getElfIncome())\n .add(forestModel.getLumberjackIncome())\n .add(forestModel.getWoodcutterIncome()));\n setWoodLabel();\n setWoodIncomeLabel();\n\n\n\n\n\n }\n\n }, 1, 1000);\n }", "private void timerStart()\r\n { updateTimer.postDelayed(updateTimerTask, UPDATE_TIME); }", "RampDownTimer getRampDownTimer();", "private void startTimer(){\n scoreboard.disableStart(true);\n timer.scheduleAtFixedRate(new TimerTask(){\n @Override\n public void run(){\n Platform.runLater(new Runnable(){\n @Override\n public void run() {\n scoreboard.updateTime();\n }\n });\n }\n },0,1000);\n }", "public void startTimer() {\n\n if(mTimer == null) {\n mTimer = new Timer();\n }\n\n mElapsedTime = 0;\n mTimer.scheduleAtFixedRate(new TimerTask() {\n\n public void run() {\n mElapsedTime += 1; //increase every sec\n mTimerHandler.obtainMessage(TimerHandler.INCREASE_TIMER).sendToTarget();\n if (mLiveVideoBroadcaster == null || !mLiveVideoBroadcaster.isConnected()) {\n mTimerHandler.obtainMessage(TimerHandler.CONNECTION_LOST).sendToTarget();\n }\n }\n }, 0, 1000);\n }", "@Override\r\n public void setTimeouts()\r\n {\n\r\n }", "public void resume()\r\n {\r\n\t timer.start();\r\n }", "public Timer()\n {\n // initialise instance variables\n startTime = 0;\n bonusTime = 0;\n }", "public Timer() {\n\t\tthis.start = 0L;\n\t\tthis.end = 0L;\n\t}", "public void pause(){\n\t\tif(timer == null){ return; }\n\t\ttimer.stop();\n\t}", "@Override\r\n public void update(long timePassed) {\n\r\n }", "public MyTimerPanel(){\r\n\t\t//set up the body\r\n\t\tstopWatchTimer = new StopWatch (0, 0, 0);\r\n timer = new TimerListener();\r\n javaTimer = new Timer(100, timer);\r\n //javaTimer.start();\r\n javaTimer.setRepeats(flag);\r\n\r\n //set the layout\r\n setLayout(new GridLayout(4,3));\r\n\t\tsetBackground(Color.BLUE);\r\n\t\t\r\n\t\t//initialize JButttons\r\n\t\tstart = new JButton(\"START\");\r\n\t\tstop = new JButton(\"STOP\");\r\n\t\treset = new JButton(\"RESET\");\r\n\t\tadd = new JButton(\"ADD\");\r\n\t\tsub = new JButton(\"SUBTRACT\");\r\n\t\t\r\n\t\t//make text fields initially 0\r\n\t\tmin = new JTextField(\"0\");\r\n\t\tsec = new JTextField(\"0\");\r\n\t\tmilli = new JTextField(\"0\");\r\n\t\t\r\n\t\t//initialize JLabels\r\n\t\ttime = new JLabel(\"Time: \" + stopWatchTimer.toString());\r\n\t\tminL = new JLabel(\"Minute: \");\r\n\t\tsecL = new JLabel(\"Second: \");\r\n\t\tmilliL = new JLabel(\"Millisecond: \");\r\n\t\t\r\n\t\t//add to menu bar\r\n//\t\t\t\tJMenuBar menuBar = new JMenuBar();\r\n//\t\t\t\tmenuBar.add(file);\r\n\t\t\r\n\t\t\r\n\t //timer = new TimerListener();\r\n\t\tmin.addActionListener(timer);\r\n\t\tsec.addActionListener(timer);\r\n\t\tmilli.addActionListener(timer);\r\n\t\tstart.addActionListener(timer);\r\n\t\tstop.addActionListener(timer);\r\n\t\treset.addActionListener(timer);\r\n\t\tadd.addActionListener(timer);\r\n\t\tsub.addActionListener(timer);\r\n\t\t\r\n\t\t//add everything to panel\r\n\t\tadd(time);\r\n\t\t\r\n\t\tadd(reset);\r\n\t\tadd(add);\r\n\t\tadd(minL);\r\n\t\tadd(min);\r\n\t\tadd(start);\r\n\t\tadd(secL);\r\n\t\tadd(sec);\r\n\t\tadd(stop);\r\n\t\tadd(milliL);\r\n\t\tadd(milli);\r\n\t\tadd(sub);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void freezeTimer() {\n\t\t\r\n\t}", "protected void initialize() {\n \ttimer.start();\n }", "public void updateTimer() {\n this.machineCounter.setTimerValue(Config.MACHINE_TIMER);\n }", "private void startTimer() {\n myTimer.start();\n enableGamePlayKeys();\n repaint();\n }", "private void pauseTimer() {\n myTimer.stop();\n disableGamePlayKeys();\n repaint();\n }", "public TimerDisplay()\n {\n timeElapsed = 0;\n }", "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "public void initializeInstance() {\n instanceLife = new Timer();\n }", "public void startTimer() {\n\t\tint delay;\n\t\tint period;\n\n\t\tdelay = 1000;\n\t\tperiod = 1000;\n\t\ttimer.scheduleAtFixedRate(new TimerTask() {\n\n\t\t\tpublic void run() {\n\t\t\t\tsetTimeLeft();\n\t\t\t}\n\t\t}, delay, period);\n\t}", "public void resetTimer(){\n timerStarted = 0;\n }", "public AnimationTimer createTimer() {\n return new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (!levelController.getLevelControllerMethods().getGamePaused()) {\n levelController.getBubbles().forEach(Monster.this::checkCollision);\n move();\n }\n\n setChanged();\n notifyObservers();\n }\n };\n\n }", "private static void timerTest2() {\n\t\tTimer timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\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\tif (count < 5) {\n\t\t\t\t\tSystem.out.println(\"timertest2\" + \" \" + ++count);\n\t\t\t\t} else {\n\t\t\t\t\ttimer.cancel();\n\t\t\t\t}\n\n\t\t\t}\n\t\t}, 2000, 1000);\n\n\t}", "public void updateTimer(){\n\t\tif(timer.isRunning()){ \n\t\t\ttimer.stop();\n\t\t\tmakeTimer();\n\t\t\ttimer.start();\n\t\t}else{\n\t\t\tmakeTimer();\n\t\t}\n\t}", "public void stopTimer(){\n this.timer.cancel();\n }", "private void startAnimation()\n\t{\n\t\tActionListener timerListener = new TimerListener();\n\t\tTimer timer = new Timer(DELAY, timerListener);\n\t\ttimer.start();\n\t}", "public Fenetre() {\n initComponents();\n\n timerNR = new javax.swing.Timer(5000, new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n timerNRActionPerformed(evt);\n }\n }\n );\n\n timerNV = new javax.swing.Timer(5000, new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n timerNVActionPerformed(evt);\n }\n }\n );\n\n timerNO = new javax.swing.Timer(2000, new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n timerNOActionPerformed(evt);\n }\n }\n );\n\n timerPO = new javax.swing.Timer(1000, new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n timerPOActionPerformed(evt);\n }\n }\n );\n\n timerPE = new javax.swing.Timer(500, new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n timerPEActionPerformed(evt);\n }\n }\n );\n\n state = State.INITIAL;\n activation();\n switchOffAll();\n }", "public UpdateTimer()\n\t\t{\n\t\t\tsuper(delayTime, null);\n\t\t\t\n\t\t\taddActionListener(this);\n\t\t}", "private void timerstart() {\n timer = new Timer(timer1, new ActionListener(){ \n \tpublic void actionPerformed(ActionEvent ae){\n \t\tcheckMatch();\n \t}});\n timer.start();\n timer.setRepeats(false);\n }", "public void pause() {\n\n if (timer != null) {\n\n // Arreter le timer\n stop();\n\n // Mise à jour\n update();\n }\n }", "public void activateTimers(){\n\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tThread.sleep(FIVE_SECONDS);\n\t\t\t\t//System.out.print(\".\");\n\t\t\t\tSystem.out.println(jobscheduler.getSchedulerStatus());\n\t\t\t\t//if the props list changes\n\t\t\t\tif(poller.inspect()!=0){\n\t\t\t\t\tschedule(this.poller.refresh());\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\tfor (String k : trigs.keySet()){\n\t\t\t\t\tSystem.out.println(k+\"//\"+formatCalendar(Calendar.getInstance())+\"->\"+trigs.get(k).getNextFireTime());\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t\tcatch(InterruptedException ie){\n\t\t\t\tSystem.err.println(\"Interrupted Exception : \" + ie);\n\t\t\t\tthrow new RuntimeException(ie);\n\t\t\t}\n\t\t\tcatch(SchedulerException se){\n\t\t\t\tSystem.err.println(\"Scheduler Exception : \" + se);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7298571", "0.6980324", "0.6933258", "0.68474555", "0.6823702", "0.6786864", "0.6728834", "0.6676059", "0.665449", "0.6595864", "0.6490367", "0.6479586", "0.647021", "0.6452835", "0.64425147", "0.6442098", "0.6440969", "0.6423004", "0.6391326", "0.63820404", "0.6378013", "0.63619673", "0.6347885", "0.6346224", "0.63132054", "0.62982637", "0.6295148", "0.6287537", "0.6271389", "0.6235579", "0.6232763", "0.623168", "0.6222542", "0.6222518", "0.6220191", "0.6217042", "0.62064797", "0.619894", "0.6197567", "0.61901087", "0.6151993", "0.61438155", "0.6123175", "0.60886747", "0.6051404", "0.60261613", "0.59966093", "0.59948856", "0.5970256", "0.59635544", "0.5957469", "0.5956833", "0.5945731", "0.59295756", "0.5919569", "0.5917489", "0.59050065", "0.5903897", "0.58978456", "0.5889609", "0.5888961", "0.58875203", "0.5881584", "0.5877472", "0.5872943", "0.5870756", "0.5869213", "0.58582073", "0.58576477", "0.585535", "0.5851161", "0.5849983", "0.5844818", "0.583973", "0.58371127", "0.5817548", "0.58161575", "0.5790739", "0.5786392", "0.57850444", "0.5773294", "0.5765797", "0.57636625", "0.5761699", "0.57504624", "0.5740403", "0.57310027", "0.57264024", "0.5711541", "0.5707056", "0.5692757", "0.5691942", "0.56873983", "0.56811047", "0.5676783", "0.5675569", "0.5669597", "0.5665406", "0.56646794", "0.5659449", "0.5655117" ]
0.0
-1
int i = a.getLocation() + 1; // diceResult + 1; int i_f = (a.getLocation() 1 + 38) % 38; int i2 = 20 + b.getLocation();// diceResult; int i2_f = (b.getLocation() + 19 1 + 38) % 38; Handle ActionEvent
public void actionPerformed(ActionEvent e) { // FireEvent sign = new FireEvent(j); System.out.println(diceResult + " a" + "a's locaton:" + a.getLocation()); if (conPlay % 2 == 0) { AIplay = false; // 用了转向卡时 if (a.getDirection() == 1) { if (con2 >= diceResult) { timer2.stop(); a.setLocation(-diceResult); AIFireEvent sign = new AIFireEvent(a.getLocation(), a, b, AIplay); System.out.println("a.Position " + a.getLocation()); sign.setVisible(true); conPlay++; con2 = 0; } else { playerAIcon.setBounds(p[i_f][0], p[i][1], p[i][2], p[i][3]); i_f--; if (i_f >= 38) i_f = i_f % 38; if (i_f < 0) i_f = i_f + 38; con2++; } } // 没有用转向卡 else { if (con2 >= diceResult) { timer2.stop(); a.setLocation(diceResult); AIFireEvent sign = new AIFireEvent(a.getLocation(), a, b, AIplay); System.out.println("a.Position " + a.getLocation()); sign.setVisible(true); conPlay++; con2 = 0; } else { playerAIcon.setBounds(p[i][0], p[i][1], p[i][2], p[i][3]); i++; if (i >= 38) i = i % 38; con2++; } } } // 玩家b的操作 else { AIplay = true; // 没有使用转向卡 if (b.getDirection() == 0) { if (con2 >= diceResult) { timer2.stop(); b.setLocation(diceResult); AIFireEvent sign = new AIFireEvent( (b.getLocation() + 19) % 38, b, a, AIplay); System.out.println("b.Position " + (int) ((b.getLocation() + 19)) % 38); sign.setVisible(true); conPlay++; con2 = 0; } else { if (i2 >= 38) i2 = i2 % 38; playerBIcon.setBounds(p[i2][0], p[i2][1], p[i2][2], p[i2][3]); i2++; // if (i2 >= 38) // i2 = i2 % 38; con2++; } } // if (b.getDirection() == 1) { if (con2 >= diceResult) { timer2.stop(); b.setLocation(-diceResult); AIFireEvent sign = new AIFireEvent( (b.getLocation() + 19) % 38, b, a, AIplay); System.out.println("b.Position " + (int) ((b.getLocation() + 19)) % 38); sign.setVisible(true); conPlay++; con2 = 0; } else { playerBIcon.setBounds(p[i2_f][0], p[i2_f][1], p[i2_f][2], p[i2_f][3]); i2_f--; if (i2_f >= 38) i2_f = i2_f % 38; if (i2_f < 0) i2_f = i2_f + 38; con2++; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer aiAction() {\r\n\t\t//if the first dice is less then six, throw the second dice \r\n\t\t//if the both throws > 10 the ai has lost, and will return 0\r\n\t\t//if the first dice == 7, return first dice\r\n\t\tInteger totalSum = 0;\r\n\t\tRandom aiRandom = new Random();\r\n\t\tInteger firstDice = aiRandom.nextInt(7) + 1;\r\n\t\tSystem.out.println(\"First dice: \" + (totalSum += firstDice));\r\n\t\tif (firstDice < 6) {\r\n\t\t\tInteger secondDice = aiRandom.nextInt(7) + 1;\r\n\t\t\tSystem.out.println(\"Second dice value is: \" + secondDice);\r\n\t\t\tSystem.out.println(\"Sum of both throws: \" + (totalSum += secondDice));\r\n\t\t\tif(totalSum > 10){\r\n\t\t\t\treturn 0;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn totalSum;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Ai scored :\" + (firstDice));\r\n\t\t\treturn firstDice;\r\n\t\t}\r\n\r\n\t}", "@Test\n public void RobotHitByDoubleLaserShouldTake2InDamage() {\n\n int damage = 2;\n\n //health before laser firing\n int healthRobotBeforeHit = robot4.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after hit by laser\n int healthRobotAfterHit = robot4.getRobotHealthPoint();\n\n //should evaluate to true\n assertEquals(healthRobotBeforeHit, healthRobotAfterHit+damage);\n\n }", "@Test\n\tpublic void testF(){\n\t\tActorWorld world = new ActorWorld();\n\t\n\t\tworld.add(new Location(6, 4), alice);\n\t\tworld.add(new Location(3, 4), bob);\n\t\tbob.setDirection(Location.SOUTH);\n\t\talice.act();\n\t\tbob.act();\n\t\tassertEquals(new Location(4, 4), alice.getLocation());\n\t\tassertEquals(new Location(5, 4), bob.getLocation());\n\n\t\tbob.moveTo(new Location(0, 4));\n\t\tint olddir = alice.getDirection();\n\t\tbob.act(); // the first act's jumper can jump\n\t\talice.act(); // the second should turn \n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\t\tassertEquals(new Location(2, 4), bob.getLocation());\n\t}", "private int spit_fire(int x, int y, Dragao dragao) {\n\n\t\tint count = 1;\n\t\tif (y == 1) {\n\t\t\tdragao.setSpit(\"down\");\n\t\t\tif (heroi.getX_coord() == dragao.getX_coord()) {\n\t\t\t\twhile (count < 4 && getLabirinto().getLab()[dragao.getX_coord()][dragao.getY_coord()+count] != 'X') {\n\t\t\t\t\tif (heroi.getY_coord() == (dragao.getY_coord()+count)) {\n\t\t\t\t\t\tif (!heroi.isShielded())\n\t\t\t\t\t\t\treturn 10;\n\t\t\t\t\t\telse if (labirinto.getLab()[dragao.getX_coord()][dragao.getY_coord()+count] == 'X')\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (x == 1) {\n\t\t\tdragao.setSpit(\"right\");\n\t\t\tif (heroi.getY_coord() == dragao.getY_coord()) {\n\t\t\t\twhile (count < 4 && getLabirinto().getLab()[dragao.getX_coord()+count][dragao.getY_coord()] != 'X') {\n\t\t\t\t\tif ((heroi.getX_coord()) == dragao.getX_coord()+count) {\n\t\t\t\t\t\tif (!heroi.isShielded())\n\t\t\t\t\t\t\treturn 10;\n\t\t\t\t\t\telse if (labirinto.getLab()[dragao.getX_coord()+count][dragao.getY_coord()] == 'X')\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (x == 0) {\n\t\t\tdragao.setSpit(\"left\");\n\t\t\tif (heroi.getY_coord() == dragao.getY_coord()) {\n\t\t\t\twhile (count < 4 && getLabirinto().getLab()[dragao.getX_coord()-count][dragao.getY_coord()] != 'X') {\n\t\t\t\t\tif (heroi.getX_coord() == (dragao.getX_coord()-count)) {\n\t\t\t\t\t\tif (!heroi.isShielded())\n\t\t\t\t\t\t\treturn 10;\n\t\t\t\t\t\telse if (labirinto.getLab()[dragao.getX_coord()-count][dragao.getY_coord()] == 'X')\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\telse {\n\t\t\tdragao.setSpit(\"up\");\n\t\t\tif (heroi.getX_coord() == dragao.getX_coord()) {\n\t\t\t\twhile (count < 4 && getLabirinto().getLab()[dragao.getX_coord()][dragao.getY_coord()-count] != 'X') {\n\t\t\t\t\tif ((heroi.getY_coord()) == dragao.getY_coord()-count) {\n\t\t\t\t\t\tif (!heroi.isShielded())\n\t\t\t\t\t\t\treturn 10;\n\t\t\t\t\t\telse if (labirinto.getLab()[dragao.getX_coord()][dragao.getY_coord()-count] == 'X' ||\n\t\t\t\t\t\t\t\tdragao.getY_coord()-count <= 0)\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public void incrementAttack(Fighter f1, Fighter f2)\r\n {\r\n if(f1.getAttacking() == 1) //if the fighter is attacking\r\n {\r\n if(f1.getAttackT() == 5) //if 5 frames have passed\r\n {\r\n int[] i = new int[4]; \r\n i = attackHitBox(f1); //gets the x,y, height, and width of the attack\r\n \r\n //if the attack position overlapps the other fighter's position and the other fighter isn't blocking\r\n if (i[0] <= f2.getPos()[0] + f2.getSize() && i[0] + i[2] >= f2.getPos()[0] && i[1] <= f2.getPos()[1] + f2.getSize() && i[1] + i[3] >= f2.getPos()[1] && f2.getBlocking() != 1)\r\n {\r\n f2.setHealth(f2.getHealth() - f1.getAttack().getDamage()); //deal damage to the fighter\r\n if(f1.getRight() == true){ \r\n f2.setKnockBackVel(f1.getAttack().getKnockBack()[0],f1.getAttack().getKnockBack()[1]); //apply knockback going right\r\n }else\r\n {\r\n f2.setKnockBackVel(-f1.getAttack().getKnockBack()[0],f1.getAttack().getKnockBack()[1]); //apply knockback going left\r\n }\r\n }\r\n f1.setAttackT(0); //reset attack timer\r\n f1.setAttacking(2); //sets the fighter to cooldown\r\n }else\r\n {\r\n f1.setAttackT(f1.getAttackT() + 1); //increments timer\r\n }\r\n }\r\n\r\n if(f1.getAttacking() == 2) //if fighter is in cooldown\r\n {\r\n if(f1.getAttackT() == f1.getAttack().getTime()) //if the timer has waited the cooldown of the last attack\r\n {\r\n f1.setAttackT(0); //resets the timer\r\n f1.setAttacking(0); //sets the fighter to \"can attack\"\r\n }\r\n else\r\n {\r\n f1.setAttackT(f1.getAttackT() + 1); //increment timer\r\n }\r\n }\r\n }", "public void addPoint_action()\r\n/* */ {\r\n/* 94 */ this.points_action += 1;\r\n/* */ }", "public Tuple move(Board board, Dice dice, BuildDice bdice) {\n // Throw Dice\n int result = dice.roll();\n System.out.println(ANSI() + \"Player\" + id + \" rolls dice\" + ANSI_RESET);\n System.out.println(ANSI() + \"Player\" + id + \" please press any button\" + ANSI_RESET);\n Scanner s = new Scanner(System.in);\n String str = s.nextLine();\n System.out.println(\"Dice: \" + result);\n System.out.println();\n\n // Render legal your previous position\n board.legal[posX][posY] = 0; \n\n boolean capital = false, bank = false;\n Tuple res = new Tuple();\n Tuple player_pos = new Tuple(posX, posY);\n board.setShow(player_pos, board.board[posX][posY]);\n\n for (int i=0; i<result; i++) {\n int x1, x2, y1, y2, x3, y3, x4, y4;\n\n // right\n x1 = posX;\n y1 = posY + 1;\n // up \n x2 = posX - 1;\n y2 = posY;\n // left\n x3 = posX;\n y3 = posY - 1;\n // down\n x4 = posX + 1;\n y4 = posY;\n \n char c1 = board.board[x1][y1];\n char c2 = board.board[x2][y2];\n char c3 = board.board[x3][y3];\n char c4 = board.board[x4][y4];\n\n if (board.board[posX][posY] == 'S') {\n res.a = 6;\n res.b = 11; \n }\n else if ((c1 == 'B' || c1 == 'C' || c1 == 'H' || c1 == 'S' || c1 == 'E' || c1 == 'e') \n && (prevx != x1 || prevy != y1)) {\n res.a = x1;\n res.b = y1;\n }\n else if ((c2 == 'B' || c2 == 'C' || c2 == 'H' || c2 == 'S' || c2 == 'E' || c2 == 'e') \n && (prevx != x2 || prevy != y2)) {\n res.a = x2;\n res.b = y2;\n }\n else if ((c3 == 'B' || c3 == 'C' || c3 == 'H' || c3 == 'S' || c3 == 'E' || c3 == 'e') \n && (prevx != x3 || prevy != y3)) {\n res.a = x3;\n res.b = y3;\n }\n else if ((c4 == 'B' || c4 == 'C' || c4 == 'H' || c4 == 'S' || c4 == 'E' || c4 == 'e') \n && (prevx != x4 || prevy != y4)) {\n res.a = x4;\n res.b = y4;\n }\n\n prevx = posX;\n prevy = posY;\n // (res.a, res.b) is my next position\n posX = res.a;\n posY = res.b;\n\n // Check if player passes Bank ---> + 1000 MLS\n if (posX == board.B.a && posY == board.B.b) \n bank = true;\n \n // Check if player passes Capital ---> entrance ??\n if (posX == board.C.a && posY == board.C.b)\n capital = true;\n\n // if last round of dice result\n if (i == result - 1) {\n int legal = board.setLegal(prevx, prevy, posX, posY);\n if (legal == 0) {\n res.a = posX;\n res.b = posY;\n }\n // Someone else is on this position\n else if (legal == 1) {\n boolean ans = false;\n while (!ans) {\n // right\n x1 = posX;\n y1 = posY + 1;\n // up \n x2 = posX - 1;\n y2 = posY;\n // left\n x3 = posX;\n y3 = posY - 1;\n // down\n x4 = posX + 1;\n y4 = posY;\n \n c1 = board.board[x1][y1];\n c2 = board.board[x2][y2];\n c3 = board.board[x3][y3];\n c4 = board.board[x4][y4];\n \n if (board.board[posX][posY] == 'S') {\n res.a = 6;\n res.b = 11; \n }\n else if ((c1 == 'B' || c1 == 'C' || c1 == 'H' || c1 == 'S' || c1 == 'E' || c1 == 'e') \n && (prevx != x1 || prevy != y1)) {\n res.a = x1;\n res.b = y1;\n }\n else if ((c2 == 'B' || c2 == 'C' || c2 == 'H' || c2 == 'S' || c2 == 'E' || c2 == 'e') \n && (prevx != x2 || prevy != y2)) {\n res.a = x2;\n res.b = y2;\n }\n else if ((c3 == 'B' || c3 == 'C' || c3 == 'H' || c3 == 'S' || c3 == 'E' || c3 == 'e') \n && (prevx != x3 || prevy != y3)) {\n res.a = x3;\n res.b = y3;\n }\n else if ((c4 == 'B' || c4 == 'C' || c4 == 'H' || c4 == 'S' || c4 == 'E' || c4 == 'e') \n && (prevx != x4 || prevy != y4)) {\n res.a = x4;\n res.b = y4;\n }\n\n prevx = posX;\n prevy = posY;\n // (res.a, res.b) is my next position\n posX = res.a;\n posY = res.b;\n\n legal = board.setLegal(prevx, prevy, posX, posY);\n if (legal == 0) {\n ans = true;\n }\n \n // Check if player passes Bank ---> + 1000 MLS\n if (posX == board.B.a && posY == board.B.b) \n bank = true;\n \n // Check if player passes Capital ---> entrance ??\n if (posX == board.C.a && posY == board.C.b)\n capital = true; \n \n } // endwhile\n\n } // endelseif(legal==1)\n\n // Check if player passes Bank ---> + 1000 MLS\n if (posX == board.B.a && posY == board.B.b)\n bank = true;\n // Check if player passes Capital ---> entrance ??\n if (posX == board.C.a && posY == board.C.b)\n capital = true;\n\n } // endif(i==result-1)\n \n } // endfor\n\n /* ΔΙΝΩ ΠΡΟΤΕΡΑΙΟΤΗΤΑ ΠΡΩΤΑ ΣΤΟ ΝΑ ΠΑΙΡΝΩ ΧΡΗΜΑΤΑ ΑΠΟ ΤΗΝ ΤΡΑΠΕΖΑ\n * ΜΕΤΑ ΣΤΟ ΝΑ ΠΛΗΡΩΣΩ ΣΤΟΝ ΑΝΤΙΠΑΛΟ ΜΟΥ\n * ΜΕΤΑ ΣΤΟ ΝΑ ΜΠΟΡΩ ΝΑ ΑΓΟΡΑΣΩ ΕΙΣΟΔΟ Ή ΝΑ ΧΤΙΣΩ Ή ΝΑ ΑΓΟΡΑΣΩ ΞΕΝΟΔΟΧΕΙΟ\n */\n\n System.out.println(ANSI() + \"Player\" + id + \" is moving to position (\" + res.a + \", \" + res.b + \") \" + board.board[res.a][res.b] + \".\" + ANSI_RESET); \n System.out.println();\n if (!hotel_list.isEmpty()) {\n System.out.println(ANSI() + \"Player\" + id + \" hotels:\" + ANSI_RESET);\n for (HotelCard hc : hotel_list) {\n System.out.println(ANSI() + hc.getName() + ANSI_RESET);\n }\n }\n\n // Find player's position on the show board\n board.setShow(res, getMisc());\n\n // Player has passed from Bank, if (bank == true)\n if (bank)\n bank();\n\n // Check if player is on a rival's entrance \n pay(res, dice, board);\n // Check for bankrupt\n if (status == false) return null;\n\n /* Player has passed from Capital, if (capital == true)\n * Player moves to E --> wants to buy an entrance or upgrade??\n */ \n if ((capital || board.board[res.a][res.b] == 'E' || board.board[res.a][res.b] == 'e') \n && !hotel_list.isEmpty()) {\n String cap = null, build = \"no\";\n if (capital) cap = wantsEntrance(\"capital\");\n else if (board.board[res.a][res.b] == 'E' || board.board[res.a][res.b] == 'e') {\n cap = wantsEntrance(\"E\");\n if (cap.equals(\"no\")) {\n System.out.println(ANSI() + \"Want to build or upgrade a hotel?\" + ANSI_RESET);\n build = wantsBuild();\n }\n }\n // wantsEntrance() result\n if (cap.equals(\"yes\")) {\n System.out.println(ANSI() + \"Player\" + id + \" MLS is: \" + mls + \".\" + ANSI_RESET);\n HotelCard cap_hotel = searchHotel();\n System.out.println(ANSI() + \"Give the (line, column) of entrance position\"+ ANSI_RESET);\n int line = -1, column = -1;\n boolean answer = false;\n System.out.println(ANSI() + \"Give line\" + ANSI_RESET);\n while (answer == false) {\n s = new Scanner(System.in);\n str = s.nextLine();\n try {\n line = Integer.parseInt(str);\n answer = true; \n } catch (Exception e) {\n System.out.println(ANSI() + \"Give integer line\" + ANSI_RESET);\n } \n }\n System.out.println(ANSI() + \"Give column\" + ANSI_RESET);\n answer = false;\n while (answer == false) {\n s = new Scanner(System.in);\n str = s.nextLine();\n try {\n column = Integer.parseInt(str);\n answer = true; \n } catch (Exception e) {\n System.out.println(ANSI() + \"Give integer column\" + ANSI_RESET);\n } \n } \n Tuple pos = new Tuple(line, column);\n buyEntrance(cap_hotel, pos, board);\n }\n // wantsBuild() result\n else if (build.equals(\"yes\")) {\n System.out.println(ANSI() + \"Player\" + id + \" MLS is: \" + mls + ANSI_RESET);\n HotelCard cap_hotel = searchHotel();\n build(cap_hotel, bdice);\n }\n }\n \n // Player is on \"H\" --> Wants to buy??\n else if (board.board[res.a][res.b] == 'H') {\n String buy;\n System.out.println(ANSI() + \"Player\" + id + \" MLS is: \" + mls + ANSI_RESET);\n System.out.println(ANSI() + \"Want to buy a hotel?\" + ANSI_RESET);\n buy = wantsBuy();\n if (buy.equals(\"yes\")) { \n HotelCard buy_hotel = searchAdjacentHotels(board, res); \n buyHotel(buy_hotel);\n }\n }\n\n // After all, player's movement reach to an end...\n return res; \n }", "public void Diceroll()\n\t{\n\t\tdice1 = rand.nextInt(6)+1;\n\t\tdice2 = rand.nextInt(6)+1;\n\t\ttotal = dice1+dice2;\n\t}", "private static void roll()\n {\n rand = (int)(((Math.random())*6)+1); // dice roll #1\n rand2 = (int)(((Math.random())*6)+1);// dice roll #2\n }", "public void animateDice() {\n pos += vel*tickCounter + ACC*tickCounter*tickCounter/2;\n if(pos<(TILE_SIZE*15-DICE_SIZE)/2){\n if(this.pIndex%3==0)\n diceImg = diceAnimation[tickCounter%diceAnimation.length];\n else\n diceImg = diceAnimation[diceAnimation.length-1-(tickCounter%diceAnimation.length)];\n tickCounter++;\n vel += ACC;}\n else{\n diceImg = dice[result-1];\n pos=(TILE_SIZE*15-DICE_SIZE)/2;}\n setCoordinates(pos);\n //System.out.println(\"dice pos \"+pos);\n }", "int getActionPoints(Unit unit);", "public int rollAttack()\n {\n Random random2 = new Random();\n int atk = random2.nextInt(20) +1 + attackBonus;\n return atk;\n }", "public int rollDice() {\n\t\td1 = r.nextInt(6) + 1;\n\t\td2 = r.nextInt(6) + 1;\n\t\trepaint();\n\t\treturn d1 + d2;\n\t}", "public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}", "public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }", "public void setPlayerRoll20()\r\n {\r\n \r\n roll2 = ((int)(Math.random() * 100) % HIGHEST_DIE_VALUE20 + LOWEST_DIE_VALUE20);\r\n \r\n }", "public int handleMove(int dicethrow);", "private void enemyAttack() {\n\t\t\n\t\tRandom rand = new Random();\t\n\t\t\n\t\tint roll = rand.nextInt(101);\n\t\t\n\t\tint sroll = rand.nextInt(101);\n\t\t\n\t\tevents.appendText(e.getName() + \" attacks!\\n\");\n\t\t\n\t\tif(roll <= p.getEV()) { // Player evades\n\t\t\t\n\t\t\tevents.appendText(\"You evaded \"+e.getName()+\"\\'s Attack!\\n\");\n\t\t\t\n\t\t}else if(roll > p.getEV()) { // Player is hit and dies if HP is 0 or less\n\t\t\t\n\t\t\tp.setHP(p.getHP() - e.getDMG());\n\t\t\t\n\t\t\tString newHp = p.getHP()+\"/\"+p.getMaxHP();\n\t\t\t\n\t\t\tString effect = e.getSpecial(); // Stats are afflicted\n\t\t\t\n\t\t\tif(sroll < 51){\n\t\t\t\t\n\t\t\tif(effect == \"Bleed\") { // Bleed Special\n\t\t\t\t\n\t\t\t\tp.setHP(p.getHP() - 100);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You bleed profusely. - 100 HP\\n\");\n\t\t\t\t\n\t\t\t\tnewHp = String.valueOf(p.getHP()+\"/\"+p.getMaxHP());\n\t\t\t}\n\t\t\tif(effect == \"Break\") { // Break Special \n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"You feel a bone break restricting movement. - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Fear\") { // Fear Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-40>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 40);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"A crippling fear rattles your resolve. - 40 DMG\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(effect == \"Rend\") { // Rend Special \n\t\t\t\t\n\t\t\t\tif(p.getDMG()-30>0)\n\t\t\t\t\tp.setDMG(p.getDMG() - 30);\n\t\t\t\telse\n\t\t\t\t\tp.setDMG(0);\n\t\t\t\t\n\t\t\t\tif(p.getEV()-5>0)\n\t\t\t\t\tp.setEV(p.getEV() - 5);\n\t\t\t\telse\n\t\t\t\t\tp.setEV(0);\n\t\t\t\t\n\t\t\t\tevents.appendText(\"Morthar unleashes a pillar of flame! - 30 DMG and - 5 EV\\n\");\n\t\t\t\t\n\t\t\t\tString newDMG = String.valueOf(p.getDMG());\n\t\t\t\t\n\t\t\t\tString newEV = String.valueOf(p.getEV());\n\t\t\t\t\n\t\t\t\tgdmg.setText(newDMG);\n\t\t\t\t\n\t\t\t\tgev.setText(newEV);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\tif(p.getHP() <= 0) {\n\t\t\t\t\n\t\t\t\tp.setDead(true);\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(0+\"/\"+e.getMaxHP());\n\t\t\t\tplayerHPBar.setProgress((double)0);\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\tcurrentHp.setText(newHp);\n\t\t\t\tplayerHPBar.setProgress((double)p.getHP()/p.getMaxHP());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tif(p.isDead()) { // Game over if player dies\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoadGO();\n\t\t\t} catch (IOException e1) {\n\t\t\t\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tcombat = false;\n\t\t}\n\t}", "@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }", "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 rollDices(Dice dice1, Dice dice2) {\n\n while (true) {\n // click to roll\n dice1.rollDice();\n dice2.rollDice();\n setSum(dice1, dice2);\n\n // if(roll == pN)\n // player and npcs that bet 1 win\n if (sum == pN) {\n player.playerWin();\n System.out.println(\"You rolled \" + sum + WINMESSAGE +\n \"\\nYou have a total of \" + player.getWins() + \" wins and \"\n + player.getLoses() + \" loses.\");\n break;\n }\n // if(roll == out7)\n else if (sum == OUT7) {\n player.playerLose();\n System.out.println(\"You hit the out 7.\" + LMESSAGE + \"\\nYou have a total of \" + player.getWins()\n + \" wins and \" + player.getLoses() + \" loses.\");\n\n break;\n } else {\n System.out.println(\"\\nYour total roll is \" + sum + \"\\nYou need to hit \" + pN +\n \" to win.\" + \"\\n\\nContinue rolling\\n\");\n }\n\n\n }\n\n }", "public void roll() { \n this.value = (int)(Math.random() * this.faces()) + 1; \n }", "public int roll()\r\n\t{\r\n\t return die1.roll() + die2.roll();\r\n \t}", "public int getPoints_action()\r\n/* */ {\r\n/* 72 */ return this.points_action;\r\n/* */ }", "private void testGrab()\n {\n if(gamepad1.y) {\n //move to position where it touches block ----might have to change angle based on trial----\n //Drastic angles at the moment for testing\n servoLeft.setPosition(0.5);\n //servoRight.setPosition(0.5);\n }\n }", "public void roll(){\n Random rand = new Random();\n this.rollVal = rand.nextInt(this.faces) + 1;\n }", "public void minusPoint_action()\r\n/* */ {\r\n/* 87 */ this.points_action -= 1;\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\n\tpublic void testB() {\n\t\tActorWorld world = new ActorWorld();\n\t\tworld.add(new Location(1, 1), alice);\n\t\tint olddir = alice.getDirection();\n\t\talice.act();\n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\t}", "public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab4.setBounds(510,y,230,60); \n lab4.setVisible(true); //displays yellow bar image\n value += 82; //point value of yellow\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610; \n value = 0;\n } \n }", "public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }", "public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab7.setBounds(510,y,230,60); \n lab7.setVisible(true); //displays purple bar image\n value += 29; //point value of purple\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610;\n value = 0;\n }\n \n }", "void walk(){\n\t\tif(intelligent){\n\t\t\tif(d[0]){\n\t\t\t\txPos--;\n\t\t\t\tyPos--;\n\t\t\t} else if(d[1]){\n\t\t\t\tyPos--;\n\t\t\t} else if(d[2]){\n\t\t\t\txPos++;\n\t\t\t\tyPos--;\n\t\t\t} else if(d[3]){\n\t\t\t\txPos++;\n\t\t\t} else if(d[4]){\n\t\t\t\txPos++;\n\t\t\t\tyPos++;\n\t\t\t} else if(d[5]){\n\t\t\t\tyPos++;\n\t\t\t} else if(d[6]){\n\t\t\t\txPos--;\n\t\t\t\tyPos++;\n\t\t\t} else if(d[7]){\n\t\t\t\txPos--;\n\t\t\t}\n\t\t} else {\n\t\t\tif(appleDetected){\n\t\t\t\txPos += xNextApple;\n\t\t\t\tyPos += yNextApple;\n\t\t\t\townGarden.removeApple(xPos, yPos);\n\t\t\t\tappleCache++;\n\t\t\t\tappleDetected = false;\n\t\t\t} else {\n\t\t\t\txRandomDirection = 500;\n\t\t\t\tyRandomDirection = 500;\n\t\t\t\twhile(\t!(\n\t\t\t\t\t\t\txPos + xRandomDirection >= 0 &&\n\t\t\t\t\t\t\txPos + xRandomDirection < 10 &&\n\t\t\t\t\t\t\tyPos + yRandomDirection >= 0 &&\n\t\t\t\t\t\t\tyPos + yRandomDirection < 10\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\tswitch((int)(Math.random()*7)){\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\txRandomDirection = 1;\n\t\t\t\t\t\tyRandomDirection = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\txRandomDirection = 1;\n\t\t\t\t\t\tyRandomDirection = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\txRandomDirection = 0;\n\t\t\t\t\t\tyRandomDirection = -1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 6:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 7:\n\t\t\t\t\t\txRandomDirection = -1;\n\t\t\t\t\t\tyRandomDirection = 0;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\txPos += xRandomDirection;\n\t\t\t\tyPos += yRandomDirection;\n\t\t\t}\n\t\t}\n\t}", "public boolean Fight(Player p)\n{\n\tint m=1;\n\t int t=1;\n int temp=0;\n int player1=this.weapon-1;\n int player2=p.weapon-1;\n\n\t int[] a=new int[this.weapon];\n int[] b=new int[p.weapon];\n System.out.println(\"XXxxXXxxXXxxXXxxXX FIGHT XXxxXXxxXXxxXXxxXX\\n\");\nwhile(this.health>0&&p.health>0)\n{\n System.out.println(\"~~~~~Round: \" +m+\"~~~~~\");\n m++;\n System.out.println(\"++\"+this.name+\" Health: \"+this.health+\" potions.\");\n System.out.println(\"++\"+p.name+\" Health: \"+p.health+\" potions.\");\n\n for (int i=0;i<a.length;i++)\n {\n\ta[i]=this.Roll();\n }\n for(int j=0;j<b.length;j++)\n {\n\tb[j]=p.Roll();\n }\n\n Arrays.sort(a);\n Arrays.sort(b);\n\n System.out.print(this.name+\" has thrown: {\");\n\n for(int i=a.length-1;i>0;i--)\n System.out.print(a[i]+\", \");\n\n System.out.println(a[0]+\"}\");\n\n System.out.print(p.name+\" has thrown: {\");\n for(int j=b.length-1;j>0;j--)\n System.out.print(b[j]+\", \");\n\n System.out.println(b[0]+\"}\");\n\n if(a.length>b.length)\n \ttemp=b.length;\n else\n \ttemp=a.length;\n\n player1=this.weapon-1;\n player2=p.weapon-1;\n t=1;\n while(this.health>0&&p.health>0&&temp>0)\n \t{\n\n System.out.print(\"***Strike \"+t+\": \");\n if(a[player1]==b[player2])\n {\n \tSystem.out.println(\"BOTH suffer blows!!!\");\n \tthis.health-=a[player1]*10;\n \tp.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n \tSystem.out.println(p.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n else if(a[player1]>b[player2])\n {\n \t\tSystem.out.println(p.name+\" does damage!\");\n \tp.health-=a[player1]*10;\n \tSystem.out.println(p.name+\" decreases health by \"+a[player1]*10+\" potions.\");\n }\n else\n {\n \tSystem.out.println(this.name+\" does damage!\");\n \tthis.health-=b[player2]*10;\n \tSystem.out.println(this.name+\" decreases health by \"+b[player2]*10+\" potions.\");\n }\n\n player1--;\n player2--;\n\n temp--;\n t++;\n \t}\n\n\n}\nif(this.health<=0)\n return false;\n else\n \treturn true;\n\n}", "private void roll2(DiceModel player1, DiceModel player2) {\n\t\t\n\t\tint random;\t\n\t\t\n\t\t// enables the dice to be kept\n\t\tenableDice();\n\t\t\n\t\t// reset text if player previously failed to select a die\n\t\tif (roundChanger == 2) {\n\t\t\ttextAreaInstructions.setText(rollToBeat);\n\t\t} else {\n \ttextAreaInstructions.setText(\"Start by clicking\" + \"\\n\" + \"Roll Dice button!\");\n \t}\n\t\t\n\t\t// display round number\n\t\ttextFieldRound.setText(Integer.toString(round));\n\t\t\n\t\t// if we are on the first roller, count up rolls till they end turn\n\t\tif (roundChanger == 1) {\n\t\t\trollsTaken = rollsTaken + 1;\n\t\t}\n\t\t\n\t\t// turn should increment for both rollers\n\t\tturn = turn + 1;\n\t\t\n\t\t// if all three die are selected then end turn\n\t\tif (togglebtnD1.isSelected() == true && togglebtnD2.isSelected() == true &&\n\t\t\t\ttogglebtnD3.isSelected() == true) {\n\t\t\tendTurn();\n\t\t}\n\t\t\n\t\t// determines who has the current roll\n\t\tString currentPlayer = textFieldCurrentPlayer.getText();\n\t\tString stringPlayer1 = \"Player1\";\n\t\t\n\t\t// enforces player requirement of having at least 1 die selected per roll\n\t\tif (turn != 1 && togglebtnD1.isSelected() == false && togglebtnD2.isSelected() == false &&\n \ttogglebtnD3.isSelected() == false) {\n \t\tif (roundChanger == 1) {\n \t\tturn = turn - 1;\n \t\trollsTaken = rollsTaken - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t} else if (roundChanger == 2 && turn == 0){\n \t\t\ttextAreaInstructions.setText(rollToBeat);\n \t\t}else {\n \t\tturn = turn - 1;\n \t\ttextAreaInstructions.setText(\"Please select at least 1 die to continue.\");\n \t\t}\n \t} else {\n\t\t\t// only get new values for dice that haven't been kept\t\t\n\t\t\tif (togglebtnD1.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\t displayDie(random, togglebtnD1);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie1(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie1(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD2.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD2);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie2(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie2(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\t\t\tif (togglebtnD3.isSelected() == false) {\n\t\t\t\trandom = generateRandom();\n\t\t\t\tdisplayDie(random, togglebtnD3);\n\t\t\t\tif (currentPlayer.equals(stringPlayer1)) {\n\t\t\t\t\tplayer1.setDie3(random);\n\t\t\t\t} else {\n\t\t\t\t\tplayer2.setDie3(random);\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t}\n\n\t\t\t// limit second rollers turns to as many turns as first roller had\n\t\t\tif (turn == rollsTaken && roundChanger == 2) {\n\t\t\t\tendTurn();\n\t\t\t}\n\n\t\t\tif (turn == 3) { \n\t\t\t\tendTurn();\n\t\t\t}\n\t\t}\t\n\t\n\t}", "public void rollCup()\n {\n die1.rolldice();\n die2.rolldice();\n gui.setDice(die1.getFacevalue(), die2.getFacevalue());\n }", "public void act(){\n food = theWorld.getCloseFood(this);\n queenAnt = theWorld.getCloseQueen(this);\n if(getF){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n start = false;\n hunger += 50;\n hasFood = false;\n //eat the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving up\");\n setDirection(Location.NORTH);\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n System.out.println(\"moving up left\");\n setDirection(Location.NORTH_WEST);\n //go up left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving left\");\n setDirection(Location.WEST);\n //go left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down left\");\n setDirection(Location.SOUTH_WEST);\n //go down left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() + 1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving down\");\n setDirection(Location.SOUTH);\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down right\");\n setDirection(Location.SOUTH_EAST);\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving right\");\n setDirection(Location.EAST);\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n System.out.println(\"moving up right\");\n setDirection(Location.NORTH_EAST);\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n //get the food\n start = false;\n getF = false;\n food.giveFood(this);\n }\n }else if(getQ){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n food.giveFood(this);\n start = false;\n //get the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n if(getLocation().isSameLocation(queenAnt.getLocation())){\n giveQueenFood(queenAnt);\n //give the queen the food\n }else{\n if(getLocation().getY() > queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(),this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() > queenAnt.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }\n }else{\n if(hunger > 30){\n getQ = true;\n start = true;\n //assign closest queen location\n }else{\n getF = true;\n start = true;\n //assign closest food location\n }\n }\n }", "public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab3.setBounds(510,y,230,60); \n lab3.setVisible(true); //displays orange bar image\n value += 27; //point value of orange\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n value = 0; \n y = 610; \n }\n }", "public static void Random() {\n\t\tRandom ran =new Random();\r\n\t\trandom=ran.nextInt(6)+1;\r\n\t\t//random=1;\r\n\t\twho=A1063307_GUI.who2;\r\n\t\tif((ch[who].status)>0) {\r\n\t\t\tch[who].location=(ch[who].location)+random;\r\n\t\t\tch[who].status=(ch[who].status)-1;\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\t\treturn;\r\n\t\t\t}\t\t\r\n\t}", "int hit();", "@Test\n public void testAct() {\n world.add(new Location(2, 0), jumper);\n jumper.act();\n jumper.act();\n assertEquals(new Location(0, 0), jumper.getLocation());\n jumper.act();\n jumper.act();\n assertEquals(new Location(0, 2), jumper.getLocation());\n }", "public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab6.setBounds(510,y,230,60); \n lab6.setVisible(true); //displays blue bar image\n value += 5; //point value of blue\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610;\n value = 0;\n }\n \n }", "public int takeTurn(Dice theDice){\n \n this.turnCounter++;\n \n return(theDice.rollDice());\n \n }", "public int[] move(){\n double inProb = Math.random();\n if (inProb < .25){\n y--;\n }\n else if (inProb < .5){\n y ++;\n }\n else if (inProb <.75){\n x--;\n }\n else {\n x++;\n }\n int[]loc = new int[2];\n loc[0] = x;\n loc[1] = y;\n \n return loc;\n }", "public void clickEvent(int index){\n t.stop();\n Timer(15);\n if (cards.get(index).getTurned() == false) {\n if (wait == 1) {\n setTurned(c1, false);\n setTurned(c2, false);\n wait = 0;\n }\n setTurned(index, true);\n if (state == 2) {\n state = 1;\n c2 = index;\n if (cards.get(c1).getImgAnime().contains((cards.get(c2).getImgAnime()))) {\n if (activePlayer == 1) {\n if(cards.get(index).getNumber() == 1){\n p1Points += 3;\n }\n else {\n p1Points++;\n }\n points(activePlayer, p1Points);\n activePlayer = 1;\n changePlayer(activePlayer);\n } else {\n if(cards.get(index).getNumber() == 1){\n p2Points += 3;\n }\n else {\n p2Points++;\n }\n points(activePlayer, p2Points);\n activePlayer = 2;\n changePlayer(2);\n\n }\n checkFinished();\n } else {\n wait = 1;\n if (activePlayer == 1) {\n activePlayer = 2;\n changePlayer(activePlayer);\n } else {\n activePlayer = 1;\n changePlayer(activePlayer);\n }\n }\n } else {\n state = 2;\n c1 = index;\n }\n }\n }", "public void act() \n {\n movegas();\n \n atingido2(); \n \n }", "private void locateApple() {\n xApplePosition = random.nextInt(32);\n yApplePosition = random.nextInt(21);\n }", "private TabLocation shootinline( TabLocation p1, TabLocation p2, TabLocation p3, boolean orientacja ){\n\t\tRandom generator = new Random();\n\t\tif( orientacja ){\n\t\t\tint shotcase = generator.nextInt(2);\n\t\t\t\n\t\t\tint maxy = Math.max(p1.y,p2.y);\n\t\t\tmaxy = Math.max(maxy, p3.y);\n\t\t\tint miny = Math.min(p1.y,p2.y);\n\t\t\tminy = Math.min(miny, p3.y);\n\t\t\t\n\t\t\tif( shotcase == 0 && maxy+1 < sizeBoard && opponentShootTable[p3.x][maxy+1] == false ) return new TabLocation( p3.x, maxy+1 );\n\t\t\t\n\t\t\telse{\n\t\t\t\tif( miny-1 >= 0 && opponentShootTable[p3.x][miny-1] == false )return new TabLocation( p3.x, miny-1 );\n\t\t\t\telse return new TabLocation( p3.x, maxy+1 );\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tint shotcase = generator.nextInt(2);\n\t\t\n\t\t\tint maxx = Math.max( p1.x, p2.x );\n\t\t\tmaxx = Math.max( maxx, p3.x );\n\t\t\tint minx = Math.min( p1.x, p2.x);\n\t\t\tminx = Math.min( minx, p3.x );\n\t\t\t\n\t\t\tif( shotcase == 0 && maxx+1 <sizeBoard && opponentShootTable[maxx+1][p3.y] == false ){\n\t\t\t\treturn new TabLocation( maxx+1, p3.y );\n\t\t\t}\n\t\t\telse{\n\t\t\t\tif( minx-1 >= 0 && opponentShootTable[minx-1][p3.y] == false ) return new TabLocation( minx-1, p3.y );\n\t\t\t\telse return new TabLocation( maxx+1, p3.y );\n\t\t\t}\n\t\t}\n\t\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 int fight(HW10Monster a, HW10Monster b,HW10Trainer a1,HW10Trainer b1 )\n\t{\n\t\t\n\t\tif(a.type.equals(\"earth\") && b.type.equals(\"fire\"))//determines which case the pokemon will have a stronger or weaker type attack power\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (.30*a.damage));//sets the first trainers pokemon attack to be extra strong against the seconds trainer pokemon\n\t\t\t\tb.damage=(int)(b.damage - (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"earth\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (.30*a.damage));\n\t\t\t\tb.damage=(int)(b.damage + (.30*b.damage));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"water\") && b.type.equals(\"fire\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"earth\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage - (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage + (b.damage*.30));\n\t\t\t}\n\t\telse if(a.type.equals(\"fire\") && b.type.equals(\"water\"))\n\t\t\t{\n\t\t\t\ta.damage= (int)(a.damage + (a.damage*.30));\n\t\t\t\tb.damage=(int)(b.damage - (b.damage*.30));\n\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\twhile(a.hp>0 && b.hp>0)//while both pokemon are still above zero continue to take away hp\n\t\t\t{\n\t\t\t\ta.hp=a.hp - b.damage;\n\t\t\t\tb.hp=b.hp - a.damage;\n\t\t\n\t\t\t\n\t\t\t if(a.hp<1 && b.hp<1)//if pokemon are below 1 \n\t\t\t \t{\n\t\t\n\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\telse if(a.hp>1 && b.hp<1) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t else if (a.hp<1 && b.hp>1)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\n\t\t\treturn 5;\n\t}", "@Test\n public void testAct() {\n world.add(new Location(FOUR , FOUR), jumper);\n jumper.act();\n jumper.act();\n assertEquals(new Location(ZERO, FOUR), jumper.getLocation());\n }", "public void actionPerformed(ActionEvent e)\n {\n if(y >= 550) //if the beaker is not filled\n {\n lab5.setBounds(510,y,230,60); \n lab5.setVisible(true); //displays green bar image\n value += 76; //point value of green\n y -= 60; //sets up to fill first half of beaker\n }\n else\n {\n //if beaker is full resets value and y coordinate\n y = 610; \n value = 0;\n }\n \n }", "public void actionPerformed( ActionEvent actionEvent )\n{\n if ( firstRoll ) { \n sumOfDice = rollDice(); // roll dice \n wonMoney.setText(\"\"+money);\n switch ( sumOfDice ) {\n\n // win on first roll\n case 7: case 11: \n gameStatus = WON;\n money=money+40;\n wonMoney.setText(\"\"+money);\n pointField.setText( \"\" );\n // clear point field\n break;\n\n // lose on first roll\n case 2: case 3: case 12: \n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n // clear point field\n break;\n\n // remember point\n default: \n gameStatus = CONTINUE;\n myPoint = sumOfDice;\n pointField.setText( Integer.toString( myPoint ) );\n money=money-20;\n if(money<0)\n {\tmoney=0;\n \t wonMoney.setText(\"\"+money);\n \t rollButton.setEnabled(false);\n \t }\n else wonMoney.setText(\"\"+money);\n firstRoll = false;\n break;\n\n } // end switch structure\n\n } // end if structure body\n\n\n // subsequent roll of dice\n else {\n sumOfDice = rollDice(); // roll dice\n \n // determine game status\n if ( sumOfDice == myPoint ){ // win by making point\n gameStatus = WON;\n money=money+60;\n wonMoney.setText(\"\"+money);\n }\n else if(sumOfDice == 7){\n // lose by rolling 7\n gameStatus = LOST;\n money=0;\n pointField.setText( \"\" );\n wonMoney.setText(\"\"+money);\n rollButton.setEnabled(false);\n \n \n }\n \n money=money-20;\n wonMoney.setText(\"\"+money);\n if(money==0){\n\t gameStatus = LOST;\n\t rollButton.setEnabled(false);\n }\n if(money<0)\n {\tmoney=0;\n \twonMoney.setText(\"\"+money);\n \t\n \t rollButton.setEnabled(false);\n \t }\n \n \n }\n // display message indicating game status\n displayMessage();\n\n}", "public static void main(String[] args) {\n int x = 10;\r\n \r\n System.out.println(Math.pow(x, 3)); //1000\r\n System.out.println(Math.sqrt(x)); //square root 10\r\n double y = 8.9876;\r\n System.out.println(Math.round(y)); //rounds to nearest (9)\r\n System.out.println(Math.max(x, y)); //10 also min\r\n \r\n int roll = (int)(Math.random() * 6 + 1); //from 1 to 6\r\n //Math.random() * range + start number\r\n //ex --> 30 and 50 (int)(Math.random() * 21 + 30);\r\n System.out.println(roll);\r\n // System.out.println((int)(Math.random() * 10 + 20));\r\n \r\n System.out.println(\"\\n\\nSHORTCUTS\\n============\");\r\n \r\n int a = 10;\r\n a += 10; //a - 20\r\n System.out.println(\"a is \" + a);\r\n int b = a;\r\n b++; //21\r\n System.out.println(\"b is \" + b);\r\n a *= 2; //a = a * 2\r\n System.out.println(\"a is \" + a); //40\r\n int c = b++; //c = 21, b = 22\r\n System.out.format(\"c = %d and b = %d\", c, b);\r\n int d = ++b; //d = 23, b = 23\r\n System.out.format(\"d = %d and b = %d\\n\", d, b);\r\n \r\n \r\n }", "public int heroAttack(int i) {\n switch (i) {\n case 1:\n return rand.nextInt(2) + 1;\n case 2:\n return rand.nextInt(2) + 2;\n case 3:\n return rand.nextInt(2) + 3;\n case 4:\n return rand.nextInt(4) + 4;\n default:\n return 0;\n }\n }", "private int random_dragao_fire(Dragao dragao) {\n\t\tint spit = (int)(1 + Math.random()*5);\t\t\n\t\tif (spit == 1) {\n\t\t\tint spitX = (int)(1 + Math.random()*2);\n\t\t\tspitX--;\t\t\t\n\t\t\tint spitY = 0;\n\t\t\tif (spitX != 0) {\n\t\t\t\tspitY = (int)(1 + Math.random()*2);\n\t\t\t\tspitY--;\n\t\t\t}\t\t\t\n\t\t\treturn spit_fire (spitX, spitY, dragao);\n\t\t}\n\t\treturn 0;\n\t}", "public void actionPerformed(ActionEvent arg0) \n\t\t\t{\n\t\t\t\tif (btnPlay.getText().equals(\"Come-out Roll\"))\n\t\t\t\t{\n\t\t\t\t\t// roll dice\n\t\t\t\t\td1.roll();\n\t\t\t\t\td2.roll();\n\t\t\t\t\ttotalRolls++;\n\t\t\t\t\t\n\t\t\t\t\t// assign dice numbers to variables\n\t\t\t\t\tint num1 = d1.getValue();\n\t\t\t\t\tint num2 = d2.getValue();\n\t\t\t\t\t\n\t\t\t\t\t// put dice numbers in text boxes\n\t\t\t\t\ttxtDie1.setText(Integer.toString(num1));\n\t\t\t\t\ttxtDie2.setText(Integer.toString(num2));\n\t\t\t\t\t\n\t\t\t\t\t//initially set the point value box and label invisible\n\t\t\t\t\ttxtPointValue.setVisible(false);\n\t\t\t\t\tlblPointValue.setVisible(false);\n\t\t\t\t\t\n\t\t\t\t\t// if roll equals 2, 3, or 12.....Lose and reset\n\t\t\t\t\tif (num1 + num2 == 2 || num1 + num2 == 3 || num1 + num2 == 12)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Loser!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t// if roll equals 7 or 11...Win and reset\n\t\t\t\t\telse if (num1 + num2 == 7 || num1 + num2 == 11)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Winner!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\ttotalWins++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t//If neither win nor lose on first roll.....assign point value to text box and move on\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tbtnPlay.setText(\"Point Roll\");\n\t\t\t\t\t\tlblMessage.setText(\"Game in Progress...\");\n\t\t\t\t\t\tpointValue = num1 + num2;\n\t\t\t\t\t\ttxtPointValue.setVisible(true);\n\t\t\t\t\t\tlblPointValue.setVisible(true);\n\t\t\t\t\t\ttxtPointValue.setText(Integer.toString(pointValue));\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if button label equals point roll\n\t\t\t\telse if (btnPlay.getText().equals(\"Point Roll\"))\n\t\t\t\t{\n\t\t\t\t\t// roll dice again\n\t\t\t\t\td1.roll();\n\t\t\t\t\td2.roll();\n\t\t\t\t\ttotalRolls++;\n\t\t\t\t\t\n\t\t\t\t\t//re-assign numbers\n\t\t\t\t\tint num1 = d1.getValue();\n\t\t\t\t\tint num2 = d2.getValue();\n\t\t\t\t\t\n\t\t\t\t\t//put new numbers in text box\n\t\t\t\t\ttxtDie1.setText(Integer.toString(num1));\n\t\t\t\t\ttxtDie2.setText(Integer.toString(num2));\n\t\t\t\t\t\n\t\t\t\t\t// if dice numbers equal point value......Win and reset\n\t\t\t\t\tif (num1 + num2 == pointValue)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Winner!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\ttotalWins++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if dice numbers equal 7......Lose and reset\n\t\t\t\t\telse if (num1 + num2 == 7)\n\t\t\t\t\t{\n\t\t\t\t\t\tlblMessage.setText(name + \" is a Loser!\");\n\t\t\t\t\t\ttotalGames++;\n\t\t\t\t\t\tbtnPlay.setEnabled(false);\n\t\t\t\t\t\tbtnPlayAgain.setEnabled(true);\n\t\t\t\t\t\tbtnPlayAgain.setVisible(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void act() \n {\n // Add your action code here.\n contaP++;\n if(contaP == 25)\n {\n baja();\n contaP=0;\n }\n }", "public int doLogic() {\n dx = -dx;\n y += 10;\n\n // if we've reached the bottom of the screen then the player\n // dies\n if (y > 570) {\n return SpaceInvaderActionEnum.NOTIFY_DEATH;\n }\n return SpaceInvaderActionEnum.LOGIC_DONE;\n }", "public void adjLocation(double l){this.PlayerLocation;}", "public int rollResult(){\r\n return rand.nextInt(6) + 1;\r\n }", "void takeDamage(HeroDamage enemy1, HeroDamage enemy2);", "@Test\n\tpublic void testA() {\n\t\tActorWorld world = new ActorWorld();\n\t\t// alice: the rock condition\n\t\tworld.add(new Location(3, 1), alice);\n\t\tworld.add(new Location(1, 1), new Rock());\t\n\t\tint olddir = alice.getDirection();\n\t\talice.act();\n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\n\t\t// bob: the flower condition\n\t\tworld.add(new Location(6, 1), bob);\n\t\tworld.add(new Location(4, 1), new Flower());\n\t\tbob.act();\n\t\tassertEquals(new Location(4, 1), bob.getLocation());\n\t}", "@Override\n\tpublic void DoGoToSeat(int x, int y) {\n\t\t\n\t}", "String computeNextLawnPosition();", "void robPlayer(HexLocation location, int victimIndex);", "public int move () {\n intMoveState = 0;\r\n int pixel1;\r\n int pixel2;\r\n \r\n if (blnUp) {\r\n pixel1 = getPixelRGB (X - 25, Y + 10, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 10, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y -= intSpeed;\r\n intMoveState -= 1;\r\n }\r\n }\r\n if (blnDown) {\r\n pixel1 = getPixelRGB (X - 25, Y + 46, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 46, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y += intSpeed;\r\n intMoveState += 1;\r\n }\r\n }\r\n if (blnLeft) {\r\n pixel1 = getPixelRGB (X - 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X - 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X -= intSpeed;\r\n intMoveState -= 2;\r\n }\r\n }\r\n if (blnRight) {\r\n pixel1 = getPixelRGB (X + 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X + 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X += intSpeed;\r\n intMoveState += 2;\r\n }\r\n }\r\n \r\n try {\r\n dblAngle = Math.atan2((MouseY - Y),(MouseX - X));\r\n if (dblAngle < - Math.PI/4) {\r\n dblAngle = 2 * Math.PI + dblAngle;\r\n }\r\n }catch (ArithmeticException e) {\r\n if (MouseY < Y) {\r\n dblAngle = 3 * Math.PI/2;\r\n }else {\r\n dblAngle = Math.PI/2;\r\n }\r\n }\r\n degreesAngle = (int) (Math.toDegrees(dblAngle)); \r\n \r\n if(intHealth < 0 && !UserInterface.deathScreenVisible){\r\n UserInterface.deathScreenVisible = true;\r\n deathTime = System.nanoTime();\r\n ClientMain.ssm.sendText(\"player,\" + ClientMain.intPlayerNumber + \",iamdeadlol\");\r\n }\r\n \r\n return getPixelRGB (X, Y + 46, \"g\");\r\n }", "public int resta(){\r\n return x-y;\r\n }", "public boolean whatNow (String action, player friday, player you){ // Method which will allow the ia to choose his action\n\t\tString testAction = \"Tank\"; // Create a String we will use a lot to test other string\n\t\tint actionIa; // If the ia is a Tank, forbid him to use his special attack. The purpose is to prevent him from useless turns\n\t\tif (friday.getName().equals(testAction)){ // If the name of the ia's class is Tank\n\t\t\t actionIa = (int)(Math.random() * 2); // His random will be between 0 or 1\n\t\t}\n\t\t\n\t\telse {\n\t\t\t actionIa = (int)(Math.random() * 3); // Else, his random will be between 0, 1 and 2\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Will be use to test if you attacked\n\t\t\n\t\t\n\t\tswitch (actionIa){ // Test ia's action\n\t\t\tcase 0: // 0, the enemy attack\n\t\t\t\tfriday.setSprite(\"attack\");\n\t\t\t\tSystem.out.println(\"The enemy attack\\n\"); // Warns the user\n\t\t\t\ttestAction = \"block\"; // Will be use to test if you block\n\t\t\t\tif (action.equals(testAction)){ // If you block\n\t\t\t\t\tSystem.out.println(\"You blocked the enemy's attack.\"); // Warns the user\n\t\t\t\t\tyou.setHp(you.getHp() - you.getDp()); // You loose as much hp as your dp\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tyou.setHp(you.getHp() - friday.getAp()); // Else, you loose as much hp as your enemy's ap\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 1: // 1, the enemy block\n\t\t\t\tfriday.setSprite(\"block\");\n\t\t\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\t\t\tfriday.setHp(friday.getHp() - friday.getDp()); // The enemy loose as much hp as his dp\n\t\t\t\t\taction = \"\"; // Prevent you from attack a second time\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"The enemy blocked your attack\\n\"); // Warns the user\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 2: // 2, the enemy use his special power if he isn't a tank\n\t\t\t\tfriday.setSprite(\"special\");\n\t\t\t\tSystem.out.println(\"The enemy uses his special power.\"); // Warns the user\n\t\t\t\tfriday.special(); // Execute ia's special attack\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n\t\ttestAction = \"attack\"; // Reset testAction\n\t\t\n\t\tif (action.equals(testAction)){ // If you attacked\n\t\t\tfriday.setHp(friday.getHp() - you.getAp()); // The enemy loose as much hp as your ap\n\t\t} // Nota Bene : if the enemy blocked your attack, this won't be executed because 'action = \"\";'\n\t\t\n\t\tSystem.out.println(\"You have \" + you.getHp() + \" HP left.\"); // Warns the user\n\t\tSystem.out.println(\"The ennemy have \" + friday.getHp() + \" HP left.\\n\"); // Warns the user\n\t\t\n\t\tif(you.getHp() <= 0){ // If you or the ia has no hp left, warn the system that the fight is over by setting 'end' on true and tell who died\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You died!\");\n\t\t\tyou.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse if(friday.getHp() <= 0){\n\t\t\tend = true;\n\t\t\tSystem.out.println(\"You killed the ennemy!\");\n\t\t\tfriday.setSprite(\"dead\");\n\t\t}\n\t\t\n\t\telse { // Else, it just asks you what you want to do\n\t\t\tSystem.out.println(\"What do you want to do, attack, block or use your special power ?\"); // Asks what you want to do\n\t\t}\n\t\treturn end;\n\t}", "public void randomHit() throws LocationHitException{\r\n\t\t// Random ran = new Random();\r\n\t\tint x = randomX();\r\n\t\tint y = randomY();\r\n\r\n\t\tboolean newHit = false;\r\n\t\twhile (!newHit) {\r\n\t\t\tif (Player.userGrid[x][y] == 2) {\r\n\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t} else\r\n\t\t\t\tnewHit = true;\r\n\t\t}\r\n\t\tint hitCoord[] = { x, y };\r\n\t\tsetCoords(hitCoord);\r\n\t\tString coordx = Integer.toString(x);\r\n\t\tString coordy = Integer.toString(y);\r\n\t\tif (Player.userGrid[x][y] == 1) {\r\n\t\t\t// change the grid value from 1 to 2 to signify hit\r\n\t\t\tPlayer.userGrid[x][y] = 2;\r\n\t\t\t\r\n\t\t\tif(!time1) {\r\n\t\t\t\ttimea=java.lang.System.currentTimeMillis();\r\n\t\t\t\ttime1=!time1;\r\n\t\t\t}else if(!time2) {\r\n\t\t\t\ttimeb=java.lang.System.currentTimeMillis();\r\n\t\t\t\t\ttime2=!time2;\r\n\t\t\t}else {\r\n\t\t\t\tdouble t=timeb-timea;\r\n\t\t\t\tif(t<3000) {\r\n\t\t\t\t\tsetScore(20);\r\n\t\t\t\t}\r\n\t\t\t\ttime1=false;\r\n\t\t\t\ttime2=false;\r\n\t\t\t\ttimea=0;\r\n\t\t\t\ttimeb=0;\r\n\t\t\t\t\r\n\t\t\t}//if time between consecutive hit is less than 3 seconds ,then bonus score\r\n\t\t\tsetScore(10);\r\n\t\t\tPlayer.coordinatesHit.add(coordx + \",\" + coordy);\r\n\t\t\tsetReply(\"It's a Hit!!!!!\");\r\n\r\n\t\t} else if (Player.userGrid[x][y] == 0) {\r\n\t\t\tPlayer.userGrid[x][y] = 3;\r\n\t\t\tsetScore(-1);\r\n\t\t\tsetReply(\"It's a miss!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\tsetReply(\"The location has been hit earlier\");\r\n\t\t\t //throw new LocationHitException(\"The location has been hit earlier\");\r\n\t\t}\r\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 }", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tif(e.getX()>46&&e.getX()<151){\n\t\t\tif(e.getY()<362&&e.getY()>321){\n\t\t\t\trunner.exitAction();\n\t\t\t\tSystem.out.println(\"dsd\");\n\t\t\t}\n\t\t\telse if(e.getY()<311&&e.getY()>270){\n\t\t\t\trunner.meanStartyAction();\n\t\t\t\tSystem.out.println(\"dssd\");\n\t\t\t}\n\t\t\telse if(e.getY()>219&&e.getY()<260){\n\t\t\t\trunner.meanOrderAction();\n\t\t\t\tSystem.out.println(\"dsssd\");\n\t\t\t}\n\t\t\telse if(e.getY()>168&&e.getY()<209){\n\t\t\t\trunner.meanInfoAction();\n\t\t\t\tSystem.out.println(\"dsdd\");\n\t\t\t}\n\t\t\telse if(e.getY()<158&&e.getY()>58){\n\t\t\t\trunner.showWelcome();\n\t\t\t\tSystem.out.println(\"d欢迎\");\n\t\t\t}\n\t\t}\n\t\telse if(e.getX()>580&&e.getX()<615&&e.getY()>70&&e.getY()<105){\n\t\t\trunner.getQuickHotel(hotelFrame.name.getText());\n\t\t}\n\t\telse if(e.getX()>190&&e.getX()<366&&e.getY()>125&&e.getY()<285){\n\t\t\trunner.getQuickHotel(\"北京\");\n\t\t}\n\t\telse if(e.getX()>375&&e.getX()<645&&e.getY()>125&&e.getY()<285){\n\t\t\trunner.getQuickHotel(\"南京\");\n\t\t}\n\t\telse if(e.getX()>190&&e.getX()<460&&e.getY()>290&&e.getY()<450){\n\t\t\trunner.getQuickHotel(\"香港\");\n\t\t}\n\t\telse if(e.getX()>465&&e.getX()<735&&e.getY()>290&&e.getY()<450){\n\t\t\trunner.getQuickHotel(\"上海\");\n\t\t}\n\t}", "public void changeLocation(int newLocation) {\t\t\t\t\t\t\t\t\t\t\t\t// Methode zum Raum wechseln. Übergeben wird der neue Standort\n\t\tif(!battle && !death) {\n\t\t\tboolean positionChange = false;\n\t\t\tthis.lockerQuestion = false;\t\t\t \t\t\t\t\t\t\t\t\t\t\t// Abbruch des Minievents\n\t\t\t\n\t\t\tswitch (newLocation) {\n\n\t\t\t// Büro\n\t\t\tcase 0:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 0 || beam) {\n\t\t\t\t\tif (currentLocation == 0) { Tuna.setMessage(\"Du bist schon in deinem Büro!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Location setzen\n\t\t\t\t\t\tthis.currentLocation = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in dein Büro.\");\t\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Korridor\n\t\t\tcase 1:\n\t\t\t\tif (currentLocation == 0 || currentLocation == 1 || currentLocation == 2 || currentLocation == 3 || currentLocation == 6 || currentLocation == 7 || currentLocation == 8\n\t\t\t\t\t\t|| currentLocation == 9 || currentLocation == 10 || beam) {\n\t\t\t\t\tif (currentLocation == 1) { Tuna.setMessage(\"Du bist schon im Korridor!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Korridor.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Tödlicher Kaffeeraum\n\t\t\tcase 2:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 2 || currentLocation == 3 || currentLocation == 4 || beam) {\n\t\t\t\t\tif (currentLocation == 2) { Tuna.setMessage(\"Du bist schon im Kafferaum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 2;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Kaffeeraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Konferenzraum\n\t\t\tcase 3:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 2 || currentLocation == 3 || currentLocation == 4 || currentLocation == 5 || beam) {\n\t\t\t\t\tif (currentLocation == 3) { Tuna.setMessage(\"Du bist schon im Konferenzraum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 3;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Konferenzraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Kammer der Leere\n\t\t\tcase 4:\n\t\t\t\tif (location[4].isVisible()) {\n\t\t\t\t\tif (currentLocation == 2 || currentLocation == 4 || beam) {\n\t\t\t\t\t\tif (currentLocation == 4) { Tuna.setMessage(\"Du bist schon in der Kammer der Leere!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 4;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTuna.setText(\"Du gehst in die Kammer der Leere.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbeep();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Ventilationsraum\n\t\t\tcase 5:\n\t\t\t\tif (location[5].isVisible()) {\n\t\t\t\t\tif (currentLocation == 3 || currentLocation == 5 || beam) {\n\t\t\t\t\t\tif (currentLocation == 5) { Tuna.setMessage(\"Du bist schon im Ventilationsraum!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 5;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTuna.setText(\"Du gehst in den Ventilationsraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbeep();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Damen Toiletten\n\t\t\tcase 6:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 6 || beam) {\n\t\t\t\t\tif (currentLocation == 6) { Tuna.setMessage(\"Du bist schon in der Damentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 6;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Damentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\tlocation[6].getDescriptions().setDefaultDescription(\"Dies ist die Damentoilette.\"\n\t\t\t\t\t\t\t\t+ \"\\nDu fragst dich, ob du einen bestimmten Grund hast, hier zu sein, oder einfach die Tür verwechselt hast.\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Herren Toiletten\n\t\t\tcase 7:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 7 || beam) {\n\t\t\t\t\tif (currentLocation == 7) { Tuna.setMessage(\"Du bist schon in der Herrentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 7;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Herrentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Schulleiterzimmer\n\t\t\tcase 8:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 8 || beam) {\n\t\t\t\t\tif (currentLocation == 8) { Tuna.setMessage(\"Du bist schon im Schulleiterzimmer!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 8;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in das Schulleiterzimmer.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Fahrstuhl\n\t\t\tcase 9:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 9 || beam) {\n\t\t\t\t\tif (currentLocation == 9) { Tuna.setMessage(\"Du bist schon im Fahrstuhl!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 9;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Fahrstuhl.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Treppenhaus\n\t\t\tcase 10:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 10 || currentLocation == 11 || beam) {\n\t\t\t\t\tif (currentLocation == 10) { Tuna.setMessage(\"Du bist schon im Treppenhaus!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 10;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in das Treppenhaus.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Korridor Etage 1\n\t\t\tcase 11:\n\t\t\t\tif (location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 10 || currentLocation == 11 || currentLocation == 12 || currentLocation == 13 || currentLocation == 14 || currentLocation == 15 || currentLocation == 16 || currentLocation == 17 || currentLocation == 18 || currentLocation == 19 || beam) {\n\t\t\t\t\t\tif (currentLocation == 11) { Tuna.setMessage(\"Du bist schon im Korridor der 1 Etage!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 11;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTuna.setText(\"Du gehst in den Korridor.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setText(\"Du bist am Feuer gestorben. Kaffee wäre spannender gewesen!\"\n\t\t\t\t\t\t\t+ \"\\n\\n\\n<respawn>, um von vorne anzufangen!\");\n\t\t\t\t\tdeath = true;\n\t\t\t\t\tif (amountNotes != 0) {\n\t\t\t\t\t\tTuna.addText(\"\\n\\nDa du bereits Notizen eingesammelt hast, die jetzt verbrannt sind, solltest du das Spiel neu starten [restart].\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 1\n\t\t\tcase 12:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 12 || beam) && location[11].isVisible()) { // Wichtig, dass man bei vorhanden sein des Feuers sich nicht schon in die untere Etage beamen kann, auch für die nächsten Fälle\n\t\t\t\t\tif (currentLocation == 12) { Tuna.setMessage(\"Du bist schon in Hörsaal 1!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 12;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 1\");\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\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Spindraum\n\t\t\tcase 13:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 13 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 13) { Tuna.setMessage(\"Du bist schon im Spindraum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 13;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Spindraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Abstellraum\n\t\t\tcase 14:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 14 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 14) { Tuna.setMessage(\"Du bist schon im Abstellraum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 14;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Abstellraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 2\n\t\t\tcase 15:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 15 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 15) { Tuna.setMessage(\"Du bist schon in Hörsaal 2!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 15;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 2\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 3\n\t\t\tcase 16:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 16 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 16) { Tuna.setMessage(\"Du bist schon in Hörsaal 3!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 16;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 3\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 4\n\t\t\tcase 17:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 17 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 17) { Tuna.setMessage(\"Du bist schon in Hörsaal 4!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 17;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 4\");\n\t\t\t\t\t}\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Damentoilette Etage 1\n\t\t\tcase 18:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 18 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 18) { Tuna.setMessage(\"Du bist schon in der Damentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 18;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Damentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t \n\t\t\t// Herrentoilette Etage 1\n\t\t\tcase 19:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 19 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 19) { Tuna.setMessage(\"Du bist schon in der Herrentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 19;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Herrentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Fahrstuhlschacht\n\t\t\tcase 20:\n\t\t\t\tif (location[20].isVisible()) {\n\t\t\t\t\tif (currentLocation == 9 || currentLocation == 20 || beam) {\n\t\t\t\t\t\tif (currentLocation == 20) { Tuna.setMessage(\"Du bist schon im Fahrstuhlschacht!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 20;\n\t\t\t\t\t\t\tTuna.setText(\"Du kletterst den Gullideckel runter, obwohl, eigentlich fällst du eher. Du kriegst es auch irgendwie hin, den Gullideckel über dir wieder zuzuschieben.\");\n\t\t\t\t\t\t\tlocation[20].setVisible(false);\t\t\t\t\t// Der Raum soll nicht wieder begehbar sein\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbeep();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// Wenn der Positionswechsel auf wahr (also möglich) gesetzt wurde soll folgendes gemacht\n\t\t\tif (positionChange) {\n\t\t\t\t// Ausgänge setzen\n\t\t\t\tTuna.setExitsContent(location[newLocation].getExits());\n\t\t\t\t\n\t\t\t\t// Beschreibungen\n\t\t\t\tif (!battle) {\n\t\t\t\t\tif (location[currentLocation].isExplored()) {\n\t\t\t\t\t\tTuna.addText(location[currentLocation].getDescriptions().getAlreadyExploredDescription());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.addText(location[currentLocation].getDescriptions().getDefaultDescription());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t} else if (battle) {\n\t\t\tTuna.setMessage(\"Du befindest dich im Kampf!\");\n\t\t} else if (death) {\n\t\t\tTuna.setMessage(\"Du bist tot!\");\n\t\t}\n\t}", "public void chooseWhichDieToRoll(ActionEvent e){\n \tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getTotDiceTossLeft() !=3){\n\t\t\tJButton btnDie = (JButton)e.getSource();\n\t\t\tint index = Integer.parseInt(btnDie.getName());\n \t\n\t\t\t//Change Icon on die depending on user interaction \n\t \tswitch(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getDieNumber(index)){\n\t\t\t\tcase 1:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][6]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][0]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][7]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][1]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][8]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][2]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][9]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][3]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][10]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][4]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tif(player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][11]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().keepDice(index);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(!player.get(currentPlayerIndex).getPlayerYatzyProtocol().getKeepDice(index)){\n\t\t\t\t\t\tbtnDie.setIcon(selectedDieIcon[typeOfDiceIndex][5]);\n\t\t\t\t\t\tplayer.get(currentPlayerIndex).getPlayerYatzyProtocol().releaseDice(index);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t \t}\n \t}\n }", "public int performAction()\n {\n if(stunCountdown > 0) \n {\n ERROR_LOG.writeToLog(\"The saboteur is not supposed to call performAction() while stuunned. Remaining time stunned: \" + stunCountdown + '.');\n \n chasingPlayer = false;\n return stunCountdown;\n }\n \n if(chasingPlayer)\n {\n setRoom(Game.getInstance().getPlayer().getCurrentRoom());\n }\n else\n {\n if(((getCurrentRoom().isOperating() && getCurrentRoom() instanceof ItemRoom) || Game.getInstance().getGameInfo().getHackedExit() == null) && Math.random() < chanceOfSabotage)\n {\n if(!getCurrentRoom().isOperating() || !(getCurrentRoom() instanceof ItemRoom))\n {\n int sabotageExit = (int) Math.floor(Math.random() * getCurrentRoom().getCollectionOfExits().size());\n getCurrentRoom().getCollectionOfExits().get(sabotageExit).setOperating(false);\n Game.getInstance().getGameInfo().setHackedExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit));\n ACTION_LOG.writeToLog(\"Sabotaged the exit between \\\"the \" + getCurrentRoom().getName() + \"\\\" and \\\"the \" + getCurrentRoom().getExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit)).getName() + \"\\\".\");\n }\n else if(Game.getInstance().getGameInfo().getHackedExit() != null)\n {\n getCurrentRoom().setOperating(false);\n ACTION_LOG.writeToLog(\"Sabotaged the room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n }\n else if(Math.random() < CHANCE_OF_DOOR_SABOTAGE)\n {\n int sabotageExit = (int) Math.floor(Math.random() * getCurrentRoom().getCollectionOfExits().size());\n getCurrentRoom().getCollectionOfExits().get(sabotageExit).setOperating(false);\n Game.getInstance().getGameInfo().setHackedExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit));\n ACTION_LOG.writeToLog(\"Sabotaged the exit between \\\"the \" + getCurrentRoom().getName() + \"\\\" and \\\"the \" + getCurrentRoom().getExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit)).getName() + \"\\\".\");\n }\n else\n {\n getCurrentRoom().setOperating(false);\n ACTION_LOG.writeToLog(\"Sabotaged the room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n }\n \n chanceOfSabotage = DEFAULT_CHANCE_OF_SABOTAGE;\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n \n for(int i = neighbors.size() - 1; i >= 0; i--)\n if(getCurrentRoom().getExit(neighbors.get(i)).isControlRoom() || !neighbors.get(i).isOperating())\n neighbors.remove(i);\n \n if (neighbors.isEmpty())\n {\n ACTION_LOG.writeToLog(\"Saboteur tried to move, but all exits where removed. Current room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n return -1;\n }\n \n int exitIndex = (int) (Math.floor(Math.random() * neighbors.size()));\n \n setRoom(getCurrentRoom().getExit(neighbors.get(exitIndex)));\n \n chanceOfSabotage += CHANCE_OF_SABOTAGE_GROWTH;\n \n //ACTION_LOG.writeToLog(\"Moved to \\\"the \" + getCurrentRoom().getName() + \"\\\".\");\n \n checkChasingPlayer();\n }\n }\n \n return(5 + (int) Math.floor(Math.random() * 6));\n }", "public static int [] moveDecision (Species [][] map, int x , int y, int plantHealth) {\n \n // Directions: Up = 1, Down = 2, Left = 3, Right = 4\n // Last choice is random movement\n // Animals: sheep = 0, wolves = 1\n int [] directionChoice = new int [] {1 + (int)(Math.random() * 4), 1 + (int)(Math.random() * 4)};\n \n // Find any animals\n if ((map[y][x] != null) && (!(map[y][x] instanceof Plant))) {\n \n // Sheep decisions (sheep cannot decide whether or not to move away from wolves)\n if (map[y][x] instanceof Sheep) {\n \n // First choice is to eat\n if ((y > 0) && (map[y-1][x] instanceof Plant)) {\n directionChoice[0] = 1;\n } else if ((y < map[0].length - 2) && (map[y+1][x] instanceof Plant)) {\n directionChoice[0] = 2;\n } else if ((x > 0) &&(map[y][x-1] instanceof Plant)) {\n directionChoice[0] = 3;\n } else if ((x < map.length - 2) && (map[y][x+1] instanceof Plant)) {\n directionChoice[0] = 4;\n \n // Wolf decisions\n } else if (map[y][x] instanceof Wolf) {\n \n // First choice is to eat\n if ((y > 0) && (map[y-1][x] instanceof Sheep)) {\n directionChoice[1] = 1;\n } else if ((y < map[0].length - 2) && (map[y+1][x] instanceof Sheep)) {\n directionChoice[1] = 2;\n } else if ((x > 0) && (map[y][x-1] instanceof Sheep)) {\n directionChoice[1] = 3;\n } else if ((x < map.length - 2) && (map[y][x+1] instanceof Sheep)) {\n directionChoice[1] = 4;\n \n // Second choice is to fight a weaker wolf\n } else if ((y > 0) && (map[y-1][x] instanceof Wolf)) {\n directionChoice[1] = 1;\n } else if ((y < map[0].length - 2) && (map[y+1][x] instanceof Wolf)) {\n directionChoice[1] = 2;\n } else if ((x > 0) && (map[y][x-1] instanceof Wolf)) {\n directionChoice[1] = 3;\n } else if ((x < map.length - 2) && (map[y][x+1] instanceof Wolf)) {\n directionChoice[1] = 4;\n }\n }\n \n }\n }\n return directionChoice; // Return choice to allow animals to move\n }", "public abstract void interact (Player p, int interactAmount);", "public String play() \r\n { \r\n \r\n theDiceTotal = dice.roll();\r\n \r\n while ( theDiceTotal != 12 )\r\n { \r\n theDiceTotal = dice.roll();\r\n System.out.println( dice.getDie1FaceValue() + \" \" + dice.getDie2FaceValue() );\r\n count++;\r\n }\r\n \r\n return ( count - 1 ) + \" dice rolled.\"; \r\n }", "@Override\n // The actionCharValue in the XML definition of the action will be ‘a’ if it affects the armor being worn\n // and a ‘w’ if it affects the sword, or weapon being worn.\n // If the item to be affected is not being worn or wielded, the scroll has no effect.\n \n // Print a message to the bottom message area indicating that the scroll was blessed or cursed.\n // I print the message: \n // --- scroll of cursing does nothing because \" + name + \" not being used ---(when the object is not worn or wielded)\n // and --- name + \" cursed! \" + intValue + \" taken from its effectiveness ---\n // where name is the name of the item.\n public void run(){\n String message = \"\";\n // This action is associated with scroll.\n \n // It reduces the effectiveness of a sword or armor that is being WORN or WIELDED.\n // AFFECTS THE ITEMINTVALUE. reduces it by the scroll's ACTIONINTVALUE\n // ok but does this update the pack?? i think so \n if (actionCharValue == 'w') { // hits SWORDS (wield)\n if ( player.getSword() != null ){ // if player HAS a sword, and the scroll HITS swords\n message += \"Sword has been cursed! \" + actionIntValue + \" taken from its effectiveness\";\n int currentValue = player.getSword().getItemIntValue();\n player.getSword().setItemIntValue(currentValue + actionIntValue);\n }\n else{ // if player does NOT a sword, and the scroll HITS swords\n message += \"Scroll of cursing does nothing because no Sword is wielded\";\n }\n displayGrid.displayInfo(message);\n }\n\n else if (actionCharValue == 'a'){ // hits ARMOR\n if ( player.getArmor() != null ){ // if player HAS armor, and the scroll HITS armor\n message += \"Armor has been cursed! \" + actionIntValue + \" taken from its effectiveness\";\n int currentValue = player.getArmor().getItemIntValue();\n player.getArmor().setItemIntValue(currentValue + actionIntValue);\n }\n else { \n message += \"Scroll of cursing does nothing because no Armor is worn\";\n } \n displayGrid.displayInfo(message);\n }\n\n else {\n System.out.println(\"Don't regnize the BlessCursed's actionCharValue. not a 'w or 'a' \");\n }\n }", "public void movePeice(MouseEvent e) {\r\n\r\n\t\tint[] id = gameBoard.coordinateToID(e.getX(), e.getY());\r\n\t\t\r\n\t\tSystem.out.println(\"isOppNear: \" + gameBoard.isOpponentNear(id, 1));\r\n\t\t\r\n\t\tif (gameBoard.isIdTurn(id)) {\r\n\t\t\tgameBoard.setFocusedLocation(id);\r\n\r\n\t\t\tArrayList<int[]> jumpingPos = gameBoard.getPositions(true);\r\n\t\t\tif (!jumpingPos.isEmpty()) {\r\n\r\n\t\t\t\t// check if current mouse click id has jumping move if it\r\n\t\t\t\t// doesn't show an warning\r\n\t\t\t\tif (gameBoard.getPossibleMoves(id, true).isEmpty()) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(gameView, \"Must Jump Your Opponent\", \"Must Jump!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\t// set focus moves to only jumping moves\r\n\t\t\t\tgameBoard.setMovesOnFocus(gameBoard.getPossibleMoves(id, true));\r\n\t\t\t} else {\r\n\t\t\t\t// normal move - if there is no possible jumping move\r\n\t\t\t\tgameBoard.setMovesOnFocus(gameBoard.getPossibleMoves(id, false));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!gameBoard.getMovesOnFocus().isEmpty()) {\r\n\r\n\t\t\tfor (int[] ID : gameBoard.getMovesOnFocus()) {\r\n\r\n\t\t\t\tif (id[0] == ID[0] && id[1] == ID[1]) {\r\n\t\t\t\t\tsetProperDuration();\r\n\t\t\t\t\ttimer.setStart();\r\n\t\t\t\t\tgameBoard.movePiece(gameBoard.getFocusedLocation(), ID);\r\n\r\n\t\t\t\t\t// check if next if there are jumping moves\r\n\t\t\t\t\t// if so set the timer duration to 1 min\r\n\t\t\t\t\t// gameBoard.removeMovesOnFocus();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// TODO: add logic to restart, etc...\r\n\t\tif (gameBoard.getBlackScore() == 12) {\r\n\t\t\tpopUpWin(\"Black!\");\r\n\t\t} else if (gameBoard.getRedScore() == 12) {\r\n\t\t\tpopUpWin(\"Red!\");\r\n\t\t}\r\n\t}", "@Override\n public void doAction() {\n String move = agent.getBestMove(currentPosition);\n execute(move);\n\n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n\n if (w.hasWumpus(cX, cY)) {\n System.out.println(\"Wampus is here\");\n w.doAction(World.A_SHOOT);\n } else if (w.hasGlitter(cX, cY)) {\n System.out.println(\"Agent won\");\n w.doAction(World.A_GRAB);\n } else if (w.hasPit(cX, cY)) {\n System.out.println(\"Fell in the pit\");\n }\n\n// //Basic action:\n// //Grab Gold if we can.\n// if (w.hasGlitter(cX, cY)) {\n// w.doAction(World.A_GRAB);\n// return;\n// }\n//\n// //Basic action:\n// //We are in a pit. Climb up.\n// if (w.isInPit()) {\n// w.doAction(World.A_CLIMB);\n// return;\n// }\n//\n// //Test the environment\n// if (w.hasBreeze(cX, cY)) {\n// System.out.println(\"I am in a Breeze\");\n// }\n// if (w.hasStench(cX, cY)) {\n// System.out.println(\"I am in a Stench\");\n// }\n// if (w.hasPit(cX, cY)) {\n// System.out.println(\"I am in a Pit\");\n// }\n// if (w.getDirection() == World.DIR_RIGHT) {\n// System.out.println(\"I am facing Right\");\n// }\n// if (w.getDirection() == World.DIR_LEFT) {\n// System.out.println(\"I am facing Left\");\n// }\n// if (w.getDirection() == World.DIR_UP) {\n// System.out.println(\"I am facing Up\");\n// }\n// if (w.getDirection() == World.DIR_DOWN) {\n// System.out.println(\"I am facing Down\");\n// }\n//\n// //decide next move\n// rnd = decideRandomMove();\n// if (rnd == 0) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 1) {\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 2) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 3) {\n// w.doAction(World.A_TURN_RIGHT);\n// w.doAction(World.A_MOVE);\n// }\n }", "@Test\n\tpublic void testC() {\n\t\tActorWorld world = new ActorWorld();\n\t\tworld.add(new Location(0, 1), alice);\n\t\tint olddir = alice.getDirection();\n\t\talice.act();\n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\t}", "public void giveAndTake(Player a){\n\t\tString type = typetoString();\r\n\t\tint totalDice = a.getDice1() + a.getDice2(), purpleRent = owner.numPurple(), lightGreenRent = owner.numLightGreen(), violetRent = owner.numViolet(), orangeRent = owner.numOrange(), redRent = owner.numRed(), yellowRent = owner.numYellow(), darkGreenRent = owner.numDarkGreen(), darkBlueRent = owner.numDarkBlue(), utilitiesRent = owner.numUtilities(), railRent = owner.numRails(), modRent = 0;\r\n\t\tif(type.equals(\"PURPLE\")){\r\n\t\t\tif(purpleRent == 1){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(purpleRent == 2){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"LIGHTGREEN\")){\r\n\t\t\tif(lightGreenRent == 1 || lightGreenRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(lightGreenRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"VIOLET\")){\r\n\t\t\tif(violetRent == 1 || violetRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(violetRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"ORANGE\")){\r\n\t\t\tif(orangeRent == 1 || orangeRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(orangeRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"RED\")){\r\n\t\t\tif(redRent == 1 || redRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(redRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"YELLOW\")){\r\n\t\t\tif(yellowRent == 1 || yellowRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(yellowRent == 3){\r\n\t\t\t\t\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"DARKGREEN\")){\r\n\t\t\tif(darkGreenRent == 1 || darkGreenRent == 2){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(darkGreenRent == 3){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"DARKBLUE\")){\r\n\t\t\tif(darkBlueRent == 1){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(darkBlueRent == 2){\r\n\t\t\t\t\tmodRent = (rent * 2) + houseRent;\r\n\t\t\t\t\t\tif(numHouses == -1)\r\n\t\t\t\t\t\t\tmodRent = rent * 2;\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tmodRent = (houses[numHouses].getRent());\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"UTILITIES\")){\r\n\t\t\tif(utilitiesRent == 1){\r\n\t\t\t\tmodRent = 4 * totalDice;\r\n\t\t\t}else if(utilitiesRent == 2){\r\n\t\t\t\tmodRent = 10 * totalDice;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(type.equals(\"RAILROAD\")){\r\n\t\t\tif(railRent == 1){\r\n\t\t\t\tmodRent = rent;\r\n\t\t\t}else if(railRent == 2){\r\n\t\t\t\tmodRent = rent * 2;\r\n\t\t\t}else if(railRent == 3){\r\n\t\t\t\tmodRent = rent * 4;\r\n\t\t\t}else if(railRent == 4){\r\n\t\t\t\tmodRent = rent * 8;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(a.returnName()+\" has paid $\"+modRent+\" to \"+owner.returnName());\r\n\t\ta.subtractMoney(modRent);\r\n\t\towner.addMoney(modRent);\r\n\t}", "@Test\n\tpublic void testD() {\n\t\tActorWorld world = new ActorWorld();\n\n\t\tworld.add(new Location(6, 6), alice);\n\t\tworld.add(new Location(4, 6), new Actor());\n\t\tint olddir = alice.getDirection();\n\t\talice.act();\n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\n\t\tworld.add(new Location(2, 0), bob);\n\t\tworld.add(new Location(0, 0), new Jumper()); \n\t\tolddir = bob.getDirection();\n\t\tbob.act();\n\t\tassertEquals((olddir + Location.RIGHT) % 360, bob.getDirection());\t\n\t}", "public void setStartConditions() {\r\n\t\tplayer1.relocate(0, 0);\r\n\t\tgamemap.setPlayerLocation(1, 1);\r\n\t\tgamemap.setEnemyLocation(20, 10);\r\n\t\tenemy1.relocate(19*46, 9*85);\r\n\t\tportal1.relocate(9*46, 9*85);\r\n\t\tportal2.relocate(9*46, 0*85);\r\n\t\tspikes1.relocate(5*46,0*85);\r\n\t\tspikes2.relocate(5*46,1*85);\r\n\t\tspikes3.relocate(5*46,2*85);\r\n\t\tspikes4.relocate(5*46,7*85);\r\n\t\tspikes5.relocate(5*46,8*85);\r\n\t\tspikes6.relocate(5*46,9*85);\r\n\t\tspikes7.relocate(10*46,2*85);\r\n\t\tspikes8.relocate(10*46,3*85);\r\n\t\tspikes9.relocate(10*46,4*85);\r\n\t\tspikes10.relocate(10*46,5*85);\r\n\t\tspikes11.relocate(10*46,6*85);\r\n\t\tspikes12.relocate(10*46,7*85);\r\n\t\tspikes13.relocate(15*46,0*85);\r\n\t\tspikes14.relocate(15*46,1*85);\r\n\t\tspikes15.relocate(15*46,2*85);\r\n\t\tspikes16.relocate(15*46,7*85);\r\n\t\tspikes16.relocate(15*46,8*85);\r\n\t\tspikes17.relocate(15*46,9*85);\r\n\t\tRandom randomObj = new Random();\r\n\t\tint randomX = randomObj.nextInt(20);\r\n\t\tint randomY = randomObj.nextInt(10);\r\n\t\tcoins1.relocate(randomX*46, randomY*85);\r\n\t\tgamemap.setLootLocation(randomX + 1, randomY + 1);\r\n\t\t//coins1.relocate(10*46,5*85);\r\n\t\t//gamemap.setLootLocation(11, 6);\r\n\t}", "public int pickup(int x, int y)\n {\n return (x + y);\n }", "public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\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}", "void playSoldierCard(int victimIndex, HexLocation location);", "public abstract int positionBonus();", "protected void wander() {\n\t\tfor(int i=3;i>0;){\n\t\t\tfindChest();\n\t\t\tint num = ((int) (Math.random()*100)) % 4;\n\t\t\tswitch (num+1){\n\t\t\t\tcase 1 :\n\t\t\t\t\tif(!(character.xOfFighter-1==game.getXofplayer()&&character.yOfFighter==game.getYofplayer())\n\t\t\t\t\t\t\t&&game.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter-1,character.yOfFighter)){\n\t\t\t\t\t\tcharacter.xOfFighter = character.xOfFighter-1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\tif(!(character.xOfFighter==game.getXofplayer()&&character.yOfFighter-1==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter,character.yOfFighter-1)){\n\t\t\t\t\t\tcharacter.yOfFighter = character.yOfFighter-1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\tif(!(character.xOfFighter+1==game.getXofplayer()&&character.yOfFighter==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter+1,character.yOfFighter)){\n\t\t\t\t\t\tcharacter.xOfFighter = character.xOfFighter+1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4 :\n\t\t\t\t\tif(!(character.xOfFighter==game.getXofplayer()&&character.yOfFighter+1==game.getYofplayer())&&\n\t\t\t\t\t\t\tgame.getPlayingmap().npcMove(character.xOfFighter,character.yOfFighter,character.xOfFighter,character.yOfFighter+1)){\n\t\t\t\t\t\tcharacter.yOfFighter = character.yOfFighter+1;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfindChest();\n\t}", "public void actionPerformed (ActionEvent e) {\n \t\t\tint currTurn=whosTurn(numPlayers);\n \t\t\tremoveAllImages(numPlayers, tile, frame3); \n \t\t\tendTurn(numPlayers); //prints out turn ended & next player\n \t\t\t\n \t\t\tif(numPlayers==2) {\n \t\t\tif(currTurn==1){ //have to update variable so next player can go\n \t\t\t\tturnSeed=2;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tturnSeed=1;\n \t\t\t}\n \t\t}\n \telse {\n \t\tif(currTurn==1){\n \t\tturnSeed=2;\n \t}\n \telse if(currTurn==2){\n \t\tturnSeed=3;\n \t}\n \n \telse if(currTurn==3) {\n \t\tturnSeed=4;\n \n \t}\n \telse {\n \t\tturnSeed=1;\n \t\t\n \t}\t\t\n \t\t\t}\n \t\t\t\n \t\t}", "public int roll() \r\n {\r\n \r\n die1FaceValue = die1.roll();\r\n die2FaceValue = die2.roll();\r\n \r\n diceTotal = die1FaceValue + die2FaceValue;\r\n \r\n return diceTotal;\r\n }", "public static void main(String[] args) {\n Die die1 = new Die();\n die1.roll();\n\n //create die 2 and roll\n Die die2 = new Die();\n die2.roll();\n\n System.out.println(die1.getFaceValue());\n System.out.println(die2.getFaceValue());\n\n if(die1.getFaceValue() + die2.getFaceValue() == 7){\n System.out.println(\"You win\");\n }\n else\n System.out.println(\"You Lose\");\n }", "public int throwDice(int number) {\n this.lastThrow = number;\n this.status = \"Started\";\n Player player = players.get(activePlayer);\n\n // DICELISTENER : throw DiceEvent to diceListeners\n for (DiceListener listener : diceListeners) {\n DiceEvent diceEvent = new DiceEvent(this, this.activePlayer, number);\n listener.diceThrown(diceEvent);\n }\n\n\n //check if number thrown was a 6\n if (number != 6) {\n player.setSixersRow(0);\n } else if (!player.inStartingPosition()) { //count up the sixers row if not in starting pos\n player.setSixersRow(player.getSixersRow() + 1);\n }\n\n if (player.getSixersRow() == 3) { //three 6's in a row, next turn\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n return number;\n }\n\n if (player.inStartingPosition()) { //starting position have 3 throws to get a six\n player.setThrowAttempts(player.getThrowAttempts() + 1);\n if (number != 6 && player.getThrowAttempts() == 3) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n player.setThrowAttempts(0);\n return number;\n } else {\n return number;\n }\n }\n\n boolean nextTurn = false;\n int piecesInPlay = player.piecesInPlay();\n int blockedPieces = 0;\n int notMakingItInPieces = 0;\n\n for (Piece piece : player.getPieces()) {\n if (piece.isInPlay()) {\n //count blocked pieces\n if (towersBlocksOpponents(player, piece.position, number)) {\n blockedPieces++;\n }\n\n //If piece is at pos over 52 but the thrown dice won't make it 59\n //end of turn\n if (piece.getPosition() > 52 && piece.getPosition() + number != 59 && piece.getPosition() != 59) {\n notMakingItInPieces++;\n }\n }\n\n }\n\n //if all active pieces are blocked, end of turn\n if (blockedPieces == piecesInPlay) {\n nextTurn = true;\n //if all pieces are at endplay, but none can get in, end of turn\n } else if (notMakingItInPieces == piecesInPlay) {\n nextTurn = true;\n //if blocked pieces and notmakingitinpieces are all the pieces in play, end of turn\n } else if ((notMakingItInPieces + blockedPieces) == piecesInPlay) {\n nextTurn = true;\n }\n\n //set next turn\n if (nextTurn) {\n // PLAYERLISTENER : Trigger playerEvent for player that is WAITING\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, this.activePlayer, PlayerEvent.WAITING);\n listener.playerStateChanged(event);\n }\n this.setNextActivePlayer();\n }\n\n return number;\n }", "@Override\n public void act()\n {\n Location loc = getLocation();\n int r = loc.getRow();\n int c = loc.getCol();\n int dir = getDirection();\n if(dir == Location.NORTH)\n {\n if(r - START_ROW + 1 > -2*(address & ADDRESS))\n {\n move();\n }\n else\n {\n setDirection(Location.WEST);\n }\n }\n else if(dir == Location.WEST)\n {\n if(c <= RETURN_COL)\n {\n setDirection(Location.SOUTH);\n }\n else\n {\n Bit b = null;\n Actor a = getGrid().get(loc.getAdjacentLocation(Location.SOUTH));\n if(a instanceof Bit) b = (Bit)a;\n if(b != null)\n {\n processBit(b,-c-1);\n }\n move();\n }\n }\n else if(dir == Location.SOUTH)\n {\n if(r == -1)\n {\n setDirection(Location.EAST);\n }\n else\n {\n move();\n }\n }\n else if(dir == Location.EAST)\n {\n move();\n }\n else\n {\n System.err.println(\"yer bus is on an angle bud\");\n }\n }", "@EventHandler\r\n\tpublic void run(PlayerInteractEvent e) {\n\t\tPlayer p = e.getPlayer();\r\n\t\t\tif (e.getAction()==Action.LEFT_CLICK_AIR && p.getInventory().getItemInMainHand().getType()==Material.WOOD_SWORD) {\r\n\t\t\t\tnew BukkitRunnable() {\r\n\t\t\t\tLocation loc = p.getLocation();\r\n\t\t\t\tLocation loc2 = p.getLocation();\r\n\t\t\t\tdouble t = 0.0;\r\n\t\t\t\t\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tint size = 5;\r\n\t\t\t\t\tfor(int i = 0; i < 360;i++) {\r\n\t\t\t\t\t\tdouble angle = (i*Math.PI/180);\r\n\t\t\t\t\t\tt+=0.25;\r\n\t\t\t\t\t\tif (t==1) {\r\n\t\t\t\t\t\t\tp.playSound(loc, Sound.ENTITY_PLAYER_ATTACK_SWEEP, 1, 0);\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t\tdouble x =(size*Math.cos(angle));\r\n\t\t\t\t\t\tdouble y = 0.1;\r\n\t\t\t\t\t\tdouble z =(size*Math.sin(angle));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tint n = ran.nextInt(100);\r\n\t\t\t\t\t\tloc.add(x,y,z);\r\n\t\t\t\t\t\tif (t%1000==0)\r\n\t\t\t\t\t\t\tp.playSound(loc, Sound.ENTITY_IRONGOLEM_HURT, 1, 0);\r\n\t\t\t\t\t\tif(n>95) {\r\n\t\t\t\t\t\t\tParticleEffect.REDSTONE.sendColor(Bukkit.getOnlinePlayers(), loc, Color.YELLOW);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfor (Entity en : loc.getChunk().getEntities()){\r\n\t\t\t\t\t\t\t\tif (en.getLocation().distance(loc2) < size){\r\n\t\t\t \tif(en != p) {\r\n\t\t\t\t if(en.getType().isAlive()) { \r\n\t\t\t\t\t Damageable d = (Damageable) en;\r\n\t\t\t\t\t d.damage(5.0, p);\r\n\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\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tloc.subtract(x,y,z);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(t>5000.0) {\r\n\t\t\t\t\t\tthis.cancel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}.runTaskTimer(plugin, 0, 1);\r\n\t\t}\t\t\r\n\t}", "int getAttackRoll();", "public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }", "public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }" ]
[ "0.63694715", "0.5828677", "0.5779182", "0.5775076", "0.5712221", "0.5681291", "0.5666018", "0.56389904", "0.5618352", "0.5617376", "0.56039476", "0.5582981", "0.5581845", "0.55755633", "0.5521679", "0.5515215", "0.55093753", "0.5505993", "0.55043256", "0.5466764", "0.5459744", "0.54270434", "0.54223096", "0.5414854", "0.54018575", "0.5397522", "0.539406", "0.53920376", "0.53743637", "0.5370301", "0.53675634", "0.53649926", "0.53547794", "0.5352971", "0.5350613", "0.5342115", "0.5338653", "0.5335835", "0.5332901", "0.5331093", "0.5329626", "0.53160703", "0.53159535", "0.53145725", "0.5306594", "0.53064483", "0.5306385", "0.5304024", "0.52968574", "0.5289291", "0.5287407", "0.52817166", "0.52674645", "0.52660394", "0.52591896", "0.52579975", "0.5253209", "0.5240253", "0.52397025", "0.5237246", "0.5236031", "0.5235145", "0.522977", "0.5228639", "0.52188176", "0.52160835", "0.52157176", "0.5210187", "0.5207855", "0.5200787", "0.5190238", "0.5184536", "0.51805615", "0.517782", "0.5177008", "0.51754606", "0.5174248", "0.5171779", "0.5171556", "0.5170192", "0.5169554", "0.5166546", "0.51645184", "0.51615226", "0.5155782", "0.5152825", "0.51471186", "0.5147015", "0.5140448", "0.5138698", "0.5132166", "0.51288384", "0.5122421", "0.51214945", "0.51210254", "0.5116628", "0.51138026", "0.5109788", "0.51073176", "0.51053363" ]
0.65433985
0
TODO Autogenerated method stub
public static void main(String[] args) { int cost[][] = { {1, 2, 3}, {4, 8, 2}, {1, 5, 3} }; int len=3; dp=new int[len+1][len+1]; for(int i=0;i<len;++i) Arrays.fill(dp[i], Integer.MAX_VALUE); System.out.println(getMinCost(cost, 2, 2, len)); printPath(cost, 2, 2); }
{ "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
here first if both the values are more than 0 that means you took path earlier from either top,left or diagonal
public static void printPath(int[][] dp,int n,int m){ if((n>0&&m>0)){ if(dp[n-1][m]<dp[n][m-1]&&dp[n-1][m]<dp[n-1][m-1]) printPath(dp, n-1, m); else if(dp[n][m-1]<dp[n-1][m-1]) printPath(dp, n, m-1); else printPath(dp, n-1, m-1); }else if(n>0){ //else if only x axis is positive you can taker path only from the left printPath(dp, n-1, m); }else if(m>0){ //else you can take the path only from top printPath(dp, n, m-1); } System.out.println(n+":"+m); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isPathH(Board B, Move M, Graph G, int row, int column, Tile tile) {\n\n Tile t = tile;\n\n boolean result = true;\n boolean tempa = true;\n\n int sourceid = 0;\n\n\n int c = M.getX(), r = M.getY();\n\n if (r <= 0 && c <= 0) {\n\n\n } else if (r <= 0 && c >= 0) {\n\n\n } else if (r >= 0 && c >= 0) {\n\n for (int y = 0; y != 2; y++) {\n\n sourceid = (row * B.width) + column;\n\n // System.out.println(\"source id: \" + sourceid);\n\n if (y == 0) {\n\n\n //aab\n for (int i = 0; i != r; i++) {\n\n System.out.println(G.adj(sourceid).toString());\n\n if (G.adj.get(sourceid).contains(sourceid + B.width)) {\n\n // System.out.println(\"row artı\");\n\n } else {\n\n result = false;\n\n }\n\n sourceid += B.width;\n\n }\n\n for (int i = 0; i != c; i++) {\n\n\n if (G.adj.get(sourceid).contains(sourceid + 1)) {\n\n // System.out.println(\"okk\");\n\n } else {\n\n //return false;\n\n }\n\n sourceid += 1;\n\n System.out.println(\"b\");\n\n }\n } else {\n\n sourceid = row * B.width + column;\n\n for (int i = 0; i != c; i++) {\n // System.out.println(\"a\");\n\n }\n for (int i = 0; i != r; i++) {\n // System.out.println(\"b\");\n\n }\n }\n\n\n }\n\n\n }\n\n\n return result;\n }", "private void buildPath() {\r\n int xNext = 1;\r\n int yNext = map.getStartPos() + 1;\r\n CellLayered before = cells[yNext][xNext];\r\n while(true)\r\n {\r\n Byte[] xy = map.getDirection(xNext-1, yNext-1);\r\n xNext = xNext + xy[0];\r\n yNext = yNext + xy[1];\r\n\r\n CellLayered next = cells[yNext][xNext];\r\n\r\n if(xy[0]==-1)\r\n before.setRight(false);\r\n else\r\n before.setRight(true);\r\n before.setPath(true);\r\n if(next==null)\r\n break;\r\n\r\n before.setNextInPath(next);\r\n before = next;\r\n }\r\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 static int drawLowestElevPath(Graphics g, int[][] grid, int row){\n int i = row;\n int elevation = 0;\n \n for(int j = 0; j < 839; j++)\n { //Straight //Up //Straight //Down \n if(i - 1 < 0)\n i = i + 1;\n else if(i + 1 > 479)\n i--;\n \n int straight = (grid[i][j+1] - grid[i][j]);\n int up = (grid[i - 1][j+1] - grid[i][j]);\n int down = (grid[i + 1][j+1] - grid[i][j]);\n \n \n\n if((straight < up) && (straight < down))\n { //straight is least \n g.drawRect(j + 1, i, 1, 1);\n elevation += Math.abs((grid[i][j+1] - grid[i][j]));\n } \n else if((up < down) && (up < straight))\n { //up is least\n g.drawRect(j + 1, i - 1, 1, 1);\n if(i - 1 > 0)\n {\n elevation += Math.abs((grid[i - 1][j+1] - grid[i][j]));\n i--;\n }\n } \n else if((down < up) && (down < straight))\n { //down is least\n g.drawRect(j + 1, i + 1, 1, 1);\n if(i + 1 < 480)\n {\n elevation += Math.abs((grid[i + 1][j+1] - grid[i][j]));\n i++;\n }\n } \n else if(up == down)\n {\n double rand = Math.random();\n int path = (int)(rand * 2);\n \n if(path == 0)\n {\n g.drawRect(j + 1, i + 1, 1, 1);\n if(i + 1 < 480)\n {\n elevation += Math.abs((grid[i + 1][j+1] - grid[i][j]));\n i++;\n }\n }\n else if(path == 1)\n {\n g.drawRect(j + 1, i - 1, 1, 1);\n if(i - 1 > 0)\n {\n elevation += Math.abs((grid[i - 1][j+1] - grid[i][j]));\n i--;\n }\n }\n } //Straight //Up //Straight //Down //Straight //Down //Straight //Up\n else if(((straight == up) && (straight < down)) || ((straight == down) && (straight < up)))\n {\n g.drawRect(j + 1, i, 1, 1);\n elevation += Math.abs((grid[i][j+1] - grid[i][j]));\n }\n }\n\n return elevation;\n }", "public static int drawLowestElevPath(Graphics g, int[][] data, int row, int col) {\r\n if (row < 0 || col < 0) {\r\n return -1;\r\n }\r\n\r\n if (col == data[row].length - 1) {\r\n return 0;\r\n }\r\n\r\n int now = data[row][col];\r\n int fd = Math.abs(now - data[row][col + 1]);\r\n\r\n int up;\r\n int dn;\r\n\r\n if (row == 0) {\r\n dn = Math.abs(now - data[row + 1][col + 1]);\r\n up = fd + 1;\r\n } else if (row == data.length - 1) {\r\n up = Math.abs(now - data[row - 1][col + 1]);\r\n dn = fd + 1;\r\n } else {\r\n up = Math.abs(now - data[row - 1][col + 1]);\r\n dn = Math.abs(now - data[row + 1][col + 1]);\r\n }\r\n\r\n if (fd <= up && fd <= dn) {\r\n g.fillRect(col + 1, row, 1, 1);\r\n return fd + drawLowestElevPath(g, data, row, col + 1);\r\n \r\n } else if (up == dn) {\r\n \r\n if (Math.random() >= 0.5) {\r\n g.fillRect(col + 1, row - 1, 1, 1);\r\n return up + drawLowestElevPath(g, data, row - 1, col + 1);\r\n \r\n } else {\r\n g.fillRect(col + 1, row + 1, 1, 1);\r\n return dn + drawLowestElevPath(g, data, row + 1, col + 1);\r\n }\r\n \r\n } else if (up < dn) {\r\n g.fillRect(col + 1, row - 1, 1, 1);\r\n return up + drawLowestElevPath(g, data, row - 1, col + 1);\r\n \r\n } else {\r\n g.fillRect(col + 1, row + 1, 1, 1);\r\n return dn + drawLowestElevPath(g, data, row + 1, col + 1);\r\n }\r\n \r\n }", "private int getPath(int row, int col) {\n\tif (row > X || col > Y || row < 0 || col < 0) return 0;\n\tif (row == X && col == Y) return 1;\n\tif (grid[row][col] == -1) return 0;\n\n\tif (memo[row][col] != -1) return memo[row][col];\n\n\tint isPossible = getPath(row + y_dir[0], col + x_dir[0]);\n\tif (isPossible != 1) {\n\t isPossible = getPath(row + y_dir[1], col + x_dir[1]);\n\t}\n\n\tif (isPossible == 1) {\n\t path.add(new Point(row, col));\n\t}\n\t\n\treturn memo[row][col] = isPossible;\n }", "private boolean clearPath(Square square1, Square square2) {\n int x1 = square1.getCoords()[0];\n int x2 = square2.getCoords()[0];\n int y1 = square1.getCoords()[1];\n int y2 = square2.getCoords()[1];\n\n int targetX;\n int targetY;\n int startX;\n int startY;\n\n if (y1 > y2) {\n targetY = y1;\n startY = y2 + 1;\n } else {\n targetY = y2;\n startY = y1 + 1;\n }\n\n if (x1 > x2) {\n targetX = x1;\n startX = x2 + 1;\n } else {\n targetX = x2;\n startX = x1 + 1;\n }\n\n // Straight path along Y axis\n if (x1 == x2) {\n\n // Go along y\n while (startY < targetY) {\n if (!squares[x1][startY].isEmpty()) {\n return false;\n } else {\n startY++;\n }\n }\n // Straight path along X axis\n } else if (y1 == y2) {\n // Go along x\n while (startX < targetX) {\n if (!squares[startX][y1].isEmpty()) {\n return false;\n } else {\n startX++;\n }\n }\n }\n\n // Angled path\n if (Math.abs(x1 - x2) == Math.abs(y1 - y2)) {\n int smallerX;\n int largerX;\n if (x1 > x2) {\n largerX = x1;\n smallerX = x2;\n } else {\n smallerX = x1;\n largerX = x2;\n }\n // If the angle is down and to the left\n if ((x1 > x2 && y1 < y2) || (x1 < x2 && y1 > y2)) {\n targetX = smallerX;\n startX = largerX - 1;\n while (startX > targetX && startY < targetY) {\n if (!squares[startX][startY].isEmpty()) {\n return false;\n } else {\n startX--;\n startY++;\n }\n }\n // If the angle is down and to the right\n } else if ((x1 < x2 && y1 < y2) || (x1 > x2 && y1 > y2)) {\n targetX = largerX;\n startX = smallerX + 1;\n // Go to the right and down\n while (startX < targetX && startY < targetY) {\n if (!squares[startX][startY].isEmpty()) {\n return false;\n } else {\n startX++;\n startY++;\n }\n }\n }\n }\n return true;\n }", "private void tracepath(int[][] map, int x, int y, int xParent, int yParent, int rows, int columns) {\n\t\tif (x < 0 || x > rows || y < 0 || y > columns) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (map[x][y] == 10) {\n\t\t\tsetxPos(xParent);\n\t\t\tsetyPos(yParent);\n\t\t\treturn;\n\t\t}\n\t\tif ((map[x][y - 1] != 0 && map[x][y - 1] != 1) && map[x][y - 1] < map[x][y]) {\n\t\t\ttracepath(map, x, y - 1, x, y, rows, columns);\n\t\t}\n\t\tif ((map[x + 1][y] != 0 && map[x + 1][y] != 1) && map[x + 1][y] < map[x][y]) {\n\t\t\ttracepath(map, x + 1, y, x, y, rows, columns);\n\t\t}\n\t\tif ((map[x][y + 1] != 0 && map[x][y + 1] != 1) && map[x][y + 1] < map[x][y]) {\n\t\t\ttracepath(map, x, y + 1, x, y, rows, columns);\n\t\t}\n\t\tif ((map[x - 1][y] != 0 && map[x - 1][y] != 1) && map[x - 1][y] < map[x][y]) {\n\t\t\ttracepath(map, x - 1, y, x, y, rows, columns);\n\t\t}\n\t\treturn;\n\t}", "static int shortestCellPath(int[][] grid, int sr, int sc, int tr, int tc) {\n\n\n Queue<Pair> queue = new LinkedList<>();\n\n\n boolean visited[][] = new boolean[grid.length][grid[0].length];\n\n\n int dirs[][] = new int[][]{{1,0},{0,1},{-1,0},{0,-1}};\n\n queue.offer(new Pair(sr,sc,0));\n visited[sr][sc] = true;\n\n while(!queue.isEmpty()){\n\n Pair currentNode = queue.poll();\n\n if(currentNode.row == tr && currentNode.col == tc) {\n return currentNode.d;\n }\n\n\n\n\n for(int[] dir : dirs) {\n\n\n int row = currentNode.row + dir[0];\n int col = currentNode.col + dir[1];\n\n if(row >= 0 && row < grid.length && col >= 0 && col < grid[0].length && !visited[row][col] && grid[row][col] == 1) {\n queue.offer(new Pair(row,col,currentNode.d+1));\n visited[row][col] = true;\n }\n }\n\n\n\n }\n\n return -1;\n }", "private void findPath(int[][] path){\n int row = rows-1;\n int col = cols-1;\n int count = 1;\n int[][] newpath = new int[row+1][col+1];\n while(row>0 && col> 0){\n if(path[row-1][col-1]+1 == path[row][col]){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> replace '\" + oriString.charAt(row-1) + \"' with '\" + fixString.charAt(col-1)+\"'\");\n count++;\n row--;\n col--;\n }else if(path [row-1][col]+1 == path[row][col]){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> remove '\" + oriString.charAt(row-1) + \"' from str1\");\n row--;\n count++;\n\n }else if(path [row][col-1]+1 == path[row][col]){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> add '\" + fixString.charAt(col-1) + \"' to str1\");\n count++;\n col--;\n }else if(path [row-1][col-1] == path[row][col]){\n newpath[row][col] = path[row][col];\n row--;\n col--;\n }\n }\n if( row != 0){\n while(row > 0){\n if(path[row][col] == path[row-1][col]+1){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> remove '\" + oriString.charAt(row-1) + \"' to str1\");\n count++;\n row--;\n }\n }\n }\n if( col != 0){\n while(col > 0){\n if(path[row][col] == path[row][col-1]+1){\n newpath[row][col] = path[row][col];\n System.out.println(\"edit distance: \" + count + \"--> add '\" + fixString.charAt(col-1) + \"' to str1\");\n count++;\n col--;\n }\n }\n }\n // printPath(newpath);\n }", "public boolean isClearPathDiagonally(Location move) {\n\t\tint xdist = currentLoc.distanceToX(move);\n\t\tint ydist = currentLoc.distanceToY(move);\n\t\tint signx = 1, signy = 1;\n\t\tif (xdist < 0) signx = -1;\n\t\tif (ydist < 0) signy = -1;\n\t\tSystem.out.println(currentLoc + \" ==\" + move);\n\t\tLocation start = move.copy();\n\t\tstart.setX(start.getX() - signx);\n\t\tstart.setY(start.getY() - signy);\n\t\tfor (Location next = start; !next.equals(currentLoc); next.setX(next.getX() - signx), next.setY(next.getY() - signy)) {\n\t\t\tSystem.out.println(\"Checking Location \" + next.toString());\n\t\t\tPiece piece = board.getPieceAt(next);\n\t\t\tif (piece != null) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "private void checkPaths(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\tif(leftIsClear()){\r\n\t\t\t\tif(frontIsBlocked()&&rightIsBlocked()&&cornerColorIs(RED)){\r\n\t\t\t\t\tturnLeft(); \r\n\t\t\t\t\tmakeMove();\r\n\t\t\t\t\tpaintCorner(RED);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tturnLeft(); \r\n\t\t\t\t\tcheckColors();\r\n\t\t\t\t}\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t\tif(frontIsClear()){\r\n\t\t\t\tcheckColors();\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t\tif(rightIsClear()){\r\n\t\t\t\tif(frontIsBlocked()&&leftIsBlocked()&&cornerColorIs(RED)){\r\n\t\t\t\t\tturnRight();\r\n\t\t\t\t\tmakeMove();\r\n\t\t\t\t\tpaintCorner(RED);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tturnRight();\r\n\t\t\t\t\tcheckColors();\r\n\t\t\t\t}\r\n\t\t\t\tfollowPath();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void checkPath( int[] path, int index, int x, int y, int distance ){\n if( x < 0 || x > 7 || y < 0 || y > 7 ){\n return;\n }\n //if the current path's length is 0 and we have found the board\n if( path[ index ] == 0 && gamepieces[ x ][ y ] == BACKGROUND_COLOR){\n //set the index to -1 to signify no flips are possible\n path[ index ] = -1;\n }else if( path[ index ] == 0 && gamepieces[ x ][ y ] == currentPlayer ){\n //if the path's length is 0 but we found a piece from the current player\n //note that location in the path\n path[ index ] = distance;\n }\n }", "boolean hasPathTo(int v)\n\t{\n\t\treturn edgeTo[v].weight()!=Double.POSITIVE_INFINITY;\n\t}", "private void calculate() {\n\t\tList<Edge> path = new ArrayList<>();\n\t\tPriorityQueue<Vert> qv = new PriorityQueue<>();\n\t\tverts[s].dist = 0;\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tif (e.w==0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist < L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t} else if (verts[t].dist == L) {\n\t\t\tok = true;\n\t\t\tfor (int i=0; i<m; i++) {\n\t\t\t\tif (edges[i].w == 0) {\n\t\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\t// replace 0 with 1, adding to za list\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (edges[i].w == 0) {\n\t\t\t\tza[i] = true;\n\t\t\t\tedges[i].w = 1;\n\t\t\t} else {\n\t\t\t\tza[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// looking for shortest path from s to t with 0\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tif (i != s) {\n\t\t\t\tverts[i].dist = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tqv.clear();\n\t\tqv.add(verts[s]);\n\t\twhile (!qv.isEmpty()) {\n\t\t\tVert v = qv.poll();\n\t\t\tint vidx = v.idx;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(vidx)];\n\t\t\t\tif (vo.dist > v.dist + e.w) {\n\t\t\t\t\tvo.dist = v.dist + e.w;\n\t\t\t\t\tqv.add(vo);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (verts[t].dist > L) {\n\t\t\tok = false;\n\t\t\treturn;\n\t\t}\n\t\tVert v = verts[t];\n\t\twhile (v.dist > 0) {\n\t\t\tlong minDist = MAX_DIST;\n\t\t\tVert vMin = null;\n\t\t\tEdge eMin = null;\n\t\t\tfor (Edge e : v.edges) {\n\t\t\t\tVert vo = verts[e.other(v.idx)];\n\t\t\t\tif (vo.dist+e.w < minDist) {\n\t\t\t\t\tvMin = vo;\n\t\t\t\t\teMin = e;\n\t\t\t\t\tminDist = vMin.dist+e.w;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tv = vMin;\t\n\t\t\tpath.add(eMin);\n\t\t}\n\t\tCollections.reverse(path);\n\t\tfor (int i=0; i<m; i++) {\n\t\t\tif (za[i]) {\n\t\t\t\tedges[i].w = MAX_DIST;\n\t\t\t}\n\t\t}\n\t\tlong totLen=0;\n\t\tboolean wFixed = false;\n\t\tfor (Edge e : path) {\n\t\t\ttotLen += (za[e.idx] ? 1 : e.w);\n\t\t}\n\t\tfor (Edge e : path) {\n\t\t\tif (za[e.idx]) {\n\t\t\t\tif (!wFixed) {\n\t\t\t\t\te.w = L - totLen + 1;\n\t\t\t\t\twFixed = true;\n\t\t\t\t} else {\n\t\t\t\t\te.w = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tok = true;\n\t}", "public boolean pathClear(int oldCol, int oldRow, int newCol, int newRow ) {\r\n\r\n //vertical check\r\n if(oldCol == newCol) {\r\n while (oldRow!=newRow) {\r\n if(oldRow>newRow) {\r\n if (Chessboard.chessBoard[oldRow-1][oldCol].getPiece() != null && newRow != oldRow - 1) {\r\n return false;\r\n }\r\n oldRow--;\r\n //System.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n else if (oldRow<newRow) {\r\n if (Chessboard.chessBoard[oldRow+1][oldCol].getPiece() != null && newRow != oldRow + 1) {\r\n return false;\r\n }\r\n oldRow++;\r\n //System.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n\r\n }\r\n //System.out.println(\"debug a\");\r\n return true;\r\n }\r\n\r\n//horizontal check\r\n else if (oldRow==newRow){\r\n while (oldCol!=newCol) {\r\n if(oldCol>newCol) {\r\n if (Chessboard.chessBoard[oldRow][oldCol-1].getPiece() != null && newCol != oldCol - 1) {\r\n return false;\r\n }\r\n oldCol--;\r\n //System.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n else if (oldCol<newCol) {\r\n if (Chessboard.chessBoard[oldRow][oldCol+1].getPiece() != null && newCol != oldCol + 1) {\r\n return false;\r\n }\r\n oldCol++;\r\n //\tSystem.out.println(\"row \" + oldRow +\" column\"+ oldCol);\r\n }\r\n\r\n }\r\n //\tSystem.out.println(\"debug b\");\r\n return true;\r\n }\r\n\r\n //diagonal check\r\n else if(oldRow!=newRow && oldCol != newCol){\r\n\r\n\r\n //can only move diagonally the SAME number of spaces each direction\r\n if (Math.abs(newRow - oldRow) != Math.abs(newCol-oldCol)) {\r\n //System.out.println(\"number of rows and columns not equal\");\r\n return false;\r\n }\r\n\r\n\r\n\r\n //System.out.println(\"In diagonal check\");\r\n //System.out.println(\"old Row:\" + oldRow);\r\n //System.out.println(\"old Col:\" + oldCol);\r\n //System.out.println(\"new Row:\" + newRow);\r\n //System.out.println(\"new Col:\" + newCol);\r\n\r\n do{\r\n //System.out.println(\"In do\");\r\n //System.out.println(\"old Row:\" + oldRow);\r\n //System.out.println(\"old Col:\" + oldCol);\r\n //System.out.println(\"new Row:\" + newRow);\r\n //System.out.println(\"new Col:\" + newCol);\r\n\r\n if (oldCol<newCol) {\r\n oldCol++;\r\n }\r\n else {\r\n oldCol--;\r\n }\r\n\r\n if(oldRow<newRow) {\r\n oldRow++;\r\n }\r\n else {\r\n oldRow--;\r\n }\r\n\r\n\r\n if ((Chessboard.chessBoard[oldRow][oldCol].getPiece()!=null) && (oldCol!=newCol && oldRow!=newRow)) {\r\n\r\n return false;\r\n }\r\n\r\n } while (oldCol!=newCol && oldRow != newRow);\r\n //System.out.println(\"debug c\");\r\n return true;\r\n\r\n\r\n\r\n }\r\n\r\n return false;\r\n }", "private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}", "private List<Point> getPath(int index) {\n\t\t \n\t \n\t\t Node fromNode = oEdge.fromNode;\n\t\t Node toNode = oEdge.toNode;\n\t\t float x1 = fromNode.longitude;\n\t\t float x2 = toNode.longitude;\n\t\t float y1 = fromNode.latitude;\n\t\t float y2 = toNode.latitude;\n\t\t double slope, angle;\n\t\t if(x1!=x2) {\n\t\t\t slope = (y2-y1)/(x2-x1);\n\t\t\t \tangle = Math.atan(slope);\n\t\t\t \t} else {\n\t\t\t \t\tangle = Math.PI/2;\n\t\t\t \t}\n\t\t Double L = Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));\n\t\t float offsetPixels=0;\n\t\t if(Math.toDegrees(angle)>Math.toDegrees(90)) {\n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=roadWidth*1/10;\n\t\t\t }\n\t\t\t \n\t\t } else {\n\t\t\t \n\t\t\t if (index==0){\n\t\t\t\t offsetPixels=-roadWidth*6/10;\n\t\t\t }\n\t\t\t else if(index==1){\n\t\t\t\t offsetPixels=-roadWidth*11/10;\n\t\t\t }\n\t\t\t else if(index==-1){\n\t\t\t\t offsetPixels=-roadWidth*1/10;\n\t\t\t }\n\t\t }\n\t\t \n\t\t // This is the first parallel line\n\t\t float x1p1 = x1 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float x2p1 = x2 + offsetPixels * (y2-y1) / L.floatValue();\n\t\t float y1p1 = y1 + offsetPixels * (x1-x2) / L.floatValue();\n\t\t float y2p1 = y2 + offsetPixels * (x1-x2) / L.floatValue();\n//\t\t if(oEdge.edgeID==16) {\n//\t\t\t System.out.println(\"testing\");\n//\t\t }\n\t\t \n\t\t Point P1 = new Point(x1p1,y1p1);\n\t\t Point P2 = new Point(x2p1,y2p1);\n\t\t List<Point> gP = GetPoints(P1, P2);\n\t\t return gP;\n\t \n\t}", "private void followPath(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\twhile(frontIsClear() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tmakeMove();\r\n\t\t\t}\r\n\t\t\tif(frontIsBlocked() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tturnAround();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t\tfollowPath();\r\n\t\t\t}else{\r\n\t\t\t\tcheckPaths();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic boolean linear(InternalCoordinate c) {\n\t\tif (x == c.getX()) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// The two diagonals\n\t\tint tmpx = x;\n\t\tint tmpy = y;\n\t\tif (isDown(x, y)) {\n\t\t\t// Down right\n\t\t\tif (c.getY() > y) {\n\t\t\t\twhile (tmpx > c.getX() || tmpy < c.getY()) {\n\t\t\t\t\ttmpx += isDown(tmpx, tmpy) ? 0 : -1;\n\t\t\t\t\ttmpy += isDown(tmpx, tmpy) ? 1 : 0;\n\t\t\t\t\t\n\t\t\t\t\tif (tmpx == c.getX() && tmpy == c.getY()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t//Down left\n\t\t\t} else if (c.getY() < y) {\n\t\t\t\twhile (tmpx > c.getX() || tmpy > c.getY()) {\n\t\t\t\t\ttmpx += isDown(tmpx, tmpy) ? 0 : -1;\n\t\t\t\t\ttmpy += isDown(tmpx, tmpy) ? -1 : 0;\n\t\t\t\t\t\n\t\t\t\t\tif (tmpx == c.getX() && tmpy == c.getY()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t} else {\n\t\t\t// Up right\n\t\t\tif (c.getY() > y) {\n\t\t\t\twhile (tmpx < c.getX() || tmpy < c.getY()) {\n\t\t\t\t\ttmpx += isDown(tmpx, tmpy) ? 1 : 0;\n\t\t\t\t\ttmpy += isDown(tmpx, tmpy) ? 0 : 1;\n\t\t\t\t\t\n\t\t\t\t\tif (tmpx == c.getX() && tmpy == c.getY()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t//Up left\n\t\t\t} else if (c.getY() < y) {\n\t\t\t\twhile (tmpx < c.getX() || tmpy > c.getY()) {\n\t\t\t\t\ttmpx += isDown(tmpx, tmpy) ? 1 : 0;\n\t\t\t\t\ttmpy += isDown(tmpx, tmpy) ? 0 : -1;\n\t\t\t\t\t\n\t\t\t\t\tif (tmpx == c.getX() && tmpy == c.getY()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "private boolean shouldReplanPath(State.StateView state, History.HistoryView history, Stack<MapLocation> currentPath)\n {\n \t\t/* TODO: Write this method\n \t\t * Check if the path is blocked every step or check if the next spot is blocked?\n \t\t * Does enemy attack if you get too close?\n \t\t */\n \t\n \t\n \t\t//checking if the next step is blocked\n \t\t//setting up local fields\n \t\tUnitView enemy = state.getUnit(enemyFootmanID);\n \t\tMapLocation next;\n \t\tif (!path.isEmpty()) {\n \t\t\tnext = path.peek();\n \t\t\n \t\t\tif(next.x == enemy.getXPosition() && next.y == enemy.getYPosition()) \n \t\t\t\treturn true;\n \t\t\t\n \t\t}\n \t\t\n return false;\n }", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\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 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 boolean moveForward(){\n \n int[] last = (int[]) this.snake.elementAt(this.snake.size() -1);\n int[] sLast = (int[]) this.snake.elementAt(this.snake.size() -2);\n int[] diff = new int[2];\n int[] diff2 = new int[2];\n \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n \n //left\n if( direction == 1){\n diff2[0]--;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff = diff2; \n }\n \n //down\n }else if(direction == 2){\n \n diff2[1]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n //System.out.println(\"first one: \" + diff[0] + \", \" + diff[1]);\n }\n \n //right\n }else if(direction == 3){\n diff2[0]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n \n //up\n }else if(direction == 4){\n \n diff2[1]--;\n //System.out.println(\"\" + diff[0] + \", \" + diff[1]);\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n }else{ \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n }\n \n int[] newPoint = new int[2];\n newPoint[0] = last[0] + diff[0];\n newPoint[1] = last[1] + diff[1];\n \n //if it hits the snake itself\n boolean hits = false;\n Enumeration enu = this.snake.elements();\n int[] temp = new int[2];\n while(enu.hasMoreElements()){\n temp = (int[]) enu.nextElement();\n if(temp[0] == newPoint[0] && temp[1] == newPoint[1]){\n hits = true; \n }\n }\n if(hits){\n return false; \n }\n //if it hits the wall\n if( newPoint[0] >50 || newPoint[0] <0 || newPoint[1] >50 || newPoint[1] <0){\n return false; \n }else{\n if(newPoint [0] == this.apple[0] && newPoint[1] == this.apple[1]){\n this.snake.add(newPoint);\n this.ateApple();\n }else{\n this.snake.add(newPoint);\n this.snake.remove(0);\n \n \n }\n return true;\n }\n }", "private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }", "public ArrayList<Integer> path2Dest(int s, int t, int k, int method){\n double INFINITY = Double.MAX_VALUE;\n boolean[] SPT = new boolean[intersection];\n double[] d = new double[intersection];\n int[] parent = new int[intersection];\n\n for (int i = 0; i <intersection ; i++) {\n d[i] = INFINITY;\n parent[i] = -1;\n }\n d[s] = 0;\n\n MinHeap minHeap = new MinHeap(k);\n for (int i = 0; i <intersection ; i++) {\n minHeap.add(i,d[i]);\n }\n while(!minHeap.isEmpty()){\n int extractedVertex = minHeap.extractMin();\n\n if(extractedVertex==t) {\n break;\n }\n SPT[extractedVertex] = true;\n\n LinkedList<Edge> list = g.adjacencylist[extractedVertex];\n for (int i = 0; i <list.size() ; i++) {\n Edge edge = list.get(i);\n int destination = edge.destination;\n if(SPT[destination]==false ) {\n double newKey =0;\n double currentKey=0;\n if(method==1) { //method 1\n newKey = d[extractedVertex] + edge.weight;\n currentKey = d[destination];\n }\n else{ //method 2\n newKey = d[extractedVertex] + edge.weight + coor[destination].distTo(coor[t])-coor[extractedVertex].distTo(coor[t]);\n currentKey = d[destination];\n }\n if(currentKey>=newKey){\n if(currentKey==newKey){ //if equal need to compare the value of key\n if(extractedVertex<parent[destination]){\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n else {\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n }\n }\n }\n //trace back the path using parent properties\n ArrayList<Integer> path = new ArrayList<>();\n if(parent[t]!=-1){\n path.add(t);\n while(parent[t]!= s) {\n path.add(0,parent[t]);\n t = parent[t];\n }\n path.add(0,s);\n }\n else\n path = null;\n return path;\n }", "public static boolean getPath(int x, int y, ArrayList<Point> path) {\n\t\tif (x > size-1 || y > size-1 || !isFree(x, y)) { // !isFree -> [x][y] = 0\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean isAtFinal = (x == size-1) && (y == size-1); //destination: 5, 5\n\t\t\n\t\t//if there is a path from my current to end, add it\n\t\tif(isAtFinal || getPath(x, y+1, path) || getPath(x+1, y, path)){\n\t\t\tPoint p = new Point(x,y);\n\t\t\tpath.add(p);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean validatePath(BoardSquareInfo start, BoardSquareInfo target, ArrayList<BoardSquareInfo> path) {\n\t\tLog.d(LOG_TAG, String.format(\"Validating path: [%s]\",path));\n\t\t\n\t\t// Invalid if start and target row are separated \n\t\t// by 2 spaces and columns are the same\n\t\tboolean valid = !(Math.abs(start.row-target.row) == 2 \n\t\t\t\t&& start.column == target.column);\n\t\t\n\t\t// Invalid if start and target columns are separated \n\t\t// by 2 spaces and rows are the same\n\t\tvalid = valid && !(start.row == target.row\n\t\t\t\t&& Math.abs(start.column-target.column) == 2);\n\t\t\n\t\tif(valid && path.size() > 1) {\n\t\t\tBoardSquareInfo square = path.get(path.size()-2);\n\t\t\t\n\t\t\t// Invalid if start and target row are separated \n\t\t\t// by 2 spaces and columns are the same\n\t\t\tvalid = valid && !(Math.abs(square.row-target.row) == 2 \n\t\t\t\t\t&& square.column == target.column);\n\t\t\t\n\t\t\t// Invalid if start and target columns are separated \n\t\t\t// by 2 spaces and rows are the same\n\t\t\tvalid = valid && !(square.row == target.row\n\t\t\t\t\t&& Math.abs(square.column-target.column) == 2);\n\t\t}\n\t\t\n\t\tif(valid) {\n\t\t\tstart.swap(target);\n\t\t\tfor(BoardSquareInfo square : path) {\n\t\t\t\tsquare.makeEmpty();\n\t\t\t}\n\t\t\tswitchPlayer();\n\t\t}\n\t\t\n\t\treturn valid;\n\t}", "public static int pathInMatrix(int[][] matrix) {\n int[][] pathCounts = new int[matrix.length][matrix[0].length];\n if(matrix[0][0]!=1) {\n return 0;\n }\n for(int row=0; row< matrix.length; row++) {\n for(int col=0; col<matrix[row].length; col++) {\n if((row==0)&&(col==0))\n pathCounts[row][col] =1;\n // col can't be 0\n else if (row==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row][col-1]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else if (col==0) {\n // there is way to reach the previous cell and current cell is not 0\n pathCounts[row][col] = ((pathCounts[row-1][col]==1)&&(matrix[row][col]==1)) ? 1:0;\n }\n else {\n pathCounts[row][col] = (matrix[row][col]==1) ? pathCounts[row-1][col]+pathCounts[row][col-1]:0;\n }\n }\n }\n return pathCounts[matrix.length-1][matrix[0].length-1];\n }", "public boolean inValidSpot(Path p1){\n\t\t// Checks to see it the path piece placed expects an entrance or exit piece out of bounds\n\t\t\n\t\tint largestRow = (height*width-1)/width;\n\t\t\n\t\t// if entrance or exit pos expected is negative, know it is expecting a path outside the top bound\n\t\tif(p1.getEntry()<0 || p1.getExit()<0){\n\t\t\treturn false;\n\t\t}\n\t\t// if entrance or exit's row greater than the maximum row, know it is expecting a path outside bottom bound\n\t\tif(p1.getEntryRow()>largestRow || p1.getExitRow()>largestRow){\n\t\t\treturn false;\n\t\t}\n\t\tint currentRow = p1.getRow();\n\t\tint nextRow=0;\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==1){\n\t\t\t// If the absolute value of the difference between the current position and its entrance is 1 ...\n\t\t\t// Checking to see if the entrance is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the entrance expected is not to the left or to the right\n\t\t\t\t// In other words, the entrance is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==1){\n\t\t\t// If the absolute value of the difference between the current position and its exit is 1 ...\n\t\t\t// Checking to see if the exit is expected to be outside of the left or right edges of Map\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(currentRow!=nextRow){\n\t\t\t\t// This means that the exit expected is not to the left or to the right\n\t\t\t\t// In other words, the exit is expected in another row\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tif(Math.abs(p1.getPos()-p1.getEntry())==width){\n\t\t\tnextRow = p1.getEntryRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\t//Less than zero would make it on top of the top edge\n\t\t\t\t//First term calculated in this manner because any negative entrance between -1 and \n\t\t\t\t// -width+1 will have an integer rounded to zero. The double casting will give an \n\t\t\t\t// accurate number without losing the sign\n\t\t\t\t\n\t\t\t\t//Greater than height*width-1 would make in lower than the bottom edge\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(Math.abs(p1.getPos()-p1.getExit())==width){\n\t\t\tnextRow = p1.getExitRow();\n\t\t\tif(p1.getEntry()<0 || nextRow>(height-1/width)){//it used to be calculaterow(height*width-1\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\treturn true;\n\t\t\n\t}", "public int shortestPathBinaryMatrix(int[][] grid) {\n if (grid[0][0] == 1) {\n return -1;\n }\n int row = grid.length;\n int col = grid[0].length;\n int[][] directions = new int[][]{{-1, 0}, {1, 0}, {0, 1}, {0, -1},\n {-1, -1}, {-1, 1}, {1, -1}, {1, 1}};\n int[][] distance = new int[row][col];\n distance[0][0] = 1;\n Queue<int[]> queue = new LinkedList<>();\n queue.add(new int[]{0, 0});\n while (!queue.isEmpty()) {\n int[] cell = queue.remove();\n int x = cell[0];\n int y = cell[1];\n for (int i = 0; i < directions.length; i++) {\n int a = directions[i][0] + x;\n int b = directions[i][1] + y;\n if (a >= 0 && a < grid.length && b >= 0 && b < grid[0].length && grid[a][b] == 0) {\n // Mark it as -1 to avoid revisiting.\n grid[a][b] = -1;\n distance[a][b] = distance[x][y] + 1;\n queue.add(new int[]{a, b});\n }\n }\n }\n return distance[row - 1][col - 1] == 0 ? -1 :\n distance[row - 1][col - 1];\n }", "@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}", "private Cell scanFirstDiagonal(Figure value) {\n Figure oppositeValue = game.getOppositeFigure(value);\n int emptyString = 0;\n int emptyRow = 0;\n int emptyCnt = 0;\n int row = 0;\n for (int string = 0; string < game.getFieldSize(); string++) {\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 emptyRow = row;\n emptyString = string;\n }\n row++;\n }\n if (emptyCnt == 1) {\n return new Cell(emptyString, emptyRow);\n }\n return scanSecondDiagonal(value);\n }", "public void setCellToPath(int pos){//how to check for the end???\n\t\t\n\t\tif(pos<0||pos>width*height-1||getCompletePath())\n\t\t\treturn;// the position entered is not valid or the path has already been completed\n\t\t\n\t\telse if(temp.isEmpty()){//no path tile have been defined\n\t\t\tif(currentPos<0){//start hasn't been placed\t\t\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\n\t\t\t\tsetEntryPoint(currentPath);\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint d = currentPath.getDirection(pos);\n\t\t\t\tif (d<0||d>=4)\n\t\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\tPathType type =Map.createPathTileOfType(d, caseEdge);\n\t\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\t\n\t\t\t\t//fix direction of tile\n\t\t\t\tif(p.getEntry()==pos)\n\t\t\t\t\tp.rotate();\n\t\t\t\t//validate spot (for entry/exit)\n\t\t\t\t\n\t\t\t\t//set as Path entry point \n\t\t\t\tp.setStart();\n\t\t\t\tsetEntryPoint(p);\n\t\t\t\t\n\t\t\t\t//add to grid and list\n\t\t\t\tp.storePathTile();\n\n\t\t\t\t//update current\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\t\t\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif (getGrid(pos/width, pos%width)!=null)\n\t\t\t\tif(getGrid(pos/width, pos%width).isPath())\n\t\t\t\t\treturn;//causes intersection\n\t\t\t\n\t\t\tint dExit = currentPath.getDirection(pos);\n\t\t\tint lastPos= temp.peekLast().getPos();\n\t\t\tint dEntry= currentPath.getDirection(lastPos);\n\n\t\t\t\n\t\t\tif (dExit<0||dExit>3||dEntry<0||dEntry>3)\n\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\n\t\t\t\n\t\t\tPathType type =Map.createPathTileOfType(dExit,dEntry);\n\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\n\t\t\t//fix direction of tile\n\t\t\tif(p.getEntry()==pos)\n\t\t\t\tp.rotate();\n\t\t\t\n\t\t\tif(!inValidSpot(p))\n\t\t\t\treturn; //\n\t\t\t\n\t\t\t//add to grid and list\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\t//update current\n\t\t\tcurrentPos=pos;\n\t\t\tcurrentPath=new Path(currentPos);\t\n\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t}\n\t}", "public boolean isPathCrossing(String path) {\n // keep track of x and y position \n int x = 0;\n int y = 0;\n // Hashset to hold cordinates \n HashSet<String> known = new HashSet<String>();\n // add original\n known.add(\"0,0\");\n // go through each char in the string\n for(int i = 0; i < path.length(); ++i){\n if(path.charAt(i) == 'N') ++x;\n \n else if(path.charAt(i) == 'S') --x;\n \n else if(path.charAt(i) == 'W') --y;\n \n else if(path.charAt(i) == 'E') ++y;\n \n String loc = x + \",\" + y;\n // if it is already there, return true\n if(known.contains(loc)) return true;\n // otherwise add and keep going\n known.add(loc);\n }\n // no known cordinates were found so return false\n return false;\n }", "public static void main(String[] args) {\n\t\tint[] w = { 1, 4, 3 };\n\t\tint[] val = { 1500, 3000, 2000 };\n\t\tint m = 4;\n\t\tint n = val.length;\n\t\tint[][] v = new int[n + 1][m + 1];\n\t\tint[][] path = new int[n + 1][m + 1];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i][0] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v[0].length; i++) {\n\t\t\tv[0][i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tfor (int j = 0; j < v[i].length; j++) {\n\t\t\t\tSystem.out.print(v[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tfor (int i = 1; i < v.length; i++) {\n\t\t\tfor (int j = 1; j < v[i].length; j++) {\n\t\t\t\tif(w[i-1]>j) {\n\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t}else {\n\t\t\t\t\tif(v[i-1][j]<val[i-1]+v[i-1][j-w[i-1]]) {\n\t\t\t\t\t\tv[i][j]=val[i-1]+v[i-1][j-w[i-1]];\n\t\t\t\t\t\tpath[i][j]=1;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int[] i:v) {\n\t\t\tSystem.out.println(Arrays.toString(i));\n\t\t}\n\t}", "public int determineDirection(Point p0, Point p1) {\n \tif (p0.y == p1.y && ((p0.x > p1.x && !(p0.x == map[0].length - 1 && p1.x == 0)) \n \t\t\t|| (p1.x == map[0].length - 1 && p0.x == 0))) { \n \t\treturn 4; }\n \tif (p0.y == p1.y ) { \n \t\treturn 6; }\n \tif (p0.x == p1.x && ((p0.y > p1.y && !(p0.y == map.length - 1 && p1.y == 0))\n \t\t\t|| (p1.y == map.length - 1 && p0.y == 0)) ) { \n \t\treturn 8; }\n \treturn 2;\n }", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "private boolean checkDiagonals(final int posLine, final int posColumn, final int boardIcon, final int incLine, final int incColumn) {\n\t\tboolean validTop = false;\n\t\tboolean validBottom = false;\n\t\tvalidTop = checkDiagonalsAux(posLine, posColumn, boardIcon, incLine, incColumn);\n\t\tvalidBottom = checkDiagonalsAux(posLine, posColumn, boardIcon, incLine * -1, incColumn * -1);\n\t\treturn validTop && validBottom;\n\t}", "public boolean isValiddiagonal(Square curB, Square preB) {\n boolean value = true;\n int xdistance = curB.getRow1() - preB.getRow1();\n int ydistance = curB.getCol1() - preB.getCol1();\n int i1;\n int j1 = 0;\n \n if ((ydistance != 0) && (xdistance != 0)) {\n if ((xdistance > 0) && (ydistance > 0)) { //move right down\n for (i1 = preB.getCol1(); i1 < curB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() + j1][preB.getCol1() + j1].isOccupied()) {\n value = false;\n }\n }\n } else if ((xdistance > 0) && (ydistance < 0)) { //move left down\n for (i1 = curB.getCol1(); i1 < preB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() + j1][preB.getCol1() - j1].isOccupied()) {\n value = false;\n System.out.println(value);\n }\n }\n } else if ((xdistance < 0) && (ydistance > 0)) { //move right up\n for (i1 = preB.getCol1(); i1 < curB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() - j1][preB.getCol1() + j1].isOccupied()) {\n value = false;\n }\n }\n } else if ((xdistance < 0) && (ydistance < 0)) {\n for (i1 = curB.getCol1(); i1 < preB.getCol1(); i1 += 1) {\n j1++;\n if (Board.squares[preB.getRow1() - j1][preB.getCol1() - j1].isOccupied()) {\n value = false;\n }\n }\n } \n }\n return value;\n }", "private Cell scanSecondDiagonal(Figure value) {\n Figure oppositeValue = game.getOppositeFigure(value);\n int emptyString = 0;\n int emptyRow = 0;\n int emptyCnt = 0;\n int row = 0;\n for (int string = game.getFieldSize() - 1; string >= 0; string--) {\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 emptyRow = row;\n emptyString = string;\n\n }\n row++;\n }\n if (emptyCnt == 1) {\n return new Cell(emptyString, emptyRow);\n }\n return null;\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 int[] shortestPath(int x, int xEnd, int y, boolean leftToRight)\n {\n \tint xStart = x;\n \tint yStart = y;\n \tfinal float k = 5.f;\n \t\n \tint dir = 1;\n \tif(!leftToRight)\n \t\tdir = -1;\n \t\n \tmCostList[y*mWidth+x] = 0.0f;\n \t\n\t\twhile(x != xEnd)\n\t\t{\n\t\t\tx+=dir;\n\n\t\t\t//only search update/search y positions as far as we've moved x\n\t\t\t// this is because each move in x, we only allow the staff line to move up or down a maximum of 1 pixel\n\t\t\tint xDiff = Math.abs(x - xStart);\n\t\t\tint yIndexMin = Math.max(0, yStart-xDiff);\n\t\t\tint yIndexMax = Math.min(mHeight-1, yStart+xDiff);\n\n\t\t\twhile(yIndexMin <= yIndexMax)\n\t\t\t{\n\t\t\t\tint curBufferIndex = yIndexMin*mWidth+x;\n\t\t\t\tfloat pixelWeight = k*(mPixelBuffer[curBufferIndex] + 1.f);\t//bigger k value = less likely to choose background pixel\n\t\t\t\t\n\t\t\t\tfloat costFromPrev = 1.0f + mCostList[yIndexMin*mWidth+(x-dir)] + pixelWeight;\n\t\t\t\tif(costFromPrev < mCostList[curBufferIndex])\n\t\t\t\t\tmCostList[curBufferIndex] = costFromPrev;\n\n\t\t\t\tif(yIndexMin > 0)\n\t\t\t\t{\n\t\t\t\t\tfloat costFromPrevUp = 1.414f + mCostList[(yIndexMin-1)*mWidth+(x-dir)] + pixelWeight;\n\t\t\t\t\tif(costFromPrevUp < mCostList[curBufferIndex])\n\t\t\t\t\t\t mCostList[curBufferIndex] = costFromPrevUp;\n\t\t\t\t}\n\t\t\t\tif(yIndexMin < mHeight-1)\n\t\t\t\t{\n\t\t\t\t\tfloat costFromPrevDown = 1.414f + mCostList[(yIndexMin+1)*mWidth+(x-dir)] + pixelWeight;\n\t\t\t\t\tif(costFromPrevDown < mCostList[curBufferIndex])\n\t\t\t\t\t\t mCostList[curBufferIndex] = costFromPrevDown;\n\t\t\t\t}\n\n\t\t\t\t++yIndexMin;\n\t\t\t}\n\t\t}\n \t\n\t\t//fill out the actual path based on lowest cost at each x\n\t\tint path[] = new int[mWidth];\n\t\tfloat bestCost = Float.MAX_VALUE;\n\t\tint bestY = y;\n\t\t\n\t\tx = xStart;\n\t\ty = yStart;\n\t\twhile(x != xEnd)\n\t\t{\n\t\t\tpath[x] = y;\n\t\t\tx+=dir;\n\t\t\t\n\t\t\tbestCost = mCostList[y*mWidth+x];\n\t\t\tbestY = y;\n\t\t\t \n\t\t\tif(y > 0)\n\t\t\t{\n\t\t\t\tif(mCostList[(y-1)*mWidth+x] < bestCost)\n\t\t\t\t{\n\t\t\t\t\tbestCost = mCostList[(y-1)*mWidth+x];\n\t\t\t\t\tbestY = y-1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(y < mHeight-1)\n\t\t\t{\n\t\t\t\tif(mCostList[(y+1)*mWidth+x] < bestCost)\n\t\t\t\t{\n\t\t\t\t\tbestCost = mCostList[(y+1)*mWidth+x];\n\t\t\t\t\tbestY = y+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\ty = bestY;\n\t\t}\n\n\t\treturn path;\n }", "private int goToNextRow(int x, int y, int[] borders) {\n System.out.println(\"down\" + x + \":\"+ y);\n// if(Math.floor(diameter) == 1) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// return y;\n// }\n//\n// while((millingPathArr[x][y - overlappingVar]==0 || millingPathArr[x][y - overlappingVar + 1]==0) && !(y > borders[2])) {\n// int z = highestLayerImg[x][y];\n// System.out.println(y);\n// millingPath.add(new Pixel(x, y, z));\n// int o = y - overlappingVar;\n// millingPathArr[x][y] = 2; //used for going to next row\n// y++;\n// }\n for(int i = 0; i < (diameter/2) ; i++) {\n int z = highestLayerImg[x][y];\n //System.out.println(y);\n if(y > borders[2]) {\n break;\n }\n millingPath.add(new BL_Pixel(x, y, z));\n millingPathArr[x][y] = 2; //used for going to next row\n y++;\n }\n //System.out.println(\"down\");\n return y;\n }", "private static void longestIncPath(int[][] matrix) {\n\t\t \n\t\t int total_elem = matrix.length * (matrix[0].length);\n\t ArrayList<ArrayList<Integer>> g = new ArrayList<ArrayList<Integer>>();\n\t int[] outdegree = new int[total_elem];\n\t int[][] dp = new int[matrix.length][matrix[0].length];\n\t int m = matrix[0].length;\n\t \n\t for(int i=0;i<matrix.length;i++){\n\t for(int j=0;j<matrix[0].length;j++){\n\t \tg.add(new ArrayList<Integer>());\n\t }\n\t }\n\t \n\t for(int i=0;i<matrix.length;i++){\n\t for(int j=0;j<matrix[0].length;j++){\n\t \n\t int left=-1;\n\t int right=-1;\n\t int up=-1;\n\t int down=-1;\n\t int curr = matrix[i][j];\n\t if(j-1>=0)\n\t left = matrix[i][j-1]; \n\t if(j+1<matrix[0].length)\n\t right = matrix[i][j+1];\n\t if(i-1>=0)\n\t up=matrix[i-1][j];\n\t if(i+1<matrix.length)\n\t down=matrix[i+1][j];\n\t \n\t if(left!=-1 && curr>left)\n\t addedge(g,(m*i+(j-1)),(m*i+j),outdegree);\n\t if(right!=-1 && curr>right)\n\t addedge(g,(m*i+(j+1)),(m*i+j),outdegree);\n\t if(up!=-1 && curr>up)\n\t addedge(g,(m*(i-1)+j),(m*i+j),outdegree);\n\t if(down!=-1 && curr>down)\n\t addedge(g,(m*(i+1)+j),(m*i+j),outdegree);\n\t \n\t \n\t }\n\t }\n\t \n\t Queue<Integer> q = new LinkedList<Integer>();\n\t \n\t for(int i:outdegree){\n\t if(i==0)\n\t q.add(i);\n\t }\n\t \n\t \n\t while(!q.isEmpty()){\n\t int temp = q.poll();\n\t int r = temp/m;\n\t int c = temp - r*m;\n\t int max=0;\n\t \n\t for(int i:g.get(temp)){\n\t int row = i/m;\n\t int col = i - r*m;\n\t max=Math.max(max,dp[row][col]+1);\n\t outdegree[i]--;\n\t if(outdegree[i]==0)\n\t q.add(i);\n\t }\n\t \n\t dp[r][c]=max;\n\t }\n\t \n\t\t\n\t}", "private LinkedList<Cell> findAugmentedPath(int row, LinkedList<Cell> head){\n LinkedList<Cell> resultPoints = new LinkedList<>();\n for (int j = 0; j < cols; j++) {\n if(j != chosenInRow[row] && source[row][j] == 0) {\n int chosenRowForJ = chosenInCol[j];\n\n if(head.contains(new Cell(chosenRowForJ, j)))\n continue;\n\n resultPoints.add(new Cell(row, j));\n if(chosenRowForJ < 0)\n return resultPoints;\n\n resultPoints.add(new Cell(chosenRowForJ, j));\n head.addAll(resultPoints);\n\n LinkedList<Cell> tail = findAugmentedPath(chosenRowForJ, head);\n if(tail.isEmpty()) {\n resultPoints.remove(resultPoints.getLast());\n resultPoints.remove(resultPoints.getLast());\n continue;\n }\n resultPoints.addAll(tail);\n return resultPoints;\n }\n }\n return resultPoints;\n }", "static int paths_dp(int[][] matrix) {\n\t\tint n = matrix.length;\n\t\tint m = matrix[0].length;\n\t\t\n\t\tint[][] dp = new int[n][m];\n\t\tdp[0][0] = matrix[0][0] == 1? 0 : 1;\n\t\t\n\t\tfor(int i = 1; i < m; i++) {\n\t\t\tif(matrix[0][i] == 1) {\n\t\t\t\tdp[0][i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdp[0][i] = dp[0][i-1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tif(matrix[i][0] == 1) {\n\t\t\t\tdp[i][0] = 0;\n\t\t\t} else {\n\t\t\t\tdp[i][0] = dp[i-1][0];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i = 1; i < n; i++) {\n\t\t\tfor(int j = 1; j < m; j++) {\n\t\t\t\tif(matrix[i][j] == 1 ) {\n\t\t\t\t\tdp[i][j] = 0;\n\t\t\t\t} else {\n\t\t\t\t\tdp[i][j] = dp[i-1][j] + dp[i][j+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[n-1][m-1];\n\t}", "void leastCostPaths() {\t\n\t\tfor( int k = 0; k < N; k++ )\n\t\t\tfor( int i = 0; i < N; i++ )\n\t\t\t\tif( defined[i][k] )\n\t\t\t\t\tfor( int j = 0; j < N; j++ )\n\t\t\t\t\t\tif( defined[k][j]\n\t\t\t\t\t\t\t\t&& (!defined[i][j] || c[i][j] > c[i][k]+c[k][j]) ) {\t\n\t\t\t\t\t\t\tpath[i][j] = path[i][k];\n\t\t\t\t\t\t\tc[i][j] = c[i][k]+c[k][j];\n\t\t\t\t\t\t\tdefined[i][j] = true;\n\t\t\t\t\t\t\tif( i == j && c[i][j] < 0 ) return; // stop on negative cycle\n\t\t\t\t\t\t}\n\t}", "@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}", "public boolean isLegalDiag(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\t\n\t\tPlayer toMove;\n\t\tPlayer oppo;\n\n\t\tint col, row;\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\n\t\t\tcol = curPos.getWhitePosition().getTile().getColumn();\n\t\t\trow = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\ttoMove = white;\n\t\t\toppo = currentGame.getBlackPlayer();\n\t\t} else {\n\t\t\tcol = curPos.getBlackPosition().getTile().getColumn();\n\t\t\trow = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\toppo = white;\n\t\t\ttoMove = currentGame.getBlackPlayer();\n\t\t}\n\t\t\n\t\tif (dir == MoveDirection.NorthEast) {\n\t\t\tif(col==9 || row ==1) return false;\n\t\t} else if(dir == MoveDirection.NorthWest) {\n\t\t\tif(col==1 || row ==1) return false;\n\t\t} else if(dir == MoveDirection.SouthEast) {\n\t\t\tif(col==9 || row ==9) return false;\n\t\t} else if(dir == MoveDirection.SouthWest) {\n\t\t\tif(col==1 || row ==9) return false;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Tiles are drawn by row then by column. 0= row1 col1, \n\t\t\n\t\t//Checking the has opponent first\n\t\tboolean correct = false;\n\t\t//Check down\n\t\tif(QuoridorController.hasOpponent(1, 0)) {\n\t\t\tif(QuoridorController.noWallBlock(toMove, 1, 0)) {\n\t\t\t\tif(QuoridorController.noWallBlock(oppo, 1, 0) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, 0, -1)) {\n\t\t\t\t\t\t//Jump diagonal- check left\n\t\t\t\t\t\tif(dir == MoveDirection.SouthWest) return true;\n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, 0, 1)) {\n\t\t\t\t\t\t//Jump diagonal- check right\n\t\t\t\t\t\tif(dir == MoveDirection.SouthEast) return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t//Check up\n\t\t} else if(QuoridorController.hasOpponent(-1, 0)) {\n\t\t\tif(QuoridorController.noWallBlock(toMove, -1, 0)) {\n\t\t\t\tif(QuoridorController.noWallBlock(oppo, -1, 0) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, 0, -1)) {\n\t\t\t\t\t\t//Jump diagonal- check left\n\t\t\t\t\t\tif(dir == MoveDirection.NorthWest) return true;\n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, 0, 1)) {\n\t\t\t\t\t\t//Jump diagonal- check right\n\t\t\t\t\t\tif(dir == MoveDirection.NorthEast) return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t//Check right\n\t\t} else if(QuoridorController.hasOpponent(0, 1)) {\n\t\t\tif(QuoridorController.noWallBlock(toMove, 0, 1)) {\n\t\t\t\tif(QuoridorController.noWallBlock(oppo, 0, 1) ) {\n\t\t\t\t\t//Jump straight allowed\n\t\t\t\t\treturn false;\t\n\t\t\t\t} else {\n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, -1, 0)) {\n\t\t\t\t\t\t//Jump diagonal- check up\n\t\t\t\t\t\tif(dir == MoveDirection.NorthEast) return true;\n\t\t\t\t\t} \n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, 1, 0)) {\n\t\t\t\t\t\t//Jump diagonal- check down\n\t\t\t\t\t\tif(dir == MoveDirection.SouthEast) return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t//Check left\n\t\t} else if(QuoridorController.hasOpponent(0, -1)) {\n\t\t\tif(QuoridorController.noWallBlock(toMove, 0, -1)) {\n\t\t\t\tif(QuoridorController.noWallBlock(oppo, 0, -1) ) {\n\t\t\t\t\t//Jump straight allowed\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, -1, 0)) {\n\t\t\t\t\t\t//Jump diagonal- check up\n\t\t\t\t\t\tif(dir == MoveDirection.NorthWest) return true;\n\t\t\t\t\t} \n\t\t\t\t\tif(QuoridorController.noWallBlock(oppo, 1, 0)) {\n\t\t\t\t\t\t//Jump diagonal- check down\n\t\t\t\t\t\tif(dir == MoveDirection.SouthWest) return true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\r\n }", "public void dirigirHaciaPunto(int x, int y){ \r\n\r\n\tint coordenadaXObjetivo;\r\n\tint coordenadaYObjetivo;\r\n\tint distanciaEnX;\r\n\tint distanciaEnY;\r\n\tint incrementoDesplazamiento = 1;\t\t\r\n\t\t\t\t\t\t\r\n\tcoordenadaXObjetivo = x;\t\r\n\tdistanciaEnX = coordenadaXObjetivo - this.x;\r\n\t\t\t\t\t\r\n\tcoordenadaYObjetivo = y;\t\r\n\tdistanciaEnY = coordenadaYObjetivo - this.y;\r\n\t\r\n\tif(distanciaEnX <= 0){\r\n\t\tif (distanciaEnX == 0){\r\n\t\t\tif(distanciaEnY < 0){\r\n\t\t\t\tthis.y -= incrementoDesplazamiento; \r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t\r\n\t\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\tif(distanciaEnY <= 0){\r\n\t\t\t\tif(distanciaEnY == 0){\r\n\t\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\t\tthis.y -= incrementoDesplazamiento;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tthis.x -= incrementoDesplazamiento;\r\n\t\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\telse{\r\n\t\tif(distanciaEnY <= 0){\r\n\t\t\tif(distanciaEnY == 0){\r\n\t\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse{\r\n\t\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\t\tthis.y -= incrementoDesplazamiento;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\tthis.x +=incrementoDesplazamiento;\r\n\t\t\tthis.y += incrementoDesplazamiento;\r\n\t\t}\r\n\t}\r\n\t\r\n\tif((this.x >= x - incrementoDesplazamiento) && (this.x <= x + incrementoDesplazamiento) && \r\n\t\t\t(this.y >= y - incrementoDesplazamiento) && (this.y <= y + incrementoDesplazamiento)){\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tthis.entroAlCirculo = true;\r\n\t\t\r\n\t\t}\t\t\t\t\t\t\t\t\t\r\n\t}", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "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 }", "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 boolean line(float x0, float y0, float x1, float y1)\r\n/* 355: */ {\r\n/* 356:412 */ float dx = Math.abs(x1 - x0);\r\n/* 357:413 */ float dy = Math.abs(y1 - y0);\r\n/* 358: */ int sx;\r\n/* 359: */ int sx;\r\n/* 360:416 */ if (x0 < x1) {\r\n/* 361:418 */ sx = 1;\r\n/* 362: */ } else {\r\n/* 363:421 */ sx = -1;\r\n/* 364: */ }\r\n/* 365: */ int sy;\r\n/* 366: */ int sy;\r\n/* 367:423 */ if (y0 < y1) {\r\n/* 368:425 */ sy = 1;\r\n/* 369: */ } else {\r\n/* 370:429 */ sy = -1;\r\n/* 371: */ }\r\n/* 372:431 */ float err = dx - dy;\r\n/* 373:432 */ boolean line = true;\r\n/* 374:433 */ while (line)\r\n/* 375: */ {\r\n/* 376:435 */ float e2 = 2.0F * err;\r\n/* 377:437 */ if (e2 > -dy)\r\n/* 378: */ {\r\n/* 379:439 */ err -= dy;\r\n/* 380:440 */ x0 += sx;\r\n/* 381: */ }\r\n/* 382:442 */ if (e2 < dx)\r\n/* 383: */ {\r\n/* 384:444 */ err += dx;\r\n/* 385:445 */ y0 += sy;\r\n/* 386: */ }\r\n/* 387:448 */ line = tileWalkable(x0, y0);\r\n/* 388:451 */ if ((x0 == x1) && (y0 == y1)) {\r\n/* 389: */ break;\r\n/* 390: */ }\r\n/* 391:457 */ if (getAgentOnTile(x0, y0) != null) {\r\n/* 392:459 */ line = false;\r\n/* 393: */ }\r\n/* 394: */ }\r\n/* 395:465 */ return line;\r\n/* 396: */ }", "private int uniquePaths(int x, int y, int[][] dp) {\n \t\tif (x == 0 || y == 0) return 1;\n \t\tif (dp[x][y] == 0)\n \t\t\tdp[x][y] = uniquePaths(x - 1, y, dp) + uniquePaths(x, y - 1, dp);\n \t\treturn dp[x][y];\n \t}", "private void computePath(){\n LinkedStack<T> reversePath = new LinkedStack<T>();\n // adding end vertex to reversePath\n T current = end; // first node is the end one\n while (!current.equals(start)){\n reversePath.push(current); // adding current to path\n current = closestPredecessor[vertexIndex(current)]; // changing to closest predecessor to current\n }\n reversePath.push(current); // adding the start vertex\n \n while (!reversePath.isEmpty()){\n path.enqueue(reversePath.pop());\n }\n }", "public List<ArmConfig> splitDirectPath(ArmConfig init, ArmConfig goal){\n\t\t//System.out.println(path);\n\t\tArrayList<ArmConfig>result = new ArrayList<ArmConfig>();\n\t\tresult.add(init);\n\t\tArmConfig step = init;\n\t\tif(!isValidStep(init, goal)){\n\t\t\tAffineTransform af = new AffineTransform();\n\t\t\tdouble distX = goal.getBaseCenter().getX()- init.getBaseCenter().getX();\n\t\t\tdouble distY = goal.getBaseCenter().getY()- init.getBaseCenter().getY();\n\t\t\tint signX = (int) (distX/Math.abs(distX));\n\t\t\tint signY = (int)(distY/Math.abs(distY));\n\t\t\tList<Double> angleToCover = new ArrayList<Double>();\n\t\t\tfor(int i =0; i<goal.getJointCount();i++){\n\t\t\t\tangleToCover.add(goal.getJointAngles().get(i)-init.getJointAngles().get(i));\n\t\t\t}\n\t\t\t//need to change this so that only X or Y is changed\n\t\t\twhile(!isValidStep(step, goal)){\n\t\t\t\t//System.out.println(result);\n\t\t\t\tif(distY>=Sampler.CHAIR_STEP&& distX>=Sampler.CHAIR_STEP){\n\t\t\t\t\taf.setToTranslation(Sampler.CHAIR_STEP*signX, Sampler.CHAIR_STEP*signY);\n\t\t\t\t\tdistX=distX-Sampler.CHAIR_STEP;\n\t\t\t\t\tdistY= distY-Sampler.CHAIR_STEP;\n\t\t\t\t}else{\n\t\t\t\t\tif(distY>=Sampler.CHAIR_STEP&& distX<Sampler.CHAIR_STEP){\n\t\t\t\t\t\taf.setToTranslation(distX*signX, Sampler.CHAIR_STEP*signY);\n\t\t\t\t\t\tdistX=0;\n\t\t\t\t\t\tdistY=distY-Sampler.CHAIR_STEP;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tif(distY<Sampler.CHAIR_STEP&& distX>=Sampler.CHAIR_STEP){\n\t\t\t\t\t\taf.setToTranslation(Sampler.CHAIR_STEP*signX, distY*signY);\n\t\t\t\t\t\tdistX= distX-Sampler.CHAIR_STEP;\n\t\t\t\t\t\tdistY=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(distY<Sampler.CHAIR_STEP&& distX<Sampler.CHAIR_STEP){\n\t\t\t\t\t\taf.setToTranslation(distX*signX,distY*signY);\n\t\t\t\t\t\tdistX=0;\n\t\t\t\t\t\tdistY=0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t Point2D base = new Point2D.Double();\n\t\t\t\t if(af.getTranslateX()!=0 && af.getTranslateY()!=0){\n\t\t\t\t\t if(Math.random()>0.5){\n\t\t\t\t\t\t distY+=af.getTranslateY();\n\t\t\t\t\t\t af.setToTranslation(af.getTranslateX(), 0);\n\t\t\t\t\t }else{\n\t\t\t\t\t\t distX+= af.getTranslateX();\n\t\t\t\t\t\t af.setToTranslation(0, af.getTranslateY());\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t af.transform(step.getBaseCenter(), base);\n\t\t\t\t List<Double>rotate = new ArrayList<Double>();\n\t\t\t\t for(int i =0;i<angleToCover.size();i++){\n\t\t\t\t\t double remaining = angleToCover.get(i);\n\t\t\t\t\t if(remaining<Sampler.ANGLE_STEP){\n\t\t\t\t\t \trotate.add(step.getJointAngles().get(i)+remaining);\n\t\t\t\t\t}else{\n\t\t\t\t\t\trotate.add(step.getJointAngles().get(i)+Sampler.ANGLE_STEP);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t ArmConfig nextStep = new ArmConfig(base,rotate);\n\t\t\t\t result.add(nextStep);\n\t\t\t\t step = nextStep;\n\t\t\t}\n\t\t}\n\t\tresult.add(goal);\n\t\treturn result;\n\t\t\t \n\t}", "public Square[] buildPath(GameBoard board, Player player) {\n\n // flag to check if we hit a goal location\n boolean goalVertex = false;\n\n // Queue of vertices to be checked\n Queue<Vertex> q = new LinkedList<Vertex>();\n\n // set each vertex to have a distance of -1\n for ( int i = 0; i < graph.length; i++ )\n graph[i] = new Vertex(i,-1);\n\n // get the start location, i.e. the player's location\n Vertex start = \n squareToVertex(board.getPlayerLoc(player.getPlayerNo()));\n start.dist = 0;\n q.add(start);\n\n // while there are still vertices to check\n while ( !goalVertex ) {\n\n // get the vertex and remove it;\n // we don't want to look at it again\n Vertex v = q.remove();\n\n // check if this vertex is at a goal row\n switch ( player.getPlayerNo() ) {\n case 0: if ( v.graphLoc >= 72 ) \n goalVertex = true; break;\n case 1: if ( v.graphLoc <= 8 ) \n goalVertex = true; break;\n case 2: if ( (v.graphLoc+1) % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n case 3: if ( v.graphLoc % GameBoard.COLUMNS == 0 )\n goalVertex = true; break;\n }\n\n // if we're at a goal vertex, we don't need to calculate\n // its neighboors\n if ( !goalVertex ) {\n\n // retrieve all reachable ajacencies\n Square[] adjacencies = reachableAdjacentSquares\n (board, vertexToSquare(v, board), player.getPlayerNo());\n\n // for each adjacency...\n for ( Square s : adjacencies ) {\n\n // convert to graph location\n Vertex adjacent = squareToVertex(s); \n\n // modify the vertex if it hasn't been modified\n if ( adjacent.dist < 0 ) {\n adjacent.dist = v.dist+1;\n adjacent.path = v;\n q.add(adjacent);\n }\n }\n\n }\n else\n return returnPath(v,board);\n \n }\n // should never get here\n return null;\n }", "public int checkPathCo(View v, Position pos) {\n\t\tint check = 1;\n\t\tint x = pos.getX();\n\t\tint y = pos.getY();\n\t\t\n\t\ttry {\n\t\t\tif (y == 0 || x == 0)\n\t\t\t\tcheck = 1;\n\t\t\telse\n\t\t\t\tcheck = pathCo[x][y];\n\t\t}\n\t\tcatch (ArrayIndexOutOfBoundsException e) {\n\t\t\tToast.makeText(v.getContext(),\"Out of bounds. Tower cannot be placed here\",Toast.LENGTH_SHORT).show();\n\t\t}\n\t\t\n\t\treturn check;\n\t}", "private String[][] pathFinder(int currentX, int currentY, Level level) {\n\t\tint[] dr = {-1,1,0,0};\n\t\tint[] dc = {0,0,1,-1};\n\t\tQueue<int[]> bfs = new LinkedList<int[]>();\n\t\tbfs.add(new int[] {currentX,currentY});\n\t\tboolean[][] passed = new boolean[level.getWidth()+2][level.getHeight()+2];\n\t\tfor (int x = 0; x < level.getHeight(); x++) {\n\t\t\tfor (int y = 0; y < level.getWidth(); y++) {\n\t\t\t\tpassed[y][x] = false;\n\t\t\t}\n\t\t} passed[currentX][currentY] = true;\n\t\tString[][] prev = new String[level.getWidth()][level.getHeight()];\n\t\tfor (int x = 0; x < level.getHeight(); x++) {\n\t\t\tfor (int y = 0; y < level.getWidth(); y++) {\n\t\t\t\tprev[y][x] = null;\n\t\t\t}\n\t\t}while (!bfs.isEmpty()) {\n\t\t\tint[] node = bfs.remove();\n\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\tint rr = node[0] + dr[i];\n\t\t\t\tint cc = node[1] + dc[i];\n\t\t\t\tif (level.getTiles()[rr][cc] instanceof Water && !passed[rr][cc]) {\n\t\t\t\t\tbfs.add(new int[] {rr,cc});\n\t\t\t\t\tpassed[rr][cc] = true;\n\t\t\t\t\tprev[rr][cc] = (Integer.toString(node[0]).concat(\",\").concat(Integer.toString(node[1])));\n\t\t\t\t}\n\t\t\t}\n\t\t} return prev;\n\t}", "public static boolean getPath(int row, int col, ArrayList<Point> path, ArrayList<Point> fails){\n\t\tif(row == 0 && col == 0){ //origin\n\t\t\tpath.add(new Point(row, col));\n\t\t\treturn true; //if we've made it here from the target space, then a working path was found!\n\t\t}\n\n\t\t//validating the desired grid location\n\t\tif(row < grid.length && col < grid[0].length && row >= 0 && col >= 0){\n\t\t\tif(!fails.contains(new Point(row, col))){\n\t\t\t\t//if either of the above or left adjacent squares to this current one have a path to it, then this current one does!\n\t\t\t\t//remember that the robot can only move down and right\n\t\t\t\tif(getPath(row-1, col, path, fails)){\n\t\t\t\t\tpath.add(new Point(row, col));\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse if(getPath(row, col-1, path, fails)){\n\t\t\t\t\tpath.add(new Point(row, col));\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if this line is reached, there was no valid path to the desired point so add it to our fails list and return false\n\t\t\tfails.add(new Point(row, col));\n\t\t}\n\t\treturn false;\n\t}", "public int[][] isAnyPath(/*int [] Start, int[] End,*/Board B) {\r\n \t//Trace Moveset, determine if moveset is valid for current position [Exceptions are knight, which can move OVER pieces\r\n \t//As long as knight's ending position is not taken.\r\n \t//If Pawn\r\n \t\r\n \t//8X8 Board\r\n \t//int BoundR = 8;\r\n \t//int BoundC = 8;\r\n \t\r\n \t//int[][]Seq = null;\r\n \t\r\n \t//int[][]C_ = null;\r\n \t\r\n \t//LinkedList<int[]> L = new LinkedList<int []>();\r\n \t\r\n \tint Max_Mv_ln = 0;\r\n \tfor(int k=0;k<this.Movesets.length;k++) {\r\n \t\tSystem.out.printf(\"Compare Mx %s\\n\",this.Movesets[k]);\r\n \t\tif(this.Movesets[k]!=null)\r\n \t\tif(this.Movesets[k].toCharArray().length>Max_Mv_ln) {\r\n \t\t\tMax_Mv_ln = this.Movesets[k].toCharArray().length;\r\n \t\t}\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"Maximum Move Size for Piece:%c,%d:\",this.type,Max_Mv_ln);\r\n \t\r\n \t//Each row is a moveset, each column is sets of two integers corresponding \r\n \t//to each move position\r\n \t\r\n \t//List of Path Sequence freedoms for each moveset of this PIECE \r\n \tLinkedList<int[][]> LAll = new LinkedList<int[][]>();\r\n \t\r\n \t//int Ct = 0;\r\n \t\r\n \tfor(int i=0;i<this.Movesets.length;i++) { \r\n \t//Found MoveSet[ith]\r\n \t\tif(this.Movesets[i]!=null) {\r\n \tchar []Mv = this.Movesets[i].toCharArray();\r\n \tint [] C2 = null;\r\n \tint[][]C = new int[Mv.length][1];\r\n \tSystem.out.printf(\"\\n\\nAnalyze Moveset:%s\\n\\n\", this.Movesets[i]);\r\n \tfor(int j=0;j<Mv.length;j++) {\r\n \t//Iterate through each movement pattern\r\n //Return Collision list of endpoints for pieces\r\n \tif(Mv[j]=='R'||Mv[j]=='D'||Mv[j]=='L'||Mv[j]=='U') {\r\n \t\t\r\n \t\tchar v = Character.toLowerCase(Mv[j]);\r\n \t\r\n \t}\r\n \t\r\n \telse {\r\n \t\tif(this.type=='k'&&j<Mv.length-2) {\r\n \t\t\tif(j>0)\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,true,C[j-1]);\r\n \t\t\telse\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,true,null);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tif(j>0)\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,false,C[j-1]);\r\n \t\t\telse\r\n \t\t\tC2 = Collisions(Mv[j],Mv[j+1],/*Start,End,*/B,false,null);\r\n \t\t\t\r\n \t\t}\r\n \t\tj++;\r\n \t\r\n \t}\r\n \t\r\n \tif(C2==null) {\r\n \t\t//MoveSet failed, on to next moveset for piece...\r\n \t\tC=null;\r\n \t\tbreak;\r\n \t}\r\n \telse {\r\n \t\t\r\n \t\tif(C2[0]<0) {\r\n \t\t\tC = null;\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tC[j] = C2;//ReSize(C2,LengthMvSet(this.Movesets[i]));\r\n \t\t//Ct++;\r\n \t\t//System.out.println(\"Add Moveset:\\n\");\r\n \t\t//PrintAll(C2,(C2.length/2));\r\n \t\t//PrintAll(C2,LengthMvSet(this.Movesets[i]));\r\n \t\t//C[j].length = (C[j].length/2)+6;\r\n \t\t//Ct++;\r\n \t}\r\n \t\r\n \t}\r\n \t//Add Path seq possibilities to list\r\n \tLAll.add(C);\r\n \t//System.out.println(\"Add Moveset:\\n\");\r\n \t/*\r\n \tif(C2!=null)\r\n \tPrintAll(C2,(C2.length/2)//+6//);\r\n \t*/\r\n \t}\r\n \t}\r\n \t\r\n \tSystem.out.printf(\"\\nALL possible paths for piece %c in position [%d,%d]\\n\",this.type,this.Position[0],this.Position[1]);\r\n \t\r\n \t//Object[] A = LAll.toArray();\r\n \tSystem.out.printf(\"LENGTH Of LIST:%d\", LAll.toArray().length);\r\n \t\r\n \tint [] E = new int[2];\r\n \t\r\n \tint[][] EAll = new int[this.Movesets.length][1];\r\n \t\r\n \tfor(int i=0;i<LAll.toArray().length;i++) {\r\n \t\tSystem.out.printf(\"Player %c Possibilities for %d Moveset:%s\\n\",super.Player,i,this.Movesets[i]);\r\n \t\tint[][]C2 = LAll.get(i);\r\n \t\tif(C2!=null) {\r\n \t\t\tfor(int k=0; k<C2.length;k++) {\r\n \t\t\t//System.out.printf(\"Length of this moveset: %d\\n\",LengthMvSet(this.Movesets[i]));\r\n \t\t\tif(C2[k]!=null) {\r\n \t\t\tfor(int l=0; l<(C2[k].length/2);l=l+2) {\r\n \t\t\t\tSystem.out.printf(\"[%d,%d]\\n\", C2[k][l], C2[k][l+1]);\r\n \t\t\t\tif(l==0) {\r\n \t\t\t\t\t//System.out.printf(\"Effective position to Traverse to: [%d,%d]\\n\", LastElem(C2)[l],LastElem(C2)[l+1]);\r\n \t\t\t\t\tE = C2[k];\r\n \t\t\t\t\t//E[0] = C2[k][0];\r\n \t\t\t\t\t//E[1] = C2[k][1];\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\t//PrintAll(C2[k],(C2[k].length/2));\r\n \t\t\t}\r\n \t\t}\r\n \t\t\tEAll[i] = E;\r\n \t\t\tSystem.out.printf(\"Effective position to Traverse to: [%d,%d]\\n\",E[0],E[1]);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tSystem.out.println(\"NO Effective Position to Traverse to!\");\r\n \t\t}\r\n \t}\r\n \t\r\n \t//System.out.printf(\"Effective Position to Traverse to: [%d,%d]\", LAll.get(LAll.size()-1)[LAll.get(LAll.size()-1).length-1][0],LAll.get(LAll.size()-1)[LAll.get(LAll.size()-1).length-1][1]);\r\n \t\r\n \t\r\n \treturn EAll;\r\n }", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length; i++) {\n if(found) {\n break;\n }\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n break;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "public static void pathMethod (int x, int y, int rows, int columns, int startPointX, int startPointY, int endPointX, int endPointY, String [][]copyArray, String [][]realArray, int decider) throws Exception{ \r\n \r\n String up = copyArray[y-1][x];\r\n String down = copyArray[y+1][x];\r\n String right = copyArray[y][x+1]; //moves the coordinate up one, down one, right one, left one and stores it into up down left right; \r\n String left = copyArray[y][x-1];\r\n \r\n if(up.equals(\"X\")||down.equals(\"X\")||right.equals(\"X\")||left.equals(\"X\")){ //if up right left or down is equal to the endpoint, the maze is solvable, and we can now print the final array\r\n System.out.println(\"\\nThe maze is solvable!\");\r\n// printFinalArray(realArray, counter, xvalues, yvalues); //solution is found already - sends back to another method to print final solution\r\n regenerate(decider); //then sends to regenerate method where it asks if user would like to create another maze\r\n }\r\n \r\n else if(copyArray[startPointY+1][startPointX].equals(\"B\")&&copyArray[startPointY-1][startPointX].equals(\"B\")&&copyArray[startPointY][startPointX+1].equals(\"B\")&&copyArray[startPointY][startPointX-1].equals(\"B\")){\r\n \r\n System.out.println(\"\\nSorry, your maze is unsolvable.\\n\\n\"); //if at the start point we cannot go up down left or right - no possible moves - not solvable - end of maze \r\n regenerate(decider); //call the method that gives users the option to recreate the maze if it was unsolvable \r\n } \r\n \r\n else if(up.equals(\"O\")){ //if the coordinate in the up direction is O\r\n counter=counter+1; //incrementing counter so we can input it the coordinate arrays\r\n copyArray[y][x] = \"V\"; //changing the values to 'V' so we can know that we already visited it\r\n y=y-1; //moving coordinate up one \r\n xvalues[counter]=x; //storing this coordinate into the arrays with the counter\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //recalling method\r\n }\r\n \r\n else if(down.equals(\"O\")){ //if down = O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n y=y+1; \r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(right.equals(\"O\")){ //if right equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x+1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(left.equals(\"O\")){ //if left equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x-1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else { //if neither up down left or right work\r\n for(int i = 0; i<rows; i++){ //makes all the 'V's go back to O\r\n for(int j = 0; j<columns; j++){\r\n if(copyArray[i][j].equals(\"V\")){\r\n copyArray[i][j] = \"O\";\r\n }\r\n }\r\n }\r\n copyArray[y][x] = \"B\"; //make the coordinate that you cant make a move with B, so it shortens the possible path options\r\n for(int i = 0 ; i<counter; i++){\r\n xvalues[i] = 0; //resets the coordinate arrays back to 0\r\n yvalues[i] = 0;\r\n }\r\n counter=0; //resets counter back to 0;\r\n pathMethod(startPointX, startPointY, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //resends the startpoints instead of x and y; only thing different is that one coordinate is now marked \"B\"\r\n } \r\n }", "public static String findPath(Maze maze) {\n \tint m = maze.getNumRows();\n \tint n = maze.getNumCols();\n\n \t//define a visited matrix\n \tboolean[][] visited = new boolean[m][n];\n \tsetvisited(false, visited);\n\n \t//define a direction matrix\n \tint[][] dir_mtr = new int[m][n];\n \tinit_dir(-1,dir_mtr);\n\n\n\n \t//define a stack\n \tStack<MazeLocation> s;\n \ts = new StackRefBased<MazeLocation>();\n\n \tMazeLocation entry = maze.getEntry();\n \tMazeLocation exit = maze.getExit();\n \t// System.out.println(entry.toString());\n \ts.push(entry);\n\n\t\tMazeLocation temp; \n\t\tString result = \"\"; \t\n\n\t\ttry{\n\t\t\tint x,y;\n\n\n\t\t\twhile(!s.isEmpty()){\n\n \t\ttemp = s.peek();\n \t\tx = temp.getRow();\n \t\ty = temp.getCol();\n \t\tdir_mtr[x][y]+=1;\n\n \t\tif(temp.toString().equals(exit.toString())){\n \t\t\tSystem.out.println(\"find the path\");\n \t\t\tbreak;\n\n \t\t}\n\n \t\tif(dir_mtr[x][y]==0){ \n \t\t\t//checking the up direction\n \t\t\tif(x-1>=0 && !maze.isWall(x-1,y) && !visited[x-1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x-1,y,maze.isWall(x-1,y));\n \t\t\t\tvisited[x-1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==1){\n \t\t\t//checking the left direction\n \t\t\tif(y-1>=0 && !maze.isWall(x,y-1) && !visited[x][y-1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y-1,maze.isWall(x,y-1));\n \t\t\t\tvisited[x][y-1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==2){\n \t\t\t//checking the down direction\n \t\t\tif(x+1<m && !maze.isWall(x+1,y) && !visited[x+1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x+1,y,maze.isWall(x+1,y));\n \t\t\t\tvisited[x+1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else if(dir_mtr[x][y]==3){\n \t\t\t//checking the right direction\n \t\t\tif(y+1<n && !maze.isWall(x,y+1) && !visited[x][y+1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y+1,maze.isWall(x,y+1));\n \t\t\t\tvisited[x][y+1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else{\n \t\t\tvisited[x][y] = false;\n \t\t\ts.pop();\n \t\t}\n\n\n\n \t\t\n \t}\n\n \t//reverse the stack\n \tStack<MazeLocation> reverse;\n \treverse = new StackRefBased<MazeLocation>();\n \twhile(!s.isEmpty()){\n\t\t\t reverse.push(s.pop()); \t//push the node to the reverse stack\n\t\t\t }\n\n\n \t//if the stack is not empty, then we find the path\n\t\tif(!reverse.isEmpty()){\n\t\t\tresult = reverse.toString();\n\n\t\t}\n\n \t\n \n\n\t\t}\n\t\tcatch (StackEmptyException see) {\n \n }\n\n\n \treturn result;\n\n\n }", "private static void dfs(int x, int y) {\n arr[x][y] = 1;\n area++;\n \n for(int i=0; i<4; i++) {\n int nx = x + dx[i];\n int ny = y + dy[i];\n \n if(0 <= nx && nx < m && 0 <= ny && ny < n) {\n if(arr[nx][ny] == 0)\n dfs(nx, ny);\n }\n }\n\t\t\n\t}", "public boolean checkDiagonal() {\r\n\t\tif (p1[0] + p1[4] + p1[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p1[2] + p1[4] + p1[6] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[0] + p2[4] + p2[8] == 15)\r\n\t\t\treturn true;\r\n\t\telse if (p2[2] + p2[4] + p2[6] == 15)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public int shortestBridge(int[][] A) {\n for(int i = 0; i < A.length && !found; i++) {\n for(int j = 0; j < A[0].length && !found; j++) {\n if(A[i][j] == 1) {\n helper(A, i, j);\n found = true;\n }\n }\n }\n // Put all '2' into queue as candidate initial start points\n Queue<int[]> q = new LinkedList<int[]>();\n for(int i = 0; i < A.length; i++) {\n for(int j = 0; j < A[0].length; j++) {\n if(A[i][j] == 2) {\n q.offer(new int[] {i, j});\n }\n }\n }\n int distance = 0;\n while(!q.isEmpty()) {\n int size = q.size();\n for(int i = 0; i < size; i++) {\n int[] cur = q.poll();\n for(int j = 0; j < 4; j++) {\n int new_x = cur[0] + dx[j];\n int new_y = cur[1] + dy[j];\n if(new_x >= 0 && new_x < A.length && new_y >= 0 && new_y < A[0].length) {\n if(A[new_x][new_y] == 1) {\n return distance;\n } else if(A[new_x][new_y] == 0) {\n // Update from 0 to 2 which means expand first island boundary\n // which also avoid using visited to check\n A[new_x][new_y] = 2;\n q.offer(new int[] {new_x, new_y});\n }\n }\n }\n }\n distance++;\n }\n return distance;\n }", "static int paths_usingRecursion(int[][] matrix) {\n\t\treturn paths(matrix, 0, 0);\n\t}", "private String computeAirPath(Position source, Position destination) {\n\n\t\t\t\tboolean toRight = false;\n\t\t\t\tboolean toBottom = false;\n\n\t\t\t\tint xSteps = source.getColumn() - destination.getColumn();\n\t\t\t\tint ySteps = source.getRow() - destination.getRow();\n\n\t\t\t\tif (xSteps < 0) {\n\t\t\t\t\ttoRight = true;\n\t\t\t\t}\n\n\t\t\t\tif (ySteps < 0) {\n\t\t\t\t\ttoBottom = true;\n\t\t\t\t}\n\n\t\t\t\tString path = \"\";\n\n\t\t\t\tfor (int i = 0; i < Math.abs(xSteps); i++) {\n\t\t\t\t\tif (toRight) {\n\t\t\t\t\t\tpath += \"\\u2192 \"; // right\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpath += \"\\u2190 \"; // left\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfor (int i = 0; i < Math.abs(ySteps); i++) {\n\t\t\t\t\tif (toBottom) {\n\t\t\t\t\t\tpath += \"\\u2193 \"; // down\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpath += \"\\u2191 \"; // up\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (Math.abs(xSteps) + Math.abs(ySteps) == 0) {\n\t\t\t\t\tpath = \"in place\";\n\t\t\t\t}\n\n\t\t\t\treturn path;\n\t\t\t}", "private boolean diagWin(){ \r\n\t\treturn ((checkValue (board[0][0],board[1][1],board[2][2]) == true) || \r\n\t\t\t\t(checkValue (board[0][2], board[1][1], board[2][0]) == true)); \r\n\t}", "private void findDetectivePath() {\n Cell current, next;\n detectivePath = new ArrayDeque<>();\n clearVisitedMarks();\n current = detective;\n current.visited = true;\n\n while (true) {\n next = nextNotVisitedCell(current);\n if (next == killer) {\n detectivePath.addLast(current);\n detectivePath.addLast(next);\n break;\n } else if (next != null) {\n detectivePath.addLast(current);\n current = next;\n current.visited = true;\n } else {\n current = detectivePath.pollLast();\n }\n }\n detectivePath.pollFirst();\n }", "private int[] nextDiagWin(){ \r\n\t\t//left diagonal\r\n\t\tif (board[0][0] == board[1][1] && board[2][2] == '-' && board[0][0] != '-'){\r\n\t\t\tdiagWin[0] = 2; \r\n\t\t\tdiagWin[1] = 2;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\telse if (board[1][1] == board[2][2] && board[0][0] == '-' && board[1][1] != '-'){\r\n\t\t\tdiagWin[0] = 0; \r\n\t\t\tdiagWin[1] = 0;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\telse if (board[0][0] == board[2][2] && board[1][1] == '-' && board[0][0] != '-'){\r\n\t\t\tdiagWin[0] = 1; \r\n\t\t\tdiagWin[1] = 1;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\t//right diagonal\r\n\t\telse if (board[0][2] == board[2][0] && board[1][1] == '-' && board[0][2] != '-'){\r\n\t\t\tdiagWin[0] = 1; \r\n\t\t\tdiagWin[1] = 1;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\telse if (board[0][2] == board[1][1] && board[2][0] == '-' && board[0][2] != '-'){\r\n\t\t\tdiagWin[0] = 2; \r\n\t\t\tdiagWin[1] = 0;\r\n\t\t\treturn diagWin;\r\n\t\t}\t\t\r\n\t\telse if (board[1][1] == board[2][0] && board[0][2] == '-' && board[1][1] != '-'){\r\n\t\t\tdiagWin[0] = 0; \r\n\t\t\tdiagWin[1] = 2;\r\n\t\t\treturn diagWin;\r\n\t\t}\r\n\t\treturn diagWin;\r\n\t}", "public boolean isPathClear() {\n \t\trecursiveDepth++;\n \t\tif (recursiveDepth >= 246) {\n \t\t\tatEndOfPathIsDetected();\n \t\t\tSystem.out.println(\"Path not clear\");\n \t\t\treturn false;\n \t\t}\n \t\tif (sensor.isObstacleDetected()) {\n \t\t\treturn isPathClear();\n \t\t}\n \t\tMotor.B.rotate(turn);\n \t\tSystem.out.println(\"Surveying\");\n \t\tif (Motor.B.getTachoCount() <= -45) {\n \t\t\tturn = +15;\n \t\t\treturn isPathClear();\n \t\t} else if (Motor.B.getTachoCount() >= 45) {\n \t\t\tSystem.out.println(\"Done Surveying!\");\n \t\t\tatEndOfPathIsDetected();\n \t\t\treturn true;\n \t\t} else {\n \t\t\treturn isPathClear();\n \t\t}\n \t}", "private boolean checkTopLeftDownDiag(char playerSymbol) {\n //checking the top left-bottom right diagonal\n for (int i = 0; i < N; i++) {\n if (grid[i][i].getSymbol() != playerSymbol) {\n return false;\n }\n }\n return true;\n }", "@Test\n public void notConnectedDueToRestrictions() {\n int sourceNorth = graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10).getEdge();\n int sourceSouth = graph.edge(0, 3).setDistance(2).set(speedEnc, 10, 10).getEdge();\n int targetNorth = graph.edge(1, 2).setDistance(3).set(speedEnc, 10, 10).getEdge();\n int targetSouth = graph.edge(3, 2).setDistance(4).set(speedEnc, 10, 10).getEdge();\n\n assertPath(calcPath(0, 2, sourceNorth, targetNorth), 0.4, 4, 400, nodes(0, 1, 2));\n assertNotFound(calcPath(0, 2, sourceNorth, targetSouth));\n assertNotFound(calcPath(0, 2, sourceSouth, targetNorth));\n assertPath(calcPath(0, 2, sourceSouth, targetSouth), 0.6, 6, 600, nodes(0, 3, 2));\n }", "public int checkPathCo(Position pos) {\n\t\tint check = 0;\n\t\tint x = pos.getX();\n\t\tint y = pos.getY();\n\t\t\n\t\ttry {\n\t\t\tif (y == 0 || x == 0)\n\t\t\t\tcheck = 1;\n\t\t\telse\n\t\t\t\tcheck = pathCo[x][y];\n\t\t}\n\t\tcatch (ArrayIndexOutOfBoundsException e) {\n\t\t\tLog.e(\"checking coordinates\", \"Out of bounds!\");\n\t\t}\n\t\t\n\t\treturn check;\n\t}", "public int longestIncreasingPath(int[][] matrix) {\n if (matrix == null || matrix.length == 0 || matrix[0] == null || matrix[0].length == 0) {\n return 0;\n }\n int m = matrix.length;\n int n = matrix[0].length;\n int[][] directions = new int[][]{{-1, 0}, {1, 0}, {0, -1}, {0, 1}};\n Map<Integer, Integer> map = new HashMap<>();\n Queue<Integer> queue = new LinkedList<>();\n //count indegree\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < n; j++) {\n int index = i * n + j;\n for (int[] dir : directions) {\n int x = i + dir[0], y = j + dir[1];\n if (x >= 0 && x < m && y >= 0 && y < n && matrix[x][y] < matrix[i][j]) {\n if (map.containsKey(index)) {\n map.put(index, map.get(index) + 1);\n } else {\n map.put(index, 1);\n }\n }\n }\n }\n }\n //find nodes whose indegree is zero\n for (int i = 0; i < m * n; i++) {\n if (!map.containsKey(i)) {\n queue.offer(i);\n }\n }\n int layers = 0;\n while (!queue.isEmpty()) {\n int size = queue.size();\n for (int k = 0; k < size; k++) {\n int index = queue.poll();\n int i = index / n, j = index % n;\n for (int[] dir : directions) {\n int x = i + dir[0], y = j + dir[1];\n if (x >= 0 && x < m && y >= 0 && y < n && matrix[x][y] > matrix[i][j]) {\n int neighbor = x * n + y;\n map.put(neighbor, map.get(neighbor) - 1);\n if (map.get(neighbor) == 0) {\n queue.offer(neighbor);\n }\n }\n }\n }\n layers++;\n }\n return layers;\n }", "public int uniquePathsWithObstacles(int[][] obstacleGrid) {\n int m = obstacleGrid.length;\n int n = obstacleGrid[0].length;\n if (obstacleGrid[0][0] == 1 || obstacleGrid[m - 1][n - 1] == 1) {\n return 0;\n }\n int[][] dp = new int[m][n];\n dp[0][0] = 1;\n for (int i = 1; i < n; i++) {\n if (obstacleGrid[0][i] == 1) {\n //if their is an obstacle, no path exist from start point\n dp[0][i] = 0;\n } else {\n //continue the result from the adjacent left point, if no path exist, it will get carried over\n dp[0][i] = dp[0][i - 1];\n }\n }\n for (int i = 1; i < n; i++) {\n if (obstacleGrid[i][0] == 1) {\n dp[i][0] = 0;\n } else {\n dp[i][0] = dp[i - 1][0];\n }\n }\n for (int i = 1; i < m; i++) {\n for (int j = 1; j < n; j++) {\n if (obstacleGrid[i][j] == 0) { //if no obstacle, check the no of ways to reach the top and left block\n dp[i][j] = dp[i - 1][j] + dp[i][j - 1];\n }\n }\n }\n return dp[m - 1][n - 1];\n }", "public ArrayList<String> shortenPath(ArrayList<String> path){\n int currentX = testFunction.startingX;\n int currentY = testFunction.startingY;\n ArrayList<ArrayList<Integer>> board = testFunction.board;\n for (int i = 0; i < path.size(); i++) {\n if(path.get(i).equals(\"U\")) currentY++;\n if(path.get(i).equals(\"D\")) currentY--;\n if(path.get(i).equals(\"L\")) currentX--;\n if(path.get(i).equals(\"R\")) currentX++;\n if(currentX < board.size() && currentY < board.get(0).size() && currentX >= 0 && currentY >= 0) {\n if (board.get(currentX).get(currentY) == 8) {\n ArrayList<String> shortPath = new ArrayList<>();\n for (int j = 0; j <= i; j++) {\n shortPath.add(path.get(j));\n }\n return shortPath;\n }\n }\n }\n return path;\n }", "public Coordinates choosePath(Actor robot) {\n\t\tCoordinates tempV = null;\n\t\tint tempDist = 0;\n\t\tboolean occupied = false;\n\t\ttempV = robot.getCoords();\n\t\tDirections dir = Directions.getDirection();\n\t\tswitch (dir) {\n\t\tcase RIGHT:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX() + 1, tempV.getY());\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX() - 1, tempV.getY());\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX() - 1, tempV.getY());\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX() + 1, tempV.getY());\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase DOWN:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() + 1);\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() - 1);\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\tcase UP:\n\t\t\tdo {\n\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() - 1);\n\t\t\t\tif (gameWorld.isTileFree(tempV) == false) {\n\t\t\t\t\toccupied = true;\n\t\t\t\t\ttempV = new Coordinates(tempV.getX(), tempV.getY() + 1);\n\t\t\t\t} else {\n\t\t\t\t\ttempDist = robot.getCoords().dst(tempV);\n\t\t\t\t\tif (tempDist == robot.getRange() - 1 || tempDist >= robot.getEnergy()) {\n\t\t\t\t\t\toccupied = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (occupied != true);\n\t\t\tbreak;\n\t\t}\n\n\t\treturn tempV;\n\t}", "private int diagonalCount() {\n\t\treturn Math.abs(destRow-curRow) > Math.abs(destCol-curCol) ?\n\t\t\t Math.abs(destCol-curCol) : Math.abs(destRow-curRow);\n\t}", "protected static void printPath(int[] thePath) {\r\n\t\t\r\n\t\tint[] orderedPath = new int[thePath.length];\r\n\t\r\n\t\tfor (int i = 0; i < thePath.length; i++)\r\n\t\t\torderedPath[i] = -1;\r\n\t\r\n\t\torderedPath[0] = myEndPole;\r\n\t\tint i = myEndPole;\r\n\t\tint j = 1;\r\n\t \r\n\t\twhile (true && j < orderedPath.length) {\t\r\n\t\t\tif (thePath[i] == -1 && i == START_POLE)\r\n\t\t\t\tbreak;\r\n\t\t\torderedPath[j] = thePath[i];\t\r\n\t\t\ti = thePath[i];\r\n\t\t\tj++;\r\n\t\t}\r\n\t\r\n\t\tSystem.out.print(\"The Shortest Path is \");\r\n\t\r\n\t\tfor (i = orderedPath.length - 1; i >= 0; i--) {\r\n\t\t\tif (orderedPath[i] == -1)\r\n\t\t\t\tcontinue;\r\n\t\t\tif (i == 0) {\r\n\t\t\t\tSystem.out.print((orderedPath[i] + 1));\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSystem.out.print((orderedPath[i] + 1) + \" -> \");\r\n\t\t}\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "void GenerateBoardPath() {\n\t\t\t\n\t\t\tint rows = board.getRowsNum();\n\t\t\tint columns = board.getColsNum();\n\t\t\tint space_number = 1; \n\t\t\t\n\t\t\t\n\t\t\tfor (int i = rows - 1; i >= 0; i--) \n\t\t\t\t//If the row is an odd-number, move L-R\n\t\t\t\tif (i % 2 != 0) {\n\t\t\t\t\tfor (int j = 0; j < columns; j++) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));}\n\t\t\t\telse {\n\t\t\t\t\tfor (int j = columns-1; j >=0; j--) \n\t\t\t\t\t\tBoardPathRepository.put(space_number++, board.getTile(i, j));\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t}", "void BackTrackBestPath(double[] delta_T_1,\n int[][] best,\n int[] best_path) {\n FindBestInLevel(delta_T_1, ((best_path)[T_-1]));\n for (int i = T_-2;i >= 0;i--) {\n (best_path)[i] = best[i+1][(best_path)[i+1]];\n }\n}", "private Square[] returnPath(Vertex v, GameBoard b) {\n // because we're starting at the end point,\n // we need build the path in 'reverse'\n Stack<Square> path = new Stack<Square>();\n\n // while we're not at the start point\n while ( v.dist != 0 ) {\n path.push(vertexToSquare(v,b));\n v = v.path;\n }\n\n // place the locations in the proper order\n Square[] road = new Square[path.size()];\n for ( int i = 0; i < path.size(); i++ )\n road[i] = path.pop();\n\n return road;\n }", "public void alignPath() {\n Waypoint first = path.get(0);\n Waypoint second = path.get(1);\n\n double m = (first.getY() - second.getY()) / (first.getX() - second.getX());\n double angle = Math.atan(m);\n\n Paths.rotate((Math.PI / 2) - angle, path);\n\n if(second.getY() < first.getY())\n Paths.rotate(Math.PI, path);\n }", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}", "protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\n }\n }", "public int uniquePathsWithObstacles2(int[][] obstacleGrid) {\n\t\tint R = obstacleGrid.length;\n\t\tint C = obstacleGrid[0].length;\n\n\t\t// The goal cell is obstacle. \n\t\tif (obstacleGrid[R - 1][C -1] == 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t// The number of ways of reaching to the goal is 1. \n\t\tobstacleGrid[R - 1][C - 1] = 1;\n\n\t\t// First initialize the R - 1 row and C - 1 column before scanning all the cells. \n\t\tfor (int i = R - 2; i >= 0; i--) {\n\t\t\tif (obstacleGrid[i][C - 1] == 0 && obstacleGrid[i + 1][C - 1] == 1) {\n\t\t\t\t// No obstacle in this cell and the number of ways of reaching to the goal from this cell is \n\t\t\t\t// the same as that of reaching to the cell below it, plus the value of the cell, which is 1. \n\t\t\t\tobstacleGrid[i][C - 1] = 1;\n\t\t\t} else {\n\t\t\t\t// Obstacle in this cell. \n\t\t\t\tobstacleGrid[i][C - 1] = 0;\n\t\t\t}\n\t\t}\n\t\tfor (int j = C - 2; j >= 0; j--) {\n\t\t\tif (obstacleGrid[R - 1][j] == 0 && obstacleGrid[R - 1][j + 1] == 1) {\n\t\t\t\t// No obstacle in this cell and the number of ways of reaching to the goal from this cell is \n\t\t\t\t// the same as that of reaching to the cell to the right of it, plus the value of the cell, which is 1. \n\t\t\t\tobstacleGrid[R - 1][j] = 1;\n\t\t\t} else {\n\t\t\t\t// Obstacle in this cell. \n\t\t\t\tobstacleGrid[R - 1][j] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// Scan through all the cells. \n\t\tfor (int i = R - 2; i >= 0; i--) {\n\t\t\tfor (int j = C - 2; j >= 0; j--) {\n\t\t\t\tif (obstacleGrid[i][j] == 0) {\n\t\t\t\t\t// No obstacle.\n\t\t\t\t\tobstacleGrid[i][j] = obstacleGrid[i + 1][j] + obstacleGrid[i][j + 1];\n\t\t\t\t} else {\n\t\t\t\t\t// Obstacle. \n\t\t\t\t\tobstacleGrid[i][j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obstacleGrid[0][0];\n\t}", "public void calculateSkiRoute() {\n\t\tfor(int i=0; i<rowSize; i++) {\n\t\t\tfor(int j=0; j<colSize; j++) {\n\t\t\t\tif(isSkiRouteInBound(i, j+1) && (skiMap[i][j] > skiMap[i][j+1])) {\n\t\t\t\t\tif(newSkiRoute != null)\n\t\t\t\t\t\tnewSkiRoute = null;\n\t\t\t\t\t\n\t\t\t\t\tnewSkiRoute = new SkiRoute(skiMap[i][j]);\n\t\t\t\t\tnewSkiRoute.addRoute(skiMap[i][j+1]);\n\t\t\t\t\tcalculateNextPossibleSkiRoute(i, j+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isSkiRouteInBound(i, j-1) && (skiMap[i][j] > skiMap[i][j-1])) {\n\t\t\t\t\tif(newSkiRoute != null)\n\t\t\t\t\t\tnewSkiRoute = null;\n\t\t\t\t\t\n\t\t\t\t\tnewSkiRoute = new SkiRoute(skiMap[i][j]);\n\t\t\t\t\tnewSkiRoute.addRoute(skiMap[i][j-1]);\n\t\t\t\t\tcalculateNextPossibleSkiRoute(i, j-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isSkiRouteInBound(i+1, j) && (skiMap[i][j] > skiMap[i+1][j])) {\n\t\t\t\t\tif(newSkiRoute != null)\n\t\t\t\t\t\tnewSkiRoute = null;\n\t\t\t\t\t\n\t\t\t\t\tnewSkiRoute = new SkiRoute(skiMap[i][j]);\n\t\t\t\t\tnewSkiRoute.addRoute(skiMap[i+1][j]);\n\t\t\t\t\tcalculateNextPossibleSkiRoute(i+1, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isSkiRouteInBound(i-1, j) && (skiMap[i][j] > skiMap[i-1][j])) {\n\t\t\t\t\tif(newSkiRoute != null)\n\t\t\t\t\t\tnewSkiRoute = null;\n\t\t\t\t\t\n\t\t\t\t\tnewSkiRoute = new SkiRoute(skiMap[i][j]);\n\t\t\t\t\tnewSkiRoute.addRoute(skiMap[i-1][j]);\n\t\t\t\t\tcalculateNextPossibleSkiRoute(i-1, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "void print_path(int[]parent,int[]dist,int s)\n {\n System.out.println(); \n \n //path from s to all other vertices\n \n for(int i=0;i<parent.length;i++)\n {\n System.out.println(\"From \"+s+\" to \"+i);\n System.out.print(\"path: \");\n print_node(parent,i);\n System.out.print(\"END\");\n if(dist[i]==INF)\n System.out.println(\" cost=INF\"); \n else\n System.out.println(\" cost=\"+dist[i]);\n\n }\n \n \n System.out.println();\n \n\n \n }", "public List<Long> getPath(Long start, Long finish){\n \n \n List<Long> res = new ArrayList<>();\n // auxiliary list\n List<DeixtraObj> serving = new ArrayList<>();\n// nearest vertexes map \n Map<Long,DeixtraObj> optimMap = new HashMap<>();\n// thread save reading \n synchronized (vertexes){ \n // preparation\n for (Map.Entry<Long, Vertex> entry : vertexes.entrySet()) {\n Vertex userVertex = entry.getValue();\n // If it`s start vertex weight = 0 and the nereast vertex is itself \n if(userVertex.getID().equals(start)){\n serving.add(new DeixtraObj(start, 0.0, start));\n }else{\n // For other vertex weight = infinity and the nereast vertex is unknown \n serving.add(new DeixtraObj(userVertex.getID(), Double.MAX_VALUE, null));\n }\n\n } \n // why auxiliary is not empty \n while(serving.size()>0 ){\n // sort auxiliary by weight \n Collections.sort(serving);\n\n \n // remove shortes fom auxiliary and put in to answer \n DeixtraObj minObj = serving.remove(0);\n optimMap.put(minObj.getID(), minObj);\n\n Vertex minVertex = vertexes.get(minObj.getID());\n\n // get all edges from nearest \n for (Map.Entry<Long, Edge> entry : minVertex.allEdges().entrySet()) {\n Long dest = entry.getKey();\n Double wieght = entry.getValue().getWeight();\n // by all remain vertexes \n for(DeixtraObj dx : serving){\n if(dx.getID().equals(dest)){\n // if in checking vertex weight more then nearest vertex weight plus path to cheking \n // then change in checking weight and nearest\n if( (minObj.getWeight()+wieght) < dx.getWeight()){\n dx.setNearest(minVertex.getID());\n dx.setWeight((minObj.getWeight()+wieght));\n }\n }\n }\n }\n\n }\n }\n \n // create output list\n res.add(finish);\n Long point = finish;\n while(!point.equals(start)){\n \n point = ((DeixtraObj)optimMap.get(point)).getNearest();\n res.add(point);\n }\n \n Collections.reverse(res);\n \n \n return res;\n \n }", "private void Create_Path() {\n lines = new Line[getPoints().size()];\n for (int i = 1; i < getLines().length; i++) {\n lines[i] = new Line(getPoints().get(way[i]).getX(), getPoints().get(way[i]).getY(), getPoints().get(way[i - 1]).getX(), getPoints().get(way[i - 1]).getY());\n }\n lines[0] = new Line(getPoints().get(way[getLines().length - 1]).getX(), getPoints().get(way[getLines().length - 1]).getY(), getPoints().get(way[0]).getX(), getPoints().get(way[0]).getY());\n\n }", "public Stack<Point> shortestPath() {\n\t\tresetVisited();\n\t\tStack <Point> shortestPath = new Stack<Point>();\n\t\tprev = new HashMap<Point,Point>();\n\t\tCompass[] direction = Compass.values();\n\t\tQueue <Point> path = new LinkedList<Point>();\n\t\tpath.add(playerStart);\n\t\twhile(!path.isEmpty()) {\n\t\t\tPoint current = path.poll();\n\t\t\tfor (Compass pointing: direction) {\n\t\t\t\tif (current.equals(goal)) {\n\t\t\t\t\tshortestPath.push(current);\n\t\t\t\t\twhile (prev.containsKey(shortestPath.peek()) && !shortestPath.peek().equals(playerStart)){\n\t\t\t\t\t\tshortestPath.push(prev.get(shortestPath.peek()));\n\t\t\t\t\t}\n\t\t\t\t\treturn shortestPath;\n\t\t\t\t}\n\t\t\t\tint nextW = (int)current.getX() + pointing.mapX;\n\t\t\t\tint nextH = (int)current.getY() + pointing.mapY;\n\t\t\t\tPoint nextPoint = new Point(nextW, nextH);\n\t\t\t\tif (arrayBounds(nextW, width) && arrayBounds (nextH, height) && maze[nextW][nextH] == 0 && !visited.contains(nextPoint)) {\n\t\t\t\t\tpath.add(nextPoint);\n\t\t\t\t\tvisited.add(nextPoint);\n\t\t\t\t\tprev.put(nextPoint, current);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn shortestPath;\t\t\n\t}", "public boolean hasPathTo(int v){\n\t\tvalidateVertex(v);\n\t\treturn distTo[v]<Double.POSITIVE_INFINITY;\n\t}", "private void atEndOfPathIsDetected() {\n \t\tmoveUltrasonicSensorToDefaultPosition();\n \t\trecursiveDepth = 0;\n \t\tturn = -15;\n \t}" ]
[ "0.672891", "0.64694625", "0.6444008", "0.62702733", "0.6268663", "0.6161894", "0.61365473", "0.61121804", "0.6090148", "0.60850024", "0.6012525", "0.5920807", "0.59199846", "0.5891721", "0.58773524", "0.58765614", "0.5835411", "0.58313847", "0.5821625", "0.5820197", "0.5818621", "0.58093905", "0.5793611", "0.5776098", "0.5774284", "0.5771656", "0.57667214", "0.5748", "0.5744802", "0.57201356", "0.5717318", "0.57105285", "0.57012266", "0.5686035", "0.56822586", "0.5682095", "0.56784403", "0.5674735", "0.5650614", "0.5649029", "0.5626086", "0.56201637", "0.561532", "0.5605537", "0.55962604", "0.55858684", "0.5566653", "0.5563878", "0.55604565", "0.55547357", "0.55507743", "0.5549011", "0.5538103", "0.5537622", "0.55354995", "0.55315745", "0.553044", "0.55226696", "0.5518389", "0.55155915", "0.5511015", "0.54992473", "0.54988617", "0.549493", "0.5493604", "0.54907244", "0.5476097", "0.54667234", "0.5463047", "0.54566777", "0.54508287", "0.5437204", "0.54338735", "0.5433343", "0.5427905", "0.541376", "0.54069", "0.54054713", "0.54013264", "0.53908587", "0.53868204", "0.53861684", "0.5381795", "0.538077", "0.5377961", "0.537498", "0.53652674", "0.53646797", "0.5361577", "0.5354461", "0.5353399", "0.5341058", "0.5336172", "0.5332581", "0.5330601", "0.5319109", "0.53190815", "0.53189826", "0.53161955", "0.5315368", "0.5306555" ]
0.0
-1
// Methods Access modifiers
public long getID() { return ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Methods() {\n // what is this doing? -PMC\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void Method1() {\n\t\t\r\n\t}", "public void method(){}", "Operations operations();", "@Override\n\tpublic String[] getMethods() {\n\t\treturn null;\n\t}", "public void myPublicMethod() {\n\t\t\n\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "@Override\n public int getMethodCount()\n {\n return 1;\n }", "public void method1()\r\n\t{\r\n\t}", "@Override\r\n\tpublic void Method2() {\n\t\t\r\n\t}", "static void method1()\r\n {\n }", "MethodName getMethod();", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "List<Method> getAllMethods();", "@Override\n\tpublic void anular() {\n\n\t}", "public interface METHODS {\n public static int TIME = 0;\n public static int DISTANCE= 1;\n public static int STEPS = 2;\n public static int ACHIEVEMENTS = 3;\n }", "@Override\r\n\tpublic void method1() {\n\t}", "protected abstract MethodDescription accessorMethod();", "public static void thisMethod() {\n }", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "public void methodReferences() {\n\t\t// Write sample for below\n\n\t\t// Static method\n\t\t// Instance method on parameter objects\n\t\t// Instance method\n\t\t// Constructor\n\t}", "public String[] getMethods() {\n\t\treturn methods;\n\t}", "@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}", "abstract protected Set<Method> createMethods();", "public void method1() {\n }", "public interface Methods {\n\n /**\n * List all static methods for a given content model.\n *\n * @param cmpid Pid of the content model.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If content model doesn't exist.\n */\n public List<Method> getStaticMethods(String cmpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * List all dynamic methods for a given object.\n *\n * @param objpid Pid of the object.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return List of methods defined.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object doesn't exist.\n */\n public List<Method> getDynamicMethods(String objpid,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n\n /**\n * Invoke a given method with the given parameters.\n *\n * @param pid The pid of the content model or object defining the method.\n * @param methodName The name of the method.\n * @param parameters Parameters for the method, as a map from name list of values.\n * @param asOfTime Use the methods defined at this time (unix time in ms), or null for now.\n *\n * @return Result of calling method.\n * @throws BackendInvalidCredsException If current credentials provided are invalid.\n * @throws BackendMethodFailedException If communicating with Fedora failed.\n * @throws BackendInvalidResourceException\n * If object, content model or method doesn't exist.\n */\n public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;\n}", "ISourceMethod[] getMethods();", "public Method getMethod();", "@Override\n\tvoid methodabstract() {\n\t\t\n\t}", "void method();", "void method();", "public void methodA();", "@Override\n public final int getMethodCount() {\n return 1;\n }", "@Override\r\npublic int method() {\n\treturn 0;\r\n}", "void method1();", "String getMethod();", "String getMethod();", "public List<IMethod> getMethods();", "public List<IMethod> getMethods();", "public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }", "@Override\n\tpublic void myMethod() {\n\t\t\n\t}", "@Override\n public String getMethod() {\n return METHOD_NAME;\n }", "@Override\r\n\tpublic List<Method> getMethods(File f) {\n\t\tEolModule module = new EolModule();\r\n\t\treturn this.getMethods(f, module);\r\n\t}", "public static void method2(){\n\t\t\n\t}", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "Method getMethod();", "Method getMethod();", "public List<ServiceMethod> getMethodList()\n {\n return Collections.unmodifiableList(methods);\n }", "private CommonMethods() {\n }", "@Override\n\tpublic void VisitMethodCallNode(MethodCallNode Node) {\n\n\t}", "@Override\r\n\tpublic void method1() {\n\t\t\r\n\t\tSystem.out.println(\"method1\");\r\n\t\t\r\n\t}", "static void method1(){\n\t\tSystem.out.println(\"Method 1\");\n\t}", "public void amethod() {\n\t}", "public static MethodClass getMethods (){\n\t\treturn methods;\n\t}", "public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}", "abstract void method();", "public int getMethod(){\n return method;\n }", "@Override\n\tpublic int method1() {\n\t\treturn 20;\n\t}", "public void method_202() {}", "public void method_201() {}", "private void methodOne() {\n\t\tSystem.out.println(\"I am method one\");\n\t}", "public void method4() {\n }", "public void andThisIsAMethodName(){}", "@Override\r\npublic void method2() {\n\t\r\n}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\t\tpublic String buildBasicMethod() {\n\t\t\treturn buildMethod();\n\t\t}", "@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}", "public abstract void method1();", "public String getMethod ()\n {\n return method;\n }", "@XRMethod(value = \"system.listMethods\", help = \"List all method names available\")\r\n\tList<String> listMethods();", "public void operacao();", "@Override\n\tpublic void method2() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "static void method1() {\r\n\t\r\n}", "public MethodEx2() {\n \n }", "public Enumeration getMethods()\n {\n ensureLoaded();\n return m_tblMethod.elements();\n }", "public TreeMap<String,CheckOutMethod>\n getMethods()\n {\n TreeMap<String,CheckOutMethod> methods = new TreeMap<String,CheckOutMethod>();\n for(String name : pVersionFields.keySet()) {\n JCollectionField field = pMethodFields.get(name);\n methods.put(name, CheckOutMethod.values()[field.getSelectedIndex()]);\n }\n return methods;\n }", "public void method2();", "@Override\n public void memoria() {\n \n }", "public abstract String[] getMethodNames();", "public List<MethodInfo> getMethods() { \n return lstMethodInfo;\n }", "public ArrayList<Method> getMethods() {\n\t\treturn arrayMethods;\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "int getMethodsCount();", "public void Usuarios() {\n\t\r\n}", "protected ResourceMethod getMethod( int theMethodIndex ) {\r\n\t\tConditions.checkParameter( theMethodIndex >= 0 && theMethodIndex < methods.length, \"theMethodIndex\", \"The specific method index is not within range.\" );\r\n\t\t\r\n\t\treturn methods[ theMethodIndex ];\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "public void Atender();", "public void my_method();", "public void get() {\n }", "public void method_193() {}", "@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }", "public Method method() {\n return method;\n }", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "public void method_192() {}", "void method25()\n {\n }", "public void method2() {\n }", "List<MethodNode> getMethods() {\n return this.classNode.methods;\n }", "public Method getMethod () {\n\t\treturn method;\n\t}" ]
[ "0.72109455", "0.66559535", "0.6496642", "0.63104296", "0.62934005", "0.6283805", "0.62830544", "0.62789863", "0.62524474", "0.6184693", "0.6178447", "0.61668086", "0.6163714", "0.61446327", "0.60917205", "0.6089549", "0.6080247", "0.60673094", "0.6051761", "0.60263646", "0.6014469", "0.6014061", "0.60092795", "0.5991849", "0.5981833", "0.59788775", "0.5970455", "0.5967733", "0.5952876", "0.59318507", "0.5913928", "0.5913928", "0.59109503", "0.5907011", "0.5898782", "0.5888388", "0.5888029", "0.5888029", "0.58720267", "0.58720267", "0.58641243", "0.5852869", "0.5839037", "0.58378804", "0.5827115", "0.5826178", "0.5825775", "0.5825775", "0.5822212", "0.5817394", "0.58073366", "0.5792979", "0.5772457", "0.5763457", "0.5758558", "0.5757155", "0.5752193", "0.57449937", "0.5734714", "0.5730444", "0.5721829", "0.5713898", "0.5703888", "0.57035506", "0.5702313", "0.57015216", "0.57015216", "0.5699643", "0.56920403", "0.56852204", "0.5676747", "0.5674136", "0.5667832", "0.56671053", "0.566433", "0.5661351", "0.5659561", "0.56586885", "0.565446", "0.5649204", "0.5645621", "0.5638192", "0.56362844", "0.56357217", "0.5629083", "0.5627758", "0.56236047", "0.5615531", "0.56036365", "0.5584398", "0.55689573", "0.55687237", "0.5564472", "0.55641276", "0.5558405", "0.55565435", "0.555465", "0.55432445", "0.554234", "0.55365276", "0.5531295" ]
0.0
-1
TODO Autogenerated method stub
public void onHitWall(int whichWall) { }
{ "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 onHitOther(Actor other) { }
{ "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 boolean canCollide() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public int getLeftX() { return 0; }
{ "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 int getRightX() { return 0; }
{ "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 int getTopY() { return 0; }
{ "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 int getBottomY() { return 0; }
{ "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
/let the button know their function numberEvent= function to insert number in the editText while operatorEvent = allow buttons to operates its function to add, subtract,multiply,or divide equalEvent = allow the equal button solve all types of calculations. clearEvent = allow button to clear any Value in the EditText area.
public void numberEvent(View view) { if (isNewOp) input.setText(""); isNewOp = false; String number = input.getText().toString(); switch (view.getId()) { case R.id.oneBTN: number += "1"; break; case R.id.twoBTN: number += "2"; break; case R.id.threeBTN: number += "3"; break; case R.id.fourBTN: number += "4"; break; case R.id.fiveBTN: number += "5"; break; case R.id.sixBTN: number += "6"; break; case R.id.sevenBTN: number += "7"; break; case R.id.eightBTN: number += "8"; break; case R.id.nineBTN: number += "9"; break; case R.id.zeroBTN: number += "0"; break; case R.id.pointBTN: number += "."; break; } input.setText(number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void OnNumberButtonClick (View v){\n try {\n Button b = (Button) v;\n if (mIsCalculating == false)\n expressionView.setText(\"\");\n if (mIsTyping == false) {\n resultView.setText(b.getText());\n mIsTyping = true;\n } else {\n resultView.setText(resultView.getText().toString() + b.getText());\n }\n } catch (Exception e) {\n\n }\n }", "public void OnNumberButtonClick_land(View v) {\n try {\n Button b = (Button) v;\n expressionView.setText(expressionView.getText().toString() + b.getText());\n calculate();\n isOperator=false;\n }catch (Exception e)\n {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "@FXML\n private void handleBtnOperators(ActionEvent event) {\n if (testForNewNumber) {\n testForNewNumber = false;\n }\n //TODO DONE erst null-prüfen, dann Inhalt\n //TODO DONE nach Fehlermeldung muss weitergerechnet werden können (9/0 -> Fehlermeldung)\n try {\n if ((txtFldDisplay.getText() != null) && (txtFldDisplay.getText() != \" \")) {\n if (myResult.getOperator() != null && myResult.getOperator() != \"=\") {\n myResult.setNumber2(Double.valueOf(txtFldDisplay.getText()));\n\n myResult.setNumber1(myResult.operateNumbers());\n myResult.setNumber2(0.0);\n } //TODO DONE nur spezielle Exception abfangen\n else {\n myResult.setNumber1(Double.valueOf(txtFldDisplay.getText()));\n }\n }\n\n myResult.setOperator(((Button) event.getSource()).getText());\n txtFldDisplay.setText(\" \");\n } catch (ArithmeticException e) {\n txtFldDisplay.setText(\"ArithmeticException: \" + e);\n myResult.setNumber1(0.0);\n myResult.setNumber2(0.0);\n testForNewNumber = true;\n myResult.setOperator(\"=\");\n\n }\n }", "public void actionPerformed (ActionEvent ae){\n \n //displays the digit pressed and sets value needed to modify operand\n if (ae.getActionCommand().equals(\"1\")){\n addDigit(1);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"2\")){\n addDigit(2);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"3\")){\n addDigit(3);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"4\")){\n addDigit(4);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"5\")){\n addDigit(5);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"6\")){\n addDigit(6);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"7\")){\n addDigit(7);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"8\")){\n addDigit(8);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"9\")){\n addDigit(9);\n clearFlag = false;\n }\n else if (ae.getActionCommand().equals(\"0\")){\n addDigit(0);\n clearFlag = false;\n }\n \n //Handles if the user selects an operation:\n //Set the right operand to be modified next, selects operation,\n //sets display to be cleared, adds a tooltip to the display\n if (ae.getActionCommand().equals(\"+\")){\n isLeft = false;\n operation = 0;\n clearFlag = true;\n output.setToolTipText(left + \" +\");\n }\n else if (ae.getActionCommand().equals(\"-\")){\n isLeft = false;\n operation = 1;\n clearFlag = true;\n output.setToolTipText(left + \" -\");\n }\n else if (ae.getActionCommand().equals(\"*\")){\n isLeft = false;\n operation = 2;\n clearFlag = true;\n output.setToolTipText(left + \" *\");\n }\n else if (ae.getActionCommand().equals(\"/\")){\n isLeft = false;\n operation = 3;\n clearFlag = true;\n output.setToolTipText(left + \" /\");\n }\n \n //When \"C\" is pressed the display is cleared and operands are set to zero\n if (ae.getActionCommand().equals(\"C\")){\n //Checks if the control key is pressed and cycles through displays\n if ((ae.getModifiers() & ActionEvent.CTRL_MASK) == ActionEvent.CTRL_MASK){\n count ++;\n switch (count % 3){\n case 1:\n dispContents = output.getText();\n output.setText(\"(c) 2011 Alex Mendez\"); break;\n case 2:\n output.setText(\"version 0.1\"); break;\n case 0:\n output.setText(dispContents);\n dispContents = \"\"; break;\n }\n }\n else{\n left = 0;\n right = 0;\n isLeft = true;\n operation = 99;\n clearFlag = true;\n output.setText(\"0\");\n }\n }\n \n //Calls \"Calculate\" method if \"=\" key is pressed, prepares calculator for another operation\n if (ae.getActionCommand().equals(\"=\")){\n left = calculate(left, right, operation);\n right = 0;\n isLeft = false;\n operation = 99;\n output.setText(\"\" + left);\n output.setToolTipText(\"\" + left);\n }\n }", "public void OnOperatorButtonClick (View v) {\n try {\n Button b = (Button) v;\n if (!mIsCalculating) {\n expressionView.setText(resultView.getText().toString() + \" \" + b.getText());\n mIsTyping = false;\n mIsCalculating = true;\n } else if (mIsTyping) {\n expressionView.setText(expressionView.getText() + \" \" + resultView.getText());\n calculate();\n expressionView.setText(expressionView.getText() + \" \" + b.getText());\n mIsTyping = false;\n }\n } catch (Exception e) {\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "public void actionPerformed(ActionEvent e) {\n if (_startNumber) { // Error: needed number, not operator\n //... In this state we're expecting a number, but got an operator.\n actionClear();\n _display.setText(\"ERROR - No operator\");\n } else {\n //... We're expecting an operator.\n _startNumber = true; // Next thing must be a number\n try {\n // Get value from display field, convert, do prev op\n // If this is the first op, _previousOp will be =.\n String displayText = _display.getText();\n \n if (_previousOp.equals(\"=\")) {\n _logic.setTotal(displayText);\n } else if (_previousOp.equals(\"+\")) {\n _logic.add(displayText);\n } else if (_previousOp.equals(\"-\")) {\n _logic.subtract(displayText);\n } else if (_previousOp.equals(\"*\")) {\n _logic.multiply(displayText);\n } else if (_previousOp.equals(\"/\")) {\n _logic.divide(displayText);\n } else if (_previousOp.equals(\"AND\")) {\n _logic.and(displayText);\n } else if (_previousOp.equals(\"OR\")) {\n _logic.or(displayText);\n } else if (_previousOp.equals(\"XOR\")) {\n _logic.xor(displayText);\n } else if (_previousOp.equals(\"NOR\")) {\n _logic.nor(displayText);\n } else if (_previousOp.equals(\"NAND\")) {\n _logic.nand(displayText);\n }\n \n _display.setText(\"\" + _logic.getTotalString());\n \n } catch (NumberFormatException ex) {\n actionClear();\n _display.setText(\"Error\");\n }\n \n //... set _previousOp for the next operator.\n _previousOp = e.getActionCommand();\n }//endif _startNumber\n }", "private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }", "public void actionPerformed(ActionEvent e){\r\n\t\tObject source=e.getSource();\r\n\r\n\t\t//the code for our mini calculator\r\n if(source==btn0){\r\n\r\n\t display = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"0\");\r\n\t\t else textField.setText(\"0\");\r\n\r\n\t\t}\r\n\t\tif (source==btn1) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"1\");\r\n\t\t else textField.setText(\"1\");\r\n\t\t}\r\n\t\tif (source==btn2) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"2\");\r\n\t\t else textField.setText(\"2\");\r\n\t\t\t\r\n\t\t}\r\n\t\tif (source==btn3) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"3\");\r\n\t\t else textField.setText(\"3\");\r\n\t\t}\r\n\t\tif (source==btn4) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"4\");\r\n\t\t else textField.setText(\"4\");\r\n\t\t}\r\n\t\tif (source==btn5) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"5\");\r\n\t\t else textField.setText(\"5\");\r\n\t\t}\r\n\t\tif (source==btn6) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"6\");\r\n\t\t else textField.setText(\"6\");\r\n\t\t}\r\n\t\tif (source==btn7) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"7\");\r\n\t\t else textField.setText(\"7\");\r\n\t\t}\r\n\t\tif (source==btn8) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"8\");\r\n\t\t else textField.setText(\"8\");\r\n\t\t}\r\n\t\tif (source==btn9) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\tif(!textField.getText().equals(\"0\"))\r\n\t\t\ttextField.setText(display + \"9\");\r\n\t\t else textField.setText(\"9\");\r\n\t\t}\r\n\t\tif (source==btnClear) {\r\n\r\n\t\t\tString s = textField.getText().toString();\r\n s = s.substring(0, s.length() - 1);\r\n textField.setText(s);\r\n if(textField.getText().equals(\"\"))\r\n textField.setText(\"0\"); \t\r\n\t\t}\r\n\t\tif (source==btnVirgule) {\r\n\r\n\t\t\tdisplay = textField.getText();\r\n\t\t\ttextField.setText(display + \".\");\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(source==btnBackToMenu){\r\n\r\n\t\t\tMainFrame panel = new MainFrame();\r\n\t\t\tpanel.setSize(470,300);\r\n\t\t\tpanel.setVisible(true);\r\n\t\t\tpanel.setResizable(false);\r\n\t\t\tpanel.setLocation(400,250);\r\n\t\t\tdispose();\r\n\t\t}\r\n\r\n\t\tif(source==btnWithdraw){\r\n\t\t\t//here put the code for the Withdraw\r\n\r\n\t\t\tString conString = \"jdbc:mysql://localhost/atm\";\r\n\t\t String username = \"root\";\r\n\t\t String password = \"1234glody\";\r\n\t\t\t\r\n\t\t\tLogin log=new Login();\r\n\r\n String myUserId = log.getUserId();\r\n\t\t\tString myCardNumber=log.getCardNumber();\r\n\t\t\tString myPinNumber=log.getPinNumber();\r\n\t\t\tString myUserName=log.getUsername();\r\n\r\n\t\t\tdouble amount=Double.parseDouble(textField.getText());\r\n\r\n\t\t\tif (myUserId !=\"\") {\r\n\r\n\t\t\t\ttry{\r\n\r\n\t\t\t\t\t\tConnection con = DriverManager.getConnection(conString, username, password);\r\n\t\t\t\t\t\tStatement stmt = con.createStatement();\r\n\t\t\t\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM user_account WHERE id_user='\"+myUserId+\"'\");\r\n\t \r\n\t while(rs.next()){\r\n\r\n\t rsUserId=rs.getString(1);\r\n\t\t\t\t\t\trsUsername=rs.getString(2);\r\n\t\t\t\t\t\trsCardNumber=rs.getString(3);\r\n\t\t\t\t\t\trsPinNumber=rs.getString(4);\r\n\t\t\t\t\t\trsBalance = rs.getDouble(5);\r\n\t\t\t\t }\r\n\r\n\t\t\t\t if(rsUserId.equals(myUserId)){\r\n\r\n\t\t\t\t \t if(amount >=10){\r\n\r\n\t\t\t\t \t \tif (rsBalance > amount) {\r\n\r\n\t\t\t\t \t \t try{\r\n\r\n\t\t\t\t\t\t \t \tPreparedStatement pstmt = con.prepareStatement(\"INSERT INTO withdraw (amount , date_withdraw , id_user , action) VALUE (?,?,?,?)\");\r\n\r\n\t\t\t\t\t\t \t \tshort c = 0;\r\n\r\n\t\t\t\t\t\t \t \tpstmt.setDouble(++c, amount);\r\n\t\t\t\t\t\t \t \tpstmt.setString(++c, myDate);\r\n\t\t\t\t\t\t \t \tpstmt.setString(++c, rsUserId);\r\n\t\t\t\t\t\t \t \tpstmt.setString(++c, \"withdraw\");\r\n\t\t\t\t\t\t \t \t\r\n\t\t\t\t\t\t \t \tpstmt.executeUpdate();\r\n\r\n\t\t\t\t\t\t \t \tPreparedStatement pstmt2= con.prepareStatement(\"UPDATE user_account SET balance = balance-'\"+amount+\"' WHERE id_user='\"+myUserId+\"'\");\r\n\r\n\t\t\t\t\t\t \t \tpstmt2.executeUpdate();\r\n\r\n\t\t\t JOptionPane.showMessageDialog(null,\"Your withdraw was saved Successfully\",\"Success\",JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\t\t display=\"\";\r\n\t\t\t\t\t\t \t \t}\r\n\t\t\t\t\t \t \tcatch(SQLException err2){\r\n\r\n\t\t\t\t\t \t \t System.out.println(err2.getMessage());\r\n\t\t\t\t\t\t\t System.exit(0);\t\r\n\t\t\t\t\t \t \t}\r\n\t\t\t\t \t \t\t \r\n\t\t\t\t \t \t}\r\n\t\t\t\t \t \telse{\r\n\r\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Your balance is below the value of your Withdraw!! \",\"Withdraw impossible\",JOptionPane.ERROR_MESSAGE);\t\r\n\t\t\t\t \t \t}\r\n\r\n\t\t\t\t \t }\r\n\t\t\t\t \t else{\r\n\r\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Please a valid amount (above 9 rwf)\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\r\n\t\t\t\t \t }\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\r\n\t\t\t\t\t JOptionPane.showMessageDialog(null,\"Login First please!!!\",\"Error\",JOptionPane.ERROR_MESSAGE);\t\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t stmt.close();\r\n\r\n\r\n\t\t\t\t\t}catch(SQLException err){\r\n\r\n\t\t\t\t\t\tSystem.out.println(err.getMessage());\r\n\t\t\t\t\t\tSystem.exit(0);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\r\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Login First please!!!\",\"Error\",JOptionPane.ERROR_MESSAGE);\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View v) {\n if (expression.equals(\"\")) {\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"Enter an Expression\");\n return;\n }\n\n /* Clear the operands and operators lists. */\n operands.clear();\n operators.clear();\n /* Temporary holder used to get each operand from the expression. */\n String operand = \"\";\n\n /* Loop through the input expression and get each operator and operand and\n insert them in to the ArrayLists.\n NEEDS UPDATE TO HANDLE NEGATIVE NUMBERS.\n */\n try {\n for (int i = 0; i < expression.length(); i++) {\n\n /* If an operator is found, add the operator and current operand to lists. */\n if (Character.toString(expression.charAt(i)).equals(\"+\") || Character.toString(expression.charAt(i)).equals(\"-\") || Character.toString(expression.charAt(i)).equals(\"*\")) {\n\n operators.add(Character.toString(expression.charAt(i)));\n operands.add(operand);\n operand = \"\";\n } else {\n\n operand += Character.toString(expression.charAt(i));\n }\n }\n } catch(Exception E) {\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"Invalid Expression Format\");\n answer = \"\";\n expression = \"\";\n operands.clear();\n operators.clear();\n return;\n }\n\n /* Add the operand from the end of the expression. */\n operands.add(operand);\n\n answer = \"\";\n\n /* Get the select radio button (dec, hex, or bin). */\n int selectedRadioButton = calculatorRadioGroup.getCheckedRadioButtonId();\n boolean validFlag = true;\n\n try{\n\n /* Switch on the selected button. */\n switch(selectedRadioButton) {\n\n case R.id.calcDec:\n for (int i = 0; i < operands.size(); i++) {\n\n /* Validate to confirm decimal input is correct. */\n if (Validator.validateDec(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n /* If input is valid, call evaluate function and set answer. */\n if (validFlag)\n answer = evaluate(operators, operands);\n else\n answer = \"Invalid Dec Input\";\n break;\n\n\n case R.id.calcHex:\n\n /* Validate hex input. */\n for (int i = 0; i < operands.size(); i++) {\n\n if (Validator.validateHex(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n if (validFlag) {\n\n /* Call convert to convert the operand list from hex to decimal. */\n convert(\"h\");\n /* Evaluate with the converted operands. */\n answer = evaluate(operators, operands);\n /* Convert answer back to hex. */\n answer = Converter.decToHex(answer).toUpperCase();\n }\n\n else\n answer = \"Invalid Hex Input\";\n\n break;\n\n case R.id.calcBin:\n\n for (int i = 0; i < operands.size(); i++) {\n\n if (Validator.validateBinary(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n if (validFlag) {\n\n /* Call to convert operands to binary. */\n convert(\"b\");\n /* Evaluate with decimal operands. */\n answer = evaluate(operators, operands);\n /* Convert back to decimal. */\n answer = Converter.decToBin(answer).toUpperCase();\n }\n\n else\n answer = \"Invalid Bin Input\";\n\n break;\n }\n } catch(Exception e) {\n\n\n answer = \"Invalid Expression\";\n }\n\n /* Output the answer to the screen. */\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(answer);\n\n answer = \"\";\n expression = \"\";\n operands.clear();\n operators.clear();\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tansStri=\"\"+ans;\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='+';\r\n\t\t\t\ttf2.setText(\"+\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\npublic void actionPerformed(ActionEvent ae) {\nObject obj = ae.getSource(); \n\nif(obj == myCalcView.getJbt_one()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"1\"); \n}else if(obj == myCalcView.getJbt_two()){ \n myCalcView.getJtf_result().setText(myCalcView.getJtf_result().getText()+\"2\"); \n}else if(obj == myCalcView.getJbt_plus()){ \n v1 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1 : \"+v1); \n op = \"+\"; \n myCalcView.getJtf_result().setText(\"\"); \n}else if(obj == myCalcView.getJbt_equals()){ \n v2 = myCalcView.getJtf_result().getText(); \n System.out.println(\"v1:\"+v1 +\"-> v2 : \"+v2+\" op : \"+op); \n String result = calcurate(v1,v2,op); \n myCalcView.getJtf_result().setText(result); \n}else if(obj == myCalcView.getJbt_clear()){ \n myCalcView.getJtf_result().setText(\"\"); \n} \n}", "public void actionPerformed(ActionEvent e) {\n\t\t\t//handler -- call a handler method\n\t\t\tif(e.getSource() == b1)\n\t\t\t\ttextField.setText(textField.getText().concat(\"1\"));\n\t\t\tif(e.getSource() == b2)\n\t\t\t\ttextField.setText(textField.getText().concat(\"2\"));\n\t\t\tif(e.getSource() == b3)\n\t\t\t\ttextField.setText(textField.getText().concat(\"3\"));\n\t\t\tif(e.getSource() == b4)\n\t\t\t\ttextField.setText(textField.getText().concat(\"4\"));\n\t\t\tif(e.getSource() == b5)\n\t\t\t\ttextField.setText(textField.getText().concat(\"5\"));\n\t\t\tif(e.getSource() == b6)\n\t\t\t\ttextField.setText(textField.getText().concat(\"6\"));\n\t\t\tif(e.getSource() == b7)\n\t\t\t\ttextField.setText(textField.getText().concat(\"7\"));\n\t\t\tif(e.getSource() == b8)\n\t\t\t\ttextField.setText(textField.getText().concat(\"8\"));\n\t\t\tif(e.getSource() == b9)\n\t\t\t\ttextField.setText(textField.getText().concat(\"9\"));\n\t\t\tif(e.getSource() == b0)\n\t\t\t\ttextField.setText(textField.getText().concat(\"0\"));\n\t\t\tif(e.getSource() == bdec)\n\t\t\t\ttextField.setText(textField.getText().concat(\".\"));\n\t\t\t\n\t\t\tif(e.getSource() == bclr) {\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource() == badd) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 1;\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t\tif (e.getSource() == bsub) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 2;\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t\tif (e.getSource() == bmul) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 3;\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t\tif (e.getSource() == bdiv) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 4;\n\t\t\t\ttextField.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource() == bksp) {\n\t\t\t\t//s is what was in the text field\n\t\t\t\tString s=textField.getText();\n\t\t\t\t//clear text field\n\t\t\t\ttextField.setText(\"\");\n\t\t\t\t//for every character in s minus one,\n\t\t\t\tfor(int i =0; i<s.length()-1; i++)\n\t\t\t\t\t//add that character from s into the text field\n\t\t\t\t\ttextField.setText(textField.getText()+s.charAt(i));\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource()==blog) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 8;\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource()==bspr) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 6;\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource() == bcbe) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 7;\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource() == bsqt) {\n\t\t\t\tfirstNumber = Double.parseDouble(textField.getText());\n\t\t\t\toperator = 5;\n\t\t\t}\n\t\t\t\n\t\t\tif (e.getSource() == beq) {\n\t\t\t\tsecondNumber = Double.parseDouble(textField.getText());\n\t\t\t\t\n\t\t\t\tswitch(operator) {\n\t\t\t\tcase 1:\n\t\t\t\t\tresult = firstNumber + secondNumber;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tresult = firstNumber - secondNumber;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tresult = firstNumber * secondNumber;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tresult = firstNumber / secondNumber;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 5:\n\t\t\t\t\tresult = Math.pow(firstNumber, 0.5);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tresult = Math.pow(firstNumber, 2);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7 :\n\t\t\t\t\tresult = Math.pow(firstNumber, 3);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 8 :\n\t\t\t\t\tresult = Math.log10(firstNumber);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault: result = 0.0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttextField.setText(\"\" + result);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n Frame f = new Frame(\"Calculator\");\n\n //Font Fo = new Font(Font.SERIF,Font.BOLD,40);\n\n Panel p1 = new Panel();\n Panel p2 = new Panel();\n\n //T.setEditable(false);\n\n p2.setLayout(new GridLayout(4,4));\n\n Button B0 = new Button (\"0\");\n Button B1 = new Button (\"1\");\n Button B2 = new Button (\"2\");\n Button B3 = new Button (\"3\");\n Button B4 = new Button (\"4\");\n Button B5 = new Button (\"5\");\n Button B6 = new Button (\"6\");\n Button B7 = new Button (\"7\");\n Button B8 = new Button (\"8\");\n Button B9 = new Button (\"9\");\n Button BC = new Button (\"c\");\n Button BA = new Button (\"+\");\n Button BS = new Button (\"-\");\n Button BM = new Button (\"*\");\n Button BD = new Button (\"/\");\n Button BE = new Button (\"=\");\n\n p2.add(B0);\n p2.add(B1);\n p2.add(B2);\n p2.add(B3);\n p2.add(B4);\n p2.add(B5);\n p2.add(B6);\n p2.add(B7);\n p2.add(B8);\n p2.add(B9);\n p2.add(BC);\n p2.add(BS);\n p2.add(BM);\n p2.add(BD);\n p2.add(BA);\n p2.add(BE);\n\n TextField T = new TextField(20);\n p1.add(T);\n f.add(p1,BorderLayout.NORTH);\n f.add(p2);\n\n Event E = new Event(T);\n\n B0.addActionListener(E);\n B1.addActionListener(E);\n B2.addActionListener(E);\n B3.addActionListener(E);\n B4.addActionListener(E);\n B5.addActionListener(E);\n B6.addActionListener(E);\n B7.addActionListener(E);\n B8.addActionListener(E);\n B9.addActionListener(E);\n BA.addActionListener(E);\n BS.addActionListener(E);\n BM.addActionListener(E);\n BD.addActionListener(E);\n BC.addActionListener(E);\n BE.addActionListener(E);\n\n\n f.setSize(400,400);\n f.setVisible(true);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\t\t\t\tdflt=0;\r\n\r\n\t\t\t\toperator='*';\r\n\t\t\t\ttf2.setText(\"X\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n dot_inserted = false;\n\n /*check for validation if curr is empty*/\n if(curr.isEmpty()){\n /*check if the last digit is a dot and remove it*/\n if(curr.substring(curr.length()-1, curr.length()).equals(\".\")){\n del();\n }\n }\n\n /*check fr validation if operator is inserted is equal to false then append the operator to curr*/\n if(operator_inserted == false){\n curr = curr + \"+\";\n operator_inserted = true;\n }\n displayNum();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n btnNumber1 = new javax.swing.JButton();\n btnNumber2 = new javax.swing.JButton();\n btnNumber3 = new javax.swing.JButton();\n btnNumber4 = new javax.swing.JButton();\n btnNumber5 = new javax.swing.JButton();\n btnNumber6 = new javax.swing.JButton();\n btnNumber7 = new javax.swing.JButton();\n btnNumber8 = new javax.swing.JButton();\n btnNumber9 = new javax.swing.JButton();\n btnNumber0 = new javax.swing.JButton();\n btnPoint = new javax.swing.JButton();\n btnResult = new javax.swing.JButton();\n btnAdd = new javax.swing.JButton();\n btnSubstract = new javax.swing.JButton();\n btnMultiply = new javax.swing.JButton();\n btnDivide = new javax.swing.JButton();\n txtOperator = new javax.swing.JTextField();\n btnClear = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Calculadora\");\n\n btnNumber1.setText(\"1\");\n btnNumber1.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber1.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber1MouseClicked(evt);\n }\n });\n btnNumber1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber1ActionPerformed(evt);\n }\n });\n\n btnNumber2.setText(\"2\");\n btnNumber2.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber2MouseClicked(evt);\n }\n });\n btnNumber2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber2ActionPerformed(evt);\n }\n });\n\n btnNumber3.setText(\"3\");\n btnNumber3.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber3.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber3MouseClicked(evt);\n }\n });\n btnNumber3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber3ActionPerformed(evt);\n }\n });\n\n btnNumber4.setText(\"4\");\n btnNumber4.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber4.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber4MouseClicked(evt);\n }\n });\n btnNumber4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber4ActionPerformed(evt);\n }\n });\n\n btnNumber5.setText(\"5\");\n btnNumber5.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber5.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber5MouseClicked(evt);\n }\n });\n btnNumber5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber5ActionPerformed(evt);\n }\n });\n\n btnNumber6.setText(\"6\");\n btnNumber6.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber6.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber6MouseClicked(evt);\n }\n });\n btnNumber6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber6ActionPerformed(evt);\n }\n });\n\n btnNumber7.setText(\"7\");\n btnNumber7.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber7.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber7MouseClicked(evt);\n }\n });\n btnNumber7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber7ActionPerformed(evt);\n }\n });\n\n btnNumber8.setText(\"8\");\n btnNumber8.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber8.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber8MouseClicked(evt);\n }\n });\n btnNumber8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber8ActionPerformed(evt);\n }\n });\n\n btnNumber9.setText(\"9\");\n btnNumber9.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber9.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber9MouseClicked(evt);\n }\n });\n btnNumber9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber9ActionPerformed(evt);\n }\n });\n\n btnNumber0.setText(\"0\");\n btnNumber0.setPreferredSize(new java.awt.Dimension(47, 41));\n btnNumber0.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnNumber0MouseClicked(evt);\n }\n });\n btnNumber0.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNumber0ActionPerformed(evt);\n }\n });\n\n btnPoint.setText(\".\");\n btnPoint.setPreferredSize(new java.awt.Dimension(47, 41));\n btnPoint.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnPointMouseClicked(evt);\n }\n });\n btnPoint.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPointActionPerformed(evt);\n }\n });\n\n btnResult.setText(\"=\");\n btnResult.setPreferredSize(new java.awt.Dimension(47, 41));\n btnResult.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnResultMouseClicked(evt);\n }\n });\n btnResult.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnResultActionPerformed(evt);\n }\n });\n\n btnAdd.setText(\"+\");\n btnAdd.setPreferredSize(new java.awt.Dimension(47, 41));\n btnAdd.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnAddMouseClicked(evt);\n }\n });\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnSubstract.setText(\"-\");\n btnSubstract.setPreferredSize(new java.awt.Dimension(47, 41));\n btnSubstract.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnSubstractMouseClicked(evt);\n }\n });\n btnSubstract.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSubstractActionPerformed(evt);\n }\n });\n\n btnMultiply.setText(\"*\");\n btnMultiply.setPreferredSize(new java.awt.Dimension(47, 41));\n btnMultiply.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnMultiplyMouseClicked(evt);\n }\n });\n btnMultiply.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnMultiplyActionPerformed(evt);\n }\n });\n\n btnDivide.setText(\"/\");\n btnDivide.setPreferredSize(new java.awt.Dimension(47, 41));\n btnDivide.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnDivideMouseClicked(evt);\n }\n });\n btnDivide.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDivideActionPerformed(evt);\n }\n });\n\n txtOperator.setFont(new java.awt.Font(\"Consolas\", 0, 30)); // NOI18N\n txtOperator.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n\n btnClear.setText(\"C\");\n btnClear.setPreferredSize(new java.awt.Dimension(47, 41));\n btnClear.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n btnClearMouseClicked(evt);\n }\n });\n btnClear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnClearActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnNumber1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNumber2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNumber3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnNumber4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNumber5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNumber6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSubstract, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnNumber0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnPoint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnClear, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDivide, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(txtOperator)\n .addGroup(layout.createSequentialGroup()\n .addComponent(btnNumber7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNumber8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNumber9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnMultiply, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(btnResult, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(10, 10, 10))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtOperator, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnNumber1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNumber2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNumber3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnNumber4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNumber5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNumber6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnSubstract, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnNumber7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNumber8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnNumber9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnMultiply, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnNumber0, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPoint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDivide, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnClear, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnResult, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public void OnOperatorButtonClick_land (View v) {\n try {\n checkOperator(expressionView);\n if(isOperator==false) {\n Button b = (Button) v;\n expressionView.setText(expressionView.getText().toString()+ b.getText());\n isOperator = true;\n }\n else\n {\n Button b = (Button) v;\n expressionView.setText(expressionView.getText().toString().trim()\n .substring(0,expressionView.getText().toString().length()-1) + b.getText());\n isOperator=true;\n }\n }catch (Exception e){\n Toast.makeText(this,e.toString(),Toast.LENGTH_LONG);\n }\n }", "public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }", "private void opClick(java.awt.event.ActionEvent evt) {\n if (evt.getSource() instanceof JButton){\n JButton btn = (JButton) evt.getSource();\n switch(btn.getText()){\n case \"+\":\n case \"-\":\n case \"/\":\n case \"*\":\n case \"%\":\n case \"^\":\n case \".\":\n case \"!\":\n jTextField1.setText(jTextField1.getText() +btn.getText());\n break;\n default:\n if (!jTextField1.getText().equals(\"0\"))\n jTextField1.setText(jTextField1.getText() +btn.getText().toLowerCase().charAt(0));\n else\n jTextField1.setText(\"\" + btn.getText().toLowerCase().charAt(0));\n }\n }\n }", "@Override\n public void onClick(View v) {\n float num1 = 0;\n float num2 = 0;\n float result = 0;\n\n // Проверяем поля на пустоту\n if (TextUtils.isEmpty(etNum1.getText().toString())\n || TextUtils.isEmpty(etNum2.getText().toString())) {\n return;\n }\n\n // читаем EditText и заполняем переменные числами\n num1 = Float.parseFloat(etNum1.getText().toString());\n num2 = Float.parseFloat(etNum2.getText().toString());\n\n // определяем нажатую кнопку и выполняем соответствующую операцию\n // в oper пишем операцию, потом будем использовать в выводе\n switch (v.getId()) {\n case R.id.button:\n oper = \"+\";\n result = num1 + num2;\n break;\n case R.id.button5:\n oper = \"-\";\n result = num1 - num2;\n break;\n case R.id.button6:\n oper = \"*\";\n result = num1 * num2;\n break;\n case R.id.button7:\n oper = \"/\";\n result = num1 / num2;\n break;\n default:\n break;\n }\n\n // формируем строку вывода\n tvResult.setText(num1 + \" \" + oper + \" \" + num2 + \" = \" + result);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='-';\r\n\t\t\t\ttf2.setText(\"-\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n if(operator_inserted==true && !curr.substring(curr.length()-1,curr.length()).equals(\" \")){\n\n\n String [] tokens = curr.split(\" \");\n switch(tokens[1].charAt(0)){\n\n case '+':\n res = Double.toString(Double.parseDouble(tokens[0]) + Double.parseDouble(tokens[2]));\n break;\n case '-':\n res = Double.toString(Double.parseDouble(tokens[0]) - Double.parseDouble(tokens[2]));\n break;\n case '/':\n res = Double.toString(Double.parseDouble(tokens[0]) / Double.parseDouble(tokens[2]));\n break;\n case '*':\n res = Double.toString(Double.parseDouble(tokens[0]) * Double.parseDouble(tokens[2]));\n break;\n\n }\n resNum();\n }\n }", "@Override\n public void onClick(View v) {\n dot_inserted = false;\n\n /*check for validation if curr is empty*/\n if(curr.isEmpty()){\n /*check if the last digit is a dot and remove it*/\n if(curr.substring(curr.length()-1, curr.length()).equals(\".\")){\n del();\n }\n }\n\n /*check fr validation if operator is inserted is equal to false then append the operator to curr*/\n if(operator_inserted == false){\n curr = curr + \"*\";\n operator_inserted = true;\n }\n displayNum();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n int t=0;\n String s=e.getActionCommand();\n if(s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")) {\n input+=\" \"+s+\" \"; //如果碰到运算符,就在运算符前后分别加一个空格,\n //为后面的分解字符串做准备\n\n }else if(s.equals(\"清零\")) {\n input=\"\";\n }else if(s.equals(\"退格\")) {\n if((input.charAt(input.length()-1))==' ') { //检测字符串的最后一个字符是否为空格,\n input=input.substring(0,input.length()-3);//如果是则删除末尾3个字符,否则删除\n //1个字符\n }else {\n input=input.substring(0,input.length()-1);\n }\n }\n else if(s.equals(\"=\")) {\n input=compute(input);\n jt.setText(input);\n input=\"\";\n t=1;\n }\n else\n input += s;\n if(t==0) {\n jt.setText(input);\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(dfltStri.length()>0 && operator==' ')\r\n\t\t\t\t{\r\n\t\t\t\t\tans=Double.parseDouble(dfltStri);\r\n\t\t\t\t\tdfltStri=\"\";\r\n\t\t\t\t\tdflt=0;\r\n\t\t\t\t}// equals to er por jodi number aseh\r\n\t\t\t\tif(dfltStri.length()>0)\r\n\t\t\t\t\tdflt=Double.parseDouble(dfltStri);\r\n\t\t\t\tif(operator=='+')\r\n\t\t\t\t{\r\n\t\t\t\t\tans+=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='-')\r\n\t\t\t\t{\r\n\t\t\t\t\tans-=dflt;\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='*')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans*=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(operator=='/')\r\n\t\t\t\t{\r\n\t\t\t\t\tif(dflt==0)\r\n\t\t\t\t\t\tdflt=1;\r\n\r\n\t\t\t\t\tans/=dflt;\r\n\r\n\t\t\t\t}\r\n\t\t\t\telse if(ans==0 && dflt!=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tans=dflt;\r\n\t\t\t\t}\r\n\t\t\t\tansStri=\"\"+ans;\r\n\r\n\t\t\t\tdfltStri=\"\";\r\n\r\n\t\t\t\tdflt=0;\r\n\t\t\t\toperator='/';\r\n\t\t\t\ttf2.setText(\"/\");\r\n\t\t\t\tif(ansStri.length()>=13)\r\n\t\t\t\t{\r\n\t\t\t\t\tansStri=ansStri.substring(0,12);\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttf.setText(ansStri);\t\t\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n dot_inserted = false;\n\n /*check for validation if curr is empty*/\n if(curr.isEmpty()){\n /*check if the last digit is a dot and remove it*/\n if(curr.substring(curr.length()-1, curr.length()).equals(\".\")){\n del();\n }\n }\n\n /*check fr validation if operator is inserted is equal to false then append the operator to curr*/\n if(operator_inserted == false){\n curr = curr + \"-\";\n operator_inserted = true;\n }\n displayNum();\n }", "public void actionPerformed(ActionEvent e) {\n if (e.getSource() == btn1) {\n display.setText(display.getText() + \"1\");\n } else if (e.getSource() == btn2) {\n display.setText(display.getText() + \"2\");\n } else if (e.getSource() == btn3) {\n display.setText(display.getText() + \"3\");\n } else if (e.getSource() == btnPlus) {\n display.setText(display.getText() + \"+\");\n } else if (e.getSource() == btn4) {\n display.setText(display.getText() + \"4\");\n } else if (e.getSource() == btn5) {\n display.setText(display.getText() + \"5\");\n } else if (e.getSource() == btn6) {\n display.setText(display.getText() + \"6\");\n } else if (e.getSource() == btnMinus) {\n display.setText(display.getText() + \"-\");\n } else if (e.getSource() == btn7) {\n display.setText(display.getText() + \"7\");\n } else if (e.getSource() == btn8) {\n display.setText(display.getText() + \"8\");\n } else if (e.getSource() == btn9) {\n display.setText(display.getText() + \"9\");\n } else if (e.getSource() == btnMultiply) {\n display.setText(display.getText() + \"*\");\n } else if (e.getSource() == btn0) {\n display.setText(display.getText() + \"0\");\n } else if (e.getSource() == btnDivide) {\n display.setText(display.getText() + \"/\");\n } else if (e.getSource() == btnEqual) {\n String input = display.getText();\n String output = \"\";\n try {\n output = performCalculation(input);\n } catch (Exception ex) {\n output = \"ERROR\";\n }\n display.setText(output);\n } else if (e.getSource() == btnClear) {\n display.setText(\"\");\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tBoolean isBlank=false;\n\t\t\t\t\n\t \tint ldi=0;\n\t \tint rdi=0;\n\t \tDouble bqi=0.0;\n\t \tDouble eqi=0.0;\n\t \tString note=\"\";\n\t \tTimestamp timeStamp=null;\n\t \t\n\t\t\t\t\t\t\n\t\t\t\t\tif(mPickedTimeText!=null)\n\t \t{\n\t\t\t\t\t\tif(timeChanged)\n\t\t\t\t\t\t{\tif(newDate!=null)\n\t\t\t\t\t\t\t\ttimeStamp=new Timestamp(newDate.getTime());\n\t\t\t\t\t\t}\n\t \t\telse\n\t \t\t{\t//Long now = Long.valueOf(System.currentTimeMillis());\n\t \tif(mState==STATE_INSERT)\n\t \t\ttimeStamp=new Timestamp(preSetTime.getTime());\n\t \tif(mState==STATE_EDIT)\n\t \t\ttimeStamp=savedTS;\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\t\n\t\t\t\t\tif(ldEdit!=null)\n\t \t{\tString lds=ldEdit.getText().toString();\n\t \t\tldi= InputsValidation.intValidation(lds);\n\t \t\t//Log.i(\"onClicked-rb:\",\"rb1\");\n\t \t}\n\t \n\t \t\n\t \tif(rdEdit!=null)\n\t \t{\tString rds=rdEdit.getText().toString();\n\t \t\trdi= InputsValidation.intValidation(rds);\n\t \t\t//Log.i(\"onClicked-rb:\",\"rb2\");\n\t \t}\n\t \n\t \n\t \tif(bqEdit!=null)\n\t \t{\n\t \t\tif(bqChanged)\n\t \t\t{\n\t\t \t\tString bqs=bqEdit.getText().toString();\n\t\t \t\t\n\t\t \t\tbqi= (double) InputsValidation.doubleValidation(bqs);\n\t\t \t\tif(vup.equalsIgnoreCase(\"2\"))\n\t\t \t\t\t{\n\t\t \t\t\tbqi=bqi*30.00;\n\t\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tbqi=bqSaved;\n\t \t\t}\n\t \t\t\n\t \t}\n\t \tif(eqEdit!=null)\n\t \t{\n\t \t\tif(eqChanged)\n\t \t\t{\n\t\t \t\tString eqs=eqEdit.getText().toString();\n\t\t \t\teqi= (double) InputsValidation.doubleValidation(eqs);\n\t\t \t\tif(vup.equalsIgnoreCase(\"2\"))\n\t\t \t\t\t{\n\t\t \t\t\teqi=eqi*30.00;\n\t\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\teqi=eqSaved;\n\t \t\t}\n\t \t}\n\t \t\n\t \t\n\t \tFeed feed=new Feed(timeStamp, ldi, rdi, bqi, eqi, note);\n\t \t\n\t \tupdateEvent(feed);\n\t \tsetResult(RESULT_OK);\t\n\t \tfinish();\n\t\t\t\t}", "public void actionPerformed(ActionEvent a){\r\n\r\n\r\n\t\ttry{\r\n\t\t\t\t/* |-------- Handling Exceptions ---------| */\r\n\r\n\r\n\t\t\tif(a.getSource()==num0){\r\n\t\t\t\tvalue+=0;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num1){\r\n\t\t\t\tvalue+=1;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num2){\r\n\t\t\t\tvalue+=2;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num3){\r\n\t\t\t\tvalue+=3;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num4){\r\n\t\t\t\tvalue+=4;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num5){\r\n\t\t\t\tvalue+=5;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num6){\r\n\t\t\t\tvalue+=6;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num7){\r\n\t\t\t\tvalue+=7;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num8){\r\n\t\t\t\tvalue+=8;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\t\t\tif(a.getSource()==num9){\r\n\t\t\t\tvalue+=9;\r\n\t\t\t\ttField.setText(value);\r\n\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\tif (a.getSource() == bAdd){\r\n\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\tctr=0;\r\n\t\t\t\to = '+';\r\n\t\t\t\tvalue=\"\";\r\n\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bSub){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\to = '-';\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bMul){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\to = 'x';\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bDiv){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\to = '/';\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\t\t\tif (a.getSource() == bPer){\r\n\t\t\t\t\tv1 = Double.parseDouble( tField.getText() );\r\n\t\t\t\t\tctr=0;\r\n\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\tanswer = (v1/100);\r\n\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t/* |-- EQUALS ACTION --| */\r\n\r\n\t\t\tif(a.getSource()==equals){\r\n\t\t\t\t\t\tvalue=\"\";\r\n\t\t\t\t\t\tv2 = Double.parseDouble(tField.getText());\r\n\r\n\t\t\t\t\tif(o=='+'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 + v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='-'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 - v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='x'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 * v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='/'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 / v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(o=='%'){\r\n\t\t\t\t\t\tctr=0;\r\n\t\t\t\t\t\tanswer = v1 % v2;\r\n\t\t\t\t\t\ttField.setText(\"\" +answer);\r\n\t\t\t\t\t\tvalue=\"\"; v1=null; v2=null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{}\r\n\t\t\t}\r\n\r\n\t\t/* |-- EQUALS ACTION --| */\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t/*\t|-- Clear --| */\r\n\t\t\tif(a.getSource()==clear){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tv1=null;\r\n\t\t\t\tv2=null;\r\n\t\t\t\tvalue=\"\";\r\n\t\t\t\tanswer=0.;\r\n\t\t\t\ttField.setText(\"0.\");\r\n\r\n\t\t\t}\r\n\r\n\t\t\tif(a.getSource()==bCE){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue=\"\";\r\n\t\t\t\ttField.setText(\"0.\");\r\n\t\t\t}\r\n\r\n\r\n\t\t\t/*\t|-- Point --| */\r\n\t\t\tif(a.getSource() == bDot){\r\n\t\t\t\tif(ctr==0){\r\n\t\t\t\t\t\tvalue+=\".\";\r\n\t\t\t\t\t\tctr+=1;\r\n\t\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.print(\"\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t/* |-- Back Space --| */\r\n\t\t\tif(a.getSource() == backspace){\r\n\t\t\t\t\tvalue = value.substring(0, value.length()-1 );\r\n\t\t\t\t\ttField.setText(\"\" +value);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t/* |-- Square Root --| */\r\n\t\t\tif(a.getSource() == bSqrt){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.sqrt(Double.parseDouble( tField.getText() ) );\r\n\t\t\t\ttField.setText(\"\" +v1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* |-- Sine --| */\r\n\t\t\tif(a.getSource() == bSin){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.sin( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"sin\"+ tField.getText()+\"=\" +v1);\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Cosine --| */\r\n\t\t\tif(a.getSource() == bCos){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.cos( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"cos\"+ tField.getText()+\"=\" +v1);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* |-- Tan --| */\r\n\t\t\tif(a.getSource() == bTan){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.tan( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"tan\"+ tField.getText()+\"=\" +v1);\r\n\t\t\t}\r\n\r\n\t\t\t/* |--Cosecant --| */\r\n\t\t\tif(a.getSource() == bCosec){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.sin( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"cosec\"+ tField.getText()+\"=\" +(1/v1));\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Secant --| */\r\n\t\t\tif(a.getSource() == bSec){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.cos( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"sec\"+ tField.getText()+\"=\" +(1/v1));\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Cot --| */\r\n\t\t\tif(a.getSource() == bCot){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tv1 = Math.tan( Math.toRadians(Double.parseDouble( tField.getText() ) ));\r\n\t\t\t\ttField.setText(\"cot\"+ tField.getText()+\"=\" +(1/v1));\r\n\t\t\t}\r\n\r\n\t\t\t/* |-- Integer --| */\r\n\t\t\tif(a.getSource() == bInt){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tNumberConverted = ( Double.parseDouble(tField.getText()) * -1 );\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\ttField.setText(\"\" +NumberConverted);\r\n\t\t\t}\r\n\r\n\r\n\r\n\t\t\t/* |-- Reciprocal --| */\r\n\t\t\tif(a.getSource() == bFrac){\r\n\t\t\t\tctr=0;\r\n\t\t\t\tvalue = \"\";\r\n\t\t\t\tDouble NumberContainer = ( 1 / Double.parseDouble(\r\ntField.getText() ) );\r\n\t\t\t\ttField.setText(\"\" +NumberContainer);\r\n\t\t\t}\r\n\r\n\r\n\t// ------------ Menu Item Actions ------------ //\r\n\r\n\t\t\tif(a.getSource() == fmi1){\r\n\t\t\t\tcv = tField.getText();\r\n\t\t\t}\r\n\r\n\t\t\tif(a.getSource() == fmi2){\r\n\t\t\t\ttField.setText(\"\" +cv);\r\n\t\t\t}\r\n\r\n\t\t\tif(a.getSource() == fmi3){\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\r\n\t\t}\t// End of Try\r\n\r\n\r\n/* |-------- Attempting To Catch Runtime Errors ---------| */\r\n\r\n\t\tcatch(StringIndexOutOfBoundsException str){}\r\n\t\tcatch(NumberFormatException nfe){}\r\n\t\tcatch(NullPointerException npe){}\r\n\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n expression = \"\";\n\n /* Set listener for the radio group, used to determine if the user select decimal, hexadecimal, or binary mode. */\n final RadioGroup calculatorRadioGroup = (RadioGroup) findViewById(R.id.calculatorRadioGroup);\n\n Button buttonEquals = (Button) findViewById(R.id.buttonEquals);\n\n\n /* Set the listener for the equals button. */\n buttonEquals.setOnClickListener(\n new Button.OnClickListener(){\n\n @Override\n public void onClick(View v) {\n\n /* Check if the user has inserted input. */\n if (expression.equals(\"\")) {\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"Enter an Expression\");\n return;\n }\n\n /* Clear the operands and operators lists. */\n operands.clear();\n operators.clear();\n /* Temporary holder used to get each operand from the expression. */\n String operand = \"\";\n\n /* Loop through the input expression and get each operator and operand and\n insert them in to the ArrayLists.\n NEEDS UPDATE TO HANDLE NEGATIVE NUMBERS.\n */\n try {\n for (int i = 0; i < expression.length(); i++) {\n\n /* If an operator is found, add the operator and current operand to lists. */\n if (Character.toString(expression.charAt(i)).equals(\"+\") || Character.toString(expression.charAt(i)).equals(\"-\") || Character.toString(expression.charAt(i)).equals(\"*\")) {\n\n operators.add(Character.toString(expression.charAt(i)));\n operands.add(operand);\n operand = \"\";\n } else {\n\n operand += Character.toString(expression.charAt(i));\n }\n }\n } catch(Exception E) {\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"Invalid Expression Format\");\n answer = \"\";\n expression = \"\";\n operands.clear();\n operators.clear();\n return;\n }\n\n /* Add the operand from the end of the expression. */\n operands.add(operand);\n\n answer = \"\";\n\n /* Get the select radio button (dec, hex, or bin). */\n int selectedRadioButton = calculatorRadioGroup.getCheckedRadioButtonId();\n boolean validFlag = true;\n\n try{\n\n /* Switch on the selected button. */\n switch(selectedRadioButton) {\n\n case R.id.calcDec:\n for (int i = 0; i < operands.size(); i++) {\n\n /* Validate to confirm decimal input is correct. */\n if (Validator.validateDec(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n /* If input is valid, call evaluate function and set answer. */\n if (validFlag)\n answer = evaluate(operators, operands);\n else\n answer = \"Invalid Dec Input\";\n break;\n\n\n case R.id.calcHex:\n\n /* Validate hex input. */\n for (int i = 0; i < operands.size(); i++) {\n\n if (Validator.validateHex(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n if (validFlag) {\n\n /* Call convert to convert the operand list from hex to decimal. */\n convert(\"h\");\n /* Evaluate with the converted operands. */\n answer = evaluate(operators, operands);\n /* Convert answer back to hex. */\n answer = Converter.decToHex(answer).toUpperCase();\n }\n\n else\n answer = \"Invalid Hex Input\";\n\n break;\n\n case R.id.calcBin:\n\n for (int i = 0; i < operands.size(); i++) {\n\n if (Validator.validateBinary(operands.get(i)))\n continue;\n else\n validFlag = false;\n }\n\n if (validFlag) {\n\n /* Call to convert operands to binary. */\n convert(\"b\");\n /* Evaluate with decimal operands. */\n answer = evaluate(operators, operands);\n /* Convert back to decimal. */\n answer = Converter.decToBin(answer).toUpperCase();\n }\n\n else\n answer = \"Invalid Bin Input\";\n\n break;\n }\n } catch(Exception e) {\n\n\n answer = \"Invalid Expression\";\n }\n\n /* Output the answer to the screen. */\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(answer);\n\n answer = \"\";\n expression = \"\";\n operands.clear();\n operators.clear();\n\n }\n }\n );\n\n }", "public void buttonE(View v) {\n expression += \"E\";\n\n /* Update the screen. */\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n\n operatorToPerform[PLUS] = false;\n operatorToPerform[MINUS] = false;\n operatorToPerform[MULTIPLY] = false;\n operatorToPerform[DIVIDE] = false;\n\n operatorButtonClicked[PLUS] = false;\n operatorButtonClicked[MINUS] = false;\n operatorButtonClicked[MULTIPLY] = false;\n operatorButtonClicked[DIVIDE] = false;\n\n storedValue = 0;\n numberOnDisplay = 0;\n\n display = findViewById(R.id.display);\n btn_1 = findViewById(R.id.btn_1);\n btn_2 = findViewById(R.id.btn_2);\n btn_3 = findViewById(R.id.btn_3);\n btn_4 = findViewById(R.id.btn_4);\n btn_5 = findViewById(R.id.btn_5);\n btn_6 = findViewById(R.id.btn_6);\n btn_7 = findViewById(R.id.btn_7);\n btn_8 = findViewById(R.id.btn_8);\n btn_9 = findViewById(R.id.btn_9);\n btn_0 = findViewById(R.id.btn_0);\n btn_c = findViewById(R.id.btn_c);\n btn_ce = findViewById(R.id.btn_ce);\n btn_bs = findViewById(R.id.btn_bs);\n btn_divide = findViewById(R.id.btn_divide);\n btn_multiply = findViewById(R.id.btn_multiply);\n btn_plus = findViewById(R.id.btn_plus);\n btn_minus = findViewById(R.id.btn_minus);\n btn_sign = findViewById(R.id.btn_sign);\n btn_enter = findViewById(R.id.btn_enter);\n btn_point = findViewById(R.id.btn_point);\n\n display.setOnClickListener(this);\n btn_1.setOnClickListener(this);\n btn_2.setOnClickListener(this);\n btn_3.setOnClickListener(this);\n btn_4.setOnClickListener(this);\n btn_5.setOnClickListener(this);\n btn_6.setOnClickListener(this);\n btn_7.setOnClickListener(this);\n btn_8.setOnClickListener(this);\n btn_9.setOnClickListener(this);\n btn_0.setOnClickListener(this);\n btn_c.setOnClickListener(this);\n btn_ce.setOnClickListener(this);\n btn_bs.setOnClickListener(this);\n btn_divide.setOnClickListener(this);\n btn_multiply.setOnClickListener(this);\n btn_plus.setOnClickListener(this);\n btn_minus.setOnClickListener(this);\n btn_sign.setOnClickListener(this);\n btn_enter.setOnClickListener(this);\n btn_point.setOnClickListener(this);\n\n Typeface typeface = ResourcesCompat.getFont(this, R.font.ds_digi);\n display.setTypeface(typeface);\n\n\n\n }", "@Override\r\n public void onClick(View v) {\r\n if(!firstValue.isEmpty() &&\r\n !operand.isEmpty() &&\r\n !etDisplay.getText().toString().isEmpty()) {\r\n if( calc(firstValue, operand, etDisplay.getText().toString() )){\r\n etDisplay.setText(result);\r\n tvFirst.setText(\"\");\r\n firstValue = \"\";\r\n operand = \"\";\r\n }\r\n }\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JTextField inputCell = (JTextField) e.getSource();\n String[] operands = inputCell.getText().split(\" \");\n InterpreterDesignPattern interpreter = new InterpreterDesignPattern();\n\n if (listenerF == null) {\n listenerF = new ValueViewObserverF(equationView.getValView());\n }\n\n //following line fetches current expression from the jTextField where user made changes\n ((ValueViewObserverF) listenerF).setExpression(inputCell.getText());\n\n //This line unregisters listenerF from unwanted subjects\n equationView.getValView().removeObserver(listenerF);\n\n //This line dynamically registers listenerF object in jTextFields according to cell labels in operands\n equationView.getValView().registerObserver(listenerF, operands);\n\n //Following line evaluates an expression entered by user and displays that result in value view\n equationView.getValView().getjTextField7().setText(interpreter.interpretPostfixExpression(\n equationView.getInputString(operands)));\n\n //Following line will store a state of the Equation View GUI, after the user changes an expression.\n equationView.createMemento();\n }", "@Override\n public void onClick(View arg0) {\n if (arg0 != null) {\n switch(arg0.getId()){\n case R.id.one:\n digitButtonPressed(\"1\");\n break;\n\n case R.id.two:\n digitButtonPressed(\"2\");\n break;\n\n case R.id.three:\n digitButtonPressed(\"3\");\n break;\n\n case R.id.four:\n digitButtonPressed(\"4\");\n break;\n\n case R.id.five:\n digitButtonPressed(\"5\");\n break;\n\n case R.id.six:\n digitButtonPressed(\"6\");\n break;\n\n case R.id.seven:\n digitButtonPressed(\"7\");\n break;\n\n case R.id.eight:\n digitButtonPressed(\"8\");\n break;\n\n case R.id.nine:\n digitButtonPressed(\"9\");\n break;\n\n case R.id.zero:\n digitButtonPressed(\"0\");\n break;\n\n case R.id.dot:\n digitButtonPressed(\".\");\n break;\n\n case R.id.add:\n symbolButtonPressed(\"+\");\n break;\n\n case R.id.subtract:\n symbolButtonPressed(\"-\");\n break;\n\n case R.id.multiply:\n symbolButtonPressed(\"x\");\n break;\n\n case R.id.divide:\n symbolButtonPressed(\"/\");\n break;\n\n case R.id.equal:\n pressedEqualButton();\n break;\n\n case R.id.clear:\n clear();\n break;\n\n case R.id.delete:\n pressedDeleteButton();\n break;\n\n default:\n loge(\"no support this operator, do nothing!\");\n break;\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tString oper1 = operando1.getText();\n\t\t\t\tString oper2 = operando2.getText();\n\t\t\t\tint num1 = Integer.parseInt(oper1);\n\t\t\t\tint num2 = Integer.parseInt(oper2);\n\t\t\t\tint resul = num1 + num2;\n\t\t\t\tString total = String.valueOf(resul);\n\t\t\t\tresultado.setText(total);\n\t\t\t}", "private void event(KeyEvent e ,JTextField textField) {\n\t\tchar n = e.getKeyChar();\r\n\t\tif (!Character.isDigit(n) && n != 8 && n != 46)\r\n\t\t{\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"event\", \"Вы ввели не числовое значение\".concat(textField.getText()));\r\n\t\t\ttextField.setEditable(false);\r\n\t\t}else {\r\n\t\t\tlogp(INFO, getClassName(GraphicalUserInterface.class), \"event\", \"Вы ввели числовое значение\".concat(textField.getText()));\r\n\t\t\ttextField.setEditable(true);\r\n\t\t}\r\n\t}", "@Override //the numbers should only be set when the text field is focused\n public void handle(ActionEvent event) {\n String extractfrombutton = \"7\";\n if (inidep1.isFocused()) {\n inidep1.setText(inidep1.getText()+ extractfrombutton);\n }\n else if (intrate1.isFocused()) {\n intrate1.setText(intrate1.getText() + extractfrombutton);\n }\n else if (time1.isFocused()) {\n time1.setText(time1.getText() + extractfrombutton);\n }\n else if (futval1.isFocused()) {\n futval1.setText(futval1.getText() + extractfrombutton);\n }\n else if (inidep2.isFocused()) {\n inidep2.setText(inidep2.getText() + extractfrombutton);\n }\n else if (intrate2.isFocused()) {\n intrate2.setText(intrate2.getText() + extractfrombutton);\n }\n else if (time2.isFocused()) {\n time2.setText(time2.getText() + extractfrombutton);\n }\n else if (moncon.isFocused()) {\n moncon.setText(moncon.getText() + extractfrombutton);\n }\n else if (futval2.isFocused()) {\n futval2.setText(futval2.getText() + extractfrombutton);\n }\n else if (loanamt.isFocused()) {\n loanamt.setText(loanamt.getText() + extractfrombutton);\n }\n else if (intrate3.isFocused()) {\n intrate3.setText(intrate3.getText() + extractfrombutton);\n }\n else if (time3.isFocused()) {\n time3.setText(time3.getText() + extractfrombutton);\n }\n else if (monpay.isFocused()) {\n monpay.setText(monpay.getText() + extractfrombutton);\n }\n else if (noofpay.isFocused()) {\n noofpay.setText(noofpay.getText() + extractfrombutton);\n }\n else if (assetprice.isFocused()) {\n assetprice.setText(assetprice.getText() + extractfrombutton);\n }\n else if (loanterm.isFocused()) {\n loanterm.setText(loanterm.getText() + extractfrombutton);\n }\n else if (intrate4.isFocused()) {\n intrate4.setText(intrate4.getText() + extractfrombutton);\n }\n else if (monpay2.isFocused()) {\n monpay2.setText(monpay2.getText() + extractfrombutton);\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String action = e.getActionCommand();\n\n\n if (action.equals(keys[2])){\n //用户按下C\n handleC();\n }else if (action.equals(keys[3])){\n //用户按下退格\n handleBackspace();\n }else if (action.equals(keys[18])){\n //用户按下=\n handleCalc();\n }else{\n //用户输入表达式\n handleExpression(action);\n }\n }", "public void buttonExpone (View v){\n expressionView.setText(expressionView.getText() + \"^\");\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString str = e.getActionCommand();\n\t\tString ans = resultField.getText();\n\t\tString ans2 = resultField2.getText();\n\t\tdouble result;\n\t\t\n\t\tif(str ==\"0\" || str ==\"1\" || str == \"2\"|| str== \"3\" ||\n\t\t\t\tstr == \"4\"|| str == \"5\" || str == \"6\" || str == \"7\"|| str == \"8\" || str == \"9\" || str ==\".\"){\n\t\t resultField.setText(ans + str);\n\t\t resultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"+\" || str == \"-\" || str == \"*\" || str == \"/\")\n\t\t{\n\t\t\toper = ans;\n\t\t\top = str;\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(ans2 + str);\n\t\t}\n\t\tif(str == \"x^2\"){\n\t\t\tresultField.setText(\"\"+Double.parseDouble(ans)*Double.parseDouble(ans));\n\t\t\tresultField2.setText(ans2 + \"^2\");\n\t\t}\n\t\tif(str == \"sqrt\")\n\t\t{\n\t\t\tresultField.setText(\"\"+Math.sqrt(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(ans2 + \"^1/2\");\n\t\t}\n\t\tif(str == \"1/X\")\n\t\t{\n\t\t\tresultField.setText(\"\"+1/(Double.parseDouble(ans)));\n\t\t\tresultField2.setText(\"1/(\" + ans2 + \")\");\n\t\t}\n\t\tif(str==\"+/-\")\n\t\t{\n\t\t\tresultField.setText(\"\"+-1*(Double.parseDouble(ans)));\n\t\t\tresultField.setText(\"-1*(\"+ans2+\")\");\n\t\t}\n\n\t\tif(str==\"=\")\n\t\t{\n\t\t\tchar c=op.charAt(0);\n\t\t\tswitch(c)\n\t\t\t{\n\t\t\tcase '+':\n\t\t\t\tresult=Double.parseDouble(oper) + Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tresult=Double.parseDouble(oper) - Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tresult=Double.parseDouble(oper) * Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tresult=Double.parseDouble(oper) / Double.parseDouble(ans);\n\t\t\t\tresultField.setText(\"\"+result);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(str == \"C\")\n\t\t{\n\t\t\tresultField.setText(\"\");\n\t\t\tresultField2.setText(\"\");\n\t\t}\n\t\t\n\t\tif(str == \"Backspace\")\n\t\t{\n\t\t\tString temp=resultField.getText();\n\t\t\ttemp=temp.substring(0,temp.length()-1);\n\t\t\tresultField.setText(temp);\n\t\t\tString temp2=resultField2.getText();\n\t\t\ttemp2 = temp2.substring(0,temp2.length()-1);\n\t\t\tresultField2.setText(temp2);\n\t\t\t\n\t\t}\n\n\t}", "@Override\r\npublic void actionPerformed(ActionEvent e) {\n\tif(e.getSource()==b1)\r\n\t{ \r\n\t\tString s=b1.getText();\t\r\n\t\ttext.setText(text.getText().concat(s));\r\n\t}\r\n\tif(e.getSource()==b2)\r\n\t{\r\n\t\tString s=b2.getText();\r\n\t\ttext.setText(text.getText().concat(\"2\"));\r\n\t}\r\n\t\r\n\tif(e.getSource()==b3)\r\n\t{\r\n\t\tString s=b3.getText();\r\n text.setText(text.getText().concat(\"3\"));\r\n\t}\r\n\tif(e.getSource()==b4)\r\n\t{\r\n\t\tString s=b4.getText();\r\n text.setText(text.getText().concat(\"4\"));\r\n\t}\r\n\tif(e.getSource()==b5)\r\n\t{\r\n\t\tString s=b5.getText();\r\n text.setText(text.getText().concat(\"5\"));\r\n\t}\r\n\tif(e.getSource()==b6)\r\n\t{\r\n\t\tString s=b6.getText();\r\n text.setText(text.getText().concat(\"6\"));\r\n\t}\r\n\tif(e.getSource()==b7)\r\n\t{\r\n\t\tString s=b7.getText();\r\n text.setText(text.getText().concat(\"7\"));\r\n\t}\r\n\tif(e.getSource()==b8)\r\n\t{\r\n\t\tString s=b8.getText();\r\n text.setText(text.getText().concat(\"8\"));\r\n\t}\r\n\t\r\n\tif(e.getSource()==b9)\r\n\t{\r\n\t\tString s=b9.getText();\r\n text.setText(text.getText().concat(\"9\"));\r\n\t}\r\n\t\r\n\tif(e.getSource()==b10)\r\n\t{\r\n\t\t//String s=b10.getText();\r\n //text.setText(text.getText().concat(\"*\"));\r\n\t\ta=Double.parseDouble(text.getText());\r\n\t\ttext.setText(\"\");\r\n\t\t\r\n\t}\r\n\tif(e.getSource()==b11)\r\n\t{\r\n\t//\tString s=b11.getText();\r\n // text.setText(text.getText().concat(\"/\"));\r\n\t\ta=Double.parseDouble(text.getText());\r\n\t\ttext.setText(\"\");\r\n\t\top=4;\r\n\t}\r\n\tif(e.getSource()==b12)\r\n\t{\r\n\t\t//String s=b14.getText();\r\n //text.setText(text.getText().concat(\"+\"));\r\n\t\t\r\n\t\t\r\n a=Double.parseDouble(text.getText());\r\n op=1;\r\n text.setText(\"\");\r\n\t}\r\n\r\n//\r\nif(e.getSource()==b13)\r\n{\r\n\tString s=b13.getText();\r\n // text.setText(text.getText().concat(\"-\"));\r\n // text.setText(\"\");\r\n a=Double.parseDouble(text.getText());\r\n op=2;\r\n text.setText(\"\"); \r\n}\r\n\r\n\tif(e.getSource()==b14)\r\n\t{\r\n \r\n\t\tString s=b12.getText();\r\n //text.setText(text.getText().concat(\"=\")xt);\r\n\t\tb=Double.parseDouble(text.getText());\r\n\t\t\r\n\t\tswitch(op)\r\n\t\t{\r\n\t\tcase 1:\r\n\t result=a+b;\r\n\t break;\r\n\t\tcase 2:\r\n\t result=a-b;\r\n\t break;\r\n\t\tcase 3:\r\n \tresult=a*b;\r\n\t\tcase 4:\r\n\t result=a/b;\r\n\t\tcase 5:\r\n\t\tresult=a%b;\r\n\t\tbreak;\r\n\t\tcase 6:\r\n\t result=1/a;\r\n\t\t//case 7:\r\n\t // result= a root b;\r\n\t\t}\r\n\t// String re=String.valueOf(result);\r\n text.setText(\"\" +result);\r\n\t}\r\n\tif(e.getSource()==b15)\r\n\t{\r\n\t//\tString s=b15.getText();\r\n // text.setText(text.getText().concat(\"%\"));\r\n op=4;\r\n Double a=Double.parseDouble(text.getText());\r\n text.setText(\"\");\r\n\t}\r\n\tif(e.getSource()==b16)\r\n\t{\r\n\t//\tString s=b16.getText();\r\n // text.setText(text.getText().concat(\"(1/x)\"));\r\n\t\top=6;\r\n // text.setText(\"\");\r\n a=Double.parseDouble(text.getText());\r\n \r\n\t}\r\n\t\r\n//\tif(e.getSource()==b17)\r\n//\t{\r\n//\t//\tString s=b17.getText();\r\n// // text.setText(text.getText().concat(\"(root)\"));\r\n//\t}\r\n\tif(e.getSource()==b18)\r\n\t{\r\n\t\tString s=b18.getText();\r\n // text.setText(text.getText().concat(\"root\"));\r\n String del= text.getText();\r\n List<String> l=new ArrayList<String>();\r\n List<String> a=new ArrayList<String>();\r\n \r\n //String s1[]={text.getText()};\r\n String s12=text.getText();\r\n text.setText(\"\");\r\n for( int i=0;i<s12.length()-1;i++)\r\n {\r\n \t \r\n text.setText(text.getText()+s12.charAt(i));\r\n \t \r\n \t \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n // Double a=Double.parseDouble(text.getText());\r\n \r\n// for(int x=0;x<l.size();x++)\r\n// {\r\n//\r\n// \t text.setText(l.get(x));\r\n// \t\tSystem.out.println(\"sublist values are\" + l.get(x)); \r\n// }\r\n\r\n \r\n\t }\r\n \r\nif(e.getSource()==b19)\r\n\t{\t\tString s=b19.getText();\r\n text.setText(\"\");\r\n\t}\r\n//\tif(e.getSource()==b20)\r\n//\t{\r\n//\t\tString s=b20.getText();\r\n // text.setText(s);\r\n\t//}\r\n}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == h) {\r\n\t\t\t\t\tva1 = Integer.parseInt(text.getText());\r\n\t\t\t\t\top = \"-\";\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_calculator);\n\n setupUIViews();\n\n button0.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"0\");\n }\n });\n\n button1.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"1\");\n }\n });\n\n button2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"2\");\n }\n });\n\n button3.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"3\");\n }\n });\n\n button4.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"4\");\n }\n });\n\n button5.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"5\");\n }\n });\n\n button6.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"6\");\n }\n });\n\n button7.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"7\");\n }\n });\n\n button8.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"8\");\n }\n });\n\n button9.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \"9\");\n }\n });\n\n\n\n\n\n buttonDecimal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n textViewInput.setText(textViewInput.getText().toString() + \".\");\n }\n });\n\n buttonPlus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n compute();\n ACTION = ADDITION;\n textViewAnswer.setText(String.valueOf(val1) + \" + \");\n textViewInput.setText(null);\n }\n });\n\n buttonMinus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n compute();\n ACTION = SUBTRACTION;\n textViewAnswer.setText(String.valueOf(val1) + \" - \");\n textViewInput.setText(null);\n }\n });\n\n buttonDivide.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n compute();\n ACTION = DIVISION;\n textViewAnswer.setText(String.valueOf(val1) + \" / \");\n textViewInput.setText(null);\n }\n });\n\n buttonMultiply.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n compute();\n ACTION = MULTIPLICATION;\n textViewAnswer.setText(String.valueOf(val1) + \" * \");\n textViewInput.setText(null);\n }\n });\n\n buttonEqual.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n compute();\n ACTION = EQU;\n textViewAnswer.setText(textViewAnswer.getText().toString() + String.valueOf(val2) + \"=\" + String.valueOf(val1)); // 1 +2 =3\n textViewInput.setText(null);\n }\n });\n\n\n\n\n\n ///////////////////////////////////////////////////////////////////////// I FIGURED IT OUUUTTT !!!!!!!!!!!!\n /*\n clear2.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // compute();\n val1 = Double.NaN; //I added this part, take off when u want original\n val2 = Double.NaN; //I added this part, take off when u want original\n\n //I added this part, take off when u want original\n textViewAnswer.setText(null);\n textViewInput.setText(null);\n }\n });\n\n */\n ///////////////////////////////////////////////////////////////////////\n\n\n\n buttonClear.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n //WTF U DON'T NEED THIS\n // compute();\n\n\n if(textViewInput.getText().length() > 0 )\n {\n CharSequence name = textViewInput.getText().toString();\n textViewInput.setText(name.subSequence(0, name.length()-1 ));\n\n\n\n // val1 = Double.NaN; //I added this part, take off when u want original\n // val2 = Double.NaN; //I added this part, take off when u want original\n // textViewInput.setText(null); //I added this part, take off when u want original\n // textViewAnswer.setText(null); //I added this part, take off when u want original\n\n\n\n }\n else\n {\n\n\n val1 = Double.NaN;\n val2 = Double.NaN;\n textViewInput.setText(null);\n textViewAnswer.setText(null);\n }\n\n\n\n\n }\n\n\n});\n\n\n\n }", "@Override\n public void onClick(View v) {\n dot_inserted = false;\n\n /*check for validation if curr is empty*/\n if(curr.isEmpty()){\n /*check if the last digit is a dot and remove it*/\n if(curr.substring(curr.length()-1, curr.length()).equals(\".\")){\n del();\n }\n }\n\n /*check fr validation if operator is inserted is equal to false then append the operator to curr*/\n if(operator_inserted == false){\n curr = curr + \"/\";\n operator_inserted = true;\n }\n displayNum();\n }", "private void numberPressed(String number){\n String value1;\n String value2;\n if (operatorPressed == true){\n txtBox.setText(\"\");\n operatorPressed = false;\n equals = false;\n value1 = txtBox.getText();\n }\n else if (equals == true){\n txtBox.setText(\"\");\n equals = false;\n value1 = txtBox.getText();\n }\n else{\n value1 = txtBox.getText();\n }\n value2 = value1 + number;\n\n // try catch block to validate number entered into textbox\n try {\n txtBox.setText(value2);\n test = Double.parseDouble(txtBox.getText());\n }\n catch (NumberFormatException nfe){\n if (nfe.getMessage().equals(\"multiple points\")){\n msgMessage.showMessageDialog(this, \"The number contains multiple decimal points\", \"Decimal Points Error\", javax.swing.JOptionPane.ERROR_MESSAGE);\n }\n else {\n msgMessage.showMessageDialog(this, \"You have not entered a valid number\", \"Number Format Exception Caught\", javax.swing.JOptionPane.ERROR_MESSAGE);\n } \n }\n \n }", "public void buttonMod (View view){ expressionView.setText(expressionView.getText() + \"Mod\");}", "@Override\n public void onClick(View v) {\n String currentText = textResult.getText().toString();\n int buttonId = v.getId();\n\n switch (buttonId) {\n case R.id.button_one:\n textResult.setText(currentText + \"1\");\n break;\n\n case R.id.button_two:\n textResult.setText(currentText + \"2\");\n break;\n\n case R.id.button_three:\n textResult.setText(currentText + \"3\");\n break;\n\n case R.id.button_four:\n textResult.setText(currentText + \"4\");\n break;\n\n case R.id.button_clear:\n clear();\n break;\n\n case R.id.button_result:\n String result = calculate(currentText);\n clear();\n textResult.setText(result);\n break;\n }\n\n if (temMaisQueUmOperador(currentText) == false) {\n switch (buttonId) {\n case R.id.button_sum:\n isSum = true;\n textResult.setText(currentText + \"+\");\n break;\n\n case R.id.button_sub:\n isSub = true;\n textResult.setText(currentText + \"-\");\n break;\n\n case R.id.button_mult:\n isMult = true;\n textResult.setText(currentText + \"*\");\n break;\n }\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n CheckOperation(calButtons.super.getText());\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfloat n1=Float.parseFloat(a.getText().toString());\n\t\t float n2=Float.parseFloat(b.getText().toString());\n\n\t\t\t\top.setText(String.valueOf(n1+n2));\n\t\t\t}", "public void operation() {\n\t\t\n\t\tswitch(calculation){\n\t\t\tcase 1:\n\t\t\t\ttotal = num + Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\ttotal = num - Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\ttotal = num * Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\ttotal = num / (Double.parseDouble(textField.getText()));\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tString oper1 = operando1.getText();\n\t\t\t\tString oper2 = operando2.getText();\n\t\t\t\tint num1 = Integer.parseInt(oper1);\n\t\t\t\tint num2 = Integer.parseInt(oper2);\n\t\t\t\tint resul = num1 - num2;\n\t\t\t\tString total = String.valueOf(resul);\n\t\t\t\tresultado.setText(total);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJButton btn = (JButton)e.getSource();\n\t\t\t\tString num = btn.getText();\n\t\t\t\t\n\t\t\t\t//check if pressed btn is orange\n\t\t\t\tif(btn.getBackground()!=Color.orange){\n\t\t\t\t\ttfNums[numIndex].setText(num);\n\t\t\t\t\tbtn.setBackground(Color.orange);\n\t\t\t\t\t\n\t\t\t\t\tif(enteredNums[numIndex]!=null){\n\t\t\t\t\t\tbtns[enteredNums[numIndex]-1].setBackground(Color.white);\n\t\t\t\t\t}\n\t\t\t\t\tenteredNums[numIndex]=Integer.parseInt(num);\n\t\t\t\t\t\n\t\t\t\t\tif(numIndex==5){\n\t\t\t\t\t\tnumIndex=0;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnumIndex++;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//cancel num\n\t\t\t\t\tbtn.setBackground(Color.white);\n\t\t\t\t\tfor(JTextField tf : tfNums){\n\t\t\t\t\t\tif(tf.getText().equals(num)){\n\t\t\t\t\t\t\ttf.setText(\"\");\n\t\t\t\t\t\t\ttf.setBackground(Color.white);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View v) {\n tv.setText(\"×\");\n if(op == -1){\n sum = temp;\n temp = 0.0;\n }else{\n if(op == 1){\n sum += temp;\n }else if(op == 2){\n sum -= temp;\n }else if(op == 3){\n sum *= temp;\n }else if(op == 4){\n sum /= temp;\n }\n }\n op = 3;\n temp = 0.0;\n positive = true;\n flag = true;\n }", "public void button0(View v) {\n\n /* Add the digit to the expression. */\n expression += \"0\";\n\n /* Update the screen. */\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n }", "void bsButtonHandling(){\n\n Boolean checkFlag = false;\n for(int i = 0; i < 4; ++i){\n if(operatorButtonClicked[i]){\n checkFlag = true;\n break;\n }\n }\n\n // -----------------------------------------------------\n // if an operator button was clicked then ignore BS\n if(checkFlag == false){\n numberOnDisplay = Integer.parseInt(display.getText().toString());\n numberOnDisplay = numberOnDisplay/10;\n display.setText(Integer.toString(numberOnDisplay));\n numberOnDisplay = 0;\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(op.equals(\"-\")) {\r\n\t\t\t\t\tva2 = Integer.parseInt(text.getText());\r\n\t\t\t\t\tresult = va1 - va2;\r\n\t\t\t\t\ttext.setText(String.valueOf(result));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfloat n1=Float.parseFloat(a.getText().toString());\n\t\t float n2=Float.parseFloat(b.getText().toString());\n\t\t\n\t\t\t\top.setText(String.valueOf(n1*n2));\n\t\t\t}", "public void keyPressed(KeyEvent event){\r\n\t\t\tchar input = event.getKeyChar();\r\n\t\t\tSystem.out.println(event.getExtendedKeyCode());\r\n\t\t\tif(event.getExtendedKeyCode()== 10){\r\n\t\t\t equals.doClick();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tswitch(input){\r\n\t\t\t\tcase '0': button0.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '1': button1.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '2': button2.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '3': button3.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '4': button4.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '5': button5.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '6': button6.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '7': button7.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '8': button8.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '9': button9.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '.': dot.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '+': plus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '-': minus.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '/': divide.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '*': multiply.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '=': equals.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\b': del.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase '\u001b': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase 'c': clear.doClick();\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tdefault: break;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\n public void onClick(View v) {\n tv.setText(\"+\");\n if(op == -1){\n sum = temp;\n temp = 0.0;\n }else{\n if(op == 1){\n sum += temp;\n }else if(op == 2){\n sum -= temp;\n }else if(op == 3){\n sum *= temp;\n }else if(op == 4){\n sum /= temp;\n }\n }\n op = 1;\n temp = 0.0;\n positive = true;\n flag = true;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n num1 = new javax.swing.JButton();\n num2 = new javax.swing.JButton();\n num3 = new javax.swing.JButton();\n num4 = new javax.swing.JButton();\n num5 = new javax.swing.JButton();\n num6 = new javax.swing.JButton();\n num7 = new javax.swing.JButton();\n txtQ = new javax.swing.JTextField();\n add = new javax.swing.JButton();\n num8 = new javax.swing.JButton();\n num9 = new javax.swing.JButton();\n num0 = new javax.swing.JButton();\n exit = new javax.swing.JButton();\n clear = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n num1.setText(\"1\");\n num1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num1ActionPerformed(evt);\n }\n });\n\n num2.setText(\"2\");\n num2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num2ActionPerformed(evt);\n }\n });\n\n num3.setText(\"3\");\n num3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num3ActionPerformed(evt);\n }\n });\n\n num4.setText(\"4\");\n num4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num4ActionPerformed(evt);\n }\n });\n\n num5.setText(\"5\");\n num5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num5ActionPerformed(evt);\n }\n });\n\n num6.setText(\"6\");\n num6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num6ActionPerformed(evt);\n }\n });\n\n num7.setText(\"7\");\n num7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num7ActionPerformed(evt);\n }\n });\n\n txtQ.setText(\"0\");\n\n add.setText(\"Add\");\n add.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addActionPerformed(evt);\n }\n });\n\n num8.setText(\"8\");\n num8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num8ActionPerformed(evt);\n }\n });\n\n num9.setText(\"9\");\n num9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num9ActionPerformed(evt);\n }\n });\n\n num0.setText(\"0\");\n num0.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n num0ActionPerformed(evt);\n }\n });\n\n exit.setText(\"Exit\");\n exit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitActionPerformed(evt);\n }\n });\n\n clear.setText(\"Clear\");\n clear.setToolTipText(\"\");\n clear.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n clearActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(num0)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(add, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(num7)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(num8)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(num9)))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(txtQ, javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(num4)\n .addGap(6, 6, 6)\n .addComponent(num5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(num6))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(num1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(num2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(num3))))))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(clear)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(exit)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(txtQ, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(num2)\n .addComponent(num3)\n .addComponent(num1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(num6)\n .addComponent(num5)\n .addComponent(num4))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(num7)\n .addComponent(num8)\n .addComponent(num9))\n .addGap(9, 9, 9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(num0)\n .addComponent(add))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(exit)\n .addComponent(clear))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 27, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tif (e.getSource()==btnSair)\n\t\t\t{\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tif(e.getSource()==btnClear)\n\t\t\t{\n\t\t\t\ttAaExibir.setText(null);\n\t\t\t\taux=\"\";\n\t\t\t\titemA=0;\n\t\t\t\titemB=0;\n\t\t\t}\n\t\t\tif(e.getSource()==btnUm)\n\t\t\t{\n\t\t\t\taux+=\"1\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(e.getSource()==btnDois)\n\t\t\t{\n\t\t\t\taux+=\"2\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnTres)\n\t\t\t{\n\t\t\t\taux+=\"3\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnQuatro)\n\t\t\t{\n\t\t\t\taux+=\"4\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnCinco)\n\t\t\t{\n\t\t\t\taux+=\"5\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnSeis)\n\t\t\t{\n\t\t\t\taux+=\"6\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnSete)\n\t\t\t{\n\t\t\t\taux+=\"7\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnOito)\n\t\t\t{\n\t\t\t\taux+=\"8\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnNove)\n\t\t\t{\n\t\t\t\taux+=\"9\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnZero)\n\t\t\t{\n\t\t\t\taux+=\"0\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t}\n\t\t\tif(e.getSource()==btnMultipli)\n\t\t\t{\n\t\t\t\tmultiA();\n\t\t\t}\n\t\t\tif(e.getSource()==btnAdicao)\n\t\t\t{\n\t\t\t\tsomaA();\n\t\t\t}\n\t\t\tif(e.getSource()==btnDivi)\n\t\t\t{\n\t\t\t\tdivi();\n\t\t\t}\n\t\t\tif(e.getSource()==btnSubtracao)\n\t\t\t{\n\t\t\t\tsubt();\n\t\t\t}\n\t\t\tif(e.getSource()==btnCalc)\n\t\t\t{\n\t\t\t\tcalcular();\n\t\t\t\taux = \"\"+resultado+\"\\n\";\n\t\t\t\ttAaExibir.setText(aux);\n\t\t\t\taux = \"\";\n\t\t\t}\n\t\t}", "public void actionPerformed(ActionEvent event) {\n // it is a digit or decimal point\n JButton source = (JButton) event.getSource();\n String label = source.getText();\n // don't add two decimal points\n if (label.equals(\".\") && display.getText().indexOf(\".\") != -1) {\n return;\n }\n display.setText(display.getText() + label);\n }", "public void CalcMethod1(String S){\n if(AfterEqual == 1)\n {\n //After Pressing the equal button when pressed action button...\n AnswerHalf = AnswerHalf;\n }\n //After Pressing the number button when pressed action button...\n else\n {\n String ButtonNo = Save1[0];\n for(int n = 1;n<c;n++){\n ButtonNo = ButtonNo + Save1[n];\n }\n ButtonValue = Double.parseDouble(ButtonNo);\n if(SymbolMark>0)\n {\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf / ButtonValue;\n }\n }\n else\n {\n AnswerHalf = ButtonValue;\n }\n }\n SymbolMark++;\n Symbol = S;\n c = 0;\n }", "public void Calculation(){\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf/ButtonValue;\n }\n printAnswer = Double.toString(AnswerHalf);\n AfterEqual = 1;\n SymbolMark = 0;\n c = 0;\n AfterAnswer = 0;\n TFCalcBox.setText(printAnswer);\n }", "@Override\r\n public void onClick(View view) {\n CheckEditTextIsEmptyOrNot();\r\n\r\n if(CheckEditText)\r\n {\r\n // if CheckEditText is true\r\n EventDataFunction(ename_holder,edesc_holder,eloc_holder,edate_holder,etime_holder,elat_holder,elong_holder);\r\n }\r\n else\r\n {\r\n // if CheckEditText is false\r\n Toast.makeText(AdminActivity.this,\"Please fill all the fields.\",Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\ttip_perc.setText(\"Tip: \"+String.valueOf(tip_percentage)+\" %\");\n\t\t\t\tint tip_dollar = calculateTip(tip_percentage, Integer.parseInt(ed.getText().toString()));\n\t\t\t\ttotal_val=Integer.parseInt(ed.getText().toString())+tip_dollar;\n\t\t\t\ttip.setText(\"Tip: \"+String.valueOf(tip_dollar));\n\t\t\t\ttotal.setText(\"Total: \" + String.valueOf(total_val));\n\t\t\t\treturn false;\n\t\t\t}", "private static void buttonSetup() {\n \n // For all buttons except clear and equals=, update display\n for(JButton i:buttonOrder) {\n if(i.equals(clear) || i.equals(equals))\n continue;\n i.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n if(displayString.toString().equals(\"ERROR\")) {\n displayString.replace(0, displayString.length(), i.getText());\n numField.setText(displayString.toString());\n } else {\n displayString.append(i.getText());\n numField.setText(displayString.toString());\n }\n }\n });\n }\n \n // Clears display\n clear.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n displayString.delete(0, displayString.length());\n numField.setText(displayString.toString());\n }\n });\n \n // Clears display, shows result\n equals.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent evt) {\n equationParse(displayString);\n }\n });\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[13]++;\r\n\t\t\t\tvalue[13] %= 3;\r\n\t\t\t\tif (value[13] == 0) {\r\n\t\t\t\t\tbtn[13].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[13] == 1) {\r\n\t\t\t\t\tbtn[13].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[13] == 2) {\r\n\t\t\t\t\tbtn[13].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( input_symbol == '+' || input_symbol == '-' || input_symbol == '*' || input_symbol == '/'){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// get result(String)\n\t\t\t\t\t\t\t\tget_result = txt_showresult.getText();\n\t\t\t\t\t\t\t\tresult = Double.parseDouble(get_result);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcalculate_equal();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void actionPerformed(final ActionEvent event) {\n /* only do this if the buttons are related and\n the action is short */\n // the button pressed\n final JButton sent = (JButton)event.getSource();\n // the button's label\n final String label = sent.getText();\n\n // Use the button's text to select the action\n if (label.equals(\"+1\")) {\n value++;\n } else if (label.equals(\"-1\")) {\n value--;\n } else if (label.equals(\"red\")) {\n result.setForeground(Color.RED);\n } else {\n value=0;\n result.setForeground(Color.BLACK);\n }\n // update the value shown in the label\n result.setText(Integer.toString(value));\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\t\n\t\tif (e.getSource() == qword) {\n\t\t\t\n\t\t\tswitch(counter % 4) {\n\t\t\t\n\t\t\tcase 0: \n\t\t\t\tqword.setText(\"BYTE\");\n\t\t\t\tcounter++;\n\t\t\t\tbreak;\n\t\t\tcase 1: \n\t\t\t\tqword.setText(\"WORD\");\n\t\t\t\tcounter++;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tqword.setText(\"DWORD\");\n\t\t\t\tcounter++;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tqword.setText(\"QWORD\");\n\t\t\t\tcounter++;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[1]) {\n\t\t\t\n\t\t\tString input1 = Panel2.getInput().getText();\n\t\t\td_input1 = Double.parseDouble(input1);\n\t\t\tPanel2.getInput().setText(\"\");\n\n\t\t\toperator = \"remainder\";\n\t\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[2] || e.getSource() == button[3]) {\n\t\t\t\n\t\t\tPanel2.getInput().setText(\"\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(\"0\");\n\t\t\tPanel3.dec_val.setText(\"0\");\n\t\t\tPanel3.oct_val.setText(\"0\");\n\t\t\tPanel3.bin_val.setText(\"0\");\n\t\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[4]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\t\n\t\t\tif (input.length() > 0) {\n\t\t\t\t\n\t\t\t\tinput = input.substring(0,input.length()-1);\n\t\t\t\t\n\t\t\t}\n\t\t\tPanel2.getInput().setText(input);\n\n\t\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[5]) {\n\t\t\t\n\t\t\tString input1 = Panel2.getInput().getText();\n\t\t\td_input1 = Double.parseDouble(input1);\n\t\t\tPanel2.getInput().setText(\"\");\n\n\t\t\toperator = \"divide\";\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[6]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"A\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[6]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"A\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[7]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"B\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[8]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"7\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[9]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"8\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[10]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"9\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[11]) {\n\t\t\t\n\t\t\tString input1 = Panel2.getInput().getText();\n\t\t\td_input1 = Double.parseDouble(input1);\n\n\t\t\tPanel2.getInput().setText(\"\");\n\n\t\t\toperator = \"multiply\";\n\t\t\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[12]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"C\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[13]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"D\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[14]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"4\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[15]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"5\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[16]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"6\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[17]) {\n\t\t\t\n\t\t\tString input1 = Panel2.getInput().getText();\n\t\t\td_input1 = Double.parseDouble(input1);\n\t\t\tPanel2.getInput().setText(\"\");\n\n\t\t\toperator = \"subtract\";\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[18]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"E\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[19]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"F\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[20]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"1\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[21]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"2\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[22]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"3\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[23]) {\n\t\t\t\n\t\t\tString input1 = Panel2.getInput().getText();\n\t\t\td_input1 = Double.parseDouble(input1);\n\t\t\tPanel2.getInput().setText(\"\");\n\t\t\t\t\t\t\n\t\t\toperator = \"add\";\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[24]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"(\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[25]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\")\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[27]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\"0\");\n\t\t\t\n\t\t\tPanel3.hex_val.setText(Panel3.getHexadecimal());\n\t\t\tPanel3.dec_val.setText(Panel3.getDecimal());\n\t\t\tPanel3.oct_val.setText(Panel3.getOctal());\n\t\t\tPanel3.bin_val.setText(Panel3.getBinary());\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[28]) {\n\t\t\t\n\t\t\tString input = Panel2.getInput().getText();\n\t\t\tPanel2.getInput().setText(input+\".\");\n\n\t\t}\n\t\t\n\t\tif (e.getSource() == button[29]) {\n\t\t\t\t\t\n\t\t\tswitch (operator) {\n\t\t\t\n\t\t\t\tcase \"divide\":\n\t\t\t\t\t\n\t\t\t\t\tinput2 = Panel2.getInput().getText();\n\t\t\t\t\t\n\t\t\t\t\td_input2 = Double.parseDouble(input2);\n\t\t\t\t\t\n\t\t\t\t\td_output = d_input1 / d_input2;\n\t\t\t\t\t\n\t\t\t\t\ts_output = Double.toString(d_output);\n\t\t\t\t\t\n\t\t\t\t\tPanel2.getInput().setText(s_output);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"multiply\":\n\t\t\t\t\n\t\t\t\t\tinput2 = Panel2.getInput().getText();\n\t\t\t\t\t\n\t\t\t\t\td_input2 = Double.parseDouble(input2);\n\t\t\t\t\t\n\t\t\t\t\td_output = d_input1 * d_input2;\n\t\t\t\t\t\n\t\t\t\t\ts_output = Double.toString(d_output);\n\t\t\t\t\t\n\t\t\t\t\tPanel2.getInput().setText(s_output);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"subtract\":\n\t\t\t\t\t\n\t\t\t\t\tinput2 = Panel2.getInput().getText();\n\t\t\t\t\t\n\t\t\t\t\td_input2 = Double.parseDouble(input2);\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(d_input1);\n\t\t\t\t\tSystem.out.println(d_input1);\n\t\t\t\t\t\n\t\t\t\t\td_output = d_input1 - d_input2;\n\t\t\t\t\t\n\t\t\t\t\ts_output = Double.toString(d_output);\n\t\t\t\t\t\n\t\t\t\t\tPanel2.getInput().setText(s_output);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"add\":\n\t\t\t\t\t\n\t\t\t\t\tinput2 = Panel2.getInput().getText();\n\t\t\t\t\t\n\t\t\t\t\td_input2 = Double.parseDouble(input2);\n\t\t\t\t\t\n\t\t\t\t\td_output = d_input1 + d_input2;\n\t\t\t\t\t\n\t\t\t\t\ts_output = Double.toString(d_output);\n\t\t\t\t\t\n\t\t\t\t\tPanel2.getInput().setText(s_output);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase \"remainder\":\n\t\t\t\t\t\n\t\t\t\t\tinput2 = Panel2.getInput().getText();\n\t\t\t\t\t\n\t\t\t\t\td_input2 = Double.parseDouble(input2);\n\t\t\t\t\t\n\t\t\t\t\td_output = d_input1 % d_input2;\n\t\t\t\t\t\n\t\t\t\t\ts_output = Double.toString(d_output);\n\t\t\t\t\t\n\t\t\t\t\tPanel2.getInput().setText(s_output);\n\t\t\t\t\t\n\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\t\t\n\t}", "public void buttonClear(View v) {\n expression = \"\";\n\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n\n EditText calculatorInput = (EditText) findViewById(R.id.calculatorInput);\n calculatorInput.setText(\"\");\n }", "@Override\n public void onClick(View view) {\n //switch statement to determine which button was cliked\n switch (view.getId()){\n //case when number one was clicked\n case R.id.one:\n //if the the screen shows 0 then we just replace the 0 with 1, and set currentNumber\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(one.getText().toString());\n currentNumber = one.getText().toString();\n }else{\n //if the screen shows something besides 0, we concatenate whatever was on the\n //screen before plus the 1, and put it on the screen, and update current number\n //accordingly\n screen.setText(screen.getText().toString() + one.getText().toString());\n currentNumber = currentNumber + one.getText().toString();\n }\n break;\n\n //cases two - zero are same as case one except the number changes\n case R.id.two:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(two.getText().toString());\n currentNumber = two.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + two.getText().toString());\n currentNumber = currentNumber + two.getText().toString();\n }\n break;\n\n case R.id.three:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(three.getText().toString());\n currentNumber = three.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + three.getText().toString());\n currentNumber = currentNumber + three.getText().toString();\n }\n break;\n\n case R.id.four:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(four.getText().toString());\n currentNumber = four.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + four.getText().toString());\n currentNumber = currentNumber + four.getText().toString();\n }\n break;\n\n case R.id.five:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(five.getText().toString());\n currentNumber = five.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + five.getText().toString());\n currentNumber = currentNumber + five.getText().toString();\n }\n break;\n\n case R.id.six:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(six.getText().toString());\n currentNumber = six.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + six.getText().toString());\n currentNumber = currentNumber + six.getText().toString();\n }\n break;\n\n case R.id.seven:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(seven.getText().toString());\n currentNumber = seven.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + seven.getText().toString());\n currentNumber = currentNumber + seven.getText().toString();\n }\n break;\n\n case R.id.eight:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(eight.getText().toString());\n currentNumber = eight.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + eight.getText().toString());\n currentNumber = currentNumber + eight.getText().toString();\n }\n break;\n\n case R.id.nine:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(nine.getText().toString());\n currentNumber = nine.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + nine.getText().toString());\n currentNumber = currentNumber + nine.getText().toString();\n }\n break;\n\n case R.id.zero:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(zero.getText().toString());\n currentNumber = zero.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + zero.getText().toString());\n currentNumber = currentNumber + zero.getText().toString();\n\n }\n break;\n\n //case plus, minus, multiply, and divide are very similar, so comments here can be used\n //for all\n //When plus is clicked we will add the current number and plus sign to the numberAndOperands array\n //and update the screen accordingly\n case R.id.plus:\n //if the user is not performing operation on a result of a previous calculation\n //then this if statement will run\n if(!isContinueFromResult) {\n //if current number is not equal to \"\" that means user has a number before this\n //plus sign.\n if(!currentNumber.equals(\"\")) {\n //so we add the currentNumber and the + sign to the array list of Operands\n //and numbers and update the screen accordingly\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"+\");\n screen.setText(screen.getText().toString() + plus.getText().toString());\n }\n //if the current number is \"\" that means that the user is trying to click an\n //operand right after another operand. So in that case we do the following\n else{\n //replace the last operand with current operand\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"+\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"+\");\n screen.setText(newScreen);\n }\n }\n //else means that the user is performing an operation on a result from previous\n //calculations\n else{\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"+\");\n //so instead of updating the screen from what it already had, we update it\n //with current number and the operand, because inside the equals case the\n //current number is being set to the result of calculations\n screen.setText(currentNumber + plus.getText().toString());\n isContinueFromResult = false;\n }\n }\n //in the end we set the current number to \"\" because we want to keep track of\n //when the user is clicking numbers are Operands\n currentNumber = \"\";\n break;\n\n case R.id.minus:\n if(!isContinueFromResult) {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"-\");\n screen.setText(screen.getText().toString() + minus.getText().toString());\n }else{\n //replace the last operand with current\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"-\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"-\");\n screen.setText(newScreen);\n }\n }else {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"-\");\n screen.setText(currentNumber + minus.getText().toString());\n isContinueFromResult = false;\n }\n }\n currentNumber = \"\";\n break;\n\n case R.id.multiply:\n if(!isContinueFromResult) {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"*\");\n screen.setText(screen.getText().toString() + multiply.getText().toString());\n }else{\n //replace the last operand with current\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"*\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"*\");\n screen.setText(newScreen);\n }\n }else {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"*\");\n screen.setText(currentNumber + multiply.getText().toString());\n isContinueFromResult = false;\n }\n }\n currentNumber = \"\";\n break;\n\n case R.id.divide:\n if(!isContinueFromResult) {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"/\");\n screen.setText(screen.getText().toString() + divide.getText().toString());\n }else{\n //replace the last operand with current\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"/\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"/\");\n screen.setText(newScreen);\n }\n }else{\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"/\");\n screen.setText(currentNumber + divide.getText().toString());\n isContinueFromResult = false;\n }\n }\n currentNumber = \"\";\n break;\n\n\n\n case R.id.equals:\n //the following if statement will add the last number to the numbersAndOperands array\n if(!currentNumber.equals(\"\")){\n numbersAndOperands.add(currentNumber);\n }\n\n //if the last thing in the array numbersAndOperands is +-*/ that means it is an invalid\n //and we tell the user and it is invalid and do not do any calculations\n if(numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"+\") ||\n numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"-\") ||\n numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"*\") ||\n numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"/\")){\n Toast.makeText(getActivity(), \"Invalid\", Toast.LENGTH_SHORT).show();\n }\n //When the last thing in the array of numbersAndOperands is a number then we can\n //do the following and calculate the result\n else {\n numbersAndOperands.add(\"=\");\n currentNumber = \"\";\n screen.setText(screen.getText().toString() + equals.getText().toString());\n\n //find all the multiplications and divisions first, and do the calculations\n for (int i = 1; i < numbersAndOperands.size(); i++) {\n if (numbersAndOperands.get(i).equals(\"*\") || numbersAndOperands.get(i).equals(\"/\")) {\n if (numbersAndOperands.get(i).equals(\"*\")) {\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 * n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n\n } else {\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 / n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n }\n }\n }\n\n //find all the plus and minus and do the calculations\n for (int i = 1; i < numbersAndOperands.size(); i++) {\n if (numbersAndOperands.get(i).equals(\"+\") || numbersAndOperands.get(i).equals(\"-\")) {\n if (numbersAndOperands.get(i).equals(\"+\")) {\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 + n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n } else {\n\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 - n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n }\n }\n }\n\n //display the answer and prepare for the next round of the calculations if\n //the user were to perform calculations on the result\n screen.setText(screen.getText().toString() + numbersAndOperands.get(0));\n currentNumber = numbersAndOperands.get(0);\n numbersAndOperands.clear();\n isContinueFromResult = true;\n }\n break;\n\n //here we reset everything we are using to keep track of order of operations and all\n case R.id.clear:\n numbersAndOperands.clear();\n currentNumber = \"0\";\n screen.setText(\"0\");\n break;\n }\n\n\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[7]++;\r\n\t\t\t\tvalue[7] %= 3;\r\n\t\t\t\tif (value[7] == 0) {\r\n\t\t\t\t\tbtn[7].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[7] == 1) {\r\n\t\t\t\t\tbtn[7].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[7] == 2) {\r\n\t\t\t\t\tbtn[7].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[9]++;\r\n\t\t\t\tvalue[9] %= 3;\r\n\t\t\t\tif (value[9] == 0) {\r\n\t\t\t\t\tbtn[9].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[9] == 1) {\r\n\t\t\t\t\tbtn[9].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[9] == 2) {\r\n\t\t\t\t\tbtn[9].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "@FXML\n private void operatorAction(ActionEvent event)\n {\n // Get Button\n Button button = (Button)event.getSource();\n \n // Get Text\n String operatorText = button.getText();\n \n // Press operator\n pressOperator(operatorText);\n \n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n\n btnCalc = (Button) findViewById(R.id.btnEquals);\n btnPeriod = (Button) findViewById(R.id.btnPeriod);\n btnZero = (Button) findViewById(R.id.btn0);\n btnOne = (Button) findViewById(R.id.btn1);\n btnTwo = (Button) findViewById(R.id.btn2);\n btnThree = (Button) findViewById(R.id.btn3);\n btnFour = (Button) findViewById(R.id.btn4);\n btnFive = (Button) findViewById(R.id.btn5);\n btnSix = (Button) findViewById(R.id.btn6);\n btnSeven = (Button) findViewById(R.id.btn7);\n btnEight = (Button) findViewById(R.id.btn8);\n btnNine = (Button) findViewById(R.id.btn9);\n btnCE = (Button) findViewById(R.id.btnAC);\n btnDivide = (Button) findViewById(R.id.btnDivide);\n btnMultiply = (Button) findViewById(R.id.btnMultiply);\n btnAdd = (Button) findViewById(R.id.btnAdd);\n btnMinus = (Button) findViewById(R.id.btnMinus);\n txtOutput = (TextView) findViewById(R.id.txtScreen);\n btnPlusMinus = (Button) findViewById(R.id.btnPlusminus);\n btnBack = (Button) findViewById(R.id.btnBack);\n\n final OnClickListener oclCalc = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum != null){\n strSecondNum = strNumber.replace(strFirstNum + \" \", \"\");\n strSecondNum = strSecondNum.replace(\"-\", \"\");\n strSecondNum = strSecondNum.replace(\"+\", \"\");\n strSecondNum = strSecondNum.replace(\"÷\", \"\");\n strSecondNum = strSecondNum.replace(\"x\", \"\");\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n txtOutput.setText(strNumber);\n strFirstNum = strNumber;\n strSecondNum = null;\n }\n }\n };\n\n OnClickListener oclMinus = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 1;\n strNumber = strNumber + \" - \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 1;\n strNumber = strNumber + \" - \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n OnClickListener oclAdd = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 2;\n strNumber = strNumber + \" + \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 2;\n strNumber = strNumber + \" + \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n OnClickListener oclMultiply = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 3;\n strNumber = strNumber + \" x \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");\n strSecondNum = strSecondNum.replace(\"x\",\"\");\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 3;\n strNumber = strNumber + \" x \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n\n OnClickListener oclDivide = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strFirstNum == null && strSecondNum == null){\n strFirstNum = strNumber;\n Calcobj.TypeMath = 4;\n strNumber = strNumber + \" ÷ \";\n txtOutput.setText(strNumber);\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n if(strSecondNum.equals(\"\")){\n strSecondNum = null;\n }\n }else if (strSecondNum == null){\n if(strNumber.contains(\"+\")){\n strSecondNum = strNumber.replace(strFirstNum + \" + \", \"\");}\n if(strNumber.contains(\"-\")){\n strSecondNum = strNumber.replace(strFirstNum + \" - \", \"\");}\n if(strNumber.contains(\"÷\")){\n strSecondNum = strNumber.replace(strFirstNum + \" ÷ \", \"\");}\n if(strNumber.contains(\"x\")){\n strSecondNum = strNumber.replace(strFirstNum + \" x \", \"\");}\n txtOutput.setText(strNumber);\n }else{\n try{\n strNumber = \"\" + Calcobj.doCalc(strFirstNum, strSecondNum);\n strFirstNum = strNumber;\n Calcobj.TypeMath = 4;\n strNumber = strNumber + \" ÷ \";\n txtOutput.setText(strNumber);\n strSecondNum = null;\n }catch(Exception e){\n strFirstNum = null;\n strSecondNum = null;\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }\n }\n\n }\n };\n\n\n OnClickListener oclPlusMinus = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.startsWith(\"-\")){\n strNumber = strNumber.substring(1);\n txtOutput.setText(strNumber);\n }else {\n strNumber = \"-\" + strNumber;\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclPeriod = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(!strNumber.contains(\".\")){\n strNumber = strNumber + \".\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclBack = new OnClickListener(){\n @Override\n public void onClick(View v) {\n if (strNumber != null && strNumber.length() > 1) {\n rephrase = strNumber.substring(0, strNumber.length() - 1);\n strNumber = rephrase;\n txtOutput.setText(strNumber);\n\n if(!strNumber.contains(\"-\")||!strNumber.contains(\"+\")||!strNumber.contains(\"÷\")||!strNumber.contains(\"x\")){\n intMathType = 0;\n strFirstNum = null;\n strSecondNum = null;\n }\n\n }else{\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n strFirstNum = null;\n intMathType = 0;\n }\n }\n\n };\n OnClickListener oclClear = new OnClickListener() {\n @Override\n public void onClick(View v) {\n strNumber = \"0\";\n strFirstNum = null;\n strSecondNum = null;\n Calcobj.TypeMath = 0;\n txtOutput.setText(strNumber);\n }\n };\n\n OnClickListener oclZero = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"0\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"0\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"0\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclOne = new OnClickListener() {\n @Override\n\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"1\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"1\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber = strNumber + \"1\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclTwo = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"2\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"2\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"2\";\n txtOutput.setText(strNumber);\n }\n }\n };\n OnClickListener oclThree = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"3\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"3\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"3\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclFour = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"4\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"4\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"4\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclFive = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"5\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"5\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"5\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclSix = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"6\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"6\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"6\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclSeven = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"7\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"7\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"7\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclEight = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"8\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"8\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"8\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n OnClickListener oclNine = new OnClickListener() {\n @Override\n public void onClick(View v) {\n if(strNumber.equals(\"0\") || strNumber.equals(\"0.0\") ) {\n strNumber = \"9\";\n txtOutput.setText(strNumber);\n }else if(strNumber.contains(\"ERROR\")){\n strNumber = \"9\";\n strFirstNum = null;\n strSecondNum = null;\n txtOutput.setText(strNumber);\n }else{\n strNumber += \"9\";\n txtOutput.setText(strNumber);\n }\n }\n\n };\n btnCalc.setOnClickListener(oclCalc);\n btnBack.setOnClickListener(oclBack);\n btnPlusMinus.setOnClickListener(oclPlusMinus);\n btnCE.setOnClickListener(oclClear);\n btnZero.setOnClickListener(oclZero);\n btnOne.setOnClickListener(oclOne);\n btnTwo.setOnClickListener(oclTwo);\n btnThree.setOnClickListener(oclThree);\n btnFour.setOnClickListener(oclFour);\n btnFive.setOnClickListener(oclFive);\n btnSix.setOnClickListener(oclSix);\n btnSeven.setOnClickListener(oclSeven);\n btnEight.setOnClickListener(oclEight);\n btnNine.setOnClickListener(oclNine);\n btnPeriod.setOnClickListener(oclPeriod);\n btnMinus.setOnClickListener(oclMinus);\n btnAdd.setOnClickListener(oclAdd);\n btnDivide.setOnClickListener(oclDivide);\n btnMultiply.setOnClickListener(oclMultiply);\n }", "@Override\n public void onClick(View v) {\n tv.setText(\"÷\");\n if(op == -1){\n sum = temp;\n temp = 0.0;\n }else{\n if(op == 1){\n sum += temp;\n }else if(op == 2){\n sum -= temp;\n }else if(op == 3){\n sum *= temp;\n }else if(op == 4){\n sum /= temp;\n }\n }\n op = 4;\n temp = 0.0;\n positive = true;\n flag = true;\n }", "@Override\n\tpublic void keyPressed(KeyEvent eee) {\n\t\tswitch (eee.getKeyCode()) {\n\t\tcase KeyEvent.VK_0:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(0);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD0:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(0);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_1:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(1);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD1:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(1);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_2:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(2);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD2:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(2);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_3:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(3);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD3:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(3);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_4:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(4);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD4:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(4);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_5:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(5);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD5:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(5);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_6:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(6);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD6:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(6);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_7:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(7);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD7:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(7);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_8:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(8);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD8:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(8);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_9:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(9);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD9:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(9);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Unexpexted (key presses)\");\n\t\t\teee.consume();\n\t\t}\n\t}", "private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tJButton j=(JButton)e.getSource();\n\t\tString s=j.getText();\n\t\tt.setText(s);\n\t\tif(a==\"\"||(!s.equals(\"+\")&&!s.equals(\"-\")&&!s.equals(\"*\")&&!s.equals(\"/\")&&!s.equals(\"%\")&&!s.equals(\"=\")&&c==\"\"&&!s.equals(\"+/-\")))\n\t\t{\n\t\t\tif(s.equals(\"-\")&&a==\"\")\n\t\t\t\ta=\"\";\n\t\t\telse\n\t\t\ta=a+s;\n\t\t\tt.setText(a);\n\t\t}\n\t\telse if((s.equals(\"+\")||s.equals(\"-\")||s.equals(\"*\")||s.equals(\"/\")||s.equals(\"%\"))&&(!s.equals(\"=\"))&&(!s.equals(\"+/-\")))\n\t\t{\n\t\t\tc=s;\n\t\t\tt.setText(c);\n\t\t}\n\t\telse if((b==\"\"&&!s.equals(\"+/-\"))||(!s.equals(\"+\")&&!s.equals(\"-\")&&!s.equals(\"*\")&&!s.equals(\"/\")&&!s.equals(\"%\")&&!s.equals(\"=\")&&!c.equals(\"\")&&!s.equals(\"+/-\")))\n\t\t{\n\t\t\t\n\t\t\tb=b+s;\n\t\t\tt.setText(b);\n\t\t}\n\t\telse if(s.equals(\"+/-\"))\n\t\t{\n\t\t\tif(!a.equals(\"\")&&b==\"\"&&c==\"\")\n\t\t\t{\n\t\t\t\ta=\"-\"+a;\n\t\t\t\tt.setText(a);\n\t\t\t}\n\t\t\telse if(!a.equals(\"\")&&!c.equals(\"\")&&!b.equals(\"\"))\n\t\t\t{\n\t\t\t\tb=\"-\"+b;\n\t\t\t\tt.setText(b);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tint a1=Integer.parseInt(a);\n\t\t\tint b1=Integer.parseInt(b);\n\t\t\tSystem.out.println(a1+\" \"+b1+\" \");\n\t\t\tif(c.equals(\"+\"))\n\t\t\ta=String.valueOf(a1+b1);\n\t\t\telse if(c.equals(\"-\"))\n\t\t\t\ta=String.valueOf(a1-b1);\n\t\t\telse if(c.equals(\"/\"))\n\t\t\t\ta=String.valueOf(a1/b1);\n\t\t\telse if(c.equals(\"*\"))\n\t\t\t\ta=String.valueOf(a1*b1);\n\t\t\telse if(c.equals(\"%\"))\n\t\t\ta=String.valueOf(a1%b1);\n\t\t\tt.setText(a);\n\t\t\tb=\"\";\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent e) {\n\t\tif(e.getKeyCode() == KeyEvent.VK_ENTER){\n\t\t\tif(state == 0){\n\t\t\t\tint temp = numberHighlight.i;\n\t\t\t\t//stop number highlight thread;\n\t\t\t\tnumberHighlight.cancel(true);\n\t\t\t\t//update text field with number\n\t\t\t\ttextField.setText(textField.getText() + String.valueOf(temp));\n\t\t\t\tnumberButton[temp].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionHighlight.execute();\n\t\t\t\tstate = 1;\n\t\t\t}\n\t\t\telse if(state == 1){\n\t\t\t\top = functionHighlight.i;\n\t\t\t\ttextField.setText(textField.getText() + getFunc(op));\n\t\t\t\t//stop function highlight thread\n\t\t\t\tfunctionHighlight.cancel(true);\n\t\t\t\t//one object can only be run once therefore new object needs to be created\n\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\tnumberHighlight.execute();\n\t\t\t\tstate = 2;\n\t\t\t}\n\t\t\telse if(state == 2){\n\t\t\t\tint temp = numberHighlight.i;\n\t\t\t\tnumberHighlight.cancel(true);\n\t\t\t\ttextField.setText(textField.getText() + String.valueOf(temp));\n\t\t\t\tnumberButton[temp].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\ttextField.setText(evaluateExpr(textField.getText()));\n\t\t\t\t//after evaluation return to function enter state\n\t\t\t\tstate = 1;\n\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\tfunctionHighlight.execute();\n\t\t\t}\n\t\t}\n\t\t//clear the user input\n\t\tif(e.getKeyCode() == KeyEvent.VK_C){\n\t\t\tif(state == 1){\n\t\t\t\t\top = functionHighlight.i;\n\t\t\t\t\tfunctionHighlight.cancel(true);\n\t\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\t\tnumberHighlight.execute();\n\t\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t}\n\t\t\t\telse if(state == 2){\n\t\t\t\t\tfunctionButton[op].setBackground(new Color(224, 223, 219));\n\t\t\t\t\tfunctionHighlight = new objectHighlight(functionButton, 1);\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t}\n\t\t\t\telse if(state ==3){\n\t\t\t\t\ttextField.setText(\"\");\n\t\t\t\t\tstate = 0;\n\t\t\t\t\tnumberHighlight = new objectHighlight(numberButton, 0);\n\t\t\t\t\tnumberHighlight.execute();\n\t\t\t\t}\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e){\n // get the command from the action\n String command = e.getActionCommand();\n\n \n if(command.equals(\"increase\")){\n //to chnage users number into an int\n String increaseText = increaseTextField.getText();\n int increaseBy = Integer.parseInt(increaseText);\n //if statements for adding to sum and showing it on counter\n if(sum < 10 && sum != 10){\n sum = sum + increaseBy;\n counterTextField.setText(\"\" + sum);\n //if statement for keeping the sum the same if its over 10\n }else if (sum == 10){\n sum = sum;\n counterTextField.setText(\"\" + sum);\n }\n //if statmenet for if user hits reset\n }else if (command.equals(\"reset\")){\n //resets everything back to 0\n sum = 0;\n counterTextField.setText(\"0\");\n increaseTextField.setText(\"\");\n }\n\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[10]++;\r\n\t\t\t\tvalue[10] %= 3;\r\n\t\t\t\tif (value[10] == 0) {\r\n\t\t\t\t\tbtn[10].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[10] == 1) {\r\n\t\t\t\t\tbtn[10].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[10] == 2) {\r\n\t\t\t\t\tbtn[10].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[11]++;\r\n\t\t\t\tvalue[11] %= 3;\r\n\t\t\t\tif (value[11] == 0) {\r\n\t\t\t\t\tbtn[11].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[11] == 1) {\r\n\t\t\t\t\tbtn[11].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[11] == 2) {\r\n\t\t\t\t\tbtn[11].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void ButtonDel (View v){\n String expression = resultView.getText().toString();\n if (expression != \"Syntax Error\") {\n if (expression.length() > 2)\n expression = expression.substring(0, expression.length() - 1);\n else if (expression.length() == 2 && !expression.substring(0, 1).equals(\"-\"))\n expression = expression.substring(0, expression.length() - 1);\n else {\n expression = \"0\";\n mIsTyping = false;\n }\n resultView.setText(expression);\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tfloat n1=Float.parseFloat(a.getText().toString());\n\t\t float n2=Float.parseFloat(b.getText().toString());\n\n\t\t\t\top.setText(String.valueOf(n1-n2));\n\t\t\t}", "public void control()\n {\n if(this.listOperator.contains(this.operator))\n {\n\n if(this.operator.equals(\"=\")) // If the operator is \"=\"\n {\n // We ask to the model to display the result\n this.calc.getResult();\n }\n else // Else, we give the operator to the model\n {\n this.calc.setOperator(this.operator);\n }\n }\n \n // If the number is ok\n if(this.number.matches(\"^[0-9.]+$\"))\n {\n this.calc.setNumber(this.number);\n }\n\n this.operator = \"\";\n this.number = \"\";\n }", "public void buttonAC (View view){\n resultView.setText(\"0\");\n result = 0;\n expressionView.setText(\"\");\n result = 0;\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[6]++;\r\n\t\t\t\tvalue[6] %= 3;\r\n\t\t\t\tif (value[6] == 0) {\r\n\t\t\t\t\tbtn[6].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[6] == 1) {\r\n\t\t\t\t\tbtn[6].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[6] == 2) {\r\n\t\t\t\t\tbtn[6].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString no1=num1.getText().toString();\n\t\t\t\tfinal int num11=Integer.parseInt(no1);\n\t\t\t\t\n\t\t\t\tString no2=num2.getText().toString();\n\t\t\t\tfinal int num12=Integer.parseInt(no2);\n\t\t\t\tres=num11+num12;\n\t\t\t\tresult.setText(Integer.toString(res));\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\t\n\t\tint n2=Integer.parseInt(t1.getText());\n\t\tint n1=Integer.parseInt(t.getText());\n\t\tr.setText(Integer.toString(n1+n2));\n//\t\tif(s==)\n//\t\tr.setText(Integer.toString(n1+n2));\n\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n Button button = (Button) findViewById((R.id.Bbli));\n Button buttPlus = (Button) findViewById(R.id.Bplus);\n Button buttRaz = (Button) findViewById(R.id.Braz);\n final EditText nbOne = (EditText)findViewById(R.id.nbOne);\n final EditText nbTwo = (EditText) findViewById(R.id.nbTwo);\n final EditText resul = (EditText) findViewById(R.id.resultat);\n button.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n //To change body of implemented methods use File | Settings | File Templates.\n Toast msg = Toast.makeText(NicogetActivity.this, \"Je confirme !\", Toast.LENGTH_LONG);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n });\n\n buttPlus.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n try {\n int nbOneInt = Integer.parseInt(nbOne.getText().toString());\n int nbTwoInt = Integer.parseInt(nbTwo.getText().toString());\n int resulInt = Integer.parseInt(resul.getText().toString());\n resulInt = resulInt + (nbOneInt+nbTwoInt);\n resul.setText(String.valueOf(resulInt));\n } catch (Exception err) {\n Toast msg = Toast.makeText(NicogetActivity.this, err.getMessage(), Toast.LENGTH_LONG);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n }\n });\n\n buttRaz.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View view) {\n resul.setText(\"0\");\n }\n });\n }", "@Override\r\n\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t if ((event.getAction() == KeyEvent.ACTION_DOWN) &&\r\n\t\t (keyCode == KeyEvent.KEYCODE_ENTER)) {\r\n\t\t \t\r\n\t\t \tInteger position = (Integer)v.getTag();\r\n\t\t \t\r\n\t\t \tlistNumeric.get(position).setValeur(((EditText)v).getText().toString());\r\n\t\t \t\r\n\t\t\t\t\t//On pr�vient les listeners qu'il y a eu un clic sur l'EditText.\r\n\t\t\t\t\tsendListener(listNumeric.get(position), position);\r\n\t\t\t\t\tv.invalidate();\r\n\t\t\t\t\treturn true;\r\n\t\t }\r\n\t\t return false;\r\n\t\t\t}", "public void updateOperations() {\n String temp = \"\";\n \n if (chkBoxOperators[0].isSelected()) temp += PLUS;\n if (chkBoxOperators[1].isSelected()) temp += MINUS;\n if (chkBoxOperators[2].isSelected()) temp += TIMES;\n if (chkBoxOperators[3].isSelected()) temp += DIVIDE;\n \n charOperators = temp.toCharArray();\n if (temp.indexOf(currentOperator) == -1) setNewNumbers();\n \n }", "public void buttonPlus(View v) {\n\n /* Add the character to the expression and update screen. */\n expression += \"+\";\n\n TextView expressionText = (TextView) findViewById(R.id.expressionText);\n expressionText.setText(expression);\n }", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[8]++;\r\n\t\t\t\tvalue[8] %= 3;\r\n\t\t\t\tif (value[8] == 0) {\r\n\t\t\t\t\tbtn[8].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[8] == 1) {\r\n\t\t\t\t\tbtn[8].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[8] == 2) {\r\n\t\t\t\t\tbtn[8].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void checkOperator (TextView tv){\n String s = tv.getText().toString().substring(tv.getText().length() - 1);\n if (s.equals(\")\") || s.equals(\"!\")) {\n //int a = 1;\n isOperator = false;\n } else if (Character.isDigit(tv.getText().toString().charAt(tv.getText().toString().length() - 1)))\n isOperator = false;\n else\n isOperator = true;\n }", "private void registerEditChange(){\n this.txtAmount.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n //Checks if the button should be enabled\n checkIfEnable();\n }\n });\n }" ]
[ "0.6901815", "0.6897381", "0.68833923", "0.68084645", "0.6731157", "0.66457534", "0.65927756", "0.6573479", "0.6570992", "0.6529209", "0.64980286", "0.6496966", "0.64290494", "0.6411239", "0.6409634", "0.63959754", "0.6381736", "0.6358578", "0.6350947", "0.6336536", "0.6305475", "0.63027686", "0.63025963", "0.62919164", "0.62577844", "0.6250233", "0.6242345", "0.6212826", "0.62099725", "0.62039167", "0.6196506", "0.617808", "0.61580783", "0.6141242", "0.61410844", "0.6121322", "0.6106399", "0.60992944", "0.60955757", "0.6081207", "0.6080286", "0.60764664", "0.6066578", "0.60638565", "0.60577655", "0.60554624", "0.6022512", "0.6020595", "0.60050035", "0.6001754", "0.59961563", "0.5969133", "0.5948135", "0.59474784", "0.5944405", "0.593077", "0.59285617", "0.5921269", "0.5910577", "0.59098035", "0.59085166", "0.5899518", "0.5898028", "0.5893902", "0.5889057", "0.58881325", "0.5867465", "0.5857035", "0.5839107", "0.5822118", "0.5816799", "0.5806206", "0.58047324", "0.5797808", "0.5797569", "0.5786054", "0.5785946", "0.5783702", "0.5782432", "0.5781704", "0.57806945", "0.5777917", "0.5776447", "0.5773754", "0.57645124", "0.576318", "0.57564694", "0.5753561", "0.57488143", "0.574264", "0.5739991", "0.5729706", "0.5720792", "0.57200253", "0.5719659", "0.5717162", "0.5714912", "0.57125616", "0.57088816", "0.57077837" ]
0.70984757
0
Practice various loops Print all even numbers between 0 and 100
public static void main(String[] args) { int x = 0; while (x <= 100) { if( x % 2 == 0) { System.out.println(x); }x ++; } // A while loop that prints every 3rd number going backwards from 100 to 0 int y = 100; while (y >= 0) { System.out.println(y); y -= 3; } // A for loop that prints every other number from 1 to 100 for (int i = 1; i <= 100; i += 2) { System.out.println(i); } // A for loop that prints every number from 0 to 100. If divisible by 3 print "Hello". If divisible by 5 print // the word "World". If divisible by both 3 and 5 print "Hello World". for (int z = 0; z <= 100; z++) { if (z % 3 == 0 && z % 5 == 0) { System.out.println("HelloWorld"); } else if(z % 3 == 0) { System.out.println("Hello"); } else if ( z % 5 == 0) { System.out.println("World"); } else { System.out.println(z); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printAll() {\n\t\tint i=0;\n\t\twhile(i%2==0) {\n\t\t\ti+=2;\n\t\t\tSystem.out.print(i+\" \");\n\t\t\tif(i==100) break;\n\t\t}\n\t}", "public static void main(String[] args){\r\n int i=100;\r\n while (i>0) { \r\n if (i%2!=0) {\r\n System.out.print(i+\"\\n\");\r\n }\r\n i--;\r\n } \r\n }", "public static void main(String[] args) {\n\t\tint a=1;\n\t\t\n\t\twhile(a<=100) {\n\t\t\tSystem.out.print(a+\" \");\n\t\t\ta++;\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//print number 100 to 1\n\t\tint b=100;\n\t\t\n\t\twhile (b>=1) {\n\t\t\tSystem.out.print(b+\" \");\n\t\t\tb--;\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//print even number from 20 to 100\n\t\tint c=20;\n\t\t\n\t\twhile(c<=100) {\n\t\t\tSystem.out.print(c+\" \");\n\t\t\tc+=2;\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\tint d =20;\n\t\t\n\t\twhile (d<=100) {\n\t\t\tif (d%2==0) {\n\t\t\t\tSystem.out.print(d+\" \");\n\t\t\t}\n\t\t\td++;\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\n int n = 0;\n for(int i=0; i<100; i++){\n if(i%2==1){\n n =i;\n } else\n n =i;\n }\n System.out.println(n);\n }", "public static void main(String[] args) {\n\t\tfor (int i = 100; i <= 199; i++) {\n\t\t\tif(!(i%2==0)) {\n\t\t\t\tSystem.out.println(i+ \" \");\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"To print the odd number from 1 to 100\");\n\t\tfor ( int i = 1;i<=100;i++)\n\t\t{\n\t\t\tif (!(i % 2 == 0))\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfor(int i = 0 ; i<=99 ; i++) {\n\t\t\tif((i%2) == 1) {\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n \n\t\tfor (int i=1;i<=100; i++){\n\t System.out.print(i+\" \");\n }System.out.println();\n\t\tSystem.out.println(\"----------------2-------------\");\n\t\tfor(int b=100; b>=1;b--) {\n\t\t\tSystem.out.print(b+\" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"----------------3---------------\");\n\t\t\n\t\tfor (int c=20; c>=1;c-=2) {\n\t\t\tSystem.out.print(c+ \" \");\n\t\t}System.out.println();\n\t\t\n\t\t\n\t\tSystem.out.println(\"----------------4---------------\");\n\t\tfor (int d=21; d<=50;d+=2) {\n\t\t\tSystem.out.print(d+ \" \");\n\t\t\n\t}System.out.println();\n\tSystem.out.println(\"----------------2(even)-------------\");\n\tfor(int z=20; z>=1; z-=2) {\n\t\tif (z%2==0) {\n\t\t\tSystem.out.print(z+ \" \");\t\n\t\t}\n\t}System.out.println();\nSystem.out.println(\"What is the ouptut\");\n\tint sum=0;\n\t\tfor(int i=1;i<=5; i++) {\n\t\t\tsum=sum+i;\n\t\t}\tSystem.out.println(sum);\n\t\tSystem.out.println(\" -------------------What is the otput-------------\");\n\t\tint result =0;\n\t\tfor(int i=2;i<10;i+=2) {\n\t\t\tresult+=i;\n\t\t\t}System.out.println(result);\n\t\t}", "public static void main(String[] args) {\n\t\tfor (int i = 1; i < 101; i++) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program\");\n\t\tfor (int i = 100; i > 0; i--) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 2; i < 101; i = i + 2) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 1; i < 100; i = i + 2) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 501; i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tSystem.out.println(i + \" is even.\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(i + \" is odd.\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 778; i = i + 7) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 2006; i < 2019; i++) {\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 3; i++) {\n\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tSystem.out.println(i + \" \" + \" \" + j);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 9; i += 3) {//rows \n\t\t\tfor (int j = 1; j < 4; j++) {//how many \n\t\t\t\tSystem.out.print(j + i);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\tfor (int i = 0; i < 100; i += 10) {\n\t\t\tfor (int j = 1; j <11; j++) {\n\t\t\t\tSystem.out.print(j + i+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println(\"Next Program.\");\n\t\nfor (int i = 1; i < 7; i++) {\n\tfor (int j = 0; j < i; j++) {\n\t\tSystem.out.print(\"* \");\n\t}\n\tSystem.out.println();\n}\t\n\n\t\n\t\n\t\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tfor(int a=100; a>=1; a--) {\n\t\t\tSystem.out.println(a);\n\t\t}\n\t\t\n\t\t//print numbers from 100 to 1\n\t\t\n\t\tfor(int b=1; b<=100; b++) {\n\t\t\tSystem.out.println(b);\n\t\t}\n\t\t\n\t\t//print odd numbers from 1 to 20(2 ways)\n\t\t\n\t\tfor(int c=1; c<=20; c+=2) {\n\t\t\tSystem.out.println(c);\n\t\t}\n\t\t\n\t\t//print even numbers from 20 to 1(2ways)\n\t\t\n\t\tfor(int d=20; d>=1; d-=2) {\n\t\t\tSystem.out.println(d);\n\t\t}\n\t\t\n\t\t//print even numbers between 20 and 50(2 ways)\n\t\t\n\t\tfor(int e=20; e<=50; e+=2) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\t//print odd numbers between 20 and 50(2way)\n\t\t\n\t\tfor(int f=20; f<=50; f++) {\n\t\t\tif(f%2==0) {\n\t\t\tSystem.out.println(f);\n\t\t}\n\t}\n}", "public static void main(String[] args) {\n\t\tfor(int i=10, oddCount=0; i<101; ++i){\r\n\t\t\tif( (i%2) == 0) {\t// even numbers\r\n\t\t\t\tcontinue;\t\t// don't execute the lines below, continue with next iteration\r\n\t\t\t}\r\n\t\t\telse {\t\t\t\t// odd numbers\r\n\t\t\t\t//Print a new line, on every 10th odd number\r\n\t\t\t\tif( (oddCount % 10) == 0){\r\n\t\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t\t}\r\n\t\t\t\t++oddCount;\r\n\t\t\t\tSystem.out.print(i + \" \");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\nint i =1;\r\nfor(i=1; i<=20; i++)\r\n{\r\n\tif(i % 2 == 1)\r\nSystem.out.println(i);\r\n}\r\nSystem.out.println(\"Printing only the odd numbers from 1 to 20\");\r\n\t}", "public static void main(String[] args) {\n\t\tint evenCount = 50, oddCount = 50;\n\t\t\n\t\tSystem.out.print(\"Even numbers between 50 and 100: \");\n\t\t// While the even counter is equal to or below 100, it will print a number. (range 50 - 100)\n\t\twhile (evenCount <= 100) {\n\t\t\t// If the remainder of the current number is 0, it will print it. (0R = even num)\n\t\t\tif (evenCount % 2 == 0) {\n\t\t\t\tSystem.out.print(evenCount + \", \");\n\t\t\t} \n\t\t\t// Increment even count so we move forward towards 100.\n\t\t\tevenCount++;\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"Odd numbers between 50 and 100: \");\n\t\t// While the odd counter is equal to or below 100, it will print a number. (range 50 - 100)\n\t\twhile (oddCount < 100) {\n\t\t\t// If the remainder of the current number is 1, it will print it. (1R = even num)\n\t\t\tif (oddCount % 2 == 1) {\n\t\t\t\tSystem.out.print(oddCount + \", \");\n\t\t\t} \n\t\t\t// Increment odd count so we move forward towards 100.\n\t\t\toddCount++;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t int even=20;\n\t do {\n\t\tSystem.out.println(even);\n\t even+=2;\n\t }while (even<=50);\n//2. way\n\t int even1=20;\n\t do {\n\t\t if (even1%2==0) {\n\t\t\t System.out.println(even1);\n\t\t }\n\t even1++;\n\t }while (even1<=50);\n}", "public static void main(String[] args) {\n\r\n\t\tfor (int i = 1; i <= 50; i++) {\r\n\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\t// System.out.println(\" It is an even number \" + i);\r\n\t\t\t\tSystem.out.println(i + \" is an even number\");\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void milestone3(){\n for(int i = 2; i <= 100; i++){\n int count = 0;\n for(int j = 1; j <= i; j++)\n if(i % j == 0) count += 1;\n if(count > 2) continue;\n else System.out.print(i + \" \");\n }\n System.out.println();\n }", "public static void main(String[] args) {\n\t\t\n\t\tint num1 = 50;\n\t\t\t\t\n\t\tfor (int num2 = 100; num2 > num1; num2--) {\n\t\t\t\n\t\t\tif (num2 % 2 != 0) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(num2);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void printodd() {\n for (int i = 0; i < 256; i++){\n if(i%2 != 0){\n System.out.println(i);\n }\n \n }\n }", "public static void main(String[] args) {\n\n System.out.print(\"All numbers: \");\n for(int i = 1; i <= 50; i++ ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // even numbers:\n System.out.print(\"Even Numbers: \");\n for(int i = 2; i <= 50; i+= 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n // Odd numbers:\n System.out.print(\"Odd Numbers\");\n for(int i = 1; i<=49; i += 2 ){\n System.out.print(i+\" \");\n }\n System.out.println();\n\n System.out.println(\"======================================================\");\n for(int i = 1; i <= 50; i++ ){\n if(i%2 != 0){ // if i' value is odd\n continue; // skip\n }\n System.out.print(i+\" \");\n }\n\n System.out.println();\n\n for(int i = 1; i <= 50; i++ ){\n if(i%2==0){ // if i is odd number\n continue; // skip it\n }\n\n System.out.print(i+\" \");\n\n if(i == 29){\n break; // exits the loop\n }\n\n }\n\n\n System.out.println(\"Hello\");\n\n\n\n }", "public static void main(String[] args) {\n\t\tfor(int i=1;i<20;i++)\r\n\t\t{\r\n\t\t\tif(i%2!=0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(i+\" is an ODD Number\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t}", "public static void printEvenNumbers(int from, int to){\n for(int i=from; i<=to; i++){\n if(i%2==0){\n System.out.print(i + \" \");\n }\n }\n System.out.println();\n }", "public static void main(String[] args) {\n\t\tint i = 0;\n\t\tint k = 0;\n\t\tint count = 0;\n\t\t\n\t\tfor(i = 2; i <= 100; i++) {\n\t\t\tcount = 0;\n\t\t\tfor(k = 2; k < i; k++) {\n\t\t\t\tif(i % k == 0) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(count == 0) {\n\t\t\t\tSystem.out.printf(\"%d \",i);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\n int i = 0;\n while (i < 10) {\n i++;\n if (i%2==0) {\n System.out.println(i);\n }\n }\n }", "public static void printOddNumbers (int from, int to) {//when we dont know the range\n for(int i=from; i<=to; i++){\n if(i%2!=0){\n System.out.print(i + \" \");\n }\n\n }\n System.out.println();\n }", "public static void printOddInt() {\n\t\t\n\t\t//For Loop\n\t\tfor(int i=4; i<10; i++) {\n\t\t\tif(i%2!=0) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tint a, i, j;\n\t\t\n\t\tfor(i=2;i<101;i++){\n\t\t\tif(i==2)\n\t\t\t\tSystem.out.println(i);\n\t\t\telse\n\t\t\t\t\n\t\t\t\n\t\t\tfor(j=2;j<i;j++)\n\t\t\t\t\n\t\t\t\tif(i%j != 0)\n\t\t\t\t\tif(i-1 == j)\n\t\t\t\t\t\tSystem.out.println(i);\n\t\t\t\t\telse\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Odd numbers under 1000 are:\");\n\t\tfor (int i=1;i<1000;i++)\n\t\t{\n\t\t\tif (i%2 != 0)\n\t\t\t{\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\n int count = 0;\r\n \r\n for (int num = 100; num <= 500; num++) {\r\n // Find all numbers from 100 to 500 divisible by 5 or 7 but not both.\r\n if ((num % 5 == 0 && num % 7 != 0) || (num % 5 != 0 && num % 7 == 0)) {\r\n count += 1;\r\n // Print 10 numbers on each line.\r\n if (count % 10 == 0) {\r\n System.out.println(num);\r\n }\r\n else {\r\n System.out.print(num + \" \");\r\n }\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\r\n\t\tfor(int n = 1; n <= 100; n++) {\r\n\t\t\tif(n % 2 == 0) {\t\t\t\t//==> check if it is even\r\n\t\t\t\tSystem.out.print(n+\" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(); // ===> for seprate line\r\n\t\t\r\n\t\t//2. print all odd numbers in same line\r\n\t\t\r\n\t\tfor(int j = 1; j <= 100; j++) {\r\n\t\t\tif(j % 2 != 0) {\r\n\t\t\t\tSystem.out.print(j+ \" \");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//3. sumOfOdds, sumOfEvens - calculate them\r\n\t\t// and print out after the loop\r\n\t\t// sum of 1 - 10 mean (1+2+3+4+5+6+7+8+9+10) just examp.\r\n\t\tSystem.out.println(); // ===> for seprate line\r\n\t\t\r\n\t\tint sumOfOdds = 0;\r\n\t\tint sumOfEvens = 0;\r\n\t\t\r\n\t\tfor(int num = 1; num <= 10; num++) {\r\n\t\t\tif(num % 2 == 0) {\r\n\t\t\t\tsumOfEvens += num;\r\n\t\t\t}else {\r\n\t\t\t\tsumOfOdds += num;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Sum of events: \"+ sumOfEvens);\r\n\t\tSystem.out.println(\"Sum of odds: \" + sumOfOdds);\r\n\t\t\r\n\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tSystem.out.print(\"[\");\r\n\t\tfor(int i=1; i<=100; i++)\r\n\t\t{\r\n\t\t\tif(isPerfectNumber(i))\r\n\t\t\tSystem.out.print(i + \" \");\t\r\n\t\t}\r\n\t\tSystem.out.println(\"]\");\r\n\t}", "public static void main(String[] args) {\n\n\t\tfor (int i = 15; i <= 35; i++) {\n\n\t\t\tif (i % 6 == 0) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\t\t\tSystem.out.print(i + \" \");\n\n\t\t}\n\t\tSystem.out.println();\n\n\t\tfor (int a = 15; a < 36; a++) {\n\t\t\tif (a % 2 == 0 && a % 3 == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.print(a + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tfor (int x = 0; x <= 10; x++) {\n\t\t\tif (x == 4) {\n\t\t\t\tSystem.out.println(\"I am stopping the loop\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.print(x + \" \");\n\t\t}\n\t\tSystem.out.print(\" \");\n\t\tfor (int y = 1; y <= 10; y++) {\n\t\t\tif (y == 4) {\n\t\t\t\tSystem.out.println(\"i am skipping the loop\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.print(y+\"-)\");\n\t\t\tSystem.out.println(\" i am inside the loop\");\n\t\t}\n\t\t/*\n\t\t * write a program that needs a range of integers(start and end point)\n\t\t * provided by a user and then from that range prints the sum of the even\n\t\t */\n\t\tSystem.out.println(\" \");\n\t\tScanner scan=new Scanner(System.in);\n\t\tSystem.out.println(\"please write a min number\");\n\t\tint min=scan.nextInt();\n\t\tSystem.out.println(\"please write a max number\");\n\t\tint max=scan.nextInt();\n\t\t\n\t\tint sumEven=0;\n\t\tint sumOdd=0;\n\t\tfor(int n=min; n<max+1; n++) {\n\t\t\tif(n%2==0) {\n\t\t\t\tsumEven=sumEven+n;\n\t\t\t}else if(n%2!=0) {sumOdd=sumOdd+n;\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\tSystem.out.println(sumEven+\" is sum of even numbers\");\n\t\tSystem.out.println(sumOdd+\" is sum of odd numbers\");\n\n}", "public static void printOdd50() {\n\t\tfor(int i = 0; i < 50; i++) {\n\t\t\tif(i % 2 == 1) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println();\n\t}", "public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }", "public static void main(String[] args) {\n\t\tint i = 2;\n\t\twhile(i<10) {\n\t\t\tif(isDivisible(20*i)){\n\t\t\t\tSystem.out.println(\"Final: \"+20*i+\" with i= \"+i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti=i+2;\n\t\t}\n\t}", "public static void main (String[] args) {\n\t\t\n\t\tint num=20;\n\t\t\n\t\twhile (num>=0) {\n\t\t\tSystem.out.println(num);\n\t\t\tnum-=2;\n\t\t}\n\t\t\n//second way to do it\n\t\t\n\t\tSystem.out.println(\"$$$$$$$$\");\n\t\t\n\t\tint num1=20;\n\t\t\n\t\twhile(num1>=0) {\n\n\t\t\tif(num1%2==0) {\n\t\t\t\tSystem.out.println(num1);\n\t\t\t\t}num1--;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tfor(int x=1; x<10;x++)\n\t\t{\n\t\t\tif (x%2!=0)\n\t\t\tSystem.out.println(x);\n\t\t\t\n\t\t}\n\n\t\t\t// TODO Auto-generated method stub\n\t\t\tfor(int x=10; x<35;x++)\n\t\t\t{\n\t\t\t\tif (x != 21)\n\t\t\t\tSystem.out.println(x);\n\t\t\t\t\n\t\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\t\t\n\t\tfor(int x=1; x<=20; x++ ){\n\t\t\t\n\t\t\tif( x%2==1) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(x);\n\t\t}\n\t\t\n\t\t}\n\n\t}", "public static void main(String[] args) {\r\n\tint a=1;\r\n\twhile(a>=1 && a<10) {\r\n\t\ta+=1;\r\n\t\tif(a%2==0) {\r\n\t\t\tSystem.out.println(\"\"+a);\r\n\t\t}\r\n\t}\r\n\tint max = 50;\r\n\tint add =0;\r\n\tfor(int s =0;s<=max;s+=1) {\r\n\t\tadd+= s;\r\n\t}\r\n\tSystem.out.println(\"\"+add);\r\n\t/*Adding up odd numbers 1-25\r\n\t * \r\n\t */\r\n\tint sum = 0;\r\n\tint c = 25;\r\n\tfor(int b=1 ;b<=c;b+=2) {\r\n\t\tsum+=b;\r\n\t\tSystem.out.println(\"\"+sum);\r\n\t}\r\n\t\r\n}", "public static void main(String[] args) {\n\t\t\n\t\tfor(int i=50; i>0;i--) {\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"*************** PRINTING ODD NUMBERS ***************\");\n\t\t//print odd numbers between 20 and 50\n\t\t\n\t\tfor(int j=20;j<=50;j++) {\n\t\t\tif(j%2!=0) {\n\t\t\t\tSystem.out.println(j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"************************\");\n\t\t// WHAT IS THE OUTPUT\n\t\t\n\t\tint total=2;\n\t\tfor(int k=1; k<4; k++) {\n\t\t\ttotal=total*k;\n\t\t\n\t\t\tSystem.out.println(total);\n\t\t}\n\t\tSystem.out.println(\"Final total : \" +total);\n\t\t\n\t\t// write a program calculate sum of odd and sum of even numbers\n\t\t// from 1 to 99\n\t\t\n\t\tint oddSum=0;\n\t\tint evenSum=0;\n\t\tfor(int z=1;z<=99;z++) {\n\t\t\tif(z%2!=0) {\n\t\t\t\toddSum=oddSum+z;\n\t\t\t}else {\n\t\t\t\tevenSum=evenSum+z;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\" sum of odd number = \"+oddSum);\n\t\tSystem.out.println(\" sum of even number = \"+evenSum);\n\t}", "public static void main(String[] args) {\n\t\tint i = 20;\ndo { if (i%2==0)\n\tSystem.out.println(i);\n\ti--;\n}while (i>1); \n\t\n}", "public static void main(String[] args) {\n\t\tint i=1,b=0,c=0;\n\t\twhile(i<=100)\n\t\t{\n\t\t\tint a=i % 2;\n\t\t\tif(a==0)\n\t\t\t{\n\t\t\t\tc=i+b;\n\t\t\t\tb=c;\n\t\t\t}\n\t\t\ti++;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(c);\n\n\t}", "public static void main(String[] args) {\n\n\t\tfor(int i=1; i<100; i++){\n\t\t\tint count=0, remainder=0; //variables initialized to zero.\n\n\t\t\tfor (int j=1; j<i+1; j++){\n\t\t\t\tremainder = i%j; // finding the remainder \n\t\t\t\tif(remainder==0) // if the remainder is equal to zero increment the count\n\t\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif(count==2) // if the loop count is equal to two then print the number as prime.\n\t\t\t\tSystem.out.print(i+\" \");\n\t\t}\n\n\t}", "public static void main(String[] args) {\n\t\tfor (int number = 20;number <= 100; number=number+2) {\n\t\t\tSystem.out.println(number);\n\t\t}\n\t}", "public static void main(String[] args) {\n\tint count = 99 ;\t\n\tint ten = 0 ;\n\tSystem.out.println(\"Counting from 100 to 200\") ; \n\tSystem.out.println(\"Divisible by 5 or 6, but not both\") ;\n\tSystem.out.println(\"_______________________________________\") ;\n\t\t\n\t\t//Display all the numbers between 100 and 200\n\t\tdo {\n\t\t\tif (count % 5 == 0 ^ count % 6 == 0) {\n\t\t\t\tSystem.out.print(count + \" \") ;\n\t\t\t\tten++;\n\t\t\t}//display only 10 per line\n\t\t\tif (ten == 10){\n\t\t\t\tSystem.out.println() ;\n\t\t\t\tten = 0 ;\n\t\t\t}\n\t\t\tcount++ ;\n\t\t} while (count <= 200);\t\n\t\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\tfor(int i=1;i<=4;i++)\r\n\t\t{\r\n\t\t\tfor(int j=1;j<=8;j=j*2)\r\n\t\t\t{\r\n\t\t\t\tif(j%2==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"#\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\r\n\t}\r\n\r\n}", "public static void main(String[] args) {\n\t\tint evensum=0;\n\t\tint oddsum=0;\n\t\tfor( int num=1; num<=99; num++) {\n\t\t\t\n\t\t\tif(num%2==0) {\n\t\t\tevensum=evensum+num;\n\t\t\t\t\n\t\t\t}else {oddsum=oddsum+num;}\n\t\t}\n\t\tSystem.out.println(evensum+\" \"+ oddsum);\n\t\t\n\t}", "public static void main(String[] args) {\n\n int N = Integer.MAX_VALUE;\n\n\n for (int n = 2; n < N ; n++) {\n boolean prost = true;\n for (int i = 2; i < n; i++) {\n\n if (n % i == 0) {\n prost = false;\n\n }\n }\n if (prost) {\n System.out.println(n);\n }\n }\n\n\n }", "public static void main(String[] args) {\n\t\tint a=1;\n\t\t\n\t\twhile(a<=100)\n\t\t{\t\n\t\t\tSystem.out.println(a);\n\t\ta++;\n\t\t}\n\t//eg: to print the even numbers 1 to 10\n\t\t\n\t\tint b=2;\n\t\twhile(b<=10)\n\t\t{\n\t\t\tSystem.out.println(b);\n\t\t\tb=b+2;\n\t\t}\n\t//eg: to print the odd numbers 1 to 10\n\t\tint c=1;\n\t\twhile(c<=10)\n\t\t{\n\t\t\tSystem.out.println(c);\n\t\t\tc=c+2;\n\t\t}\n\t//eg: to print the numbers 1 to 10 in decending order\n\t\tint d=10;\n\t\twhile(d>0)\n\t\t{\n\t\t\tSystem.out.println(d);\n\t\t\td--;\n\t\t}\n//DO...WHILE LOOP:\n\t\n\tint l=100;\n\tdo\n\t{\n\t\tSystem.out.println(l);\n\t\tl++;\n\t}while(l<=110);\n//in other case of do...while loop\n\tint p=20;\n\tdo\n\t{\n\t\tSystem.out.println(p);//20\n\t\tp++;\n\t}while(p<=10);\n/*it will only print 20 once as it will run until the \n * condition is met. It prints the value of p that is 20 \n * for once and next step is 20+1. Then it finally verifies \n * the condition p<=10. When the condition fails, it stops \n * running. So in this loop the value is printed atleast \n * once. This is rarely used. \n * Most common one is for loop. While loop is also used \n * very often. */\t\n\t\n//FOR LOOP:\n /* initialization==>condition==>increment/decrement\n * all three can be shown in one line instead of \n * three different lines as while loop.*/\n\tfor(int g=30;g>20;g--)\n\t{\n\t\tSystem.out.println(g);\n\t}\n\t\n\t\n\n\t}", "public static void main(String[] args){\n for(int i = 23; i <= 89; i++){\n System.out.print(i + \" \");\n if(i % 10 == 2)\n System.out.print(\"\\n\"); }\n }", "public static void main(String[] args) {\n\t\tfor(int a=1;a<=100;a++) {\r\n\t\t\tif(a%5==0&&a%7==0) {\r\n\t\t\t\tSystem.out.println(a);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\n\t\tint number = 20;\n\n\t\twhile (number >= 2) {\n\t\t\tSystem.out.println(number);\n\t\t\tnumber -= 2;\n\n\t\t}\n\t\tSystem.out.println(\"--------01------------\");\n\n\t\tint num = 2;\n\n\t\twhile (num <= 20) {\n\t\t\tSystem.out.println(num);\n\t\t\tnum += 2;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\nfor(int contador=1;contador<=100;contador+=1)\n{\n\tSystem.out.println(contador);\n}\n\t}", "public static void main(String[] args) {\n\t\tfor(int i=2;i<=50;i++) {\n\t\t\tif(i%2==0) {\n\t\t\t\tSystem.out.println(i+\"\\t\");\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tint sumEven=0;\n\t\tint sumOdd=0;\n\t\tfor(int x=1; x<=99; x++) {\n\t\t\tif(x%2==0) {\n\t\t\t\tsumEven=sumEven+x;\n\t\t\t}else {\n\t\t\t\tsumOdd=sumOdd+x;\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\n\t\t}System.out.println(sumOdd);\n\t\tSystem.out.println(sumEven);\n\t}", "public static void main(String[] args) {\n\t int[] numbers = {13, 45, 26, 22, 19, 24, 20, 30, 90, 12};\n\n for(int i = 0; i < numbers.length; i++){\n if(numbers[i]%2 == 0){\n System.out.println(\"Even number: \" + numbers[i]);\n }\n }\n }", "public static void main(String[] args) {\n int number = 1;\n do{\n if ( (number%2 == 0) && (number%7 == 0) ){\n System.out.print(number + \" \");\n }\n number++;\n }while(number<=1000);\n\n\n\n }", "public static void main(String[] args) {\n\t\t\n\t\t for(int a=5;a<=51;a++) {\n\t\t\t\t\n\t\t\t\tif(a%2==0) {\n\t\t\t\t\tSystem.out.print(a + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tfor(int i=1; i<=100;i++){\n\t\t\tSystem.out.println(\"Factors of a Number\"+i+\" are: \");\n\t\t\tfor(int j=1;j<=i;j++){\n\t\t\t\tif(i%j==0){\n\t\t\t\t\tSystem.out.println(j);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args){\n\t\tboolean flag=false;\n\t\tSystem.out.println(\"i\");\n\t\tfor( int i=1; i<=100; i+=1){\n\t\t\tfor(int d=1; d<=i/2; d+=1){\n\t\t\t\tif( i%d == 0){\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\n\n\t\t\t\t}\n\t\t\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t \n\t\t}\n\t\tif \n\t\t}\n}", "public static void main(String[] args) {\n\t\tfor (int i=8; i>=1; i--){\n\t\t\tfor (int j=1; j<=6; j++){\n\t\t\t\tif((7<=i&&i<=8)&&(5<=j&&j<=6)) \n\t\t\t\t\tbreak;\n\t\t\t\telse if((5<=i&&i<=6)&&(4<=j&&j<=5))\n\t\t\t\t\tcontinue;\n\t\t\t\telse if((i==1)&&(4<=j&&j<=5)){\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tSystem.out.print((i*100+j)+\" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\t\t\n\t}", "public static void main(String[] args) {\n Random r = new Random();\n final int min=0, max=100;\n int num = r.nextInt(max - min) + min;\n System.out.println(\"Random integer : \"+num);\n \n System.out.println(\"The first \"+num+\" prime numbers\");\n // prime number can only be divided by itself and 1\n int loop=0; \n for (int i = 2; loop < num; i++) {\n int count=0;\n for (int j = i; j >= 1; j--) {\n if (i%j == 0) {\n count++;\n }\n }\n if (count == 2) {\n System.out.print(i+\" \");\n loop++;\n }\n }System.out.println(); \n }", "public static void printNumbers(int low, int high)\n\t{\n\t\tif (low > high)\n\t\t{\n\t\t\tint holder = low;\n\t\t\tlow = high;\n\t\t\thigh = holder;\n\t\t}\n\t\t\n\t\tfor (int i = low; i <= high; i++)\n\t\t{\n\t\t\tisEven (i);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tfor(int i=1;i<=100;i++) {\n\t\t\tif(PrimeCheck(i)) {\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n int counter = 1;\n while (counter <=500){\n if (counter % 7 == 0 || counter % 5 == 0 || counter % 3 == 0){\n System.out.println( counter);\n }\n counter ++;\n }\n\n int counter2 = 500;\n do {\n System.out.println(\"do counter < 100\");\n }while (counter2 < 100); //mind. 1 Durchlauf da Bedingung am schluss ist, sonst gleich wie while\n }", "public static void main(String[] args) {\n\t\tint n , i;\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter the range for numbers : \");\n\t\ti = scanner.nextInt();\n\t\tSystem.out.println(\"Output is : \");\n\t\tfor (n = 1; n <= i; n++) {\n\t\t\tif (n % 2 != 0)\n\t\t\t\tSystem.out.println(n);\n\t\t}\n\t\tfor (int x = 1; x <= 5; x++)\n\t\t\tSystem.out.println(\"Mark6\");\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner (System.in);\n int n;\n for (int i = 0; i < 20; i++) {\n if (i%2 == 0) {\n System.out.print(\" \");\n }else{\n n = 2*i;\n System.out.println(\"Output: \" + n);\n }\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.printf(\"The perfect numbers that are less than 10000 are:\\n\");\n\t\tfor(int i =1; i<=10000;i++)\n\t\t{\n\t\t\tint check =0;\n\t\t\tfor(int j =1;j<i;j++)\n\t\t\t{\n\t\t\t\tif(i%j == 0)\n\t\t\t\t{\n\t\t\t\t\tcheck+=j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(check == i)\n\t\t\t{\n\t\t\t\tSystem.out.print(i+\" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\n\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tint i;\r\n\t\tfor(i=0;i<100;i++) {\r\n\t\t\tif((i%3==0)||(i%11==0)) {\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\nint i=1;//display from 20 to 10\nSystem.out.println(\"odd even\");\nwhile(i<=10)\n{\n\tif(i%2!=0) {\n\tSystem.out.println(i+\" \"+(i+1));//for space /t is fine\n\t}\ni++;\n}\n\t}", "public static void main(String[] args) {\n\n for( int x = 1 ; x <= 5 ; x++){\n System.out.print(x + \" \");\n }\n System.out.println();\n\n for( int x = 1 ; x <= 5 ; x++){\n System.out.print(x + \" \");\n }\n System.out.println();\n\n for( int x = 1 ; x <= 5 ; x++){\n System.out.print(x + \" \");\n }\n System.out.println();\n\n\n\n // count from 1 to 5\n // repeat this 3 times\n\n for( int i = 1 ; i <= 3 ; i++){// nested loop, write inside loop first , then\n // outside loop ,then put entire inside loop into outside loop\n System.out.println(\"ITERATION : \" +i);\n\n for( int x = 1 ; x <= 5 ; x++){ // this is inside loop print 1-5\n System.out.print(x + \" \");\n }\n System.out.println();\n }\n // count from 1 to 10-->> print only odd numbers\n // repeat this 4 times\n\n }", "public static void main(String[] args) {\n\t\tint[] IntArray= new int[10];\n\t\tint i=1;\n\t\tSystem.out.println(\"Even numbers from 1 to 10 are:\");\n\t\t\n\t\tfor(i=1;i<IntArray.length;i++)\n\t\t { \n\t\t\t if(i%2==0)\n\t\t\t {\n \t\t\t System.out.println(i);\n\t\t\t }\n\t\t \n\t\t\t }\n\t\t\t\t \n\t\t\n\n\t}", "public static void main(String[] args) {\n //Loop to iterate over the 100 numbers\n for (int i = 0; i <= 100; i++) {\n //Variable to hold the prime numbers.\n String primeNumbers = \"\";\n //Boolean checker to ensure that the single digit prime numbers are inclusive.\n boolean prime = i == 2 || i == 3 || i == 5 || i == 7 || i == 9;\n //Checking if you get a whole number as a remainder after dividing by the single digit prime\n if (i % 2 != 0 && i % 3 != 0 && i % 5 != 0 && i % 7 != 0 && i % 9 != 0 || prime) {\n //Appending the prime numbers to the string variable.\n primeNumbers += i;\n //Adding an extra white space after each checked prime.\n System.out.print(primeNumbers + \" \");\n }\n }\n System.out.println(\"\");\n }", "public static void main(String[] args) {\n\n\tint count=0;\t\n\t\n\tfinal int NUMBER_PER_LINE=10;\n\tint i;\n\tint divisor;\n\tfor(i=2;count<50;i++){\n\t\tboolean isPrime=true;\n\t\tfor(divisor=2;divisor<=i/2;divisor++){\n\t\tif(i%divisor==0){\n\t\t\tisPrime=false;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\t\n\t\tif(isPrime){\n\t\t\tcount++;\n\t\t\tif(count%NUMBER_PER_LINE==0) System.out.println(i);\n\t\t else System.out.print(i+\" \");\n\t\t}\n\t\t\n\t }\n\t\n\t\t\n\t}", "public Integer oddNumbers(int fromThisNumber, int toThisNumber){\n\t\tSystem.out.println(\"Print odd numbers between 1-255\");\n\t\tfor(int i = fromThisNumber; i <= toThisNumber; i++){\n\t\t\tif(i % 2 == 1){\n\t\t\t\tSystem.out.println(i);\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "public static void main(String[] args) {\n\t\tfor (int i = 0; i < 10; i++) {\n\n\t\t\tif (i == 2) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"**********************\");\n\n\t\t// continue - it will skip CURRENT iteration\n\n\t\tfor (int i = 1; i <= 5; i++) {\n\n\t\t\tif (i == 3 || i == 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(i);\n\t\t}\n\t\tSystem.out.println(\"*******************\");\n\t\t// I want to print nums from 1 to 20 except 5,6,7\n\t\tfor (int a = 1; a <= 20; a++) {//5\n\t\t\tif (a >=5 && a<=17) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tSystem.out.println(a);\n\t\t}\n\t}", "public static void main(String[] args) {\n for (int i = 0; i < 10; i++) {\n System.out.println(\"Hello\");\n\n if (i == 3) {\n continue; //jump to next loop\n }\n System.out.println(\"Ending of loop \" + i);\n }\n for ( int i = 0; i <100; i++) {\n if (i % 2 == 0) {\n continue;\n }\n System.out.print(i);\n }\n for (int i = 2000; i < 2030; i++){\n if(i == 2020){\n System.out.println(\"COVID\");\n continue;\n }\n System.out.println(\"Champion of \"+ i + \" year!\");\n }\n }", "public static void main(String[] args) {\n long number = 6857;\n long i = 2;\n while ((number / i != 1) || (number % i != 0)) {\n if (number % i == 0) {\n number = number / i;\n } else {\n i++;\n }\n }\n System.out.println(i);\n\n }", "public static void main(String[] args) {\n\n int y = 1, sum = 0;\n\n while (y <= 100) {\n sum = sum + y;\n y++;\n }\n System.out.println(\"Summation: \" + sum);\n\n int sum1 = 0;\n for (int j = 1; j <=100;j++){\n sum1 = j + sum1;\n }\n System.out.println(sum);\n // Count all the even numbers from 1 to 100\n // Apelare la metoda din Logic countEvenNumbers\n\nLogic logic = new Logic();\nlogic.countEvenNumbers();\n\n // Count all the odd numbers from 1 to 100\n// Apelare la metoda din Logic countOddNumbers\n logic.countOddNumbers();\n\n // Apelare la metoda printToHundred\n\n\n logic.printToHundred();\n// Apelare la metoda getSum\n logic.getSum(1,100);\n\n // Apelare metoda printFromHighToLow\n\n logic.printFromHighToLow(100,10);\n\n //Apelare prinString\n\n logic.printString();\n\n\n\n\n\n // Apelare printCozaLozaWoza\nlogic.printLinesCozaLozaWoza();\n\n// Apelare displayFibonacci primele 20 numere\nlogic.displayFibonacci();\n\n\n }", "public static void main(String[] args) {\n\t\tint i;\r\n\t\tfor(i = 1; i<=10; i++) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\tSystem.out.println(\"=============\");\r\n\t\ti = 1;\r\n\t\twhile(i<=10) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tSystem.out.println(\"=============\");\r\n\t\ti = 1;\r\n\t\tint j = 15;\r\n\t\twhile(true) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t\tif(i==j) { break;}\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tfor (int i = 3; i < 33; i++) {\r\n\t\t\tif (i % 2 == 0) {\r\n\t\t\t\tSystem.out.print(i + \" \");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void doWhile() {\n\n //1.\n int i = 0;\n do {\n System.out.println(i);\n i += 2;\n } while (i < 100);\n//\n //2.\n int j = 100;\n do {\n System.out.println(j);\n j -= 5;\n } while (j >= -10);\n\n // 3.\n int k = 2;\n do {\n System.out.println(k);\n k *= k;\n } while (k < 1000000);\n }", "public static void printInt() {\n\t\tint i = 500;\n\t\twhile (i >=25) {\n\t\t\tif(i%6==0 && i%8==0) {\n\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\t\t\t// Do not forget to type increment, otherwise it will be infinite loop\n\t\t\ti--;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tint num = 0, sum = 0;\n\t\tdo\n\t\t{\n\t\t\tnum++;\n\t\t\tsum += num;\n\t\t\tif(num%10 == 0 && num == 100)\n\t\t\t\tSystem.out.println(\"1-\"+num+\" : \"+sum);\n\t\t\telse if(num%10 == 0 && num != 100)\n\t\t\t\tSystem.out.println(\"1-\"+num+\" : 0000\");\n\t\t}while(num<100);\n\t}", "public static void main(String[] args) {\n\r\n\t\tfor (int i = 1; i < 100; i++) {\r\n\r\n\t\t\tint sum = 0;\r\n\t\t\tfor (int j = 1; j < i / 2; j++) {\r\n\t\t\t\tif (isDivisible(i, j)) {\r\n\t\t\t\t\tsum += j;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (sum == i)\r\n\t\t\t\tSystem.out.println(\"This is a perfect square!\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tint num=1;\n\t\tint sumOdd=0;\n\t\tint sumEven=0;\n\t\t\n\t\twhile(num<=50) {\n\t\t\tif(num%2==0) {\n\t\t\t\tsumEven+=num;\n\t\t\t}else {\n\t\t\t\tsumOdd+=num;\n\t\t\t\t\n\t\t\t}\n\t\t\tnum++;\t\t\n\t\t}\n\t\tSystem.out.println(\"sumodd is \"+ sumOdd);\n\t\tSystem.out.println(\"sumEven is \"+ sumEven);\n\t\t\n\n\n\t}", "public void printOdd1To255(){\n StringBuilder out = new StringBuilder();\n for(int i = 1; i <= 255; i++){\n if(i % 2 != 0){\n out.append( i + \" \");\n }\n }\n System.out.println( out );\n }", "public void Series() {\n\t\tint n=2;\n\t\twhile (n<=10) {\n\t\t\tSystem.out.print(n+\" \");\n\t\t\tn=n+2;\n\t\t}\n\t/*\tSystem.out.println(n);\n\t\tn=n+2;\n\t\tSystem.out.println(n);\n\t\tn=n+2;\n\t\tSystem.out.println(n);\n\t\tn=n+2;\n\t\tSystem.out.println(n);\n\t\tn=n+2;\n\t\tSystem.out.println(n);\n\t\tn=n+2;*/\n\t}", "public static void main(String[] args) {\n\n for( int i=1 ; i<=5 ; i++ ){\n System.out.println(\"i = \"+i);\n System.out.println(\"Happy Birthday SEDA CIVAN\");\n\n }\nfor(int x=10;x>=1;--x){\n System.out.println(x);\n}\n System.out.println(\"-------------------------------\");\nfor (int number=0;number<=100 ;number+=2){\n System.out.print(number+\" \");\n}\n System.out.println(\"-------------------------------\");\n\nfor(int x=0 ; x<100 ; x+= 3 ){\n System.out.print(x+\" \");\n}\n System.out.println();\n System.out.println(\"-------------------------even number------\");\n for (int i = 0; i <100 ; i++) {\n if(i%2==0){\n System.out.print(i+\" \");\n }\n\n //THE SHORT CUT FOR GENERATING FOR LOOP IS : fori enter or tab\n\n }\n System.out.println();\n System.out.println(\"-------------------------------\");\n for (int q = 0; q < 100; q++) {\n if (q%5==0 && q%3==0){\n System.out.println(q+\" fizz buzz number\");\n }\n\n }\n\n//everything you can do with for loop --> can be done using while loop !!!!\n\n }", "public static void main(String[] args) {\n\t\tfor(int i = 1, j = i + 10; i < 5; i++, j = i * 2) \r\n\t\t{\r\n System.out.println(\"i= \" + i + \" j= \" + j);\r\n\t\t}\r\n\t\tfor(int i=0, j=i+99; i<101; i++, j=i/2 ) {\r\n\t\t\tSystem.out.println(\"i= \" +i + \" j= \"+j);\r\n\t}\r\n\t\t\r\n\t\tint n=0;\r\n\t\twhile(n<10)\r\n\t\t{ System.out.println(n);\r\n\t\tn++;\r\n\t\t}\r\n\t\t\r\n//\t int a = 1;\r\n//\t int b = 2;\r\n//\t int c = 3;\r\n//\t \r\n//\t a += 5;\r\n//\t b *= 4;\r\n//\t c += a * b;\r\n//\t c %= 6;\r\n//\t System.out.println(\"a = \" + a);\r\n//\t System.out.println(\"b = \" + b);\r\n//\t System.out.println(\"c = \" + c);\r\n\r\n\r\n\t}", "public static void main(String[] args) {\n\n\t\tint sum =0;\n\t\tint number =0;\n\t\t\n\t\twhile (number < 20) {\n\t\t\tnumber++;\n\t\t\tsum += number;\n\t\t\tif(sum>= 100)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println(number);\n\t\tSystem.out.println(sum);\n\t}", "public static void main(String[] args) {\n\t\tfor(int i =1;i <=100;i++){\n\t\t\tSystem.out.println(i);\n\t\t}\n\t}", "public synchronized void odd(IntConsumer printNumber) throws InterruptedException {\n for (int i = 1; i <= n; i += 2) {\n while (state != 1) {\n wait();\n }\n\n printNumber.accept(i);\n state = 2;\n\n notifyAll();\n }\n }", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n int input = 1;\n String output = \"\";\n\n\n do {\n input = scanner.nextInt();\n if (input % 2 == 0 && input != 0) {\n output = output + \"even\\n\";\n }\n if (input % 2 != 0 && input != 0) {\n output = output + \"odd\\n\";\n }\n } while (input != 0);\n System.out.println(output);\n }", "public static void main(String[] args) {\n int counter = 0;\n while (counter<30){\n counter +=3;\n System.out.print(counter + \" \");\n\n }\n System.out.println(\" \");\n int evenNumber = 0;\n while(evenNumber <=50){\n System.out.print( evenNumber + \" \");\n evenNumber +=2;\n\n }\n System.out.println(\" \");\n int oddNumber = 1;\n while (oddNumber<=50){\n System.out.print(oddNumber + \" \");\n\n oddNumber+=2;\n }\n\n System.out.println(\"---------------------\");\n int evenNumber2 = 20;\n if(evenNumber2 %2 == 0){\n System.out.println(evenNumber2 + \" is even number\");\n }else{\n System.out.println(evenNumber2 + \" is odd number\");\n }\n ++evenNumber2;\n\n\n System.out.println(\"---------------------------------\");\n\n int oddNumber2 = 21;\n if (oddNumber2 %2==1){\n System.out.println(oddNumber2 + \" is odd number\");\n }else{\n System.out.println(evenNumber2 + \" is even number\");\n }\n ++oddNumber2;\n\n }", "public synchronized void even(IntConsumer printNumber) throws InterruptedException {\n for (int i = 2; i <= n; i += 2) {\n while (state != 3) {\n wait();\n }\n\n printNumber.accept(i);\n state = 0;\n\n notifyAll();\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"ODD OR EVEN\");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the number:\");\r\n\t\tint n=sc.nextInt();\r\n\t\tSystem.out.println(\"odd numbers\");\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t {\r\n\t\t\tif(i%2==1) \r\n\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(i);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t System.out.println(\"even numb\");\r\n\t\t\tfor(int i=0;i<=n;i++){\r\n\t\t\t\tif(i%2==0) \r\n\t\t\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(i);\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}", "public static void main(String[] args) {\n\n int limit = 1000;\n\n for (int num = 0; num <= 1000; num++) {\n boolean isPrime = true;\n for (int divisor = 2; divisor < num; divisor++) {\n if (num % divisor == 0) {\n isPrime = false;\n break;\n }\n }\n if (isPrime) {\n System.out.print(num + \" \");\n }\n }\n }", "public static void main(String[] args){\n for(int i = 1; i <= 100; i++){\n\n //prints Fizz if i is divisible by 3\n if(i % 3 == 0)\n System.out.print(\"Fizz\");\n //prints Buzz if i is divisible by 5\n if(i % 5 == 0)\n System.out.print(\"Buzz\");\n //prints i number if not divisible by 3 or 5\n if(i % 3 != 0 && i %5 != 0)\n System.out.print(i);\n //goes to next line\n System.out.println();\n\n }\n\n }", "public static void main(String[] args){\n for(int i=100;i<1000;i++){\n if(isArmstrong(i)){\n System.out.print(i+\" \");\n }\n }\n\n \n }", "public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }" ]
[ "0.78737104", "0.784872", "0.7484683", "0.74655384", "0.74080205", "0.7397556", "0.7338822", "0.732854", "0.7326862", "0.7309726", "0.7301096", "0.72878623", "0.72608954", "0.7248456", "0.72195506", "0.72012", "0.71918875", "0.7175123", "0.71513116", "0.71084577", "0.7082387", "0.7073023", "0.70391744", "0.7035024", "0.70232046", "0.69381475", "0.69259804", "0.6901746", "0.68791723", "0.68661994", "0.6862996", "0.683724", "0.68246526", "0.68208754", "0.68121064", "0.68017846", "0.6797086", "0.6788555", "0.6788417", "0.67822695", "0.6771936", "0.67709094", "0.6766149", "0.67479455", "0.6733093", "0.6718962", "0.6702309", "0.6688317", "0.6671458", "0.6657422", "0.6649478", "0.6634734", "0.66179585", "0.660623", "0.65914875", "0.6580181", "0.65601283", "0.6536686", "0.65252674", "0.65101594", "0.65045273", "0.6499689", "0.6492044", "0.64913386", "0.6472044", "0.6465997", "0.64601105", "0.64554167", "0.64341754", "0.64122564", "0.64099437", "0.6356465", "0.63435465", "0.6339698", "0.6339609", "0.6333639", "0.6328903", "0.63214517", "0.63097894", "0.63063884", "0.6302513", "0.6300421", "0.6298363", "0.6297991", "0.62948495", "0.6290234", "0.62824553", "0.62817997", "0.62748206", "0.62629056", "0.6251986", "0.6245687", "0.6238483", "0.6238336", "0.6232522", "0.6227993", "0.62152475", "0.6208587", "0.6199084", "0.6179757" ]
0.6836879
32
The connection to Google Play services was lost for some reason.
@Override public void onConnectionSuspended(int cause) { Log.i(TAG, "Connection suspended"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"MainActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"LoginActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(getBaseContext(), R.string.google_api_client_connection_failed, Toast.LENGTH_LONG).show();\n googleApiClient.connect();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onStop() {\n if (null != googleClient && googleClient.isConnected()) {\n googleClient.disconnect();\n }\n super.onStop();\n }", "private void connectGoogleApiAgain(){\n if (!mGoogleApiClient.isConnected()) {\n ConnectionResult connectionResult =\n mGoogleApiClient.blockingConnect(30, TimeUnit.SECONDS);\n\n if (!connectionResult.isSuccess()) {\n Log.e(TAG, \"DataLayerListenerService failed to connect to GoogleApiClient, \"\n + \"error code: \" + connectionResult.getErrorCode());\n }\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"location service connection lost\");\n Toast.makeText(this, R.string.conn_failed, Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tLog.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n\t\t\t\t+ connectionResult.getErrorCode());\n\t\t// TODO(Developer): Check error code and notify the user of error state and resolution.\n\t\tToast.makeText(this,\n\t\t\t\t\"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t}", "@Override\r\n public void onConnectionFailed(ConnectionResult result) {\n mGoogleApiClient.reconnect();\r\n map.clear();\r\n markerCount = 0;\r\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(Constants.GOOGLE_MAP_ERROR_TAG, Constants.GOOGLE_MAP_ERROR);\n }", "private void checkGooglePlayServices() {\n\t\tint status = GooglePlayServicesUtil\n\t\t\t\t.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (D) {\n\t\t\tif (status == ConnectionResult.SUCCESS) {\n\t\t\t\t// Success! Do what you want\n\t\t\t\tLog.i(TAG, \"Google Play Services all good\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_MISSING) {\n\t\t\t\tLog.e(TAG, \"Google Play Services not in place\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {\n\t\t\t\tLog.e(TAG, \"Google Play Serivices outdated\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_DISABLED) {\n\t\t\t\tLog.e(TAG, \"Google Plauy Services disabled\");\n\t\t\t} else if (status == ConnectionResult.SERVICE_INVALID) {\n\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\"Google Play Serivices invalid but wtf does that mean?\");\n\t\t\t} else {\n\t\t\t\tLog.e(TAG, \"No way this is gonna happen\");\n\t\t\t}\n\t\t}\n\t}", "public void onConnectionFailed(ConnectionResult connectionResult) {\r\n /*\r\n * Google Play services can resolve some errors it detects.\r\n * If the error has a resolution, try sending an Intent to\r\n * start a Google Play services activity that can resolve\r\n * error.\r\n */\r\n if (connectionResult.hasResolution()) {\r\n try {\r\n // Start an Activity that tries to resolve the error\r\n connectionResult.startResolutionForResult(\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n /*\r\n * Thrown if Google Play services canceled the original\r\n * PendingIntent\r\n */\r\n } catch (IntentSender.SendIntentException e) {\r\n // Log the error\r\n e.printStackTrace();\r\n }\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n protected void onStop() {\n if (mGoogleApiClient.isConnected()) {\n mGoogleApiClient.disconnect();\n }\n\n super.onStop();\n }", "@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n protected void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n public void connectionLost(Throwable cause) {\n Log.d(TAG, \"Connection lost\");\n }", "@Override\n protected void onStop() {\n super.onStop();\n if (googleApiClient != null) {\n Log.i(TAG, \"In onStop() - disConnecting...\");\n googleApiClient.disconnect();\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects. If the error\n\t\t * has a resolution, try sending an Intent to start a Google Play\n\t\t * services activity that can resolve error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this,\n\t\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(mActivity);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n Log.d(Util.TAG_GOOGLE, \"\" + connectionStatusCode);\n // showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "@Override\r\n protected void onStop() {\n super.onStop();\r\n if (mGoogleApiClient.isConnected()) {\r\n mGoogleApiClient.disconnect();\r\n }\r\n }", "private boolean checkGooglePlayServices() {\n int code = GooglePlayServicesUtil.isGooglePlayServicesAvailable(mActivity);\n if (code != ConnectionResult.SUCCESS) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(code, mActivity, Constants.RequestCode.HANDLE_GMS,\n new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialogInterface) {\n mActivity.finish();\n }\n });\n if (dialog != null) {\n dialog.show();\n }\n\n return false;\n }\n\n return true;\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.d(TAG, \"Play services connection suspended\");\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.d(TAG, \"Play services connection suspended\");\n }", "@Override\n public void onConnectionSuspended(int cause) {\n\n Log.i(TAG, \"GoogleApiClient connection suspended\");\n }", "@Override\n public void onConnectionSuspended(int i) {\n if (i == GoogleApiClient.ConnectionCallbacks.CAUSE_NETWORK_LOST) {\n com.google.android.gms.fit.samples.common.logger.Log.i(TAG, \"Connection lost. Cause: Network Lost.\");\n } else if (i == GoogleApiClient.ConnectionCallbacks.CAUSE_SERVICE_DISCONNECTED) {\n com.google.android.gms.fit.samples.common.logger.Log.i(TAG, \"Connection lost. Reason: Service Disconnected\");\n }\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult)\n {\n swipeRefreshLayout.setVisibility(View.GONE);\n showError(R.drawable.ic_location_disabled_black,\n R.string.error_message_update_google_play_services,\n R.string.fix_error_no_fix);\n }", "@Override\n public void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.e(TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (googleApiClient != null) {\n googleApiClient.stopAutoManage(this);\n googleApiClient.disconnect();\n }\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(\"Feelknit\", \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n /*\n * Google Play services can resolve some errors it detects.\n * If the error has a resolution, try sending an Intent to\n * start a Google Play services activity that can resolve\n * error.\n */\n if (connectionResult.hasResolution()) {\n\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(activity,\n \t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n\n /*\n * If no resolution is available, put the error code in\n * an error Intent and broadcast it back to the main Activity.\n * The Activity then displays an error dialog.\n * is out of date.\n */\n } else {\n\n Intent errorBroadcastIntent = new Intent(LocationUtils.ACTION_CONNECTION_ERROR);\n errorBroadcastIntent.addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_CONNECTION_ERROR_CODE,\n connectionResult.getErrorCode());\n LocalBroadcastManager.getInstance(activity).sendBroadcast(errorBroadcastIntent);\n }\n }", "@Override\n\tprotected void onResume()\n\t{\n\t\tsuper.onResume();\n\n\t\tint resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());\n\t\tif (resCode != ConnectionResult.SUCCESS)\n\t\t{\n\t\t\tGooglePlayServicesUtil.getErrorDialog(resCode, this, 1);\n\t\t}\n\t}", "private void acquireGooglePlayServices() {\r\n GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();\r\n final int connectionStatusCode = apiAvailability.isGooglePlayServicesAvailable(getActivity());\r\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\r\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\r\n }\r\n }", "@Override\n public void onConnectionSuspended(int i) {\n Log.d(TAG, \"Play services connection suspended\");\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(this);\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "@Override\r\n public void onConnectionSuspended(int cause) {\n mGoogleApiClient.connect();\r\n map.clear();\r\n markerCount = 0;\r\n }", "@Override\n public void onConnectionSuspended(int cause) {\n Log.i(DEBUG_TAG, \"Connection suspended\");\n mGoogleApiClient.connect();\n }", "private void connectionLost() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Device connection was lost\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n handler.postDelayed(new Runnable() { //sends this stop back to the main thread to exit the reader thread\n @Override\n public void run() {\n stop();\n }\n }, 250);\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects.\n\t\t * If the error has a resolution, try sending an Intent to\n\t\t * start a Google Play services activity that can resolve\n\t\t * error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// If no resolution is available, display a dialog to the user with the error.\n\t\t\tshowErrorDialog(connectionResult.getErrorCode());\n\t\t}\n\t}", "@Override\n public void onStop() {\n if(null!=mGoogleApiClient)\n mGoogleApiClient.disconnect();\n super.onStop();\n }", "@Override\n protected void notifyUserOnPlayServicesUnavailable() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "private void checkGooglePlayServiceSDK() {\n //To change body of created methods use File | Settings | File Templates.\n final int googlePlayServicesAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n Log.i(TAG, \"googlePlayServicesAvailable:\" + googlePlayServicesAvailable);\n\n switch (googlePlayServicesAvailable) {\n case ConnectionResult.SERVICE_MISSING:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_NOT_INSTALLED);\n break;\n case ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_SERVICE_UPDATE_REQUIRED);\n break;\n case ConnectionResult.SERVICE_DISABLED:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_DISABLED);\n break;\n case ConnectionResult.SERVICE_INVALID:\n form.dispatchErrorOccurredEvent(this, \"checkGooglePlayServiceSDK\",\n ErrorMessages.ERROR_GOOGLE_PLAY_INVALID);\n break;\n }\n }", "private void acquireGooglePlayServices() {\n GoogleApiAvailability apiAvailability =\n GoogleApiAvailability.getInstance();\n final int connectionStatusCode =\n apiAvailability.isGooglePlayServicesAvailable(getActivity());\n if (apiAvailability.isUserResolvableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this, 9000);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n\t\t\tLog.i(\"LOCATION\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n\t\t}\n\t}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "@Override\n public void onDestroy() {\n super.onDestroy();\n Toast.makeText(this, R.string.service_destoryed, Toast.LENGTH_LONG).show();\n\n // Disconnect Google Api to stop updating.\n mGoogleApiClient.disconnect();\n }", "private boolean checkPlayServices()\n {\n\tint resultCode=-5000;\n\ttry {\n\t\tresultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t} catch (Exception e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\tif (resultCode != ConnectionResult.SUCCESS)\n\t{\n\t if (GooglePlayServicesUtil.isUserRecoverableError(resultCode))\n\t {\n\t \tLog.i(Globals.TAG, \"dialog gorunecek\");\n\t \tGooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();\n\t \tLog.i(Globals.TAG, \"dialog kapandi\");\n\t }\n\t else\n\t {\n\t\t\tLog.i(Globals.TAG, \"This device is not supported.\");\n\t\t\tint RQS_GooglePlayServices = 1;\n\t\t\t GooglePlayServicesUtil.getErrorDialog(resultCode, this, RQS_GooglePlayServices);\n\t\t\tfinish();\n\t }\n\t return false;\n\t}\n\treturn true;\n }", "@Override\n\t\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\tLocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, appLocationService);\n\n\t\t}", "public boolean isGooglePlayServicesAvailable() {\n final int connectionStatusCode =\n GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);\n if (GooglePlayServicesUtil.isUserRecoverableError(connectionStatusCode)) {\n showGooglePlayServicesAvailabilityErrorDialog(connectionStatusCode);\n return false;\n } else if (connectionStatusCode != ConnectionResult.SUCCESS ) {\n return false;\n }\n return true;\n }", "public boolean googleServiceCheck() {\n int isServiceAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\n if (isServiceAvailable == ConnectionResult.SUCCESS) {\n return true;\n } else if (GooglePlayServicesUtil.isUserRecoverableError(isServiceAvailable)) {\n Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isServiceAvailable, this, GPS_ERROR_DIALOG_REQUEST);\n dialog.show();\n } else {\n Toast.makeText(this, \"Can't connect to Google Play Service\", Toast.LENGTH_SHORT).show();\n }\n return false;\n }", "@Override\n public void onFailure(Call<ChallengeResponse> call, Throwable t) {\n Toast.makeText(getBaseContext(), \"Please check your connection!\", Toast.LENGTH_LONG).show();\n finish();\n\n }", "private void disConnect() {\n Auth.GoogleSignInApi.revokeAccess(mGoogleApiClient).setResultCallback(\n new ResultCallback<Status>() {\n @Override\n public void onResult(Status status) {\n m_tvStatus.setText(R.string.status_notconnected);\n m_tvEmail.setText(\"\");\n m_tvDispName.setText(\"\");\n }\n });\n }", "protected void onConnectionError() {\n\t}", "private boolean isGooglePlayServicesAvailable() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n if (ConnectionResult.SUCCESS == status) {\n return true;\n } else {\n GooglePlayServicesUtil.getErrorDialog(status, this, 0).show();\n return false;\n }\n }", "@Override\n public void onBillingServiceDisconnected() {\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override\n\tpublic void onDisconnected() {\n\t\tToast.makeText(context, \"Disconnected. Please re-connect.\",Toast.LENGTH_SHORT).show();\n\t}", "private boolean CheckGooglePlayServices() {\n GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();\n int available = googleApiAvailability.isGooglePlayServicesAvailable(this);\n if (available != ConnectionResult.SUCCESS) {\n if (googleApiAvailability.isUserResolvableError(available)) {\n googleApiAvailability.getErrorDialog(this, available,0).show();\n }\n return false;\n }\n return true;\n }", "private void connectionFailed() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Unable to connect device\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n\n // Start the service over to restart listening mode\n // BluetoothSerialServer.this.start();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\",\n \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "public void showGoogleErrorDialog(ConnectionResult connectionResult) {\n try {\n // Create a fragment for the error dialog\n connectionResult.startResolutionForResult(this, GoogleAPIConnectionConstants.REQUEST_RESOLVE_ERROR);\n }\n catch (IntentSender.SendIntentException e) {\n Log.e(MainActivity.TAG,\"SendIntentException occurred.\");\n checkGoogleApiAvailability();\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed\");\n if (!result.hasResolution()) {\n GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(), this, 0).show();\n return;\n }\n try {\n Log.i(TAG, \"trying to resolve the Connection failed error...\");\n result.startResolutionForResult(this, REQUEST_CODE);\n } catch (IntentSender.SendIntentException e) {\n Log.e(TAG, \"Exception while starting resolution activity\", e);\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n // Thrown if Google Play services canceled the original PendingIntent\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /* If no resolution is available, display a dialog to the\n * user with the error. */\n Log.i(LOG_TAG, \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n\n GoogleApiAvailability GMS_Availability = GoogleApiAvailability.getInstance();\n int GMS_CheckResult = GMS_Availability.isGooglePlayServicesAvailable(this);\n\n if (GMS_CheckResult != ConnectionResult.SUCCESS) {\n\n // Would show a dialog to suggest user download GMS through Google Play\n GMS_Availability.getErrorDialog(this, GMS_CheckResult, 1).show();\n }else{\n mGoogleApiClient.connect();\n }\n }", "private void connectionLost() {\n setState(EBluetoothStates.CONNECTING);\n // Send a failure message back to the Activity\n // updateActivity(General.MessageType.ERROR, General.OnDeviceConnectionLost);\n }", "private void connectionLost() {\n Log.d(TAG, \"BluetoothManager :: connectionLost()\");\n setState(STATE_LISTEN); //추가됨\n\n // Send a failure message back to the Activity\n // WARNING: This makes too many toast.\n //이것도 어차피 연결잃었다고하는거 알려주는거라 안해도 상관 없다.\n /*\n Message msg = mHandler.obtainMessage(MESSAGE_TOAST);\n Bundle bundle = new Bundle();\n bundle.putString(SERVICE_HANDLER_MSG_KEY_TOAST, \"연결되있던장치와 연결을 잃었어요\");\n msg.setData(bundle);\n mHandler.sendMessage(msg);\n */\n // Reserve re-connect timer\n reserveRetryConnect(); //수정됨\n }", "@Override\n public void onStop() {\n mGoogleApiClient.disconnect();\n super.onStop();\n //realm.close();\n }", "private boolean isGooglePlayServicesAvailable() {\n int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\r\n // If Google Play services is available\r\n if (ConnectionResult.SUCCESS == resultCode) {\r\n // In debug mode, log the status\r\n Log.d(\"Location Updates\", \"Google Play services is available.\");\r\n return true;\r\n } else {\r\n // Get the error dialog from Google Play services\r\n Dialog errorDialog = GooglePlayServicesUtil.getErrorDialog( resultCode,\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n\r\n // If Google Play services can provide an error dialog\r\n if (errorDialog != null) {\r\n // Create a new DialogFragment for the error dialog\r\n ErrorDialogFragment errorFragment = new ErrorDialogFragment();\r\n errorFragment.setDialog(errorDialog);\r\n errorFragment.show(getFragmentManager(), \"Location Updates\");\r\n }\r\n\r\n return false;\r\n }\r\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n return;\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n }", "public void onServiceDisconnected(ComponentName className) {\n Log.e(\"Activity\", \"Service has unexpectedly disconnected\");\n wsService = null;\n }", "private boolean isGooglePlayServicesAvailable() {\n\t\tint resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);\n\t\t// If Google Play services is available\n\t\tif (ConnectionResult.SUCCESS == resultCode) {\n\t\t\t// In debug mode, log the status\n\t\t\tLog.d(\"Location Updates\", \"Google Play services is available.\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Get the error dialog from Google Play services\n\t\t\tDialog errorDialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this,\n\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t// If Google Play services can provide an error dialog\n\t\t\tif (errorDialog != null) {\n\t\t\t\t// Create a new DialogFragment for the error dialog\n\t\t\t\tErrorDialogFragment errorFragment = new ErrorDialogFragment();\n\t\t\t\terrorFragment.setDialog(errorDialog);\n\t\t\t\terrorFragment.show(getSupportFragmentManager(), \"Location Updates\");\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(\n this,\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n //Do nothing, no location available so use default default in server spinner\n }\n }", "@Override\n protected void notifyUserOnPlayServicesErrorDialogCancelled() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "private void connectionFailed() {\n if (debugging)\n Log.d(TAG, \"connection Failed\");\n setState(EBluetoothStates.DISCONNECTED);\n if (mConnectionManager != null) {\n mConnectionManager.closeSocket();\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed. Error: \" + result.getErrorCode());\n }" ]
[ "0.7643075", "0.7643075", "0.7643075", "0.7643075", "0.7643075", "0.7643075", "0.7643075", "0.76345867", "0.7615776", "0.74083203", "0.7351084", "0.72027194", "0.71496236", "0.67868716", "0.6760041", "0.6735244", "0.67038625", "0.668471", "0.668471", "0.66540205", "0.66521233", "0.6649631", "0.661676", "0.6616167", "0.6529561", "0.6502553", "0.646508", "0.646508", "0.6456128", "0.64542735", "0.6453516", "0.6449051", "0.6442803", "0.64421517", "0.6425611", "0.6425611", "0.63976395", "0.63925475", "0.6390151", "0.6386745", "0.63853884", "0.6315084", "0.6315084", "0.6308624", "0.62905335", "0.6269275", "0.6261465", "0.6237316", "0.62296575", "0.62199366", "0.6214377", "0.6214377", "0.6214377", "0.62077487", "0.6203575", "0.620126", "0.61918956", "0.6185295", "0.61826164", "0.6176976", "0.6145064", "0.6126707", "0.6124846", "0.6117972", "0.6088812", "0.6085782", "0.6079546", "0.60267437", "0.60152847", "0.60006434", "0.5998828", "0.5996551", "0.5996512", "0.5994872", "0.59894603", "0.5951987", "0.59518266", "0.5940413", "0.5940413", "0.5940413", "0.59365857", "0.5925278", "0.59246665", "0.59214574", "0.5913832", "0.5913832", "0.59100664", "0.5909486", "0.58839697", "0.5883701", "0.58796567", "0.5873062", "0.58616596", "0.58605444", "0.5850651", "0.58362794", "0.5833091", "0.58311236", "0.58264554", "0.58257467", "0.58220506" ]
0.0
-1
Refer to the javadoc for ConnectionResult to see what error codes might be returned in onConnectionFailed.
@Override public void onConnectionFailed(ConnectionResult result) { Log.i(TAG, "Connection failed: ConnectionResult.getErrorCode() = " + result.getErrorCode()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \" + connectionResult.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"Feelknit\", \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\r\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"onConnectionFailed \", \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\r\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(\"Connection failed:\", \" ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult conRes) {}", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.e(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \" + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n return;\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n Fog.i(TAG, \"Connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed. Error: \" + result.getErrorCode());\n }", "@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(LCAT, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\n\t}", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\t// TODO Auto-generated method stub\n\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.d(\"SCXTT\", \" onConnectionFailed \" + result.toString());\n\n }", "@Override\n public void onConnectionFailed(ConnectionResult arg0) {\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tLog.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n\t\t\t\t+ connectionResult.getErrorCode());\n\t\t// TODO(Developer): Check error code and notify the user of error state and resolution.\n\t\tToast.makeText(this,\n\t\t\t\t\"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult result) {\n // Refer to the reference doc for ConnectionResult to see what error codes might\n // be returned in onConnectionFailed.\n Log.d(TAG, \"Play services connection failed: ConnectionResult.getErrorCode() = \"\n + result.getErrorCode());\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"mainActivity\", \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.d(\"ANDROID\", \"faild contected\");\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n\n Log.e(TAG, \"onConnectionFailed: ConnectionResult.getErrorCode() = \"\n + connectionResult.getErrorCode());\n\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\npublic void onConnectionFailed(ConnectionResult arg0) {\n\t\n}", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n Toast.makeText(this,\n \"Could not connect to Google API Client: Error \" + connectionResult.getErrorCode(),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n // Can it be resolved, for example by installing a new version?\n log(\"Connection failed\");\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n log(\"Trying to resolve the error...\");\n connectionResult.startResolutionForResult(\n this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n } catch (IntentSender.SendIntentException e) {\n log(\"Exception during resolution: \" + e.toString());\n }\n } else {\n // No resolution is available\n showErrorDialog(connectionResult.getErrorCode());\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult arg0) {\n\t\tToast.makeText(context, \"Connection Failed\", Toast.LENGTH_SHORT).show();\n\t}", "@Override\n\t\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t if (connectionResult.hasResolution()) {\n\t try {\n\t // Start an Activity that tries to resolve the error\n\t connectionResult.startResolutionForResult(activity, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\t } catch (IntentSender.SendIntentException e) {\n\t // Log the error\n\t e.printStackTrace();\n\t }\n\t } else {\n\t /*\n\t * If no resolution is available, display a dialog to the\n\t * user with the error.\n\t */\n\n\t }\n\t\t\t\n\t\t}", "protected void onConnectionError() {\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);\n }\n catch (IntentSender.SendIntentException e) {\n e.printStackTrace();\n }\n }\n else {\n Log.i(TAG, \"Connection Failed: Error Code = \" + connectionResult.getErrorCode());\n }\n }", "public void onConnectionError()\n\t\t{\n\t\t}", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n // An unresolvable error has occurred and a connection to Google APIs\n // could not be established. Display an error message, or handle\n // the failure silently\n }", "public void OnConnectionError();", "@Override\n\tpublic void onConnectionFailed(ConnectionResult result) {\n\t\tLog.i(\"onConnectionFailed\", result.toString());\n\t\tif (result.hasResolution()) {\n\t\t\ttry {\n\t\t\t\tresult.startResolutionForResult(this, REQUEST_CODE_RESOLVE_ERR);\n\t\t\t} catch (SendIntentException e) {\n\t\t\t\tmPlusClient.connect();\n\t\t\t}\n\t\t}\n\n\t}", "void connectFailed();", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.w(TAG, \"Connection failed. Cause: \" + result.toString());\n if (!result.hasResolution()) {\n Log.w(TAG, String.valueOf(result.getErrorCode()));\n return;\n }\n\n if (!authInProgress) {\n try {\n Log.w(TAG, \"Attempting to resolve failed connection\");\n authInProgress = true;\n result.startResolutionForResult(SensorNew.this, REQUEST_OAUTH);\n } catch (IntentSender.SendIntentException e) {\n Log.w(TAG, \"Exception while starting resolution activity: \" + e.getMessage());\n }\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n hideProgressDialog();\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"location service connection lost\");\n Toast.makeText(this, R.string.conn_failed, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"Connection failed\");\n if (!result.hasResolution()) {\n GooglePlayServicesUtil.getErrorDialog(result.getErrorCode(), this, 0).show();\n return;\n }\n try {\n Log.i(TAG, \"trying to resolve the Connection failed error...\");\n result.startResolutionForResult(this, REQUEST_CODE);\n } catch (IntentSender.SendIntentException e) {\n Log.e(TAG, \"Exception while starting resolution activity\", e);\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(Constants.GOOGLE_MAP_ERROR_TAG, Constants.GOOGLE_MAP_ERROR);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(\n this,\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n //Do nothing, no location available so use default default in server spinner\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(\n this,\n LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n\n } catch (IntentSender.SendIntentException e) {\n\n // Log the error\n e.printStackTrace();\n }\n } else {\n\n // If no resolution is available, display a dialog to the user with the error.\n showErrorDialog(connectionResult.getErrorCode());\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects.\n\t\t * If the error has a resolution, try sending an Intent to\n\t\t * start a Google Play services activity that can resolve\n\t\t * error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(\n\t\t\t\t\t\tthis,\n\t\t\t\t\t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// If no resolution is available, display a dialog to the user with the error.\n\t\t\tshowErrorDialog(connectionResult.getErrorCode());\n\t\t}\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this, 9000);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n\t\t\tLog.i(\"LOCATION\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n\t\t}\n\t}", "@Override\n public void onSuccess(Void unusedResult) {\n Discoverer.this.eventListener.trigger(EVENT_LOG, \"Connection requested with: \" + endpointId);\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(getActivity(), LocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original PendingIntent\n\t\t\t\t */\n\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// If no resolution is available, display a dialog to the user with the error.\n\t\t\tshowErrorDialog(connectionResult.getErrorCode());\n\t\t}\n\n\t}", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(getActivity(), CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\", \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n\n }", "@Override public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n Log.e(\"Error\",\n \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n if (connectionResult.hasResolution()) {\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(this, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n // Thrown if Google Play services canceled the original PendingIntent\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n } else {\n /* If no resolution is available, display a dialog to the\n * user with the error. */\n Log.i(LOG_TAG, \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n if (connectionResult.hasResolution() && mContext instanceof Activity) {\n try {\n Activity activity = (Activity) mContext;\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(activity, CONNECTION_FAILURE_RESOLUTION_REQUEST);\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (IntentSender.SendIntentException e) {\n // Log the error\n e.printStackTrace();\n BBVAMapsLog.e(TAG, e.getMessage());\n }\n } else {\n /*\n * If no resolution is available, display a dialog to the\n * user with the error.\n */\n BBVAMapsLog.e(TAG, \"Location services connection failed with code \" + connectionResult.getErrorCode());\n }\n }", "@Override\n public void onConnectionFailed(ConnectionResult connectionResult) {\n\n /*\n * Google Play services can resolve some errors it detects.\n * If the error has a resolution, try sending an Intent to\n * start a Google Play services activity that can resolve\n * error.\n */\n if (connectionResult.hasResolution()) {\n\n try {\n // Start an Activity that tries to resolve the error\n connectionResult.startResolutionForResult(activity,\n \t\tLocationUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST);\n\n /*\n * Thrown if Google Play services canceled the original\n * PendingIntent\n */\n } catch (SendIntentException e) {\n // Log the error\n e.printStackTrace();\n }\n\n /*\n * If no resolution is available, put the error code in\n * an error Intent and broadcast it back to the main Activity.\n * The Activity then displays an error dialog.\n * is out of date.\n */\n } else {\n\n Intent errorBroadcastIntent = new Intent(LocationUtils.ACTION_CONNECTION_ERROR);\n errorBroadcastIntent.addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_CONNECTION_ERROR_CODE,\n connectionResult.getErrorCode());\n LocalBroadcastManager.getInstance(activity).sendBroadcast(errorBroadcastIntent);\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.e(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(TAG, \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"LoginActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "public abstract void mo27384b(OnConnectionFailedListener onConnectionFailedListener);", "@Override\n protected void onActivityResult(\n int requestCode, int resultCode, Intent data) {\n // Decide what to do based on the original request code\n switch (requestCode) {\n case CONNECTION_FAILURE_RESOLUTION_REQUEST :\n /*\n * If the result code is Activity.RESULT_OK, try\n * to connect again\n */\n switch (resultCode) {\n case Activity.RESULT_OK :\n /*\n * Try the request again?\n */\n\n break;\n }\n }\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult)\n {\n swipeRefreshLayout.setVisibility(View.GONE);\n showError(R.drawable.ic_location_disabled_black,\n R.string.error_message_update_google_play_services,\n R.string.fix_error_no_fix);\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(\"MainActivity\", \"onConnectionFailed:\" + connectionResult);\n Toast.makeText(this, \"Google Play Services error.\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void onConnectionFailed(ConnectionResult connectionResult) {\n\t\t/*\n\t\t * Google Play services can resolve some errors it detects. If the error\n\t\t * has a resolution, try sending an Intent to start a Google Play\n\t\t * services activity that can resolve error.\n\t\t */\n\t\tif (connectionResult.hasResolution()) {\n\t\t\ttry {\n\t\t\t\t// Start an Activity that tries to resolve the error\n\t\t\t\tconnectionResult.startResolutionForResult(this,\n\t\t\t\t\t\tCONNECTION_FAILURE_RESOLUTION_REQUEST);\n\t\t\t\t/*\n\t\t\t\t * Thrown if Google Play services canceled the original\n\t\t\t\t * PendingIntent\n\t\t\t\t */\n\t\t\t} catch (IntentSender.SendIntentException e) {\n\t\t\t\t// Log the error\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\n\t\t}\n\t}", "public int getConnectionStatus()\r\n { return connectionStatus; }", "@Override\n\tpublic void connectionSucceeded(String message) {\n\t}", "@Override\n public void onConnectionFailed(ConnectionResult result) {\n Log.i(TAG, \"GoogleApiClient connection failed: \" + result.toString());\n\n if (!result.hasResolution()) {\n\n // show the localized error dialog.\n GoogleApiAvailability.getInstance().getErrorDialog(this, result.getErrorCode(), 0).show();\n return;\n }\n\n /**\n * The failure has a resolution. Resolve it.\n * Called typically when the app is not yet authorized, and an authorization\n * dialog is displayed to the user.\n */\n\n try {\n\n result.startResolutionForResult(this, REQUEST_CODE_RESOLUTION);\n\n } catch (IntentSender.SendIntentException e) {\n\n Log.e(TAG, \"Exception while starting resolution activity\", e);\n }\n }", "protected abstract void showConnectError();", "protected void onConnectionFailed(Endpoint endpoint) {}", "@Override\n\tpublic void connectionFailed(String message) {\n\t\tToast.makeText(this, \"Connection Failed !\", Toast.LENGTH_SHORT).show();\n\t}", "public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}", "@Override\n public void onFailure(int i) {\n System.out.println(\"pca connect: Failed to connect = \" + i);\n }", "@ReactMethod\n public void connectionStatus(Callback connectionStatusResult) {\n ConnectivityManager connManager = (ConnectivityManager) getReactApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);\n NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);\n if (mWifi.isConnected()) {\n connectionStatusResult.invoke(true);\n } else {\n connectionStatusResult.invoke(false);\n }\n }", "public void onConnectionFailed(ConnectionResult connectionResult) {\r\n /*\r\n * Google Play services can resolve some errors it detects.\r\n * If the error has a resolution, try sending an Intent to\r\n * start a Google Play services activity that can resolve\r\n * error.\r\n */\r\n if (connectionResult.hasResolution()) {\r\n try {\r\n // Start an Activity that tries to resolve the error\r\n connectionResult.startResolutionForResult(\r\n this,\r\n CONNECTION_FAILURE_RESOLUTION_REQUEST);\r\n /*\r\n * Thrown if Google Play services canceled the original\r\n * PendingIntent\r\n */\r\n } catch (IntentSender.SendIntentException e) {\r\n // Log the error\r\n e.printStackTrace();\r\n }\r\n } else {\r\n Toast.makeText(getApplicationContext(), \"Sorry. Location services not available to you\", Toast.LENGTH_LONG).show();\r\n }\r\n }", "@Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(getBaseContext(), R.string.google_api_client_connection_failed, Toast.LENGTH_LONG).show();\n googleApiClient.connect();\n }", "@Override\r\n protected void onActivityResult(\r\n int requestCode, int resultCode, Intent data) {\r\n // Decide what to do based on the original request code\r\n switch (requestCode) {\r\n\r\n case CONNECTION_FAILURE_RESOLUTION_REQUEST:\r\n /*\r\n * If the result code is Activity.RESULT_OK, try\r\n * to connect again\r\n */\r\n switch (resultCode) {\r\n case Activity.RESULT_OK:\r\n mLocationClient.connect();\r\n break;\r\n }\r\n\r\n }\r\n }", "@Override\r\n public void connectFailed() {\n super.connectFailed();\r\n Commons.showToast(act, \"连接失败\");\r\n act.dismissLoadDialog();\r\n }", "@Override\n public void onConnectFailed()\n {\n Log.e(\"Dudu_SDK\",\n \"获取NS 业务服务器失败...onConnectFailed ... reconnect()...5 seconds later ...\");\n reconnect();\n if (connectCallBack != null)\n connectCallBack.onConnectFailed();\n }" ]
[ "0.8277823", "0.82334906", "0.8164023", "0.81530815", "0.8152359", "0.8118874", "0.8107503", "0.8099103", "0.8094418", "0.80743754", "0.8059262", "0.8053845", "0.8041113", "0.796702", "0.7941709", "0.79296607", "0.7899514", "0.78674877", "0.78063416", "0.78063416", "0.778782", "0.77827466", "0.7780151", "0.7780151", "0.7780151", "0.7770974", "0.77224845", "0.7703568", "0.77019125", "0.77019125", "0.7681784", "0.7588493", "0.7559624", "0.74569905", "0.73828924", "0.73828924", "0.73737055", "0.73035777", "0.7267241", "0.7204125", "0.71849394", "0.71757555", "0.71641093", "0.7103788", "0.7061489", "0.70556456", "0.7050989", "0.7017817", "0.69824255", "0.69653714", "0.6884533", "0.68305445", "0.6822708", "0.67979455", "0.67966914", "0.67515635", "0.6674859", "0.6647701", "0.66364104", "0.66232556", "0.65958047", "0.6586137", "0.65838575", "0.65838575", "0.6581767", "0.6580618", "0.6579724", "0.657594", "0.6572601", "0.65541804", "0.6543531", "0.653538", "0.653538", "0.653538", "0.653538", "0.653538", "0.653538", "0.653538", "0.6458228", "0.6442045", "0.6412979", "0.64075404", "0.6392559", "0.63396007", "0.6300151", "0.6280315", "0.6225527", "0.6222354", "0.62221336", "0.62170124", "0.62145", "0.62007076", "0.6199001", "0.61961913", "0.61680394", "0.6164207", "0.61461973", "0.61344385" ]
0.81679744
4
Builds and returns a GeofencingRequest. Specifies the list of geofences to be monitored. Also specifies how the geofence notifications are initially triggered.
private GeofencingRequest getGeofencingRequest() { GeofencingRequest.Builder builder = new GeofencingRequest.Builder(); // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device // is already inside that geofence. builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER); // Add the geofences to be monitored by geofencing service. builder.addGeofences(mGeofenceList); // Return a GeofencingRequest. return builder.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private GeofencingRequest getAddGeofencingRequest() {\n List<Geofence> geofencesToAdd = new ArrayList<>();\n geofencesToAdd.add(geofenceToAdd);\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_EXIT)\n .addGeofences(geofencesToAdd);\n return builder.build();\n\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n Log.d(TAG, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n\n\n T.t(TripMapsActivity.this, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "private GeofencingRequest getGeofencingRequest(LBAction lbAction) {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);// change upon params\n builder.addGeofence(createGeofenceForAction(lbAction));\n return builder.build();\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "protected void createLocationRequest() {\n\t\tmLocationRequest = new LocationRequest();\n\t\tmLocationRequest.setInterval(UPDATE_INTERVAL);\n\t\tmLocationRequest.setFastestInterval(FATEST_INTERVAL);\n\t\tmLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\t\tmLocationRequest.setSmallestDisplacement(DISPLACEMENT);\n\t}", "private PendingIntent getGeofencePendingIntent () {\n\n Intent intent = new Intent(this, GeofenceReceiver.class);\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when\n // calling addGeofences() and removeGeofences().\n return PendingIntent.getService(this, 0, intent, PendingIntent.\n FLAG_UPDATE_CURRENT);\n }", "protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n int UPDATE_INTERVAL = 1000 * 60 * 5;\n mLocationRequest.setInterval(UPDATE_INTERVAL);\n int FASTEST_INTERVAL = 5000;\n mLocationRequest.setFastestInterval(FASTEST_INTERVAL);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n int DISPLACEMENT = 20;\n mLocationRequest.setSmallestDisplacement(DISPLACEMENT); // 20 meters\n }", "protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n\n // Sets the desired interval for active location updates. This interval is\n // inexact.\n mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MILLISECONDS);\n\n // Sets the fastest rate for active location updates. This interval is exact, and your\n // application will never receive updates faster than this value.\n mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS);\n\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n Log.d(Constants.LOCATION_REQUEST, Constants.LOCATION_REQUEST);\n }", "private PendingIntent getGeofencePendingIntent() {\n if (mGeofencePendingIntent != null) {\r\n return mGeofencePendingIntent;\r\n }\r\n Intent intent = new Intent(this, GeofenceBroadcastReceiver.class);\r\n\r\n // addGeofences() and removeGeofences().\r\n mGeofencePendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n return mGeofencePendingIntent;\r\n }", "protected void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n //Sets the preferred interval for GPS location updates\n mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MS);\n //Sets the fastest interval for GPS location updates\n mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MS);\n //Sets priority of the GPS location to accuracy\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "private void createLocationRequest() {\n mLocationRequest = new LocationRequest();\n mLocationRequest = LocationRequest.create();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "private Geofence createGeofence( LatLng latLng, float radius )\n {\n T.t(TripMapsActivity.this, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion( latLng.latitude, latLng.longitude, radius)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "public void createLocationRequest(){\n locationRequest = new LocationRequest();\n locationRequest.setInterval(1000);\n locationRequest.setFastestInterval(500);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n }", "private PendingIntent createRequestPendingIntent() {\n\n // If the PendingIntent already exists\n if (null != geofenceRequestIntent) {\n\n // Return the existing intent\n return geofenceRequestIntent;\n\n // If no PendingIntent exists\n } else {\n\n // Create an Intent pointing to the IntentService\n // TODO correct service?\n Intent intent = new Intent(activity, ReceiveTransitionsIntentService.class);\n /*\n * Return a PendingIntent to start the IntentService.\n * Always create a PendingIntent sent to Location Services\n * with FLAG_UPDATE_CURRENT, so that sending the PendingIntent\n * again updates the original. Otherwise, Location Services\n * can't match the PendingIntent to requests made with it.\n */\n return PendingIntent.getService(\n activity,\n 0,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n }\n }", "protected void createLocationRequest() {\n System.out.println(\"In CREATE LOCATION REQUEST\");\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(60 * 1000);\n mLocationRequest.setFastestInterval(5 * 1000);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n //mLocationRequest.setSmallestDisplacement(Utils.DISPLACEMENT);\n }", "IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "private PendingIntent getGeofencePendingIntent() {\n // Reuse the PendingIntent if we already have it.\n if (mGeofencePendingIntent != null) {\n return mGeofencePendingIntent;\n }\n Intent intent = new Intent(mActivity, GeofenceTransitionsIntentService.class);\n// intent.putExtra(\"leavingstone.geolab.shoppinglist.model\", shoppingList);\n intent.putExtra(ShoppingListModel.SHOPPING_LIST_MODEL_KEY, shoppingList.getId());\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when calling\n // addGeofences() and removeGeofences().\n return PendingIntent.getService(mActivity, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n }", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}", "private LocationRequest createLocationRequest() {\r\n LocationRequest mLocationRequest = new LocationRequest();\r\n mLocationRequest.setInterval(2000);\r\n mLocationRequest.setFastestInterval(1000);\r\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\r\n return mLocationRequest;\r\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "private List<String> getGeofenceTransitionDetails(List<Geofence> triggeringGeofences) {\n List<String> geofenceRequestIds = new ArrayList<>();\n // Return the request ids of the triggered geofences\n for (Geofence geofence : triggeringGeofences) {\n geofenceRequestIds.add(geofence.getRequestId());\n }\n return geofenceRequestIds;\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n\n \t//save the geofences\n mGeofenceList = (ArrayList<Geofence>) geofences;\n\n // If a request is not already in progress\n if (!mAddingGeofenceInProgress) {\n\n // Toggle the flag and continue to request a connection to Location Service\n mAddingGeofenceInProgress = true;\n\n // Request a connection to Location Services\n requestConnection();\n\n // If a request is in progress\n } else {\n\n // Throw an exception and stop the request\n throw new UnsupportedOperationException();\n }\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "private LocationRequest getLocationRequest() {\n LocationRequest locationRequest = new LocationRequest();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(5000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n return locationRequest;\n }", "@Nonnull\n public ServiceAnnouncementRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {\n return new com.microsoft.graph.requests.ServiceAnnouncementRequest(getRequestUrl(), getClient(), requestOptions);\n }", "public void build() {\n\t\t\tRequest request = new Request();\n request.context = context;\n\t\t\trequest.requestType = requestType;\n\t\t\trequest.url = url;\n\t\t\trequest.envelope = envelope;\n\t\t\trequest.headers = headers;\n\n\t\t\trequest.responseListener = responseListener;\n\t\t\trequest.onValidateResponseListener = validateResponseListener;\n\n\t\t\trequest.isDebug = isDebug;\n\n\t\t\trequest.start();\n\t\t}", "protected void buildLocationSettingsRequest() {\n LocationSettingsRequest.Builder builder = new LocationSettingsRequest.Builder();\n builder.addLocationRequest(mLocationRequest);\n mLocationSettingsRequest = builder.build();\n\n }", "public GetBulkStateRequest build() {\n GetBulkStateRequest request = new GetBulkStateRequest();\n request.setStoreName(this.storeName);\n request.setKeys(this.keys);\n request.setMetadata(this.metadata);\n request.setParallelism(this.parallelism);\n return request;\n }", "private PendingIntent getGeofencePendingIntent(LBAction lbAction) {\n // Reuse the PendingIntent if we already have it.\n if (mGeofencePendingIntent != null) {\n return mGeofencePendingIntent;\n }\n Intent intent = new Intent(mContext, GeofenceTransitionsIntentService.class);\n intent.putExtra(Constants.LBACTION_ID_KEY, lbAction.getID());\n\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when\n // calling addGeofences() and removeGeofences().\n return PendingIntent.getService(mContext, 0, intent, PendingIntent.\n FLAG_UPDATE_CURRENT);\n }", "public IAgreementRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {\n return new com.microsoft.graph.requests.extensions.AgreementRequest(getRequestUrl(), getClient(), requestOptions);\n }", "private PendingIntent getGeofencePendingIntent() {\n // Reuse the PendingIntent if we already have it.\n if (mGeofencePendingIntent != null) {\n return mGeofencePendingIntent;\n }\n intent = new Intent(this, GeofenceTransitionsIntentService.class);\n //Intent intent = new Intent(this, GeofenceTransitionsIntentService.class);\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back\n return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "Geq createGeq();", "private LocationRequest getLocationRequest() {\r\n Log.i(TAG, \"getting location request\");\r\n LocationRequest locationRequest = new LocationRequest();\r\n locationRequest.setInterval(10000);\r\n locationRequest.setFastestInterval(5000);\r\n locationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);\r\n return locationRequest;\r\n }", "protected void SetupLocationRequest()\n {\n mLocationRequest = LocationRequest.create()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(30 * 1000) // 30 seconds, in milliseconds\n .setFastestInterval(1 * 1000); // 1 second, in milliseconds\n }", "public ExtendedGHRequest(double fromLat, double fromLon, double toLat, double toLon) {\n super(fromLat, fromLon, toLat, toLon);\n }", "public NewMemberRequest build() {\r\n return newMemberRequest;\r\n }", "public static WeatherRequest generateWeatherRequestForCurrentLocation() {\n WeatherRequest req = new WeatherRequest();\n req.setTypeCurrentLocation();\n return req;\n }", "private LocalSearchRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public IComplianceRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {\n return new com.microsoft.graph.requests.extensions.ComplianceRequest(getRequestUrl(), getClient(), requestOptions);\n }", "private void createRequest() {\n // Configure Google Sign In\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "public entities.Torrent.LocalSearchRequest.Builder getLocalSearchRequestBuilder() {\n\n onChanged();\n return getLocalSearchRequestFieldBuilder().getBuilder();\n }", "public void registerGeofences(List<LBAction> actions){\n for(LBAction act:actions){\n registerGeofence(act);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "public void registerGeofence(LBAction lbAction) {\n if (!(ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED)) {\n Log.d(LOG_TAG, \"No permissions granted\");\n } else {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n getGeofencingRequest(lbAction),\n getGeofencePendingIntent(lbAction)\n ).setResultCallback(this);\n }\n }", "public CreateOrderRequest() {\n\t\t_pcs = new PropertyChangeSupport(this);\n\t}", "IConditionsRequest getConditionsRequest(String location, IRequestListener listener);", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "public OverallrequestregExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}", "private com.google.protobuf.SingleFieldBuilderV3<\n entities.Torrent.LocalSearchRequest, entities.Torrent.LocalSearchRequest.Builder, entities.Torrent.LocalSearchRequestOrBuilder>\n getLocalSearchRequestFieldBuilder() {\n if (localSearchRequestBuilder_ == null) {\n localSearchRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n entities.Torrent.LocalSearchRequest, entities.Torrent.LocalSearchRequest.Builder, entities.Torrent.LocalSearchRequestOrBuilder>(\n getLocalSearchRequest(),\n getParentForChildren(),\n isClean());\n localSearchRequest_ = null;\n }\n return localSearchRequestBuilder_;\n }", "public ExtendedGHRequest(double fromLat, double fromLon, double toLat, double toLon,\n double startHeading, double endHeading) {\n super(fromLat, fromLon, toLat, toLon, startHeading, endHeading);\n }", "private void buildQueryGeographicDescription(String locationName, TermsList termsList) \n \t\tthrows UnsupportedEncodingException {\n\t\tif ((locationName != null) && (!(locationName.equals(\"\")))) {\n\t\t\tString parenthesizedValue = parenthesizeQueryValue(locationName);\n\t\t\ttermsList.addTerm(locationName);\n\t\t\tString escapedValue = Search.escapeQueryChars(parenthesizedValue);\n\t\t\tString encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n\t\t\tString locationQuery = String.format(\"geographicdescription:%s\",\n\t\t\t\t\tencodedValue);\n\t\t\tupdateQString(locationQuery);\n\t\t}\n }", "private void buildGoogleApiClient() {\n Log.d(Constants.SERVICE_CREATED, Constants.GOOGLE_MAP_BUILDING);\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(com.google.android.gms.location.LocationServices.API)\n .build();\n Log.d(Constants.SERVICE_CREATED, Constants.GOOGLE_MAP_BUILT);\n createLocationRequest();\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "@Nonnull\n public DeviceAppManagementRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {\n return new com.microsoft.graph.requests.DeviceAppManagementRequest(getRequestUrl(), getClient(), requestOptions);\n }", "public interface ReverseGeoCoderProto$RGCContextualLabelingRequestOrBuilder extends MessageLiteOrBuilder {\n String getLocale();\n\n ByteString getLocaleBytes();\n\n C7917e getParentZones(int i);\n\n int getParentZonesCount();\n\n List<C7917e> getParentZonesList();\n\n int getParentZonesValue(int i);\n\n List<Integer> getParentZonesValueList();\n\n C7919f getPreferredProvider();\n\n int getPreferredProviderValue();\n\n C7272d0 getRectangleObsolete();\n\n boolean getReturnFullAddress();\n\n boolean getReturnStreet();\n\n C7923h getViewport();\n\n boolean hasRectangleObsolete();\n\n boolean hasViewport();\n}", "private ListRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private void initRequest()\n\t{\n\t\tthis.request = new RestClientReportRequest();\n\t\tRequestHelper.copyConfigsToRequest(this.getConfigs(), this.request);\n\t\tRequestHelper.copyParamsToRequest(this.getParams(), this.request);\n\t\t\n\t\tthis.performQuery();\n\t}", "public ExtendedGHRequest(GHPoint startPlace, GHPoint endPlace, double startHeading, double endHeading) {\n super(startPlace, endPlace, startHeading, endHeading);\n }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "public VehicleSearchRequest createSearchVechicle() {\r\n\r\n\t\tVehicleSearchRequest searchRequest = new VehicleSearchRequest();\r\n\r\n\t\tif (StringUtils.isBlank(searchLocation)) {\r\n\t\t\tsearchRequest.setLocation(DefaultValues.LOCATION_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setLocation(searchLocation);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchVehicleType)) {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(DefaultValues.VEHICLE_TYPE_DEFAULT.getDef()));\r\n\t\t} else {\r\n\t\t\tsearchRequest.setVehicleType(VehicleType.getEnum(searchVehicleType));\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFin)) {\r\n\t\t\tsearchRequest.setFin(DefaultValues.FIN_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFin(searchFin);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchModel)) {\r\n\t\t\tsearchRequest.setModel(DefaultValues.MODEL_DEFAULT.getDef());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setModel(searchModel);\r\n\t\t}\r\n\r\n\t\tif (StringUtils.isBlank(searchFuelType)) {\r\n\t\t\tsearchRequest.setFuelType(FuelType.DEFAULT);\r\n\t\t} else {\r\n\t\t\tsearchRequest.setFuelType(FuelType.getEnum(searchFuelType));\r\n\t\t}\r\n\r\n\t\tif (searchMaxCapacity == 0) {\r\n\t\t\tsearchRequest.setMaxCapacity(DefaultValues.MAX_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxCapacity(searchMaxCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinCapacity == 0) {\r\n\t\t\tsearchRequest.setMinCapacity(DefaultValues.MIN_CAPACITY_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinCapacity(searchMinCapacity);\r\n\t\t}\r\n\r\n\t\tif (searchMinYear == 0) {\r\n\t\t\tsearchRequest.setMinYear(DefaultValues.MIN_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinYear(searchMinYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxYear == 0) {\r\n\t\t\tsearchRequest.setMaxYear(DefaultValues.MAX_YEAR_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxYear(searchMaxYear);\r\n\t\t}\r\n\r\n\t\tif (searchMaxPrice == 0) {\r\n\t\t\tsearchRequest.setMaxPrice(DefaultValues.MAX_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMaxPrice(searchMaxPrice);\r\n\t\t}\r\n\r\n\t\tif (searchMinPrice == 0) {\r\n\t\t\tsearchRequest.setMinPrice(DefaultValues.MIN_PRICE_DEFAULT.getDefValue());\r\n\t\t} else {\r\n\t\t\tsearchRequest.setMinPrice(searchMinPrice);\r\n\t\t}\r\n\t\treturn searchRequest;\r\n\t}", "public void registerGeofence(LBAction lbAction, GoogleApiClient gac) {\n if (!(ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED)) {\n Log.d(LOG_TAG, \"No permissions granted\");\n } else {\n LocationServices.GeofencingApi.addGeofences(\n gac,\n getGeofencingRequest(lbAction),\n getGeofencePendingIntent(lbAction)\n ).setResultCallback(this);\n }\n }", "public void registerGeofences(List<LBAction> actions, GoogleApiClient gac){\n for(LBAction act:actions){\n registerGeofence(act, gac);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "public void registerRequest(){\n\t\tfor (Floor x: F)\n\t\t\tif (x.getPassengersWaiting()>0)\tdestRequest[x.getFloorNumber()] = 'Y';\t//Checks for the waiting passengers on each floor and assigns Y or N\n\t\t\telse destRequest[x.getFloorNumber()] = 'N';\t\t\t\t\t\t\t// based on that.\n\t}", "private void generateNotification(int type , Geofence current) {\n\t\t\n\t\tLog.i(\"LOC TRAN \" , \" \" + type + \" \" + current.getRequestId());\n }", "private void getTransactionListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingBatchId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }", "public PlaceReserveInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "protected GeoFenceActivity(Context context) {\n this.mContext = context;\n // Create a GeofenceService instance.\n geofenceService = LocationServices.getGeofenceService(mContext);\n geofenceList = new ArrayList<>();\n // Obtain a PendingIntent object.\n pendingIntent = getPendingIntent();\n TAG = \"geoFence\";\n geoFenceActivated = false;\n }", "private CreateRoomRequest toCreateRoomRequest(OffsetDateTime validFrom, OffsetDateTime validUntil,\n Iterable<RoomParticipant> participants) {\n CreateRoomRequest createRoomRequest = new CreateRoomRequest();\n if (validFrom != null) {\n createRoomRequest.setValidFrom(validFrom);\n }\n\n if (validUntil != null) {\n createRoomRequest.setValidUntil(validUntil);\n }\n\n Map<String, ParticipantProperties> roomParticipants = new HashMap<>();\n\n if (participants != null) {\n roomParticipants = convertRoomParticipantsToMapForAddOrUpdate(participants);\n }\n\n if (participants != null) {\n createRoomRequest.setParticipants(roomParticipants);\n }\n\n return createRoomRequest;\n }", "private void creatRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id)) //R.string.default_web_client_id需要將系統執行一次,讓他產生\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this,gso);\n }", "public String buildGoogleDirectionsRequest(){\n String originName = destinations.get(0).latitude + \",\" + destinations.get(0).longitude;\n String deName = destinations.get(destinations.size()-1).latitude + \",\" + destinations.get(destinations.size()-1).longitude;\n String urlString = \"https://maps.googleapis.com/maps/api/directions/json?origin=\";\n\n //Adds each destination as a waypoint in the request\n for(int i=1; i<destinations.size()-1; i++){\n if(i==1){\n urlString = urlString + originName + \"&destination=\" + deName + \"&waypoints=optimize:true|\";\n }\n String locString;\n locString = destinations.get(i).latitude + \",\" + destinations.get(i).longitude;\n\n if(i == (destinations.size()-2)){\n urlString = urlString + locString;\n }\n else{\n urlString = urlString + locString + \"|\";\n }\n }\n urlString = urlString + \"&key=AIzaSyDgoZ4AG4pxViHeKbAHEChnDrknUNmQIYY\";\n return urlString;\n }", "public SortedSet<WLightpathRequest> getIncomingLigtpathRequests () { return n.getIncomingDemands(getNet().getWdmLayer().getNe()).stream().map(ee->new WLightpathRequest(ee)).collect(Collectors.toCollection(TreeSet::new)); }", "public com.vodafone.global.er.decoupling.binding.request.CheckPromotionsRequest createCheckPromotionsRequest()\n throws javax.xml.bind.JAXBException\n {\n return new com.vodafone.global.er.decoupling.binding.request.impl.CheckPromotionsRequestImpl();\n }", "private void getSettledBatchListRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_SETTLED_BATCH_LIST.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingBatchListOptions(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "public interface IRequestFactory {\n /**\n * Conditions request by location name\n *\n * @param location\n * @param listener\n * @return request object\n */\n IConditionsRequest getConditionsRequest(String location, IRequestListener listener);\n\n /**\n * Conditions request by lat/lon\n *\n * @param lat\n * @param lon\n * @param listener\n * @return request object\n */\n IConditionsRequest getConditionsRequest(double lat, double lon, IRequestListener listener);\n\n /**\n * Location request\n *\n * @param location\n * @param listener\n * @return\n */\n ILocationRequest getLocationRequest(String location, IRequestListener listener);\n}", "@Nonnull\n public CloudPcProvisioningPolicyRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {\n return new com.microsoft.graph.requests.CloudPcProvisioningPolicyRequest(getRequestUrl(), getClient(), requestOptions);\n }", "@Nonnull\n public static UBL23WriterBuilder <ExpressionOfInterestRequestType> expressionOfInterestRequest ()\n {\n return UBL23WriterBuilder.create (ExpressionOfInterestRequestType.class);\n }", "private void setLocationRequest() {\n locationRequest = new LocationRequest();\n locationRequest.setInterval(10000); // how often we ask provider for location\n locationRequest.setFastestInterval(5000); // 'steal' location from other app\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY); // can pick balanced power accuracy\n }", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "public ITermsOfUseContainerRequest buildRequest(final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {\n return new com.microsoft.graph.requests.extensions.TermsOfUseContainerRequest(getRequestUrl(), getClient(), requestOptions);\n }", "public com.google.protobuf.UInt64Value.Builder getInputsWithGeoCountBuilder() {\n \n onChanged();\n return getInputsWithGeoCountFieldBuilder().getBuilder();\n }", "public PredictRequest build() {\n\n\t\t\tcheckArgument(!Strings.isNullOrEmpty(url), \"url is required\");\n\t\t\tcheckArgument(!Strings.isNullOrEmpty(service), \"service name is required\");\n\t\t\tcheckArgument(data != null, \"data is required\");\n\n\t\t\tPredictRequest request = new PredictRequest();\n\t\t\trequest.baseURL = url;\n\t\t\tJsonObject requestData = new JsonObject();\n\t\t\trequestData.addProperty(\"service\", service);\n\n\t\t\tJsonObject paramsObj = new JsonObject();\n\t\t\tif (input != null)\n\t\t\t\tparamsObj.add(\"input\", input);\n\t\t\tif (output != null)\n\t\t\t\tparamsObj.add(\"output\", output);\n\t\t\tif (mllibParams != null)\n\t\t\t\tparamsObj.add(\"mllib\", mllibParams);\n\n\t\t\tif (!paramsObj.isJsonNull()) {\n\t\t\t\trequestData.add(\"parameters\", paramsObj);\n\t\t\t}\n\n\t\t\trequestData.add(\"data\", data);\n\n\t\t\trequest.data = requestData;\n\t\t\treturn request;\n\t\t}", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "@Override\n public void onResume() {\n super.onResume();\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity.isConnectedToNetwork()) {\n setUpMapIfNeeded();\n }\n if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) {\n //starts the mainActivity monitoring geofences\n mainActivity.getGeofenceMonitor().startGeofenceMonitoring();\n isMonitoringGeofences = true;\n }\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n if(needToCallUpdateGeofences) {\n updateGeofences();\n }\n }", "public void createNewLocationRequest(int priority,Long interval,long fastestInterval){\n\t mLocationRequest = LocationRequest.create();\n\t // Use high accuracy\n\t mLocationRequest.setPriority(priority);\n\t // Set the update interval to 5 seconds\n\t mLocationRequest.setInterval(interval);\n\t // Set the fastest update interval to 1 second\n\t mLocationRequest.setFastestInterval(fastestInterval);\n\t \n\t }", "public WorldListRequest(boolean update) {\r\n\t\tthis.update = update;\r\n\t}", "public List<PostalAddress> newServiceProvidingRequest() {\n UserSession session = app.getCurrentSession();\n String email = session.getEmailUser();\n ClientRecords rc = company.getClientRecords();\n cli = rc.getClientByEmail(email);\n List<PostalAddress> led = cli.getPostalAddresses();\n return led;\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case ClientSideUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n // If the request was to add geofences\n if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD == mGeofenceRequestType) {\n\n // Toggle the request flag and send a new request\n mGeofenceRequester.setInProgressFlag(false);\n\n // Restart the process of adding the current geofences\n mGeofenceRequester.addGeofences(mCurrentGeofenceList);\n\n // If the request was to remove geofences\n } else if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.REMOVE == mGeofenceRequestType ){\n\n // Toggle the removal flag and send a new removal request\n mGeofenceRemover.setInProgressFlag(false);\n\n // If the removal was by Intent\n if (ClientSideUtils.GEOFENCE_REMOVE_TYPE.INTENT == mGeofenceRemoveType) {\n\n \t// TODO support this after fixing the remove by intent\n \tLog.d(ClientSideUtils.APPTAG, \"REMOVE_TYPE.INTENT was found - unsupported in this app\");\n //mGeofenceRemover.removeGeofencesByIntent(\n //mGeofenceRequester.getRequestPendingIntent());\n\n } else {\n // Restart the removal of the geofence list\n \tremoveCurrentGeofecesByID(mCurrentGeofenceList);\n }\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.ADD == mActivityRequestType) {\n \t\n // Restart the process of requesting activity recognition updates\n mDetectionRequester.requestUpdates();\n \t\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.REMOVE == mActivityRequestType) {\n \t\n \t// Restart the removal of all activity recognition updates for the PendingIntent\n mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());\n \t\n }\n break;\n\n // If any other result was returned by Google Play services\n default:\n // Report that Google Play services was unable to resolve the problem. \t\n Log.d(ClientSideUtils.APPTAG, getString(R.string.no_resolution));\n }\n default:\n // Report that this Activity received an unknown requestCode\n Log.d(ClientSideUtils.APPTAG, getString(R.string.unknown_activity_request_code, requestCode));\n break;\n }\n }", "public static Builder newBuilder() {\n return new AutoValue_GeoJsonFeature.Builder();\n }", "Request(Request otherRequest) {\n this.reqNum = otherRequest.reqNum;\n this.reqText = otherRequest.reqText;\n this.reqExampleDocs = new ArrayList<ExampleDocument>(otherRequest.reqExampleDocs);\n }", "private BlockLocationRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public OFMeterFeaturesStatsRequest buildMeterFeaturesStatsRequest() {\n\t\t\treturn factory.buildMeterFeaturesStatsRequest().build();\n\t\t}" ]
[ "0.7753537", "0.7643294", "0.75867534", "0.7060811", "0.6343908", "0.6243534", "0.60553217", "0.596039", "0.5736071", "0.5708622", "0.5708609", "0.5656733", "0.565594", "0.56032264", "0.55757076", "0.5556457", "0.5554822", "0.55398625", "0.55380064", "0.55318844", "0.55101615", "0.5500452", "0.544967", "0.54320884", "0.5283111", "0.52650964", "0.5192568", "0.5180068", "0.511298", "0.5096521", "0.5059493", "0.5024408", "0.5008882", "0.5005717", "0.49562386", "0.49290314", "0.49255988", "0.49126294", "0.48908913", "0.4885597", "0.4877095", "0.48585016", "0.48584843", "0.48491734", "0.484304", "0.48363242", "0.48192868", "0.48080093", "0.47983733", "0.47732204", "0.4763723", "0.4739251", "0.47125655", "0.46795955", "0.46411273", "0.46277732", "0.46186674", "0.46018246", "0.4576488", "0.4567252", "0.45313653", "0.45283487", "0.4509763", "0.450946", "0.45062414", "0.44962355", "0.44948462", "0.44876745", "0.4483463", "0.44822362", "0.447253", "0.44720367", "0.44643122", "0.4436146", "0.44324356", "0.44286814", "0.44258896", "0.44200376", "0.44149423", "0.44057438", "0.44035476", "0.43923458", "0.4388123", "0.4384394", "0.43730712", "0.43705535", "0.4362539", "0.43587318", "0.43581688", "0.43568978", "0.43497354", "0.4345338", "0.43411508", "0.43253955", "0.4313741", "0.43118623", "0.43099844", "0.4292273", "0.42911398" ]
0.8271868
1
Gets a PendingIntent to send with the request to add or remove Geofences. Location Services issues the Intent inside this PendingIntent whenever a geofence transition occurs for the current list of geofences.
private PendingIntent getGeofencePendingIntent() { // Reuse the PendingIntent if we already have it. if (mGeofencePendingIntent != null) { return mGeofencePendingIntent; } intent = new Intent(this, GeofenceTransitionsIntentService.class); //Intent intent = new Intent(this, GeofenceTransitionsIntentService.class); // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PendingIntent getGeofencePendingIntent() {\n if (mGeofencePendingIntent != null) {\r\n return mGeofencePendingIntent;\r\n }\r\n Intent intent = new Intent(this, GeofenceBroadcastReceiver.class);\r\n\r\n // addGeofences() and removeGeofences().\r\n mGeofencePendingIntent = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n return mGeofencePendingIntent;\r\n }", "private PendingIntent getGeofencePendingIntent () {\n\n Intent intent = new Intent(this, GeofenceReceiver.class);\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when\n // calling addGeofences() and removeGeofences().\n return PendingIntent.getService(this, 0, intent, PendingIntent.\n FLAG_UPDATE_CURRENT);\n }", "private PendingIntent getGeofencePendingIntent() {\n // Reuse the PendingIntent if we already have it.\n if (mGeofencePendingIntent != null) {\n return mGeofencePendingIntent;\n }\n Intent intent = new Intent(mActivity, GeofenceTransitionsIntentService.class);\n// intent.putExtra(\"leavingstone.geolab.shoppinglist.model\", shoppingList);\n intent.putExtra(ShoppingListModel.SHOPPING_LIST_MODEL_KEY, shoppingList.getId());\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when calling\n // addGeofences() and removeGeofences().\n return PendingIntent.getService(mActivity, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "private PendingIntent getGeofencePendingIntent(LBAction lbAction) {\n // Reuse the PendingIntent if we already have it.\n if (mGeofencePendingIntent != null) {\n return mGeofencePendingIntent;\n }\n Intent intent = new Intent(mContext, GeofenceTransitionsIntentService.class);\n intent.putExtra(Constants.LBACTION_ID_KEY, lbAction.getID());\n\n // We use FLAG_UPDATE_CURRENT so that we get the same pending intent back when\n // calling addGeofences() and removeGeofences().\n return PendingIntent.getService(mContext, 0, intent, PendingIntent.\n FLAG_UPDATE_CURRENT);\n }", "public void addGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n // The GeofenceRequest object.\n getGeofencingRequest(),\n // A pending intent that that is reused when calling removeGeofences(). This\n // pending intent is used to generate an intent when a matched geofence\n // transition is observed.\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private PendingIntent createRequestPendingIntent() {\n\n // If the PendingIntent already exists\n if (null != geofenceRequestIntent) {\n\n // Return the existing intent\n return geofenceRequestIntent;\n\n // If no PendingIntent exists\n } else {\n\n // Create an Intent pointing to the IntentService\n // TODO correct service?\n Intent intent = new Intent(activity, ReceiveTransitionsIntentService.class);\n /*\n * Return a PendingIntent to start the IntentService.\n * Always create a PendingIntent sent to Location Services\n * with FLAG_UPDATE_CURRENT, so that sending the PendingIntent\n * again updates the original. Otherwise, Location Services\n * can't match the PendingIntent to requests made with it.\n */\n return PendingIntent.getService(\n activity,\n 0,\n intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n }\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n \tLog.d(TAG + \".addGeofences()\", \"Starting to add geofence\");\n \t\n /*\n * Save the geofences so that they can be sent to Location Services once the\n * connection is available.\n */\n currentGeofences = (ArrayList<Geofence>) geofences;\n\n Log.d(TAG + \".addGeofences()\", \"Continuing to add geofence\");\n\n // Get a PendingIntent that Location Services issues when a geofence transition occurs\n geofenceRequestIntent = createRequestPendingIntent();\n\n // Send a request to add the current geofences\n locationClient.addGeofences(currentGeofences, geofenceRequestIntent, this);\n \n Log.d(TAG + \".addGeofences()\", \"geofence was added\");\n }", "private PendingIntent getPendingIntent() {\n Intent intent = new Intent(mContext, GeoFenceBroadcastReceiver.class);\n intent.setAction(GeoFenceBroadcastReceiver.ACTION_PROCESS_LOCATION);\n return PendingIntent.getBroadcast(mContext,0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n }", "private PendingIntent getTransitionPendingIntent() {\n Intent intent = new Intent(this, GeofenceIntentService.class);\n return PendingIntent.getService(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n }", "public void addGeofences(List<Geofence> geofences) throws UnsupportedOperationException {\n\n \t//save the geofences\n mGeofenceList = (ArrayList<Geofence>) geofences;\n\n // If a request is not already in progress\n if (!mAddingGeofenceInProgress) {\n\n // Toggle the flag and continue to request a connection to Location Service\n mAddingGeofenceInProgress = true;\n\n // Request a connection to Location Services\n requestConnection();\n\n // If a request is in progress\n } else {\n\n // Throw an exception and stop the request\n throw new UnsupportedOperationException();\n }\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "private GeofencingRequest getAddGeofencingRequest() {\n List<Geofence> geofencesToAdd = new ArrayList<>();\n geofencesToAdd.add(geofenceToAdd);\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_EXIT)\n .addGeofences(geofencesToAdd);\n return builder.build();\n\n }", "private List<Geofence> getTriggeringGeofences(Intent intent) {\n\t\tLog.i(\"LOC NOT\", \"entering triggerin\");\n\t\tnotification();\n\t\treturn null;\n\t}", "public void removeGeofencesButtonHandler() {\n if (!mGoogleApiClient.isConnected()) {\n Toast.makeText(mActivity, getString(R.string.not_connected), Toast.LENGTH_SHORT).show();\n return;\n }\n try {\n // Remove geofences.\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n // This is the same pending intent that was used in addGeofences().\n getGeofencePendingIntent()\n ).setResultCallback(this); // Result processed in onResult().\n } catch (SecurityException securityException) {\n // Catch exception generated if the app does not use ACCESS_FINE_LOCATION permission.\n logSecurityException(securityException);\n }\n }", "private void handleGeofenceTransition(Context context, Intent intent) {\n \tString[] ids = (String[])intent.getExtras().get(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_IDS);\n \tint transitionType = intent.getIntExtra(ClientSideUtils.EXTRA_GEOFENCES_TRANSITION_TYPE, -1);\n \t\n \tboolean hasRootGeofenceTransition = false;\n \tfor (String id : ids){\n \t\tif (id.equals(ClientSideUtils.RootGeofenceId)){\n \t\t\thasRootGeofenceTransition = true;\n \t\t}\n \t}\n \t\n \t// TODO if both root and sons in ids DO SOMETHING\n \t\n \tif (transitionType == Geofence.GEOFENCE_TRANSITION_ENTER) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Entered: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmSonGeofencesList = new ArrayList<Geofence>();\n \t\t\tfor (LotGeofence lotGeofence : mLotsDb.mSonLotGeofencesList){\n \t\t\tmSonGeofencesList.add(lotGeofence.toGeofenceObject());\n \t\t\tmCurrentGeofenceList.add(lotGeofence.toGeofenceObject());\n \t\t\t}\n\t\t \tmGeofenceRequestType = ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD;\n\t\t try{\n\t\t \t\tmGeofenceRequester.addGeofences(mSonGeofencesList);\n\t\t \t} catch(UnsupportedOperationException e){\n\t\t \t\tLog.d(ClientSideUtils.APPTAG, \"In progress on adding geofences again\");\n\t\t \t}\n\t\t if (!MOCKUP_MODE){\n\t\t \tstartActivityRecognition();// <----- Starting Activity Recognition Here\n\t\t }\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\tenteredParkingLot(id);\n \t\t\t}\n \t\t}\n\n \t}else if (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT) {\n \t\tif (hasRootGeofenceTransition){\n \t\t\taddItemToListView(\"Exited: \" + ClientSideUtils.RootGeofenceId);\n \t\t\tmGeofenceRemoveType = ClientSideUtils.GEOFENCE_REMOVE_TYPE.LIST;\n \t\t\tremoveCurrentGeofecesByID(mSonGeofencesList);\n \t\t\t\n \t\t\tmCurrentGeofenceList = new ArrayList<Geofence>();\n \t\t\tmCurrentGeofenceList.add(mLotsDb.mRootLotGeofence.toGeofenceObject());\n \t\t\t\n \t\t\tstopActivityRecognition(); // <----- Stopping Activity Recognition Here\n \t\t}else{\n \t\t\tfor (String id : ids){\n \t\t\t\texitedParkingLot(id);\n \t\t\t}\n \t\t}\n \t}else{\n \t\tLog.e(ClientSideUtils.APPTAG, \"Entered Geofence action handling, the type was not ENTERED nor EXITED\");\n \t}\n }", "@Override\n public void onAddGeofencesResult(int statusCode, String[] geofenceRequestIds) {\n\n // Create a broadcast Intent that notifies other components of success or failure\n Intent broadcastIntent = new Intent();\n\n // Temp storage for messages\n String msg;\n\n // If adding the geocodes was successful\n if (LocationStatusCodes.SUCCESS == statusCode) {\n // Create a message containing all the geofence IDs added.\n msg = activity.getString(R.string.add_geofences_result_success, Arrays.toString(geofenceRequestIds));\n\n // In debug mode, log the result\n Log.d(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCES_ADDED)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n // If adding the geofences failed\n } else {\n\n /*\n * Create a message containing the error code and the list\n * of geofence IDs you tried to add\n */\n msg = activity.getString(R.string.add_geofences_result_failure, statusCode, \n \t\tArrays.toString(geofenceRequestIds));\n\n // Log an error\n Log.e(TAG + \".onAddGeofencesResult()\", msg);\n\n // Create an Intent to broadcast to the app\n broadcastIntent.setAction(LocationUtils.ACTION_GEOFENCE_ERROR)\n .addCategory(LocationUtils.CATEGORY_LOCATION_SERVICES)\n .putExtra(LocationUtils.EXTRA_GEOFENCE_STATUS, msg);\n }\n\n // Broadcast whichever result occurred\n LocalBroadcastManager.getInstance(activity).sendBroadcast(broadcastIntent);\n }", "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean removeMarker = true;\n for(int j =0; j<currentGeofences.size(); j++){\n if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){\n removeMarker = false;\n }\n }\n if(removeMarker){\n currentGeofenceMarkers.get(i).remove();\n currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle()));\n currentGeofenceMarkers.remove(i);\n }\n }\n\n this.currentGeofences = currentGeofences;\n if(mainActivity != null && currentGeofences != null) {\n if (mainActivity.isConnectedToNetwork()) {\n ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1);\n for(int i = 0; i<currentGeofences.size(); i++){\n if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){\n singleGeofence.clear();\n singleGeofence.add(currentGeofences.get(i));\n geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0);\n Log.i(logMessages.VOLLEY, \"handleGeofenceChange : about to query database : \" + singleGeofence.toString());\n volleyRequester.request(this, singleGeofence);\n }\n\n }\n }\n\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case ClientSideUtils.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n // If the request was to add geofences\n if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.ADD == mGeofenceRequestType) {\n\n // Toggle the request flag and send a new request\n mGeofenceRequester.setInProgressFlag(false);\n\n // Restart the process of adding the current geofences\n mGeofenceRequester.addGeofences(mCurrentGeofenceList);\n\n // If the request was to remove geofences\n } else if (ClientSideUtils.GEOFENCE_REQUEST_TYPE.REMOVE == mGeofenceRequestType ){\n\n // Toggle the removal flag and send a new removal request\n mGeofenceRemover.setInProgressFlag(false);\n\n // If the removal was by Intent\n if (ClientSideUtils.GEOFENCE_REMOVE_TYPE.INTENT == mGeofenceRemoveType) {\n\n \t// TODO support this after fixing the remove by intent\n \tLog.d(ClientSideUtils.APPTAG, \"REMOVE_TYPE.INTENT was found - unsupported in this app\");\n //mGeofenceRemover.removeGeofencesByIntent(\n //mGeofenceRequester.getRequestPendingIntent());\n\n } else {\n // Restart the removal of the geofence list\n \tremoveCurrentGeofecesByID(mCurrentGeofenceList);\n }\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.ADD == mActivityRequestType) {\n \t\n // Restart the process of requesting activity recognition updates\n mDetectionRequester.requestUpdates();\n \t\n } else if (ClientSideUtils.ACTIVITY_REQUEST_TYPE.REMOVE == mActivityRequestType) {\n \t\n \t// Restart the removal of all activity recognition updates for the PendingIntent\n mDetectionRemover.removeUpdates(mDetectionRequester.getRequestPendingIntent());\n \t\n }\n break;\n\n // If any other result was returned by Google Play services\n default:\n // Report that Google Play services was unable to resolve the problem. \t\n Log.d(ClientSideUtils.APPTAG, getString(R.string.no_resolution));\n }\n default:\n // Report that this Activity received an unknown requestCode\n Log.d(ClientSideUtils.APPTAG, getString(R.string.unknown_activity_request_code, requestCode));\n break;\n }\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n }", "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n\n // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a\n // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device\n // is already inside that geofence.\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);\n\n // Add the geofences to be monitored by geofencing service.\n builder.addGeofences(mGeofenceList);\n\n // Return a GeofencingRequest.\n return builder.build();\n }", "private GeofencingRequest getGeofencingRequest() {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n\n // The INITIAL_TRIGGER_ENTER flag indicates that geofencing service should trigger a\n // GEOFENCE_TRANSITION_ENTER notification when the geofence is added and if the device\n // is already inside that geofence.\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);\n\n // Add the geofences to be monitored by geofencing service.\n builder.addGeofences(mGeofenceList);\n\n // Return a GeofencingRequest.\n return builder.build();\n }", "private void handleGeofenceStatus(Context context, Intent intent) {\n\n }", "public void registerGeofence(LBAction lbAction) {\n if (!(ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED)) {\n Log.d(LOG_TAG, \"No permissions granted\");\n } else {\n LocationServices.GeofencingApi.addGeofences(\n mGoogleApiClient,\n getGeofencingRequest(lbAction),\n getGeofencePendingIntent(lbAction)\n ).setResultCallback(this);\n }\n }", "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n for (int i = 0; i < geofences.length; i++) {\n carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence =\n geofences[i].getGeofence();\n CircleOptions circleOptions = new CircleOptions();\n GeofenceObjectLocation location =\n geofence.getLocation();\n double lat = location.getLat();\n double lon = location.getLng();\n circleOptions.center(new LatLng(lat, lon));\n circleOptions.radius(geofence.getRadius());\n circleOptions.strokeColor(R.color.colorPrimary);\n circleOptions.strokeWidth(5);\n mMap.addCircle(circleOptions);\n }\n }\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n // Check the action code and determine what to do\n String action = intent.getAction();\n\n // Intent contains information about errors in adding or removing geofences\n if (TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCE_ERROR)) {\n\n handleGeofenceError(context, intent);\n\n // Intent contains information about successful addition or removal of geofences\n } else if (\n TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCES_ADDED)\n ||\n TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCES_REMOVED)) {\n\n handleGeofenceStatus(context, intent);\n\n // Intent contains information about a geofence transition\n } else if (TextUtils.equals(action, GeofenceUtils.ACTION_GEOFENCE_TRANSITION)) {\n\n handleGeofenceTransition(context, intent);\n\n // The Intent contained an invalid action\n } else {\n Log.e(GeofenceUtils.APPTAG, getString(R.string.invalid_action_detail, action));\n Toast.makeText(context, R.string.invalid_action, Toast.LENGTH_LONG).show();\n }\n }", "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "private Geofence createGeofence(LatLng latLng) {\n Log.d(TAG, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion(latLng.latitude, latLng.longitude, AppointmentActivity.GEOFENCE_RADIUS)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n // Check the action code and determine what to do\n String action = intent.getAction();\n\n // Intent contains information about errors in adding or removing geofences\n if (TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCE_ERROR)) {\n\n handleGeofenceError(context, intent);\n\n } else if (TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCES_ADDED) || TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCES_REMOVED)) {\n\n handleGeofenceStatus(context, intent);\n\n } else if (TextUtils.equals(action, ClientSideUtils.ACTION_GEOFENCES_TRANSITION)) {\n\n \thandleGeofenceTransition(context, intent);\n \t\n } else if (TextUtils.equals(action, ClientSideUtils.ACTION_REFRESH_STATUS_LIST)) {\n\n \thandleActivityStatus(context, intent);\n \t \t\n } else {\n \t\n Log.e(ClientSideUtils.APPTAG, getString(R.string.invalid_action_detail, action));\n Toast.makeText(context, R.string.invalid_action, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n protected void onHandleIntent(Intent intent) {\n GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);\n if (geofencingEvent.hasError()) {\n Log.d(TAG, \"geofencing event error.\");\n return;\n }\n\n // Get the transition type.\n int geofenceTransition = geofencingEvent.getGeofenceTransition();\n\n // Test that the reported transition was of interest.\n if (geofenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER) {\n\n // Get the geofences that were triggered. A single event can trigger\n // multiple geofences.\n List<Geofence> triggeringGeofences = geofencingEvent.getTriggeringGeofences();\n new GeofencingManager(this).HandleTriggeringGeofences(triggeringGeofences);\n }\n }", "public void registerGeofence(LBAction lbAction, GoogleApiClient gac) {\n if (!(ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(mContext, android.Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED)) {\n Log.d(LOG_TAG, \"No permissions granted\");\n } else {\n LocationServices.GeofencingApi.addGeofences(\n gac,\n getGeofencingRequest(lbAction),\n getGeofencePendingIntent(lbAction)\n ).setResultCallback(this);\n }\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n\n\n T.t(TripMapsActivity.this, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){\n System.gc();\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){\n if(!currentGeofencesInfoMap.containsKey(e.getKey())) {\n currentGeofencesInfoMap.put(e.getKey(), e.getValue());\n geofenceNamesBeingQueriedForInfo.remove(e.getKey());\n String curGeofenceName = e.getKey();\n GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName);\n Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker);\n LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng());\n BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon);\n MarkerOptions geofenceMarkerOptions = new MarkerOptions()\n .position(position)\n .title(curGeofenceName)\n .icon(icon);\n Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions);\n currentGeofenceMarkers.add(curGeofenceMarker);\n }\n }\n }", "public void registerGeofences(List<LBAction> actions){\n for(LBAction act:actions){\n registerGeofence(act);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "@Override\n protected void onHandleIntent(@Nullable Intent intent) {\n GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);\n\n // Handling errors\n if (geofencingEvent != null && geofencingEvent.hasError()) {\n String errorMsg = getErrorString(geofencingEvent.getErrorCode());\n Log.e(TAG, errorMsg);\n return;\n }\n // Retrieve GeofenceTransition\n if (geofencingEvent != null) {\n int geoFenceTransition = geofencingEvent.getGeofenceTransition();\n\n switch (geoFenceTransition) {\n case Geofence.GEOFENCE_TRANSITION_ENTER:\n break;\n case Geofence.GEOFENCE_TRANSITION_EXIT:\n // Get the geofence that were triggered\n List<Geofence> triggeringGeofences = geofencingEvent.getTriggeringGeofences();\n\n String geofenceTransitionDetails = getGeofenceTrasitionDetails(geoFenceTransition, triggeringGeofences);\n Intent lbcIntent = new Intent(Constants.BroadCastReceiver.sBroadCastName); //Send to any reciever listening for this\n LocalBroadcastManager.getInstance(this).sendBroadcast(lbcIntent);\n break;\n }\n\n }\n }", "private void beginAddGeofences(ArrayList<String> geoIds) {\n mCurrentGeofences = new ArrayList<>();\n if(geoIds.size() > 0) {\n for(String id : geoIds) {\n mCurrentGeofences.add(mGeofenceStorage.getGeofence(id).toGeofence());\n }\n\n if (!servicesConnected()) {\n return;\n }\n\n if (!mInProgress) {\n mInProgress = true;\n mGoogleApiClient.connect();\n }\n else { //retry\n mInProgress = false;\n beginAddGeofences(geoIds);\n }\n }\n }", "private List<String> getGeofenceTransitionDetails(List<Geofence> triggeringGeofences) {\n List<String> geofenceRequestIds = new ArrayList<>();\n // Return the request ids of the triggered geofences\n for (Geofence geofence : triggeringGeofences) {\n geofenceRequestIds.add(geofence.getRequestId());\n }\n return geofenceRequestIds;\n }", "public void updateGeofences() {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(view != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : view is not null \");\n\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : updateGeofences : about to get new geofences \");\n boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }\n\n if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) {\n gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences();\n if (!gotGeofences) {\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n }else{\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n }\n } else {\n if (txtRequestGeofences != null) {\n txtRequestGeofences.setVisibility(View.GONE);\n btnRequestGeofences.setVisibility(View.GONE);\n }\n }\n }\n }", "private GeofencingRequest createGeofenceRequest(Geofence geofence) {\n Log.d(TAG, \"createGeofenceRequest\");\n return new GeofencingRequest.Builder()\n .setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER)\n .addGeofence(geofence)\n .build();\n }", "private void addPendingLocationRequest(LocationRequest locationRequest, LocationActivityResultListener listener) {\n mPendingLocationRequests.add(listener);\n\n // If it's the first pending request, let's ask the user to turn on high accuracy location.\n if (mPendingLocationRequests.size() == 1) {\n resolveUserSettingsForRequest(locationRequest);\n }\n }", "public void registerGeofences(List<LBAction> actions, GoogleApiClient gac){\n for(LBAction act:actions){\n registerGeofence(act, gac);\n }\n\n Log.d(LOG_TAG, \"GeofenceHelper - registered geofences: \" + actions.size());\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent intent) {\n switch (requestCode) {\n case Constants.CONNECTION_FAILURE_RESOLUTION_REQUEST :\n switch (resultCode) {\n // If Google Play services resolved the problem\n case Activity.RESULT_OK:\n mInProgress = false;\n beginAddGeofences(mGeoIds);\n break;\n }\n }\n }", "@Override\n public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity == null){\n return;\n }\n try {\n Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences);\n TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : handleNewGeofences\");\n if (mainActivity != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : mainActivity not null\");\n if (geofencesContent != null) {\n Log.i(logMessages.GEOFENCE_MONITORING, \"HistoryFragment : geofencesContent not null\");\n btnRequestGeofences.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent);\n drawGeofences(geofencesContent);\n } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){\n btnRequestGeofences.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n }\n }\n }catch (IllegalStateException e){\n e.printStackTrace();\n }\n }", "protected GeoFenceActivity(Context context) {\n this.mContext = context;\n // Create a GeofenceService instance.\n geofenceService = LocationServices.getGeofenceService(mContext);\n geofenceList = new ArrayList<>();\n // Obtain a PendingIntent object.\n pendingIntent = getPendingIntent();\n TAG = \"geoFence\";\n geoFenceActivated = false;\n }", "@Override\n\tprotected void onHandleIntent(Intent intent) {\n\t\tif (LocationClient.hasError(intent)) {\n\t\t\t// Get the error code with a static method\n\t\t\tint errorCode = LocationClient.getErrorCode(intent);\n\t\t\t// Log the error\n\t\t\tLog.e(\"ReceiveTransitionsIntentService\",\n\t\t\t\t\t\"Location Services error: \" + Integer.toString(errorCode));\n\t\t\t\n\t\t\tLog.i(\"LOC NOT\", \"Got an error\");\n\t\t\t/*\n\t\t\t * You can also send the error code to an Activity or Fragment with\n\t\t\t * a broadcast Intent\n\t\t\t */\n\t\t\t/*\n\t\t\t * If there's no error, get the transition type and the IDs of the\n\t\t\t * geofence or geofences that triggered the transition\n\t\t\t */\n\t\t} else {\n\t\t\t// Get the type of transition (entry or exit)\n\t\t\n\t\t\t\n\t\t\tint transitionType = LocationClient.getGeofenceTransition(intent);\n\t\t\t\n\t\t\t\n\t\t\t// Test that a valid transition was reported\n\t\t\tif ((transitionType == Geofence.GEOFENCE_TRANSITION_ENTER)\n\t\t\t\t\t|| (transitionType == Geofence.GEOFENCE_TRANSITION_EXIT)) {\n\t\t\t\t\n\t\t\t\tList<Geofence> triggerList = LocationClient.getTriggeringGeofences(intent);\n\t\t\t\tGeofence current = triggerList.get(0);\n\t\t\t\tString[] triggerIds = new String[triggerList.size()];\n\n\t\t\t\tfor (int i = 0; i < triggerIds.length; i++) {\n\t\t\t\t\t// Store the Id of each geofence\n\t\t\t\t\ttriggerIds[i] = triggerList.get(i).getRequestId();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tgenerateNotification(transitionType, current);\n\t\t\t\t//notification();\n\t\t\t\tnewNotification(current);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * At this point, you can store the IDs for further use display\n\t\t\t\t * them, or display the details associated with them.\n\t\t\t\t */\n\t\t\t}\n\t\t\t// An invalid transition was reported\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tLog.i(\"LOC NOT\", \"not a valid transition\");\n\t\t\t\t\n\t\t\t\tLog.e(\"ReceiveTransitionsIntentService\",\n\t\t\t\t\t\t\"Geofence transition error: \");\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n\n\n Bundle bundle = intent.getExtras();\n Location nLocation = (Location) bundle.get(\"New location\");\n LatLng there = new LatLng(nLocation.getLatitude(), nLocation.getLongitude());\n mMap.addPolyline(new PolylineOptions().add(there).color(0));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(there));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(there.latitude, there.longitude), 12.0f));\n\n Log.v(TAG, \"RECEIVED A NEW LOCATION\");\n\n }", "public void onClick(View v) {\n if (destinationMarker != null) {\n\n if (startingpoint == 1) {\n nextStep = true;\n disableButton(1);\n\n showCustomDialog(getResources().getString(R.string.alert_title_create_geofence), getResources().getString(R.string.alert_msg_create_geofence));\n buttonConfirm.setText(getResources().getString(R.string.button_confirm_geofence));\n\n }\n\n // If a geofence markers minimal 3 exists (minimal bikin triangle):\n if (markers.size() >= 3) {\n\n if(pointInPolygon(locationMarker.getPosition(), polygon) && pointInPolygon(destinationMarker.getPosition(), polygon)){\n\n // Try Catch for Uploading geofence data, destination point, and notification data to Firebase\n try {\n\n geofenceReference = FirebaseDatabase.getInstance().getReference().child(\"trackingSession/\" + id);\n\n geofenceReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (!dataSnapshot.hasChild(\"geofence\") && !isSent) {\n isSent = true;\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(AppointmentActivity.this);\n alertDialogBuilder.setMessage(getResources().getString(R.string.alert_title_save_quick_route));\n alertDialogBuilder.setPositiveButton(getResources().getString(R.string.button_yes),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n saveQuickRoute = true;\n sendtoFirebase(saveQuickRoute);\n\n Intent intent = new Intent(AppointmentActivity.this, TrackingActivity.class);\n intent.putExtra(EXTRA_MESSAGE_ID, id);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Set the new task and clear flags\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }\n });\n\n alertDialogBuilder.setNegativeButton(getResources().getString(R.string.button_no),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n saveQuickRoute = false;\n sendtoFirebase(saveQuickRoute);\n\n Intent intent = new Intent(AppointmentActivity.this, TrackingActivity.class);\n intent.putExtra(EXTRA_MESSAGE_ID, id);\n intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // Set the new task and clear flags\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n }\n });\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.setCancelable(false);\n alertDialog.show();\n\n } else if (!isSent) {\n Alerter.create(AppointmentActivity.this).setTitle(getResources().getString(R.string.alert_title_geofence)).setText(getResources().getString(R.string.alert_msg_geofence)).setBackgroundColorRes(R.color.colorAccent).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n\n } catch (Exception e) {\n Alerter.create(AppointmentActivity.this).setTitle(getResources().getString(R.string.alert_title_failed_set_object)).setText(getResources().getString(R.string.alert_msg_failed_set_object)).setBackgroundColorRes(R.color.colorAccent).show();\n }\n } else {\n Alerter.create(AppointmentActivity.this).setTitle(getResources().getString(R.string.alert_title_outside_geofence)).setText(getResources().getString(R.string.alert_msg_outside_geofence)).setBackgroundColorRes(R.color.colorAccent).show();\n }\n }\n }\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "private GeofencingRequest getGeofencingRequest(LBAction lbAction) {\n GeofencingRequest.Builder builder = new GeofencingRequest.Builder();\n builder.setInitialTrigger(GeofencingRequest.INITIAL_TRIGGER_ENTER);// change upon params\n builder.addGeofence(createGeofenceForAction(lbAction));\n return builder.build();\n }", "private void geofenceTriggeredMessageToMaps(List<String> geofenceEnterTransitionDetails, int geofenceTransition) {\n // Send the geofence trigger message to the GMaps fragment\n for (String id : geofenceEnterTransitionDetails) {\n Intent intent;\n // Check if the other user is now local (enter or dwell triggers) or no longer local (exit trigger)\n if(geofenceTransition == Geofence.GEOFENCE_TRANSITION_ENTER ||\n geofenceTransition == Geofence.GEOFENCE_TRANSITION_DWELL) {\n // Send details to GMapFragment to display local user\n intent = new Intent(getString(R.string.geofence_enter_trigger));\n }\n else {\n // Send details to GMapFragment to remove user\n intent = new Intent(getString(R.string.geofence_exit_trigger));\n }\n intent.putExtra(Constants.geofenceUserId, id);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }\n }", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "private void populateGeofences(List<GeofenceDomainModel> geofenceDomainModels) {\n for (int i = 0; i < geofenceDomainModels.size(); i++) {\n Double latitude = geofenceDomainModels.get(i).getLatitude();\n Double longitude = geofenceDomainModels.get(i).getLongitude();\n Float radius = geofenceDomainModels.get(i).getRadius();\n\n geofences.add(new Geofence.Builder()\n .setRequestId(Integer.toString(i))\n .setCircularRegion(\n latitude,\n longitude,\n radius\n )\n .setLoiteringDelay(1000)\n .setExpirationDuration(1000000000)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER | Geofence.GEOFENCE_TRANSITION_EXIT | Geofence.GEOFENCE_TRANSITION_DWELL)\n .build());\n\n }\n }", "@Override\n public void onResume() {\n super.onResume();\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity.isConnectedToNetwork()) {\n setUpMapIfNeeded();\n }\n if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) {\n //starts the mainActivity monitoring geofences\n mainActivity.getGeofenceMonitor().startGeofenceMonitoring();\n isMonitoringGeofences = true;\n }\n mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled());\n if(needToCallUpdateGeofences) {\n updateGeofences();\n }\n }", "public void startTrackingGeoPushes()\n\t{\n\t\tmContext.startService(new Intent(mContext, GeoLocationService.class));\n\t}", "public void sendGeofenceNotification(String message){\n if (!allowNotification) {\n Log.d(TAG, \"sendGeofenceNotification notification off\");\n return;\n }\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel notificationChannel;\n\n Intent intent = new Intent(getActivity().getApplicationContext(), HomeFragment.class);\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n PendingIntent resultPendingIntent = PendingIntent.getActivity(getActivity().getApplicationContext(),\n 0 /* Request code */, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(getActivity().getApplicationContext(), NOTIFICATION_CHANNEL_ID)\n .setSmallIcon(R.drawable.ic_notifications_black_24dp)\n .setContentTitle(\"Geofence NOTIFICATION\")\n .setContentText(message)\n .setPriority(NotificationCompat.PRIORITY_DEFAULT)\n .setContentIntent(resultPendingIntent)\n .setAutoCancel(true);\n\n if (useCustomizeSound){\n builder.setSound(sound);\n }\n\n if (useCustomizeSound){\n notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID_CUSTOMIZED_SOUND, \"NOTIFICATION_CHANNEL_CUSTOMIZED_SOUND_NAME\", importance);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});\n\n // Set Channel Sound\n AudioAttributes audioAttributes = new AudioAttributes.Builder()\n .setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)\n .setUsage(AudioAttributes.USAGE_NOTIFICATION)\n .build();\n notificationChannel.setSound(sound, audioAttributes);\n\n Log.d(TAG, \"sendGeofenceNotification(): using customized sound\");\n builder.setChannelId(NOTIFICATION_CHANNEL_ID_CUSTOMIZED_SOUND);\n } else{\n notificationChannel = new NotificationChannel(NOTIFICATION_CHANNEL_ID, \"NOTIFICATION_CHANNEL_NAME\", importance);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setVibrationPattern(new long[]{100, 200, 300, 400, 500, 400, 300, 200, 400});\n builder.setChannelId(NOTIFICATION_CHANNEL_ID);\n }\n NotificationManager notificationManager = getActivity().getApplicationContext().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(notificationChannel);\n\n // NotificationManagerCompat notificationManager = NotificationManagerCompat.from(getContext());\n // notificationId is a unique int for each notification that you must define\n notificationManager.notify(42, builder.build());\n }", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "private void handleGeofenceTransition(Context context, Intent intent) {\n /*\n * If you want to change the UI when a transition occurs, put the code\n * here. The current design of the app uses a notification to inform the\n * user that a transition has occurred.\n */\n }", "@Override\n\n public void onCreate() {\n\n\n Intent notificationIntent = new Intent(this, MainActivity.class);\n\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\n contentIntent = PendingIntent.getActivity(\n\n this, 0, notificationIntent, 0);//gets this activity with permissions and code\n\n\n updateNotification(false);\n\n\n mLocationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n //handle the return handle to a system level service\n\n mLocationManager.addGpsStatusListener(this);\n //after handling the system level service then get the gps status\n\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 500, 0, this);\n //request location with specific criteria equals to zero, and the provider and this intent\n //and min time\n\n }", "private Geofence createGeofence( LatLng latLng, float radius )\n {\n T.t(TripMapsActivity.this, \"createGeofence\");\n return new Geofence.Builder()\n .setRequestId(GEOFENCE_REQ_ID)\n .setCircularRegion( latLng.latitude, latLng.longitude, radius)\n .setExpirationDuration(GEO_DURATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build();\n }", "@Override\n public void onConnected(Bundle bundle) {\n if (Utility.isLocationPermissionRequired(getApplicationContext())) {\n setIsTracking(false);\n stopSelf();\n return;\n }\n\n LocationRequest request = Utility.createNewLocationRequest();\n\n Intent intent = new Intent(this, TrackerReceiver.class);\n mTrackerIntent = PendingIntent.getBroadcast(\n getApplicationContext(), REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT\n );\n ActivityRecognition.ActivityRecognitionApi.requestActivityUpdates(\n mGoogleApiClient, 60000, mTrackerIntent\n );\n LocationServices.FusedLocationApi.requestLocationUpdates(\n mGoogleApiClient, request, mTrackerIntent\n );\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n ArrayList<LatLng> cluster = (ArrayList<LatLng>)intent.getSerializableExtra(\"cluster\");\n Log.i(\"cluster\", \"Got cluster: \" + cluster.size());\n for(LatLng center : cluster) {\n drawGeofence(center);\n }\n }", "private void startGeofence(int indexPos)\n {\n\n globalIndex = indexPos;\n // Log.e(\"globalIndex\",\"\"+globalIndex);\n T.t(TripMapsActivity.this, \"startGeofence\");\n\n if( GEO_FENCE_MARKER[indexPos] != null )\n {\n Geofence geofence = createGeofence( GEO_FENCE_MARKER[indexPos].getPosition(), GEOFENCE_RADIUS );\n GeofencingRequest geofenceRequest = createGeofenceRequest( geofence );\n addGeofence(geofenceRequest);\n }\n else\n {\n\n T.t(TripMapsActivity.this, \"Geofence marker is null\");\n\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n String myUrl = \"https://a.mapillary.com/v3/map_features?layers=trafficsigns\" +\n \"&radius=600\" +\n \"&client_id=YUNMM3lQRXRUR1Y0MDBwcEVLaFJsUTo2ZWFjY2Y0YWJhM2JmYmM5\" +\n \"&per_page=\" + numberOfResults +\n \"&closeto=\" + location.getLongitude() + \",\" + location.getLatitude();\n //String to place our result in\n String result = null;\n //Instantiate new instance of our class\n HttpGetRequest getRequest = new HttpGetRequest();\n //Perform the doInBackground method, passing in our url\n try {\n result = getRequest.execute(myUrl).get();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n }\n try {\n JSONObject jObject = new JSONObject(result);\n JSONArray features = jObject.getJSONArray(\"features\");\n for (int i=0; i < numberOfResults; i++){\n try {\n JSONObject featuresObject = features.getJSONObject(i);\n // Pulling items from the array\n JSONObject properties = featuresObject.getJSONObject(\"properties\");\n nearbyRoadSigns[i] = properties.getString(\"value\");\n\n System.out.println(nearbyRoadSigns[i]);\n\n } catch (JSONException e) {\n // Oops\n }\n }\n locationManager.removeUpdates(this);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void generateNotification(int type , Geofence current) {\n\t\t\n\t\tLog.i(\"LOC TRAN \" , \" \" + type + \" \" + current.getRequestId());\n }", "public static void mapRestaurant(Context context,String locationName){\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + Uri.encode(locationName));\n //Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\"+\"40.782747,-73.984022(Eric)\");\n // Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=-33.8666,151.1957(Google+Sydney)\");\n\n// Create an Intent from gmmIntentUri. Set the action to ACTION_VIEW\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n// Make the Intent explicit by setting the Google Maps package\n// Intent intent = mapIntent.setPackage(\"com.google.android.apps.maps\");\n//\n// if (intent==null){\n// if (AppConstant.DEBUG) Log.d(this.getClass().getSimpleName()+\">\",);\n// }\n// Attempt to start an activity that can handle the Intent\n // if (mapIntent.resolveActivity(getPackageManager()) != null) {\n\n PackageManager packageManager = context.getPackageManager();\n List activities = packageManager.queryIntentActivities(mapIntent,\n PackageManager.MATCH_DEFAULT_ONLY);\n boolean isIntentSafe = activities.size() > 0;\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.get(0).toString());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.size());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Can we handle this intent:\"+isIntentSafe);\n\n\n context.startActivity(mapIntent);\n // }\n }", "private void startLocationUpdates() {\r\n // Begin by checking if the device has the necessary location settings.\r\n mSettingsClient.checkLocationSettings(mLocationSettingsRequest)\r\n .addOnSuccessListener(this, new OnSuccessListener<LocationSettingsResponse>() {\r\n @Override\r\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\r\n Log.i(TAG, \"All location settings are satisfied.\");\r\n\r\n if(checkPermissions()){\r\n // Launch background service - Monitor location\r\n Log.i(TAG, \"trying to start location service..\");\r\n startService(new Intent(MainActivity.this, LocationService.class));\r\n\r\n // Launch background service - Geofence\r\n if(localUser.isGeofenceEnabled()){\r\n Log.i(TAG, \"trying to start geofence service..\");\r\n startService(new Intent(MainActivity.this, GeofenceService.class));\r\n }\r\n } else{\r\n requestPermissions();\r\n }\r\n\r\n\r\n\r\n }\r\n })\r\n .addOnFailureListener(this, new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n int statusCode = ((ApiException) e).getStatusCode();\r\n switch (statusCode) {\r\n case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:\r\n Log.i(TAG, \"Location settings are not satisfied. Attempting to upgrade \" +\r\n \"location settings \");\r\n try {\r\n // Show the dialog by calling startResolutionForResult(), and check the\r\n // result in onActivityResult().\r\n ResolvableApiException rae = (ResolvableApiException) e;\r\n rae.startResolutionForResult(MainActivity.this, REQUEST_CHECK_SETTINGS);\r\n } catch (IntentSender.SendIntentException sie) {\r\n Log.i(TAG, \"PendingIntent unable to execute request.\");\r\n }\r\n break;\r\n case LocationSettingsStatusCodes.SETTINGS_CHANGE_UNAVAILABLE:\r\n String errorMessage = \"Location settings are inadequate, and cannot be \" +\r\n \"fixed here. Fix in Settings.\";\r\n Log.e(TAG, errorMessage);\r\n Toast.makeText(MainActivity.this, errorMessage, Toast.LENGTH_LONG).show();\r\n mRequestingLocationUpdates = false;\r\n }\r\n\r\n }\r\n });\r\n }", "public void getDirections() {\n if (curLocation == null) {\n Toast.makeText(getApplicationContext(), \"Retrieving location - Try Again\", Toast.LENGTH_LONG).show();\n return;\n }\n String url = \"https://maps.googleapis.com/maps/api/directions/json?\" +\n \"origin=\" + curLocation.latitude + \",\" + curLocation.longitude +\n \"&destination=\" + dest.latitude + \",\" + dest.longitude +\n \"&mode=walking\" +\n \"&key=\" + getString(R.string.google_maps_key);\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n //callback for string request\n @Override\n public void onResponse(String response) {\n try {\n JSONObject data = new JSONObject(response);\n String encodedPolyline = data.getJSONArray(\"routes\").getJSONObject(0).\n getJSONObject(\"overview_polyline\").getString(\"points\");\n List<LatLng> points = PolyUtil.decode(encodedPolyline);\n if (curPoly != null) {\n curPoly.remove();\n }\n curPoly = mMap.addPolyline(new PolylineOptions().addAll(points));\n curPoly.setColor(getColor(R.color.colorAccent));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(), \"Error retrieving directions\", Toast.LENGTH_LONG).show();\n }\n });\n requestQueue.add(request);\n }", "void requestLocClick() {\n isRequest = true;\n mHasLocationData = false;\n if (mLocationClient != null && mLocationClient.isStarted()) {\n mLocationClient.requestLocation();\n Toast.makeText(getActivity(), \"Locating...\", Toast.LENGTH_SHORT).show();\n } else {\n Log.d(TAG, \"Location Client is not started...\");\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "public void onMapSearch(View view) {\n\n EditText locationSearch = (EditText) findViewById(R.id.arrival);\n String location = locationSearch.getText().toString();\n List<Address>addressList = null;\n\n if (location != null || !location.equals(\"\")) {\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n\n } catch (IOException e) {\n Toast.makeText(this,\"Destination not found\",Toast.LENGTH_SHORT).show();\n\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n MarkerPoints.add(latLng);\n Toast.makeText(MapsActivity.this,\"added position 2 \"+MarkerPoints.size(),Toast.LENGTH_SHORT).show();\n\n mMap.addMarker(new MarkerOptions().position(latLng).draggable(true).title(location+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\").icon(BitmapDescriptorFactory.fromResource(R.drawable.flag)));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16));\n //listClients.add(new Client(R.drawable.flag,\"Nasser\",\"client2 requesting cab\",100,address.getLatitude(), address.getLongitude()));\n //Toast.makeText(MapsActivity.this,\"client attended at \"+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\",Toast.LENGTH_SHORT).show();\n\n\n\n /* if (MarkerPoints.size() > 2) {\n // MarkerPoints.clear();\n mMap.clear();\n }*/\n\n\n // Checks, whether start and end locations are captured\n if (MarkerPoints.size() >= 2) {\n LatLng origin = MarkerPoints.get(0);\n LatLng dest = MarkerPoints.get(MarkerPoints.size()-1);\n\n // Getting URL to the Google Directions API\n String url = getUrl(origin, dest);\n Log.d(\"onMapClick\", url.toString());\n FetchUrl FetchUrl = new FetchUrl();\n\n // Start downloading json data from Google Directions API\n FetchUrl.execute(url);\n //move map camera\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(origin));\n //mMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n\n build_retrofit_and_get_response(\"driving\");\n\n final View mapView = getSupportFragmentManager().findFragmentById(R.id.map).getView();\n if (mapView.getViewTreeObserver().isAlive()) {\n mapView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @SuppressLint(\"NewApi\")\n @Override\n public void onGlobalLayout() {\n LatLngBounds.Builder bld = new LatLngBounds.Builder();\n for (int i = 0; i < MarkerPoints.size(); i++) {\n LatLng ll = new LatLng(MarkerPoints.get(i).latitude, MarkerPoints.get(i).longitude);\n bld.include(ll);\n }\n LatLngBounds bounds = bld.build();\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 70));\n mapView.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n\n }\n });\n }\n }\n\n }\n }", "private String getGeofenceTransitionDetails(\n Context context,\n int geofenceTransition,\n List<Geofence> triggeringGeofences){\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n ArrayList triggeringGeofecesIdList = new ArrayList();\n\n for (Geofence geofence : triggeringGeofences){\n triggeringGeofecesIdList.add(geofence.getRequestId());\n }\n\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofecesIdList);\n\n Log.v(LOG_TAG, geofenceTransitionString + \": \" + triggeringGeofencesIdsString);\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n boolean entering = intent.getBooleanExtra(LocationManager.KEY_PROXIMITY_ENTERING, false);\n if (entering) {\n if (intent.getIntExtra(TAG_QUIZ_ID, -1) != Route.getCurrentQuizId()) return;\n\n if (!LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(NavigationActivity.ACTION_NOTIFY_ARRIVED_AT_WAYPOINT))) {\n Intent openQuizActivity = new Intent(context, QuizActivity.class);\n openQuizActivity.putExtra(QuizActivity.TAG_QUIZ_ID, Route.getCurrentQuizId());\n\n PendingIntent pendingIntent = TaskStackBuilder.create(context)\n .addNextIntentWithParentStack(openQuizActivity)\n .getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context)\n .setSmallIcon(R.mipmap.ic_launcher)\n .setContentTitle(String.format(\n context.getResources().getString(R.string.notification_arrived_at_waypoint_title)\n , intent.getStringExtra(TAG_WAYPOINT_NAME)))\n .setContentText(String.format(\n context.getResources().getString(R.string.notification_arrived_at_waypoint_detail)\n , intent.getStringExtra(TAG_WAYPOINT_NAME)\n ))\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n ((NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE)).notify(0, builder.build());\n\n Route.setArrivedAtCurrentDestination(true);\n }\n }\n }", "private void sendRequestAPI(Double lat,Double lng, String places) {\n\n String origin = String.valueOf(lat) + \",\" + String.valueOf(lng);\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n String destination = \"0,0\";\n String wayPoints = \"0,0\";\n\n switch (places) {\n case \"Family Walk\" :\n destination = formatCoordinates(6);\n wayPoints = formatCoordinates(4) + \"|\" + formatCoordinates(5);\n break;\n\n case \"Retro Tour\" :\n destination = formatCoordinates(9);\n wayPoints =formatCoordinates(7) + \"|\" + formatCoordinates(8);\n break;\n\n case \"Sports Tour\" :\n destination = formatCoordinates(11);\n wayPoints = formatCoordinates(9) + \"|\" + formatCoordinates(8);\n break;\n case \"custom\":\n destination = getActivity().getIntent().getStringExtra(\"destination\");\n wayPoints = getActivity().getIntent().getStringExtra(\"waypoints\");\n break;\n\n }\n //String destination = \"-27.494721,153.014262\";\n //String wayPoints = \"-27.498172, 153.013585\";\n try {\n\n new Directions(this, origin, destination, wayPoints).execute();\n Double latDes= Double.parseDouble(destination.split(\",\")[0]);\n Double lngDes= Double.parseDouble(destination.split(\",\")[1]);\n String [] points = wayPoints.split(Pattern.quote(\"|\")) ;\n\n if(wayPoints.equals(\"\")){\n\n }\n else{\n for(String point : points) {\n Double latPoint = Double.parseDouble((point.split(\",\")[0]));\n Double lngPoint = Double.parseDouble((point.split(\",\")[1]));\n List<Address> addressesPoint = geocoder.getFromLocation(latPoint, lngPoint, 1);\n wayPointsMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesPoint.get(0).getAddressLine(0))\n .position(new LatLng(latPoint, lngPoint))));\n }\n }\n\n\n List<Address> addressesStart = geocoder.getFromLocation(lat, lng, 1);\n List<Address> addressesEnd = geocoder.getFromLocation(latDes,\n lngDes, 1);\n //originMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesStart.get(0).getAddressLine(0))\n //.position(new LatLng(lat, lng))));\n destinationMarkers.add(mMap.addMarker((new MarkerOptions().title(addressesEnd.get(0).getAddressLine(0))\n .position(new LatLng(latDes, lngDes)))));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latDes,\n lngDes), 16));\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t protected void onResume() {\n\t \tsuper.onResume();\n\t \tmyLocationOverlay.enableMyLocation();\n\t \tIntent intentstazionetermini=new Intent(\"pdm.test.mappe\");\n\t \tintentstazionetermini.putExtra(\"overlay\", 1);\n\t \tmPendingstazionetermini=PendingIntent.getBroadcast(this, 1, intentstazionetermini, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tIntent intentpiazzadellarepubblica=new Intent(\"pdm.test.mappe\");\n\t \tintentpiazzadellarepubblica.putExtra(\"overlay\", 2);\n\t \tmPendingpiazzadellarepubblica=PendingIntent.getBroadcast(this, 2, intentpiazzadellarepubblica, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tIntent intentcolosseo=new Intent(\"pdm.test.mappe\");\n\t \tintentcolosseo.putExtra(\"overlay\", 3);\n\t \tmPendingcolosseo=PendingIntent.getBroadcast(this, 3, intentcolosseo, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tIntent intentcasadiromoloeremo=new Intent(\"pdm.test.mappe\");\n\t \tintentcasadiromoloeremo.putExtra(\"overlay\", 4);\n\t \tmPendingcasadiromoloeremo=PendingIntent.getBroadcast(this, 4, intentcasadiromoloeremo, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tlocationManager=(LocationManager)getSystemService(LOCATION_SERVICE);\n\t \tlocationManager.addProximityAlert(stazionetermini.getLatitudeE6()*0.000001, stazionetermini.getLongitudeE6()*0.000001, 400, -1, mPendingstazionetermini);\n\t \tlocationManager.addProximityAlert(piazzadellarepubblica.getLatitudeE6()*0.000001, piazzadellarepubblica.getLongitudeE6()*0.000001, 300, -1, mPendingpiazzadellarepubblica);\n\t \tlocationManager.addProximityAlert(colosseo.getLatitudeE6()*0.000001, colosseo.getLongitudeE6()*0.000001, 500, -1, mPendingcolosseo);\n\t \tlocationManager.addProximityAlert(casadiromoloeremo.getLatitudeE6()*0.000001, casadiromoloeremo.getLongitudeE6()*0.000001, 450, -1, mPendingcasadiromoloeremo);\n\t \tregisterReceiver(mProximityBroadcast, new IntentFilter(\"pdm.test.mappe\"));\n\t }", "public void unregisterGeofences(List<String> geofenceIDs) {\n LocationServices.GeofencingApi.removeGeofences(\n mGoogleApiClient,\n geofenceIDs\n ).setResultCallback(this); // Result processed in onResult().\n }", "public void onLocationChanged(Location loc) {\n\n // If Gps is available, then ignore updates from NetworkLocationProvider\n if (loc.getProvider().equals(LocationManager.GPS_PROVIDER)) {\n isGpsAvailable = true;\n }\n if (isGpsAvailable && loc.getProvider().equals(LocationManager.NETWORK_PROVIDER)) {\n return;\n }\n\n // Process proximity alerts\n long now = System.currentTimeMillis();\n double latitude = loc.getLatitude();\n double longitude = loc.getLongitude();\n ArrayList<PendingIntent> intentsToRemove = null;\n\n for (ProximityAlert alert : mProximityAlerts.values()) {\n PendingIntent intent = alert.getIntent();\n long expiration = alert.getExpiration();\n\n if ((expiration == -1) || (now <= expiration)) {\n boolean entered = mProximitiesEntered.contains(alert);\n boolean inProximity =\n alert.isInProximity(latitude, longitude);\n if (!entered && inProximity) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Entered alert\");\n }\n mProximitiesEntered.add(alert);\n Intent enteredIntent = new Intent();\n enteredIntent.putExtra(LocationManager.KEY_PROXIMITY_ENTERING, true);\n try {\n intent.send(mContext, 0, enteredIntent, null, null);\n } catch (PendingIntent.CanceledException e) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Canceled proximity alert: \" + alert, e);\n }\n if (intentsToRemove == null) {\n intentsToRemove = new ArrayList<PendingIntent>();\n }\n intentsToRemove.add(intent);\n }\n } else if (entered && !inProximity) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Exited alert\");\n }\n mProximitiesEntered.remove(alert);\n Intent exitedIntent = new Intent();\n exitedIntent.putExtra(LocationManager.KEY_PROXIMITY_ENTERING, false);\n try {\n intent.send(mContext, 0, exitedIntent, null, null);\n } catch (PendingIntent.CanceledException e) {\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Canceled proximity alert: \" + alert, e);\n }\n if (intentsToRemove == null) {\n intentsToRemove = new ArrayList<PendingIntent>();\n }\n intentsToRemove.add(intent);\n }\n }\n } else {\n // Mark alert for expiration\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Expiring proximity alert: \" + alert);\n }\n if (intentsToRemove == null) {\n intentsToRemove = new ArrayList<PendingIntent>();\n }\n intentsToRemove.add(alert.getIntent());\n }\n }\n\n // Remove expired alerts\n if (intentsToRemove != null) {\n for (PendingIntent i : intentsToRemove) {\n mProximityAlerts.remove(i);\n ProximityAlert alert = mProximityAlerts.get(i);\n mProximitiesEntered.remove(alert);\n }\n }\n\n }", "private void executePendingRequests(int resultCode) {\n for (LocationActivityResultListener listener : mPendingLocationRequests) {\n listener.onResult(resultCode);\n }\n mPendingLocationRequests.clear();\n }", "private void startLocationUpdates() {\n mSettingsClient.checkLocationSettings(mLocationSettingsRequest)\n .addOnSuccessListener(this, new OnSuccessListener<LocationSettingsResponse>() {\n @Override\n public void onSuccess(LocationSettingsResponse locationSettingsResponse) {\n Log.i(TAG, \"All location settings are satisfied.\");\n\n //noinspection MissingPermission\n if (ActivityCompat.checkSelfPermission(ChooseParty.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(ChooseParty.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(ChooseParty.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_PERMISSIONS_REQUEST_CODE);\n }\n mFusedLocationClient.requestLocationUpdates(mLocationRequest,\n mLocationCallback, Looper.myLooper());\n\n }\n })\n .addOnFailureListener(this, new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n int statusCode = ((ApiException) e).getStatusCode();\n switch (statusCode) {\n case LocationSettingsStatusCodes.RESOLUTION_REQUIRED:\n Log.i(TAG, \"Location settings are not satisfied. Attempting to upgrade \" +\n \"location settings \");\n try {\n // Show the dialog by calling startResolutionForResult(), and check the\n // result in onActivityResult().\n ResolvableApiException rae = (ResolvableApiException) e;\n rae.startResolutionForResult(ChooseParty.this, REQUEST_CHECK_SETTINGS);\n } catch (IntentSender.SendIntentException sie) {\n Log.i(TAG, \"PendingIntent unable to execute request.\");\n }\n break;\n case LocationSettingsStatusCodes.SETTINGS_CHANGE_UNAVAILABLE:\n String errorMessage = \"Location settings are inadequate, and cannot be \" +\n \"fixed here. Fix in Settings.\";\n Log.e(TAG, errorMessage);\n Toast.makeText(ChooseParty.this, errorMessage, Toast.LENGTH_LONG).show();\n mRequestingLocationUpdates = false;\n }\n }\n });\n }", "private void removeLocationUpdatesWithIntent() {\n mFusedLocationProviderClient.removeLocationUpdates(mLocationCallback)\n // Define callback for success in stopping requesting location updates.\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(MainActivity.this, \"Location Request Successfully Stopped\",LENGTH_SHORT).show();\n }\n })\n // Define callback for failure in stopping requesting location updates.\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(Exception e) {\n Toast.makeText(MainActivity.this, \"Location Request Failed to Stop\",LENGTH_SHORT).show();\n }\n });\n }", "protected void startIntentService() {\n Intent intent = new Intent(this.getActivity(), FetchAddressIntentService.class);\n intent.putExtra(Constants.RECEIVER, mResultReceiver);\n intent.putExtra(Constants.LOCATION_DATA_EXTRA, mLastLocation);\n this.getActivity().startService(intent);\n }", "public PendingIntent getRequestPendingIntent() {\n return createRequestPendingIntent();\n }", "@Override\n public void onMapLongClick(LatLng latLng) {\n String newLocation = null;\n Geocoder gcd = new Geocoder(getBaseContext(), Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = gcd.getFromLocation(latLng.latitude, latLng.longitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (addresses.size() > 0) {\n newLocation = addresses.get(0).getLocality();\n }\n\n // Set new marker attributes\n MapLocation newMarker = new MapLocation();\n newMarker.setLocation(newLocation);\n newMarker.setLatitude(latLng.latitude);\n newMarker.setLongitude(latLng.longitude);\n\n // Add to firebase\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbRef = database.getReference();\n DatabaseReference newRef = dbRef.push();\n newRef.setValue(newMarker);\n }", "private void setUpDirectionIntegration() {\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(final LatLng latLng) {\n new AlertDialog.Builder(ScavengerHunt.this)\n .setTitle(\"Open Google Maps?\")\n .setMessage(\"Get directions to your selected location.\")\n .setPositiveButton(\"Continue\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String uri = \"http://maps.google.com/maps?daddr=\" + latLng.latitude + \",\" + latLng.longitude + \" (\" + \"Where the party is at\" + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));\n intent.setPackage(\"com.google.android.apps.maps\");\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Do nothing\n }\n })\n .show();\n\n Log.i(\"MAP\", latLng.latitude + \", \" + latLng.longitude);\n }\n });\n }", "private String getGeofenceTransitionDetails(\n int geofenceTransition,\n List<Geofence> triggeringGeofences) {\n\n String geofenceTransitionString = getTransitionString(geofenceTransition);\n\n // Get the Ids of each geofence that was triggered.\n ArrayList<String> triggeringGeofencesIdsList = new ArrayList<>();\n for (Geofence geofence : triggeringGeofences) {\n triggeringGeofencesIdsList.add(geofence.getRequestId());\n }\n String triggeringGeofencesIdsString = TextUtils.join(\", \", triggeringGeofencesIdsList);\n Log.i(\"logos\",\"jnj\");\n return geofenceTransitionString + \": \" + triggeringGeofencesIdsString;\n }", "public void requestLocationUpdates(String provider, long minTime, \n\t\t\t\t\t\t\t\t\t\tfloat minDistance, LocationListener listener){\n\t\tif(provider == GPS_PROVIDER){\n\t\t\tlocationListeners.add(listener);\n\t\t\tif(locationListeners.size() == 1){\n\t\t\t\tlocyNavigator.start();\n\t\t\t\tif ( locyNavigatorThread.getState() == Thread.State.NEW )\n\t\t\t\t\tlocyNavigatorThread.start();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n if ((getIntent().getDoubleExtra(\"locationLat\", 0)) != 0\n && (getIntent().getDoubleExtra(\"locationLon\", 0)) != 0\n && !((getIntent().getIntExtra(\"origin\",0))==1)) {\n LatLng company = new LatLng((getIntent().getDoubleExtra(\"locationLat\", 0)), (getIntent().getDoubleExtra(\"locationLon\", 0)));\n mMap.addMarker(new MarkerOptions().position(company).title(getIntent().getStringExtra(\"companyname\")));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(company, 16));\n check = 1;\n } else if ((getIntent().getIntExtra(\"origin\",0))==1\n && (getIntent().getDoubleExtra(\"locationLat\", 0)) != 0\n && (getIntent().getDoubleExtra(\"locationLon\", 0)) != 0) {\n LatLng company = new LatLng((getIntent().getDoubleExtra(\"locationLat\", 0)), (getIntent().getDoubleExtra(\"locationLon\", 0)));\n previousLocation = mMap.addMarker(new MarkerOptions().position(company).title(getIntent().getStringExtra(\"companyname\")));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(company, 16));\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 // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 101);\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n previousLocation.remove();\n if (marker != null) {\n marker.setPosition(latLng);\n } else {\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Your Location\").draggable(true));\n }\n companyLocation = latLng;\n }\n });\n } else {\n LatLng nepal = new LatLng(27.7172, 85.3240);\n kathmandu = mMap.addMarker(new MarkerOptions().position(nepal).title(\"Marker in Kathmandu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(nepal, 14));\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 // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 101);\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n kathmandu.remove();\n if (marker != null) {\n marker.setPosition(latLng);\n } else {\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Your Location\").draggable(true));\n }\n companyLocation = latLng;\n }\n });\n }\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "private PendingIntent pendingIntentForNotification() {\n Intent intent = new Intent(getActivity(), MainActivity.class);\n\n //Add any extras (in this case, that you want to relaunch this fragment)\n intent.putExtra(MainActivity.EXTRA_FRAGMENT_TO_LAUNCH, MainActivity.TAG_NOTIFICATION_FRAGMENT);\n\n //This will hold the intent you've created until the notification is tapped.\n PendingIntent pendingIntent = PendingIntent.getActivity(getActivity(), 1, intent, 0);\n return pendingIntent;\n }", "private void registerActivityFence() {\n //generate fence\n AwarenessFence activityStillFence = DetectedActivityFence.during(DetectedActivityFence.STILL);\n AwarenessFence activityMovingFence = DetectedActivityFence.during(DetectedActivityFence.WALKING);\n\n //generate pending intent\n PendingIntent fencePendingIntent = PendingIntent.getBroadcast(this,\n 10001,\n new Intent(FENCE_RECEIVER_ACTION),\n 0);\n\n //fence to activate when headphone is plugged in\n Awareness.FenceApi.updateFences(mGoogleApiClient, new FenceUpdateRequest.Builder()\n .addFence(ACTIVITY_STILL_FENCE_KEY, activityStillFence, fencePendingIntent).build())\n .setResultCallback(new ResultCallbacks<Status>() {\n @Override\n public void onSuccess(@NonNull final Status status) {\n Toast.makeText(ActivityFanceApiDemo.this,\n \"Fence registered successfully. Move your device to see magic.\",\n Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(@NonNull final Status status) {\n Toast.makeText(ActivityFanceApiDemo.this,\n \"Cannot register activity fence.\",\n Toast.LENGTH_SHORT).show();\n }\n });\n\n //fence to activate when headphone is unplugged in\n Awareness.FenceApi.updateFences(mGoogleApiClient, new FenceUpdateRequest.Builder()\n .addFence(ACTIVITY_MOVING_FENCE_KEY, activityMovingFence, fencePendingIntent).build());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n FusedLocationProviderClient mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "public void saveFenceInSqliteDB(String name, String address, String city, String province, Double lat, Double lng, String range, String number, String textSMS, int event) {\n boolean active = true; // default whan you add a geofence is active\n boolean match = false; // default whan you add a geofence is not in fence\n\n int id = Controller.insertFenceOnSQLiteDB(name, address, city, province, lat + \"\", lng + \"\", range, 1, number, textSMS, event);\n Fence f = new Fence(id, name, address, city, province, lat, lng, Float.parseFloat(range), active, match, number, textSMS, event);\n Controller.fences.add(f);\n Toast.makeText(this.getContext(), \"Added the fence: \" + f.getName() + \"!\", Toast.LENGTH_LONG).show();\n }", "public void enableLocationService(Context context, int timeWait, int minDist){\r\n\t\tlm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, timeWait, minDist, this);\r\n\t}", "@Override\n public void handleResult(GeofenceInfoObject result) {\n super.handleResult(result);\n\n /*This is a call from the VolleyRequester, so this check prevents the app from\n crashing if the user leaves the tab while the app is trying\n to get quests from the server\n */\n if(this.isResumed()) {\n MainActivity mainActivity = (MainActivity) getActivity();\n if(mainActivity != null) {\n final Button btnRequestInfo = (Button) view.findViewById(R.id.btn_request_info);\n final TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences);\n if(result == null){\n if(currentGeofences != null){\n if(currentGeofences.size() != 0){\n //If the result is null and it shouldn't be, displays error and allows user to request\n //information again\n btnRequestInfo.setVisibility(View.VISIBLE);\n txtRequestGeofences.setText(getResources().getString(R.string.no_info_retrieved));\n txtRequestGeofences.setVisibility(View.VISIBLE);\n btnRequestInfo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n txtRequestGeofences.setText(getResources().getString(R.string.retrieving_info));\n btnRequestInfo.setVisibility(View.GONE);\n handleGeofenceChange(currentGeofences);\n }\n });\n }\n }\n }\n\n if (result != null) {\n try {\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result length is: \" + result.getContent().size());\n Log.i(logMessages.GEOFENCE_MONITORING, \"handleResult: result is: \" + result.getContent().toString());\n\n btnRequestInfo.setVisibility(View.GONE);\n txtRequestGeofences.setVisibility(View.GONE);\n if(debugMode) {\n displayGeofenceInfo();\n }\n addMarker(result.getContent());\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }", "protected void createGeofenceList() throws JSONException, MalformedURLException {\n //URL stationUrlObject = new URL(stationUrl);\n //URL bsl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations/bsl\");\n URL mfl = new URL(\"http://lowcost-env.r8dpz7s6b2.us-west-2.elasticbeanstalk.com/stations\");\n //Creates a new thread to get stations asynchronously\n GetStationsTask stationConnection = new GetStationsTask();\n String stations = null;\n try {\n stations = stationConnection.execute(mfl).get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n //Parse JSON returned by server and add to list of stations\n if (stations != null) {\n JSONArray stationJson;\n\n try {\n stationJson = new JSONArray(stations);\n } catch (Throwable t) {\n Log.e(TAG, \"Could not parse malformed JSON: \" + stations);\n return;\n }\n\n if (stationJson.length() > 0) {\n for (int i = 0; i < stationJson.length(); i++) {\n JSONObject stationJsonObject = stationJson.getJSONObject(i);\n //String line = (String)stationJsonObject.get(\"line\");\n /*if(line.contains(\"owl\")){\n Log.d(TAG, \"test\");\n continue;\n }*/\n String name = (String) stationJsonObject.get(\"name_long\");\n double latitude = Double.parseDouble((String) stationJsonObject.get(\"latitude\"));\n double longitude = Double.parseDouble((String) stationJsonObject.get(\"longitude\"));\n int id = Integer.parseInt((String) stationJsonObject.get(\"id_station\"));\n String address = stationJsonObject.getString(\"address\");\n String line = stationJsonObject.getString(\"line\");\n Station station = new Station(id, name, address, new LatLng(latitude, longitude), line);\n STATIONS.add(station);\n //StationMap.put(name, station);\n StationIDMap.put(id, station);\n }\n } else {\n Log.e(TAG, \"Empty JSON returned by server\");\n Toast.makeText(this, \"Error connecting to server\", Toast.LENGTH_LONG).show();\n }\n } else {\n Log.e(TAG, \"No response from server\");\n Toast.makeText(this, \"Could not connect to server\", Toast.LENGTH_LONG).show();\n }\n\n\n //Create Geofence objects\n //NOTE: Geofences will not be activated here\n for (Station station : STATIONS) {\n mGeofenceList.add(new Geofence.Builder()\n .setRequestId(String.valueOf(station.getID()))\n .setCircularRegion(\n station.getLatLng().latitude,\n station.getLatLng().longitude,\n Constants.GEOFENCE_RADIUS_METERS)\n .setExpirationDuration(Constants.GEOFENCE_EXPIRATION)\n .setTransitionTypes(Geofence.GEOFENCE_TRANSITION_ENTER\n | Geofence.GEOFENCE_TRANSITION_EXIT)\n .build());\n }\n }", "private void startPlaceListActivity() {\n if (mLastLocation == null) {\n Toast.makeText(getContext(), getResources().getString(R.string.location_unavailable), Toast.LENGTH_SHORT).show();\n\n // after announcing user that their location is unknown, try getting their location again\n startLocationUpdate();\n\n } else {\n Intent intent = new Intent(getContext(), PlaceListActivity.class);\n intent.putExtra(PLACE_TYPE_KEY, mPlaceType);\n intent.putExtra(CURRENT_LOCATION_KEY, mLastLocation);\n startActivity(intent);\n }\n }", "void addMarkers() {\n\n Map<String, ProductDetailsCartItem> restaurantGeolocations = new HashMap<>();\n for (UserProductsItem userProductsItem : userProductsItemList) {\n for (ProductDetailsCartItem productDetailsCartItem : userProductsItem.getCartDetails()) {\n ProductDetailsCartItem restaurantDetails = new ProductDetailsCartItem(productDetailsCartItem.getRestaurantGeolocation(), productDetailsCartItem.getRestaurantAddress());\n restaurantGeolocations.put(productDetailsCartItem.getRestaurantName(), restaurantDetails);\n\n }\n }\n restaurantListServices.removeElements();\n LatLng position = new LatLng(0, 0);\n String address = \"\";\n int restaurantPosition = 0;\n for (HashMap.Entry<String, ProductDetailsCartItem> restaurantDetails : restaurantGeolocations.entrySet()) {\n try {\n String geolocation = restaurantDetails.getValue().getRestaurantGeolocation();\n address = restaurantDetails.getValue().getRestaurantAddress();\n String[] lat_long = geolocation.split(\",\");\n\n double lat = Double.parseDouble(lat_long[0]);\n double lng = Double.parseDouble(lat_long[1]);\n position = new LatLng(lat, lng);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n } finally {\n MarkerOptions mo = new MarkerOptions().position(position).title(restaurantDetails.getKey());\n mo.visible(true);\n // mo.flat(true);\n mo.snippet(address);\n\n Marker marker = googleMap.addMarker(mo);\n marker.showInfoWindow();\n // polylineOptions.add(position);\n RestaurantMapItem restaurantMapItem = new RestaurantMapItem(restaurantDetails.getKey(), restaurantDetails.getValue().getRestaurantAddress(), ++restaurantPosition, position, marker);\n restaurantListServices.addRestaurant(restaurantMapItem);\n\n }\n }\n\n UiSettings settings = googleMap.getUiSettings();\n settings.setMapToolbarEnabled(true);\n settings.setMyLocationButtonEnabled(true);\n settings.setCompassEnabled(true);\n googleMap.setContentDescription(\"restaurants\");\n googleMap.setTrafficEnabled(true);\n\n\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(position, 12));\n\n googleMap.setOnMyLocationButtonClickListener(this);\n googleMap.setOnMyLocationClickListener(this);\n\n 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 return;\n }\n googleMap.setMyLocationEnabled(true);\n\n restaurantListViewAdapter.notifyDataSetChanged();\n /*if (mMutablePolyline != null) {\n mMutablePolyline.remove();\n }\n mMutablePolyline = googleMap.addPolyline(polylineOptions);\n*/\n }", "@Override\n public void onClick(View arg0) {\n gps = new GPSTracker(AddressBook_add.this);\n\n // check if GPS enabled\n if(gps.canGetLocation()){\n\n latitude = gps.getLatitude();\n longitude = gps.getLongitude();\n\n // \\n is for new line\n // Toast.makeText(getApplicationContext(), \"Your Location is - \\nLat: \" + latitude + \"\\nLong: \" + longitude, Toast.LENGTH_LONG).show();\n }else{\n // can't get location\n // GPS or Network is not enabled\n // Ask user to enable GPS/network in settings\n gps.showSettingsAlert();\n }\n\n latitude = gps.getLatitude();\n longitude = gps.getLongitude();\n \n \n \n\n\n List <Address> list = null;\n try {\n list = gc.getFromLocation(latitude,longitude,1);\n if(list!=null) {\n\n Address address = list.get(0);\n String locality = address.getLocality();\n String sublocality = address.getSubLocality();\n Log.d(\"locality\", locality+\" \"+sublocality);\n Intent i = new Intent(AddressBook_add.this, AddCompleteAddress.class);\n Bundle extras = new Bundle();\n extras.putString(LOCALITY, locality);\n extras.putString(SUBLOCALITY, sublocality);\n i.putExtras(extras);\n\n startActivity(i);\n }else{\n\n Toast.makeText(gps, \"Try Again.!!!\", Toast.LENGTH_SHORT).show();\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n\n\n //Toast.makeText(getApplicationContext(),\"loca \" + locality + \"sublocal \" + sublocality , Toast.LENGTH_LONG).show();\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> addFulfillmentPlaces(\n com.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getAddFulfillmentPlacesMethod(), getCallOptions()), request);\n }" ]
[ "0.8175581", "0.8133402", "0.80312085", "0.7493514", "0.72567976", "0.7180659", "0.7053417", "0.68792075", "0.6738564", "0.65939206", "0.6576415", "0.6547909", "0.6546547", "0.6319167", "0.63190615", "0.62676704", "0.60676557", "0.60630333", "0.6048421", "0.5996472", "0.59101224", "0.5901341", "0.5901341", "0.58889055", "0.5695561", "0.5589433", "0.55622816", "0.5546868", "0.55121636", "0.54709893", "0.54702806", "0.5372373", "0.5330328", "0.5323105", "0.53209853", "0.52917534", "0.5270261", "0.5256439", "0.52562153", "0.5207669", "0.5185802", "0.51799554", "0.5151366", "0.50844896", "0.5068568", "0.5020286", "0.49882275", "0.49826223", "0.49777794", "0.4961205", "0.4928801", "0.49081057", "0.4883684", "0.48788366", "0.48669386", "0.48664957", "0.4825441", "0.48037186", "0.480065", "0.47970572", "0.47323674", "0.47188905", "0.46936798", "0.46817803", "0.46802002", "0.4611956", "0.4576396", "0.4548578", "0.4545589", "0.4544871", "0.45382342", "0.4536348", "0.452099", "0.4518047", "0.44589612", "0.44442213", "0.44435707", "0.44393325", "0.4420974", "0.44165793", "0.44146368", "0.44109076", "0.44040936", "0.43948135", "0.43859807", "0.43824068", "0.43688092", "0.43664292", "0.43664292", "0.43655947", "0.43615922", "0.4353895", "0.43399107", "0.43367112", "0.43326992", "0.43311712", "0.43176097", "0.4315293", "0.43150946", "0.43063578" ]
0.76187223
3
ShapedRecipe recipe = new ShapedRecipe(getItem());
@Override public Recipe getRecipe() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ItemStack make();", "@Override\n public IRecipe addRecipe() {\n return RecipeRegistry.addShapedRecipe(new ItemStack(this),\n \"igi\",\n \"gog\",\n \"igi\",\n 'o', \"obsidian\", 'i', \"ingotIron\", 'g', \"blockGlass\");\n }", "protected abstract void makeItem();", "public static void reci(){\n\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(generatorBase, 1),\"XXX\", \"XXX\", \"XXX\", 'X', ItemHandler.ironHard));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(generatorCombust, 1), \"XYX\", \"DFD\", \"XXX\", 'X', generatorBase, 'Y', \"gemDiamond\", 'D', \"dustRedstone\", 'F', Blocks.furnace));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(tank, 1), \"XXX\", \"XYX\", \"XXX\", 'X', ItemHandler.ironHard, 'Y', \"blockGlass\"));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(charcoalBlock, 1), \"CCC\", \"CCC\", \"CCC\", 'C', new ItemStack(Items.coal, 1, 1)));\n GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.coal, 9, 1), new ItemStack(charcoalBlock)));\n }", "public Recipes()\n {\n\t\titems = new ArrayList<food>();\n }", "public Recipe getRecipe() {\r\n return recipe;\r\n }", "public Recipe getRecipe() {\n return recipe;\n }", "@Override\n\tpublic void addRecipes() \n\t{\n GameRegistry.addRecipe(new ItemStack(this), \"xxx\", \"xyx\", \"xxx\",\t\t\t\t\t\t\n 'x', Items.fireworks, \n 'y', Items.string\n ); \n \n // Bundle of rockets back to 8 rockets\n GameRegistry.addShapelessRecipe(new ItemStack(Items.fireworks, 8), new ItemStack(this));\n\t}", "public Recipe() { }", "public void registerRecipe() {\n\t ItemStack itemStackDroidParts = new ItemStack(SuperDopeJediMod.entityManager.droidParts);\n\t ItemStack itemStackQuadaniumSteelIngot = new ItemStack(SuperDopeJediMod.quadaniumSteelIngot); \n\t ItemStack itemStackThis = new ItemStack(this);\n\t \n\t GameRegistry.addRecipe(itemStackThis, \"xxx\", \"xyx\", \"xxx\", 'x', itemStackDroidParts,\n\t \t\t\t'y', itemStackQuadaniumSteelIngot);\t\n\t}", "GameItem(String rarity, String name, String pickuptext, String effect, ArrayList<Double> stack){\n this.rarity = rarity;\n this.name = name;\n this.pickuptext = pickuptext;\n this.effect = effect;\n this.stack = stack;\n // this.imageloc = \"/../../../pictures/items/\"+this.rarity+\"/\"+this.name+\".png\";\n //this.img = new javax.swing.ImageIcon(getClass().getResource(this.imageloc));\n //Icon\n }", "RecipeObject addRecipe(RecipeObject recipe);", "@Override\r\n public ItemStack getItemStack(PartItemStack type) {\n return new ItemStack(this.item);\r\n }", "@Override\n\tpublic void addRecipes() {\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_BROWN), \"coralBrown\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_RED), \"coralRed\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_YELLOW), \"coralYellow\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_BLUE), \"coralLightBlue\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.MAGENTA), \"coralMagenta\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.ORANGE), \"coralOrange\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PINK), \"coralPink\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PURPLE), \"coralPurple\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.GREY), \"coralGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_GREY), \"coralLightGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_WHITE), \"coralWhite\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_GREEN), \"plantKelp\", true);\n\t\t\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BLUE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BRAIN), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CANDYCANE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CUCUMBER), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_ORANGE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PINK), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PURPLE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_RED), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_WHITE), 5);\n\t\t\n\t\t//Kelp Wrap Recipe\n\t\tRecipeHelper.add9x9Recipe(new ItemStack(Core.food, 1, FoodMeta.KELP_WRAP), \"plantKelp\");\n\t\t\n\t\taddOceanChestLoot();\n\t}", "public Recipe getRecipe(){\n\t\tRecipe recipe = new Recipe();\n\t\trecipe.setName(name);\n\t\trecipe.setNumPersons(numPersons);\n\t\trecipe.setPrepTime(prepTime);\n\t\trecipe.setRestTime(restTime);\n\t\trecipe.setCookingTime(cookingTime);\n\t\tHashMap<Ingredient, Quantity> ingredients = new HashMap<Ingredient,Quantity>();\n\t\tfor(int i = 0; i<ingredientsList.size(); i++){\n\t\t\tingredients.put(ingredientsList.get(i), quantities.get(i));\n\t\t}\n\t\trecipe.setIngredients(ingredients);\n\t\trecipe.setSteps(steps);\n\t\treturn recipe;\n\t}", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "Ingredient[] shape(IRecipe recipe);", "private static void addShaped()\n {}", "public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }", "private Item(){}", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }", "public Ingredient(){\r\n \r\n }", "Items(){\n}", "public void addIngredientRecipe(IngredientRecipePOJO ingr);", "public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}", "public RestaurantItem() {\n }", "public RecipeViewHolder(View itemView) {\n super(itemView);\n\n imageView = itemView.findViewById(R.id.image);\n nameView = itemView.findViewById(R.id.name);\n itemView.setOnClickListener(this);\n }", "public Item(){}", "ItemStack getItem();", "public void addNewRecipe() {\r\n listOfRecipes.add(new Recipe().createNewRecipe());\r\n }", "public static void doRecycleRecipes()\n {\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_horse_armor, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore, 2, 0), 30.0F);\n // extra Gold recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.clock), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, 1), new ItemStack(Blocks.gold_ore), 15.0F);\n //\n // recycle your Leather\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n //\n // recycle your Wood\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n // extra Wood recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.boat), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.bed), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_door), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.fishing_rod, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 3.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.bookshelf), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.chest), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.trapped_chest), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.hay_block), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.crafting_table), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 3.0F);\n //\n // recycle your Stone\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n // extra Stone recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.furnace), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.stone, 2, 0), 10.0F);\n //\n // recycle your Iron\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_horse_armor, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n // extra Iron recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.bucket), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.cauldron), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.compass), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_door), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.flint_and_steel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.minecart), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.hopper_minecart), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.anvil, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 4, 0), new ItemStack(Items.coal, 4, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 4, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.hopper), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n //\n // recycle your Diamond\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_horse_armor, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore, 2, 0), 20.0F);\n //\n\t\tif(Loader.isModLoaded(\"simpleores\") && Settings.enableSimpleOres){\n // recycle your Copper\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.copper_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.copper_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n // extra Copper recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_bucket), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_door_block), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n //\n // recycle your Tin\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.tin_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.tin_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n // extra Tin recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n //\n // recycle your Mythril\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n // extra Mythril recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_rod), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_furnace), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore, 2, 0), 15.0F);\n //\n // recycle your Adamantium\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n // extra Adamantium recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n //\n // recycle your Onyx\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n // extra Onyx recycling\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_door_block), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_rod), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_furnace), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore, 2, 0), 40.0F);\n //\n // recycle your Bronze\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n //\n // recycle your Thyrium\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n // extra Thyrium recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_rod), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n //\n // recycle your Sinisite\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n // extra Sinisite recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_rod), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n }}", "static void TinkersEdits()\n\t{\n\t\tGameRegistry.addShapelessRecipe(new ItemStack(14276/*Seared Brick Ingot*/,3,2), new ItemStack(1474/*Seared Brick Block*/,1,2));\n\t}", "public void addShapelessRecipe(ItemStack stack, Object... recipeComponents) {\n List<ItemStack> list = Lists.newArrayList();\n\n for (Object object : recipeComponents) {\n if (object instanceof ItemStack) {\n list.add(((ItemStack) object).copy());\n } else if (object instanceof Item) {\n list.add(new ItemStack((Item) object));\n } else {\n assert object instanceof Block : \"Invalid shapeless recipe: unknown type \" + object.getClass().getName() + \"!\";\n\n list.add(new ItemStack((Block) object));\n }\n }\n\n this.recipes.add(new ShapelessRecipe(stack, list));\n }", "public static ItemIngredient of(ItemStack input) {\n\t\treturn new ItemStackIngredient(input);\n\t}", "ItemStack createItemStack(CompoundTag tag);", "public FinalMysteryItem() {\n int randomIndex = new Random().nextInt(7);\n item = new Item(listOfPossibleNames[randomIndex], PRICE_TO_BUY);\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "public ItemStack createItem(ItemType type, int damage,List<Text> lore);", "public Item()\n {\n super();\n }", "public Ingredient() { }", "public static ItemStack createItemStack()\r\n \t{\r\n \t\treturn new ItemStack(0);\r\n \t}", "@Override // see item.java\n\tpublic void useItem() {\n\n\t}", "private void createRecipe(Plugin plugin) {\n\t\tNamespacedKey nk = new NamespacedKey(plugin, \"AC_CHAINMAIL_BOOTS_A\");\n\t\tShapedRecipe recipe = new ShapedRecipe(nk, new ItemStack(Material.CHAINMAIL_BOOTS, 1));\n\n\t\trecipe.shape(\"C C\", \"C C\", \" \");\n\n\t\trecipe.setIngredient('C', Material.CHAIN);\n\t\t\n\t\tBukkit.addRecipe(recipe);\n\t}", "@Override\n public Object getItem(int position) {\n return mRecipeList.get(position);\n }", "public Ingredient(){\r\n\t}", "public abstract Ingredient getNew();", "public Ingredient() {\n }", "private static void registerShapelessRecipes() {\n\t}", "public Item() {}", "public Recipe createRecipe(String name) {\r\n\t\tRecipe recipe=new Recipe(name,this);\r\n\t\trecipes.add(recipe);\r\n\t\treturn recipe;\r\n\t}", "private Item initItem() {\n String name = inputName.getText().toString();\n int quantityToBuy = -1;\n if (!inputQuantityToBuy.getText().toString().equals(\"\"))\n quantityToBuy = Integer.parseInt(inputQuantityToBuy.getText().toString());\n String units = inputUnits.getText().toString();\n double price = 0;\n if (!inputPrice.getText().toString().equals(\"\"))\n price = Double.parseDouble(inputPrice.getText().toString());\n int calories = 0;\n if (!inputCalories.getText().toString().equals(\"\"))\n calories = Integer.parseInt(inputCalories.getText().toString());\n ArrayList<String> allergies = allergyActions.getAllergies();\n return new Item(name, 0, units, quantityToBuy, 0, allergies, calories, price);\n }", "public void createBox(Context context){\n\t\t\n\t\tLog.d(TAG, \"Begin creating recipe box\");\n\t\t\n\t\t//Open the file containing the recipes\n final Resources resources = context.getResources();\n InputStream inputStream = resources.openRawResource(R.raw.recipes);\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\t\t\n Log.v(TAG, \"Buffered Reader Ready\");\n \n // VAriable to hold the lines as they are read\n\t\tString line;\n try {\n \t//Read in one line from the recipe file \n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tLog.v(TAG, \"Read line from buffer: \" + line);\n\t\t\t\t\n\t\t\t\t//Split the based on the pipe delimiter \"|\"\n\t\t\t\tString[] strings = TextUtils.split(line, \"\\\\|\\\\|\");\n\t\t\t\t\n\t\t\t\t//Position zero will always be the Recipe Name\n\t\t\t\tLog.v(TAG, \"Set recipe name: \" + strings[0]);\n\t\t\t\tString recipeName = strings[0];\n\t\t\t\t\n\t\t\t\t//Position zero will always be the Recipe Name\n\t\t\t\tLog.v(TAG, \"Set recipe description: \" + strings[1]);\n\t\t\t String recipeDescription = strings[1];\n\t\t\t\t\n\t\t\t String splitter = \"\\\\|\";\n\t\t\t \n\t\t\t // The array lists for the recipe\n\t\t\t ArrayList<String> recipeCategories = stringToArrayList(strings[2], splitter);\n\t\t\t\tArrayList<String> recipeIngredients = stringToArrayList(strings[3], splitter);\n\t\t\t ArrayList<String> recipeInstructions = stringToArrayList(strings[4], splitter);\n\t\t\t\t\n\t\t\t\tRECIPES.add(new Recipe(recipeName, recipeDescription, recipeCategories, recipeIngredients, recipeInstructions));\n\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n Log.d(TAG, \"Recipe box complete\");\n\t}", "public Item() {\n }", "public Item() {\n }", "ItemStack getEggItem(IGeneticMob geneticMob);", "public Item(String itemName, String itemDescription){\n this.itemName = itemName;\n this.itemDescription = itemDescription;\n}", "public ItemSwordAndShield(Item.ToolMaterial mat)\n/* 21: */ {\n/* 22:20 */ super(mat, \"\");\n/* 23:21 */ if (mat == Item.ToolMaterial.IRON) {\n/* 24:22 */ this.isIron = true;\n/* 25: */ } else {\n/* 26:24 */ this.isIron = false;\n/* 27: */ }\n/* 28: */ }", "public Item() {\r\n this.name = \"\";\r\n this.description = \"\";\r\n this.price = 0F;\r\n this.type = \"\";\r\n this.available = 0;\r\n this.wholesaler = new Wholesaler();\r\n this.wholesalerId = 0;\r\n this.category = new Category();\r\n this.categoryId = 0; \r\n }", "public static List<RecipeItemSelector> getRequireItemsFromRecipe(IRecipe recipe){\n\t\tif(recipe instanceof ShapelessRecipes){\n\t\t\tList<ItemStack> isList = ((ShapelessRecipes)recipe).recipeItems;\n\t\t\treturn isList.stream().map(input -> RecipeItemSelector.of(input, null)).collect(Collectors.toList());\n\t\t}\n\t\tif(recipe instanceof ShapedRecipes){\n\t\t\tItemStack[] isarray = ((ShapedRecipes)recipe).recipeItems;\n\n\t\t\treturn Lists.<ItemStack>newArrayList(isarray).stream().map( is ->RecipeItemSelector.of(is, null)).collect(Collectors.toList());\n\t\t}\n\t\tif(recipe instanceof ShapelessOreRecipe){\n\n\n\n\t\t\tList<RecipeItemSelector> list1 = (((ShapelessOreRecipe)recipe).getInput()).stream().filter(obj -> obj instanceof ItemStack)\n\t\t\t\t\t.map(obj -> RecipeItemSelector.of((ItemStack)obj, null)).collect(Collectors.toList());\n\t\t\tList<RecipeItemSelector> list2 = (((ShapelessOreRecipe)recipe).getInput()).stream().filter(obj -> obj instanceof String)\n\t\t\t\t\t.map(obj -> RecipeItemSelector.of(null, new OreDict((String)obj))).collect(Collectors.toList());\n\t\t\tList<RecipeItemSelector> rt = Lists.newArrayList();\n\t\t\trt.addAll(list1);\n\t\t\trt.addAll(list2);\n\t\t\treturn rt;\n\n\t\t}\n\t\tif(recipe instanceof ShapedOreRecipe){\n\t\t\tObject[] isarray = ((ShapedOreRecipe)recipe).getInput();\n\t\t\tList<Object> objList = Lists.newArrayList(isarray);\n\t\t\tobjList.stream().flatMap(obj ->{\n\t\t\t\t//\t\t\t\t\tUnsagaMod.logger.trace(\"recipe\", input.getClass());\n\t\t\t\tList<RecipeItemSelector> rt = Lists.newArrayList();\n\t\t\t\tif(obj instanceof List){\n\t\t\t\t\t//\t\t\t\t\t\tUnsagaMod.logger.trace(\"shaped\", \"array\");\n\t\t\t\t\trt.addAll(convertListTypeObject(obj));\n\t\t\t\t}\n\t\t\t\tif(obj instanceof ItemStack){\n\t\t\t\t\t//\t\t\t\t\t\tUnsagaMod.logger.trace(\"shaped\", \"itemstack\");\n\t\t\t\t\tList<RecipeItemSelector> list = Lists.newArrayList(RecipeItemSelector.of((ItemStack)obj, null));\n\t\t\t\t\trt.addAll(list);\n\t\t\t\t}\n\n\t\t\t\t//\t\t\t\t\tif(objs!=null){\n\t\t\t\t//\t\t\t\t\t\tObject[] objarray = (Object[]) objs;\n\t\t\t\t//\t\t\t\t\t\treturn ListHelper.stream(objarray).map(new Function<Object,Tuple<ItemStack,OreDict>>(){\n\t\t\t\t//\n\t\t\t\t//\t\t\t\t\t\t\t@Override\n\t\t\t\t//\t\t\t\t\t\t\tpublic Tuple<ItemStack, OreDict> apply(Object input) {\n\t\t\t\t//\t\t\t\t\t\t\t\tUnsagaMod.logger.trace(\"shaped\", input);\n\t\t\t\t//\t\t\t\t\t\t\t\tif(input instanceof ItemStack){\n\t\t\t\t//\t\t\t\t\t\t\t\t\treturn Tuple.of((ItemStack)input,null);\n\t\t\t\t//\t\t\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t\t\t\tif(input instanceof String){\n\t\t\t\t//\t\t\t\t\t\t\t\t\treturn Tuple.of(null, new OreDict((String) input));\n\t\t\t\t//\t\t\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t//\t\t\t\t\t\t\t}}\n\t\t\t\t//\t\t\t\t\t\t).getList();\n\t\t\t\t//\t\t\t\t\t}\n\n\t\t\t\treturn rt.stream();\n\t\t\t});\n\t\t}\n\t\tHSLib.logger.trace(\"recipeutil\", \"どのレシピにも合致しない?\");\n\t\treturn Lists.newArrayList();\n\t}", "public static void registerShapelessRecipe(ItemStack output, ItemStack input) {\n\t\tGameRegistry.addShapelessRecipe(output, input);\n\t}", "private static String getItemRarity(String[] itemSlot){\r\n String rarity = \"\";\r\n if(itemSlot[0].equals(\"Leather Helmet\")){\r\n leatherHelmet LeatherHelmet = new leatherHelmet();\r\n rarity = LeatherHelmet.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Chest Plate\")){\r\n leatherChestPlate LeatherChestPlate = new leatherChestPlate();\r\n rarity = LeatherChestPlate.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Boots\")){\r\n leatherBoots LeatherBoots = new leatherBoots();\r\n rarity = LeatherBoots.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Gloves\")){\r\n leatherGloves LeatherGloves = new leatherGloves();\r\n rarity = LeatherGloves.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Boots\")){\r\n ironBoots IronBoots = new ironBoots();\r\n rarity = IronBoots.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Helmet\")){\r\n ironHelmet IronHelmet = new ironHelmet();\r\n rarity = IronHelmet.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Chest Plate\")){\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n rarity = IronChestPlate.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Gloves\")){\r\n ironGloves IronGloves = new ironGloves();\r\n rarity = IronGloves.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Short Sword\")){\r\n shortSword ShortSword = new shortSword();\r\n rarity = ShortSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Long Sword\")){\r\n longSword LongSword = new longSword();\r\n rarity = LongSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Great Sword\")){\r\n greatSword GreatSword = new greatSword();\r\n rarity = GreatSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Heaven Smiting Devil Slayer Sword\")){\r\n heavenSmitingDevilSlayerSword Honger = new heavenSmitingDevilSlayerSword();\r\n rarity = Honger.getRarity();\r\n return rarity;\r\n }\r\n return rarity;\r\n }", "public Item() {\n\t\tthis(rand.nextDouble() * GameManager.NATIVE_WIDTH, -30.0, PowerUp[new Random().nextInt(PowerUp.length)]);\n\t}", "public Item(){\n description = \"No description avaible for this item\";\n weight = 0;\n }", "public ArtItemBuilder(){\n this.r = new Random();\n }", "RecipeObject getRecipe(int recipeID);", "@Override\n public RecipeViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // Inflate the recipe_item to a view\n View view = LayoutInflater.from(mContext)\n .inflate(R.layout.recipe_item, parent, false);\n\n return new RecipeViewHolder(view);\n }", "public static ItemIngredient of(Item input) {\n\t\treturn new ItemStackIngredient(new ItemStack(input, 1, OreDictionary.WILDCARD_VALUE));\n\t}", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public static void createRecipe(Recipe r, final Shell shell)\r\n {\n final Shell newShell = new Shell(shell.getDisplay());\r\n GridLayout gridLayout = new GridLayout();\r\n gridLayout.numColumns = 1;\r\n newShell.setLayout(gridLayout);\r\n newShell.setSize(800, 600);\r\n newShell.addShellListener(new ShellListener()\r\n {\r\n\r\n public void shellActivated(ShellEvent shellevent)\r\n {\r\n }\r\n\r\n public void shellClosed(ShellEvent shellevent)\r\n {\r\n shell.setEnabled(true);\r\n }\r\n\r\n public void shellDeactivated(ShellEvent shellevent)\r\n {\r\n }\r\n\r\n public void shellDeiconified(ShellEvent shellevent)\r\n {\r\n }\r\n\r\n public void shellIconified(ShellEvent shellevent)\r\n {\r\n }\r\n });\r\n shell.setEnabled(false);\r\n\r\n // Construct edit window\r\n createEditWin(r, newShell);\r\n newShell.open();\r\n }", "public void OnRecipeSelected();", "public Recipe(int inProduced)\n\t{\n\t\tthis.produced = inProduced;\n\t\tingredients = new ArrayList<Ingredient>();\n\t}", "public static Item generate(){\n\n //this method lists a collection of new items. it then uses a random number generator\n //to pick one of the objects, and then returns the object so that the main method\n //can add it to the inventory.\n\n ItemType weapon = ItemType.weapon;\n Item IronSword = new Item(weapon, \"Iron Sword\", 8, 50, 10);\n Item GoldenSword = new Item(weapon, \"Golden Sword\", 10, 75, 15);\n Item AllumSword = new Item(weapon, \"Alluminum Sword\", 6, 35, 8);\n Item BowandQuiver = new Item(weapon, \"Bow & Quiver\", 4, 45, 7);\n Item BattleAxe = new Item(weapon, \"Battle Axe\", 12, 55, 13);\n\n ItemType armor = ItemType.armor;\n Item ChainChest = new Item(armor, \"Chain Mail Chestplate\", 8, 40, 30);\n Item IronChest = new Item(armor, \"Iron Chestplate\", 10, 50, 40);\n Item GoldenChest = new Item(armor, \"Golden Chestplate\", 12, 65, 50);\n Item ChainPants = new Item(armor, \"Chain Mail Pants\", 7, 40, 30);\n Item IronPants = new Item(armor, \"Iron Pants\", 9, 50, 40);\n Item GoldenPants = new Item(armor, \"Golden Pants\", 11, 65, 50);\n Item Helmet = new Item(armor, \"Helmet\", 5, 40, 20);\n\n ItemType other = ItemType.other;\n Item Bandage = new Item(other, \"Bandage\", 1, 2, 0);\n Item Wrench = new Item(other, \"Wrench\", 3, 10, 5);\n Item Bread = new Item(other, \"Bread Loaf\", 2, 4, 0);\n Item Water = new Item(other, \"Water Flask\", 3, 2, 0);\n\n Item Initializer = new Item(other, \"init\", 0, 0, 0);\n\t\tint ItemPick = RandomNum();\n Item chosen = Initializer;\n\n switch (ItemPick){\n case 1:\n chosen = IronSword;\n break;\n case 2:\n chosen = GoldenSword;\n break;\n case 3:\n chosen = AllumSword;\n break;\n case 4:\n chosen = BowandQuiver;\n break;\n case 5:\n chosen = BattleAxe;\n break;\n case 6:\n chosen = ChainChest;\n break;\n case 7:\n chosen = IronChest;\n break;\n case 8:\n chosen = GoldenChest;\n break;\n case 9:\n chosen = ChainPants;\n break;\n\t\t\t case 10:\n chosen = IronPants ;\n break;\n case 11:\n chosen = GoldenPants;\n break;\n case 12:\n chosen = Helmet;\n break;\n case 13:\n chosen = Bandage;\n break;\n case 14:\n chosen = Wrench;\n break;\n case 15:\n chosen = Bread;\n break;\n case 16:\n chosen = Water;\n break;\n }\n\n return chosen;\n }", "public FlyerFeaturedItem() {}", "public void create(RecognizedItem item, SketchBook model) {\n }", "@Override public void onRecipeClicked(RecipeModel recipeModel) {\n }", "@Override\n\tpublic void initRecipes()\n\t{\n\n\t}", "public Object getItem(Node itemNode) throws XmlRecipeException;", "private void addItem() {\n\n ItemBean bean2 = new ItemBean();\n int drawableId2 = getResources().getIdentifier(\"ic_swrl\", \"drawable\", this.getPackageName());\n bean2.setAddress(drawableId2);\n bean2.setName(getResources().getString(R.string.swrl));\n itemList.add(bean2);\n\n ItemBean bean3 = new ItemBean();\n int drawableId3 = getResources().getIdentifier(\"ic_bianmin\", \"drawable\", this.getPackageName());\n bean3.setAddress(drawableId3);\n bean3.setName(getResources().getString(R.string.bianmin));\n itemList.add(bean3);\n\n ItemBean bean4 = new ItemBean();\n int drawableId4 = getResources().getIdentifier(\"ic_shenghuo\", \"drawable\", this.getPackageName());\n bean4.setAddress(drawableId4);\n bean4.setName(getResources().getString(R.string.shenghuo));\n itemList.add(bean4);\n\n ItemBean bean5 = new ItemBean();\n int drawableId5 = getResources().getIdentifier(\"ic_nxwd\", \"drawable\", this.getPackageName());\n bean5.setAddress(drawableId5);\n bean5.setName(getResources().getString(R.string.nxwd));\n// itemList.add(bean5);\n\n }", "ArrayList<RecipeObject> getRecipes();", "@Override\n public Item getItem(int position) {\n return snakes.get(position);\n }", "private ItemStack getToolWhenHasnt() {\r\n\t\treturn this.item;\r\n\t}", "public void addRecipe(Recipe recipe){\n //recipes.add(recipe);\n if(recipe != null){\n recipes.add(recipe);\n }\n }", "public ItemStack getItem() {\n ItemStack item = new ItemStack(material, 1);\n ItemMeta meta = item.getItemMeta();\n meta.setDisplayName(displayName);\n item.setItemMeta(meta);\n return item;\n }", "protected Item() {\n }", "public interface IItem {\n // Which hotbar slot the item is stored in\n int getItemID();\n\n // Path to the item image\n String getItemImage();\n\n // Activates the item\n void activate();\n}", "public Recipe(Item[] inputs, Item output, int craftingLevel) {\n this.inputs = Arrays.asList(inputs);\n this.output = output;\n this.craftingLevel = craftingLevel;\n this.id = nextId++;\n RECIPE_INDEX.put(id, this);\n }", "public void rebajoIngredientes() {\n }", "private static void registerCustomRecipes() {\n if(Configs.isEnabled(BloodContainerConfig.class) && Configs.isEnabled(DarkTankConfig.class)) {\n for(int i = 0; i < BloodContainerConfig.getContainerLevels(); i++) {\n \tItemStack input = new ItemStack(BloodContainer.getInstance(), 1, i);\n if(!BloodContainer.getInstance().isCreativeItem(input)) {\n \tfinal int capacity = BloodContainer.getInstance().getCapacity(input);\n \tItemStack result = new ItemStack(DarkTank.getInstance());\n GameRegistry.addRecipe(new ObservableShapelessRecipe(result,\n new Object[]{\n \t\t\tinput,\n \t\t},\n new IRecipeOutputObserver() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic ItemStack getRecipeOutput(\n\t\t\t\t\t\t\t\t\t\tInventoryCrafting grid,\n\t\t\t\t\t\t\t\t\t\tItemStack output) {\n\t\t\t\t\t\t\t\t\tItemBlockFluidContainer container = (ItemBlockFluidContainer) output.getItem();\n\t\t\t\t \tcontainer.setCapacity(output, capacity);\n\t\t\t\t \tItemStack input = null;\n\t\t\t\t \tfor(int j = 0; j < grid.getSizeInventory(); j++) {\n\t\t\t\t \t\t\tItemStack element = grid.getStackInSlot(j);\n\t\t\t\t \t\t\tif(element != null && element.getItem() == BloodContainer.getInstance()) {\n\t\t\t\t \t\t\t\tinput = element;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t}\n\t\t\t\t \tif(input == null) {\n\t\t\t\t \t\treturn null;\n\t\t\t\t \t}\n\t\t\t\t \tFluidStack resource = BloodContainer.getInstance().getFluid(input);\n\t\t\t\t \tif(resource != null && resource.amount > 0) {\n\t\t\t\t \t\tcontainer.fill(output, resource, true);\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\treturn output;\n\t\t\t\t\t\t\t\t}\n \t\n }\n ));\n }\n }\n }\n\n // Entangled Chalice unique id\n if(Configs.isEnabled(EntangledChaliceConfig.class)\n && Configs.isEnabled(DarkGemConfig.class)\n && Configs.isEnabled(CorruptedTearConfig.class)) {\n Item tear = CorruptedTearConfig._instance.getItemInstance();\n GameRegistry.addRecipe(new ObservableShapedRecipe(3, 3, new ItemStack[]{\n new ItemStack(Items.gold_ingot), new ItemStack(tear), new ItemStack(Items.gold_ingot),\n new ItemStack(DarkGem.getInstance()), new ItemStack(Items.gold_ingot), new ItemStack(DarkGem.getInstance()),\n new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot)\n }, new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 2), new IRecipeOutputObserver() {\n @Override\n public ItemStack getRecipeOutput(InventoryCrafting craftingGrid, ItemStack output) {\n ItemStack newStack = output.copy();\n EntangledChaliceItem item = (EntangledChaliceItem) Item.getItemFromBlock(EntangledChalice.getInstance());\n item.setNextTankID(newStack);\n return newStack;\n }\n }));\n\n GameRegistry.addRecipe(new ObservableShapedRecipe(3, 3, new ItemStack[]{\n new ItemStack(Items.gold_ingot), new ItemStack(tear), new ItemStack(Items.gold_ingot),\n new ItemStack(DarkGem.getInstance()), new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 1, OreDictionary.WILDCARD_VALUE), new ItemStack(DarkGem.getInstance()),\n new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot), new ItemStack(Items.gold_ingot)\n }, new ItemStack(Item.getItemFromBlock(EntangledChalice.getInstance()), 2), new IRecipeOutputObserver() {\n @Override\n public ItemStack getRecipeOutput(InventoryCrafting craftingGrid, ItemStack output) {\n ItemStack newStack = output.copy();\n EntangledChaliceItem item = (EntangledChaliceItem) Item.getItemFromBlock(EntangledChalice.getInstance());\n String tankID = item.getTankID(craftingGrid.getStackInSlot(4));\n item.setTankID(newStack, tankID);\n return newStack;\n }\n }));\n }\n \n // Dark tank upgrades\n if(Configs.isEnabled(DarkTankConfig.class)) {\n \tfor(int i = 1; i < 9; i++) {\n \t\tItemBlockFluidContainer tankItem = (ItemBlockFluidContainer) Item.getItemFromBlock(DarkTank.getInstance());\n\t \tGameRegistry.addRecipe(new ItemBlockFluidContainerCombinationRecipe(i, tankItem));\n \t}\n }\n\n // Blood Extractor upgrades\n if(Configs.isEnabled(BloodExtractorConfig.class) && Configs.isEnabled(DarkTankConfig.class)) {\n for(int i = 1; i < 9; i++) {\n GameRegistry.addRecipe(new BloodExtractorCombinationRecipe(i));\n }\n }\n \t\n if (Configs.isEnabled(EnvironmentalAccumulatorConfig.class)) {\n ItemStack outputStack = null;\n String recipeName = null;\n \n // Add the different weather container recipes\n if (Configs.isEnabled(WeatherContainerConfig.class)) {\n\t ItemStack emptyContainer = WeatherContainer.createItemStack(WeatherContainerTypes.EMPTY, 1);\n\t WeatherType[] weatherInputs = {WeatherType.CLEAR, WeatherType.LIGHTNING, WeatherType.RAIN};\n\t WeatherType[] weatherOutputs = {WeatherType.RAIN, WeatherType.RAIN, WeatherType.CLEAR};\n\t \n\t for (int i=0; i < weatherInputs.length; ++i) {\n recipeName = \"WeatherContainer\" + weatherInputs[i].getClass().getSimpleName();\n outputStack = WeatherContainer.createItemStack(\n WeatherContainerTypes.getWeatherContainerType(weatherInputs[i]), 1);\n\n EnvironmentalAccumulator.getInstance().getRecipeRegistry().registerRecipe(\n recipeName,\n new EnvironmentalAccumulatorRecipeComponent(\n emptyContainer,\n weatherInputs[i]\n ),\n new EnvironmentalAccumulatorRecipeComponent(\n outputStack,\n weatherOutputs[i]\n ),\n new EnvironmentalAccumulatorRecipeProperties()\n );\n\t }\n }\n\n // Add biome extract recipes\n if(Configs.isEnabled(BiomeExtractConfig.class) && BiomeExtractConfig.hasRecipes) {\n ItemStack emptyContainer = new ItemStack(BiomeExtract.getInstance());\n ItemStack filledContainer = BiomeExtract.getInstance().createItemStack(null, 1); // Still dummy!\n filledContainer.setItemDamage(OreDictionary.WILDCARD_VALUE);\n EnvironmentalAccumulator.getInstance().getRecipeRegistry().registerRecipe(\n recipeName,\n new EnvironmentalAccumulatorRecipeComponent(\n emptyContainer,\n WeatherType.ANY\n ),\n new EnvironmentalAccumulatorRecipeComponent(\n filledContainer,\n WeatherType.ANY\n ),\n new EnvironmentalAccumulatorRecipeProperties(1000, BiomeExtractConfig.envirAccCooldownTime, -1.0D, null, new EnvironmentalAccumulatorRecipeProperties.IEAResultOverride() {\n @Override\n public ItemStack getResult(IBlockAccess world, int x, int y, int z, ItemStack originalResult) {\n World worldSafe = (World) world;\n BiomeGenBase biome = worldSafe.getBiomeGenForCoords(x, z);\n if(BiomeExtractConfig._instance.isCraftingBlacklisted(biome.biomeID)) {\n return BiomeExtract.getInstance().createItemStack(null, 1);\n } else {\n return BiomeExtract.getInstance().createItemStack(biome, 1);\n }\n }\n })\n );\n }\n }\n }", "public Item getItem() { \n return myItem;\n }", "public void smeltItem()\n {\n if (this.canSmelt())\n {\n ItemStack var1 = FurnaceRecipes.smelting().getSmeltingResult(this.furnaceItemStacks[0]);\n\n if (this.furnaceItemStacks[2] == null)\n {\n this.furnaceItemStacks[2] = var1.copy();\n }\n else if (this.furnaceItemStacks[2].isItemEqual(var1))\n {\n ++this.furnaceItemStacks[2].stackSize;\n }\n\n --this.furnaceItemStacks[0].stackSize;\n\n if (this.furnaceItemStacks[0].stackSize <= 0)\n {\n this.furnaceItemStacks[0] = null;\n }\n }\n }", "Item(){\r\n\t\tthis(0, new Weight(5), new DukatAmount(0));\r\n\t}", "@Override\n\tpublic Item craft() {\n\t\treturn null;\n\t}", "public Shoe makeShoe() {\n\treturn new Shoe();\r\n}", "public Item(double x, double y, String itemName) {\n\t\tsuper(x, y);\n\t\tswitch (itemName) {\n\t\tcase \"Powerup_Health\":\n\t\t\turl = \"img/Powerup_Health.png\";\n\t\t\tbreak;\n\t\tcase \"Powerup_Ammo\":\n\t\t\turl = \"img/Powerup_Ammo.png\";\n\t\t\tbreak;\n\t\t}\n\t\tthis.itemName = itemName;\n\t\tsprite = new ImageSprite(this, new Image(url, 48, 29, true, true));\n\t\tsprite.setZ(80);\n\t\taddScript(new ConstantSpeedMove(0, 2)).addScript(new ColliderBox(sprite.getHeight(), sprite.getWidth()))\n\t\t\t\t.addScript(new AutoRemove());\n\t}", "@Override\r\n\tpublic int getRecipeSize() {\r\n\t\treturn this.recipeWidth * this.recipeHeight;\r\n\t}", "public void addIngredientRecipe(ArrayList<IngredientRecipePOJO> ingr);", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "public Item() {\n\t}" ]
[ "0.7049571", "0.68464255", "0.6756895", "0.6735587", "0.6652507", "0.64983016", "0.64682", "0.64434123", "0.63915104", "0.6373052", "0.63729686", "0.63556474", "0.6350446", "0.62368923", "0.6195561", "0.61643714", "0.61272806", "0.60929245", "0.60502356", "0.6036016", "0.6035548", "0.6033196", "0.6026307", "0.5994742", "0.59934485", "0.59851444", "0.59809285", "0.5971754", "0.59619117", "0.59613913", "0.5953661", "0.594926", "0.59481764", "0.59424686", "0.5909617", "0.59035486", "0.58892816", "0.58825594", "0.58822125", "0.58777976", "0.5871849", "0.58705306", "0.5863174", "0.5851096", "0.58486325", "0.5840434", "0.5837144", "0.58337605", "0.58324873", "0.5816901", "0.5814482", "0.58108604", "0.58054256", "0.5802104", "0.5802104", "0.5801147", "0.5795647", "0.5793062", "0.5769195", "0.5745696", "0.57418585", "0.5740406", "0.5740242", "0.57324815", "0.570951", "0.57027197", "0.5699133", "0.5691208", "0.56910145", "0.5689714", "0.56855404", "0.568145", "0.56801265", "0.56710255", "0.5649774", "0.56374514", "0.56356144", "0.56336147", "0.5629614", "0.5628623", "0.56183594", "0.5615851", "0.56080407", "0.56070995", "0.56065786", "0.559603", "0.559426", "0.55941576", "0.5593238", "0.5592984", "0.5583556", "0.55753785", "0.5567459", "0.55649406", "0.5558713", "0.5553116", "0.55435014", "0.5543339", "0.55341804", "0.5531539" ]
0.5662925
74
Inserts a word into the trie.
public void insert(String word) { TrieNode cur = root; for(int i=0; i<word.length(); i++){ int index = word.charAt(i)-'a'; if(cur.children[index] == null) cur.children[index] = new TrieNode(word.charAt(i)); cur = cur.children[index]; if(i == word.length()-1) cur.isEnd = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(String word) {\n\t\t\tTrieNode curr = root;\n\t\t\tfor (char c : word.toCharArray()) {\n\t\t\t\tif (!curr.children.containsKey(c))\n\t\t\t\t\tcurr.children.put(c, new TrieNode());\n\t\t\t\tcurr = curr.children.get(c);\n\t\t\t}\n\t\t\tcurr.isWord = true;\n\t\t}", "public void insert(String word) {\n\t\tTrie curr = this;\n\t\tfor(Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch - 'a'];\n\t\t\t\n\t\t\tif (n == null) {\n\t\t\t\tn = new Trie();\n\t\t\t\tn.isWord = false;\n\t\t\t\tcurr.nodes[ch - 'a'] = n;\n\t\t\t}\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\tcurr.isWord = true;\n\t}", "public void insert(String word) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<word.length(); ++i)\n\t {\n\t \tchar c = word.charAt(i);\n\t \tif(p.children[c-'a']==null)\n\t \t\tp.children[c-'a'] = new TrieNode(c);\n\t \tp = p.children[c-'a'];\n\t }\n\t p.mark = true;\n\t }", "public void insert(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (!node.containsKey(c)) {\n\t\t\t\tnode.put(c);\n\t\t\t}\n\t\t\tnode = node.get(c);\n\t\t}\n\t\tnode.setEnd();\n\t}", "public void insert(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null) {\n n.children[c] = new TrieNode();\n }\n n = n.children[c];\n }\n n.isWord = true;\n n.word = word;\n }", "public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}", "public void insert(String word) {\n \tTrieNode cur=root;\n \tfor (int i = 0; i < word.length(); i++) {\n \t\t\tint ch=word.charAt(i)-'a';\n \t\t\tif(cur.next[ch]==null) {\n \t\t\t\tcur.next[ch]=new TrieNode();\n \t\t\t}\n \t\t\tcur=cur.next[ch];\n \t\t}\n \tcur.val=word;\n \tcur.isEnd=true;\n }", "public void insert(String word) {\n\t\t\n\t\tTrieNode current = root;\n\t\t\t\t\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\n\t\t\tCharacter ch = word.charAt(i);\n\t\t\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);\t\n\t\t}\n\t\t\n\t\tcurrent.isLeaf = true;\t \n\t}", "public void insert(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n}", "public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }", "public void insert(String word) {\n TrieNode curr = root;\n for(char c : word.toCharArray()) {\n int idx = c - 'a';\n if(curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }", "public void insert(String word) {\n\n int length = word.length();\n TrieNode node = root;\n for(int i=0; i<length; i++) {\n char curr = word.charAt(i);\n if(!node.containsKey(curr)){\n node.put(curr, new TrieNode());\n }\n node = node.get(curr);\n }\n node.setEnd();\n }", "public void insert(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] == null) {\n root.next[c - 'a'] = new Trie();\n }\n root = root.next[c - 'a'];\n }\n root.word = word;\n }", "public void insert(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n p.children[childIndex] = new TrieNode();\n }\n p = p.children[childIndex];\n }\n p.isWord = true;\n }", "public void insert(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (node.ch[c - 'a'] == null) {\n node.ch[c - 'a'] = new TrieNode();\n }\n node = node.ch[c - 'a'];\n }\n node.word = word;\n }", "public void insert(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node=curr.hmap.get(c);\n if(node==null){\n node=new TrieNode();\n curr.hmap.put(c, node);\n }\n curr=node;\n }\n curr.endOfWord=true;\n }", "public void insert(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n node.children[c - 'a'] = new TrieNode();\n\n node = node.children[c - 'a'];\n }\n\n node.word = word;\n }", "public void insert(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(!tn.hm.containsKey(c)){\n tn = new TrieNode();\n tn.hm.put(c, temp);\n }\n tn = temp;\n }\n tn.flag = true;\n }", "public void insert(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n ptr.child[c - 'a'] = new TrieNode();\n }\n ptr = ptr.child[c - 'a'];\n }\n ptr.is_end = true;\n }", "public void insert(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n current.childrens[index] = new TrieNode(c);\n current = current.childrens[index];\n }\n current.eow = true;\n }", "public void insert(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n TrieNode child = new TrieNode(ch);\n cur.children.put(ch, child);\n }\n cur = cur.children.get(ch);\n }\n cur.isEnd = true;\n }", "public void insert(String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }", "public void insert(String word) {\n TrieNode node = root;\n\n // for each char in the word, add to the TrieNode\n for (char c: word.toCharArray()) {\n // if there are no such child, then we add it\n if (node.children[c - 'a'] == null) {\n node.children[c - 'a'] = new TrieNode(c);\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n\n }\n // mark the isWord\n node.isWord = true;\n }", "public void insert(String word) {\n TrieNode cur = root;\n HashMap<Character, TrieNode> curChildren = root.children;\n char[] wordArray = word.toCharArray();\n for(int i = 0; i < wordArray.length; i++){\n char wc = wordArray[i];\n if(curChildren.containsKey(wc)){\n cur = curChildren.get(wc);\n } else {\n TrieNode newNode = new TrieNode(wc);\n curChildren.put(wc, newNode);\n cur = newNode;\n }\n curChildren = cur.children;\n if(i == wordArray.length - 1){\n cur.hasWord= true;\n }\n }\n }", "public void insert(String word){\n //initially curr is root\n TrieNode curr = root;\n for(int i=0; i<word.length(); i++){\n char c = word.charAt(i);\n //if char doesnot exist, add new trienode\n if(curr.children[c-'a'] == null){\n curr.children[c-'a'] = new TrieNode();\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //set curr.word to the word\n curr.word = word;\n }", "public void insert(String word) {\n\n\t\tTrieNode temp = root;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tint c = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null) {\n\t\t\t\ttemp.childrens[c] = new TrieNode();\n\t\t\t}\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\ttemp.isLeafNode = true;\n\t}", "public void insert(String word) {\n \tHashMap<Character, TrieNode> children=root.children;\n \tfor(int i=0;i<word.length();i++)\n \t{\n \t\tchar c=word.charAt(i);\n \t\tTrieNode t;\n \t\tif(children.get(c)!=null)\n \t\t{\n \t\t\tt=children.get(c);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tt=new TrieNode(c);\n \t\t\tchildren.put(c, t);\n \t\t}\n \t\tchildren=t.children;\n \t\tif(i==word.length()-1)\n \t\t\tt.leaf=true;\n \t}\n }", "public void insert(String word) {\n if (word == null || word.length() == 0)\n return;\n TrieNode node = root;\n char [] letters = word.toCharArray();\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null) {\n node.son[pos] = new TrieNode();\n node.son[pos].val = letters[i];\n }\n node = node.son[pos];\n }\n node.isEnd = true;\n }", "public void insert(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n cur.tries[c] = new Trie();\n }\n cur = cur.tries[c];\n i++;\n }\n cur.hasWord = true;\n }", "@Override\n public void insert(final String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n final TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }", "public void insert(String word) {\r\n tree.add(word);\r\n }", "public void insert(String word) {\n insert(root, word, new Object(), 0);\n }", "public void insert(String word) {\n if (word == null) {\n return;\n }\n TrieNode parent = root;\n char[] charArr = word.toCharArray();\n for (int n = 0; n < charArr.length; n++) {\n Map<Character, TrieNode> currentMap = parent.children;\n if (!currentMap.containsKey(charArr[n])) {\n currentMap.put(charArr[n], new TrieNode(charArr[n]));\n }\n parent = currentMap.get(charArr[n]);\n }\n parent.children.put('\\0', null);\n }", "public void insert(String word) {\n this.root.insert(word);\n }", "public void insert(String word) {\n TrieNodeWithWord curr = root;\n\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n // 当前孩子是否存在\n if (curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new TrieNodeWithWord();\n }\n curr = curr.children[c - 'a'];\n }\n // 当前节点结束,存入当前单词\n curr.word = word;\n }", "public void insert(String word) { \n char[] w = word.toCharArray(); \n insert(root, w, 0); \n }", "public void insert(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null){\n point.setChild(ch - 'a', ch);\n }\n point = point.getChild(ch - 'a');\n }\n point.setIsWord();\n }", "public void addWord(String word) {\n trie.insert(word);\n }", "public void insert(String word) {\n Entry tempRoot = root;\n for(int i=0; i<word.length(); i++){\n char ch = word.charAt(i);\n Entry childNode = tempRoot.getChildNode(ch);\n if(childNode == null){\n tempRoot.setChildNode(new Entry(), ch);\n }\n tempRoot = tempRoot.getChildNode(ch);\n }\n\n tempRoot.setIsWord(true);\n }", "public void insert(String word) {\n Node node = root;\n char[] chars = word.toCharArray();\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) {\n next = new Node(null);\n node.children[idx] = next;\n }\n node = next;\n }\n node.val = word;\n }", "public void insert(String word) {\n char[] chars = word.toCharArray();\n int length = chars.length;\n\n Map<Character,Node> map = this.root.map;\n for(int i = 0;i < length;i++){\n if(map.containsKey(chars[i])){\n Node node = map.get(chars[i]);\n }else{\n map.put(chars[i],new Node(chars[i]));\n }\n\n if(i == length - 1){\n map.get(chars[i]).isWordEnd = true;\n }\n map = map.get(chars[i]).map;\n }\n }", "public void insert(String word) {\n var node = root;\n for(char currentChar : word.toCharArray()){\n if(!node.containsKey(currentChar)) {\n node.put(currentChar, new Node());\n }\n node = node.get(currentChar);\n }\n node.setEnd();\n }", "public void insert(String word) {\n Node curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n subNode = new Node(c);\n curr.subNodes[c - 'a'] = subNode;\n }\n if (i == word.length() - 1) {\n subNode.isWord = true;\n }\n curr = subNode;\n }\n }", "public void insert(String word) {\n TrieNode parent = root;\n for(int i=0; i<word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n\n // Character doesn't exist at the current level\n if (parent.children[index] == null) {\n TrieNode node = new TrieNode();\n parent.children[index] = node;\n parent = node;\n } else {\n parent = parent.children[index];\n }\n }\n parent.isLeaf = true;\n }", "public void insert(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null)\n current.children[c] = new Node(c);\n current = current.children[c];\n }\n current.isWord = true;\n }", "public void insert(String word) {\n Node curr = root;\n\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n\n if(curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new Node(c);\n }\n\n curr = curr.children[c - 'a'];\n }\n\n curr.isWord = true;\n }", "public void insert(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }", "public void insert(String word) {\n char[] chars = word.toCharArray();\n Node theNode = root;\n for (char c : chars) {\n if (!theNode.leaf) theNode.leaf = false;\n if (theNode.children.containsKey(c)) {\n theNode = theNode.children.get(c);\n } else {\n Node newNode = new Node(c);\n theNode.children.put(c, newNode);\n theNode = newNode;\n }\n }\n theNode.leaf = true;\n }", "public void insert(String word) {\n char [] words=word.toCharArray();\n CharTree t=root;\n for (char c : words) {\n if(t.next[c-97]==null){\n t.next[c-97]=new CharTree();\n }\n t=t.next[c-97];\n }\n t.isend=true;\n }", "@Override\n public void insert(String word) {\n root = insertIterative(word, root);\n }", "public void insert(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n currentNode.children.set(currentChar - 'a', new Node(false));\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n currentNode.setIsFinished(true);\n }", "public void insert(String word) {\r\n\t\tchar[] letterArray = word.toCharArray(); // iterate through letters in\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\t\tNode currNode = root;\r\n\t\tint wordLength = letterArray.length;\r\n\t\tfor (int i = 0; i < wordLength; i++) {\r\n\t\t\tchar letter = letterArray[i];\r\n\t\t\tif (currNode.isChild(letter)) { // if letter is a child of currNode\r\n\t\t\t\tcurrNode = currNode.getChild(letter); // set that node as\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// currNode\r\n\t\t\t\tif (i == wordLength - 1)\r\n\t\t\t\t\tcurrNode.wordEnd(); // if letter is end of a word, change\r\n\t\t\t\t\t\t\t\t\t\t// that node's boolean flag\r\n\t\t\t} else { // if letter is not a child of currNode\r\n\t\t\t\tif (i == wordLength - 1) {\r\n\t\t\t\t\tcurrNode.addChild(letter, new Node(currNode, letter, true)); // create\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// appropriate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// with\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// flag\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcurrNode.addChild(letter, new Node(currNode, letter, false)); // checking\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// see\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// letter\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// is\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// also\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// end\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// word\r\n\t\t\t\t}\r\n\t\t\t\tcurrNode = currNode.getChild(letter); // update currNode\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n }", "public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (now.children[c - 'a'] == null) {\n now.children[c - 'a'] = new TrieNode();\n }\n now = now.children[c - 'a'];\n }\n now.hasWord = true;\n }", "public void insert(String word) {\n if(word==null)\n return;\n int wordLen=word.length();\n if(wordLen==0)\n return;\n char []wordArr=word.toCharArray();\n Node tempNode=root;\n for(int i=0;i<wordLen && Character.isLetter(wordArr[i]);i++){ //只能插入小写字母\n if(tempNode.subNode(wordArr[i])==null){\n Node newNode=new Node(wordArr[i]);\n newNode.number=1;\n if(i==wordLen-1)\n newNode.isEnd=true;\n tempNode.childList.add(newNode);\n tempNode=newNode;\n }else{\n Node oldNode=tempNode.subNode(wordArr[i]);\n oldNode.number++;\n tempNode=oldNode;\n }\n }\n }", "public void insert(String word) {\n Node temp = this.root;\n while(word.length()!=0){\n char c = word.charAt(0);\n word = word.substring(1);\n int index = (int)c -97;\n if(temp.children[index]==null){\n temp.children[index] = new Node(c);\n }\n temp = temp.children[index];\n }\n temp.isEnd = true;\n \n }", "public void addWord(String word) {\n TrieNode cur = root;\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n TrieNode node = cur.children.get(c);\n if(node == null) {\n node = new TrieNode();\n cur.children.put(c, node);\n }\n cur = node;\n }\n cur.isEnd = true;\n }", "public void addWord(String word) {\n // Write your code here\n TrieNode cur=root;\n for(int i=0;i<word.length();++i){\n char c=word.charAt(i);\n TrieNode nextNode=cur.children.get(c);\n if(nextNode==null){\n nextNode=new TrieNode();\n cur.children.put(c,nextNode);\n }\n cur=nextNode;\n }\n cur.hasWord=true;\n }", "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 addWord(String word) {\n TrieNode node = root;\n char[] words = word.toCharArray();\n for (char c: words){\n if (node.children[c-'a'] == null){\n node.children[c-'a']=new TrieNode();\n }\n node = node.children[c-'a'];\n }\n node.item = word;\n }", "public void addWord(String word) {\r\n Trie node = root;\r\n for(char ch: word.toCharArray()){\r\n if(node.child[ch - 'a'] == null)\r\n node.child[ch - 'a'] = new Trie(ch);\r\n node = node.child[ch - 'a'];\r\n }\r\n node.end = true;\r\n }", "public void addWord(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n curr = curr.chars.computeIfAbsent(c, (k) -> new TrieNode());\n\n }\n curr.isWord = true;\n }", "public void addWord(String word) {\n if (word != null){\n Map<Character, TrieNode> children=root.children;\n for (int i=0;i<word.length();i++){\n char c=word.charAt(i);\n TrieNode t;\n if (children.containsKey(c)){\n t=children.get(c);\n }else {\n t=new TrieNode(c);\n children.put(c, t);\n }\n children=t.children;\n if (i==word.length()-1){\n t.isLeaf=true;\n }\n }\n }\n }", "public void addWord(String word)\n {\n TrieNode1 node = root;\n for (char c:word.toCharArray())\n {\n if (node.childerens[c-'a']==null)\n {\n node.childerens[c-'a'] = new TrieNode1();\n }\n node = node.childerens[c-'a'];\n }\n node.isEnd = true;\n\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for(char c : word.toCharArray()) {\n if(cur.next[c-'a'] == null) {\n cur.next[c-'a'] = new TrieNode(c);\n }\n cur = cur.next[c-'a'];\n }\n cur.isWord = true;\n }", "public void addWord(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (!node.children.containsKey(c)) {\n node.children.put(c, new TrieNode());\n }\n node = node.children.get(c);\n }\n node.isEnd = true;\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for (int i=0; i<word.length(); i++) {\n int pos = word.charAt(i) - 'a';\n if (cur.next[pos] == null) {\n cur.next[pos] = new TrieNode();\n }\n cur = cur.next[pos];\n }\n cur.isWord = true;\n }", "public void addWord(String word) {\n \tTrieNode curr=root;\n for(int i=0;i<word.length();i++){\n \tchar ch=word.charAt(i);\n \tif(curr.children[ch-'a']==null)\n \t\tcurr.children[ch-'a']=new TrieNode();\n \tif(i==word.length()-1)\n \t\tcurr.children[ch-'a'].isCompleteword=true;\n \t\n \tcurr=curr.children[ch-'a'];\n }\n }", "public void addWord(String word) {\n char[] wordChars = word.toCharArray();\n TrieNode curr = root;\n for (char c : wordChars) {\n if(curr.map.containsKey(c)) {\n curr = curr.map.get(c);\n } else {\n TrieNode newNode = new TrieNode();\n curr.map.put(c, newNode);\n curr = newNode;\n }\n }\n curr.isLeaf = true;\n }", "public void addWord(String word) {\n TrieNode curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (curr.children[c - 'a'] == null )\n curr.children[c - 'a'] = new TrieNode();\n curr = curr.children[c - 'a'];\n }\n curr.end = true;\n }", "public void insert(String word) {\n if (word == null) {\n return;\n }\n if (value == null) {\n value = new ArrayList<>();\n }\n value.add(word);\n }", "public void addWord(String word) {\n root = put(root, word, 0);\n }", "public void addWord(String word) {\n HashMap<Character, TrieNode> children = root.children;\n TrieNode Tnode;\n char[] charArray = word.toCharArray();\n for (int i = 0; i < word.length(); i++) {\n if (children.containsKey(charArray[i])) {\n Tnode = children.get(charArray[i]);\n }\n else\n {\n Tnode = new TrieNode(charArray[i]);\n children.put(charArray[i], Tnode);\n }\n children = Tnode.children;\n\n if (i == word.length() - 1) {\n Tnode.isLeaf = true;\n }\n }\n }", "public void addWord(String word) {\n CharNode target = root ;\n for(int i=0; i<word.length(); i++) {\n target = target.insertCharInChildren(word.charAt(i)) ;\n }\n target.end = true ;\n }", "public void addWord(String word) {\n //Corner Case\n if(word == null || word.length() == 0){\n return;\n }\n TrieNode node = root;\n int d = 0;\n \n while(d<word.length()){\n char c = word.charAt(d);\n if(node.next[c-'a']==null){\n node.next[c-'a'] = new TrieNode();\n }\n node = node.next[c-'a'];\n d++;\n }\n \n node.isWord = true;\n }", "public void addWord(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }", "public void addWord(String word) {\n all.add(word);\n TrieNode head = root;\n \n for (char i :word.toCharArray()){\n\n int k = i-'a';\n if (head.child[k]==null)\n {\n head.child[k] = new TrieNode();\n }\n head = head.child[k];\n \n }\n head.end = true;\n }", "public void addWord(String word) {\n root.addWord(word);\n }", "public void insert(String word, Point point)\r\n\t{\r\n\t\t//call insert\r\n\t\troot.insert(new Data(word, point));\r\n\t}", "public void addWord(String word) {\n maxLength = Math.max(maxLength, word.length());\n\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (temp.children[c - 'a'] == null) {\n temp.children[c - 'a'] = new TrieNode(c);\n }\n temp = temp.children[c - 'a'];\n }\n temp.isWord = true;\n }", "public void addWord(Word word);", "public void addWord(String word) {\r\n Node node = root;\r\n for(char c : word.toCharArray()){\r\n node.nodes[c-'a'] = new Node();\r\n node = node.nodes[c-'a'];\r\n }\r\n node.isLeaf = true;\r\n }", "public void addWord(String word) {\n if (word !=null && word.length() > 0) {\n TrieNode t = this.root;\n for (int i = 0; i < word.length(); i++) {\n int offset = word.charAt(i) - 'a';\n if (t.children[offset] == null) {\n t.children[offset] = new TrieNode();\n }\n t = t.children[offset];\n if (i == word.length() - 1) {\n t.endWithWord = true;\n }\n }\n }\n }", "public void add(String alphabetizedWord, String word){\n int index = word.length();\n if(index >= tree.size()){\n tree.setSize(index + 1);\n }\n if(tree.get(index) == null){\n tree.set(index, new Trie());\n }\n //add word to appropriate trie\n tree.get(index).addWord(alphabetizedWord, word);\n }", "public void insert(String word, DictionaryData data) {\r\n\r\n dictionaryMap.put(word.toUpperCase(),data);\r\n }", "void insert(String mappedNumber, String word);", "private void insertInTree(String word, GTreeIF<Node> node) {\n\t\t\t\t\n\t\tif(word.length()>0){\n\t\t\t\t\n\t\t\t\t\tif(node.getNumChildren()==0){\n\t\t\t\t\t\tGTreeIF<Node> subarbol = new GTree<Node>();\n\t\t\t\t\t\tNode hijo = new LetterNode(word.charAt(0));\n\t\t\t\t\t\tsubarbol.setRoot(hijo);\n\t\t\t\t\t\tnode.addChild(node.getNumChildren()+1, subarbol);\n\t\t\t\t\t\tinsertInTree(word.substring(1),node.getChild(node.getNumChildren()));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tLetterNode aux;\n\t\t\t\t\t\tint i=1;\n\t\t\t\t\t\tboolean igual=false;\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif(node.getChild(i).getRoot().getNodeType()==NodeType.LETTERNODE) {\n\t\t\t\t\t\t\t\taux= (LetterNode) node.getChild(i).getRoot();\n\t\t\t\t\t\t\t\tif(aux.getCharacter()==word.charAt(0))\n\t\t\t\t\t\t\t\t\tigual=true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}while(!igual && i<=node.getNumChildren());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(igual)\n\t\t\t\t\t\t\tinsertInTree(word.substring(1),node.getChild(i-1));\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tGTreeIF<Node> subarbol2= new GTree<Node>();\n\t\t\t\t\t\t\t\tNode hijo = new LetterNode(word.charAt(0));\n\t\t\t\t\t\t\t\tsubarbol2.setRoot(hijo);\n\t\t\t\t\t\t\t\tboolean inserto=false;\n\t\t\t\t\t\t\t\tint count=1;\n\t\t\t\t\t\t\t\tLetterNode nodoaux;\n\t\t\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\t\t\tif(node.getChild(count).getRoot().getNodeType()==NodeType.LETTERNODE) {\n\t\t\t\t\t\t\t\t\t\tnodoaux=(LetterNode) node.getChild(count).getRoot();\n\t\t\t\t\t\t\t\t\t\tif(nodoaux.getCharacter()>word.charAt(0)) {\n\t\t\t\t\t\t\t\t\t\t\tnode.addChild(count, subarbol2);\n\t\t\t\t\t\t\t\t\t\t\tinserto=true;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcount++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}while(!inserto && count<=node.getNumChildren());\n\t\t\t\t\t\t\t\tif(!inserto) {\n\t\t\t\t\t\t\t\t\tnode.addChild(count, subarbol2);\n\t\t\t\t\t\t\t\t\tinsertInTree(word.substring(1),node.getChild(count));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\ti--;\n\t\t\t\t\t\t\t\t\tinsertInTree(word.substring(1), node.getChild(i));\n\t\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\telse {\n\t\t\t\t\tint count=1;\n\t\t\t\t\tboolean comprobar=false;\n\t\t\t\t\twhile(!comprobar && node.getNumChildren()>=count) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(node.getChild(count).getRoot().getNodeType()==NodeType.WORDNODE)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcomprobar=true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t\tif(comprobar==false) {\n\t\t\t\t\t\tGTreeIF<Node> subarbol3 = new GTree<Node>();\n\t\t\t\t\t\tNode hoja = new WordNode();\n\t\t\t\t\t\tsubarbol3.setRoot(hoja);\n\t\t\t\t\t\tnode.addChild(1, subarbol3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "public void insert(String word) {\n Node<String> current = list.getFirst();\n\n while (current != null) {\n String another = (String) current.getValue();\n\n for (int i = 0; i < word.length(); i++) {\n if (word.charAt(i) == another.charAt(i)) {}\n else if (word.charAt(i) < another.charAt(i)) {\n Node<String> node = new Node<String>(word);\n current.getPrevious().setNext(node);\n node.setPrevious(current.getPrevious());\n node.setNext(current);\n current.setPrevious(node);\n return;\n } else { break; }\n }\n current = current.getNext();\n }\n list.getLast().setNext(new Node<String>(word));\n return;\n }", "public void addWord(String word) {\n\t\taddWord(word, root);\n\t}", "public void add (String word) {\n Trie pointeur ;\n\n if(word.length() != 0){\n String lettre = Character.toString(word.charAt(0));\n String ssChaine = word.substring(1);\n pointeur = this.fils.get(lettre);\n if(pointeur == null){\n pointeur = new Trie();\n this.fils.put(lettre,pointeur);\n\n }\n pointeur.add(ssChaine);\n if(ssChaine.length()==0){\n this.fin = true;\n }\n \n }\n \n }", "public void add(LLNodeHash word){\n if (!checkWord(word)){\n put(word);\n }\n }", "public void insert(String word, String signature) {\n\t\tStringBuffer sB = new StringBuffer(signature);\n\t\tif (sB.length() == 0) { // Base case for recursive call. If the length of the signature equals zero, the word is inserted into words, but no new subtrees are instantiated. \n\t\t\twords.add(word.toLowerCase());\n\t\t}\n\t\telse {\n\t\t\tint index = Character.getNumericValue(sB.charAt(0)) - 2; // Converts the value of each character into an int index\n\t\t\tif (rangeCheck(index)) {\n\t\t\t\t/**\n\t\t\t\t * If true a new TreeDictionary is stored at tD[index], the level of the new Tree is set to 1 more down than the current level, the word is inserted into this objects\n\t\t\t\t * Tree<Set> words, before the insert is called recursively on the newly instantiated Tree.\n\t\t\t\t * If false, which means that a TreeDictionary is already stored at this index, the word is inserted into the Tree at this index and the insert is called recursively\n\t\t\t\t * on the existing TreeDictionary at that index.\n\t\t\t\t */\n\t\t\t\tif (tD[index] == null) { \n\t\t\t\t\ttD[index] = new TreeDictionary();\n\t\t\t\t\ttD[index].level = level + 1;\n\t\t\t\t\ttD[index].words.add(word.toLowerCase());\n\t\t\t\t\ttD[index].insert(word, sB.substring(1)); \n\t\t\t\t}\n\t\t\t\telse { \n\t\t\t\t\ttD[index].words.add(word.toLowerCase()); \n\t\t\t\t\ttD[index].insert(word, sB.substring(1));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void insert(String key)\n\t{\n\t\tint level;\n\t\tint length=key.length();\n\t\tint index;\n\t\tTrieNode pCrawl=root;\n\t\tfor(level=0;level<length;level++)\n\t\t{\n\t\t\tindex=key.charAt(level)-'a';\n\t\t\t\n\t\t\tif(pCrawl.children[index]==null)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tpCrawl.children[index]=new TrieNode();\n\t\t\t}\n\t\t\tpCrawl=pCrawl.children[index];\n\t\t\tpCrawl.freq++;\n\t\t}\n\t\tpCrawl.isEndOfWord=true;\n\t}", "public void insert( Word x )\n {\n WordList whichList = theLists[ myhash( x.key ) ];\n //System.out.println(\"WordList found\");\n \n\t whichList.add( x );\n\t //System.out.println(\"Word \" + x.value + \" successfully added\");\n }", "public void insert(Word d){\n\t\t\n\t\t// ***\n\t\t// When I run the program this method works, but for some reason it only \n\t\t// sorts some of the words and I wasn't able to figure out why that was \n\t\t// happening.\n\t\t\n\t\tWordNode wn = new WordNode(d.words);\n\t\tif(length == 0){\n\t\t\tlast.next = wn;\n\t\t\tlast = wn;\n\t\t\tlength++;\t\t\n\t\t}\n\t\telse{\n\t\t\tWordNode current = first.next;\n\t\t\tWordNode previous = null;\n\t\t\tString s = current.data;\n\t\t\twhile(((d.words).compareTo(s) > 0) && (current != null)){\n\n\t\t\t\tprevious = current;\n\t\t\t\tcurrent = current.next;\n\t\t\t\ts = previous.data;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (previous == null){\n\t\t\t\twn.next = first.next;\n\t\t\t\tfirst.next = wn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tprevious.next = wn;\n\t\t\t\twn.next = current;\n\t\t\t}\n\t\t\t\n\t\t\tif(wn.next == null){\n\t\t\t\tlast = wn;\n\t\t\t}\n\t\t\t\n\t\t\tlength++;\n\t\t}\n\t}", "private void addWord(String s) {\n TrieNode node = root;\n for(int i = 0; i < s.length(); i++) {\n int index = s.charAt(i) - 'a';\n if (node.trieNodes[index] == null) {\n node.trieNodes[index] = new TrieNode();\n }\n node = node.trieNodes[index];\n }\n node.isLeave = true;\n }", "public void addWord(String word, TrieNode node) {\n\n\t\t// If this is the end of the word, create a new node and mark it as the\n\t\t// end of a word\n\t\tif (word.length() == 1) {\n\t\t\tTrieNode nextNode = new TrieNode(nodes.size());\n\t\t\tnodes.add(nextNode);\n\t\t\tnode.addEdge(word.charAt(0), nextNode);\n\t\t\tnextNode.setTerminal(true);\n\t\t\treturn;\n\t\t}\n\n\t\t// If there is a branch that this word can go down, follow that branch\n\t\tif (node.contains(word.charAt(0))) {\n\t\t\tTrieNode next = nodes.get(node.getNextNodeFromEdge(word.charAt(0)));\n\t\t\taddWord(word.substring(1), next);\n\t\t}\n\t\t// If this is not the end of a word, and there are no branches of the\n\t\t// trie that contain the first letter of the word, create a new branch\n\t\telse {\n\t\t\tTrieNode nextNode = new TrieNode(nodes.size());\n\t\t\tnodes.add(nextNode);\n\t\t\tnode.addEdge(word.charAt(0), nextNode);\n\t\t\taddWord(word.substring(1), nextNode);\n\t\t}\n\t}", "public void putWord(String word) {\n if(index < words.length) {\n words[index] = word;\n }\n index++;\n }", "public boolean insert(String newWord) {\n Node current = root;\n // run through the word to make sure all characters are valid\n for (int i = 0; i < newWord.length(); i++) {\n // get the index that the character would be in the node's array\n int index = getIndex(newWord.charAt(i));\n \n // if the character indexes to not 0-26, the word is invalid and return false to show an error\n if (index < 0 || index > 26) {\n return false;\n }\n }\n \n // if all the characters are valid, insert the word\n for (int i = 0; i < newWord.length(); i++) {\n int index = getIndex(newWord.charAt(i));\n\n // if the current character is not the last one\n if (i < newWord.length() - 1) {\n // go to the next node in the trie\n // if the next node is null, create one\n if (current.nexts[index] == null) {\n current.nexts[index] = new Node();\n }\n // set current to next\n current = current.nexts[index];\n }\n // if the current character is the last idea in the string\n else {\n current.wordExists[index] = true;\n }\n }\n // the word was successfully inserted\n return true;\n }", "private void addWord(String word, int articleId, int times) {\n // if input is \"\" means here is the end of the woed then we can add the articleId to this node\n if(word.equals(\"\")) {\n addAricles(articleId, times);\n } else {\n Result res = findChild(word);\n // if the node is not exist, then we need to create an new one with next char of the word, and add word to next node \n if(res == null) {\n Node nextNode = new Node(word.substring(0, 1));\n this.addChildren(nextNode);\n nextNode.addWord(word.substring(1), articleId, times);\n } \n //if the node exist, add substring to next node\n else {\n Node nextNode = res.getN();\n String nextString = res.getS();\n nextNode.addWord(nextString, articleId, times);\n }\n }\n }" ]
[ "0.8807224", "0.8793351", "0.87825143", "0.87603605", "0.87531847", "0.87244797", "0.8703555", "0.86812365", "0.8663727", "0.8656706", "0.8647378", "0.86406666", "0.8638965", "0.8625531", "0.8625304", "0.8621602", "0.8619184", "0.86011845", "0.8596424", "0.8592704", "0.85797423", "0.85470796", "0.85449576", "0.8533732", "0.8530502", "0.8529755", "0.85264754", "0.8517407", "0.84821683", "0.8422329", "0.8396914", "0.83698785", "0.83614105", "0.8355936", "0.83466494", "0.83300596", "0.8319897", "0.82823217", "0.82470423", "0.8222099", "0.8199604", "0.81948066", "0.81892484", "0.8187464", "0.8187372", "0.81394404", "0.812676", "0.8030377", "0.80032265", "0.79190177", "0.7892603", "0.7840522", "0.7731815", "0.77133185", "0.7711063", "0.7691762", "0.7646296", "0.7616002", "0.76136047", "0.76116586", "0.7574053", "0.75555396", "0.75157183", "0.75147456", "0.75139433", "0.7505242", "0.74966097", "0.74810416", "0.74712425", "0.7468038", "0.7466154", "0.73995686", "0.73835844", "0.7368037", "0.7365963", "0.7358866", "0.7329052", "0.7313949", "0.72919786", "0.7289204", "0.7277257", "0.71930397", "0.7192659", "0.7180804", "0.7156035", "0.71540606", "0.70764524", "0.7051301", "0.70385855", "0.69801146", "0.6910698", "0.69053066", "0.6864618", "0.68595654", "0.68056315", "0.6782471", "0.67655396", "0.67148", "0.66998154", "0.65965736" ]
0.83459634
35
Returns if the word is in the trie.
public boolean search(String word) { return searchWord(word, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean search(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n return false;\n }\n now = now.children.get(c);\n }\n return now.hasWord;\n}", "public boolean search(String word) {\n \tTrieNode t=searchTrie(word);\n return t!=null&&t.leaf;\n }", "public boolean contains(String word) {\n word = word.toUpperCase();\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char ch = word.charAt(i);\n if (node.get(ch) == null) {\n return false;\n }\n node = node.get(ch);\n }\n return node.isLeaf;\n }", "public boolean search(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n return false;\n }\n curr = curr.children[idx];\n }\n return curr.isWord;\n }", "public boolean search(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return tn.flag;\n }", "public boolean search(String word) {\n TrieNode last = walkTo(word);\n if (last == null) {\n return false;\n }\n return last.children.containsKey('\\0');\n }", "public boolean search(String word) {\n\t\tTrie curr = this;\n\t\t\n\t\tfor (Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch];\n\t\t\t\n\t\t\tif (n == null)\t\treturn false;\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\t\n\t\treturn curr.isWord;\n\t}", "public boolean search(String word) {\n\t\tTrieNode temp = root;\n\t\tint c;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tc = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null)\n\t\t\t\treturn false;\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\treturn temp != null && temp.isLeafNode;\n\t}", "public boolean search(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n return false;\n }\n p = p.children[childIndex];\n }\n return p.isWord;\n }", "public boolean search(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n return false;\n }\n ptr = ptr.child[c - 'a'];\n }\n return ptr.is_end;\n }", "public boolean search(String word) {\n TrieNode node = root;\n\n // for each char in the word, search in the TrieNode\n for (char c: word.toCharArray()) {\n // if we can not find the child, then return false\n if (node.children[c - 'a'] == null) {\n return false;\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n }\n // if we iterate to the last, check isWord\n return node.isWord;\n }", "public boolean search(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n return false;\n }\n cur = cur.tries[c];\n i++;\n }\n return cur.hasWord;\n }", "public boolean search(String word) {\n TrieNode node = search(root, word, 0);\n\t\treturn node != null && node.value != null;\n }", "public boolean containsWord(String word) {\n\t\tTrieNode node = searchPrefix(word);\n\t\treturn node != null && node.isEnd();\n\t}", "public boolean search(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n // does not match\n return false;\n }\n else {\n cur = cur.children.get(ch);\n }\n }\n return cur.isEnd;\n }", "public boolean search(String word) {\n\n int length = word.length();\n TrieNode node = root;\n for(int i=0; i<length; i++) {\n char curr = word.charAt(i);\n if(!node.containsKey(curr)) {\n return false;\n }\n node = node.get(curr);\n }\n return node.isEnd();\n\n }", "public boolean search(String word) {\n\t\t\tTrieNode prefix = searchPrefix(word);\n\t\t\treturn prefix == null ? false : prefix.isWord == true;\n\t\t}", "public boolean search(String word) {\n TrieNode tail = match(root, word.toCharArray(), 0);\n return tail != null && tail.isWord;\n }", "public boolean search(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n return false;\n current = current.childrens[index];\n }\n return current.eow;\n }", "public boolean search(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] != null) {\n root = root.next[c - 'a'];\n } else {\n return false;\n }\n }\n if (root.word == null) {\n return false;\n }\n\n return true;\n }", "public boolean search(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node = curr.hmap.get(c);\n if(node==null){\n return false;\n }\n else{\n curr=node;\n }\n }\n \n return curr.endOfWord;\n }", "public boolean search(String word) {\n TrieNode node = searchPrefix(word);\n return node!=null&&node.isEnd();\n }", "public boolean search(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n return false;\n\n node = node.children[c - 'a'];\n }\n\n return node.word.equals(word);\n }", "public boolean search(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null) return false;\n point = point.getChild(ch - 'a');\n }\n return point.getIsWord();\n }", "public boolean search(String word) {\n TrieNode p = searchNode(word);\n if (p == null) {\n return false;\n } else {\n if (p.isEnd)\n return true;\n }\n return false;\n }", "public boolean search(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null)\n return false;\n n = n.children[c];\n }\n if(n.isWord)\n return true;\n return false;\n }", "public boolean search(String word) {\n\n TrieNode parent = searchNode(word);\n if(parent==null){\n return false;\n }else{\n if(parent.isLeaf )\n return true;\n }\n return false;\n }", "public boolean search(String word) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<word.length(); ++i)\n\t {\n\t \tchar c = word.charAt(i);\n\t \tif(p.children[c-'a']==null)\n\t \t\treturn false;\n\t \tp = p.children[c-'a'];\n\t }\n\t return p.mark;\n\t }", "private boolean contains(Node node, String word, int iter, int size) {\n if (node == null || (iter == size - 1 && !node.leaf))\n return false;\n\n // are we at a leaf node? if so, the trie contains `word`\n if (node.leaf && iter == size - 1)\n return true;\n\n // recursive step\n return contains(node.children.get(word.charAt(iter)), word, iter + 1, size);\n }", "@Override\n public boolean search(final String word) {\n final TrieNode p = searchNode(word);\n if (p == null) {\n return false;\n } else {\n return p.isEnd;\n }\n\n }", "public boolean search(String word) {\n Node curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n return false;\n }\n curr = subNode;\n }\n return curr.isWord;\n }", "public boolean search(String word) {\n if (word == null || word.length() == 0)\n return false;\n char [] letters = word.toCharArray();\n TrieNode node = root;\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null)\n return false;\n node = node.son[pos];\n }\n\n return node.isEnd;\n }", "public boolean search(String word) {\r\n Trie node = root;\r\n return search(node, word, 0);\r\n }", "public boolean contains(String word) {\n Signature sig = new Signature(word);\n RadixTree node = find(sig);\n\n if (node != null) {\n return node.words.contains(word);\n } else {\n return false;\n }\n }", "public boolean search(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null) return false;\n current = current.children[c];\n }\n return current.isWord;\n }", "public boolean startsWith(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return true;\n }", "public boolean containsWord(TrieNode n, String word, boolean tf) {\n\t\tfor (TrieEdge e : n.edgesOutOf) {\n\t\t\tif (e.getEdgeName() == word.charAt(0)) {\n\t\t\t\t// if the word is longer than one character, check if there is\n\t\t\t\t// an edge leading out of the node that has the same first\n\t\t\t\t// character\n\t\t\t\tif (word.length() > 1) {\n\t\t\t\t\tint adjustedIndex = indexAfterCleanup(e.getTo());\n\t\t\t\t\ttf = containsWord(nodes.get(adjustedIndex),\n\t\t\t\t\t\t\tword.substring(1), tf);\n\t\t\t\t}\n\t\t\t\t// Base case, indicating that the word is in the trie, as long\n\t\t\t\t// as the following node is marked as terminal\n\t\t\t\telse {\n\t\t\t\t\tint adjustedIndex = indexAfterCleanup(n\n\t\t\t\t\t\t\t.getNextNodeFromEdge(word.charAt(0)));\n\t\t\t\t\tif (nodes.get(adjustedIndex).isTerminal()) {\n\t\t\t\t\t\ttf = true;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tf;\n\t}", "public boolean search(String word) {\n if(word == null || word.length() == 0){\n return false;\n }\n \n TrieNode node = root;\n int d = 0;\n return search(node, word, 0);\n }", "public boolean search(String word) {\n return searchFromNode(word, trie.root);\n }", "public boolean search(String word) {\n // Write your code here\n Queue<TrieNode> nexts=new LinkedList<>();\n nexts.add(root);\n int index=0;\n while(!nexts.isEmpty()){\n int size=nexts.size();\n char c=word.charAt(index);\n boolean flag=false;\n for(int i=0;i<size;++i){\n TrieNode cur=nexts.poll();\n if(c=='.'){\n for(TrieNode tempNode:cur.children.values()){\n nexts.add(tempNode);\n flag|=tempNode.hasWord;\n }\n } else if(cur.children.containsKey(c)){\n TrieNode nextNode=cur.children.get(c);\n flag|=nextNode.hasWord;\n nexts.add(nextNode);\n }\n }\n index++;\n if(index>=word.length()) return flag;\n }\n return false;\n }", "public boolean search(String word) {\n if (all.contains(word)){\n return true;\n }\n TrieNode head = root;\n return search(word,head,0);\n \n }", "public boolean search(String word) {\n // return searchPrefix(word, root);\n TrieNode node = root;\n return search(node, word, 0);\n }", "public boolean search(String word) {\n Entry lastNodeOfSearch = getLastNodeOfSearch(word, 0, root);\n return lastNodeOfSearch!=null && lastNodeOfSearch.getIsWord();\n }", "public boolean search(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n return false;\n }\n cur = cur.map[ind];\n }\n return cur.end;\n }", "public boolean startsWith(String word) {\n\t\tTrieNode temp = root;\n\t\tint c;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tc = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null)\n\t\t\t\treturn false;\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean search(String word) {\n char[] chars = word.toCharArray();\n Node theNode = root;\n for (char c : chars) {\n if (theNode.children.containsKey(c)) {\n theNode = theNode.children.get(c);\n } else {\n return false;\n }\n }\n return theNode.leaf;\n }", "public boolean search(String word) {\n char[] chars = word.toCharArray();\n Node node = root;\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) return false;\n node = next;\n }\n return word.equals(node.val);\n }", "public boolean search(String word) {\n Node node = getNode(word);\n\n return node != null && node.isWord == true;\n }", "public boolean checkDictionary(String word) {\n Node current = root;\n String check = word.toLowerCase().trim();\n // parse through the String word\n for (int i = 0; i < check.length(); i++) {\n // get the index of the selected character in the node array\n int index = getIndex(check.charAt(i));\n if (index < 0) {\n return false;\n }\n \n // if the iteration is not at the last character\n if (i < check.length() - 1) {\n // get the next node\n Node next = current.nexts[index];\n // if there is a next node, move to it\n if (next != null) {\n current = next;\n }\n // otherwise, the word does not exist as its path is longer than where it went in the dictionary\n else return false;\n }\n // if the iteration is on the last character\n else {\n // return true if the value at the node index is true, false otherwise\n return current.wordExists(index);\n }\n }\n // somehow the loop exitted without a return statement in the middle of it and the word does not exist\n return false;\n }", "public boolean search(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n return false;\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n return currentNode.isFinished;\n }", "public boolean containsWord(String word) {\n\t\treturn containsWord(root, word, false);\n\t}", "public boolean search(String word) {\n return wordInTree(word, root) ;\n }", "private boolean isValidWord(String word){\n if (trie.searchWord(word)){\n return true;\n } else {\n return false;\n }\n }", "public boolean search(String word) {\n\t\tchar[] cArray = word.toCharArray();\n\t\tfor (int i = 0; i < cArray.length; i++) {\n\t\t\tfor (char c = 'a'; c <= 'z'; c++) {\n\t\t\t\tif (c == cArray[i])\n\t\t\t\t\tcontinue;\n\t\t\t\tchar temp = cArray[i];\n\t\t\t\tcArray[i] = c;\n\t\t\t\tif (checkTrieTree(new String(cArray)))\n\t\t\t\t\treturn true;\n\t\t\t\tcArray[i] = temp;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean hasWord();", "public boolean search(String word) {\n if(word!=null) {\n char wordArr[] = word.toCharArray();\n int wordLen=word.length();\n// if(wordLen==0)\n// return false;\n Node tempRoot=root;\n for(int i=0;i<wordLen;i++){\n if(tempRoot.subNode(wordArr[i])!=null){\n tempRoot = tempRoot.subNode(wordArr[i]);\n }\n }\n return tempRoot.isEnd;\n }\n return false;\n }", "public boolean search(String word) {\n char [] words=word.toCharArray();\n CharTree t=root;\n for (char c : words) {\n t=t.next[c-97];\n if(t==null)return false;\n }\n if (!t.isend)return false;\n return true;\n }", "public boolean search(String word) {\n var node = searchPrefix(word);\n return node != null && node.isEnd();\n }", "public boolean contains(String s) {\n s = s.trim().toLowerCase();\n\n TrieNode current = root;\n\n for (int i = 0; i < s.length(); i++) {\n char c = s.charAt(i);\n if (Character.isLowerCase(c)) {\n TrieNode child = current.children.get(c);\n if (child == null) {\n return false;\n }\n current = child;\n }\n }\n\n return current.isWord;\n }", "public boolean findWord ( String word ) {\n\t\tif(this.contains(word))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//return isWordInDictionaryRecursive( word, 0, words.size()-1);\n\n\t}", "public boolean contains(String key) {\n\n char[] characters = key.trim().toCharArray();\n\n TrieNode trieNode = root; // current trie node\n\n boolean contains = true;\n\n for (char ch : characters) {\n\n // get the character represent index from the current trie node\n int index = ch - 'a';\n if (trieNode.offsprings[index] == null) {\n contains = false;\n break;\n }\n\n trieNode = trieNode.offsprings[index];\n }\n\n if (trieNode != null) {\n contains = trieNode.isRepresentACompleteWord;\n }\n\n return contains;\n }", "public boolean search(String word) {\n if(searchWordNodePos(word) == null){\n return false;\n } else if(searchWordNodePos(word).hasWord) \n return true;\n else return false;\n }", "public boolean contains(String s) {\r\n if (s.length() == 0) {//base case\r\n return isValidWord;\r\n }\r\n Character c = s.charAt(0);\r\n TriNode child = children.containsKey(c) ? children.get(c) : null;\r\n if (child == null) {\r\n return false;\r\n }\r\n return child.contains(s.substring(1));\r\n }", "public boolean search(String word) {\n int length = word.length();\n if(length == 0){\n return false;\n }\n\n char[] chars = word.toCharArray();\n\n Map<Character,Node> map = this.root.map;\n // 需要保证word的结尾是end\n for(int i = 0;i < length;i++){\n if(!map.containsKey(chars[i])) {\n return false;\n }\n\n if(i == length - 1){\n if(map.get(chars[i]).isWordEnd == true){\n return true;\n }else{\n return false;\n }\n }else{\n map = map.get(chars[i]).map;\n }\n }\n return false;\n }", "public boolean search(String word) {\n Node temp = root;\n while(word.length()!=0){\n char c = word.charAt(0);\n word = word.substring(1);\n int index = (int)c -97;\n if(temp.children[index]==null){\n return false;\n }\n temp = temp.children[index];\n }\n if(temp==null) return false;\n \n return temp.isEnd;\n }", "public boolean search(String word) {\r\n return tree.search(word);\r\n }", "public boolean search(String word) {\n return backtrace(root, word.toCharArray(), 0);\n }", "public boolean containsWord(String word) {\n\t\treturn index.containsKey(word);\n\t}", "public boolean isWord(String word) {\n\t\tSystem.out.println(\"Is Word?: \" + word);\n\t\t// - Use this to test iterative implementation rather than binaryCheck implementation (runs better on small wordlists)\n\t\tfor (int i =1; i < table.size() + 1; i++) {\n\t\t\tif (table.get(i).equals(word)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t\t/*\n\t\treturn isWordBinaryCheck(word);//the binarysearch version which works poorly on the sets 100 words or less\n\t\t*/\n\t}", "public boolean search(String word) {\n return root.search(word);\n }", "public boolean contains(String word) {\n\t\treturn invertedIndex.containsKey(word);\n\t}", "@Override\n public boolean isWord(String s) {\n // TODO: Implement this method\n char[] c = s.toLowerCase().toCharArray();\n TrieNode predptr = root;\n for (int i = 0, n = c.length; i < n; i++) {\n TrieNode next = predptr.getChild(c[i]);\n if (next != null) {\n predptr = next;\n } else {\n return false;\n }\n\n }\n return predptr.endsWord();\n }", "public boolean search(String word) {\n TrieNode cur = root;\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if(c == '.') {\n char[] wc = word.toCharArray();\n for(Character k : cur.children.keySet()) {\n wc[i] = k;\n if(search(new String(wc))) return true;\n }\n return false; // error\n } else {\n TrieNode node = cur.children.get(c);\n if(node == null) return false;\n cur = node;\n }\n }\n return cur.isEnd;\n }", "public boolean contains(String word) {\r\n\t\treturn dict.contains(word);\r\n\t}", "public boolean hasWord(String word) {\n return cache.indexOf(word) >= 0;\n }", "@Override\n\tpublic boolean containsWord(String word) {\n\t\tlock.lockReadOnly();\n\t\ttry {\n\t\t\treturn super.containsWord(word);\n\t\t} finally {\n\t\t\tlock.unlockReadOnly();\n\t\t}\n\t}", "public boolean search(String word) {\n return search(word, root, 0);\n }", "public boolean search(String word) {\n isPrefix=true;\n search(root,word,0);\n return isPrefix;\n }", "public boolean search(String word) {\n return search(root, word, 0);\n }", "public boolean search(String word) {\r\n return search(word, root);\r\n }", "public boolean isInDictionary(String word) {\n return isInDictionary(word, Language.ENGLISH);\n }", "public boolean containsWord(String word) {\n return wordlist.contains(word);\n }", "public boolean search(String word) {\n return helper(word,root,0);\n }", "public boolean contains(String word, String path) {\n\t\treturn contains(word) ? invertedIndex.get(word).containsKey(path) : false;\n\t}", "public boolean search(String word) {\n return searchNode(word, root);\n }", "public boolean exists(String word)\n {\n boolean rtn = false;\n\n if(word.length() > 0)\n {\n StringBuffer buff = new StringBuffer().append(\"^\");\n buff.append(word.toLowerCase()).append(\"_\");\n\n String tmp = searchLexDb(buff.toString(), true);\n if(tmp.length() > 0)\n rtn = true;\n } // fi\n\n return(rtn);\n }", "public boolean search(String word) {\n return this.root.search(word);\n }", "public boolean search(String word )\n {\n return searchHelper(root, word, 0);\n }", "public boolean find(T word);", "public boolean search(String word) {\n\t\treturn startsWith(word) && cur.isWord == true;\n\t}", "public boolean search(String word) {\n return dfs(root, word, 0);\n }", "public boolean contains(String word) {\n\t\tif (wordList.contains(word)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t// TODO Add your code here\n\t}", "public boolean search(String word) {\n \t\n return dfs(0, root, word);\n }", "public boolean contains(String word) {\n return indexOf(word) > -1;\n }", "private boolean isWord(String word) {\n\t\treturn dict.isWord(word);\n\t}", "public boolean startsWith(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n return false;\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n return true;\n }", "public boolean search(String word) {\n return dfs(0, root, word);\n }", "public boolean search(String word) {\n\n return helper(word, 0, root);\n\n }", "public boolean hasWord(String wordSearched)\n {\n if (this.isEmpty())\n {\n //checks for null and empty lists\n return false;\n }\n //current entry in the linked list\n Entry current;\n //position on the linked list\n int index = 0;\n while (index < entryList.size())\n {\n current = entryList.get(index);\n if (current.getWord().equalsIgnoreCase(wordSearched))\n {\n //the current word matches the searched word\n return true;\n }\n index++;\n\n }\n //I didn't find it in the list\n return false;\n\n }", "public boolean addWord(String word) {\n // TODO: Implement this method.\n char[] c = word.toLowerCase().toCharArray();\n\n TrieNode predptr = root;\n boolean isWord = false;\n\n for (int i = 0, n = c.length; i < n; i++) {\n TrieNode next = predptr.insert(c[i]);\n\n if (next != null) {\n predptr = next;\n } else {\n predptr = predptr.getChild(c[i]);\n }\n\n if (i == n - 1) {\n if (!predptr.endsWord()) {\n size++;\n isWord = true;\n predptr.setEndsWord(true);\n }\n }\n\n }\n return isWord;\n }", "public boolean search(String word) {\n if (word == null || word.length() == 0) {\n return false;\n }\n return this.search(this.root, word, 0);\n }" ]
[ "0.8014751", "0.7984532", "0.79244334", "0.79059774", "0.7905517", "0.7885265", "0.78772014", "0.7840615", "0.78359133", "0.78040844", "0.7789488", "0.77892065", "0.77878743", "0.77688414", "0.77643424", "0.77543366", "0.7753908", "0.7709519", "0.770567", "0.768657", "0.7677176", "0.76618046", "0.764114", "0.76269895", "0.76185906", "0.7592895", "0.75914705", "0.7574727", "0.75658876", "0.75544935", "0.754258", "0.7528745", "0.7505407", "0.7498981", "0.7449149", "0.7433753", "0.74175775", "0.7410958", "0.73894024", "0.73706037", "0.7354094", "0.73521537", "0.73040396", "0.73003083", "0.7273745", "0.7247666", "0.724746", "0.72429335", "0.72285014", "0.7213546", "0.7174073", "0.7145115", "0.71224433", "0.70935553", "0.7082396", "0.70699275", "0.7064605", "0.7039879", "0.70327514", "0.6943517", "0.694207", "0.69275236", "0.6919947", "0.691823", "0.69152206", "0.68998784", "0.6893677", "0.6891652", "0.68762046", "0.68664414", "0.6861089", "0.68608487", "0.6853588", "0.6848117", "0.683327", "0.6833222", "0.6824591", "0.6809475", "0.6779161", "0.677702", "0.6776729", "0.6771743", "0.6763546", "0.6750459", "0.6742159", "0.67343014", "0.67277455", "0.670711", "0.66931176", "0.6692354", "0.66754323", "0.6670297", "0.665372", "0.66509795", "0.6643256", "0.663991", "0.663409", "0.6620735", "0.6605063", "0.6596996", "0.65822434" ]
0.0
-1
Returns if there is any word in the trie that starts with the given prefix.
public boolean startsWith(String prefix) { return searchWord(prefix, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean startsWith(String prefix) {\n char [] words=prefix.toCharArray();\n CharTree t=root;\n for (char c : words) {\n t=t.next[c-97];\n if(t==null)return false;\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n return searchTrie(prefix)!=null;\n }", "public boolean startsWith(String prefix) {\n TrieNode node = search(root, prefix, 0);\n\t\treturn hasKey(node);\n }", "public boolean startsWith(String prefix) {\n TrieNode tail = match(root, prefix.toCharArray(), 0);\n return tail != null;\n }", "public boolean startsWith(String prefix) {\n if(prefix!=null) {\n char wordArr[] = prefix.toCharArray();\n int wordLen=prefix.length();\n// if(wordLen==0)\n// return false;\n Node tempRoot=root;\n for(int i=0;i<wordLen;i++){\n if(tempRoot.subNode(wordArr[i])!=null){\n tempRoot=tempRoot.subNode(wordArr[i]);\n }else{\n return false;\n }\n }\n return true;\n }\n return false;\n }", "public boolean startsWith(String prefix) {\n TrieNode now = root;\n for(int i = 0; i < prefix.length(); i++) {\n Character c = prefix.charAt(i);\n if (!now.children.containsKey(c)) {return false;}\n now = now.children.get(c);\n }\n return true;\n}", "public boolean startsWith(String prefix) {\n if(searchWordNodePos(prefix) == null){\n return false;\n } else return true;\n }", "public boolean startsWith(String prefix) {\n TrieNode node = root;\n\n // for each char in the prefix, search in the TrieNode\n for (char c: prefix.toCharArray()) {\n if (node.children[c - 'a'] == null) {\n return false;\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n }\n // if we iterate to the last, return true\n return true;\n }", "public boolean startsWith(String prefix) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<prefix.length(); ++i)\n\t {\n\t \tchar c = prefix.charAt(i);\n\t \tp = p.children[c-'a'];\n\t \tif(p==null)\n\t \t\treturn false;\n\t }\n\t return true;\n\t }", "public boolean startsWith(String prefix) {\n TrieNode cur = root;\n for (int i = 0 ; i < prefix.length(); i ++) {\n char ch = prefix.charAt(i);\n if (! cur.children.containsKey(ch)) {\n // does not match\n return false;\n }\n else {\n cur = cur.children.get(ch);\n }\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n int length = prefix.length();\n if(length == 0){\n return false;\n }\n\n char[] chars = prefix.toCharArray();\n\n Map<Character,Node> map = this.root.map;\n // 需要保证word的结尾是endfr\n for(int i = 0;i < length;i++){\n if(!map.containsKey(chars[i])) {\n return false;\n }\n\n map = map.get(chars[i]).map;\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n if (prefix == null || prefix.length() == 0)\n return false;\n char [] letters = prefix.toCharArray();\n TrieNode node = root;\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null)\n return false;\n node = node.son[pos];\n }\n\n return true;\n }", "public boolean startsWith(String prefix) {\n TrieNode ptr = root;\n for(int i = 0;i < prefix.length();i++) {\n char c = prefix.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n return false;\n }\n ptr = ptr.child[c - 'a'];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n Trie cur = this;\n int i = 0;\n while(i < prefix.length()) {\n int c = prefix.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n return false;\n }\n cur = cur.tries[c];\n i++;\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n TrieNode curr = root;\n for (char c : prefix.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n return false;\n }\n curr = curr.children[idx];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n Trie root = this;\n for (char c : prefix.toCharArray()) {\n if (root.next[c - 'a'] != null) {\n root = root.next[c - 'a'];\n } else {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean startsWith(final String prefix) {\n final TrieNode p = searchNode(prefix);\n return p != null;\n }", "public boolean startsWith(String prefix) {\n String word = prefix;\n Node temp = root;\n while(word.length()!=0){\n char c = word.charAt(0);\n word = word.substring(1);\n int index = (int)c -97;\n if(temp.children[index]==null){\n return false;\n }\n temp = temp.children[index];\n }\n if(temp==null) return false;\n \n return true;\n }", "public boolean startsWith(String prefix) {\n TrieNode current = root;\n for(char c : prefix.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n return false;\n current = current.childrens[index];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n TrieNode n = root;\n for(char c : prefix.toCharArray()) {\n if(n.children[c]==null)\n return false;\n n = n.children[c];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n TrieTree point = root;\n for(int i = 0; i < prefix.length(); i++){\n char ch = prefix.charAt(i);\n if(point.getChild(ch - 'a') == null) return false;\n point = point.getChild(ch - 'a');\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n Entry lastNodeOfSearch = getLastNodeOfSearch(prefix, 0, root);\n return lastNodeOfSearch!=null;\n }", "public boolean startsWith(String prefix) {\n TrieNode p = searchNode(prefix);\n if (p == null) {\n return false;\n } else {\n return true;\n }\n }", "public boolean startsWith(String prefix) {\n TrieNode p = root;\n for (char c : prefix.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if(p.children[childIndex] == null) {\n return false;\n }\n p = p.children[childIndex];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n char[] chs = prefix.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n return false;\n }\n cur = cur.map[ind];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n return (walkTo(prefix) != null);\n }", "public boolean startsWith(String prefix) {\n return getNode(prefix) != null;\n }", "public boolean startsWith(String prefix) {\n\t\tcur = root;\n\t\tfor (char c : prefix.toCharArray()) {\n\t\t\tif (cur == null)\n\t\t\t\treturn false;\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\treturn cur != null;\n\t}", "public boolean startsWith(String prefix) {\n Node curr = root;\n for (int i = 0; i < prefix.length(); i++) {\n char c = prefix.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n return false;\n }\n curr = subNode;\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n var node = searchPrefix(prefix);\n return node != null;\n }", "public boolean findPrefix (String prefix ) {\n\t\t\n\t\t\n\t\treturn isPrefixInDictionaryRecursive (prefix, this.root );\n\t}", "public boolean startsWith(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return true;\n }", "public boolean startsWith(String prefix) {\r\n return tree.startWith(prefix);\r\n }", "public boolean startsWith(String prefix) {\n return this.root.startWith(prefix);\n \n }", "public boolean startsWith(String prefix) {\n char[] chars = prefix.toCharArray();\n Node node = root;\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) return false;\n node = next;\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n Node current = root;\n for (int i = 0; i < prefix.length(); i++) {\n int c = prefix.charAt(i) - 'a';\n if (current.children[c] == null) return false;\n current = current.children[c];\n }\n return true;\n }", "public boolean startsWith(String prefix) {\n return searchPrefix(prefix)!=null;\n }", "public boolean startsWith(String prefix) {\n char[] chars = prefix.toCharArray();\n Node theNode = root;\n for (char c : chars) {\n if (theNode.children.containsKey(c)) {\n theNode = theNode.children.get(c);\n } else {\n return false;\n }\n }\n return true;\n }", "public boolean startsWith(String word) {\n\t\tTrieNode temp = root;\n\t\tint c;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tc = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null)\n\t\t\t\treturn false;\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\treturn true;\n\t}", "public boolean startsWith(String prefix) {\n\t\t\treturn searchPrefix(prefix) != null;\n\t\t}", "boolean isPrefix(String potentialPrefix);", "public boolean startsWith(XMLString prefix) {\n/* 353 */ return this.m_str.startsWith(prefix.toString());\n/* */ }", "private boolean isValidPrefix(String prefix){\n if (trie.searchPrefix(prefix)){\n return true;\n } else {\n return false;\n }\n }", "public boolean startWith(String prefix) {\n boolean result = true;\n char[] prefixChar = prefix.toCharArray();\n if (prefixChar.length > data.length) {\n return false;\n }\n for (int i = 0; i < prefixChar.length; i++) {\n if (prefixChar[i] != data[i]) {\n result = false;\n break;\n }\n }\n return result;\n }", "public boolean startsWith(String prefix) {\n/* 333 */ return this.m_str.startsWith(prefix);\n/* */ }", "public boolean search(String word) {\n isPrefix=true;\n search(root,word,0);\n return isPrefix;\n }", "public static boolean isStartsWith(String str, String prefix) {\n\treturn null != str && str.startsWith(prefix);\n }", "public LinkedList<String> startsWith(String prefix) { \n char[] w = prefix.toCharArray(); \n TrieNode start = startsWith(root, w, 0); \n LinkedList<String> result = new LinkedList<String>(); \n StringBuilder sb = new StringBuilder(); \n constructWords(start, prefix, result, sb); \n return result; \n }", "public boolean search(String word) {\n\t\t\tTrieNode prefix = searchPrefix(word);\n\t\t\treturn prefix == null ? false : prefix.isWord == true;\n\t\t}", "public boolean search(String word) {\n TrieNode node = searchPrefix(word);\n return node!=null&&node.isEnd();\n }", "private boolean isPrefixFound(String line) {\n\t\tif (notab) {\n\t\t\treturn line.startsWith(prefix);\n\t\t} else {\n\t\t\treturn line.contains(prefix);\n\t\t}\n\t}", "public boolean startsWith(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n return false;\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n return true;\n }", "public boolean hasPrefix( String s )\n\t{\n\t\tTrieNode cur = root;\n\t\t\n\t\tfor( int i = 0; i < s.length(); i++ )\n\t\t{\n\t\t\tint letterIndex = (int)s.charAt(i) - 97;\n\t\t\t\n\t\t\tif( cur.getLetters()[ letterIndex ] != null )\n\t\t\t\tcur = cur.getLetters()[ letterIndex ];\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public boolean contains(String prefix) {\n\t\tSet<String> prefixes = prefixToURIMap.keySet();\n\t\treturn prefixes.contains(prefix);\n\t}", "public boolean startsWith(String prefix) {\n if (value == null || prefix == null) {\n return false;\n }\n for (String str : value) {\n if (str.startsWith(prefix)) {\n return true;\n }\n }\n return false;\n }", "public boolean startsWith(\n Path prefix\n ) {\n return prefix.size <= this.size && prefix.equals(getPrefix(prefix.size));\n }", "public boolean startsWith(String prefix) {\n return path.startsWith(prefix);\n }", "private boolean hasPrefix(Node node, String prefix, int iter, int size) {\n if (node == null)\n return false;\n\n // we're at the prefix\n if (iter == size - 1)\n return true;\n\n // recursive step\n return hasPrefix(node.children.get(prefix.charAt(iter)), prefix, iter + 1, size);\n }", "private static boolean startsWith(final String source, final String prefix) {\n return prefix.length() <= source.length() && source.regionMatches(true, 0, prefix, 0, prefix.length());\n }", "@Test\n\tpublic void testIsContainedInSomeWord() {\n\n\t\tString[] words = {\"ne\", \"ned\", \"nes\", \"ning\", \"st\", \"sted\", \"sting\", \"sts\"};\n\t\tList<String> listWords = Arrays.asList(words);\n\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"sti\"), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"ne\"), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"ni\"), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsPrefix(listWords, \"s\"), equalTo(true));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsPrefix(listWords, \"sta\"), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsPrefix(listWords, \"a\"), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsPrefix(listWords, \"no\"), equalTo(false));\n\t}", "private boolean isPrefixInDictionaryRecursive(String prefix, BSTNode<String> n) {\n\t\tif (n.getData() == null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tint comparison = n.getData().compareToIgnoreCase(prefix);\n\t\tboolean isPrefix = n.getData().startsWith(prefix);\n\t\tif (isPrefix) \n\t\t\treturn true;\n\t\t\n\t\t//makes sure the new parameters are not null references\n\t\tif (comparison < 0 && n.getLeft() != null)\n\t\t\treturn isPrefixInDictionaryRecursive( prefix, n.getLeft());\n\t\telse if ( comparison > 0 && n.getRight() != null)\n\t\t\treturn isPrefixInDictionaryRecursive( prefix, n.getRight());\n\t\telse //this case should never happen\n\t\t\treturn true;\n\t\t\n\t\t/**old code written by Professor below\n\t\t */\n\t\t\n\t\t//if (begin > end )\n\t\t//return false;\n\t\t\n\t\t//int half = (begin+end+1) / 2;\n\t\t//int comparison = words.get(half).compareToIgnoreCase(prefix);\n\t\t//boolean isPrefix = words.get(half).startsWith(prefix);\n\t\t//if (isPrefix) \n\t\t\t//return true;\n\t\t\n\t\t//if (comparison < 0 )\n\t\t\t//return isPrefixInDictionaryRecursive( prefix, half + 1, end );\n\t\t//else if ( comparison > 0 )\n\t\t\t//return isPrefixInDictionaryRecursive( prefix, begin, half - 1);\n\t\t//else //this case should never happen\n\t\t\t//return true;\n\t}", "public List<String> getAllWordsStartingWith(String prefix) {\n prefix = prefix.toUpperCase();\n TrieNode node = root;\n List<String> li = new ArrayList<>();\n for (int i = 0; i < prefix.length(); i++) {\n char ch = prefix.charAt(i);\n if (node.get(ch) == null) {\n return li;\n }\n node = node.get(ch);\n }\n\n dfs(node, li, prefix);\n return li;\n }", "public boolean containsWord(String word) {\n\t\tTrieNode node = searchPrefix(word);\n\t\treturn node != null && node.isEnd();\n\t}", "private static boolean stringStartsWith(String string, String prefix){\n for(int i=0; i < prefix.length(); i++){\n if(string.charAt(i) != prefix.charAt(i)){\n return false;\n }\n }\n return true;\n }", "public boolean search(String word) {\n var node = searchPrefix(word);\n return node != null && node.isEnd();\n }", "public String bestMatch(String prefix) {\n\t\tif(prefix != null){\n\t\t\tfor(int i = 0; i < data.getRawList().size();i++){\n\t\t\t\tif(data.getRawList().get(i).getWord().startsWith(prefix)){\n\t\t\t\t\treturn data.getRawList().get(i).getWord();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public boolean startsWith(XMLString prefix, int toffset) {\n/* 313 */ return this.m_str.startsWith(prefix.toString(), toffset);\n/* */ }", "public static Boolean startsWithWord(FeatureNode phr)\n\t{\n\t\tFeatureNode fn = phr.get(\"phr-head\");\n\t\twhile (fn != null)\n\t\t{\n\t\t\tFeatureNode word = fn.get(\"phr-word\");\n\t\t\tif (word != null) return true;\n\t\t\tFeatureNode subf = fn.get(\"phr-head\");\n\t\t\tif (subf != null) return false;\n\t\t\tfn = fn.get(\"phr-next\");\n\t\t}\n\t\treturn false;\n\t}", "private TrieNode searchPrefix(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (node.containsKey(c)) {\n\t\t\t\tnode = node.get(c);\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "public boolean search(String word) {\n // return searchPrefix(word, root);\n TrieNode node = root;\n return search(node, word, 0);\n }", "public boolean startsWith(String word) {\n return words[0].equalsIgnoreCase(word);\n }", "@Test\n\tpublic void testContainsSomePrefix() {\n\n\t\tString[] prefixes = {\"ne\", \"ned\", \"nes\", \"ning\", \"st\", \"sted\", \"sting\", \"sts\"};\n\t\tList<String> listPrefixes = Arrays.asList(prefixes);\n\n\t\tassertThat(\"Prefix contained\", StringUtils.containsSomePrefix(\"stedadsdf\", listPrefixes), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsSomePrefix(\"neasdsadfa\", listPrefixes), equalTo(true));\n\t\tassertThat(\"Prefix contained\", StringUtils.containsSomePrefix(\"ningsdfsf\", listPrefixes), equalTo(true));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"nasfds\", listPrefixes), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"abdsfsd\", listPrefixes), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"ninsdfdsf\", listPrefixes), equalTo(false));\n\t\tassertThat(\"Prefix not contained\", StringUtils.containsSomePrefix(\"swerwrw\", listPrefixes), equalTo(false));\n\t}", "protected boolean containsName(String full, String prefixes) {\n String[] prefixArray = StringUtils.split(prefixes, \",\");\n for (String prefix : prefixArray) {\n if (StringUtils.startsWith(full, StringUtils.trimToEmpty(prefix))) {\n return true;\n }\n }\n return false;\n }", "public boolean startsWith(String prefix, int toffset) {\n/* 289 */ return this.m_str.startsWith(prefix, toffset);\n/* */ }", "public boolean search(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n return false;\n }\n now = now.children.get(c);\n }\n return now.hasWord;\n}", "public boolean isPrefix() {\n return start != null &&\n startInclusive &&\n start.equals(end) &&\n endInclusive;\n }", "public boolean search(String word) {\n TrieNode last = walkTo(word);\n if (last == null) {\n return false;\n }\n return last.children.containsKey('\\0');\n }", "void howManyStartsWithPrefix(String str) {\n dictionary.add(str);\n int count = 0;\n for (String word : words) {\n if (word.length() >= str.length()) {\n boolean isPrefix = true;\n for (int i = 0; i < str.length(); i++) {\n if (word.charAt(i) != str.charAt(i)) {\n isPrefix = false;\n break;\n }\n }\n if (isPrefix) {\n count++;\n }\n\n }\n }\n assertEquals(count, trie.howManyStartsWithPrefix(str));\n }", "public boolean search(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n return false;\n }\n curr = curr.children[idx];\n }\n return curr.isWord;\n }", "public int howManyStartsWithPrefix(String prefix) {\n Node endNode = getNodeByString(prefix, false);\n return (endNode == null) ? 0 : endNode.getNumberOfTerminalsInSubTree();\n }", "public boolean unitNameHasPrefix(String unitNameWithPrefix, boolean constrainBasedOnValidUnitNames){\n return findFirstPrefixPairMatches(unitNameWithPrefix, constrainBasedOnValidUnitNames) != NO_PREFIX_MATCH_ARRAY;\n }", "public boolean search(String word) {\n TrieNode node = search(root, word, 0);\n\t\treturn node != null && node.value != null;\n }", "private boolean hasPrefix(byte[] nal)\n {\n return nal[0] == 0 && nal[1] == 0 && nal[2] == 0 && nal[3] == 0x01;\n }", "public boolean search(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] != null) {\n root = root.next[c - 'a'];\n } else {\n return false;\n }\n }\n if (root.word == null) {\n return false;\n }\n\n return true;\n }", "public boolean search(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n return false;\n }\n cur = cur.tries[c];\n i++;\n }\n return cur.hasWord;\n }", "public boolean search(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(temp == null) return false;\n tn = temp;\n }\n return tn.flag;\n }", "public boolean search(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n return false;\n }\n p = p.children[childIndex];\n }\n return p.isWord;\n }", "public boolean search(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n return false;\n }\n ptr = ptr.child[c - 'a'];\n }\n return ptr.is_end;\n }", "public boolean search(String word) {\n\t\tTrieNode temp = root;\n\t\tint c;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tc = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null)\n\t\t\t\treturn false;\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\treturn temp != null && temp.isLeafNode;\n\t}", "public boolean search(String word) {\n \tTrieNode t=searchTrie(word);\n return t!=null&&t.leaf;\n }", "public boolean search(String word) {\n\t\tTrie curr = this;\n\t\t\n\t\tfor (Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch];\n\t\t\t\n\t\t\tif (n == null)\t\treturn false;\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\t\n\t\treturn curr.isWord;\n\t}", "public boolean startsWith(FilePath prefix) {\n return startsWith(prefix.path);\n }", "public boolean search(String word) {\n if (word == null || word.length() == 0)\n return false;\n char [] letters = word.toCharArray();\n TrieNode node = root;\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null)\n return false;\n node = node.son[pos];\n }\n\n return node.isEnd;\n }", "public boolean search(String word) {\n TrieNode tail = match(root, word.toCharArray(), 0);\n return tail != null && tail.isWord;\n }", "public boolean isPrefix() { return prefix; }", "public boolean search(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n return false;\n\n node = node.children[c - 'a'];\n }\n\n return node.word.equals(word);\n }", "public boolean search(String word) {\n TrieNode p = searchNode(word);\n if (p == null) {\n return false;\n } else {\n if (p.isEnd)\n return true;\n }\n return false;\n }", "@Test\n public void whenStartWithPrefixThenTrue() {\n char[] word = {'H', 'e', 'l', 'l', 'o'};\n char[] pref = {'H', 'e'};\n boolean result = ArrayChar.startsWith(word, pref);\n assertThat(result, is(true));\n }", "public static Function<CharSequence, CharSequence> findPrefixes(CharSequence... prefixen) {\n return MatchWords.findPrefixes(prefixen);\n }", "public static boolean isPrefix(Grid g) {\n\t\tfor ( int i = 0; i < g.hword[0].trim().length(); i++ ) {\n\t\t\tString wordToCheck = g.getVWord(i).trim();\n\t\t\tif ( !dict.isWord(wordToCheck) )\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}" ]
[ "0.83632916", "0.83499616", "0.82860404", "0.82630605", "0.8216368", "0.8177742", "0.81650454", "0.81640255", "0.8142898", "0.8130222", "0.8110278", "0.8109604", "0.8090557", "0.8069846", "0.8064832", "0.80586547", "0.80346704", "0.8009936", "0.80044013", "0.7995892", "0.7976346", "0.7969954", "0.7963542", "0.793827", "0.793827", "0.7816996", "0.7798442", "0.77977216", "0.7772523", "0.7748109", "0.7690679", "0.7678129", "0.7677045", "0.7656892", "0.764575", "0.7641672", "0.76399934", "0.76286364", "0.76098937", "0.7512542", "0.74808085", "0.74401146", "0.7412991", "0.7372987", "0.7352783", "0.73341054", "0.72530854", "0.7239064", "0.72287345", "0.7197298", "0.7169453", "0.71381605", "0.7043312", "0.70333123", "0.6985496", "0.69604146", "0.69512635", "0.68892545", "0.68676394", "0.68629116", "0.68459934", "0.68442297", "0.6843487", "0.6841914", "0.6834161", "0.68179244", "0.66960716", "0.6688567", "0.66511303", "0.6628548", "0.6596443", "0.6569115", "0.65683496", "0.6547739", "0.6543045", "0.6529301", "0.65195125", "0.6518579", "0.6479439", "0.64629126", "0.6451713", "0.6448703", "0.64335895", "0.6419238", "0.6411274", "0.6397372", "0.6396506", "0.63881284", "0.63785195", "0.6369286", "0.63454854", "0.63282466", "0.631269", "0.6310283", "0.6303221", "0.62858486", "0.6263825", "0.6263391", "0.6248971", "0.62431777" ]
0.79941833
20
Creates new form Home
public Home() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createHomePage(){\n\t\tsetLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints(); \n\t\t//insert username and password fields\n\t\tJLabel title;\n\n\t\t//build the title panel\n\t\ttitlePanel = new JPanel();\n\t\ttitle = new JLabel(\"Budgie\");\n\t\ttitle.setSize(new Dimension(40, 40));\n\t\ttitlePanel.add(title);\n\n\t\tc.anchor = GridBagConstraints.CENTER;\n\t\tc.gridy = 0;\n\t\tc.weighty = .5;\n\t\tadd(titlePanel, c);\n\n\t\tinputField = addinputField();\n\n\t\t//positioning of the grid field\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.gridy = 1;\n\t\tc.ipady = 10;\n\t\tc.weighty = .5;\n\t\tadd(inputField, c);\n\n\t\tc.gridy++;\n\t\tJButton debug = new JButton(\"Debug\");\n\t\tdebug.addActionListener(new ActionListener(){\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tDebugPrinter.toggleDebug();\n\t\t\t}\n\n\t\t});\n\t\tadd(debug,c);\n\n\n\t\tpack();\n\n\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "public createNew(){\n\t\tsuper(\"Create\"); // title for the frame\n\t\t//layout as null\n\t\tgetContentPane().setLayout(null);\n\t\t//get the background image\n\t\ttry {\n\t\t\tbackground =\n\t\t\t\t\tnew ImageIcon (ImageIO.read(getClass().getResource(\"Wallpaper.jpg\")));\n\t\t}//Catch for file error\n\t\tcatch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(null, \n\t\t\t\t\t\"ERROR: File(s) Not Found\\n Please Check Your File Format\\n\"\n\t\t\t\t\t\t\t+ \"and The File Name!\");\n\t\t}\n\t\t//Initialize all of the compenents \n\t\tlblBackground = new JLabel (background);\n\t\tlblTitle = new JLabel (\"Create Menu\");\n\t\tlblTitle.setFont(new Font(\"ARIAL\",Font.ITALIC, 30));\n\t\tlblName = new JLabel(\"Please Enter Your First Name.\");\n\t\tlblLastName= new JLabel (\"Please Enter Your Last Name.\");\n\t\tlblPhoneNumber = new JLabel (\"Please Enter Your Phone Number.\");\n\t\tlblAddress = new JLabel (\"Please Enter Your Address.\");\n\t\tlblMiddle = new JLabel (\"Please Enter Your Middle Name (Optional).\");\n\t\tbtnCreate = new JButton (\"Create\");\n\t\tbtnBack = new JButton (\"Back\");\n\t\t//set the font\n\t\tlblName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblLastName.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblPhoneNumber.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblAddress.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\t\tlblMiddle.setFont(new Font(\"Times New Roman\",Font.BOLD, 18));\n\n\t\t//add action listener\n\t\tbtnCreate.addActionListener(this);\n\t\tbtnBack.addActionListener(this);\n\t\t//set bounds for all the components\n\t\tbtnCreate.setBounds(393, 594, 220, 36);\n\t\ttxtMiddle.setBounds(333, 249, 342, 36);\n\t\ttxtName.setBounds(333, 158, 342, 36);\n\t\ttxtLastName.setBounds(333, 339, 342, 36);\n\t\ttxtPhoneNumber.setBounds(333, 429, 342, 36);\n\t\ttxtAddress.setBounds(333, 511, 342, 36);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblMiddle.setBounds(333, 201, 342, 36);\n\t\tlblName.setBounds(387, 110, 239, 36);\n\t\tlblLastName.setBounds(387, 297, 239, 36);\n\t\tlblPhoneNumber.setBounds(369, 387, 269, 36);\n\t\tlblAddress.setBounds(393, 477, 215, 30);\n\t\tbtnBack.setBounds(6,716,64,36);\n\t\tlblTitle.setBounds(417, 0, 182, 50);\n\t\tlblBackground.setBounds(0, 0, 1000, 1000);\n\t\t//add components to frame\n\t\tgetContentPane().add(btnCreate);\n\t\tgetContentPane().add(txtMiddle);\n\t\tgetContentPane().add(txtLastName);\n\t\tgetContentPane().add(txtAddress);\n\t\tgetContentPane().add(txtPhoneNumber);\n\t\tgetContentPane().add(txtName);\n\t\tgetContentPane().add(lblMiddle);\n\t\tgetContentPane().add(lblLastName);\n\t\tgetContentPane().add(lblAddress);\n\t\tgetContentPane().add(lblPhoneNumber);\n\t\tgetContentPane().add(lblName);\n\t\tgetContentPane().add(btnBack);\n\t\tgetContentPane().add(lblTitle);\n\t\tgetContentPane().add(lblBackground);\n\t\t//set size, visible and action for close\n\t\tsetSize(1000,1000);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\n\t}", "FORM createFORM();", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "@RequestMapping(method = RequestMethod.GET)\n \tpublic String createForm(Model model, ForgotLoginForm form) {\n \t\tmodel.addAttribute(\"form\", form);\n \t\treturn \"forgotlogin/index\";\n \t}", "@Override\n\tpublic HomeModel create(HomeModel model) {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/createentry\", method = RequestMethod.GET)\n\tpublic String navigateCreateEntry(Model model){\n\t\tmodel.addAttribute(\"entry\", new Entry());\t\n\t\treturn \"entry/createEntry\";\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "private void addNewHomework() {\n\t\tIntent myIntent = new Intent(HomeworkActivity.this,\n\t\t\t\tHomeworkDetailActivity.class);\n\n\t\tmyIntent.putExtra(HOMEWORK_EDIT, false);\n\n\t\tHomeworkActivity.this.startActivityForResult(myIntent,\n\t\t\t\tADD_NEW_HOMEWORK_REQUEST);\n\n\t}", "@RequestMapping(value = \"/staff/majorcreate\")\n\tpublic String redirectToMajorCreate(Model model) {\n\t\tMajor major = new Major();\n\t\tmodel.addAttribute(\"major\", major);\n\t\tList<Program> programList = programService.getProgramsByStatus(true);\n\t\tmodel.addAttribute(\"programList\", programList);\n\t\treturn \"staff/majorcreate\";\n\t}", "@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\thome = new AdminDashboardForm();\r\n\t\t\tRootPanel.get(\"details\").add(home);\r\n\t\t}", "public String create() {\n\n if (log.isDebugEnabled()) {\n log.debug(\"create()\");\n }\n FacesContext context = FacesContext.getCurrentInstance();\n StringBuffer sb = registration(context);\n sb.append(\"?action=Create\");\n forward(context, sb.toString());\n return (null);\n\n }", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}", "public static void create() {\n Application.currentUserCan( 1 );\n \n String author = session.get(\"userEmail\");\n String title = params.get( \"course[title]\", String.class );\n String content = params.get( \"course[content]\", String.class );\n \n if( title.length() > 0 && content.length() > 0 ) {\n Course course = new Course(title, content, author);\n course.save();\n }\n \n index();\n }", "public frmHome() {\n initComponents();\n }", "@GetMapping(\"/create\")\n public ModelAndView create(@ModelAttribute(\"form\") final CardCreateForm form) {\n return getCreateForm(form);\n }", "public static Result startNewForm() {\r\n\t\tString formName = ChangeOrderForm.NAME;\r\n\t\tDecision firstDecision = CMSGuidedFormFill.startNewForm(formName,\r\n\t\t\t\tCMSSession.getEmployeeName(), CMSSession.getEmployeeId());\r\n\t\treturn ok(backdrop.render(firstDecision));\r\n\t}", "@RequestMapping(\"/save\")\n\tpublic String createProjectForm(Project project, Model model) {\n\t\t\n\tproRep.save(project);\n\tList<Project> getall = (List<Project>) proRep.getAll();\n\tmodel.addAttribute(\"projects\", getall);\n\t\n\treturn \"listproject\";\n\t\t\n\t}", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "@RequestMapping(value = { \"/new\" }, method = RequestMethod.GET)\r\n public String newuser(ModelMap model) {\r\n User user = new User();\r\n model.addAttribute(\"user\", user);\r\n model.addAttribute(\"edit\", false);\r\n return \"registration\";\r\n\r\n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "@RequestMapping(value = \"/staff/programcreate\")\n\tpublic String redirectToProgramCreate(Model model) {\n\t\tProgram program = new Program();\n\t\tmodel.addAttribute(\"program\", program);\n\t\treturn \"staff/programcreate\";\n\t}", "@GetMapping(\"dojos/new\")\n\tpublic String home(@ModelAttribute Dojo dojo) {\n\t\treturn \"newdojo.jsp\";\n\t}", "@RequestMapping(\"showForm\")\n\tpublic String showForm( Model theModel) {\n\t\t\n\t\t//create a student\n\t\tStudent theStudent = new Student();\n\t\t\n\t\t//add student to the model\n\t\ttheModel.addAttribute(\"student\", theStudent);\n\t\t\n\t\treturn \"student-form\";\n\t}", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "public StaffManagerForm(HomeAppForm homeForm) {\n \n this.homeForm = homeForm;\n \n Locale.setDefault(LocaleBundle.getLocale());\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {\n Logger.getLogger(LoginDialog.class.getName()).log(Level.SEVERE, null, ex);\n }\n initDefaultTableModel();\n initComponents();\n resizeTableColumns();\n this.setLocationRelativeTo(null);\n getContentPane().setBackground(GlobalValues.formBackgroundColor);\n getConnectToDataBase();\n homeForm.setVisible(false);\n loadDataBase(connection);\n }", "public void goToCreate(View view) {\n Intent intent = new Intent(this, CreateAccountActivity.class);\n startActivity(intent);\n }", "@GetMapping(value = { \"/\", \"/addContact\" })\r\n\tpublic String loadForm(Model model) {\r\n\t\tmodel.addAttribute(\"contact\", new Contact());\r\n\t\treturn \"contactInfo\";\r\n\t}", "public static Result postAddPaper() {\n Form<PaperFormData> formData = Form.form(PaperFormData.class).bindFromRequest();\n Paper info1 = new Paper(formData.get().title, formData.get().authors, formData.get().pages,\n formData.get().channel);\n info1.save();\n return redirect(routes.PaperController.listProject());\n }", "@GetMapping(\"/createRegistro\")\n\tpublic String crearValidacion(Model model) {\n\t\tList<Barrio> localidades = barrioService.obtenerBarrios();\n\t\tmodel.addAttribute(\"localidades\",localidades);\n\t\tmodel.addAttribute(\"persona\",persona);\n\t\tmodel.addAttribute(\"validacion\",validacion);\n\t\tmodel.addAttribute(\"registro\",registro);\n\t\tmodel.addAttribute(\"barrio\",barrio);\n\t\treturn \"RegistroForm\";\n\t}", "@RequestMapping(value = \"/newrecipe\", method = RequestMethod.GET)\n\tpublic String newRecipeForm(Model model) {\n\t\tmodel.addAttribute(\"recipe\", new Recipe()); //empty recipe object\n\t\tmodel.addAttribute(\"categories\", CatRepo.findAll());\n\t\treturn \"newrecipe\";\n\t}", "@RequestMapping(\"/newProjectAppMajor\")\n\tpublic ModelAndView newProjectAppMajor() {\n\t\tModelAndView mav = new ModelAndView();\n\n\t\tmav.addObject(\"projectappmajor\", new ProjectAppMajor());\n\t\tmav.addObject(\"newFlag\", true);\n\t\tmav.setViewName(\"projectappmajor/editProjectAppMajor.jsp\");\n\n\t\treturn mav;\n\t}", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }", "public Home() {\n initComponents();\n \n }", "@GetMapping(\"/addPharmacist\")\n public String pharmacistForm(Model model) {\n model.addAttribute(\"pharmacist\", new Pharmacist());\n return \"addPharmacist\";\n }", "@RequestMapping(\"/newuser\")\r\n\tpublic ModelAndView newUser() {\t\t\r\n\t\tRegister reg = new Register();\r\n\t\treg.setUser_type(\"ROLE_INDIVIDUAL\");\r\n\t\treg.setEmail_id(\"[email protected]\");\r\n\t\treg.setFirst_name(\"First Name\");\r\n\t\treg.setCity(\"pune\");\r\n\t\treg.setMb_no(new BigInteger(\"9876543210\"));\r\n\t\treturn new ModelAndView(\"register\", \"rg\", reg);\r\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "@RequestMapping(value = { \"/newuser\" }, method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String newUser(ModelMap model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\treturn \"registration\";\n\t}", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "public home() {\n initComponents();\n }", "public home() {\n initComponents();\n }", "public home() {\n initComponents();\n }", "@GetMapping(\"/userAddForm\")\n\tpublic String userAddForm(Model theModel) {\n\t\tUser theUser = new User();\n\t\ttheModel.addAttribute(\"user\", theUser);\n\t\treturn \"registration-form\";\n\t}", "public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wifi = dynamicForm.get(\"wifi\");\n String smoking = dynamicForm.get(\"smoking\");\n\n RoomType roomTypeObj = new RoomType(roomType, price, bedCount, wifi, smoking);\n\n if (dynamicForm.get(\"AddRoomType\") != null) {\n\n Ebean.save(roomTypeObj);\n String message = \"New Room type is created Successfully\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n } else{\n\n String message = \"Failed to create a new Room type\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n\n }\n\n\n\n }", "@RequestMapping(value = \"/blog/newpost\", method = RequestMethod.POST)\n\tpublic String newPost(HttpServletRequest request, Model model) {\n\t\tString title=request.getParameter(\"title\");\n\t\tString body=request.getParameter(\"body\");\n\t\t\n\t\t//Validate parameters if not valid send back to form w/ error message\n\t\tif (title==\"\" || body==\"\"){\n\t\t\tif (title!=\"\"){\n\t\t\t\tmodel.addAttribute(\"title\",title);\n\t\t\t}\n\t\t\tif(body!=\"\"){\n\t\t\t\tmodel.addAttribute(\"body\",body);\n\t\t\t}\n\t\t\tmodel.addAttribute(\"error\",\"Post must have a Title and Body!\");\n\t\t\treturn \"newpost\";\n\t\t}\n\t\t\n\t\t//if they validate, create a new post\n\t\tInteger userId = (Integer) request.getSession().getAttribute(AbstractController.userSessionKey);\n\t\tUser author= userDao.findByUid(userId);\n\t\tPost post = new Post(title,body,author);\n\t\tpostDao.save(post);\n\t\tmodel.addAttribute(\"post\", post);\n\t\treturn \"redirect:\"+ post.getAuthor().getUsername()+\"/\"+ post.getUid(); \t\t\n\t}", "@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "@RequestMapping(\"/new\")\n public String newStudent(ModelMap view) {\n Student student = new Student();\n view.addAttribute(\"student\", student);\n view.addAttribute(\"listurl\", listurl);\n return(\"newstudent\");\n }", "@RequestMapping(value=\"/formpaciente\")\r\n\tpublic String crearPaciente(Map<String, Object> model) {\t\t\r\n\t\t\r\n\t\tPaciente paciente = new Paciente();\r\n\t\tmodel.put(\"paciente\", paciente);\r\n\t\tmodel.put(\"obrasociales\",obraSocialService.findAll());\r\n\t\t//model.put(\"obrasPlanesForm\", new ObrasPlanesForm());\r\n\t\t//model.put(\"planes\", planService.findAll());\r\n\t\tmodel.put(\"titulo\", \"Formulario de Alta de Paciente\");\r\n\t\t\r\n\t\treturn \"formpaciente\";\r\n\t}", "@RequestMapping(value = \"/paas/appaas/create\", method = RequestMethod.GET)\n\tpublic String create(@CurrentUser PrismaUserDetails user, Model model) {\n\t\treturn \"pages/paas/appaas/create-appaas\";\n\t}", "public String formCreated()\r\n {\r\n return formError(\"201 Created\",\"Object was created\");\r\n }", "public HomePage() {\n }", "@RequestMapping(value=\"/loginForm\", method = RequestMethod.POST)\n\tpublic String homePOST(){\n\n\t\treturn \"loginForm\";\n\t}", "@RequestMapping(value = \"/staff/coursecreate\")\n\tpublic String redirectToCourseCreate(Model model) {\n\t\tCourse course = new Course();\n\t\tmodel.addAttribute(\"course\", course);\n\t\treturn \"staff/coursecreate\";\n\t}", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@RequestMapping(value = \"/createUser\", method = RequestMethod.GET)\n\tpublic ModelAndView createUser(ModelMap model) throws CustomException {\n\n\t\tmodel.put(\"endUserForm\", endUserForm);\n\t\tCollection<EndUser> endUsers = endUserDAOImpl.getList();\n\t\tList<Role> roles = endUserDAOImpl.findAll();\n\t\tmodel.put(\"roles\", roles);\n\n\t\tmodel.put(\"endUsers\", endUsers);\n\t\treturn new ModelAndView(\"createUser\", \"model\", model);\n\t}", "@GetMapping(\"/producto/nuevo\")\n\tpublic String nuevoProductoForm(Model model) {\n\t\tmodel.addAttribute(\"producto\", new Producto());\n\t\treturn \"app/producto/form\";\n\t}", "public String createQuiz() {\n quiz = quizEJB.createQuiz(quiz);\n quizList = quizEJB.listQuiz();\n FacesContext.getCurrentInstance().addMessage(\"successForm:successInput\", new FacesMessage(FacesMessage.SEVERITY_INFO, \"Success\", \"New record added successfully\"));\n return \"quiz-list.xhtml\";\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public Home() {\r\n initComponents();\r\n }", "public Home() {\r\n initComponents();\r\n }", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "@GetMapping(\"/showFormForAdd\")\n public String showFormForAdd(Model theModel) {\n Categories theCategories = new Categories();\n theModel.addAttribute(\"categories\", theCategories);\n //theModel.addAttribute(\"update\", false);\n return \"loaisanpham-form\"; }", "@RequestMapping(value = { \"/newproduct\" }, method = RequestMethod.GET)\r\n\tpublic String newProduct(ModelMap model) {\r\n\t\tProduct product = new Product();\r\n\t\tmodel.addAttribute(\"product\", product);\r\n\t\tmodel.addAttribute(\"productTypes\", productTypeService.findAllProductTypes());\r\n\t\tmodel.addAttribute(\"brands\", brandService.findAllBrands());\r\n\t\tmodel.addAttribute(\"edit\", false);\r\n\t\treturn \"newproduct\";\r\n\t}", "@RequestMapping(value = \"/absensi/tambah/submit\", method = RequestMethod.POST)\n public String tambahSubmit (@NotNull Authentication auth, Model model, @ModelAttribute(\"newAbsen\") AbsenModel newAbsen)\n {\n UserWeb penggunaLogin = (UserWeb)auth.getPrincipal();\n if (penggunaLogin.getUsername().equalsIgnoreCase(null)) {\n return \"redirect:/login\";\n }\n else if (penggunaDAO.selectPenggunaByUsername(penggunaLogin.getUsername())==null) {\n return \"redirect:/logout\";\n }\n else if (!penggunaLogin.getRole().contains(\"ROLE_EMPLOYEE\")) {\n return \"redirect:/\";\n }\n //end of check\n\n int id_employee = absenDAO.selectIdByUsername(penggunaLogin.getUsername());\n newAbsen.setId_employee(id_employee);\n if(absenDAO.cekAbsen(newAbsen) == null){\n absenDAO.addAbsen(newAbsen);\n return \"redirect:/absen/kelola?success=menambah\";\n } else {\n model.addAttribute(\"message\", \"Absensi pada tanggal \" +newAbsen.getTanggal_absen() + \" gagal dibuat\");\n return \"redirect:/absen/kelola?gagal=menambah\";\n }\n\n }", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "@GetMapping(\"/showAddFormUser\")\n\tpublic String showAddForm(Model model) {\n\t\tUser user = new User();\n\t\tmodel.addAttribute(\"user\", user);\n\t\t\n\t\t// add page title\n\t\tmodel.addAttribute(\"pageTitle\", \"Add User\");\n\t\treturn \"user-form\";\n\t}", "@RequestMapping(value = \"/profile\", method = RequestMethod.GET)\n\tpublic String create(Model model) {\n\t\tmodel.addAttribute(\"profile\", new Profile());\n\t\treturn \"create\";\n\t}", "@RequestMapping(value = \"add\", method = RequestMethod.GET)\n public String displayAddPostForm(Model model) {\n\n model.addAttribute(\"title\", \"New Post\");\n model.addAttribute(\"post\", new Post());\n return \"post/add\";\n }", "@_esCocinero\n public Result crearPaso() {\n Form<Paso> frm = frmFactory.form(Paso.class).bindFromRequest();\n\n // Comprobación de errores\n if (frm.hasErrors()) {\n return status(409, frm.errorsAsJson());\n }\n\n Paso nuevoPaso = frm.get();\n\n // Comprobar autor\n String key = request().getQueryString(\"apikey\");\n if (!SeguridadFunctions.esAutorReceta(nuevoPaso.p_receta.getId(), key))\n return Results.badRequest();\n\n // Checkeamos y guardamos\n if (nuevoPaso.checkAndCreate()) {\n Cachefunctions.vaciarCacheListas(\"pasos\", Paso.numPasos(), cache);\n Cachefunctions.vaciarCacheListas(\"recetas\", Receta.numRecetas(), cache);\n return Results.created();\n } else {\n return Results.badRequest();\n }\n\n }", "@PostMapping(\"/homes\")\n @Timed\n public ResponseEntity<HomeDTO> createHome(@RequestBody HomeDTO homeDTO) throws URISyntaxException {\n log.debug(\"REST request to save Home : {}\", homeDTO);\n if (homeDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new home cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n HomeDTO result = homeService.save(homeDTO);\n return ResponseEntity.created(new URI(\"/api/homes/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "Page createPage();", "public ifrmHomePage() {\n initComponents();\n }", "public String newBoleta() {\n\t\tresetForm();\n\t\treturn \"/boleta/insert.xhtml\";\n\t}", "public void Create(View view) {\n disableButton = findViewById(R.id.newAccountButton);\n disableButton.setEnabled(false);\n username = ((EditText)findViewById(R.id.createName)).getText().toString();\n password = ((EditText)findViewById(R.id.createPassword)).getText().toString();\n String password2 = ((EditText)findViewById(R.id.recreatePassword)).getText().toString();\n if (username.length() == 0 || password.length() == 0) {\n Toast.makeText(this, \"Fill in all boxes\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else if (!password.equals(password2)) {\n Toast.makeText(this, \"passwords must be the same\", Toast.LENGTH_SHORT).show();\n disableButton.setEnabled(true);\n } else {\n PostuserHelper helper = new PostuserHelper(username, password, getApplicationContext(),\n NewaccountActivity.this);\n }\n }", "@PostMapping(\"/createAccount\")\n public ModelAndView createNewAccount(AccountCreateDTO createDTO){\n ModelAndView modelAndView = new ModelAndView();\n\n accountService.createAccount(createDTO);\n modelAndView.addObject(\"successMessage\", \"Account has been created\");\n modelAndView.setViewName(\"accountPage\");\n\n return modelAndView;\n }", "public HomePage() {\n initComponents();\n }", "public HomePage() {\n initComponents();\n }", "@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public final String create(final ModelMap model) {\n model.addAttribute(REGISTER, new Register());\n return \"create\";\n }", "@Token(save = true, validate = false)\n @Execute\n public HtmlResponse createpage(final SuggestBadWordEditForm form) {\n form.initialize();\n form.crudMode = CrudMode.CREATE;\n return asHtml(path_AdminSuggestbadword_EditJsp);\n }", "@RequestMapping(\"/post\")\n public String createPost(Model model) {\n if(!model.containsAttribute(\"message\")){\n model.addAttribute(\"message\", new Message());\n }\n\n return \"form\";\n }", "@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }", "public Homepage() {\n initComponents();\n }", "NewAccountPage openNewAccountPage();", "@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public String create(Model model) {\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/create\";\n }" ]
[ "0.647876", "0.64451313", "0.6280335", "0.62746096", "0.62454146", "0.6242675", "0.6218096", "0.6181604", "0.6171541", "0.61670053", "0.61458725", "0.6126097", "0.6102605", "0.60914886", "0.60812795", "0.6076446", "0.60747474", "0.606979", "0.6068598", "0.60569316", "0.6055404", "0.6039395", "0.6014921", "0.6002965", "0.59954935", "0.597669", "0.59764755", "0.59255856", "0.5884646", "0.58732724", "0.58666223", "0.5863554", "0.58591187", "0.584767", "0.58328533", "0.58317083", "0.57340646", "0.5720275", "0.5705428", "0.56913245", "0.5674175", "0.5673692", "0.56715214", "0.56571203", "0.5650137", "0.56493", "0.5643818", "0.5641156", "0.56401217", "0.563966", "0.5635847", "0.56305236", "0.56255364", "0.56255364", "0.56255364", "0.56220675", "0.56187665", "0.5617567", "0.5614255", "0.5607724", "0.56022775", "0.5600732", "0.5600179", "0.5597271", "0.5593529", "0.55929613", "0.55912507", "0.55858374", "0.5583939", "0.55831766", "0.5578822", "0.5571418", "0.5560428", "0.5560428", "0.555291", "0.5551865", "0.55461174", "0.5545812", "0.5544534", "0.5539737", "0.5539232", "0.5536996", "0.55320144", "0.55287445", "0.5516824", "0.55145186", "0.5512878", "0.5512776", "0.551252", "0.5505722", "0.5505722", "0.550487", "0.5503869", "0.55030996", "0.54961413", "0.5488443", "0.5487669", "0.5487604" ]
0.5574121
71
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); userID_input = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); password_input = new javax.swing.JPasswordField(); login_btn = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); jPanel1.setBackground(new java.awt.Color(51, 51, 51)); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 72)); // NOI18N jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("LOGIN"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(178, 178, 178) .addComponent(jLabel1) .addContainerGap(182, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(307, 307, 307) .addComponent(jLabel1) .addContainerGap(326, Short.MAX_VALUE)) ); jPanel2.setBackground(new java.awt.Color(255, 255, 255)); jLabel2.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel2.setText("User ID"); userID_input.setBackground(new java.awt.Color(51, 51, 51)); userID_input.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N userID_input.setForeground(new java.awt.Color(255, 255, 255)); jLabel3.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel3.setText("Password"); password_input.setBackground(new java.awt.Color(51, 51, 51)); password_input.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N password_input.setForeground(new java.awt.Color(255, 255, 255)); password_input.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { password_inputActionPerformed(evt); } }); login_btn.setBackground(new java.awt.Color(51, 51, 51)); login_btn.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N login_btn.setForeground(new java.awt.Color(255, 255, 255)); login_btn.setText("Login"); login_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { login_btnActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(54, 54, 54) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(login_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(password_input, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3) .addComponent(jLabel2) .addComponent(userID_input, javax.swing.GroupLayout.PREFERRED_SIZE, 400, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(56, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(177, 177, 177) .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent(userID_input, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(50, 50, 50) .addComponent(jLabel3) .addGap(30, 30, 30) .addComponent(password_input, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(35, 35, 35) .addComponent(login_btn, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(202, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, 0) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public frmVenda() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public FrmMenu() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73208135", "0.7291972", "0.7291972", "0.7291972", "0.7287118", "0.72494483", "0.7214677", "0.72086734", "0.7197058", "0.71912485", "0.7185818", "0.71596724", "0.71489036", "0.7094215", "0.7082007", "0.70579666", "0.6988024", "0.6978225", "0.6955616", "0.6955434", "0.69458616", "0.69446844", "0.6937443", "0.69325924", "0.69280547", "0.69266534", "0.69264925", "0.6912501", "0.6911917", "0.6894212", "0.6893167", "0.68922186", "0.6892184", "0.6890009", "0.688444", "0.6883334", "0.68823224", "0.6879555", "0.68768615", "0.6875667", "0.68722147", "0.6860655", "0.68569547", "0.6856804", "0.6856167", "0.6855431", "0.6854634", "0.68536645", "0.68536645", "0.684493", "0.6837617", "0.68372554", "0.68303156", "0.6828861", "0.6827668", "0.68246883", "0.68245596", "0.6818436", "0.6818284", "0.6812057", "0.681017", "0.68095857", "0.68093693", "0.6809163", "0.68027467", "0.67963576", "0.6794979", "0.6793972", "0.6792247", "0.67903155", "0.67896885", "0.67893314", "0.6783135", "0.6767654", "0.67672074", "0.67655265", "0.6757984", "0.6757062", "0.6754005", "0.67513984", "0.674334", "0.6740801", "0.6737678", "0.6737453", "0.6734575", "0.67281", "0.6727845", "0.67219335", "0.67169774", "0.67163646", "0.6715783", "0.67106164", "0.6708574", "0.6705358", "0.67030907", "0.6701408", "0.6700769", "0.66998196", "0.6695165", "0.66917574", "0.6691252" ]
0.0
-1
Returns true to indicate that the editing cell can be selected. The default method returns true without action but may be overridden in derived classes for more specific behavior.
@Override public boolean shouldSelectCell(EventObject anEvent){ return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean canSelectionChange() {\n return true;\n }", "public boolean isEditingEnabled() {\r\n // Additional business logic can go here\r\n return (getContactSelection().getMinSelectionIndex() != -1);\r\n }", "@Override\r\n\t\t\t\t\tpublic boolean shouldSelectCell(EventObject arg0) {\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}", "@Override\n public boolean select() {\n cell.setState(cell.getRevealedState());\n return true;\n }", "public boolean shouldSelectCell(EventObject event) {\n\treturn realEditor.shouldSelectCell(event);\n }", "@Override\r\n\tpublic boolean shouldSelectCell(EventObject anEvent) {\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean shouldSelectCell(EventObject anEvent) {\n\t\tcomboBox.requestFocus();//获取焦点数据\n\t\tlog.info(\"|------表格单元格编辑模型------|\\t\"+\"shouldSelectCell\\t\"+\n\t\t\t\ttable.getEditingRow()+\",\"+table.getEditingColumn());\n\t\treturn false;\n\t}", "public boolean isSelectingAction() {\n return false;\n }", "public boolean isSomethingSelected() {\r\n \t\treturn graph.getSelectionCell() != null;\r\n \t}", "@Override\n public boolean isSelectedIndex(int row)\n {\n return allowSelectDisabled\n || isAssociationAvailable(assnsTable.convertRowIndexToModel(row))\n ? super.isSelectedIndex(row)\n : false;\n }", "@Override\n public boolean isCellEditable(int row, int column)\n {\n return column == convertColumnIndexToModel(AssociationsTableColumnInfo.DESCRIPTION.ordinal())\n && allowSelectDisabled;\n }", "@Override\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return (columnIndex == SEL_INDEX);\n }", "public boolean isSelected() { \n \treturn selection != null; \n }", "public abstract boolean hasSelection();", "public boolean forceSelection();", "public boolean isSelected();", "public boolean isSelected();", "@Override\n\tpublic boolean isCellInteractable() {\n\t\treturn false;\n\t}", "public boolean canHandle(Object selection);", "@Override\n\tpublic boolean isSelected() {\n\t\treturn false;\n\t}", "public abstract boolean isSelected();", "@Override\r\n public boolean isCellEditable(int row, int col) {\r\n return true;\r\n }", "public boolean isSelected() {\n return (state & STATE_SELECTED) != 0;\n }", "@Override\r\n public boolean isCellEditable(int row, int col) {\n return (col == Column.Active.ordinal());\r\n }", "public boolean isSelected() {\n return isEnabled;\n }", "@Override\r\n\t\t\t\t\tpublic boolean isCellEditable(EventObject arg0) {\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}", "@Override\n public boolean isCellEditable(int arg0, int arg1) {\n return false;\n }", "@Override\n public boolean isCellEditable(int arg0, int arg1) {\n return false;\n }", "public boolean isSelected() { return selected; }", "@Override\n\tpublic boolean isCellEditable(int arg0, int arg1) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isCellEditable(int arg0, int arg1) {\n\t\treturn false;\n\t}", "@Override\n public boolean isCellEditable(int row, int column) {\n return editable;\n }", "@Override\n public boolean isCellEditable(int row, int column) {\n return editable;\n }", "public boolean isSelectionListener() {\n return true;\n }", "public boolean allowsEditing() {\n\t\tif (type==SOURCE) return true;\n\t\telse return false;\n\t}", "public boolean isCellSelected(Object cell) {\r\n \t\treturn graph.isCellSelected(cell);\r\n \t}", "@Override\n protected boolean calculateEnabled() {\n if (!super.calculateEnabled())\n return false;\n // allows only the editing of non-readonly parts\n return EditPartUtil.isEditable(getSelectedObjects().get(0));\n }", "@Override\n\t\t public boolean isCellEditable(int row, int column) {\n\t\t //all cells false therefore they are not editable\n\t\t return false;\n\t\t }", "@Override\r\n\tprotected boolean hasEditSupport() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isCellEditable(EventObject anEvent) {\n\t\treturn true;\r\n\t}", "public boolean isSelected() {\r\n\t\treturn selected;\r\n\t}", "public boolean isSelected() {\r\n return selected;\r\n }", "@Override\r\n\t\tpublic boolean isCellEditable(int row, int col) {\n\t\t\tif (col == 1 || col == 2) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "private void checkSelectable() {\n \t\tboolean oldIsSelectable = isSelectable;\n \t\tisSelectable = isSelectAllEnabled();\n \t\tif (oldIsSelectable != isSelectable) {\n \t\t\tfireEnablementChanged(SELECT_ALL);\n \t\t}\n \t}", "public boolean isMaskSelected() {\n return false;\n }", "public boolean isCellEditable(int row, int col) {\r\n return true;\r\n }", "public boolean isSelected() {\n \t\treturn selected;\n \t}", "public boolean isSelected()\n\t{\n\t\treturn selected;\n\t}", "public boolean isMultiSelection()\n {\n return multiSelection;\n }", "public boolean isSelected() {\n\t\treturn selected;\n\t}", "public boolean isSelected() {\n\t\treturn selected;\n\t}", "@Override\n\tpublic boolean isEnabled() {\n\t\treturn !getSelectedDeletables().isEmpty();\n\t}", "boolean isSelected();", "boolean isSelected();", "boolean isSelected();", "public boolean isSelectionChanged();", "@Override\n public boolean isCellEditable(int rowIndex,\n int columnIndex) {\n return false;\n }", "@Override\n\t public boolean isCellEditable(int row, int column)\n\t {\n\t return false;\n\t }", "public boolean isSelected()\n {\n return selected;\n }", "@Override\n\t\t public boolean isCellEditable(int row, int column) {\n\t\t //all cells false\n\t\t return false;\n\t\t }", "public boolean isCellEditable(int row, int col) {\n return true;\n }", "@Override\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return false;\n }", "@Override\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return false;\n }", "@Override\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return columnIndex == 1;\n }", "@Override\n public boolean isInEditMode() {\n return mEditable;\n }", "@Override\n public boolean isInEditMode() {\n return mEditable;\n }", "@Override\n public boolean isCellEditable(int rowIndex, int columnIndex)\n {\n return columnIndex == 1;\n }", "public boolean isCellEditable(int row, int column) {\r\n if (PAGESELECTION==column){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean isCellEditable(int row, int column){ \r\n return false; \r\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 }", "@Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }", "public boolean isCellEditable(int row, int column){\n return true;\n }", "public boolean getSelection () {\r\n\tcheckWidget();\r\n\tif ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;\r\n\treturn (OS.PtWidgetFlags (handle) & OS.Pt_SET) != 0;\r\n}", "public boolean isCellEditable(int row, int col) {\r\n return false;\r\n }", "@Override\r\n\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean forceSelection() {\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean isCellEditable(int row, int col) {\n return col == 2;\n }", "public boolean isSelected(){\r\n return selected;\r\n }", "public boolean isCellEditable(int row, int col) { return (col!=0); }", "@Override\n\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\n\t\treturn false;\n\t}", "public boolean isSelected() {\n\t\treturn iAmSelected;\n\t}", "public boolean isSelected_txt_Pick_Up_Text(){\r\n\t\tif(txt_Pick_Up_Text.isSelected()) { return true; } else { return false;} \r\n\t}", "public boolean isSelectedIndex(int index) {\n\t\t\treturn tablecolselectmodel.isSelectedIndex(index);\n\t\t}", "public boolean isSelected() \n {\n return selected;\n }", "public boolean shouldEditButtonBePresent();", "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}", "public Boolean isMultipleSelection() {\n return m_multipleSelection;\n }", "@Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M le decimos que no seran editables los componetnes\r\n return false;\r\n }", "@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n public boolean isCellEditable(int row, int column) \n {\n return false;\n }", "@Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }", "@Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }", "@Override\n public boolean isCellEditable(int row, int column) {\n return isEditable[column];\n }", "public boolean isSelected() {\r\n return isSelected;\r\n }" ]
[ "0.73294723", "0.71003217", "0.69898224", "0.69897014", "0.68777573", "0.686328", "0.6856763", "0.67199624", "0.6709631", "0.6665647", "0.6649979", "0.663792", "0.6619316", "0.6579728", "0.6478535", "0.6441589", "0.6441589", "0.6431722", "0.64215803", "0.641631", "0.63688517", "0.6365259", "0.63592774", "0.63500404", "0.63070655", "0.62936914", "0.625946", "0.625946", "0.6257383", "0.6244323", "0.6244323", "0.62127507", "0.62127507", "0.61701953", "0.616446", "0.6150881", "0.61508745", "0.6140817", "0.61227006", "0.6118044", "0.6110232", "0.61097956", "0.6108199", "0.6105048", "0.61017233", "0.6089316", "0.60889536", "0.6086456", "0.60858756", "0.60817796", "0.60817796", "0.60794663", "0.60789573", "0.60789573", "0.60789573", "0.6078437", "0.6073117", "0.6070349", "0.6069629", "0.6059404", "0.6058783", "0.6055299", "0.6055299", "0.60538036", "0.6048245", "0.6048245", "0.6045311", "0.60385203", "0.60342985", "0.60312665", "0.6028207", "0.6023082", "0.6020178", "0.6020157", "0.60166883", "0.60166883", "0.60149395", "0.60135716", "0.60131764", "0.60089695", "0.60055226", "0.60055226", "0.59996176", "0.5995288", "0.5990935", "0.5988443", "0.5986978", "0.59833616", "0.5982587", "0.5981431", "0.59792787", "0.59792787", "0.59792787", "0.59792787", "0.59792787", "0.5977324", "0.5968246", "0.5968246", "0.5962791", "0.5960357" ]
0.6571982
14
Add event code here...
public void viewReference(ActionEvent actionEvent) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "Event () {\n // Nothing to do here.\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "private void createEvents() {\n\t}", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "public void simpleEvent() {\n AdGyde.onSimpleEvent(\"SimpleEventID\");\n Toast.makeText(this, \"Simple event clicked\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "void onNewEvent(Event event);", "private void eventhandler() {\n\r\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event event) {\n\t\t\n\t}", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "BasicEvents createBasicEvents();", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "public void addEvPEC(Event ev);", "@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}", "public void setEventName(String name);", "public void consulterEvent() {\n\t\t\n\t}", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "void event(Event e) throws Exception;", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "void onApplicationEvent(ApplicationEvent e);", "public void runEvent();", "void addSetupEvent(SetupEvent setupEvent);", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "private void initializeEvents() {\r\n\t}", "void addEventRegistrationCallback(EventRegistrationCallback eventRegistrationCallback);", "public void processEvent(Event event) {\n\t\t\n\t}", "public void handleEvent(Event event) {\n\t\t\t\t}", "@Override\r\n public void onEvent(FlowableEvent event) {\n }", "public String getEventName();", "@Override\n\tpublic void loadEvents() {\n\t\t\n\t}", "@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "void eventChanged();", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}", "void setEvent(com.walgreens.rxit.ch.cda.EIVLEvent event);", "void doEvent(LightEvent what);", "@Override\n public void onCustomEvent(CustomEvent customEvent) {\n }", "private void createEvents() {\n\t\taddBtn.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbuildOutput();\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void handle(Event event) {\n }", "private void addEvents() {\n\t mlv.getMapNotesOverlay().addEventListener(new NoteSelectedListener()\n {\n\t \t\n\t\t\t@Override\n\t\t\tpublic void handleNoteSelectedEvent(EventObject e, Group gr) {\n\t\t\t\t//We have to go to gallery because the user has select a (groups) note\n\t\t\t\tselectedGroup = gr;\n\t\t\t\tonClick(mlv);\n\t\t\t}\n \t\n });\t\t\t\t\n\t\t\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "public String execute() {\n\t\ttry {\n\t\t\treturnMsg = MESSAGE_EVENT_ADDED;\n\t\t\tcheckEventClash();\n\t\t\tstoreEvent();\n\t\t\treturn returnMsg;\n\t\t} catch (IOException e) {\n\t\t\treturn MESSAGE_EVENT_ERROR;\n\t\t} finally {\n\t\t\tupdateView();\n\t\t\tMagical.setCurrentTab(\"events\");\n\t\t}\n\t}", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void onEvent(DivRepEvent e) {\n\t\t}", "@Override\n public void onEvent(Event t) throws CSenseException {\n }", "public void registerEvents()\n {\n \t\tfinal pchestPlayerListener playerListener = new pchestPlayerListener(this, chestManager);\n \t\tfinal pchestEntityListener entityListener = new pchestEntityListener(this, chestManager);\n \t\tfinal pchestBlockListener blockListener = new pchestBlockListener(this, chestManager);\n \t\t\n \t\t\n pm = getServer().getPluginManager();\n \n /* Entity events */\n pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n \n /* Player events */\n pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n \n /* Block events */\n \t\tpm.registerEvent(Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n \t\tpm.registerEvent(Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n \n \t\t\n /* Spout Required events */\n \t\tif(SpoutLoaded)\n \t\t{\n \t\t\tfinal pchestInventoryListener inventoryListener = new pchestInventoryListener(this, chestManager);\n \n \t /* Inventory events */\n \t\t\tpm.registerEvent(Type.CUSTOM_EVENT, inventoryListener, Event.Priority.Normal, this);\n \t\t}\n }", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "public void runInUi(ElexisEvent ev){}", "private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickListener(this);\r\n\t\tlayout_ssmm.setOnClickListener(this);\r\n\t\ttxt_myredpager.setOnClickListener(this);\r\n\t}", "private void registerEvents() {\n MouseEventHandler handler = new MouseEventHandler();\n setOnMousePressed(handler);\n setOnMouseReleased(handler);\n setOnMouseMoved(handler);\n setOnMouseEntered(handler);\n setOnMouseExited(handler);\n\n }", "public void TopDreiEvent();", "void onEvent (ZyniEvent event, Object ... params);", "BasicEvent createBasicEvent();", "void onBusEvent(Event event);", "public void SimAdded(AddSimEvento event);", "@Override\n\t\tprotected void onEvent(DivRepEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void handleEvent(EnOceanMessage data) {\n\t}", "@Override\n protected void initEventAndData() {\n }", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "private void registerEvents(){\n Bukkit.getPluginManager().registerEvents(new RegionListener(), this);\n Bukkit.getPluginManager().registerEvents(new SignListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonerListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonBlockListener(), this);\n Bukkit.getPluginManager().registerEvents(new MonitorListener(), this);\n Bukkit.getPluginManager().registerEvents(new PortalListener(), this);\n }", "Event createEvent();", "Event createEvent();", "public void add(GameEvent e);", "@Override\n public void onReady(ReadyEvent event) {\n\n }", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "EventUse createEventUse();", "void eventStart(String key);", "public void handle_GlobalEvents(int code)\r\n {\r\n int type = (int) (-(short) (code & 0xFFFF));\r\n int cond = -(int) (short) (code >>> 16);\r\n int num = listPointers[rhEvents[type] + cond];\r\n if (num != 0)\r\n {\r\n computeEventList(num, null);\t\t// Evalue les evenements\r\n }\r\n }", "public void frameworkEvent(FrameworkEvent event);", "private void registerEvents(){\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t//PlayerListener stuff\r\n\t pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\r\n\t //BlockListener stuff\r\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\r\n //EntityListener stuff\r\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\r\n //ServerListener stuff\r\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, this);\r\n }", "Event getEvent();", "private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}", "static void addEventMetadata(Event event) {\n event.setSessionId(AssociationController.getSessionId());\n event.setAppInstallId(Prefs.INSTANCE.getAppInstallId());\n event.setDt(DateUtil.iso8601DateFormat(new Date()));\n }", "private void createMainEvents() {\n\t\taddWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tjdbc.closeSQLConnection();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtn_settings.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t}\n\t\t});\n\n\t}", "private void initEvent() {\n\t\tmBtnPower.setOnClickListener(this);\n\t\tmBtnProfile.setOnClickListener(this);\n\t\tmBtnArea.setOnClickListener(this);\n\t\tmBtnSkipTime.setOnClickListener(this);\n\t\tmBtnFrequencyPoint.setOnClickListener(this);\n\t\tmBtnAlgorithm.setOnClickListener(this);\n\t}", "private void addNewMember(Event x) {\r\n \r\n \r\n \r\n }", "ProgramEventEvent createProgramEventEvent();", "public abstract void processEvent(Object event);", "protected void addEvent(BaseEvent event) {\n\t\tlevelEvent.add(event);\n\t}", "@Override\n public void onTangoEvent(TangoEvent event) {\n }" ]
[ "0.7133789", "0.6999529", "0.69949776", "0.69949776", "0.69066507", "0.68845415", "0.68496764", "0.68496764", "0.68496764", "0.68496764", "0.68496764", "0.68445176", "0.6841186", "0.6839083", "0.68375826", "0.6829158", "0.6829158", "0.6806268", "0.67489874", "0.67483705", "0.67330945", "0.67330945", "0.67330945", "0.6696915", "0.6691523", "0.66237545", "0.66221136", "0.6616948", "0.6610452", "0.65551186", "0.65292954", "0.65292954", "0.6515509", "0.6499281", "0.64946544", "0.6494281", "0.6483362", "0.6483362", "0.64762384", "0.64099175", "0.63998145", "0.63992494", "0.63728", "0.63670576", "0.6324887", "0.6280758", "0.6279538", "0.627466", "0.62657636", "0.6250024", "0.62469596", "0.62469566", "0.6240522", "0.6195508", "0.61817104", "0.61608946", "0.6154626", "0.6145748", "0.6145748", "0.6144158", "0.612856", "0.6109464", "0.6109464", "0.61044276", "0.6101573", "0.6097203", "0.6094051", "0.6093904", "0.6071259", "0.60687923", "0.60674536", "0.6066374", "0.6050216", "0.6045113", "0.60358125", "0.60318404", "0.6020697", "0.60107666", "0.60107666", "0.60107666", "0.6007996", "0.599774", "0.599774", "0.5995161", "0.5986446", "0.5983016", "0.5979936", "0.5976981", "0.5967108", "0.5961134", "0.5957285", "0.5945582", "0.5927322", "0.59157723", "0.59101313", "0.59044987", "0.5902747", "0.59004986", "0.5898207", "0.5897558", "0.5896313" ]
0.0
-1
Before calling all the API's,Pass import source as "SAVE_CONFIG_TO_QUOTE"
public void saveQuoteFromSysToOrcl(ActionEvent actionEvent) throws MalformedURLException, IOException { boolean isQuoteSaved = false; V93kQuote v93k = (V93kQuote)ADFUtils.getSessionScopeValue("parentObject"); if (v93k != null && v93k.getSessionDetails() != null) { isQuoteSaved = v93k.getSessionDetails().isQuoteSaved(); } //Do not call configurator if there is an error from Save Config to quote if (!isQuoteSaved) { HashMap map = new HashMap(); if (v93k != null && v93k.getInputParams() != null && v93k.getSessionDetails() != null && v93k.getSessionDetails().getTargetQuoteNumber() != null) { v93k.getInputParams().setImportSource("SAVE_CONFIG_TO_QUOTE"); String czNodeName = null; if (v93k.getUiSelection() != null) { czNodeName = v93k.getUiSelection().getCzNodeName(); } String jsonStr = JSONUtils.convertObjToJson(v93k); String responseJson = ConfiguratorUtils.callConfiguratorServlet(jsonStr); ObjectMapper mapper = new ObjectMapper(); Object obj = mapper.readValue(responseJson, V93kQuote.class); v93k = (V93kQuote)obj; ADFUtils.setSessionScopeValue("parentObject", v93k); } boolean configHasErrors = configHasErrors(v93k); boolean configHasWarnings = configHasWarning(v93k); if (configHasErrors) { SessionDetails sesDetails = v93k.getSessionDetails(); if (v93k.getSessionDetails() == null) { sesDetails = new SessionDetails(); } sesDetails.setQuoteSaved(true); ADFUtils.setSessionScopeValue("parentObject", v93k); HashMap rulesetMap = new HashMap(); rulesetMap.put("error", "Y"); ADFUtils.setSessionScopeValue("ruleSetMap", rulesetMap); displayConfigErrors(v93k); } if (configHasWarnings && !configHasErrors) { displayWarnings(v93k); } if (!configHasErrors && !configHasWarnings) { String createQtMsg = getFndMessages(SudokuUtils.createQteMsg); String discount = null; int respid = Integer.parseInt((String)ADFUtils.getSessionScopeValue("RespId") == null ? "51156" : (String)ADFUtils.getSessionScopeValue("RespId")); int usrId = Integer.parseInt((String)ADFUtils.getSessionScopeValue("UserId") == null ? "0" : (String)ADFUtils.getSessionScopeValue("UserId")); // FacesContext fc = FacesContext.getCurrentInstance(); BindingContainer bindings = getBindings(); StringBuilder resultMsg = new StringBuilder("<html><body>"); StringBuilder resultErrMsg = new StringBuilder("<html><body>"); if (v93k != null) { if (v93k.getQheaderObject() != null) { if (v93k.getQheaderObject().getDealObject() != null) { discount = (String)v93k.getQheaderObject().getDealObject().getDdiscount(); } } if (v93k.getSessionDetails() != null) { if (v93k.getSessionDetails().isCreateNewQuote()) { if (v93k.getSessionDetails().getTargetQuoteNumber() != null) { for (QuoteLinePOJO list : v93k.getTargetConfigurationLines()) { if (list != null) { String operationMode = list.getOperationCode(); if (operationMode != null && operationMode.equalsIgnoreCase("CREATE")) { OperationBinding createOb = bindings.getOperationBinding("callConfigLineToAddQuoteAPI"); _logger.info("Calling callConfigLineToAddQuoteAPI....QUOTE NUM " + v93k.getSessionDetails().getTargetQuoteNumber()); _logger.info("Calling callConfigLineToAddQuoteAPI....OPERATION CODE " + list.getOperationCode()); _logger.info("Calling callConfigLineToAddQuoteAPI....ConfigHdrId " + list.getConfigHrdId()); _logger.info("Calling callConfigLineToAddQuoteAPI....ConfigRevNum " + list.getConfigRevNum()); _logger.info("Calling callConfigLineToAddQuoteAPI....ITEM NUM " + list.getItemName()); createOb.getParamsMap().put("quoteNum", v93k.getSessionDetails().getTargetQuoteNumber()); createOb.getParamsMap().put("itemNumber", list.getItemName()); createOb.getParamsMap().put("itemQty", 1); createOb.getParamsMap().put("orgNum", list.getOperationCode() == null ? "GDO" : list.getOperationCode()); createOb.getParamsMap().put("ConfighdrId", list.getConfigHrdId()); createOb.getParamsMap().put("configRevNum", list.getConfigRevNum()); createOb.getParamsMap().put("respId", respid); createOb.getParamsMap().put("usrId", usrId); String createMsg = (String)createOb.execute(); if (createMsg != null) { if (createMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + createMsg + "</b></p>"); } else if (createMsg.contains("S-")) { if (discount != null) { String discountMsg = updateDiscount(v93k.getSessionDetails().getTargetQuoteNumber(), discount, respid, usrId); if (discountMsg != null) { if (discountMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + discountMsg + "</b></p>"); } else if (discountMsg.contains("S-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else if (discountMsg.contains("E-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(discountMsg.toString()); } } String[] resMsg = createMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } isQuoteSaved = true; } else if (createMsg.contains("E-")) { String[] resMsg = createMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(createMsg.toString()); } } } } map = callWarranty(v93k, v93k.getSessionDetails().getTargetQuoteNumber(), respid, usrId); if (map != null) { if (map.get("resultErrMsg") != null) resultErrMsg.append(map.get("resultErrMsg")); if (map.get("resultMsg") != null) resultMsg.append(map.get("resultMsg")); } } else { if (createQtMsg != null) resultErrMsg.append("<p><b>" + createQtMsg + "</b></p>"); else resultErrMsg.append("<p><b>" + SudokuUtils.createQteMsg + "</b></p>"); // resultErrMsg.append("<p><b>Please verify and create quote before saving</b></p>"); // resultMsg.append("\n"); } } else if (v93k.getSessionDetails().isDuplicateQuote()) { if (v93k.getSessionDetails().getTargetQuoteNumber() != null) { ADFContext.getCurrent().getSessionScope().put("targetQuoteNumber", v93k.getSessionDetails().getTargetQuoteNumber()); String targetQuote = v93k.getSessionDetails().getTargetQuoteNumber().toString(); for (QuoteLinePOJO list : v93k.getTargetConfigurationLines()) { if (list != null) { String operationMode = list.getOperationCode(); if (operationMode != null && operationMode.equalsIgnoreCase("CREATE")) { OperationBinding dCreateOb = bindings.getOperationBinding("callConfigLineToAddQuoteAPI"); _logger.info("Calling callConfigLineToAddQuoteAPI....QUOTE NUM " + v93k.getSessionDetails().getTargetQuoteNumber()); _logger.info("Calling callConfigLineToAddQuoteAPI....OPERATION CODE " + list.getOperationCode()); _logger.info("Calling callConfigLineToAddQuoteAPI....ConfigHdrId " + list.getConfigHrdId()); _logger.info("Calling callConfigLineToAddQuoteAPI....ConfigRevNum " + list.getConfigRevNum()); _logger.info("Calling callConfigLineToAddQuoteAPI....ITEM NUM " + list.getItemName()); dCreateOb.getParamsMap().put("quoteNum", targetQuote); dCreateOb.getParamsMap().put("itemNumber", list.getItemName()); // ob.getParamsMap().put("itemQty",list.getItems().size()); dCreateOb.getParamsMap().put("itemQty", 1); // dCreateOb.getParamsMap().put("OrgNum", // list.getOperationCode()); dCreateOb.getParamsMap().put("orgNum", list.getOperationCode() == null ? "GDO" : list.getOperationCode()); dCreateOb.getParamsMap().put("ConfighdrId", list.getConfigHrdId()); dCreateOb.getParamsMap().put("configRevNum", list.getConfigRevNum()); dCreateOb.getParamsMap().put("respId", respid); dCreateOb.getParamsMap().put("usrId", usrId); String createMsg = (String)dCreateOb.execute(); if (createMsg != null) { if (createMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + createMsg + "</b></p>"); } else if (createMsg.contains("S-")) { if (discount != null) { String discountMsg = updateDiscount(targetQuote, discount, respid, usrId); if (discountMsg != null) { if (discountMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + discountMsg + "</b></p>"); } else if (discountMsg.contains("S-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else if (discountMsg.contains("E-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(discountMsg.toString()); } } String[] resMsg = createMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } //save too oracle success // ADFUtils.setSessionScopeValue("configSaved", // "Y"); isQuoteSaved = true; } else if (createMsg.contains("E-")) { String[] resMsg = createMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(createMsg.toString()); } } } } map = callWarranty(v93k, v93k.getSessionDetails().getTargetQuoteNumber(), respid, usrId); if (map != null) { if (map.get("resultErrMsg") != null) resultErrMsg.append(map.get("resultErrMsg")); if (map.get("resultMsg") != null) resultMsg.append(map.get("resultMsg")); } } else { if (createQtMsg != null) resultErrMsg.append("<p><b>" + createQtMsg + "</b></p>"); else resultErrMsg.append("<p><b>" + SudokuUtils.createQteMsg + "</b></p>"); // resultErrMsg.append("<p><b>Please verify and create quote before saving</b></p>"); // resultMsg.append("\n"); } } else if (v93k.getSessionDetails().isUpdateQuote()) { if (v93k.getSessionDetails().getSourceQuoteNumber() != null) { map = callWarranty(v93k, v93k.getSessionDetails().getSourceQuoteNumber(), respid, usrId); if (map != null) { if (map.get("resultErrMsg") != null) resultErrMsg.append(map.get("resultErrMsg")); if (map.get("resultMsg") != null) resultMsg.append(map.get("resultMsg")); } for (QuoteLinePOJO list : v93k.getTargetConfigurationLines()) { if (list != null) { String operationMode = list.getOperationCode(); if (operationMode != null && operationMode.equalsIgnoreCase("UPDATE")) { OperationBinding ob = bindings.getOperationBinding("callConfigLineToUpdateQuoteAPI"); _logger.info("Calling callConfigLineToUpdateQuoteAPI....QUOTE NUM " + v93k.getSessionDetails().getSourceQuoteNumber()); _logger.info("Calling callConfigLineToUpdateQuoteAPI....OPERATION CODE " + list.getOperationCode()); _logger.info("Calling callConfigLineToUpdateQuoteAPI....ConfigHdrId " + list.getConfigHrdId()); _logger.info("Calling callConfigLineToUpdateQuoteAPI....ConfigRevNum " + list.getConfigRevNum()); _logger.info("Calling callConfigLineToUpdateQuoteAPI....ITEM NUM " + list.getItemName()); _logger.info("Calling callConfigLineToUpdateQuoteAPI....QUOTE LINE NUM " + list.getQuoteLineId()); ob.getParamsMap().put("quoteNum", v93k.getSessionDetails().getSourceQuoteNumber()); ob.getParamsMap().put("quoteLineNum", list.getQuoteLineId()); ob.getParamsMap().put("itemQty", 1); ob.getParamsMap().put("ConfighdrId", list.getConfigHrdId()); ob.getParamsMap().put("configRevNum", list.getConfigRevNum()); ob.getParamsMap().put("respId", respid); ob.getParamsMap().put("usrId", usrId); String updateMsg = (String)ob.execute(); if (updateMsg != null) { if (updateMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + updateMsg + "</b></p>"); } else if (updateMsg.contains("S-")) { if (discount != null) { String discountMsg = updateDiscount(v93k.getSessionDetails().getSourceQuoteNumber(), discount, respid, usrId); if (discountMsg != null) { if (discountMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + discountMsg + "</b></p>"); } else if (discountMsg.contains("S-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else if (discountMsg.contains("E-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(discountMsg.toString()); } } String[] resMsg = updateMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + // resMsg[1] + "Quote Line " + list.getItemName() + " Update Successfully." + "</b></p>"); } //save to oracle success // ADFUtils.setSessionScopeValue("configSaved", // "Y"); isQuoteSaved = true; } else if (updateMsg.contains("E-")) { String[] resMsg = updateMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(updateMsg.toString()); } } else if (operationMode != null && operationMode.equalsIgnoreCase("CREATE")) { OperationBinding ob = bindings.getOperationBinding("callConfigLineToAddQuoteAPI"); ob.getParamsMap().put("quoteNum", v93k.getSessionDetails().getSourceQuoteNumber().toString()); ob.getParamsMap().put("itemNumber", list.getItemName()); ob.getParamsMap().put("itemQty", 1); ob.getParamsMap().put("orgNum", list.getOperationCode() == null ? "GDO" : list.getOperationCode()); ob.getParamsMap().put("ConfighdrId", list.getConfigHrdId()); ob.getParamsMap().put("configRevNum", list.getConfigRevNum()); ob.getParamsMap().put("respId", respid); ob.getParamsMap().put("usrId", usrId); String createMsg = (String)ob.execute(); if (createMsg != null) { if (createMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + createMsg + "</b></p>"); } else if (createMsg.contains("S-")) { if (discount != null) { String discountMsg = updateDiscount(v93k.getSessionDetails().getSourceQuoteNumber(), discount, respid, usrId); if (discountMsg != null) { if (discountMsg.contains("<html><body>")) { resultErrMsg.append("<p><b>" + discountMsg + "</b></p>"); } else if (discountMsg.contains("S-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + // resMsg[1] + "Quote Line " + list.getItemName() + " Updated Successfully." + "</b></p>"); } } else if (discountMsg.contains("E-")) { String[] resMsg = discountMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(discountMsg.toString()); } } String[] resMsg = createMsg.split("-", 2); if (resMsg[1] != null) { resultMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else if (createMsg.contains("E-")) { String[] resMsg = createMsg.split("-", 2); if (resMsg[1] != null) { resultErrMsg.append("<p><b>" + resMsg[1] + "</b></p>"); } } else resultErrMsg.append(createMsg.toString()); } } else { } } } //Call DELETE LINE API HERE if (v93k != null && v93k.getTargetConfigurationLines() != null && !v93k.getTargetConfigurationLines().isEmpty()) { for (QuoteLinePOJO list : v93k.getTargetConfigurationLines()) { if (list.getOperationCode() != null && list.getOperationCode().equalsIgnoreCase("DELETE")) { _logger.info("Quote Line Delete API Start for " + list.getItemName()); String deleteLineStatus = deleteConfigLineFromQuote(list.getQuoteLineId()); if (deleteLineStatus != null && deleteLineStatus.equalsIgnoreCase("S")) { resultMsg.append("<p><b>" + "Quote Line " + list.getItemName() + " Deleted Successfully." + "<b><p>"); _logger.info("Quote Line deleted for " + list.getItemName()); } else { resultErrMsg.append("<p><b>" + "Quote Line could not be deleted" + deleteLineStatus + "</b></p>"); _logger.info("Could Not delete quote line"); } } } } } else { if (createQtMsg != null) resultErrMsg.append("<p><b>" + createQtMsg + "</b></p>"); else resultErrMsg.append("<p><b>" + SudokuUtils.createQteMsg + "</b></p>"); // resultErrMsg.append("<p><b>Please verify and create quote before saving</b></p>"); // resultMsg.append("\n"); } } else { if (createQtMsg != null) resultErrMsg.append("<p><b>" + createQtMsg + "</b></p>"); else resultErrMsg.append("<p><b>" + SudokuUtils.createQteMsg + "</b></p>"); } } else { if (createQtMsg != null) resultErrMsg.append("<p><b>" + createQtMsg + "</b></p>"); else resultErrMsg.append("<p><b>" + SudokuUtils.createQteMsg + "</b></p>"); } } else { if (createQtMsg != null) resultErrMsg.append("<p><b>" + createQtMsg + "</b></p>"); else resultErrMsg.append("<p><b>" + SudokuUtils.createQteMsg + "</b></p>"); } String msg = resultMsg.append("</body></html>").toString(); String errMsg = resultErrMsg.append("</body></html>").toString(); if (msg != null || errMsg != null) { RichPopup.PopupHints hints = new RichPopup.PopupHints(); if (msg != null && !"<html><body></body></html>".equalsIgnoreCase(msg)) { this.setInfoFromPopup(msg); } else this.setInfoFromPopup(null); if (errMsg != null && !"<html><body></body></html>".equalsIgnoreCase(errMsg)) this.setErrorFromPopup(errMsg); else this.setErrorFromPopup(null); successMsgOnSaveToOrcl.setValue(msg); errorMsgOnSaveToOrcl.setValue(errMsg); this.getBindSaveToOrclPopup().show(hints); // bindSaveToOrclPopup.show(hints); // bindPopup1.show(hints); } } else { isQuoteSaved = false; displayConfigErrors(v93k); } if (v93k != null && v93k.getSessionDetails() != null) { v93k.getSessionDetails().setQuoteSaved(isQuoteSaved); ADFUtils.setSessionScopeValue("parentObject", v93k); String currView = (String)ADFUtils.getSessionScopeValue("currView"); if (currView != null && currView.equalsIgnoreCase("configurator")) { RichCommandImageLink button = (RichCommandImageLink)ADFUtils.findComponentInRoot("ctb3"); // Navigate to create quote page if (button != null) { ActionEvent acEvent = new ActionEvent(button); acEvent.queue(); } } } } else { ADFUtils.addMessage(FacesMessage.SEVERITY_WARN, "Quote has been saved to Oracle,This action is not allowed.."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveConfiguration() {\n }", "private void config() {\n\t}", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "private void saveBeforeRun() {\n if ( _helper != null && _settings.getSaveBeforeRun() )\n _helper.saveBeforeRun();\n }", "private OptimoveConfig() {\n }", "private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "public void saveQuote() {\n\t\ttry {\n\t\t\tString json = urlRead.readUrl(\"http://dist-sso.it-kartellet.dk/quote/\");\n\n\t\t\tJSONParser jsonParser = new JSONParser();\n\t\t\tJSONObject jsonObject = (JSONObject) jsonParser.parse(json);\n\n\t\t\tString quote = (String) jsonObject.get(\"quote\");\n\t\t\tquote = quote.replace(\"'\", \"''\");\n\n\t\t\tString[] fields = {\"qotd\"};\n\t\t\tString[] values = {quote};\n\n\t\t\tif(qb.selectFrom(\"qotd\").all().executeQuery().next()){\n\t\t\t\tqb.update(\"qotd\", fields, values).where(\"msg_type\", \"=\", \"qotd\").execute();\n\t\t\t} else {\n\t\t\t\tqb.insertInto(\"qotd\", fields).values(values).execute();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void exportConfiguration() {\n if (!Files.exists(languageConfigPath)) this.saveResource(\"language.yml\", false);\n if (!Files.exists(propertiesConfigPath)) this.saveResource(\"properties.yml\", false);\n }", "protected void prepare4SaveScript() {\n\t\tMigrationConfiguration cfg = getMigrationWizard().getMigrationConfig();\n\t\tcfg.cleanNoUsedConfigForStart();\n\t}", "private void preSyncConfiguration() {\n customPreSyncConfiguration.accept(caller, listener);\n }", "@Override\n public synchronized boolean configure(StaplerRequest req, JSONObject json) {\n this.client = null;\n this.listSecrets = null;\n this.transformations = null;\n\n req.bindJSON(this, json);\n save();\n return true;\n }", "public void forceDefaultConfig()\n {\n plugin.saveResource(fileName, true);\n }", "private Config() {\n }", "@BeforeTest\n\tpublic void config() {\n\t\tString path=System.getProperty(\"user.dir\")+\"\\\\reports\\\\index.html\"; //after + we want new path to add to it\n\t\tExtentSparkReporter reporter=new ExtentSparkReporter(path);// this is responsible for creating report\n\t\treporter.config().setReportName(\"Web Automation Akhil\");\n\t\treporter.config().setDocumentTitle(\"Test Results\");\n\t\t\n\t\tExtentReports extent=new ExtentReports();// this is main class for Tracking the things.\n\t\textent.attachReporter(reporter); // Here is link of config with main class\n\t\textent.setSystemInfo(\"Tester\", \"Akhilesh Rawat\");\n\t}", "public void exportConfiguration(){\n\t\tcontroller.exportTestConfiguration();\n\t}", "@Override\n\tpublic void prepare() throws Exception {\n\t\tsuper.prepare();\n\t\t//setto il titolo:\n\t\tthis.model.setTitolo(\"Quote ordinativo\");\n\t\t\n }", "@Override\n\tpublic void configuration(String csv) {\n\n\t}", "protected void additionalConfig(ConfigType config){}", "protected void copyProperties(AbstractContext context) {\n\t\tcontext.description = this.description;\n\t\tcontext.batchSize = this.batchSize;\n\t\tcontext.injectBeans = this.injectBeans;\n\t\tcontext.commitImmediately = this.isCommitImmediately();\n\t\tcontext.script = this.script;\n\t}", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "public interface PasteBinConfigurationService {\n\n /**\n * <p>Get the stored password.</p>\n * <p>If there is a problem getting the password this method returns an empty String {@code \"\"}.</p>\n *\n * @return The stored password or empty String in case of a problem.\n */\n String getPassword();\n\n /**\n * <p>Set the password to authenticate with PasteBin.</p>\n *\n * @param password The new password.\n */\n void setPassword(String password);\n\n /**\n * Validates if the auth information is filled.\n *\n * @return {@link Boolean#TRUE} if all the necessary settings are filled, {@link Boolean#FALSE} otherwise.\n */\n @Contract(pure = true, value = \"null -> false;\")\n boolean isAuthInfoPresent();\n\n /**\n * @return If already showed the welcome message to the user\n */\n boolean isShowedWelcomeMessage();\n\n /**\n * Set that already showed the welcome message to the user\n *\n * @param showedWelcomeMessage showed or not\n */\n void setShowedWelcomeMessage(boolean showedWelcomeMessage);\n\n /**\n * @return Version that this settings was saved\n */\n String getVersion();\n\n /**\n * Sets the version that this configuration is to be saved\n *\n * @param version the new version\n */\n void setVersion(String version);\n\n /**\n * @return If the credentials from the configuration is valid or not\n */\n boolean isValidCredentials();\n\n /**\n * Sets if the credentials is valid or not\n *\n * @param validCredentials {@code True} for valid credentials, {@code false} otherwise\n */\n void setValidCredentials(boolean validCredentials);\n\n /**\n * @return The total of users pastes that needs to be fetched.\n */\n int getTotalPastesToFetch();\n\n /**\n * Sets the new {@code totalPastesToFetch}, if the value is higher than 1000, sets to 1000, if lower than 1 sets to 1\n *\n * @param totalPastesToFetch The new total\n */\n void setTotalPastesToFetch(int totalPastesToFetch);\n\n /**\n * @return The current language being used by the plugin.\n */\n @Nullable\n String getCurrentLanguage();\n\n /**\n * <p>Sets the current language to be used by the plugin.</p>\n * <p>The language must be one of the {@link MessageBundle#getAvailableLanguages()}, if the language especified is\n * {@code null} or not exists in the {@link MessageBundle#getAvailableLanguages()} then the {@link Locale#getDefault()}\n * will be used instead</p>\n *\n * @param currentLanguage one of the {@link MessageBundle#getAvailableLanguages()} or null to use the system default\n */\n void setCurrentLanguage(@Nullable String currentLanguage);\n\n /**\n * @return The username for authentication.\n */\n @NotNull\n String getUsername();\n\n /**\n * Sets the new username for authentication.\n *\n * @param username THe new username.\n */\n void setUsername(String username);\n\n /**\n * @return The devkey for authentication.\n */\n @NotNull\n String getDevkey();\n\n /**\n * Sets the new devkey for authentication.\n *\n * @param devkey The new devkey.\n */\n void setDevkey(String devkey);\n}", "public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}", "@SystemSetup(type = Type.ESSENTIAL, process = Process.ALL)\n\tpublic void createEssentialData(final SystemSetupContext context)\n\t{\n\t\timportImpexFile(context, \"/\" + PROJECT_DATA_IMPORT_FOLDER + \"/import/cockpits/editorAreaPDFPTT.impex\", false);\n\t}", "void store() {\n UserPreferences.setLogFileCount(Integer.parseInt(logFileCount.getText()));\n if (!agencyLogoPathField.getText().isEmpty()) {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists()) {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, agencyLogoPathField.getText());\n }\n } else {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, \"\");\n }\n UserPreferences.setMaxSolrVMSize((int)solrMaxHeapSpinner.getValue());\n if (memField.isEnabled()) { //if the field could of been changed we need to try and save it\n try {\n writeEtcConfFile();\n } catch (IOException ex) {\n logger.log(Level.WARNING, \"Unable to save config file to \" + PlatformUtil.getUserDirectory() + \"\\\\\" + ETC_FOLDER_NAME, ex);\n }\n }\n }", "private void setConfigElements() {\r\n getConfig().addEntry(new ConfigEntry(ConfigContainer.TYPE_CHECKBOX, this.getPluginConfig(), USE_API, JDL.L(\"plugins.hoster.CatShareNet.useAPI\", getPhrase(\"USE_API\"))).setDefaultValue(defaultUSE_API).setEnabled(false));\r\n }", "Map<String, Object> exportConfiguration();", "private void setupFiles(){\n\t\t// Copies the default configuration files to the workspace \n\t\ttry{\n\t\t\tBundle bundle = Platform.getBundle(Activator.PLUGIN_ID);\n\t\t\tIPath destBasePath = Platform.getStateLocation(bundle);\n\t\t\tpropertiesFile = destBasePath.append(PreferencesConstants.PROP_BUNDLE_STATE_PATH).toFile();\n\t\t\tif(!propertiesFile.exists()){\n\n\t\t\t\tURI sourceBaseURI = bundle.getEntry(PreferencesConstants.DEFAULT_CONFIG_BUNDLE_PATH).toURI();\n\t\t\t\t//TODO: fix the item below?\n\t\t\t\tEnumeration<URL> entries = bundle.findEntries(PreferencesConstants.DEFAULT_CONFIG_BUNDLE_PATH, null, true);\n\t\t\t\tfor(; entries != null && entries.hasMoreElements();){\n\t\t\t\t\tURL url = entries.nextElement();\n\t\t\t\t\tURI uri = url.toURI();\n\t\t\t\t\tURI relativeURI = sourceBaseURI.relativize(uri);\n\t\t\t\t\tIPath destPath = destBasePath.append(relativeURI.toString());\n\n\t\t\t\t\tif(destPath.hasTrailingSeparator()){\n\t\t\t\t\t\t// it's a folder\n\t\t\t\t\t\tdestPath.toFile().mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t// it's a file\n\t\t\t\t\t\tURL contentURL = FileLocator.resolve(url);\n\t\t\t\t\t\tSystemUtils.blt(contentURL.openStream(), new FileOutputStream(destPath.toFile()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//now save the destination paths to the System properties\n\t\t\t//save the report paths\n\t\t\tString reportTemplatePath = destBasePath.append(PreferencesConstants.DEFAULT_REPORT_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_REPORT_TEMPLATE_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE, \n\t\t\t\t\treportTemplatePath);\n\t\t\tSystem.out.println(\"report template file: \" + reportTemplatePath);\t\t\n\t\t\t\n\t\t\tString reportPath = destBasePath.append(PreferencesConstants.DEFAULT_REPORT_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_REPORT_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT, \n\t\t\t\t\treportPath);\t\t\t\n\t\t\tSystem.out.println(\"report file: \" + reportPath);\t\t\t\n\t\t\t\n\t\t\t//save the rule paths\n\t\t\tString ruleSessionPath = destBasePath.append(PreferencesConstants.DEFAULT_RULE_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_RULE_SESSION_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION, \n\t\t\t\t\truleSessionPath);\t\t\t\n\t\t\tSystem.out.println(\"rule session file: \" + ruleSessionPath);\t\t\t\t\t\n\t\t\t\n\t\t\tString ruleSessionOutPath = destBasePath.append(PreferencesConstants.DEFAULT_RULE_PATH\n\t\t\t\t\t+ PreferencesConstants.DEFAULT_RULE_SESSION_OUT_URL).toPortableString();\n\t\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT, \n\t\t\t\t\truleSessionOutPath);\t\t\t\n\t\t\tSystem.out.println(\"rule session out file: \" + ruleSessionOutPath);\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\t\n\t\t/*\n\t\tString pluginName = Activator.PLUGIN_ID;\n\t\tBundle bundle = Platform.getBundle(pluginName);\n\n\t\tString propFileStr = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.PROP_URL);\n\t\tFile sourcePropFile = new File(propFileStr);\n\n\t\t//propertiesFile = new File(fixedPath);\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tIWorkspaceRoot root = workspace.getRoot();\n\t\tIPath location = root.getLocation();\n\t\t//location.toString()\n\t\t//String path = location.toString() + location.SEPARATOR + \".metadata\" \n\t\t//\t+ location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\t\tString path = location.toString() + location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\t\t//URL entry = Platform.getInstallLocation().getURL();\n\t\t//String path = entry.toString() + location.SEPARATOR + PreferencesConstants.PROP_BASE_URL;\n\n\t\tFile usersResourceDir = new File(path);\n\t\tpropertiesFile = new File(path + PreferencesConstants.PROP_URL);\n\t\tSystem.out.println(\"properties file \" + propertiesFile.getAbsolutePath());\n\t\tFile reportDir;\n\t\tFile ruleDir;\n\t\tif(!usersResourceDir.exists()){\n\t\t\ttry{\n\t\t\t\tSystemUtils.createDirectory(usersResourceDir);\n\t\t\t}\n\t\t\tcatch(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\t//copy the properties file\n\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyFile(sourcePropFile, propertiesFile);\n\t\t\t}\n\t\t\tcatch(IOException e1){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t\t//copy report directory\n\t\t\tString fixedReportPath = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.DEFAULT_REPORT_PATH);\n\t\t\treportDir = new File(fixedReportPath);\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyDirectory(reportDir, usersResourceDir);\n\t\t\t}\n\t\t\tcatch(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\t//copy rule directory\n\t\t\tString fixedRulePath = getFixedPath(bundle, PreferencesConstants.PROP_BASE_URL + PreferencesConstants.DEFAULT_RULE_PATH);\n\t\t\truleDir = new File(fixedRulePath);\n\t\t\ttry{\n\t\t\t\tSystemUtils.copyDirectory(ruleDir, usersResourceDir);\n\t\t\t}\n\t\t\tcatch(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\tSystem.out.println(\"success\");\n\t\t}\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_TEMPLATE_URL);\n\t\tSystem.out.println(\"report template file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_REPORT_TEMPLATE));\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_REPORT, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_REPORT_URL.substring(1));\n\t\tSystem.out.println(\"report file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_REPORT));\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_SESSION_URL.substring(1));\n\t\tSystem.out.println(\"rule session file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION));\n\n\t\tSystem.setProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT, usersResourceDir.toString() + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_PATH.substring(1) + usersResourceDir.separator + PreferencesConstants.DEFAULT_RULE_SESSION_OUT_URL.substring(1));\n\t\tSystem.out.println(\"rule session file: \" + System.getProperty(PreferencesConstants.DEFAULT_PROP_RULE_SESSION_OUT));\n\t\t*/\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.472 -0400\", hash_original_method = \"313E1346BB4C2A661F225A135DCC1B61\", hash_generated_method = \"5E27901655B27A16747212CDEEA7F56E\")\n \n public static boolean saveConfigCommand(){\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "void setConfiguration();", "protected void setupParameters() {\n \n \n\n }", "void setConfigFileName( String s );", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n //set the driver name and track variables using methods below, which are also called from onSharedPreferencesChanged\n setDriver(sharedPreferences);\n setTrack(sharedPreferences);\n }", "private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}", "public final void handleConfig(JSONObject jSONObject) {\n super.handleConfig(jSONObject);\n if (jSONObject != null) {\n JSONObject optJSONObject = jSONObject.optJSONObject(\"aweme_activity_setting\");\n if (optJSONObject != null) {\n C29132a.m95559a(optJSONObject);\n C23060u a = C23060u.m75742a();\n C7573i.m23582a((Object) a, \"CommonSharePrefCache.inst()\");\n a.mo60054X().mo59871a(optJSONObject.toString());\n C42961az.m136380a(new C29121a());\n } else {\n C23060u a2 = C23060u.m75742a();\n C7573i.m23582a((Object) a2, \"CommonSharePrefCache.inst()\");\n a2.mo60054X().mo59871a(\"\");\n }\n }\n }", "protected void prepare()\n\t{\n\t\tlog.info(\"\");\n\t\tm_ctx = Env.getCtx();\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"C_BankStatementLoader_ID\"))\n\t\t\t\tm_C_BankStmtLoader_ID = ((BigDecimal)para[i].getParameter()).intValue();\n\t\t\telse if (name.equals(\"FileName\"))\n\t\t\t\tfileName = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t\tm_AD_Client_ID = Env.getAD_Client_ID(m_ctx);\n\t\tlog.info(\"AD_Client_ID=\" + m_AD_Client_ID);\n\t\tm_AD_Org_ID = Env.getAD_Org_ID(m_ctx);\n\t\tlog.info(\"AD_Org_ID=\" + m_AD_Org_ID);\n\t\tlog.info(\"C_BankStatementLoader_ID=\" + m_C_BankStmtLoader_ID);\n\t}", "protected void prepare()\r\n\t{\r\n\t\tProcessInfoParameter[] para = getParameter();\r\n\t\tfor (int i = 0; i < para.length; i++)\r\n\t\t{\r\n\t\t\tString name = para[i].getParameterName();\r\n\t\t\tif (name.equals(\"DeleteOldImported\"))\r\n\t\t\t\tp_deleteOldImported = \"Y\".equals(para[i].getParameter());\r\n\t\t\telse if (name.equals(\"IsValidateOnly\"))\r\n\t\t\t\tp_IsValidateOnly = para[i].getParameterAsBoolean();\r\n\t\t\telse\r\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\r\n\t\t}\r\n\r\n\t\tm_AD_Client_ID = getProcessInfo().getAD_Client_ID();\r\n\r\n\t}", "protected void postProcessEntryConfiguration(ModularConfigurationEntry<T> entry) {\n }", "private ClientExecutorEngine() {\n ClientConfigReader.readConfig();\n DrillConnector.initConnection();\n HzConfigReader.readConfig();\n }", "protected void setConfigsFromInput(ExternalMailInput input) throws Exception\n {\n // Instantiate some attributes\n konakartAPI = input.getKonakartAPI();\n context = input.getContext();\n if (context != null)\n {\n storeOwner = (String) context.get(\"storeOwner\");\n storeOwnerEmailAddr = (String) context.get(\"storeOwnerEmailAddr\");\n storeName = (String) context.get(\"storeName\");\n storeId = (String) context.get(\"storeId\");\n imageBaseUrl = (String) context.get(\"imageBaseUrl\");\n templateBase = (String) context.get(\"templateBase\");\n displayPricesWithTax = ((Boolean) context.get(\"displayPricesWithTax\")).booleanValue();\n customerName = (String) context.get(\"customerName\");\n appCustomer = (Customer) context.get(\"customer\");\n adminCustomer = (AdminCustomer) context.get(\"cust\");\n }\n if (customerName == null && adminCustomer != null)\n {\n customerName = getFormattedCustomerName(adminCustomer);\n }\n if (input.getEmailTemplate() != null)\n {\n emailSubject = input.getEmailTemplate().getSubject();\n emailBody = input.getEmailTemplate().getBody();\n }\n emailAddr = input.getEmailAddr();\n if (input.getAppOptions() != null)\n {\n countryCode = input.getAppOptions().getCountryCode();\n templateName = input.getAppOptions().getTemplateName();\n }\n if (input.getAdminOptions() != null)\n {\n countryCode = input.getAdminOptions().getCountryCode();\n templateName = input.getAdminOptions().getTemplateName();\n }\n if (input.getAdminEmailData() != null)\n {\n emailAddr = input.getAdminEmailData().getToAddress();\n emailSubject = input.getAdminEmailData().getSubject();\n emailBody = input.getAdminEmailData().getMessage();\n // Some mail providers don't accept an empty message\n if (emailBody == null || emailBody.length() == 0)\n {\n emailBody = \" \";\n }\n doBlindCopy = input.getAdminEmailData().isSendBlindCopies();\n }\n\n // Override values from config variables\n if (input.getAppOptions() != null)\n {\n /*\n * Mail sent from Application\n */\n if (input.getAppOptions().getFromAddress() != null)\n {\n setFromAddressStr(input.getAppOptions().getFromAddress());\n } else if (input.getAppOptions().getReplyToAddress() != null)\n {\n setReplyToAddressStr(input.getAppOptions().getReplyToAddress());\n } else if (input.getAppOptions().getBccEmails() != null\n && input.getAppOptions().getBccEmails().length() > 0)\n {\n bccEmailsStrArray = input.getAppOptions().getBccEmails().split(\";\");\n }\n\n if (input.getAppOptions().getContentType() == KKConstants.EMAIL_AS_HTML)\n {\n contentType = \"text/html\";\n } else if (input.getAppOptions().getContentType() == KKConstants.EMAIL_AS_PLAIN_TEXT)\n {\n contentType = \"text/plain\";\n } else\n {\n log.warn(\"Unrecognised Email ContentType: \"\n + input.getAppOptions().getContentType());\n contentType = \"text/html\";\n }\n\n fullAttachmentFilename = input.getAppOptions().getFullAttachmentFilename();\n friendlyAttachmentName = input.getAppOptions().getFriendlyAttachmentName();\n deleteAttachmentAfterSend = input.getAppOptions().isDeleteAttachmentAfterSend();\n } else if (input.getAdminEmailData() != null)\n {\n /*\n * Mail sent using admin API call sendEmail\n */\n if (input.getAdminEmailData().getFromAddress() != null)\n {\n setFromAddressStr(input.getAdminEmailData().getFromAddress());\n } else if (input.getAdminEmailData().getReplyToAddress() != null)\n {\n setReplyToAddressStr(input.getAdminEmailData().getReplyToAddress());\n } else if (input.getAdminEmailData().getBccEmails() != null\n && input.getAdminEmailData().getBccEmails().length() > 0)\n {\n bccEmailsStrArray = input.getAdminEmailData().getBccEmails().split(\";\");\n }\n\n if (input.getAdminEmailData().getContentType() == KKConstants.EMAIL_AS_HTML)\n {\n contentType = \"text/html\";\n } else if (input.getAdminEmailData()\n .getContentType() == KKConstants.EMAIL_AS_PLAIN_TEXT)\n {\n contentType = \"text/plain\";\n } else\n {\n log.warn(\"Unrecognised Email ContentType: \"\n + input.getAdminEmailData().getContentType());\n contentType = \"text/html\";\n }\n\n if (input.getAdminEmailData().getSynchronousity() == KKConstants.EMAIL_ASYNCHRONOUS)\n {\n isAsync = true;\n } else if (input.getAdminEmailData()\n .getSynchronousity() == KKConstants.EMAIL_SYNCHRONOUS)\n {\n isAsync = false;\n }\n } else if (input.getAdminOptions() != null)\n {\n /*\n * Mail sent from Admin App\n */\n if (input.getAdminOptions().getFromAddress() != null)\n {\n setFromAddressStr(input.getAdminOptions().getFromAddress());\n } else if (input.getAdminOptions().getReplyToAddress() != null)\n {\n setReplyToAddressStr(input.getAdminOptions().getReplyToAddress());\n } else if (input.getAdminOptions().getBccEmails() != null\n && input.getAdminOptions().getBccEmails().length() > 0)\n {\n bccEmailsStrArray = input.getAdminOptions().getBccEmails().split(\";\");\n }\n\n if (input.getAdminOptions().getContentType() == KKConstants.EMAIL_AS_HTML)\n {\n contentType = \"text/html\";\n } else if (input.getAdminOptions().getContentType() == KKConstants.EMAIL_AS_PLAIN_TEXT)\n {\n contentType = \"text/plain\";\n } else\n {\n log.warn(\"Unrecognised Email ContentType: \"\n + input.getAdminOptions().getContentType());\n contentType = \"text/html\";\n }\n\n if (input.getAdminOptions().getSynchronousity() == KKConstants.EMAIL_ASYNCHRONOUS)\n {\n isAsync = true;\n } else if (input.getAdminOptions().getSynchronousity() == KKConstants.EMAIL_SYNCHRONOUS)\n {\n isAsync = false;\n }\n\n fullAttachmentFilename = input.getAdminOptions().getFullAttachmentFilename();\n friendlyAttachmentName = input.getAdminOptions().getFriendlyAttachmentName();\n deleteAttachmentAfterSend = input.getAdminOptions().isDeleteAttachmentAfterSend();\n }\n\n /*\n * Get specific data depending on type of mail being sent\n */\n if (input.getType() == ExternalMailInput.MAIL_FROM_APP)\n {\n\n if (input.getKonakartAPI().equals(sendTemplateEmailToCustomer1))\n {\n message = (String) context.get(\"message\");\n\n } else if (input.getKonakartAPI().equals(sendOrderConfirmationEmail1))\n {\n appOrder = (Order) context.get(\"order\");\n vendorOrders = (Order[]) context.get(\"vendorOrders\");\n } else if (input.getKonakartAPI().equals(sendStockReorderEmail))\n {\n productName = (String) context.get(\"productName\");\n productQuantity = ((Integer) context.get(\"productQuantity\")).intValue();\n productId = ((Integer) context.get(\"productId\")).intValue();\n sku = (String) context.get(\"sku\");\n } else if (input.getKonakartAPI().equals(sendWelcomeEmail1))\n {\n\n } else if (input.getKonakartAPI().equals(sendNewPassword1))\n {\n doBlindCopy = false;\n newPassword = (String) context.get(\"newPassword\");\n expiryMins = ((Integer) context.get(\"expiryMins\")).intValue();\n } else\n {\n throw new KKException(\"Unknwown KonaKart API - \" + input.getKonakartAPI());\n }\n\n } else if (input.getType() == ExternalMailInput.MAIL_FROM_ADMIN)\n {\n // Special case that doesn't use a Velocity Context\n if (input.getKonakartAPI().equals(sendEmail))\n {\n\n } else if (input.getKonakartAPI().equals(resetCustomerPassword))\n {\n doBlindCopy = false;\n newPassword = (String) context.get(\"newPassword\");\n expiryMins = ((Integer) context.get(\"expiryMins\")).intValue();\n } else if (input.getKonakartAPI().equals(sendStatusChangeEmailForState))\n {\n adminOrder = (AdminOrder) context.get(\"order\");\n } else if (input.getKonakartAPI().equals(sendTemplateEmail))\n {\n } else\n {\n throw new KKException(\"Unknwown KonaKart Admin API - \" + input.getKonakartAPI());\n }\n }\n }", "private LODEParameters(){\n prefsFile=new File(LODEConstants.PARAMS_FILE);\n }", "public interface ConfigurationHolder {\n\n /**\n * Gets OpenAPI Gateway host.\n *\n * @return the OpenAPI Gateway host.\n */\n public String getGatewayHost();\n\n /**\n * Gets the App ID.\n *\n * @return the App ID.\n */\n public String getAppId();\n\n /**\n * Gets the merchant number.\n *\n * @return the merchant number.\n */\n public String getMerchantNo();\n\n /**\n * Gets the message format.\n *\n * @return the message format.\n */\n public default String getFormat() {\n return Constants.FORMAT_JSON;\n }\n\n /**\n * Gets the message charset.\n *\n * @return the message charset.\n */\n public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }\n\n /**\n * Gets the API version number.\n *\n * @return the API version number.\n */\n public default String getVersion() {\n return Constants.VERSION_1;\n }\n\n /**\n * Gets the language.\n *\n * @return the language.\n */\n public Language getLanguage();\n\n /**\n * Gets the signature type.\n *\n * @return the signature type.\n */\n public SignType getSignType();\n\n /**\n * Gets the public key (used by RSA only).\n *\n * @return the public key.\n */\n public String getPublicKey();\n\n /**\n * Gets the private key.\n *\n * @return the private key.\n */\n public String getPrivateKey();\n\n /**\n * Gets whether the client supports partial payment.\n * This feature is only available for Snaplii payment.\n *\n * @return true if the client supports partial payment, or false otherwise.\n */\n public boolean isPartialPaymentSupported();\n\n /**\n * Gets the prefix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number prefix.\n */\n public String getAlternativeOrderNumberPrefix();\n\n /**\n * Gets the suffix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number suffix.\n */\n public String getAlternativeOrderNumberSuffix();\n\n /**\n * Gets the connection timeout setting.\n *\n * @return connection timeout in seconds.\n */\n public int getConnectionTimeout();\n\n /**\n * Gets the read timeout setting.\n *\n * @return read timeout in seconds.\n */\n public int getReadTimeout();\n\n /**\n * Validates the configuration.\n *\n * @throws OpenApiConfigurationExcepiton if any configuration is missing.\n */\n public default void validate() throws OpenApiConfigurationExcepiton {\n if (StringUtils.isEmpty(getGatewayHost())) {\n throw new OpenApiConfigurationExcepiton(\"Gateway host is not configured\");\n }\n if (StringUtils.isEmpty(getAppId())) {\n throw new OpenApiConfigurationExcepiton(\"App ID is not configured\");\n }\n if (StringUtils.isEmpty(getMerchantNo())) {\n throw new OpenApiConfigurationExcepiton(\"Merchant number is not configured\");\n }\n if (StringUtils.isEmpty(getFormat())) {\n throw new OpenApiConfigurationExcepiton(\"Format is not configured\");\n }\n if (StringUtils.isEmpty(getCharset())) {\n throw new OpenApiConfigurationExcepiton(\"Charset is not configured\");\n }\n if (getLanguage() == null) {\n throw new OpenApiConfigurationExcepiton(\"Language is not configured\");\n }\n if (getSignType() == null) {\n throw new OpenApiConfigurationExcepiton(\"Signature type is not configured\");\n }\n if (StringUtils.isEmpty(getPrivateKey())) {\n throw new OpenApiConfigurationExcepiton(\"Private key is not configured\");\n }\n if (SignType.RSA == getSignType() && StringUtils.isEmpty(getPublicKey())) {\n throw new OpenApiConfigurationExcepiton(\"Public key is not configured\");\n }\n if (getConnectionTimeout() <= 0 || getConnectionTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Connection timeout needs to be between 1 and 60\");\n }\n if (getReadTimeout() <= 0 || getReadTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Read timeout needs to be between 1 and 60\");\n }\n }\n\n}", "protected void setupLocal() {}", "public void saveBeforeCompile() { }", "public void saveBeforeCompile() { }", "void execSetupContext(ExecProcess ctx);", "public ExcelImportConfig() {\n super();\n }", "public void saveFiBcoinPayconfig(FiBcoinPayconfig fiBcoinPayconfig);", "public Config(HG plugin)\r\n/* 38: */ {\r\n/* 39:46 */ if (!new File(plugin.getDataFolder(), \"config.yml\").exists())\r\n/* 40: */ {\r\n/* 41:47 */ Util.log(\"Config not found. Generating default config!\");\r\n/* 42:48 */ plugin.saveDefaultConfig();\r\n/* 43: */ }\r\n/* 44:51 */ config = plugin.getConfig().getRoot();\r\n/* 45:52 */ config.options().copyDefaults(true);\r\n/* 46:53 */ plugin.reloadConfig();\r\n/* 47:54 */ config = plugin.getConfig();\r\n/* 48: */ \r\n/* 49:56 */ spawnmobs = config.getBoolean(\"settings.spawn-mobs\");\r\n/* 50:57 */ spawnmobsinterval = config.getInt(\"settings.spawn-mobs-interval\") * 20;\r\n/* 51:58 */ freeroam = config.getInt(\"settings.free-roam\");\r\n/* 52:59 */ trackingstickuses = config.getInt(\"settings.trackingstick-uses\");\r\n/* 53:60 */ playersfortrackingstick = config.getInt(\"settings.players-for-trackingstick\");\r\n/* 54:61 */ maxchestcontent = config.getInt(\"settings.max-chestcontent\");\r\n/* 55:62 */ teleAtEnd = config.getBoolean(\"settings.teleport-at-end\");\r\n/* 56:63 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 57:64 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 58:65 */ cash = config.getInt(\"reward.cash\");\r\n/* 59:66 */ maxTeam = config.getInt(\"settings.max-team-size\");\r\n/* 60:67 */ giveReward = config.getBoolean(\"reward.enabled\");\r\n/* 61:68 */ cash = config.getInt(\"reward.cash\");\r\n/* 62:69 */ breakblocks = config.getBoolean(\"rollback.allow-block-break\");\r\n/* 63:70 */ blocks = config.getIntegerList(\"rollback.editable-blocks\");\r\n/* 64:71 */ randomChest = config.getBoolean(\"random-chest.enabled\");\r\n/* 65:72 */ randomChestInterval = config.getInt(\"random-chest.interval\") * 20;\r\n/* 66:73 */ randomChestMaxContent = config.getInt(\"random-chest.max-chestcontent\");\r\n/* 67:75 */ if (giveReward) {\r\n/* 68: */ try\r\n/* 69: */ {\r\n/* 70:77 */ Vault.setupEconomy();\r\n/* 71: */ }\r\n/* 72: */ catch (NoClassDefFoundError e)\r\n/* 73: */ {\r\n/* 74:79 */ Util.log(\"Unable to setup vault! Rewards will not be given out..\");\r\n/* 75:80 */ giveReward = false;\r\n/* 76: */ }\r\n/* 77: */ }\r\n/* 78:84 */ ItemStack i = new ItemStack(Material.FIREWORK, 64);\r\n/* 79:85 */ FireworkMeta fm = (FireworkMeta)i.getItemMeta();\r\n/* 80:86 */ List<Color> c = new ArrayList();\r\n/* 81:87 */ c.add(Color.ORANGE);\r\n/* 82:88 */ c.add(Color.RED);\r\n/* 83:89 */ FireworkEffect e = FireworkEffect.builder().flicker(true).withColor(c).withFade(c).with(FireworkEffect.Type.BALL_LARGE).trail(true).build();\r\n/* 84:90 */ fm.addEffect(e);\r\n/* 85:91 */ fm.setPower(3);\r\n/* 86:92 */ i.setItemMeta(fm);\r\n/* 87: */ \r\n/* 88:94 */ firework = i;\r\n/* 89: */ }", "private OspfConfigUtil() {\n\n }", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "private void processConfigurationFile() throws RuntimeException {\n try {\n // Read all the lines and join them in a single string\n List<String> lines = Files.readAllLines(Paths.get(this.confFile));\n String content = lines.stream().reduce(\"\", (a, b) -> a + b);\n\n // Use the bson document parser to extract the info\n Document doc = Document.parse(content);\n this.mongoDBHostname = doc.getString(\"CLARUS_keystore_db_hostname\");\n this.mongoDBPort = doc.getInteger(\"CLARUS_keystore_db_port\");\n this.clarusDBName = doc.getString(\"CLARUS_keystore_db_name\");\n } catch (IOException e) {\n throw new RuntimeException(\"CLARUS configuration file could not be processed\", e);\n }\n }", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "public boolean configure(StaplerRequest req, JSONObject o) throws FormException {\n \trhapsodyClPath = o.getString(\"rhapsodyClPath\");\n \tlicenseServerPath = o.getString(\"licenseServerPath\");\n save();\n return super.configure(req, o);\n }", "public void loadConfig() {\n\t}", "@Override\n public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {\n save();\n return super.configure(req, formData);\n }", "File prepareEnvironment();", "@Override\n\tpublic void saveSettings() {\n\n\t}", "Map<String, Object> exportDefaultConfiguration();", "@Override\n\tpublic void config(StarConfig config) {\n\t\t\n\t}", "ImportConfig createImportConfig();", "public void saveProperties()\n {\n _appContext.Configuration.save();\n }", "void config(Config config);", "void PrepareRun() {\n }", "@BeforeAll\n public static void setup() {\n baseExpectedParams = AttributeMap.builder()\n .put(S3ClientContextParams.USE_ARN_REGION, false)\n .put(S3ClientContextParams.DISABLE_MULTI_REGION_ACCESS_POINTS, false)\n .put(S3ClientContextParams.ACCELERATE, false)\n .put(S3ClientContextParams.FORCE_PATH_STYLE, false)\n .build();\n }", "private void saveGeneralData() {\n Settings.CRAWL_TIMEOUT = Integer.parseInt(spCrawlTimeout.getValue().toString()) * 1000;\n Settings.RETRY_POLICY = Integer.parseInt(spRetryPolicy.getValue().toString());\n Settings.RECRAWL_TIME = Integer.parseInt(spRecrawlInterval.getValue().toString()) * 3600000;\n Settings.RECRAWL_CHECK_TIME = Integer.parseInt(spRecrawlCheckTime.getValue().toString()) * 60000;\n\n Settings.saveSettings();\n }", "@Override\n\tpublic void loadExtraConfigs(Configuration config)\n\t{\n\n\t}", "@Override\n\tprotected void prepareForSave() throws WorkflowException {\n\n\t}", "@Override\n public void setupConfiguration(Configuration config)\n {\n\n }", "static void saveProxyConfig(final String proxyUrl) {\r\n\t\tAppPreferences.setUrlProxy(proxyUrl);\r\n\t}", "@BeforeClass\n\tpublic static void setUp() throws Exception {\n\n//\t\t// prop.setProperty(\"script_timeout\", \"ada\");\n//\t\tMap<String, String> props = new HashMap<String, String>();\n//\t\tprops.put(\"script_timeout\", \"adaaaaaaa\");\n//\t\tConfigureHelper.writeProperty(\"config.qp\", props);\n//\t\t\n\t\ttry {\n\t\t\tPropertiesConfiguration conf = new PropertiesConfiguration(\"config/config.qp\");\n\t\t\tconf.setProperty(\"script_timeout\", \"11111111111111\");\n\t\t\tconf.save();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "protected void saveMisc(Context context) {\n\t\tif (context == null) return;\n\t\t\n\t\t//Create json\n\t\tJSONObject JSON = new JSONObject();\n\t\ttry {\n\t\t\t//Save\n\t\t\tJSON.put(JSON_LOGIN, m_Login);\n\t\t} catch (JSONException e) {}\n\t\t\n\t\t//Get access to preference\n\t\t/*SharedPreferences Preference \t= context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);\n\t\tSharedPreferences.Editor Editor\t= Preference.edit();\n\t\t\n\t\t//Save\n\t\tEditor.putString(KEY_MISC, JSON.toString());\n\t\tEditor.commit();*/\n\t}", "public static void LoadIntoConfigFiles()\n {\n \tProperties prop = new Properties();\n ///*\n \ttry {\n \t\t//set the properties value\n \n prop.setProperty(\"comp_name\", \"Teledom International Ltd\");\n prop.setProperty(\"com_city\", \"Lagos\");\n \t\tprop.setProperty(\"State\", \"Lagos\");\n \t\tprop.setProperty(\"logo_con\", \"logo.png\");\n \t\tprop.setProperty(\"front_frame\", \"front.png\");\n prop.setProperty(\"back_frame\", \"back.png\");\n \n \n \n \n \t\t//save properties to project root folder\n \t\tprop.store(new FileOutputStream(setupFileName), null);\n \n \t} catch (IOException ex) {\n \t\tex.printStackTrace();\n }\n // */\n \n \n \n }", "@Override\n\tpublic void onSaveConfigClicked(IBlurb player) {\n\n\t}", "private void saveProperties() {\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.driver\", driver);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.serverURL\", serverURL);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.username\", username);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.password\", password);\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.minConnections\",\n Integer.toString(minConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.maxConnections\",\n Integer.toString(maxConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.connectionTimeout\",\n Double.toString(connectionTimeout));\n }", "private void ini_CacheDB()\r\n\t{\r\n\t\tLogger.DEBUG(\"ini_CacheDB\");\r\n\t\t// chk if exist filter preset splitter \"#\" and Replace\r\n\r\n\t}", "@Override\n \tpublic void saveParam(Object obj) throws Exception {; \n \t this.extension.getProxy().setMegaScan(getClickAllElems().isSelected());\n \t\tthis.extension.getProxy().setProxyHost(txtProxyIp.getText());\n \t\tthis.extension.getProxy().setProxyPort(spinnerProxyPort.getValue());\n\t\tthis.extension.getProxy().setBrowsers(txtNumBro.getValue().intValue());\n\t\tthis.extension.getProxy().setThreads(txtNumThre.getValue().intValue());\n \t\t\n \t\tif(getFirefox().isSelected()){\n \t\t\tthis.extension.getProxy().setBrowser(BrowserType.firefox);\n \t\t} else if(getChrome().isSelected()){\n \t\t\tthis.extension.getProxy().setBrowser(BrowserType.chrome);\n \t\t} else if(getHtmlunit().isSelected()){\n \t\t\tthis.extension.getProxy().setBrowser(BrowserType.htmlunit);\n \t\t}\n \t}", "public static void quoteText(boolean useQuotes) {\r\n\t\tXLS2CSV2.useQuotes=useQuotes;\r\n\t}", "protected void customizeContext()\r\n throws Exception\r\n {\r\n }", "private void readPreferences() {\n configAutonomousCommand();\n }", "private void addData() {\r\n cut.setBaseUrl(\"baseUrl\");\r\n cut.setClientId(\"clientId\");\r\n cut.setClientSecret(\"clientSecret\");\r\n List<String> accounts = new LinkedList<String>() {{\r\n add(\"FI1234567901234567-EUR\");\r\n }};\r\n cut.setAccounts(accounts);\r\n cut.setApiVersion(\"V4\");\r\n cut.setDuration(1234);\r\n cut.setCountry(\"FI\");\r\n cut.setEnvironment(\"local\");\r\n cut.setEidas(\"asdkjhfapseiuf98yf9ds\");\r\n cut.setFirstAuthorizer(\"someone\");\r\n cut.setNetbankID(\"netbankId\");\r\n List<String> scopes = new LinkedList<String>() {{\r\n add(\"ACCOUNTS_BASIC\");\r\n }};\r\n cut.setScopes(scopes);\r\n }", "protected void prepare()\n\t{\n\t\tProcessInfoParameter[] para = getParameter();\n\t\tfor (int i = 0; i < para.length; i++)\n\t\t{\n\t\t\tString name = para[i].getParameterName();\n\t\t\tif (name.equals(\"AD_Client_ID\"))\n\t\t\t\tm_AD_Client_ID = 1000000;\n\t\t\telse if (name.equals(\"AD_Org_ID\"))\n\t\t\t\tm_AD_Org_ID = 1000000;\n\t\t\telse if (name.equals(\"DeleteOldImported\"))\n\t\t\t;//\tm_deleteOldImported = \"Y\".equals(para[i].getParameter());\n\t\t\telse if (name.equals(\"DocAction\"))\n\t\t;//\t\tm_docAction = (String)para[i].getParameter();\n\t\t\telse\n\t\t\t\tlog.log(Level.SEVERE, \"Unknown Parameter: \" + name);\n\t\t}\n\t}", "public interface ConfigProcessor {\n\n\tvoid inject2Instance(Object obj,String keyName);\n\n\tvoid storeOneFile(ConfigBaseModel configBaseModel);\n\n\tvoid inject2Conf();\n\n}", "@Override\n\tpublic void persist(JobConfig config) {\n\t\tSystem.out.println(\"========>>假装保存配置到数据库\");\n\t}", "protected void setup(Context context) {}", "public static void setUpConfiguration(@NotNull String[] args) {\n if (args.length != 2) throw new MissingResourceException(\"Missing configuration values\", \"\", \"\");\n Configuration.BUCKET_NAME = args[0];\n Configuration.S3_BUCKET_REGION = args[1];\n\n AWSFileUploader awsFileUploader = new AWSFileUploader();\n Configuration.PREVIOUS_BUILDS = awsFileUploader.getReports();\n\n if (Configuration.AWS_ACCESS_KEY_ID.isEmpty()) {\n throw new MissingResourceException(\"The AWS access key id is missing\", \"\", \"\");\n } else if (Configuration.AWS_SECRET_KEY.isEmpty()) {\n throw new MissingResourceException(\"The AWS secret key is missing\", \"\", \"\");\n } else if (Configuration.GITHUB_TOKEN.isEmpty()) {\n throw new MissingResourceException(\"The Github token is missing\", \"\", \"\");\n } else if (Configuration.M3_HOME.isEmpty()) {\n throw new MissingResourceException(\"The M3 Home path is missing\", \"\", \"\");\n } else if (Configuration.BUCKET_NAME.isEmpty()) {\n throw new MissingResourceException(\"The AWS bucket name is missing\", \"\", \"\");\n } else if (Configuration.S3_BUCKET_REGION.isEmpty()) {\n throw new MissingResourceException(\"The AWS region is missing\", \"\", \"\");\n }\n }", "protected void setup() {\r\n }", "void configure();", "public void copyDefaults() {\n getConfig().options().copyDefaults(true);\n save();\n }", "private PSConfigDeNormalizer()\n {\n\n }", "private Conf() {\n // empty hidden constructor\n }", "protected Config(AFK plugin) {\n this.cfg = plugin.getConfig();\n cfg.options().copyDefaults(true);\n plugin.saveConfig();\n }", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "@Before\r\n public void setUp() { \r\n ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());\r\n //ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(\".\")){});\r\n \t\r\n //helper.setUp();\r\n }", "public static void main(String[] args) throws IOException {\n String readPath=\"C:\\\\Users\\\\masou\\\\IdeaProjects\\\\SDETjavaBATCH10\\\\Files\\\\Config1.properties\";\n String writePath=\"C:\\\\Users\\\\masou\\\\IdeaProjects\\\\SDETjavaBATCH10\\\\Files\\\\Config.properties\";\n\n\n FileInputStream fileInputStream=new FileInputStream(readPath);\n FileInputStream fileInputStream1=new FileInputStream(writePath);\n\n\n Properties properties1=new Properties();\n properties1.load(fileInputStream1);\n\n Properties properties=new Properties();\n properties.load(fileInputStream);\n\n String URL=properties.get(\"URL\").toString(); // store it in a string\n\n\n properties1.put(\"URL\",URL);\n FileOutputStream fileOutputStream=new FileOutputStream(writePath);\n properties1.store(fileOutputStream,\"some comments\");\n\n\n\n }", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "private ApiConfig() {\n }", "private void logSaveSCMPluginConfigRequestDetailsPriorToRequest(SaveSCMPluginConfigRequest saveSCMPluginConfigRequest){\n getLog().info(String.format(\"Provisioning %s Plugin Integration for %s\", scmProvider, saveSCMPluginConfigRequest.getApi()));\n getLog().debug(new SCMIntegrationPluginConfiguration(saveSCMPluginConfigRequest).toString());\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}" ]
[ "0.6151158", "0.5895968", "0.5558243", "0.54523915", "0.5344255", "0.5286325", "0.5210359", "0.5179088", "0.51401675", "0.5130262", "0.5126775", "0.5116515", "0.5069339", "0.49853963", "0.498525", "0.49806342", "0.4968301", "0.49638847", "0.49493837", "0.49443978", "0.49383906", "0.49377748", "0.49200314", "0.49096805", "0.48962942", "0.48893872", "0.48858777", "0.48701128", "0.48679104", "0.48622987", "0.48604357", "0.48392412", "0.48262554", "0.4823643", "0.4822526", "0.48101678", "0.4798188", "0.4794406", "0.47677872", "0.47639015", "0.47618416", "0.4758444", "0.47492397", "0.47319868", "0.47319868", "0.47234723", "0.47223005", "0.4715469", "0.47138244", "0.47136998", "0.4710621", "0.4708622", "0.47031918", "0.46960294", "0.46956667", "0.46931878", "0.46895325", "0.46887067", "0.46871543", "0.46857935", "0.46761873", "0.46729022", "0.46721163", "0.46684867", "0.4666787", "0.46655935", "0.46638256", "0.46633992", "0.46631357", "0.4661863", "0.46610612", "0.46596205", "0.46563852", "0.46553332", "0.46527568", "0.4638043", "0.4637078", "0.4635991", "0.46341234", "0.46317202", "0.463083", "0.46248376", "0.46248168", "0.46244356", "0.46213025", "0.46212375", "0.46212333", "0.46160275", "0.46132252", "0.46116304", "0.46076977", "0.46061006", "0.46060038", "0.46042547", "0.46030205", "0.46025673", "0.45999163", "0.45997515", "0.45902246", "0.45901418" ]
0.6155575
0
RichPopup.PopupHints hints = new RichPopup.PopupHints(); quoteNavPopup.show(hints);
public void navToConfigurator(ActionEvent actionEvent) { ADFUtils.setSessionScopeValue("currView", "config"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void triggerPopup();", "private void popupModify() {\n\t\tboolean doNotShow = false;\n\t\tif (this instanceof Umlenkrolle && ((Umlenkrolle) this).isFree()) {\n\t\t\tdoNotShow = true;\n\t\t} else if (this instanceof DoppelUmlenkrolle) {\n\t\t\tdoNotShow = true;\n\t\t}\n\t\taufzugschacht.mainFrameShowOptionsFrame(this, doNotShow);\n\t}", "public PDAnnotationPopup getPopup() {\n/* 157 */ COSDictionary popup = (COSDictionary)getCOSObject().getDictionaryObject(\"Popup\");\n/* 158 */ if (popup != null)\n/* */ {\n/* 160 */ return new PDAnnotationPopup(popup);\n/* */ }\n/* */ \n/* */ \n/* 164 */ return null;\n/* */ }", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "public void setPopup(PDAnnotationPopup popup) {\n/* 175 */ getCOSObject().setItem(\"Popup\", popup);\n/* */ }", "public void createPopupWindow() {\r\n \t//\r\n }", "@Override\n public void showLorenzoActionPopUp(String string) {\n\n }", "public String getTitlePopup() {\n/* 136 */ return getCOSObject().getString(COSName.T);\n/* */ }", "private void popupModify2te() {\n\t\tRolle rolle = (Rolle) this;\n\t\taufzugschacht.mainFrameShowOptionsFrame(rolle.getRolle2teUmschlingung(), true);\n\t}", "public void show() {\n int width = mEditor.getWidth();\n RectF leftHandleRect = mEditor.getLeftHandleRect();\n RectF rightHandleRect = mEditor.getRightHandleRect();\n\n // when right handle goes below visible area, it rect becomes empty. so this feature (or bug) used to calculate popup location\n // if we can not use this,\n // alternative method can be implemented using mMaximumTop\n // @TODO implement a proper way to calculate popup position\n if (rightHandleRect.isEmpty()) {\n rightHandleRect.top = mMaximumTop;\n rightHandleRect.left = width;\n rightHandleRect.bottom = mMaximumTop;\n rightHandleRect.right = width;\n }\n\n float handleHeight = leftHandleRect.height();\n selectionRect.top = Math.min(leftHandleRect.top, rightHandleRect.top);\n selectionRect.bottom = Math.max(leftHandleRect.bottom, rightHandleRect.bottom);\n selectionRect.left = Math.min(leftHandleRect.left, rightHandleRect.left);\n selectionRect.right = Math.max(leftHandleRect.right, rightHandleRect.right);\n\n // prevent drawing popup over the keyboard\n /*if (selectionRect.bottom > mMaximumTop - popHeightPx) {\n selectionRect.bottom -= popHeightPx;\n }*/\n\n if (mLeft > width - getWidth()) {\n mLeft = width - getWidth();\n }\n int height = mEditor.getHeight();\n if (mTop > height - getHeight()) {\n mTop = height - getHeight();\n }\n if (mTop < 0) {\n mTop = 0;\n }\n if (mLeft < 0) {\n mLeft = 0;\n }\n mEditor.getLocationInWindow(mLocation);\n boolean topCovered = mLocation[1] > selectionRect.top - textSizePx - popHeightPx - handleHeight;\n\n if (topCovered) {\n mTop = (int) (selectionRect.bottom + (handleHeight));\n } else {\n mTop = (int) (selectionRect.top - textSizePx - popHeightPx - handleHeight);\n }\n if (isShowing()) {\n update(mLocation[0] + mLeft, mLocation[1] + mTop, getWidth(), getHeight());\n return;\n }\n super.showAtLocation(mEditor,\n Gravity.START | Gravity.TOP,\n mLocation[0] + mLeft, mLocation[1] + mTop);\n }", "public void showOxPopup() {\n\t\ttv_popupTitle.setText(R.string.title1);\n\t\ttv_popupInfo.setText(R.string.description1);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "protected Popup() {}", "public void showYourself(Subscription parentBinding) {\n myPopupStage.setOnCloseRequest(e -> parentBinding.unsubscribe());\n exportResultArea.setSyntaxHighlighter(new XmlSyntaxHighlighter());\n myPopupStage.show();\n }", "private void showPopup(GeofenceInfoContent[] geofenceInfoObject, String name){\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n GeofenceInfoContent[] sortedContent = sortByDate(geofenceInfoObject);\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(sortedContent, name);\n // Transaction start\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom,\n R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom);\n fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, \"RecyclerViewPopoverFragment\");\n fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "private void displayPopup(NativeEvent event, Element parent) {\n if (displayed) {\n return;\n }\n displayed = true;\n\n HorizontalPanel holder = new HorizontalPanel();\n SimplePanel arrow = new SimplePanel();\n arrow.addStyleName(\"arrow-left\");\n\n HTMLPanel panel = new HTMLPanel(tooltip);\n panel.addStyleName(\"panel\");\n\n holder.add(arrow);\n holder.add(panel);\n\n popup.clear();\n popup.add(holder);\n popup.addStyleName(StyleResource.INSTANCE.modal().tooltip());\n popup.show();\n popup.setPopupPosition(parent.getAbsoluteLeft() + 33, parent.getAbsoluteTop() + 2);\n }", "private void showPopWindow() {\n\t\tfinal PointerPopupWindow p = new PointerPopupWindow(this,\n\t\t\t\tgetResources().getDimensionPixelSize(R.dimen.popup_width));\n\t\tView convertView = setClickListener(p);\n\n\t\tp.setContentView(convertView);\n\t\tp.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.pop_window_back)));\n\t\tp.setPointerImageRes(R.drawable.ic_popup_pointer);\n\t\tp.setAlignMode(PointerPopupWindow.AlignMode.CENTER_FIX);\n\t\tp.showAsPointer(photo);\n\t}", "private void popUp() {\n\tpop = new RoomPopUp(this);\n\tnoPopUp = false;\n }", "protected void initializePopup() {\r\n\t popup = new JPopupMenu();\r\n\t popup.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t popup.setLayout(new BorderLayout());\r\n\t popup.addPopupMenuListener(this);\r\n\t popup.add(panel, BorderLayout.CENTER);\r\n\t}", "@Override\n\t\t\tpublic void onClickedPopup(int arg0) {\n\t\t\t\t\n\t\t\t}", "public void setTitlePopup(String t) {\n/* 147 */ getCOSObject().setString(COSName.T, t);\n/* */ }", "public void createPopupMenu() {\n\t\tJPopupMenu popup = new JPopupMenu();\r\n\t\tmenuItem = new JMenuItem(\"刷新频道\");\r\n\t\tmenuItem.addActionListener(this);\r\n\t\tpopup.add(menuItem);\r\n\r\n\t\thideMenuItem = new JMenuItem(\"隐藏公共频道\");\r\n\t\thideMenuItem.addActionListener(this);\r\n\t\tpopup.add(hideMenuItem);\r\n\t\t// Add listener to the text area so the popup menu can come up.\r\n\t\tMouseListener popupListener = new PopupListener(popup);\r\n\t\tcommonArea.addMouseListener(popupListener);\r\n\t\tmyMsgArea.addMouseListener(popupListener);\r\n\t}", "private void initEdgePopup() {\r\n edgeMenuItem = new MenuItem[4];\r\n edgeMenuItem[0] = new MenuItem(\"Select All\");\r\n edgeMenuItem[1] = new MenuItem(\"Create Split Point\");\r\n edgeMenuItem[2] = new MenuItem(\"Edit Label\");\r\n edgeMenuItem[3] = new MenuItem(\"Properties\");\r\n\r\n edgePopupMenu = new PopupMenu();\r\n\r\n edgePopupMenu.add(edgeMenuItem[0]);\r\n edgePopupMenu.addSeparator();\r\n edgePopupMenu.add(edgeMenuItem[1]);\r\n edgePopupMenu.add(edgeMenuItem[2]);\r\n edgePopupMenu.add(edgeMenuItem[3]);\r\n\r\n edgePopupMenu.addActionListener(this);\r\n\r\n this.add(edgePopupMenu);\r\n }", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public InfoPopup() {\n initComponents();\n }", "boolean isPopUpOpened();", "ContentProposalPopup(ContentProposalAdapter adapter, String infoText,\n\t\t\tContentProposalList proposalList) {\n\t\t// IMPORTANT: Use of SWT.ON_TOP is critical here for ensuring\n\t\t// that the target control retains focus on Mac and Linux. Without\n\t\t// it, the focus will disappear, keystrokes will not go to the\n\t\t// popup, and the popup closer will wrongly close the popup.\n\t\t// On platforms where SWT.ON_TOP overrides SWT.RESIZE,\n\t\t// we will live with this.\n\t\t// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=126138\n\t\tsuper(adapter.getControl().getShell(), SWT.RESIZE | SWT.ON_TOP | SWT.NO_FOCUS, false,\n\t\t\t\tfalse, false, false, false, null, infoText);\n\t\tthis.adapter = adapter;\n\t\tthis.control = adapter.getControl();\n\t\t\n\t\t// this.labelProvider = adapter.getLabelProvider();\n\t\tthis.partialContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16.png\");\n\t\tthis.partialContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/mglass-16-white.png\");\n\t\tthis.functionContentImage = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16.png\");\n\t\tthis.functionContentImageSelected = AutoCompleteUIPlugin.getDefault()\n\t\t\t\t.getImageFromPlugin(AutoCompleteUIPlugin.PLUGIN_ID,\n\t\t\t\t\t\t\"icons/function-16-white.png\");\n\t\tthis.nonSelectableItems = new ArrayList<Integer>();\n\n\t\tthis.proposalList = proposalList;\n\t\t// When the popup is opened & the content is not already completed, we\n\t\t// want to handle this behaviour\n\t\tif (!adapter.isPreventTopProposalSelection())\n\t\t\thandleTopProposals = true;\n\t}", "protected void showPopup() {\r\n if (_component != null) {\r\n JPopupMenu popupMenu = new JPopupMenu();\r\n popupMenu.add(_component);\r\n popupMenu.pack(); \r\n popupMenu.show(this, 0, getHeight());\r\n }\r\n }", "public void getPopup() {\n\t\t\tglobal.btnClick(popup);\n\t\t}", "private void showPriorityPopUp() {\n PopupMenu popup = new PopupMenu(rootView.getContext(), rootView.findViewById(R.id.img_overflow));\n //Inflating the Popup using xml file\n popup.getMenuInflater().inflate(R.menu.post_priority_menu, popup.getMenu());\n\n //registering popup with OnMenuItemClickListener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n public boolean onMenuItemClick(MenuItem item) {\n Toast.makeText(rootView.getContext(), \"You Clicked : \" + item.getTitle(), Toast.LENGTH_SHORT).show();\n return true;\n }\n });\n\n popup.show();//showing popup menu\n }", "public BillPopup() {\n initComponents();\n }", "@Override\n public void showPopUpExplanation(String message, int gravity) {\n LayoutInflater inflater = (LayoutInflater)\n getSystemService(LAYOUT_INFLATER_SERVICE);\n\n if(inflater != null) {\n View popupView = inflater.inflate(R.layout.pop_up_explanation, null);\n\n TypeWriter textView = popupView.findViewById(R.id.text_pop_up_explanation);\n\n textView.setText(\"\");\n textView.setCharacterDelay(10);\n textView.animateText(message);\n\n // create the popup window\n int width = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n int height = ConstraintLayout.LayoutParams.WRAP_CONTENT;\n boolean focusable = true; // lets taps outside the popup also dismiss it\n popupWindow = new PopupWindow(popupView, width, height, focusable);\n popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n // show the popup window\n popupWindow.showAtLocation(findViewById(android.R.id.content), gravity, 0, 0);\n\n popupWindow.setAnimationStyle(android.R.style.Animation_Dialog);\n\n // dismiss the popup window when touched\n popupView.setOnTouchListener((v, event) -> {\n popupWindow.dismiss();\n return true;\n });\n }\n }", "private void showPopup(MouseEvent e) {\n if (e.isPopupTrigger()) {\n jPopupMenu1.show(e.getComponent(), e.getX(), e.getY());\n }\n }", "public JPopupMenu getPopup()\n {\n return popup;\n }", "public int open() {\n\t\tint value = super.open();\n\t\tif (popupCloser == null) {\n\t\t\tpopupCloser = new PopupCloserListener();\n\t\t}\n\t\tpopupCloser.installListeners();\n\t\tProposal p = getSelectedProposal();\n\t\tif (p != null) {\n\t\t\tshowProposalDescription();\n\t\t}\n\t\treturn value;\n\t}", "public void show()\n {\n setListSelection(comboBox.getSelectedIndex());\n Point location = getPopupLocation();\n show(comboBox\n //以下x、y坐标修正代码由Jack Jiang增加\n ,\n location.x + popupOffsetX //*~ popupOffsetX是自定属性,用于修改弹出窗的X坐标\n ,\n location.y + popupOffsetY //*~ popupOffsetY是自定属性,用于修改弹出窗的Y坐标\n );\n }", "InfoPopupDialog(Shell parent) {\n\t\t\tsuper(parent, PopupDialog.HOVER_SHELLSTYLE, false, false, false,\n\t\t\t\t\tfalse, false, null, null);\n\t\t}", "private void initWayPopup() {\r\n wayMenuItem = new MenuItem[5];\r\n wayMenuItem[0] = new MenuItem(\"Minim path\");\r\n wayMenuItem[1] = new MenuItem(\"Maxim path\");\r\n wayMenuItem[2] = new MenuItem(\"Next path\");\r\n wayMenuItem[3] = new MenuItem(\"Prev path\");\r\n wayMenuItem[4] = new MenuItem(\"Select all\");\r\n\r\n /* Init the popup */\r\n wayPopupMenu = new PopupMenu();\r\n\r\n wayPopupMenu.add(wayMenuItem[0]);\r\n wayPopupMenu.add(wayMenuItem[1]);\r\n wayPopupMenu.addSeparator();\r\n wayPopupMenu.add(wayMenuItem[2]);\r\n wayPopupMenu.add(wayMenuItem[3]);\r\n wayPopupMenu.addSeparator();\r\n wayPopupMenu.add(wayMenuItem[4]);\r\n\r\n wayPopupMenu.addActionListener(this);\r\n\r\n this.add(wayPopupMenu);\r\n }", "void showPopup(MouseEvent e) {\n\t\tif (e.isPopupTrigger()) {\n\t\t\tpopup.show((Component) e.getSource(), e.getX(), e.getY());\n\t\t}\n\t}", "public void initKnowledgePointPopupLayout() {\n knowledgePointPopup = new FrontGateKnowledgePointPopup(this.getContext());\n knowledgePointPopup.showPopupWindow();\n }", "protected void setupPopupMenu( JPopupMenu popup )\n {\n JMenuItem showGridMenuItem = new JMenuItem( \"Toggle Grid\" );\n showGridMenuItem.addActionListener(\n new ActionListener()\n {\n @Override\n public void actionPerformed( ActionEvent e )\n {\n setShowGrid( !isShowGrid() );\n }\n } );\n popup.add( showGridMenuItem );\n }", "private void showPopup(String title, String message)\n\t{\n\t\tJOptionPane.showMessageDialog(frmMPSWebServices, message, title, JOptionPane.PLAIN_MESSAGE);\n\t}", "public void setCanOpenPopup(boolean opensPopup) {\n/* 1270 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public interface InterfaceOnCreatePopUpMenuMain {\n\n public void InterFaceonInflatePopUp(View view, PopupMenu popupMenu, int position);\n}", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "@Override\n\tprotected void initializePopupFields(Owner data) {\n\t}", "private void showPopUpMenu() {\n\t\tPopupMenu popup = new PopupMenu(getActivity(), moreButton);\n\t\tpopup.getMenuInflater().inflate(R.menu.popup_menu, popup.getMenu());\n\n\t\tpopup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\n\t\t\t\tif (item.getTitle().equals(\"About\")) {\n\t\t\t\t\tUtils.startActivity(\n\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\tcom.allpoint.activities.tablet.AboutActivity_.class,\n\t\t\t\t\t\t\tfalse, false, false);\n\t\t\t\t} else {\n\t\t\t\t\tshowSettingFrag();\n\t\t\t\t}\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tpopup.show();// showing popup menu\n\t}", "private void initialize() {\r\n //this.setVisible(true);\r\n \r\n\t // added pre-set popup menu here\r\n// this.add(getPopupFindMenu());\r\n this.add(getPopupDeleteMenu());\r\n this.add(getPopupPurgeMenu());\r\n\t}", "void showTooltip();", "public static void initializePopup(){\n\n popup = new PopupMenu();\n\n // Initialize menu items\n MenuItem exitItem = new MenuItem(\"Exit\");\n MenuItem pauseItem = new MenuItem(\"Pause\");\n MenuItem resumeItem = new MenuItem(\"Resume\");\n\n // Exit listener\n exitItem.addActionListener(arg0 -> System.exit(0));\n\n // Pause listener\n pauseItem.addActionListener(arg0 -> {\n paused = true;\n pauseItem.setEnabled(false);\n resumeItem.setEnabled(true);\n });\n\n // Resume listener\n resumeItem.addActionListener(arg0 -> {\n paused = false;\n pauseItem.setEnabled(true);\n resumeItem.setEnabled(false);\n });\n\n resumeItem.setEnabled(false);\n\n popup.add(resumeItem);\n popup.add(pauseItem);\n popup.add(exitItem);\n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tsuper.mouseClicked(e);\r\n\t\t\tif(e.isPopupTrigger()){\r\n\t\t\t\tdoClick(e);\r\n\t\t\t\tjPopupMenu.show((Component)e.getSource(), e.getX(), e.getY());\r\n\t\t\t}\r\n\t\t}", "public void showPopup (View v, CraftEssence ce){\n PopupMenu popup = new PopupMenu(this, v);\n popup.setOnMenuItemClickListener(this);\n popup.inflate(R.menu.popup_skill_menu);\n String ceName, ceDescription;\n\n ceName = currentCraftEssenceName;\n ceDescription = ce.getCraftEssenseEffect();\n\n popup.getMenu().getItem(0).setTitle(ceName);\n popup.getMenu().getItem(1).setVisible(true);\n popup.getMenu().getItem(1).setTitle(ceDescription);\n popup.show();\n }", "@Override\n\tpublic void hidePopup() {\n\t\t// logger.info(\"..errr..I'll hide u\");\n\t}", "void showCustomizer();", "void setPopupDuration(int popupDuration);", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\r\n\tpublic void show() {\n\r\n\t}", "@Override\r\npublic String popupSearch(String criteria) {\n\treturn null;\r\n}", "public void showPopupOption(View v) {\n PopupMenu popup = new PopupMenu(ListMusicActivity.this, v);\n //Inflating the Popup using xml file\n popup.getMenuInflater().inflate(R.menu.popup_menu, popup.getMenu());\n\n //registering popup with OnMenuItemClickListener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n public boolean onMenuItemClick(MenuItem item) {\n Toast.makeText(ListMusicActivity.this,\"You Clicked : \" + item.getTitle(),Toast.LENGTH_SHORT).show();\n return true;\n }\n });\n\n popup.show();//showing popup menu\n }", "@Override\r\n\tpublic void show() {\n\t}", "private void showProposalDevelopment(){\r\n try{\r\n \r\n ProposalBaseWindow propFrame = null;\r\n if ( (propFrame = (ProposalBaseWindow)mdiForm.getFrame(\r\n CoeusGuiConstants.PROPOSAL_BASE_FRAME_TITLE))!= null ) {\r\n if( propFrame.isIcon() ){\r\n propFrame.setIcon(false);\r\n }\r\n propFrame.setSelected(true);\r\n return;\r\n }\r\n propFrame = new ProposalBaseWindow(mdiForm );\r\n propFrame.setVisible( true );\r\n }catch(Exception exception){\r\n CoeusOptionPane.showInfoDialog(exception.getMessage());\r\n }\r\n }", "@Override\n public void show() {\n\n }", "@Override\n public void show() {\n\n }", "private void resourceActionWindow (ButtonImage button){\n JPopupMenu depositList = new JPopupMenu(\"Deposits\");\n DepositMenu subMenu = new DepositMenu(gui, \"Send to\", selectedResource, Command.SEND_DEPOSIT_ID, 0);\n depositList.add(subMenu);\n button.addMouseListener(new MouseAdapter() {\n public void mouseClicked(MouseEvent e) {\n depositList.show(button , e.getX(), e.getY());\n }\n });\n }", "@Override\n public void show() {\n \n }", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tif(e.isPopupTrigger())\n\t\t\t\t{\n\t\t\t\t\tpopup.show(e.getComponent(), e.getX(), e.getY());\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "@Override\n\tpublic void show() {\n\t\t\n\t}", "public JPopupButton() {\n initComponents();\n }", "public void showTipDialog() {\n this.controller.showTipModal(C7251R.string.lys_dls_photo_tip_title, C7251R.string.lys_dls_photo_tip_text, NavigationTag.LYSAddPhotosTip);\n }", "@Override\n\tpublic void show() {\n\t}", "@Override\n\tpublic void show() {\n\t}", "void initializePopup() {\n\t\t\n\t\tsetDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\t\tsetBounds(100, 100, 450, 475);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\tcontentPanel.setLayout(null);\n\n\t\tJLabel lblThemeName = new JLabel(\"Theme Name\");\n\t\tlblThemeName.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblThemeName.setBounds(6, 31, 87, 16);\n\t\tcontentPanel.add(lblThemeName);\n\n\t\tname = new JTextField();\n\t\tname.setBounds(134, 26, 294, 26);\n\t\tcontentPanel.add(name);\n\t\tname.setColumns(10);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Words\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(6, 76, 87, 16);\n\t\tcontentPanel.add(lblNewLabel);\n\n\t\tJLabel lblLetterOrder = new JLabel(\"Letter Order\");\n\t\tlblLetterOrder.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblLetterOrder.setBounds(6, 235, 87, 16);\n\t\tcontentPanel.add(lblLetterOrder);\n\n\t\twords = new JTextPane();\n\t\twords.setBounds(134, 75, 294, 149);\n\t\tcontentPanel.add(words);\n\n\t\tletters = new JTextPane();\n\t\tletters.setBounds(134, 235, 294, 149);\n\t\tcontentPanel.add(letters);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\\\" signals unselected tile\");\n\t\tlblNewLabel_1.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 13));\n\t\tlblNewLabel_1.setBounds(6, 392, 157, 16);\n\t\tcontentPanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Use % to signal for a random letter\");\n\t\tlblNewLabel_2.setBounds(202, 392, 242, 16);\n\t\tcontentPanel.add(lblNewLabel_2);\n\t\t\n\t\tJLabel lblRowsOf = new JLabel(\"6 rows of 6 letters\");\n\t\tlblRowsOf.setBounds(6, 340, 116, 16);\n\t\tcontentPanel.add(lblRowsOf);\n\t\t\n\t\tJLabel lblQQu = new JLabel(\"Q = Qu\");\n\t\tlblQQu.setBounds(6, 368, 61, 16);\n\t\tcontentPanel.add(lblQQu);\n\t\t{\n\t\t\tJPanel buttonPane = new JPanel();\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\t{\n\t\t\t\tokButton = new JButton(\"OK\");\n\t\t\t\tokButton.setActionCommand(\"OK\");\n\t\t\t\tokButton.addActionListener(new AcceptThemeController(this));\n\t\t\t\tbuttonPane.add(okButton);\n\t\t\t\tgetRootPane().setDefaultButton(okButton);\n\t\t\t}\n\t\t\t{\n\t\t\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\t\t\tcancelButton.setActionCommand(\"Cancel\");\n\t\t\t\tcancelButton.addActionListener(new CloseThemeController(this, model));\n\t\t\t\tbuttonPane.add(cancelButton);\n\t\t\t}\n\t\t}\n\t}", "public boolean isPopupShowing() {\n/* 476 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\tpublic void show() {\n\n\t}", "@Override\n\t\tpublic void popupMenuWillBecomeVisible(PopupMenuEvent e) {\n\n\t\t}", "public PopupButton() {\r\n super(null);\r\n \r\n setAction(new AbstractAction() {\r\n\r\n \tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n showPopup();\r\n }\r\n });\r\n \r\n String javaVersion = System.getProperties().getProperty(\r\n \"java.specification.version\");\r\n if (javaVersion.equals(\"1.3\")) {\r\n setBorderPainted(false);\r\n // This is needed specifically for JDK1.3 on Windows & Motif\r\n setMargin(new Insets(0,0,0,0));\r\n }\r\n }", "@Override\r\n\tpublic void show() {\n\t\t\r\n\t\t\r\n\t}", "private void init() {\n\t\tClassLoader loader = LegalDialog.class.getClassLoader();\n\t\tthisURL = loader.getResource(\"disclaimer.htm\");\n\t\ttry {\n\t\t\tthisEditor = new JEditorPane( thisURL );\n\t\t\tthisEditor.setEditable( false );\n\t\t\t// needed to open browser via clicking on a link\n\t\t\tthisEditor.addHyperlinkListener(new HyperlinkListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void hyperlinkUpdate(HyperlinkEvent e) {\n\t\t\t\t\tURL url = e.getURL();\n\t\t\t\t\tif (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (url.sameFile(thisURL))\n\t\t\t\t\t\t\t\tthisEditor.setPage(url);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tDesktop.getDesktop().browse(url.toURI());\n\t\t\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\t\t} catch (URISyntaxException ex) {\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (e.getEventType() == HyperlinkEvent.EventType.ENTERED) {\n\t\t\t\t\t\tif (url.sameFile(thisURL))\n\t\t\t\t\t\t\tthisEditor.setToolTipText(url.getRef());\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthisEditor.setToolTipText(url.toExternalForm());\n\t\t\t\t\t} else if (e.getEventType() == HyperlinkEvent.EventType.EXITED) {\n\t\t\t\t\t\tthisEditor.setToolTipText(null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tjScrollPane.setViewportView(thisEditor); // Generated\n\t\t} catch (IOException ex) {ex.printStackTrace();};\n\t}", "@Override\n public void show() {\n }", "public static JPopupMenu createPopupMenu() {\n final JPopupMenu popup = new JPopupMenu();\n popup.setBackground(GUI.themeColorTwo);\n\n JMenuItem deleteItem = new JMenuItem(new AbstractAction(\"Delete\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(GUI.frame, \"Delete selected\");\n System.out.println(\"deleting item\");\n }\n });\n deleteItem.setBackground(GUI.themeColor);\n deleteItem.setForeground(Color.white);\n popup.add(deleteItem);\n JMenuItem pinItem = new JMenuItem(new AbstractAction(\"Pin\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showMessageDialog(GUI.frame, \"Pin selected\");\n System.out.println(\"pinning item\");\n }\n });\n pinItem.setBackground(GUI.themeColorTwo);\n pinItem.setForeground(Color.white);\n popup.add(pinItem);\n\n return popup;\n }" ]
[ "0.6917718", "0.66626126", "0.6629831", "0.6589044", "0.65641737", "0.6488426", "0.6347049", "0.6331398", "0.6288317", "0.62869155", "0.626079", "0.6214322", "0.6143024", "0.60570097", "0.60439306", "0.6022645", "0.59931004", "0.5947834", "0.5944219", "0.5934131", "0.5916114", "0.5881358", "0.5879798", "0.5878341", "0.5872274", "0.58711475", "0.5859272", "0.5859197", "0.58515346", "0.58380294", "0.5824143", "0.5817441", "0.5809903", "0.5807282", "0.5795665", "0.57752866", "0.5758288", "0.5756162", "0.5727113", "0.5714228", "0.5699909", "0.5699838", "0.5694279", "0.5687961", "0.56697214", "0.5662672", "0.5628916", "0.56248224", "0.5624654", "0.56171685", "0.56117356", "0.56098133", "0.56010646", "0.5594598", "0.55725676", "0.55555665", "0.55555665", "0.5539994", "0.5534443", "0.5529785", "0.5529165", "0.5510887", "0.5510887", "0.54877543", "0.54819137", "0.54777104", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54728705", "0.54630613", "0.5461242", "0.5458685", "0.5458685", "0.5451876", "0.5445449", "0.54424417", "0.54424417", "0.54424417", "0.54424417", "0.54424417", "0.54424417", "0.54424417", "0.54424417", "0.5441082", "0.54396915", "0.5437982", "0.54272723", "0.54257727", "0.5425632" ]
0.0
-1
Call the CIO servlet with unique identifier , before setting all session values to null
public void cancelAllConfigurations(ActionEvent actionEvent) throws IOException, JsonGenerationException, JsonMappingException { String currView = (String)ADFUtils.getSessionScopeValue("currView"); V93kQuote v93k = (V93kQuote)ADFUtils.getSessionScopeValue("parentObject"); if (v93k != null) { UiSelection uiSelection = v93k.getUiSelection(); InputParams inputParams = v93k.getInputParams(); v93k.setUiSelection(uiSelection); if (inputParams == null) { inputParams = new InputParams(); } SessionDetails sessionDetails = v93k.getSessionDetails(); if (sessionDetails == null) { sessionDetails = new SessionDetails(); } inputParams.setImportSource("CANCEL_CONFIG"); v93k.setInputParams(inputParams); v93k.setSessionDetails(sessionDetails); String jsonStr = JSONUtils.convertObjToJson(v93k); _logger.info("Input JSON " + jsonStr); ObjectMapper mapper = new ObjectMapper(); String responseJson = ConfiguratorUtils.callConfiguratorServlet(jsonStr); _logger.info("Response Json from Configurator : " + responseJson); Object obj = mapper.readValue(responseJson, V93kQuote.class); v93k = (V93kQuote)obj; ADFUtils.setSessionScopeValue("parentObject", v93k); } ADFUtils.setSessionScopeValue("cancelAll", "Y"); if (ADFUtils.findComponentInRoot("config_Phd") != null) { ADFUtils.addPartialTarget(ADFUtils.findComponentInRoot("config_Phd")); } //This is to cancel all configs and reset all session variables ADFUtils.setSessionScopeValue("parentObject", null); ADFUtils.setSessionScopeValue("refreshImport", null); ADFUtils.setSessionScopeValue("isDuplicateQuote", null); ADFUtils.setSessionScopeValue("isUpdateQuote", null); ADFUtils.setSessionScopeValue("isCreateQuote", null); ADFUtils.setSessionScopeValue("targetQuoteNumber", null); ADFUtils.setSessionScopeValue("isDuplicateQuote", null); ADFUtils.setSessionScopeValue("isDuplicateQuote", null); ADFUtils.setSessionScopeValue("quoteNumber", null); ADFUtils.setSessionScopeValue("ImpSrcChanged", null); //ADFUtils.setSessionScopeValue("currView", null); ADFUtils.setSessionScopeValue("inputParamsMap", null); ADFUtils.setSessionScopeValue("ruleSetMap", null); ADFUtils.setSessionScopeValue("qheaderValidMap", null); ADFUtils.setSessionScopeValue("ruleSetMap", null); ADFUtils.setSessionScopeValue("cancelAll", "Y"); ADFUtils.setSessionScopeValue("uniqueSessionId", null); ADFUtils.setSessionScopeValue("selectedNodeValueMap", null); ADFUtils.setSessionScopeValue("inputNodeValueMap", null); ADFUtils.setSessionScopeValue("inputLOVMap", null); ADFUtils.setSessionScopeValue("refreshImpSrc", "Y"); ADFUtils.setSessionScopeValue("configSaved", null); ADFUtils.setSessionScopeValue("refreshImpSrc", null); ADFUtils.setSessionScopeValue("ruleSetMapConfig", null); cancelPop.cancel(); if (currView != null && (currView.equals("quoteUpdate") || currView.equals("quote"))) { ADFUtils.setSessionScopeValue("currView", "quote"); RichCommandImageLink button = (RichCommandImageLink)ADFUtils.findComponentInRoot("ctb_qhdr"); // Navigate to create quote page if (button != null) { ActionEvent acEvent = new ActionEvent(button); acEvent.queue(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initSession(HttpServletRequest request, HttpServletResponse response) throws IOException {\n // create new seassion for user\n HttpSession session = request.getSession();\n if (session != null) {\n _sessionId = session.getId();\n }\n\n response.getWriter().write(_sessionId);\n }", "void unsetSessionID();", "static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }", "@Override\n\tpublic void execute(HttpServletRequest request, HttpServletResponse response) {\n\t\tSystem.out.println(\"세션값 제거! \");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tsession.removeAttribute(\"userid\");\n\t\tsession.removeAttribute(\"userpk\");\n\t\tsession.removeAttribute(\"usename\");\n\t\tsession.setAttribute(\"userCheck\", -1);\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic ActionData exec(HttpServletRequest request, HttpServletResponse response) {\n\t\tActionData data = new ActionData();\r\n\t\tHttpSession session = request.getSession(true);\r\n\r\n\t\tsession.removeAttribute(\"id\"); \r\n\t\t\r\n\t\tdata.setPath(\"../center/Main\");\r\n\t\tdata.setRedirect(true);\r\n\t\t\r\n\t\treturn data;\r\n\t}", "private String getTopcatSessionId() {\r\n HttpServletRequest request = this.getThreadLocalRequest();\r\n HttpSession session = request.getSession();\r\n String sessionId = null;\r\n if (session.getAttribute(\"SESSION_ID\") == null) { // First time login\r\n try {\r\n sessionId = userManager.login();\r\n session.setAttribute(\"SESSION_ID\", sessionId);\r\n } catch (AuthenticationException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } else {\r\n sessionId = (String) session.getAttribute(\"SESSION_ID\");\r\n }\r\n return sessionId;\r\n }", "public abstract void setIdSession(String id_session);", "@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {\n String sid = CookieUtil.getCookieValue(request, DDConstant.COOKIE_NAME_MOBILE);\n if(StringUtils.isEmpty(sid) || sid.length()==0){\n sid = getUuid();\n// CookieUtil.setCookie(request, response, GlobalConstant.JSESSIONID, sid, 60 * 60);\n CookieUtil.setCookie(request, response, DDConstant.COOKIE_NAME_MOBILE, sid, 60 * 60);\n }\n HttpServletRequestWrapper httpServletRequestWrapper = new HttpServletRequestWrapper(sid,request);\n chain.doFilter(httpServletRequestWrapper,response);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n HttpSession session = new HttpSession() {\n public long getCreationTime() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public String getId() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public long getLastAccessedTime() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public ServletContext getServletContext() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public void setMaxInactiveInterval(int interval) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public int getMaxInactiveInterval() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public HttpSessionContext getSessionContext() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public Object getAttribute(String name) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public Object getValue(String name) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public Enumeration<String> getAttributeNames() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public String[] getValueNames() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public void setAttribute(String name, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public void putValue(String name, Object value) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public void removeAttribute(String name) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public void removeValue(String name) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public void invalidate() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n\n public boolean isNew() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }\n };\n try {\n String bsubmit = request.getParameter(\"submit\");\n String inUsername = request.getParameter(\"username\");\n String inPassword = request.getParameter(\"password\");\n if (bsubmit != null) {\n UserDAO userDAO = new UserDAO();\n User user = userDAO.findUserByNameAndPassword(inUsername, inPassword);\n if (user == null) {\n out.write(\"<script type='text/javascript'>\\n\");\n out.write(\"alert(' Sorry, invalid username or password\");\n out.write(\".');\\n\");\n out.write(\"setTimeout(function(){window.location.href='login.jsp'},1000);\");\n out.write(\"</script>\\n\");\n } else {\n if (user.getUserName().equals(inUsername) && user.getPassword().equals(inPassword)) {\n session = request.getSession();\n session.setAttribute(\"userId\", String.valueOf(user.getId()));\n session.setAttribute(\"userName\", user.getUserName());\n out.write(\"<script type='text/javascript'>\\n\");\n out.write(\"alert(' Thank you! You are login with \");\n out.write(user.getUserName());\n out.write(\" account.');\\n\");\n out.write(\"setTimeout(function(){window.location.href='index.jsp'},1000);\");\n out.write(\"</script>\\n\");\n }\n }\n\n }\n\n } finally {\n out.close();\n }\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t\t\t\t\tthrows ServletException, IOException\r\n\t\t\t\t\t{\n\t\tHttpSession session = request.getSession(true);\r\n\r\n\t\tServletContext context = getServletContext();\r\n\r\n\t\tsession.setMaxInactiveInterval(60); // in seconds\r\n\r\n\t\t// Get session creation time.\r\n\t\tDate createTime = new Date(session.getCreationTime());\r\n\t\t// Get last access time of this web page.\r\n\t\tDate lastAccessTime = \r\n\t\t\t\tnew Date(session.getLastAccessedTime());\r\n\r\n\t\tString title =\"\";\r\n\t\tInteger visitCount = new Integer(0);\r\n\t\tInteger requestCount = new Integer(0);\r\n\t\tString visitCountKey = new String(\"visitCount\");\r\n\t\tString userIDKey = new String(\"userID\");\r\n\t\tString userID = new String(\"ABCD\");\r\n\r\n\t\t// Check if this is new comer on your web page.\r\n\t\tif (session.isNew()){\r\n\r\n\t\t\ttitle = \"Welcome to my website\";\r\n\t\t\tsession.setAttribute(userIDKey, userID);\r\n\r\n\t\t\trequestCount = (Integer)context.getAttribute(\"totalRequestServed\");\r\n\t\t\trequestCount = (requestCount != null ? requestCount : 0) + 1;\r\n\t\t\t//RequestDispatcher\r\n\t\t} else {\r\n\t\t\ttitle = \"You are in the same Session !!!\";\r\n\t\t\tvisitCount = (Integer)session.getAttribute(visitCountKey);\r\n\t\t\tvisitCount = (visitCount != null ? visitCount : 0) + 1;\r\n\t\t\tuserID = (String)session.getAttribute(userIDKey);\r\n\r\n\t\t\trequestCount = (Integer)context.getAttribute(\"totalRequestServed\");\r\n\t\t\trequestCount = (requestCount != null ? requestCount : 0) + 1;\r\n\r\n\r\n\t\t}\r\n\t\tsession.setAttribute(visitCountKey, visitCount); // 1\r\n\t\tcontext.setAttribute(\"totalRequestServed\", requestCount);\r\n\r\n\t\tString logoutRequest = request.getParameter(\"logout\");\r\n\t\tSystem.out.println(\"SessionServlet.doGet() logoutRequest :: \"+ logoutRequest);\r\n\r\n\t\tif(\"logout\".equals(logoutRequest)){\r\n\t\t\ttitle = \"Good Bye\";\r\n\t\t\tSystem.out.println(\"Logging Out\");\r\n\t\t\tsession.invalidate();\r\n\t\t\t//\t\t\tsession.removeAttribute(arg0);\r\n\t\t\t//\t\t\tcontext.removeAttribute(\"totalRequestServed\");\r\n\r\n\t\t\t//\t\t\tsession.setAttribute(visitCountKey, new Integer(0));\r\n\t\t\tvisitCount = new Integer(0);\r\n\t\t}\r\n\r\n\r\n\t\t// Set response content type\r\n\t\tresponse.setContentType(\"text/html\");\r\n\t\tPrintWriter out = response.getWriter();\r\n\r\n\t\tString docType =\r\n\t\t\t\t\"<!doctype html public \\\"-//w3c//dtd html 4.0 \" +\r\n\t\t\t\t\t\t\"transitional//en\\\">\\n\";\r\n\t\tString logout = \"<form action='SessionServlet' method='POST'> \" +\r\n\t\t\t\t\"<input type='submit' name ='logout' value='logout' /> \" +\r\n\t\t\t\t\"</form>\";\r\n\r\n\t\tout.println(docType +\r\n\t\t\t\t\"<html>\\n\" +\r\n\t\t\t\t\"<head><title>\" + title + \"</title></head>\\n\" +\r\n\t\t\t\t\"<body bgcolor=\\\"#f0f0f0\\\">\\n\" +\r\n\t\t\t\t\"<h1 align=\\\"center\\\">\" + title + \"</h1>\\n\" +\r\n\t\t\t\t\"<h2 align=\\\"center\\\">Session Infomation</h2>\\n\" +\r\n\t\t\t\t\"<table border=\\\"1\\\" align=\\\"center\\\">\\n\" +\r\n\t\t\t\t\"<tr bgcolor=\\\"#949494\\\">\\n\" +\r\n\t\t\t\t\" <th>Session info</th><th>value</th></tr>\\n\" +\r\n\t\t\t\t\"<tr>\\n\" +\r\n\t\t\t\t\" <td>id</td>\\n\" +\r\n\t\t\t\t\" <td>\" + session.getId() + \"</td></tr>\\n\" +\r\n\t\t\t\t\"<tr>\\n\" +\r\n\t\t\t\t\" <td>Creation Time</td>\\n\" +\r\n\t\t\t\t\" <td>\" + createTime + \r\n\t\t\t\t\" </td></tr>\\n\" +\r\n\t\t\t\t\"<tr>\\n\" +\r\n\t\t\t\t\" <td>Time of Last Access</td>\\n\" +\r\n\t\t\t\t\" <td>\" + lastAccessTime + \r\n\t\t\t\t\" </td></tr>\\n\" +\r\n\t\t\t\t\"<tr>\\n\" +\r\n\t\t\t\t\" <td>User ID</td>\\n\" +\r\n\t\t\t\t\" <td>\" + userID + \r\n\t\t\t\t\" </td></tr>\\n\" +\r\n\t\t\t\t\"<tr>\\n\" +\r\n\t\t\t\t\" <td>Number of visits</td>\\n\" +\r\n\t\t\t\t\" <td>\" + visitCount + \"</td></tr>\\n\" +\r\n\t\t\t\t\"<tr>\\n\" +\r\n\t\t\t\t\" <td>Total Request Served</td>\\n\" +\r\n\t\t\t\t\" <td>\" + requestCount + \"</td></tr>\\n\" +\r\n\t\t\t\t\"</table>\\n\" +\r\n\t\t\t\tlogout+\r\n\t\t\t\t\"</body></html>\");\r\n\t\t\t\t\t}", "@Override\n public void beginRequest(HttpServletRequest httpServletRequest) {\n String cookieValue = getCurrentCookieValue(httpServletRequest, COOKIE_NAME);\n if (cookieValue == null) {\n int sessionNumber = secureRandom.nextInt(Integer.MAX_VALUE);\n sessionId.set(\"session-\" + Integer.toString(sessionNumber));\n wasModified.set(true);\n } else {\n sessionId.set(cookieValue);\n wasModified.set(false);\n }\n }", "public static void processOIDCresp(HttpServletRequest req,HttpServletResponse resp) throws IOException, InterruptedException, NoSuchAlgorithmException, InvalidKeySpecException, ClassNotFoundException, SQLException\n\t{\n\t\tHttpSession session=req.getSession();\n\t\t//check the state parameters from the response with state parameter in the session,saved during authorization request\n\t\tString state=(String)req.getParameter(\"state\");\n\t\t\n\t\tif(state!=null)\n\t\t{\n\t\t //Pick up the response type associated with the state parameters\n\t\t String response_type=(String)session.getAttribute(state);\n\t\t if(response_type!=null)\n\t\t {\n\t\t\t if(response_type.contains(\"id_token\"))\n\t\t\t {\n\t\t\t\t//If the response type contains id_token(validate the ID Token create one cookie for authenticated users and send to user agent(browser)\n\t\t\t\t//If the response type contains id_token token(validate the ID Token create one cookie for authenticated users and send to user agent(browser) \n\t\t\t\t//and when users needs to access more profile info using access token we can get it.\n\t\t\t\t \n\t\t\t\t //Decode the ID Token(headers and payload)\n\t\t\t\tArrayList<String>decodeParams=decodeIDTokeheadPay(req.getParameter(\"id_token\"));\n\t\t\t\t//Convert the JSON into key value pairs\n\t\t\t Map<String,Object> headers=processJSON(decodeParams.get(0));\n\t\t\t\tMap<String,Object> payloads=processJSON(decodeParams.get(1));\n\t\t\t\t\n\t\t\t\t//Validate the public key by sending request to issuer(URL) by passing clientid and kid as header parameters\n\t\t\t\tif(ValidateIDissuerKey((String) payloads.get(\"iss\"),(String) headers.get(\"kid\"),resp))\n\t\t\t\t {\n\t\t\t\t\t //Decoded the public key from the encoded kid for signature verifications \n\t\t\t\t\t PublicKey pubkeys=pubkeyEncoder(Base64.getDecoder().decode((String) headers.get(\"kid\")));\n\t\t\t\t\t if(ValidateTokenSignature(req.getParameter(\"id_token\"),pubkeys))\n\t\t\t\t\t {\n\t\t\t\t\t\t responseFormat(payloads,resp);\n\t\t\t\t\t\t \n\t\t\t\t\t\t //another flow of implicit(id_token token)\n\t\t\t\t\t\t if(response_type.contains(\"token\"))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t//save the token in cookie\n\t\t\t\t\t\t\t//Create one session for that authenticated users and redirected to Home Page\n\t\t\t\t\t\t\t Cookie auth_uesr = new Cookie(\"access_token\",req.getParameter(\"access_token\"));\n\t\t\t\t\t\t\t resp.addCookie(auth_uesr);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t //Redirected to Home Page\n\t\t\t\t\t\t //if(!response_type.contains(\"code\"))\n\t\t\t\t\t\t\t//resp.sendRedirect(\"http://localhost:8080/OPENID/phoneBookHome.jsp\");\n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t {\n\t\t\t\t\t\t //Signature Invalid and Token become Invalid and reauthenticate again\n\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t //issuer invalid\n\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t }\n\t\t\t }\n\t\t\t //Token Endpoint request for authorization code Flow\n\t\t /* if(response_type.contains(\"code\"))\n\t\t {\n\t\t \t authCodeProcessModel authModel=new authCodeProcessModel();\n\t\t \t authModel.setClientid(\"mano.lmfsktkmyj\");\n\t\t \t authModel.setClientsecret(\"mano.tpeoeothyc\");\n\t\t \t authModel.setCode((String)req.getParameter(\"code\"));\n\t\t \t authModel.setRedirecturi(\"http://localhost:8080/OPENID/msPhoneBook/response1\");\n\t\t \t \n\t\t \t //Get response from the token endpoint\n\t\t \t Map<String,Object> tokenResp=authCodeProcess(authModel,resp);\n\t\t \t //Check if the response returned any error\n\t\t \t if(tokenResp.containsKey(\"error\"))\n\t\t \t {\n\t\t \t //Token response made error redirected to signin with mano page again\n\t\t \t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t \t }\n\t\t \t else\n\t\t \t {\n\t\t \t\t responseFormat(tokenResp,resp);\n\t\t \t\t //Validate ID Token\n\t\t \t\t ArrayList<String>decodeParams=decodeIDTokeheadPay((String) tokenResp.get(\"id_token\"));\n\t\t\t\t\t\t//Convert the JSON into key value pairs\n\t\t\t\t\t Map<String,Object> headers=processJSON(decodeParams.get(0));\n\t\t\t\t\t Map<String,Object> payloads=processJSON(decodeParams.get(1));\n\t\t\t\t\t \n\t\t\t\t\t//Validate the public key by sending request to issuer(URL) by passing clientid and kid as header parameters\n\t\t\t\t\t if(ValidateIDissuerKey((String) payloads.get(\"iss\"),(String) headers.get(\"kid\"),resp))\n\t\t\t\t\t {\n\t\t\t\t\t\t //true check signature\n\t\t\t\t\t\t PublicKey pubkeys=pubkeyEncoder(Base64.getDecoder().decode((String) headers.get(\"kid\")));\n\t\t\t\t\t\t //Validate the signature using public key\n\t\t\t\t\t\t if(ValidateTokenSignature((String) tokenResp.get(\"id_token\"),pubkeys))\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t //Valid the access token with the at_hash values in the ID Token\n\t\t\t\t\t\t\t //First hash the access token and compared with at_hash value in the ID Token\n\t\t\t\t\t\t\t if(payloads.get(\"at_hash\").equals(hashPass((String)tokenResp.get(\"access_token\"))))\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t //save access token along with refresh token to client database used when acces token get expired\n\t\t\t\t\t\t\t\t PhoneBookDAO.saveTokens((String)tokenResp.get(\"access_token\"),(String)tokenResp.get(\"refresh_token\"));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t//Create one cookie for that authenticated users and redirected to Home Page and send cookie to browser\n\t\t\t\t\t\t\t\t session.setAttribute(\"enduser_name\",payloads.get(\"sub\"));\n\t\t\t\t\t\t\t\t Cookie auth_uesr = new Cookie(\"access_token\",(String) tokenResp.get(\"access_token\"));\n\t\t\t\t\t\t\t\t resp.addCookie(auth_uesr);\n\t\t\t\t\t\t\t\t //Redirected to Home Page\n\t\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/phoneBookHome.jsp\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t //Invalid Access Token(Reauthenticate again)\n\t\t\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t }\n\t\t\t\t\t\t else\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t //Signature invalid\n\t\t\t\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t\t\t\t }\n\t\t \t }\n\t\t\t else\n\t\t\t {\n\t\t\t\t //Invalid issuers or public key(reauthenticate again)\n\t\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t\t }\n\t\t }\n\t\t }*/\n\t\t }\n\t\t else\n\t\t {\n\t\t\t//If the state value is not matched with the state value generated during authorization request CSRF attack\n\t\t\t//sign up again\n\t\t\t resp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//state missing from server,response may be from unknown server,so sign up again\n\t\t\tresp.sendRedirect(\"http://localhost:8080/OPENID/PhoneBookLogin.jsp\");\n\t\t}\n\t}", "@RequestMapping(\"/dept/sessionId\")\n\tpublic Object id(HttpServletRequest request) {\n\t\treturn request.getSession().getId() ;\n\t}", "public WebConnectorRequestHandler () {\t\t\n\t\t_userSessions = new Hashtable<Long, UserSession>(); //manage all active sessions\n\t\t\n\t scheduledExecutorService.scheduleWithFixedDelay( //thread looping and checking for timeouts\n\t \t\tnew Runnable() {\t\t\t\t\t\t//if the user is logged in for too long without sending any requests-> logout\n\t\t\t public void run() {\t\t\t\t\t\n\t\t\t \tcheckforLogout(false);\n\t\t\t \n\t\t\t }\n\t\t\t }\n\t \t\t, LOGOUT_INTERVAL, LOGOUT_INTERVAL, TimeUnit.SECONDS);\n\t\t\t \n\n\n\t}", "void clearSession();", "void clearSession();", "private Session() {\n userId = -1;\n onUserDeletion = null;\n }", "@Override\r\n\tpublic void updateSessionId(ClimingList clim) {\n\t\tsession.update(\"climingLists.updateSessionId\",clim);\r\n\t\t\r\n\t}", "@Override\n\t\tpublic String getRequestedSessionId() {\n\t\t\treturn null;\n\t\t}", "void flushAndClearSession();", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n HttpSession session = req.getSession(true);\r\n //get session creation time\r\n Date createTime = new Date(session.getCreationTime());\r\n //get last access time of this web page \r\n Date lastAccessTime = new Date(session.getLastAccessedTime());\r\n\r\n String title = \"Welcome back to my website\";\r\n Integer visitCount = new Integer(0);\r\n String VistCountKey = new String(\"visitCount\");\r\n String userIDKey = new String(\"userID\");\r\n String userID = new String(\"ABCD\");\r\n //check if this is new comer on your web page \r\n if (session.isNew()) {\r\n title = \"welcoem to my website\";\r\n \r\n //set key and value like Cookie(key, value)\r\n session.setAttribute(userIDKey, userID);\r\n } else {\r\n visitCount = (Integer) session.getAttribute(VistCountKey);\r\n visitCount = visitCount + 1;\r\n userID = (String) session.getAttribute(userIDKey);\r\n }\r\n session.setAttribute(VistCountKey, visitCount);\r\n\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\"\r\n + \"<link href=\\\"resource/css/bootstrap.css\\\" rel=\\\"stylesheet\\\">\");\r\n out.println(\"<title>\" + title + \"</title>\");\r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1 align = \\\"center\\\" >\" + title + \"</h1>\\n\");\r\n out.println(\"<h2 align = \\\"center\\\" > Session Information </h2>\\n\");\r\n out.println(\"<table align =\\\"center\\\" class=\\\"table table-bordered table-hover\\\">\\n\"\r\n + \"<tr>\"\r\n + \"<th>Session Info</th><th>value</th></tr>\\n\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>id</td>\"\r\n + \"<td>\" + session.getId() + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>Creation time</td>\"\r\n + \"<td>\" + createTime + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>Time of last access</td>\"\r\n + \"<td>\" + lastAccessTime + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>ID</td>\"\r\n + \"<td>\" + userID + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>Number of visits</td>\"\r\n + \"<td>\" + visitCount + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"</tbale>\");\r\n out.println(\"<body>\");\r\n out.println(\"</body>\");\r\n out.println(\"</html>\");\r\n }", "final void request(HttpServletRequest request) {\n \n // Find the session ID in the cookies\n String sessionId = null;\n Cookie[] cookies = request.getCookies();\n int cookieCount = (cookies == null) ? 0 : cookies.length;\n for (int i = 0; i < cookieCount && sessionId == null; i++) {\n Cookie cookie = cookies[i];\n String name = cookie.getName();\n if (\"SessionId\".equals(name)) {\n sessionId = cookie.getValue();\n }\n }\n \n HttpSession session = request.getSession(true);\n _currentSession.set(session);\n \n // If the session ID is not found in the cookies, create a new one\n if (sessionId == null) {\n \n sessionId = session.getId();\n setProperty(sessionId, Boolean.FALSE);\n }\n \n // Fill the input parameters\n HashMap inputParameters = new HashMap();\n Enumeration params = request.getParameterNames();\n while (params.hasMoreElements()) {\n String name = (String) params.nextElement();\n String value = request.getParameter(name);\n if (\"\".equals(value) || name.equals(getSessionId())) {\n value = null;\n }\n inputParameters.put(name, value);\n }\n setProperty(\"_inputs\", inputParameters);\n }", "@Override\n\t\tpublic HttpSession getSession() {\n\t\t\treturn null;\n\t\t}", "public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {\n\n response.setContentType( \"text/html;charset=windows-1252\");\n /* set up the intrinsic variables using the pageContext goober:\n ** session = HttpSession\n ** application = ServletContext\n ** out = JspWriter\n ** page = this\n ** config = ServletConfig\n ** all session/app beans declared in globals.jsa\n */\n PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);\n // Note: this is not emitted if the session directive == false\n HttpSession session = pageContext.getSession();\n int __jsp_tag_starteval;\n ServletContext application = pageContext.getServletContext();\n JspWriter out = pageContext.getOut();\n _DummyMenu page = this;\n ServletConfig config = pageContext.getServletConfig();\n javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext);\n\n try {\n\n\n out.write(__oracle_jsp_text[0]);\n out.write(__oracle_jsp_text[1]);\n out.write(__oracle_jsp_text[2]);\n out.write(__oracle_jsp_text[3]);\n out.write(__oracle_jsp_text[4]);\n out.write(__oracle_jsp_text[5]);\n \n String strServerName = request.getServerName();\n String strServerPort = \"\"+request.getServerPort();\n String lstrCtxPath = request.getContextPath();\n \n String strUserid = (String)request.getParameter(\"userid\");\n String strAppId = (String) request.getParameter(\"appId\");\n if(strAppId == null || \"\".equals(strAppId)){\n strAppId = \"webbkg\";\n }\n //String strUserid = \"\"; // for Dolphin testing\n \n out.write(__oracle_jsp_text[6]);\n out.write(__oracle_jsp_text[7]);\n out.print(\"http://\" + strServerName + \":\" + strServerPort);\n out.write(__oracle_jsp_text[8]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[9]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[10]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[11]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[12]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[13]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[14]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[15]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[16]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[17]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[18]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[19]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[20]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[21]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[22]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[23]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[24]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[25]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[26]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[27]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[28]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[29]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[30]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[31]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[32]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[33]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[34]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[35]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[36]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[37]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[38]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[39]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[40]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[41]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[42]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[43]);\n out.print(strUserid);\n out.write(__oracle_jsp_text[44]);\n out.print(lstrCtxPath);\n out.write(__oracle_jsp_text[45]);\n\n }\n catch (Throwable e) {\n if (!(e instanceof javax.servlet.jsp.SkipPageException)){\n try {\n if (out != null) out.clear();\n }\n catch (Exception clearException) {\n }\n pageContext.handlePageException(e);\n }\n }\n finally {\n OracleJspRuntime.extraHandlePCFinally(pageContext, true);\n JspFactory.getDefaultFactory().releasePageContext(pageContext);\n }\n\n }", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {\n\t\t\n\t\tObject o=request.getSession().getAttribute(\"id\");\n//\t\tlogger.info(request.getRemoteAddr()+\"===\"+request.getRequestURI());\n\t\tresponse.setContentType(\"text/plain;charset=UTF-8\");\n\t\tif(o==null){//用\n\t\t\tresponse.getWriter().print(\"{'s':-1}\");\n \t\treturn false;\n\t\t}\n\n\t\treturn super.preHandle(request, response, handler);\n\t}", "@Override\n\tpublic String logout_request() {\n\t\treturn null;\n\t}", "public void changeSessionId(Session session);", "@Override\n\tpublic HttpSessionContext getSessionContext() {\n\t\treturn null;\n\t}", "void setSessionID(java.lang.String sessionID);", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n HttpSession session = req.getSession();\r\n session.removeAttribute(\"User\");\r\n session.removeAttribute(\"BookingList\");\r\n \r\n session.invalidate();\r\n \r\n // remove the cookies\r\n Cookie[] cookies = req.getCookies();\r\n for(int i=1; i < cookies.length; i++){\r\n cookies[i].setMaxAge(0);\r\n resp.addCookie(cookies[i]);\r\n }\r\n \r\n resp.sendRedirect(\"/SCProject/\");\r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"<<<<<<<<<<<<<<<<<<< LogOutProc 실행 >>>>>>>>>>>>>>>>>>>>>\");\n\n\t\t\n\t\tresponse.setHeader(\"Cache-Control\",\"no-store\"); \n\t\tresponse.setHeader(\"Pragma\",\"no-cache\"); \n\t\n\t\tString logout = \"success\";\n\t\tHttpSession session = request.getSession();\n\t\tsession.invalidate();\n\t\tSystem.out.println(\"<<<<<<<<<<<<<<<<<<< LogOutProc 완료 >>>>>>>>>>>>>>>>>>>>>\");\n\t\tresponse.sendRedirect(\"main.jsp?logout=\"+logout);\n\t\tSystem.out.println(\"main.jsp로 이동합니다....\\n\");\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\t\r\n\t}", "@Override\r\npublic void setSession(Map<String, Object> arg0) {\n\t\r\n}", "private void clearLoginReq() {\n if (reqCase_ == 6) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "private void logout(HttpServletRequest request, HttpServletResponse response)\n throws SQLException, IOException, ServletException {\n\tHttpSession session = request.getSession(false);\n\t// session.setAttribute(\"user\", null);\n\tsession.removeAttribute(\"email\");\n\t response.sendRedirect(\"index.jsp\");\n\t}", "public final void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {\n\t\n\t// if false will not create new cookie\n\t// HttpSession session = request.getSession(false);\n\t// session stores in cookies or in response.encodeURL in the form action\n\n\t// cookie in localhost name is Cookie: (name/value) JSESSIONID=79648B6603709388645FDF61F374469C\n\t// get value from firefox or w3m M-k\n\n\t// in tomcat/logs will view the log data \n\t//context.log(\"ahmad session id is = \"+ session.getId());\n\n\tresponse.setContentType(\"text/html\");\n\tPrintWriter out = response.getWriter();\n\n\tHttpSession session = request.getSession(false);// true default\n\t////////\tHttpSession session = request.getSession(false);\n\tString name = \"ali\";\n\n\t// because the session always not null, so i need to check something is null or not\n\t//\tString myName=(String) session.getAttribute(\"name\");\n\t///////\t if (session == null) {\n\t if (session==null) {\n\t out.println(\" session attribue is new , so new user \");\t \n \t session = request.getSession(true);\n \t } else {\n\t out.println(\"old session ,so welcome back user \");\t \n\t }\n\t session.setAttribute(\"name\",name);\n\n\t// if ((session.isNew())) {\n\t// //\tif ((session == null)) {\n\t// //\tif ((getName == null)) {\n // //\tout.println(\" session is new, welcome \");\n\t// out.println(\" session == new \");\n\t// //\tout.println(\" session == null \");\n\t// }else {\n\t// session.setAttribute(\"name\",name);\n\t// //\tgetName =(String) session.getAttribute(\"name\");\n\t// String getName =(String) session.getAttribute(\"name\");\n\t// out.println(\" session scope attribute = \"+ getName +\" <br/>\");\n\t// out.println(\" test session \"+ session.getId()+\" <br/>\");\n\t// out.println(\" <br/> ============ <br/>\" );\n\t// out.println(\" int x = \"+ (x++));\n\t// }\n\n\n\n\t// work only if the cookies are disabled\n // out.println(response.encodeURL(\"hi\"));\n\t out.println(\" <br/> ========== <br/> \");\n\t out.println(response.encodeURL(\"encodeURL\")); //\n\t out.println(\" <br/> ========== <br/> \");\n\t //\t out.println(response.encodeRedirectURL(\"encodeRedirectURL\"));\n\t out.println(\"<a href=\"+ response.encodeURL(\"http://www.sosox2.com\") +\">click me1</a>\");\n\t out.println(\"<a href=\"+ response.encodeRedirectURL(\"http://www.sosox2.com\") +\">click me2</a>\");\n\t response.sendRedirect(\"/aaa/bbb\");\n\t response.encodeRedirectURL(\"aaa/bbb\");\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t HttpSession session=request.getSession(); \n\t\tString username=request.getParameter(\"uname\");\n\t\t\n\t\tString password=request.getParameter(\"password\");\n\t\t\n\t\tString ip=request.getLocalAddr();\n\t\t\n\tSystem.out.println(\">>\"+username+\" \"+password+\" \"+ip);\n\t\n\tLoginService login=new LoginService();\n\tAdminLogin al=new AdminLogin();\n\tal.setName(username);\n\tal.setPassword(password);\n\tString resp=\"\";\n\ttry {\n\t\t resp=login.checkLogin(username,password,ip,session);\n\t}catch(Exception e) {\n\t\te.printStackTrace();\n\t}\n\tif(!resp.contains(\"NOK\")) {\n\t\t\n\t\t\n\t\tSystem.out.println(\"succefully login\");\n\t\t\n\t\tRandom rand = new Random(); \n\t\t \n \n session.setAttribute(\"uname\", username);\n int rand_int1 = rand.nextInt(1000);\n LinkedHashMap<String,Integer> lhm=new LinkedHashMap<String,Integer>();\n lhm.put(\"\"+rand_int1,rand_int1);\n System.out.println(lhm);\n //out.print(\"<a href='/CardDistributedSystem/test'>visit</a>\"); \n session.setAttribute(\"obj\", al);\n response.sendRedirect(\"/CardDistributedSystem/home.jsp\"); \n\t \n\t}\n\telse if(resp.contains(\"Invalid credentials\")) {\n\t\tSystem.out.println(\"not succefully login\");\n\t\trequest.setAttribute(\"StatusCode\",\"300\");\n\t\trequest.setAttribute(\"StatusMessage\",\"NOK\");\n\t\trequest.setAttribute(\"ErrorMessage\",\"Login with proper username and password!\");\n\t\trequest.getRequestDispatcher(\"index.jsp\").forward(request, response); \n\t}\n\telse {\n\t\tSystem.out.println(\"not succefully login\");\n\t\trequest.setAttribute(\"StatusCode\",\"300\");\n\t\trequest.setAttribute(\"StatusMessage\",\"NOK\");\n\t\trequest.setAttribute(\"ErrorMessage\",resp.split(\",\")[1]);\n\t\trequest.getRequestDispatcher(\"index.jsp\").forward(request, response); \n //response.sendRedirect(\"/CardDistributedSystem/index.jsp\"); \n\n\t}\n\t\t\n\n\t}", "public synchronized void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {\r\n\r\n\t\ttry{\r\n\t\t\tsetLanguage(request.getSession(),request);\r\n\t\t\tAdminBO adminBO = (AdminBO)application.getAttribute(\"adminBO\");\r\n\r\n\r\n\t\t\tHttpSession session = request.getSession(true);\r\n\t\t\tString language = (String)session.getAttribute(\"language\");\r\n\r\n\t\t\t//check if the session is New if it's not we will a new session to avoid primary key conflict on the tabel C_USER_SESSIONS\r\n\t\t\tif(!session.isNew()){\r\n\t\t\t\tlogger.info(\"user userName\" + session.getAttribute(\"userName\") + \"is trying to log In using old session : old session Id = \" + session.getId());\r\n\t\t\t\tsession.setAttribute(\"SESSION_INVALIDATED\",\"true\");\r\n\t\t\t\tsession.invalidate();\r\n\t\t\t\tsession = request.getSession(true);\r\n\t\t\t\tif(language != null){\r\n\t\t\t\t\tsession.setAttribute(\"language\", language);\r\n\t\t\t\t}\r\n\t\t\t\tlogger.info(\"invalidating old Session And Creating a New Session : new session Id = \" + session.getId());\r\n\t\t\t}else{\r\n\t\t\t\tlogger.info(\"session is New : session Id =\" + session.getId() + \" for the user: \" + session.getAttribute(\"userName\"));\r\n\t\t\t}\r\n\r\n\t\t\t// removing 'siteAccessTime' parameter that is used only for outside the LOGGED IN area\r\n\t\t\tsession.removeAttribute(\"siteAccessTime\");\r\n\t\t\t\r\n\r\n\t\t\tString userName = StringUtil.nullToEmpty(request.getParameter(\"userName\"));\r\n//\t\t\tString password = StringUtil.nullToEmpty(request.getParameter(\"password\"));\r\n\t\t\tString encryptedPassword = SecurityUtil.byteArrayToHexString(SecurityUtil.getEncryptedString((request.getParameter(\"password\")!= null ? request.getParameter(\"password\").toString()+userName : \"\")));\r\n\r\n\t\t\tboolean isAuthenticated = adminBO.login(userName, encryptedPassword);\r\n\r\n\t\t\tif (isAuthenticated){\r\n\r\n\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyDDMM\");\r\n\t\t\t\tUserBean userBean = adminBO.getUserDetails(0, userName);\r\n\t\t\t\t\r\n\t\t\t\tlogger.info(\"\\nLOGINPAGE userID: \"+userBean.getUserID());\r\n\t\t\t\tlogger.info(\"\\nLOGINPAGE lastAccessTime: \"+userBean.getLastAccessTime());\r\n\t\t\t\tsession.setAttribute(\"userID\", userBean.getUserID());\r\n\t\t\t\tsession.setAttribute(\"userName\", userBean.getUserName());\r\n\t\t\t\tsession.setAttribute(\"userRole\", userBean.getRoleBean().getRoleID());\r\n\t\t\t\tsession.setAttribute(\"sessionAlive\", \"true\");\r\n\t\t\t\tsession.setAttribute(\"lastAccessTime\", userBean.getLastAccessTime());\r\n\t\t\t\t\r\n\t\t\t\tTimestamp loginTime = new Timestamp(new java.util.Date().getTime());\r\n\t\t\t\tString loginTimeStr = sdf.format(loginTime);\r\n\t\t\t\tsession.setAttribute(\"loginTime\", loginTimeStr);\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tadminBO.updateUserSession(Integer.parseInt(userBean.getUserID()), session.getId(), loginTime/*, request.getRemoteHost(), */);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tStringBuffer requestString=new StringBuffer();\r\n\t\t\t\trequestString.append(\"formLastAccess=\"+loginTimeStr);\r\n\t\t\t\tString encryptedString = QueryCrypt.encrypt(request, requestString.toString());\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tActivityLogVO activityLogVO = new ActivityLogVO();\r\n\t\t\t\tactivityLogVO.setActivityDate(new Timestamp(new java.util.Date().getTime()));\r\n\t\t\t\tactivityLogVO.setActivityDesc(\"User Successfully LoggedIn\");\r\n\t\t\t\tactivityLogVO.setActivityTypeID(ActivityType.LOGIN_ACT.value());\r\n\t\t\t\tactivityLogVO.setReference(\"\");\r\n\t\t\t\tactivityLogVO.setSessionID(session.getId());\r\n\t\t\t\tactivityLogVO.setUserID(Integer.parseInt(StringUtil.nullOrEmptyToString(session.getAttribute(\"userID\"), \"0\")));\r\n\t\t\t\tadminBO.logActivity(activityLogVO);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tresponse.sendRedirect(\"Home?\"+encryptedString);\r\n\t\t\t\t\r\n\r\n\t\t\t} else{\r\n\t\t\t\tsession.setAttribute(\"LoginErrorMsg\", \"Invalid Username/Password, please try again\");\r\n\t\t\t\tresponse.sendRedirect(\"Login\");\r\n\r\n\t\t\t}\r\n\t\t}catch (Exception e) {\r\n\t\t\tlogger.error(\"ERROR\", e); \r\n\t\t\tresponse.sendRedirect(\"ErrorHandler\");\r\n\t\t}\r\n\t}", "HttpSession changeSessionIdentifier(HttpServletRequest request) throws AuthenticationException;", "@CallSuper\n public void clearSession() {\n callback = null;\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\tHttpSession httpsession=request.getSession();\n\thttpsession.removeAttribute(\"current-user\");\n\tresponse.sendRedirect(\"index.jsp\");\n\t}", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n request.getSession().setAttribute(\"message\", null);\n this.getServletContext().getRequestDispatcher(Utils.LOGIN).forward(request, response);\n }", "void setSessionId(String sessionId);", "@Override\r\n \t\t\tpublic void cleanInvalidSessions() {\n \t\t\t\t\r\n \t\t\t}", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\t\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\t\n\t}", "public static void getSession (HttpServletRequest request, HttpServletResponse response) throws IOException {\n PrintWriter out = response.getWriter();\n ObjectMapper objM = new ObjectMapper();\n HttpSession session = request.getSession();\n Response<LoginData> res = new Response<>();\n LoginData loginData = new LoginData();\n String r;\n\n if (session.isNew()){\n System.out.println(\"Session not started!\");\n res.setMessage(\"Session not started!\");\n loginData.setAdmin(true);\n res.setStatus(403);\n loginData.setName(\"\");\n res.setData(loginData);\n session.invalidate();\n\n } else {\n System.out.println(\"Session started\");\n res.setMessage(\"Session started\");\n res.setStatus(200);\n loginData.setAdmin(true);\n loginData.setName((String) session.getAttribute(\"name\"));\n res.setData(loginData);\n }\n\n r = objM.writeValueAsString(res);\n System.out.println(r);\n out.print(r);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n RequestDispatcher view = request.getRequestDispatcher(\"/board/boardLogin.jsp\");\n Cookie[] cookies = request.getCookies();\n String userId=null;\n for(int i = 0; i< cookies.length;i++){\n Cookie cookie = cookies[i];\n if(cookie.getName().equals(\"userId\")){\n userId = cookie.getValue();\n break;\n }\n }\n if(request.getServletContext().getAttribute(\"connect\")==null){\n request.getServletContext().setAttribute(\"connect\",new Integer(0));\n }\n\n// int a[]={1,2,3,4,7,8,11,12,16,19,20,22,24,34,40,41};\n//\n// for(int j=0 ; j< a.length;j++){\n// if(Math.random()*10+1>5){\n// System.out.println(a[j]);\n// }\n//\n// }\n\n int connect = (Integer)request.getServletContext().getAttribute(\"connect\");\n\n request.getServletContext().setAttribute(\"connect\",new Integer(connect));\n\n request.setAttribute(\"userId\",userId);\n\n request.setAttribute(\"connect\",new Integer(connect));\n view.forward(request, response);\n\n }", "public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {\n\n response.setContentType( \"text/html\");\n /* set up the intrinsic variables using the pageContext goober:\n ** session = HttpSession\n ** application = ServletContext\n ** out = JspWriter\n ** page = this\n ** config = ServletConfig\n ** all session/app beans declared in globals.jsa\n */\n PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, false, JspWriter.DEFAULT_BUFFER, true);\n // Note: session is false, so no session variable is defined.\n int __jsp_tag_starteval;\n ServletContext application = pageContext.getServletContext();\n JspWriter out = pageContext.getOut();\n _AppsLocalLogin page = this;\n ServletConfig config = pageContext.getServletConfig();\n\n try {\n\n\n out.write(__oracle_jsp_text[0]);\n out.write(__oracle_jsp_text[1]);\n out.write(__oracle_jsp_text[2]);\n out.write(__oracle_jsp_text[3]);\n out.write(__oracle_jsp_text[4]);\n out.write(__oracle_jsp_text[5]);\n out.write(__oracle_jsp_text[6]);\n out.write(__oracle_jsp_text[7]);\n out.write(__oracle_jsp_text[8]);\n out.write(__oracle_jsp_text[9]);\n out.write(__oracle_jsp_text[10]);\n \n Utils.setRequestCharacterEncoding(request);\n String requestUrl = request.getParameter(\"requestUrl\");\n \n WebAppsContext wctx = null;\n boolean alreadySet = false;\n \n Connection conn = null;\n if (Utils.isAppsContextAvailable()) {\n wctx = Utils.getAppsContext();\n alreadySet = true;\n } else {\n wctx = Utils.getAppsContext();\n }\n try {\n String params;\n StringBuffer tmp = new StringBuffer();\n tmp.append(\"requestUrl=\");\n if( requestUrl != null && !requestUrl.equals(\"\"))\n tmp.append(URLEncoder.encode(requestUrl,SessionMgr.getCharSet()));\n \n Enumeration paramNames = request.getParameterNames();\n while (paramNames != null && paramNames.hasMoreElements()) {\n String name = (String) paramNames.nextElement();\n if (!(name.equals(\"requestUrl\")))\n {\n String value = request.getParameter(name);\n tmp.append(\"&\");\n tmp.append(oracle.apps.fnd.util.URLEncoder.encode(name,SessionMgr.getCharSet()));\n tmp.append(\"=\");\n tmp.append(oracle.apps.fnd.util.URLEncoder.encode(value,SessionMgr.getCharSet()));\n }\n } \n \n \n conn = Utils.getConnection();\n boolean getIcxLang = false;\n String langCode = request.getParameter(\"langCode\");\n String sessionLang = null;\n if ( langCode != null)\n {\n // This is from language selection bean\n if (SessionMgr.isInstalledLanguage(langCode))\n {\n sessionLang = langCode;\n Utils.writeToLog(\"sso/html\", \"Language: \"+langCode+\" is installed\", wctx);\n }\n else\n {\n getIcxLang = true;\n Utils.writeToLog(\"sso/html\", \"Language: \"+langCode+\" is not installed in apps\", wctx);\n }\n \n }\n else\n {\n // try getting language from browser\n Utils.writeToLog(\"sso/html\", \"trying to get browser's Language\", wctx);\n \n String browserLanguages = request.getHeader(\"Accept-Language\");\n Utils.writeToLog(\"sso/html\", \"Browser Language:\"+browserLanguages, wctx);\n \n sessionLang = LoginPage.getAppsLangFromBrowser(browserLanguages, wctx);\n getIcxLang = (sessionLang == null || sessionLang.equals(\"\"));\n }\n \n String cval = SessionMgr.getAppsCookie(request); \n String pNlsLanguage = null;\n if(cval!= null && !cval.equals(\"-1\") && !cval.equals(\"\") )\n { \n \n Utils.writeToLog(\"sso/html\", \"Session exists:: \"+cval+\" setting lang :: \"+langCode, wctx); \n LangInfo info = wctx.getLangInfo(sessionLang , null, conn);\n pNlsLanguage = info.getNLSLanguage();\n wctx.validateSession(cval); \n boolean check = wctx.setLanguageContext(pNlsLanguage, null, null, null, null, null, null); \n } else {\n SessionMgr.createGuestSession(request, response, false, sessionLang);\n }\n \n String returnUrl = SSOUtil.getLocalLoginRFUrl(tmp.toString());\n response.sendRedirect(returnUrl );\n } \n catch(Exception e)\n {\n Utils.writeToLog(\"sso/html\", \"Exception occurred\"+e.toString(), wctx); \n throw new Exception(e.toString());\n }\n finally {\n if (alreadySet == false) {\n Utils.releaseAppsContext();\n }\n }\n \n out.write(__oracle_jsp_text[11]);\n\n }\n catch (Throwable e) {\n if (!(e instanceof javax.servlet.jsp.SkipPageException)){\n try {\n if (out != null) out.clear();\n }\n catch (Exception clearException) {\n }\n pageContext.handlePageException(e);\n }\n }\n finally {\n OracleJspRuntime.extraHandlePCFinally(pageContext, true);\n JspFactory.getDefaultFactory().releasePageContext(pageContext);\n }\n\n }", "java.lang.String getSessionID();", "@Override\r\n public PhoenixSession getSession()\r\n {\n return null;\r\n }", "String getSessionID();", "String getSessionID();", "@Override\n\tprotected Session doReadSession(Serializable sessionId) {\n\t\treturn null;\n\t}", "public void setSpid(int param){\n localSpidTracker = true;\n \n this.localSpid=param;\n \n\n }", "@Override\n public SessionCookieConfig getSessionCookieConfig() {\n return null;\n }", "public WebConnector() {\n\t\tsuper.setFieldValues();\n\t\tagentIdToSessionId = new HashMap<>();\n\t\tsessions = new HashMap<>();\n\t\tsecureRandom = new SecureRandom();\n\t\tthis.logger.setLevel(Level.SEVERE);\n\t}", "private void logoutAction(HttpServletRequest req, HttpServletResponse resp) throws IOException {\n\t\tthis.session.removeAttribute(\"MANAGEINSESSION\");\r\n\t\tresp.sendRedirect(path+\"/jsps/index.jsp\");\r\n\t}", "@Override\r\npublic void sessionCreated(HttpSessionEvent arg0) {\n\t\r\n}", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n {\n hubObj = new HubReceivingTables(db);\n out = response.getWriter();\n response.setContentType(\"text/html\");\n HttpSession session = request.getSession();\n\n PersonnelBean personnelBean = (PersonnelBean) session.getAttribute(\"personnelBean\");\n Collection menuItemOvBeanCollection = personnelBean.getMenuItemOvBeanCollection();\n intcmIsApplication = false;\n if (menuItemOvBeanCollection !=null && menuItemOvBeanCollection.size() > 0)\n {\n intcmIsApplication = true;\n }\n\n String branch_plant= session.getAttribute( \"BRANCH_PLANT\" ) == null ? \"\" : session.getAttribute( \"BRANCH_PLANT\" ).toString();\n String personnelid= session.getAttribute( \"PERSONNELID\" ) == null ? \"\" : session.getAttribute( \"PERSONNELID\" ).toString();\n String CompanyID = session.getAttribute( \"COMPANYID\" ) == null ? \"\" : session.getAttribute( \"COMPANYID\" ).toString();\n Receiving_Servlet = bundle.getString(\"HUBRECV_SERVLET_QC\");\n Label_Servlet = bundle.getString(\"LABEL_SERVLET\");\n\n String User_Search = null;\n String User_Action = null;\n String SubUser_Action = null;\n String User_Session = \"\";\n String User_Sort = \"\";\n String generate_labels = \"\";\n String remove_receipt_id = \"\";\n String remove_action = \"\";\n\n generate_labels = request.getParameter(\"generate_labels\");\n if (generate_labels == null)\n generate_labels = \"No\";\n paper_size = request.getParameter(\"paperSize\");\n if (paper_size == null)\n paper_size = \"31\";\n User_Session = request.getParameter(\"session\");\n if (User_Session == null)\n User_Session = \"New\";\n User_Action = request.getParameter(\"UserAction\");\n if (User_Action == null)\n User_Action = \"New\";\n User_Search = request.getParameter(\"SearchField\");\n\t\tif ( User_Search == null )\n\t\t User_Search=\"\";\n\t\tUser_Search=User_Search.trim();\n User_Sort = request.getParameter(\"SortBy\");\n if (User_Sort == null)\n User_Sort = \"1\";\n String SortresultsBy = request.getParameter(\"SortresultsBy\");\n if (SortresultsBy == null)\n SortresultsBy = \"BIN\";\n\n String invengrp=request.getParameter( \"invengrp\" );\n if ( invengrp == null )\n invengrp=\"\";\n invengrp=invengrp.trim();\n\n remove_receipt_id = BothHelpObjs.makeSpaceFromNull(request.getParameter(\"remove_receipt_id\"));\n remove_action = BothHelpObjs.makeSpaceFromNull(request.getParameter(\"removeaction\"));\n\n\t\tthedecidingRandomNumber=request.getParameter( \"thedecidingRandomNumber\" );\n\t\tif ( thedecidingRandomNumber == null )\n\t\t thedecidingRandomNumber=\"\";\n\t\tthedecidingRandomNumber=thedecidingRandomNumber.trim();\n\n\t\tSubUser_Action=request.getParameter( \"SubUserAction\" );\n\t\tif ( SubUser_Action == null )\n\t\t SubUser_Action=\"JSError2\";\n\n\t\tString searchlike=request.getParameter( \"searchlike\" );\n\t\tif ( searchlike == null )\n\t\t{\n\t\t searchlike=\"\";\n\t\t}\n\t\tsearchlike=searchlike.trim();\n\n\t\tString searchfor=request.getParameter( \"searchfor\" );\n\t\tif ( searchfor == null )\n\t\t{\n\t\t searchfor=\"\";\n\t\t}\n\t\tsearchfor=searchfor.trim();\n\t\tif (searchlike.length() == 0 ) {searchlike = \"a.RADIAN_PO\";}\n\n\t\tString printKitLabels=request.getParameter( \"printKitLabels\" );\n\t\tif ( printKitLabels == null )\n\t\t printKitLabels=\"\";\n\n try\n {\n\t\t Random rand=new Random();\n\t\t int tmpReq=rand.nextInt();\n\t\t Integer tmpReqNum=new Integer( tmpReq );\n\n\t Hashtable hub_list_set=new Hashtable();\n\t\t hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_PREF_LIST\" );\n\n\n\t\t if ( ! ( SubUser_Action.equalsIgnoreCase( \"removereceipt\" ) || User_Action.equalsIgnoreCase( \"showterminalstatus\" ) || User_Action.equalsIgnoreCase( \"Unreceive\" ) ) )\n\t\t {\n\t\t\tif ( thedecidingRandomNumber.length() > 0 )\n\t\t\t{\n\t\t\t String randomnumberfromsesion=session.getAttribute( \"RECQCRNDCOOKIE\" ) == null ? \"\" : session.getAttribute( \"RECQCRNDCOOKIE\" ).toString();\n\t\t\t if ( randomnumberfromsesion.equalsIgnoreCase( thedecidingRandomNumber ) )\n\t\t\t {\n\t\t\t\tthedecidingRandomNumber=tmpReqNum.toString();\n\t\t\t\tsession.setAttribute( \"RECQCRNDCOOKIE\",thedecidingRandomNumber );\n\t\t\t }\n\t\t\t else\n\t\t\t {\n\t\t\t\tthedecidingRandomNumber=tmpReqNum.toString();\n\t\t\t\tsession.setAttribute( \"RECQCRNDCOOKIE\",thedecidingRandomNumber );\n\t\t\t\tsession.setAttribute( \"DATA\",new Vector() );\n\t\t\t\t//Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n\t\t\t\tHashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t\tVector lot_status_set= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\t\tVector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t\tVector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\t\tVector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n\t\t\t\tbuildHeader( null,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\tout.println( \"<BR><BR><CENTER><FONT SIZE=\\\"4\\\" FACE=\\\"Arial\\\" COLOR=\\\"#fc0303\\\"><B>Please Do Not Use The Back Button of The Browser</B><BR> Thanks.</FONT>\" );\n\t\t\t\treturn;\n\t\t\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t thedecidingRandomNumber=tmpReqNum.toString();\n\t\t\t session.setAttribute( \"RECQCRNDCOOKIE\",thedecidingRandomNumber );\n\t\t\t}\n\t }\n\n if ( User_Session.equalsIgnoreCase( \"New\" ) )\n {\n Vector lot_status_set11=radian.web.HTMLHelpObj.createStatusSet( db );\n session.setAttribute( \"STATUS_SET\",lot_status_set11 );\n session.setAttribute( \"HUB_COMPANY_IDS\",radian.web.HTMLHelpObj.createCompanylist( db ) );\n\n //Hashtable hub_list_set=new Hashtable();\n\t\t\tVector expdate_invengrps = new Vector();\n\t\t\tVector lotstatus_invengrps = new Vector();\n\t\t\tVector recqc_invengrps = new Vector();\n\t\t\tVector nonpickable_invengrps = new Vector();\n\t\t\t/*if ( this.getupdateStatus() )\n\t\t\t{\n\t\t\t hub_list_set=radian.web.HTMLHelpObj.createHubList( db,personnelid,CompanyID );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t hub_list_set=radian.web.HTMLHelpObj.createAllHubList( db,CompanyID );\n\t\t\t}*/\n\n\t\t Hashtable initialinvData = new Hashtable ();\n\t\t Hashtable hub_list1= ( Hashtable ) ( hub_list_set.get( \"HUB_LIST\" ) );\n\t\t if (hub_list1.size() > 0)\n\t\t {\n\t\t\t initialinvData=radian.web.poHelpObj.getinvgrpInitialData( db,hub_list_set );\n\t\t\t session.setAttribute( \"INVENGRP_DATA\",initialinvData );\n\t\t }\n\n\t\t\texpdate_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"ExpUpdate\");\n\t\t\tlotstatus_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"PickStatusUpd\");\n\t\t\tsession.setAttribute( \"EXP_ALLOWED_INVENGRP\",expdate_invengrps );\n\t\t\tsession.setAttribute( \"STATUS_SET_ALLOWED_INVENGRP\",lotstatus_invengrps );\n\t\t\trecqc_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"ReceivingQC\");\n\t\t\tsession.setAttribute( \"RECQC_ALLOWED_INVENGRP\",recqc_invengrps );\n\t\t\tnonpickable_invengrps = radian.web.HTMLHelpObj.createvgrpmemlist(db,personnelid,\"onlynonPickableStatus\");\n\t\t\tsession.setAttribute( \"NON_PICKABLE_INVENGRP\",nonpickable_invengrps );\n\n if ( hub_list1.size() < 1 )\n {\n buildHeader( null,hub_list_set,\"\",User_Sort,\"\",SortresultsBy,initialinvData,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printHTMLNoFacilities() );\n out.close();\n hub_list_set=null;\n }\n else\n {\n //session.setAttribute( \"HUB_SET\",hub_list_set );\n buildHeader( null,hub_list_set,\"\",User_Sort,\"\",SortresultsBy,initialinvData,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printHTMLSelect() );\n out.close();\n hub_list_set=null;\n }\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"showterminalstatus\" ) ) )\n {\n Vector temp2= ( Vector ) session.getAttribute( \"HUB_COMPANY_IDS\" );\n\n String terminallotstatus =request.getParameter( \"termlotstatus\" );\n if ( terminallotstatus == null )\n terminallotstatus=\"\";\n\n String terlinenumber=request.getParameter( \"terlinenumber\" );\n if ( terlinenumber == null )\n terlinenumber=\"31\";\n\n buildtermiallot(temp2,terminallotstatus,terlinenumber);\n out.close();\n temp2 = null;\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"Unreceive\" ) ) )\n {\n previousReceiving obj3=new previousReceiving( bundle,db );\n //StringBuffer MsgUn=new StringBuffer();\n\n if ( remove_receipt_id.length() > 0 )\n {\n out.println( \"<HTML><HEAD>\\n\" );\n out.println( \"<META HTTP-EQUIV=\\\"Content-Type\\\" CONTENT=\\\"text/html; charset=iso-8859-1\\\">\\n\" );\n out.println( \"<META HTTP-EQUIV=\\\"Pragma\\\" CONTENT=\\\"no-cache\\\">\\n\" );\n out.println( \"<META HTTP-EQUIV=\\\"Expires\\\" CONTENT=\\\"-1\\\">\\n\" );\n out.println( \"<title>Hub Receiving QC</title>\\n\" );\n out.println( \"<LINK REL=\\\"stylesheet\\\" TYPE=\\\"text/css\\\" HREF=\\\"/stylesheets/global.css\\\"></LINK>\\n\" );\n out.println( \"<SCRIPT LANGUAGE=\\\"JavaScript\\\" TYPE=\\\"text/javascript\\\">\\n\" );\n out.println( \"<!-- \\n\" );\n out.println( \"function Unreceive()\\n\" );\n out.println( \"{\\n\" );\n out.println( \"opener.document.receiving.UserAction.value = \\\"UPDATE\\\";\\n\" );\n out.println( \"opener.document.receiving.SubUserAction.value = \\\"removereceipt\\\" ;\\n\" );\n out.println( \"opener.document.receiving.remove_receipt_id.value = \\\"\"+remove_receipt_id+\"\\\";\\n\" );\n out.println( \"opener.document.receiving.submit();\" );\n out.println( \"window.close();\\n\" );\n out.println( \"}\\n\" );\n out.println( \"function Search()\\n\" );\n out.println( \"{\\n\" );\n out.println( \" opener.document.receiving.UserAction.value = \\\"NEW\\\";\\n\" );\n out.println( \" opener.document.receiving.SubUserAction.value = \\\"NA\\\";\\n\" );\n out.println( \" opener.document.receiving.DuplLineNumber.value = \\\"NA\\\" ;\\n\" );\n out.println( \" opener.document.receiving.AddBin_Item_Id.value = \\\"NA\\\" ;\\n\" );\n out.println( \" opener.document.receiving.AddBin_Bin_Id.value = \\\"NA\\\" ;\\n\" );\n out.println( \" opener.document.receiving.submit();\\n\" );\n out.println( \"window.close();\\n\" );\n out.println( \"}\\n\" );\n out.println( \"function cancel()\\n\" );\n out.println( \"{\\n\" );\n out.println( \"window.close();\\n\" );\n out.println( \"}\\n\" );\n out.println( \"//--> \\n\" );\n out.println( \"</SCRIPT></HEAD><BODY> \\n\" );\n\n if ( !remove_action.equalsIgnoreCase( \"Yes\" ) )\n {\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" ACTION=\\\"\" + Receiving_Servlet +\n \"&UserAction=Unreceive&removeaction=Yes&SubUserAction=Unreceive&remove_receipt_id=\" + remove_receipt_id + \"\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">Do you want to reverse Receipt Id: <B>\" + remove_receipt_id + \"</B><BR>\\n\" );\n out.println( \"</FONT><BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Yes\\\" NAME=\\\"SubmitButton\\\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\\n\" );\n out.println( \"<INPUT TYPE=\\\"reset\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Cancel\\\" OnClick=\\\"cancel()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n else\n {\n if ( obj3.unreceiveReceipt( remove_receipt_id ) )\n {\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" action=\\\"javascript:cancelUnreceive()\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">Success.<BR>\\n\" );\n out.println( \"Receipt Id: <B>\" + remove_receipt_id + \"</B> reversed Successfully.\\n\" );\n out.println( \"<BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Ok\\\" OnClick=\\\"Unreceive()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n else\n {\n radian.web.emailHelpObj.senddeveloperemail(\"Receiving QC -receipt reverse error\",\"Error occured while deleting receipt Id \" + remove_receipt_id + \"\" );\n\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" action=\\\"javascript:cancelSearch()\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"3\\\" FACE=\\\"Arial\\\"><B>Error occured.</B><BR></FONT><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">\\n\" );\n out.println( \"Receipt Id: <B>\" + remove_receipt_id + \" not reversed.</B><BR>Contact tech support for more information.</FONT><BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Close\\\" OnClick=\\\"cancel()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n }\n }\n else\n {\n out.println( \"<FORM METHOD=\\\"POST\\\" name=\\\"MfgidLike\\\" action=\\\"javascript:cancel()\\\">\\n\" );\n out.println( \"<BR><FONT SIZE=\\\"2\\\" FACE=\\\"Arial\\\">Error.<BR>\\n\" );\n out.println( \"Receipt Not reversed. \\\\n Contact tech support for more information.<BR><BR>\\n\" );\n out.println( \"<CENTER><INPUT TYPE=\\\"submit\\\" CLASS=\\\"SUBMITDET\\\" onmouseover=\\\"className='SUBMITHOVERDET'\\\" onMouseout=\\\"className='SUBMITDET'\\\" VALUE=\\\"Close\\\" OnClick=\\\"cancel()\\\" NAME=\\\"CloseButton\\\"></CENTER>\\n\" );\n out.println( \"</FORM>\\n\" );\n out.println( \"</BODY></HTML>\\n\" );\n //out.println( MsgUn );\n out.close();\n }\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"New\" ) ) )\n {\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n Vector lot_status_set= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\tVector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\tVector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\tVector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n Vector openorder_data=hubObj.getAllopenreceiptQC( branch_plant,User_Sort,SortresultsBy,invengrp,User_Search,searchlike,searchfor );\n\n Hashtable sum= ( Hashtable ) ( openorder_data.elementAt( 0 ) );\n int count= ( ( Integer ) sum.get( \"TOTAL_NUMBER\" ) ).intValue();\n\n if ( 0 == count )\n {\n buildHeader( null,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printHTMLNoData( \"No Items Found\" ) );\n out.close();\n //clean up\n openorder_data=null;\n hub_list_set=null;\n }\n else\n {\n session.setAttribute( \"DATA\",openorder_data );\n buildHeader( openorder_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n buildDetails( openorder_data,User_Sort,branch_plant,lot_status_set,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n //clean up\n openorder_data=null;\n hub_list_set=null;\n } //when there are open orders for hub\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"Update\" ) ) )\n {\n Vector retrn_data= ( Vector ) session.getAttribute( \"DATA\" );\n Vector synch_data=new Vector();\n\n SubUser_Action=request.getParameter( \"SubUserAction\" );\n if ( SubUser_Action == null )\n SubUser_Action=\"JSError2\";\n\n\t\t\tVector all_status_set_e= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\n if ( \"1\".equalsIgnoreCase( User_Sort ) )\n {\n synch_data=SynchServerData( request,retrn_data,all_status_set_e,recqc_invengrps );\n }\n else\n {\n synch_data=SynchServerNonChemData( request,retrn_data );\n }\n\n retrn_data=null;\n\n if ( SubUser_Action.equalsIgnoreCase( \"JSError2\" ) )\n {\n Hashtable all_bin_set_e= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t Vector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t Vector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t Vector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n session.setAttribute( \"DATA\",synch_data );\n buildHeader( synch_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printJavaScriptError() );\n buildDetails( synch_data,User_Sort,branch_plant,all_status_set_e,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n //clean up\n synch_data=null;\n all_bin_set_e=null;\n }\n else if ( SubUser_Action.equalsIgnoreCase( \"removereceipt\" ) )\n {\n Vector new_data=removereceipt( remove_receipt_id,synch_data );\n session.setAttribute( \"DATA\",new_data );\n\n Hashtable all_bin_set_d= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t Vector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t Vector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t //Vector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\t Vector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n buildHeader( new_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n buildDetails( new_data,User_Sort,branch_plant,all_status_set_e,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n\n out.close();\n //clean up\n synch_data=null;\n new_data=null;\n all_bin_set_d=null;\n all_status_set_e=null;\n }\n else if ( SubUser_Action.equalsIgnoreCase( \"UpdPage\" ) || SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || SubUser_Action.equalsIgnoreCase( \"generatelargelabels\" ) )\n {\n Hashtable temp1= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n Vector temp2= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n\t\t\t Vector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\t Vector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\t //Vector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n\t\t\t Vector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n session.setAttribute( \"DATA\",synch_data );\n Hashtable updateresults=UpdateDetails( synch_data,branch_plant,personnelid,User_Sort,CompanyID,SubUser_Action,recqc_invengrps );\n\n Boolean resultfromup= ( Boolean ) updateresults.get( \"RESULT\" );\n Vector errordata= ( Vector ) updateresults.get( \"ERRORDATA\" );\n Vector errMsgs=hubObj.getErrMsgs();\n\n session.setAttribute( \"DATA\",errordata );\n\t\t\t if (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t {\n\t\t\t\tsession.setAttribute( \"LARGE_LABEL_DATA\",errordata );\n \t\t }\n boolean result=resultfromup.booleanValue();\n session.setAttribute( \"LABEL_SEQUENCE_NUMBERS\",receiptIdstoLabel );\n session.setAttribute( \"LABEL_QUANTITYS\",numbersoflabels );\n\n if ( false == result )\n {\n if ( \"1\".equalsIgnoreCase( User_Sort ) && receiptIdstoLabel.size() > 0 && (SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || \"generatelargelabels\".equalsIgnoreCase(SubUser_Action) ) )\n {\n\t\t\t\t if (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t\t {\n\t\t\t\t\tbuildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LARGE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t }\n else\n\t\t\t\t {\n\t\t\t\t\tbuildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t }\n }\n else\n {\n buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n }\n\n if ( true == noneToUpd )\n {\n out.println( radian.web.HTMLHelpObj.printMessageinTable( \"No Item was Choosen for Receiving QC\" ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n }\n else\n {\n //out.println( radian.web.HTMLHelpObj.printMessageinTable( \"An Error Occurred.<BR>Please Check Data and try Again.\" ) );\n\t\t\t\t out.println( radian.web.HTMLHelpObj.printHTMLPartialSuccess( errMsgs ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n }\n\n out.close();\n }\n else\n {\n //contains a list of a list of lot seq that were added to receiving table\n Vector vList=hubObj.getLotSeqList();\n session.setAttribute( \"LABEL_SEQUENCE_NUMBERS\",vList );\n\n if ( true == completeSuccess )\n {\n if ( \"1\".equalsIgnoreCase( User_Sort ) && (SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || \"generatelargelabels\".equalsIgnoreCase(SubUser_Action) ))\n {\n\t\t\t\t\tif (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LARGE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t\t}\n\t\t\t\t }\n else\n {\n buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n }\n out.println( radian.web.HTMLHelpObj.printMessageinTable( \"All Your Selections Were Successfully Updated\" ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n }\n else\n {\n if ( \"1\".equalsIgnoreCase( User_Sort ) && (SubUser_Action.equalsIgnoreCase( \"generatelabels\" ) || \"generatelargelabels\".equalsIgnoreCase(SubUser_Action)) )\n {\n\t\t\t\t\tif (\"generatelargelabels\".equalsIgnoreCase(SubUser_Action))\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LARGE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"GENERATE_LABELS\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels);\n\t\t\t\t\t}\n\t\t\t\t }\n else\n {\n buildHeader( errordata,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n }\n out.println( radian.web.HTMLHelpObj.printHTMLPartialSuccess( errMsgs ) );\n buildDetails( errordata,User_Sort,branch_plant,temp2,SubUser_Action,lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps );\n out.close();\n }\n }\n //clean up\n synch_data=null;\n temp1=null;\n temp2=null;\n //\n }\n else\n {\n out.println( radian.web.HTMLHelpObj.printError( \"tcmIS Hub Receiving\",intcmIsApplication ) );\n }\n\n }\n else if ( ( User_Session.equalsIgnoreCase( \"Active\" ) ) && ( User_Action.equalsIgnoreCase( \"JSError1\" ) ) )\n {\n Vector retrn_data= ( Vector ) session.getAttribute( \"DATA\" );\n\t\t\tVector all_status_set_e= ( Vector ) session.getAttribute( \"STATUS_SET\" );\n\t\t\tVector recqc_invengrps= ( Vector ) session.getAttribute( \"RECQC_ALLOWED_INVENGRP\" );\n Vector synch_data=SynchServerData( request,retrn_data,all_status_set_e,recqc_invengrps );\n Hashtable iniinvendata= ( Hashtable ) session.getAttribute( \"INVENGRP_DATA\" );\n retrn_data=null;\n\n Hashtable all_bin_set_e= ( Hashtable ) session.getAttribute( \"BIN_SET\" );\n\n //Hashtable hub_list_set= ( Hashtable ) session.getAttribute( \"HUB_SET\" );\n\t\t\tVector expdate_invengrps= ( Vector ) session.getAttribute( \"EXP_ALLOWED_INVENGRP\" );\n\t\t\tVector lotstatus_invengrps= ( Vector ) session.getAttribute( \"STATUS_SET_ALLOWED_INVENGRP\" );\n\t\t\tVector nonpickable_invengrps= ( Vector ) session.getAttribute( \"NON_PICKABLE_INVENGRP\" );\n\n session.setAttribute( \"DATA\",synch_data );\n buildHeader( synch_data,hub_list_set,branch_plant,User_Sort,\"\",SortresultsBy,iniinvendata,invengrp,User_Search,searchlike,searchfor,session,printKitLabels );\n out.println( radian.web.HTMLHelpObj.printJavaScriptError() );\n buildDetails( synch_data,User_Sort,branch_plant,all_status_set_e,\"\",lotstatus_invengrps,recqc_invengrps,nonpickable_invengrps);\n out.close();\n //clean up\n synch_data=null;\n all_bin_set_e=null;\n all_status_set_e=null;\n\n }\n else\n {\n out.println( radian.web.HTMLHelpObj.printError( \"tcmIS Hub Receiving\",intcmIsApplication ) );\n }\n }\n catch ( Exception e )\n {\n e.printStackTrace();\n out.println( radian.web.HTMLHelpObj.printError( \"tcmIS Hub Receiving QC\",intcmIsApplication ) );\n }\n //clean up\n hubObj=null;\n\n return;\n }", "public void invalidateSessionobjects(){\n\n\t}", "@Before\n public void getTestSession() {\n if (sessionId == null) {\n sessionId = Util.getSessionID();\n }\n }", "public Builder clearSessionId() {\n \n sessionId_ = 0;\n onChanged();\n return this;\n }", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tif(req.getSession().getAttribute(\"Users\")!=null){\r\n\t\t\treq.getSession().removeAttribute(\"Users\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tresp.sendRedirect(PathUtil.getBasePath(req,\"index.jsp\"));\r\n\t\r\n\t}", "@Override\r\npublic void sessionDestroyed(HttpSessionEvent arg0) {\n\t\r\n}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=ISO-8859-1\");\n\n HttpSession sesion = request.getSession(true);\n String rut = request.getParameter(\"txtRut\");\n String opcion = request.getParameter(\"opcion\");\n String cel = request.getParameter(\"txtCel\");\n String idSeccion = \"\", mensaje = \"\";\n int x = -1;\n Alumno alumno = new Alumno();\n String idAlumno=\"\";\n\n if (opcion.equals(\"Buscar\")) {\n if (rut.length() > 0) {\n Alumno alum = (new AlumnoDAO()).buscarDatos(rut);\n if (alum != null) {\n sesion.setAttribute(\"idAlumno\", null);\n sesion.setAttribute(\"rut\", rut);\n response.sendRedirect(\"secretaria.jsp\");\n } else { \n sesion.setAttribute(\"idAlumno\", null);\n sesion.setAttribute(\"rut\", null);\n response.sendRedirect(\"secretaria.jsp?mensaje=Alumno no encontrado\");\n }\n } else { \n sesion.setAttribute(\"idAlumno\", null);\n sesion.setAttribute(\"rut\", null);\n response.sendRedirect(\"secretaria.jsp?mensaje=Alumno no encontrado\");\n }\n }\n if (opcion.equals(\"Nuevo\")) {\n sesion.setAttribute(\"rut\", null);\n sesion.setAttribute(\"idAlumno\", null);\n response.sendRedirect(\"secretaria.jsp\");\n }\n if (opcion.charAt(0) == 'C') { //Actualizo\n idAlumno = opcion.substring(1); //id para actualizar\n sesion.setAttribute(\"idAlumno\", idAlumno);\n response.sendRedirect(\"secretaria.jsp\");\n }\n if (opcion.charAt(0) == 's') {\n idSeccion = opcion.substring(1);\n sesion.setAttribute(\"idSeccion\", idSeccion);\n response.sendRedirect(\"justificarSecretaria.jsp\");\n } \n if (opcion.charAt(0) == 'x') { //Actualizo\n idSeccion = opcion.substring(1); //id para actualizar\n if (cel.length() > 0) {\n alumno = (new AlumnoDAO()).buscarDatosId(Integer.parseInt(idSeccion));\n alumno.setCelular(cel);\n x = (new AlumnoDAO()).actualizar(alumno);\n mensaje = \"Telefono actualizado\";\n } else {\n mensaje = \"Ingrese telefono\";\n }\n response.sendRedirect(\"secretaria.jsp?mensaje=\" + mensaje);\n }\n \n if (opcion.charAt(0) == 'y') { //Agrego numero\n idSeccion = opcion.substring(1); //id del alumno para guardar\n if (cel.length() > 0) {\n mensaje = \"Telefono agregado\";\n alumno = (new AlumnoDAO()).buscarDatosId(Integer.parseInt(idSeccion));\n alumno.setCelular(cel);\n x = (new AlumnoDAO()).actualizar(alumno);\n } else {\n mensaje = \"Ingrese telefono\";\n }\n response.sendRedirect(\"secretaria.jsp?mensaje=\" + mensaje);\n }\n\n }", "public void setSessionId(int value) {\n this.sessionId = value;\n }", "@Override\n\tprotected String onInit(HttpServletRequest req, HttpServletResponse resp, FunctionItem fi,\n\t\t\tHashtable<String, String> params, String action, L l, S s) throws Exception {\n\t\treturn null;\n\t}", "private static String getSessionIDFromRequest (HTTPRequest aRequest)\n\t{\n\t\treturn aRequest.getQueryValue (\"sessionID\");\n\t}", "public void setjSessionId(String header){\r\n\t\tString J_SESSION_ID = \"\";\r\n\t\tString[] param = header.split(\",\");\t \r\n for(String s : param){\t \t \t \r\n \t if(s.contains(\"JSESSIONID\")){\t \t\t\r\n \t\tString[] p = s.split(\";\");\r\n \t\tJ_SESSION_ID = p[0];\t \t\t\r\n \t\tbreak;\r\n \t }\r\n }\r\n this.jSessionId = J_SESSION_ID.split(\"=\")[1]; \r\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n PrintWriter out = response.getWriter(); \n EmpresaServicios es =new EmpresaServicios();\n SucursalServicios su = new SucursalServicios();\n AsignacionCarteraServicios ac= new AsignacionCarteraServicios();\n ConsultaxCarteraServicios cd = new ConsultaxCarteraServicios();\n CampaniasServicios camp = new CampaniasServicios();\n String accion;\n accion= request.getParameter(\"accion\");\n String id_empresas,id_empleados,id_sucursal; \n HttpSession sesion = request.getSession(true);\n id_empresas = sesion.getAttribute(\"Sstrempresa\").toString();\n int EmpresaID= Integer.parseInt(id_empresas);\n id_empleados = sesion.getAttribute(\"Sstrempleado\").toString();\n int EmpleadoID= Integer.parseInt(id_empleados);\n id_sucursal = sesion.getAttribute(\"Sstrsucursal\").toString();\n int SucursalID= Integer.parseInt(id_sucursal);\n String SSqlDatosDeudor=\"\";\n \n if(accion.equals(\"listar\"))\n { \n request.getRequestDispatcher(\"sistema/campanias/CrearCampania.jsp\").forward(request, response);\n\n \n } \n if(accion.equals(\"consultar\"))\n { \n String Campanias=\"\";\n if(camp.getCampanias(EmpresaID, SucursalID)==null){\n Campanias = \"{\\\"data\\\":[]}\";\n } else{\n Campanias = \"{\\\"data\\\": \"+camp.getCampanias(EmpresaID, SucursalID)+\"}\";\n }\n \n response.getWriter().println(Campanias);\n \n } \n if(accion.equals(\"eliminar\")){\n int id_campania=0;\n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"El id_campania esta vacia\");\n } \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n \n if(camp.eliminarCampania(id_campania)){\n response.getWriter().println(\"La campania fue eliminada exitosamente\");\n }else{\n response.getWriter().println(\"Problemas al eliminar la campaña, favor comuniquese con Dpto. Sistemas.\");\n }\n \n \n \n \n }\n if(accion.equals(\"nueva_campania\")){\n int id_campania=0;\n //descripcion\":descripcion, \"fecha_desde\":fecha_desde, \"fecha_hasta\n String descripcion=\"\",fecha_desde=\"\",fecha_hasta=\"\";\n \n \n if(request.getParameter(\"descripcion\").isEmpty()){\n response.getWriter().println(\"Debe Ingresar la Descripción\");\n } \n if(request.getParameter(\"fecha_desde\").isEmpty()){\n response.getWriter().println(\"Debe Ingresar la fecha de inicio de la Campaña\");\n } \n if(request.getParameter(\"fecha_hasta\").isEmpty()){\n response.getWriter().println(\"Debe Ingresar la fecha de fin de la Campaña\");\n } \n descripcion=request.getParameter(\"descripcion\");\n fecha_desde=request.getParameter(\"fecha_desde\");\n fecha_hasta=request.getParameter(\"fecha_hasta\");\n \n id_campania =camp.AddCampania(descripcion, fecha_desde, fecha_hasta, EmpresaID, SucursalID);\n \n \n if(id_campania!=0){\n response.getWriter().println(\"La campania fue eliminada exitosamente\");\n }else{\n response.getWriter().println(\"Problemas al crear la campaña, favor comuniquese con Dpto. Sistemas.\");\n }\n \n \n \n \n }\n \n if(accion.equals(\"consulta_det_campania\")){\n int id_campania=0;\n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n \n String Campanias=\"\";\n Campanias=camp.getDetCampanias(id_campania);\n \n if(Campanias==null){\n Campanias = \"{\\\"data\\\":[]}\";\n } else{\n Campanias = \"{\\\"data\\\": \"+Campanias+\"}\";\n }\n \n response.getWriter().println(Campanias);\n \n \n \n }\n \n \n if(accion.equals(\"eliminar_det_campania\")){\n int id_det_campania=0;\n if(request.getParameter(\"id_det_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID del registro para eliminar\");\n } \n id_det_campania=Integer.parseInt(request.getParameter(\"id_det_campania\")); \n \n if(camp.eliminarDetCampania(id_det_campania)){\n response.getWriter().println(\"El registro fue eliminadio exitosamente\");\n }else{\n response.getWriter().println(\"Problemas al eliminar el registro, favor comuniquese con Dpto. Sistemas.\");\n }\n \n \n \n \n } \n \n if(accion.equals(\"agregar_detalle_campania\")){\n int id_campania=0;\n String sqlQuery=\"\";\n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID del registro para eliminar\");\n } \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n \n sqlQuery=request.getParameter(\"sqlQuery\");\n sqlQuery=sqlQuery.replaceAll(\" IDCAMPANIA\", Integer.toString(id_campania));\n sqlQuery=sqlQuery.replaceAll(\"'\",\"''\");\n \n \n if(camp.CreaDetCampania(sqlQuery, id_campania)==1){\n response.getWriter().println(\"Los registros fueron agregados exitosamente\");\n }else{\n response.getWriter().println(\"Problemas al registrar la campaña, favor comuniquese con Dpto. Sistemas.\");\n\n }\n \n \n \n \n }\n if(accion.equals(\"ConsultaAllEmpleados\")){\n String NuevosDatos=\"\";\n \n //try {\n \n NuevosDatos = \"{\\\"data\\\": \"+ac.getEmpledosAsginadosAll(EmpleadoID,SucursalID)+\"}\";\n \n //} catch (SQLException ex) {\n // Logger.getLogger(ConsultaxCartera.class.getName()).log(Level.SEVERE, null, ex);\n\n //}\n response.getWriter().println(NuevosDatos);\n \n }\n \n \n if(accion.equals(\"agregar_empleado_campania\")){\n int id_campania=0, id_empleado=0,resultado=0;\n String nombres=\"\";\n \n \n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID campaña\");\n } \n if(request.getParameter(\"id_empleado\").isEmpty()){\n response.getWriter().println(\"Debe ingresar un empleado existente\");\n } \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n id_empleado=Integer.parseInt(request.getParameter(\"id_empleado\")); \n nombres=request.getParameter(\"nombres\"); \n resultado=camp.AgregarEmpleadoCampania(id_campania, id_empleado, nombres);\n if(resultado==1){\n response.getWriter().println(\"Empleado Agregado exitosamente\");\n }\n \n if(resultado==2){\n response.getWriter().println(\"El empleado ya esta agregado para esta campaña\");\n }\n if(resultado!=2 && resultado!=1 ){\n response.getWriter().println(\"Problemas al registrar el empleado en esta campaña, favor comuniquese con Dpto. Sistemas.\");\n }\n \n }\n if(accion.equals(\"all_empleado_campania\")){\n int id_campania=0, id_empleado=0,resultado=0;\n \n \n \n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID campaña\");\n } \n \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n \n String empleadoCampanias=\"\";\n empleadoCampanias=camp.AllEmpleadoCampania(id_campania);\n \n if(empleadoCampanias==null){\n empleadoCampanias = \"{\\\"data\\\":[]}\";\n } else{\n empleadoCampanias = \"{\\\"data\\\": \"+empleadoCampanias+\"}\";\n }\n \n response.getWriter().println(empleadoCampanias);\n \n }\n if(accion.equals(\"eliminar_empleado_campania\")){\n int id_empleado_campania=0;\n if(request.getParameter(\"id_empleado_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID del registro para eliminar\");\n } \n id_empleado_campania=Integer.parseInt(request.getParameter(\"id_empleado_campania\")); \n \n if(camp.eliminaEmpleadoCampania(id_empleado_campania)){\n response.getWriter().println(\"El registro fue eliminadio exitosamente\");\n }else{\n response.getWriter().println(\"Problemas al eliminar el registro, favor comuniquese con Dpto. Sistemas.\");\n }\n \n \n \n \n } \n //procesar_asignación\n if(accion.equals(\"procesar_asignación\")){\n int id_campania=0;\n String query=\"\", resultado=\"\";\n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID del registro para eliminar\");\n } \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n query=request.getParameter(\"query\");\n query=query.replaceAll(\"'\",\"''\");\n resultado=camp.Procesar_Asignación(id_campania,query);\n if(resultado.equals(\"Proceso Exitoso\")){\n response.getWriter().println(\"Procesado exitosamente\");\n }else{\n response.getWriter().println(\"Problemas al procesar, favor comuniquese con Dpto. Sistemas.\");\n }\n \n \n \n \n }\n \n if(accion.equals(\"all_empleado_asig_campania\")){\n int id_campania=0, id_empleado=0,resultado=0;\n \n \n \n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID campaña\");\n } \n \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n \n String empleadoCampanias=\"\";\n empleadoCampanias=camp.AllEmpleadoAsigCampania(id_campania);\n \n if(empleadoCampanias==null){\n empleadoCampanias = \"{\\\"data\\\":[]}\";\n } else{\n empleadoCampanias = \"{\\\"data\\\": \"+empleadoCampanias+\"}\";\n }\n \n response.getWriter().println(empleadoCampanias);\n \n }\n \n if(accion.equals(\"ConsultaDatosCampania\")){\n int id_campania=0, id_empleado=0;\n \n \n \n \n if(request.getParameter(\"id_campania\").isEmpty()){\n response.getWriter().println(\"No existe ID campaña\");\n } \n \n id_campania=Integer.parseInt(request.getParameter(\"id_campania\")); \n \n String datos=\"\";\n datos=camp.DatosCampania(id_campania);\n \n if(datos==null){\n datos = \"{\\\"data\\\":[]}\";\n } \n \n response.getWriter().println(datos);\n \n }\n }", "public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {\n\n response.setContentType( \"text/html;charset=utf-8\");\n /* set up the intrinsic variables using the pageContext goober:\n ** session = HttpSession\n ** application = ServletContext\n ** out = JspWriter\n ** page = this\n ** config = ServletConfig\n ** all session/app beans declared in globals.jsa\n */\n PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, \"/errors.jsp\", true, JspWriter.DEFAULT_BUFFER, true);\n // Note: this is not emitted if the session directive == false\n HttpSession session = pageContext.getSession();\n int __jsp_tag_starteval;\n ServletContext application = pageContext.getServletContext();\n JspWriter out = pageContext.getOut();\n _DeleteException page = this;\n ServletConfig config = pageContext.getServletConfig();\n javax.servlet.jsp.el.VariableResolver __ojsp_varRes = (VariableResolver)new OracleVariableResolverImpl(pageContext);\n\n try {\n\n\n out.write(__oracle_jsp_text[0]);\n out.write(__oracle_jsp_text[1]);\n out.write(__oracle_jsp_text[2]);\n {\n org.apache.taglibs.standard.tag.rt.core.SetTag __jsp_taghandler_1=(org.apache.taglibs.standard.tag.rt.core.SetTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.SetTag.class,\"org.apache.taglibs.standard.tag.rt.core.SetTag var value scope\");\n __jsp_taghandler_1.setParent(null);\n __jsp_taghandler_1.setVar(\"unit_id\");\n __jsp_taghandler_1.setValue((java.lang.Object)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${param.unit}\",java.lang.Object.class, __ojsp_varRes,null));\n __jsp_taghandler_1.setScope(\"page\");\n __jsp_tag_starteval=__jsp_taghandler_1.doStartTag();\n if (__jsp_taghandler_1.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_1,1);\n }\n out.write(__oracle_jsp_text[3]);\n {\n org.apache.taglibs.standard.tag.rt.core.SetTag __jsp_taghandler_2=(org.apache.taglibs.standard.tag.rt.core.SetTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.SetTag.class,\"org.apache.taglibs.standard.tag.rt.core.SetTag var value scope\");\n __jsp_taghandler_2.setParent(null);\n __jsp_taghandler_2.setVar(\"period_id\");\n __jsp_taghandler_2.setValue((java.lang.Object)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${param.period}\",java.lang.Object.class, __ojsp_varRes,null));\n __jsp_taghandler_2.setScope(\"page\");\n __jsp_tag_starteval=__jsp_taghandler_2.doStartTag();\n if (__jsp_taghandler_2.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_2,1);\n }\n out.write(__oracle_jsp_text[4]);\n edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean exceptions;\n synchronized (pageContext) {\n if ((exceptions = (edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean) pageContext.getAttribute( \"exceptions\", PageContext.PAGE_SCOPE)) == null) {\n exceptions = (edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean) new edu.ucla.library.libservices.scheduler.beans.webbeans.ScheduleWebBean();\n pageContext.setAttribute( \"exceptions\", exceptions, PageContext.PAGE_SCOPE);\n out.write(__oracle_jsp_text[5]);\n exceptions.setUnitID(OracleJspRuntime.toInt( (java.lang.Integer)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${unit_id}\",java.lang.Integer.class, __ojsp_varRes,null)));\n out.write(__oracle_jsp_text[6]);\n exceptions.setPeriodID(OracleJspRuntime.toInt( (java.lang.Integer)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${period_id}\",java.lang.Integer.class, __ojsp_varRes,null)));\n out.write(__oracle_jsp_text[7]);\n exceptions.setSourceName((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${initParam['db.source']}\",java.lang.String.class, __ojsp_varRes,null));\n out.write(__oracle_jsp_text[8]);\n }\n }\n out.write(__oracle_jsp_text[9]);\n {\n org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_3=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,\"org.apache.taglibs.standard.tag.rt.core.ImportTag url\");\n __jsp_taghandler_3.setParent(null);\n __jsp_taghandler_3.setUrl(\"header.jsp\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_3.doStartTag();\n if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval))\n {\n try {\n out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_3,__jsp_tag_starteval,out);\n do {\n out.write(__oracle_jsp_text[10]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_4=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_4.setParent(__jsp_taghandler_3);\n __jsp_taghandler_4.setName(\"unit\");\n __jsp_taghandler_4.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${param.unit}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_4.doStartTag();\n if (__jsp_taghandler_4.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_4,2);\n }\n out.write(__oracle_jsp_text[11]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_5=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_5.setParent(__jsp_taghandler_3);\n __jsp_taghandler_5.setName(\"period\");\n __jsp_taghandler_5.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${param.period}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_5.doStartTag();\n if (__jsp_taghandler_5.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_5,2);\n }\n out.write(__oracle_jsp_text[12]);\n } while (__jsp_taghandler_3.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n finally {\n out=OracleJspRuntime.popBodyIfNeeded(pageContext,out);\n }\n }\n if (__jsp_taghandler_3.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_3.doCatch(th);\n } finally {\n __jsp_taghandler_3.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_3,1);\n }\n out.write(__oracle_jsp_text[13]);\n {\n org.apache.taglibs.standard.tag.rt.core.ForEachTag __jsp_taghandler_6=(org.apache.taglibs.standard.tag.rt.core.ForEachTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ForEachTag.class,\"org.apache.taglibs.standard.tag.rt.core.ForEachTag items var\");\n __jsp_taghandler_6.setParent(null);\n __jsp_taghandler_6.setItems((java.lang.Object)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${exceptions.exceptionsInPeriod}\",java.lang.Object.class, __ojsp_varRes,null));\n __jsp_taghandler_6.setVar(\"theException\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_6.doStartTag();\n if (OracleJspRuntime.checkStartTagEval(__jsp_tag_starteval))\n {\n do {\n out.write(__oracle_jsp_text[14]);\n {\n org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_7=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,\"org.apache.taglibs.standard.tag.rt.core.ImportTag url\");\n __jsp_taghandler_7.setParent(__jsp_taghandler_6);\n __jsp_taghandler_7.setUrl(\"except_title.jsp\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_7.doStartTag();\n if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval))\n {\n try {\n out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_7,__jsp_tag_starteval,out);\n do {\n out.write(__oracle_jsp_text[15]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_8=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_8.setParent(__jsp_taghandler_7);\n __jsp_taghandler_8.setName(\"has_special_range\");\n __jsp_taghandler_8.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.has_special_range}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_8.doStartTag();\n if (__jsp_taghandler_8.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_8,3);\n }\n out.write(__oracle_jsp_text[16]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_9=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_9.setParent(__jsp_taghandler_7);\n __jsp_taghandler_9.setName(\"period_id\");\n __jsp_taghandler_9.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.period_id}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_9.doStartTag();\n if (__jsp_taghandler_9.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_9,3);\n }\n out.write(__oracle_jsp_text[17]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_10=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_10.setParent(__jsp_taghandler_7);\n __jsp_taghandler_10.setName(\"schedule_id\");\n __jsp_taghandler_10.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.schedule_id}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_10.doStartTag();\n if (__jsp_taghandler_10.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_10,3);\n }\n out.write(__oracle_jsp_text[18]);\n } while (__jsp_taghandler_7.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n finally {\n out=OracleJspRuntime.popBodyIfNeeded(pageContext,out);\n }\n }\n if (__jsp_taghandler_7.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_7.doCatch(th);\n } finally {\n __jsp_taghandler_7.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_7,2);\n }\n out.write(__oracle_jsp_text[19]);\n {\n org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_11=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,\"org.apache.taglibs.standard.tag.rt.core.ImportTag url\");\n __jsp_taghandler_11.setParent(__jsp_taghandler_6);\n __jsp_taghandler_11.setUrl(\"show_day.jsp\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_11.doStartTag();\n if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval))\n {\n try {\n out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_11,__jsp_tag_starteval,out);\n do {\n out.write(__oracle_jsp_text[20]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_12=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_12.setParent(__jsp_taghandler_11);\n __jsp_taghandler_12.setName(\"dayName\");\n __jsp_taghandler_12.setValue(\"Mon-Thurs\");\n __jsp_tag_starteval=__jsp_taghandler_12.doStartTag();\n if (__jsp_taghandler_12.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_12,3);\n }\n out.write(__oracle_jsp_text[21]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_13=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_13.setParent(__jsp_taghandler_11);\n __jsp_taghandler_13.setName(\"schedule\");\n __jsp_taghandler_13.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.schedule_id}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_13.doStartTag();\n if (__jsp_taghandler_13.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_13,3);\n }\n out.write(__oracle_jsp_text[22]);\n } while (__jsp_taghandler_11.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n finally {\n out=OracleJspRuntime.popBodyIfNeeded(pageContext,out);\n }\n }\n if (__jsp_taghandler_11.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_11.doCatch(th);\n } finally {\n __jsp_taghandler_11.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_11,2);\n }\n out.write(__oracle_jsp_text[23]);\n {\n org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_14=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,\"org.apache.taglibs.standard.tag.rt.core.ImportTag url\");\n __jsp_taghandler_14.setParent(__jsp_taghandler_6);\n __jsp_taghandler_14.setUrl(\"show_day.jsp\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_14.doStartTag();\n if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval))\n {\n try {\n out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_14,__jsp_tag_starteval,out);\n do {\n out.write(__oracle_jsp_text[24]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_15=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_15.setParent(__jsp_taghandler_14);\n __jsp_taghandler_15.setName(\"dayName\");\n __jsp_taghandler_15.setValue(\"Fri\");\n __jsp_tag_starteval=__jsp_taghandler_15.doStartTag();\n if (__jsp_taghandler_15.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_15,3);\n }\n out.write(__oracle_jsp_text[25]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_16=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_16.setParent(__jsp_taghandler_14);\n __jsp_taghandler_16.setName(\"schedule\");\n __jsp_taghandler_16.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.schedule_id}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_16.doStartTag();\n if (__jsp_taghandler_16.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_16,3);\n }\n out.write(__oracle_jsp_text[26]);\n } while (__jsp_taghandler_14.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n finally {\n out=OracleJspRuntime.popBodyIfNeeded(pageContext,out);\n }\n }\n if (__jsp_taghandler_14.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_14.doCatch(th);\n } finally {\n __jsp_taghandler_14.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_14,2);\n }\n out.write(__oracle_jsp_text[27]);\n {\n org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_17=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,\"org.apache.taglibs.standard.tag.rt.core.ImportTag url\");\n __jsp_taghandler_17.setParent(__jsp_taghandler_6);\n __jsp_taghandler_17.setUrl(\"show_day.jsp\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_17.doStartTag();\n if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval))\n {\n try {\n out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_17,__jsp_tag_starteval,out);\n do {\n out.write(__oracle_jsp_text[28]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_18=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_18.setParent(__jsp_taghandler_17);\n __jsp_taghandler_18.setName(\"dayName\");\n __jsp_taghandler_18.setValue(\"Sat\");\n __jsp_tag_starteval=__jsp_taghandler_18.doStartTag();\n if (__jsp_taghandler_18.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_18,3);\n }\n out.write(__oracle_jsp_text[29]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_19=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_19.setParent(__jsp_taghandler_17);\n __jsp_taghandler_19.setName(\"schedule\");\n __jsp_taghandler_19.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.schedule_id}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_19.doStartTag();\n if (__jsp_taghandler_19.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_19,3);\n }\n out.write(__oracle_jsp_text[30]);\n } while (__jsp_taghandler_17.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n finally {\n out=OracleJspRuntime.popBodyIfNeeded(pageContext,out);\n }\n }\n if (__jsp_taghandler_17.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_17.doCatch(th);\n } finally {\n __jsp_taghandler_17.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_17,2);\n }\n out.write(__oracle_jsp_text[31]);\n {\n org.apache.taglibs.standard.tag.rt.core.ImportTag __jsp_taghandler_20=(org.apache.taglibs.standard.tag.rt.core.ImportTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ImportTag.class,\"org.apache.taglibs.standard.tag.rt.core.ImportTag url\");\n __jsp_taghandler_20.setParent(__jsp_taghandler_6);\n __jsp_taghandler_20.setUrl(\"show_day.jsp\");\n try {\n __jsp_tag_starteval=__jsp_taghandler_20.doStartTag();\n if (OracleJspRuntime.checkStartBodyTagEval(__jsp_tag_starteval))\n {\n try {\n out=OracleJspRuntime.pushBodyIfNeeded(pageContext,__jsp_taghandler_20,__jsp_tag_starteval,out);\n do {\n out.write(__oracle_jsp_text[32]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_21=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_21.setParent(__jsp_taghandler_20);\n __jsp_taghandler_21.setName(\"dayName\");\n __jsp_taghandler_21.setValue(\"Sun\");\n __jsp_tag_starteval=__jsp_taghandler_21.doStartTag();\n if (__jsp_taghandler_21.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_21,3);\n }\n out.write(__oracle_jsp_text[33]);\n {\n org.apache.taglibs.standard.tag.rt.core.ParamTag __jsp_taghandler_22=(org.apache.taglibs.standard.tag.rt.core.ParamTag)OracleJspRuntime.getTagHandler(pageContext,org.apache.taglibs.standard.tag.rt.core.ParamTag.class,\"org.apache.taglibs.standard.tag.rt.core.ParamTag name value\");\n __jsp_taghandler_22.setParent(__jsp_taghandler_20);\n __jsp_taghandler_22.setName(\"schedule\");\n __jsp_taghandler_22.setValue((java.lang.String)oracle.jsp.runtime.OracleJspRuntime.evaluate(\"${theException.schedule_id}\",java.lang.String.class, __ojsp_varRes,null));\n __jsp_tag_starteval=__jsp_taghandler_22.doStartTag();\n if (__jsp_taghandler_22.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_22,3);\n }\n out.write(__oracle_jsp_text[34]);\n } while (__jsp_taghandler_20.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n finally {\n out=OracleJspRuntime.popBodyIfNeeded(pageContext,out);\n }\n }\n if (__jsp_taghandler_20.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_20.doCatch(th);\n } finally {\n __jsp_taghandler_20.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_20,2);\n }\n out.write(__oracle_jsp_text[35]);\n } while (__jsp_taghandler_6.doAfterBody()==javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);\n }\n if (__jsp_taghandler_6.doEndTag()==javax.servlet.jsp.tagext.Tag.SKIP_PAGE)\n return;\n } catch (Throwable th) {\n __jsp_taghandler_6.doCatch(th);\n } finally {\n __jsp_taghandler_6.doFinally();\n }\n OracleJspRuntime.releaseTagHandler(pageContext,__jsp_taghandler_6,1);\n }\n out.write(__oracle_jsp_text[36]);\n\n\n }\n catch( Throwable e) {\n if (!(e instanceof javax.servlet.jsp.SkipPageException)){\n try {\n if (out != null) out.clear();\n }\n catch( Exception clearException) {\n }\n pageContext.handlePageException( e);\n }\n }\n finally {\n OracleJspRuntime.extraHandlePCFinally(pageContext,true);\n JspFactory.getDefaultFactory().releasePageContext(pageContext);\n }\n\n }", "public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {\n\n response.setContentType( \"text/html;charset=UTF-8\");\n /* set up the intrinsic variables using the pageContext goober:\n ** session = HttpSession\n ** application = ServletContext\n ** out = JspWriter\n ** page = this\n ** config = ServletConfig\n ** all session/app beans declared in globals.jsa\n */\n PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);\n // Note: this is not emitted if the session directive == false\n HttpSession session = pageContext.getSession();\n int __jsp_tag_starteval;\n ServletContext application = pageContext.getServletContext();\n JspWriter out = pageContext.getOut();\n _mapclient page = this;\n ServletConfig config = pageContext.getServletConfig();\n\n com.evermind.server.http.JspCommonExtraWriter __ojsp_s_out = (com.evermind.server.http.JspCommonExtraWriter) out;\n try {\n\n\n __ojsp_s_out.write(__oracle_jsp_text[0]);\n __ojsp_s_out.write(__oracle_jsp_text[1]);\n __ojsp_s_out.write(__oracle_jsp_text[2]);\n __ojsp_s_out.write(__oracle_jsp_text[3]);\n __ojsp_s_out.write(__oracle_jsp_text[4]);\n __ojsp_s_out.write(__oracle_jsp_text[5]);\n __ojsp_s_out.write(__oracle_jsp_text[6]);\n mapdemo.MapClientBean mcb;\n synchronized (session) {\n if ((mcb = (mapdemo.MapClientBean) pageContext.getAttribute( \"mcb\", PageContext.SESSION_SCOPE)) == null) {\n mcb = (mapdemo.MapClientBean) new mapdemo.MapClientBean();\n pageContext.setAttribute( \"mcb\", mcb, PageContext.SESSION_SCOPE);\n __ojsp_s_out.write(__oracle_jsp_text[7]);\n mcb.setMapViewerServerURL(OracleJspRuntime.toStr( mcb.determineURL(request)));\n __ojsp_s_out.write(__oracle_jsp_text[8]);\n pageContext.setAttribute( \"mcb\", mcb, PageContext.SESSION_SCOPE);\n }\n }\n __ojsp_s_out.write(__oracle_jsp_text[9]);\n {\n String[] __paramList = request.getParameterValues( \"mapViewerServerURL\");\n if ((__paramList != null) && (__paramList[0] != null) && (__paramList[0].length() > 0)) {\n mcb.setMapViewerServerURL(__paramList[0]);\n }\n }\n __ojsp_s_out.write(__oracle_jsp_text[10]);\n OracleJspRuntime.__jspSetAllParams(request, (Object)mcb, true);\n __ojsp_s_out.write(__oracle_jsp_text[11]);\n \n mcb.processRequest(request);\n \n __ojsp_s_out.write(__oracle_jsp_text[12]);\n out.print(mcb.getMapViewerServerURL());\n __ojsp_s_out.write(__oracle_jsp_text[13]);\n out.print( mcb.getDataSource() );\n __ojsp_s_out.write(__oracle_jsp_text[14]);\n out.print( mcb.getTitle() );\n __ojsp_s_out.write(__oracle_jsp_text[15]);\n out.print( mcb.getBaseMap() );\n __ojsp_s_out.write(__oracle_jsp_text[16]);\n out.print( mcb.getCenterX() );\n __ojsp_s_out.write(__oracle_jsp_text[17]);\n out.print( mcb.getCenterY() );\n __ojsp_s_out.write(__oracle_jsp_text[18]);\n out.print( mcb.getSize() );\n __ojsp_s_out.write(__oracle_jsp_text[19]);\n out.print(mcb.getImageW());\n __ojsp_s_out.write(__oracle_jsp_text[20]);\n if (mcb.getSuccess()) { \n __ojsp_s_out.write(__oracle_jsp_text[21]);\n out.print( mcb.getMapImageURL() );\n __ojsp_s_out.write(__oracle_jsp_text[22]);\n out.print( mcb.getImageW() );\n __ojsp_s_out.write(__oracle_jsp_text[23]);\n out.print( mcb.getImageH() );\n __ojsp_s_out.write(__oracle_jsp_text[24]);\n } else { \n __ojsp_s_out.write(__oracle_jsp_text[25]);\n } \n __ojsp_s_out.write(__oracle_jsp_text[26]);\n out.print( mcb.getImageW() );\n __ojsp_s_out.write(__oracle_jsp_text[27]);\n out.print( mcb.getImageW() );\n __ojsp_s_out.write(__oracle_jsp_text[28]);\n out.print(mcb.getXMLRequest());\n __ojsp_s_out.write(__oracle_jsp_text[29]);\n out.print(mcb.getXMLResponse());\n __ojsp_s_out.write(__oracle_jsp_text[30]);\n \n if(mcb.getErrorMsg()!=null && mcb.getDataSource()!=null)\n {\n \n __ojsp_s_out.write(__oracle_jsp_text[31]);\n out.print(mcb.getErrorMsg());\n __ojsp_s_out.write(__oracle_jsp_text[32]);\n \n }\n \n __ojsp_s_out.write(__oracle_jsp_text[33]);\n\n }\n catch (Throwable e) {\n if (!(e instanceof javax.servlet.jsp.SkipPageException)){\n try {\n if (out != null) out.clear();\n }\n catch (Exception clearException) {\n }\n pageContext.handlePageException(e);\n }\n }\n finally {\n OracleJspRuntime.extraHandlePCFinally(pageContext, true);\n JspFactory.getDefaultFactory().releasePageContext(pageContext);\n }\n\n }", "@Override\n\tpublic void logout() {\n\t\tsessionService.setCurrentUserId(null);\n\t}", "@Override\n public void endRequest(HttpServletResponse httpServletResponse) {\n if (wasModified.get()) {\n Cookie newCookie = new Cookie(COOKIE_NAME, sessionId.get());\n newCookie.setPath(\"/\");\n httpServletResponse.addCookie(newCookie);\n }\n\n // -- Clear the threadlocals since we are now exiting this session --\n wasModified.remove();\n sessionId.remove();\n }", "public void setSessionCounter(long sessionCounter);", "public static void reset() {\n Castle.userId(null);\n Castle.flush();\n }", "void unsetSOID();", "synchronized public String getSessionId()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getSessionID();\n\t\t\t\n\t\treturn null;\n\t}", "public void setSessionId(String cookie) {\n\t\t\r\n\t}", "public void flushHeader() {\r\n\t\t//resetBuffer();\r\n\t\tif (sc_status == 0) {\r\n\t\t\tsetStatus(200);\r\n\t\t}\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\r\n\t\tdateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n StringBuffer headerVal = new StringBuffer();\r\n headerVal.append(request.getProtocol() + \" \" + sc_status + \" \" + HttpResponse.getStatusMessage(sc_status) + \"\\r\\n\");\r\n// System.out.println(\"1st line:\" + headerVal.toString());\r\n headerVal.append(\"Date: \" + dateFormat.format(new Date()) + \"\\r\\n\");\r\n for (String headerName : headersMap.keySet()) {\r\n headerVal.append(headerName + \": \" + headersMap.get(headerName).get(0) + \"\\r\\n\");\r\n }\r\n //System.out.println(\"IF request.hasSession? \" + request.hasSession());\r\n if (request.hasSession() && request.getSession().isNew()) {\r\n \tServletEngine.deleteInvalidatedSession();\r\n \tHttpServletSessionM sessionM = (HttpServletSessionM) request.getSession(false);\r\n \tCookie sessionCookie = new Cookie(\"sessionId\", sessionM.getId());\r\n \t\r\n \t//HttpSession calExpireTime = request.getSession(false);\r\n \tint maxAge = (int) ((sessionM.getLastAccessedTime() - new Date().getTime())/1000 + sessionM.getMaxInactiveInterval());\r\n \t//maxAge = maxAge/1000;\r\n \tsessionCookie.setMaxAge(maxAge*60);\r\n// \tif (!sessionM.isValid()) {\r\n// \t\tSystem.out.println(\"Here the session is invaid\");\r\n// \t\tsessionCookie.setMaxAge(0);\r\n// \t}\r\n \theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(sessionCookie)).append(\"\\r\\n\");\r\n }\r\n if (cookies.size() > 0) {\r\n \tfor (Cookie cur : cookies) {\r\n \t\theaderVal.append(\"Set-Cookie: \").append(getCookieInfo(cur)).append(\"\\r\\n\");\r\n \t}\r\n }\r\n \r\n headerVal.append(\"Content-Length: \" + buffer.getContentLength() + \"\\r\\n\");\r\n //System.out.println(\"buffer.getContentLength:\" + buffer.getContentLength());\r\n headerVal.append(\"Content-Type: \" + contentType + \"\\r\\n\");\r\n headerVal.append(\"Content-Encoding: \" + encoding + \"\\r\\n\");\r\n headerVal.append(\"Connection: close\\r\\n\\r\\n\");\r\n //System.out.println(headerVal.toString());\r\n try {\r\n\t\t\tout.write(headerVal.toString().getBytes());\r\n\t\t\tout.flush();\r\n\t\t\tisCommitted = true;\r\n\t\t\t//System.out.println(\"flushed \");\r\n\t\t} catch (IOException e) {\r\n\t\t\tLogRecorder.addErrorMessage(e, \"cannot write or flush\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tmap=arg0;\n\t\t\n\t\t\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException, ClassNotFoundException, SQLException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n \n HttpSession s=request.getSession();\n \n String FNAME=(String)s.getAttribute(\"FNAME1\");\n String MNAME=(String)s.getAttribute(\"MNAME1\");\n String LNAME=(String)s.getAttribute(\"LNAME1\");\n String DOB=(String)s.getAttribute(\"FNAME\");\n String SUSN1=(String)s.getAttribute(\"DOB1\");\n String MAIL1=(String)s.getAttribute(\"MAIL11\");\n String SPHONE1=(String)s.getAttribute(\"SPHONE11\");\n String SSEX=(String)s.getAttribute(\"SSEX1\");\n String PADDRS=(String)s.getAttribute(\"PADDRS1\");\n String FRADDRS=(String)s.getAttribute(\"RADDRS1\");\n String FANAME=(String)s.getAttribute(\"FANAME1\");\n String MONAME=(String)s.getAttribute(\"MONAME\");\n String PPHONE1=(String)s.getAttribute(\"PPHONE11\");\n String DEP_ID=(String)s.getAttribute(\"DEP_ID\");\n String SUB1=(String)s.getAttribute(\"SUBJECT1\");\n String SUB2=(String)s.getAttribute(\"SUBJECT2\");\n String SUB3=(String)s.getAttribute(\"SUBJECT3\");\n String SUB4=(String)s.getAttribute(\"SUBJECT4\");\n String SUB5=(String)s.getAttribute(\"SUBJECT5\");\n String SUB6=(String)s.getAttribute(\"SUBJECT6\");\n String SUB7=(String)s.getAttribute(\"SUBJECT7\");\n String SUB8=(String)s.getAttribute(\"SUBJECT8\");\n String SEM=(String)s.getAttribute(\"SEM1\");\n String SPASWD=(String)s.getAttribute(\"SPASWD\");\n String SCFMPSWD=(String)s.getAttribute(\"SCFMPSWD\");\n if(SCFMPSWD.equals(SPASWD)){\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Servlet studb</title>\"); \n out.println(\"</head>\");\n out.println(\"<body>\");\n // out.println(\"insert into STUDENT11(First_name,Init,last_name,SDOB,SUSN,SEmail,phone,gender,prem_addr,res_addr,fat_name,mom_name,par_phone,dept2_id,subject1,subject2,subject3,subject4,subject5,subject6,subject7,subject8,section_id,password) values('\"+FNAME+\"','\"+MNAME+\"','\"+LNAME+\"','\"+DOB+\"','\"+SUSN1+\"','\"+MAIL1+\"',\"+SPHONE1+\",'\"+SSEX+\"','\"+PADDRS+\"','\"+FRADDRS+\"','\"+FANAME+\"','\"+MONAME+\"',\"+PPHONE1+\",\"+DEP_ID+\",'\"+SUB1+\"','\"+SUB2+\"','\"+SUB3+\"','\"+SUB4+\"','\"+SUB5+\"','\"+SUB6+\"','\"+SUB7+\"','\"+SUB8+\"','\"+SEM+\"','\"+SPASWD+\"')\");\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n Connection con=DriverManager.getConnection(\"jdbc:oracle:thin:@localhost:1521:XE\", \"system\", \"manager\"); \n Statement stmt=con.createStatement();\n stmt.executeQuery(\"insert into STUDENT11(First_name,Init,last_name,SDOB,SUSN,SEmail,phone,gender,prem_addr,res_addr,fat_name,mom_name,par_phone,dept2_id,subject1,subject2,subject3,subject4,subject5,subject6,subject7,subject8,section_id,password) values('\"+FNAME+\"','\"+MNAME+\"','\"+LNAME+\"','\"+DOB+\"','\"+SUSN1+\"','\"+MAIL1+\"',\"+SPHONE1+\",'\"+SSEX+\"','\"+PADDRS+\"','\"+FRADDRS+\"','\"+FANAME+\"','\"+MONAME+\"',\"+PPHONE1+\",\"+DEP_ID+\",'\"+SUB1+\"','\"+SUB2+\"','\"+SUB3+\"','\"+SUB4+\"','\"+SUB5+\"','\"+SUB6+\"','\"+SUB7+\"','\"+SUB8+\"','\"+SEM+\"','\"+SPASWD+\"')\");\n con.close();\n \n out.println(\"<script>alert(\\\" entry successfull\\\")</script>\");\n out.println(\"<meta http-equiv='refresh' content='0;URL=addstu'>\");\n\n out.println(\"</body>\");\n out.println(\"</html>\");\n }else\n {\n response.sendRedirect(\"adddept\");\n }\n }catch(Exception e){\n out.println(e);\n }\n }", "int getSessionId();", "@Override\r\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tthis.session = arg0;\r\n\t}", "static String getSessionId() {\n if (SESSION_ID == null) {\n // If there is no runtime value for SESSION_ID, try to load a\n // value from persistent store.\n SESSION_ID = Prefs.INSTANCE.getEventPlatformSessionId();\n\n if (SESSION_ID == null) {\n // If there is no value in the persistent store, generate a new value for\n // SESSION_ID, and write the update to the persistent store.\n SESSION_ID = generateRandomId();\n Prefs.INSTANCE.setEventPlatformSessionId(SESSION_ID);\n }\n }\n return SESSION_ID;\n }", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tthis.session = arg0;\n\t\t\n\t}", "String getSessionId();", "String getSessionId();", "String getSessionId();", "String getSessionId();", "@Override\n\tpublic Boolean logout()\n\t\t\tthrows UnknownException {\n HttpSession sesion = this.getThreadLocalRequest().getSession();\n sesion.removeAttribute(\"beanusuario\");\n sesion.removeAttribute(\"idsession\"); \n sesion.invalidate(); \n return true;\n\t}", "protected void clearRegistryFromHTTPSession( HttpServletRequest request )\n {\n HttpSession session = request.getSession();\n XDocReportRegistry registry =\n (XDocReportRegistry) session.getAttribute( XDocBaseServletConstants.XDOCREPORTREGISTRY_SESSION_KEY );\n if ( registry != null )\n {\n registry.dispose();\n }\n session.removeAttribute( XDOCREPORTREGISTRY_SESSION_KEY );\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n\n\t\tresponse.setContentType(\"text/html\");\n\t\tCookie loginCookie = null;\n\t\tCookie[] cookies = request.getCookies();\n\t\tif (cookies != null) {\n\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\tif (cookie.getName().equals(\"uname\")|| cookie.getName().equals(\"JSESSIONID\")) {\n\t\t\t\t\tcookie.setMaxAge(0);\n\t\t\t\t\tcookie.setValue(null);\n\t\t\t\t\tresponse.addCookie(cookie);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\n//\t\tif (loginCookie != null) {\n//\t\t\tloginCookie.setMaxAge(0);\n//\t\t\tresponse.addCookie(loginCookie);\n//\t\t}\n\t\tHttpSession session = request.getSession(false);\n// \tSystem.out.println(\"User=\"+session.getAttribute(\"name\"));\n \tif(session != null){\n \t\tsession.removeAttribute(\"name\");\n \t\tsession.invalidate();\n \t\tresponse.sendRedirect(\"index.jsp\");\n \t}\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n HttpSession session = request.getSession();\n \n if (request.getParameter(\"logout\")!=null){\n session.invalidate();\n String message=\"logout\";\n request.setAttribute(\"message\", message); \n session = request.getSession(); \n } \n getServletContext().getRequestDispatcher(\"/WEB-INF/login.jsp\").\n forward(request,response);\n }", "UUID getSessionId();", "@Override\n\tpublic void setSession(Map<String, Object> arg0) {\n\t\tmap=arg0;\n\t\t\n\t}", "public void setSessionId(short sessionId) {\n this.sessionId = sessionId;\n }", "@Override\n public void valueUnbound(HttpSessionBindingEvent arg0) {\n System.out.println(\"在session中移除LoginUser对象(name = \"+ this.getName() +\"), sessionid = \" + arg0.getSession().getId());\n }", "public String getSessionId() {\n// synchronized (mSessionObj) {\n// return mSessionId;\n// }\n return \"\";\n }" ]
[ "0.6620242", "0.66081876", "0.6331809", "0.6046704", "0.6029779", "0.5957492", "0.58986616", "0.5886507", "0.58454597", "0.5839811", "0.5826931", "0.57910204", "0.575835", "0.5743936", "0.5722818", "0.5722818", "0.56859106", "0.567411", "0.56380993", "0.5631667", "0.5626196", "0.5604733", "0.5595967", "0.5593343", "0.5587377", "0.55750185", "0.55329436", "0.5500465", "0.5493173", "0.5491893", "0.5490925", "0.5490653", "0.5484901", "0.5479549", "0.5473688", "0.5469763", "0.54673237", "0.54562026", "0.5447163", "0.5447063", "0.5439795", "0.5434453", "0.5431485", "0.5426741", "0.54222924", "0.54222924", "0.54036784", "0.53984416", "0.53722125", "0.536792", "0.53639746", "0.53618354", "0.53618354", "0.53566486", "0.53487283", "0.5345204", "0.53334135", "0.53302896", "0.53293335", "0.5329242", "0.53267455", "0.5325627", "0.5317112", "0.5315352", "0.5308717", "0.5304468", "0.5300018", "0.52989435", "0.5298907", "0.52322596", "0.5232018", "0.5224565", "0.5223673", "0.52231544", "0.52227676", "0.52210206", "0.52177095", "0.521494", "0.5213883", "0.520208", "0.51991427", "0.51910895", "0.5186508", "0.51815075", "0.518073", "0.5176117", "0.51745754", "0.5171344", "0.5170901", "0.5170901", "0.5170901", "0.5170901", "0.51615626", "0.5159222", "0.5155578", "0.5152963", "0.5146412", "0.5144655", "0.5141897", "0.5141045", "0.51410085" ]
0.0
-1
Check if target lines exist , If yes open the popup or show error
public void exportTargetConfig(ActionEvent actionEvent) { String noTargetConfig = getFndMessages((String)SudokuUtils.noTargetConfigMsg); V93kQuote v93 = (V93kQuote)ADFUtils.getSessionScopeValue("parentObject"); if (v93 != null && v93.getTargetConfigurationLines() != null && !v93.getTargetConfigurationLines().isEmpty()) { RichPopup.PopupHints hints = new RichPopup.PopupHints(); expConfigPopup.show(hints); } else { if (noTargetConfig != null) ADFUtils.showFacesMessage(noTargetConfig, FacesMessage.SEVERITY_WARN); else ADFUtils.showFacesMessage(SudokuUtils.noTargetConfigMsg, FacesMessage.SEVERITY_WARN); // ADFUtils.showFacesMessage("No target configuration is found in the session, please create target configuration.", // FacesMessage.SEVERITY_WARN); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showInformationAboutBrokenFile(Shell shell) {\n\t\tMessageDialog\n \t.openInformation(\n \t\t shell, \n \t\t \"Info\",\n \t\t \"There was error during test cases generation, make sure selected file is correct!\");\n\t}", "private boolean badEntryFound() {\n boolean flag = false;\n \n if(positionComboBox.getSelectedIndex() <= 0)\n {\n positionLabel.setForeground(Color.red);\n positionComboBox.requestFocusInWindow();\n flag = true;\n }\n else\n {\n positionLabel.setForeground(Color.black);\n }\n \n if(firstTextField.getText().trim().isEmpty())\n {\n fNameLabel.setForeground(Color.red);\n firstTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n fNameLabel.setForeground(Color.black);\n }\n \n if(lastTextField.getText().trim().isEmpty())\n {\n lNameLabel.setForeground(Color.red);\n lastTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n lNameLabel.setForeground(Color.black);\n }\n \n if(codeTextField.getText().trim().isEmpty())\n {\n codeLabel.setForeground(Color.red);\n codeTextField.requestFocusInWindow();\n flag = true;\n }\n else\n {\n codeLabel.setForeground(Color.black);\n }\n \n \n return flag;\n }", "boolean isPopUpOpened();", "private void dialogFichierInexistant(File file){\n\t\tJOptionPane.showMessageDialog(null, \"le fichier \" + file.getName() +\"\\n'existe pas\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t}", "private void showInformationAboutWrongFile(Shell shell) {\n\t\tMessageDialog\n \t.openInformation(\n \t\t shell, \n \t\t \"Info\",\n \t\t \"Please select a *.\" + TestCasePersister.FILE_EXTENSION + \" file\");\n\t}", "private void displayDuplicateInputError(){\n\t\tAlert alert = new Alert(Alert.AlertType.INFORMATION);\n\t\talert.setTitle(\"Duplicate Letter Dialog\");\n\t\talert.setHeaderText(\"Pay Attention!\");\n\t\talert.setContentText(\"You have already tried that letter, please try again\");\n\t\talert.showAndWait();\n\t}", "public void verifyForgotLinkModalWindow() {\n modalWindow.assertState().enabled();\n modalWindow.assertContains().text(\"warningLeaving the PECOS Website\");\n }", "public boolean isPopupShowing() {\n/* 476 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean canOpenPopup() {\n/* 1257 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void showPatMissingDialog()\r\n {\r\n SearchButton.setEnabled(false);\r\n JOptionPane.showMessageDialog(MainFrame,\r\n\t\t \"The PAT regular expression library is not accessible.\\n\"\r\n + \"1. Make sure the software is installed.\\n\"\r\n + \"2. Check it is included in the CLASSPATH.\\n\"\r\n + \"For more details press the 'About' button.\",\r\n \"PAT software error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }", "private void lineCheck(int linesToAdd) {\n\n\t\tTermio terminal = new Termio();\n\n\t\tif (lineCount >= maxLinesDisplayed) {\n\n\t\t\tlineCount = 0;\n\t\t\tSystem.out.print(\"\\n*** Press Enter To Continue ***\");\n\t\t\tterminal.keyboardReadChar();\n\n\t\t} else {\n\n\t\t\tlineCount += linesToAdd;\n\n\t\t} // if\n\n\t}", "private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\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 }", "private boolean row_number_error(int min, int max) {\n int row_size = getHighlightedRows() / 2;\n if ( (min <= row_size) && (row_size <= max))\n return false;\n String dup = (min > 1)? \"s\": \"\";\n if (min > row_size) {\n String status = \"Please select at least \" + min + \" meaning\" + dup;\n statusView.setText(status);\n } else if (row_size > max) {\n String status = (max > min)? \"Please select between \" + min + \" and \" + max + \" meanings\":\n \"Please select \" + min + \" meaning\" + dup;\n statusView.setText(status);\n }\n return true;\n }", "public void ValidateDuplicateMessage() {\n\t\tAssert.assertEquals(NEVERMIND_OPTION.getText(), \"Nevermind\", \"Wrong page!!!\");\n\n\t}", "public void checkInDocument()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tif (itemlay.isMultirowLayout() && itemset.selectRows()==0)\n\t\t{\n\t\t\tmgr.showAlert(mgr.translate(\"DOCMAWDOCREFERENCENOROWS: No Rows Selected.\"));\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, start\n\t\tif (CheckFileOperationEnable()) \n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//Bug Id 67336, end\n\n\t\ttransferToEdmMacro(\"ORIGINAL\",\"CHECKIN\");\n\t}", "public boolean isShowingHintText() {\n/* 1355 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void popupLogic(int[] idList) {\n int markerId;\n\n if (idList.length == 0) {\n //startupFlag\n if (startupFlag) { //mostra messaggio di benvenuto\n showDialog(9999, false); //trova ID1\n startupFlag = false; //non viene piu mostrato\n }\n return; //non fa nulla\n } else {\n markerId = idList[0]; //controlla solo il primo marker tra tutti i rilevati nel frame.\n }\n\n switch (markerId) {\n case ID1: { //23\n if (!foundID1) { //non ancora stato trovato\n showDialog(ID1, true); //OK, vai a ID2\n foundID1 = true;\n break;\n }\n break;\n }\n case ID2: { //3\n if (!foundID2) {\n if (foundID1) { //Se ID1 è già stato trovato\n showDialog(ID2, true); //OK, vai a ID3\n foundID2 = true;\n break;\n } else { //devi trovare prima ID1\n showDialog(ID1, false); //NO, cerca ID1 prima.\n foundID1 = false;\n break;\n }\n }\n break;\n }\n case ID3: { //5\n if (!foundID3) { //se ID3 non è ancora stato trovato\n if (foundID1 && foundID2) { //se ID1 e ID2 sono già stati trovati\n showDialog(ID3, true); //congrats\n foundID3 = true;\n break;\n } else {\n if (!foundID2) { //ID2 non è stato trovato\n if (!foundID1) { // ID1 non è stato trovato\n showDialog(ID1, false);\n foundID1 = false; //trova ID1\n break;\n } else { // ID1 trovato\n showDialog(ID2, false); //trova ID2\n foundID2 = false;\n break;\n }\n }\n break;\n }\n }\n break;\n }\n }\n\n\n }", "private void displayModalUntilClick(String line1, String line2) {\n \tGRect frame1 = new GRect(260, 150);\n \tframe1.setFilled(true);\n \tframe1.setFillColor(Color.WHITE);\n\n \tGRect frame2 = new GRect(260 - 6, 150 - 6);\n\n \tGLabel label1 = new GLabel(line1);\n \tlabel1.setFont(\"SansSerif-30\");\n\n \tGLabel label2 = new GLabel(line2);\n \tlabel2.setFont(\"SansSerif-20\");\n \t\n \tint cx = getWidth() / 2;\n \tint cy = getHeight() / 2;\n \t\n \tadd(frame1, (cx - frame1.getWidth() / 2), (cy - frame1.getHeight() / 2));\n \tadd(frame2, (cx - frame2.getWidth() / 2), (cy - frame2.getHeight() / 2));\n \tadd(label1, (cx - label1.getWidth() /2), (cy - label1.getHeight() / 2 ));\n \tadd(label2, (cx - label2.getWidth() /2), (cy - label2.getHeight() / 2 + 46));\n \t\n \twaitForClick();\n \t\n \tremove(frame1);\n \tremove(frame2);\n \tremove(label1);\n \tremove(label2);\n \t\n }", "private boolean initDisplayMessage()\n {\n boolean errors = false;\n String errMsg = RxInstallerProperties.getString(\"pluginErrMsg\") + \"\\n\\n\";\n File postLogFileDir = new File(RxUpgrade.getPostLogFileDir());\n if (postLogFileDir.exists())\n {\n File[] logFiles = postLogFileDir.listFiles();\n for (int i = 0; i < logFiles.length; i++)\n {\n File logFile = logFiles[i];\n try\n {\n String logFileContent = IOTools.getFileContent(logFile);\n if (logFileContent.indexOf(\"Exception\") != -1)\n {\n errMsg += logFile.getName() + \"\\n\";\n errors = true;\n }\n \n }\n catch (IOException e)\n {\n e.printStackTrace();\n RxLogger.logError(\"RxUpgradePluginsModel#initDisplayMessage : \" +\n e.getMessage());\n }\n }\n }\n \n if (errors)\n {\n m_displayMessage += errMsg;\n m_displayMessage += \"\\n\" + \"These files can be found at the \"\n + \"following location: \" + postLogFileDir.getAbsolutePath();\n m_displayMessage += \"\\n\\n\"\n + RxInstallerProperties.getString(\"docHelp\");\n m_displayMessage += \"\\n\\n\"\n + RxInstallerProperties.getString(\"northAmericaSupport\");\n m_displayMessage += \"\\n\\n\"\n + RxInstallerProperties.getString(\"europeSupport\");\n }\n return errors;\n }", "private void openSelectedProfileError() {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Error Opening Profile\");\n alert.setHeaderText(null);\n alert.setContentText(\"An error occurred while opening the selected profile.\");\n alert.showAndWait();\n }", "private boolean checkEditContent()\n {\n if (etUrl.hasContent() && etFilePath.hasContent())\n {\n return true;\n }\n return false;\n }", "boolean hasErrormessage();", "public boolean showSource (String url, int lineNumber, int column, int length, Object timeStamp) {\n Line l = LineTranslations.getTranslations().getLine (url, lineNumber, timeStamp); // false = use original ln\n if (l == null) {\n ErrorManager.getDefault().log(ErrorManager.WARNING,\n \"Show Source: Have no line for URL = \"+url+\", line number = \"+lineNumber);\n return false;\n }\n if (\"true\".equalsIgnoreCase(fronting) || Utilities.isWindows()) {\n l.show (Line.SHOW_TOFRONT, column); //FIX 47825\n } else {\n l.show (Line.SHOW_GOTO, column);\n }\n addPositionToJumpList(url, l, column);\n return true;\n }", "public void check_openfile_window_Presence() throws InterruptedException {\r\n\t\tdriver.switchTo().activeElement();\r\n\t\tWebElement openfile_window = driver.findElementByName(\"How do you want to open this file?\");\r\n\t\tThread.sleep(3000);\r\n\t\t// return IsElementVisibleStatus(openfile_window);\r\n\t\tWebElement openfile_Adobe = driver.findElementByName(\"Adobe Reader\");\r\n\t\tclickOn(openfile_Adobe);\r\n\t\tWebElement ConfirmButton_ok = driver.findElementByAccessibilityId(\"ConfirmButton\");\r\n\t\tclickOn(ConfirmButton_ok);\r\n\t\tdriver.switchTo().activeElement();\r\n\t}", "public Boolean verifyIfTheMainTextExist() {\n\t\tSystem.out.println(\"Starting to verify if the main text label exist correctly.\");\n\t\twaitSleepingTheTread(3000);\n\t\treturn verifyIfisDisplayedX2(body_label_your_shopping_cart);\n\t}", "public void msgCycleFound()\n {\n Alert cycleFound; // message when cycle is detected\n cycleFound = new Alert(AlertType.INFORMATION);\n cycleFound.setTitle(\"Block editor\");\n cycleFound.setHeaderText(\"Connection was not made!\");\n cycleFound.setContentText(\"Connecting these blocks causes a cycle in scheme.\");\n cycleFound.showAndWait().ifPresent(rs -> {\n if (rs == ButtonType.OK) {}\n });\n }", "public void clickShowReceived() throws UIAutomationException{\t\t\r\n\t\telementController.requireElementSmart(fileName,\"Show Received In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Received In Social Panel\");\r\n\t\tUIActions.click(fileName,\"Show Received In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Received In Social Panel\");\r\n\t\t\t\r\n\t\t/*\t// Check by clicking on 'show sent' it changes to 'show received'\r\n\t\t\telementController.requireElementSmart(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\tString linkTextInPage=UIActions.getText(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\tString linkTextInXML=dataController.getPageDataElements(fileName,\"Show Received Text\" , \"Name\");\r\n\t\t\tif(!linkTextInPage.contains(linkTextInXML)){\r\n\t\t\t\tthrow new UIAutomationException( \"'\"+linkTextInXML +\"' not found\");\r\n\t\t\t}*/\r\n\t}", "public boolean showSource (String url, int lineNumber, Object timeStamp) {\n Line l = showSourceLine(url, lineNumber, timeStamp);\n if (l != null) {\n addPositionToJumpList(url, l, 0);\n }\n return l != null;\n }", "public boolean isImportMessageDisplayed()\n {\n try\n {\n\n waitForElement(By.xpath(\".//span[contains(text(),'Website data import successful')]\"), SECONDS.convert(getDefaultWaitTime(), MILLISECONDS));\n WebElement importMessage = driver.findElement(By.xpath(\".//span[contains(text(),'Website data import successful')]\"));\n if (importMessage != null)\n return true;\n }\n catch (NoSuchElementException nse)\n {\n return false;\n }\n\n return false;\n }", "public static boolean printErrorMessage() {\n System.out.println(\"Error: Invalid URL entered\");\n return true;\n }", "public void exibeMatriculaJaExiste() {\n JOptionPane.showMessageDialog(\n null,\n Constantes.GERENCIAR_FUNCIONARIO_MATRICULA_JA_EXISTENTE,\n Constantes.GERENCIAR_FUNCIONARIO_TITULO,\n JOptionPane.PLAIN_MESSAGE\n );\n }", "private boolean checkInception(Item it1, String target){\n\t\tif (it1 == openContainer && target.startsWith(\"ContPos\")){\n\t\t\tdisplayMessage(\"INCEPTION FAILED. NICE TRY\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "void displayUserTakenError(){\n error.setVisible(true);\n }", "public void displayValidityReport() {\r\n\t\tif (this.tuple == null)\r\n\t\t\treturn;\r\n\t\tsetMessage(\"\");\r\n\t\tint row = this.tableView.getSelectedRow();\r\n\t\tif (row < this.tuple.getNumberOfEntries() && row >= 0)\r\n\t\t\tdisplayValidityReport(row);\r\n\t}", "void showError() {\n Toast.makeText(this, \"Please select answers to all questions.\", Toast.LENGTH_SHORT).show();\n }", "private boolean checkValidity() {\n if(txtSupplierCode.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Code!!\", \"EMPTY SUPPLIER CODE\", JOptionPane.ERROR_MESSAGE);\n txtSupplierCode.setBackground(Color.RED);\n return false;\n }\n if(txtSupplierName.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Name!!\", \"EMPTY SUPPLIER NAME\", JOptionPane.ERROR_MESSAGE);\n txtSupplierName.setBackground(Color.RED);\n return false;\n }\n return true;\n }", "private boolean checkLines(){\n\n for (int[] line : TwoPlayersActivity.lines) {\n\n if (field.get(line[0]).equals(field.get(line[1])) &&\n field.get(line[0]).equals(field.get(line[2])) &&\n !field.get(line[0]).getValue().equals(Cell.Value.NONE)){\n for (int index: line) {\n imageList.get(index).setBackgroundColor(Color\n .parseColor(TwoPlayersActivity.CELL_WIN_COLOR));\n }\n return true;\n }\n }\n return false;\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify the path to the RhapsodyCL.exe file\");\n else if(!value.contains(\"RhapsodyCL.exe\")) {\n \terror(\"didn't find RhapsodyCL.exe in the path !\");\n }else{\n \tok(); \t\n }\n }", "public static WebElement check_lnkPAEnhancedEntranced_ViewLatestPdtLinkExists(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t/*\tBoolean isLinkUpdateMeOnNewPdtExists = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//a[@id='trigger_paTipBox'][contains(text(),'Update me on new products')]\")).isDisplayed();\r\n \t\tAdd_Log.info(\"Is hyperlink Update me on new products exists ::\" + isLinkUpdateMeOnNewPdtExists);\r\n \t*/\t\r\n \t\tBoolean isLinkViewLatestPdtExists = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//a[@id='trigger_paTipBox'][contains(text(),'View latest products')]\")).isDisplayed();\r\n \t\tAdd_Log.info(\"Is hyperlink View latest products exists ::\" + isLinkViewLatestPdtExists);\r\n \t\t\r\n \t//\tif(isLinkUpdateMeOnNewPdtExists == false && isLinkViewLatestPdtExists == true){\r\n \t\tif(isLinkViewLatestPdtExists == true){\r\n \t\t\tAdd_Log.info(\"Hyperlink of the Enhanced Entrance is removed and the copy changed to 'View latest products'.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_LINK_VIEW_LATEST_PDT_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Hyperlink of the Enhanced Entrance is NOT removed and the copy is NOT changed to 'View latest products'.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_LINK_VIEW_LATEST_PDT_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "boolean hasErrmsg();", "private void errorPopUp() {\n new AlertDialog.Builder(mActivity)\n .setTitle(\"Oops\")\n .setMessage(\"Please choose an emotional state or enter a date and time\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Go back without changing anything\n dialogInterface.dismiss();\n }\n })\n .create()\n .show();\n }", "public boolean errorFound()\r\n\t{\r\n\t\t\r\n\t}", "@Then ( \"the Prescription was not added\" )\r\n public void failure () {\r\n // assertTrue( driver.getPageSource().contains( \"Error occurred creating\r\n // prescription\" ) );\r\n }", "public boolean check_file_status(String StTextFileName) throws Exception\r\n\t{\r\n\t\t//try\r\n\t//\t{\r\n\t\t\tFile file = new File(StTextFileName);\r\n\r\n\t\t\tif (file.exists() == false)\r\n\t\t\t{\r\n\t\t\t JOptionPane.showMessageDialog(frame ,\"~~ WARNING ~~ \\n \\n The selected file is not a valid file... \\n Please Select Another File . \\n \",\"WARNING\",JOptionPane.ERROR_MESSAGE); //JOptionPane.WARNING_MESSAGE);\r\n \t\t\t l = new log(\"warning\",\"File\",\"<\"+StSourceFileName+\">\"+ \" Not Exist, Please Select Another File .\"); //info\r\n \t\t\t return false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t l = new log(\"info\",\"File\",\"<\"+StSourceFileName+\">\" + \" Exist\");\t\t\t \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (file.isDirectory() == true)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(frame ,\"~~ WARNING ~~ \\n \\n The selected file is not a valid file... \\n Please Select Another File . \\n \",\"WARNING\",JOptionPane.ERROR_MESSAGE); //JOptionPane.WARNING_MESSAGE);\t\t\t\r\n\t\t\t\tl = new log(\"warning\",\"File\",\"<\"+StTextFileName+\">\"+ \" is not a File, Please Select Another File .\" );\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//File Exist + is a file.\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n/*\t\t\tstr = null;\r\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(StTextFileName));\r\n\t\t\t\r\n\r\n\t\t\twhile ((str = in.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\tintTotalLineNumber++;\r\n\t\t\t\tintTotalCharInFile = intTotalCharInFile + str.length();\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\t//l = new log(\"warning\",\"File\",\"<\"+StTextFileName+\">\"+ \" is not a File, Please Select Another File \" + e + \".\" );\r\n\t\t\tJOptionPane.showMessageDialog(frame ,\"~~ WARNING ~~ \\n \\n The selected file is not a valid file... \\n Please Select Another File . \\n \",\"WARNING\",JOptionPane.ERROR_MESSAGE); //JOptionPane.WARNING_MESSAGE);\t\t\t\r\n\t\t\tl = new log(\"warning\",\"File\",\"<\"+StTextFileName+\">\"+ \" is not a File, Please Select Another File .\" );\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n*/\r\n\t\t\t\t\r\n//\t\treturn true;\r\n\t}", "public static WebElement check_lnkPAEnhancedEntranced_ViewLatestPdtExists(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t/*\tBoolean isLinkUpdateMeOnNewPdtExists = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//a[@id='trigger_paTipBox'][contains(text(),'Update me on new products')]\")).isDisplayed();\r\n \t\tAdd_Log.info(\"Is hyperlink Update me on new products exists ::\" + isLinkUpdateMeOnNewPdtExists);\r\n \t*/\t\r\n \t\t\r\n \t\tBoolean isLinkViewLatestPdtExists = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//a[@id='trigger_eConfirmBox'][contains(text(),'View latest products')]\")).isDisplayed();\r\n \t\tAdd_Log.info(\"Is hyperlink View latest products exists ::\" + isLinkViewLatestPdtExists);\r\n \t\t\r\n \t//\tif(isLinkUpdateMeOnNewPdtExists == false && isLinkViewLatestPdtExists == true){\r\n \t\tif(isLinkViewLatestPdtExists == true){\r\n \t\t\tAdd_Log.info(\"Hyperlink of the Enhanced Entrance is removed and the copy changed to 'View latest products'.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_LINK_VIEW_LATEST_PDT_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tAdd_Log.info(\"Hyperlink of the Enhanced Entrance is NOT removed and the copy is NOT changed to 'View latest products'.\");\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_LINK_VIEW_LATEST_PDT_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public static void noSupplierSelected(){\r\n\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\talert.setTitle(\"Error!\");\r\n\t\talert.setHeaderText(\"\");\r\n\t\talert.setContentText(\"Bitte wählen Sie einen Lieferanten aus!\");\r\n\t\talert.showAndWait();\r\n\t}", "private boolean checkFile(String batchName) {\r\n String message = \"\";\r\n boolean found=true;\r\n\r\n if (batchName.equals(Constant.POS_EMPLOYEE)) {\r\n found= ut.isExistFile( Constant.POS_EMPLOYEE_FILE ,Constant.IMPORT_PATH);\r\n message = lang.getString(\"MS100_RunAfterSimEm\");\r\n }\r\n else if (batchName.equals(Constant.POS_EXCHANGE_RATE)) {\r\n found= ut.isExistFile(Constant.POS_EXCHANGE_RATE_FILE,Constant.IMPORT_PATH);\r\n message = lang.getString(\"MS101_RunAfterSimExchangeRatem\");\r\n }\r\n else if (batchName.equals(Constant.POS_ITEM_PRICE)) {\r\n found= ut.isExistFile(Constant.POS_ITEM_PRICE_FILE,Constant.IMPORT_PATH);\r\n message = lang.getString(\"MS102_RunAfterSimItemPrice\");\r\n }\r\n if (!found) {\r\n ut.showMessage(frmMain, lang.getString(\"TT001\"), message +\" \"+ lang.getString(\"MS103_RunFTP\"));\r\n }\r\n return found;\r\n}", "private void checkFile() {\n \ttry {\n \t\tdata = new BufferedReader(\n \t\t\t\t new FileReader(textFile));\n \t\t\n \t}\n \tcatch(FileNotFoundException e)\n \t{\n \t\tSystem.out.println(\"The mentioned File is not found.\");\n System.out.println(\"\");\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(\"The following error occured while reading the file.\");\n\t\t\tex.printStackTrace();\n\t\t\tSystem.exit(2);\n\t\t}\n }", "public void invalidSkip() {\n JOptionPane.showMessageDialog(frame, \"Invalid skip\", \"Invalid skip\", JOptionPane.ERROR_MESSAGE);\n\n }", "public void clickShowSent() throws UIAutomationException{\t\t\r\n\t\telementController.requireElementSmart(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\tUIActions.click(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\t\r\n\t\t/*\t// Check by clicking on 'show sent' it changes to 'show received'\r\n\t\t\telementController.requireElementSmart(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\tString linkTextInPage=UIActions.getText(fileName,\"Show Sent In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Show Sent In Social Panel\");\r\n\t\t\tString linkTextInXML=dataController.getPageDataElements(fileName,\"Show Received Text\" , \"Name\");\r\n\t\t\tif(!linkTextInPage.contains(linkTextInXML)){\r\n\t\t\t\tthrow new UIAutomationException( \"'\"+linkTextInXML +\"' not found\");\r\n\t\t\t}*/\r\n\t}", "private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }", "private void showErrorDialog(int errorCode) {\n\t\t\n }", "public boolean hasError();", "boolean isTooltipPresent(WebElement field){\n actions.moveToElement(field).build().perform();\n String tooltipId = field.getAttribute(\"aria-describedby\");\n if (tooltipId!=null)\n return true;\n else\n return false;\n /*\n By tooltipLocator = By.className(\"ui-tooltip-content\");\n List <WebElement> tooltipList = driver.findElements(tooltipLocator);\n if (!tooltipList.isEmpty())\n return true;\n else return false;\n */\n }", "public void alertSelection() {\n JOptionPane.showMessageDialog(gui.getFrame(),\n \"`Please select a choice.\",\n \"Invalid Selection Error\",\n JOptionPane.ERROR_MESSAGE);\n }", "public void verifyCourseSuggestionLoadedInNewWindow() {\n Assert.assertTrue(ContactLabelCourseSuggestionPage.isDisplayed());\n }", "private void saveAsConfirmButton(){\n //Check if the input is valid (lcase and no spaces)\n String input = SaveAsLabNameTextField.getText();\n \n if(input.contains(\" \") || !input.equals(input.toLowerCase())){ \n SaveAsErrorLabel.setText(\"Lab name must be lowercase and contain no spaces!\");\n SaveAsErrorLabel.setVisible(true);\n }\n //Check if lab already exists\n else if(Arrays.asList(labsPath.list()).contains(input)){ \n SaveAsErrorLabel.setText(\"Lab already exists!\");\n SaveAsErrorLabel.setVisible(true);\n }\n else{\n SaveAsErrorLabel.setVisible(false);\n saveAs(input);\n SaveAsDialog.setVisible(false);\n } \n }", "@Given(\"^user should open link$\")\r\n\tpublic void user_should_open_link() throws Throwable {\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n driver.manage().deleteAllCookies();\r\n\r\n driver.get(prop.getProperty(\"url\"));\r\n\r\n WebDriverWait wait = new WebDriverWait(driver,60);\r\n \t wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(prop.getProperty(\"Popup\"))));\r\n \t driver.findElement(By.xpath(prop.getProperty(\"Popup\"))).click();Thread.sleep(5000);\r\n\t}", "public boolean displayPrompt(String msg);", "public void showDuplicatePlayerNameMessage() {\n Optional<SelectGameScreen> maybeSelectGameScreen = getSelectGameScreenIfActive();\n if (maybeSelectGameScreen.isPresent()) {\n maybeSelectGameScreen.get().showDuplicatePlayerNameMessage();\n } else {\n showError(\"Player name already exists.\");\n }\n }", "public boolean validateRowLinkText() {\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<AttRowLinkTextList.size();i++)\n\t\t{\n\t\t\tString linkName = AttRowLinkTextList.get(i).getText();\n\t\t\tif(linkName.equals(\"5 rows\")||linkName.equals(\"10 rows\")||linkName.equals(\"15 rows\")) {\n\t\t\t\tflag =true;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn flag;\n\t}", "boolean hasErrorMessage();", "boolean hasErrorMessage();", "public void verify_WelcomePopupandclick(){\n\t\tif(isDisplayedWithoutException(welcomePopup)){\n\t\t\tclick(welcomePopup);\n\t\t\tSystem.out.println(\"the Welcome popup is visible on the page and clicked done\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The Welcome popup is not present on the page\");\n\t\t}\n\t}", "public void proceedOnPopUp() {\n Controllers.button.click(proceedToCheckOutPopUp);\n }", "private void importButtonAction() {\r\n\t\t/**\r\n\t\t * Sync the profile names from the selection table.\r\n\t\t */\r\n\t\tsyncProfileNames();\r\n\t\t/**\r\n\t\t * Sync the profile selection from the selection table.\r\n\t\t */\r\n\t\tsyncProfileSelection();\r\n\t\t/**\r\n\t\t * Check if the length correction is bigger than 2\r\n\t\t */\r\n\t\tint lenCorr = Integer.parseInt(textfieldLenCorrection.getText());\r\n\t\tif (lenCorr < minRequiredDataPoints) {\r\n\t\t\tString message = \"The length correction \\\"\" + lenCorr\r\n\t\t\t\t\t+ \"\\\" has to be \"\r\n\t\t\t\t\t+ \"a positive \\nnumber and larger or equals to \"\r\n\t\t\t\t\t+ minRequiredDataPoints + \".\";\r\n\t\t\tString title = \"Invalid length correction\";\r\n\t\t\tJOptionPane.setDefaultLocale(Locale.ENGLISH);\r\n\t\t\tJOptionPane.showMessageDialog(null, message, title,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/**\r\n\t\t * Check the uniqueness of the profile names.\r\n\t\t */\r\n\t\tif (!checkProfileNameUniqueness(true)) {\r\n\t\t\tthis.setVisible(false);\r\n\t\t\tenableAccessToImpProfile = true;\r\n\t\t} else {\r\n\t\t\tif (!checkProfileNameUniqueness(false)) {\r\n\t\t\t\tthis.setVisible(false);\r\n\t\t\t\tenableAccessToImpProfile = true;\r\n\t\t\t} else {\r\n\t\t\t\tString message = \"There are still profile names that occur\"\r\n\t\t\t\t\t\t+ \" repeatedly.\\nPlease ensure that the profile\"\r\n\t\t\t\t\t\t+ \" names are globally unique.\";\r\n\t\t\t\tString title = \"Duplicate profile names\";\r\n\t\t\t\tJOptionPane.setDefaultLocale(Locale.ENGLISH);\r\n\t\t\t\tJOptionPane.showMessageDialog(null, message, title,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Then(\"^User should see a predefined alert box$\")\r\n\tpublic void user_should_see_a_predefined_alert_box() throws Throwable {\n\t\tSystem.out.println(\"Alert message pop-ups on the screen\");\r\n\t}", "private void showErrors() {\n \t\tfor (Iterator it = this.errors.iterator(); it.hasNext();) {\n \t\t\ttry {\n \t\t\t\tObject err = it.next();\n \t\t\t\t\n \t\t\t\t/* errors can be represented by PositionedError, UnpositionedError or String */\n \t\t\t\tif (err instanceof PositionedError) {\n \t\t\t\t\tPositionedError error = (PositionedError)err;\n \t\t\t\t\tTokenReference token = error.getTokenReference();\n \t\n \t\t\t\t log.debug(\"file: \" + token.getFile() + \", \" + \"line: \" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\t\t\t\t\t+ token.getLine() + \", \" + \"path: \" //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t\t\t\t\t+ token.getPath());\n \n \t\t\t\t\tIResource resource = ProjectProperties.findResource(token\n \t\t\t\t\t\t\t.getPath().getAbsolutePath(), currentProject);\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = null;\n \t\t\t\t\tif (resource != null) {\n \t\t\t\t\t\tmarker = resource.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t\tif (token.getLine() > 0) {\n \t\t\t\t\t\t\tmarker.setAttribute(IMarker.LINE_NUMBER, token.getLine());\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\t// for the cases, when error refers to a generated piece of code\n \t\t\t\t\t\tmarker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t}\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, error\n \t\t\t\t\t\t\t.getFormattedMessage().getMessage());\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(\n \t\t\t\t\t\t\tIMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t\telse { /* create unpositioned error at the scope of the project */\t\t\t\t\t\n \t\t\t\t\tString msg;\n \t\t\t\t\tif (err instanceof UnpositionedError) {\n \t\t\t\t\t\tmsg = ((UnpositionedError)err).getFormattedMessage().getMessage();\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tmsg = (String)err; // for internal errors\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, msg);\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t} \n \t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}", "public void showWinMessage() {\n\n\t}", "public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "@Override\n protected boolean verifySelection()\n {\n // Print the log contents table\n logTable.printTable(\"Log Data: \"\n + perfLog.getLogFileName(perfMain.getPreference(PERF_LOG_FILE)),\n this,\n OrientationRequested.LANDSCAPE);\n\n return false;\n }", "private void ShowRetrievedErrorPopupDialog(){\n ShowWhaitSpinner();\n //there is an error, show popup message\n Context context;\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setMessage(R.string.error_message_download_resources)\n .setCancelable(false)\n .setPositiveButton(R.string.ok_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n startActivity(new Intent(getContext(), MainActivity.class));\n }\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n\n }", "@Override\n public void showError() {\n }", "public void errorWindow(int i) {\n Alert alert = new Alert(AlertType.INFORMATION);\n if (i == 1) {\n alert.setTitle(\"Missing partID\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter Part ID\");\n alert.showAndWait();\n }\n if (i == 2) {\n alert.setTitle(\"Missing part name!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter part name\");\n alert.showAndWait();\n }\n if (i == 3) {\n alert.setTitle(\"Enter Price!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter price of item\");\n alert.showAndWait();\n }\n if (i == 4) {\n alert.setTitle(\"Max items not entered!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter max items\");\n alert.showAndWait();\n }\n if (i == 5) {\n alert.setTitle(\"Min items not entered!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Enter min items\");\n alert.showAndWait();\n }\n if (i == 6) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Min cant be more then max.\");\n alert.showAndWait();\n }\n if (i == 7) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Inv cant be more then max or less than min.\");\n alert.showAndWait();\n }\n if (i == 8) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Inv cant be less then min.\");\n alert.showAndWait();\n }\n if (i == 9) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Machine ID and Company name cant be empty.\");\n alert.showAndWait();\n }\n if (i == 10) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Must enter inv\");\n alert.showAndWait();\n }\n if (i == 11) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Must enter Integer value for max, min, Machine ID, and inv.\\nEnter a double for cost\");\n alert.showAndWait();\n }\n if (i == 12) {\n alert.setTitle(\"Invalid Entry!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Min cannot be less then 0!\");\n alert.showAndWait();\n }\n }", "public boolean verifyAdd() {\n\t\treturn projTable.findElement(By.linkText(nameOfProject)).isDisplayed();\n\t}", "@Then(\"^display result window$\")\n public void display_result_window() throws Throwable {\n \tSystem.out.println(\"display_result_window\");\n \n }", "@Given(\"^Browser will open with the show alert box$\")\r\n\tpublic void browser_will_open_with_the_show_alert_box() throws Throwable {\n\t\tSystem.out.println(\"Browser show alert box button\");\r\n\t}", "private void viewRepositoryCheckReportButtonActionPerformed() {\n ImportExportLogDialog logDialog = null;\n\n if(ascopyREC != null && checkRepositoryMismatch) {\n logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, ascopyREC.getCurrentRecordCheckMessage());\n logDialog.setTitle(\"Current Repository Mismatch Errors\");\n } else {\n logDialog = new ImportExportLogDialog(null, ImportExportLogDialog.DIALOG_TYPE_IMPORT, repositoryMismatchErrors);\n logDialog.setTitle(\"Repository Mismatch Errors\");\n }\n\n logDialog.showDialog();\n }", "void displayNoItemsSelectedErrorMessage();", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // Emptry node name\r\n if (jtfChildName.getText().isEmpty()) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutName\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public void popUpEmptyTextView() {\n final Intent intent = new Intent(this, AddUserDetailsActivity.class);\n AlertDialog alertDialog = new AlertDialog.Builder(AddUserDetailsActivity.this).create();\n alertDialog.setTitle(\"ERROR\");\n alertDialog.setMessage(\"One of the fields have been left empty, please try again.\"\n );\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n //Intent intent = new Intent(this, AddUserDetailsActivity.class);\n startActivity(intent);\n finish();\n\n }\n });\n alertDialog.show();\n }", "public boolean loadMessageBox(){\n boolean isMessagebox = true;\n byte tempType = CustomCanvas.msgType;\n CustomCanvas.msgType = -1;\n \n if(tempType == 0){\n tempType = 1;\n } else if(tempType == 20) {\n tempType = 16;\n }\n if (tempType == 1 || tempType == 2 || tempType == 3 || tempType == 16) {\n isMessagebox = false;\n }\n handleSmartPopup(tempType);\n return isMessagebox;\n }", "private void ImproperFillOutException() {\n JOptionPane.showMessageDialog(null, \"Fill out the form properly\");\n }", "private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }", "private void showThatNotEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"Only the original creator may edit their recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Sorry\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "private void showMessage(int position) {\n // Open Bottom sheet and show details\n }", "private String checkPath(String p, Integer line, Integer col, String msg, String source, Integer errorCode)\n\t{\n\t\tboolean result = !this.source.getNameForReporting().equals(p) &&\n\t\t\t\t\t\t !this.source.isIncludedFile(p);\n\t\t\t\t\t\t // !this.source.getCompilationUnit().getAssets().exists(p);\n\t\t\n\t\tif (result)\n\t\t{\n\t\t\treturn (new StringBuilder(\" [\")\n\t\t\t\t.append(new GeneratedCodeMarker().getMessage())).append(\": \")\n\t\t\t\t.append(new PathInfo(p).getMessage()).append(\", \")\n\t\t\t\t.append(new LineInfo(line == null ? 0 : line.intValue()).getMessage()).append(\", \")\n\t\t\t\t.append(new ColumnInfo(col == null ? 0 : col.intValue()).getMessage()).append(\"]\")\n\t\t\t\t.toString();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public boolean hasErrors();", "private void promptAddSeed()\n {\n String seedURL = JOptionPane.showInputDialog(null, \"Enter a valid URL\", \"Add URL\", JOptionPane.INFORMATION_MESSAGE);\n \n if(seedURL == null) return;\n \n if(!Spider.validateURL(seedURL))\n JOptionPane.showMessageDialog(null, \"Invalid URL\");\n else\n {\n spider.addSeedURL(seedURL);\n urlModel.addElement(seedURL);\n }\n }", "public void triggerPopup();", "public void VerifyShowOnlyInkAndTonerLink(String text){\r\n\t\tString Text = getValue(text);\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+Text);\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Show Only Ink And Toner Link - '\"+Text+\"' should be displayed\");\r\n\t\ttry{\r\n\t\t\tif(getText(locator_split(\"lnkShowOnlyInkAndToner\")).equalsIgnoreCase(Text)){\r\n\t\t\t\tReporter.log(\"PASS_MESSAGE:- Show Only Ink And Toner Link - '\"+Text+\"' is displayed\");\r\n\t\t\t\tSystem.out.println(\"Verified the Text -\"+Text);\r\n\t\t\t}else {\r\n\t\t\t\tReporter.log(\"FAIL_MESSAGE:- Show Only Ink And Toner Link - '\"+Text+\"' is not displayed\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Show Only Ink And Toner Link - '\"+Text+\"' is not displayed\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with \"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkShowOnlyInkAndToner\").toString().replace(\"By.\", \" \")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\t}", "boolean hasError();", "boolean hasError();", "boolean hasError();", "private void detectionPDF() {\n\t\tif (sourcePDF.getText().equals(\"\")){\n\t\t\tlockButton();\n\t\t\tmessage.setText(\"<html><span color='red'>Pas de PDF</span></html>\");\n\t\t}\n\t\telse{\n\t\t\tif(new File(sourcePDF.getText()).exists()){\n\t\t\t\tmessage.setText(\"<html><head><meta charset=\\\"UTF-8\\\"><span color='green'>Fichier PDF détecté</span></html>\");\n\t\t\t\tunlockButton();\n\t\t\t}\n\t\t\telse\n\t\t\t\tmessage.setText(\"<html><span color='red'>le fichier \"+ sourcePDF.getText() +\" n'existe pas</span></html>\");\n\t\t}\n\t}", "public void onShowPopupNoSearchCriteria() {\n int left = view.getSearchContent().getElement().getAbsoluteLeft();\n int top = view.getSearchContent().getElement().getAbsoluteTop() + 40;\n VerticalPanel vp = new VerticalPanel();\n vp.addStyleName(StyleResource.INSTANCE.modal().suggestModal());\n vp.add(new Label(Storage.MSGS.searchNoSearchingCriteria()));\n PopupPanel popup = new PopupPanel(true);\n popup.setWidget(vp);\n popup.setPopupPosition(left, top);\n popup.show();\n }", "public void showUnsolvableMessage() {\n\t\tJOptionPane.showMessageDialog(frame, \"Det angivna sudokut är olösbart\");\n\t}", "boolean hasErrors();", "public boolean validateMenuItems(CwSession cwSession){\n idAnyNonExistingCpMenuItem(cwSession)\n .ifPresent(id -> {throw new RecordNotFoundException(String.format(MENU_ITEM_NOT_FOUND_WITH_ID,id));});\n return true;\n }", "boolean hasDynamicLineup();" ]
[ "0.60520047", "0.5520872", "0.54735667", "0.54620653", "0.5453038", "0.54119265", "0.53991556", "0.5394867", "0.53805554", "0.5375235", "0.53418934", "0.5330941", "0.52811795", "0.5262463", "0.52594596", "0.52517253", "0.5232735", "0.52150196", "0.5209241", "0.51916224", "0.51655763", "0.51519585", "0.51482475", "0.5143049", "0.513166", "0.5130177", "0.51208615", "0.511306", "0.5112244", "0.5099788", "0.509366", "0.50871015", "0.5049821", "0.5042864", "0.50389045", "0.50347775", "0.502893", "0.5018789", "0.50179255", "0.5013007", "0.5005878", "0.49958536", "0.4991489", "0.49878934", "0.49862838", "0.4977772", "0.4977009", "0.4975328", "0.49727345", "0.4969565", "0.49693233", "0.49668345", "0.49611616", "0.49544412", "0.49502215", "0.49446198", "0.49428326", "0.4937696", "0.4936117", "0.4929811", "0.49194315", "0.49170706", "0.49140945", "0.49140945", "0.4908097", "0.49079832", "0.48977178", "0.4897191", "0.48970544", "0.4894072", "0.4891749", "0.48910964", "0.48896843", "0.48877212", "0.48841545", "0.4881206", "0.48799792", "0.48776835", "0.48750725", "0.48737568", "0.48644757", "0.48631173", "0.48545042", "0.48505694", "0.48502517", "0.48456144", "0.48391604", "0.4833417", "0.4831374", "0.48304373", "0.48270616", "0.482595", "0.48238635", "0.48238635", "0.48238635", "0.48186544", "0.48182037", "0.48176792", "0.48161253", "0.48136437", "0.48109603" ]
0.0
-1
Add event code here...
public void quoteNavigationDialogEvent(DialogEvent dialogEvent) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "Event () {\n // Nothing to do here.\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\t \n\t\t\t}", "private void createEvents() {\n\t}", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\n\t\t\t}", "public void simpleEvent() {\n AdGyde.onSimpleEvent(\"SimpleEventID\");\n Toast.makeText(this, \"Simple event clicked\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "void onNewEvent(Event event);", "private void eventhandler() {\n\r\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event event) {\n\t\t\n\t}", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "BasicEvents createBasicEvents();", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "@Override\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t}", "public void addEvPEC(Event ev);", "@Override\r\n\tpublic void handleEvent(Event event) {\n\r\n\t}", "public void setEventName(String name);", "public void consulterEvent() {\n\t\t\n\t}", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "void event(Event e) throws Exception;", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "void onApplicationEvent(ApplicationEvent e);", "public void runEvent();", "void addSetupEvent(SetupEvent setupEvent);", "@Override\n\tpublic void processEvent(Event e) {\n\n\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "private void initializeEvents() {\r\n\t}", "void addEventRegistrationCallback(EventRegistrationCallback eventRegistrationCallback);", "public void processEvent(Event event) {\n\t\t\n\t}", "public void handleEvent(Event event) {\n\t\t\t\t}", "@Override\r\n public void onEvent(FlowableEvent event) {\n }", "public String getEventName();", "@Override\n\tpublic void loadEvents() {\n\t\t\n\t}", "@Override\n\tpublic void handleEvent(Event arg0) {\n\t\t\n\t}", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "void eventChanged();", "public void ingresar_a_la_Opcion_de_eventos() {\n\t\t\n\t}", "@Override\n\tprotected void onEventComming(EventCenter eventCenter) {\n\t}", "void setEvent(com.walgreens.rxit.ch.cda.EIVLEvent event);", "void doEvent(LightEvent what);", "@Override\n public void onCustomEvent(CustomEvent customEvent) {\n }", "private void createEvents() {\n\t\taddBtn.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbuildOutput();\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void handle(Event event) {\n }", "private void addEvents() {\n\t mlv.getMapNotesOverlay().addEventListener(new NoteSelectedListener()\n {\n\t \t\n\t\t\t@Override\n\t\t\tpublic void handleNoteSelectedEvent(EventObject e, Group gr) {\n\t\t\t\t//We have to go to gallery because the user has select a (groups) note\n\t\t\t\tselectedGroup = gr;\n\t\t\t\tonClick(mlv);\n\t\t\t}\n \t\n });\t\t\t\t\n\t\t\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "public String execute() {\n\t\ttry {\n\t\t\treturnMsg = MESSAGE_EVENT_ADDED;\n\t\t\tcheckEventClash();\n\t\t\tstoreEvent();\n\t\t\treturn returnMsg;\n\t\t} catch (IOException e) {\n\t\t\treturn MESSAGE_EVENT_ERROR;\n\t\t} finally {\n\t\t\tupdateView();\n\t\t\tMagical.setCurrentTab(\"events\");\n\t\t}\n\t}", "public void startNewEvent() {\n // JCudaDriver.cuEventRecord(cUevent,stream);\n }", "protected void onEvent(DivRepEvent e) {\n\t\t}", "protected void onEvent(DivRepEvent e) {\n\t\t}", "@Override\n public void onEvent(Event t) throws CSenseException {\n }", "public void registerEvents()\n {\n \t\tfinal pchestPlayerListener playerListener = new pchestPlayerListener(this, chestManager);\n \t\tfinal pchestEntityListener entityListener = new pchestEntityListener(this, chestManager);\n \t\tfinal pchestBlockListener blockListener = new pchestBlockListener(this, chestManager);\n \t\t\n \t\t\n pm = getServer().getPluginManager();\n \n /* Entity events */\n pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n \n /* Player events */\n pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n \n /* Block events */\n \t\tpm.registerEvent(Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n \t\tpm.registerEvent(Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n \n \t\t\n /* Spout Required events */\n \t\tif(SpoutLoaded)\n \t\t{\n \t\t\tfinal pchestInventoryListener inventoryListener = new pchestInventoryListener(this, chestManager);\n \n \t /* Inventory events */\n \t\t\tpm.registerEvent(Type.CUSTOM_EVENT, inventoryListener, Event.Priority.Normal, this);\n \t\t}\n }", "public void createGenesisEvent() {\n handleNewEvent(buildEvent(null, null));\n }", "public void runInUi(ElexisEvent ev){}", "private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickListener(this);\r\n\t\tlayout_ssmm.setOnClickListener(this);\r\n\t\ttxt_myredpager.setOnClickListener(this);\r\n\t}", "private void registerEvents() {\n MouseEventHandler handler = new MouseEventHandler();\n setOnMousePressed(handler);\n setOnMouseReleased(handler);\n setOnMouseMoved(handler);\n setOnMouseEntered(handler);\n setOnMouseExited(handler);\n\n }", "public void TopDreiEvent();", "void onEvent (ZyniEvent event, Object ... params);", "BasicEvent createBasicEvent();", "void onBusEvent(Event event);", "public void SimAdded(AddSimEvento event);", "@Override\n\t\tprotected void onEvent(DivRepEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void handleEvent(EnOceanMessage data) {\n\t}", "@Override\n protected void initEventAndData() {\n }", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void seeEvent(Player p, String s) {\n\t\t\t\t\r\n\t\t\t}", "private void registerEvents(){\n Bukkit.getPluginManager().registerEvents(new RegionListener(), this);\n Bukkit.getPluginManager().registerEvents(new SignListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonerListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonBlockListener(), this);\n Bukkit.getPluginManager().registerEvents(new MonitorListener(), this);\n Bukkit.getPluginManager().registerEvents(new PortalListener(), this);\n }", "Event createEvent();", "Event createEvent();", "public void add(GameEvent e);", "@Override\n public void onReady(ReadyEvent event) {\n\n }", "public void createEvents(){\r\n\t\tbtnCurrent.addActionListener((ActionEvent e) -> JLabelDialog.run());\r\n\t}", "EventUse createEventUse();", "void eventStart(String key);", "public void handle_GlobalEvents(int code)\r\n {\r\n int type = (int) (-(short) (code & 0xFFFF));\r\n int cond = -(int) (short) (code >>> 16);\r\n int num = listPointers[rhEvents[type] + cond];\r\n if (num != 0)\r\n {\r\n computeEventList(num, null);\t\t// Evalue les evenements\r\n }\r\n }", "public void frameworkEvent(FrameworkEvent event);", "private void registerEvents(){\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t//PlayerListener stuff\r\n\t pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\r\n\t //BlockListener stuff\r\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\r\n //EntityListener stuff\r\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\r\n //ServerListener stuff\r\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, this);\r\n }", "Event getEvent();", "private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}", "static void addEventMetadata(Event event) {\n event.setSessionId(AssociationController.getSessionId());\n event.setAppInstallId(Prefs.INSTANCE.getAppInstallId());\n event.setDt(DateUtil.iso8601DateFormat(new Date()));\n }", "private void createMainEvents() {\n\t\taddWindowListener(new WindowAdapter() {\n\t\t\t@Override\n\t\t\tpublic void windowClosing(WindowEvent arg0) {\n\t\t\t\tjdbc.closeSQLConnection();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtn_settings.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t}\n\t\t});\n\n\t}", "private void initEvent() {\n\t\tmBtnPower.setOnClickListener(this);\n\t\tmBtnProfile.setOnClickListener(this);\n\t\tmBtnArea.setOnClickListener(this);\n\t\tmBtnSkipTime.setOnClickListener(this);\n\t\tmBtnFrequencyPoint.setOnClickListener(this);\n\t\tmBtnAlgorithm.setOnClickListener(this);\n\t}", "private void addNewMember(Event x) {\r\n \r\n \r\n \r\n }", "ProgramEventEvent createProgramEventEvent();", "public abstract void processEvent(Object event);", "protected void addEvent(BaseEvent event) {\n\t\tlevelEvent.add(event);\n\t}", "@Override\n public void onTangoEvent(TangoEvent event) {\n }" ]
[ "0.7133789", "0.6999529", "0.69949776", "0.69949776", "0.69066507", "0.68845415", "0.68496764", "0.68496764", "0.68496764", "0.68496764", "0.68496764", "0.68445176", "0.6841186", "0.6839083", "0.68375826", "0.6829158", "0.6829158", "0.6806268", "0.67489874", "0.67483705", "0.67330945", "0.67330945", "0.67330945", "0.6696915", "0.6691523", "0.66237545", "0.66221136", "0.6616948", "0.6610452", "0.65551186", "0.65292954", "0.65292954", "0.6515509", "0.6499281", "0.64946544", "0.6494281", "0.6483362", "0.6483362", "0.64762384", "0.64099175", "0.63998145", "0.63992494", "0.63728", "0.63670576", "0.6324887", "0.6280758", "0.6279538", "0.627466", "0.62657636", "0.6250024", "0.62469596", "0.62469566", "0.6240522", "0.6195508", "0.61817104", "0.61608946", "0.6154626", "0.6145748", "0.6145748", "0.6144158", "0.612856", "0.6109464", "0.6109464", "0.61044276", "0.6101573", "0.6097203", "0.6094051", "0.6093904", "0.6071259", "0.60687923", "0.60674536", "0.6066374", "0.6050216", "0.6045113", "0.60358125", "0.60318404", "0.6020697", "0.60107666", "0.60107666", "0.60107666", "0.6007996", "0.599774", "0.599774", "0.5995161", "0.5986446", "0.5983016", "0.5979936", "0.5976981", "0.5967108", "0.5961134", "0.5957285", "0.5945582", "0.5927322", "0.59157723", "0.59101313", "0.59044987", "0.5902747", "0.59004986", "0.5898207", "0.5897558", "0.5896313" ]
0.0
-1
Step is a singular (quantized) "turn" the elevator can make In one step the elevator can EITHER: open the door, leave people and delete current job OR close the door, change state and move
public void step(){ if (this.jobs.contains(this.currentFloor)){ //we arrived at our destination this.openDoor(); this.leavePeople(); this.deleteJob(this.currentFloor); } else { this.closeDoor(); this.changeState(); this.move(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }", "private PlayerAction moveStep(Node node, Hero hero, Room room) {\n\t\treturn null;\n\t}", "public void takeStep() {\n \t//System.out.println(\"\"+Math.abs(rmd.nextInt()%4));\n \tswitch(rmd.nextInt(4)){\t\n \tcase 0:\n \t\tcurPoint = curPoint.translate(-stepSize, 0);//go right\n \t\tbreak;\n \tcase 1:\n \t\tcurPoint = curPoint.translate(0, stepSize);//go down\n \t\tbreak;\n \tcase 2:\n \t\tcurPoint = curPoint.translate(stepSize, 0);//go left\n \t\tbreak;\n \tcase 3:\n \t\tcurPoint = curPoint.translate(0, -stepSize);//go up\n \t\tbreak;\n \t}\n }", "public void takeStep() {\n \tRandom rand = new Random();\n\t\tint number = rand.nextInt(4);\n\t if(number == 0) {\n\t \tmoveNorth();\n\t \t}\n\t \telse if(number == 1) {\n\t \t\tmoveSouth();\n\t \t}\n \telse if(number == 2) {\n \t\tmoveWest();\n\t }\n\t \telse if(number == 3) {\n\t \t\tmoveEast();\n\t \t}\n }", "public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }", "@Override\n public void timePassed() {\n moveOneStep();\n }", "@Override\n\tpublic int takeStep() {\n\t\tif (porteroDerecho){\n\t\t\t\n\t\t\t// Si me alejor de la porteria, volver\n\t\t\tif (myRobotAPI.getPosition().x < 0.9)\n\t\t\t\tmyRobotAPI.setSteerHeading(myRobotAPI.getOpponentsGoal().t);\n\t\t\t// Sino, ir a bloquear al portero\n\t\t\telse{\n\t\t\t\tmyRobotAPI.setSteerHeading(myRobotAPI.getClosestOpponent().t);\n\t\t\t\t//myRobotAPI.blockGoalKeeper(); // JA! No bloquea, solo marea los robots!\n\t\t\t\t\n\t\t\t\t// Aņadido para que si tiene la pelota cerca, deje de bloquear e intente chutar\n\t\t\t\tif (myRobotAPI.closestToBall()){\n\t\t\t\t\tmyRobotAPI.setSteerHeading(balon.t);\n\t\t\t\t\tmyRobotAPI.setBehindBall(myRobotAPI.getOpponentsGoal());\n\t\t\t\t\tif (myRobotAPI.alignedToBallandGoal())\n\t\t\t\t\t\tmyRobotAPI.kick();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// Sino, el portero a bloquear es el del campo izquierdo...\n\t\telse {\n\t\t\t// Si me alejor de la porteria, volver\n\t\t\tif (myRobotAPI.getPosition().x > -0.9)\n\t\t\t\tmyRobotAPI.setSteerHeading(myRobotAPI.getOpponentsGoal().t);\n\t\t\t// Sino, ir a bloquear al portero\n\t\t\telse {\n\t\t\t\tmyRobotAPI.setSteerHeading(myRobotAPI.getClosestOpponent().t);\n\t\t\t\t//myRobotAPI.blockGoalKeeper(); // JA! No bloquea, solo marea los robots!\n\t\t\t\t\n\t\t\t\t// Aņadido para que si tiene la pelota cerca, deje de bloquear e intente chutar\n\t\t\t\tif (myRobotAPI.closestToBall()){\n\t\t\t\t\tmyRobotAPI.setSteerHeading(balon.t);\n\t\t\t\t\tmyRobotAPI.setBehindBall(myRobotAPI.getOpponentsGoal());\n\t\t\t\t\tif (myRobotAPI.alignedToBallandGoal())\n\t\t\t\t\t\tmyRobotAPI.kick();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tmyRobotAPI.setSpeed(1.0);\t\t// Empotramos para bloquear xD\n\t\t\n\t\treturn 0;\n\t}", "private void doStep() {\n // Add some variables to increase readability.\n int left = RotorPosition.LEFT.ordinal();\n int middle = RotorPosition.MIDDLE.ordinal();\n int right = RotorPosition.RIGHT.ordinal();\n\n //TODO see if this method can be optimized at all\n if (rotors[right].isAtTurnoverPosition()) {\n // Normal stepping.\n if (rotors[middle].isAtTurnoverPosition()) {\n if (rotors[left].isAtTurnoverPosition()) {\n reflector.doStep();\n }\n rotors[left].doStep();\n }\n rotors[middle].doStep();\n } else {\n // Handle the double stepping anomaly.\n if (rotors[middle].isAtTurnoverPosition() && rotors[middle].justStepped()) {\n rotors[left].doStep();\n rotors[middle].doStep();\n }\n }\n rotors[right].doStep();\n }", "public void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator through each floor. \n\t\t\tif (getTotalPassDestFloor()[currentFloor] >0 || destRequest[currentFloor] == 'Y')this.stop(); \t//Checks for the destined passengers or registered request for the current floor.\n\t\t\tif (currentDirection == \"UP\") currentFloor++; else currentFloor--;\t\t\t\t\t\t\t//Moves the elevator up/down based on the direction\n\t\t}\n\t\tif (currentFloor == 8) currentFloor--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Adjusts currentfloor value when elevator-\n\t\tif (currentFloor == 0) currentFloor++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//-is at first or top most floor\n\t}", "public void step();", "public void step();", "public void timePassed() {\n this.moveOneStep();\n }", "void move(int steps);", "public boolean stepLevel(){\n //Steps the room\n current_room_idx = current_room_idx + 1;\n highest_room_unlocked = Math.min(rooms.length-1, Math.max(highest_room_unlocked, current_room_idx));\n if(current_room_idx == rooms.length){\n current_room_idx = 0;\n return true;\n }\n current_room = rooms[current_room_idx];\n return false;\n }", "public void act() {\n\n\tif (0 == stepCount) {\n\n\t ArrayList<Location> node = new ArrayList<Location>();\n\t node.add(getLocation());\n\t crossLocation.push(node);\n\t}\n\n\tboolean willMove = canMove();\n\tif (isEnd == true) {\n\t //to show step count when reach the goal\t\t\n\t if (hasShown == false) {\n\t\tString msg = stepCount.toString() + \" steps\";\n\t\tJOptionPane.showMessageDialog(null, msg);\n\t\thasShown = true;\n\t }\n\t} else if (willMove) {\n\t\n\t move();\n\t //increase step count when move \n\t stepCount++;\n\t} else {\n\t \n\t back();\n\t stepCount++;\n\t}\n\n }", "@Override\r\n\tpublic void step(SimState state) {\r\n\r\n\t}", "protected void takeStep(Path.Step s, Main m) {\n if (map.hasObstacle(s.getX(), s.getY())) {\n // place bomb, move to safety\n player.placeBomb(map);\n }\n else { // move regularly\n if (!m.theMap.hasFire(s.getX(), s.getY())) {\n player.move(s.getX() - this.player.getX(), s.getY() - this.player.getY(), m);\n }\n }\n }", "@Override\n\tpublic void doTimeStep() {\n\t\tint activity = Critter.getRandomInt(3);\n\t\tif(activity == 0) {\n\t\t\twalk(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(activity == 1) {\t\t\t\t\n\t\t\trun(Critter.getRandomInt(8));\n\t\t\tthis.moveFlag = true;\n\t\t}\n\t\telse if(this.getEnergy() >= Params.min_reproduce_energy) {\n\t\t\tCritter4 egg = new Critter4();\n\t\t\tthis.reproduce(egg,Critter.getRandomInt(8));\n\t\t}\n\t\telse {\n\t\t}\n\t}", "public interface Elevator {\n public static final int UP = 1, LEVEL = 0, DOWN = -1, ERROR = -2;\n /** Returns the minimal floor number to which this Elevator can reach(often a negative value).\n * This is the same value as the lowest floor in the building - this elevator belongs to. */\n public int getMinFloor();\n /** Returns the maximal floor number to which this Elevator can reach.\n * This is the same value as the highest floor in the building - this elevator belongs to. */\n public int getMaxFloor();\n /** Returns the time (in seconds it takes the Elevator to open its doors. */\n public double getTimeForOpen();\n /** Returns the time (in seconds it takes the Elevator to close its doors */\n public double getTimeForClose();\n /** Returns the Elavator's current state: {UP, DOWN, LEVEL, ERROR} the state \"LEVEL\" mark that the elevator has reached the floor -\n * and is now ready to load / unload and get new orders. */\n public int getState(); // UP, DOWN, LEVEL, ERROR\n /** Returns the Elevator's current position (floor) as an Integer. */\n public int getPos();\n /** Moves the elevator form the current position to the destination floor. */\n public boolean goTo(int floor);\n /** Allows the elevator to stop in an intermidiate floor between src and dest, assumeing the elevator has not yer pass the desired floor in which it needs to stop. */\n public boolean stop(int floor);\n /** Returns the speed (in floor per second), e.g. if the Elevator speed is 0.4 - it takes it 2.5 seconds to pass a single floor. */\n public double getSpeed();\n /** Return the time in seconds that it takes the elevator to start moving in full speed (assumed to be a fixed value). */\n public double getStartTime();\n /** Return the time in seconds that it takes the elevator to stop moving in full speed (assumed to be a fixed value).*/\n public double getStopTime();\n /**\n * @return the id of this elevator (simple index as in the building).\n * Note: this index should be the same as in the elevator allocation algorithm.\n */\n public int getID();\n}", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "@Override\n\tpublic void step(SimState state)\n\t{\n\t\tPedSimCity stateSchedule = (PedSimCity) state;\n\t\tminutesSoFar += UserParameters.minutesPerStep;\n\n\t\tif (UserParameters.activityBased && minutesSoFar == UserParameters.endingHour) {\n\t\t\tSystem.out.println(\"End of the day - calling finish\");\n\t\t\tstateSchedule.finish();\n\t\t}\n\t\telse if ((reachedDestination || destinationNode == null) && !UserParameters.activityBased) {\n\n\t\t\tif (reachedDestination)\treachedDestination = false;\n\t\t\tif ((numTrips == ap.OD.size() && !UserParameters.empiricalABM) || (UserParameters.empiricalABM && this.numTrips == UserParameters.numTrips)) {\n\t\t\t\tstateSchedule.agentsList.remove(this);\n\t\t\t\tif (stateSchedule.agentsList.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"calling finish\");\n\t\t\t\t\tstateSchedule.finish();\n\t\t\t\t}\n\t\t\t\tkillAgent.stop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (UserParameters.empiricalABM) {\n\t\t\t\toriginNode = destinationNode = null;\n\t\t\t\twhile (originNode == null) originNode = NodesLookup.randomNode(PedSimCity.network);\n\t\t\t\twhile (destinationNode == null)\tdestinationNode = NodesLookup.randomNodeBetweenLimits(PedSimCity.network, originNode,\n\t\t\t\t\t\tUserParameters.minDistance, UserParameters.maxDistance);\n\t\t\t}\n\t\t\telse {\n\t\t\t\toriginNode = (NodeGraph) ap.OD.get(numTrips).getValue(0);\n\t\t\t\tdestinationNode = (NodeGraph) ap.OD.get(numTrips).getValue(1);\n\t\t\t}\n\t\t\tupdatePosition(originNode.getCoordinate());\n\t\t\tfindNewAStarPath(stateSchedule);\n\t\t\treturn;\n\t\t}\n\t\telse if (UserParameters.activityBased) {\n\t\t\tap.totalTimeAway += UserParameters.minutesPerStep;\n\t\t\tif (!reachedDestination & !ap.atPlace) keepWalking();\n\t\t\telse {\n\t\t\t\tActivityPlanner activityPlanner = new ActivityPlanner();\n\t\t\t\tactivityPlanner.checkRoutine(state, this);\n\t\t\t\tif (ap.atPlace) return;\n\t\t\t}\n\t\t}\n\t\telse keepWalking();\n\t}", "public void step() {\n\t\tint step = rand.nextInt(2);\n\t\t\n\t\tif (step==0) {\n\t\t\t\n\t\t\tPoint moveRight = new Point(++x,y);\n\t\t\t\n\t\t\tif(x<=size-1) {\n\t\t\t\tpath.add(moveRight);\n\t\t\t}\n\t\t\telse --x;\n\t\t}\n\t\telse { \n\t\t\tPoint topStep = new Point(x,--y);\n\t\t\t\n\t\t\tif(y>=0) {\n\t\t\t\tpath.add(topStep);\n\t\t\t}\n\t\t\telse ++y;\n\t\t}\n\t\tif (x==size-1 && y==0) {\n\t\t\tsetDone(true);\n\t\t}\n\t\t\n\t\t\n\t}", "@Test\n\tpublic void testStep() {\n\t\tsimulator.step();\n\t\tassertEquals(0, (int)simulator.averageWaitTime());\n\t\tassertEquals(0, (int)simulator.averageProcessTime());\n\t\tassertEquals(false, simulator.packageLeftSimulation());\n\t\tassertEquals(0, simulator.getCurrentIndex());\n\t\tassertEquals(true, simulator.moreSteps());\n\n\t\tfor (int i = 0; i < 28; i++) {\n\t\t\tsimulator.step();\n\t\t}\n\t\tassertEquals(287, (int)(simulator.averageWaitTime() * 100));\n\t\tassertEquals(1525, (int)(100 * simulator.averageProcessTime()));\n\t\tassertEquals(false, simulator.packageLeftSimulation());\n\t\tassertEquals(0, simulator.getCurrentIndex());\n\t\tassertEquals(true, simulator.moreSteps());\n\t\t\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\tsimulator.step();\n\t\t}\n\t\tassertEquals(614, (int)(simulator.averageWaitTime() * 100));\n\t\tassertEquals(1457, (int)(100 * simulator.averageProcessTime()));\n\t\tassertEquals(true, simulator.packageLeftSimulation());\n\t\tassertEquals(0, simulator.getCurrentIndex());\n\t\tassertEquals(true, simulator.moreSteps());\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tsimulator.step();\n\t\t}\n\t\tassertEquals(false, simulator.moreSteps());\t\n\t}", "public void makeSimulationStep() {\n for (ElevatorController controller : elevatorControllers.values()) {\n controller.makeOneStep();\n }\n }", "abstract void move_elevator();", "public static void move()\n\t{\n\t\tswitch(step)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 1;\n\t\t\tbreak;\n\t\t\t// 1. Right wheels forward\n\t\t\tcase 1:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, .5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 2;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 3;\n\t\t\tbreak;\n\t\t\t// 2. Right wheels back\n\t\t\tcase 3:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, -.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 4;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 5;\n\t\t\tbreak;\n\t\t\t// 3. Left wheels forward\n\t\t\tcase 5:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 6;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 7;\n\t\t\tbreak;\n\t\t\t// 4. Left wheels back\n\t\t\tcase 7:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(-.5, 0);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 8;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 9;\n\t\t\tbreak;\n\t\t\t// 5. Intake pick up\n\t\t\tcase 9:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tshoot(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 10;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttimer.start();\n\t\t\t\tstep = 11;\n\t\t\tbreak;\n\t\t\t// 6. Intake shoot\n\t\t\tcase 11:\n\t\t\t\tif(timer.get() < time)\n\t\t\t\t{\n\t\t\t\t\tsetSpeed(0, 0);\n\t\t\t\t\tpickUp(.5);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttimer.reset();\n\t\t\t\t\tstep = 12;\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t// Stop and reset everything\n\t\t\tcase 12:\n\t\t\t\tsetSpeed(0, 0);\n\t\t\t\tpickUp(0);\n\t\t\t\tshoot(0);\n\t\t\t\ttimer.reset();\n\t\t\tbreak;\n\t\t}\n\t}", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "public void step() {\r\n\t\tcard1 = player1.getCard();\r\n\t\tcard2 = player2.getCard();\r\n\t\twarPile.add(card1);\r\n\t\twarPile.add(card2);\r\n\t\tgameState = \"Player 1: \" + card1 + \"\\n\" + \"Player 2: \" + card2 + \"\\n\";\r\n\t\tif(card1.getRank() == card2.getRank()) {\r\n\t\t\tgameState = \"Cards added to the War Pile\" + \"\\n\";\r\n\t\t}else if(card1.getRank() > card2.getRank()){\r\n\t\t\ttransferCards(player1);\r\n\t\t\tgameState = \"Cards go to Player 1 \\n\";\r\n\t\t}else {\r\n\t\t\ttransferCards(player2);\r\n\t\t\tgameState = \"Cards go to Player 2 \\n\";\r\n\t\t}\r\n\t\tmoves ++;\r\n\t}", "@Override\n\tpublic void step(int actionType) {\n\n\t}", "public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout();\n checkout.setCashier(employee);\n checkout.setOpen(true);\n int quittingTime = employee.getQuittingTime();\n Event event = new ShiftCompletedEvent(quittingTime, employee, checkout);\n store.getEventList().addEvent(event);\n \n System.out.printf(\"Time %d: Cashier %d arrives (Speed %d, quitting time %d, checkout %d)\\n\",\n time,\n employee.getId(),\n employee.getSpeed(),\n employee.getQuittingTime(),\n checkout.getIndex());\n }", "@Override\n protected void defineSteps() {\n addStep(new StepStartDriveUsingMotionProfile(80, 0.0));\n addStep(new StepWaitForDriveMotionProfile());\n addStep(new StepStopDriveUsingMotionProfile());\n addStep(new AutoStepDelay(500));\n addStep(new StepSetIntakeState(true));\n addStep(new StepSetNoseState(true));\n addStep(new AutoStepDelay(500));\n addStep(new StepStartDriveUsingMotionProfile(-5, 0.0));\n addStep(new StepWaitForDriveMotionProfile());\n addStep(new StepStopDriveUsingMotionProfile());\n addStep(new AutoStepDelay(500));\n\n AutoParallelStepGroup crossCheval = new AutoParallelStepGroup();\n AutoSerialStepGroup driveOver = new AutoSerialStepGroup();\n\n driveOver.addStep(new StepStartDriveUsingMotionProfile(80, 0.0));\n driveOver.addStep(new StepWaitForDriveMotionProfile());\n driveOver.addStep(new StepStopDriveUsingMotionProfile());\n // Medium flywheel speed.\n crossCheval.addStep(new StepRunFlywheel(Shooter.FLYWHEEL_SPEED_MEDIUM));\n crossCheval.addStep(driveOver);\n addStep(crossCheval);\n addStep(new AutoStepDelay(500));\n addStep(new StepSetIntakeState(false));\n addStep(new StepSetNoseState(false));\n addStep(new AutoStepDelay(1000));\n\n addStep(new StepQuickTurn(180));\n addStep(new AutoStepDelay(1000));\n addStep(new StepVisionAdjustment());\n addStep(new AutoStepDelay(500));\n addStep(new StepSetShooterPosition(true));\n addStep(new StepResetShooterPositionToggle());\n addStep(new AutoStepDelay(2000));\n addStep(new StepShoot());\n addStep(new AutoStepDelay(1000));\n addStep(new StepResetShotToggle());\n addStep(new StepRunFlywheel(Shooter.FLYWHEEL_SPEED_ZERO));\n\n // total delay time: 7.5 seconds\n }", "public void takeStep()\n {\n int direction = random.nextInt(4);\n switch (direction) {\n case 0:\n /* Up */\n y += 1;\n break;\n case 1:\n /* Down */\n y -= 1;\n break;\n case 2:\n /* Right */\n x += 1;\n break;\n case 3:\n /* Left */\n x -= 1;\n break;\n }\n\n stepsTaken++;\n }", "public abstract void performStep();", "public void makeMove() {\n\t\tif (CheckForVictory(this)) {\n\t\t\t// System.out.println(\"VICTORY\");\n\t\t\tInterface.goalReached = true;\n\t\t\tfor (int i = 0; i < tmpStrings.length; i++) {\n\t\t\t\tif (moveOrder[i] == 0)\n\t\t\t\t\ttmpStrings[i] = \"turn left\";\n\t\t\t\telse if (moveOrder[i] == 1)\n\t\t\t\t\ttmpStrings[i] = \"turn right\";\n\t\t\t\telse\n\t\t\t\t\ttmpStrings[i] = \"go forward\";\n\n\t\t\t\tInterface.info.setText(\"Generation: \" + Parallel.generationNo + 1 + \" and closest distance to goal: \" + 0);\n\t\t\t}\n\t\t} else {\n\t\t\tmoveOrder[this.movesMade] = moves.remove();\n\t\t\tswitch (moveOrder[this.movesMade]) {\n\t\t\tcase (0):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 0)\n\t\t\t\t\tface = 3;\n\t\t\t\telse\n\t\t\t\t\tface--;\n\t\t\t\tbreak;\n\t\t\tcase (1):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 3)\n\t\t\t\t\tface = 0;\n\t\t\t\telse\n\t\t\t\t\tface++;\n\t\t\t\tbreak;\n\t\t\tcase (2):\n\t\t\t\tthis.movesMade++;\n\t\t\t\tif (face == 0 && Y - 1 >= 0)\n\t\t\t\t\tY--;\n\t\t\t\telse if (face == 1 && X + 1 <= map[0].length - 1)\n\t\t\t\t\tX++;\n\t\t\t\telse if (face == 2 && Y + 1 <= map.length - 1)\n\t\t\t\t\tY++;\n\t\t\t\telse if (face == 3 && X - 1 >= 0)\n\t\t\t\t\tX--;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Error making move :(\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "void Step(String step);", "abstract int steps();", "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 TurnState step() {\n ReadOnlyHistory history = board.viewHistory();\n \n if (!isGameOver) {\n Player next = nextPlayer();\n Move move = null;\n \n try {\n final long startTime = System.currentTimeMillis();\n move = next.play(history);\n next.addTime(System.currentTimeMillis() - startTime);\n \n if (next.getTime() >= timeLimit || !board.isValid(move)){\n isGameOver = true;\n }\n else {\n board.set(move);\n }\n }\n catch (IllegalArgumentException ex) {\n System.err.println(\"Player \" + next.getName() + \": \" + ex.getMessage());\n isGameOver = true;\n }\n catch (ArrayIndexOutOfBoundsException ex) {\n System.err.println(\"Player \" + next.getName() + \": \" + ex.getMessage());\n isGameOver = true;\n }\n \n return new TurnState(next, move, isGameOver);\n }\n else {\n return new TurnState(null, null, true);\n }\n }", "protected abstract R runStep();", "protected void execute() {\r\n \tmanipulator.moveElevator(speed);\r\n }", "public String nextStep();", "boolean nextStep();", "public void step()\n {\n status = stepInternal();\n }", "private void actionPhase() {\n field.generateRandomFood( 100 );\n List<Blob> k = new ArrayList<>( this );\n Iterator<Blob> kIter;\n Blob currentBlob;\n\n while (!k.isEmpty()) {\n for (kIter = k.iterator(); kIter.hasNext(); ) {\n currentBlob = kIter.next();\n if ( currentBlob.getEnergy() > 0 && !currentBlob.isAtHome() ) {\n currentBlob.move();\n } else {\n kIter.remove();\n }\n }\n }\n }", "private void executeAction(ElevatorAction first) {\n\n\t}", "public interface MainFillingStep {\n CheeseStep meat(String meat);\n\n VegetableStep fish(String fish);\n }", "@Override\n\tpublic void moveTowards(int destination) {\n \tif (stepCount % 2 == 0) {\n \tif (getFloor() < destination) {\n \t\tmoveUpstairs();\n \t} else {\n \t\tmoveDownstairs();\n \t}\n \t}\n }", "@Override\r\n public void act() {\r\n boolean willMove = canMove();\r\n if (isEnd) {\r\n // to show step count when reach the goal\r\n if (!hasShown) {\r\n String msg = stepCount.toString() + \" steps\";\r\n JOptionPane.showMessageDialog(null, msg);\r\n hasShown = true;\r\n }\r\n } else if (willMove) {\r\n move();\r\n // increase step count when move\r\n stepCount++;\r\n // 把当前走过的位置加入栈顶的arrayList\r\n crossLocation.peek().add(getLocation());\r\n // 当前方向的概率+1\r\n probablyDir[getDirection() / 90]++;\r\n } else if (!willMove) {\r\n // 这时候必须一步一步返回栈顶arrayList的开头\r\n ArrayList<Location> curCrossed = crossLocation.peek();\r\n curCrossed.remove(curCrossed.size() - 1);\r\n next = curCrossed.get(curCrossed.size() - 1);\r\n move();\r\n stepCount++;\r\n // 当前方向反向的概率-1\r\n probablyDir[((getDirection() + Location.HALF_CIRCLE)\r\n % Location.FULL_CIRCLE) / Location.RIGHT]--;\r\n if (curCrossed.size() == 1) {\r\n // 返回之后pop\r\n crossLocation.pop();\r\n }\r\n }\r\n }", "public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }", "public int transferPeople(Elevator e)\n\t{\n\t\tint transfered = e.pList.size();\n\t\tfor(int i = 0; i < e.pList.size(); i++)\n\t\t{\n\t\t\tPerson p = e.pList.get(i);\n\t\t\tif(p.destination.floorNumber == this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"person leaving elevator \" + e.id + \" on floor \" + this.floorNumber);\n\t\t\t\te.pList.get(i).exit();\n\t\t\t\te.pList.remove(i);\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.NOTFULL;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\ttransfered-=e.pList.size();\n\t\ttransfered+=this.pList.size();\n\t\tint available = e.getTotalCapacity()-e.getCurrentCapacity();\n\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.IDLE)\n\t\t{\n\t\t\tif(pList.size()!=0&&pList.get(0).destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going up\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGUP;\n\t\t\t}\n\t\t\telse if(pList.size()!=0&&pList.get(0).destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going down\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGDOWN;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\t\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGUP)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber > this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGDOWN)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber < this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(available==0)\n\t\t\t{\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.FULL;\n\t\t\t\tSystem.out.println(\"Elevator \" + e.id + \" is now full\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttransfered-=this.pList.size();\n\t\tSystem.out.println(\"transfered \" + transfered + \" on floor \" + this.floorNumber + \" number of people still on floor is \" + pList.size());\n\t\treturn transfered;\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}", "public int step() {\n // PUT YOUR CODE HERE\n }", "private void firstSteps() {\n\t\tturnLeft();\n\t\tmove();\n\t\tmove();\n\t\tturnRight();\n\t\tmove();\n\t}", "@Override\n void movePhase() throws IOException, InterruptedException, IOExceptionFromController {\n boolean godPower = false;\n ArrayList<Cell> possibleMoves = findPossibleMoves(activeWorker.getPosition());\n Cell movePosition = client.chooseMovePosition(possibleMoves);\n CellView startView = new CellView(activeWorker.getPosition());\n CellView endView = new CellView(movePosition);\n CellView startView2 = null;\n CellView endView2 = null;\n // + allow pushing away opponents\n if (movePosition.hasWorker()) {\n godPower = true;\n Worker pushedWorker = movePosition.getWorker();\n Cell nextCell;\n int nextX = movePosition.getPosX() + (movePosition.getPosX() - activeWorker.getPosition().getPosX());\n int nextY = movePosition.getPosY() + (movePosition.getPosY() - activeWorker.getPosition().getPosY());\n nextCell = board.getCell(nextX, nextY);\n startView2 = endView;\n endView2 = new CellView(nextCell);\n try {\n pushedWorker.move(nextCell);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n return;\n }\n //\n }\n try {\n activeWorker.move(movePosition);\n } catch (IllegalMoveException e) {\n gameController.logError(e.getMessage());\n }\n if (godPower) displayMove(startView, endView, startView2, endView2, card);\n else displayMove(startView, endView, null);\n }", "@Override\n\tpublic void step() {\n\t\t\n\t}", "@Override\n\tpublic void step() {\n\t\t\n\t}", "CartogramWizardGoToStepAction (CartogramWizard wizard, int step)\n\t{\n\t\tmWizard = wizard;\n\t\tmStep = step;\n\t}", "public void makeNextMove() {\n\t\ttakeNextNonTabuedCheapestStep();\n\t\t}", "public static void main(String[] args) {\n Elevator theElevator = new Elevator();\n\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(3);\n\n System.out.println(theElevator);\n\n for(int i=1;i<21;i++){\n theElevator.move();\n }\n \n\n \n\n }", "void step () {\n if (gameOver)\n return;\n if (!isFalling) {\n // if last piece finished falling, spawn a new one\n spawnNewPiece();\n // if it can't move, game over\n if (!canMove(currentRow + 1, currentColumn)) {\n endGame();\n }\n updateView();\n }\n else if (canMove(currentRow + 1, currentColumn)) {\n currentRow += 1;\n updateView();\n } else {\n // the piece fell!\n isFalling = false;\n // draw current shape to the board\n drawCurrentToBoard();\n currentPiece.blocks = new int[currentPiece.blocks.length][currentPiece.blocks[0].length];\n increaseScore(board.clearFullRows(this));\n }\n }", "protected MovePath addStep(final MoveStep step, boolean compile) {\n if (step == null) {\n System.err.println(new RuntimeException(\"Received NULL MoveStep\"));\n return this;\n }\n\n steps.addElement(step);\n\n // transform lateral shifts for quads or maneuverability aces\n if (canShift()) {\n// transformLateralShift();\n }\n final MoveStep prev = getStep(steps.size() - 2);\n\n if (compile) {\n try {\n step.compile(getGame(), getEntity(), prev);\n } catch (final RuntimeException re) {\n // // N.B. the pathfinding will try steps off the map.\n // re.printStackTrace();\n step.setMovementType(EntityMovementType.MOVE_ILLEGAL);\n }\n }\n\n\n // check for illegal jumps\n final Coords start = getEntity().getPosition();\n final Coords land = step.getPosition();\n if ((start == null) || (land == null)) {\n // If we have null for either coordinate then we know the step\n // isn't legal.\n step.setMovementType(EntityMovementType.MOVE_ILLEGAL);\n } else {\n final int distance = start.distance(land);\n if (isJumping() && (getEntity().getJumpType() != Mech.JUMP_BOOSTER)) {\n if (step.isThisStepBackwards() || (step.getDistance() > distance)) {\n step.setMovementType(EntityMovementType.MOVE_ILLEGAL);\n }\n }\n }\n\n if (shouldMechanicalJumpCauseFallDamage()) {\n step.setDanger(true);\n }\n\n // If the new step is legal and is a different position than\n // the previous step, then update the older steps, letting\n // them know that they are no longer the end of the path.\n if (step.isLegal() && (null != prev) && !land.equals(prev.getPosition())) {\n\n // Loop through the steps from back to front.\n // Stop looping when the step says to, or we run out of steps.\n int index = steps.size() - 2;\n while ((index >= 0) && getStep(index).setEndPos(false)) {\n index--;\n }\n\n } // End step-is-legal\n\n return this;\n }", "public void step(){\n if (this.ht < maxHeight){\n this.ht = this.ht + STEP_SIZE;\n }\n else if (! this.isFinished()){\n this.radius = this.radius + GROW_SIZE;\n }\n }", "public int liftStepper() {\n if(robot.wrist.getPosition()> .25)\n {\n if(robot.jaw.getPosition()> .25)\n {\n telemetry.addLine(\"I could self damage.\");\n }\n }\n else{\n if (this.improvedGamepad1.y.isInitialPress()) {\n step = step + 1;\n if (step > 5) {\n step = 5;\n }\n power = .5;\n //up by one\n }\n if (this.improvedGamepad1.a.isInitialPress()) {\n step = step - 1;\n if (step < 0) {\n step = 0;\n }\n power = .5;\n //down by one\n }\n\n if (this.improvedGamepad1.b.isInitialPress()) {\n topStep = step;\n step = 0;\n power = .7;\n //to bottom\n }\n\n if (this.improvedGamepad1.x.isInitialPress()) {\n step = topStep;\n power = .7;\n //to top\n }\n\n }\n\n telemetry.addData(\"Step\", step);\n telemetry.addData(\"Top Step\", topStep);\n telemetry.update();\n\n\n //DcMotor lift = this.hardwareMap.dcMotor.get(\"lift\");\n int targetPosition = step * 750;\n\n robot.lift.setTargetPosition(targetPosition);\n robot.lift.setMode(DcMotor.RunMode.RUN_TO_POSITION);\n robot.lift.setPower(power);\n\n telemetry.update();\n return step;\n\n }", "@Override\n public void moveElevator(final int toFloor, final int elevatorId) {\n log.debug(\"moving {} to {}\", elevatorId, toFloor);\n\n Elevator elevator = elevatorRepository.getElevator(elevatorId);\n elevator.setAddressedFloor(toFloor);\n elevator.setBusy(true);\n elevator.setDirection(calculateDirection(toFloor, elevator.getCurrentFloor()));\n\n elevatorRepository.updateElevator(elevator);\n }", "@Test\n void testSidestepMakeMove() {\n final Move moveFinal = Move.newMove(// final modifier for the lambda expression\n \t\tboard,\n \t\tnew HashSet<>(FractionalHex.hexLinedraw(new Hex(-2, -2, 4), new Hex(0, -4, 4))),\n Direction.LOWER_RIGHT,\n player1);\n assertThrows(IllegalMoveException.class, () -> moveFinal.makeMove());\n\n // Executes the move if it's legal.\n Move move = Move.newMove(\n \t\tboard,\n rowOfThreeMarblesFromPlayerOne,\n Direction.UPPER_RIGHT,\n player1);\n gameState.makeMove(move);\n assertTrue(player1.getMarbles().contains(\n board.getField(new Hex(-2, 3, -1)).getMarble()));\n assertNull(board.getField(new Hex(-3, 3, 0)).getMarble());\n }", "int getStep();", "int getStep();", "int getStep();", "@Test\n public void testExecuteStep() {\n assertFalse(mgr.executeStep());\n\n // add a step to the queue\n mgr.getSteps().add(stepa);\n\n // step returns false\n when(stepa.start(anyLong())).thenReturn(false);\n assertFalse(mgr.executeStep());\n\n // step returns true\n when(stepa.start(anyLong())).thenReturn(true);\n assertTrue(mgr.executeStep());\n }", "public void act() {\n\t\tboolean willMove = canMove();\n\t\tif (isEnd) {\n\t\t//to show step count when reach the goal\n\t\t\tif (!hasShown) {\n\t\t\t\tString msg = stepCount.toString() + \" steps\";\n\t\t\t\tJOptionPane.showMessageDialog(null, msg);\n\t\t\t\thasShown = true;\n\t\t\t}\n\t\t} else if (willMove) {\n\t\t\t//visit the next node\n\t\t\tisVisited[next.getRow()][next.getCol()] = true;\n\t\t\tmove();\n\t\t\tstepCount++;\n\t\t} else {\n\t\t\t// back to the cross location\n\t\t\tback();\n\t\t\tstepCount++;\n\t\t}\n\t}", "public ActStep(CharacterEvent actor, EightDir dir) {\n\t\tthis(actor);\n\t\tthis.dir = dir;\n\t}", "@Override\n\tpublic void nextTurn()\n\t{\n\t\tif (isInventoryFull())\n\t\t{\n\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\"[THE INVENTORY OF \" + myWorker.getId()\n\t\t\t\t\t\t\t+ \" IS FULL AND IS GONNA UNLOAD]\");\n\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\tBuilding unloadBuilding = null;\n\t\t\tif (getMyPlayer().getStockpiles().size() > 0)\n\t\t\t{\n\t\t\t\tRandom random = new Random(100);\n\t\t\t\tint chosenStockpile = random.nextInt(getMyPlayer()\n\t\t\t\t\t\t.getStockpiles().size());\n\n\t\t\t\tunloadBuilding = getMyPlayer().getStockpiles().get(\n\t\t\t\t\t\tchosenStockpile);\n\t\t\t} else if (getMyPlayer().getMainBuildings().size() > 0)\n\t\t\t{\n\t\t\t\tunloadBuilding = getMyPlayer().getMainBuildings().get(0);\n\t\t\t}\n\n\t\t\tif (doIMoveToBuilding(unloadBuilding))\n\t\t\t{\n\t\t\t\tMoveAction move;\n\t\t\t\tPoint dest = getMoveDestination(unloadBuilding);\n\t\t\t\tif (dest != null)\n\t\t\t\t{\n\t\t\t\t\tmove = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\t\tmove.doAction();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADDED \"\n\t\t\t\t\t\t\t\t+ myWorker.getLoadInInventory()\n\t\t\t\t\t\t\t\t+ \" TO RESOURCES]\");\n\t\t\t\tif (destBuilding instanceof Farm)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getFoodInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof StoneMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getStoneInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof GoldMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getGoldInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof WoodCamp)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getLumberInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\tmyWorker.setOccupationType(OccupationType.IDLE);\n\t\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\t\tmyWorker.setLoadInInventory(0);\n\t\t\t\tmyWorker.setActionController(null);\n\t\t\t}\n\t\t} else if (doIMoveToBuilding(destBuilding))\n\t\t{\n\t\t\tPoint dest = getMoveDestination(destBuilding);\n\t\t\tif (dest == null)\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"BuildController class:nextTurn(): dest is null! do something!!!!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tMoveAction move = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\tmove.doAction();\n\t\t\t}\n\t\t} else if (!isInventoryFull())\n\t\t{\n\t\t\tdestBuilding.getWorkersInside().add(myWorker);\n\t\t\tint collectResourcePerTurn = 0;\n\t\t\tif (destBuilding instanceof Farm)\n\t\t\t{\n\t\t\t\tmyWorker.setFoodCollectingExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getFood();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getFoodProductionRate()));\n\t\t\t} else if (destBuilding instanceof GoldMine)\n\t\t\t{\n\t\t\t\tmyWorker.setGoldMiningExperience(myWorker\n\t\t\t\t\t\t.getGoldMiningExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getGold();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getGoldMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getGoldProductionRate()));\n\t\t\t} else if (destBuilding instanceof StoneMine)\n\t\t\t{\n\t\t\t\tmyWorker.setStoneMiningExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getStone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getStoneMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getStoneProductionRate()));\n\n\t\t\t} else if (destBuilding instanceof WoodCamp)\n\t\t\t{\n\t\t\t\tmyWorker.setWoodCampExperience(myWorker.getWoodCampExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()]\n\t\t\t\t\t\t\t\t.getLumber();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getWoodCampExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getWoodProductionRate()));\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADD \"\n\t\t\t\t\t\t\t\t+ collectResourcePerTurn\n\t\t\t\t\t\t\t\t+ \" OF RESOURCE THIS TURN]\");\n\t\t\t}\n\n\t\t\tmyWorker.setLoadInInventory(collectResourcePerTurn\n\t\t\t\t\t+ myWorker.getLoadInInventory());\n\t\t}\n\t}", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "public void act(){\n food = theWorld.getCloseFood(this);\n queenAnt = theWorld.getCloseQueen(this);\n if(getF){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n start = false;\n hunger += 50;\n hasFood = false;\n //eat the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving up\");\n setDirection(Location.NORTH);\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n System.out.println(\"moving up left\");\n setDirection(Location.NORTH_WEST);\n //go up left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving left\");\n setDirection(Location.WEST);\n //go left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down left\");\n setDirection(Location.SOUTH_WEST);\n //go down left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() + 1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving down\");\n setDirection(Location.SOUTH);\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down right\");\n setDirection(Location.SOUTH_EAST);\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving right\");\n setDirection(Location.EAST);\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n System.out.println(\"moving up right\");\n setDirection(Location.NORTH_EAST);\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n //get the food\n start = false;\n getF = false;\n food.giveFood(this);\n }\n }else if(getQ){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n food.giveFood(this);\n start = false;\n //get the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n if(getLocation().isSameLocation(queenAnt.getLocation())){\n giveQueenFood(queenAnt);\n //give the queen the food\n }else{\n if(getLocation().getY() > queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(),this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() > queenAnt.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }\n }else{\n if(hunger > 30){\n getQ = true;\n start = true;\n //assign closest queen location\n }else{\n getF = true;\n start = true;\n //assign closest food location\n }\n }\n }", "public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }", "public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}", "private void nextStep(){\n if(vMaze == null)\n mainMessage.setText(\"You must load a maze first!\");\n else try{\n vMaze.step();\n tileBox.getChildren().clear();\n tileBox.getChildren().add(vMaze.getTiles());\n\n mainMessage.setText(\"You took one step.\");\n if(vMaze.getRouteFinder().isFinished())\n mainMessage.setText(\"You reached the end!\");\n } catch (NoRouteFoundException e){\n mainMessage.setText(e.getMessage());\n }\n }", "public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }", "protected abstract void stepImpl( long stepMicros );", "public void implement(){\n this.rb.moveForward(1);\n \n \n if(this.rb.canPickThing()){\n this.rb.pickThing();\n }\n\n //turn the rb 90 degree to the south\n this.rb.turnLeft();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the east\n this.rb.turnRight();\n\n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n\n //turn the navigator 90 degree to the north\n this.rb.turnLeft();\n\n //move the navigator\n this.rb.moveForward(2);\n\n //turn Right the robot\n this.rb.turnRight();\n\n //stop at the starting position per move()\n this.rb.moveForward(1); \n \n this.rb.putThing();\n \n //move the navigator 1 step ahead per move()\n this.rb.moveForward(1);\n \n //turn the navigator 90 degree to the west\n this.rb.turnRight();\n \n this.rb.moveForward(1);\n \n this.rb.turnLeft();\n \n this.rb.moveForward(1);\n \n this.rb.turnRight();\n \n this.rb.moveForward(2);\n \n this.rb.turnLeft();\n }", "@Override\n\tpublic void step() {\n\t}", "@Override\n\tpublic void step() {\n\t}", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "private interface AnyKindOfStep\n\t{\n\t\tpublic void step() throws PlayerDebugException;\n\t}", "@Override\n public void act(AgentImp agent) {\n Coordinate coordinate = agent.generateRandomMove();\n if (coordinate != null)\n agent.step(coordinate.getX(), coordinate.getY());\n else\n agent.skip();\n }", "private static void testTakeStep(Drunkard drunkard, int testStepTimes, int testStepSize){\n\t for (int i = 0; i < testStepTimes; i++)\n\t{\n\t ImPoint pointA = drunkard.getCurrentLoc(); \n\t\tdrunkard.takeStep();\n\t\tImPoint pointB = drunkard.getCurrentLoc();\n\t\t\n\t\tif (pointA.getX()-pointB.getX() != 0 && pointA.getY()-pointB.getY() != 0)\n\t\t{\n\t\t\tSystem.out.println(\"Not a valid compass direction!\");\n\t\t}\n\t\telse if (Math.sqrt((pointA.getX() - pointB.getX())*(pointA.getX() - pointB.getX()) + (pointA.getY() - pointB.getY())*(pointA.getY() - pointB.getY())) != testStepSize)\n\t\t{\n\t\t\tSystem.out.println(\"took step to (\" + pointB.getX() + \",\" + pointB.getY() + \"), FAILED, not a valid step\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"took step to (\" + pointB.getX() + \",\" + pointB.getY() + \"), SUCCEEDED\");\n\t\t}\n\t}\n\t System.out.println(); \n\t}", "public void go_to_switch_position() {\n stop_hold_arm();\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_switch, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public void movePlayerOneStep(Step step) {\n SpacePlayer p = null;\n for (Overlay o : step.getOverlays()) {\n if (o instanceof SpacePlayer) {\n p = (SpacePlayer) o;\n }\n }\n\n // if there is no player or it is not ready to move, nothing to do\n if (p == null || !p.isReadyToMove()) {\n return;\n }\n\n // move player in defined direction\n if (p.getDirection().equals(Direction.FORWARD)) {\n if (step.next() != null) {\n if (!isStepBlocked(step.next())){\n step.getOverlays().remove(p);\n step.next().addOverlay(p);\n p.setActiveStep(step.next());\n }\n }\n } else if (p.getDirection().equals(Direction.BACKWARD)) {\n if (step.previous() != null) {\n if (!isStepBlocked(step.previous())) {\n step.getOverlays().remove(p);\n step.previous().addOverlay(p);\n p.setActiveStep(step.previous());\n }\n }\n }\n p.setMoved(true);\n }", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void doTimeStep() {\n\t\tdir = Critter.getRandomInt(8);\r\n\t\t\r\n\t\tnumSteps = Critter.getRandomInt(maxStep) + 1;\r\n\t\t\r\n\t\t//go a random number of steps in that direction\r\n\t\tfor(int i = 0; i < numSteps; i++) {\r\n\t\t\twalk(dir);\r\n\t\t}\t\t\r\n\t}", "@Override\n public boolean step() {\n boolean ejecutandose = true;\n switch (Step) {\n case 0:\n paso0();\n break;\n case 1:\n paso1();\n break;\n case 2:\n paso2();\n break;\n case 3:\n paso3();\n break;\n default: {\n ejecutandose = false;\n graph.NodoObjetivo = miObjetivo;\n graph.paintGrafo();\n }\n }\n return ejecutandose;\n }", "public synchronized String Move(Coordinates step) {\n // check if player won't go over the grid\n if (step.getKey() + coord.getKey() < 0 || step.getKey() + coord.getKey() > sizeSide) {\n System.out.println(\"You can't go out of x bounds, retry\");\n return null;\n }\n else if (step.getValue() + coord.getValue() < 0 || step.getValue() + coord.getValue() > sizeSide) {\n System.out.println(\"You can't go out of y bounds, retry\");\n return null;\n }\n else {\n coord = new Coordinates(coord.getKey() + step.getKey(), coord.getValue() + step.getValue());\n return \"ok\";\n }\n }", "public void step(long now) {\n\t}", "public void step() {\n\t\tpostEvent(new IpcEvent(SimulationEvents.EVENT_TYPE_STEP, this, null));\n\t}", "public void step(int paraAction) throws IllegalActionException {\n\t\t// Step 1. Is this action legal?\n\t\tint tempRow = paraAction / SIZE;\n\t\tint tempColumn = paraAction % SIZE;\n\t\tif (checkerboard[tempRow][tempColumn] != EMPTY) {\n\t\t\tSystem.out.println(\"The checkerboard state is: \" + Arrays.deepToString(checkerboard));\n\t\t\tthrow new IllegalActionException(\"The position (\" + tempRow + \", \" + tempColumn\n\t\t\t\t\t+ \" is already occupied \" + checkerboard[tempRow][tempColumn]);\n\t\t} // Of if\n\n\t\t// Step 2. Change the state of the checkerboard.\n\t\t//SimpleTools.variableTrackingOutput(\n\t\t//\t\t\"Assign \" + currentPlayer + \" to (\" + tempRow + \", \" + tempColumn + \").\");\n\t\tSimpleTools.variableTrackingOutput(\"\" + paraAction + \", \");\n\t\tcheckerboard[tempRow][tempColumn] = currentPlayer;\n\t\tcurrentState = checkerboardToState(checkerboard);\n\n\t\tgameSituation = computeGameSituation();\n\t\t//SimpleTools.variableTrackingOutput(\"Environment current stage: \" + currentState + \", \");\n\t\t//SimpleTools.variableTrackingOutput(\"gameSituation: \" + gameSituation + \", \");\n\n\t\tcurrentRouteStates[currentRouteLength] = currentState;\n\t\tcurrentRouteLength++;\n\t\t\n\t\t// Step 3. Now it's the turn of the other player.\n\t\tif (currentPlayer == WHITE) {\n\t\t\tcurrentPlayer = BLACK;\n\t\t} else {\n\t\t\tcurrentPlayer = WHITE;\n\t\t} // Of if\n\t}", "private void step ()\n {\n // a car arrives approximately every four minutes\n int chance = randGen.nextInt(CarWashApplication.CHANCE_INT);\n if (chance == 0)\n {\n waitingLine.enqueue(new Car(currentTime));\n numCars++;\n\n /** For printed output of each step */\n //System.out.println(currentTime);\n //waitingLine.toPrint();\n }\n\n // process the waiting cars\n if (bay.isEmpty() && !waitingLine.isEmpty())\n {\n bay.startWash();\n Car car = (Car) waitingLine.dequeue();\n waitTimeArray[arrayIndex] = currentTime - (car.arrivalTime());\n arrayIndex++;\n }\n\n if (!bay.isEmpty())\n bay.keepWashing();\n\n currentTime++;\n }", "public static boolean Step(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"Step\")) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, \"<step>\");\n r = Step_0(b, l + 1);\n r = r && StepPar(b, l + 1);\n p = r; // pin = 2\n r = r && report_error_(b, SpaceStar(b, l + 1));\n r = p && StepArgument(b, l + 1) && r;\n exit_section_(b, l, m, JB_STEP, r, p, RecoverMeta_parser_);\n return r || p;\n }", "private void goDirection(Command command) {\n String direction = command.getFirstParameter();\n Room nextRoom = currentRoom.nextRoom(direction);\n\n // try to leave current room\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n } else {\n currentRoom = nextRoom;\n }\n }", "public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }", "public void doTimeStep() {\r\n\t\twalk(getRandomInt(8));\r\n\t\tif (getEnergy() < 6 * Params.min_reproduce_energy && getEnergy() > Params.min_reproduce_energy) {\r\n\t\t\tCritter1 child = new Critter1();\r\n\t\t\treproduce(child, getRandomInt(8));\r\n\t\t\tnumberSpawned += 1;\r\n\t\t}else if(getEnergy() < Params.min_reproduce_energy) {\r\n\t\t\treturn;\r\n\t\t}else {\r\n\t\t\tCritter1 child1 = new Critter1();\r\n\t\t\treproduce(child1, getRandomInt(8));\r\n\t\t\tCritter1 child2 = new Critter1();\r\n\t\t\treproduce(child2, getRandomInt(8));\r\n\t\t\tnumberSpawned += 2;\r\n\t\t}\t\r\n\t}" ]
[ "0.66059184", "0.6513578", "0.6313564", "0.61259407", "0.6113206", "0.6109225", "0.6048982", "0.6043519", "0.5998957", "0.5972861", "0.5972861", "0.5939108", "0.5932143", "0.5928424", "0.5914316", "0.5897351", "0.5890922", "0.5879321", "0.5875444", "0.58737993", "0.58484584", "0.58372855", "0.57950956", "0.5793178", "0.5773457", "0.5766314", "0.5709792", "0.5692811", "0.5685664", "0.5678026", "0.5677577", "0.56633765", "0.56604975", "0.5659376", "0.5658027", "0.56535983", "0.564146", "0.56361365", "0.5630782", "0.5626757", "0.562395", "0.56036794", "0.55958146", "0.55757225", "0.5553159", "0.55528146", "0.5544505", "0.55286163", "0.55181676", "0.5517924", "0.5515313", "0.5503356", "0.54995745", "0.54966074", "0.5495201", "0.5495201", "0.54853237", "0.5477072", "0.54687464", "0.54681945", "0.54674125", "0.54633224", "0.54628026", "0.54621917", "0.5458762", "0.54463845", "0.54463845", "0.54463845", "0.5444552", "0.5441057", "0.543473", "0.5432266", "0.5428139", "0.5424643", "0.54244655", "0.5422976", "0.54181355", "0.54081106", "0.5405268", "0.5404616", "0.5399761", "0.5399761", "0.5399613", "0.5395626", "0.5390219", "0.5387793", "0.538098", "0.5378733", "0.5376762", "0.53689235", "0.5364895", "0.5364146", "0.5355368", "0.5351977", "0.5347433", "0.53448266", "0.5344395", "0.5337329", "0.533109", "0.5326825" ]
0.77872336
0
`changeState` is the main function behind the "logic" of the elevator. The elevator changes to: IDLE if there are no jobs to do an of right now UP if: (for currentState == IDLE or UP) current floor is lower than the destination (for currentState == DOWN) current floor is lower and there is no job lower than current floor DOWN if: (for currentState == IDLE or DOWN) current floor is higher than the destination (for currentState == UP) current floor is higher and there is no job higher than current floor Logic defined this way means that elevator that was going UP will "prefer" to go UP if possible (the same goes for DOWN). Further explanation is wrote down in README.md
private void changeState() { if (jobs.contains(this.currentFloor)){ throw new AssertionError("Changing state of elevator no " + ElevatorID + " on destination floor"); } // empty job set -> going to IDLE state if (jobs.size() == 0) { this.currentState = IDLE; return; } Integer closestFloorDownwards = jobs.floor(this.currentFloor); Integer closestFloorUpwards = jobs.ceiling(this.currentFloor); switch (this.currentState) { // if elevator is in idle state then we need to go to the closest job possible case IDLE -> { Integer closestFloor = findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards); if (closestFloor < this.currentFloor) { this.currentState = DOWN; } else { this.currentState = UP; } } case DOWN -> { if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs` this.currentState = DOWN; // let's continue going down } else { this.currentState = UP; // otherwise we need to go up } } case UP -> { if (closestFloorUpwards != null) { // if there exists a successor in `jobs` this.currentState = UP; // let's continue going up } else { this.currentState = DOWN; // otherwise we need to go down } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateState() {\n //check if arrived\n if (destinations.contains(currentFloor)) {\n destinations.removeIf(n -> (n == currentFloor));\n System.out.println(\"\\t\\tElevator #\" + id + \": Arrived at floor #\" + currentFloor + \".\");\n }\n\n // take stock of assigned stops and change direction if required\n if (destinations.isEmpty()) {\n currentDirection = Direction.STOP;\n } else if ((currentDirection == Direction.UP && Collections.max(destinations) < currentFloor)) {\n currentDirection = Direction.DOWN;\n Collections.sort(destinations);\n Collections.reverse(destinations);\n } else if (currentDirection == Direction.DOWN && Collections.min(destinations) > currentFloor){\n currentDirection = Direction.UP;\n Collections.sort(destinations);\n }\n\n //Decide which way to go if the elevator is stopped and has gained a destination\n if (currentDirection == Direction.STOP && destinations.size() != 0) {\n int destinationFloor = Integer.MAX_VALUE;\n for (final Integer d : destinations) {\n if (Math.abs(currentFloor - d) < Math.abs(currentFloor - destinationFloor)) {\n destinationFloor = d;\n }\n }\n\n currentDirection = (destinationFloor > currentFloor ? Direction.UP : Direction.DOWN);\n }\n\n // update current floor\n if (currentDirection == Direction.DOWN) {\n currentFloor--;\n System.out.println(\"\\t\\tElevator #\" + id + \": Moved down to floor #\" + currentFloor + \".\");\n } else if (currentDirection == Direction.UP) {\n currentFloor++;\n System.out.println(\"\\t\\tElevator #\" + id + \": Moved up to floor #\" + currentFloor + \".\");\n }\n }", "public void setElevatorState(int elevatorState) {\n this.elevatorState = elevatorState;\n }", "public static ElevatorState changeStateFactory(String stateElavator) {\n\t\tif(stateElavator==\"UP\") {\n\t\t\treturn new UpState();\n\t\t}else if(stateElavator==\"DOWN\") {\n\t\t\treturn new DownState();\n\t\t}else {\n\t\t\treturn new StopState();\n\t\t}\n\t}", "void stateChanged( final GameState oldState, final GameState newState );", "public void changeState()\r\n\t{\r\n\t\tfailedNumber=0;\r\n\t\tif(state.equalsIgnoreCase(\"IN PREPARATION\"))\r\n\t\t\tsetState(\"IN TRANSIT\");\r\n\t\telse if(state.equalsIgnoreCase(\"IN TRANSIT\"))\r\n\t\t{\r\n\t\t\tfailedNumber=Math.random();\r\n\t\t\tif(failedNumber<=0.2) setState(\"FAILED\");\r\n\t\t\telse setState(\"RECEIVED\");\r\n\t\t}\r\n\t}", "public interface Elevator {\n public static final int UP = 1, LEVEL = 0, DOWN = -1, ERROR = -2;\n /** Returns the minimal floor number to which this Elevator can reach(often a negative value).\n * This is the same value as the lowest floor in the building - this elevator belongs to. */\n public int getMinFloor();\n /** Returns the maximal floor number to which this Elevator can reach.\n * This is the same value as the highest floor in the building - this elevator belongs to. */\n public int getMaxFloor();\n /** Returns the time (in seconds it takes the Elevator to open its doors. */\n public double getTimeForOpen();\n /** Returns the time (in seconds it takes the Elevator to close its doors */\n public double getTimeForClose();\n /** Returns the Elavator's current state: {UP, DOWN, LEVEL, ERROR} the state \"LEVEL\" mark that the elevator has reached the floor -\n * and is now ready to load / unload and get new orders. */\n public int getState(); // UP, DOWN, LEVEL, ERROR\n /** Returns the Elevator's current position (floor) as an Integer. */\n public int getPos();\n /** Moves the elevator form the current position to the destination floor. */\n public boolean goTo(int floor);\n /** Allows the elevator to stop in an intermidiate floor between src and dest, assumeing the elevator has not yer pass the desired floor in which it needs to stop. */\n public boolean stop(int floor);\n /** Returns the speed (in floor per second), e.g. if the Elevator speed is 0.4 - it takes it 2.5 seconds to pass a single floor. */\n public double getSpeed();\n /** Return the time in seconds that it takes the elevator to start moving in full speed (assumed to be a fixed value). */\n public double getStartTime();\n /** Return the time in seconds that it takes the elevator to stop moving in full speed (assumed to be a fixed value).*/\n public double getStopTime();\n /**\n * @return the id of this elevator (simple index as in the building).\n * Note: this index should be the same as in the elevator allocation algorithm.\n */\n public int getID();\n}", "public void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator through each floor. \n\t\t\tif (getTotalPassDestFloor()[currentFloor] >0 || destRequest[currentFloor] == 'Y')this.stop(); \t//Checks for the destined passengers or registered request for the current floor.\n\t\t\tif (currentDirection == \"UP\") currentFloor++; else currentFloor--;\t\t\t\t\t\t\t//Moves the elevator up/down based on the direction\n\t\t}\n\t\tif (currentFloor == 8) currentFloor--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Adjusts currentfloor value when elevator-\n\t\tif (currentFloor == 0) currentFloor++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//-is at first or top most floor\n\t}", "public void setState(PlayerState newPlayerState) {\n\n this.playerState = newPlayerState;\n\n closeWindows();\n\n\n switch (newPlayerState) {\n\n case CHOOSE_BONUS_TILE:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n\n break;\n\n\n case THROWDICES:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(true);\n\n setSkipAction(false);\n\n setEndTurn(false);\n\n setUseLeader(false);\n\n try {\n throwDices();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n\n case DOACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n try {\n yourTurn();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n\n break;\n\n case BONUSACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n try {\n bonusAction();\n } catch (InterruptedException e) {\n LOGGER.log(Level.WARNING, \"Interrupted!\", e);\n // clean up state...\n Thread.currentThread().interrupt();\n }\n\n break;\n\n\n case CHOOSEACTION:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(true);\n\n setThrowDices(false);\n\n setSkipAction(true);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n\n case CHOOSEWORKERS:\n case ACTIVATE_PAY_TO_OBTAIN_CARDS:\n case CHOOSE_EFFECT:\n case CHOOSECOST:\n case CHOOSE_COUNCIL_PRIVILEGE:\n case PRAY:\n case WAITING:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n break;\n\n case ENDTURN:\n\n setActions(false);\n\n setLeaderButtons(false);\n\n setFamilyPawns(false);\n\n setThrowDices(false);\n\n setSkipAction(false);\n\n setEndTurn(true);\n\n setUseLeader(true);\n\n\n break;\n\n case LEADER:\n\n noButtonsAble();\n\n setUseLeader(true);\n break;\n\n\n case SUSPENDED:\n\n noButtonsAble();\n\n setLeaderButtons(false);\n\n setUseLeader(false);\n\n suspendedPane.setVisible(true);\n\n break;\n\n\n }\n\n }", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "ChangeState(String state, String otp, String walletPassphrase) {\n this.state = state;\n this.otp = otp;\n this.walletPassphrase = walletPassphrase;\n }", "private void computeExternalState(InternalState newState) {\n if (internalState != newState) {\n switch (internalState) {\n case BUILD:\n Preconditions.checkState(newState == InternalState.PROBE_IN || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_IN:\n Preconditions.checkState(newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.REPLAY ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_OUT:\n case PROBE_PIVOT_AND_OUT:\n Preconditions.checkState(newState == InternalState.PROBE_IN ||\n newState == InternalState.PROBE_OUT ||\n newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROJECT_NON_MATCHES:\n Preconditions.checkState(newState == InternalState.REPLAY || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case REPLAY:\n Preconditions.checkState(newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n }\n internalState = newState;\n }\n computeExternalState();\n }", "public ElevatorState getState() {\n\t\treturn state;\n\t}", "public void changeDoorState(Agent ag, int door, EdgeState state) \n throws InterruptedException {\n\n Vertex vertexFrom, vertexTo;\n Long key = new Long(numGen.alloc());\n EdgeStateChangeEvent event;\n\n vertexFrom = getVertexFor(ag);\n vertexTo = vertexFrom.neighbour(door);\n\n event = new EdgeStateChangeEvent(key, \n vertexFrom.identity(),\n vertexTo.identity(),\n state);\n evtQ.put(event);\n movingMonitor.waitForAnswer(key);\n stats.add(new EdgeStateStat(ag.getClass()));\n }", "public void update(IFloorModel floor, IElevatorModel elevator) {\n\t\tif(floor == null || elevator == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() NullPointerException\");\n\t\t}\n\t\t\n\t\t//if there are no elevators, do nothing on update. Nothing should or can be updated\n\t\tif(listview_elevators.getItems().isEmpty()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//get current selected elevator\n\t\t//getSelectedIndex() returned -1 if no line is selected\n\t\tif(selectedElevator < 0) {\n\t\t\tthrow new IllegalStateException(\"MainGuiController.update() listview_elevators no line selected!\");\n\t\t}\n\t\t//check if the selected elevator is in manual or automatic mode -> set checkbox and button to right state.\n\t\tif(autoModeAlgo.checkIfInAutoMode(selectedElevator)) {\n\t\t\tcheckbox_manual_mode.setSelected(false);\n\t\t\tbutton_send_to_floor.setDisable(true);\n\t\t}\n\t\telse {\n\t\t\tcheckbox_manual_mode.setSelected(true);\n\t\t\tbutton_send_to_floor.setDisable(false);\n\t\t}\n\t\t\n\t\t//update gui with new values from the given elevator\n\t\t//elevator data\n\t\tPlatform.runLater(() -> {\n\t\t\tInteger targetReranged = elevator.getTarget() + 1;\n\t\t\tlabel_target_text.setText(targetReranged.toString());\n\t\t\tInteger positionReranged = elevator.getPosition() + 1;\n\t\t\tlabel_position_text.setText(positionReranged.toString());\n\t\t\t\n\t\t\tString direction = elevator.getDirection().toString();\n\t\t\tdirection = direction.substring(direction.lastIndexOf('_') + 1);\n\t\t\tdirection = direction.substring(0,1).toUpperCase() + direction.substring(1).toLowerCase();\n\t\t\tlabel_direction_text.setText(direction);\n\t\t\t\n\t\t\tlabel_payload_text.setText(elevator.getPayload().toString());\n\t\t\tInteger speedAbs = Math.abs(elevator.getSpeed());\n\t\t\tlabel_speed_text.setText(speedAbs.toString());\n\t\t\t\n\t\t\tString doorsState = elevator.getDoors().toString();\n\t\t\tdoorsState = doorsState.substring(doorsState.lastIndexOf('_') + 1); \t//get the last part of the enum, this contains the state.\n\t\t\tdoorsState = doorsState.substring(0,1).toUpperCase() + doorsState.substring(1).toLowerCase();\t//all to lower, except the first character\n\t\t\tlabel_doors_text.setText(doorsState);\n\t\t});\n\t\t\n\t\tString floorListViewPrefix = \"Floor \";\n\t\t//stops\n\t\tList<Integer> stops = elevator.getStopsList();\n\t\tif (stops == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() stops\");\n\t\t}\n\t\tObservableList<String> stopsOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : stops) {\n\t\t\tstopsOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_stops.getItems().setAll(stopsOl));\n\t\t\n\t\t//not serviced floors\n\t\tList<Integer> ignoredFloors = elevator.getIgnoredFloorsList();\n\t\tif (ignoredFloors == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.register() ignoredFloors\");\n\t\t}\n\t\tObservableList<String> ignoredFloorsOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : ignoredFloors) {\n\t\t\tignoredFloorsOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_no_service.getItems().setAll(ignoredFloorsOl));\n\t\t\n\t\t//calls\n\t\tList<Integer> callsUp = floor.getUpButtonsList();\n\t\tif (callsUp == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() callsUp\");\n\t\t}\n\t\tObservableList<String> callsUpOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : callsUp) {\n\t\t\tcallsUpOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_calls_up.getItems().setAll(callsUpOl));\n\t\t\n\t\tList<Integer> callsDown = floor.getDownButtonsList();\n\t\tif (callsDown == null) {\n\t\t\tthrow new NullPointerException(\"MainGuiController.update() callsDown\");\n\t\t}\n\t\tObservableList<String> callsDownOl = FXCollections.observableArrayList();\n\t\tfor (Integer e : callsDown) {\n\t\t\tcallsDownOl.add(floorListViewPrefix + (e+1));\n\t\t}\n\t\tPlatform.runLater(() -> listview_calls_down.getItems().setAll(callsDownOl));\n\t}", "public void elevatorFloor()\n {\n int c = 0;\n if (currentFloor < e)\n {\n for(c = currentFloor; c <= e; ++c)\n {\n JOptionPane.showMessageDialog(null, \"Now at floor \" + c);\n }\n }\n else if (currentFloor > e)\n {\n for(c = currentFloor; c >= e; --c)\n {\n JOptionPane.showMessageDialog(null, \"Now at floor \" + c);\n }\n }\n else\n {\n JOptionPane.showMessageDialog(null, \"Now at floor \" + c);\n }\n \n currentFloor = e;\n \n //displays a different floor depending on user input\n switch(e)\n {\n case 0:\n getFloors.basement();\n break;\n case 1:\n if(getFloors.secKey == true)\n {\n JOptionPane.showMessageDialog(null,\" you are free to go\");\n }\n else\n {\n JOptionPane.showMessageDialog(null,\" you are in the first Floor, you cannot get out without a special key\");\n elevatorLoop();\n }\n break;\n case 2:\n getFirstFloor.livingRoom();\n break;\n case 3:\n getFirstFloor.diningRoom();\n break; \n case 4:\n getFirstFloor.kitchen();\n break;\n case 5:\n getFirstFloor.pantry();\n break;\n case 6:\n getSecondFloor.bedroom1();\n break;\n case 7:\n getSecondFloor.bedroom2();\n break;\n case 8:\n getSecondFloor.masterBedroom();\n break;\n case 9:\n getFloors.attic();\n break;\n \n } \n }", "public int getElevatorState() {\n return elevatorState;\n }", "@Override\n public void moveElevator(final int toFloor, final int elevatorId) {\n log.debug(\"moving {} to {}\", elevatorId, toFloor);\n\n Elevator elevator = elevatorRepository.getElevator(elevatorId);\n elevator.setAddressedFloor(toFloor);\n elevator.setBusy(true);\n elevator.setDirection(calculateDirection(toFloor, elevator.getCurrentFloor()));\n\n elevatorRepository.updateElevator(elevator);\n }", "public void setStateOfMovement(int movementState){stateOfMovement = movementState; }", "public void update (Elevator e, int name) {\n elevator = e;\n // Update the numerical information\n getInfo ();\n // Create a label for its current condition\n buildStrings (name, currCap, maxCap, currFloor, state);\n slider.setValue (currFloor);\n }", "public void changeState() {\r\n if(state == KioskState.CLOSED) {\r\n state = KioskState.OPEN;\r\n } else {\r\n state = KioskState.CLOSED;\r\n }\r\n }", "public void setState(State newState) {this.state = newState;}", "State(int[][] startBoardState, int [][] goalBoardState){\n this.currentBoardState = startBoardState;\n this.goalBoardState = goalBoardState;\n this.g_cost = 0;\n this.parentState = null;\n }", "public void updateElevatorStatus(Integer elevatorID, int currentFloor, int destinationFloor) {\n ElevatorController controller = elevatorControllers.get(elevatorID);\n if (controller == null) {\n System.err.println(\"Failed to update status of elevator with ID: \" + elevatorID.toString());\n return;\n }\n controller.setElevatorCurrentFloor(currentFloor);\n Request request = RequestFactory.createRestartRequest(elevatorID, destinationFloor);\n try {\n scheduler.enqueueInternalRequest(request, controller);\n } catch (ElevatorsSchedulerException e) {\n //unlikely to happen as created request is validated with use of factory design pattern\n System.err.println(e.getMessage());\n }\n }", "public void changeState(int transition) {\n lastState = currentState;\n currentState = nextState[currentState][transition];\n // System.out.println(\" = \" + currentState);\n if (currentState == -2) {\n System.out.println(\"Error [\" + currentState + \"] has occured\");\n terminate();\n }\n else if (currentState == -1) {\n terminate();\n }\n states[currentState].run();\n }", "public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }", "public void goToFloor(int floorId, ElevatorRequestType type) {\n\t\tisBusy = true;\n\t\tif(currentFloorId == floorId) {\n\t\t\tSystem.out.print(\"\\nElevator \" + id + \" is already at floor \" + floorId + \"\\n\");\n\t\t\tif (type == ElevatorRequestType.PICKUP) {\n\t\t\t\tsetCurrentDirection(ElevatorStatus.HANDLING_REQUEST);\n\t\t\t} else {\n\t\t\t\tsetCurrentDirection(ElevatorStatus.STATIONARY);\n\t\t\t}\n\t\t\tisBusy = false;\n\t\t\tnotifyObservers();\n\t\t\treturn;\n\t\t}\n\t\tElevatorTask task = new ElevatorTask(this, floorId, type);\n\t\ttask.start();\n\t}", "public void changeState(GameObjectState s) {\r\n\t\tstate.undoAction();\r\n\t\tstate = s;\r\n\t\tstate.doAction();\r\n\t}", "public void changeState(){\n\t\t//red - Green\n\t\tif (lights[0].isOn()){\n\t\t\tlights[0].turnOff();\n\t\t\tlights[2].turnOn();\n\t\t}\n\t\t\n\t\t//Green -yellow\n\t\telse if(lights[2].isOn()){\n\t\t\tlights[2].turnOff();\n\t\t\tlights[1].turnOn();\n\t\t}\n\t\t//yellow to red\n\t\telse if (lights[1].isOn()){\n\t\t\tlights[1].turnOff();\n\t\t\tlights[0].turnOn();\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void setState(State state) \n\t\t{ current = new PuzzleState(state.getString(state.getState()),\n\t\t\t\t\t\t\t\t\tstate.getString(state.getGoalState())); \n\t\t}", "public void run() {\n\t\ttry {\n\t\t\tif (floorId >= elevator.getCurrentFloorId()) {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.UP);\n\t\t\t\tSystem.out.print(\"\\nElevator \" + elevator.getId() + \" is going up from floor \" + elevator.getCurrentFloorId() + \" to floor \" + floorId + \"\\n\");\n\t\t\t\twhile(floorId > elevator.getCurrentFloorId() && !elevator.shouldBeStopped) {\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\televator.setCurrentFloorId(elevator.getCurrentFloorId() + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.DOWN);\n\t\t\t\tSystem.out.print(\"\\nElevator \" + elevator.getId() + \" is going down from floor \" + elevator.getCurrentFloorId() + \" to floor \" + floorId + \"\\n\");\n\t\t\t\twhile(floorId < elevator.getCurrentFloorId() && !elevator.shouldBeStopped) {\n\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\televator.setCurrentFloorId(elevator.getCurrentFloorId() - 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (type == ElevatorRequestType.PICKUP) {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.HANDLING_REQUEST);\n\t\t\t} else {\n\t\t\t\televator.setCurrentDirection(ElevatorStatus.STATIONARY);\n\t\t\t\televator.isBusy = false;\n\t\t\t}\n\t\t\tif(elevator.shouldBeStopped) {\n\t\t\t\televator.shouldBeStopped=false;\n\t\t\t\tSystem.out.println(\"Elevator is stopped\");\n\t\t\t} else {\n\t\t\t\televator.notifyObservers();\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void move() {\n\t\tif(right) {\n\t\t\tgoRight();\n\t\t\tstate++;\n\t\t\tif(state > 5) {\n\t\t\t\tstate = 3;\n\t\t\t}\n\t\t}\n\t\telse if(left) {\n\t\t\tgoLeft();\n\t\t\tstate++;\n\t\t\tif(state > 2) {\n\t\t\t\tstate = 0;\n\t\t\t}\n\t\t}\n\t}", "public void setState(String state)\n {\n switch(state) {\n case \"Clock-In\": this.state = new ClockedIn();break;\n case \"Clock-Out\": this.state = new ClockedOut();break;\n }\n }", "public int transferPeople(Elevator e)\n\t{\n\t\tint transfered = e.pList.size();\n\t\tfor(int i = 0; i < e.pList.size(); i++)\n\t\t{\n\t\t\tPerson p = e.pList.get(i);\n\t\t\tif(p.destination.floorNumber == this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"person leaving elevator \" + e.id + \" on floor \" + this.floorNumber);\n\t\t\t\te.pList.get(i).exit();\n\t\t\t\te.pList.remove(i);\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.NOTFULL;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\ttransfered-=e.pList.size();\n\t\ttransfered+=this.pList.size();\n\t\tint available = e.getTotalCapacity()-e.getCurrentCapacity();\n\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.IDLE)\n\t\t{\n\t\t\tif(pList.size()!=0&&pList.get(0).destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going up\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGUP;\n\t\t\t}\n\t\t\telse if(pList.size()!=0&&pList.get(0).destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going down\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGDOWN;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\t\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGUP)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber > this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGDOWN)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber < this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(available==0)\n\t\t\t{\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.FULL;\n\t\t\t\tSystem.out.println(\"Elevator \" + e.id + \" is now full\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttransfered-=this.pList.size();\n\t\tSystem.out.println(\"transfered \" + transfered + \" on floor \" + this.floorNumber + \" number of people still on floor is \" + pList.size());\n\t\treturn transfered;\n\t}", "public void setState(TileState newState, boolean react) {\n\t\tif (tileState == newState) {\n\t\t\tSystem.err.println(\"Cannot set a Tile to the state it is already in : \" + newState);\n\t\t\treturn;\n\t\t}\n\t\tif (!canChangeStateTo(newState)){\n\t\t\tSystem.err.println(\"Cannot set a Tile to \" + newState + \" when it is in it's \" + tileState + \" state.\");\n\t\t\treturn;\n\t\t}\n\t\tTileState oldState = this.tileState;\n\t\tthis.tileState = newState;\n\t\trefreshArrow();\n\t\t\n\t\tif (react)\n\t\t\tif (newState == TileState.CORRECTLY_SWIPED) {\n\t\t\t\t// Play the correct-swipe sound.\n\t\t\t\tgame.audio().playSound(Gdx.files.internal(CORRECT_SWIPE_SOUND_SOURCE), volume);\n\t\t\t\t\n\t\t\t\tnew Animator(game)\n\t\t\t\t\t.shrinkTile(this, arrowGreenTime())\n\t\t\t\t\t.getTween(0).setCallback(new TweenCallback() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onEvent(int type, BaseTween<?> source) {\n\t\t\t\t\t\t\tif (type == TweenCallback.COMPLETE)\n\t\t\t\t\t\t\t\tif (listener != null)\n\t\t\t\t\t\t\t\t\tsetState(TileState.FINISHED);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t} else if (newState == TileState.INCORRECTLY_SWIPED) {\n\t\t\t\t// Play the incorrect-swipe sound.\n\t\t\t\tgame.audio().playSound(Gdx.files.internal(INCORRECT_SWIPE_SOUND_SOURCE), volume);\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\tif (this.listener != null)\n\t\t\tthis.listener.recieveTileStateChange(this, oldState, newState);\n\t}", "public void runStateMachine() {\n switch(m_currentState) {\n case PoweringUpState:\n if (this.doPowerUpStuff()) {\n this.setRobotState(RobotState.InitializingDataState);\n }\n break;\n case InitializingDataState:\n\n if (this.initializeData()) {\n // Load some commands for our robot.\n // We could definitely load these from a different file.\n System.out.println(\"-------- Populating Command Queue --------\");\n m_robotQueue.addCommand(new MoveToLocationXY(1.0, 2.0, 2.0));\n m_robotQueue.addCommand(new MoveToLocationXY(-1.0, -2.0, 1.0));\n m_robotQueue.addCommand(new RotateDegrees(180.0, 22.5));\n\n System.out.println(\"\\n-------- Entering Main Robot State --------\");\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n break;\n case IdleWaitingForCommandState:\n if (m_robotQueue.isCommandPending()) {\n\n m_currentCommand = m_robotQueue.getNextCommand();\n\n // m_currentCommand is a generic Object. Let's see what it actually is...\n String commandName = m_currentCommand.getClass().toString();\n System.out.println(\"* Got new command. Processing: \" + commandName);\n\n // Change robot state depending on the type of command we found.\n switch (commandName) {\n // NOTE: This \"class xyz\" text compare is kind of weird,\n // We could probably find a better way.\n case \"class commands.MoveToLocationXY\":\n this.setRobotState(RobotState.MovingToLocationState);\n break;\n case \"class commands.RotateDegrees\":\n this.setRobotState(RobotState.RotatingState);\n break;\n default:\n System.out.println(\"Unrecognized command \" + commandName);\n }\n System.out.println();\n\n } else if (m_currentCommand != null) {\n m_currentCommand = null; // Doing nothing. Clear current command.\n }\n break;\n case MovingToLocationState:\n MoveToLocationXY moveCmd = (MoveToLocationXY) m_currentCommand;\n try {\n if (moveCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case RotatingState:\n RotateDegrees rotateCmd = (RotateDegrees) m_currentCommand; // Cast to correct type.\n try {\n if (rotateCmd.runUntilComplete()) {\n // Done moving, process next item in command queue\n this.setRobotState(RobotState.IdleWaitingForCommandState);\n }\n } catch (InterruptedException e) { // for Thread.sleep - demo only\n e.printStackTrace();\n }\n break;\n case SearchingForTargetsState:\n // TODO - implement SearchTarget demo behavior\n break;\n }\n }", "void changeState(Spreadable spreadable, State from, State to, int count);", "private void setState(State newState) {\n mStateStartTime = System.currentTimeMillis();\n\n // Update the UI with the name of the current state\n mCurrentStateTextView.setText(newState.name());\n\n // Opportunity to do stuff when a new state is set.\n switch (newState) {\n case READY:\n break;\n case RUNNING_A_SCRIPT:\n runScript();\n break;\n case SEEKING_HOME:\n break;\n case SUCCESS:\n break;\n }\n mState = newState;\n }", "private LogicStatus updateState(Board thing) {\n count(thing);\n CellType curstate = thing.getCellType(x,y);\n\n // is it a terminal?\n if (walls.size() == 3) {\n if (curstate == CellType.NOTTERMINAL) return LogicStatus.CONTRADICTION;\n thing.setCellType(x,y,CellType.TERMINAL);\n return LogicStatus.LOGICED;\n }\n\n // the other states (BEND,STRAIGHT) require two paths.\n if (paths.size() < 2) return LogicStatus.STYMIED;\n\n Iterator<Direction> dit = paths.iterator();\n Direction d1 = dit.next();\n Direction d2 = dit.next();\n\n CellType nextct = d1 == d2.getOpp() ? CellType.STRAIGHT : CellType.BEND;\n\n if (nextct == CellType.STRAIGHT) {\n thing.setCellType(x,y,nextct);\n return LogicStatus.LOGICED;\n }\n\n if (curstate == CellType.NOTBEND) return LogicStatus.CONTRADICTION;\n\n thing.setCellType(x,y,nextct);\n return LogicStatus.LOGICED;\n }", "public abstract void updateState(ENodeState state);", "@Override\n\tpublic void changeState(VehicleState newState) throws ServiceException {\n\t\t\n\t}", "@Override\n public void stateChanged(ChangeEvent e) {\n model.generateGridWithSpecifiedProblemDifficulty(view.getSpinnerValue());\n view.updateGridPanel(model.getGrid(), model.getAgentLocation());\n }", "private void updateState() {\n switch (game.getGameState()) {\n case GAME:\n gamePlay();\n break;\n case ONE:\n lostTurnByOne();\n break;\n case READY:\n readyToPlay();\n break;\n case START:\n startGame();\n break;\n case TURN:\n startTurn();\n break;\n case FINISH:\n finishGame();\n break;\n }\n }", "protected abstract int newState();", "public void setCellState(int newState) {\n this.myState = newState;\n }", "private ScanState switchState(ScanState desired,EnumSet<ScanState> allowed) {\n final ScanState old;\n final long timestamp;\n final long sequence;\n synchronized(this) {\n old = state;\n if (!allowed.contains(state))\n throw new IllegalStateException(state.toString());\n state = desired;\n timestamp = System.currentTimeMillis();\n sequence = getNextSeqNumber();\n }\n LOG.fine(\"switched state: \"+old+\" -> \"+desired);\n if (old != desired)\n queueStateChangedNotification(sequence,timestamp,old,desired);\n return old;\n }", "@Test\n\tpublic void validState_changeState() {\n\t\tString testState = \"OFF\";\n\t\tItem testItem = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\ttestItem.changeState(testItem.getName(), testState);\n\t\tSystem.out.println(testItem.getState());\n\t\tassertEquals(testItem.getState(), testState);\n\t\t\n\t}", "public abstract void stateChanged(STATE state);", "abstract public void updateState();", "public\tElevator(){\t\t\t\t\t\t\n\t\tcurrentFloor = 1;\n\t\tcurrentDirection = \"UP\";\n\t\ttotalPassengers = 0;\n\t\ttotalPassDestFloor = new int[8];\n\t\tdestRequest = new char[8];\n\t\t \n\t}", "void update(){\n if(!data.up.isEmpty() && data.isMoving==false){\r\n if(data.floor<data.up.get(0))\r\n data.state = 1;\r\n else if(data.floor>data.up.get(0))\r\n data.state = -1;\r\n }\r\n else if(!data.down.isEmpty() && data.isMoving==false){\r\n if(data.floor<data.down.get(0))\r\n data.state = 1;\r\n else if(data.floor>data.down.get(0))\r\n data.state = -1;\r\n\r\n } \r\n else if(data.isMoving == false)\r\n data.state = 0;\r\n }", "public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}", "public void transport(int startFloor, int endFloor, boolean up){\r\n\t\t\r\n\t\tisIntransit = true;\r\n\t\tdirectionUp = up;\r\n\t\topenDoor(startFloor);\r\n\t\tcloseDoor(startFloor);\r\n\t\t\r\n\t\t//Traverse floor and report.\r\n\t\tint trip = endFloor-startFloor; \r\n\t\tint finalCount = trip*1000;\r\n\t\tint j = 0 ;\r\n\t\televatorAt = startFloor ;\r\n\t\tfor(int i=0; i<finalCount; i++){\t\t\t\r\n\t\t\tj++;\r\n\t\t\tif(j==1000){\r\n\t\t\t\tif(up){\r\n\t\t\t\t\televatorAt++;\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\televatorAt--;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Elevator no. \" + id + \" at \"+ elevatorAt);\r\n\t\t\t\tj=0;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\tfloorsTraversed += endFloor - startFloor; \r\n\t\ttrips++;\r\n\t\tif(trips==100){\r\n\t\t\tserviccerequired = true; \r\n\t\t}\r\n\t\t\r\n\t\topenDoor(endFloor);\r\n\t\tcloseDoor(endFloor);\r\n\t\t\r\n\t\tisIntransit = false;\r\n\t}", "long getStateChange();", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\t//changes speed of animation\n\t\tif (e.getSource() == speed) {\n\t\t\ttimer.stop();\n\t\t\ttimer.setDelay(speed.getValue());\n\t\t\tstop.setSelected(true);\n\t\t}\n\t\t//changes # of boxes\n\t\tif (e.getSource() == gridSize) {\n\t\t\ttimer.stop();\n\t\t\tstop.setSelected(true);\n\t\t\tint [][] newGrid = new int [gridSize.getValue()][gridSize.getValue()];\n\t\t\tgridValues = newGrid;\n\t\t\tSetState(-1);\n\t\t\tgenerateValues(source);\n\t\t\tcounter = 0;\n\t\t\tsteps.setText(\"Steps: \" + counter);\n\t\t\trepaint();\n\t\t}\n\t}", "private void setState(State newState) {\n state = newState;\n switch (newState) {\n case IDLE:\n toggleReco.setText(\"Tap to speak.\");\n break;\n case LISTENING:\n toggleReco.setText(getResources().getString(R.string.listening));\n break;\n case PROCESSING:\n toggleReco.setText(getResources().getString(R.string.processing));\n break;\n }\n }", "public void setState (int new_state, int force) {\n\t\t\tLog.d (\"STATE\", \"New state : \" + new_state);\n\t\t\tif (new_state >= BotMove.RIGHT_15 && new_state <= BotMove.LEFT_5){\n\t\t\t\tstate = new_state;\n\t\t\t\ttakeInterruptAction();\n\t\t\t}\n\t\t\telse if(state != new_state || force == 1){\n\t\t\t\tstate = new_state;\n\t\t\t\ttakeInterruptAction();\n\t\t\t}\n\t\t\telse wt.take_reading = true;\n\t\t}", "public void setState (int philosphoer, String state){\n currentState[philosphoer] = state;\n }", "public void stateChanged(ChangeEvent e) {\n\t\tupdatePits();\n\t\tSystem.out.println(\"Player 0 score: \" + model.getMancalas()[0]);\n\t\tSystem.out.println(\"Player 1 score: \" + model.getMancalas()[1]);\n\t\tleftScore.setText( Integer.toString(model.getMancalas()[1]));\n\t\trightScore.setText( Integer.toString(model.getMancalas()[0]));\n\t\tSystem.out.println(\"It is now player: \" + model.getPlayer() + \"'s turn\");\n\t\t\n\t}", "public void updateState();", "public void setState(AeBpelState aState) throws AeBusinessProcessException;", "protected void changeStatus(String state)\n { call_state=state;\n printLog(\"state: \"+call_state,Log.LEVEL_MEDIUM); \n }", "@Override\n public State doMove(State otherState) {\n\tWaterJugState state = (WaterJugState) otherState;\n \n if(this.getMoveName().equals(\"Fill Jug X\")){\n //if water jug X has room to add to \n if(state.getJugX() < 3){\n nextState = new WaterJugState(3, state.getJugY());\n } //else water jug x is full =3\n else {\n nextState = null;\n }\n }\n else if(this.getMoveName().equals(\"Fill Jug Y\")){\n if(state.getJugY()<4){\n nextState = new WaterJugState(state.getJugX(),4);\n }\n else{\n nextState=null;\n }\n }\n else if(this.getMoveName().equals(\"Empty Jug X\")){\n if(state.getJugX()>0){\n nextState = new WaterJugState(0,state.getJugY());\n }\n else{\n nextState=null;\n }\n }\n else if(this.getMoveName().equals(\"Empty Jug Y\")){\n if(state.getJugY()>0){\n nextState = new WaterJugState(state.getJugX(),0); \n }\n else{\n nextState= null;\n }\n }\n else if(this.getMoveName().equals(\"Transfer Jug X to Jug Y\")){\n if(state.getJugX()>0 && state.getJugY()<4){\n int Ycount=state.getJugY();\n int Xcount=state.getJugX();\n int total=Ycount+Xcount;\n if(total<=4){\n nextState = new WaterJugState(0,state.getJugX()+state.getJugY()); \n }\n else if(total>4){\n nextState= new WaterJugState((state.getJugX()+state.getJugY()-4),(state.getJugX()+state.getJugY())-(state.getJugX()+state.getJugY()-4)); \n }\n }\n else{\n nextState= null;\n }\n }\n else if(this.getMoveName().equals(\"Transfer Jug Y to Jug X\")){\n if(state.getJugY()>0 && state.getJugX()<3){\n int Ycount=state.getJugY();\n int Xcount=state.getJugX();\n int total=Ycount+Xcount;\n if(total<=3){\n nextState = new WaterJugState(state.getJugX()+state.getJugY(),0); \n }\n else if(total>3){\n nextState= new WaterJugState((state.getJugX()+state.getJugY())-(state.getJugX()+state.getJugY()-3),(state.getJugX()+state.getJugY()-3)); \n }\n }\n else{\n nextState= null;\n } \n }\n \n return nextState; \n }", "void changed(State state, Exception e);", "private void SetState(VehicleState state) {\n this.state = state;\n }", "public void setState(String state, String actor, String action)\r\n/* 30: */ {\r\n/* 31: 32 */ setActor(actor);\r\n/* 32: 33 */ setAction(action);\r\n/* 33: 34 */ if ((state != null) && (state.equals(\"want\"))) {\r\n/* 34: 35 */ setImage(new ImageIcon(PictureAnchor.class.getResource(\"thumbUp.jpg\")));\r\n/* 35: 37 */ } else if ((state != null) && (state.equals(\"notWant\"))) {\r\n/* 36: 38 */ setImage(new ImageIcon(PictureAnchor.class.getResource(\"thumbDown.jpg\")));\r\n/* 37: */ }\r\n/* 38: */ }", "public void update()\n\t{\n\t\tif(pList.size()==0)\n\t\t\treturn;\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(p.destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tup = true;\n\t\t\t}\n\t\t\telse if(p.destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tdown = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpList.remove(i);\n\t\t\t}\n\t\t}\n\t\tif(up)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.UPPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event,0);\n\t\t}\n\t\tif(down)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.DOWNPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event, 0);\n\t\t}\n\t}", "@Test\n\tpublic void validName_changeState() throws IOException {\n\t\tint responseCode = 200;\n\t\tmainItem.changeState(\"lamp_woonkamer\", \"OFF\");\n\t\tassertTrue(mainItem.getConnection().getResponseCode() == responseCode);\n\t}", "public void setState(int state);", "public void setState(int state);", "void changeRoom(String s) throws IOException {\n switch (s) {\n case \"UP\":\n level.changeRoom(\"UP\");\n break;\n case \"DOWN\":\n level.changeRoom(\"DOWN\");\n break;\n case \"LEFT\":\n level.changeRoom(\"LEFT\");\n break;\n case \"RIGHT\":\n level.changeRoom(\"RIGHT\");\n break;\n }\n }", "@Test\n //checks for state switching (on/off)\n void SwitchStates() {\n Assertions.assertFalse(machine.isTurnedOn());\n\n //then, switch on and check if on\n machine.setTurnedOn(true);\n Assertions.assertTrue(machine.isTurnedOn());\n\n //switch off to see if turned off correctly\n machine.setTurnedOn(false);\n Assertions.assertFalse(machine.isTurnedOn());\n\n //and now check the inversion\n machine.flipSwitch();\n\n Assertions.assertTrue(machine.isTurnedOn());\n }", "public Elevator() {\n currentFloor = 1;\n elevatorState = IDLE;\n request = null;\n }", "private void setGameState() // Convert the string version of the game state to the GameState version.\n\t{\n\t\tif (gameStateString.equalsIgnoreCase(\"waitingForStart\"))\n\t\t{\n\t\t\tgameState = GameState.waitingForStart;\n\t\t}\n\t\telse if (gameStateString.equalsIgnoreCase(\"gameWelcome\"))\n\t\t{\n\t\t\tgameState = GameState.gameWelcome;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"decideWhoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.decideWhoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerOneGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerOneGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersPlayerTwoGoesFirst\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersPlayerTwoGoesFirst;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerOnesTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerOnesTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"twoPlayersNowPlayerTwosTurn\"))\n\t\t{\n\t\t\tgameState = GameState.twoPlayersNowPlayerTwosTurn;\n\t\t} \n\t\telse if (gameStateString.equalsIgnoreCase(\"aPlayerHasWon\"))\n\t\t{\n\t\t\tgameState = GameState.aPlayerHasWon;\n\t\t} \n\n\t}", "public static void setState(States state) {\r\n\t\tcurrentState = state;\r\n\t}", "@Override\n\t\tprotected void doCurrentState() {\n\t\t\tswitch(currentState) {\n\t\t\t\n\t\t\t// follow operator commands, but respect limit switches\n\t\t\tcase manual:\n\t\t\t\tcd.gearLeftOpen.set(rd.gearManualLeftOpen && !rd.leftOpenSwitch, rd.gearManualLeftClose && !rd.leftCloseSwitch );\n\t\t\t\tcd.gearRightOpen.set(rd.gearManualRightOpen && !rd.rightOpenSwitch, rd.gearManualRightClose && !rd.rightCloseSwitch);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// close each motor until fully closed, if one motor is closed stop that motor\n\t\t\tcase autoClose:\n\t\t\t\tcd.gearLeftOpen.set(false, !rd.leftCloseSwitch );\n\t\t\t\tcd.gearRightOpen.set(false, !rd.rightCloseSwitch);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// open each motor until fully open, if one motor is open stop that motor\t\n\t\t\tcase autoOpen:\n\t\t\t\tcd.gearLeftOpen.set(!rd.leftOpenSwitch, false);\n\t\t\t\tcd.gearRightOpen.set(!rd.rightOpenSwitch, false);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public boolean updateState(Landscape scape) {\n\t\tboolean[] emptyElevators = new boolean[this.elevators.length];\n\t\tint emptyCount = 0;\n\t\t\n\t\t\n\t\t\t\t\n\t\t// this finds out which elevators are in which state and what direction they are traveling in so that\n\t\t// we can only act on ones that are in similar situations\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\t// empty and has no target floor\n\t\t\tif( this.elevators[i].isEmpty() ){\n\t\t\t\temptyElevators[i] = true;\n\t\t\t\temptyCount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\temptyElevators[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( ElevatorBank.strategy == ElevatorBank.STRATEGY.GROUP_3){\n\t\t\temptyRule2(emptyElevators, emptyCount);\n\t\t}\n\t\telse{\n\t\t\temptyRule(emptyElevators, emptyCount);\n\t\t}\n\t\t// never dies\n\t\treturn true;\n\t}", "private void setState(WFDState s) {\n Log.d(TAG, \"Moving from \" + sState + \" --> \" + s);\n sState = s;\n }", "public void setState(TileState newState) {\n\t\tthis.setState(newState, true);\n\t}", "public void stateChanged(ChangeEvent e)\r\n\t\t\t\t\t{\n\t\t\t\t\t\ttheGridView.showWalkTiles(showWalkTilesButton.isSelected());\r\n\t\t\t\t\t}", "@Test\n public void testStateTransitions1()\n { \n assertTrue(theEngine.inStartingState());\n \n //Starting -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n\n //Starting -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n \n //Starting -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inStartingState());\n \n theEngine.start();\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n \n //Halted -> Starting\n //impossible through code\n\n //Halted -> Player died\n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n\n //Halted -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n\n theEngine.start();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inPlayingState());\n \n //Playing -> Starting\n //impossible by code\n \n killPlayerByPlayerMove();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Player died -> Halted\n theEngine.quit();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Player died -> Player won\n letPlayerWin();\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inDiedState());\n \n //Undo from player died state\n theEngine.undoLastMove();\n //this didn't throw assertion error, so this is fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "Elevator() {\n _currentFloor = Floor.FIRST;\n _passengersOnboard = 0;\n _directionOfTravel = DirectionOfTravel.UP;\n\n }", "public IFsm transitionTo(Class<? extends IState> p_newState) throws Exception;", "public void stateChanged(ChangeEvent e){\n\n\t\t Component selected = fTabs.getSelectedComponent();\n\n\t\t if (selected == fConnective) {\n\t\t if (!fConnectiveRunning) {\n\t\t fConnective.run();\n\t\t fConnectiveRunning = true;\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (selected == fTT) {\n\t\t if (!fTTRunning) {\n\t\t fTT.run();\n\t\t fTTRunning = true;\n\t\t }\n\t\t }\n\t\t else {\n\t\t if (selected == fSatis) {\n\t\t if (!fSatisRunning) {\n\t\t fSatis.run();\n\t\t fSatisRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fCons) {\n\t\t if (!fConsRunning) {\n\t\t fCons.run();\n\t\t fConsRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fInvalid) {\n\t\t if (!fInvalidRunning) {\n\t\t fInvalid.run();\n\t\t fInvalidRunning = true;\n\t\t }\n\n\t\t }\n\t\t else {\n\t\t if (selected == fFinishPanel) {\n\t\t \trefreshFinishPanel();\n\t\t \n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t }\n\t\t}", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t\tJSlider difficultySlider = (JSlider) e.getSource();\n\t\n\t\tint newDifficulty = difficultySlider.getValue();\n\t\tmodel.getLevelTemplate().setProbConst(newDifficulty);\n\t}", "public Map<Integer, Floor> updateStates(String input, Map<Integer, Floor> floors) {\n\n\t\tString[] inputArr = splitString(input);\n\t\tBoolean movement = Boolean.valueOf(inputArr[0]);\n\t\tInteger floorNumber = Integer.valueOf(inputArr[1]);\n\t\tString corridorType = inputArr[2];\n\t\tInteger corridorNumber = Integer.valueOf(inputArr[3]);\n\n\t\tFloor currentFloor = null;\n\t\tOperatable currentCorridor = null;\n\n\t\t// get which floor\n\t\tcurrentFloor = floors.get(floorNumber);\n\t\tMap<Integer, Operatable> corridors = currentFloor.getCorridor(corridorType);\n\n\t\tif (movement == true) {\n\t\t\t// set state to off of ac's\n\t\t\tfor (Map.Entry<Integer, Operatable> corridor : corridors.entrySet()) {\n\t\t\t\tcorridor.getValue().deviceOff(Constants.AC);\n\t\t\t}\n\t\t\t// get which corridor\n\t\t\tcurrentCorridor = corridors.get(corridorNumber);\n\t\t\tcurrentCorridor.deviceOn(Constants.LIGHT);\n\t\t\tcurrentCorridor.deviceOn(Constants.AC);\n\t\t} else {\n\n\t\t\t// set state to on of ac's\n\t\t\tfor (Map.Entry<Integer, Operatable> corridor : corridors.entrySet()) {\n\t\t\t\tcorridor.getValue().deviceOn(Constants.AC);\n\t\t\t}\n\t\t\t// get which corridor\n\t\t\tcurrentCorridor = corridors.get(corridorNumber);\n\t\t\tcurrentCorridor.deviceOff(Constants.LIGHT);\n\t\t}\n\n\t\treturn floors;\n\t}", "@Override\n public void stateChanged(ChangeEvent e) {\n\n if (tree.isSelected()) {\n runTree(191 - (int) (fractalDepth.getValue() * 1.9));\n }\n if (triangle.isSelected()) {\n runTriangle(401 - 4 * fractalDepth.getValue());\n }\n if (original.isSelected()) {\n runOriginal(201 - 2 * fractalDepth.getValue());\n }\n if (carpet.isSelected()) {\n runCarpet((int) (361 - 3.6 * fractalDepth.getValue()));\n }\n }", "public void setLevelState(LevelState newLevelState) {\r\n\t\tlevelState = newLevelState;\r\n\t}", "@Override\n\tpublic void setState(STATE state) {\n\n\t}", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "@Override\r\n\tpublic int user_request(Floor current_floor, Elevator elevator) \r\n\t{\n\t\tif(current_floor.floor_door.state==0 && elevator.elevator_door.state==0)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "@Test\n public void stateTransitionsTest() throws ApiException {\n Long loanId = null;\n PostSelfLoansLoanIdRequest body = null;\n String command = null;\n PostSelfLoansLoanIdResponse response = api.stateTransitions(loanId, body, command);\n\n // TODO: test validations\n }", "public void setState(int state) {\n\t\tif (state == CHASE)\n\t\t\tthis.state = CHASE;\n\t\telse if (state == RUN) \n\t\t\tthis.state = RUN;\n\t}", "public void terrainStates(){\n \tif(statesPad.getRawButton(portButton)){terrainStates = portState;}\n \telse if(statesPad.getRawButton(chevellButton)){terrainStates = chevellState;}\n \telse if(statesPad.getRawButton(ballGrabButton)){terrainStates = ballGrabState;}\n \telse if(statesPad.getRawButton(driveStateButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(lowBarButton)){terrainStates = lowBarState;}\n \telse if(statesPad.getRawButton(roughButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(rockButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(moatButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(rampartButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(drawButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(sallyButton)){terrainStates = driveState;}\n \telse if(statesPad.getRawButton(statesPadDefault) || drivePad.getRawButton(defaultButton)){terrainStates = driveState;}\n \t\n \tswitch (terrainStates) {\n\t \tcase 1: \n\t \t\tport();\n\t \t\tSystem.out.println(\"HERE IN ONE\");\n\t break;\n\t \tcase 2:\t\n\t \t\tchevell();\n\t \t\tSystem.out.println(\"HERE IN TWO\");\n\t \tbreak;\n\t case 3:\n\t \troughT();\n\t \tSystem.out.println(\"HERE IN THREE\");\n\t \tbreak;\n\t case 4: \n\t \tmoat();\n\t \tSystem.out.println(\"HERE IN FOUR\");\n\t \tbreak;\n\t case 5:\n\t \trampart();\n \t\t\tSystem.out.println(\"HERE IN FIVE\");\n \t\t\tbreak;\n\t case 6: \n\t \tdrawBridge();\n \t\t\tSystem.out.println(\"HERE IN SIX\");\n \t\t\tbreak;\n\t case 7: \n\t \tsallyPort();\n \t\t\tSystem.out.println(\"HERE IN SEVEN\");\n \t\t\tbreak;\n\t case 8: \n\t \tlowBar();\n\t \tSystem.out.println(\"HERE IN EIGHT\");\n\t \tbreak;\n\t case 9: \n\t \trockWall();\n \t\t\tSystem.out.println(\"HERE IN NINE\");\n \t\t\tbreak;\n\t case 10: \n\t \tballGrab();\n\t\t\t\tSystem.out.println(\"HERE IN TEN\");\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\tdrivingState();\n\t\t\t\tSystem.out.println(\"HERE IN TWELVE\");\n\t\t\t\tbreak;\n\t default: \n\t \t//reset all of the states\n\t \tportSwitch \t\t= 0;\n\t \tchevellSwitch\t= 0;\n\t \tballGrabSwitch\t= 0;\n\t \tdriveSwitch\t\t= 0;\n\t \tliftArm();\n\t \twheelArms();\n\t \tSystem.out.println(\"HERE IN DEFAULT\");\n \t}\n \tSystem.out.println(\"OUTSIDE THE SWITCH\");\n }", "protected void setState( EntityState newState ) throws BusinessException\n\t{\n\t\t/* Invariant check */\n\t\tif( newState.equals( this.state ) )\n\t\t\tthrow new ActualStateException( );\n\t\t\n\t\t/* Set the state before the observers update */\n\t\tthis.state = newState;\n\t\t\n\t\t/* Notify the observers */\n\t\tHashMap< EntityState, StateEventsFactory > eventFactories = getEventFactories( );\n\t\tStateEventsFactory stateFactory = eventFactories.get( newState );\n\t\ttry\n\t\t{\n\t\t\tArrayList< DomainEvent > events = stateFactory.getEventsFor( newState, FacturaElectronica2DTO.map( this ) );\n\t\t\tnotifyObservers( events );\n\t\t}\n\t\tcatch ( ObserverUpdateFailed e ) \n\t\t{\n\t\t\te.printStackTrace( );\n\t\t\tArrayList< DomainEvent > failoverEvents = stateFactory.getFailoverEventsFor( newState, FacturaElectronica2DTO.map( this ) );\n\t\t\tnotifyObservers( failoverEvents );\n\t\t}\n\t}", "public void setChangeStateAction(int c)\r\n \t{\r\n \t\tm_iChangeStateBy = c;\r\n \t}", "public void SetState(int s) {\n this.state=LS[s];\n }", "@Override\n public void gotoFloor(int elevatorId, int floor) {\n if (elevatorId > elevators.size() - 1) {\n System.out.println(\"Incorrect request. Elevator = \" + elevatorId + \" is not a valid elevator\");\n }\n elevators.get(elevatorId).getRequests().offer(floor);\n }", "@VisibleForTesting\n boolean tryChangeState(int[] requestedStates, boolean userInitiated) {\n HashMap<Integer, HashSet<Integer>> table =\n userInitiated ? ValidUserInitiatedStateChanges : ValidTaskInitiatedStateChanges;\n\n synchronized (syncObject) {\n for (int newState : requestedStates) {\n HashSet<Integer> validStates = table.get(getInternalState());\n if (validStates != null && validStates.contains(newState)) {\n currentState = newState;\n switch (currentState) {\n case INTERNAL_STATE_QUEUED:\n StorageTaskManager.getInstance().ensureRegistered(this);\n onQueued();\n break;\n case INTERNAL_STATE_IN_PROGRESS:\n onProgress();\n break;\n case INTERNAL_STATE_PAUSED:\n onPaused();\n break;\n case INTERNAL_STATE_FAILURE:\n onFailure();\n break;\n case INTERNAL_STATE_SUCCESS:\n onSuccess();\n break;\n case INTERNAL_STATE_CANCELED:\n onCanceled();\n break;\n default: // fall out\n }\n successManager.onInternalStateChanged();\n failureManager.onInternalStateChanged();\n cancelManager.onInternalStateChanged();\n completeListener.onInternalStateChanged();\n pausedManager.onInternalStateChanged();\n progressManager.onInternalStateChanged();\n\n if (Log.isLoggable(TAG, Log.DEBUG)) {\n Log.d(\n TAG,\n \"changed internal state to: \"\n + getStateString(newState)\n + \" isUser: \"\n + userInitiated\n + \" from state:\"\n + getStateString(currentState));\n }\n\n return true;\n }\n }\n\n Log.w(\n TAG,\n \"unable to change internal state to: \"\n + getStateString(requestedStates)\n + \" isUser: \"\n + userInitiated\n + \" from state:\"\n + getStateString(currentState));\n\n return false;\n }\n }", "void setState(State state);", "public void changeState(ClientStateName clientStateName)\n {\n this.currentState = clientStateName;\n setChanged();\n notifyObservers(currentState);\n }" ]
[ "0.70931983", "0.6577415", "0.6242648", "0.6104145", "0.6094384", "0.6057387", "0.604084", "0.60097873", "0.59752107", "0.5891517", "0.5891057", "0.58731264", "0.57952523", "0.57844126", "0.57616097", "0.5731503", "0.57111126", "0.5704077", "0.56716377", "0.56438166", "0.561578", "0.5603766", "0.55879784", "0.5571598", "0.5547978", "0.5522495", "0.5503416", "0.54714006", "0.5470367", "0.5432815", "0.54304534", "0.54028636", "0.53985626", "0.53982455", "0.5391422", "0.5385901", "0.53849375", "0.5383705", "0.53823274", "0.537613", "0.5371472", "0.5367902", "0.53580105", "0.5349277", "0.53421694", "0.5333732", "0.53233397", "0.53195584", "0.5316962", "0.5307273", "0.530316", "0.5301286", "0.5294537", "0.5294312", "0.52900845", "0.52880573", "0.5283031", "0.52744704", "0.52733165", "0.5269547", "0.52524406", "0.52309006", "0.5228966", "0.5221476", "0.5216978", "0.5208799", "0.5206541", "0.5200979", "0.5200979", "0.51977646", "0.5197379", "0.51874226", "0.5178867", "0.51783234", "0.51742595", "0.5174172", "0.5172795", "0.5168961", "0.5168728", "0.5146273", "0.51376325", "0.5134854", "0.5127677", "0.51269686", "0.5126961", "0.51261234", "0.51203775", "0.5110742", "0.5106358", "0.5101691", "0.50947934", "0.50940025", "0.50897086", "0.50880975", "0.5084768", "0.5081417", "0.50806665", "0.5076847", "0.50766444", "0.50732934" ]
0.846341
0
maintaining people in elevator
public void addPerson(Person person){ if (person.getCurrentFloor() != this.currentFloor){ throw new IllegalArgumentException("Person with ID " + person.getPersonID() + " enters elevator with ID " + this.ElevatorID + " on wrong floor"); } if (!doorOpened) { throw new IllegalArgumentException("Person with ID " + person.getPersonID() + " wants to go to closed elevator with ID " + this.ElevatorID); } else if (peopleInside.contains(person)) { throw new IllegalArgumentException("Person with ID " + person.getPersonID() + " is already in elevator with ID " + this.ElevatorID); } peopleInside.add(person); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addPeopleToElevator(Elevator e)\n\t\t\tthrows InvalidParameterException {\n\t\tsynchronized (this) {\n\t\t\tArrayList<Person> peopleToRemove = new ArrayList<Person>();\n\n\t\t\tfor (int i = 0; i < people.size(); i++) {\n\n\t\t\t\tif (e.getStatus() == Elevator.Status.MOVING_UP) {\n\n\t\t\t\t\tif (people.get(i).getDestination() > this.story) {\n\t\t\t\t\t\tif (e.addPerson(people.get(i))) {\n\t\t\t\t\t\t\tpeopleToRemove.add(people.get(i));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak; // Not enough room\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else if (e.getStatus() == Elevator.Status.MOVING_DOWN) {\n\n\t\t\t\t\tif (people.get(i).getDestination() < this.story) {\n\t\t\t\t\t\tif (e.addPerson(people.get(i))) {\n\t\t\t\t\t\t\tpeopleToRemove.add(people.get(i));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak; // Not enough room\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\n\t\t\t\t\tif (people.get(i).getDestination() != this.story) {\n\t\t\t\t\t\tif (e.addPerson(people.get(i))) {\n\t\t\t\t\t\t\tpeopleToRemove.add(people.get(i));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak; // Not enough room\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tfor (int i = 0; i < peopleToRemove.size(); i++) {\n\t\t\t\tpeopleToRemove.get(i).setAddedToElevatorTime();\n\t\t\t}\n\n\t\t\tpeople.removeAll(peopleToRemove);\n\t\t}\n\t}", "public int transferPeople(Elevator e)\n\t{\n\t\tint transfered = e.pList.size();\n\t\tfor(int i = 0; i < e.pList.size(); i++)\n\t\t{\n\t\t\tPerson p = e.pList.get(i);\n\t\t\tif(p.destination.floorNumber == this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"person leaving elevator \" + e.id + \" on floor \" + this.floorNumber);\n\t\t\t\te.pList.get(i).exit();\n\t\t\t\te.pList.remove(i);\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.NOTFULL;\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\ttransfered-=e.pList.size();\n\t\ttransfered+=this.pList.size();\n\t\tint available = e.getTotalCapacity()-e.getCurrentCapacity();\n\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.IDLE)\n\t\t{\n\t\t\tif(pList.size()!=0&&pList.get(0).destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going up\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGUP;\n\t\t\t}\n\t\t\telse if(pList.size()!=0&&pList.get(0).destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tSystem.out.println(e.id + \" Now going down\");\n\t\t\t\te.getCurrentState().directionState = ElevatorState.DirectionState.GOINGDOWN;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\t\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGUP)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber > this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(e.getCurrentState().directionState == ElevatorState.DirectionState.GOINGDOWN)\n\t\t\t{\n\t\t\t\tif(p.destination.floorNumber < this.floorNumber)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"person entering elevator \" + e.id + \" from floor \" + this.floorNumber + \n\t\t\t\t\t\t\t\" destination is \" + p.destination.floorNumber);\n\t\t\t\t\tpList.remove(p);\n\t\t\t\t\tp.enter();\n\t\t\t\t\ti--;\n\t\t\t\t\tp.current=e;\n\t\t\t\t\tp.state = Person.ELEVATOR;\n\t\t\t\t\te.pList.add(p);\n\t\t\t\t\tif(!e.getFloorsRequested().contains(p.destination))\n\t\t\t\t\t{\n\t\t\t\t\t\te.getFloorsRequested().add(p.destination);\n\t\t\t\t\t}\n\t\t\t\t\tavailable--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(available==0)\n\t\t\t{\n\t\t\t\te.getCurrentState().capacityState=ElevatorState.CapacityState.FULL;\n\t\t\t\tSystem.out.println(\"Elevator \" + e.id + \" is now full\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttransfered-=this.pList.size();\n\t\tSystem.out.println(\"transfered \" + transfered + \" on floor \" + this.floorNumber + \" number of people still on floor is \" + pList.size());\n\t\treturn transfered;\n\t}", "public void addPersonToElevator(int floorId, IElevator elevator) throws InvalidArgumentException {\n \tIFloor floor = getFloor(floorId);\n \tArrayList<IPerson> personList = floor.getWaitingPersons();\n \tfor(int i=0;i<personList.size();i++) {\n \t\tIPerson p = personList.get(i);\n \t\tif(elevator.addPerson(p)) {\n \t\t\tfloor.personGetIn(p,elevator.getElevatorID());\n \t\t}else {\n \t\t\tbreak;\n \t\t}\n \t}\n }", "public void checkAvaliableElevators()\r\n\t{\r\n\t\tSystem.out.println(\"--------- Checking Elevators Current Status ------\");\t\r\n\t\t\r\n\t\tif(availableElevadors.isEmpty())\r\n\t\t{\r\n\t\t\tfor(int i=0; i <numberOfElevators-3; i++) {\r\n\t\t\t\tavailableElevadors.add(occupiedElevadors.remove(i));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"--------- Elevators are available again ------\");\r\n\t\t\r\n\t\t}else {\r\n\t\t\tfor(int i=0;i<availableElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + availableElevadors.get(i).getElevatorNumber() +\" ready for Requests\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tfor(int i=0;i<occupiedElevadors.size();i++) {\r\n\t\t\t\tSystem.out.println(\" Elevator no \" + occupiedElevadors.get(i).getElevatorNumber() +\" is Occupied\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t}\r\n\r\n\t}", "public Person(ElevatorController elevatorController){\n this.id = idGenerator.getAndIncrement();\n this.arrivalTime = setArrivalTime();\n this.arrivalFloor = setArrivalFloor();\n\t\t this.destinationFloor = setDestinationFloor();\n this.baggageWeight = setLuggageWeight();\n this.personWeight = setPassengerWeight();\n this.random = new Random();\n this.elevatorController = elevatorController;\n }", "public interface Elevator {\n public static final int UP = 1, LEVEL = 0, DOWN = -1, ERROR = -2;\n /** Returns the minimal floor number to which this Elevator can reach(often a negative value).\n * This is the same value as the lowest floor in the building - this elevator belongs to. */\n public int getMinFloor();\n /** Returns the maximal floor number to which this Elevator can reach.\n * This is the same value as the highest floor in the building - this elevator belongs to. */\n public int getMaxFloor();\n /** Returns the time (in seconds it takes the Elevator to open its doors. */\n public double getTimeForOpen();\n /** Returns the time (in seconds it takes the Elevator to close its doors */\n public double getTimeForClose();\n /** Returns the Elavator's current state: {UP, DOWN, LEVEL, ERROR} the state \"LEVEL\" mark that the elevator has reached the floor -\n * and is now ready to load / unload and get new orders. */\n public int getState(); // UP, DOWN, LEVEL, ERROR\n /** Returns the Elevator's current position (floor) as an Integer. */\n public int getPos();\n /** Moves the elevator form the current position to the destination floor. */\n public boolean goTo(int floor);\n /** Allows the elevator to stop in an intermidiate floor between src and dest, assumeing the elevator has not yer pass the desired floor in which it needs to stop. */\n public boolean stop(int floor);\n /** Returns the speed (in floor per second), e.g. if the Elevator speed is 0.4 - it takes it 2.5 seconds to pass a single floor. */\n public double getSpeed();\n /** Return the time in seconds that it takes the elevator to start moving in full speed (assumed to be a fixed value). */\n public double getStartTime();\n /** Return the time in seconds that it takes the elevator to stop moving in full speed (assumed to be a fixed value).*/\n public double getStopTime();\n /**\n * @return the id of this elevator (simple index as in the building).\n * Note: this index should be the same as in the elevator allocation algorithm.\n */\n public int getID();\n}", "public void addPassenger() {\n\t\t\n\t\tsynchronized(this) {\n\t\t\tcurrentOccup++;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Elevator \" + elevatorNum + \" total passenger count: \" + currentOccup);\n\t}", "public boolean updateElevator() { \n \t//If no people are waiting, do nothing\n if (queue.isEmpty()){\n \t\treturn true;\n \t}\n \n //Update total wait time\n for (int i = 0; i < queue.size(); i++) {\n if (queue.get(i).getActionType() == ElevatorAction.PICKUP) {\n totalWaitTime = totalWaitTime.add(BigInteger.ONE);\n queue.get(i).getPassenger().tempwT += 1;\n }\n }\n \n //Update total travel time\n totalTravelTime = totalTravelTime.add(BigInteger.valueOf((long)currentPassengers.size()));\n for (int i = 0; i < currentPassengers.size(); i++) {\n currentPassengers.get(i).temptT += 1;\n }\n \n //Passengers boarding, no movement\n if (waitingTime > 0) {\n waitingTime -= 1;\n return true;\n }\n \n ElevatorQueueObject q = queue.getFirst();\n \n //If the elevator is full, fetch the next passenger who can disembark successfully\n int index = 1;\n while (currentPassengers.size() == specs.getCarryCapacity() \n && (q.getActionType() == ElevatorAction.PICKUP ||\n !currentPassengers.contains(q.getPassenger()))) {\n q = queue.get(index);\n index += 1;\n }\n \n //Fetch next destination\n int dest = 0;\n if (q.getActionType() == ElevatorAction.PICKUP) {\n dest = q.getPassenger().getOrigin();\n } else {\n dest = q.getPassenger().getDestination();\n }\n \n //Check destination is valid\n if (!containsFloor(floors, dest)) {\n return false;\n }\n \n //Update Elevator Position\n float tempFloor = currentFloor;\n float newFloor = currentFloor;\n \n if (dest > currentFloor) { //Going up\n newFloor += (specs.getCarSpeed() / distancePerFloor);\n if (dest <= newFloor) { //Reached destination\n currentFloor = dest;\n //Set waiting time for embarking/disembarking\n waitingTime = specs.getFloorDelay();\n } else {\n currentFloor = newFloor;\n }\n } else if (dest < currentFloor) { //Going down\n newFloor -= (specs.getCarSpeed() / distancePerFloor);\n if (dest >= newFloor) { //Reached destination?\n currentFloor = dest;\n //Set waiting time for embarking/disembarking\n waitingTime = specs.getFloorDelay();\n } else {\n currentFloor = newFloor;\n }\n }\n\n //Update travel distance \n totalTravelDistance = totalTravelDistance.add(\n BigDecimal.valueOf(Math.abs(tempFloor - currentFloor) * distancePerFloor)\n );\n \n //Everything okay\n return true;\n }", "public void updateBuildingManager(){\n for(int onFloor = 0; onFloor < passengerArrivals.size(); onFloor++){\n for(int i = 0; i < passengerArrivals.get(onFloor).size(); i++){\n PassengerArrival aPassengerArrival = passengerArrivals.get(onFloor).get(i);\n if(SimClock.getTime() % aPassengerArrival.getTimePeriod() == 0){\n \n aBuildingManager.updatePassengerRequestsOnFloor(onFloor, aPassengerArrival.getNumPassengers(),\n aPassengerArrival.getDestinationFloor());\n } \n }\n }\n }", "public int getNumberOfPeopleInElevator(int elevator) {\r\n /*\r\n switch(elevator) {\r\n case 1: return 1;\r\n case 2: return 4;\r\n default: return 0;\r\n }\r\n */\r\n int i = 0;\r\n try {\r\n ElevatorScene.personCountMutex.acquire();\r\n i = numberOfSpacesInElevator;\r\n ElevatorScene.personCountMutex.release();\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } \r\n return i;\r\n }", "public Person(ElevatorControllerGUI elevatorController){\n this.id = idGenerator.getAndIncrement();\n this.arrivalTime = random.nextInt((30-1)+1)+1; \n this.arrivalFloor = random.nextInt((4-2)+1)+2; \n\t\t this.destinationFloor = random.nextInt((10-5)+1)+5; \n\t\t this.baggageWeight = setLuggageWeight();\n this.personWeight = setPassengerWeight();\n this.random = new Random();\n this.elevatorControllerGUI = elevatorController;\n }", "public void Elevator() {\n // Use these to get going:\n // setSetpoint() - Sets where the PID controller should move the system\n // to\n // enable() - Enables the PID controller.\n \t\n }", "public WaiterAgent(String name, RestaurantGui gui, AStarTraversal aStar,\n\t\t Restaurant restaurant, Table[] tables) {\n\tsuper();\n\tthis.gui = gui;//main gui\n\tthis.name = name;\n\tthis.aStar = aStar;\n\tthis.restaurant = restaurant;//the layout for astar\n\twaiter = new Waiter(name.substring(0,2), new Color(255, 0, 0), restaurant);\n\t//currentPosition = new Position(3,13);\n\tcurrentPosition = new Position(waiter.getX(), waiter.getY());\n\tcurrentPosition.moveInto(aStar.getGrid());\n\toriginalPosition = currentPosition;//save this for moving into\n\tthis.tables = tables;\n\n\tString query =\n \"1 (?person)(and (person ?person)(hasname ?person \\\"\" + name+\"\\\"))\";\n loomInstance = PowerloomHelper.retrieve1(query);\n if (loomInstance!=null){\n PowerloomHelper.getloomMap().put(loomInstance, this);\n System.out.println(\"Found person in knowledge base: \" + loomInstance);\n }\n else {\n System.out.println(\"No waiter found. Instantiating...\");\n loomInstance = PowerloomHelper.instantiate(\"person\",this);//puts it in map\n\n String h = PowerloomHelper.instantiate(\"home\",null);\n query = \"(and (workingWaiter \" + loomInstance + \")\"\n +\"(haslocation \" +h+\" \"+gui.getneighborhoodInstance()\n +\") (lives \"+ loomInstance+\" \"+h+\")(hasname \"\n + loomInstance+\" \\\"\"+name+\"\\\"))\";\n print(\"asserting facts about new instance:\"+query);\n PLI.sAssertProposition(query, PowerloomHelper.getWorkingModule(), null);\n }\n\n }", "public void update()\n\t{\n\t\tif(pList.size()==0)\n\t\t\treturn;\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(p.destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tup = true;\n\t\t\t}\n\t\t\telse if(p.destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tdown = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpList.remove(i);\n\t\t\t}\n\t\t}\n\t\tif(up)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.UPPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event,0);\n\t\t}\n\t\tif(down)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.DOWNPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event, 0);\n\t\t}\n\t}", "public ElevatorScene() {\t\t\n\t\tif(exitedCount == null) {\n\t\t\texitedCount = new ArrayList<Integer>();\n\t\t} else {\n\t\t\texitedCount.clear();\n\t\t}\n\t\t\n\t\televators = new ArrayList<Elevator>();\n\t\tpersonCount = new ArrayList<Integer>();\n\t\t\n\t\texitedCountMutex = new Semaphore(1);\n\t\tsem = new Semaphore(6);\n\t\t\n\t\t\n\t\tnumberOfPeopleWaiting = 0;\n\t}", "private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}", "public void unloadPassengers(Elevator ev1) throws ElevatorFullException\n { \n // Unload passengers from elevator\n\t//---------------------------------- \n int unloading= ev1.passengersForFloor(floorNum);\n ev1.unloadPassenger(unloading);\n System.out.println(\"unloaded \" + unloading + \" passenger(s).\");\n\n\n\t// If the passengers are unloading onto floor #1, we assume that\n\t// they'll leave the building once they exit the elevator.\n\t//--------------------------------------------------------------- \n\tif(floorNum != 1)\n\t{ occupants+= unloading;\n\t}\n\n\n\t// With the exception of passengers that were just unloaded, load\n\t// current floor occupants onto the elevator. According to the spec,\n\t// every occupant on a floor will be boarded with a destination of\n\t// baseFloor.\n\t//---------------------------------------------------------------------- \n\tint boarding= occupants - unloading;\n\tif(boarding > 0)\n\t{ for(int i=1; i<=boarding; i++)\n\t { try\n\t { ev1.boardPassenger(ev1.baseFloor);\n\t occupants--;\n }\n\t\tcatch (ElevatorFullException e)\n\t\t{ System.out.print(\"ElevatorFullException Caught:\");\n\t\t System.out.print(\" leaving \" + occupants + \" occupants on the floor; \");\n\t\t System.out.print(\" will return later.\\n\");\n\t\t i=boarding+1; //break out of boarding loop. \n\t\t}\n\t }\n }\n\n\n\t// For this simulation, we assume that all unloaded passengers will\n\t// be ready to leave the building on the next elevator run. Thus we\n\t// will signal the elevator to return for them.\n\t//--------------------------------------------------------------------- \n\tif(occupants >= 1)\n\t{ ev1.registerRequest(floorNum);\n\t}\n\n\n // show status of floor before proceeding.\n System.out.println(this);\n System.out.println(ev1 + \"\\n\");\n }", "public void updatePersonList(String deadPerson) {\n for (int i = 0; i < config.personList.size(); i++) {\n if (config.personList.get(i).getName().equals(deadPerson)) {\n config.personList.remove(i--);\n if (i < 0) {\n i = 0;\n }\n alivePerson--;\n }\n }\n\n }", "public void processElevatorCall(Passenger p) {\n Elevator selectedElevator = getCheapestElevator(p.getElevatorCall());\n\n //Do nothing and add to pending calls queue if no elevators are available.\n if(selectedElevator == null) {\n pendingPassengers.add(p);\n return;\n }\n\n selectedElevator.ingestElevatorCall(p.getElevatorCall());\n p.assignElevator(selectedElevator);\n }", "public\tElevator(){\t\t\t\t\t\t\n\t\tcurrentFloor = 1;\n\t\tcurrentDirection = \"UP\";\n\t\ttotalPassengers = 0;\n\t\ttotalPassDestFloor = new int[8];\n\t\tdestRequest = new char[8];\n\t\t \n\t}", "private void guardedTakeLeadership(final CuratorFramework curator) throws Exception {\n\n try {\n callback.becameLeader().get(30, TimeUnit.SECONDS);\n } catch (final Exception e) {\n throw new RuntimeException(\"Failed to setup new leader\", e);\n }\n\n final PathChildrenCache members =\n new PathChildrenCache(curator, MEMBERS, false, false, executor);\n\n members.getListenable().addListener(new PathChildrenCacheListener() {\n @Override\n public void childEvent(\n final CuratorFramework client, final PathChildrenCacheEvent event\n ) throws Exception {\n switch (event.getType()) {\n case CHILD_ADDED:\n callback.memberAdded(decodeMemberId(event.getData()));\n break;\n case CHILD_REMOVED:\n callback.memberRemoved(decodeMemberId(event.getData()));\n break;\n default:\n log.info(\"event: {}\", event);\n break;\n }\n }\n\n private String decodeMemberId(final ChildData data) {\n final String path = data.getPath();\n\n final int lastSlash = path.lastIndexOf('/');\n\n if (lastSlash < 0) {\n throw new IllegalArgumentException(\"illegal path: \" + path);\n }\n\n return path.substring(lastSlash + 1);\n }\n });\n\n members.start();\n\n try {\n callback.takeLeadership();\n } catch (final Exception e) {\n log.error(\"Leadership process threw exception\", e);\n }\n\n members.close();\n }", "private static void addPerson(int startFloorIn, int endFloorIn) throws InvalidParameterException {\r\n\r\n\t\t// get person name\r\n\t\tpersonCounter++;\r\n\t\tString name = \"P\" + personCounter;\r\n\r\n\t\t// create a person\r\n\t\tPerson p = new Person(name, startFloorIn, endFloorIn);\r\n\t\tSystem.out.printf(\"%s Person %s created on Floor %d, wants to go %s to Floor %d\\n\",\r\n\t\t\t\tgetTimeStamp(), name, startFloorIn, ElevatorController.getDirection(startFloorIn, endFloorIn), endFloorIn);\r\n\r\n\t\t// add to list for statistics\r\n\t\tpeople.add(p);\r\n\r\n\t\t// send to the building\r\n\t\ttry {\r\n\t\t\tmyBuilding.addPerson(p);\r\n\t\t} catch (EmptyReferenceException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n Elevator theElevator = new Elevator();\n\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(2);\n theElevator.boardPassenger(3);\n\n System.out.println(theElevator);\n\n for(int i=1;i<21;i++){\n theElevator.move();\n }\n \n\n \n\n }", "@Override\r\n\tpublic int user_request(Floor current_floor, Elevator elevator) \r\n\t{\n\t\tif(current_floor.floor_door.state==0 && elevator.elevator_door.state==0)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "public int getNumberOfPeopleInElevator(int elevator) {\n\t\treturn elevators.get(elevator).getPeopleCount();\n\t}", "public void ascend() {\n \t\n elevator1.set(0.9);\n elevator2.set(0.9); \n }", "void lookupAndSaveNewPerson();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tPerson person = createNewPassenger(textCurrentFloor.getText(), textDestinationFloor.getText());\n\t\t\t\tif(person.getStartFloor() > 0 && person.getDestinationFloor() <= elevatorController.getTotalFloor()) {\n\t\t\t\t\televatorController.addNewPassenger(person);\n\t\t\t\t}else {\n\t\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\t\tnull, \n\t\t\t\t\t\t\t\"Invalid Input\", \n\t\t\t\t\t\t\t\"Information of New Passenger is Invalid! Please Input Again.\", \n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}", "public boolean customerInElevator(Customer cust);", "public void removePassenger() {\n\t\t\n\t\tsynchronized(this) {\n\t\t\tif(currentOccup > 0)\n\t\t\t\tcurrentOccup--;\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Elevator \" + elevatorNum + \" total passenger count: \" + currentOccup);\n\t}", "void setVillage(Village aVillage) {\n/* 380 */ MineDoorPermission md = MineDoorPermission.getPermission(this.tilex, this.tiley);\n/* 381 */ if (this.village == null || !this.village.equals(aVillage)) {\n/* */ \n/* 383 */ if (this.doors != null)\n/* */ {\n/* 385 */ for (Door door : this.doors) {\n/* */ \n/* 387 */ if (door instanceof FenceGate) {\n/* */ \n/* 389 */ if (aVillage != null) {\n/* 390 */ aVillage.addGate((FenceGate)door); continue;\n/* 391 */ } if (this.village != null)\n/* 392 */ this.village.removeGate((FenceGate)door); \n/* */ } \n/* */ } \n/* */ }\n/* 396 */ if (md != null)\n/* */ {\n/* 398 */ if (aVillage != null) {\n/* 399 */ aVillage.addMineDoor(md);\n/* 400 */ } else if (this.village != null) {\n/* 401 */ this.village.removeMineDoor(md);\n/* */ } } \n/* 403 */ if (this.creatures != null)\n/* */ {\n/* 405 */ for (Creature c : this.creatures) {\n/* */ \n/* 407 */ c.setCurrentVillage(aVillage);\n/* 408 */ if (c.isWagoner() && aVillage == null) {\n/* */ \n/* 410 */ Wagoner wagoner = c.getWagoner();\n/* 411 */ if (wagoner != null)\n/* 412 */ wagoner.clrVillage(); \n/* */ } \n/* 414 */ if (c.isNpcTrader() && c.getCitizenVillage() == null) {\n/* */ \n/* 416 */ Shop s = Economy.getEconomy().getShop(c);\n/* 417 */ if (s.getOwnerId() == -10L) {\n/* */ \n/* 419 */ if (aVillage != null) {\n/* */ \n/* */ \n/* */ try {\n/* 423 */ logger.log(Level.INFO, \"Adding \" + c.getName() + \" as citizen to \" + aVillage.getName());\n/* 424 */ aVillage.addCitizen(c, aVillage.getRoleForStatus((byte)3));\n/* */ }\n/* 426 */ catch (IOException iox) {\n/* */ \n/* 428 */ logger.log(Level.INFO, iox.getMessage());\n/* */ }\n/* 430 */ catch (NoSuchRoleException nsx) {\n/* */ \n/* 432 */ logger.log(Level.INFO, nsx.getMessage());\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ continue;\n/* */ } \n/* */ \n/* */ \n/* 441 */ c.setCitizenVillage(null);\n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* */ \n/* 447 */ if (this.vitems != null)\n/* */ {\n/* 449 */ for (Item i : this.vitems.getAllItemsAsSet()) {\n/* */ \n/* 451 */ if (i.getTemplateId() == 757) {\n/* */ \n/* 453 */ if (aVillage != null) {\n/* 454 */ aVillage.addBarrel(i); continue;\n/* 455 */ } if (this.village != null)\n/* 456 */ this.village.removeBarrel(i); continue;\n/* */ } \n/* 458 */ if (i.getTemplateId() == 1112) {\n/* */ \n/* 460 */ if (aVillage != null) {\n/* */ \n/* 462 */ Node node = Routes.getNode(i.getWurmId());\n/* 463 */ if (node != null)\n/* 464 */ node.setVillage(aVillage); continue;\n/* */ } \n/* 466 */ if (this.village != null) {\n/* */ \n/* 468 */ Node node = Routes.getNode(i.getWurmId());\n/* 469 */ if (node != null)\n/* 470 */ node.setVillage(null); \n/* */ } \n/* */ } \n/* */ } \n/* */ }\n/* 475 */ this.village = aVillage;\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 480 */ if (this.doors != null)\n/* */ {\n/* 482 */ for (Door door : this.doors) {\n/* */ \n/* 484 */ if (door instanceof FenceGate)\n/* 485 */ aVillage.addGate((FenceGate)door); \n/* */ } \n/* */ }\n/* 488 */ if (md != null)\n/* */ {\n/* 490 */ aVillage.addMineDoor(md);\n/* */ }\n/* */ } \n/* */ }", "public void setEnteredBy(int tmp) {\n this.enteredBy = tmp;\n }", "protected void deadlineLeasing() {\n log.info(\"OrdersBean : deadlineLeasing\");\n List<OrdersEntity> ordersEntitiesDeadline = ordersServices.findAllOrdersByIdUserAndStatusIsValidate(usersBean.getUsersEntity().getId());\n if (!ordersEntitiesDeadline.isEmpty()) {\n contractsBean.findAllContractsInAllMyOrdersForLeasingAndDeadlineIsLowerThan1Month(ordersEntitiesDeadline);\n }\n }", "static void AdultItinerary(int location)\n {\n\t\tboatLock.acquire(); \n\n\t\twhile (true){ //continuous loop\n\t\t\t//check location\n if (location == 0){ //Oahu\n //may need while loop instead of if loop here...\n while ( childrenOnOahu > 1 || countOnBoat > 0 || boatLocation != 0){\n onOahu.sleep();\n }\n\t\t\t /*if( childrenOnOahu > 1) {\n\t\t\t\t\tonOahu.sleep();\n\t\t\t\t}\n\t\t\t\t//check number of children on boat | adults on boat\n\t\t\t\tif( countOnBoat > 0){\n\t\t\t\t\tonOahu.sleep();\n\t\t\t\t}\n\t\t\t\t//make sure boat is on Oahu\n\t\t\t\tif(boatLocation != 0){\n\t\t\t\t\tonOahu.sleep();\n\t\t\t\t} */\n\t\t\t//-------------------------------------------------------\n bg.AdultRowToMolokai();\n \n //update count and location\n adultsOnOahu--;\n adultsOnMolokai++;\n boatLocation = 1;\n location = 1;\n \n //communicating number of people on Molokai\n coms.speak(childrenOnMolokai + adultsOnMolokai);\n \n //wake everyone up and sleep on Molokai\n onMolokai.wakeAll();\n onMolokai.sleep();\n\t\t\t \n\t\t//Make sure there is at least ONE child on Molokai\n\t\tLib.assertTrue(childrenOnMolokai > 0);\n }\n else if (location == 1){ //Molokai\n onMolokai.sleep();\n }\n else{\n System.out.println(\"ERROR: Location other than 0 or 1\");\n Lib.assertTrue(false);\n break; \n }\n }\n\n boatLock.release(); \n }", "public void processRequest(Request currentRequest)\r\n\t{\r\n\t\tint nearestFloor=55;\r\n\t\tElevator nearestElevatorAvailable = new Elevator();\r\n\t\t\r\n\tfor(int i=0 ; i < availableElevadors.size();i++)\r\n\t{\r\n\t\t\r\n\t\tif (nearestFloor >= Math.abs(availableElevadors.get(i).getCurrentFloor() - currentRequest.getCurrentFlour()))\r\n\t\t{\r\n\t\t\tnearestFloor = Math.abs(availableElevadors.get(i).getCurrentFloor() - currentRequest.getCurrentFlour());\r\n\t\t\tnearestElevatorAvailable= availableElevadors.get(i);\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t}\r\n\tSystem.out.println(\" Enjoy your ride with Elevator no\" + nearestElevatorAvailable.getElevatorNumber());\r\n\r\n\tnearestElevatorAvailable.setCurrentFloor(currentRequest.getDestinationflour());\r\n\tavailableElevadors.remove(nearestElevatorAvailable);\r\n\toccupiedElevadors.add(nearestElevatorAvailable);\r\n\t\t\r\n\t}", "public void initialStatus()\r\n\t{\r\n\t\tSystem.out.println(\"--------- The Current Status of Each Elevator ------\");\t\r\n\t\t\r\n\t\tfor(int i =0;i<numberOfElevators; i++)\r\n\t\t{\r\n\t\t\tElevator temp = new Elevator();\r\n\t\t\ttemp.setElevatorNumber(i);\r\n\t\t\tinitialElevatorFloor = (int)(Math.random()*((55-0)+1)); \r\n\t\t\ttemp.setCurrentFloor(initialElevatorFloor);\r\n\t\t\tavailableElevadors.add(temp);\r\n\t\t\tSystem.out.println(\" Elevator no.\" + temp.getElevatorNumber()+\" The current Floor \" + temp.getCurrentFloor());\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "private void updatePersonAwardsSubMenus() {\n List<String> peopleNames = new ArrayList();\n ActionListener menuListener = (ActionEvent event) -> {\n //build a Person object\n String[] parts = event.getActionCommand().split(\",\");\n String foreName = Utils.getForename(parts[0]);\n String surName = Utils.getSurname(parts[0]);\n String sectionName = parts[1].trim();\n //get person object and sends person object to edit form\n Person newPers = myPeople.getPerson(foreName, surName, sectionName);\n FrmViewAwards frm = new FrmViewAwards(newPers);\n frm.setTitle(\"View Awards\");\n frm.setVisible(true);\n mainformInstance.updateForm();\n };\n this.mnuViewAwardByPerson.removeAll();\n //add persons in the PeronList to the menu\n List<Person> ppl = myPeople.getPersonList();\n Collections.sort(ppl, (Person p1, Person p2)\n -> p1.getSurName().compareTo(p2.getSurName()));\n //ensure unique list\n for (Person myPers : ppl) {\n if (!peopleNames.contains(myPers.toString())) {\n peopleNames.add(myPers.toString());\n }\n }\n for (String aPers : peopleNames) {\n JMenuItem mnu = new JMenuItem();\n mnu.setText(aPers);\n mnu.addActionListener(menuListener);\n this.mnuViewAwardByPerson.add(mnu);\n }\n }", "Elevator() {\n _currentFloor = Floor.FIRST;\n _passengersOnboard = 0;\n _directionOfTravel = DirectionOfTravel.UP;\n\n }", "public interface ElevatorSelectionStrategy {\n\tElevator getElevatorFor(Passenger passenger, Floor departureFloor, Environment env);\n}", "private void processData()\n\t{\n\t\tfor(String people :guestList)\n\t\t{\n\t\t\t\n\t\t\tString[] guestInfo = people.split(\",\");\n\t\t\tif(guestInfo[inviterIndex].equals(\"Adam\"))\n\t\t\t{\n\t\t\t\t//Adam invited friends list\n\t\t\t\tGuest guest = new Guest(guestInfo[guestIndex],Integer.valueOf(guestInfo[candyBroughtIndex]),Integer.valueOf(guestInfo[candyConsumedIndex]));\n\t\t\t\tint result =Integer.valueOf(guestInfo[candyBroughtIndex]) - Integer.valueOf(guestInfo[candyConsumedIndex]);\n\t\t\t\tguest.setInviter(\"Adam\");\n\t\t\t\tguest.setLeftOver(result);\n\t\t\t\tboolean isInvited = (result >= 0)? true : false;\n\t\t\t\tguest.setInvited(isInvited);\n\t\t\t\tguestMapList.put(guestInfo[guestIndex], guest);\n\t\t\t}else if(!guestMapList.isEmpty())\n\t\t\t{\n\t\t\t\tif(guestMapList.containsKey(guestInfo[inviterIndex]))\n\t\t\t\t{\n\t\t\t\t\tGuest inviter = guestMapList.get(guestInfo[inviterIndex]);\n\t\t\t\t\tif(Integer.valueOf(guestInfo[candyBroughtIndex])+inviter.getLeftOver()>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tGuest guest = new Guest(guestInfo[guestIndex],Integer.valueOf(guestInfo[candyBroughtIndex]),Integer.valueOf(guestInfo[candyConsumedIndex]));\n\t\t\t\t\t\tint result =inviter.getLeftOver() + Integer.valueOf(guestInfo[candyBroughtIndex]) - Integer.valueOf(guestInfo[candyConsumedIndex]);\n\t\t\t\t\t\tguest.setLeftOver(result);\n\t\t\t\t\t\tguest.setInviter(inviter.getName());\n\t\t\t\t\t\t\n\t\t\t\t\t\tboolean isInvited = (result >= 0)? true : false;\n\t\t\t\t\t\tguest.setInvited(isInvited);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(inviter.getInviter().equals(\"Adam\")){\n\t\t\t\t\t\t//update inviter information\n\t\t\t\t\t\t\tinviter.setLeftOver(result);\n\t\t\t\t\t\t\tinviter.setInvited(isInvited);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tinviter.setNextGuest(guest);\n\t\t\t\t\t\tguestMapList.put(inviter.getName(), inviter);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//add new guest to hashmap\n\t\t\t\t\t\tguestMapList.put(guestInfo[guestIndex], guest);\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}\n\t}", "public Elevator(int elevatorID) {\n this.elevatorID = elevatorID;\n currentFloor = 0;\n }", "public static void checkForPeopleInShelters() {\n\t\tfor(int i=0; i<vertexMatrix.length; i++){\n\t\t\tif (shelters[i])\n\t\t\t\tpeopleToSave[i]=0;\t\t\n\t\t}\n\t}", "void takeLeadership() throws Exception;", "public void MemberOfParliament(){\n this.spendings_sum=0d;\n this.spending_repair_office=0d;\n this.how_many_trips=0;\n this.longest_trip=0;\n this.was_in_italy = false;\n }", "@Test\n\tpublic void testAddVolunteer() {\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 0);\n\t\tinitialJob.addVolunteer((Volunteer) volunteer, WorkLoad.MEDIUM);\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 1);\n\t\t\n\t\t// Attempt to exceed max job duty requirement\n\t\tinitialJob.addVolunteer((Volunteer) volunteer, WorkLoad.MEDIUM);\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 1);\n\t}", "void schedule(List<Queue<Integer>> requests, List<Elevator> elevators, int floors);", "protected static void permanentRaiders()\n\t{\n\t\tint weight = (int) (WeightedRandom.getTotalWeight(getWeightedList()) * 0.01);\n\t\t\n\t\tif(!raidersList.containsKey(\"Herobrine\"))\n\t\t{\n\t\t\traidersList.put(\"Herobrine\", new RaiderData(new GameProfile(null, \"Herobrine\"), weight < 1 ? 1 : weight));\n\t\t}\n\t\tif(raidersList.containsKey(\"Herobrine\"))\n\t\t{\n\t\t\traidersList.get(\"Herobrine\").itemWeight = weight < 1 ? 1 : weight;\n\t\t\tmarkDirty = true;\n\t\t}\n\t}", "public void retireLead()\r\n\t{\r\n\t\tisleader = false;\r\n\t}", "public void fillPassengersWithRealPeople(){\r\n Passenger p1 = new Passenger(\"Jimmy\", \"Quaresmini\", 5100, 7, \"London\", 40);\r\n Passenger p2 = new Passenger(\"Masod\", \"Jalalian\", 5200, 9, \"London\", 60);\r\n Passenger p8 = new Passenger(\"Bardia\", \"Fathi\", 5300, 6, \"London\", 38);\r\n Passenger p9 = new Passenger(\"Sami\", \"Norola\", 5300, 8, \"London\", 37);\r\n Passenger p10 = new Passenger(\"Bardias\", \"Girlfriend\", 5200, 10, \"London\", 35);\r\n /*seats.add(6, new Seat(7,p1));//Jimmy\r\n seats.add(8, new Seat(9,p2));//Masod\r\n seats.add(5, new Seat(6,p8));//Bardia\r\n seats.add(7, new Seat(8,p9));//Sami\r\n seats.add(9, new Seat(10,p10));//Bardias Girlfriend*/\r\n\r\n Passenger p3 = new Passenger(\"Mattias\", \"Svensson-Nordell\", 22000, 1, \"London\", 29);\r\n //seats.add(0, new Seat(1,p3));\r\n Passenger p4 = new Passenger(\"Bita\", \"Jabbari\", 21000, 3, \"London\", 43);\r\n //seats.add(2, new Seat(3,p4));\r\n Passenger p5 = new Passenger(\"Marcus\", \"Lippert\", 24000, 2, \"London\", 45);\r\n //seats.add(1, new Seat(2,p5));\r\n Passenger p6 = new Passenger(\"Christer\", \"Barousen\", 21000, 4, \"London\", 44);\r\n //seats.add(3, new Seat(4,p6));\r\n Passenger p7 = new Passenger(\"Linda\", \"Hilding\", 21500, 5, \"London\", 42);\r\n //seats.add(4, new Seat(5,p7));\r\n\r\n passengers.add(p1);\r\n passengers.add(p2);\r\n passengers.add(p3);\r\n passengers.add(p4);\r\n passengers.add(p5);\r\n\r\n passengers.add(p6);\r\n passengers.add(p7);\r\n passengers.add(p8);\r\n passengers.add(p9);\r\n passengers.add(p10);\r\n\r\n seats.add(0, new Seat(1,p3));//Mattias\r\n seats.add(1, new Seat(2,p5));//Marcus\r\n seats.add(2, new Seat(3,p4));//Bita\r\n seats.add(3, new Seat(4,p6));//Christer\r\n seats.add(4, new Seat(5,p7));//Linda\r\n\r\n seats.add(5, new Seat(6,p8));//Bardia\r\n seats.add(6, new Seat(7,p1));//Jimmy\r\n seats.add(7, new Seat(8,p9));//Sami\r\n seats.add(8, new Seat(9,p2));//Masod\r\n seats.add(9, new Seat(10,p10));//Bardias Girlfriend\r\n }", "@ScheduledMethod(start= 1, interval =1, priority=5.5)\n\tpublic void meetUp(){\n\t\tif(CFG.MEETUP_VEG()){\n\t\t\tPContext affordanceToRemove =null;\n\t\t\tfor(PContext affordance:getMeatPractice().getAffordances()){\n\t\t\t\tif(affordance.getMyLocation().getClass() == myMeetUpPlace.getClass()) affordanceToRemove = affordance;\n\t\t\t}\n\t\t\t if(affordanceToRemove != null) getMeatPractice().removeAffordance(affordanceToRemove); //After one time it isnt there anymore\n\t\t}\n\t\tif(CFG.isMeetUp() &&!isLocated){\n\t\t\tif(CFG.MEETUP_INVITE()){\n\t\t\t\tif(acceptInvitation(myMeetUpPlace)) diningOutToMeetUp(); //Only if you want to eat Veg you organize a dining party.\n\t\t\t}\n\t\t\telse goTo(myMeetUpPlace); //maar anders ga je er ok heen?!\n\t\t//\tSystem.out.println(\"Agents MEETUP\");\n\t\t}\n\t}", "public void giveupLeadership(CoreDescriptor cd) {\n assert cd != null;\n\n String collection = cd.getCollectionName();\n if (collection == null) return;\n\n DocCollection dc = getClusterState().getCollectionOrNull(collection);\n if (dc == null) return;\n\n Slice shard = dc.getSlice(cd.getCloudDescriptor().getShardId());\n if (shard == null) return;\n\n // if this replica is not a leader, it will be put in recovery state by the leader\n String leader = cd.getCloudDescriptor().getCoreNodeName();\n if (!Objects.equals(shard.getReplica(leader), shard.getLeader())) return;\n\n Set<String> liveNodes = getClusterState().getLiveNodes();\n int numActiveReplicas =\n shard\n .getReplicas(\n rep ->\n rep.getState() == Replica.State.ACTIVE\n && rep.getType() != Type.PULL\n && liveNodes.contains(rep.getNodeName()))\n .size();\n\n // at least the leader still be able to search, we should give up leadership if other replicas\n // can take over\n if (numActiveReplicas >= 2) {\n ContextKey key = new ContextKey(collection, leader);\n ElectionContext context = electionContexts.get(key);\n if (context instanceof ShardLeaderElectionContextBase) {\n LeaderElector elector = ((ShardLeaderElectionContextBase) context).getLeaderElector();\n try {\n log.warn(\"Leader {} met tragic exception, give up its leadership\", key);\n elector.retryElection(context, false);\n } catch (KeeperException | InterruptedException e) {\n SolrZkClient.checkInterrupted(e);\n log.error(\"Met exception on give up leadership for {}\", key, e);\n }\n } else {\n // The node is probably already gone\n log.warn(\"Could not get election context {} to give up leadership\", key);\n }\n }\n }", "public void addSpawners(Room room) {\n\t\tint shiftX = (map.chunkX * 16) - (map.room.length / 2) + 8;\n\t\tint shiftZ = (map.chunkZ * 16) - (map.room.length / 2) + 8;\n\t\t//for(Room room : rooms) {\t\t\t\n\t\t\t//DoomlikeDungeons.profiler.startTask(\"Adding to room \" + room.id);\n\t\t\tfor(Spawner spawner : room.spawners) {\n\t\t\t\t\tDBlock.placeSpawner(map.world, shiftX + spawner.x, spawner.y, shiftZ + spawner.z, spawner.mob);\n\t\t\t}\n\t\t\tfor(BasicChest chest : room.chests) {\n\t\t\t\tchest.place(map.world, shiftX + chest.mx, chest.my, shiftZ + chest.mz, random);\n\t\t\t}\n\t\t\t//DoomlikeDungeons.profiler.endTask(\"Adding to room \" + room.id);\n\t\t//}\t\n\t}", "public Elevator(final int id) {\n this.id = id;\n }", "public static void addPassengers(ActorRef checkPoint, int num){\n\t\tfor(int i=0; i<num; i++){\n\t\t\tcount++;\n\t\t\tcheckPoint.tell(new PassengerEnters(count));\n\t\t}\t\t\t\n\t}", "@Override\n public void gotoFloor(int elevatorId, int floor) {\n if (elevatorId > elevators.size() - 1) {\n System.out.println(\"Incorrect request. Elevator = \" + elevatorId + \" is not a valid elevator\");\n }\n elevators.get(elevatorId).getRequests().offer(floor);\n }", "public void goHospital()\n\t{\n\t\tsynchronized (this) {\n\t\tworld.hospitalizedIndividual();\n\t\tcurrentState.goHospital();\n\t\t}\n\t}", "public void takeLife()\n\t{\n\t\tlives --;\n\t}", "void update(Employee nurse);", "public static void main(String[] args) throws CantAdd, CoronaWarn {\n\t\tTravelAgency TravelAgency = new TravelAgency();\r\n\r\n\t\tPlane p=new Plane(200,2,\"first plane max travelers\");\r\n\t\tPlane p1=new Plane(100,1,\"second plan min traelers\");\r\n\r\n\t\tTrip i=new Trip(p,Country.Australia,Country.Canada);\r\n\t\tTrip io=new Trip(p1,Country.Australia,Country.Canada);\r\n\t\t \r\n\t\tDate date=new Date(1,2,5);\r\n\t\tPassport passprt1=new Passport(\"anton\",44,date);\r\n\t\tPassport passprt2=new Passport(\"abdo\",44,date);\r\n\t\tPassport passprt3=new Passport(\"julie\",44,date);\r\n\t\tPassport passprt4=new Passport(\"juliana\",44,date);\r\n\t\tPassport passprt5=new Passport(\"bella\",44,date);\r\n\t\tPassport passprt6=new Passport(\"geris\",44,date);\r\n\t\tTraveler t1=new Traveler(passprt1,true,true);\r\n\t\tTraveler t2=new Traveler(passprt2,true,true);\r\n\t\tTraveler t3=new Traveler(passprt3,true,true);\r\n\t\tTraveler t4=new Traveler(passprt4,true,true);\r\n\t\tTraveler t5=new Traveler(passprt5,true,true);\r\n\t\tTraveler t6=new Traveler(passprt6,true,true);\r\n\t\t\r\n\t\t\r\n\t\tio.addTraveler(t1);\r\n\t\tio.addTraveler(t2);\r\n\t\tio.addTraveler(t3);\r\n\t\tio.addTraveler(t6);\r\n\t\tio.addTraveler(t5);\r\n\t\tio.addTraveler(t4);\r\n\t\tio.addTraveler(t6);\r\n \r\n\t\ti.addTraveler(t1);\r\n\t\ti.addTraveler(t2);\r\n\t\ti.addTraveler(t3);\r\n\t\ti.addTraveler(t4);\r\n\t\r\n\t\ti.addTraveler(t6);\r\n\t\t\r\n\t\tTravelAgency.addTrip(i);\t\r\n\t\tTravelAgency.addTrip(io);\r\n\t\tSystem.out.print(TravelAgency.findUnsafeTrips());\r\n\r\n\t\t\r\n\t\tTravelAgency.AddTraveler(t1);\r\n\t\tTravelAgency.AddTraveler(t2);\r\n\t\tTravelAgency.AddTraveler(t3);\r\n\t\tTravelAgency.AddTraveler(t4);\r\n\t\tTravelAgency.AddTraveler(t5);\r\n\t\tTravelAgency.AddTraveler(t6);\r\n\t\t\r\n\t}", "public void update (Elevator e, int name) {\n elevator = e;\n // Update the numerical information\n getInfo ();\n // Create a label for its current condition\n buildStrings (name, currCap, maxCap, currFloor, state);\n slider.setValue (currFloor);\n }", "@Test\n\tpublic void returnNullWhenNoneIdel() {\n\t\t\n\t\twhen(elevatorRepository.getElevators()).thenReturn(elevators);\n\t\tElevator elevator = elevatorAllocateService.requestElevator(task);\n\t\tassertNull(elevator);\n\t}", "public void descend() {\n \t\n elevator1.set(-0.9);\n elevator2.set(-0.9); \n }", "public void leaveRoom(Person x)\n {\n occupant = null;\n }", "public void leaveRoom(Person x)\n {\n occupant = null;\n }", "@Override\n public void requestPickup(int floor, int direction) {\n // Pick an elevator at rest\n for (Elevator elevator : elevators) {\n if (elevator.getDirection() == 0) {\n elevator.getRequests().offer(floor);\n return;\n }\n }\n\n // Pick an elevator with least load\n Elevator minElevator = elevators.get(0);\n for (Elevator elevator : elevators) {\n if (elevator.getRequests().size() < minElevator.getRequests().size()) {\n minElevator = elevator;\n }\n }\n // add request\n minElevator.getRequests().offer(floor);\n }", "public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }", "@Test\n\tpublic void testGetEnrolledVolunteers() {\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 0);\n\t\tinitialJob.addVolunteer((Volunteer) volunteer, WorkLoad.MEDIUM);\n\t\tassertEquals(initialJob.getEnrolledVolunteers().size(), 1);\n\t\t\n\t\t// tests the equivalence of the volunteers in the list\n\t\tassertTrue(initialJob.getEnrolledVolunteers().get(0).equals(volunteer));\n\t}", "public HashMap<CarPosition, Passenger[]> openDoors() { \n //Disembarking\n LinkedList<Passenger> retPas = new LinkedList<Passenger>();\n Passenger[] temp = new Passenger[currentPassengers.size()];\n for (int i = 0; i < currentPassengers.size(); i++) {\n temp[i] = currentPassengers.get(i);\n }\n \n //(Disembarking) Update queue, elevator and fill return list\n for (int i = 0; i < temp.length; i++) {\n if (temp[i].getDestination() == currentFloor) {\n if (!currentPassengers.remove(temp[i])) { //Remove from elevator\n throw new RuntimeException(\"Could not find dismebarking passenger in elevator.\");\n }\n retPas.add(temp[i]); //Add to return list\n passengersServed = passengersServed.add(new BigInteger(\"1\")); //Update service counter\n \n boolean removed = false;\n for (int j = 0; j < queue.size(); j++) {\n ElevatorQueueObject q = queue.get(j);\n if (q.getPassenger() == temp[i] && q.getActionType() == ElevatorAction.DROPOFF) {\n \tremoved = true;\n queue.remove(q); //Remove from queue\n break;\n }\n }\n if (!removed) { //Could not find queue object\n throw new RuntimeException(\"Could not find dismebarking passenger in queue.\");\n }\n }\n }\n \n //Embarking\n while (currentPassengers.size() < specs.getCarryCapacity() && queue.size() > 0) {\n ElevatorQueueObject q = queue.getFirst();\n if (q.getActionType() == ElevatorAction.PICKUP) {\n if(q.getPassenger().getOrigin() == currentFloor) {\n currentPassengers.add(q.getPassenger());\n queue.removeFirst();\n } else {\n break;\n }\n } else {\n break;\n }\n }\n \n //Format disembarking passengers as an array\n Passenger[] retArr = new Passenger[retPas.size()];\n for (int i = 0; i < retPas.size(); i++) {\n retArr[i] = retPas.get(i);\n }\n \n //Return disembarking passengers as a HashMap\n HashMap<CarPosition, Passenger[]> retMap = new HashMap<CarPosition, Passenger[]>(1);\n retMap.put(CarPosition.NULL, retArr);\n \n return retMap;\n }", "public void enterRoom(Person p) {\n if (p.poisoned) {\n System.out.println(\"The poison eats away at you. You take 5 damage.\");\n p.hp -= 5;\n System.out.println(\"You now have \" + p.hp + \"health\");\n if (p.hp <= 0) {\n\n gameOff();\n }\n }\n occupant = p;\n p.setxLoc(this.xLoc);\n p.setyLoc(this.yLoc);\n Scanner n = new Scanner(System.in);\n\n if (!m.sleep) {\n if (m.alive) {\n System.out.println(\"There's a monster in the room!\");\n } else {\n System.out.println(\"The monster's remains lies before you.\");\n }\n m.aggro = true;\n while (m.alive && m.aggro) {\n if (m.hp <= 0) {\n m.alive = false;\n int g = m.dropGold();\n System.out.println(\"You gain \" + g + \" Gold\");\n p.gold += g;\n }\n int damage = m.counterAttack(p);\n System.out.println(\"The monster bites you. You take \" + damage + \" damage.\");\n p.hp -= damage;\n if (p.hp <= 0) {\n System.out.println(\"You died. No one knows you died.\");\n Runner.gameOff();\n }\n System.out.println(\"You have \" + p.hp + \" health.\");\n System.out.println(\"What do you do now? (Fight, Run)\");\n String re = n.nextLine();\n if (re.equalsIgnoreCase(\"run\")) {\n damage = (int) (m.counterAttack(p) / p.dex);\n System.out.println(\"The monster bites you. You take \" + damage + \" damage.\");\n p.hp -= damage;\n m.aggro = false;\n }\n if (re.equalsIgnoreCase(\"Fight\")) {\n double dam = (p.str + p.str * Math.random()) / (m.resist + 1);\n\n m.hp -= dam;\n System.out.println(\"You deal \" + dam + \"damage.\");\n if (m.hp <= 0) {\n m.alive = false;\n System.out.println(\"The monster howls as you deal a finishing blow.\");\n int g = m.dropGold();\n System.out.println(\"You gain \" + p.gold + \" Gold\");\n p.gold += g;\n m.threat = false;\n p.exp += (m.attack + m.resist) * floor;\n System.out.println(\"You gain \" + (m.attack + m.resist) * floor + \" EXP\");\n if (p.exp >= 100) {\n p.exp -= 100;\n p.level++;\n System.out.println(\"You leveled up! You gain +1 Strength and +1 Dexterity\");\n p.str++;\n p.dex++;\n }\n }\n }\n }\n }\n if (m.alive) {\n if (m.sleep) {\n System.out.println(\"You find a sleeping monster. Do you attack it? (Y/N)\");\n\n String q = n.nextLine();\n if (q.equalsIgnoreCase(\"yes\") || q.equalsIgnoreCase(\"y\")) {\n\n double dam = p.str * (1.5) + p.str * Math.random();\n m.hp -= dam;\n System.out.println(\"You deal \" + dam + \" damage.\");\n m.aggro = true;\n if (m.hp <= 0) {\n System.out.println(\"The monster dies on the spot. Who's the real monster here?\");\n m.alive = false;\n int g = m.dropGold();\n System.out.println(\"You gain \" + g + \" Gold\");\n\n p.gold += g;\n System.out.println(\"You now have \" + p.gold + \" Gold\");\n p.exp += (m.attack + m.resist) * floor;\n System.out.println(\"You gain \" + (m.attack + m.resist) * floor + \" EXP\");\n if (p.exp >= 100) {\n p.exp -= 100;\n p.level++;\n System.out.println(\"You leveled up! You gain +1 Strength and +1 Dexterity\");\n p.str++;\n p.dex++;\n }\n }\n while (m.alive && m.aggro) {\n if (m.hp <= 0) {\n m.alive = false;\n int g = m.dropGold();\n System.out.println(\"You gain \" + g + \" Gold\");\n p.gold += g;\n System.out.println(\"You now have \" + p.gold + \"Gold\");\n }\n int damage = m.counterAttack(p);\n System.out.println(\"The monster bites you. You take \" + damage + \" damage.\");\n p.hp -= damage;\n if (p.hp <= 0) {\n System.out.println(\"You died. Serves you right for hitting a sleeping monster.\");\n Runner.gameOff();\n }\n System.out.println(\"You have \" + p.hp + \" health.\");\n System.out.println(\"What do you do now? (Fight, Run)\");\n q = n.nextLine();\n if (q.equalsIgnoreCase(\"run\")) {\n damage = (m.counterAttack(p) / p.dex);\n System.out.println(\"The monster bites you. You take \" + damage + \" damage.\");\n p.hp -= damage;\n m.aggro = false;\n }\n if (q.equalsIgnoreCase(\"Fight\")) {\n dam = (p.str + p.str * Math.random()) / (m.resist + 1);\n m.hp -= dam;\n System.out.println(\"You deal \" + dam + \"damage.\");\n if (m.hp <= 0) {\n m.alive = false;\n System.out.println(\"The monster howls as you deal a finishing blow.\");\n int g = m.dropGold();\n System.out.println(\"You gain \" + g + \" Gold\");\n p.gold += g;\n System.out.println(\"You now have \" + p.gold + \" Gold\");\n m.threat = false;\n p.exp += (m.attack + m.resist) * floor;\n System.out.println(\"You gain \" + (m.attack + m.resist) * floor + \" EXP\");\n if (p.exp >= 100) {\n p.exp -= 100;\n p.level++;\n System.out.println(\"You leveled up! You gain +1 Strength and +1 Dexterity\");\n p.str++;\n p.dex++;\n }\n }\n }\n\n }\n } else {\n System.out.println(\"You let the sleeping monster be.\");\n m.threat = false;\n n.close();\n }\n\n }\n }\n else\n {\n System.out.println(\"The monster's remains are still here.\");\n }\n }", "@Test\n public void testAllElevatorsOnLevel1() {\n final ElevatorUserCommand command = new ElevatorUserCommand(1, 5, 1);\n final ElevatorMovingCommand movingStrategy = calculator.getMovingStrategy(command);\n assertEquals(elevatorA.getId(), movingStrategy.getElevatorId());\n }", "void updatePassengerInCheck(int passengerInCheck);", "void updateEnemies() {\n getEnemies().forEach(e -> {\n if (!e.isAlive()) {\n e.die();\n SoundPlayer.play(SoundPlayer.enemyDestroyed);\n }\n });\n objectsInMap.removeIf(o -> o instanceof Enemy && !(((Enemy) o).isAlive()));//Removing Dead Enemies\n getEnemies().forEach(e -> e.setTarget(objectsInMap.stream().filter(p -> p.identifier.contains(\"PlayerTank0.\") &&\n p.isBlocking && ((Tank) p).isVisible()).collect(Collectors.toList())));//Giving Possible target to enemies to decide\n }", "@Override\r\n\t\tpublic Elevator checkElevator(String id){\n\t\t\tElevator Elevator = mongoTemplate.findById(id, Elevator.class, \"ElevatorCollection\");\r\n\t\t\treturn Elevator;\r\n\t\t}", "public int getElevatorCount() { return this.elevators == null ? 0 : this.elevators.length; }", "private UserInteraction() {\n\t\tthis.elevatorManager = ElevatorManager.getInstance();\n\t}", "public Thread addPerson(int sourceFloor, int destinationFloor) {\r\n\r\n /**\r\n * Important to add code here to make a\r\n * new thread that runs your person-runnable\r\n * \r\n * Also return the Thread object for your person\r\n * so that it can be reaped in the testSuite\r\n * (you don't have to join() yourself)\r\n */\r\n\r\n Thread thread = new Thread(new Person(sourceFloor, destinationFloor));\r\n thread.start();\r\n\r\n incrementNumberOfPeopleWaitingAtFloor(sourceFloor);\r\n \r\n\r\n return thread;\r\n }", "public static void addTeamLeader(Scanner input, ArrayList<Employee> newEmployee){\n \n TeamLeader newTeamLeader = new TeamLeader();\n \n String empNumber, empHireDate, monthlyBonus, trainingHours, payRate, shift, requiredTrainingHours;\n int shiftNum;\n \n System.out.print(\"Please enter the employee's first and last name: \");\n newTeamLeader.setName(input.nextLine());\n System.out.print(\"Please enter the new employee's Employee Number.\\nThe Employee Number must match XXX-L including the dash where X is a digit and L is a letter A-M: \");\n empNumber = input.nextLine();\n newTeamLeader.setNumber(verifyEmpNum(input, empNumber));\n System.out.print(\"Please enter the new employee's hire date.\\nMake sure the date you enter matches IX/XX/XXXX including the slashes\\nwhere I is a 0 or 1 and X is a digit 0-9: \");\n empHireDate = input.nextLine();\n newTeamLeader.setDate(verifyHireDate(input, empHireDate));\n System.out.print(\"Please enter the Production Team Leader's shift, 1 for day shift and 2 for night shift: \");\n shift = input.nextLine();\n shiftNum = UtilityMethods.verifyInt(input, shift);\n newTeamLeader.setShift(verifyShift(input, shiftNum));\n System.out.print(\"Please enter the pay rate of the Production Team Leader as a double: \");\n payRate = input.nextLine();\n newTeamLeader.setPayRate(UtilityMethods.verifyDouble(input, payRate));\n System.out.print(\"Please enter the monthly bonus that the Team Leader could receive: \");\n monthlyBonus = input.nextLine();\n newTeamLeader.setMonthlyBonus(UtilityMethods.verifyDouble(input, monthlyBonus));\n System.out.print(\"Please enter the number of training hours that the Team Leader requires as an integer: \");\n requiredTrainingHours = input.nextLine();\n newTeamLeader.setRequiredTrainingHours(UtilityMethods.verifyInt(input, requiredTrainingHours));\n System.out.print(\"Please enter the number of hours that the Team Leader has already acquired: \");\n trainingHours = input.nextLine();\n newTeamLeader.setTrainingHours(UtilityMethods.verifyInt(input, trainingHours));\n \n newEmployee.add(newTeamLeader);\n }", "private void clearAndFillElevatorListView() {\n\t\tObservableList<String> elevatorsOl = FXCollections.observableArrayList();\n\t\tfor(int i = 1; i < buildingModel.getNumElevators() + 1; ++i) {\n\t\t\televatorsOl.add(\"Elevator \" + i);\n\t\t}\n\t\tPlatform.runLater(() -> {\n\t\t\tlistview_elevators.getItems().setAll(elevatorsOl);\n\t\t\t//automatically select the first elevator. If the list is empty no item will be selected.\n\t\t\tlistview_elevators.getFocusModel().focus(0);\n\t\t\tlistview_elevators.getSelectionModel().select(0);\n\t\t\t//enable the default disabled checkbox if elevators are in the list/building\n\t\t\tif(!listview_elevators.getItems().isEmpty()) {\n\t\t\t\tcheckbox_manual_mode.setDisable(false);\n\t\t\t}\n\t\t});\n\t}", "public void sauverEmploye(Employe employe) {\n\n\t}", "void changeTrainer(Long pokemonId, Long newTrainerId);", "private void notifyRequestors(ArrayList<Request> reqL, Offer offer) throws SQLException {\n\t\tfor(Request request : reqL){\n\t\t\tPoolUser rider = db.getUser(request.getUserName());\n\t\t\tPoolUser driver = db.getUser(offer.getUserName());\n\t\t\tString content = HtmlUtility.getMsgBody(\"Hello\", rider, offer, request, 3, driver);\t\n\t\t\tSendMail send = new SendMail(rider.getEmail(),\"NeedARide-A Matching Ride offer found\", content);\n\t\t\tsend.sender();\n\t\t}\n\t\t\n\t}", "private void updatePersonCertSubMenus() {\n List<String> peopleNames = new ArrayList();\n ActionListener menuListener = (ActionEvent event) -> {\n //build a Person object\n String[] parts = event.getActionCommand().split(\",\");\n String foreName = Utils.getForename(parts[0]);\n String surName = Utils.getSurname(parts[0]);\n String sectionName = parts[1].trim();\n //get person object and sends person object to edit form\n Person newPers = myPeople.getPerson(foreName, surName, sectionName);\n Certificate myCert = new Certificate(newPers);\n myCert.prepareSheet();\n myCert.certificateToExcel();\n myCert.saveToDataFile();\n mainformInstance.updateForm();\n };\n this.mnuCertbyPerson.removeAll();\n //add persons in the PeronList to the menu\n List<Person> ppl = myPeople.getPersonList();\n Collections.sort(ppl, (Person p1, Person p2)\n -> p1.getSurName().compareTo(p2.getSurName()));\n //ensure unique list\n for (Person myPers : ppl) {\n if (!peopleNames.contains(myPers.toString())) {\n peopleNames.add(myPers.toString());\n }\n }\n for (String aPers : peopleNames) {\n JMenuItem mnu = new JMenuItem();\n mnu.setText(aPers);\n mnu.addActionListener(menuListener);\n this.mnuCertbyPerson.add(mnu);\n }\n }", "private void validateRights() {\n\n aRightsMapperUpdated = new ArrayList<>();\n aRightsMapperUpdated.clear();\n if (processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.tor_creation))) {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.PNC)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n } else if ((processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.stop_process)))\n || (processName != null && processName.equalsIgnoreCase(getResources().getString(R.string.crime)))) {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n } else {\n for (int i = 0; i < aRightsMapper.size(); i++) {\n if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.PNC)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.ATHENA)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.STOPS)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n } else if (aRightsMapper.get(i).getSectionName().contains(GenericConstant.POLE)) {\n aRightsMapperUpdated.add(aRightsMapper.get(i));\n }\n }\n }\n }", "private void emptyRule(boolean[] emptyElevators, int emptyCount){\n\t\t// create a new QueueSorter which will tell us where the largest Queue of waiting passengers is\n\t\tQueueSorter qs = new QueueSorter(this.upQueues.length*2+1);\n\t\tfor( int k = 0 ; k < this.upQueues.length ; k++){\n\t\t\t// add both directions\n\t\t\tqs.add( (ElevatorQueue)this.upQueues[k]);\n\t\t\tqs.add( (ElevatorQueue)this.downQueues[k]);\n\t\t}\n\t\t\n\t\t// For each elevator in the bank\n\t\tfor (int i = 0 ; i < this.elevators.length ; i++ ){\n\t\t\t// if the elevator is empty and does not already have a targetFloor assigned\n\t\t\tif( emptyElevators[i] == true && this.elevators[i].getTargetFloor() <= 0 ){\n\t\t\t\t//get the largest Queue from our list\n\t\t\t\tElevatorQueue eq = qs.remove();\n\t\t\t\t// if this queue size is 0 then there are no waiting passengers and no elevators will be\n\t\t\t\t// assigned to move that are empty\n\t\t\t\tif( eq.size() == 0 ){\n\t\t\t\t\t// all of the remaining queues are empty\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// floor of this queue\n\t\t\t\tint floor = eq.getFloor();\n\t\t\t\tElevator.Direction d = eq.getDirectionQueue();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// this checks to see if another elevator is headed to the target floor\n\t\t\t\tboolean check = false;\n\t\t\t\t//for each elevator\n\t\t\t\tfor( int j = 0; j < this.elevators.length ; j++ ){\n\t\t\t\t\t\n\t\t\t\t\t// if another elevator is headed to this target floor, that is not the same\n\t\t\t\t\t// elevator as the one being assigned this targetFloor. Also make sure it is in the same direction\n\t\t\t\t\tif( this.elevators[j].getTargetFloor() == floor &&\n\t\t\t\t\t\t\ti != j && this.elevators[j].getTargetDirection() == d){\n\t\t\t\t\t\tcheck = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if there is another elevator, continue on\n\t\t\t\tif( check == true){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//otherwise set the targetfloor and direction\n\t\t\t\tthis.elevators[i].setTargetFloor(floor);\n\t\t\t\tthis.elevators[i].setTargetDirection(d);\n\t\t\t\t//set direction to get to floor\n\t\t\t\tif( this.elevators[i].getCurrentFloor() < floor){\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// we have no assigned this elevator to a targetFloor, remove it from out list of emtpyElevators\n\t\t\t\temptyElevators[i] = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t// if we have an elevator that is Empty but is still heading toward it's targetFloor, check to see \n\t\t\t// that there are still waiting passengers at the targetFloor\n\t\t\telse if( emptyElevators[i] == true ){\n\t\t\t\tElevatorQueue temp = null;\n\t\t\t\t//check to see if anybody has picked up the passengers it was going to, find the correct Queue on\n\t\t\t\t// the correct floor\n\t\t\t\tif( this.elevators[i].getTargetDirection() == Elevator.Direction.DOWN){\n\t\t\t\t\ttemp = ( ElevatorQueue ) this.downQueues[this.elevators[i].getTargetFloor()];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp = (ElevatorQueue) this.upQueues[this.elevators[i].getTargetFloor()];\n\t\t\t\t}\n\t\t\t\t// somebody picked up the passengers, reset\n\t\t\t\tif( temp.size() == 0 ){\n\t\t\t\t\tthis.elevators[i].setTargetFloor(-1);\n\t\t\t\t\tthis.elevators[i].setTargetDirection(null);\n\t\t\t\t\t// repeat so that it will find a floor to go to\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void personExitsAtFloor(int floor) {\n\t\ttry {\n\t\t\texitedCountMutex.acquire();\n\t\t\texitedCount.set(floor, (exitedCount.get(floor) + 1));\n\t\t\texitedCountMutex.release();\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\televators.get(0).removePerson();\n\t}", "public static void main(String[] args) {\n \n Manager manager = new Manager(\"[email protected]\", \"Sally Manager\", \"mgrPass\");\n \n BookAndCancelAppointment bookAndCancelAppointment = new BookAndCancelAppointment();\n \n\n ManageAppointments ma = new ManageAppointments();\n bookAndCancelAppointment.set_ma(ma);\n ma.set_bookAndCancelAppointment(bookAndCancelAppointment);\n\n ManageSystem ms = new ManageSystem();\n ma.set_ms(ms);\n ms.set_ma(ma);\n ms.set_manager(manager);\n \n // Create Subjects\n Subject sub0 = new Subject(\"Intro to Programming\");\n Subject sub1 = new Subject(\"Operating Systems and Networks\");\n Subject sub2 = new Subject(\"Web and Mobile Applications\");\n Subject sub3 = new Subject(\"Computer Architecture\");\n \n // Add subjects to Manager (chosen to only put this uni directional in the implementation since the subject does not need to know the manager, but could be added)\n ms.add_subject(sub0);\n ms.add_subject(sub1);\n ms.add_subject(sub2);\n ms.add_subject(sub3);\n \n // Create Tutors\n TutorData t0 = new TutorData(\"[email protected]\", \"John Tutor\", \"tutpass\");\n TutorData t1 = new TutorData(\"[email protected]\", \"Tutor May\", \"password\");\n TutorData t2 = new TutorData(\"[email protected]\", \"Dave Tutor\", \"tutpassword\");\n TutorData t3 = new TutorData(\"[email protected]\", \"Jane Tutor\", \"passtutor\");\n \n // Add subjects to Manager (needed based on diagram - only implemented uni directional since both directions are not needed)\n ms.add_tutor(t0);\n ms.add_tutor(t1);\n ms.add_tutor(t2);\n ms.add_tutor(t3);\n \n // Add Subjects to Tutors\n t0.add_subject(sub0);\n t0.add_subject(sub1);\n t1.add_subject(sub1);\n t2.add_subject(sub2);\n t2.add_subject(sub3);\n t3.add_subject(sub3);\n t3.add_subject(sub0);\n \n // Create Appointments and add to Tutors\n Date date0 = new Date();\n Date date1 = new Date();\n Date date2 = new Date();\n Date date3 = new Date();\n Date date4 = new Date();\n Date date5 = new Date();\n for(int i = 0; i < 100000; i++){\n int x = 0;\n }\n Date date6 = new Date();\n /*\n String response0 = ma.create_appointment(date0, t0.get_email());\n String response1 = ma.create_appointment(date1, t0.get_email());\n String response2 = ma.create_appointment(date2, t1.get_email());\n String response3 = ma.create_appointment(date3, t2.get_email());\n String response4 = ma.create_appointment(date4, t2.get_email());\n String response5 = ma.create_appointment(date5, t2.get_email());\n String response6 = ma.create_appointment(date6, t2.get_email());\n */\n /* \n Appointment appt0 = new Appointment(date0, 0, t0);\n Appointment appt1 = new Appointment(date1, 1, t0);\n Appointment appt2 = new Appointment(date2, 2, t1);\n Appointment appt3 = new Appointment(date3, 3, t2);\n Appointment appt4 = new Appointment(date4, 4, t2);\n Appointment appt5 = new Appointment(date5, 5, t2);\n Appointment appt6 = new Appointment(date6, 6, t2);\n */\n /* \n // Add appointments to appointment list\n ma.add_appointment(appt0);\n ma.add_appointment(appt1);\n ma.add_appointment(appt2);\n ma.add_appointment(appt3);\n ma.add_appointment(appt4);\n ma.add_appointment(appt5);\n ma.add_appointment(appt6);\n */\n \n /*\n // Create Students\n StudentData s0 = new StudentData(\"[email protected]\", \"John Student\", \"studpass\", 5);\n StudentData s1 = new StudentData(\"[email protected]\", \"Jane Student\", \"pass\", 2);\n StudentData s2 = new StudentData(\"[email protected]\", \"Jack Student\", \"passwo\", 1);\n StudentData s3 = new StudentData(\"[email protected]\", \"Bob Student\", \"studentpass\", 0);\n */\n /* \n // Add students to list\n bookAndCancelAppointment.add_student(s0);\n bookAndCancelAppointment.add_student(s1);\n bookAndCancelAppointment.add_student(s2);\n bookAndCancelAppointment.add_student(s3);\n */\n //test create appointment\n //pass\n System.out.println(ma.create_appointment(date0, t0.get_email()));\n //fail\n System.out.println(ma.create_appointment(date0, t0.get_email()));\n //pass\n System.out.println(ma.create_appointment(date0, t1.get_email()));\n //pass\n System.out.println(ma.create_appointment(date6, t0.get_email()));\n // Add Appointments to Students\n //appt0.student = s1;\n //appt0.booked = true;\n //s1.appointments.add(appt0);\n /* \n // Test Book Appointment method\n \n // Not enough credits case\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Computer Architecture\", date0));\n \n // Already an appointment booked\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Web and Mobile Applications\", date1));\n \n // No available tutor case\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Intro to Programming\", date2));\n \n // Appointment can be booked case\n int s2Credits = s2.numCredits;\n assert(appt4.student == null);\n System.out.println(bookAndCancelAppointment.bookAppointmentBySubjectAndTime(\"[email protected]\", \"Web and Mobile Applications\", date3));\n assert(s2Credits - 1 == s2.numCredits);\n assert(appt4.student == s2);\n // test book by id\n // Not enough credits case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 0));\n \n // Already an appointment booked\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 6));\n \n // No available tutor case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 0));\n \n // Appointment can be booked case\n //System.out.println(bookAndCancelAppointments.BookAppointmentByID(\"[email protected]\", 1));\n */\n }", "public synchronized void addTheWarrior(Warrior w){\n Warrior obj=(Warrior)charactersOccupiedTheLocation[0];\n while(obj!=null && w.checkMobility() && obj.checkMobility() && obj.checkIsAlive()){\n try {\n wait(1000); //1000\n } catch (InterruptedException ex) {}\n obj=(Warrior)charactersOccupiedTheLocation[0];\n }\n charactersOccupiedTheLocation[0]=w;\n }", "private void checkin() {\r\n\t\tif (admittedinterns < 20) {\r\n\t\t\tDoctorManage();\r\n\t\t\taddinterns(1);\r\n\t\t\tScreentocharge();\r\n\t\t} else {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Por el dia no se admiten mas pacientes\");\r\n\t\t\t\r\n\t\t}\r\n\t}", "private UserToGame whoDiedFromKillers(UserToGame leader){\n System.out.println(\"Murderes are killing now\");\n if(userToGameService==null){\n return null;\n }\n List<UserToGame> users=userToGameService.getUsersAndMurderersVotes(leader.getGame_id());\n System.out.println(users.toString());\n Collections.sort(users,new Comparator<UserToGame>() {\n @Override\n public int compare(UserToGame o2, UserToGame o1) {\n return Integer.compare(o1.getVotesFromMurderers(), o2.getVotesFromMurderers());\n }\n });\n System.out.println(users.toString());\n if(users.get(0).getVotesFromMurderers()==0){\n return users.get(0);\n }\n users.get(0).setIs_dead(true);\n users.get(0).setIsDeadVisible(false);\n return userToGameService.update(users.get(0));\n }", "public synchronized void update() {\n localMemberHealth.setHeartbeat(localMemberHealth.getHeartbeat() + 1);\n long currentTime = System.currentTimeMillis();\n List<MemberHealth> removals = new ArrayList<>();\n for (MemberHealth memberHealth : memberHealths) {\n if (currentTime - memberHealth.getLastSeen() > 5500) {\n removals.add(memberHealth);\n } else if (currentTime - memberHealth.getLastSeen() > 2750) {\n if (!memberHealth.hasFailed() && !memberHealth.hasLeft()) {\n memberHealth.setHasFailed(true);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has failed\");\n }\n } else {\n if (memberHealth.hasFailed()) {\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has rejoined\");\n }\n memberHealth.setHasFailed(false);\n }\n }\n for (MemberHealth memberHealth : removals) {\n memberHealths.remove(memberHealth);\n logger.logLine(Logger.INFO, \"Member: \" + memberHealth.getId() + \" has been removed\");\n }\n }", "public Elevator(ElevatorSpecs spec, int[] floors, float currentFloor) {\n specs = spec;\n this.floors = floors;\n currentPassengers = new LinkedList<Passenger>();\n queue = new LinkedList<ElevatorQueueObject>();\n waitingTime = 0;\n this.currentFloor = currentFloor;\n distancePerFloor = (float)specs.getBuildingHeight() / (float)specs.getFloors();\n totalWaitTime = new BigInteger(\"0\");\n totalTravelTime = new BigInteger(\"0\");\n totalTravelDistance = new BigDecimal(\"0\");\n passengersServed = new BigInteger(\"0\"); \n zonedFloors = floors; \n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "private void housekeeping() {\n // Try to get the root region location from the master. \n if (!haveRootRegion.get()) {\n HServerAddress rootServer = hbaseMaster.getRootRegionLocation();\n if (rootServer != null) {\n // By setting the root region location, we bypass the wait imposed on\n // HTable for all regions being assigned.\n this.connection.setRootRegionLocation(\n new HRegionLocation(HRegionInfo.ROOT_REGIONINFO, rootServer));\n haveRootRegion.set(true);\n }\n }\n // If the todo list has > 0 messages, iterate looking for open region\n // messages. Send the master a message that we're working on its\n // processing so it doesn't assign the region elsewhere.\n if (this.toDo.size() <= 0) {\n return;\n }\n // This iterator is 'safe'. We are guaranteed a view on state of the\n // queue at time iterator was taken out. Apparently goes from oldest.\n for (ToDoEntry e: this.toDo) {\n if (e.msg.isType(HMsg.Type.MSG_REGION_OPEN)) {\n addProcessingMessage(e.msg.getRegionInfo());\n }\n }\n }", "public int chooseElevator() {\n\t\tPair<Integer,Direction> eleLoc;\n\t\tHashMap<Integer, Pair<Integer, Direction>> mapClone = map.getElevatorsData(); //get map of up to date elevator locations\n\t\tint distance;\n\t\tint minDist=9999;\n\t\tint choice = -1;\n\t\t//iterate over all elevators in the system\n\t\tfor(int i = 1;i<=Constants.elevator;i++) {\n\t\t\teleLoc = mapClone.get(i);//get elevators current system\n\t\t\tdistance =calculateDistance(eleLoc);\n\t\t\t//System.out.println(\"Elevator \" + i + \" is \" + distance + \" away from next job\");\n\t\t\t//if distance is optimal\n\t\t\tif(distance >=0 && distance <minDist) {\n\t\t\t\tchoice = i;\n\t\t\t\tminDist = distance;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn choice;\n\t}", "private void updateTrackingList(HashMap<String, ArrayList<Passenger>> pasGroupList, ArrayList<Passenger> individualList) {\n Iterator<String> iter = pasGroupList.keySet().iterator();\n while (iter.hasNext()) {\n String gName = iter.next();\n ArrayList<Passenger> group = pasGroupList.get(gName);\n groupReservedList.put(gName, new GroupOfPassenger(group, gName, group.get(1).isEconomy()));\n }\n\n for (Passenger k : individualList) {\n individualReservedList.put(k.getName(), k);\n }\n }", "@Test\n\tpublic void testCourseOfferingMembersReconciled() throws Exception {\n\t\tMembership member = (Membership)cmService.getCourseOfferingMemberships(\"biology_101_01\").iterator().next();\n\t\tAssert.assertEquals(\"assistant\", member.getRole());\n\t\t\n\t\t// Add a new membership\n\t\tMembership newMember = cmAdmin.addOrUpdateCourseOfferingMembership(\"foo\", \"bar\", \"biology_101_01\",\"active\");\n\t\t\n\t\t// Ensure it was added\n\t\tAssert.assertTrue(cmService.getCourseOfferingMemberships(\"biology_101_01\").contains(newMember));\n\t\t\n\t\t// Reconcile again\n\t\tjob.syncAllCmObjects();\n\t\t\n\t\t// Ensure that the new member was removed\n\t\tAssert.assertFalse(cmService.getCourseOfferingMemberships(\"biology_101_01\").contains(newMember));\n\t}", "public static void main(String args[]){\n\t\tElevator E1 = new Elevator();\n\t\tE1.F[3].setPassengersWaiting(4);\n\t\tE1.F[5].setPassengersWaiting(3);\n\t\tE1.F[6].setPassengersWaiting(4);\n\t\t\n\t\ttry {E1.boardPassengers(2,2,3);}\n\t\tcatch (ElevatorFullException exc){\n\t\t\tSystem.out.println(\"ELEVATOR IS AT ITS FULL CAPACITY\");\n\t\t\t}\n\t\tE1.registerRequest();\n\n\t\tE1.move();\n\t\tSystem.out.println(\"------------------------------------------------------------------------\");\n\t\tE1.move();\n\t\tSystem.out.println(\"------------------------------------------------------------------------\");\n\t\tE1.move();\n\t\tSystem.out.println(\"------------------------------------------------------------------------\");\n\t\tE1.move();\n\t}", "public void uptadeDB(){\n //mainDatabase.modifyStaff(this);\n }", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }", "@Override\n\tpublic void takeLeadership(CuratorFramework curator) throws Exception\n\t{\n\n\t\tLOG.info(\"a new leader has been elected: kaboom.id={}\", config.getKaboomId());\n\t\n\t\tThread.sleep(30 * 1000);\n\n\t\twhile (true)\n\t\t{\n\t\t\tMap<String, String> partitionToHost = new HashMap<String, String>();\n\t\t\tMap<String, List<String>> hostToPartition = new HashMap<String, List<String>>();\n\t\t\tfinal Map<String, KaBoomNodeInfo> clients = new HashMap<String, KaBoomNodeInfo>();\n\t\t\tMap<String, List<String>> clientToPartitions = new HashMap<String, List<String>>();\n\t\t\tMap<String, String> partitionToClient = new HashMap<String, String>();\n\t\t\tList<String> topics = new ArrayList<String>();\n\n\t\t\t// Get a full set of metadata from Kafka\n\t\t\tStateUtils.readTopicsFromZooKeeper(config.getKafkaZkConnectionString(), topics);\n\n\t\t\t// Map partition to host and host to partition\n\t\t\tStateUtils.getPartitionHosts(config.getKafkaSeedBrokers(), topics, partitionToHost, hostToPartition);\n\n\t\t\t// Get a list of active clients from zookeeper\n\t\t\tStateUtils.getActiveClients(curator, clients);\n\n\t\t\t// Get a list of current assignments\n\t\t\t// Get a list of current assignments\n\t\t\t\n\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t{\n\t\t\t\tStat stat = curator.checkExists().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\n\t\t\t\tif (stat != null)\n\t\t\t\t{\n\t\t\t\t\t// check if the client is still connected, and delete node if it is not.\n\t\t\t\t\t\n\t\t\t\t\tString client = new String(curator.getData().forPath(\"/kaboom/assignments/\" + partition), UTF8);\n\t\t\t\t\t\n\t\t\t\t\tif (clients.containsKey(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is connected\", partition, client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpartitionToClient.put(partition, client);\t\t\t\t\t\t\n\t\t\t\t\t\tList<String> parts = clientToPartitions.get(client);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (parts == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\t\tclientToPartitions.put(client, parts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparts.add(partition);\n\t\t\t\t\t} \n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.debug(\"Partition {} : client {} is not connected\", partition, client);\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partition);\n\t\t\t\t\t\tstat = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tStateUtils.calculateLoad(partitionToHost, clients, clientToPartitions);\n\n\t\t\t// If any node is over its target by at least one, then unassign partitions until it is at or below its target\n\t\t\t\n\t\t\tfor (Entry<String, KaBoomNodeInfo> e : clients.entrySet())\n\t\t\t{\n\t\t\t\tString client = e.getKey();\n\t\t\t\tKaBoomNodeInfo info = e.getValue();\n\n\t\t\t\tif (info.getLoad() >= info.getTargetLoad() + 1)\n\t\t\t\t{\n\t\t\t\t\tList<String> localPartitions = new ArrayList<String>();\n\t\t\t\t\tList<String> remotePartitions = new ArrayList<String>();\n\n\t\t\t\t\tfor (String partition : clientToPartitions.get(client))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (partitionToHost.get(partition).equals(info.getHostname()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlocalPartitions.add(partition);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tremotePartitions.add(partition);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (info.getLoad() > info.getTargetLoad())\n\t\t\t\t\t{\n\t\t\t\t\t\tString partitionToDelete;\n\t\t\t\t\t\tif (remotePartitions.size() > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartitionToDelete = remotePartitions.remove(rand.nextInt(remotePartitions.size()));\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpartitionToDelete = localPartitions.remove(rand.nextInt(localPartitions.size()));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tLOG.info(\"Unassgning {} from overloaded client {}\", partitionToDelete, client);\n\t\t\t\t\t\tpartitionToClient.remove(partitionToDelete);\n\t\t\t\t\t\tclientToPartitions.get(client).remove(partitionToDelete);\n\t\t\t\t\t\tinfo.setLoad(info.getLoad() - 1);\n\n\t\t\t\t\t\tcurator.delete().forPath(\"/kaboom/assignments/\" + partitionToDelete);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Sort the clients by percent load, then add unassigned clients to the lowest loaded client\t\t\t\n\t\t\t{\n\t\t\t\tList<String> sortedClients = new ArrayList<String>();\n\t\t\t\tComparator<String> comparator = new Comparator<String>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(String a, String b)\n\t\t\t\t\t{\n\t\t\t\t\t\tKaBoomNodeInfo infoA = clients.get(a);\n\t\t\t\t\t\tdouble valA = infoA.getLoad() / infoA.getTargetLoad();\n\n\t\t\t\t\t\tKaBoomNodeInfo infoB = clients.get(b);\n\t\t\t\t\t\tdouble valB = infoB.getLoad() / infoB.getTargetLoad();\n\n\t\t\t\t\t\tif (valA == valB)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (valA > valB)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tsortedClients.addAll(clients.keySet());\n\n\t\t\t\tfor (String partition : partitionToHost.keySet())\n\t\t\t\t{\n\t\t\t\t\t// If it's already assigned, skip it\n\t\t\t\t\t\n\t\t\t\t\tif (partitionToClient.containsKey(partition))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tCollections.sort(sortedClients, comparator);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * \n\t\t\t\t\t * Iterate through the list until we find either a local client below capacity, or we reach the ones that are \n\t\t\t\t\t * above capacity. If we reach clients above capacity, then just assign it to the first node.\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\tLOG.info(\"Going to assign {}\", partition);\n\t\t\t\t\tString chosenClient = null;\n\t\t\t\t\t\n\t\t\t\t\tfor (String client : sortedClients)\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG.info(\"- Checking {}\", client);\t\t\t\t\t\t\n\t\t\t\t\t\tKaBoomNodeInfo info = clients.get(client);\t\t\t\t\t\t\n\t\t\t\t\t\tLOG.info(\"- Current load = {}, Target load = {}\", info.getLoad(), info.getTargetLoad());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (info.getLoad() >= info.getTargetLoad())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (clients.get(client).getHostname().equals(partitionToHost.get(partition)))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tchosenClient = client;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (chosenClient == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tchosenClient = sortedClients.get(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tLOG.info(\"Assigning partition {} to client {}\", partition, chosenClient);\n\n\t\t\t\t\tcurator\n\t\t\t\t\t\t .create()\n\t\t\t\t\t\t .withMode(CreateMode.PERSISTENT)\n\t\t\t\t\t\t .forPath(\"/kaboom/assignments/\" + partition,\n\t\t\t\t\t\t\t chosenClient.getBytes(UTF8));\n\n\t\t\t\t\tList<String> parts = clientToPartitions.get(chosenClient);\n\t\t\t\t\t\n\t\t\t\t\tif (parts == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tparts = new ArrayList<String>();\n\t\t\t\t\t\tclientToPartitions.put(chosenClient, parts);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tparts.add(partition);\n\n\t\t\t\t\tpartitionToClient.put(partition, chosenClient);\n\n\t\t\t\t\tclients.get(chosenClient).setLoad(clients.get(chosenClient).getLoad() + 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Check to see if the kafka_ready flag writer thread exists and is alive:\n\t\t\t * \n\t\t\t * If it doesn't exist or isn't running, start it. This is designed to \n\t\t\t * work well when the load balancer sleeps for 10 minutes after assigning \n\t\t\t * work. If that behavior changes then additional logic will be required\n\t\t\t * to ensure this isn't executed too often \n\t\t\t */\n\t\t\t\n\t\t\tif (readyFlagThread == null || !readyFlagThread.isAlive())\n\t\t\t{\n\t\t\t\tLOG.info(\"[ready flag writer] thread doesn't exist or is not running\");\t\t\t\t\n\t\t\t\treadyFlagWriter = new ReadyFlagWriter(config, curator);\n\t\t\t\treadyFlagWriter.addListener(this);\n\t\t\t\treadyFlagThread = new Thread(readyFlagWriter);\n\t\t\t\treadyFlagThread.start();\n\t\t\t\tLOG.info(\"[ready flag writer] thread created and started\");\n\t\t\t}\n\n\t\t\tThread.sleep(10 * 60 * 1000);\n\t\t}\n\t}" ]
[ "0.6851761", "0.6851066", "0.59283715", "0.5916799", "0.5837188", "0.58007354", "0.5781245", "0.5740534", "0.57219076", "0.5707447", "0.5646497", "0.56460315", "0.5508666", "0.5485151", "0.5461193", "0.5458464", "0.5428177", "0.54244065", "0.54179704", "0.5396943", "0.5352741", "0.5345382", "0.5342126", "0.53282034", "0.53110224", "0.5299502", "0.52889806", "0.5261052", "0.5260872", "0.526018", "0.52463096", "0.5238282", "0.52222085", "0.5211478", "0.5209516", "0.5205288", "0.5201446", "0.52004766", "0.519691", "0.5193879", "0.5193452", "0.5188797", "0.5180527", "0.5177391", "0.5162133", "0.51433283", "0.51300985", "0.5122036", "0.51160955", "0.5102128", "0.5092452", "0.508302", "0.507673", "0.50747436", "0.507071", "0.5060767", "0.5060038", "0.5059435", "0.50577515", "0.50438833", "0.5042866", "0.5042835", "0.503433", "0.503433", "0.50202626", "0.50148773", "0.5014508", "0.50136286", "0.50118345", "0.5007737", "0.50063616", "0.5002964", "0.4997624", "0.4997295", "0.49963745", "0.49956995", "0.49871498", "0.49716252", "0.49628878", "0.49549332", "0.49519992", "0.49503398", "0.49444416", "0.49436167", "0.49414164", "0.4938987", "0.49387485", "0.4935006", "0.49311128", "0.4925924", "0.49184898", "0.4916965", "0.49160108", "0.4914443", "0.49144137", "0.49086264", "0.49064595", "0.48969835", "0.4891849", "0.48915222" ]
0.57136905
9
only by finishing a job it can be deleted from `jobs`
private void deleteJob(int floorNumber){ jobs.remove(floorNumber); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deletejob() {\n\t\tjob.delete(new UpdateListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void finishJob(View v) {\n JobScheduler jobScheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n List<JobInfo> allPendingJobs = jobScheduler.getAllPendingJobs();\n if (allPendingJobs.size() > 0) {\n // Finish the last one\n int jobId = allPendingJobs.get(0).getId();\n jobScheduler.cancel(jobId);\n Toast.makeText(\n MainActivity.this, String.format(getString(R.string.cancelled_job), jobId),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(\n MainActivity.this, getString(R.string.no_jobs_to_cancel),\n Toast.LENGTH_SHORT).show();\n }\n }", "private void runWithoutJobId() {\n if (numJobsToDelete.isPresent() && numJobsToDelete.get() <= 0) {\n handleBadRequest(ERROR_NON_POSITIVE_JOBS_TO_DELETE);\n return;\n }\n int defaultedDaysOld = daysOld.orElse(DEFAULT_DAYS_OLD);\n // Only generate the detailed response payload if there aren't too many jobs involved.\n boolean verbose =\n numJobsToDelete.isPresent() && (numJobsToDelete.get() <= DEFAULT_MAX_NUM_JOBS_TO_DELETE);\n StringBuilder payload = new StringBuilder();\n\n // Since findEligibleJobsByJobName returns only a certain number of jobs, we must loop through\n // until we find enough, requesting deletion as we go.\n int numJobsProcessed = 0;\n DateTime cutoffDate = clock.nowUtc().minusDays(defaultedDaysOld);\n Optional<String> cursor = Optional.empty();\n do {\n Optional<Integer> numJobsToRequest =\n Optional.ofNullable(\n numJobsToDelete.isPresent() ? numJobsToDelete.get() - numJobsProcessed : null);\n EligibleJobResults batch =\n mapreduceEntityCleanupUtil.findEligibleJobsByJobName(\n jobName.orElse(null), cutoffDate, numJobsToRequest, force.orElse(false), cursor);\n cursor = batch.cursor();\n // Individual batches can come back empty if none of the returned jobs meet the requirements\n // or if all jobs have been exhausted.\n if (!batch.eligibleJobs().isEmpty()) {\n String payloadChunk = requestDeletion(batch.eligibleJobs(), verbose);\n if (verbose) {\n payload.append(payloadChunk);\n }\n numJobsProcessed += batch.eligibleJobs().size();\n }\n // Stop iterating when all jobs have been exhausted (cursor is absent) or enough have been\n // processed.\n } while (cursor.isPresent()\n && (!numJobsToDelete.isPresent() || (numJobsProcessed < numJobsToDelete.get())));\n\n if (numJobsProcessed == 0) {\n logger.atInfo().log(\n \"No eligible jobs found with name '%s' older than %d days old.\",\n jobName.orElse(\"(any)\"), defaultedDaysOld);\n payload.append(\"No eligible jobs found\");\n } else {\n logger.atInfo().log(\"A total of %d job(s) processed.\", numJobsProcessed);\n payload.append(String.format(\"A total of %d job(s) processed\", numJobsProcessed));\n }\n response.setPayload(payload.toString());\n }", "@Override\n public boolean onStopJob(JobParameters job) {\n if (mTasksData != null) {\n mTasksData.cancel(true);\n }\n return true;\n }", "@Override\n public boolean onStopJob(com.firebase.jobdispatcher.JobParameters job) {\n // If mBackgroundTask is valid, cancel it\n //Return true to signify the job should be retried\n if (mBackgroundTask != null) mBackgroundTask.cancel(true);\n return true;\n }", "public void finalizeJob() {\n // override to implement\n }", "void completeJob();", "Integer deleteAllCompletedJobs() throws GWTJahiaServiceException;", "void disjoinJob(long jobId, long joinedJobId);", "@Test\n public void test01cleanup() throws IOException {\n // when\n Map<String, Job> jobs = jenkins.getJobs();\n for (String jobName: jobs.keySet()) {\n if (!JOB_GENERATOR_JOB_NAME.equals(jobName)) {\n jenkins.deleteJob(jobName);\n }\n }\n jobs = jenkins.getJobs();\n\n // then\n assertThat(jobs.size(), is(1));\n }", "public void removeJob(int jNo);", "@Override\n public boolean onStopJob(JobParameters job) {\n return true;\n }", "boolean isDone(long number) throws NoSuchJobException;", "public boolean killJob(Job job) {\n\t\tProcess process = jobProcesses.get(job);\n\t\tif (process == null) { \n\t\t\tlogger.info(\"Attempt to kill unknown job (already finished?): \"\n\t\t\t\t+ job);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tprocess.exitValue();\n\t\t\tlogger.info(\"Didn't kill already finished job \" + job);\n\t\t\tjobProcesses.remove(job);\n\t\t\treturn true;\n\t\t} catch (IllegalThreadStateException ex) {\n\t\t\tlogger.debug(\"Attempting to kill \" + job);\n\t\t\tprocess.destroy();\n\t\t}\n\t\t\n\t\t// Did it die?\n\t\ttry {\n\t\t\tlogger.info(\"Killed \" + job);\n\t\t\tprocess.exitValue();\n\t\t\tjobProcesses.remove(job);\n\t\t\treturn true;\n\t\t} catch (IllegalThreadStateException ex) {\n\t\t\tlogger.warn(\"Could not kill job \" + job);\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean removeJob(Process p) {\n // Remove the next lines to start your implementation\n\n //Remove process from the queue of unifinished jobs that are cycled back and forth\n //from the CPU\n return this.unfinishedJobs.remove(p);\n /*------------------------------------------------------------*/\n }", "protected void jobFinished(Progress job) {\n }", "@Override\n public boolean onStopJob(JobParameters job) {\n Log.d(LOG_TAG, \"Sync job stopped\");\n return true;\n }", "protected void afterJobExecution() {\n\t}", "public void terminateJob(STAXJob job)\n {\n\n TreeMap subJobs = (TreeMap)job.getData(\"subJobMap\");\n\n if (subJobs != null)\n {\n synchronized (subJobs)\n {\n subJobs.remove(String.valueOf(job.getJobNumber()));\n }\n }\n }", "public void deleteJob(String jobId);", "@Override\n public boolean onStopJob(JobParameters params) {\n return false;\n }", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }", "boolean cancelJob(String jobId) throws Exception;", "public static boolean removeJob(int id) throws JobNotFoundException\n {\n conn = DatabaseConnectionPostgre.connection();\n try {\n stmt = conn.createStatement();\n String sql = String.format(\n \"DELETE FROM job WHERE job_id = %d;\",\n id\n );\n int res = stmt.executeUpdate(sql);\n stmt.close();\n conn.close();\n if(res == 0) {\n throw new JobNotFoundException(id);\n } else {\n return true;\n }\n } catch (JobNotFoundException e) {\n throw e;\n } catch (Exception e) {\n System.err.println(e.getClass().getName()+\": \"+ e.getMessage());\n return false;\n }\n }", "@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}", "@Override\n public ReturnT<String> kill(String jobId) {\n JobThread jobThread = CcbJobExecutor.loadJobThread(jobId);\n if (jobThread != null) {\n \tCcbJobExecutor.removeJobThread(jobId, \"人工手动终止\");\n return ReturnT.SUCCESS;\n }\n\n return new ReturnT<String>(ReturnT.SUCCESS_CODE, \"job thread aleady killed.\");\n }", "protected boolean isAllJobsFinished() {\r\n \tIterator<Progress> jobsIterator = JobManager.iterator();\r\n \twhile (jobsIterator.hasNext()) {\r\n \t\tProgress job = jobsIterator.next();\r\n\t\t\tif (!job.isFinished()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n }", "@Override\n\t@Transactional\n\tpublic void deleteJob(String jobId) {\n\n\t}", "public void finish() {}", "protected void finished(){\n if (doFilterUpdate) {\n //runFilterUpdates();\n }\n \n double groupTotalTimeSecs = (System.currentTimeMillis() - (double) groupStartTime) / 1000;\n log.info(\"Job \"+id+\" finished \" /*+ parsedType*/ + \" after \"\n + groupTotalTimeSecs + \" seconds\");\n \n ((DistributedTileBreeder)breeder).jobDone(this);\n }", "Boolean deleteJob(String jobName, String groupName) throws GWTJahiaServiceException;", "abstract public void deleteAfterBetaReduction();", "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "@Override\n public boolean onStopJob(JobParameters jobParameters) {\n Log.d(TAG, \"Job cancelled before being completed.\");\n jobCancelled = true;\n boolean needsReschedule = isWorking;\n jobFinished(jobParameters, needsReschedule);\n return needsReschedule;\n }", "@Override\r\n public void abortJob(JobContext context, int runState) \r\n throws IOException {\n cleanupJob(context);\r\n }", "synchronized public void jobDone(){ // l'action a été réalisée\n\t\tdone = true; // changement d'état\n\t\tthis.notifyAll(); // on notifie tout le monde\n\t}", "private void doFinishJob\n\t\t(long now,\n\t\t JobInfo jobinfo)\n\t\tthrows IOException\n\t\t{\n\t\tmyLog.log (now, \"Job \" + jobinfo.jobnum + \" finished\");\n\t\tdoCleanupJob (now, jobinfo);\n\t\t}", "@Override\n public void killJob(JobID jobid) throws IOException {\n if (null == jobid) {\n LOG.info(\"Null jobid object sent to JobTracker.killJob()\");\n return;\n }\n \n JobInProgress job = jobTable.get(jobid);\n \n if (null == job) {\n LOG.info(\"killJob(): JobId \" + jobid.toString() + \" is not a valid job\");\n return;\n }\n \n job.kill();\n }", "private void finishJob(int id) {\n Call<FinishJobResult> call = apiService.finishJob(id);\n final SharedPreferences.Editor editor = sharedPreferences.edit();\n call.enqueue(new Callback<FinishJobResult>() {\n @Override\n public void onResponse(Call<FinishJobResult> call, Response<FinishJobResult> response) {\n FinishJobResult finishJobResult = response.body();\n try {\n if (finishJobResult.getSuccess() == 1) {\n //job is now status 2 and it is finished\n editor.putInt(\"JOB_HANDLED\", 0);\n editor.apply();\n Toast.makeText(MapActivity.this, \"Done handling request.\", Toast.LENGTH_SHORT).show();\n recreate();\n }\n } catch (Exception e) {\n }\n }\n\n @Override\n public void onFailure(Call<FinishJobResult> call, Throwable t) {\n Toast.makeText(MapActivity.this, \"lease try again\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void finish(){\n\t\tnotfinish = false;\n\t}", "void deleteByJobId(Long jobId);", "Boolean closeJob(String id);", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n void clean(long cutoff, HistoryStorage storage) throws IOException {\n boolean halted = false;\n // TODO Delete YYYY/MM/DD directories.\n List<FileStatus> serialDirList = findTimestampedDirectories();\n // Sort in ascending order. Relies on YYYY/MM/DD/Serial\n Collections.sort(serialDirList);\n for (FileStatus serialDir : serialDirList) {\n List<FileStatus> historyFileList = scanDirectoryForHistoryFiles(\n serialDir.getPath(), doneDirFc);\n for (FileStatus historyFile : historyFileList) {\n JobIndexInfo jobIndexInfo = FileNameIndexUtils.getIndexInfo(historyFile\n .getPath().getName());\n long effectiveTimestamp = getEffectiveTimestamp(\n jobIndexInfo.getFinishTime(), historyFile);\n if (effectiveTimestamp <= cutoff) {\n String confFileName = JobHistoryUtils\n .getIntermediateConfFileName(jobIndexInfo.getJobId());\n MetaInfo metaInfo = new MetaInfo(historyFile.getPath(), new Path(\n historyFile.getPath().getParent(), confFileName), null,\n jobIndexInfo);\n storage.jobRemovedFromHDFS(metaInfo.getJobId());\n deleteJobFromDone(metaInfo);\n } else {\n halted = true;\n break;\n }\n }\n if (!halted) {\n doneDirFc.delete(doneDirFc.makeQualified(serialDir.getPath()), true);\n removeDirectoryFromSerialNumberIndex(serialDir.getPath());\n synchronized (existingDoneSubdirs) {\n existingDoneSubdirs.remove(serialDir.getPath());\n }\n } else {\n break; // Don't scan any more directories.\n }\n }\n }", "public boolean deleteOnExit();", "public JSONObject handleCleanupJob(String jobId) {\n JSONObject retValue = new JSONObject();\n try {\n try {\n MapReduceState.getMapReduceStateFromJobID(ds, JobID.forName(jobId)).delete();\n retValue.put(\"status\", \"Successfully deleted requested job.\");\n } catch (IllegalArgumentException e) {\n retValue.put(\"status\", \"Couldn't find requested job.\");\n } catch (EntityNotFoundException e) {\n retValue.put(\"status\", \"Couldn't find requested job.\");\n }\n } catch (JSONException e) {\n throw new RuntimeException(\"Hard coded string is null\", e);\n }\n return retValue;\n }", "private void finish() {\n }", "public boolean prune()\n throws org.json.JSONException, java.io.IOException\n {\n TreeSet<String> to_delete =new TreeSet<String>();\n int current_block_height = server.getCurrentBlockTemplate().getInt(\"height\");\n\n synchronized(open_jobs)\n {\n if (open_jobs.size() == 0) return true;\n\n for(Map.Entry<String, JobInfo> me : open_jobs.entrySet())\n {\n JobInfo ji = me.getValue();\n if (ji.getHeight() + 1 < current_block_height)\n {\n to_delete.add(me.getKey());\n }\n } \n for(String job_id : to_delete)\n {\n open_jobs.remove(job_id);\n }\n\n }\n return false;\n\n }", "public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }", "public void deleteJob(String jobInstancId) {\n JobWrapper jobWrapper = jobs.remove(jobInstancId);\n if (jobWrapper != null) {\n LOGGER.info(\"delete job instance with job id {}\", jobInstancId);\n jobWrapper.cleanup();\n getJobConfDb().deleteJob(jobInstancId);\n }\n }", "public void deleteJob(ConfigProperties cprop){\n\t\tjobs.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Job \"+cprop.getProperty(\"PROJ.id\"));\n\t}", "@Override\n public boolean canBeTerminatedNow() {\n logger.debug(\"OifitsExplorerGui.finish() handler called.\");\n\n // Can't exit if a job is running\n if (IRModelManager.getInstance().getIRModel().isRunning()) {\n MessagePane.showMessage(\"A job is running... Please wait for its completion or cancel it before quitting.\");\n return false;\n }\n\n // Ask the user if he wants to save modifications\n //@TODO replace by code when save will be available.\n MessagePane.ConfirmSaveChanges result = MessagePane.ConfirmSaveChanges.Ignore;\n //MessagePane.ConfirmSaveChanges result = MessagePane.showConfirmSaveChangesBeforeClosing();\n\n // Handle user choice\n switch (result) {\n // If the user clicked the \"Save\" button, save and exit\n case Save:\n /*\n if (this.saveAction != null) {\n return this.saveAction.save();\n }\n */\n break;\n\n // If the user clicked the \"Don't Save\" button, exit\n case Ignore:\n break;\n\n // If the user clicked the \"Cancel\" button or pressed 'esc' key, don't exit\n case Cancel:\n default: // Any other case\n return false;\n }\n\n return true;\n }", "public void finish() {\n\n\t}", "public void finish() { \n\t\t\n\t}", "public boolean canFinish() {\n return false;\n }", "@Override\n boolean canFinish() {\n return false; //!getTask().hasUnfinishedDependencies();\n }", "private void doCleanupJob\n\t\t(long now,\n\t\t JobInfo jobinfo)\n\t\tthrows IOException\n\t\t{\n\t\t// Stop lease timers.\n\t\tjobinfo.renewTimer.stop();\n\t\tjobinfo.expireTimer.stop();\n\t\tjobinfo.jobTimer.stop();\n\n\t\t// Stop communication with job frontend.\n\t\tjobinfo.frontend.close();\n\n\t\t// Remove job from queues.\n\t\tmyFrontendToJobMap.remove (jobinfo.frontend);\n\t\tmyRunningJobList.remove (jobinfo);\n\t\tmyWaitingJobList.remove (jobinfo);\n\n\t\t// Make each of the job's nodes idle (but not failed nodes).\n\t\tfor (int i = 0; i < jobinfo.count; ++ i)\n\t\t\t{\n\t\t\tBackendInfo backendinfo = jobinfo.backend[i];\n\t\t\tif (backendinfo.state != BackendInfo.State.FAILED)\n\t\t\t\t{\n\t\t\t\tbackendinfo.state = BackendInfo.State.IDLE;\n\t\t\t\tbackendinfo.stateTime = now;\n\t\t\t\tbackendinfo.job = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Update total compute time.\n\t\tmyTotalComputeTime += (now - jobinfo.stateTime);\n\n\t\t// Assign idle nodes to waiting jobs.\n\t\tassignResourcesToJobs (now);\n\t\t}", "@Test\r\n\tpublic void testChildDestroyed() throws InterruptedException {\r\n\t\t\r\n\t\tParallelJob test = new ParallelJob();\r\n\t\ttest.setExecutorService(new NowExecutor());\r\n\r\n\t\tDestroyJob destroy = new DestroyJob();\r\n\t\t\r\n\t\ttest.setJobs(0, destroy);\r\n\t\t\r\n\t\tStateSteps steps = new StateSteps(test);\r\n\t\tsteps.startCheck(ParentState.READY, \r\n\t\t\t\tParentState.EXECUTING, ParentState.ACTIVE,\r\n\t\t\t\tParentState.COMPLETE);\r\n\t\t\r\n\t\ttest.run();\r\n\t\t\r\n\t\tsteps.checkNow();\r\n\t\t\r\n\t\tsteps.startCheck(\r\n\t\t\t\tParentState.COMPLETE, ParentState.DESTROYED);\r\n\t\t\r\n\t\ttest.destroy();\r\n\t\t\r\n\t\ttest.setJobs(0, null);\r\n\t\t\r\n\t\tdestroy.destroy();\r\n\t\t\r\n\t\tsteps.checkNow();\r\n\t\t\r\n\t}", "private synchronized void remove(final String jobIdentifier) {\n final RunningJobImpl result = this.jobs.remove(jobIdentifier);\n if (null == result) {\n throw new RuntimeException(\"Trying to remove a RunningJob that is unknown: \" + jobIdentifier);\n }\n }", "public void killIt() {\n isRunning = false;\n killed = true;\n hardKill = true;\n\n dumpState();\n if (UIMAFramework.getLogger().isLoggable(Level.INFO)) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_killing_cpm__INFO\",\n new Object[] { Thread.currentThread().getName() });\n }\n if (workQueue != null) {\n while (workQueue.getCurrentSize() > 0) {\n workQueue.dequeue();\n }\n }\n if (outputQueue != null) {\n while (outputQueue.getCurrentSize() > 0) {\n outputQueue.dequeue();\n }\n }\n if (casPool != null) {\n synchronized (casPool) {\n casPool.notifyAll();\n }\n }\n if (workQueue != null) {\n Object[] eofToken = new Object[1];\n // only need one member in the array\n eofToken[0] = new EOFToken();\n workQueue.enqueue(eofToken);\n UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_terminate_pipelines__INFO\",\n new Object[] { Thread.currentThread().getName(), String.valueOf(killed) });\n // synchronized (workQueue) { // redundant - enqueue call above does this\n // workQueue.notifyAll();\n // }\n }\n\n }", "protected void runPostJobGloballyTerminated(JobID jobId, JobStatus jobStatus) {\n }", "protected void finishExecution() {\r\n\r\n\t}", "@Override\n\tvoid finishWork() {\n\t\t\n\t}", "@Override\n\tvoid finishWork() {\n\t\t\n\t}", "public void removeJob(String name, JobInProgress job) {\n Queue<JobInProgress> queue = queues.get(name);\n if (null != queue)\n queue.removeJob(job);\n }", "public void finishingTask(Task task, String key) {\n un_FirebaseRef_tasks.child(key).removeValue();\n }", "@Override\n\tpublic void delete(Long id) {\n\t\tlog.debug(\"Request to delete Jobs : {}\", id);\n\t\tjobsRepository.deleteById(id);\n\t}", "protected boolean isFinished() {\r\n return false;\r\n }", "protected boolean isFinished() {\r\n return false;\r\n }", "public void remove(String name) {\n jobs.remove(name);\n }", "private void completeAbandonedJob(Integer id) {\r\n\t\tabandonedJobs++;\r\n\t\tBatchJobInstance batchJobInstance = batchJobInstanceManager.findById(id);\r\n\t\tif (batchJobInstance != null) {\r\n\t\t\tDate rightNow = new Date();\r\n\t\t\tbatchJobInstance.setStatus(BatchJobService.STATUS_ABANDONED);\r\n\t\t\tBatchJobEvent batchJobEvent = new BatchJobEvent();\r\n\t\t\tbatchJobEvent.setEvent(BatchJobService.STATUS_ABANDONED);\r\n\t\t\tbatchJobEvent.setDescription(\"Job marked as abandoned by PeriodicBatchJobReview\");\r\n\t\t\tbatchJobEvent.setCreationDate(rightNow);\r\n\t\t\tbatchJobEvent.setCreatedBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobEvent.setLastUpdate(rightNow);\r\n\t\t\tbatchJobEvent.setLastUpdateBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobInstance.addEvent(batchJobEvent);\r\n\t\t\tbatchJobInstance.setLastUpdate(rightNow);\r\n\t\t\tbatchJobInstance.setLastUpdateBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobInstanceManager.save(batchJobInstance);\r\n\t\t\tupdatedJobs++;\r\n\t\t} else {\r\n\t\t\tlog.error(\"Unable to retrieve instance \" + id + \"; job will not be updated.\");\r\n\t\t\tfailedUpdates++;\r\n\t\t}\r\n\t}", "protected void tryDeleting() {\n\t\tAsyncTaskHelper.create(new AsyncMethods<SavedGoal>() {\n\n\t\t\t@Override\n\t\t\tpublic SavedGoal doInBackground() {\n\t\t\t\treturn ClientSavedGoalManagement.deleteSavedGoal(savedGoal);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onDone(SavedGoal value, long ms) {\n\t\t\t\tif (value == null) {\n\t\t\t\t\t// error, nothing deleted\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Your saved goal was not deleted, error!\",\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t} else {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Saved goal deleted!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\tsetResult(RESULT_OK);\n\t\t\t\t\tfinish();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}", "public void finish() throws SharedUtil.MapMarkerInvalidStateException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException\r\n\t{\n\t\tif(state!=STATE.ITERATE)\r\n\t\t\tthrow new SharedUtil.MapMarkerInvalidStateException(\"invalid mapMarker manager state: finish() only allow state of STATE.ITERATE\");\r\n\r\n\t\tfor(int i :dellist.keySet())\r\n\t\t{\r\n\t\t\tT tmp=dellist.get(i);\r\n\t\t\t\r\n\t\t\tif(tmp.timeout()){\r\n\t\t\t\tif(tmp.getMarker()!=null)\r\n\t\t\t\t{\ttmp.getMarker().remove();\r\n\t\t\t\t\tLog.d(\"****[deleting unvisited marker]\", tmp.getMarker().getPosition().toString());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\ttmp.startTime();\r\n\t\t\t\tkeeplist.put(i, tmp);\r\n\t\t\t}\r\n\t\t}\r\n\t\tdellist.clear();\r\n\t\tstate=STATE.START;\r\n\t}", "public void cancel(final Job job) {\n for (final Iterator<DelayedJob> it = deque.iterator(); it.hasNext(); it\n .next()) {\n final DelayedJob nextJob = it.next();\n if (nextJob.getJob() == job) {\n it.remove();\n nextJob.cancel();\n return;\n }\n }\n }", "public void finish(){\n }", "public void finishTask() {\n\t\t\n\t}", "@Override // androidx.work.impl.utils.CancelWorkRunnable\n @WorkerThread\n public void c() {\n WorkDatabase workDatabase = this.b.getWorkDatabase();\n workDatabase.beginTransaction();\n try {\n for (String str : workDatabase.workSpecDao().getUnfinishedWorkWithTag(this.c)) {\n a(this.b, str);\n }\n workDatabase.setTransactionSuccessful();\n workDatabase.endTransaction();\n b(this.b);\n } catch (Throwable th) {\n workDatabase.endTransaction();\n throw th;\n }\n }", "Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);", "@Override\n public void onCrimeDeleted(Crime crime) {\n finish();\n }", "String resubmitJob(JPPFJob job);", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }", "protected boolean isFinished() {\n return false;\n }" ]
[ "0.7159048", "0.675452", "0.65668964", "0.6463438", "0.6462865", "0.6423292", "0.64226437", "0.6395175", "0.6386145", "0.6374414", "0.6345986", "0.6334477", "0.6236907", "0.61798966", "0.6162054", "0.61551243", "0.61344695", "0.61204916", "0.61062276", "0.6103157", "0.60731226", "0.60500973", "0.6041174", "0.6039021", "0.6004588", "0.60039926", "0.59913045", "0.59833056", "0.59626883", "0.5961452", "0.5953216", "0.59424406", "0.59341854", "0.592268", "0.59131455", "0.59050727", "0.5857617", "0.5835377", "0.5831211", "0.5816073", "0.58032554", "0.5784854", "0.5781416", "0.5775334", "0.57681566", "0.573577", "0.57356924", "0.57107496", "0.57081825", "0.5668615", "0.566567", "0.56503797", "0.56308585", "0.562914", "0.5623996", "0.56218666", "0.5618139", "0.56087404", "0.5603308", "0.5596512", "0.55746067", "0.5559903", "0.55545783", "0.55545783", "0.5553861", "0.5550238", "0.55365396", "0.55224776", "0.55224776", "0.5513365", "0.55096817", "0.5506699", "0.55009973", "0.54986364", "0.54956514", "0.5493532", "0.5491387", "0.5490581", "0.54767066", "0.5473189", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319", "0.5467319" ]
0.5813632
40
it's possible to empty jobs before changing the state; in this case our destination is the current floor
public Integer getDestinationFloor() { return switch (this.currentState){ case UP -> this.jobs.isEmpty() ? this.currentFloor : this.jobs.last(); case DOWN -> this.jobs.isEmpty() ? this.currentFloor : this.jobs.first(); case IDLE -> null; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void step(){\n if (this.jobs.contains(this.currentFloor)){ //we arrived at our destination\n this.openDoor();\n this.leavePeople();\n this.deleteJob(this.currentFloor);\n } else {\n this.closeDoor();\n this.changeState();\n this.move();\n }\n }", "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }", "private void stop() {\n System.out.println(\"Stopping on \"+ _currentFloor.floorName() +\" floor \" );\n _currentFloor.clearDestinationRequest();\n _passengersOnboard = _passengersOnboard - _currentFloor.queuedPassengers();\n _currentFloor.clearQueuedPassengers();\n System.out.println(this);\n\n }", "private void deleteJob(int floorNumber){\n jobs.remove(floorNumber);\n }", "public void clearGotoFloor();", "public void resetBuildings(){\n\t\tfor(Structure building : this.buildings){\n\t\t\tbuilding.reset();\n\t\t}\n\t}", "public void updateState() {\n //check if arrived\n if (destinations.contains(currentFloor)) {\n destinations.removeIf(n -> (n == currentFloor));\n System.out.println(\"\\t\\tElevator #\" + id + \": Arrived at floor #\" + currentFloor + \".\");\n }\n\n // take stock of assigned stops and change direction if required\n if (destinations.isEmpty()) {\n currentDirection = Direction.STOP;\n } else if ((currentDirection == Direction.UP && Collections.max(destinations) < currentFloor)) {\n currentDirection = Direction.DOWN;\n Collections.sort(destinations);\n Collections.reverse(destinations);\n } else if (currentDirection == Direction.DOWN && Collections.min(destinations) > currentFloor){\n currentDirection = Direction.UP;\n Collections.sort(destinations);\n }\n\n //Decide which way to go if the elevator is stopped and has gained a destination\n if (currentDirection == Direction.STOP && destinations.size() != 0) {\n int destinationFloor = Integer.MAX_VALUE;\n for (final Integer d : destinations) {\n if (Math.abs(currentFloor - d) < Math.abs(currentFloor - destinationFloor)) {\n destinationFloor = d;\n }\n }\n\n currentDirection = (destinationFloor > currentFloor ? Direction.UP : Direction.DOWN);\n }\n\n // update current floor\n if (currentDirection == Direction.DOWN) {\n currentFloor--;\n System.out.println(\"\\t\\tElevator #\" + id + \": Moved down to floor #\" + currentFloor + \".\");\n } else if (currentDirection == Direction.UP) {\n currentFloor++;\n System.out.println(\"\\t\\tElevator #\" + id + \": Moved up to floor #\" + currentFloor + \".\");\n }\n }", "private void emptyRule(boolean[] emptyElevators, int emptyCount){\n\t\t// create a new QueueSorter which will tell us where the largest Queue of waiting passengers is\n\t\tQueueSorter qs = new QueueSorter(this.upQueues.length*2+1);\n\t\tfor( int k = 0 ; k < this.upQueues.length ; k++){\n\t\t\t// add both directions\n\t\t\tqs.add( (ElevatorQueue)this.upQueues[k]);\n\t\t\tqs.add( (ElevatorQueue)this.downQueues[k]);\n\t\t}\n\t\t\n\t\t// For each elevator in the bank\n\t\tfor (int i = 0 ; i < this.elevators.length ; i++ ){\n\t\t\t// if the elevator is empty and does not already have a targetFloor assigned\n\t\t\tif( emptyElevators[i] == true && this.elevators[i].getTargetFloor() <= 0 ){\n\t\t\t\t//get the largest Queue from our list\n\t\t\t\tElevatorQueue eq = qs.remove();\n\t\t\t\t// if this queue size is 0 then there are no waiting passengers and no elevators will be\n\t\t\t\t// assigned to move that are empty\n\t\t\t\tif( eq.size() == 0 ){\n\t\t\t\t\t// all of the remaining queues are empty\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// floor of this queue\n\t\t\t\tint floor = eq.getFloor();\n\t\t\t\tElevator.Direction d = eq.getDirectionQueue();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// this checks to see if another elevator is headed to the target floor\n\t\t\t\tboolean check = false;\n\t\t\t\t//for each elevator\n\t\t\t\tfor( int j = 0; j < this.elevators.length ; j++ ){\n\t\t\t\t\t\n\t\t\t\t\t// if another elevator is headed to this target floor, that is not the same\n\t\t\t\t\t// elevator as the one being assigned this targetFloor. Also make sure it is in the same direction\n\t\t\t\t\tif( this.elevators[j].getTargetFloor() == floor &&\n\t\t\t\t\t\t\ti != j && this.elevators[j].getTargetDirection() == d){\n\t\t\t\t\t\tcheck = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if there is another elevator, continue on\n\t\t\t\tif( check == true){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//otherwise set the targetfloor and direction\n\t\t\t\tthis.elevators[i].setTargetFloor(floor);\n\t\t\t\tthis.elevators[i].setTargetDirection(d);\n\t\t\t\t//set direction to get to floor\n\t\t\t\tif( this.elevators[i].getCurrentFloor() < floor){\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// we have no assigned this elevator to a targetFloor, remove it from out list of emtpyElevators\n\t\t\t\temptyElevators[i] = false;\n\t\t\t\t\n\t\t\t}\n\t\t\t// if we have an elevator that is Empty but is still heading toward it's targetFloor, check to see \n\t\t\t// that there are still waiting passengers at the targetFloor\n\t\t\telse if( emptyElevators[i] == true ){\n\t\t\t\tElevatorQueue temp = null;\n\t\t\t\t//check to see if anybody has picked up the passengers it was going to, find the correct Queue on\n\t\t\t\t// the correct floor\n\t\t\t\tif( this.elevators[i].getTargetDirection() == Elevator.Direction.DOWN){\n\t\t\t\t\ttemp = ( ElevatorQueue ) this.downQueues[this.elevators[i].getTargetFloor()];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp = (ElevatorQueue) this.upQueues[this.elevators[i].getTargetFloor()];\n\t\t\t\t}\n\t\t\t\t// somebody picked up the passengers, reset\n\t\t\t\tif( temp.size() == 0 ){\n\t\t\t\t\tthis.elevators[i].setTargetFloor(-1);\n\t\t\t\t\tthis.elevators[i].setTargetDirection(null);\n\t\t\t\t\t// repeat so that it will find a floor to go to\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void updateBuildingManager(){\n for(int onFloor = 0; onFloor < passengerArrivals.size(); onFloor++){\n for(int i = 0; i < passengerArrivals.get(onFloor).size(); i++){\n PassengerArrival aPassengerArrival = passengerArrivals.get(onFloor).get(i);\n if(SimClock.getTime() % aPassengerArrival.getTimePeriod() == 0){\n \n aBuildingManager.updatePassengerRequestsOnFloor(onFloor, aPassengerArrival.getNumPassengers(),\n aPassengerArrival.getDestinationFloor());\n } \n }\n }\n }", "@Override\n\tpublic void nextTurn()\n\t{\n\t\tif (isInventoryFull())\n\t\t{\n\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\"[THE INVENTORY OF \" + myWorker.getId()\n\t\t\t\t\t\t\t+ \" IS FULL AND IS GONNA UNLOAD]\");\n\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\tBuilding unloadBuilding = null;\n\t\t\tif (getMyPlayer().getStockpiles().size() > 0)\n\t\t\t{\n\t\t\t\tRandom random = new Random(100);\n\t\t\t\tint chosenStockpile = random.nextInt(getMyPlayer()\n\t\t\t\t\t\t.getStockpiles().size());\n\n\t\t\t\tunloadBuilding = getMyPlayer().getStockpiles().get(\n\t\t\t\t\t\tchosenStockpile);\n\t\t\t} else if (getMyPlayer().getMainBuildings().size() > 0)\n\t\t\t{\n\t\t\t\tunloadBuilding = getMyPlayer().getMainBuildings().get(0);\n\t\t\t}\n\n\t\t\tif (doIMoveToBuilding(unloadBuilding))\n\t\t\t{\n\t\t\t\tMoveAction move;\n\t\t\t\tPoint dest = getMoveDestination(unloadBuilding);\n\t\t\t\tif (dest != null)\n\t\t\t\t{\n\t\t\t\t\tmove = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\t\tmove.doAction();\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADDED \"\n\t\t\t\t\t\t\t\t+ myWorker.getLoadInInventory()\n\t\t\t\t\t\t\t\t+ \" TO RESOURCES]\");\n\t\t\t\tif (destBuilding instanceof Farm)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getFoodInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof StoneMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getStoneInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof GoldMine)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getGoldInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\telse if (destBuilding instanceof WoodCamp)\n\t\t\t\t\tgetMyPlayer().getPlayerInfo().getLumberInStock()\n\t\t\t\t\t\t\t.addTo(myWorker.getLoadInInventory());\n\t\t\t\tmyWorker.setOccupationType(OccupationType.IDLE);\n\t\t\t\tdestBuilding.getWorkersInside().remove(myWorker);\n\t\t\t\tmyWorker.setLoadInInventory(0);\n\t\t\t\tmyWorker.setActionController(null);\n\t\t\t}\n\t\t} else if (doIMoveToBuilding(destBuilding))\n\t\t{\n\t\t\tPoint dest = getMoveDestination(destBuilding);\n\t\t\tif (dest == null)\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"BuildController class:nextTurn(): dest is null! do something!!!!\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tMoveAction move = new MoveAction(getMyPlayer(), myWorker, dest);\n\t\t\t\tmove.doAction();\n\t\t\t}\n\t\t} else if (!isInventoryFull())\n\t\t{\n\t\t\tdestBuilding.getWorkersInside().add(myWorker);\n\t\t\tint collectResourcePerTurn = 0;\n\t\t\tif (destBuilding instanceof Farm)\n\t\t\t{\n\t\t\t\tmyWorker.setFoodCollectingExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getFood();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getFoodProductionRate()));\n\t\t\t} else if (destBuilding instanceof GoldMine)\n\t\t\t{\n\t\t\t\tmyWorker.setGoldMiningExperience(myWorker\n\t\t\t\t\t\t.getGoldMiningExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getGold();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getGoldMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getGoldProductionRate()));\n\t\t\t} else if (destBuilding instanceof StoneMine)\n\t\t\t{\n\t\t\t\tmyWorker.setStoneMiningExperience(myWorker\n\t\t\t\t\t\t.getFoodCollectingExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()].getStone();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getStoneMiningExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getStoneProductionRate()));\n\n\t\t\t} else if (destBuilding instanceof WoodCamp)\n\t\t\t{\n\t\t\t\tmyWorker.setWoodCampExperience(myWorker.getWoodCampExperience() + 0.01);\n\t\t\t\tfor (int i = 0; i < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()); i++)\n\t\t\t\t{\n\t\t\t\t\tfor (int j = 0; j < getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t\t.getBuildingSize()\n\t\t\t\t\t\t\t.get(destBuilding.getObjectType()); j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tcollectResourcePerTurn += getMyPlayer().getMyMap()\n\t\t\t\t\t\t\t\t.getMapBlocks()[i\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getX()][j\n\t\t\t\t\t\t\t\t+ destBuilding.getPosition().getY()]\n\t\t\t\t\t\t\t\t.getLumber();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcollectResourcePerTurn /= (getMyPlayer().getPlayerInfo()\n\t\t\t\t\t\t.getBuildingSize().get(destBuilding.getObjectType()) * getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getBuildingSize()\n\t\t\t\t\t\t.get(destBuilding.getObjectType()));\n\n\t\t\t\tcollectResourcePerTurn *= (int) ((1 + myWorker\n\t\t\t\t\t\t.getWoodCampExperience()) * (getMyPlayer()\n\t\t\t\t\t\t.getPlayerInfo().getWoodProductionRate()));\n\t\t\t\tgetMyPlayer().getDoneActions().add(\n\t\t\t\t\t\t\"[\" + myWorker.getId() + \" ADD \"\n\t\t\t\t\t\t\t\t+ collectResourcePerTurn\n\t\t\t\t\t\t\t\t+ \" OF RESOURCE THIS TURN]\");\n\t\t\t}\n\n\t\t\tmyWorker.setLoadInInventory(collectResourcePerTurn\n\t\t\t\t\t+ myWorker.getLoadInInventory());\n\t\t}\n\t}", "@Override\n\tpublic void step(SimState state)\n\t{\n\t\tPedSimCity stateSchedule = (PedSimCity) state;\n\t\tminutesSoFar += UserParameters.minutesPerStep;\n\n\t\tif (UserParameters.activityBased && minutesSoFar == UserParameters.endingHour) {\n\t\t\tSystem.out.println(\"End of the day - calling finish\");\n\t\t\tstateSchedule.finish();\n\t\t}\n\t\telse if ((reachedDestination || destinationNode == null) && !UserParameters.activityBased) {\n\n\t\t\tif (reachedDestination)\treachedDestination = false;\n\t\t\tif ((numTrips == ap.OD.size() && !UserParameters.empiricalABM) || (UserParameters.empiricalABM && this.numTrips == UserParameters.numTrips)) {\n\t\t\t\tstateSchedule.agentsList.remove(this);\n\t\t\t\tif (stateSchedule.agentsList.size() == 0) {\n\t\t\t\t\tSystem.out.println(\"calling finish\");\n\t\t\t\t\tstateSchedule.finish();\n\t\t\t\t}\n\t\t\t\tkillAgent.stop();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (UserParameters.empiricalABM) {\n\t\t\t\toriginNode = destinationNode = null;\n\t\t\t\twhile (originNode == null) originNode = NodesLookup.randomNode(PedSimCity.network);\n\t\t\t\twhile (destinationNode == null)\tdestinationNode = NodesLookup.randomNodeBetweenLimits(PedSimCity.network, originNode,\n\t\t\t\t\t\tUserParameters.minDistance, UserParameters.maxDistance);\n\t\t\t}\n\t\t\telse {\n\t\t\t\toriginNode = (NodeGraph) ap.OD.get(numTrips).getValue(0);\n\t\t\t\tdestinationNode = (NodeGraph) ap.OD.get(numTrips).getValue(1);\n\t\t\t}\n\t\t\tupdatePosition(originNode.getCoordinate());\n\t\t\tfindNewAStarPath(stateSchedule);\n\t\t\treturn;\n\t\t}\n\t\telse if (UserParameters.activityBased) {\n\t\t\tap.totalTimeAway += UserParameters.minutesPerStep;\n\t\t\tif (!reachedDestination & !ap.atPlace) keepWalking();\n\t\t\telse {\n\t\t\t\tActivityPlanner activityPlanner = new ActivityPlanner();\n\t\t\t\tactivityPlanner.checkRoutine(state, this);\n\t\t\t\tif (ap.atPlace) return;\n\t\t\t}\n\t\t}\n\t\telse keepWalking();\n\t}", "private void clearStragglers() {\n for (int i = 0; i < game.gridPieces.length; i++) {\n GridPiece piece = game.gridPieces[i];\n\n if (piece.state == game.STATE_TEMP) {\n piece.restoreState();\n //restoreState(piece);\n } else if (piece.state == game.STATE_TEMP_NOTOUCH) {\n piece.setState(game.STATE_FINAL);\n }\n }\n }", "private void finishBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }", "@Override\n public void run() {\n System.out.println(\"Cleaning room\");\n numJunkPiles = 0;\n }", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "void scheduleNextDestination(Passenger passenger, Floor currentFloor);", "private void emptyRule2(boolean[] emptyElevators, int emptyCount){\n\t\t//create a sorted list of all of the floors based on the number of people waiting either to go up or down\n\t\tQueueSorter qs = new QueueSorter(this.upQueues.length*2+1);\n\t\tfor(int i = 0; i < this.upQueues.length ; i++){\n\t\t\t//add both the queue of people waiting to go up and down\n\t\t\tqs.add(( ElevatorQueue )this.upQueues[i] );\n\t\t\tqs.add(( ElevatorQueue )this.downQueues[i]);\n\t\t}\n\t\t\n\t\t// for every empty elevator\n\t\tfor( int i = 0 ; i < emptyCount; i++ ){\n\t\t\t// get the fullest floor Queue\n\t\t\tElevatorQueue tempQueue = qs.remove();\n\t\t\t//floor this queue is on\n\t\t\tint floor = tempQueue.getFloor();\n\t\t\t// do nothing if there is nobody in the queue (less non empty queues than elevators), no non empty queue's left, break from for loop\n\t\t\tif( tempQueue.size() == 0){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// this checks to see if another elevator is headed to the target floor\n\t\t\tboolean check = false;\n\t\t\t//for each elevator\n\t\t\tfor( int j = 0; j < this.elevators.length ; j++ ){\n\t\t\t\t// if another elevator is headed to this target floor\n\t\t\t\tif( this.elevators[j].getTargetFloor() == floor &&\n\t\t\t\t\t this.elevators[j].getTargetDirection() == tempQueue.getDirectionQueue()){\n\t\t\t\t\tcheck = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if another elevator is already headed to this queue, continue to next biggest Queue\n\t\t\tif( check == true){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// initial values, will always be overwritten\n\t\t\tint tempIndex = -1;\n\t\t\tint tempDistance = -9999;\n\t\t\t// this will get the closest empty elevator, with no targetFloor set that is also empty\n\t\t\tfor( int j = 0 ; j < emptyElevators.length ; j++){\n\t\t\t\tif( emptyElevators[j] == true && this.elevators[j].getTargetFloor() < 0){\n\t\t\t\t\t//get the distance the elevator is from the Queue\n\t\t\t\t\t\n\t\t\t\t\tint distance = Math.abs(this.elevators[j].getCurrentFloor() - floor);\n\t\t\t\t\t// if this is the first empty Elevator checked, set it's values as the default\n\t\t\t\t\tif( tempDistance < 0 ){\n\t\t\t\t\t\ttempDistance = distance;\n\t\t\t\t\t\ttempIndex = j;\n\t\t\t\t\t}\n\t\t\t\t\t// if this elevator is closest elevator to the Queue checked so far\n\t\t\t\t\telse if( distance < tempDistance ){\n\t\t\t\t\t\t// set the new minimum distance\n\t\t\t\t\t\ttempDistance = distance;\n\t\t\t\t\t\t// index of this elevator\n\t\t\t\t\t\ttempIndex = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// If there is an elevator that is empty (should always be if it gets this far). set the target information\n\t\t\t// for this elevator to head toward the Queue\n\t\t\tif( tempIndex >= 0){\n\t\t\t\tElevator.Direction d = tempQueue.getDirectionQueue();\n\t\t\t\t//set targetfloor / target direction\n\t\t\t\tthis.elevators[tempIndex].setTargetFloor(floor);\n\t\t\t\tthis.elevators[tempIndex].setTargetDirection(d);\n\t\t\t\t\n\t\t\t\t// this elevator has been assigned to a direction/ place to go, so we don't \n\t\t\t\t// want to consider it for future Queue's\n\t\t\t\temptyElevators[tempIndex] = false;\n\t\t\t\t\n\t\t\t\t// Set the direction that the elevator needs to go in to make it to the targetFloor\n\t\t\t\tif( this.elevators[tempIndex].getCurrentFloor() < floor){\n\t\t\t\t\tthis.elevators[tempIndex].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[tempIndex].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// This is for any remaining empty elevators that were not assigned a targetFloor (i.e. if there\n\t\t// are more empty elevators than queues with passengers waiting.\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\tif( emptyElevators[i] == true){\n\t\t\t\t// half of the elevators will wait at the top and half will wait at the bottom\n\t\t\t\tif( i < this.elevators.length/2){\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.DOWN);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.elevators[i].setDirection(Elevator.Direction.UP);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void boardPassenger(int floor){\n _passengersOnboard +=1;\n switch(floor){\n case 1: Floor.FIRST.makeDestinationRequest();\n Floor.FIRST.addQueuedPassenger();\n break;\n case 2: Floor.SECOND.makeDestinationRequest();\n Floor.SECOND.addQueuedPassenger();\n break;\n case 3: Floor.THIRD.makeDestinationRequest();\n Floor.THIRD.addQueuedPassenger();\n break;\n case 4: Floor.FOURTH.makeDestinationRequest();\n Floor.FOURTH.addQueuedPassenger();\n break;\n case 5: Floor.FIFTH.makeDestinationRequest();\n Floor.FIFTH.addQueuedPassenger();\n break;\n case 6: Floor.SIXTH.makeDestinationRequest();\n Floor.SIXTH.addQueuedPassenger();\n break;\n case 7: Floor.SEVENTH.makeDestinationRequest();\n Floor.SEVENTH.addQueuedPassenger();\n break;\n }\n }", "public void resetLastRoom(){this.aLastRooms.clear();}", "private void move(boolean aller, Road[][] BoarderRoad){\n \n int q=(int)((hour*60+minute)/5)-1;//je pense que le int prend l'arrondi et pas la partie entière\n Iterator iter= this.allInhabDeparture.get(q).iterator();\n while (iter.hasNext()){\n Inhabitant curin = (Inhabitant)iter.next();\n this.onTheRoadAgain.add(curin);\n curin.testChemin(aller);\n }\n Iterator it = this.onTheRoadAgain.iterator();\n while (it.hasNext()) {\n Inhabitant curin = (Inhabitant)it.next();\n if(curin.MovingPath(boardRoad.BoardRoad)==true){\n onTheRoadAgain.remove(curin);\n }\n \n\n }\n }", "public void step() {\n\t\tcellSizes.clear();\n\t\tupsetNeighbors = new ArrayList<Neighbor>();\n\t\tavailableSpaces = new ArrayList<Cell>();\n\t\tfor (int r = 0; r < grid.getRows(); r++) {\n\t\t\tfor (int c = 0; c < grid.getColumns(); c++) {\n\t\t\t\tupdateStatus(r, c);\n\t\t\t}\n\t\t}\n\t\tupdateGrid();\n\t}", "private void clear() {\n for (int i = 0; i < NUMCELLS; i++)\n currentState[i] = 0;\n\n generations = 0;\n }", "private void cleanUpAfterMove(Unit unit){\n\t\t\t//add current location\n\t\t\tpastLocations.add(unit.location().mapLocation());\n\t\t\t//get rid of oldest to maintain recent locations\n\t\t\tif (pastLocations.size()>9)\n\t\t\t\tpastLocations.remove(0);\t\n\t}", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }", "void check(){\n if(!data.up.isEmpty()){\r\n if(data.floor == data.up.get(0)){\r\n data.up.remove(0);\r\n data.state = 0;\r\n data.statePrv = 1;\r\n data.isMoving = false;\r\n }\r\n }\r\n if(!data.down.isEmpty()){\r\n if(data.floor == data.down.get(0)){\r\n data.down.remove(0);\r\n data.state = 0;\r\n data.statePrv = -1;\r\n data.isMoving = false;\r\n }\r\n }\r\n }", "void doPlaceBuilding() {\r\n\t\tint idx = buildingTable.getSelectedRow();\r\n\t\tif (idx >= 0) {\r\n\t\t\tidx = buildingTable.convertRowIndexToModel(idx);\r\n\t\t\tTileEntry te = buildingTableModel.rows.get(idx);\r\n\t\t\tif (renderer.selectedRectangle != null && renderer.selectedRectangle.width > 0) {\r\n\t\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\t\t\r\n\t\t\t\tRectangle clearRect = new Rectangle(renderer.selectedRectangle);\r\n\t\t\t\tclearRect.width = ((clearRect.width + te.tile.width) / (te.tile.width + 1)) * (te.tile.width + 1) + 1;\r\n\t\t\t\tclearRect.height = ((clearRect.height + te.tile.height) / (te.tile.height + 1)) * (te.tile.height + 1) + 1;\r\n\t\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, clearRect, true);\r\n\t\t\t\t\r\n\t\t\t\tfor (int x = renderer.selectedRectangle.x; x < renderer.selectedRectangle.x + renderer.selectedRectangle.width; x += te.tile.width + 1) {\r\n\t\t\t\t\tfor (int y = renderer.selectedRectangle.y; y > renderer.selectedRectangle.y - renderer.selectedRectangle.height; y -= te.tile.height + 1) {\r\n\t\t\t\t\t\tBuilding bld = new Building(te.buildingType, te.surface);\r\n\t\t\t\t\t\tbld.makeFullyBuilt();\r\n\t\t\t\t\t\tbld.location = Location.of(x + 1, y - 1);\r\n\t\t\t\t\t\trenderer.surface.buildings.add(bld);\r\n\t\t\t\t\t\tplaceTile(te.tile, bld.location.x, bld.location.y, SurfaceEntityType.BUILDING, bld);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tplaceRoads(te.surface);\r\n\t\t\t\tundo.setAfter();\r\n\t\t\t\taddUndo(undo);\r\n\t\t\t\trenderer.repaint();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setAvailableFromLastMove(int small) {\r\n clearAvailable();\r\n // Make all the tiles at the destination available\r\n if (small != -1) {\r\n for (int dest = 0; dest < 9; dest++) {\r\n Tile tile = mSmallTiles[small][dest];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n // If there were none available, make all squares available\r\n if (mAvailable.isEmpty()) {\r\n setAllAvailable();\r\n }\r\n }", "void walkToQueue(LinkedList<Rider> startFloorQueue){\n riderAni.setImage(image);\r\n final int beginningQueueSize = startFloorQueue.size();\r\n TranslateTransition tt = new TranslateTransition();\r\n tt.setNode(riderAni);\r\n tt.setToX(250-Controller.queueOffsets.get(startFloor-1));\r\n tt.setDuration(Duration.seconds(4));\r\n TranslateTransition fl = new TranslateTransition();\r\n fl.setNode(floorLabel);\r\n fl.setToX(245-Controller.queueOffsets.get(startFloor-1));\r\n fl.setDuration(Duration.seconds(4));\r\n TranslateTransition tl = new TranslateTransition();\r\n tl.setNode(timerLabel);\r\n tl.setToX(245-Controller.queueOffsets.get(startFloor-1));\r\n tl.setDuration(Duration.seconds(4));\r\n ParallelTransition pt = new ParallelTransition(tt,fl,tl);\r\n pt.play();\r\n final int offset= Controller.queueOffsets.get(startFloor-1);\r\n\r\n pt.onFinishedProperty().set(new EventHandler<ActionEvent>() {\r\n public void handle(ActionEvent event) {\r\n //fires once person stops walking\r\n if (timer==null){\r\n startTimer();\r\n }\r\n riderAni.setImage(image2);\r\n if (beginningQueueSize==1 || offset==0||(! Controller.floorDirectionCalled.get(startFloor-1).equals(direction)&&!Controller.floorDirectionCalled.get(startFloor-1).equals(\"BOTH\"))){\r\n Controller.getElevator(startFloor,direction);\r\n }\r\n }\r\n });\r\n }", "@Override\n\tpublic void getCleanedUp() {\n\t\ttry {\n\t\t\t//studying\n\t\t\tThread.sleep(50 * capacity);\n\t\t\tLOGGER.info(\"Cleaning room \" + this.getRoomId());\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t}", "public void setDestinationFloor(int destinationFloor){\n this.destinationFloor=destinationFloor;\n }", "protected void resetInternalState() {\n setStepStart(null);\n setStepSize(minStep.multiply(maxStep).sqrt());\n }", "public void reset() {\n unvisitedPOIs = new LinkedList<>(instance.getPlaceOfInterests());\n unvisitedPOIs.remove(instance.getStartPOI());\n unvisitedPOIs.remove(instance.getEndPOI());\n\n // initially, all the unvisited POIs should be feasible.\n feasiblePOIs = new LinkedList<>(unvisitedPOIs);\n feasiblePOIs.remove(instance.getStartPOI());\n feasiblePOIs.remove(instance.getEndPOI());\n\n tour.reset(instance);\n currDay = 0;\n\n // update features for the feasible POIs\n for (PlaceOfInterest poi : feasiblePOIs)\n updateFeatures(poi);\n }", "public void abortBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }", "public\tvoid stop()\n\t{\t\t\t\t\t\t\t\t\t\n\t\tSystem.out.println(\"Stopping at floor: \"+currentFloor);\n\t\ttotalPassengers = totalPassengers - getTotalPassDestFloor()[currentFloor] ;\n\t\tSystem.out.println(\"Total passengers before boarding passengers waiting on the floor: \" + totalPassengers);\t\t\n\t\tF[currentFloor].unloadPassengers(this);\t\t\t\t\t\t\t\t\t\t\t\t//Calls unloadPassenges method to handle the passengers \n\t\tthis.registerRequest();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//registers request for the appropriate flooors\n\t\tSystem.out.println(this);\n\t//\tSystem.out.println();\n\t\tSystem.out.println(this.F[currentFloor]);\n\t\tSystem.out.println();\n\t}", "private void elevatorStop(int floor, Boolean unload){\n \n if(unload){\n destinedPassengers[ floor ] = 0;\n } else {\n \n while(building.floor(floor).passengersWaiting() > 0){\n try {\n boardPassenger(1);\n } catch (ElevatorFullException e) {\n break;\n }\n \n building.floor(floor).waitingPassengers--;\n }\n \n }\n }", "public void reset() {\n state = new boolean[gridSize - 1][gridSize - 1];\n /* Clear state and pellets arrays */\n for (int i = 0; i < state.length; i++) {\n for (int j = 0; j < state.length; j++) {\n state[i][j] = true;\n }\n }\n\n for (int i = 0; i < state.length; i++) {\n for (int j = 0; j < state.length; j++) {\n if (state[i][j])\n pellets[i][j] = true;\n }\n }\n\n //reset traversed\n for (int i = 0; i < traversedTiles.length; i++) {\n for (int j = 0; j < traversedTiles.length; j++) {\n traversedTiles[i][j] = false;\n }\n }\n\n// plannedPoint = new Point();\n plannedPath = new ArrayList<>();\n player.resetPlayer(200, 300);\n ghosts.get(0).resetGhost(180, 180);\n ghosts.get(1).resetGhost(200, 180);\n ghosts.get(2).resetGhost(220, 180);\n updateStateAccordingToMap();\n\n //Resetting total pellet counter\n totalPellets = 0;\n pellets[9][7] = false;\n pellets[8][8] = false;\n pellets[9][8] = false;\n pellets[10][8] = false;\n\n for (int i = 0; i < pellets.length; i++)\n for (int j = 0; j < pellets.length; j++)\n if (pellets[i][j])\n totalPellets++;\n\n System.out.println(\"Total pellets on the map: \" + totalPellets);\n }", "public void setComplete()\n\t{\n\t\texisting.set(0, pieces.length);\n\t}", "public abstract void unschedule();", "@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\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}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\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\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void clearState() {\n // if the user press the wrong cells, aka path, etc.\n // set state back to grass\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen) {\n cells.set(i, CellState.Tower);\n } else if (cells.get(i) == CellState.ToPlaceTower) {\n cells.set(i, CellState.Grass);\n }\n\n }\n }", "protected void moveToDestination(){\n\t\tqueue.clear();\n\t\twhile (destination[0] < 0){\n\t\t\tqueue.add(\"MOVE S\");\n\t\t\tdestination[0] += 1;\n\t\t}\n\t\twhile (destination[0] > 0){\n\t\t\tqueue.add(\"MOVE N\");\n\t\t\tdestination[0] -= 1;\n\t\t}\n\t\twhile (destination[1] < 0){\n\t\t\tqueue.add(\"MOVE E\");\n\t\t\tdestination[1] += 1;\n\t\t}\n\t\twhile (destination[1] > 0){\n\t\t\tqueue.add(\"MOVE W\");\n\t\t\tdestination[1] -= 1;\n\t\t}\n\t\tdestination = null;\n\t}", "public void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator through each floor. \n\t\t\tif (getTotalPassDestFloor()[currentFloor] >0 || destRequest[currentFloor] == 'Y')this.stop(); \t//Checks for the destined passengers or registered request for the current floor.\n\t\t\tif (currentDirection == \"UP\") currentFloor++; else currentFloor--;\t\t\t\t\t\t\t//Moves the elevator up/down based on the direction\n\t\t}\n\t\tif (currentFloor == 8) currentFloor--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Adjusts currentfloor value when elevator-\n\t\tif (currentFloor == 0) currentFloor++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//-is at first or top most floor\n\t}", "@Test\n @SuppressWarnings({\"unchecked\"})\n public void moveUp() {\n exQ.moveUp(JobIdFactory.newId());\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //the first shouldent be moved\n exQ.moveUp(this.ids.get(0));\n Mockito.verify(queue, Mockito.times(0)).swap( Mockito.any(PrioritizableRunnable.class),Mockito.any(PrioritizableRunnable.class));\n //otherwise move it up\n exQ.moveUp(this.ids.get(1));\n Mockito.verify(queue, Mockito.times(1)).swap(this.runnables.get(1),this.runnables.get(0));\n }", "public final void removeFloor(Floor floor) {\n/* 6509 */ int floorLevel = floor.getFloorLevel();\n/* 6510 */ if (this.floors != null) {\n/* */ \n/* 6512 */ this.floors.remove(floor);\n/* 6513 */ if (floor.isStair())\n/* 6514 */ Stairs.removeStair(hashCode(), floorLevel); \n/* 6515 */ if (this.floors.size() == 0)\n/* 6516 */ this.floors = null; \n/* */ } \n/* 6518 */ if (this.structure == null)\n/* */ return; \n/* 6520 */ if (this.watchers != null)\n/* */ {\n/* 6522 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 6526 */ vz.removeFloor(this.structure.getWurmId(), floor);\n/* */ }\n/* 6528 */ catch (Exception e) {\n/* */ \n/* 6530 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ }\n/* 6534 */ if (floorLevel > 0) {\n/* 6535 */ destroyPileItem(floorLevel);\n/* */ \n/* */ }\n/* 6538 */ else if (this.vitems != null) {\n/* */ \n/* 6540 */ Item pileItem = this.vitems.getPileItem(floorLevel);\n/* 6541 */ if (pileItem != null) {\n/* */ \n/* 6543 */ pileItem.updatePosZ(this);\n/* */ \n/* 6545 */ for (VirtualZone vz : getWatchers()) {\n/* */ \n/* */ \n/* */ try {\n/* 6549 */ if (vz.isVisible(pileItem, this))\n/* */ {\n/* 6551 */ vz.removeItem(pileItem);\n/* 6552 */ vz.addItem(pileItem, this, true);\n/* */ }\n/* */ \n/* 6555 */ } catch (Exception e) {\n/* */ \n/* 6557 */ logger.log(Level.WARNING, e.getMessage(), e);\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ \n/* */ \n/* 6564 */ if (this.vitems != null)\n/* */ {\n/* 6566 */ for (Item item : this.vitems.getAllItemsAsArray()) {\n/* */ \n/* 6568 */ if (item.isDecoration() && item.getFloorLevel() == floorLevel) {\n/* */ \n/* 6570 */ item.updatePosZ(this);\n/* 6571 */ item.updateIfGroundItem();\n/* */ } \n/* */ } \n/* */ }\n/* 6575 */ if (this.creatures != null)\n/* */ {\n/* 6577 */ for (Creature c : this.creatures) {\n/* */ \n/* 6579 */ if (c.getFloorLevel() == floorLevel)\n/* */ {\n/* 6581 */ if (!c.isPlayer()) {\n/* */ \n/* 6583 */ float oldposz = c.getPositionZ();\n/* 6584 */ float newPosz = c.calculatePosZ();\n/* 6585 */ float diffz = newPosz - oldposz;\n/* 6586 */ c.setPositionZ(newPosz);\n/* 6587 */ c.moved(0.0F, 0.0F, diffz, 0, 0);\n/* */ } \n/* */ }\n/* */ } \n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 6596 */ checkDeletion();\n/* */ }", "public void tick () {\r\n\r\n if(currentRequests.isEmpty()) return;\r\n\r\n if(!this.isPickUp() && this.getCurrentFloor() < this.getCurrentRequests().peek().getCurrentFloor()){\r\n this.currentFloor++;\r\n System.out.println(this.getId() + \" has moved up towards pickup on Floor \" + this.getCurrentRequests().peek().getCurrentFloor() + \" and is now on Floor\" + this.currentFloor);\r\n }\r\n else if(!this.isPickUp() && this.getCurrentFloor() > this.getCurrentRequests().peek().getCurrentFloor()){\r\n this.currentFloor--;\r\n System.out.println(this.getId() + \" has moved down towards pickup on Floor \" + this.getCurrentRequests().peek().getCurrentFloor() + \" and is now on Floor\" + this.currentFloor);\r\n }\r\n else if(!this.isPickUp() && this.getCurrentFloor() == this.getCurrentRequests().peek().getCurrentFloor()){\r\n this.setPickUp(true);\r\n System.out.println(this.getId() + \" has arrived at pickup location\");\r\n return;\r\n }\r\n\r\n if (this.isPickUp() && currentRequests.peek().getDestinationFloor() == this.currentFloor) {\r\n System.out.println(this.getId() + \" has reached its destination \" + this.getCurrentRequests().peek().getDestinationFloor());\r\n this.currentRequests.poll();\r\n this.pickUp = false;\r\n }\r\n else if (this.isPickUp() && this.currentRequests.peek().getDirection() == \"UP\") {\r\n this.currentFloor++;\r\n System.out.println(this.getId() + \" has moved up to Floor \" + this.currentFloor);\r\n }\r\n else if (this.isPickUp() && this.currentRequests.peek().getDirection() == \"DOWN\"){\r\n this.currentFloor--;\r\n System.out.println(this.getId() + \" has moved down to Floor \" + this.currentFloor);\r\n }\r\n\r\n }", "public void boardPassenger(int dstFloor) throws ElevatorFullException {\n \n if( floorVerfication(dstFloor)){\n //if we were to add one, would we be at or less @ capacity \n if( currentCapacity() <= ( Elevator.CAPACITY - 1 ) )\n destinedPassengers[dstFloor]++;\n else\n throw new ElevatorFullException();\n \n } else {\n System.out.println(\"WRONG FLOOR N00B\");\n }\n \n }", "@Override\n public void visit(DiningRoom s) {\n s.getCleanUp();\n }", "public void moveTo(int floor) {\n if ( floor > TOP_FLOOR || floor < BOTTOM_FLOOR)\n return;\n while (currentFloor.get() != floor) {\n if (currentFloor.get() < floor) {\n direction.lazySet(Status.UP);\n moveUpFloor();\n }\n if (currentFloor.get() > floor) {\n direction.lazySet(Status.DOWN);\n moveDownFloor();\n }\n }\n }", "public void clearPieces(){\n for(int i =0; i<WIDTH;i++){\n for(int j = 0 ; j<HEIGHT;j++){\n piecesToSwap[i][j]=null;\n }\n }\n }", "@Test\n\t\t\tpublic void testRoomExit()\n\t\t\t{\n\t\t\t\t// One step from room\n\t\t\t\tboard.calcTargets(13, 14, 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(12, 14)));\n\n\t\t\t\t// Take two steps\n\t\t\t\tboard.calcTargets(13, 14, 2);\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(11, 14)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 13)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(12, 15)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public boolean updateElevator() { \n \t//If no people are waiting, do nothing\n if (queue.isEmpty()){\n \t\treturn true;\n \t}\n \n //Update total wait time\n for (int i = 0; i < queue.size(); i++) {\n if (queue.get(i).getActionType() == ElevatorAction.PICKUP) {\n totalWaitTime = totalWaitTime.add(BigInteger.ONE);\n queue.get(i).getPassenger().tempwT += 1;\n }\n }\n \n //Update total travel time\n totalTravelTime = totalTravelTime.add(BigInteger.valueOf((long)currentPassengers.size()));\n for (int i = 0; i < currentPassengers.size(); i++) {\n currentPassengers.get(i).temptT += 1;\n }\n \n //Passengers boarding, no movement\n if (waitingTime > 0) {\n waitingTime -= 1;\n return true;\n }\n \n ElevatorQueueObject q = queue.getFirst();\n \n //If the elevator is full, fetch the next passenger who can disembark successfully\n int index = 1;\n while (currentPassengers.size() == specs.getCarryCapacity() \n && (q.getActionType() == ElevatorAction.PICKUP ||\n !currentPassengers.contains(q.getPassenger()))) {\n q = queue.get(index);\n index += 1;\n }\n \n //Fetch next destination\n int dest = 0;\n if (q.getActionType() == ElevatorAction.PICKUP) {\n dest = q.getPassenger().getOrigin();\n } else {\n dest = q.getPassenger().getDestination();\n }\n \n //Check destination is valid\n if (!containsFloor(floors, dest)) {\n return false;\n }\n \n //Update Elevator Position\n float tempFloor = currentFloor;\n float newFloor = currentFloor;\n \n if (dest > currentFloor) { //Going up\n newFloor += (specs.getCarSpeed() / distancePerFloor);\n if (dest <= newFloor) { //Reached destination\n currentFloor = dest;\n //Set waiting time for embarking/disembarking\n waitingTime = specs.getFloorDelay();\n } else {\n currentFloor = newFloor;\n }\n } else if (dest < currentFloor) { //Going down\n newFloor -= (specs.getCarSpeed() / distancePerFloor);\n if (dest >= newFloor) { //Reached destination?\n currentFloor = dest;\n //Set waiting time for embarking/disembarking\n waitingTime = specs.getFloorDelay();\n } else {\n currentFloor = newFloor;\n }\n }\n\n //Update travel distance \n totalTravelDistance = totalTravelDistance.add(\n BigDecimal.valueOf(Math.abs(tempFloor - currentFloor) * distancePerFloor)\n );\n \n //Everything okay\n return true;\n }", "public void clearQueuedPassengers(){\n this._queuedPassengers = 0;\n }", "@Override\n\tpublic void checkOutRoom() {\n\t\t\n\t}", "static public void falsifyProcessingJobs()\n {\n processingJobs = false;\n }", "public boolean prune()\n throws org.json.JSONException, java.io.IOException\n {\n TreeSet<String> to_delete =new TreeSet<String>();\n int current_block_height = server.getCurrentBlockTemplate().getInt(\"height\");\n\n synchronized(open_jobs)\n {\n if (open_jobs.size() == 0) return true;\n\n for(Map.Entry<String, JobInfo> me : open_jobs.entrySet())\n {\n JobInfo ji = me.getValue();\n if (ji.getHeight() + 1 < current_block_height)\n {\n to_delete.add(me.getKey());\n }\n } \n for(String job_id : to_delete)\n {\n open_jobs.remove(job_id);\n }\n\n }\n return false;\n\n }", "public void clearStateToPureMapState() {\n for (int i = 0; i < cells.size(); i++) {\n if (cells.get(i) == CellState.Chosen || cells.get(i) == CellState.ToPlaceTower || cells.get(i) == CellState.Tower) {\n cells.set(i, CellState.Grass);\n }\n }\n }", "public void update()\n\t{\n\t\tif(pList.size()==0)\n\t\t\treturn;\n\t\tfor(int i = 0; i < pList.size(); i++)\n\t\t{\n\t\t\tPerson p = pList.get(i);\n\t\t\tif(p.destination.floorNumber>this.floorNumber)\n\t\t\t{\n\t\t\t\tup = true;\n\t\t\t}\n\t\t\telse if(p.destination.floorNumber<this.floorNumber)\n\t\t\t{\n\t\t\t\tdown = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpList.remove(i);\n\t\t\t}\n\t\t}\n\t\tif(up)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.UPPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event,0);\n\t\t}\n\t\tif(down)\n\t\t{\n\t\t\tevent.id = ElevatorEvent.DOWNPRESSED;\n\t\t\tevent.token.attr[0]=this.floorNumber;\n\t\t\tSim.schedule(event, 0);\n\t\t}\n\t}", "@Override\n\tpublic void update() {\n\t\tswitch(status){\n\t\tcase MOVE:\n\t\t\tif(!hasReachedTarget()){\n\t\t\t\tmove(Gdx.graphics.getDeltaTime(), this.destination);\n\t\t\t\twalkingDuration += Gdx.graphics.getDeltaTime();\n\t\t\t\ttextureRegion = walkAnimation.getKeyFrame(walkingDuration, true);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\twalkingDuration = 0f;\n\t\t\t\tstatus = Status.WORKING;\n\t\t\t\tif(action == Action.HARVEST){\n\t\t\t\t\tdestination = null;\n\t\t\t\t}\n\t\t\t\tif(action == Action.HAUL){\n\t\t\t\t\t//Add the resource to the stockpile\n\t\t\t\t\tPlayer.getPlayers().get(1).addResource(hauledResource.getType());\n\t\t\t\t\t//Now remove it from the gatherer and put it into a WAIT state\n\t\t\t\t\thauledResource = null;\n\t\t\t\t\tdestination = null;\n\t\t\t\t\tstatus = Status.WAIT;\n\t\t\t\t\ttimeToWait = 0.75f;\n\t\t\t\t\taction = null;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase WORKING:\n\t\t\tif(action == Action.HARVEST){\n\t\t\t\tif(targetResource == null){\n\t\t\t\t\tstatus = Status.MOVE;\n\t\t\t\t\tdestination = findRandomSpot();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(!targetResource.harvest(Gdx.graphics.getDeltaTime())){\n\t\t\t\t\tif(MapData.getInstance().getResources().remove(targetResource)){\n\t\t\t\t\t\tthis.destination = returnToNearestStockpile(targetResource);\n\t\t\t\t\t\thauledResource = targetResource;\n\t\t\t\t\t\tstatus = Status.MOVE;\n\t\t\t\t\t\taction = Action.HAUL;\n\t\t\t\t\t} else {\n\t\t\t\t\t\taction = null;\n\t\t\t\t\t\tstatus = Status.WAIT;\n\t\t\t\t\t\ttimeToWait = 0.5f;\n\t\t\t\t\t}\n\t\t\t\t\thauledResource = targetResource;\n\t\t\t\t\ttargetResource = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase SLEEP:\n\t\t\tstatus = Status.WAIT;\n\t\t\tbreak;\n\t\tcase WAIT:\n\t\t\tif(timeToWait <= 0f){\n\t\t\t\t//Get a new action\n\t\t\t\t//Setup a priority system here, but for now just gather resources\n\t\t\t\tstatus = Status.MOVE;\n\t\t\t\taction = Action.HARVEST;\n\t\t\t\ttargetResource = findNearestResource();\n\t\t\t\tif(targetResource != null){\n\t\t\t\t\ttargetResource.assignToResource(this);\n\t\t\t\t\tthis.destination = targetResource.getCenter();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\ttimeToWait -= Gdx.graphics.getDeltaTime();\n\t\t\t\ttextureRegion = walkAnimation.getKeyFrame(0.15f);\n\t\t\t}\n\t\t\tbreak;\n\t\t//Default to Wait\n\t\tdefault:\n\t\t\tstatus = Status.WAIT;\n\t\t}\n\t}", "public void clear() {\n\t\tstate = null;\n\t}", "public void leave() throws InterruptedException {\n inship.clear();\n // your code here\n\n }", "private Board moveTo(int direction) {\n Board newBoard = new Board(this.state);\n int oZ = this.zero;\n int nZ = oZ;\n switch (direction) {\n case Board.LEFT: nZ = oZ - 1; break;\n case Board.RIGHT: nZ = oZ + 1; break;\n case Board.UP: nZ = oZ - Board.dim; break;\n case Board.DOWN: nZ = oZ + Board.dim; break;\n default: return null;\n }\n newBoard.state[oZ] = state[nZ];\n newBoard.state[nZ] = 0;\n newBoard.zero = nZ;\n\n // update heuristic iteratively except for MAN\n switch(Board.heuristic) {\n case HAM:\n if (state[nZ] == oZ) newBoard.dist = this.dist - 1;\n else if (state[nZ] == nZ) newBoard.dist = this.dist + 1;\n else newBoard.dist = this.dist;\n break;\n case INT: // iterative update the interference\n // this is the most logically complicated code I have\n // done in a while\n int moved = state[nZ];\n int oC;\n newBoard.inter = inter;\n switch (direction) {\n case Board.LEFT:\n case Board.RIGHT: // LEFT AND RIGHT\n if (Board.colOf[state[nZ]] == Board.colOf[nZ]) {\n // we've replaced a piece on its col with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old column\n //System.out.println(\"Took \" + state[nZ] + \" out of its col\");\n for (int i = Board.colOf[nZ]; i < nZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n \n } else if (Board.colOf[state[nZ]] == Board.colOf[oZ]) {\n // we've put a piece on its col that was a zero\n // interference can only increase since we know\n // the piece didn't below to its old column\n //System.out.println(\"Put \" + state[nZ] + \" into its col\");\n for (int i = Board.colOf[oZ]; i < oZ; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ + Board.dim; i < state.length; i+=Board.dim)\n if (Board.colOf[state[i]] == Board.colOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n break;\n default: // UP AND DOWN\n if (Board.rowOf[state[nZ]] == Board.rowOf[nZ]) {\n // we've replaced a piece on its row with a zero\n // interference can only decrease since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Took \" + state[nZ] + \" out of its row\");\n for (int i = Board.dim*Board.rowOf[nZ]; i < nZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] > state[nZ])\n newBoard.inter--;\n for (int i = nZ+1; i < Board.dim*(Board.rowOf[nZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[nZ] &&\n state[i] < state[nZ])\n newBoard.inter--;\n } else if (Board.rowOf[state[nZ]] == Board.rowOf[oZ]) {\n // we've put a piece on its row that was a zero\n // interference can only increase since we know\n // the piece didn't belong to its old row\n //System.out.println(\"Put \" + state[nZ] + \" into its row\");\n for (int i = Board.dim*Board.rowOf[oZ]; i < oZ; i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] > state[nZ])\n newBoard.inter++;\n for (int i = oZ+1; i < Board.dim*(Board.rowOf[oZ]+1); i++)\n if (Board.rowOf[state[i]] == Board.rowOf[oZ] &&\n state[i] < state[nZ])\n newBoard.inter++;\n }\n } \n default: // update the manhattan distance\n newBoard.dist = this.dist - \n Board.manhattanTable[state[nZ]][nZ] +\n Board.manhattanTable[state[nZ]][oZ];\n }\n return newBoard;\n }", "public void clearBalls();", "private void reset() {\r\n\t\t\tref.set(new CountDownLatch(parties));\r\n\t\t}", "void clear() {\n this.mapped_vms.clear();\n this.mapped_anti_coloc_job_ids.clear();\n this.used_cpu = BigInteger.ZERO;\n this.used_mem = BigInteger.ZERO;\n }", "public void done(Customer c){\n String output_done = String.format(\"%.3f\", c.getLeavingTime())+\" \"+c.getID()+\" done\";\n System.out.println(output_done);\n\n scheduler.arrivals.removeFirst();\n cc = null;\n\n //System.out.println(\"the first customer now should be nc, and will become cc \"+nc.getID()==scheduler.arrivals.get(0).getID());\n //System.out.println(scheduler.arrivals.size());//sth wrong here\n\n //run();\n\n }", "@Override\n\t\tpublic void run() {\n\t\t\tshowProgress(false, null);\n\t\t\tboolean canRoute = false;\n\t\t\tfor (FloorInfo floorInfo : floorList) {\n\t\t\t\tArrayList<LocatorGeocodeResult> shelfList = floorInfo\n\t\t\t\t\t\t.getShelfList();\n\t\t\t\tif (shelfList.size() > 0) {\n\t\t\t\t\tStopGraphic points[] = new StopGraphic[shelfList.size()];\n\t\t\t\t\tint index = 1;\n\t\t\t\t\tfor (LocatorGeocodeResult result : shelfList) {\n\t\t\t\t\t\tString address = result.getAddress();\n\t\t\t\t\t\tif (index >= shelfList.size()\n\t\t\t\t\t\t\t\t&& !address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tPoint p = (Point) GeometryEngine.project(\n\t\t\t\t\t\t\t\tresult.getLocation(), wm, egs);\n\t\t\t\t\t\tif (address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tpoints[0] = new StopGraphic(p);\n\n\t\t\t\t\t\t\tSystem.out.println(\"起始点x:\" + p.getX() + \" y:\"\n\t\t\t\t\t\t\t\t\t+ p.getY());\n\n\t\t\t\t\t\t} else if (floorInfo.getEndPoint() != null\n\t\t\t\t\t\t\t\t&& address.equals(floorInfo.getEndPoint())) {\n\t\t\t\t\t\t\tpoints[shelfList.size() - 1] = new StopGraphic(p);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpoints[index++] = new StopGraphic(p);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif (points[0] != null && points.length >= 2) {\n\t\t\t\t\t\tcanRoute = true;\n\t\t\t\t\t\trouteCount++;\n\t\t\t\t\t}\n\t\t\t\t\tfloorInfo.setPoints(points);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclearAll();\n\t\t\tif (!canRoute) {\n\t\t\t\tToast.makeText(MapActivity.this, \"没有找到足够的点,无法导航\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t} else {\n\t\t\t\tQueryDirections();\n\t\t\t}\n\t\t}", "void queueShrunk();", "private void doCleanupJob\n\t\t(long now,\n\t\t JobInfo jobinfo)\n\t\tthrows IOException\n\t\t{\n\t\t// Stop lease timers.\n\t\tjobinfo.renewTimer.stop();\n\t\tjobinfo.expireTimer.stop();\n\t\tjobinfo.jobTimer.stop();\n\n\t\t// Stop communication with job frontend.\n\t\tjobinfo.frontend.close();\n\n\t\t// Remove job from queues.\n\t\tmyFrontendToJobMap.remove (jobinfo.frontend);\n\t\tmyRunningJobList.remove (jobinfo);\n\t\tmyWaitingJobList.remove (jobinfo);\n\n\t\t// Make each of the job's nodes idle (but not failed nodes).\n\t\tfor (int i = 0; i < jobinfo.count; ++ i)\n\t\t\t{\n\t\t\tBackendInfo backendinfo = jobinfo.backend[i];\n\t\t\tif (backendinfo.state != BackendInfo.State.FAILED)\n\t\t\t\t{\n\t\t\t\tbackendinfo.state = BackendInfo.State.IDLE;\n\t\t\t\tbackendinfo.stateTime = now;\n\t\t\t\tbackendinfo.job = null;\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Update total compute time.\n\t\tmyTotalComputeTime += (now - jobinfo.stateTime);\n\n\t\t// Assign idle nodes to waiting jobs.\n\t\tassignResourcesToJobs (now);\n\t\t}", "@Test\n public void clear_should_stop_solver_and_publish_empty_solution() throws ExecutionException, InterruptedException {\n TspSolution solution = createSolution(location1, location2, location3);\n when(bestSolutionChangedEvent.isEveryProblemFactChangeProcessed()).thenReturn(true);\n when(bestSolutionChangedEvent.getNewBestSolution()).thenReturn(solution);\n routeOptimizer.addLocation(location1, distanceMatrix);\n routeOptimizer.addLocation(location2, distanceMatrix);\n routeOptimizer.addLocation(location3, distanceMatrix);\n routeOptimizer.bestSolutionChanged(bestSolutionChangedEvent);\n clearInvocations(eventPublisher);\n\n routeOptimizer.clear();\n\n assertThat(solver.isSolving()).isFalse();\n verify(solver).terminateEarly();\n verify(solverFuture).get();\n\n verify(eventPublisher).publishEvent(routeChangedEventArgumentCaptor.capture());\n RouteChangedEvent event = routeChangedEventArgumentCaptor.getValue();\n assertThat(event.getRoute()).isEmpty();\n }", "void Ending(long t) //to be called after each second, decrements\r\n {\n boolean check = false;\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n //move deadlines of migrating tasks\r\n Job temp = servers[i].migratingPool.front;\r\n\r\n while (temp != null) {\r\n temp.deadline--;\r\n temp = temp.next;\r\n\r\n }\r\n //fixed tasks\r\n temp = servers[i].pool.front;\r\n while (temp != null) {\r\n temp.deadline--;\r\n temp = temp.next;\r\n\r\n }\r\n\r\n if (servers[i].checkDeadlineEDFOS(t) == true) { //if something empties\r\n check = true; //call event later\r\n }\r\n\r\n }//end of server num looop\r\n\r\n if (check == true) {\r\n event(t);\r\n }\r\n\r\n }", "private void clearNumRunningFgJobs() {\n this.bitField0_ &= -9;\n this.numRunningFgJobs_ = 0;\n }", "public void endOfRoundUpdates() {\n roundsHistory.push(new RoundHistory(gameDescriptor,++roundNumber));\n loadPlayersIntoQueueOfTurns();\n //activateEventsHandler();\n }", "void completeJob();", "private void clearButtonUp(Floor floor)\r\n\t{\r\n\t\t\tdirectionButtonPanels[floor.getNumber()][1]=LiftButton.NOT_ACTIVE;\r\n\t}", "@Test\r\n\tpublic void testRoomExit()\r\n\t{\r\n\t\t// Take one step, essentially just the adj list\r\n\t\tboard.calcTargets(8, 2, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\t// Ensure doesn't exit through the wall\r\n\t\tassertEquals(1, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\t// Take two steps\r\n\t\tboard.calcTargets(8, 2, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 1)));\r\n\t}", "@Override\r\n public void clear() {\r\n this.roomMap.clear();\r\n this.buildingMap.clear();\r\n this.roomResponsibleOrgMap.clear();\r\n }", "void unsetRoadTerrain();", "private void handleStepChange()\n {\n boolean processorsChanged = false;\n myProcessorsLock.writeLock().lock();\n try\n {\n final Iterator<Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>>> procIter = myGeometryProcessorsMap\n .entrySet().iterator();\n final ActiveTimeSpans activeTimeSpans = myActiveTimeSpans;\n while (procIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>> entry = procIter.next();\n if (!inProcessRange(entry.getKey(), activeTimeSpans))\n {\n processorsChanged = true;\n procIter.remove();\n myInactiveGeometries.put(entry.getKey(), New.set(entry.getValue().getGeometries()));\n entry.getValue().close();\n }\n }\n\n final Iterator<Entry<ProcessorDistributionKey, Set<Geometry>>> inactiveIter = myInactiveGeometries.entrySet()\n .iterator();\n while (inactiveIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, Set<Geometry>> entry = inactiveIter.next();\n if (inProcessRange(entry.getKey(), activeTimeSpans) && !entry.getValue().isEmpty())\n {\n processorsChanged = true;\n inactiveIter.remove();\n setProcessorConstraints(entry.getKey());\n final GeometryProcessor<? extends Geometry> processor = myProcessorBuilder\n .createProcessorForClass(entry.getKey().getGeometryType());\n processor.receiveObjects(this, entry.getValue(), Collections.<Geometry>emptyList());\n myGeometryProcessorsMap.put(entry.getKey(), processor);\n }\n }\n }\n finally\n {\n myProcessorsLock.writeLock().unlock();\n }\n\n if (processorsChanged)\n {\n populateRenderableProcessors();\n }\n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "private void clearButton(Floor floor)\r\n\t{\r\n\t\t\tbuttonPanel[floor.getNumber()]=LiftButton.NOT_ACTIVE;\r\n\t}", "public Builder clearJobs() {\n if (jobsBuilder_ == null) {\n jobs_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n } else {\n jobsBuilder_.clear();\n }\n return this;\n }", "@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}", "public void clearUpLanes () {\r\n\t\tupLanes = null;\r\n\t}", "void endBuild(Reachable reachable);", "public void trimBarrier(){\n game.setBarrierNumOfParties(game.getPlayersConnected());\n }", "public void ejectTicket(){if(this.inProgress()){this.currentTicket=null;}}", "void doCut(boolean surface, boolean building) {\r\n\t\tdoCopy(surface, building);\r\n\t\tif (surface && building) {\r\n\t\t\tdoDeleteBoth();\r\n\t\t} else\r\n\t\tif (surface) {\r\n\t\t\tdoDeleteSurface();\r\n\t\t} else\r\n\t\tif (building) {\r\n\t\t\tdoDeleteBuilding();\r\n\t\t}\r\n\t}", "public void blank() {\r\n\t\trunning = false;// sets the simulation to stopped\r\n\t\tfor (int i = 0; i < TOTAL_TILES; i++)// loops through all tiles\r\n\t\t\tnodes[i] = new Node(new Point(i / WIDTH_TILES * SIZE_TILES, i % HEIGHT_TILES * SIZE_TILES), new ImageIcon(\"empty.png\").getImage(), false, \"empty\");// sets empty tile\r\n\t}", "public void moveStopped()\n {\n for (GraphElement element : elements) {\n if(element instanceof Moveable) {\n Moveable moveable = (Moveable) element;\n moveable.setPositionToGhost();\n }\n } \n }", "public static void clearBoard(){\n for(int i = 0; i < Board.X_UPPER_BOUND * Board.Y_UPPER_BOUND ; i++){\n Board.board[i] = null;\n }\n white_player.setpieceList(null);\n black_player.setpieceList(null);\n }", "@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 }", "private void completeGameBoard() {\n for (int i = 0; i < row; i++) {\n for (int j = 0; j < column; j++) {\n if (game[i][j].equals(open)) {\n int replaceOpen = getNearbyMines(i, j); //calls to get nearby mines\n game[i][j] = String.valueOf(replaceOpen);\n }\n }\n }\n }", "private void clearAlive() {\n \n alive_ = false;\n }", "void cronTrimActivityQueue();", "public boolean updateState(Landscape scape) {\n\t\tboolean[] emptyElevators = new boolean[this.elevators.length];\n\t\tint emptyCount = 0;\n\t\t\n\t\t\n\t\t\t\t\n\t\t// this finds out which elevators are in which state and what direction they are traveling in so that\n\t\t// we can only act on ones that are in similar situations\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\t// empty and has no target floor\n\t\t\tif( this.elevators[i].isEmpty() ){\n\t\t\t\temptyElevators[i] = true;\n\t\t\t\temptyCount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\temptyElevators[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( ElevatorBank.strategy == ElevatorBank.STRATEGY.GROUP_3){\n\t\t\temptyRule2(emptyElevators, emptyCount);\n\t\t}\n\t\telse{\n\t\t\temptyRule(emptyElevators, emptyCount);\n\t\t}\n\t\t// never dies\n\t\treturn true;\n\t}", "public void makeComplete() { \n\t\tthis.size = 0;\n\t\tint index = 1;\n\t\tfor(int i=1; i<this.heap.length; i++) {\n\t\t\tif(this.heap[i] != -1) {\n\t\t\t\tint temp = this.heap[index];\n\t\t\t\tthis.heap[index] = this.heap[i];\n\t\t\t\tthis.heap[i] = temp;\n\t\t\t\tindex++;\n\t\t\t\tthis.size++;\n\t\t\t}\n\t\t}\n\t\tthis.heap[0] = this.size;\n\t}", "public void transferJobsTo(SchedulingAlgorithm otherAlg) \n {\n \totherAlg.addJob(activeJob);\n \tfor(Process p : processes)\n \t\totherAlg.addJob(p);\n \tprocesses.clear();\n \tactiveJob = null;\n }", "public void resetOccupied(){\n \t\toccupiedSeconds = 0;\n \t}" ]
[ "0.7150282", "0.65549415", "0.6110852", "0.6066906", "0.5981561", "0.5821933", "0.5773137", "0.56733924", "0.56209165", "0.5588835", "0.55795795", "0.5546901", "0.55310893", "0.5525696", "0.5504211", "0.5497049", "0.5459142", "0.5436914", "0.5424762", "0.5420277", "0.540756", "0.54004294", "0.5375202", "0.5353688", "0.5337207", "0.5335186", "0.5333487", "0.5332391", "0.53073096", "0.5306775", "0.53035665", "0.52835447", "0.5281408", "0.52780634", "0.52416235", "0.5203719", "0.5190465", "0.51892656", "0.518572", "0.5170235", "0.5170011", "0.5169991", "0.5167837", "0.51622003", "0.5153954", "0.51538193", "0.51487744", "0.51436216", "0.5137908", "0.51351315", "0.5122809", "0.5117695", "0.51074576", "0.5102659", "0.5100463", "0.50585985", "0.50523233", "0.50516886", "0.5049883", "0.50075626", "0.50017816", "0.5001443", "0.49937576", "0.49924737", "0.49909294", "0.49789536", "0.49719864", "0.4970508", "0.49662223", "0.49641445", "0.49639726", "0.4963499", "0.49570608", "0.49506974", "0.49497324", "0.4947167", "0.49467897", "0.49425256", "0.49351043", "0.49341893", "0.49323493", "0.49319723", "0.49271894", "0.49241284", "0.49230775", "0.49167114", "0.4912788", "0.491275", "0.49126038", "0.49108234", "0.49073505", "0.49038786", "0.4902", "0.48954248", "0.48932293", "0.4893221", "0.48898935", "0.48874292", "0.4885234", "0.4884841" ]
0.5407003
21
Created by hdfs on 2018/5/15.
public interface UserService { public User getUserInfoByUsername(String username) throws Exception; public User getUserInfoFromSession(HttpSession session) throws Exception; /** * 用户注册逻辑 * * @param user */ // public Response merge(User user); /** * 用户获取逻辑 * * @param id * @return */ public Response getUserById(String id); /** * 获取用户列表 * * @yhxm 用户姓名 * @dlzh 登录账号 * @bhxj 包含下级(1 是;2 否;) * @jgbh 机构编号 */ public Response selectNextLev(String yhxm, String dlzh, String bhxj, String jgbh, int pageindex, int pagesize); /** * 删除 * * @param user_id * @throws Exception */ public Response delete(String user_id, String tempId); public Response getRolesByBmbh(String bmbh); public Response getSysUserRoles(String type); public Response getSysUserRolesByID(String roleId); /** * 重置密码 * * @param user_id */ public Response ResetPasswd(int user_id); /** * 功能描述:根据用户名获取用户权限列表 * 作者:齐遥遥 * 时间:2017-10-17 * * @param loginname * @return */ public Response getUserRoles(String loginname); /** * 功能描述:根据用户名获取用户菜单列表 * 作者:齐遥遥 * 时间:2017-10-17 * * @param loginname * @return */ public Response getUserMenus(String loginname); /** * 功能描述:根据用户名获取用户信息 * 作者:齐遥遥 * 时间:2017-10-18 * * @param loginname * @return */ public Response getUserByLoginname(String loginname); public Response updatePassword(String loginname, String password, String newPassword); public String getUserInfo(String user_id); //修改用户密码 boolean updatePwd(Map map)throws Exception; //用户个人中心信息显示补充查询 Map getUserInfor(String loginname,String bmbh)throws Exception; Response addUser(SysUser user); Response update(SysUser user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before\n public void conn() throws Exception {\n conf = new Configuration();\n fs = FileSystem.get(URI.create(\"hdfs://hadoop001:9000\"), conf, \"hadoop\");\n\n //fs = FileSystem.get(conf);\n }", "void init() throws Exception\n\t {\n\t\t \n\t\t \n\t\t this.hdfsdir = new Path(job.config.hdfsdatadirpath);\n\t\t if(this.job.genlocalfile())\n\t\t {\n\t\t\t datafile = new File(localdir,taskInfo.filename);\n\t\t\t if(datafile.exists())\n\t\t\t\t datafile.delete();\n\t\t\t datafile.createNewFile();\n\t\t\t writer\n\t\t\t = new PrintWriter(new BufferedWriter(new FileWriter(datafile)));\n\t\t\t\n\t\t }\n\t\t else\n\t\t {\n\t\t\t hdfsdatafile = new Path(job.getHdfsdatadirpath(),taskInfo.filename);\n\t\t\t out=job.getFileSystem().create(hdfsdatafile);\n\t\t\t \n\t\t\t writer\n\t\t\t = new PrintWriter(new BufferedWriter(new OutputStreamWriter(out,\"UTF-8\")));\n\t\t\t \n\t\t }\n\t\t\n\t\t \n\t }", "@Override\n\t\tprotected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\tConfiguration conf=context.getConfiguration() ;\n\t\t\tPath p=new Path(conf.get(\"HDFS\"));\n\t\t\tFileSystem fs = p.getFileSystem ( conf) ;\n\t\t//\tSequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(\"hdfs://localhost:9000/home/novas/clusterpointoutput/part-r-00000\"), context.getConfiguration());\n\t\t\t SequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(conf.get(\"cluster\")),conf);\n\t\t\t while(reader.next(seqkey, seqvalue))\n\t\t {\n\t\t\t // System.out.println(seqvalue.toString());\n\t\t\t clist.add(seqvalue.toString());\n\t\t }\n\t\t}", "@BeforeClass\n public static void createOriginalFSImage() throws IOException {\n MiniDFSCluster cluster = null;\n try {\n Configuration conf = new Configuration();\n conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);\n conf.setBoolean(DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, true);\n\n File[] nnDirs = MiniDFSCluster.getNameNodeDirectory(\n MiniDFSCluster.getBaseDirectory(), 0, 0);\n tempDir = nnDirs[0];\n\n cluster = new MiniDFSCluster.Builder(conf).build();\n cluster.waitActive();\n DistributedFileSystem hdfs = cluster.getFileSystem();\n\n Path dir = new Path(\"/dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, ALLSSD_STORAGE_POLICY_NAME);\n\n Path file = new Path(\"/dir_wo_sp/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n file = new Path(\"/dir_wo_sp/file_w_sp_allssd\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n hdfs.setStoragePolicy(file, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n }\n\n dir = new Path(\"/dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n file = new Path(\"/dir_w_sp_allssd/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_w_sp_hot\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.HOT_STORAGE_POLICY_NAME);\n\n // Write results to the fsimage file\n hdfs.setSafeMode(SafeModeAction.ENTER, false);\n hdfs.saveNamespace();\n\n // Determine the location of the fsimage file\n originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil\n .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));\n if (originalFsimage == null) {\n throw new RuntimeException(\"Didn't generate or can't find fsimage\");\n }\n LOG.debug(\"original FS image file is \" + originalFsimage);\n } finally {\n if (cluster != null) {\n cluster.shutdown();\n }\n }\n }", "protected HadoopUtils() { }", "protected MetadataUGWD() {/* intentionally empty block */}", "public static void main(String[] args) throws IOException,MasterNotRunningException, ZooKeeperConnectionException, URISyntaxException{\nString file1= args[0].substring(2, args[0].length()); \nString file2= args[1].substring(2, args[1].length()); \nint Kjion = Integer.parseInt(args[2].substring(6, 7)); \nint jionK = Integer.parseInt(args[2].substring(9, 10));\nString ostr = args[3].substring(4, args[3].length()); \nString astr[] = ostr.split(\",\");\n\nint osum=astr.length;\nint rsum = 0;\nint ssum = 0;\nint [] rnum = new int[20];\nint [] snum = new int[20];\n\nfor(int i=0; i<astr.length ; i++ )\n{\nif((astr[i].substring(0,1)).equals(\"R\")){\nrnum[rsum]=Integer.parseInt(astr[i].substring(1,astr[i].length()));\nrsum++;\n}\n}\nfor(int j=0; j<astr.length ; j++ )\n{\nif((astr[j].substring(0,1)).equals(\"S\")){\nsnum[ssum]=Integer.parseInt(astr[j].substring(1,astr[j].length()));\nssum++;\n}\n}\n//data to buffer\nConfiguration conf = new Configuration();\nFileSystem fs = FileSystem.get(URI.create(file1), conf);\nFSDataInputStream in_stream = fs.open(new Path(file1));\nBufferedReader in = new BufferedReader(new InputStreamReader(in_stream));\n\nConfiguration conf3 = new Configuration();\nFileSystem fs3 = FileSystem.get(URI.create(file1), conf3);\nFSDataInputStream in_stream3 = fs3.open(new Path(file1));\nBufferedReader in3 = new BufferedReader(new InputStreamReader(in_stream3));\n\nConfiguration conf2 = new Configuration();\nFileSystem fs2 = FileSystem.get(URI.create(file2), conf2);\nFSDataInputStream in_stream2 = fs2.open(new Path(file2));\nBufferedReader in2 = new BufferedReader(new InputStreamReader(in_stream2));\n\n\n/*start put file1 data to hashtable ht\n@s all data of file1 \n@s2 all data of file2\n@aline make sure zhe clom sums \n*/\n\nString s;\nString s2; \nString aline[]=in3.readLine().split(\"\\\\|\");\nHashtable ht = new Hashtable();\nString linkstr=\"\";\nString oldstr=\"\";\nwhile ((s=in.readLine())!=null) {\n\t\n\taline=s.split(\"\\\\|\");\n\toldstr=\"\";\n\tlinkstr=\"\";\n\t\n\t if(ht.containsKey(aline[Kjion]))\n\t{\n\t\toldstr = ht.get(aline[Kjion]).toString();\n\t\n\t}\n\n\tfor(int k=0; k<rsum; k++)\n\t{\n\n\t\tif(linkstr==\"\")\n\t\t{linkstr=aline[rnum[k]];}\n\t\telse\n\t\t{linkstr=linkstr+\"&\"+aline[rnum[k]];}\n\t}\n\n\tif(oldstr!=\"\"){\n\tlinkstr = oldstr+\"|\"+linkstr;}\n\t\n\t\n\tht.put(aline[Kjion],linkstr);\n\n}\n// start write\n\n Logger.getRootLogger().setLevel(Level.WARN);\n\n // create table descriptor\n String tableName= \"result\";\n HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(tableName));\n\n // create column descriptor\n HColumnDescriptor cf = new HColumnDescriptor(\"res\");\n htd.addFamily(cf);\n\n // configure HBase\n Configuration configuration = HBaseConfiguration.create();\n HBaseAdmin hAdmin = new HBaseAdmin(configuration);\n\n if (hAdmin.tableExists(tableName)) {\n System.out.println(\"Table already exists\");\n\thAdmin.disableTable(tableName);\n\thAdmin.deleteTable(tableName);\n\tSystem.out.println(\"The old Table has delete!\");\n }\n \n hAdmin.createTable(htd);\n System.out.println(\"table \"+tableName+ \" created successfully\");\n \n hAdmin.close();\n\nHTable table = new HTable(configuration,tableName);\n\n/*start join ht join s2\n@splitstr every one in R\n@flaght the is or not same of R\n@aline make sure zhe clom sums the max same is 1000\n@htsum the same num of all\n*/\n\n\nString pri;\nString []splitstr = new String[1000];\nHashtable flaght = new Hashtable();\nint htsum = 0;\nString flagstr=\"\";\n\nwhile ((s2=in2.readLine())!=null) {\naline=s2.split(\"\\\\|\");\nif(ht.containsKey(aline[jionK]))\n{\n\t\n\n\tsplitstr=(ht.get(aline[jionK])).toString().split(\"\\\\|\");\n\nfor(int l=0 ; l<splitstr.length ; l++ ){\n\n\tif(flaght.containsKey(aline[jionK]))\n\t{\n\thtsum = Integer.parseInt(flaght.get(aline[jionK]).toString());\n\t}\n\telse\n\t{\n\thtsum = 0;\n\t}\n\n\tif(htsum==0)\n\t{flagstr=\"\";}\n\telse\n\t{flagstr=\".\"+Integer.toString(htsum);}\n\t\n\tfor(int y=0;y<rsum;y++)\n\t{\n\t\tPut put = new Put(aline[jionK].getBytes());\n \t\tput.add(\"res\".getBytes(),(\"R\"+Integer.toString(rnum[y])+flagstr).getBytes(),splitstr[l].split(\"&\")[y].getBytes());\n \t\ttable.put(put);}\n\n\tfor(int z=0;z<ssum;z++){\n\n\t\tPut put2 = new Put(aline[jionK].getBytes());\n\t\tput2.add(\"res\".getBytes(),(\"S\"+Integer.toString(snum[z])+flagstr).getBytes(),aline[z].getBytes());\n \t\ttable.put(put2);}\n\thtsum = htsum+1;\n\tflaght.put(aline[jionK],Integer.toString(htsum));\n\t\n}\t\t\n \t\t\n\n\n\n}\n\n\n}\n\ntable.close();\nSystem.out.println(\"put successfully\");\nin.close();\nfs.close();\n\n}", "phaseI.Hdfs.DataNodeLocation getLocation();", "@Override\n\tprotected void setup(org.apache.hadoop.mapreduce.Mapper.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tConfiguration conf=context.getConfiguration() ;\n\n\t\tPath p=new Path(conf.get(\"HDFS\"));\n\n\t//\tPath p=new Path(Constants.HADOOP_PATH);\n\t\t FileSystem fs = p.getFileSystem ( conf) ;\n\t//\tSequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(\"hdfs://localhost:9000/home/novas/clusterpointoutput/part-r-00000\"), context.getConfiguration());\n\t\t SequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(conf.get(\"cluster\")),conf);\n\t//\tSystem.out.println(\"in setup\");\n\t\t//FileSystem fs=FileSystem.get(context.getConfiguration());\n\t\t// Path p=new Path(\"hdfs://localhost:9000\");\n\t\t// FileSystem fs = p.getFileSystem ( context.getConfiguration() ) ;\n\t//\tSequenceFile.Reader reader=new SequenceFile.Reader(fs, new Path(\"hdfs://localhost:9000/home/novas/clusterpointoutput/part-r-00000\"), context.getConfiguration());\n\t while(reader.next(seqkey, seqvalue))\n\t {\n\t//\t System.out.println(seqvalue.toString());\n\t\t clist.add(seqvalue.toString());\n\t }\n\t}", "private GraphFileManager() {\n\t}", "private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}", "private stendhal() {\n\t}", "@Override\n public int describeContents() { return 0; }", "public interface Iface extends alluxio.thrift.AlluxioService.Iface {\n\n /**\n * Checks the consistency of the files and directores with the path as the root of the subtree\n * \n * @param path the root of the subtree to check\n * \n * @param options the method options\n */\n public CheckConsistencyTResponse checkConsistency(String path, CheckConsistencyTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Marks a file as completed.\n * \n * @param path the path of the file\n * \n * @param options the method options\n */\n public CompleteFileTResponse completeFile(String path, CompleteFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Creates a directory.\n * \n * @param path the path of the directory\n * \n * @param options the method options\n */\n public CreateDirectoryTResponse createDirectory(String path, CreateDirectoryTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Creates a file.\n * \n * @param path the path of the file\n * \n * @param options the options for creating the file\n */\n public CreateFileTResponse createFile(String path, CreateFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Frees the given file or directory from Alluxio.\n * \n * @param path the path of the file or directory\n * \n * @param recursive whether to free recursively\n * \n * @param options the options for freeing a path\n */\n public FreeTResponse free(String path, boolean recursive, FreeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Returns a map from each Alluxio path to information of corresponding mount point\n */\n public GetMountTableTResponse getMountTable() throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Generates a new block id for the given file.\n * \n * @param path the path of the file\n * \n * @param options the method options\n */\n public GetNewBlockIdForFileTResponse getNewBlockIdForFile(String path, GetNewBlockIdForFileTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Returns the status of the file or directory.\n * \n * @param path the path of the file or directory\n * \n * @param options the method options\n */\n public GetStatusTResponse getStatus(String path, GetStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * If the path points to a file, the method returns a singleton with its file information.\n * If the path points to a directory, the method returns a list with file information for the\n * directory contents.\n * \n * @param path the path of the file or directory\n * \n * @param options listStatus options\n */\n public ListStatusTResponse listStatus(String path, ListStatusTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Loads metadata for the object identified by the given Alluxio path from UFS into Alluxio.\n * \n * THIS METHOD IS DEPRECATED SINCE VERSION 1.1 AND WILL BE REMOVED IN VERSION 2.0.\n * \n * @param ufsPath the path of the under file system\n * \n * @param recursive whether to load metadata recursively\n * \n * @param options the method options\n */\n public LoadMetadataTResponse loadMetadata(String ufsPath, boolean recursive, LoadMetadataTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Creates a new \"mount point\", mounts the given UFS path in the Alluxio namespace at the given\n * path. The path should not exist and should not be nested under any existing mount point.\n * \n * @param alluxioPath the path of alluxio mount point\n * \n * @param ufsPath the path of the under file system\n * \n * @param options the options for creating the mount point\n */\n public MountTResponse mount(String alluxioPath, String ufsPath, MountTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Deletes a file or a directory and returns whether the remove operation succeeded.\n * NOTE: Unfortunately, the method cannot be called \"delete\" as that is a reserved Thrift keyword.\n * \n * @param path the path of the file or directory\n * \n * @param recursive whether to remove recursively\n * \n * @param options the options for deleting the file\n */\n public DeleteTResponse remove(String path, boolean recursive, DeleteTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Renames a file or a directory.\n * \n * @param path the source path of the file or directory\n * \n * @param dstPath the desination path of the file\n * \n * @param options the method options\n */\n public RenameTResponse rename(String path, String dstPath, RenameTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Schedules async persistence.\n * \n * @param path the path of the file\n * \n * @param options the method options\n */\n public ScheduleAsyncPersistenceTResponse scheduleAsyncPersistence(String path, ScheduleAsyncPersistenceTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Sets ACL for the path.\n * \n * @param path the path of the file or directory\n * \n * @param action the set action to perform\n * \n * @param entries the list of ACL entries\n * \n * @param options the method options\n */\n public SetAclTResponse setAcl(String path, TSetAclAction action, List<TAclEntry> entries, SetAclTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Sets file or directory attributes.\n * \n * @param path the path of the file or directory\n * \n * @param options the method options\n */\n public SetAttributeTResponse setAttribute(String path, SetAttributeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Deletes an existing \"mount point\", voiding the Alluxio namespace at the given path. The path\n * should correspond to an existing mount point. Any files in its subtree that are backed by UFS\n * will be persisted before they are removed from the Alluxio namespace.\n * \n * @param alluxioPath the path of the alluxio mount point\n * \n * @param options the method options\n */\n public UnmountTResponse unmount(String alluxioPath, UnmountTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n /**\n * Updates the ufs mode for a ufs path under one or more mount points.\n * \n * @param ufsPath the ufs path\n * \n * @param options the method options\n */\n public UpdateUfsModeTResponse updateUfsMode(String ufsPath, UpdateUfsModeTOptions options) throws alluxio.thrift.AlluxioTException, org.apache.thrift.TException;\n\n }", "public static void main(String[] args) throws IllegalArgumentException, IOException, ClassNotFoundException, InterruptedException {\n Configuration conf=new Configuration();\n FileSystem hdfs=FileSystem.get(conf);\n System.out.println(conf.get(\"fs.defaultFS\"));\n //conf.set(\"fs.defaultFS\",\"http//:localhost:9000\");\n Job job=new Job(conf,\"word cout\");\n job.setJarByClass(MyWordCount.class);\n job.setMapperClass(MyMapper.class);\n job.setReducerClass(MyReduce.class);\n job.setCombinerClass(MyReduce.class);\n job.setOutputKeyClass(Text.class);\n job.setOutputValueClass(IntWritable.class);\n// job.setInputFormatClass(TextInputFormat.class);\n// job.setOutputFormatClass(TextOutputFormat.class);\n FileInputFormat.addInputPath(job, new Path(\"file:///usr/local/hadoop-2.6.1/input\"));\n FileOutputFormat.setOutputPath(job, new Path(\"hdfs:///user/output\"));\n System.exit(job.waitForCompletion(true) ? 0 : 1);\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private FileUtil() {\n \t\tsuper();\n \t}", "public static void main(String args[])throws Exception{ \n //首先定义两个临时文件夹,这里可以使用随机函数+文件名,这样重名的几率就很小。 \n String dstFile = \"temp_src\"; \n String srcFile = \"temp_dst\"; \n \n Configuration conf = new Configuration(); \n \n System.out.println(\"fs:\" + conf.get(\"fs.default.name\"));\n // must!!! config the fs.default.name be the same to the value in core-site.xml \n \n// conf.set(\"fs.default.name\",\"hdfs://hadoop1-node1:9000\"); \n// \n// conf.set(\"mapred.job.tracker\",\"hadoop1-node1:9001\"); \n \n conf.set(\"mapred.jar\", \"E:/work_space_trade/howbuy-hadoop_20150209/target/test-classes/wordcount.jar\");\n \n// conf.set(\"hadoop.native.lib\", \"false\");\n \n /* //这里生成文件操作对象。 \n HDFS_File file = new HDFS_File(); \n \n \n //从本地上传文件到HDFS,可以是文件也可以是目录 \n file.PutFile(conf, args[0], dstFile); \n \n System.out.println(\"up ok\"); */\n \n \n \n Job job = new Job(conf, \"mywordcount1\"); \n job.setJarByClass(Mywordcount.class); \n \n job.setInputFormatClass(TextInputFormat.class); \n \n job.setOutputKeyClass(Text.class); \n job.setOutputValueClass(IntWritable.class); \n \n job.setMapperClass(WordcountMapper.class); \n job.setReducerClass(WordcountReducer.class); \n job.setCombinerClass(WordcountReducer.class); \n //注意这里的输入输出都应该是在HDFS下的文件或目录 \n FileInputFormat.setInputPaths(job, new Path(\"/wordcount\")); \n FileOutputFormat.setOutputPath(job, new Path(\"/wordoutput\"));\n //开始运行 \n job.waitForCompletion(true); \n \n /*//从HDFS取回文件保存至本地 \n file.GetFile(conf, srcFile, args[1]); \n System.out.println(\"down the result ok!\"); \n //删除临时文件或目录 \n file.DelFile(conf, dstFile, true); \n file.DelFile(conf, srcFile, true); */\n \n System.out.println(\"delete file on hdfs ok!\"); \n }", "@Test(enabled = false)\n public void testCreateExternalTable() throws Exception {\n String tableName = tableName();\n String colName = columnName();\n String pFile = createTestDFSPath(\"parentPath\");\n String query = String.format(\"create EXTERNAL table %s.%s(%s, %s) location '%s'\", DEFAULT_DB , tableName , colName + \" int\", \"name string\", pFile);\n\n runCommand(query);\n\n String tblId = assertTableIsRegistered(DEFAULT_DB, tableName, null, true);\n AtlasEntity tblEnity = atlasClientV2.getEntityByGuid(tblId).getEntity();\n List ddlList = (List) tblEnity.getRelationshipAttribute(ATTRIBUTE_DDL_QUERIES);\n\n assertNotNull(ddlList);\n assertEquals(ddlList.size(), 1);\n\n String processId = assertEntityIsRegistered(HiveDataTypes.HIVE_PROCESS.getName(), ATTRIBUTE_QUALIFIED_NAME, getTableProcessQualifiedName(DEFAULT_DB, tableName), null);\n\n AtlasEntity processsEntity = atlasClientV2.getEntityByGuid(processId).getEntity();\n\n assertEquals(processsEntity.getAttribute(\"userName\"), UserGroupInformation.getCurrentUser().getShortUserName());\n\n verifyTimestamps(processsEntity, \"startTime\");\n verifyTimestamps(processsEntity, \"endTime\");\n\n validateHDFSPaths(processsEntity, INPUTS, pFile);\n }", "@Override\n public void write() {\n\n }", "@Override\n\tpublic void pathGenerated() {\n\n\t}", "public static void main(String[] args) throws RemoteException, UnknownHostException, IOException\n {\n BufferedReader in = null;\n in = new BufferedReader(new FileReader(NN_ConfigFile));\n String line = null;\n ArrayList<String> config = new ArrayList<String>();\n while((line = in.readLine()) != null){\n config.add(line);\n }\n in.close();\n String name = config.get(0).split(\":\")[1];\n String ip = config.get(1).split(\":\")[1];\n int port = Integer.parseInt(config.get(2).split(\":\")[1]);\n //Intitalize the Client\n Client Me = new Client();\n Me.heartbeat = Integer.parseInt(config.get(5).split(\":\")[1]);\n Me.block_size = Integer.parseInt(config.get(6).split(\":\")[1]);\n Me.NNStub = Me.GetNNStub(name,ip,port);\n System.out.println(\"Welcome to HDFS!!\");\n Scanner Scan = new Scanner(System.in);\n while(true)\n {\n //Scanner, prompt and then call the functions according to the command\n System.out.print(\"$> \"); //Prompt\n String Command = Scan.nextLine();\n String[] Split_Commands = Command.split(\" \");\n\n if(Split_Commands[0].equals(\"help\"))\n {\n System.out.println(\"The following are the Supported Commands\");\n System.out.println(\"1. put filename ## To put a file in HDFS\");\n System.out.println(\"2. get filename ## To get a file in HDFS\"); System.out.println(\"2. list ## To get the list of files in HDFS\");\n }\n else if(Split_Commands[0].equals(\"put\")) // put Filename\n {\n //Put file into HDFS\n String Filename;\n try{\n Filename = Split_Commands[1];\n Me.PutFile(Filename);\n }catch(ArrayIndexOutOfBoundsException e){\n System.out.println(\"Please type 'help' for instructions\");\n continue;\n }\n }\n else if(Split_Commands[0].equals(\"get\"))\n {\n //Get file from HDFS\n String Filename;\n try{\n Filename = Split_Commands[1];\n Me.GetFile(Filename);\n }catch(ArrayIndexOutOfBoundsException e){\n System.out.println(\"Please type 'help' for instructions\");\n continue;\n }\n }\n else if(Split_Commands[0].equals(\"list\"))\n {\n System.out.println(\"List request\");\n //Get list of files in HDFS\n Me.List();\n }\n else\n {\n System.out.println(\"Please type 'help' for instructions\");\n }\n }\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(86);\n byte[] byteArray0 = new byte[7];\n byteArray0[0] = (byte)0;\n byteArray0[1] = (byte)92;\n byteArray0[2] = (byte) (-45);\n byteArray0[3] = (byte)104;\n byteArray0[4] = (byte)1;\n byteArray0[5] = (byte) (-61);\n byteArray0[6] = (byte)10;\n FileSystemHandling.appendDataToFile((EvoSuiteFile) null, byteArray0);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"\");\n FileSystemHandling fileSystemHandling0 = new FileSystemHandling();\n FileSystemHandling.setPermissions((EvoSuiteFile) null, false, false, false);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n FileSystemHandling.shouldThrowIOException((EvoSuiteFile) null);\n FileSystemHandling fileSystemHandling1 = new FileSystemHandling();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!HTs6aEnCQFlcEbI\");\n simpleNode0.setIdentifier(\"\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"*gt\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"!HTs6aEnCQFlcEbI\");\n StringWriter stringWriter0 = new StringWriter();\n simpleNode0.dump(\"imort\", stringWriter0);\n assertEquals(\"<ForUpdate>\\n</ForUpdate>\\n\", stringWriter0.toString());\n \n String string0 = simpleNode0.toString();\n assertEquals(\"ForUpdate : \", string0);\n }", "public Ms2Cluster() { super(); }", "zzang mo29839S() throws RemoteException;", "protected void reset() {\n\n /**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n this.operationsApplied = null;\n\n /**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\");\n you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n this.errorMessage = null;\n\n /**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\");\n you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n this.hashedVersionAfterApplication = null;\n }", "protected FileSystem() {\n\t}", "private ControlloFile() {\n\t}", "@Test\n public void testRelinquishRole()\n throws IOException, InterruptedException, CloneNotSupportedException {\n LightWeightNameNode hdfs1 =\n new LightWeightNameNode(new HdfsLeDescriptorFactory(),\n DFS_LEADER_CHECK_INTERVAL_IN_MS, DFS_LEADER_MISSED_HB_THRESHOLD,\n TIME_PERIOD_INCREMENT, HTTP_ADDRESS, RPC_ADDRESS);\n nnList.add(hdfs1);\n LightWeightNameNode hdfs2 =\n new LightWeightNameNode(new HdfsLeDescriptorFactory(),\n DFS_LEADER_CHECK_INTERVAL_IN_MS, DFS_LEADER_MISSED_HB_THRESHOLD,\n TIME_PERIOD_INCREMENT, HTTP_ADDRESS, RPC_ADDRESS);\n nnList.add(hdfs2);\n\n hdfs1.getLeaderElectionInstance().waitActive();\n hdfs2.getLeaderElectionInstance().waitActive();\n long hdfs1Id = hdfs1.getLeCurrentId();\n long hdfs2Id = hdfs2.getLeCurrentId();\n assertTrue(\"Leader Check Failed \", hdfs1.isLeader() == true);\n assertTrue(\"Leader Check Failed \", hdfs2.isLeader() == false);\n\n\n // relinquish role\n hdfs1.getLeaderElectionInstance().relinquishCurrentIdInNextRound();\n assertTrue(\"Leader Check Failed \", hdfs1.isLeader() == false);\n Thread.sleep(\n DFS_LEADER_CHECK_INTERVAL_IN_MS * (DFS_LEADER_MISSED_HB_THRESHOLD + 1));\n long hdfs1IdNew = hdfs1.getLeCurrentId();\n long hdfs2IdNew = hdfs2.getLeCurrentId();\n assertTrue(\"Leader Check Failed \", hdfs1.isLeader() == false);\n assertTrue(\"Leader Check Failed \", hdfs2.isLeader() == true);\n\n assertTrue(\"ID Check Failed \", hdfs1Id != hdfs1IdNew);\n assertTrue(\"ID Check Failed \", hdfs2Id == hdfs2IdNew);\n\n\n }", "@Override\n @Before\n public void setUp() throws IOException {\n }", "@Override\n\t\t\t\t\t\t\tpublic void onIOException(IOException e, Object state) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "@Override\n public void perish() {\n \n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\r\n\tpublic void write() {\n\t\t\r\n\t}", "protected void createHMetisOutFilePath() {\n\t\tString file = \"\";\n\t\tfile += \"TEMP_GRAPH_FILE.hgr.part.\";\n\t\tfile += this.getPartitioner().getPartition().getNumBlock();\n\t\tthis.setHMetisOutFile(file);\t\n\t}", "@Override\n public void startUpOperations() {\n }", "zzafe mo29840Y() throws RemoteException;", "@Override\n public int getSize() throws Exception {\n return 0;\n }", "public static void main(String[] args) throws Exception {\n\t\t\r\n\t\tSparkConf conf = new SparkConf().setAppName(\"HERS\");\r\n\t\t conf.set(\"org.apache.spark.serializer.KryoSerializer\",\r\n\t\t \"spark_serializer\");\r\n\t\tSparkContext sc = new SparkContext(conf);\r\n\t\tSQLContext sqlContext = new org.apache.spark.sql.SQLContext(sc);\r\n\t\t\r\n\t\t\r\n\t\tString sourcePath_calCERT = Property.getProperty(\"resultPath_calCERT\");\r\n\t\tString sourcePath_cheers = Property.getProperty(\"resultPath_cheers\");\r\n\t\tString resultFilePath = Property.getProperty(\"result_Path_Purposed\");\r\n\t\tString temp_folder = Property.getProperty(\"temp_folder_Purposed\");\r\n\t\t\r\n\t\t/*\r\n\t\tString sourcePath_calCERT = \"C:\\\\CEC_Documents\\\\HERS\\\\Curated\\\\calCERT\\\\Clean\\\\curated_calCERT.csv\";\r\n\t\tString sourcePath_cheers = \"C:\\\\CEC_Documents\\\\HERS\\\\Curated\\\\cheers\\\\Clean\\\\curated_cheers.csv\";\r\n\t\tString resultFilePath = \"C:\\\\CEC_Documents\\\\HERS\\\\Purpose\\\\Purpose.csv\";\r\n\t\tString temp_folder = \"C:\\\\CEC_Documents\\\\HERS\\\\Purpose\\\\temp\";\r\n\t\t*/\r\n\t\t//String[] columnSequence = {\"Registration_Number\",\"EnforcementAgency\",\"City\",\"ZipCode\",\"InstallerCompany\",\"RaterCompany\",\"AuthorCompany\",\"A07\",\"F05\",\"F06\",\"G02\",\"G03\",\"Condenser_Desired_Temperature\",\"Evaporator_Desired_Temperature\",\"Data_Source\"};\r\n\t\t\r\n\t\tDataFrame df_calCERT = Resources.createDF(sourcePath_calCERT, \"\\t\", sqlContext);\r\n\t\tDataFrame df_cheers = Resources.createDF(sourcePath_cheers, \"\\t\", sqlContext).select(\"Registration_Number\",\"EnforcementAgency\",\"City\",\"ZipCode\",\"InstallerCompany\",\"RaterCompany\",\"AuthorCompany\",\"A07\",\"F05\",\"F06\",\"G02\",\"G03\",\"Condenser_Desired_Temperature\",\"Evaporator_Desired_Temperature\",\"Data_Source\");\r\n\t\t\r\n\t\tDataFrame purposedDF = df_calCERT.unionAll(df_cheers);\r\n\t\t//purposedDF.show();\r\n\t\tFileSystem fs = FileSystem.get(sc.hadoopConfiguration());\r\n\t\t fs.delete(new Path(temp_folder), true);\r\n\t\t purposedDF.repartition(1).write().format(\"com.databricks.spark.csv\").option(\"delimiter\", \"\\t\")\r\n\t\t\t\t\t.option(\"header\", \"true\").save(temp_folder);\r\n\t\t fs.rename(new Path(temp_folder+\"/part-00000\"),\r\n\t\t\t\t\tnew Path(resultFilePath));\r\n\t\t fs.delete(new Path(temp_folder), true);\r\n\r\n\t}", "@Override\n public FSDataOutputStream create(Path f) throws IOException {\n return super.create(f);\n }", "@Override public int describeContents() { return 0; }", "private Singletion3() {}", "private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Model \r\n\tprivate static String getDefaultName() {\r\n\t\treturn \"new_fileSystem\";\r\n\t}", "@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }", "public HadoopEXIFMapper(){}", "zzana mo29855eb() throws RemoteException;", "private void init() {\n\n\t}", "@Override\n public int describeContents()\n {\n return 0;\n }", "public void create() {\n\t\t\n\t}", "@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}", "public void map(LongWritable key, Text value, Context context)\n\t\t\tthrows InterruptedException, IOException {\n\t\tString line = value.toString();\n\n\t\tHashMap<String, String> fields = parseXml.getXmlTags(line);\n \n String fileName = ((FileSplit) context.getInputSplit()).getPath().getName();\n String shortName = fileName.substring(fileName.length()-7, fileName.length()-4);\n \n\t\thKey.set(shortName.getBytes());\n\n\t\tSet set = fields.entrySet();\n\t \n\t Iterator i = set.iterator();\n\t \n\t while(i.hasNext()) {\n\t Map.Entry me = (Map.Entry)i.next();\n\t \n\t\t if (me.getKey().equals(\"0\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JAN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"1\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_FEB.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"2\")) {\n\t\t \tkv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t \tif (me.getKey().equals(\"3\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_APR.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"4\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_MAY.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"5\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUN.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"6\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_JUL.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\n\t\t if (me.getKey().equals(\"7\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_AUG.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"8\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_SEP.getColumnName(), \n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"9\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_OCT.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"10\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_NOV.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n\t\t }\n\t\t if (me.getKey().equals(\"11\")) {\n\t\t\t kv = new KeyValue(hKey.get(), COL_FAMILY,\n\t\t\t\t\t HColumnEnum.COL_DEC.getColumnName(),\n\t\t\t\t\t me.getValue().toString().getBytes());\n\t\t\t context.write(hKey, kv);\n }\n\t }\n\t}", "private void getStatus() {\n\t\t\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n SimpleNode simpleNode0 = new SimpleNode(73);\n FileSystemHandling.appendLineToFile((EvoSuiteFile) null, \"{\");\n Node node0 = simpleNode0.parent;\n simpleNode0.setIdentifier(\"{\");\n StringWriter stringWriter0 = new StringWriter(73);\n simpleNode0.dump(\"{nt@W\\bYpd9U=VG\", stringWriter0);\n simpleNode0.setIdentifier(\"NameList\");\n simpleNode0.setIdentifier(\"^eRGLNy;\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"C\");\n StringReader stringReader0 = new StringReader(\"zp@:cn>UP\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n FileSystemHandling.shouldAllThrowIOExceptions();\n simpleNode0.setIdentifier(\"NameList\");\n SimpleNode simpleNode1 = new SimpleNode(68);\n Node[] nodeArray0 = new Node[0];\n simpleNode1.children = nodeArray0;\n Node[] nodeArray1 = new Node[1];\n nodeArray1[0] = null;\n simpleNode1.children = nodeArray1;\n simpleNode1.toString(\"LT\\\"PgE')tE0cI%&Dl\");\n simpleNode0.setIdentifier(\"AllocationExpression\");\n simpleNode1.dump(\"NameList\", stringWriter0);\n simpleNode0.toString();\n simpleNode0.toString(\">=\");\n simpleNode0.dump(\"<SkoVR *\", stringWriter0);\n assertEquals(\"<Block>\\n</Block>\\n<AllocationExpression></AllocationExpression>\\n<Block>\\n <identifier>NameList</identifier>\\n <identifier>^eRGLNy;</identifier>\\n <identifier>C</identifier>\\n <identifier>AllocationExpression</identifier>\\n <identifier>NameList</identifier>\\n <identifier>AllocationExpression</identifier>\\n</Block>\\n\", stringWriter0.toString());\n }", "public NameNode namenodes() {\n\t\tString uri = SystemConfig.getProperty(\"hive.cube.hdfs.web\");\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tNameNode nn = new NameNode();\n\t\ttry {\n\t\t\tURL url = new URL(uri + HDFS.NAMENODE_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject obj = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONArray array = JSON.parseArray(obj.getString(\"beans\"));\n\t\t\tJSONObject tmp = (JSONObject) array.get(0);\n\t\t\tnn.setCapacity(tmp.getLong(\"Total\"));\n\t\t\tnn.setClusterStartTime(CalendarUtils.formatLocale(tmp.getString(\"NNStarted\")));\n\t\t\tnn.setDeadNodes(JSON.parseObject(tmp.getString(\"DeadNodes\")).size());\n\t\t\tnn.setDecomNodes(JSON.parseObject(tmp.getString(\"DecomNodes\")).size());\n\t\t\tnn.setDfsRemaining(tmp.getLong(\"Free\"));\n\t\t\tnn.setDfsUsed(tmp.getLong(\"Used\"));\n\t\t\tnn.setLiveNodes(JSON.parseObject(tmp.getString(\"LiveNodes\")).size());\n\t\t\tnn.setNonDFSUsed(tmp.getLong(\"NonDfsUsedSpace\"));\n\t\t\tnn.setVersion(tmp.getString(\"SoftwareVersion\"));\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Get hadoop namenode data has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn nn;\n\t}", "@Override\n\tpublic void create() {\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 create(String path) throws IOException {\n Path destionationPath = new Path(path);\n\n if (hdfs.exists(destionationPath)) {\n hdfs.delete(destionationPath, true);\n }\n hdfs.createNewFile(destionationPath);\n }", "@Override\n public void construct() throws IOException {\n \n }", "@BeforeClass\n public static void beforeClass() throws Exception {\n\n catalogManager = catalogManagerExternalResource.getCatalogManager();\n fileMetadataReader = FileMetadataReader.get(catalogManager);\n catalogFileUtils = new FileUtils(catalogManager);\n\n User user = catalogManager.getUserManager().create(userId, \"User\", \"[email protected]\", \"user\", \"ACME\", null, Account.AccountType.FULL, null).first();\n\n sessionId = catalogManager.getUserManager().login(userId, \"user\").getToken();\n projectId = catalogManager.getProjectManager().create(\"p1\", \"p1\", \"Project 1\", \"Homo sapiens\",\n null, \"GRCh38\", new QueryOptions(), sessionId).first().getId();\n Study study = catalogManager.getStudyManager().create(projectId, \"s1\", null, \"s1\", \"Study \" + \"1\", null, null,\n null, null, null, sessionId).first();\n studyId = study.getFqn();\n studyUid = study.getUid();\n outputId = catalogManager.getFileManager().createFolder(studyId, Paths.get(\"data\", \"index\").toString(),\n true, null, QueryOptions.empty(), sessionId).first().getUid();\n// files.add(create(\"1000g_batches/1-500.filtered.10k.chr22.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz\"));\n// files.add(create(\"1000g_batches/501-1000.filtered.10k.chr22.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz\", true));\n// files.add(create(\"1000g_batches/1001-1500.filtered.10k.chr22.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz\"));\n// files.add(create(\"1000g_batches/1501-2000.filtered.10k.chr22.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz\", true));\n// files.add(create(\"1000g_batches/2001-2504.filtered.10k.chr22.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz\"));\n String cohortName = \"ALL\";\n Cohort cohort = catalogManager.getCohortManager().create(studyId, new CohortCreateParams().setId(cohortName), null, null, null,\n sessionId).first();\n cohortId = cohort.getId();\n cohortUid = cohort.getUid();\n files.add(create(\"platinum/1K.end.platinum-genomes-vcf-NA12877_S1.genome.vcf.gz\"));\n files.add(create(\"platinum/1K.end.platinum-genomes-vcf-NA12878_S1.genome.vcf.gz\", true));\n files.add(create(\"platinum/1K.end.platinum-genomes-vcf-NA12879_S1.genome.vcf.gz\"));\n files.add(create(\"platinum/1K.end.platinum-genomes-vcf-NA12880_S1.genome.vcf.gz\", true));\n files.add(create(\"platinum/1K.end.platinum-genomes-vcf-NA12881_S1.genome.vcf.gz\"));\n catalogManager.getCohortManager().setStatus(study.getFqn(), cohortName, \"READY\", \"\", sessionId);\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }" ]
[ "0.5731808", "0.55970687", "0.5409533", "0.53391784", "0.5332061", "0.52475023", "0.5198961", "0.51779944", "0.516192", "0.5149559", "0.51043177", "0.50920457", "0.5071111", "0.50578415", "0.5054181", "0.5003988", "0.5003299", "0.49902937", "0.4986788", "0.49762437", "0.4973252", "0.4967059", "0.49599507", "0.49394077", "0.49366474", "0.49348605", "0.49323028", "0.49231747", "0.492074", "0.49087107", "0.4904017", "0.4894033", "0.48876587", "0.48846978", "0.48805088", "0.4875732", "0.4870171", "0.48698395", "0.4866468", "0.4864855", "0.48481154", "0.4839024", "0.48375162", "0.48280874", "0.48224032", "0.48011267", "0.48011267", "0.47989255", "0.47988987", "0.47918117", "0.47896552", "0.47861326", "0.4776251", "0.47762078", "0.47689342", "0.4767967", "0.47658053", "0.47652218", "0.4764744", "0.47571594", "0.47562492", "0.4752364", "0.4752364", "0.4752364", "0.4752364", "0.4752364", "0.4752364", "0.47501168", "0.47501168", "0.47409934", "0.47403964", "0.47396684", "0.47302824", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437", "0.47280437" ]
0.0
-1
Interface for accessing AmazonConfig asynchronously. Each asynchronous method will return a Java Future object, and users are also allowed to provide a callback handler. AWS Config AWS Config provides a way to keep track of the configurations of all the AWS resources associated with your AWS account. You can use AWS Config to get the current and historical configurations of each AWS resource and also to get information about the relationship between the resources. An AWS resource can be an Amazon Compute Cloud (Amazon EC2) instance, an Elastic Block Store (EBS) volume, an Elastic network Interface (ENI), or a security group. For a complete list of resources currently supported by AWS Config, see . You can access and manage AWS Config through the AWS Management Console, the AWS Command Line Interface (AWS CLI), the AWS Config API, or the AWS SDKs for AWS Config This reference guide contains documentation for the AWS Config API and the AWS CLI commands that you can use to manage AWS Config. The AWS Config API uses the Signature Version 4 protocol for signing requests. For more information about how to sign a request with this protocol, see . For detailed information about AWS Config features and their associated actions or commands, as well as how to work with AWS Management Console, see in the AWS Config Developer Guide .
public interface AmazonConfigAsync extends AmazonConfig { /** * <p> * Returns the current status of the specified delivery channel. If a * delivery channel is not specified, this action returns the current * status of all delivery channels associated with the account. * </p> * <p> * <b>NOTE:</b>Currently, you can specify only one delivery channel per * account. * </p> * * @param describeDeliveryChannelStatusRequest Container for the * necessary parameters to execute the DescribeDeliveryChannelStatus * operation on AmazonConfig. * * @return A Java Future object containing the response from the * DescribeDeliveryChannelStatus service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns the current status of the specified delivery channel. If a * delivery channel is not specified, this action returns the current * status of all delivery channels associated with the account. * </p> * <p> * <b>NOTE:</b>Currently, you can specify only one delivery channel per * account. * </p> * * @param describeDeliveryChannelStatusRequest Container for the * necessary parameters to execute the DescribeDeliveryChannelStatus * operation on AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * DescribeDeliveryChannelStatus service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest, AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns the name of one or more specified configuration recorders. * If the recorder name is not specified, this action returns the names * of all the configuration recorders associated with the account. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one configuration * recorder per account. * </p> * * @param describeConfigurationRecordersRequest Container for the * necessary parameters to execute the DescribeConfigurationRecorders * operation on AmazonConfig. * * @return A Java Future object containing the response from the * DescribeConfigurationRecorders service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns the name of one or more specified configuration recorders. * If the recorder name is not specified, this action returns the names * of all the configuration recorders associated with the account. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one configuration * recorder per account. * </p> * * @param describeConfigurationRecordersRequest Container for the * necessary parameters to execute the DescribeConfigurationRecorders * operation on AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * DescribeConfigurationRecorders service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest, AsyncHandler<DescribeConfigurationRecordersRequest, DescribeConfigurationRecordersResult> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Starts recording configurations of all the resources associated with * the account. * </p> * <p> * You must have created at least one delivery channel to successfully * start the configuration recorder. * </p> * * @param startConfigurationRecorderRequest Container for the necessary * parameters to execute the StartConfigurationRecorder operation on * AmazonConfig. * * @return A Java Future object containing the response from the * StartConfigurationRecorder service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Starts recording configurations of all the resources associated with * the account. * </p> * <p> * You must have created at least one delivery channel to successfully * start the configuration recorder. * </p> * * @param startConfigurationRecorderRequest Container for the necessary * parameters to execute the StartConfigurationRecorder operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * StartConfigurationRecorder service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest, AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Creates a new delivery channel object to deliver the configuration * information to an Amazon S3 bucket, and to an Amazon SNS topic. * </p> * <p> * You can use this action to change the Amazon S3 bucket or an Amazon * SNS topic of the existing delivery channel. To change the Amazon S3 * bucket or an Amazon SNS topic, call this action and specify the * changed values for the S3 bucket and the SNS topic. If you specify a * different value for either the S3 bucket or the SNS topic, this action * will keep the existing value for the parameter that is not changed. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one delivery channel per * account. * </p> * * @param putDeliveryChannelRequest Container for the necessary * parameters to execute the PutDeliveryChannel operation on * AmazonConfig. * * @return A Java Future object containing the response from the * PutDeliveryChannel service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Creates a new delivery channel object to deliver the configuration * information to an Amazon S3 bucket, and to an Amazon SNS topic. * </p> * <p> * You can use this action to change the Amazon S3 bucket or an Amazon * SNS topic of the existing delivery channel. To change the Amazon S3 * bucket or an Amazon SNS topic, call this action and specify the * changed values for the S3 bucket and the SNS topic. If you specify a * different value for either the S3 bucket or the SNS topic, this action * will keep the existing value for the parameter that is not changed. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one delivery channel per * account. * </p> * * @param putDeliveryChannelRequest Container for the necessary * parameters to execute the PutDeliveryChannel operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * PutDeliveryChannel service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest, AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Deletes the specified delivery channel. * </p> * <p> * The delivery channel cannot be deleted if it is the only delivery * channel and the configuration recorder is still running. To delete the * delivery channel, stop the running configuration recorder using the * StopConfigurationRecorder action. * </p> * * @param deleteDeliveryChannelRequest Container for the necessary * parameters to execute the DeleteDeliveryChannel operation on * AmazonConfig. * * @return A Java Future object containing the response from the * DeleteDeliveryChannel service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Deletes the specified delivery channel. * </p> * <p> * The delivery channel cannot be deleted if it is the only delivery * channel and the configuration recorder is still running. To delete the * delivery channel, stop the running configuration recorder using the * StopConfigurationRecorder action. * </p> * * @param deleteDeliveryChannelRequest Container for the necessary * parameters to execute the DeleteDeliveryChannel operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * DeleteDeliveryChannel service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest, AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Stops recording configurations of all the resources associated with * the account. * </p> * * @param stopConfigurationRecorderRequest Container for the necessary * parameters to execute the StopConfigurationRecorder operation on * AmazonConfig. * * @return A Java Future object containing the response from the * StopConfigurationRecorder service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Stops recording configurations of all the resources associated with * the account. * </p> * * @param stopConfigurationRecorderRequest Container for the necessary * parameters to execute the StopConfigurationRecorder operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * StopConfigurationRecorder service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest, AsyncHandler<StopConfigurationRecorderRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Schedules delivery of a configuration snapshot to the Amazon S3 * bucket in the specified delivery channel. After the delivery has * started, AWS Config sends following notifications using an Amazon SNS * topic that you have specified. * </p> * * <ul> * <li>Notification of starting the delivery.</li> * <li>Notification of delivery completed, if the delivery was * successfully completed.</li> * <li>Notification of delivery failure, if the delivery failed to * complete.</li> * * </ul> * * @param deliverConfigSnapshotRequest Container for the necessary * parameters to execute the DeliverConfigSnapshot operation on * AmazonConfig. * * @return A Java Future object containing the response from the * DeliverConfigSnapshot service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Schedules delivery of a configuration snapshot to the Amazon S3 * bucket in the specified delivery channel. After the delivery has * started, AWS Config sends following notifications using an Amazon SNS * topic that you have specified. * </p> * * <ul> * <li>Notification of starting the delivery.</li> * <li>Notification of delivery completed, if the delivery was * successfully completed.</li> * <li>Notification of delivery failure, if the delivery failed to * complete.</li> * * </ul> * * @param deliverConfigSnapshotRequest Container for the necessary * parameters to execute the DeliverConfigSnapshot operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * DeliverConfigSnapshot service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest, AsyncHandler<DeliverConfigSnapshotRequest, DeliverConfigSnapshotResult> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Creates a new configuration recorder to record the resource * configurations. * </p> * <p> * You can use this action to change the role ( <code>roleARN</code> ) * of an existing recorder. To change the role, call the action on the * existing configuration recorder and specify a role. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one configuration * recorder per account. * </p> * * @param putConfigurationRecorderRequest Container for the necessary * parameters to execute the PutConfigurationRecorder operation on * AmazonConfig. * * @return A Java Future object containing the response from the * PutConfigurationRecorder service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Creates a new configuration recorder to record the resource * configurations. * </p> * <p> * You can use this action to change the role ( <code>roleARN</code> ) * of an existing recorder. To change the role, call the action on the * existing configuration recorder and specify a role. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one configuration * recorder per account. * </p> * * @param putConfigurationRecorderRequest Container for the necessary * parameters to execute the PutConfigurationRecorder operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * PutConfigurationRecorder service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest, AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns a list of configuration items for the specified resource. The * list contains details about each state of the resource during the * specified time interval. You can specify a <code>limit</code> on the * number of results returned on the page. If a limit is specified, a * <code>nextToken</code> is returned as part of the result that you can * use to continue this request. * </p> * <p> * <b>NOTE:</b> Each call to the API is limited to span a duration of * seven days. It is likely that the number of records returned is * smaller than the specified limit. In such cases, you can make another * call, using the nextToken . * </p> * * @param getResourceConfigHistoryRequest Container for the necessary * parameters to execute the GetResourceConfigHistory operation on * AmazonConfig. * * @return A Java Future object containing the response from the * GetResourceConfigHistory service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns a list of configuration items for the specified resource. The * list contains details about each state of the resource during the * specified time interval. You can specify a <code>limit</code> on the * number of results returned on the page. If a limit is specified, a * <code>nextToken</code> is returned as part of the result that you can * use to continue this request. * </p> * <p> * <b>NOTE:</b> Each call to the API is limited to span a duration of * seven days. It is likely that the number of records returned is * smaller than the specified limit. In such cases, you can make another * call, using the nextToken . * </p> * * @param getResourceConfigHistoryRequest Container for the necessary * parameters to execute the GetResourceConfigHistory operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * GetResourceConfigHistory service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest, AsyncHandler<GetResourceConfigHistoryRequest, GetResourceConfigHistoryResult> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns details about the specified delivery channel. If a delivery * channel is not specified, this action returns the details of all * delivery channels associated with the account. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one delivery channel per * account. * </p> * * @param describeDeliveryChannelsRequest Container for the necessary * parameters to execute the DescribeDeliveryChannels operation on * AmazonConfig. * * @return A Java Future object containing the response from the * DescribeDeliveryChannels service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns details about the specified delivery channel. If a delivery * channel is not specified, this action returns the details of all * delivery channels associated with the account. * </p> * <p> * <b>NOTE:</b> Currently, you can specify only one delivery channel per * account. * </p> * * @param describeDeliveryChannelsRequest Container for the necessary * parameters to execute the DescribeDeliveryChannels operation on * AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * DescribeDeliveryChannels service method, as returned by AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest, AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns the current status of the specified configuration recorder. * If a configuration recorder is not specified, this action returns the * status of all configuration recorder associated with the account. * </p> * <p> * <b>NOTE:</b>Currently, you can specify only one configuration * recorder per account. * </p> * * @param describeConfigurationRecorderStatusRequest Container for the * necessary parameters to execute the * DescribeConfigurationRecorderStatus operation on AmazonConfig. * * @return A Java Future object containing the response from the * DescribeConfigurationRecorderStatus service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) throws AmazonServiceException, AmazonClientException; /** * <p> * Returns the current status of the specified configuration recorder. * If a configuration recorder is not specified, this action returns the * status of all configuration recorder associated with the account. * </p> * <p> * <b>NOTE:</b>Currently, you can specify only one configuration * recorder per account. * </p> * * @param describeConfigurationRecorderStatusRequest Container for the * necessary parameters to execute the * DescribeConfigurationRecorderStatus operation on AmazonConfig. * @param asyncHandler Asynchronous callback handler for events in the * life-cycle of the request. Users could provide the implementation of * the four callback methods in this interface to process the operation * result or handle the exception. * * @return A Java Future object containing the response from the * DescribeConfigurationRecorderStatus service method, as returned by * AmazonConfig. * * * @throws AmazonClientException * If any internal errors are encountered inside the client while * attempting to make the request or handle the response. For example * if a network connection is not available. * @throws AmazonServiceException * If an error response is returned by AmazonConfig indicating * either a problem with the data in the request, or a server side issue. */ public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest, AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler) throws AmazonServiceException, AmazonClientException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface ConfigDBAsync {\n\tpublic void getTables (DatabaseData inputs, @SuppressWarnings(\"rawtypes\") AsyncCallback callback);\n\tpublic void getColumns (DatabaseData inputs, @SuppressWarnings(\"rawtypes\") AsyncCallback callback);\n\tpublic void addEntry (DatabaseData inputs, @SuppressWarnings(\"rawtypes\") AsyncCallback callback);\n\tpublic void getCurrent (@SuppressWarnings(\"rawtypes\") AsyncCallback callback);\n\tpublic void\tdeleteThisEntry(String primaryKey, @SuppressWarnings(\"rawtypes\") AsyncCallback callback);\n\tpublic void\tgetPreview(String primaryKey, @SuppressWarnings(\"rawtypes\") AsyncCallback callback);\n}", "void getConfiguration(final AsyncHandler<LabelsConfiguration> aHandler);", "java.util.concurrent.Future<ListConfigurationsResult> listConfigurationsAsync(ListConfigurationsRequest listConfigurationsRequest,\n com.amazonaws.handlers.AsyncHandler<ListConfigurationsRequest, ListConfigurationsResult> asyncHandler);", "java.util.concurrent.Future<DescribeConfigurationsResult> describeConfigurationsAsync(DescribeConfigurationsRequest describeConfigurationsRequest,\n com.amazonaws.handlers.AsyncHandler<DescribeConfigurationsRequest, DescribeConfigurationsResult> asyncHandler);", "public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}", "@SuppressWarnings(\"deprecation\")\n @Before\n public final void setup(final TestContext aContext) {\n final ConfigRetriever configRetriever = ConfigRetriever.create(myRunTestOnContextRule.vertx());\n final Async asyncTask = aContext.async();\n\n configRetriever.getConfig(configuration -> {\n if (configuration.failed()) {\n aContext.fail(configuration.cause());\n } else {\n myConfigs = configuration.result();\n myImageServerURL = myConfigs.getString(Config.IIIF_URL);\n\n if (myAmazonS3 == null) {\n final String s3AccessKey = myConfigs.getString(Config.S3_ACCESS_KEY);\n final String s3SecretKey = myConfigs.getString(Config.S3_SECRET_KEY);\n\n // get myAWSCredentials ready\n myAWSCredentials = new BasicAWSCredentials(s3AccessKey, s3SecretKey);\n\n // instantiate the myAmazonS3 client\n myAmazonS3 = new AmazonS3Client(myAWSCredentials);\n }\n\n s3Bucket = myConfigs.getString(Config.S3_BUCKET);\n TestUtils.complete(asyncTask);\n }\n });\n }", "public Config getConfig();", "ConfigBlock getConfig();", "java.util.concurrent.Future<ListConfigurationsResult> listConfigurationsAsync(ListConfigurationsRequest listConfigurationsRequest);", "@Override\n\t\tprotected GetConfigRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getConfigInfo(\"all\");\n\t\t}", "AmazonSQSAsync getASyncClient() throws CoreException {\n if(sqsClient == null) {\n throw new CoreException(\"Amazon SQS Connection is not initialized\");\n }\n\n return sqsClient;\n }", "java.util.concurrent.Future<DescribeConfigurationsResult> describeConfigurationsAsync(DescribeConfigurationsRequest describeConfigurationsRequest);", "@Config(\"aws_secret_access_key\")\n @ConfigDefault(\"null\")\n Optional<String> getAwsSecretAccessKey();", "public static void main(String[] args) {\n // The connection string value can be obtained by going to your App Configuration instance in the Azure portal\n // and navigating to \"Access Keys\" page under the \"Settings\" section.\n String connectionString = \"endpoint={endpoint_value};id={id_value};secret={secret_value}\";\n\n final ConfigurationClient client = new ConfigurationClientBuilder()\n .connectionString(connectionString)\n .buildClient();\n\n // Name of the key to add to the configuration service.\n final String key = \"hello\";\n final String value = \"world\";\n\n System.out.println(\"Beginning of synchronous sample...\");\n\n ConfigurationSetting setting = client.setConfigurationSetting(key, null, value);\n System.out.printf(\"[SetConfigurationSetting] Key: %s, Value: %s\", setting.getKey(), setting.getValue());\n\n setting = client.getConfigurationSetting(key, null, null);\n System.out.printf(\"[GetConfigurationSetting] Key: %s, Value: %s\", setting.getKey(), setting.getValue());\n\n setting = client.deleteConfigurationSetting(key, null);\n System.out.printf(\"[DeleteConfigurationSetting] Key: %s, Value: %s\", setting.getKey(), setting.getValue());\n\n System.out.println(\"End of synchronous sample.\");\n }", "public GenAmazonS3Config() {\n }", "public abstract String getConfig();", "public interface Config {\n\t\t/**\n\t\t * the IdentityX policy which should be used for authentication\n\t\t *\n\t\t * @return the policy name\n\t\t */\n\t\t@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();\n\n\t\t/**\n\t\t * the IdentityX application to be used\n\t\t *\n\t\t * @return the application Id\n\t\t */\n\t\t@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();\n\t\t\n\t\t\n\t\t/**\n\t\t * the IdentityX Description to be used\n\t\t *\n\t\t * @return the transactionDescription\n\t\t */\n\t\t@Attribute(order = 300, validators = { RequiredValueValidator.class })\n\t\tdefault String transactionDescription() {\n\t\t\treturn \"OpenAM has Requested an Authentication\";\n\t\t}\n\t}", "public static Config config() {\n return LiveEventBusCore.get().config();\n }", "public abstract Configuration configuration();", "public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest,\n AsyncHandler<DeliverConfigSnapshotRequest, DeliverConfigSnapshotResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest,\n AsyncHandler<GetResourceConfigHistoryRequest, GetResourceConfigHistoryResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public C getConfig()\n {\n return config;\n }", "public ConfigProvider getConfig() {\n return config;\n }", "public interface ConfigService {\n\n /**\n * Retrieve instance with application configuration.\n * Instance is cached and updated when new config is stored.\n *\n * @return may return {@code null} if there is no config yet.\n */\n AppConfig retrieveApplicationConfig();\n\n /**\n * Store config - only config will be overrode and lost.\n * Also update cached config.\n *\n * @param appConfig to store\n */\n void storeApplicationConfig(AppConfig appConfig);\n}", "protected Config getConfig () {\n return this.conf;\n }", "public interface UrlMakerApiAsync {\n\tvoid encode(String url, AsyncCallback<Map<String, String>> callback);\n\tvoid ping(AsyncCallback<Void> callback);\n}", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public interface AsyncConnection {\n \n /**\n * Return <tt>true</tt> is the current connection associated with \n * this event has been suspended.\n */\n public boolean isSuspended();\n \n \n /**\n * Suspend the current connection. Suspended connection are parked and\n * eventually used when the Grizzlet Container initiates pushes.\n */\n public void suspend() throws AlreadyPausedException;\n \n \n /**\n * Resume a suspended connection. The response will be completed and the \n * connection become synchronous (e.g. a normal http connection).\n */\n public void resume() throws NotYetPausedException;\n \n \n /**\n * Advises the Grizzlet Container to start intiating a push operation, using \n * the argument <code>message</code>. All asynchronous connection that has \n * been suspended will have a chance to push the data back to their \n * associated clients.\n *\n * @param message The data that will be pushed.\n */\n public void push(String message) throws IOException;\n \n \n /**\n * Return the GrizzletRequest associated with this AsynchConnection. \n */\n public GrizzletRequest getRequest();\n \n \n /**\n * Return the GrizzletResponse associated with this AsynchConnection. \n */\n public GrizzletResponse getResponse();\n \n \n /**\n * Is this AsyncConnection being in the process of being resumed?\n */\n public boolean isResuming();\n \n \n /**\n * Is this AsyncConnection has push events ready to push back data to \n * its associated client.\n */\n public boolean hasPushEvent();\n \n \n /**\n * Return the <code>message</code> that can be pushed back.\n */\n public String getPushEvent();\n \n \n /**\n * Is the current asynchronous connection defined as an HTTP Get.\n */\n public boolean isGet();\n \n \n /**\n * Is the current asynchronous connection defined as an HTTP Get. \n */\n public boolean isPost();\n \n \n /**\n * Return the number of suspended connections associated with the current\n * {@link Grizzlet}\n */\n public int getSuspendedCount();\n \n \n}", "public AmazonConfig getAmazonConfig(final SessionContext ctx, final BaseStore item)\n\t{\n\t\treturn (AmazonConfig)item.getProperty( ctx, AmazoncoreConstants.Attributes.BaseStore.AMAZONCONFIG);\n\t}", "public Config getConfig() {\n return config;\n }", "com.google.container.v1.ConfigConnectorConfig getConfigConnectorConfig();", "public Object getConfig() {\n return config;\n }", "private ApolloConfig loadApolloConfig() {\n if (!m_loadConfigRateLimiter.tryAcquire(5, TimeUnit.SECONDS)) {\n //wait at most 5 seconds\n try {\n TimeUnit.SECONDS.sleep(5);\n } catch (InterruptedException e) {\n }\n }\n String appId = m_configUtil.getAppId();\n String cluster = m_configUtil.getCluster();\n String dataCenter = m_configUtil.getDataCenter();\n Tracer.logEvent(\"Apollo.Client.ConfigMeta\", STRING_JOINER.join(appId, cluster, m_namespace));\n int maxRetries = m_configNeedForceRefresh.get() ? 2 : 1;\n long onErrorSleepTime = 0; // 0 means no sleep\n Throwable exception = null;\n\n List<ServiceDTO> configServices = getConfigServices();\n String url = null;\n for (int i = 0; i < maxRetries; i++) {\n List<ServiceDTO> randomConfigServices = Lists.newLinkedList(configServices);\n Collections.shuffle(randomConfigServices);\n //Access the server which notifies the client first\n if (m_longPollServiceDto.get() != null) {\n randomConfigServices.add(0, m_longPollServiceDto.getAndSet(null));\n }\n\n for (ServiceDTO configService : randomConfigServices) {\n if (onErrorSleepTime > 0) {\n logger.warn(\n \"Load config failed, will retry in {} {}. appId: {}, cluster: {}, namespaces: {}\",\n onErrorSleepTime, m_configUtil.getOnErrorRetryIntervalTimeUnit(), appId, cluster, m_namespace);\n\n try {\n m_configUtil.getOnErrorRetryIntervalTimeUnit().sleep(onErrorSleepTime);\n } catch (InterruptedException e) {\n //ignore\n }\n }\n\n url = assembleQueryConfigUrl(configService.getHomepageUrl(), appId, cluster, m_namespace,\n dataCenter, m_remoteMessages.get(), m_configCache.get());\n\n logger.debug(\"Loading config from {}\", url);\n HttpRequest request = new HttpRequest(url);\n\n\n HttpResponse<ApolloConfig> response = m_httpUtil.doGet(request, ApolloConfig.class);\n m_configNeedForceRefresh.set(false);\n m_loadConfigFailSchedulePolicy.success();\n\n\n if (response.getStatusCode() == 304) {\n logger.debug(\"Config server responds with 304 HTTP status code.\");\n return m_configCache.get();\n }\n\n ApolloConfig result = response.getBody();\n\n logger.debug(\"Loaded config for {}: {}\", m_namespace, result);\n\n return result;\n\n // if force refresh, do normal sleep, if normal config load, do exponential sleep\n// onErrorSleepTime = m_configNeedForceRefresh.get() ? m_configUtil.getOnErrorRetryInterval() :\n// m_loadConfigFailSchedulePolicy.fail();\n }\n\n }\n String message = String.format(\n \"Load Apollo Config failed - appId: %s, cluster: %s, namespace: %s, url: %s\",\n appId, cluster, m_namespace, url);\n throw new ApolloConfigException(message, exception);\n }", "public interface ConfigListener {\r\n\r\n /**\r\n * 获取期权交易信息\r\n **/\r\n void success(HashMap<String , String> ininfo);\r\n\r\n /**\r\n * 获取下注记录失败的回调\r\n **/\r\n void fail(String msg);\r\n}", "public AsyncHttpClientConfig buildAHCConfig(CONFIG config)\n {\n return buildAHCConfig(config,\n new AsyncHttpClientConfig.Builder()\n .setCompressionEnabled(false)\n .setFollowRedirects(false)\n .setAllowPoolingConnection(true)\n .setConnectionTimeoutInMs((int)config.getCallConfig().getConnectTimeoutMsecs())\n .setMaximumConnectionsPerHost(5) // default of 2 is too low\n .setMaximumConnectionsTotal(30) // and 10 is bit skimpy too\n );\n }", "@JavascriptInterface\n public String config(String config) {\n String response = mManager.config(config);\n if (Log.isLoggable(HybridManager.TAG, Log.DEBUG)) {\n Log.d(HybridManager.TAG, \"config response is \" + response);\n }\n return response;\n }", "void config(Config config);", "public MyConfig getConfig() {\n return config;\n }", "public GetFunctionConfigurationResult getFunctionConfiguration(GetFunctionConfigurationRequest getFunctionConfigurationRequest) {\n ExecutionContext executionContext = createExecutionContext(getFunctionConfigurationRequest);\n AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();\n awsRequestMetrics.startEvent(Field.ClientExecuteTime);\n Request<GetFunctionConfigurationRequest> request = null;\n Response<GetFunctionConfigurationResult> response = null;\n \n try {\n awsRequestMetrics.startEvent(Field.RequestMarshallTime);\n try {\n request = new GetFunctionConfigurationRequestMarshaller().marshall(super.beforeMarshalling(getFunctionConfigurationRequest));\n // Binds the request metrics to the current request.\n request.setAWSRequestMetrics(awsRequestMetrics);\n } finally {\n awsRequestMetrics.endEvent(Field.RequestMarshallTime);\n }\n\n Unmarshaller<GetFunctionConfigurationResult, JsonUnmarshallerContext> unmarshaller =\n new GetFunctionConfigurationResultJsonUnmarshaller();\n JsonResponseHandler<GetFunctionConfigurationResult> responseHandler =\n new JsonResponseHandler<GetFunctionConfigurationResult>(unmarshaller);\n\n response = invoke(request, responseHandler, executionContext);\n\n return response.getAwsResponse();\n } finally {\n \n endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);\n }\n }", "public JsonObject getConfig() {\n return config;\n }", "public AmazonFPSAsyncClient(String awsAccessKeyId, String awsSecretAccessKey,\n AmazonFPSConfig config, ExecutorService executor) throws AmazonFPSException {\n super(awsAccessKeyId, awsSecretAccessKey, config);\n this.executor = executor;\n }", "public interface ArchivaConfiguration\n{\n\n\n String USER_CONFIG_PROPERTY = \"archiva.user.configFileName\";\n String USER_CONFIG_ENVVAR = \"ARCHIVA_USER_CONFIG_FILE\";\n\n /**\n * Get the configuration.\n *\n * @return the configuration\n */\n Configuration getConfiguration();\n\n /**\n * Save any updated configuration.\n *\n * @param configuration the configuration to save\n * @throws org.apache.archiva.components.registry.RegistryException\n * if there is a problem saving the registry data\n * @throws IndeterminateConfigurationException\n * if the configuration cannot be saved because it was read from two sources\n */\n void save( Configuration configuration )\n throws RegistryException, IndeterminateConfigurationException;\n\n /**\n * Save any updated configuration. This method allows to add a tag to the thrown event.\n * This allows to verify the origin if the caller is the same as the listener.\n *\n * @param configuration the configuration to save\n * @param eventTag the tag to add to the thrown event\n * @throws org.apache.archiva.components.registry.RegistryException\n * if there is a problem saving the registry data\n * @throws IndeterminateConfigurationException\n * if the configuration cannot be saved because it was read from two sources\n */\n void save( Configuration configuration, String eventTag )\n throws RegistryException, IndeterminateConfigurationException;\n\n /**\n * Determines if the configuration in use was as a result of a defaulted configuration.\n *\n * @return true if the configuration was created from the default-archiva.xml as opposed\n * to being loaded from the usual locations of ${user.home}/.m2/archiva.xml or\n * ${appserver.base}/conf/archiva.xml\n */\n boolean isDefaulted();\n\n /**\n * Add a configuration listener to notify of changes to the configuration.\n *\n * @param listener the listener\n */\n void addListener( ConfigurationListener listener );\n\n /**\n * Remove a configuration listener to stop notifications of changes to the configuration.\n *\n * @param listener the listener\n */\n void removeListener( ConfigurationListener listener );\n\n /**\n * Add a registry listener to notify of events in spring-registry.\n *\n * @param listener the listener\n * TODO: Remove in future.\n */\n void addChangeListener( RegistryListener listener );\n\n void removeChangeListener( RegistryListener listener );\n\n /**\n * reload configuration from file included registry\n *\n * @since 1.4-M1\n */\n void reload();\n\n public Locale getDefaultLocale();\n\n public List<Locale.LanguageRange> getLanguagePriorities();\n\n public Path getAppServerBaseDir();\n\n /**\n * Returns the base directory for repositories that have a relative location path set.\n * @return\n */\n public Path getRepositoryBaseDir();\n\n /**\n * Returns the base directory for remote repositories\n * @return\n */\n public Path getRemoteRepositoryBaseDir();\n\n /**\n * Returns the base directory for repository group files.\n * @return\n */\n public Path getRepositoryGroupBaseDir();\n\n /**\n * Returns the data directory where repositories and metadata reside\n * @return\n */\n public Path getDataDirectory();\n\n /**\n * Return the used configuration registry\n * @return\n */\n Registry getRegistry( );\n}", "EndpointBalancerConfig getConfig();", "@RequestFilters({ AbiquoAuthentication.class, AppendApiVersionToMediaType.class })\n@Path(\"/config\")\npublic interface ConfigAsyncApi {\n /*********************** License ***********************/\n\n /**\n * @see ConfigApi#listLicenses()\n */\n\n @EnterpriseEdition\n @GET\n @Path(\"/licenses\")\n @Consumes(LicensesDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<LicensesDto> listLicenses();\n\n /**\n * @see ConfigApi#listLicenses(LicenseOptions)\n */\n @EnterpriseEdition\n @GET\n @Path(\"/licenses\")\n @Consumes(LicensesDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<LicensesDto> listLicenses(LicenseOptions options);\n\n /**\n * @see ConfigApi#addLicense(LicenseDto)\n */\n @EnterpriseEdition\n @POST\n @Produces(LicenseDto.BASE_MEDIA_TYPE)\n @Consumes(LicenseDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n @Path(\"/licenses\")\n ListenableFuture<LicenseDto> addLicense(@BinderParam(BindToXMLPayload.class) LicenseDto license);\n\n /**\n * @see ConfigApi#removeLicense(LicenseDto)\n */\n @DELETE\n @EnterpriseEdition\n ListenableFuture<Void> removeLicense(@EndpointLink(\"edit\") @BinderParam(BindToPath.class) LicenseDto license);\n\n /*********************** Privilege ***********************/\n\n /**\n * @see ConfigApi#listPrivileges()\n */\n @GET\n @Path(\"/privileges\")\n @Consumes(PrivilegesDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<PrivilegesDto> listPrivileges();\n\n /**\n * @see ConfigApi#getPrivilege(Integer)\n */\n @GET\n @Path(\"/privileges/{privilege}\")\n @Consumes(PrivilegeDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n @ExceptionParser(ReturnNullOnNotFoundOr404.class)\n ListenableFuture<PrivilegeDto> getPrivilege(@PathParam(\"privilege\") Integer privilegeId);\n\n /*********************** System Properties ***********************/\n\n /**\n * @see ConfigApi#listSystemProperties()\n */\n @GET\n @Path(\"/properties\")\n @Consumes(SystemPropertiesDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<SystemPropertiesDto> listSystemProperties();\n\n /**\n * @see ConfigApi#listSystemProperties(PropertyOptions)\n */\n @GET\n @Path(\"/properties\")\n @Consumes(SystemPropertiesDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<SystemPropertiesDto> listSystemProperties(PropertyOptions options);\n\n /**\n * @see ConfigApi#updateSystemProperty(VirtualDatacenterDto)\n */\n @PUT\n @Produces(SystemPropertyDto.BASE_MEDIA_TYPE)\n @Consumes(SystemPropertyDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<SystemPropertyDto> updateSystemProperty(\n @EndpointLink(\"edit\") @BinderParam(BindToXMLPayloadAndPath.class) SystemPropertyDto property);\n\n /*********************** Category ***********************/\n\n /**\n * @see ConfigApi#listCategories()\n */\n @GET\n @Path(\"/categories\")\n @Consumes(CategoriesDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<CategoriesDto> listCategories();\n\n /**\n * @see ConfigApi#getCategory(Integer)\n */\n @GET\n @Path(\"/categories/{category}\")\n @Consumes(CategoryDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n @ExceptionParser(ReturnNullOnNotFoundOr404.class)\n ListenableFuture<CategoryDto> getCategory(@PathParam(\"category\") Integer categoryId);\n\n /**\n * @see ConfigApi#createCategory(CategoryDto)\n */\n @POST\n @Path(\"/categories\")\n @Produces(CategoryDto.BASE_MEDIA_TYPE)\n @Consumes(CategoryDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<CategoryDto> createCategory(@BinderParam(BindToXMLPayload.class) CategoryDto category);\n\n /**\n * @see ConfigApi#updateCategory(CategoryDto)\n */\n @PUT\n @Produces(CategoryDto.BASE_MEDIA_TYPE)\n @Consumes(CategoryDto.BASE_MEDIA_TYPE)\n @JAXBResponseParser\n ListenableFuture<CategoryDto> updateCategory(\n @EndpointLink(\"edit\") @BinderParam(BindToXMLPayloadAndPath.class) CategoryDto category);\n\n /**\n * @see ConfigApi#deleteCategory(CategoryDto)\n */\n @DELETE\n ListenableFuture<Void> deleteCategory(@EndpointLink(\"edit\") @BinderParam(BindToPath.class) CategoryDto category);\n}", "public static Config getConfig(){\n return _Config;\n }", "public KernelConfig getConfig()\n {\n Kernel.checkAccess();\n return config;\n }", "AWSStorageGatewayAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {\n super(asyncClientParams, endpointDiscoveryEnabled);\n this.executorService = asyncClientParams.getExecutor();\n }", "public interface Configurable {\n RequestConfig getConfig();\n}", "java.util.concurrent.Future<AssociateConfigurationItemsToApplicationResult> associateConfigurationItemsToApplicationAsync(\n AssociateConfigurationItemsToApplicationRequest associateConfigurationItemsToApplicationRequest,\n com.amazonaws.handlers.AsyncHandler<AssociateConfigurationItemsToApplicationRequest, AssociateConfigurationItemsToApplicationResult> asyncHandler);", "java.util.concurrent.Future<GetApplicationResult> getApplicationAsync(GetApplicationRequest getApplicationRequest,\n com.amazonaws.handlers.AsyncHandler<GetApplicationRequest, GetApplicationResult> asyncHandler);", "java.util.concurrent.Future<GetEventIntegrationResult> getEventIntegrationAsync(GetEventIntegrationRequest getEventIntegrationRequest,\n com.amazonaws.handlers.AsyncHandler<GetEventIntegrationRequest, GetEventIntegrationResult> asyncHandler);", "Observable<CustomerServiceProviderConfiguration> getConfigurationAsync(String serviceProviderId);", "private Configuration getAuth() {\r\n final ConfigurationBuilder cb = new ConfigurationBuilder();\r\n cb.setOAuthConsumerKey(\"n2g9XOjAr9p44yJwFjXUbeUa2\");\r\n cb.setOAuthConsumerSecret(\"57FHkBBptp17yBGl1v853lldZO9Kh4osJnDQqQEcXd4d9C3xFA\");\r\n cb.setOAuthAccessToken(\"113906448-2fx9njfJgzQrGdnRaGchI9GlZTzLMXrayEzFk2ju\");\r\n cb.setOAuthAccessTokenSecret(\"FJOqMt7dtBp1yuW2VnQDfzksa7IS5h3IxxsJ1ixBGI1ny\");\r\n \r\n return cb.build();\r\n }", "public void configure(Map<String, String> configuration) throws AlgebricksException;", "public interface OnGetUploadConfigListener {\n\n void onGetConfigFinish(boolean isSuccess);\n\n}", "java.util.concurrent.Future<GetDataIntegrationResult> getDataIntegrationAsync(GetDataIntegrationRequest getDataIntegrationRequest,\n com.amazonaws.handlers.AsyncHandler<GetDataIntegrationRequest, GetDataIntegrationResult> asyncHandler);", "@GET\n @Path(\"/config/get\")\n public Response configGet(@Context HttpServletRequest request,@Context HttpServletResponse response,@Context ServletContext servletContext) throws JsonGenerationException, JsonMappingException, IOException{\n return Response.status(200).entity(Json.newObjectMapper(true).writeValueAsString(Config.get())).build();\n }", "static Properties getConfig()\n {\n return(config);\n }", "public abstract CONFIG build();", "public String getConfig();", "public AmazonConfig getAmazonConfig(final BaseStore item)\n\t{\n\t\treturn getAmazonConfig( getSession().getSessionContext(), item );\n\t}", "public PictureConfig getConfig() {\n return config;\n }", "public interface IConfigurationProvider {\r\n String get(String path);\r\n}", "public interface ConfigurationHolder {\n\n /**\n * Gets OpenAPI Gateway host.\n *\n * @return the OpenAPI Gateway host.\n */\n public String getGatewayHost();\n\n /**\n * Gets the App ID.\n *\n * @return the App ID.\n */\n public String getAppId();\n\n /**\n * Gets the merchant number.\n *\n * @return the merchant number.\n */\n public String getMerchantNo();\n\n /**\n * Gets the message format.\n *\n * @return the message format.\n */\n public default String getFormat() {\n return Constants.FORMAT_JSON;\n }\n\n /**\n * Gets the message charset.\n *\n * @return the message charset.\n */\n public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }\n\n /**\n * Gets the API version number.\n *\n * @return the API version number.\n */\n public default String getVersion() {\n return Constants.VERSION_1;\n }\n\n /**\n * Gets the language.\n *\n * @return the language.\n */\n public Language getLanguage();\n\n /**\n * Gets the signature type.\n *\n * @return the signature type.\n */\n public SignType getSignType();\n\n /**\n * Gets the public key (used by RSA only).\n *\n * @return the public key.\n */\n public String getPublicKey();\n\n /**\n * Gets the private key.\n *\n * @return the private key.\n */\n public String getPrivateKey();\n\n /**\n * Gets whether the client supports partial payment.\n * This feature is only available for Snaplii payment.\n *\n * @return true if the client supports partial payment, or false otherwise.\n */\n public boolean isPartialPaymentSupported();\n\n /**\n * Gets the prefix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number prefix.\n */\n public String getAlternativeOrderNumberPrefix();\n\n /**\n * Gets the suffix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number suffix.\n */\n public String getAlternativeOrderNumberSuffix();\n\n /**\n * Gets the connection timeout setting.\n *\n * @return connection timeout in seconds.\n */\n public int getConnectionTimeout();\n\n /**\n * Gets the read timeout setting.\n *\n * @return read timeout in seconds.\n */\n public int getReadTimeout();\n\n /**\n * Validates the configuration.\n *\n * @throws OpenApiConfigurationExcepiton if any configuration is missing.\n */\n public default void validate() throws OpenApiConfigurationExcepiton {\n if (StringUtils.isEmpty(getGatewayHost())) {\n throw new OpenApiConfigurationExcepiton(\"Gateway host is not configured\");\n }\n if (StringUtils.isEmpty(getAppId())) {\n throw new OpenApiConfigurationExcepiton(\"App ID is not configured\");\n }\n if (StringUtils.isEmpty(getMerchantNo())) {\n throw new OpenApiConfigurationExcepiton(\"Merchant number is not configured\");\n }\n if (StringUtils.isEmpty(getFormat())) {\n throw new OpenApiConfigurationExcepiton(\"Format is not configured\");\n }\n if (StringUtils.isEmpty(getCharset())) {\n throw new OpenApiConfigurationExcepiton(\"Charset is not configured\");\n }\n if (getLanguage() == null) {\n throw new OpenApiConfigurationExcepiton(\"Language is not configured\");\n }\n if (getSignType() == null) {\n throw new OpenApiConfigurationExcepiton(\"Signature type is not configured\");\n }\n if (StringUtils.isEmpty(getPrivateKey())) {\n throw new OpenApiConfigurationExcepiton(\"Private key is not configured\");\n }\n if (SignType.RSA == getSignType() && StringUtils.isEmpty(getPublicKey())) {\n throw new OpenApiConfigurationExcepiton(\"Public key is not configured\");\n }\n if (getConnectionTimeout() <= 0 || getConnectionTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Connection timeout needs to be between 1 and 60\");\n }\n if (getReadTimeout() <= 0 || getReadTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Read timeout needs to be between 1 and 60\");\n }\n }\n\n}", "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest,\n AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public interface AWSServiceCatalog {\n\n /**\n * The region metadata service name for computing region endpoints. You can use this value to retrieve metadata\n * (such as supported regions) of the service.\n *\n * @see RegionUtils#getRegionsForService(String)\n */\n String ENDPOINT_PREFIX = \"servicecatalog\";\n\n /**\n * Overrides the default endpoint for this client (\"servicecatalog.us-east-1.amazonaws.com\"). Callers can use this\n * method to control which AWS region they want to work with.\n * <p>\n * Callers can pass in just the endpoint (ex: \"servicecatalog.us-east-1.amazonaws.com\") or a full URL, including the\n * protocol (ex: \"servicecatalog.us-east-1.amazonaws.com\"). If the protocol is not specified here, the default\n * protocol from this client's {@link ClientConfiguration} will be used, which by default is HTTPS.\n * <p>\n * For more information on using AWS regions with the AWS SDK for Java, and a complete list of all available\n * endpoints for all AWS services, see: <a\n * href=\"http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912\">\n * http://developer.amazonwebservices.com/connect/entry.jspa?externalID=3912</a>\n * <p>\n * <b>This method is not threadsafe. An endpoint should be configured when the client is created and before any\n * service requests are made. Changing it afterwards creates inevitable race conditions for any service requests in\n * transit or retrying.</b>\n *\n * @param endpoint\n * The endpoint (ex: \"servicecatalog.us-east-1.amazonaws.com\") or a full URL, including the protocol (ex:\n * \"servicecatalog.us-east-1.amazonaws.com\") of the region specific AWS endpoint this client will communicate\n * with.\n */\n void setEndpoint(String endpoint);\n\n /**\n * An alternative to {@link AWSServiceCatalog#setEndpoint(String)}, sets the regional endpoint for this client's\n * service calls. Callers can use this method to control which AWS region they want to work with.\n * <p>\n * By default, all service endpoints in all regions use the https protocol. To use http instead, specify it in the\n * {@link ClientConfiguration} supplied at construction.\n * <p>\n * <b>This method is not threadsafe. A region should be configured when the client is created and before any service\n * requests are made. Changing it afterwards creates inevitable race conditions for any service requests in transit\n * or retrying.</b>\n *\n * @param region\n * The region this client will communicate with. See {@link Region#getRegion(com.amazonaws.regions.Regions)}\n * for accessing a given region. Must not be null and must be a region where the service is available.\n *\n * @see Region#getRegion(com.amazonaws.regions.Regions)\n * @see Region#createClient(Class, com.amazonaws.auth.AWSCredentialsProvider, ClientConfiguration)\n * @see Region#isServiceSupported(String)\n */\n void setRegion(Region region);\n\n /**\n * <p>\n * Retrieves information about a specified product.\n * </p>\n * <p>\n * This operation is functionally identical to <a>DescribeProductView</a> except that it takes as input\n * <code>ProductId</code> instead of <code>ProductViewId</code>.\n * </p>\n * \n * @param describeProductRequest\n * @return Result of the DescribeProduct operation returned by the service.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @sample AWSServiceCatalog.DescribeProduct\n */\n DescribeProductResult describeProduct(DescribeProductRequest describeProductRequest);\n\n /**\n * <p>\n * Retrieves information about a specified product.\n * </p>\n * <p>\n * This operation is functionally identical to <a>DescribeProduct</a> except that it takes as input\n * <code>ProductViewId</code> instead of <code>ProductId</code>.\n * </p>\n * \n * @param describeProductViewRequest\n * @return Result of the DescribeProductView operation returned by the service.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @sample AWSServiceCatalog.DescribeProductView\n */\n DescribeProductViewResult describeProductView(DescribeProductViewRequest describeProductViewRequest);\n\n /**\n * <p>\n * Provides information about parameters required to provision a specified product in a specified manner. Use this\n * operation to obtain the list of <code>ProvisioningArtifactParameters</code> parameters available to call the\n * <a>ProvisionProduct</a> operation for the specified product.\n * </p>\n * \n * @param describeProvisioningParametersRequest\n * @return Result of the DescribeProvisioningParameters operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @sample AWSServiceCatalog.DescribeProvisioningParameters\n */\n DescribeProvisioningParametersResult describeProvisioningParameters(DescribeProvisioningParametersRequest describeProvisioningParametersRequest);\n\n /**\n * <p>\n * Retrieves a paginated list of the full details of a specific request. Use this operation after calling a request\n * operation (<a>ProvisionProduct</a>, <a>TerminateProvisionedProduct</a>, or <a>UpdateProvisionedProduct</a>).\n * </p>\n * \n * @param describeRecordRequest\n * @return Result of the DescribeRecord operation returned by the service.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @sample AWSServiceCatalog.DescribeRecord\n */\n DescribeRecordResult describeRecord(DescribeRecordRequest describeRecordRequest);\n\n /**\n * <p>\n * Returns a paginated list of all paths to a specified product. A path is how the user has access to a specified\n * product, and is necessary when provisioning a product. A path also determines the constraints put on the product.\n * </p>\n * \n * @param listLaunchPathsRequest\n * @return Result of the ListLaunchPaths operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @sample AWSServiceCatalog.ListLaunchPaths\n */\n ListLaunchPathsResult listLaunchPaths(ListLaunchPathsRequest listLaunchPathsRequest);\n\n /**\n * <p>\n * Returns a paginated list of all performed requests, in the form of RecordDetails objects that are filtered as\n * specified.\n * </p>\n * \n * @param listRecordHistoryRequest\n * @return Result of the ListRecordHistory operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @sample AWSServiceCatalog.ListRecordHistory\n */\n ListRecordHistoryResult listRecordHistory(ListRecordHistoryRequest listRecordHistoryRequest);\n\n /**\n * <p>\n * Requests a <i>Provision</i> of a specified product. A <i>ProvisionedProduct</i> is a resourced instance for a\n * product. For example, provisioning a CloudFormation-template-backed product results in launching a CloudFormation\n * stack and all the underlying resources that come with it.\n * </p>\n * <p>\n * You can check the status of this request using the <a>DescribeRecord</a> operation.\n * </p>\n * \n * @param provisionProductRequest\n * @return Result of the ProvisionProduct operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @throws DuplicateResourceException\n * The specified resource is a duplicate.\n * @sample AWSServiceCatalog.ProvisionProduct\n */\n ProvisionProductResult provisionProduct(ProvisionProductRequest provisionProductRequest);\n\n /**\n * <p>\n * Returns a paginated list of all the ProvisionedProduct objects that are currently available (not terminated).\n * </p>\n * \n * @param scanProvisionedProductsRequest\n * @return Result of the ScanProvisionedProducts operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @sample AWSServiceCatalog.ScanProvisionedProducts\n */\n ScanProvisionedProductsResult scanProvisionedProducts(ScanProvisionedProductsRequest scanProvisionedProductsRequest);\n\n /**\n * <p>\n * Returns a paginated list all of the <code>Products</code> objects to which the caller has access.\n * </p>\n * <p>\n * The output of this operation can be used as input for other operations, such as <a>DescribeProductView</a>.\n * </p>\n * \n * @param searchProductsRequest\n * @return Result of the SearchProducts operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @sample AWSServiceCatalog.SearchProducts\n */\n SearchProductsResult searchProducts(SearchProductsRequest searchProductsRequest);\n\n /**\n * <p>\n * Requests termination of an existing ProvisionedProduct object. If there are <code>Tags</code> associated with the\n * object, they are terminated when the ProvisionedProduct object is terminated.\n * </p>\n * <p>\n * This operation does not delete any records associated with the ProvisionedProduct object.\n * </p>\n * <p>\n * You can check the status of this request using the <a>DescribeRecord</a> operation.\n * </p>\n * \n * @param terminateProvisionedProductRequest\n * @return Result of the TerminateProvisionedProduct operation returned by the service.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @sample AWSServiceCatalog.TerminateProvisionedProduct\n */\n TerminateProvisionedProductResult terminateProvisionedProduct(TerminateProvisionedProductRequest terminateProvisionedProductRequest);\n\n /**\n * <p>\n * Requests updates to the configuration of an existing ProvisionedProduct object. If there are tags associated with\n * the object, they cannot be updated or added with this operation. Depending on the specific updates requested,\n * this operation may update with no interruption, with some interruption, or replace the ProvisionedProduct object\n * entirely.\n * </p>\n * <p>\n * You can check the status of this request using the <a>DescribeRecord</a> operation.\n * </p>\n * \n * @param updateProvisionedProductRequest\n * @return Result of the UpdateProvisionedProduct operation returned by the service.\n * @throws InvalidParametersException\n * One or more parameters provided to the operation are invalid.\n * @throws ResourceNotFoundException\n * The specified resource was not found.\n * @sample AWSServiceCatalog.UpdateProvisionedProduct\n */\n UpdateProvisionedProductResult updateProvisionedProduct(UpdateProvisionedProductRequest updateProvisionedProductRequest);\n\n /**\n * Shuts down this client object, releasing any resources that might be held open. This is an optional method, and\n * callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client\n * has been shutdown, it should not be used to make any more requests.\n */\n void shutdown();\n\n /**\n * Returns additional metadata for a previously executed successful request, typically used for debugging issues\n * where a service isn't acting as expected. This data isn't considered part of the result data returned by an\n * operation, so it's available through this separate, diagnostic interface.\n * <p>\n * Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic\n * information for an executed request, you should use this method to retrieve it as soon as possible after\n * executing a request.\n *\n * @param request\n * The originally executed request.\n *\n * @return The response metadata for the specified request, or null if none is available.\n */\n ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);\n\n}", "public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest) \n throws AmazonServiceException, AmazonClientException;", "public interface ConnectionServiceAsync {\n void searchSynonyms(String input, AsyncCallback<List<String>> callback) throws IllegalArgumentException;;\n void callMaplabelsToSynonyms(AsyncCallback<Boolean> callback) throws IllegalArgumentException;;\n\n\n}", "public interface ConfigurationService {\n /**\n * Get configuration by key\n *\n * @param configKey\n * @return\n */\n Configuration getConfigByKey(String configKey);\n}", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "Configuration getConfiguration();", "public interface IAppConfig {\n public List<String> getSpringProfileNames();\n public List<String> getSpringProfileClasses();\n public boolean isThreadPoolEnabled();\n public List<ThreadPoolConfig> getThreadPoolConfigs();\n public String getAppConfigClass();\n}", "public ConfigCommon getConfig() {\n return config;\n }", "public String getConfig() {\n\t\treturn(config);\n\t}", "EventWriterConfig getConfig();", "interface ConfigWatcher {\n\n /**\n * Called when receiving an update on virtual host configurations.\n */\n void onConfigChanged(ConfigUpdate update);\n\n void onError(Status error);\n }", "@Override\n public void configure(@Nonnull AbstractConfigNode node) throws ConfigurationException {\n Preconditions.checkArgument(node instanceof ConfigPathNode);\n try {\n ConfigurationAnnotationProcessor.readConfigAnnotations(getClass(), (ConfigPathNode) node, this);\n Map<String, Object> config = configuration(node);\n ClientBuilder builder = ClientBuilder.newBuilder();\n if (config != null && !config.isEmpty()) {\n for (String key : config.keySet()) {\n builder.property(key, config.get(key));\n }\n }\n builder.connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS);\n builder.readTimeout(readTimeout, TimeUnit.MILLISECONDS);\n\n if (useSSL) {\n builder.sslContext(SSLContext.getDefault());\n }\n client = builder.register(JacksonJaxbJsonProvider.class).build();\n state().setState(EConnectionState.Open);\n } catch (Exception ex) {\n state().setError(ex);\n throw new ConfigurationException(ex);\n }\n }", "ServiceConfig getServiceConfig();", "ServiceConfig getServiceConfig();", "String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public interface ClientConfig\n{\n /**\n * Allow IRC version 3 capabilities.\n *\n * @return returns <tt>true</tt> if IRC version 3 capabilities are allowed,\n * or <tt>false</tt> if we explicitly disallow anything related to\n * IRCv3. (Disabling may regress the connection to \"classic\" IRC\n * (RFC1459).)\n */\n boolean isVersion3Allowed();\n\n /**\n * Enable contact presence periodic task for keeping track of contact\n * presence (offline or online).\n *\n * @return returns <tt>true</tt> to use contact presence task or\n * <tt>false</tt> otherwise.\n */\n boolean isContactPresenceTaskEnabled();\n\n /**\n * Enable channel presence periodic task for keeping track of channel\n * members presence (available or away).\n *\n * @return returns <tt>true</tt> to use channel presence task or\n * <tt>false</tt> otherwise.\n */\n boolean isChannelPresenceTaskEnabled();\n\n /**\n * Use a SOCKS proxy to connect to the configured IRC server.\n *\n * The proxy may be <tt>null</tt> which means that no proxy will be used\n * when connecting to the IRC server.\n *\n * @return returns Proxy configuration or <tt>null</tt> if no proxy should\n * be used.\n */\n Proxy getProxy();\n\n /**\n * Resolve addresses through the proxy, instead of using a (local) DNS\n * resolver.\n *\n * @return returns <tt>true</tt> if addresses should be resolved through\n * proxy, or <tt>false</tt> if it should NOT be resolved through\n * proxy\n */\n boolean isResolveByProxy();\n\n /**\n * Get the configured SASL authentication data.\n *\n * @return Returns the SASL authentication data if set, or null if no\n * authentication data is set. If no authentication data is set,\n * this would mean SASL authentication need not be used.\n */\n SASL getSASL();\n\n /**\n * SASL authentication data.\n *\n * @author Danny van Heumen\n */\n static interface SASL\n {\n /**\n * Get user name.\n *\n * @return Returns the user name.\n */\n String getUser();\n\n /**\n * Get password.\n *\n * @return Returns the password.\n */\n String getPass();\n\n /**\n * Get authorization role.\n *\n * @return Returns the authorization role if set. (Optional)\n */\n String getRole();\n }\n}", "public String getConfig() {\n\n return config;\n }", "AWSCodeStarNotificationsAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {\n super(asyncClientParams, endpointDiscoveryEnabled);\n this.executorService = asyncClientParams.getExecutor();\n }", "void configure (CallbackUtilities cus) throws RootException;", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "private AmazonS3 initializeS3Client(Configuration cfg) {\n String endpointLocation = WorkflowRuntimeParameters.getParamValue(IMPORT_CONTENT_OBJECT_STORE_S3_ENDPOINT, cfg);\n if (endpointLocation != null) {\n return new AmazonS3Client(new HadoopBasedS3CredentialsProvider(cfg),\n new ClientConfiguration().withConnectionTimeout(connectionTimeout).withSocketTimeout(readTimeout)\n .withProtocol(Protocol.HTTPS)).withEndpoint(endpointLocation);\n } else {\n return null;\n }\n }", "public ConfigurationManagement getConfig() {\r\n\t\treturn config;\r\n\t}", "public interface ConfigService {\n\n\n /**\n * eureka配置\n *\n * @param sb\n * @param addr\n */\n void eureka(StringBuilder sb, String addr);\n\n /**\n * redis配置\n *\n * @param sb\n * @param addr\n */\n void redis(StringBuilder sb, String addr);\n\n\n /**\n * 数据源配置\n *\n * @param sb\n */\n void thymeleafAndDatasource(StringBuilder sb);\n\n\n /**\n * 关于mybatis的配置\n *\n * @param sb\n * @param packages\n */\n void mybatis(StringBuilder sb, String packages);\n\n\n /**\n * 分页插件配置\n *\n * @param sb\n */\n void pagehelper(StringBuilder sb);\n\n /**\n * 生成application.yml\n *\n * @param name\n */\n void application(String name);\n\n\n /**\n * 生成application-xxx.yml\n *\n * @param branch\n * @param packages\n */\n void applicationBranch(String branch, String packages);\n\n\n /**\n * log文件\n *\n */\n void logBack();\n}", "Configuration getConfigByKey(String configKey);", "public Object\tgetConfiguration();", "protected AsyncHttpClientConfig buildAHCConfig(CONFIG config,\n AsyncHttpClientConfig.Builder ahcConfigBuilder)\n {\n return ahcConfigBuilder.build();\n }", "java.util.concurrent.Future<ListEventIntegrationAssociationsResult> listEventIntegrationAssociationsAsync(\n ListEventIntegrationAssociationsRequest listEventIntegrationAssociationsRequest,\n com.amazonaws.handlers.AsyncHandler<ListEventIntegrationAssociationsRequest, ListEventIntegrationAssociationsResult> asyncHandler);", "@SuppressWarnings(\"unused\")\n @PostConstruct\n private void initializeAmazon() {\n AWSCredentials credentials = new BasicAWSCredentials(negaBucketAccessKey, negaBucketSecretKey);\n this.s3client =\n AmazonS3ClientBuilder.standard()\n .withCredentials(new AWSStaticCredentialsProvider(credentials))\n .withRegion(Regions.US_EAST_1)\n .build();\n }", "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest,\n AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}", "@Override\n\tpublic void configure(Context context) {\n\t\tString regionName = context.getString(\"region\", \"us-east-1\");\n\t\tthis.region = Regions.fromName(regionName);\n\t\tLOG.debug(\"[flume-aws-lambda] Region: \" + region.getName());\n\t\t\n\t\t// set the lambda function name for this sink to invoke\n\t\tthis.functionName = context.getString(\"functionName\");\n\t\tLOG.debug(\"[flume-aws-lambda] Function: \" + this.functionName);\n\t\t\n\t\t// get access and secret keys from context, configure AWS Credentials if\n\t\t// values are present...\n\t\tString accessKey = context.getString(\"accessKey\");\n\t\tString secretKey = context.getString(\"secretKey\");\n\t\t\n\t\tif (!StringUtils.isBlank(accessKey) && !StringUtils.isBlank(secretKey)) {\n\t\t\tLOG.debug(\"[flume-aws-lambda] Setting AWS credentials\");\n\t\t\tthis.credentials = new BasicAWSCredentials(accessKey, secretKey);\n\t\t}\n\t\t\n\t\tif (sinkCounter == null) {\n\t sinkCounter = new SinkCounter(getName());\n\t }\n\t}", "public ConfigurationNode getConfig() {\n return this.configManager.getConfig();\n }" ]
[ "0.63107437", "0.60748357", "0.59943163", "0.57072073", "0.56976205", "0.56136996", "0.55849975", "0.55700076", "0.55525136", "0.549815", "0.5454532", "0.5438485", "0.5420088", "0.54124117", "0.53028053", "0.52708226", "0.5247796", "0.52394277", "0.52389985", "0.5237854", "0.52019244", "0.51809865", "0.5173738", "0.5158131", "0.5147447", "0.5143057", "0.5123722", "0.51115817", "0.51036", "0.50910676", "0.50893956", "0.50851315", "0.5082782", "0.5075742", "0.5074298", "0.50682646", "0.5067564", "0.5064678", "0.50509226", "0.5047552", "0.50413406", "0.5039413", "0.5038141", "0.5037228", "0.502727", "0.5026196", "0.5010679", "0.50106347", "0.50032413", "0.4998923", "0.49977908", "0.498944", "0.49885413", "0.49872229", "0.49796143", "0.49771085", "0.49767807", "0.49738702", "0.4961931", "0.4948545", "0.49393192", "0.49372554", "0.493609", "0.49332595", "0.492073", "0.4918122", "0.48934302", "0.48897856", "0.4888499", "0.48880965", "0.48866844", "0.48866844", "0.48866844", "0.48866844", "0.48848796", "0.48761544", "0.4874008", "0.48717293", "0.48690966", "0.4865814", "0.48639295", "0.48639295", "0.48578393", "0.4853944", "0.48526683", "0.48509282", "0.48360512", "0.48130563", "0.48130324", "0.4811506", "0.48061368", "0.48047265", "0.4802553", "0.4802254", "0.4797631", "0.4788241", "0.4787434", "0.4786842", "0.47834492", "0.47805956" ]
0.81087
0
Returns the current status of the specified delivery channel. If a delivery channel is not specified, this action returns the current status of all delivery channels associated with the account. NOTE:Currently, you can specify only one delivery channel per account.
public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "im.turms.common.constant.MessageDeliveryStatus getDeliveryStatus();", "int getDeliveryStatusValue();", "private String getDesiredChannel(final IUpdateSettings settings, final ChannelXmlBean _installedChannelBean)\n\t{\n\t\tString desiredChannel = settings.getUpdateServerChannel().toLowerCase();\n\t\tString currentChannelName = _installedChannelBean.getName();\n\n\t\tif (!currentChannelName.equals(desiredChannel))\n\t\t{\n\t\t\tif (s_log.isInfoEnabled())\n\t\t\t{\n\t\t\t\ts_log.info(\"getDesiredChannel: User is switching distribution channel from \"\n\t\t\t\t\t+ \"installed channel (\" + currentChannelName + \") to new channel (\" + desiredChannel + \")\");\n\t\t\t}\n\t\t}\n\t\treturn desiredChannel;\n\t}", "public boolean isActiveChannel(String channel)\n {\n return activeChannels.contains(channel);\n }", "public NotificationsChannel getChannel(String channelId) throws Exception;", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "private ChannelXmlBean getCurrentChannelXmlBean(ChannelXmlBean installedChannelBean)\n\t{\n\t\tChannelXmlBean currentChannelBean = null;\n\t\tif (_settings.isRemoteUpdateSite())\n\t\t{\n\t\t\t// 3a. For server, Determine the channel that the user has (stable or snapshot)\n\t\t\tString channelName = getDesiredChannel(_settings, installedChannelBean);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tStringBuilder releasePath = new StringBuilder(\"/\");\n\t\t\t\treleasePath.append(_settings.getUpdateServerPath());\n\t\t\t\treleasePath.append(\"/\");\n\t\t\t\treleasePath.append(channelName);\n\t\t\t\treleasePath.append(\"/\");\n\n\t\t\t\tcurrentChannelBean =\n\t\t\t\t\t_util.downloadCurrentRelease(_settings.getUpdateServer(),\n\t\t\t\t\t\tInteger.parseInt(_settings.getUpdateServerPort()), releasePath.toString(),\n\t\t\t\t\t\tRELEASE_XML_FILENAME, _app.getSquirrelPreferences().getProxySettings());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\ts_log.error(\"Unexpected exception: \" + e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrentChannelBean = _util.loadUpdateFromFileSystem(_settings.getFileSystemUpdatePath());\n\t\t}\n\t\treturn currentChannelBean;\n\t}", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}", "public Channel getChannel()\n {\n return channel;\n }", "public String getDeliverLogsStatus() {\n return this.deliverLogsStatus;\n }", "public String getCampaignStatus() {\r\n return campaignStatus;\r\n }", "public Channel getChannelAssigned1() {\n return channelAssigned1;\n }", "public Status getStatus() {\n return board.getStatus();\n }", "public String getChannel() {\n\t\treturn channel;\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;", "public String getSalesChannel() {\r\n return salesChannel;\r\n }", "public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}", "public Object getChannelActivityHistoryReport() {\n return channelActivityHistoryReport;\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getChannel() {\r\n return channel;\r\n }", "public String getChannel() {\n return channel;\n }", "String getCurrentTrace(Channel channel);", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Account status() {\n RestRequest request = new RestRequest();\n request.setResource(\"account/status\");\n\n return client.get(request, Account.class);\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "public GetSmsDeliveryStatusResponse getSmsDeliveryStatus(\n\t\t\tGetSmsDeliveryStatus request) {\n\t\treturn null;\n\t}", "boolean isAssignedForChannel(String ccid);", "public Channel getChannel() {\n return channel;\n }", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public Channel getChannelAssigned2() {\n return channelAssigned2;\n }", "public Integer getAccountStatus() {\n return accountStatus;\n }", "public int getProgression(int channel) {\n\t\treturn chan[channel].progression;\n\t}", "public int getChannel() {\n return channel;\n }", "@ApiModelProperty(example = \"1\", value = \"The count of affected Channels across all products\")\n public Integer getAffectedChannelCount() {\n return affectedChannelCount;\n }", "public ReturnStatus getStatus() {\n return (ReturnStatus) get(\"status\");\n }", "public ChannelFuture getChannelFuture() {\n return channelFuture;\n }", "public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }", "public ElevatorStatusObject getStatus() {\n //Fetch destination\n \tif (queue.isEmpty()) {\n \t\treturn new ElevatorStatusObject(currentFloor, 0, -1);\n \t}\n \t\n //Fetch next call\n ElevatorQueueObject q = queue.getFirst();\n int index = 1;\n while (currentPassengers.size() == specs.getCarryCapacity() \n && (q.getActionType() == ElevatorAction.PICKUP ||\n !currentPassengers.contains(q.getPassenger()))) {\n q = queue.get(index);\n index += 1;\n }\n \n //Fetch destination\n int dest = 0;\n if (q.getActionType() == ElevatorAction.PICKUP) {\n dest = q.getPassenger().getOrigin();\n } else {\n dest = q.getPassenger().getDestination();\n }\n \n //Calculate direction\n int dir = 0;\n if (dest > currentFloor) {\n dir = 1;\n } else if (dest < currentFloor) {\n dir = -1;\n }\n \n return new ElevatorStatusObject(currentFloor, dir, dest);\n }", "public String getChannelId() {\n return channelId;\n }", "@RequestMapping(value = \"/remaining\", method = GET)\n int getRemainingMS(String userId, String channelId);", "@ApiModelProperty(value = \"Status of campaign or flow\")\r\n public String getStatus() {\r\n return status;\r\n }", "public Byte getChannel() {\n return channel;\n }", "public int currentChannelIndex() {\n int i = 0;\n for (YouTubeData data : mChannels) {\n if (data.mChannel.equals(mCurrentChannelID))\n return i;\n\n i++;\n }\n\n DUtils.log(\"should not get here: \" + DUtils.currentMethod());\n return 0;\n }", "com.google.ads.googleads.v14.common.YouTubeChannelInfo getYoutubeChannel();", "public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }", "WorldUps.UDeliveryMade getDelivered(int index);", "java.lang.String getChannel();", "public ConnectivityState getState() {\n ConnectivityState stateCopy = this.state;\n if (stateCopy != null) {\n return stateCopy;\n }\n throw new UnsupportedOperationException(\"Channel state API is not implemented\");\n }", "public String getChannelId()\n {\n return channelId;\n }", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "public Cache getCachedContestStatuses() {\r\n return this.delegate.getCachedContestStatuses();\r\n }", "public static ArrayList<Integer> getActiveChannels() {\n\t\tString path = ACTIVE_CHANNELS;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\tArrayList<Integer> items = getActiveChannels(response);\n\t\treturn items;\n\t}", "public CanceledServiceDelivery getCanceledServiceDelivery() {\n return this.canceledServiceDelivery;\n }", "public void updateChannel(String channel) {\n Log.d(\"BC\", \"update channel \" + channel);\n long startTime = 0l;\n long endTime = 0l;\n Cursor cursor = getContentResolver().query(\n ChannelData.BROKEN_CONTENT_URI,\n null,\n null,\n new String[]{channel},\n null\n );\n if (cursor.getCount() > 0) {\n if (cursor.moveToFirst()) {\n startTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.PARENT\n ));\n endTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.ITEM_ID\n ));\n }\n Log.w(TAG, \"Found broken threads in \" + channel + \", \"\n + new Date(startTime) + \" / \"+ new Date(endTime));\n }\n cursor.close();\n cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n \"jid=?\",\n new String[]{channel},\n null\n );\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n startTime = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n IQ iq = new ChannelFetch(channel, startTime);\n try {\n send(iq);\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n cursor.close();\n DiscoverInfo info = new DiscoverInfo();\n info.setNode(channel);\n info.setType(org.jivesoftware.smack.packet.IQ.Type.GET);\n info.setTo(\"broadcaster.buddycloud.com\");\n try {\n send(info);\n } catch (InterruptedException e) {\n e.printStackTrace(System.err);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }", "StatusItem getReconcileStatus();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }", "@JsonProperty(\"SalesAccessChannels\")\n public List<SalesAccessChannelsEnum> getSalesAccessChannels() {\n return salesAccessChannels;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }", "public ChannelType getChannelType() {\n return type;\n }", "protected Channel getChannel()\n {\n return mChannel;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "Channel channel() {\n return channel;\n }", "public String getChannelCode() {\n return channelCode;\n }", "EzyChannel getChannel();", "public int getCBRStatus();", "public String getChannelActivityHistoryReportReference() {\n return channelActivityHistoryReportReference;\n }", "public String getStatus() {\n\t\treturn ticketStatus;\n\t}", "com.google.protobuf.ByteString\n getChannelBytes();", "public Integer getChannelCode() {\n return channelCode;\n }", "public DeploymentStatus getDeploymentStatus();", "public String getReportStatus() {\r\n return reportStatus;\r\n }", "@java.lang.Override public org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel() {\n @SuppressWarnings(\"deprecation\")\n org.apache.drill.exec.proto.UserBitShared.RpcChannel result = org.apache.drill.exec.proto.UserBitShared.RpcChannel.valueOf(channel_);\n return result == null ? org.apache.drill.exec.proto.UserBitShared.RpcChannel.BIT_DATA : result;\n }", "public Integer getChannelid() {\n return channelid;\n }", "public String\t\tgetOrderStatus();", "@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract boolean updateChannel(Channel channel);", "public io.grpc.channelz.v1.ChannelOrBuilder getChannelOrBuilder(\n int index) {\n return channel_.get(index);\n }", "public ContestChannel getContestChannel(long contestChannelId) throws ContestManagementException {\r\n return null;\r\n }", "java.lang.String getChannelName();", "public StatusEnum getStatus() {\n return status;\n }", "@java.lang.Override\n public org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel() {\n @SuppressWarnings(\"deprecation\")\n org.apache.drill.exec.proto.UserBitShared.RpcChannel result = org.apache.drill.exec.proto.UserBitShared.RpcChannel.valueOf(channel_);\n return result == null ? org.apache.drill.exec.proto.UserBitShared.RpcChannel.BIT_DATA : result;\n }", "public int getChannelId( ) {\r\n return channelId;\r\n }", "public StatusOfCause getStatus() {\n\t\treturn StatusOfCause.valueOf(statusValue);\n\t}", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest,\n AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public StatusEnum getStatus()\n {\n return status;\n }", "public Tile gameGetStatus(int r, int c) {\n\t\treturn gameBoard.getTileStatus(r, c);\n\t}", "public java.util.List<? extends io.grpc.channelz.v1.ChannelOrBuilder> \n getChannelOrBuilderList() {\n return channel_;\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.CommercialOrder.OrderStatus result = io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.valueOf(status_);\n return result == null ? io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.UNRECOGNIZED : result;\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.CommercialOrder.OrderStatus result = io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.valueOf(status_);\n return result == null ? io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.UNRECOGNIZED : result;\n }", "private void status(final Object channel, final StatusRequest request) {\n final String contextId = request.getContext();\n final String requestId = request.getRequestId();\n LOGGER.info(\"received a status request for context \" + contextId\n + \" with request id \" + requestId);\n final boolean automaticUpdate = request.isRequestAutomaticUpdate();\n URI context = null;\n if (contextId != null) {\n try {\n context = new URI(contextId);\n } catch (URISyntaxException e) {\n LOGGER.warn(\"context '\"\n + contextId\n + \"' does not denote a valid URI. Unable to send status\"\n + \" response messages\");\n return;\n }\n }\n final String target = request.getSource();\n final StatusUpdateThread thread = new StatusUpdateThread(this, channel,\n target, context, requestId, automaticUpdate);\n thread.start();\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.CommercialOrder.OrderStatus result = io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.valueOf(status_);\n return result == null ? io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.UNRECOGNIZED : result;\n }" ]
[ "0.580943", "0.5338096", "0.5138576", "0.5114167", "0.49953127", "0.49952346", "0.4987785", "0.49164015", "0.49128133", "0.48950657", "0.4843509", "0.48132834", "0.48098528", "0.47855562", "0.47695374", "0.4767873", "0.4767873", "0.47482312", "0.47344092", "0.47288036", "0.47261396", "0.47232398", "0.4703508", "0.47028926", "0.46959487", "0.4693862", "0.46876553", "0.4687293", "0.46859387", "0.46691084", "0.46442646", "0.4636851", "0.4633296", "0.46059838", "0.45716822", "0.45551836", "0.45322293", "0.45215833", "0.4506352", "0.4501096", "0.44932267", "0.44859126", "0.44851598", "0.4481353", "0.44606346", "0.4457069", "0.44422036", "0.4436549", "0.44290364", "0.44267628", "0.44263643", "0.44187292", "0.44184938", "0.4415386", "0.44060645", "0.4395003", "0.4377425", "0.437673", "0.43765983", "0.43669862", "0.4366446", "0.43630707", "0.43498367", "0.43495405", "0.4343026", "0.43408802", "0.43344522", "0.43301094", "0.43265167", "0.43164328", "0.43073222", "0.4295754", "0.42944655", "0.42890766", "0.42780375", "0.4271446", "0.4269487", "0.42666203", "0.42653266", "0.4253011", "0.42517808", "0.42426333", "0.42385298", "0.42365813", "0.42322347", "0.423193", "0.42217842", "0.42178968", "0.421679", "0.420047", "0.4199153", "0.41982177", "0.4194773", "0.41914508", "0.41896757", "0.4189469", "0.41790104", "0.41790104", "0.4174798", "0.41657656" ]
0.65501356
0
Returns the current status of the specified delivery channel. If a delivery channel is not specified, this action returns the current status of all delivery channels associated with the account. NOTE:Currently, you can specify only one delivery channel per account.
public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest, AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "im.turms.common.constant.MessageDeliveryStatus getDeliveryStatus();", "int getDeliveryStatusValue();", "private String getDesiredChannel(final IUpdateSettings settings, final ChannelXmlBean _installedChannelBean)\n\t{\n\t\tString desiredChannel = settings.getUpdateServerChannel().toLowerCase();\n\t\tString currentChannelName = _installedChannelBean.getName();\n\n\t\tif (!currentChannelName.equals(desiredChannel))\n\t\t{\n\t\t\tif (s_log.isInfoEnabled())\n\t\t\t{\n\t\t\t\ts_log.info(\"getDesiredChannel: User is switching distribution channel from \"\n\t\t\t\t\t+ \"installed channel (\" + currentChannelName + \") to new channel (\" + desiredChannel + \")\");\n\t\t\t}\n\t\t}\n\t\treturn desiredChannel;\n\t}", "public NotificationsChannel getChannel(String channelId) throws Exception;", "public boolean isActiveChannel(String channel)\n {\n return activeChannels.contains(channel);\n }", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "private ChannelXmlBean getCurrentChannelXmlBean(ChannelXmlBean installedChannelBean)\n\t{\n\t\tChannelXmlBean currentChannelBean = null;\n\t\tif (_settings.isRemoteUpdateSite())\n\t\t{\n\t\t\t// 3a. For server, Determine the channel that the user has (stable or snapshot)\n\t\t\tString channelName = getDesiredChannel(_settings, installedChannelBean);\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tStringBuilder releasePath = new StringBuilder(\"/\");\n\t\t\t\treleasePath.append(_settings.getUpdateServerPath());\n\t\t\t\treleasePath.append(\"/\");\n\t\t\t\treleasePath.append(channelName);\n\t\t\t\treleasePath.append(\"/\");\n\n\t\t\t\tcurrentChannelBean =\n\t\t\t\t\t_util.downloadCurrentRelease(_settings.getUpdateServer(),\n\t\t\t\t\t\tInteger.parseInt(_settings.getUpdateServerPort()), releasePath.toString(),\n\t\t\t\t\t\tRELEASE_XML_FILENAME, _app.getSquirrelPreferences().getProxySettings());\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\ts_log.error(\"Unexpected exception: \" + e.getMessage(), e);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcurrentChannelBean = _util.loadUpdateFromFileSystem(_settings.getFileSystemUpdatePath());\n\t\t}\n\t\treturn currentChannelBean;\n\t}", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}", "public Channel getChannel()\n {\n return channel;\n }", "public String getDeliverLogsStatus() {\n return this.deliverLogsStatus;\n }", "public String getCampaignStatus() {\r\n return campaignStatus;\r\n }", "public Channel getChannelAssigned1() {\n return channelAssigned1;\n }", "public String getChannel() {\n\t\treturn channel;\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public Status getStatus() {\n return board.getStatus();\n }", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;", "public String getSalesChannel() {\r\n return salesChannel;\r\n }", "public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}", "public Object getChannelActivityHistoryReport() {\n return channelActivityHistoryReport;\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getChannel() {\r\n return channel;\r\n }", "public String getChannel() {\n return channel;\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getCurrentTrace(Channel channel);", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Account status() {\n RestRequest request = new RestRequest();\n request.setResource(\"account/status\");\n\n return client.get(request, Account.class);\n }", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "public GetSmsDeliveryStatusResponse getSmsDeliveryStatus(\n\t\t\tGetSmsDeliveryStatus request) {\n\t\treturn null;\n\t}", "public Channel getChannel() {\n return channel;\n }", "boolean isAssignedForChannel(String ccid);", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public Channel getChannelAssigned2() {\n return channelAssigned2;\n }", "public Integer getAccountStatus() {\n return accountStatus;\n }", "public int getProgression(int channel) {\n\t\treturn chan[channel].progression;\n\t}", "public int getChannel() {\n return channel;\n }", "@ApiModelProperty(example = \"1\", value = \"The count of affected Channels across all products\")\n public Integer getAffectedChannelCount() {\n return affectedChannelCount;\n }", "public ReturnStatus getStatus() {\n return (ReturnStatus) get(\"status\");\n }", "public ChannelFuture getChannelFuture() {\n return channelFuture;\n }", "public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }", "public ElevatorStatusObject getStatus() {\n //Fetch destination\n \tif (queue.isEmpty()) {\n \t\treturn new ElevatorStatusObject(currentFloor, 0, -1);\n \t}\n \t\n //Fetch next call\n ElevatorQueueObject q = queue.getFirst();\n int index = 1;\n while (currentPassengers.size() == specs.getCarryCapacity() \n && (q.getActionType() == ElevatorAction.PICKUP ||\n !currentPassengers.contains(q.getPassenger()))) {\n q = queue.get(index);\n index += 1;\n }\n \n //Fetch destination\n int dest = 0;\n if (q.getActionType() == ElevatorAction.PICKUP) {\n dest = q.getPassenger().getOrigin();\n } else {\n dest = q.getPassenger().getDestination();\n }\n \n //Calculate direction\n int dir = 0;\n if (dest > currentFloor) {\n dir = 1;\n } else if (dest < currentFloor) {\n dir = -1;\n }\n \n return new ElevatorStatusObject(currentFloor, dir, dest);\n }", "public String getChannelId() {\n return channelId;\n }", "@RequestMapping(value = \"/remaining\", method = GET)\n int getRemainingMS(String userId, String channelId);", "@ApiModelProperty(value = \"Status of campaign or flow\")\r\n public String getStatus() {\r\n return status;\r\n }", "public Byte getChannel() {\n return channel;\n }", "public int currentChannelIndex() {\n int i = 0;\n for (YouTubeData data : mChannels) {\n if (data.mChannel.equals(mCurrentChannelID))\n return i;\n\n i++;\n }\n\n DUtils.log(\"should not get here: \" + DUtils.currentMethod());\n return 0;\n }", "com.google.ads.googleads.v14.common.YouTubeChannelInfo getYoutubeChannel();", "public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }", "java.lang.String getChannel();", "WorldUps.UDeliveryMade getDelivered(int index);", "public ConnectivityState getState() {\n ConnectivityState stateCopy = this.state;\n if (stateCopy != null) {\n return stateCopy;\n }\n throw new UnsupportedOperationException(\"Channel state API is not implemented\");\n }", "public String getChannelId()\n {\n return channelId;\n }", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "public static ArrayList<Integer> getActiveChannels() {\n\t\tString path = ACTIVE_CHANNELS;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\tArrayList<Integer> items = getActiveChannels(response);\n\t\treturn items;\n\t}", "public Cache getCachedContestStatuses() {\r\n return this.delegate.getCachedContestStatuses();\r\n }", "public CanceledServiceDelivery getCanceledServiceDelivery() {\n return this.canceledServiceDelivery;\n }", "public void updateChannel(String channel) {\n Log.d(\"BC\", \"update channel \" + channel);\n long startTime = 0l;\n long endTime = 0l;\n Cursor cursor = getContentResolver().query(\n ChannelData.BROKEN_CONTENT_URI,\n null,\n null,\n new String[]{channel},\n null\n );\n if (cursor.getCount() > 0) {\n if (cursor.moveToFirst()) {\n startTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.PARENT\n ));\n endTime = cursor.getLong(cursor.getColumnIndex(\n ChannelData.ITEM_ID\n ));\n }\n Log.w(TAG, \"Found broken threads in \" + channel + \", \"\n + new Date(startTime) + \" / \"+ new Date(endTime));\n }\n cursor.close();\n cursor = getContentResolver().query(\n Roster.CONTENT_URI,\n new String[]{Roster.LAST_UPDATED},\n \"jid=?\",\n new String[]{channel},\n null\n );\n if (cursor.getCount() == 1) {\n cursor.moveToFirst();\n startTime = cursor.getLong(\n cursor.getColumnIndex(Roster.LAST_UPDATED));\n IQ iq = new ChannelFetch(channel, startTime);\n try {\n send(iq);\n } catch (RemoteException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n cursor.close();\n DiscoverInfo info = new DiscoverInfo();\n info.setNode(channel);\n info.setType(org.jivesoftware.smack.packet.IQ.Type.GET);\n info.setTo(\"broadcaster.buddycloud.com\");\n try {\n send(info);\n } catch (InterruptedException e) {\n e.printStackTrace(System.err);\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }", "StatusItem getReconcileStatus();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }", "@JsonProperty(\"SalesAccessChannels\")\n public List<SalesAccessChannelsEnum> getSalesAccessChannels() {\n return salesAccessChannels;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }", "public ChannelType getChannelType() {\n return type;\n }", "protected Channel getChannel()\n {\n return mChannel;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "Channel channel() {\n return channel;\n }", "public String getChannelCode() {\n return channelCode;\n }", "EzyChannel getChannel();", "public int getCBRStatus();", "public String getChannelActivityHistoryReportReference() {\n return channelActivityHistoryReportReference;\n }", "com.google.protobuf.ByteString\n getChannelBytes();", "public String getStatus() {\n\t\treturn ticketStatus;\n\t}", "public Integer getChannelCode() {\n return channelCode;\n }", "public DeploymentStatus getDeploymentStatus();", "public String getReportStatus() {\r\n return reportStatus;\r\n }", "@java.lang.Override public org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel() {\n @SuppressWarnings(\"deprecation\")\n org.apache.drill.exec.proto.UserBitShared.RpcChannel result = org.apache.drill.exec.proto.UserBitShared.RpcChannel.valueOf(channel_);\n return result == null ? org.apache.drill.exec.proto.UserBitShared.RpcChannel.BIT_DATA : result;\n }", "public Integer getChannelid() {\n return channelid;\n }", "public io.grpc.channelz.v1.ChannelOrBuilder getChannelOrBuilder(\n int index) {\n return channel_.get(index);\n }", "public String\t\tgetOrderStatus();", "@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract boolean updateChannel(Channel channel);", "public ContestChannel getContestChannel(long contestChannelId) throws ContestManagementException {\r\n return null;\r\n }", "java.lang.String getChannelName();", "public StatusEnum getStatus() {\n return status;\n }", "public int getChannelId( ) {\r\n return channelId;\r\n }", "@java.lang.Override\n public org.apache.drill.exec.proto.UserBitShared.RpcChannel getChannel() {\n @SuppressWarnings(\"deprecation\")\n org.apache.drill.exec.proto.UserBitShared.RpcChannel result = org.apache.drill.exec.proto.UserBitShared.RpcChannel.valueOf(channel_);\n return result == null ? org.apache.drill.exec.proto.UserBitShared.RpcChannel.BIT_DATA : result;\n }", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest,\n AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public StatusOfCause getStatus() {\n\t\treturn StatusOfCause.valueOf(statusValue);\n\t}", "public java.util.List<? extends io.grpc.channelz.v1.ChannelOrBuilder> \n getChannelOrBuilderList() {\n return channel_;\n }", "public StatusEnum getStatus()\n {\n return status;\n }", "public Tile gameGetStatus(int r, int c) {\n\t\treturn gameBoard.getTileStatus(r, c);\n\t}", "public io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.CommercialOrder.OrderStatus result = io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.valueOf(status_);\n return result == null ? io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.UNRECOGNIZED : result;\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.CommercialOrder.OrderStatus result = io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.valueOf(status_);\n return result == null ? io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.UNRECOGNIZED : result;\n }", "private void status(final Object channel, final StatusRequest request) {\n final String contextId = request.getContext();\n final String requestId = request.getRequestId();\n LOGGER.info(\"received a status request for context \" + contextId\n + \" with request id \" + requestId);\n final boolean automaticUpdate = request.isRequestAutomaticUpdate();\n URI context = null;\n if (contextId != null) {\n try {\n context = new URI(contextId);\n } catch (URISyntaxException e) {\n LOGGER.warn(\"context '\"\n + contextId\n + \"' does not denote a valid URI. Unable to send status\"\n + \" response messages\");\n return;\n }\n }\n final String target = request.getSource();\n final StatusUpdateThread thread = new StatusUpdateThread(this, channel,\n target, context, requestId, automaticUpdate);\n thread.start();\n }", "public io.opencannabis.schema.commerce.CommercialOrder.OrderStatus getStatus() {\n @SuppressWarnings(\"deprecation\")\n io.opencannabis.schema.commerce.CommercialOrder.OrderStatus result = io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.valueOf(status_);\n return result == null ? io.opencannabis.schema.commerce.CommercialOrder.OrderStatus.UNRECOGNIZED : result;\n }" ]
[ "0.6550249", "0.5339389", "0.51395017", "0.51165205", "0.4998972", "0.49970868", "0.49918687", "0.49192792", "0.49164015", "0.48991886", "0.4847812", "0.48149845", "0.4809998", "0.47880983", "0.477208", "0.477208", "0.47690663", "0.4751516", "0.47375503", "0.47328836", "0.47294593", "0.4726967", "0.47078118", "0.47072428", "0.46975318", "0.46971744", "0.4690984", "0.4689648", "0.46853518", "0.4672859", "0.4645841", "0.46376595", "0.46370664", "0.46089503", "0.45742327", "0.45537704", "0.45332283", "0.4525483", "0.45079684", "0.44999433", "0.4496164", "0.4489286", "0.44853863", "0.4485339", "0.44613972", "0.44560176", "0.44460505", "0.44383183", "0.44317746", "0.44299695", "0.44298974", "0.44220194", "0.44201842", "0.4417496", "0.44100854", "0.43930757", "0.43807223", "0.43785387", "0.43771455", "0.4369117", "0.4367846", "0.4362293", "0.43530867", "0.4350876", "0.43462834", "0.4344246", "0.4337974", "0.4334283", "0.43297222", "0.43201205", "0.43114382", "0.42995068", "0.42978072", "0.42923787", "0.42766282", "0.42740208", "0.42703456", "0.42684865", "0.42684585", "0.42522648", "0.425176", "0.42447573", "0.4242316", "0.4235499", "0.4235183", "0.42329594", "0.4224257", "0.42205745", "0.42158553", "0.4202716", "0.4202573", "0.41979772", "0.4196294", "0.41934365", "0.4190619", "0.418834", "0.41769913", "0.41769913", "0.41739535", "0.41637245" ]
0.58098066
1
Returns the name of one or more specified configuration recorders. If the recorder name is not specified, this action returns the names of all the configuration recorders associated with the account. NOTE: Currently, you can specify only one configuration recorder per account.
public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest,\n AsyncHandler<DescribeConfigurationRecordersRequest, DescribeConfigurationRecordersResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public String getName() {\n\t\treturn this.recordingProperties.name();\n\t}", "public Map<String, RelyingPartyConfiguration> getRelyingPartyConfigurations();", "@RequestLine(\"GET /zones/{zoneName}/rrsets\")\n RRSetList getResourceRecordsOfZone(@Param(\"zoneName\") String zoneName);", "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "@RequestLine(\"GET /zones/{zoneName}/rrsets/{rrType}/{hostName}\")\n RRSetList getResourceRecordsOfDNameByType(@Param(\"zoneName\") String zoneName,\n @Param(\"hostName\") String hostName,\n @Param(\"rrType\") int rrType);", "public DescriptorExtensionList<RetryConditionConfig, Descriptor<RetryConditionConfig>> getRetryConditionDescriptors() {\n return Jenkins.getInstance().<RetryConditionConfig,Descriptor<RetryConditionConfig>>getDescriptorList(RetryConditionConfig.class);\n }", "public List<String> getRecordings(){\n findRecordings();\n return _records;\n }", "public RecordingProperties.Builder name(String name) {\n\t\t\tthis.name = name;\n\t\t\treturn this;\n\t\t}", "public List<Account> getAccounts(String customerName){\n List<Account> accounts = new ArrayList<>();\n try {\n accounts = getAccountsFromFile();\n } catch (Exception e) {\n System.out.println(messageService.unexpectedError(e));\n }\n System.out.println(accounts.stream().filter(a -> a.getCustomerName().equals(customerName))\n .collect(Collectors.toList()));\n return accounts.stream().filter(a -> a.getCustomerName().equals(customerName))\n .collect(Collectors.toList());\n }", "public List<String> getCustomRoomNames() {\n List<String> crooms = new ArrayList<String>();\n Set<String> names = plugin.getRoomsConfig().getConfigurationSection(\"rooms\").getKeys(false);\n for (String cr : names) {\n if (plugin.getRoomsConfig().getBoolean(\"rooms.\" + cr + \".user\") && plugin.getRoomsConfig().getBoolean(\"rooms.\" + cr + \".enabled\")) {\n crooms.add(cr);\n }\n }\n return crooms;\n }", "public java.util.List<io.grafeas.v1.Jwt.Builder> getJwtsBuilderList() {\n return getJwtsFieldBuilder().getBuilderList();\n }", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return this.mName;\n }", "public String getRecordName();", "public String getWatchedFields() {\n return watchedFields;\n }", "public char[] getRingSettings() {\r\n\t\treturn rotors.getRingSettings();\r\n\t}", "public AppConfigurationEntry[] getAppConfigurationEntry(String name) {\n if (name.equals(CONFIGNAME)) {\n return driverConf;\n }\n else {\n if (null != current)\n return current.getAppConfigurationEntry(name);\n else\n return null;\n }\n }", "public List<String> getLoggerNames();", "@RequestLine(\"GET /zones/{zoneName}/rrsets?limit={limit}&offset={offset}\")\n RRSetList getResourceRecordsOfZone(@Param(\"zoneName\") String zoneName, @Param(\"limit\") int limit, @Param(\"offset\") int offset);", "String getConfigName();", "public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder>\n getRepromptEventHandlersBuilderList() {\n return getRepromptEventHandlersFieldBuilder().getBuilderList();\n }", "public String getIdRecorder() {\n return idRecorder;\n }", "public ArrayList<Recording> getAll() {\r\n synchronized (lastUpdate) {\r\n if (System.currentTimeMillis() - lastUpdate > 60000) {\r\n update();\r\n }\r\n }\r\n return recordings;\r\n }", "public String showPlayListNames(){\n String namePlayList = \"\";\n for(int i = 0; i<MAX_PLAYLIST; i++){\n if(thePlayLists[i] != null){\n namePlayList += \"[\"+(i+1)+\"]\"+thePlayLists[i].getNamePlayList()+\"\\n\";\n }\n }\n return namePlayList;\n }", "public Map<UUID, String> getDroneNames() {\n return this.droneNames;\n }", "public ArrayList<Screen> getScreensFromConf(Configuration c) {\n\n ArrayList<Screen> screenArrayList = new ArrayList<>();\n\n for(Screen s : screens)\n if(s.getConfiguration() == c)\n screenArrayList.add(s);\n\n return screenArrayList;\n\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getGatewayId() != null)\n sb.append(\"GatewayId: \").append(getGatewayId()).append(\",\");\n if (getCapabilityNamespace() != null)\n sb.append(\"CapabilityNamespace: \").append(getCapabilityNamespace()).append(\",\");\n if (getCapabilityConfiguration() != null)\n sb.append(\"CapabilityConfiguration: \").append(getCapabilityConfiguration());\n sb.append(\"}\");\n return sb.toString();\n }", "public String getConfigurationName() {\n return configurationName;\n }", "List<ContextBuilderConfigurator> getConfigurators() {\n return configurators;\n }", "public String getConfigName () {\n return this.configName;\n }", "public String recordDetails() {\r\n\t\tString recordDetails = \"RENTAL RECORD\\n\";\r\n\t\tString line = \"\\n--------------------------------------\\n\";\r\n\t\tfor (int i = 0; i < records.size(); i++) {\r\n\t\t\trecordDetails = recordDetails + records.get(records.size() - 1 - i).getDetails() + line;\r\n\t\t}\r\n\t\treturn recordDetails;\r\n\t}", "public void checkState(String recordingName)\n {\n // Get the Recorinding List\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n RecordingList rl = rm.getEntries();\n\n // Walk the list\n for (int x = 0; x < rl.size(); x++)\n {\n // Match the name to the recording\n RecordingRequest rr = rl.getRecordingRequest(x);\n\n // Print state if match\n if (recordingName.equals((String) rr.getAppData(recordingName)))\n {\n\n }\n }\n }", "public Map<String, Set<String>> getBufferedDeviceNamesByType();", "public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }", "public final String getName() {\n String ret = null;\n for (String s : getNameFields()) {\n if (ret == null) {\n ret = get(s);\n } else {\n ret = ret + \",\" + get(s);\n }\n }\n return ret;\n }", "public String getFixedRotatorConfigName() {\n return null;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getAlarmNames() != null)\n sb.append(\"AlarmNames: \").append(getAlarmNames()).append(\",\");\n if (getEnable() != null)\n sb.append(\"Enable: \").append(getEnable()).append(\",\");\n if (getRollback() != null)\n sb.append(\"Rollback: \").append(getRollback());\n sb.append(\"}\");\n return sb.toString();\n }", "public List<ParameterDefinition> getParameterList() {\n if (this.telemetryName != null) {\n TelemetryChartDefinition teleDef = \n this.getTelemetrys().get(telemetryName);\n if (teleDef == null) {\n TelemetryClient client = ProjectBrowserSession.get().getTelemetryClient();\n try {\n teleDef = client.getChartDefinition(this.telemetryName);\n this.getTelemetrys().put(telemetryName, teleDef);\n return teleDef.getParameterDefinition();\n }\n catch (TelemetryClientException e) {\n this.feedback = \"Exception when retrieving Telemetry chart definition: \" + e.getMessage();\n }\n }\n else {\n return teleDef.getParameterDefinition();\n }\n }\n return new ArrayList<ParameterDefinition>();\n }", "@SystemApi\n @NonNull\n public List<IkeConfigRequest> getConfigurationRequests() {\n return Collections.unmodifiableList(Arrays.asList(mConfigRequests));\n }", "public String getReceiverName() {\n return receiverName;\n }", "public String getReceiverName() {\n return receiverName;\n }", "@Override\n\tpublic List<Object[]> getCRConfig(Short tenantId) {\n\t\tStringBuilder query = new StringBuilder().append(QueryConstants.ALIGMENT_CR_CONFIG);\n\t\tList<Object> queryParam = new ArrayList<Object>();\n\t\tqueryParam.add(tenantId);\n\t\treturn genericDAO.findEntitiesByBuildQueries(query.toString(), queryParam, 0, -1);\t\t\n\t}", "public java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder> \n getBackupsBuilderList() {\n return getBackupsFieldBuilder().getBuilderList();\n }", "public void deleteRecording(String recordingName) throws IndexOutOfBoundsException, SecurityException,\n AccessDeniedException\n {\n // Get the Recording List\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n // Security Exception could be thrown here\n RecordingList rl = rm.getEntries();\n\n // Walk the list\n for (int x = 0; x < rl.size(); x++)\n {\n // Match the name to the recording\n // IndexOutOfBoundsException can be thrown here\n RecordingRequest rr = rl.getRecordingRequest(x);\n\n // Delete if match\n if (recordingName.equals((String) rr.getAppData(recordingName)))\n {\n System.out.println(\"*************************************************************\");\n System.out.println(\"* Deleting \" + recordingName + \" as \" + rr.toString() + \"**\");\n System.out.println(\"*************************************************************\");\n\n // SecurityException or AccessDeniedException can be thrown here\n rr.delete();\n return;\n }\n }\n }", "public String getRouters(){\n wifi.startScan();\n results = wifi.getScanResults();\n size = results.size();\n String jsonRouter = new Gson().toJson(results);\n return jsonRouter;\n }", "public ProxyConfig[] getProxyConfigList();", "public String getDisplayName() {\n return configName;\n }", "public java.util.List<String> getAlarmNames() {\n if (alarmNames == null) {\n alarmNames = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return alarmNames;\n }", "String getReportsTo();", "public static ScreenRecorder configScreeenRecorder() throws Exception, AWTException {\n GraphicsConfiguration gc = GraphicsEnvironment//\r\n .getLocalGraphicsEnvironment()//\r\n .getDefaultScreenDevice()//\r\n .getDefaultConfiguration();\r\n\r\n //Create a instance of ScreenRecorder with the required configurations\r\n ScreenRecorder screenRecorder = new ScreenRecorder(gc,\r\n null, new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n DepthKey, (int)24, FrameRateKey, Rational.valueOf(15),\r\n QualityKey, 1.0f,\r\n KeyFrameIntervalKey, (int) (15 * 60)),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,\"black\",\r\n FrameRateKey, Rational.valueOf(30)),\r\n null,new File(Constant.Path_VideoRecordings));\r\n\r\n return screenRecorder;\r\n}", "public void viewRoads(){\n for(int i = 0; i < roads.size(); i++)\n System.out.println(\"[\" + (i+1) + \"] \" + roads.get(i).getName());\n }", "public List<String> getDelegationNames(){\t\t\r\n\t\tConnection conn = DBConnect.getConnection();\r\n\t\tString sql = \"select delegation_name from delegation\";\r\n\t\tList<String> names = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\twhile(rst.next()) {\r\n\t\t\t\tnames.add(rst.getString(\"delegation_name\"));\r\n\t\t\t}\r\n\t\t\trst.close();\r\n\t\t\tpst.close();\r\n\t\t}catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n e.printStackTrace();\t\t\t\r\n\t\t}\r\n\t\treturn names;\r\n\t}", "public void playbackRecording(String recordingName, ServiceContext svcCtx) throws IndexOutOfBoundsException,\n SecurityException, NullPointerException, AccessDeniedException\n {\n RecordingRequest rr = null;\n // Get the Recorinding List\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n // Security Exception could be thrown here\n RecordingList rl = rm.getEntries();\n\n // Walk the list\n for (int x = 0; x < rl.size(); x++)\n {\n // Match the name to the recording\n // IndexOutOfBoundsException can be thrown here\n rr = rl.getRecordingRequest(x);\n\n // Delete if match\n if (recordingName.equals((String) rr.getAppData(recordingName)))\n {\n System.out.println(\"************************************************************\");\n System.out.println(\"* Selecting \" + recordingName + \" as \" + rr.toString() + \"**\");\n System.out.println(\"************************************************************\");\n break;\n }\n }\n\n // Playback the recording on the given Service Context\n if (svcCtx == null)\n {\n throw new NullPointerException(\"SeviceContext parameter is null\");\n }\n else\n {\n // May throw IllegalStateException or AccessDeniedException\n RecordedService rs = ((LeafRecordingRequest) rr).getService();\n // May throw IllegalStateException or SecurityException\n svcCtx.select(rs);\n }\n }", "public final String getKeys() {\n StringBuilder sb = new StringBuilder();\n boolean append = false;\n for (Key key : this.parameters.keySet()) {\n if (append)\n sb.append(\",\");\n sb.append(key);\n append = true;\n }\n return sb.toString();\n }", "@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();", "public String[] getDebugCameraNames() {\n if (mPresentationEngine == null) {\n return null;\n } else {\n return mPresentationEngine.getDebugCameraNames();\n }\n }", "@Override\n public Class<AdsconfigRecord> getRecordType() {\n return AdsconfigRecord.class;\n }", "public java.util.List<org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera.Builder> \n getCameraBuilderList() {\n return getCameraFieldBuilder().getBuilderList();\n }", "public java.util.List<RouteFilterPrefix> getAddAllowedPrefixesToDirectConnectGateway() {\n if (addAllowedPrefixesToDirectConnectGateway == null) {\n addAllowedPrefixesToDirectConnectGateway = new com.amazonaws.internal.SdkInternalList<RouteFilterPrefix>();\n }\n return addAllowedPrefixesToDirectConnectGateway;\n }", "public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter.Builder>\n getParametersBuilderList() {\n return getParametersFieldBuilder().getBuilderList();\n }", "private List<IntWatcher> getWatchers(String name) {\n List<IntWatcher> ws = watchers.get(name);\n if (ws == null) {\n ws = new ArrayList<>();\n watchers.put(name, ws);\n }\n return ws;\n }", "public java.util.List<com.google.cloud.datafusion.v1beta1.Accelerator.Builder>\n getAcceleratorsBuilderList() {\n return getAcceleratorsFieldBuilder().getBuilderList();\n }", "String getControllerConfiguration(String clientId);", "public java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult.Builder> \n getReaultBuilderList() {\n return getReaultFieldBuilder().getBuilderList();\n }", "List<String> getAttendingDoctorNames();", "public java.util.List<? extends io.grafeas.v1.JwtOrBuilder> getJwtsOrBuilderList() {\n if (jwtsBuilder_ != null) {\n return jwtsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(jwts_);\n }\n }", "public String[] getConnectedResourceBankNames(ResourceType type)\n\t{\n\t\tString[] names = this.connectedBankNames.get(type);\n\t\t\n\t\tif (names == null)\n\t\t{\n\t\t\t/*\n\t\t\tSystem.err.println(\"ResourceType \" + type + \"in GamePhase \" + this \n\t\t\t\t\t+ \" hasn't been introduced.\");\n\t\t\t*/\n\t\t\treturn new String[0];\n\t\t}\n\t\t\n\t\t// Clones the table just in case the caller would try to edit the \n\t\t// contents\n\t\treturn names.clone();\n\t}", "public Map<String, Appender> getAppenders() {\n return privateConfig.loggerConfig.getAppenders();\n }", "public synchronized ArrayList<String> getNameofOptions(String optionsetName)\n {\n OptionSet Opset_=this.findOptionSetReturnOptionSet(optionsetName);\n ArrayList<String> optionNames=new ArrayList<String>();\n for(OptionSet.Option option : Opset_.getOptions()){\n \toptionNames.add(option.getPartName());\n }\n return optionNames;\n }", "String getAccountList(int accountId);", "public List<Configuration> getAll();", "public String getName() {\n return \"Payment Plan Configuration BootStrap\";\n }", "public List<ACR> getAcrs() {\n return acrs;\n }", "public String getRecordPath() {\n return recordPath;\n }", "public cosmos.distribution.v1beta1.QueryOuterClass.QueryDelegationRewardsResponse delegationRewards(cosmos.distribution.v1beta1.QueryOuterClass.QueryDelegationRewardsRequest request) {\n return blockingUnaryCall(\n getChannel(), getDelegationRewardsMethod(), getCallOptions(), request);\n }", "@java.lang.Override\n public java.util.List<? extends io.grafeas.v1.JwtOrBuilder> getJwtsOrBuilderList() {\n return jwts_;\n }", "public List<ProgressConfigurationType> getAllConfigurations();", "public Collection<WriterProxy> getMatchedWriters() {\r\n\t\treturn writerProxies.values();\r\n\t}", "public List<Recordings> getRecordings() {\r\n\r\n\t\tList<Recordings> recordingsList = new ArrayList<Recordings>();\r\n\r\n\t\tList<Map<String, Object>> rows = jdbcTemplate.queryForList(\"Select * from RECORDINGS\");\r\n\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tRecordings recordings = new Recordings();\r\n\t\t\trecordings.setFileName((String)row.get(\"FILENAME\"));\r\n\t\t\trecordings.setSourceURL((String)row.get(\"SOURCEURL\"));\r\n\t\t\trecordings.setId(((BigDecimal)row.get(\"ID\")).longValue());\r\n\t\t\trecordingsList.add(recordings);\r\n\t\t}\r\n\t\treturn recordingsList;\r\n\t}", "public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.Builder>\n getParametersBuilderList() {\n return getParametersFieldBuilder().getBuilderList();\n }", "public ReactorResult<java.lang.String> getAllRecordingDate_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), RECORDINGDATE, java.lang.String.class);\r\n\t}", "public String allCustomers(){\n String outputString = \"Customer accounts:\"+\"\\n\";\n for(Customer record : bank.getName2CustomersMapping().values()){\n outputString += record.getFullName()+\" \"+record.getAccounts().toString()+\"\\n\";\n }\n return outputString;\n }", "public List<String> getOptionsNames();", "public synchronized String toString() {\n\t\tString nl = System.lineSeparator();\n\t\t\n\t\t// get list of all peers for all files\n\t\tString files = \"\";\n\t\tfor(String filename : peerRecord.keySet()) {\n\t\t\tfiles += \"- \" + filename + \": \";\n\t\t\tfor(PeerConnection peer : peerRecord.get(filename)) {\n\t\t\t\tfiles += peer + \" \";\n\t\t\t}\n\t\t\tfiles += nl;\n\t\t\t\n\t\t}\n\t\treturn \"[TRACKER]\" + nl + files;\n\t}", "public RealmConfig getRealm() {\n return realm;\n }", "public RunConfiguration[] getRunConfigurations()\n\t{\n\t\treturn runConfigurations;\n\t}", "public synchronized boolean isRecording() {\n return mRecorder != null;\n }", "java.lang.String getQueueName();", "public Account getReportsToAccount() {\n return reportsToAccount;\n }", "public ReceivablesVO getReceivables(Integer recId)\n throws RemoteException, FinderException;", "public com.google.protobuf.ProtocolStringList\n getResourceNamesList() {\n return resourceNames_;\n }", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }", "public List<IntentMatcherConfig> getMatcherConfigs() {\n return matcherConfigs;\n }", "List<Map<String,Object>> getConfigList(Request request, String configtype);", "@Override\n\tpublic JasperReportsConfiguration getConfiguration() {\n\t\treturn jrContext;\n\t}", "public static final Map<String,String> getAcctAndConfig(){\n Map<String,String> configMap = new HashMap<String,String>();\n configMap.putAll(getConfig());\n\n // Account Credential\n configMap.put(\"acct1.UserName\", \"davidvuletas-facilitator_api1.hotmail.com\");\n configMap.put(\"acct1.Password\", \"9VDE7D2FNEEV7NNZ\");\n configMap.put(\"acct1.Signature\", \"A3ejB8ILKLcnXEmI9gnSbvIApl3WAKiiOReECJ1icAFpbFLuYNW0O1sN\");\n configMap.put(\"acct1.AppId\", \"APP-80W284485P519543T\");\n\n // Sandbox Email Address\n configMap.put(\"sandbox.EmailAddress\", \"[email protected]\");\n\n return configMap;\n }", "public void mediaRecorderParameterFetching(MediaRecorder recorder) {\n recorder.setAudioSource(5);\n recorder.setVideoSource(1);\n recorder.setProfile(this.mProfile);\n recorder.setVideoSize(this.mProfile.videoFrameWidth, this.mProfile.videoFrameHeight);\n recorder.setMaxDuration(getOverrodeVideoDuration());\n }", "public java.util.List<com.google.cloud.recommender.v1.Recommendation.InsightReference.Builder>\n getAssociatedInsightsBuilderList() {\n return getAssociatedInsightsFieldBuilder().getBuilderList();\n }", "public java.util.List<com.google.devtools.clouddebugger.v2.Breakpoint.Builder>\n getBreakpointsBuilderList() {\n return getBreakpointsFieldBuilder().getBuilderList();\n }", "java.lang.String getRaceList();" ]
[ "0.5030121", "0.46950406", "0.4664744", "0.43951795", "0.4305083", "0.41470537", "0.41081908", "0.40704036", "0.40624398", "0.39792278", "0.39463228", "0.39422533", "0.39417094", "0.39232427", "0.39203903", "0.39018285", "0.38975197", "0.38924378", "0.38038126", "0.37987447", "0.37983564", "0.37973872", "0.37953213", "0.37815845", "0.37603602", "0.37572193", "0.3751686", "0.3749908", "0.37450612", "0.37449238", "0.37448505", "0.3730831", "0.37307465", "0.37129512", "0.37075895", "0.37073344", "0.3705303", "0.3700569", "0.369699", "0.36807576", "0.36807576", "0.3672319", "0.36709374", "0.36705106", "0.36700642", "0.36660463", "0.365854", "0.36573443", "0.36523566", "0.3652065", "0.36454085", "0.36409375", "0.36394343", "0.36272213", "0.36248547", "0.36110505", "0.36036083", "0.35964373", "0.35929114", "0.35900804", "0.35768342", "0.3566964", "0.3566746", "0.35666737", "0.35633317", "0.35481635", "0.3545427", "0.3543529", "0.35324883", "0.35318655", "0.35303363", "0.35293475", "0.35292682", "0.35277146", "0.35263148", "0.35252056", "0.3516798", "0.35155576", "0.3511293", "0.35112673", "0.35050663", "0.3503447", "0.35004106", "0.34967917", "0.34964833", "0.3490988", "0.3489356", "0.34847328", "0.34820405", "0.34805074", "0.34728307", "0.3472525", "0.34720758", "0.3469037", "0.3466974", "0.3466499", "0.34627077", "0.34562656", "0.34473315", "0.34462103" ]
0.5873723
0
Returns the name of one or more specified configuration recorders. If the recorder name is not specified, this action returns the names of all the configuration recorders associated with the account. NOTE: Currently, you can specify only one configuration recorder per account.
public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest, AsyncHandler<DescribeConfigurationRecordersRequest, DescribeConfigurationRecordersResult> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;", "public String getName() {\n\t\treturn this.recordingProperties.name();\n\t}", "public Map<String, RelyingPartyConfiguration> getRelyingPartyConfigurations();", "@RequestLine(\"GET /zones/{zoneName}/rrsets\")\n RRSetList getResourceRecordsOfZone(@Param(\"zoneName\") String zoneName);", "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "@RequestLine(\"GET /zones/{zoneName}/rrsets/{rrType}/{hostName}\")\n RRSetList getResourceRecordsOfDNameByType(@Param(\"zoneName\") String zoneName,\n @Param(\"hostName\") String hostName,\n @Param(\"rrType\") int rrType);", "public DescriptorExtensionList<RetryConditionConfig, Descriptor<RetryConditionConfig>> getRetryConditionDescriptors() {\n return Jenkins.getInstance().<RetryConditionConfig,Descriptor<RetryConditionConfig>>getDescriptorList(RetryConditionConfig.class);\n }", "public List<String> getRecordings(){\n findRecordings();\n return _records;\n }", "public RecordingProperties.Builder name(String name) {\n\t\t\tthis.name = name;\n\t\t\treturn this;\n\t\t}", "public List<Account> getAccounts(String customerName){\n List<Account> accounts = new ArrayList<>();\n try {\n accounts = getAccountsFromFile();\n } catch (Exception e) {\n System.out.println(messageService.unexpectedError(e));\n }\n System.out.println(accounts.stream().filter(a -> a.getCustomerName().equals(customerName))\n .collect(Collectors.toList()));\n return accounts.stream().filter(a -> a.getCustomerName().equals(customerName))\n .collect(Collectors.toList());\n }", "public List<String> getCustomRoomNames() {\n List<String> crooms = new ArrayList<String>();\n Set<String> names = plugin.getRoomsConfig().getConfigurationSection(\"rooms\").getKeys(false);\n for (String cr : names) {\n if (plugin.getRoomsConfig().getBoolean(\"rooms.\" + cr + \".user\") && plugin.getRoomsConfig().getBoolean(\"rooms.\" + cr + \".enabled\")) {\n crooms.add(cr);\n }\n }\n return crooms;\n }", "public java.util.List<io.grafeas.v1.Jwt.Builder> getJwtsBuilderList() {\n return getJwtsFieldBuilder().getBuilderList();\n }", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return this.mName;\n }", "public String getRecordName();", "public String getWatchedFields() {\n return watchedFields;\n }", "public char[] getRingSettings() {\r\n\t\treturn rotors.getRingSettings();\r\n\t}", "public AppConfigurationEntry[] getAppConfigurationEntry(String name) {\n if (name.equals(CONFIGNAME)) {\n return driverConf;\n }\n else {\n if (null != current)\n return current.getAppConfigurationEntry(name);\n else\n return null;\n }\n }", "public List<String> getLoggerNames();", "@RequestLine(\"GET /zones/{zoneName}/rrsets?limit={limit}&offset={offset}\")\n RRSetList getResourceRecordsOfZone(@Param(\"zoneName\") String zoneName, @Param(\"limit\") int limit, @Param(\"offset\") int offset);", "public String getIdRecorder() {\n return idRecorder;\n }", "public ArrayList<Recording> getAll() {\r\n synchronized (lastUpdate) {\r\n if (System.currentTimeMillis() - lastUpdate > 60000) {\r\n update();\r\n }\r\n }\r\n return recordings;\r\n }", "public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder>\n getRepromptEventHandlersBuilderList() {\n return getRepromptEventHandlersFieldBuilder().getBuilderList();\n }", "String getConfigName();", "public String showPlayListNames(){\n String namePlayList = \"\";\n for(int i = 0; i<MAX_PLAYLIST; i++){\n if(thePlayLists[i] != null){\n namePlayList += \"[\"+(i+1)+\"]\"+thePlayLists[i].getNamePlayList()+\"\\n\";\n }\n }\n return namePlayList;\n }", "public Map<UUID, String> getDroneNames() {\n return this.droneNames;\n }", "public ArrayList<Screen> getScreensFromConf(Configuration c) {\n\n ArrayList<Screen> screenArrayList = new ArrayList<>();\n\n for(Screen s : screens)\n if(s.getConfiguration() == c)\n screenArrayList.add(s);\n\n return screenArrayList;\n\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getGatewayId() != null)\n sb.append(\"GatewayId: \").append(getGatewayId()).append(\",\");\n if (getCapabilityNamespace() != null)\n sb.append(\"CapabilityNamespace: \").append(getCapabilityNamespace()).append(\",\");\n if (getCapabilityConfiguration() != null)\n sb.append(\"CapabilityConfiguration: \").append(getCapabilityConfiguration());\n sb.append(\"}\");\n return sb.toString();\n }", "public String recordDetails() {\r\n\t\tString recordDetails = \"RENTAL RECORD\\n\";\r\n\t\tString line = \"\\n--------------------------------------\\n\";\r\n\t\tfor (int i = 0; i < records.size(); i++) {\r\n\t\t\trecordDetails = recordDetails + records.get(records.size() - 1 - i).getDetails() + line;\r\n\t\t}\r\n\t\treturn recordDetails;\r\n\t}", "public String getConfigurationName() {\n return configurationName;\n }", "List<ContextBuilderConfigurator> getConfigurators() {\n return configurators;\n }", "public String getConfigName () {\n return this.configName;\n }", "public void checkState(String recordingName)\n {\n // Get the Recorinding List\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n RecordingList rl = rm.getEntries();\n\n // Walk the list\n for (int x = 0; x < rl.size(); x++)\n {\n // Match the name to the recording\n RecordingRequest rr = rl.getRecordingRequest(x);\n\n // Print state if match\n if (recordingName.equals((String) rr.getAppData(recordingName)))\n {\n\n }\n }\n }", "public Map<String, Set<String>> getBufferedDeviceNamesByType();", "public java.util.List<org.hyperledger.fabric.protos.token.Transaction.PlainDelegatedOutput.Builder> \n getDelegatedOutputsBuilderList() {\n return getDelegatedOutputsFieldBuilder().getBuilderList();\n }", "public String getFixedRotatorConfigName() {\n return null;\n }", "public final String getName() {\n String ret = null;\n for (String s : getNameFields()) {\n if (ret == null) {\n ret = get(s);\n } else {\n ret = ret + \",\" + get(s);\n }\n }\n return ret;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getAlarmNames() != null)\n sb.append(\"AlarmNames: \").append(getAlarmNames()).append(\",\");\n if (getEnable() != null)\n sb.append(\"Enable: \").append(getEnable()).append(\",\");\n if (getRollback() != null)\n sb.append(\"Rollback: \").append(getRollback());\n sb.append(\"}\");\n return sb.toString();\n }", "public List<ParameterDefinition> getParameterList() {\n if (this.telemetryName != null) {\n TelemetryChartDefinition teleDef = \n this.getTelemetrys().get(telemetryName);\n if (teleDef == null) {\n TelemetryClient client = ProjectBrowserSession.get().getTelemetryClient();\n try {\n teleDef = client.getChartDefinition(this.telemetryName);\n this.getTelemetrys().put(telemetryName, teleDef);\n return teleDef.getParameterDefinition();\n }\n catch (TelemetryClientException e) {\n this.feedback = \"Exception when retrieving Telemetry chart definition: \" + e.getMessage();\n }\n }\n else {\n return teleDef.getParameterDefinition();\n }\n }\n return new ArrayList<ParameterDefinition>();\n }", "@SystemApi\n @NonNull\n public List<IkeConfigRequest> getConfigurationRequests() {\n return Collections.unmodifiableList(Arrays.asList(mConfigRequests));\n }", "public String getReceiverName() {\n return receiverName;\n }", "public String getReceiverName() {\n return receiverName;\n }", "public void deleteRecording(String recordingName) throws IndexOutOfBoundsException, SecurityException,\n AccessDeniedException\n {\n // Get the Recording List\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n // Security Exception could be thrown here\n RecordingList rl = rm.getEntries();\n\n // Walk the list\n for (int x = 0; x < rl.size(); x++)\n {\n // Match the name to the recording\n // IndexOutOfBoundsException can be thrown here\n RecordingRequest rr = rl.getRecordingRequest(x);\n\n // Delete if match\n if (recordingName.equals((String) rr.getAppData(recordingName)))\n {\n System.out.println(\"*************************************************************\");\n System.out.println(\"* Deleting \" + recordingName + \" as \" + rr.toString() + \"**\");\n System.out.println(\"*************************************************************\");\n\n // SecurityException or AccessDeniedException can be thrown here\n rr.delete();\n return;\n }\n }\n }", "@Override\n\tpublic List<Object[]> getCRConfig(Short tenantId) {\n\t\tStringBuilder query = new StringBuilder().append(QueryConstants.ALIGMENT_CR_CONFIG);\n\t\tList<Object> queryParam = new ArrayList<Object>();\n\t\tqueryParam.add(tenantId);\n\t\treturn genericDAO.findEntitiesByBuildQueries(query.toString(), queryParam, 0, -1);\t\t\n\t}", "public java.util.List<yandex.cloud.api.ydb.v1.BackupOuterClass.Backup.Builder> \n getBackupsBuilderList() {\n return getBackupsFieldBuilder().getBuilderList();\n }", "public String getRouters(){\n wifi.startScan();\n results = wifi.getScanResults();\n size = results.size();\n String jsonRouter = new Gson().toJson(results);\n return jsonRouter;\n }", "public ProxyConfig[] getProxyConfigList();", "public java.util.List<String> getAlarmNames() {\n if (alarmNames == null) {\n alarmNames = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return alarmNames;\n }", "public static ScreenRecorder configScreeenRecorder() throws Exception, AWTException {\n GraphicsConfiguration gc = GraphicsEnvironment//\r\n .getLocalGraphicsEnvironment()//\r\n .getDefaultScreenDevice()//\r\n .getDefaultConfiguration();\r\n\r\n //Create a instance of ScreenRecorder with the required configurations\r\n ScreenRecorder screenRecorder = new ScreenRecorder(gc,\r\n null, new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n DepthKey, (int)24, FrameRateKey, Rational.valueOf(15),\r\n QualityKey, 1.0f,\r\n KeyFrameIntervalKey, (int) (15 * 60)),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,\"black\",\r\n FrameRateKey, Rational.valueOf(30)),\r\n null,new File(Constant.Path_VideoRecordings));\r\n\r\n return screenRecorder;\r\n}", "String getReportsTo();", "public String getDisplayName() {\n return configName;\n }", "public void viewRoads(){\n for(int i = 0; i < roads.size(); i++)\n System.out.println(\"[\" + (i+1) + \"] \" + roads.get(i).getName());\n }", "public void playbackRecording(String recordingName, ServiceContext svcCtx) throws IndexOutOfBoundsException,\n SecurityException, NullPointerException, AccessDeniedException\n {\n RecordingRequest rr = null;\n // Get the Recorinding List\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n // Security Exception could be thrown here\n RecordingList rl = rm.getEntries();\n\n // Walk the list\n for (int x = 0; x < rl.size(); x++)\n {\n // Match the name to the recording\n // IndexOutOfBoundsException can be thrown here\n rr = rl.getRecordingRequest(x);\n\n // Delete if match\n if (recordingName.equals((String) rr.getAppData(recordingName)))\n {\n System.out.println(\"************************************************************\");\n System.out.println(\"* Selecting \" + recordingName + \" as \" + rr.toString() + \"**\");\n System.out.println(\"************************************************************\");\n break;\n }\n }\n\n // Playback the recording on the given Service Context\n if (svcCtx == null)\n {\n throw new NullPointerException(\"SeviceContext parameter is null\");\n }\n else\n {\n // May throw IllegalStateException or AccessDeniedException\n RecordedService rs = ((LeafRecordingRequest) rr).getService();\n // May throw IllegalStateException or SecurityException\n svcCtx.select(rs);\n }\n }", "public List<String> getDelegationNames(){\t\t\r\n\t\tConnection conn = DBConnect.getConnection();\r\n\t\tString sql = \"select delegation_name from delegation\";\r\n\t\tList<String> names = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\twhile(rst.next()) {\r\n\t\t\t\tnames.add(rst.getString(\"delegation_name\"));\r\n\t\t\t}\r\n\t\t\trst.close();\r\n\t\t\tpst.close();\r\n\t\t}catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n e.printStackTrace();\t\t\t\r\n\t\t}\r\n\t\treturn names;\r\n\t}", "public final String getKeys() {\n StringBuilder sb = new StringBuilder();\n boolean append = false;\n for (Key key : this.parameters.keySet()) {\n if (append)\n sb.append(\",\");\n sb.append(key);\n append = true;\n }\n return sb.toString();\n }", "@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();", "public String[] getDebugCameraNames() {\n if (mPresentationEngine == null) {\n return null;\n } else {\n return mPresentationEngine.getDebugCameraNames();\n }\n }", "@Override\n public Class<AdsconfigRecord> getRecordType() {\n return AdsconfigRecord.class;\n }", "public java.util.List<org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera.Builder> \n getCameraBuilderList() {\n return getCameraFieldBuilder().getBuilderList();\n }", "public java.util.List<RouteFilterPrefix> getAddAllowedPrefixesToDirectConnectGateway() {\n if (addAllowedPrefixesToDirectConnectGateway == null) {\n addAllowedPrefixesToDirectConnectGateway = new com.amazonaws.internal.SdkInternalList<RouteFilterPrefix>();\n }\n return addAllowedPrefixesToDirectConnectGateway;\n }", "public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Intent.Parameter.Builder>\n getParametersBuilderList() {\n return getParametersFieldBuilder().getBuilderList();\n }", "private List<IntWatcher> getWatchers(String name) {\n List<IntWatcher> ws = watchers.get(name);\n if (ws == null) {\n ws = new ArrayList<>();\n watchers.put(name, ws);\n }\n return ws;\n }", "public java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult.Builder> \n getReaultBuilderList() {\n return getReaultFieldBuilder().getBuilderList();\n }", "public java.util.List<com.google.cloud.datafusion.v1beta1.Accelerator.Builder>\n getAcceleratorsBuilderList() {\n return getAcceleratorsFieldBuilder().getBuilderList();\n }", "String getControllerConfiguration(String clientId);", "List<String> getAttendingDoctorNames();", "public java.util.List<? extends io.grafeas.v1.JwtOrBuilder> getJwtsOrBuilderList() {\n if (jwtsBuilder_ != null) {\n return jwtsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(jwts_);\n }\n }", "public Map<String, Appender> getAppenders() {\n return privateConfig.loggerConfig.getAppenders();\n }", "public String[] getConnectedResourceBankNames(ResourceType type)\n\t{\n\t\tString[] names = this.connectedBankNames.get(type);\n\t\t\n\t\tif (names == null)\n\t\t{\n\t\t\t/*\n\t\t\tSystem.err.println(\"ResourceType \" + type + \"in GamePhase \" + this \n\t\t\t\t\t+ \" hasn't been introduced.\");\n\t\t\t*/\n\t\t\treturn new String[0];\n\t\t}\n\t\t\n\t\t// Clones the table just in case the caller would try to edit the \n\t\t// contents\n\t\treturn names.clone();\n\t}", "String getAccountList(int accountId);", "public List<ACR> getAcrs() {\n return acrs;\n }", "public String getRecordPath() {\n return recordPath;\n }", "public cosmos.distribution.v1beta1.QueryOuterClass.QueryDelegationRewardsResponse delegationRewards(cosmos.distribution.v1beta1.QueryOuterClass.QueryDelegationRewardsRequest request) {\n return blockingUnaryCall(\n getChannel(), getDelegationRewardsMethod(), getCallOptions(), request);\n }", "public List<Configuration> getAll();", "public synchronized ArrayList<String> getNameofOptions(String optionsetName)\n {\n OptionSet Opset_=this.findOptionSetReturnOptionSet(optionsetName);\n ArrayList<String> optionNames=new ArrayList<String>();\n for(OptionSet.Option option : Opset_.getOptions()){\n \toptionNames.add(option.getPartName());\n }\n return optionNames;\n }", "public String getName() {\n return \"Payment Plan Configuration BootStrap\";\n }", "@java.lang.Override\n public java.util.List<? extends io.grafeas.v1.JwtOrBuilder> getJwtsOrBuilderList() {\n return jwts_;\n }", "public Collection<WriterProxy> getMatchedWriters() {\r\n\t\treturn writerProxies.values();\r\n\t}", "public List<ProgressConfigurationType> getAllConfigurations();", "public List<Recordings> getRecordings() {\r\n\r\n\t\tList<Recordings> recordingsList = new ArrayList<Recordings>();\r\n\r\n\t\tList<Map<String, Object>> rows = jdbcTemplate.queryForList(\"Select * from RECORDINGS\");\r\n\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tRecordings recordings = new Recordings();\r\n\t\t\trecordings.setFileName((String)row.get(\"FILENAME\"));\r\n\t\t\trecordings.setSourceURL((String)row.get(\"SOURCEURL\"));\r\n\t\t\trecordings.setId(((BigDecimal)row.get(\"ID\")).longValue());\r\n\t\t\trecordingsList.add(recordings);\r\n\t\t}\r\n\t\treturn recordingsList;\r\n\t}", "public java.util.List<com.google.cloud.dialogflow.cx.v3beta1.Form.Parameter.Builder>\n getParametersBuilderList() {\n return getParametersFieldBuilder().getBuilderList();\n }", "public ReactorResult<java.lang.String> getAllRecordingDate_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), RECORDINGDATE, java.lang.String.class);\r\n\t}", "public String allCustomers(){\n String outputString = \"Customer accounts:\"+\"\\n\";\n for(Customer record : bank.getName2CustomersMapping().values()){\n outputString += record.getFullName()+\" \"+record.getAccounts().toString()+\"\\n\";\n }\n return outputString;\n }", "public RealmConfig getRealm() {\n return realm;\n }", "public List<String> getOptionsNames();", "public synchronized String toString() {\n\t\tString nl = System.lineSeparator();\n\t\t\n\t\t// get list of all peers for all files\n\t\tString files = \"\";\n\t\tfor(String filename : peerRecord.keySet()) {\n\t\t\tfiles += \"- \" + filename + \": \";\n\t\t\tfor(PeerConnection peer : peerRecord.get(filename)) {\n\t\t\t\tfiles += peer + \" \";\n\t\t\t}\n\t\t\tfiles += nl;\n\t\t\t\n\t\t}\n\t\treturn \"[TRACKER]\" + nl + files;\n\t}", "public synchronized boolean isRecording() {\n return mRecorder != null;\n }", "public RunConfiguration[] getRunConfigurations()\n\t{\n\t\treturn runConfigurations;\n\t}", "public ReceivablesVO getReceivables(Integer recId)\n throws RemoteException, FinderException;", "public Account getReportsToAccount() {\n return reportsToAccount;\n }", "java.lang.String getQueueName();", "public List<IntentMatcherConfig> getMatcherConfigs() {\n return matcherConfigs;\n }", "public com.google.protobuf.ProtocolStringList\n getResourceNamesList() {\n return resourceNames_;\n }", "List<Map<String,Object>> getConfigList(Request request, String configtype);", "@Override // com.android.server.wm.ConfigurationContainer\n public String getName() {\n return \"Display \" + this.mDisplayId + \" name=\\\"\" + this.mDisplayInfo.name + \"\\\"\";\n }", "@Override\n\tpublic JasperReportsConfiguration getConfiguration() {\n\t\treturn jrContext;\n\t}", "public static final Map<String,String> getAcctAndConfig(){\n Map<String,String> configMap = new HashMap<String,String>();\n configMap.putAll(getConfig());\n\n // Account Credential\n configMap.put(\"acct1.UserName\", \"davidvuletas-facilitator_api1.hotmail.com\");\n configMap.put(\"acct1.Password\", \"9VDE7D2FNEEV7NNZ\");\n configMap.put(\"acct1.Signature\", \"A3ejB8ILKLcnXEmI9gnSbvIApl3WAKiiOReECJ1icAFpbFLuYNW0O1sN\");\n configMap.put(\"acct1.AppId\", \"APP-80W284485P519543T\");\n\n // Sandbox Email Address\n configMap.put(\"sandbox.EmailAddress\", \"[email protected]\");\n\n return configMap;\n }", "public void mediaRecorderParameterFetching(MediaRecorder recorder) {\n recorder.setAudioSource(5);\n recorder.setVideoSource(1);\n recorder.setProfile(this.mProfile);\n recorder.setVideoSize(this.mProfile.videoFrameWidth, this.mProfile.videoFrameHeight);\n recorder.setMaxDuration(getOverrodeVideoDuration());\n }", "public java.util.List<com.google.cloud.recommender.v1.Recommendation.InsightReference.Builder>\n getAssociatedInsightsBuilderList() {\n return getAssociatedInsightsFieldBuilder().getBuilderList();\n }", "public java.util.List<com.google.devtools.clouddebugger.v2.Breakpoint.Builder>\n getBreakpointsBuilderList() {\n return getBreakpointsFieldBuilder().getBuilderList();\n }", "java.lang.String getRaceList();" ]
[ "0.5875468", "0.46924308", "0.46648645", "0.4397322", "0.4304115", "0.41488248", "0.41061965", "0.40729874", "0.40608758", "0.39790794", "0.39449808", "0.3941351", "0.3935585", "0.39220434", "0.39208665", "0.39022505", "0.38953036", "0.38902953", "0.38059914", "0.3798592", "0.37983525", "0.37983486", "0.37927428", "0.37785548", "0.37596062", "0.3758251", "0.3749494", "0.37456185", "0.3744429", "0.37433273", "0.37391666", "0.3731062", "0.37298796", "0.37118343", "0.3704178", "0.37032184", "0.37031668", "0.3699949", "0.3695536", "0.36801758", "0.36801758", "0.36718488", "0.367114", "0.3670642", "0.36701664", "0.36657718", "0.36546016", "0.36533743", "0.36523968", "0.36516944", "0.364545", "0.36412627", "0.3638385", "0.36248207", "0.36230218", "0.36094108", "0.36041194", "0.3595978", "0.35927293", "0.35883754", "0.35768366", "0.35670936", "0.3566132", "0.35633442", "0.35613647", "0.35480073", "0.3543417", "0.35421842", "0.35320604", "0.35305738", "0.3530016", "0.35299063", "0.35286906", "0.3527518", "0.35254198", "0.3525219", "0.35169023", "0.35149357", "0.3514699", "0.35096663", "0.35062966", "0.35013708", "0.34966832", "0.34965992", "0.34959307", "0.34913936", "0.3490341", "0.34849408", "0.34826708", "0.34816405", "0.34719664", "0.34706986", "0.3467726", "0.34676975", "0.3466089", "0.3465818", "0.34639242", "0.3454858", "0.34474367", "0.3446374" ]
0.5031838
1
Starts recording configurations of all the resources associated with the account. You must have created at least one delivery channel to successfully start the configuration recorder.
public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest,\n AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public void start() {\n synchronized (car) {\n LOG.fine(\"Validating APPLY Record\");\n try {\n dir = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".DIR\"), Dir.CLEAR);\n dir.registerListener(new DirListener());\n val = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".VAL\"), 0);\n mess = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".MESS\"), \"\");\n omss = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".OMSS\"), \"\");\n clid = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".CLID\"), 0);\n\n car.start();\n for (CadRecord cad : cads) {\n cad.start();\n cad.getCar().registerListener(new CarListener());\n }\n } catch (CAException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n }", "private void setupRecord() {\n\t\tint bufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC,\n\t\t\t\tSAMPLE_RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, bufferSize);\n\n\t\t// Create AudioTrack object to playback the audio.\n\t\tint iMinBufSize = AudioTrack.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_STEREO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioTracker = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, iMinBufSize * 10,\n\t\t\t\tAudioTrack.MODE_STREAM);\n\n\t\taudioTracker.play();\n\t}", "public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }", "protected void configClient() throws IOException, InterruptedException {\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeGreen.getDeckNumber(),deckProductionCardThreeGreen.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeBlu.getDeckNumber(),deckProductionCardThreeBlu.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeYellow.getDeckNumber(),deckProductionCardThreeYellow.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeViolet.getDeckNumber(),deckProductionCardThreeViolet.getDeck()));\n\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoGreen.getDeckNumber(),deckProductionCardTwoGreen.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoBlu.getDeckNumber(),deckProductionCardTwoBlu.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoYellow.getDeckNumber(),deckProductionCardTwoYellow.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoViolet.getDeckNumber(),deckProductionCardTwoViolet.getDeck()));\n\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneGreen.getDeckNumber(),deckProductionCardOneGreen.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneBlu.getDeckNumber(),deckProductionCardOneBlu.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneYellow.getDeckNumber(),deckProductionCardOneYellow.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneViolet.getDeckNumber(),deckProductionCardOneViolet.getDeck()));\n\n notifyObserver(new ConfigurationMarketMessage(market.getInitialMarbleList()));\n\n\n }", "public InitialConfiguration recordingActive(Boolean recordingActive) {\n this.recordingActive = recordingActive;\n return this;\n }", "private void initializeProducers(ComponentContext context) {\n BrokerHost rfHost;\n Properties prop = MQUtil.getProp(context);\n if (prop == null) {\n log.error(\"RabbitMQ configuration file not found...\");\n return;\n }\n try {\n correlationId = prop.getProperty(SENDER_COR_ID);\n rfHost = new BrokerHost(MQUtil.getMqUrl(\n prop.getProperty(SERVER_PROTO),\n prop.getProperty(SERVER_UNAME),\n prop.getProperty(SERVER_PWD),\n prop.getProperty(SERVER_ADDR),\n prop.getProperty(SERVER_PORT),\n prop.getProperty(SERVER_VHOST)));\n\n manageSender = registerProducer(rfHost,\n MQUtil.rfProducerChannelConf(\n prop.getProperty(SENDER_EXCHG),\n prop.getProperty(ROUTE_KEY),\n prop.getProperty(SENDER_QUEUE)),\n msgOutQueue);\n } catch (Exception e) {\n throw new IllegalStateException(e);\n }\n manageSender.start();\n }", "private void initializeProducers() {\r\n\t\tlogger.info(\"--> initializeProducers\");\r\n\t\t// actual Kafka producer used by all generic producers\r\n\t\ttry {\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter failed to create a KafkaProducer!\");\r\n\t\t\tcEx.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlogger.info(\"Check Adpter DEV Mode\");\r\n\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\tadpterMode = AdapterMode.DEV_MODE;\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter initialized failed with non secure connection!\");\r\n\t\t\tlogger.info(\"Check Adpter SEC DEV Mode\");\r\n\t\t\tconnectModeSec = true;\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t\ttry {\r\n\t\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\t\tadpterMode = AdapterMode.SEC_DEV_MODE;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.info(\"Adapter running in TRIAL Mode, wait for AdminTool heartbeat for futur initalization!\");\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(CISAdapter.aMe));\r\n\t\t\t\tadpterMode = AdapterMode.TRIAL_MODE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (adpterMode != AdapterMode.TRIAL_MODE) {\r\n\t\t\tinitCoreTopics();\r\n\t\t\tadapterInitDone = true;\t\r\n\t\t} \r\n\t\tlogger.info(\"initializeProducers -->\");\r\n\t}", "public void sendInterfaceConfigurations() {\r\n for (int configId = 237; configId < 249; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n send(configId, savedConfigurations[configId]);\r\n }\r\n }", "void startRecording() {\n synchronized (serviceConnection) {\n startNewTrackRequested = true;\n serviceConnection.startAndBind();\n \n // Binding was already requested before, it either already happened\n // (in which case running the callback manually triggers the actual recording start)\n // or it will happen in the future\n // (in which case running the callback now will have no effect).\n serviceBindCallback.run();\n }\n }", "public void enableCtxRecording();", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "public void startConferenceRecording(String path);", "public static void start() {\n enableIncomingMessages(true);\n }", "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public void readyNewCampaign() {\n reInitializeCampaign = true;\n saveCampaignSize = tozAdCampaign.size();\n }", "@Override\n public void run()\n {\n final String actionDescription = \"Register configuration listener\";\n\n boolean listenerRegistered = false;\n\n while (keepTrying)\n {\n /*\n * First register a listener for the group's configuration.\n */\n while ((! listenerRegistered) && (keepTrying))\n {\n try\n {\n IntegrationGroupConfigurationClient configurationClient = new IntegrationGroupConfigurationClient(accessServiceServerName,\n accessServiceRootURL);\n eventClient.registerListener(localServerUserId,\n new GovernanceEngineOutTopicListener(groupName,\n groupHandler,\n configurationClient,\n localServerUserId,\n auditLog));\n listenerRegistered = true;\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.CONFIGURATION_LISTENER_REGISTERED.getMessageDefinition(localServerName,\n accessServiceServerName));\n }\n catch (UserNotAuthorizedException error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.SERVER_NOT_AUTHORIZED.getMessageDefinition(localServerName,\n accessServiceServerName,\n accessServiceRootURL,\n localServerUserId,\n error.getReportedErrorMessage()),\n error);\n waitToRetry();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_CONFIGURATION_LISTENER.getMessageDefinition(localServerName,\n accessServiceServerName,\n error.getClass().getName(),\n error.getMessage()),\n error);\n\n waitToRetry();\n }\n }\n\n while (keepTrying)\n {\n /*\n * Request the configuration for the governance group. If it fails just log the error but let the\n * integration daemon server continue to start. It is probably a temporary outage with the metadata server\n * which can be resolved later.\n */\n try\n {\n groupHandler.refreshConfig();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.INTEGRATION_GROUP_NO_CONFIG.getMessageDefinition(groupHandler.getIntegrationGroupName(),\n error.getClass().getName(),\n error.getMessage()),\n error.toString(),\n error);\n }\n\n waitToRetry();\n }\n\n waitToRetry();\n }\n }", "private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}", "@Override // com.oculus.deviceconfigclient.DeviceConfigCallback\n public void onSuccess() {\n DeviceConfigHelper.sHasSubscribed.set(true);\n DeviceConfigHelper.sDidSubscribeComplete.set(true);\n while (DeviceConfigHelper.sOnSubscribeCompleteCallbacks.peek() != null) {\n ((DeviceConfigHelperSubscribeCompletedCallback) DeviceConfigHelper.sOnSubscribeCompleteCallbacks.remove()).call();\n }\n }", "public void sendNewConfiguration() {\n this.mWmService.mH.obtainMessage(18, this).sendToTarget();\n }", "@Override\n public void configure() {\n final TCAAppConfig tcaAppConfig = getConfig();\n\n LOG.info(\"Configuring TCA Application with startup application configuration: {}\", tcaAppConfig);\n\n // Validate application configuration\n ValidationUtils.validateSettings(tcaAppConfig, new TCAAppConfigValidator());\n\n // App Setup\n setName(tcaAppConfig.getAppName());\n setDescription(tcaAppConfig.getAppDescription());\n\n // ========== Streams Setup ============== //\n // Create DMaaP MR Subscriber CDAP output stream\n final String tcaSubscriberOutputStreamName = tcaAppConfig.getTcaSubscriberOutputStreamName();\n LOG.info(\"Creating TCA VES Output Stream: {}\", tcaSubscriberOutputStreamName);\n final Stream subscriberOutputStream =\n new Stream(tcaSubscriberOutputStreamName, TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM);\n addStream(subscriberOutputStream);\n\n\n // ============ Datasets Setup ======== //\n // Create TCA Message Status Table\n final String tcaVESMessageStatusTableName = tcaAppConfig.getTcaVESMessageStatusTableName();\n final Integer messageStatusTableTTLSeconds = tcaAppConfig.getTcaVESMessageStatusTableTTLSeconds();\n LOG.info(\"Creating TCA Message Status Table: {} with TTL: {}\",\n tcaVESMessageStatusTableName, messageStatusTableTTLSeconds);\n final DatasetProperties messageStatusTableProperties =\n TCAMessageStatusPersister.getDatasetProperties(messageStatusTableTTLSeconds);\n createDataset(tcaVESMessageStatusTableName, ObjectMappedTable.class, messageStatusTableProperties);\n\n // Create TCA VES Alerts Table\n final String tcaVESAlertsTableName = tcaAppConfig.getTcaVESAlertsTableName();\n final Integer alertsTableTTLSeconds = tcaAppConfig.getTcaVESAlertsTableTTLSeconds();\n LOG.info(\"Creating TCA Alerts Table: {} with TTL: {}\",\n tcaVESAlertsTableName, alertsTableTTLSeconds);\n final DatasetProperties alertTableProperties =\n TCAVESAlertsPersister.getDatasetProperties(alertsTableTTLSeconds);\n createDataset(tcaVESAlertsTableName, ObjectMappedTable.class, alertTableProperties);\n\n // =========== Flow Setup ============= //\n addFlow(new TCAVESCollectorFlow(tcaAppConfig));\n\n // ========== Workers Setup =========== //\n LOG.info(\"Creating TCA DMaaP Subscriber Worker\");\n addWorker(new TCADMaaPSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\n LOG.info(\"Creating TCA DMaaP Publisher Worker\");\n addWorker(new TCADMaaPPublisherWorker(tcaAppConfig.getTcaVESAlertsTableName()));\n // TODO: Remove this before going to production\n addWorker(new TCADMaaPMockSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\n }", "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 void startRecording() {\r\n\t\t( new Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tstart(); // startAudioRecording\r\n\t\t\t}\r\n\t\t} ).start();\r\n\t}", "private void saveConfiguration() {\n }", "@Override\n public void configure() throws Exception\n {\n errorHandler(deadLetterChannel(\"jms:queue:deadLetterQueue?transferExchange=true\"));\n\n /*\n * New User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewUserLog\", \"\",\n \"newUserTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.UpdateUserLog\", \"\",\n \"userChangeTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Site Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewSiteLog\", \"\",\n \"newSiteTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Participant Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewParticipantLog\", \"\",\n \"newParticipantTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update Consent Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateConsentLog\", \"\",\n \"updateConsentTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * New Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.NewSpecimenLog\",\n \"\",\n \"newSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY));\n\n /*\n * Update Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateSpecimenLog\", \"\",\n \"updateSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY\n ));\n\n /*\n * Dynamic Extension Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.DynamicExtensionUpdateLog\", \"\",\n \"dynamicExtensionTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * Specimen Characteristic Route\n */\n this.triggerScoreboard(from(\n this.getComponentName() + \":\"\n + \"edu.bcm.dldcc.big.utility.entity.SpecimenCharacteristicsLog\"\n + \"?persistenceUnit=\" + this.getInstance().getPersistenceUnit()\n + \"&consumer.delay=\" + CaTissueRouteBuilder.SPECIMEN_DELAY + \n \"&consumeLockEntity=false\").transacted()\n .removeHeaders(\"Camel*\")\n .setHeader(\"instance\", this.constant(this.getInstance().name())));\n\n from(\"jms:queue:annotationUpdateQueue\")\n .aggregate(header(\"JMSCorrelationID\"),\n new MostRecentAggregationStrategy()).completionTimeout(\n CaTissueRouteBuilder.UPDATE_TIMEOUT)\n .to(\"jms:queue:scoreboardQueue\");\n\n from(\"jms:queue:scoreboardQueue\").removeHeaders(\"Camel*\").beanRef(\n \"scoreboard\", \"updateScoreboards\");\n\n }", "private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void configure() throws Exception {\n BankAccountManagementService bankAccountManagementService = services.get(BankAccountManagementService.class);\n UserManagementService userManagementService = services.get(UserManagementService.class);\n ObjectMapper mapper = JsonMapperFactory.getObjectMapper();\n if (this.filePathAString == null) {\n throw new Exception(\"No config file provided, please set the cashmanager.config.localfile property\");\n }\n LocalFileDTO fileConfig = mapper.readValue(new File(filePathAString), LocalFileDTO.class);\n this.preferences = new HashMap<String, String>(fileConfig.preferences);\n fileConfig.accounts.forEach((account) ->\n bankAccountManagementService.registerNewAcount(account.getId(), account.getBalance())\n );\n fileConfig.users.forEach((user) ->\n userManagementService.registerUser(user.getId(), user.getPassword())\n );\n }", "@Activate\n protected void start() throws Exception {\n //set maximum csv file size to 8MB\n EventSimulatorDataHolder.getInstance().setMaximumFileSize(8388608);\n EventSimulatorDataHolder.getInstance().setCsvFileDirectory(Paths.get(Utils.getRuntimePath().toString(),\n EventSimulatorConstants.DIRECTORY_DEPLOYMENT, EventSimulatorConstants.DIRECTORY_CSV_FILES).toString());\n if (log.isDebugEnabled()) {\n log.debug(\"Event Simulator file service component is activated\");\n }\n }", "public void postInitAfterConfiguration() {\n\t\t// each configuration are only supporting one log handler\n\t\tcrawlerRecordHandler = new CrawlerRecord(this);\n\t\t// TODO: other configurations needs to be added after all configurations are set\n\t}", "ConferenceScheduleBuilderService startNetworking();", "void makeConfig()\n\t{\n\t\t\t\t\n\t\tbuf.append(\"\\t\\tUplink Setup Work order for \" + myDay.toString() + \" Rel 0.2\\n\");\n\t\tbuf.append(\"\\t\\t-----------------------------------------------------------------\\n\\n\");\n\t\t\n\t\tbuf.append(\"\\n1. Channel : \" + channelNumber + \" RF Source : \" + (rfSource==0?\"ASI\":(rfSource==1?\"RF\":\"MPEGoIP\")) + \"\\n\");\n\t\tbuf.append(\"\\n2. Physical Connection : \" + param.get(16) + \"\\n\");\t\n\t\t\n\t\t\n\t\tbuf.append(\"\\n3. Input Test Case : \" + Utility.getIntVal(param.get(1)) + \"\\n\\n\");\n\t\tString[] inpTCParamName = new String[] {\"TC Name\", \"Format/Modulation\", \"Rate (Msym)\", \"Bandwidth (Mbit)\"};\n\t\tprintTCParam(4, 13, Utility.getIntVal(param.get(1)), inpTCParamName);\n\t\t\n\t\tbuf.append(\"\\n4. CA Test Case : \" + Utility.getIntVal(param.get(2)) + \"\\n\\n\");\n\t\tString[] caTCParamName = new String[] {\"Scrambling Mode\", \"#Signal Source\", \"#DCD\", \"#Algorithm\", \"MSK\", \"Channel Setup\"};\n\t\tprintTCParam(5, 10, Utility.getIntVal(param.get(2)), caTCParamName);\n\n\t\tbuf.append(\"\\n5. Video Test Case : \" + Utility.getIntVal(param.get(3)) + \"\\n\\n\");\n\t\tString[] vidTCParamName = new String[] {\"Video Format\", \"Picture (resolution)\", \"Profile/Feature\", \"GOP Settings\", \"3:2 PullDown\", \n\t\t\t\t \t\t\t\t\"Video Bit Rate\", \"Video Rate\", \"#Encoder Parameters\"};\n\t\tprintTCParam(7, 8, Utility.getIntVal(param.get(3)), vidTCParamName);\n\t\n\t\tbuf.append(\"\\n6. Audio#1 Test Case : \" + Utility.getIntVal(param.get(4)) + \"\\n\\n\");\n\t\tString[] audTCParamName = new String[] {\"TC Name\", \"#Audio Type\", \"#Bit Rates\", \"#Encoder Flags #1\", \"#Encoder Flags #2\",\n \"#Encoder 1:Stereo\", \"#Encoder 2:Dual Mono\", \"#Encoder 3:Single Mono\", \n \"#Encoder 4:3/2 Surround & 5.1\", \"#PCM/Compress\", \"#DDP Mode\", \"#1:Stereo\", \n \"#2:Dual Mono\", \"#3:Single Mono\", \"#4:3/2 Surround & 5.1\"};\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\t\n\t\tbuf.append(\"\\n7. Audio#2 Test Case :\" + Utility.getIntVal(param.get(5)) + \"\\n\\n\");\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\n\t\tbuf.append(\"\\n8. Trancode#1 Test Case : \" + Utility.getIntVal(param.get(6)) + \" subject of automatic setup\\n\");\n\t\t\n\t\tbuf.append(\"\\n9. Trancode#2 Test Case : \" + Utility.getIntVal(param.get(7)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n10. Subtitle Test Case : \" + Utility.getIntVal(param.get(8)) + \"\\n\\n\");\n\t\tString[] sbtTCParamName = new String[] {\"TC Name\", \"Video Std\", \"Subtitle Std\", \"#Stream/Subtitle enc\"};\n\t\tprintTCParam(8, 10, Utility.getIntVal(param.get(8)), sbtTCParamName);\n\t\n\t\tbuf.append(\"\\n11. VBI Test Case : \" + Utility.getIntVal(param.get(9)) + \"\\n\\n\");\n\t\tString[] vbiTCParamName = new String[] {\"TC Name\", \"#Video Frame Rate\", \"#NABTS\", \"#WST\", \"#Invert WST\", \"#VITC PAL(1)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"#AMOL-I(3)\", \"#AMOL-II(3)\", \"#VPS\", \"#WSS\", \"#VITS\", \"#GEMTAR(1x)(2)\", \n\t\t\t\t\t\t\t\t\t\t\t\t\"#GEMTAR(2x)(2)\", \"#Monochrome\", \"#VBItotal bit rate (KBits)\"};\n\t\tprintTCParam(9, 9, Utility.getIntVal(param.get(9)), vbiTCParamName);\n\t\t\n\t\tbuf.append(\"\\n12. LSD Test Case : \" + Utility.getIntVal(param.get(10)) + \"\\n\\n\");\n\t\tString[] lsdTCParamName = new String[] {\"TC Name\", \"#Data rate\"};\n\t\tprintTCParam(10, 9, Utility.getIntVal(param.get(10)), lsdTCParamName);\n\t\n\t\tbuf.append(\"\\n13. MPE Test Case : \" + Utility.getIntVal(param.get(11)) + \"\\n\\n\");\n\t\tString[] mpeTCParamName = new String[] {\"TC Name\", \"#PIDs\", \"Rate per PID (Mbits)\", \"Aggregate Rate (Mbits)\", \"Frame Size\", \"Flow Type\"};\n\t\tprintTCParam(11, 8, Utility.getIntVal(param.get(11)), mpeTCParamName);\n\t\t\n\t\tbuf.append(\"\\n14. FPT Test Case : \" + (Utility.getIntVal(param.get(12))==1?\"Yes\":\"No\") + \"\\n\");\n\t\t\n\t\tbuf.append(\"\\n15. CC Test Case : \" + (Utility.getIntVal(param.get(13))==1?\"Yes\":\"No\") + \"\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n16. DPM 58/59 Test Case : \" + Utility.getIntVal(param.get(14)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n17. DPM 24/54 Test Case : \" + Utility.getIntVal(param.get(15)) + \" subject of automatic setup\\n\");\t\n\n\t\tbuf.append(\"\\n\\n*** End of Uplink Setup Work order ***\\n\");\n\t\t\n\t\tString fileName = null;\n\t\ttry {\n\t\t\t SimpleDateFormat timeStamp = new SimpleDateFormat(\"dd-MMM-yyyy_HH-mm-ss\");\n\t\t\t Calendar cal = Calendar.getInstance();\n\t\t\t \n\t\t\t cal.setTime(myDay);\n\t\t\t fileName = STS.outputDirectory + \"\\\\\" + \"Uplink_Setup_\" + timeStamp.format(cal.getTime()) + \".txt\";\n\n\t\t\tFileOutputStream out = new FileOutputStream(fileName);\n\t\t\tout.write(buf.toString().getBytes());\n\t\t\tout.close();\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Can not write into file \" + fileName);\n\t\t}\n\n\t\t\n\t}", "public void configure() throws Exception {\n\t\t\n\t\tXPathBuilder xPathBuilder = new XPathBuilder\n\t\t\t\t(\"//audit-events/audit-event\");\n\n\t\tfrom(\"activemq:batch.events\").\n\t\t\tsplit(xPathBuilder).\n\t\t\tparallelProcessing().\n\t\t\tto(\"activemq:insurance.events\");\n\t}", "public AntConfiguration(){\n this.channelID1 = new ChannelID(); //initially set all parameters of Channel ID to 0\n this.channelID2 = new ChannelID(); //initially set all parameters of Channel ID to 0\n\n this.channelAssigned1 = new Channel(); //initially do not assign any cha\n this.channelAssigned2 = new Channel(); //initially do not assign any channel\n\n this.channelPeriod = 4; //set to 4Hz by default\n this.level = PowerLevel.NEGTWENTY; //set to -20dB as default\n this.state1 = ChannelState.UNASSIGNED;\n this.state2 = ChannelState.UNASSIGNED;\n\n }", "public void start()\n\t{\n\n\t\ttry\n\t\t{\n\t\t\tnew JDABuilder(this.appconfig.authType)\n\t\t\t\t.setToken(this.appconfig.authToken)\n\t\t\t\t.setAudioEnabled(false)\n\t\t\t\t.setAutoReconnect(true)\n\t\t\t\t.addEventListener(new DiscordMonitorListenerAdapterPrep())\n\t\t\t\t.buildBlocking(); // TODO use .buildAsync()?\n\t\t}\n\t\tcatch (LoginException | IllegalArgumentException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: Log in failed. Please check provided token.\");\n\t\t}\n\t\tcatch (RateLimitedException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: This application is being rate limited by Discord.\");\n\t\t}\n\t\tcatch (InterruptedException e)\n\t\t{\n\t\t\tSystem.err.println(\"fatal: Unexpected interrupt.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void setConfiguration();", "private void preSyncConfiguration() {\n customPreSyncConfiguration.accept(caller, listener);\n }", "public void startRecording(){\n String samplerateString = null, buffersizeString = null;\n if (Build.VERSION.SDK_INT >= 17) {\n AudioManager audioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);\n samplerateString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);\n buffersizeString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);\n }\n samplerateString= \"48000\";\n buffersizeString = \"256\";\n\n System.loadLibrary(\"FrequencyDomain\");\n FrequencyDomain(Integer.parseInt(samplerateString), Integer.parseInt(buffersizeString));\n }", "@Override\n public void configure() throws Exception {\n from(\"direct:populateKafka\")\n // .threads(Integer.parseInt(Config.getProperty(\"threadPoolSize\")), Integer.parseInt(Config.getProperty(\"maxthreadPoolSize\")))\n .process(new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n try {\n exchange.getOut().setHeaders(exchange.getIn().getHeaders());\n DataSource ds = exchange.getIn().getHeader(\"dataSource\", DataSource.class);\n String kafkaPath = \"kafka:\" + Config.getProperty(\"kafkaURI\") + \"?topic=ds\" + ds.getSrcID() + \"&serializerClass=\" + Config.getProperty(\"kafkaSerializationClass\");\n exchange.getOut().setBody(exchange.getIn().getBody());\n exchange.getOut().setHeader(KafkaConstants.PARTITION_KEY, \"1\");\n exchange.getOut().setHeader(\"kPath\", kafkaPath);\n System.out.println(\"Successfully populated Kafka\");\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n })\n .recipientList(header(\"kPath\"));\n\n }", "public void initConfigurations() {\r\n for (int configId = 0; configId < savedConfigurations.length; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n int value = savedConfigurations[configId];\r\n if (value != 0) {\r\n set(configId, value, false);\r\n }\r\n }\r\n }", "public void startRecord() {\n\t\tif (state == State.INITIALIZING) {\n\t\t\taudioRecorder.startRecording();\n\t\t\taudioRecorder.read(buffer, 0, buffer.length);\n\t\t\tstate = State.RECORDING;\n\t\t}\n\t\telse {\n\t\t\tLog.e(TAG, \"start() called on illegal state\");\n\t\t\tstate = State.ERROR;\n\t\t}\n\t}", "public void init() throws ConfigurationException {\n String iosCertificatePath = (new PropertiesConfiguration(\"push.properties\")).getString(PUSH_DIR);\n File appDirFile = new File(iosCertificatePath);\n if(!appDirFile.exists()){\n appDirFile.mkdir();\n }\n }", "public RecorderThread (Context context) {\n\tthis.con = context;\n\trecording = true;\n\tsetDaemon(true);\n}", "@Test\n public void sendBackgroundScanChannelsRequest() throws Exception {\n WifiScanner.ScanSettings requestSettings = createRequest(channelsToSpec(5150), 30000,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n WifiNative.ScanSettings nativeSettings = new NativeScanSettingsBuilder()\n .withBasePeriod(30000)\n .withMaxApPerScan(MAX_AP_PER_SCAN)\n .withMaxScansToCache(BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH)\n .addBucketWithChannels(30000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5150)\n .build();\n doSuccessfulBackgroundScan(requestSettings, nativeSettings);\n }", "public void setConfiguration(Properties props);", "public synchronized void activate(ComponentContext cc) {\n config = YoutubeConfiguration.getInstance();\n }", "private void startRecording() {\n\n }", "public void init() {\n initiateConfig();\n initiateKafkaStuffs();\n log.info(\"Kafka consumer and producer for topic [{}] started.\", topic);\n\n service.submit(() -> {\n while (true) {\n try {\n ConsumerRecords<String, byte[]> records = consumer.poll(3000);\n for (ConsumerRecord<String, byte[]> record : records) {\n log.info(\"Reveive kafka message from topic [{}] with key [{}]\", topic, record.key());\n repository.get(record.key()).offer(record.value());\n accounter.incrementAndGet();\n }\n while (accounter.get() != 0) {\n Thread.sleep(5);\n }\n consumer.commitSync();\n } catch (Exception e) {\n log.warn(\"Something wrong happened during message pulling process\", e);\n consumer.close();\n consumer = null;\n initiateConsumer();\n }\n }\n });\n }", "private void startCapture() {\n if (checkAudioPermissions()) {\n requestScreenCapture();\n }\n }", "public void onEnable() {\n super.onEnable();\n File config = new File(getDataFolder(), \"config.yml\");\n if (!getDataFolder().exists()) {\n getDataFolder().mkdir();\n }\n if (!config.exists()) {\n saveResource(\"config.yml\", true);\n }\n\n configuration = new ConfigManager(config).build();\n log(\"Loaded DeluxeCounter by FusionCoding\");\n\n countManager = new CountManager();\n countManager.init();\n\n PluginManager pm = Bukkit.getPluginManager();\n pm.registerEvents(new AsyncPlayerPreLoginListener(), this);\n getCommand(\"cowtester\").setExecutor(new CowTesterCommand());\n\n }", "@Override\n\t\t\tpublic void start() {\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}", "@PostConstruct\n public void startWatch() throws Exception {\n LOGGER.info(\"START WATCH.\");\n Runnable task = new Runnable() {\n @Override\n public void run() {\n saveCurrencyListToDb();\n }\n };\n saveScheduleManagement(task, LocalTime.of(timePointHour, timePointMinute), period, TimeUnit.HOURS);\n }", "public void record() {\n if (mCarContext.checkSelfPermission(RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n CarToast.makeText(mCarContext, \"Grant mic permission on phone\",\n CarToast.LENGTH_LONG).show();\n List<String> permissions = Collections.singletonList(RECORD_AUDIO);\n mCarContext.requestPermissions(permissions, (grantedPermissions,\n rejectedPermissions) -> {\n if (grantedPermissions.contains(RECORD_AUDIO)) {\n record();\n }\n });\n return;\n }\n CarAudioRecord record = CarAudioRecord.create(mCarContext);\n\n Thread recordingThread =\n new Thread(\n () -> doRecord(record),\n \"AudioRecorder Thread\");\n recordingThread.start();\n }", "@Test\n public void attach_before_connect() {\n String channelName = \"attach_before_connect_\" + testParams.name;\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n ably = new AblyRealtime(opts);\n\n /* create a channel and attach */\n final Channel channel = ably.channels.get(channelName);\n channel.attach();\n (new ChannelWaiter(channel)).waitFor(ChannelState.attached);\n assertEquals(\"Verify attached state reached\", channel.state, ChannelState.attached);\n\n } catch (AblyException e) {\n e.printStackTrace();\n fail(\"init0: Unexpected exception instantiating library\");\n } finally {\n if(ably != null)\n ably.close();\n }\n }", "@Override\n public synchronized void enableIfPossible() {\n if (!enabled && analyticNotificationConfig != null) {\n if (lastNotificationTimeMs == null) {\n reset();\n\n } else {\n // See if we should resume notifications.\n if (analyticNotificationConfig.getResumeAfter() != null) {\n final Instant resumeTime = SimpleDurationUtil.plus(\n lastNotificationTimeMs,\n analyticNotificationConfig.getResumeAfter());\n final Instant now = Instant.now();\n if (now.isAfter(resumeTime)) {\n reset();\n }\n }\n }\n }\n }", "@Override\n\tpublic void configure() {\n\t final SlackComponent slackComponent = (SlackComponent) this.getContext().getComponent(\"slack\");\n\t // set the webhook URL\n\t slackComponent.setWebhookUrl(\"https://hooks.slack.com/services/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\");\n\t\t\n\t\tfrom(from)\n\t\t.routeId(routeId)\n\t\t.setHeader(\"applicationId\", constant(applicationId))\n .process(processor)\n\t\t.to(toUris)\n\t\t.tracing(tracing)\n\t\t.log(log);\n\t}", "protected void initRecorderParameters() {\n\t\tmMediaRecorder.setCamera(mCamera);\n\t\tmMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\t\tmMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\tmMediaRecorder.setVideoEncoder(mVideoEncoder);\n\t\tmMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());\n\t\tmMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY);\n\t\tmMediaRecorder.setVideoFrameRate(mQuality.framerate);\n\t\tmMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate);\n\t\tmMediaRecorder.setOrientationHint(mQuality.orientation);\n\t}", "void acknowledgeConfiguration() {\n // First ensure that both players have their correct color\n Player player0 = game.getPlayers().get(0);\n Player player1 = game.getPlayers().get(1);\n player1.setStone(player0.getStone() == Stone.BLACK ? 2 : 1);\n\n leader.acknowledgeConfig();\n opponent.acknowledgeConfig();\n }", "@Test\n public void attach() {\n String channelName = \"attach_\" + testParams.name;\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n ably = new AblyRealtime(opts);\n\n /* wait until connected */\n (new ConnectionWaiter(ably.connection)).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", ably.connection.state, ConnectionState.connected);\n\n /* create a channel and attach */\n final Channel channel = ably.channels.get(channelName);\n channel.attach();\n (new ChannelWaiter(channel)).waitFor(ChannelState.attached);\n assertEquals(\"Verify attached state reached\", channel.state, ChannelState.attached);\n\n } catch (AblyException e) {\n e.printStackTrace();\n fail(\"init0: Unexpected exception instantiating library\");\n } finally {\n if(ably != null)\n ably.close();\n }\n }", "void onSettings(ProcessingConfiguration configuration);", "@Override\n public void onEnable() {\n spigotLogger = new SpigotLogger(\"Phantom\", ChatColor.WHITE, ChatColor.GRAY, LogLevel.DEBUG);\n\n // Load the configuration files.\n if (!setupConfigs(settingsConfig, messagesConfig)) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to load all config files.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Set up all storage systems.\n if (!storageManager.setup()) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to set up storage systems.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Load all (internal) modules.\n if (!moduleManager.loadAllModules()) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to load all internal modules.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Now everything is loaded and we can start creating all prerequisites for the storage systems.\n // Of course we're running this async as they mostly involve IO operations.\n // Todo create server join states (OPEN, MAINTENANCE, BOOTING) for a minor update.\n Bukkit.getScheduler().runTaskAsynchronously(this, () -> {\n if (!storageManager.testSystems()) {\n // If failed -> Disable Phantom.\n }\n\n if (!storageManager.createPrerequisites()) {\n // If failed -> Disable Phantom.\n }\n });\n\n spigotLogger.log(LogLevel.SUCCESS, \"Enabled plugin.\");\n }", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "private static void receiverRecordCreator(DonorReceiver acc) {\n ReceiverOrganInventory organInventory = acc.getRequiredOrgans();\n\n boolean[] organPresent = {\n organInventory.getLiver(), organInventory.getKidneys(), organInventory.getHeart(),\n organInventory.getLungs(), organInventory.getIntestine(), organInventory.getCorneas(),\n organInventory.getMiddleEars(), organInventory.getSkin(), organInventory.getBone(),\n organInventory.getBoneMarrow(), organInventory.getConnectiveTissue(),\n organInventory.getPancreas()\n };\n\n LocalDateTime[] organTimes = {\n organInventory.getLiverTimeStamp(), organInventory.getKidneysTimeStamp(),\n organInventory.getHeartTimeStamp(), organInventory.getLungsTimeStamp(),\n organInventory.getIntestineTimeStamp(), organInventory.getCorneasTimeStamp(),\n organInventory.getMiddleEarsTimeStamp(), organInventory.getSkinTimeStamp(),\n organInventory.getBoneTimeStamp(), organInventory.getBoneMarrowTimeStamp(),\n organInventory.getConnectiveTissueTimeStamp(), organInventory.getPancreasTimeStamp()\n };\n\n String[] organString = {\n \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\", \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\",\n \"Bone Marrow\", \"Connective Tissue\", \"Pancreas\"\n };\n\n for (int i = 0; i < organPresent.length; i++) {\n if (organPresent[i]) {\n ReceiverRecord record = new ReceiverRecord(acc.fullName(), acc.getUserName(),\n acc.getContactDetails().getAddress().getRegion(), organTimes[i], organString[i]);\n records.add(record);\n }\n }\n }", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest,\n AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }", "public void subscribe(String bucketName, Reconfigurable rec) throws ConfigurationException {\n Bucket bucket = getBucketConfiguration(bucketName);\n\n ReconfigurableObserver obs = new ReconfigurableObserver(rec);\n BucketMonitor monitor = this.monitors.get(bucketName);\n if (monitor == null) {\n URI streamingURI = bucket.getStreamingURI();\n monitor = new BucketMonitor(this.loadedBaseUri.resolve(streamingURI), bucketName, this.restUsr, this.restPwd, configurationParser);\n this.monitors.put(bucketName, monitor);\n monitor.addObserver(obs);\n monitor.startMonitor();\n } else {\n monitor.addObserver(obs);\n }\n }", "public void initialConfig() {\n }", "public void configureAndStart(ProducerType producerType) {\n kafkaProperties = new Properties();\n kafkaProperties.put(\"metadata.broker.list\", brokerList);\n kafkaProperties.put(\"serializer.class\", \"kafka.serializer.StringEncoder\");\n kafkaProperties.put(\"request.required.acks\", \"1\");\n kafkaProperties.put(\"producer.type\", producerType.getType());\n\n producerConfig = new ProducerConfig(kafkaProperties);\n\n // Start the producer\n producer = new Producer<String, String>(producerConfig);\n }", "void startReportingTask();", "public void subscribe() {\n Fitness.getRecordingClient(this, GoogleSignIn.getLastSignedInAccount(this))\r\n .subscribe(DataType.TYPE_STEP_COUNT_CUMULATIVE)\r\n .addOnCompleteListener(\r\n new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n Log.i(TAGFit, \"Successfully subscribed!\");\r\n } else {\r\n Log.w(TAGFit, \"There was a problem subscribing.\", task.getException());\r\n }\r\n }\r\n });\r\n }", "protected void start() throws ConfigurationException, MalformedContentNameStringException, IOException {\n \t\t_thd.start();\n \t\t_chat.setLogging(Level.WARNING);\n \t\t_chat.listen();\n \t}", "public void run() {\n //Moved Observers NOV 15\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController); //would be created\n }\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController.userInfo);\n }\n CSVReader fileReader = new CSVReader(\"phase1/src/Resources/Talks.csv\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n for(ArrayList<String> talkData: fileReader.getData()){\n this.talkManager.createTalk(talkData.get(0), talkData.get(1), talkData.get(2),\n talkData.get(3), LocalDateTime.parse(talkData.get(4), formatter));\n }\n setTalkManager();\n messagingSystem.run();\n scheduleSystem.run();\n createSignUpAttendees();\n if (this.user instanceof Attendee) {\n userScheduleController.setSignUpMap(signUpMap);\n }\n if (this.user instanceof Organizer) {\n orgScheduleController.setSignUpMap(signUpMap);\n }\n }", "private void startAdvertising() {\n client.startAdvertising(codeName,getResources().getString(R.string.service_id), connectionLifecycleCallback, new AdvertisingOptions(STRATEGY));\n }", "@Override\n public void onRecordingStart(String recordingId) {\n String log = \"[SRS][SA] Recording Started! isRecording=\" +\n skylinkConnection.isRecording() + \".\";\n Toast.makeText(parentActivity, log, Toast.LENGTH_LONG).show();\n Log.d(TAG, log);\n }", "@Override\n public void configure() throws Exception {\n Properties properties = new Properties();\n properties.load(this.getClass().getClassLoader().getResourceAsStream(\"route.properties\"));\n String ordersFolder = properties.getProperty(\"folder.orders\");\n String postidentFolder = properties.getProperty(\"folder.postident\");\n if(ordersFolder == null || postidentFolder == null) {\n throw new RuntimeException(\"could not read properties for camel route, make sure there\" +\n \" is a file called route.properties in the root or the resoureces folder of your \" +\n \"application that contains the properties folder.orders and folder.postident\");\n }\n\n /*\n * There are two ways of starting the open-account process:\n *\n * - placing an XML file in a hot folder (see route.properties for folder location)\n * - sending a JSON order to a REST web service (see README.txt for instructions)\n */\n // This route handles files placed in the incoming orders folder (see route.properties file)\n // and routes the XML to a JMS queue:\n from(\"file://\" + ordersFolder).\n routeId(\"hot-folder order route\").\n log(\"=======================\").\n log(\"Received order from hot-folder\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"Delivering order to JMS XML queue\").\n to(\"jms:xmlQueue\");\n\n // Order objects that are sent to the REST web service are placed in a JMS queue called\n // orderQueue (see README.txt about setting up the JMS queue). This route listens for\n // incoming messages on that queue, transforms the object to XML using the marshalling\n // feature that is built into camel and delivers the resulting XML to the same queue the\n // incoming XML documents are placed in:\n from(\"jms:orderQueue\").\n routeId(\"order to xml route\").\n log(\"=======================\").\n log(\"received order from orderQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order object to xml\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n marshal(new JaxbDataFormat(Order.class.getPackage().getName())).\n log(\"=======================\").\n log(\"delivering order xml to xmlQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n to(\"jms:xmlQueue\");\n\n /*\n * This route listens for incoming messages on the JMS queue named xmlQueue. When a message\n * arrives, a CDI bean called incomingOrderService is used to extract the data from the XML\n * into a HashMap that will be passed on to the camunda BPM engine when the process instance\n * is started. The HashMap is the same as a variable map that can be passed on to process\n * instances via the camunda BPM API.\n */\n from(\"jms:xmlQueue\").\n routeId(\"start order process route\").\n log(\"=======================\").\n log(\"received order xml from xmlQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"setting order # to '\" + CAMUNDA_BPM_BUSINESS_KEY + \"' property\").\n setProperty(CAMUNDA_BPM_BUSINESS_KEY).xpath(\"//@ordernumber\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order xml to order object\").\n unmarshal(new JaxbDataFormat(Order.class.getPackage().getName())).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order object to variable map (java.util.Map) as input for the camunda BPM process\").\n process(new OrderToMapProcessor()).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"starting open-account process\").\n to(\"camunda-bpm:start?processDefinitionKey=open-account\").\n log(\"=======================\").\n log(\"open-account process started\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\")\n ;\n\n /*\n * If the order was rejected, we'll send a mail to the customer to inform him that his\n * application will not be processed.\n */\n from(\"direct:inform-customer\").\n routeId(\"inform customer route\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n beanRef(\"emailService\");\n\n /*\n * When the order is approved, it can be passed to the accountService to create an account\n * object and persist it to the database. Since the order was split up into values in a\n * java.util.Map, we'll first pass the map to the MapToOrderProcessor.\n */\n from(\"direct:setup-account\").\n routeId(\"set up account route\").\n log(\"=======================\").\n log(\"transforming process variable map to order object: ${body}\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n process(new MapToOrderProcessor()).\n log(\"=======================\").\n log(\"calling accountService to create account from incoming order\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n beanRef(\"accountService\");\n\n /*\n * Finally, this route waits for incoming postident scans to be placed in a hot folder.\n * When a document is placed there (edit route.properties to configure the location of\n * the folder), the order number is extracted from the file name and used as correlation\n * id to send a signal to the waiting process instance.\n */\n from(\"file://\" + postidentFolder).\n routeId(\"incoming postident route\").\n log(\"=======================\").\n log(\"received postident document\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"extracting order number from file name\").\n process(new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n String businessKey = exchange.getIn().getHeader(\"CamelFileName\").toString().split(\"-\")[1].substring(0, 4);\n exchange.setProperty(CAMUNDA_BPM_BUSINESS_KEY, businessKey);\n }\n }).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"correlating document with process instance\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n to(\"camunda-bpm://message?processDefinitionKey=open-account&activityId=wait_for_postident\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\");\n }", "public void setupSubscriptions()\n {\n String debug = System.getProperty(\"SAFE.debug\");\n if (debug != null && debug.equalsIgnoreCase(\"true\")) {\n _debug = true;\n }\n \n // get handle to message transport service \n try {\n MessageTransportService mts = (MessageTransportService) this.getBindingSite().getServiceBroker().getService(this,\n MessageTransportService.class,\n null);\n \n // get the name of the domain we are managing\n String domainName = System.getProperty(\"org.cougaar.safe.domainName\");\n if (domainName == null) {\n throw new NullPointerException(\"System property org.cougaar.safe.domainName is not set\");\n } \n\n // create MessageSender and MessageReceiver for DM\n // create local locator and bind MessageReceiver to it\n CougaarMessageTransportService messageTransport = new CougaarMessageTransportService(mts);\n MessageSender sender = messageTransport.newMessageSender();\n MessageReceiver receiver = messageTransport.newMessageReceiver(); \n CougaarLocator myLocator = new CougaarLocator(domainName);\n receiver.bindToLocalLocator(myLocator);\n \n // create Domain Manager\n _dm = new MyDomainManager(domainName,\n receiver,\n sender);\n \n }\n catch (Exception xcp) {\n xcp.printStackTrace();\n }\n \n // BEGIN rehydrate \n \n // rehydrate: get entity descriptions from the blackboard and register them\n // with the domain manager\n Iterator entityDescriptions = query(_entityDescriptionPredicate).iterator();\n Vector nonGuardDescrips = new Vector();\n while (entityDescriptions.hasNext()) { \n KAoSEntityDescription entityDescrip = (KAoSEntityDescription) entityDescriptions.next();\n // register all the guards first\n if (entityDescrip.getEntityType().equals(KAoSConstants.GUARD)) { \n _dm.register(entityDescrip, true);\n }\n else {\n nonGuardDescrips.addElement(entityDescrip);\n }\n }\n // then register the other entities\n for (int i=0; i<nonGuardDescrips.size(); i++) {\n _dm.register((KAoSEntityDescription) nonGuardDescrips.elementAt(i), true);\n }\n \n // rehydrate: get policies from the blackboard and give\n // them to the domain manager\n Iterator policyMsgs = query(_policyMsgPredicate).iterator();\n Vector policyMsgsV = new Vector();\n while (policyMsgs.hasNext()) {\n policyMsgsV.addElement(policyMsgs.next());\n }\n _dm.rehydratePolicies(policyMsgsV);\n \n // END rehydrate\n \n _proposedPolicyUpdate = (IncrementalSubscription) subscribe(_proposedPolicyUpdatePredicate); \n }", "synchronized public void start() throws IOException, InterruptedException {\n createInstanceFromConfig(true);\n }", "private void startAdvertising() {\n BluetoothAdapter bluetoothAdapter = mBluetoothManager.getAdapter();\n if (!bluetoothAdapter.isEnabled()) {\n System.out.println(\"does not support\");\n }\n if (!bluetoothAdapter.isMultipleAdvertisementSupported()) {\n //Device does not support Bluetooth LE\n System.out.println(\"does not support\");\n }\n\n mBluetoothLeAdvertiser = bluetoothAdapter.getBluetoothLeAdvertiser();\n if (mBluetoothLeAdvertiser == null) {\n Log.w(TAG, \"Failed to create advertiser\");\n return;\n }\n\n AdvertiseSettings settings = new AdvertiseSettings.Builder()\n .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)\n .setConnectable(true)\n .setTimeout(0)\n .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH)\n .build();\n\n AdvertiseData data = new AdvertiseData.Builder()\n .setIncludeDeviceName(true)\n .setIncludeTxPowerLevel(false)\n .addServiceUuid(new ParcelUuid(TimeProfile.TIME_SERVICE))\n .build();\n\n mBluetoothLeAdvertiser\n .startAdvertising(settings, data, mAdvertiseCallback);\n }", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "public void run() {\n\t\tlog.info(\"Weekly Scheduled Asset Report Job starting >> isMasterInstance:{} and isAuthorInstance:{}.\", isMasterInstance, isAuthorInstance);\r\n\t\tSession session = null;\r\n\t\t\r\n if (isMasterInstance && isAuthorInstance) {\r\n \r\n \tif(sendWeeklyReport) {\r\n\t\t try {\r\n\t\t\t\t\t session = getSession();\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t //TODO- \r\n\t\t\t\t\t String lowerBoundDate = \"2014-06-19\";\r\n\t\t\t\t\t String upperBoundDate = \"2014-06-26\";\r\n\t\t\t\t\t \r\n\t\t\t\t\t String dateRange = lowerBoundDate + \" - \" + upperBoundDate;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t String templatePath = MISReportConstant.REPORT_EMAIL_TEMPLATE;\r\n\t\t\t\t\t Map<String, String> emailParams = MISReportUtil.buildEmailParams(reportType, reportFrequency, dateRange);\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t DataSource reportDatasource = generateReport.generateReport(lowerBoundDate, upperBoundDate, reportType, session);\r\n\t\t\t\t\t\r\n\t\t\t\t\t //Get the UserGroup name for the reporType\t\t\r\n\t\t\t\t\t String userGroup = userManagement.getUserGroup(reportType);\r\n\t\t\t\t\t\r\n\t\t\t\t\t String[] authors = userManagement.getAllUsersOfGroup(userGroup, session);\r\n\t\t\t\t\t\r\n\t\t\t\t\t for(String authorID: authors) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\temailParams.put(MISReportConstant.FIRST_NAME, userManagement.getUserName(authorID, session));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\temailService.sendEmail(templatePath, emailParams, session, reportDatasource, userManagement.getEmailAddress(authorID, session));\r\n\t\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\t log.error(\"[Exception]\",e);\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif(session.isLive())\r\n\t\t\t\t\t\tsession.logout();\r\n\t\t\t\t}\r\n\t\t \r\n\t\t log.info(\"Weekly Asset Report Job finished sending {} reports\", reportType);\r\n \t}\r\n \telse {\r\n \t\tlog.info(\"Weekly Asset Report Job not executed>> Enable it from the AEM Felix console to execute\");\r\n \t}\r\n }\r\n \r\n\t}", "private void initialiseConfiguration(final JobExecutionContext context)\n \n {\n // PRECONDITIONS\n assert context != null : \"context must not be null.\";\n \n // Body\n \n // Pull state from the job configuration data.\n JobDataMap jobData = context.getJobDetail().getJobDataMap();\n Object transactionServiceObj = jobData.get(JOB_DATA_PARAMETER_NAME_TRANSACTION_SERVICE);\n Object deploymentReportCleanupServiceObj = jobData.get(JOB_DATA_PARAMETER_NAME_DEPLOYMENT_REPORT_CLEANUP_SERVICE);\n Object webProjectNodeRefObj = jobData.get(JOB_DATA_PARAMETER_NAME_WEB_PROJECT_NODE_REF);\n Object webProjectDNSNameObj = jobData.get(JOB_DATA_PARAMETER_NAME_WEB_PROJECT_DNS_NAME);\n Object maxReportsToPrunePerBatchObj = jobData.get(JOB_DATA_PARAMETER_NAME_MAX_REPORTS_TO_PRUNE_PER_BATCH);\n\n \n // Service Registry\n if (transactionServiceObj == null ||\n !(transactionServiceObj instanceof TransactionService))\n {\n throw new AlfrescoRuntimeException(JOB_DATA_PARAMETER_NAME_TRANSACTION_SERVICE + \" must be provided and must be a reference to an instance of org.alfresco.service.transaction.TransactionService.\");\n }\n \n this.transactionService = (TransactionService)transactionServiceObj;\n \n \n // Timed Deployment Service\n if (deploymentReportCleanupServiceObj == null ||\n !(deploymentReportCleanupServiceObj instanceof DeploymentReportCleanupService))\n {\n throw new AlfrescoRuntimeException(JOB_DATA_PARAMETER_NAME_DEPLOYMENT_REPORT_CLEANUP_SERVICE + \" must be provided and must be a reference to an instance of org.alfresco.extension.deployment.reports.DeploymentReportCleanupService.\");\n }\n \n this.deploymentReportCleanupService = (DeploymentReportCleanupService)deploymentReportCleanupServiceObj;\n\n \n // Web Project, either by NodeRef or DNS Name\n if (webProjectNodeRefObj == null &&\n webProjectDNSNameObj == null)\n {\n throw new AlfrescoRuntimeException(\"Either \" + JOB_DATA_PARAMETER_NAME_WEB_PROJECT_NODE_REF + \" or \" +\n JOB_DATA_PARAMETER_NAME_WEB_PROJECT_DNS_NAME + \" must be provided.\");\n }\n \n if (webProjectNodeRefObj != null)\n {\n this.webProjectNodeRef = new NodeRef((String)webProjectNodeRefObj);\n }\n \n if (webProjectDNSNameObj != null)\n {\n this.webProjectDNSName = (String)webProjectDNSNameObj;\n }\n \n \n // Max reports to prune per batch\n if (maxReportsToPrunePerBatchObj != null &&\n maxReportsToPrunePerBatchObj instanceof String)\n {\n int maxReportsToPrunePerBatch = -1;\n \n try\n {\n maxReportsToPrunePerBatch = Integer.valueOf((String)maxReportsToPrunePerBatchObj);\n \n this.deploymentReportCleanupService.setMaxReportsToPrunePerBatch(maxReportsToPrunePerBatch);\n }\n catch (NumberFormatException nfe)\n {\n // Swallow and move on\n log.warn(\"Unable to parse \" + JOB_DATA_PARAMETER_NAME_MAX_REPORTS_TO_PRUNE_PER_BATCH + \" value '\" + (String)maxReportsToPrunePerBatchObj + \"' - reverting to default.\");\n }\n }\n }", "public void start() throws IOException\n {\n File plugins = new File(\"plugins\");\n plugins.mkdir();\n pluginManager.loadPlugins(plugins);\n config.load();\n reconnectHandler = new YamlReconnectHandler();\n isRunning = true;\n\n pluginManager.enablePlugins();\n\n for (ListenerInfo info : config.getListeners())\n {\n $().info(\"Listening on \" + info.getHost());\n ListenThread listener = new ListenThread(info);\n listener.start();\n listeners.add(listener);\n }\n\n saveThread.scheduleAtFixedRate(new TimerTask()\n {\n @Override\n public void run()\n {\n getReconnectHandler().save();\n }\n }, 0, TimeUnit.MINUTES.toMillis(5));\n\n new Metrics().start();\n }", "protected void configClientReconnected(String nickname) throws IOException, InterruptedException {\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeGreen.getDeckNumber(),deckProductionCardThreeGreen.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeBlu.getDeckNumber(),deckProductionCardThreeBlu.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeYellow.getDeckNumber(),deckProductionCardThreeYellow.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeViolet.getDeckNumber(),deckProductionCardThreeViolet.getDeck()), nickname);\n\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoGreen.getDeckNumber(),deckProductionCardTwoGreen.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoBlu.getDeckNumber(),deckProductionCardTwoBlu.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoYellow.getDeckNumber(),deckProductionCardTwoYellow.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoViolet.getDeckNumber(),deckProductionCardTwoViolet.getDeck()), nickname);\n\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneGreen.getDeckNumber(),deckProductionCardOneGreen.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneBlu.getDeckNumber(),deckProductionCardOneBlu.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneYellow.getDeckNumber(),deckProductionCardOneYellow.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneViolet.getDeckNumber(),deckProductionCardOneViolet.getDeck()), nickname);\n\n notifyOnlyOneSpecificObserver(new ConfigurationMarketMessage(market.getGridActual()), nickname);\n\n }", "@ReactMethod\n public void start() {\n ChirpError error = chirpConnect.start();\n if (error.getCode() > 0) {\n onError(context, error.getMessage());\n } else {\n isStarted = true;\n }\n }", "public void send_setup()\n {\n out.println(\"chain_setup\");\n }", "public synchronized void startRegistration() {\n state = State.REGISTRATION;\n players = new HashSet<>();\n }", "public void startAllReporter() {\n compositeReporter.startAll();\n }", "protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }", "@Override\n public synchronized void start() {\n LOG.info(\"HDFSSink start\");\n this.bucketWriterMap = new WriterLinkedHashMap(maxOpenFiles);\n Configuration config = new Configuration();\n config.setBoolean(\"fs.automatic.close\", false);\n try {\n this.fileSystem = new Path(this.filePath).getFileSystem(config);\n }\n catch (IOException ex) {\n LOG.error(ex.getMessage(), ex);\n }\n this.scheduler = Executors.newSingleThreadScheduledExecutor();\n this.checkConfScheduler();\n this.sinkCounter.start();\n super.start();\n }", "public void setCredentials(SelfManagedKafkaAccessConfigurationCredentials credentials) {\n this.credentials = credentials;\n }", "public void applyConfiguration() throws Exception {\n\t\tLOGGER.info(\"Start day-2 configuration\");\n\t\tdhcpConf();\n\t\tbgpPrefixConf();\n\t\tstaticRoutesConfig();\n\t\tnatConfig();\n\t\tpatConf();\n\t\tconfAcl();\n\t\tLOGGER.info(\"End day-2 configuration\");\n\t}", "private void startRecording() {\n // When start recording, create a file with format yyyyMMdd_HHmmss.3gp\n // y, M, d, H, m,s are year, month, day, hour, minite and second when start recording\n String currentDateAndTime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n curRecordingFileName = APP_STORAGE + \"/\" + currentDateAndTime + \".3gp\";\n Log.e(TAG, \"Start recording file: \" + curRecordingFileName);\n\n mRecorder = new MediaRecorder();\n mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n mRecorder.setOutputFile(curRecordingFileName);\n mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n try {\n mRecorder.prepare();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaRecorder\");\n }\n\n mRecorder.start();\n }", "public RecorderManager(int audioSource, int sampleRate, int channelConfig, int audioFormat, String filePath){\n\t\ttry {\n\t\t\tif (audioFormat == AudioFormat.ENCODING_PCM_16BIT) {\n\t\t\t\tbSamples = 16;\n\t\t\t} else {\n\t\t\t\tbSamples = 8;\n\t\t\t}\n\t\t\tif (channelConfig == AudioFormat.CHANNEL_CONFIGURATION_MONO) {\n\t\t\t\tnChannels = 1;\n\t\t\t} else {\n\t\t\t\tnChannels = 2;\n\t\t\t}\n\t\t\tframePeriod = sampleRate * TIMER_INTERVAL / 1000;\n\t\t\tbufferSize = framePeriod * 2 * bSamples * nChannels / 8;\n\t\t\tif (bufferSize < AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)) {\n\t\t\t\t// Check to make sure buffer size is not smaller than the smallest allowed one\n\t\t\t\tbufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);\n\t\t\t\t// Set frame period and timer interval accordingly\n\t\t\t\tLog.w(TAG, \"Increasing buffer size to \" + Integer.toString(bufferSize));\n\t\t\t}\n\t\t\t//record period anand read buffer\n\t\t\tframePeriod = bufferSize / ( 2 * bSamples * nChannels / 8 );\n\t\t\tbuffer = new byte[framePeriod*bSamples/8*nChannels];\n\t\t\t/**\n\t\t\t * audioSource Audio source\n\t\t\t */\n\t\t\taudioRecorder = new AudioRecord(audioSource, sampleRate, channelConfig, audioFormat, bufferSize);\n\n\t\t\tif (audioRecorder.getState() != AudioRecord.STATE_INITIALIZED)\n\t\t\t\tthrow new Exception(\"AudioRecord initialization failed\");\n//\t\t\t//在此处进行数据读取\n//\t\t\taudioRecorder.setRecordPositionUpdateListener(updateListener);\n//\t\t\t//录音 通知周期 及 录音数据读取 buffer 的设定\n//\t\t\taudioRecorder.setPositionNotificationPeriod(framePeriod);\n//\t\t\tLog.i(TAG,\"path :\" +filePath);\n\t\t\t//当前状态为初始化状态\n\t\t\tstate = State.INITIALIZING;\n\t\t} catch (Exception e) {\n\t\t\tLog.e(TAG, \"initialize fail\",e);\n\t\t}\n\t}", "public List<ProgressConfigurationType> getAllConfigurations();", "private AeRegistration() {\n\t\tnotifications = new HashMap<String, List<JSONObject>>();\n\t\tsubscriptions = new HashMap<String,String>();\n\t\tsubscribedToResourcesSet = new HashMap<String,String>();\n\t\tsubscriptionsPerSessions = new HashMap<String, Set<String>>();\n\t}", "@Override\n\tpublic void onEnable() {\n\t\tcreateConfig();\n\t\tif(cfg == null) {\n\t \tcfg = getConfig();\n\t }\n\t\t// Listener registrieren\n\t\t//getServer().getPluginManager().registerEvents(new EnderchestListener(this), this));\n\t\t\n\t\t// Befehle registrieren\n\t\t// https://pastebin.com/6NsN6f6X sehr cooles Beispiel für TAB-Vervollständigung\n\t\tthis.getCommand(\"enderchest\").setExecutor(new CommandEnderchest(this));\n\t\t\n\t\t// abschließen\n \tgetLogger().info(pdf.getName() + \" version \" + pdf.getVersion() + \" by \" + pdf.getAuthors().get(0) + \" enabled! :)\");\n\t}", "@Override\n public void configure(Context context) {\n this.context = context;\n this.projectConfigure = new ProjectConfigure(context.getString(\"project_conf_path\", \"\"));\n //初始化变量\n ProjectConfigure.BaseConfigure baseSinkConf = projectConfigure.checkUpdate();\n copyBaseSinkConf(baseSinkConf);\n\n Preconditions.checkArgument(this.batchSize > 0, \"batchSize must be greater than 0\");\n\n this.filePath = (String) Preconditions.checkNotNull((Object)context.getString(\"hdfs.path\"), \"hdfs.path is required\");\n if (this.filePath.endsWith(DIRECTORY_DELIMITER)) {\n this.filePath += DIRECTORY_DELIMITER;\n }\n\n if (this.sinkCounter == null) {\n this.sinkCounter = new SinkCounter(this.getName());\n }\n }", "protected void enableActionSetDACConfig()\n {\n Action action = new Action(\"SetDACConfig\");\n action.addInputParameter(new ParameterRelated(\"DACConfig\", iPropertyDACConfig));\n iDelegateSetDACConfig = new DoSetDACConfig();\n enableAction(action, iDelegateSetDACConfig);\n }" ]
[ "0.5527746", "0.5254858", "0.49699625", "0.49061808", "0.48569655", "0.4805792", "0.47793967", "0.47734553", "0.47590423", "0.472163", "0.46997693", "0.46114004", "0.46060774", "0.46000338", "0.45976192", "0.45815387", "0.45679265", "0.45278975", "0.45122617", "0.4506666", "0.45056614", "0.44964632", "0.4488606", "0.44840822", "0.4444245", "0.44402125", "0.44352016", "0.4433184", "0.44183806", "0.4396165", "0.43911436", "0.4372561", "0.43486443", "0.43480033", "0.43288147", "0.43275982", "0.43255222", "0.43232548", "0.43229854", "0.43228444", "0.4301932", "0.42983967", "0.42979383", "0.42955515", "0.42950812", "0.4290064", "0.4280545", "0.42786154", "0.42708606", "0.42634615", "0.4262371", "0.42598984", "0.4255858", "0.42468736", "0.4246199", "0.4227175", "0.42262986", "0.42255783", "0.42109436", "0.42078298", "0.42074844", "0.42072764", "0.42053297", "0.41987538", "0.41986364", "0.41980034", "0.41974187", "0.41953343", "0.41949087", "0.4191437", "0.41873848", "0.41761786", "0.41758227", "0.41729167", "0.416971", "0.41682428", "0.41677263", "0.41663206", "0.4165634", "0.41611403", "0.41543522", "0.41541037", "0.41504633", "0.4148356", "0.41478848", "0.4146975", "0.41452262", "0.4141284", "0.41400328", "0.4136005", "0.4124095", "0.41207656", "0.41181347", "0.41158333", "0.4113049", "0.41116157", "0.4103159", "0.410123", "0.40983734", "0.409765" ]
0.597674
0
Starts recording configurations of all the resources associated with the account. You must have created at least one delivery channel to successfully start the configuration recorder.
public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest, AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public void start() {\n synchronized (car) {\n LOG.fine(\"Validating APPLY Record\");\n try {\n dir = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".DIR\"), Dir.CLEAR);\n dir.registerListener(new DirListener());\n val = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".VAL\"), 0);\n mess = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".MESS\"), \"\");\n omss = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".OMSS\"), \"\");\n clid = cas.createChannel(epicsTop.buildEpicsChannelName(name + \".CLID\"), 0);\n\n car.start();\n for (CadRecord cad : cads) {\n cad.start();\n cad.getCar().registerListener(new CarListener());\n }\n } catch (CAException e) {\n LOG.log(Level.SEVERE, e.getMessage(), e);\n }\n }\n }", "private void setupRecord() {\n\t\tint bufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC,\n\t\t\t\tSAMPLE_RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, bufferSize);\n\n\t\t// Create AudioTrack object to playback the audio.\n\t\tint iMinBufSize = AudioTrack.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_STEREO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioTracker = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, iMinBufSize * 10,\n\t\t\t\tAudioTrack.MODE_STREAM);\n\n\t\taudioTracker.play();\n\t}", "public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }", "protected void configClient() throws IOException, InterruptedException {\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeGreen.getDeckNumber(),deckProductionCardThreeGreen.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeBlu.getDeckNumber(),deckProductionCardThreeBlu.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeYellow.getDeckNumber(),deckProductionCardThreeYellow.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeViolet.getDeckNumber(),deckProductionCardThreeViolet.getDeck()));\n\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoGreen.getDeckNumber(),deckProductionCardTwoGreen.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoBlu.getDeckNumber(),deckProductionCardTwoBlu.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoYellow.getDeckNumber(),deckProductionCardTwoYellow.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoViolet.getDeckNumber(),deckProductionCardTwoViolet.getDeck()));\n\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneGreen.getDeckNumber(),deckProductionCardOneGreen.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneBlu.getDeckNumber(),deckProductionCardOneBlu.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneYellow.getDeckNumber(),deckProductionCardOneYellow.getDeck()));\n notifyObserver(new DeckProductionCardConfigMessage(deckProductionCardOneViolet.getDeckNumber(),deckProductionCardOneViolet.getDeck()));\n\n notifyObserver(new ConfigurationMarketMessage(market.getInitialMarbleList()));\n\n\n }", "public InitialConfiguration recordingActive(Boolean recordingActive) {\n this.recordingActive = recordingActive;\n return this;\n }", "private void initializeProducers(ComponentContext context) {\n BrokerHost rfHost;\n Properties prop = MQUtil.getProp(context);\n if (prop == null) {\n log.error(\"RabbitMQ configuration file not found...\");\n return;\n }\n try {\n correlationId = prop.getProperty(SENDER_COR_ID);\n rfHost = new BrokerHost(MQUtil.getMqUrl(\n prop.getProperty(SERVER_PROTO),\n prop.getProperty(SERVER_UNAME),\n prop.getProperty(SERVER_PWD),\n prop.getProperty(SERVER_ADDR),\n prop.getProperty(SERVER_PORT),\n prop.getProperty(SERVER_VHOST)));\n\n manageSender = registerProducer(rfHost,\n MQUtil.rfProducerChannelConf(\n prop.getProperty(SENDER_EXCHG),\n prop.getProperty(ROUTE_KEY),\n prop.getProperty(SENDER_QUEUE)),\n msgOutQueue);\n } catch (Exception e) {\n throw new IllegalStateException(e);\n }\n manageSender.start();\n }", "private void initializeProducers() {\r\n\t\tlogger.info(\"--> initializeProducers\");\r\n\t\t// actual Kafka producer used by all generic producers\r\n\t\ttry {\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter failed to create a KafkaProducer!\");\r\n\t\t\tcEx.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlogger.info(\"Check Adpter DEV Mode\");\r\n\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\tadpterMode = AdapterMode.DEV_MODE;\r\n\t\t} catch (Exception cEx) {\r\n\t\t\tlogger.info(\"CISAdapter initialized failed with non secure connection!\");\r\n\t\t\tlogger.info(\"Check Adpter SEC DEV Mode\");\r\n\t\t\tconnectModeSec = true;\r\n\t\t\tsharedAvroProducer = new KafkaProducer<EDXLDistribution, IndexedRecord>(ProducerProperties.getInstance(connectModeSec));\r\n\t\t\ttry {\r\n\t\t\t\theartbeatProducer = new HeartbeatProducer(sharedAvroProducer, TopicConstants.HEARTBEAT_TOPIC);\t\r\n\t\t\t\theartbeatProducer.sendInitialHeartbeat();\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(null));\r\n\t\t\t\tadpterMode = AdapterMode.SEC_DEV_MODE;\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.info(\"Adapter running in TRIAL Mode, wait for AdminTool heartbeat for futur initalization!\");\r\n\t\t\t\taddAvroReceiver(TopicConstants.ADMIN_HEARTBEAT_TOPIC, new AdminHeartbeatConsumer(CISAdapter.aMe));\r\n\t\t\t\tadpterMode = AdapterMode.TRIAL_MODE;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (adpterMode != AdapterMode.TRIAL_MODE) {\r\n\t\t\tinitCoreTopics();\r\n\t\t\tadapterInitDone = true;\t\r\n\t\t} \r\n\t\tlogger.info(\"initializeProducers -->\");\r\n\t}", "public void sendInterfaceConfigurations() {\r\n for (int configId = 237; configId < 249; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n send(configId, savedConfigurations[configId]);\r\n }\r\n }", "void startRecording() {\n synchronized (serviceConnection) {\n startNewTrackRequested = true;\n serviceConnection.startAndBind();\n \n // Binding was already requested before, it either already happened\n // (in which case running the callback manually triggers the actual recording start)\n // or it will happen in the future\n // (in which case running the callback now will have no effect).\n serviceBindCallback.run();\n }\n }", "public void enableCtxRecording();", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "public void startConferenceRecording(String path);", "public static void start() {\n enableIncomingMessages(true);\n }", "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public void readyNewCampaign() {\n reInitializeCampaign = true;\n saveCampaignSize = tozAdCampaign.size();\n }", "@Override\n public void run()\n {\n final String actionDescription = \"Register configuration listener\";\n\n boolean listenerRegistered = false;\n\n while (keepTrying)\n {\n /*\n * First register a listener for the group's configuration.\n */\n while ((! listenerRegistered) && (keepTrying))\n {\n try\n {\n IntegrationGroupConfigurationClient configurationClient = new IntegrationGroupConfigurationClient(accessServiceServerName,\n accessServiceRootURL);\n eventClient.registerListener(localServerUserId,\n new GovernanceEngineOutTopicListener(groupName,\n groupHandler,\n configurationClient,\n localServerUserId,\n auditLog));\n listenerRegistered = true;\n\n auditLog.logMessage(actionDescription,\n IntegrationDaemonServicesAuditCode.CONFIGURATION_LISTENER_REGISTERED.getMessageDefinition(localServerName,\n accessServiceServerName));\n }\n catch (UserNotAuthorizedException error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.SERVER_NOT_AUTHORIZED.getMessageDefinition(localServerName,\n accessServiceServerName,\n accessServiceRootURL,\n localServerUserId,\n error.getReportedErrorMessage()),\n error);\n waitToRetry();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.NO_CONFIGURATION_LISTENER.getMessageDefinition(localServerName,\n accessServiceServerName,\n error.getClass().getName(),\n error.getMessage()),\n error);\n\n waitToRetry();\n }\n }\n\n while (keepTrying)\n {\n /*\n * Request the configuration for the governance group. If it fails just log the error but let the\n * integration daemon server continue to start. It is probably a temporary outage with the metadata server\n * which can be resolved later.\n */\n try\n {\n groupHandler.refreshConfig();\n }\n catch (Exception error)\n {\n auditLog.logException(actionDescription,\n IntegrationDaemonServicesAuditCode.INTEGRATION_GROUP_NO_CONFIG.getMessageDefinition(groupHandler.getIntegrationGroupName(),\n error.getClass().getName(),\n error.getMessage()),\n error.toString(),\n error);\n }\n\n waitToRetry();\n }\n\n waitToRetry();\n }\n }", "private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}", "@Override // com.oculus.deviceconfigclient.DeviceConfigCallback\n public void onSuccess() {\n DeviceConfigHelper.sHasSubscribed.set(true);\n DeviceConfigHelper.sDidSubscribeComplete.set(true);\n while (DeviceConfigHelper.sOnSubscribeCompleteCallbacks.peek() != null) {\n ((DeviceConfigHelperSubscribeCompletedCallback) DeviceConfigHelper.sOnSubscribeCompleteCallbacks.remove()).call();\n }\n }", "public void sendNewConfiguration() {\n this.mWmService.mH.obtainMessage(18, this).sendToTarget();\n }", "@Override\n public void configure() {\n final TCAAppConfig tcaAppConfig = getConfig();\n\n LOG.info(\"Configuring TCA Application with startup application configuration: {}\", tcaAppConfig);\n\n // Validate application configuration\n ValidationUtils.validateSettings(tcaAppConfig, new TCAAppConfigValidator());\n\n // App Setup\n setName(tcaAppConfig.getAppName());\n setDescription(tcaAppConfig.getAppDescription());\n\n // ========== Streams Setup ============== //\n // Create DMaaP MR Subscriber CDAP output stream\n final String tcaSubscriberOutputStreamName = tcaAppConfig.getTcaSubscriberOutputStreamName();\n LOG.info(\"Creating TCA VES Output Stream: {}\", tcaSubscriberOutputStreamName);\n final Stream subscriberOutputStream =\n new Stream(tcaSubscriberOutputStreamName, TCA_FIXED_SUBSCRIBER_OUTPUT_DESCRIPTION_STREAM);\n addStream(subscriberOutputStream);\n\n\n // ============ Datasets Setup ======== //\n // Create TCA Message Status Table\n final String tcaVESMessageStatusTableName = tcaAppConfig.getTcaVESMessageStatusTableName();\n final Integer messageStatusTableTTLSeconds = tcaAppConfig.getTcaVESMessageStatusTableTTLSeconds();\n LOG.info(\"Creating TCA Message Status Table: {} with TTL: {}\",\n tcaVESMessageStatusTableName, messageStatusTableTTLSeconds);\n final DatasetProperties messageStatusTableProperties =\n TCAMessageStatusPersister.getDatasetProperties(messageStatusTableTTLSeconds);\n createDataset(tcaVESMessageStatusTableName, ObjectMappedTable.class, messageStatusTableProperties);\n\n // Create TCA VES Alerts Table\n final String tcaVESAlertsTableName = tcaAppConfig.getTcaVESAlertsTableName();\n final Integer alertsTableTTLSeconds = tcaAppConfig.getTcaVESAlertsTableTTLSeconds();\n LOG.info(\"Creating TCA Alerts Table: {} with TTL: {}\",\n tcaVESAlertsTableName, alertsTableTTLSeconds);\n final DatasetProperties alertTableProperties =\n TCAVESAlertsPersister.getDatasetProperties(alertsTableTTLSeconds);\n createDataset(tcaVESAlertsTableName, ObjectMappedTable.class, alertTableProperties);\n\n // =========== Flow Setup ============= //\n addFlow(new TCAVESCollectorFlow(tcaAppConfig));\n\n // ========== Workers Setup =========== //\n LOG.info(\"Creating TCA DMaaP Subscriber Worker\");\n addWorker(new TCADMaaPSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\n LOG.info(\"Creating TCA DMaaP Publisher Worker\");\n addWorker(new TCADMaaPPublisherWorker(tcaAppConfig.getTcaVESAlertsTableName()));\n // TODO: Remove this before going to production\n addWorker(new TCADMaaPMockSubscriberWorker(tcaAppConfig.getTcaSubscriberOutputStreamName()));\n }", "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 void startRecording() {\r\n\t\t( new Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tstart(); // startAudioRecording\r\n\t\t\t}\r\n\t\t} ).start();\r\n\t}", "private void saveConfiguration() {\n }", "@Override\n public void configure() throws Exception\n {\n errorHandler(deadLetterChannel(\"jms:queue:deadLetterQueue?transferExchange=true\"));\n\n /*\n * New User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewUserLog\", \"\",\n \"newUserTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.UpdateUserLog\", \"\",\n \"userChangeTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Site Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewSiteLog\", \"\",\n \"newSiteTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Participant Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewParticipantLog\", \"\",\n \"newParticipantTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update Consent Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateConsentLog\", \"\",\n \"updateConsentTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * New Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.NewSpecimenLog\",\n \"\",\n \"newSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY));\n\n /*\n * Update Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateSpecimenLog\", \"\",\n \"updateSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY\n ));\n\n /*\n * Dynamic Extension Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.DynamicExtensionUpdateLog\", \"\",\n \"dynamicExtensionTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * Specimen Characteristic Route\n */\n this.triggerScoreboard(from(\n this.getComponentName() + \":\"\n + \"edu.bcm.dldcc.big.utility.entity.SpecimenCharacteristicsLog\"\n + \"?persistenceUnit=\" + this.getInstance().getPersistenceUnit()\n + \"&consumer.delay=\" + CaTissueRouteBuilder.SPECIMEN_DELAY + \n \"&consumeLockEntity=false\").transacted()\n .removeHeaders(\"Camel*\")\n .setHeader(\"instance\", this.constant(this.getInstance().name())));\n\n from(\"jms:queue:annotationUpdateQueue\")\n .aggregate(header(\"JMSCorrelationID\"),\n new MostRecentAggregationStrategy()).completionTimeout(\n CaTissueRouteBuilder.UPDATE_TIMEOUT)\n .to(\"jms:queue:scoreboardQueue\");\n\n from(\"jms:queue:scoreboardQueue\").removeHeaders(\"Camel*\").beanRef(\n \"scoreboard\", \"updateScoreboards\");\n\n }", "@Override\n public void configure() throws Exception {\n BankAccountManagementService bankAccountManagementService = services.get(BankAccountManagementService.class);\n UserManagementService userManagementService = services.get(UserManagementService.class);\n ObjectMapper mapper = JsonMapperFactory.getObjectMapper();\n if (this.filePathAString == null) {\n throw new Exception(\"No config file provided, please set the cashmanager.config.localfile property\");\n }\n LocalFileDTO fileConfig = mapper.readValue(new File(filePathAString), LocalFileDTO.class);\n this.preferences = new HashMap<String, String>(fileConfig.preferences);\n fileConfig.accounts.forEach((account) ->\n bankAccountManagementService.registerNewAcount(account.getId(), account.getBalance())\n );\n fileConfig.users.forEach((user) ->\n userManagementService.registerUser(user.getId(), user.getPassword())\n );\n }", "private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Activate\n protected void start() throws Exception {\n //set maximum csv file size to 8MB\n EventSimulatorDataHolder.getInstance().setMaximumFileSize(8388608);\n EventSimulatorDataHolder.getInstance().setCsvFileDirectory(Paths.get(Utils.getRuntimePath().toString(),\n EventSimulatorConstants.DIRECTORY_DEPLOYMENT, EventSimulatorConstants.DIRECTORY_CSV_FILES).toString());\n if (log.isDebugEnabled()) {\n log.debug(\"Event Simulator file service component is activated\");\n }\n }", "public void postInitAfterConfiguration() {\n\t\t// each configuration are only supporting one log handler\n\t\tcrawlerRecordHandler = new CrawlerRecord(this);\n\t\t// TODO: other configurations needs to be added after all configurations are set\n\t}", "ConferenceScheduleBuilderService startNetworking();", "void makeConfig()\n\t{\n\t\t\t\t\n\t\tbuf.append(\"\\t\\tUplink Setup Work order for \" + myDay.toString() + \" Rel 0.2\\n\");\n\t\tbuf.append(\"\\t\\t-----------------------------------------------------------------\\n\\n\");\n\t\t\n\t\tbuf.append(\"\\n1. Channel : \" + channelNumber + \" RF Source : \" + (rfSource==0?\"ASI\":(rfSource==1?\"RF\":\"MPEGoIP\")) + \"\\n\");\n\t\tbuf.append(\"\\n2. Physical Connection : \" + param.get(16) + \"\\n\");\t\n\t\t\n\t\t\n\t\tbuf.append(\"\\n3. Input Test Case : \" + Utility.getIntVal(param.get(1)) + \"\\n\\n\");\n\t\tString[] inpTCParamName = new String[] {\"TC Name\", \"Format/Modulation\", \"Rate (Msym)\", \"Bandwidth (Mbit)\"};\n\t\tprintTCParam(4, 13, Utility.getIntVal(param.get(1)), inpTCParamName);\n\t\t\n\t\tbuf.append(\"\\n4. CA Test Case : \" + Utility.getIntVal(param.get(2)) + \"\\n\\n\");\n\t\tString[] caTCParamName = new String[] {\"Scrambling Mode\", \"#Signal Source\", \"#DCD\", \"#Algorithm\", \"MSK\", \"Channel Setup\"};\n\t\tprintTCParam(5, 10, Utility.getIntVal(param.get(2)), caTCParamName);\n\n\t\tbuf.append(\"\\n5. Video Test Case : \" + Utility.getIntVal(param.get(3)) + \"\\n\\n\");\n\t\tString[] vidTCParamName = new String[] {\"Video Format\", \"Picture (resolution)\", \"Profile/Feature\", \"GOP Settings\", \"3:2 PullDown\", \n\t\t\t\t \t\t\t\t\"Video Bit Rate\", \"Video Rate\", \"#Encoder Parameters\"};\n\t\tprintTCParam(7, 8, Utility.getIntVal(param.get(3)), vidTCParamName);\n\t\n\t\tbuf.append(\"\\n6. Audio#1 Test Case : \" + Utility.getIntVal(param.get(4)) + \"\\n\\n\");\n\t\tString[] audTCParamName = new String[] {\"TC Name\", \"#Audio Type\", \"#Bit Rates\", \"#Encoder Flags #1\", \"#Encoder Flags #2\",\n \"#Encoder 1:Stereo\", \"#Encoder 2:Dual Mono\", \"#Encoder 3:Single Mono\", \n \"#Encoder 4:3/2 Surround & 5.1\", \"#PCM/Compress\", \"#DDP Mode\", \"#1:Stereo\", \n \"#2:Dual Mono\", \"#3:Single Mono\", \"#4:3/2 Surround & 5.1\"};\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\t\n\t\tbuf.append(\"\\n7. Audio#2 Test Case :\" + Utility.getIntVal(param.get(5)) + \"\\n\\n\");\n\t\tprintTCParam(6, 10, Utility.getIntVal(param.get(4)), audTCParamName);\n\n\t\tbuf.append(\"\\n8. Trancode#1 Test Case : \" + Utility.getIntVal(param.get(6)) + \" subject of automatic setup\\n\");\n\t\t\n\t\tbuf.append(\"\\n9. Trancode#2 Test Case : \" + Utility.getIntVal(param.get(7)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n10. Subtitle Test Case : \" + Utility.getIntVal(param.get(8)) + \"\\n\\n\");\n\t\tString[] sbtTCParamName = new String[] {\"TC Name\", \"Video Std\", \"Subtitle Std\", \"#Stream/Subtitle enc\"};\n\t\tprintTCParam(8, 10, Utility.getIntVal(param.get(8)), sbtTCParamName);\n\t\n\t\tbuf.append(\"\\n11. VBI Test Case : \" + Utility.getIntVal(param.get(9)) + \"\\n\\n\");\n\t\tString[] vbiTCParamName = new String[] {\"TC Name\", \"#Video Frame Rate\", \"#NABTS\", \"#WST\", \"#Invert WST\", \"#VITC PAL(1)\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"#AMOL-I(3)\", \"#AMOL-II(3)\", \"#VPS\", \"#WSS\", \"#VITS\", \"#GEMTAR(1x)(2)\", \n\t\t\t\t\t\t\t\t\t\t\t\t\"#GEMTAR(2x)(2)\", \"#Monochrome\", \"#VBItotal bit rate (KBits)\"};\n\t\tprintTCParam(9, 9, Utility.getIntVal(param.get(9)), vbiTCParamName);\n\t\t\n\t\tbuf.append(\"\\n12. LSD Test Case : \" + Utility.getIntVal(param.get(10)) + \"\\n\\n\");\n\t\tString[] lsdTCParamName = new String[] {\"TC Name\", \"#Data rate\"};\n\t\tprintTCParam(10, 9, Utility.getIntVal(param.get(10)), lsdTCParamName);\n\t\n\t\tbuf.append(\"\\n13. MPE Test Case : \" + Utility.getIntVal(param.get(11)) + \"\\n\\n\");\n\t\tString[] mpeTCParamName = new String[] {\"TC Name\", \"#PIDs\", \"Rate per PID (Mbits)\", \"Aggregate Rate (Mbits)\", \"Frame Size\", \"Flow Type\"};\n\t\tprintTCParam(11, 8, Utility.getIntVal(param.get(11)), mpeTCParamName);\n\t\t\n\t\tbuf.append(\"\\n14. FPT Test Case : \" + (Utility.getIntVal(param.get(12))==1?\"Yes\":\"No\") + \"\\n\");\n\t\t\n\t\tbuf.append(\"\\n15. CC Test Case : \" + (Utility.getIntVal(param.get(13))==1?\"Yes\":\"No\") + \"\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n16. DPM 58/59 Test Case : \" + Utility.getIntVal(param.get(14)) + \" subject of automatic setup\\n\");\t\n\t\t\n\t\tbuf.append(\"\\n17. DPM 24/54 Test Case : \" + Utility.getIntVal(param.get(15)) + \" subject of automatic setup\\n\");\t\n\n\t\tbuf.append(\"\\n\\n*** End of Uplink Setup Work order ***\\n\");\n\t\t\n\t\tString fileName = null;\n\t\ttry {\n\t\t\t SimpleDateFormat timeStamp = new SimpleDateFormat(\"dd-MMM-yyyy_HH-mm-ss\");\n\t\t\t Calendar cal = Calendar.getInstance();\n\t\t\t \n\t\t\t cal.setTime(myDay);\n\t\t\t fileName = STS.outputDirectory + \"\\\\\" + \"Uplink_Setup_\" + timeStamp.format(cal.getTime()) + \".txt\";\n\n\t\t\tFileOutputStream out = new FileOutputStream(fileName);\n\t\t\tout.write(buf.toString().getBytes());\n\t\t\tout.close();\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Can not write into file \" + fileName);\n\t\t}\n\n\t\t\n\t}", "public void configure() throws Exception {\n\t\t\n\t\tXPathBuilder xPathBuilder = new XPathBuilder\n\t\t\t\t(\"//audit-events/audit-event\");\n\n\t\tfrom(\"activemq:batch.events\").\n\t\t\tsplit(xPathBuilder).\n\t\t\tparallelProcessing().\n\t\t\tto(\"activemq:insurance.events\");\n\t}", "public AntConfiguration(){\n this.channelID1 = new ChannelID(); //initially set all parameters of Channel ID to 0\n this.channelID2 = new ChannelID(); //initially set all parameters of Channel ID to 0\n\n this.channelAssigned1 = new Channel(); //initially do not assign any cha\n this.channelAssigned2 = new Channel(); //initially do not assign any channel\n\n this.channelPeriod = 4; //set to 4Hz by default\n this.level = PowerLevel.NEGTWENTY; //set to -20dB as default\n this.state1 = ChannelState.UNASSIGNED;\n this.state2 = ChannelState.UNASSIGNED;\n\n }", "void setConfiguration();", "public void start()\n\t{\n\n\t\ttry\n\t\t{\n\t\t\tnew JDABuilder(this.appconfig.authType)\n\t\t\t\t.setToken(this.appconfig.authToken)\n\t\t\t\t.setAudioEnabled(false)\n\t\t\t\t.setAutoReconnect(true)\n\t\t\t\t.addEventListener(new DiscordMonitorListenerAdapterPrep())\n\t\t\t\t.buildBlocking(); // TODO use .buildAsync()?\n\t\t}\n\t\tcatch (LoginException | IllegalArgumentException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: Log in failed. Please check provided token.\");\n\t\t}\n\t\tcatch (RateLimitedException e)\n\t\t{\n\t\t\tSystem.err.println(\"error: This application is being rate limited by Discord.\");\n\t\t}\n\t\tcatch (InterruptedException e)\n\t\t{\n\t\t\tSystem.err.println(\"fatal: Unexpected interrupt.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void preSyncConfiguration() {\n customPreSyncConfiguration.accept(caller, listener);\n }", "@Override\n public void configure() throws Exception {\n from(\"direct:populateKafka\")\n // .threads(Integer.parseInt(Config.getProperty(\"threadPoolSize\")), Integer.parseInt(Config.getProperty(\"maxthreadPoolSize\")))\n .process(new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n try {\n exchange.getOut().setHeaders(exchange.getIn().getHeaders());\n DataSource ds = exchange.getIn().getHeader(\"dataSource\", DataSource.class);\n String kafkaPath = \"kafka:\" + Config.getProperty(\"kafkaURI\") + \"?topic=ds\" + ds.getSrcID() + \"&serializerClass=\" + Config.getProperty(\"kafkaSerializationClass\");\n exchange.getOut().setBody(exchange.getIn().getBody());\n exchange.getOut().setHeader(KafkaConstants.PARTITION_KEY, \"1\");\n exchange.getOut().setHeader(\"kPath\", kafkaPath);\n System.out.println(\"Successfully populated Kafka\");\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n }\n })\n .recipientList(header(\"kPath\"));\n\n }", "public void initConfigurations() {\r\n for (int configId = 0; configId < savedConfigurations.length; configId++) {\r\n if (configId == InterfaceConfiguration.HD_TEXTURES.getId()) {\r\n continue;\r\n }\r\n int value = savedConfigurations[configId];\r\n if (value != 0) {\r\n set(configId, value, false);\r\n }\r\n }\r\n }", "public void startRecording(){\n String samplerateString = null, buffersizeString = null;\n if (Build.VERSION.SDK_INT >= 17) {\n AudioManager audioManager = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE);\n samplerateString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE);\n buffersizeString = audioManager.getProperty(AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER);\n }\n samplerateString= \"48000\";\n buffersizeString = \"256\";\n\n System.loadLibrary(\"FrequencyDomain\");\n FrequencyDomain(Integer.parseInt(samplerateString), Integer.parseInt(buffersizeString));\n }", "public void startRecord() {\n\t\tif (state == State.INITIALIZING) {\n\t\t\taudioRecorder.startRecording();\n\t\t\taudioRecorder.read(buffer, 0, buffer.length);\n\t\t\tstate = State.RECORDING;\n\t\t}\n\t\telse {\n\t\t\tLog.e(TAG, \"start() called on illegal state\");\n\t\t\tstate = State.ERROR;\n\t\t}\n\t}", "public void init() throws ConfigurationException {\n String iosCertificatePath = (new PropertiesConfiguration(\"push.properties\")).getString(PUSH_DIR);\n File appDirFile = new File(iosCertificatePath);\n if(!appDirFile.exists()){\n appDirFile.mkdir();\n }\n }", "@Test\n public void sendBackgroundScanChannelsRequest() throws Exception {\n WifiScanner.ScanSettings requestSettings = createRequest(channelsToSpec(5150), 30000,\n 0, 20, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN);\n WifiNative.ScanSettings nativeSettings = new NativeScanSettingsBuilder()\n .withBasePeriod(30000)\n .withMaxApPerScan(MAX_AP_PER_SCAN)\n .withMaxScansToCache(BackgroundScanScheduler.DEFAULT_MAX_SCANS_TO_BATCH)\n .addBucketWithChannels(30000, WifiScanner.REPORT_EVENT_AFTER_EACH_SCAN, 5150)\n .build();\n doSuccessfulBackgroundScan(requestSettings, nativeSettings);\n }", "public RecorderThread (Context context) {\n\tthis.con = context;\n\trecording = true;\n\tsetDaemon(true);\n}", "public void setConfiguration(Properties props);", "public synchronized void activate(ComponentContext cc) {\n config = YoutubeConfiguration.getInstance();\n }", "public void init() {\n initiateConfig();\n initiateKafkaStuffs();\n log.info(\"Kafka consumer and producer for topic [{}] started.\", topic);\n\n service.submit(() -> {\n while (true) {\n try {\n ConsumerRecords<String, byte[]> records = consumer.poll(3000);\n for (ConsumerRecord<String, byte[]> record : records) {\n log.info(\"Reveive kafka message from topic [{}] with key [{}]\", topic, record.key());\n repository.get(record.key()).offer(record.value());\n accounter.incrementAndGet();\n }\n while (accounter.get() != 0) {\n Thread.sleep(5);\n }\n consumer.commitSync();\n } catch (Exception e) {\n log.warn(\"Something wrong happened during message pulling process\", e);\n consumer.close();\n consumer = null;\n initiateConsumer();\n }\n }\n });\n }", "private void startRecording() {\n\n }", "private void startCapture() {\n if (checkAudioPermissions()) {\n requestScreenCapture();\n }\n }", "public void onEnable() {\n super.onEnable();\n File config = new File(getDataFolder(), \"config.yml\");\n if (!getDataFolder().exists()) {\n getDataFolder().mkdir();\n }\n if (!config.exists()) {\n saveResource(\"config.yml\", true);\n }\n\n configuration = new ConfigManager(config).build();\n log(\"Loaded DeluxeCounter by FusionCoding\");\n\n countManager = new CountManager();\n countManager.init();\n\n PluginManager pm = Bukkit.getPluginManager();\n pm.registerEvents(new AsyncPlayerPreLoginListener(), this);\n getCommand(\"cowtester\").setExecutor(new CowTesterCommand());\n\n }", "@Override\n\t\t\tpublic void start() {\n\t\t\t\tinitResource();\n\t\t\t\t//获取通讯录信息\n\t\t\t\tinitContactsData();\n\t\t\t\t//同步通讯录\n\t\t\t\tupLoadPhones();\n\t\t\t}", "@PostConstruct\n public void startWatch() throws Exception {\n LOGGER.info(\"START WATCH.\");\n Runnable task = new Runnable() {\n @Override\n public void run() {\n saveCurrencyListToDb();\n }\n };\n saveScheduleManagement(task, LocalTime.of(timePointHour, timePointMinute), period, TimeUnit.HOURS);\n }", "public void record() {\n if (mCarContext.checkSelfPermission(RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n CarToast.makeText(mCarContext, \"Grant mic permission on phone\",\n CarToast.LENGTH_LONG).show();\n List<String> permissions = Collections.singletonList(RECORD_AUDIO);\n mCarContext.requestPermissions(permissions, (grantedPermissions,\n rejectedPermissions) -> {\n if (grantedPermissions.contains(RECORD_AUDIO)) {\n record();\n }\n });\n return;\n }\n CarAudioRecord record = CarAudioRecord.create(mCarContext);\n\n Thread recordingThread =\n new Thread(\n () -> doRecord(record),\n \"AudioRecorder Thread\");\n recordingThread.start();\n }", "@Test\n public void attach_before_connect() {\n String channelName = \"attach_before_connect_\" + testParams.name;\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n ably = new AblyRealtime(opts);\n\n /* create a channel and attach */\n final Channel channel = ably.channels.get(channelName);\n channel.attach();\n (new ChannelWaiter(channel)).waitFor(ChannelState.attached);\n assertEquals(\"Verify attached state reached\", channel.state, ChannelState.attached);\n\n } catch (AblyException e) {\n e.printStackTrace();\n fail(\"init0: Unexpected exception instantiating library\");\n } finally {\n if(ably != null)\n ably.close();\n }\n }", "@Override\n public synchronized void enableIfPossible() {\n if (!enabled && analyticNotificationConfig != null) {\n if (lastNotificationTimeMs == null) {\n reset();\n\n } else {\n // See if we should resume notifications.\n if (analyticNotificationConfig.getResumeAfter() != null) {\n final Instant resumeTime = SimpleDurationUtil.plus(\n lastNotificationTimeMs,\n analyticNotificationConfig.getResumeAfter());\n final Instant now = Instant.now();\n if (now.isAfter(resumeTime)) {\n reset();\n }\n }\n }\n }\n }", "@Override\n\tpublic void configure() {\n\t final SlackComponent slackComponent = (SlackComponent) this.getContext().getComponent(\"slack\");\n\t // set the webhook URL\n\t slackComponent.setWebhookUrl(\"https://hooks.slack.com/services/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\");\n\t\t\n\t\tfrom(from)\n\t\t.routeId(routeId)\n\t\t.setHeader(\"applicationId\", constant(applicationId))\n .process(processor)\n\t\t.to(toUris)\n\t\t.tracing(tracing)\n\t\t.log(log);\n\t}", "void acknowledgeConfiguration() {\n // First ensure that both players have their correct color\n Player player0 = game.getPlayers().get(0);\n Player player1 = game.getPlayers().get(1);\n player1.setStone(player0.getStone() == Stone.BLACK ? 2 : 1);\n\n leader.acknowledgeConfig();\n opponent.acknowledgeConfig();\n }", "protected void initRecorderParameters() {\n\t\tmMediaRecorder.setCamera(mCamera);\n\t\tmMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\t\tmMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\tmMediaRecorder.setVideoEncoder(mVideoEncoder);\n\t\tmMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());\n\t\tmMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY);\n\t\tmMediaRecorder.setVideoFrameRate(mQuality.framerate);\n\t\tmMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate);\n\t\tmMediaRecorder.setOrientationHint(mQuality.orientation);\n\t}", "@Test\n public void attach() {\n String channelName = \"attach_\" + testParams.name;\n AblyRealtime ably = null;\n try {\n ClientOptions opts = createOptions(testVars.keys[0].keyStr);\n ably = new AblyRealtime(opts);\n\n /* wait until connected */\n (new ConnectionWaiter(ably.connection)).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", ably.connection.state, ConnectionState.connected);\n\n /* create a channel and attach */\n final Channel channel = ably.channels.get(channelName);\n channel.attach();\n (new ChannelWaiter(channel)).waitFor(ChannelState.attached);\n assertEquals(\"Verify attached state reached\", channel.state, ChannelState.attached);\n\n } catch (AblyException e) {\n e.printStackTrace();\n fail(\"init0: Unexpected exception instantiating library\");\n } finally {\n if(ably != null)\n ably.close();\n }\n }", "void onSettings(ProcessingConfiguration configuration);", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\n }", "@Override\n public void onEnable() {\n spigotLogger = new SpigotLogger(\"Phantom\", ChatColor.WHITE, ChatColor.GRAY, LogLevel.DEBUG);\n\n // Load the configuration files.\n if (!setupConfigs(settingsConfig, messagesConfig)) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to load all config files.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Set up all storage systems.\n if (!storageManager.setup()) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to set up storage systems.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Load all (internal) modules.\n if (!moduleManager.loadAllModules()) {\n // If failed -> Stop enabling the plugin any further.\n spigotLogger.log(LogLevel.FATAL, \"Failed to load all internal modules.\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n\n // Now everything is loaded and we can start creating all prerequisites for the storage systems.\n // Of course we're running this async as they mostly involve IO operations.\n // Todo create server join states (OPEN, MAINTENANCE, BOOTING) for a minor update.\n Bukkit.getScheduler().runTaskAsynchronously(this, () -> {\n if (!storageManager.testSystems()) {\n // If failed -> Disable Phantom.\n }\n\n if (!storageManager.createPrerequisites()) {\n // If failed -> Disable Phantom.\n }\n });\n\n spigotLogger.log(LogLevel.SUCCESS, \"Enabled plugin.\");\n }", "private static void receiverRecordCreator(DonorReceiver acc) {\n ReceiverOrganInventory organInventory = acc.getRequiredOrgans();\n\n boolean[] organPresent = {\n organInventory.getLiver(), organInventory.getKidneys(), organInventory.getHeart(),\n organInventory.getLungs(), organInventory.getIntestine(), organInventory.getCorneas(),\n organInventory.getMiddleEars(), organInventory.getSkin(), organInventory.getBone(),\n organInventory.getBoneMarrow(), organInventory.getConnectiveTissue(),\n organInventory.getPancreas()\n };\n\n LocalDateTime[] organTimes = {\n organInventory.getLiverTimeStamp(), organInventory.getKidneysTimeStamp(),\n organInventory.getHeartTimeStamp(), organInventory.getLungsTimeStamp(),\n organInventory.getIntestineTimeStamp(), organInventory.getCorneasTimeStamp(),\n organInventory.getMiddleEarsTimeStamp(), organInventory.getSkinTimeStamp(),\n organInventory.getBoneTimeStamp(), organInventory.getBoneMarrowTimeStamp(),\n organInventory.getConnectiveTissueTimeStamp(), organInventory.getPancreasTimeStamp()\n };\n\n String[] organString = {\n \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\", \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\",\n \"Bone Marrow\", \"Connective Tissue\", \"Pancreas\"\n };\n\n for (int i = 0; i < organPresent.length; i++) {\n if (organPresent[i]) {\n ReceiverRecord record = new ReceiverRecord(acc.fullName(), acc.getUserName(),\n acc.getContactDetails().getAddress().getRegion(), organTimes[i], organString[i]);\n records.add(record);\n }\n }\n }", "public void setConfigurations() {\n configurations = jsonManager.getConfigurationsFromJson();\n }", "private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }", "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest,\n AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public void initialConfig() {\n }", "public void subscribe(String bucketName, Reconfigurable rec) throws ConfigurationException {\n Bucket bucket = getBucketConfiguration(bucketName);\n\n ReconfigurableObserver obs = new ReconfigurableObserver(rec);\n BucketMonitor monitor = this.monitors.get(bucketName);\n if (monitor == null) {\n URI streamingURI = bucket.getStreamingURI();\n monitor = new BucketMonitor(this.loadedBaseUri.resolve(streamingURI), bucketName, this.restUsr, this.restPwd, configurationParser);\n this.monitors.put(bucketName, monitor);\n monitor.addObserver(obs);\n monitor.startMonitor();\n } else {\n monitor.addObserver(obs);\n }\n }", "public void configureAndStart(ProducerType producerType) {\n kafkaProperties = new Properties();\n kafkaProperties.put(\"metadata.broker.list\", brokerList);\n kafkaProperties.put(\"serializer.class\", \"kafka.serializer.StringEncoder\");\n kafkaProperties.put(\"request.required.acks\", \"1\");\n kafkaProperties.put(\"producer.type\", producerType.getType());\n\n producerConfig = new ProducerConfig(kafkaProperties);\n\n // Start the producer\n producer = new Producer<String, String>(producerConfig);\n }", "void startReportingTask();", "public void subscribe() {\n Fitness.getRecordingClient(this, GoogleSignIn.getLastSignedInAccount(this))\r\n .subscribe(DataType.TYPE_STEP_COUNT_CUMULATIVE)\r\n .addOnCompleteListener(\r\n new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n Log.i(TAGFit, \"Successfully subscribed!\");\r\n } else {\r\n Log.w(TAGFit, \"There was a problem subscribing.\", task.getException());\r\n }\r\n }\r\n });\r\n }", "protected void start() throws ConfigurationException, MalformedContentNameStringException, IOException {\n \t\t_thd.start();\n \t\t_chat.setLogging(Level.WARNING);\n \t\t_chat.listen();\n \t}", "public void run() {\n //Moved Observers NOV 15\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController); //would be created\n }\n if (messagingSystem.speakerMessengerController != null) {\n this.addObserver(messagingSystem.speakerMessengerController.userInfo);\n }\n CSVReader fileReader = new CSVReader(\"phase1/src/Resources/Talks.csv\");\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm\");\n for(ArrayList<String> talkData: fileReader.getData()){\n this.talkManager.createTalk(talkData.get(0), talkData.get(1), talkData.get(2),\n talkData.get(3), LocalDateTime.parse(talkData.get(4), formatter));\n }\n setTalkManager();\n messagingSystem.run();\n scheduleSystem.run();\n createSignUpAttendees();\n if (this.user instanceof Attendee) {\n userScheduleController.setSignUpMap(signUpMap);\n }\n if (this.user instanceof Organizer) {\n orgScheduleController.setSignUpMap(signUpMap);\n }\n }", "private void startAdvertising() {\n client.startAdvertising(codeName,getResources().getString(R.string.service_id), connectionLifecycleCallback, new AdvertisingOptions(STRATEGY));\n }", "@Override\n public void configure() throws Exception {\n Properties properties = new Properties();\n properties.load(this.getClass().getClassLoader().getResourceAsStream(\"route.properties\"));\n String ordersFolder = properties.getProperty(\"folder.orders\");\n String postidentFolder = properties.getProperty(\"folder.postident\");\n if(ordersFolder == null || postidentFolder == null) {\n throw new RuntimeException(\"could not read properties for camel route, make sure there\" +\n \" is a file called route.properties in the root or the resoureces folder of your \" +\n \"application that contains the properties folder.orders and folder.postident\");\n }\n\n /*\n * There are two ways of starting the open-account process:\n *\n * - placing an XML file in a hot folder (see route.properties for folder location)\n * - sending a JSON order to a REST web service (see README.txt for instructions)\n */\n // This route handles files placed in the incoming orders folder (see route.properties file)\n // and routes the XML to a JMS queue:\n from(\"file://\" + ordersFolder).\n routeId(\"hot-folder order route\").\n log(\"=======================\").\n log(\"Received order from hot-folder\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"Delivering order to JMS XML queue\").\n to(\"jms:xmlQueue\");\n\n // Order objects that are sent to the REST web service are placed in a JMS queue called\n // orderQueue (see README.txt about setting up the JMS queue). This route listens for\n // incoming messages on that queue, transforms the object to XML using the marshalling\n // feature that is built into camel and delivers the resulting XML to the same queue the\n // incoming XML documents are placed in:\n from(\"jms:orderQueue\").\n routeId(\"order to xml route\").\n log(\"=======================\").\n log(\"received order from orderQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order object to xml\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n marshal(new JaxbDataFormat(Order.class.getPackage().getName())).\n log(\"=======================\").\n log(\"delivering order xml to xmlQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n to(\"jms:xmlQueue\");\n\n /*\n * This route listens for incoming messages on the JMS queue named xmlQueue. When a message\n * arrives, a CDI bean called incomingOrderService is used to extract the data from the XML\n * into a HashMap that will be passed on to the camunda BPM engine when the process instance\n * is started. The HashMap is the same as a variable map that can be passed on to process\n * instances via the camunda BPM API.\n */\n from(\"jms:xmlQueue\").\n routeId(\"start order process route\").\n log(\"=======================\").\n log(\"received order xml from xmlQueue\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"setting order # to '\" + CAMUNDA_BPM_BUSINESS_KEY + \"' property\").\n setProperty(CAMUNDA_BPM_BUSINESS_KEY).xpath(\"//@ordernumber\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order xml to order object\").\n unmarshal(new JaxbDataFormat(Order.class.getPackage().getName())).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"transforming order object to variable map (java.util.Map) as input for the camunda BPM process\").\n process(new OrderToMapProcessor()).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"starting open-account process\").\n to(\"camunda-bpm:start?processDefinitionKey=open-account\").\n log(\"=======================\").\n log(\"open-account process started\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\")\n ;\n\n /*\n * If the order was rejected, we'll send a mail to the customer to inform him that his\n * application will not be processed.\n */\n from(\"direct:inform-customer\").\n routeId(\"inform customer route\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n beanRef(\"emailService\");\n\n /*\n * When the order is approved, it can be passed to the accountService to create an account\n * object and persist it to the database. Since the order was split up into values in a\n * java.util.Map, we'll first pass the map to the MapToOrderProcessor.\n */\n from(\"direct:setup-account\").\n routeId(\"set up account route\").\n log(\"=======================\").\n log(\"transforming process variable map to order object: ${body}\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n process(new MapToOrderProcessor()).\n log(\"=======================\").\n log(\"calling accountService to create account from incoming order\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n beanRef(\"accountService\");\n\n /*\n * Finally, this route waits for incoming postident scans to be placed in a hot folder.\n * When a document is placed there (edit route.properties to configure the location of\n * the folder), the order number is extracted from the file name and used as correlation\n * id to send a signal to the waiting process instance.\n */\n from(\"file://\" + postidentFolder).\n routeId(\"incoming postident route\").\n log(\"=======================\").\n log(\"received postident document\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"extracting order number from file name\").\n process(new Processor() {\n @Override\n public void process(Exchange exchange) throws Exception {\n String businessKey = exchange.getIn().getHeader(\"CamelFileName\").toString().split(\"-\")[1].substring(0, 4);\n exchange.setProperty(CAMUNDA_BPM_BUSINESS_KEY, businessKey);\n }\n }).\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n log(\"correlating document with process instance\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\").\n log(\"=======================\").\n to(\"camunda-bpm://message?processDefinitionKey=open-account&activityId=wait_for_postident\").\n to(\"log:org.camunda.demo.camel.route?level=INFO&showAll=true&multiline=true\");\n }", "public void setupSubscriptions()\n {\n String debug = System.getProperty(\"SAFE.debug\");\n if (debug != null && debug.equalsIgnoreCase(\"true\")) {\n _debug = true;\n }\n \n // get handle to message transport service \n try {\n MessageTransportService mts = (MessageTransportService) this.getBindingSite().getServiceBroker().getService(this,\n MessageTransportService.class,\n null);\n \n // get the name of the domain we are managing\n String domainName = System.getProperty(\"org.cougaar.safe.domainName\");\n if (domainName == null) {\n throw new NullPointerException(\"System property org.cougaar.safe.domainName is not set\");\n } \n\n // create MessageSender and MessageReceiver for DM\n // create local locator and bind MessageReceiver to it\n CougaarMessageTransportService messageTransport = new CougaarMessageTransportService(mts);\n MessageSender sender = messageTransport.newMessageSender();\n MessageReceiver receiver = messageTransport.newMessageReceiver(); \n CougaarLocator myLocator = new CougaarLocator(domainName);\n receiver.bindToLocalLocator(myLocator);\n \n // create Domain Manager\n _dm = new MyDomainManager(domainName,\n receiver,\n sender);\n \n }\n catch (Exception xcp) {\n xcp.printStackTrace();\n }\n \n // BEGIN rehydrate \n \n // rehydrate: get entity descriptions from the blackboard and register them\n // with the domain manager\n Iterator entityDescriptions = query(_entityDescriptionPredicate).iterator();\n Vector nonGuardDescrips = new Vector();\n while (entityDescriptions.hasNext()) { \n KAoSEntityDescription entityDescrip = (KAoSEntityDescription) entityDescriptions.next();\n // register all the guards first\n if (entityDescrip.getEntityType().equals(KAoSConstants.GUARD)) { \n _dm.register(entityDescrip, true);\n }\n else {\n nonGuardDescrips.addElement(entityDescrip);\n }\n }\n // then register the other entities\n for (int i=0; i<nonGuardDescrips.size(); i++) {\n _dm.register((KAoSEntityDescription) nonGuardDescrips.elementAt(i), true);\n }\n \n // rehydrate: get policies from the blackboard and give\n // them to the domain manager\n Iterator policyMsgs = query(_policyMsgPredicate).iterator();\n Vector policyMsgsV = new Vector();\n while (policyMsgs.hasNext()) {\n policyMsgsV.addElement(policyMsgs.next());\n }\n _dm.rehydratePolicies(policyMsgsV);\n \n // END rehydrate\n \n _proposedPolicyUpdate = (IncrementalSubscription) subscribe(_proposedPolicyUpdatePredicate); \n }", "@Override\n public void onRecordingStart(String recordingId) {\n String log = \"[SRS][SA] Recording Started! isRecording=\" +\n skylinkConnection.isRecording() + \".\";\n Toast.makeText(parentActivity, log, Toast.LENGTH_LONG).show();\n Log.d(TAG, log);\n }", "synchronized public void start() throws IOException, InterruptedException {\n createInstanceFromConfig(true);\n }", "private void startAdvertising() {\n BluetoothAdapter bluetoothAdapter = mBluetoothManager.getAdapter();\n if (!bluetoothAdapter.isEnabled()) {\n System.out.println(\"does not support\");\n }\n if (!bluetoothAdapter.isMultipleAdvertisementSupported()) {\n //Device does not support Bluetooth LE\n System.out.println(\"does not support\");\n }\n\n mBluetoothLeAdvertiser = bluetoothAdapter.getBluetoothLeAdvertiser();\n if (mBluetoothLeAdvertiser == null) {\n Log.w(TAG, \"Failed to create advertiser\");\n return;\n }\n\n AdvertiseSettings settings = new AdvertiseSettings.Builder()\n .setAdvertiseMode(AdvertiseSettings.ADVERTISE_MODE_LOW_LATENCY)\n .setConnectable(true)\n .setTimeout(0)\n .setTxPowerLevel(AdvertiseSettings.ADVERTISE_TX_POWER_HIGH)\n .build();\n\n AdvertiseData data = new AdvertiseData.Builder()\n .setIncludeDeviceName(true)\n .setIncludeTxPowerLevel(false)\n .addServiceUuid(new ParcelUuid(TimeProfile.TIME_SERVICE))\n .build();\n\n mBluetoothLeAdvertiser\n .startAdvertising(settings, data, mAdvertiseCallback);\n }", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "public void run() {\n\t\tlog.info(\"Weekly Scheduled Asset Report Job starting >> isMasterInstance:{} and isAuthorInstance:{}.\", isMasterInstance, isAuthorInstance);\r\n\t\tSession session = null;\r\n\t\t\r\n if (isMasterInstance && isAuthorInstance) {\r\n \r\n \tif(sendWeeklyReport) {\r\n\t\t try {\r\n\t\t\t\t\t session = getSession();\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t //TODO- \r\n\t\t\t\t\t String lowerBoundDate = \"2014-06-19\";\r\n\t\t\t\t\t String upperBoundDate = \"2014-06-26\";\r\n\t\t\t\t\t \r\n\t\t\t\t\t String dateRange = lowerBoundDate + \" - \" + upperBoundDate;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t String templatePath = MISReportConstant.REPORT_EMAIL_TEMPLATE;\r\n\t\t\t\t\t Map<String, String> emailParams = MISReportUtil.buildEmailParams(reportType, reportFrequency, dateRange);\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t DataSource reportDatasource = generateReport.generateReport(lowerBoundDate, upperBoundDate, reportType, session);\r\n\t\t\t\t\t\r\n\t\t\t\t\t //Get the UserGroup name for the reporType\t\t\r\n\t\t\t\t\t String userGroup = userManagement.getUserGroup(reportType);\r\n\t\t\t\t\t\r\n\t\t\t\t\t String[] authors = userManagement.getAllUsersOfGroup(userGroup, session);\r\n\t\t\t\t\t\r\n\t\t\t\t\t for(String authorID: authors) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\temailParams.put(MISReportConstant.FIRST_NAME, userManagement.getUserName(authorID, session));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\temailService.sendEmail(templatePath, emailParams, session, reportDatasource, userManagement.getEmailAddress(authorID, session));\r\n\t\t\t\t\t\r\n\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\t log.error(\"[Exception]\",e);\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif(session.isLive())\r\n\t\t\t\t\t\tsession.logout();\r\n\t\t\t\t}\r\n\t\t \r\n\t\t log.info(\"Weekly Asset Report Job finished sending {} reports\", reportType);\r\n \t}\r\n \telse {\r\n \t\tlog.info(\"Weekly Asset Report Job not executed>> Enable it from the AEM Felix console to execute\");\r\n \t}\r\n }\r\n \r\n\t}", "private void initialiseConfiguration(final JobExecutionContext context)\n \n {\n // PRECONDITIONS\n assert context != null : \"context must not be null.\";\n \n // Body\n \n // Pull state from the job configuration data.\n JobDataMap jobData = context.getJobDetail().getJobDataMap();\n Object transactionServiceObj = jobData.get(JOB_DATA_PARAMETER_NAME_TRANSACTION_SERVICE);\n Object deploymentReportCleanupServiceObj = jobData.get(JOB_DATA_PARAMETER_NAME_DEPLOYMENT_REPORT_CLEANUP_SERVICE);\n Object webProjectNodeRefObj = jobData.get(JOB_DATA_PARAMETER_NAME_WEB_PROJECT_NODE_REF);\n Object webProjectDNSNameObj = jobData.get(JOB_DATA_PARAMETER_NAME_WEB_PROJECT_DNS_NAME);\n Object maxReportsToPrunePerBatchObj = jobData.get(JOB_DATA_PARAMETER_NAME_MAX_REPORTS_TO_PRUNE_PER_BATCH);\n\n \n // Service Registry\n if (transactionServiceObj == null ||\n !(transactionServiceObj instanceof TransactionService))\n {\n throw new AlfrescoRuntimeException(JOB_DATA_PARAMETER_NAME_TRANSACTION_SERVICE + \" must be provided and must be a reference to an instance of org.alfresco.service.transaction.TransactionService.\");\n }\n \n this.transactionService = (TransactionService)transactionServiceObj;\n \n \n // Timed Deployment Service\n if (deploymentReportCleanupServiceObj == null ||\n !(deploymentReportCleanupServiceObj instanceof DeploymentReportCleanupService))\n {\n throw new AlfrescoRuntimeException(JOB_DATA_PARAMETER_NAME_DEPLOYMENT_REPORT_CLEANUP_SERVICE + \" must be provided and must be a reference to an instance of org.alfresco.extension.deployment.reports.DeploymentReportCleanupService.\");\n }\n \n this.deploymentReportCleanupService = (DeploymentReportCleanupService)deploymentReportCleanupServiceObj;\n\n \n // Web Project, either by NodeRef or DNS Name\n if (webProjectNodeRefObj == null &&\n webProjectDNSNameObj == null)\n {\n throw new AlfrescoRuntimeException(\"Either \" + JOB_DATA_PARAMETER_NAME_WEB_PROJECT_NODE_REF + \" or \" +\n JOB_DATA_PARAMETER_NAME_WEB_PROJECT_DNS_NAME + \" must be provided.\");\n }\n \n if (webProjectNodeRefObj != null)\n {\n this.webProjectNodeRef = new NodeRef((String)webProjectNodeRefObj);\n }\n \n if (webProjectDNSNameObj != null)\n {\n this.webProjectDNSName = (String)webProjectDNSNameObj;\n }\n \n \n // Max reports to prune per batch\n if (maxReportsToPrunePerBatchObj != null &&\n maxReportsToPrunePerBatchObj instanceof String)\n {\n int maxReportsToPrunePerBatch = -1;\n \n try\n {\n maxReportsToPrunePerBatch = Integer.valueOf((String)maxReportsToPrunePerBatchObj);\n \n this.deploymentReportCleanupService.setMaxReportsToPrunePerBatch(maxReportsToPrunePerBatch);\n }\n catch (NumberFormatException nfe)\n {\n // Swallow and move on\n log.warn(\"Unable to parse \" + JOB_DATA_PARAMETER_NAME_MAX_REPORTS_TO_PRUNE_PER_BATCH + \" value '\" + (String)maxReportsToPrunePerBatchObj + \"' - reverting to default.\");\n }\n }\n }", "protected void configClientReconnected(String nickname) throws IOException, InterruptedException {\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeGreen.getDeckNumber(),deckProductionCardThreeGreen.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeBlu.getDeckNumber(),deckProductionCardThreeBlu.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeYellow.getDeckNumber(),deckProductionCardThreeYellow.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardThreeViolet.getDeckNumber(),deckProductionCardThreeViolet.getDeck()), nickname);\n\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoGreen.getDeckNumber(),deckProductionCardTwoGreen.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoBlu.getDeckNumber(),deckProductionCardTwoBlu.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoYellow.getDeckNumber(),deckProductionCardTwoYellow.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardTwoViolet.getDeckNumber(),deckProductionCardTwoViolet.getDeck()), nickname);\n\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneGreen.getDeckNumber(),deckProductionCardOneGreen.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneBlu.getDeckNumber(),deckProductionCardOneBlu.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneYellow.getDeckNumber(),deckProductionCardOneYellow.getDeck()), nickname);\n notifyOnlyOneSpecificObserver(new DeckProductionCardConfigMessage(deckProductionCardOneViolet.getDeckNumber(),deckProductionCardOneViolet.getDeck()), nickname);\n\n notifyOnlyOneSpecificObserver(new ConfigurationMarketMessage(market.getGridActual()), nickname);\n\n }", "public void start() throws IOException\n {\n File plugins = new File(\"plugins\");\n plugins.mkdir();\n pluginManager.loadPlugins(plugins);\n config.load();\n reconnectHandler = new YamlReconnectHandler();\n isRunning = true;\n\n pluginManager.enablePlugins();\n\n for (ListenerInfo info : config.getListeners())\n {\n $().info(\"Listening on \" + info.getHost());\n ListenThread listener = new ListenThread(info);\n listener.start();\n listeners.add(listener);\n }\n\n saveThread.scheduleAtFixedRate(new TimerTask()\n {\n @Override\n public void run()\n {\n getReconnectHandler().save();\n }\n }, 0, TimeUnit.MINUTES.toMillis(5));\n\n new Metrics().start();\n }", "public void send_setup()\n {\n out.println(\"chain_setup\");\n }", "@ReactMethod\n public void start() {\n ChirpError error = chirpConnect.start();\n if (error.getCode() > 0) {\n onError(context, error.getMessage());\n } else {\n isStarted = true;\n }\n }", "public synchronized void startRegistration() {\n state = State.REGISTRATION;\n players = new HashSet<>();\n }", "public void startAllReporter() {\n compositeReporter.startAll();\n }", "protected void onDiscoveryStarted() {\n logAndShowSnackbar(\"Subscription Started\");\n }", "@Override\n public synchronized void start() {\n LOG.info(\"HDFSSink start\");\n this.bucketWriterMap = new WriterLinkedHashMap(maxOpenFiles);\n Configuration config = new Configuration();\n config.setBoolean(\"fs.automatic.close\", false);\n try {\n this.fileSystem = new Path(this.filePath).getFileSystem(config);\n }\n catch (IOException ex) {\n LOG.error(ex.getMessage(), ex);\n }\n this.scheduler = Executors.newSingleThreadScheduledExecutor();\n this.checkConfScheduler();\n this.sinkCounter.start();\n super.start();\n }", "public void setCredentials(SelfManagedKafkaAccessConfigurationCredentials credentials) {\n this.credentials = credentials;\n }", "public void applyConfiguration() throws Exception {\n\t\tLOGGER.info(\"Start day-2 configuration\");\n\t\tdhcpConf();\n\t\tbgpPrefixConf();\n\t\tstaticRoutesConfig();\n\t\tnatConfig();\n\t\tpatConf();\n\t\tconfAcl();\n\t\tLOGGER.info(\"End day-2 configuration\");\n\t}", "private void startRecording() {\n // When start recording, create a file with format yyyyMMdd_HHmmss.3gp\n // y, M, d, H, m,s are year, month, day, hour, minite and second when start recording\n String currentDateAndTime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n curRecordingFileName = APP_STORAGE + \"/\" + currentDateAndTime + \".3gp\";\n Log.e(TAG, \"Start recording file: \" + curRecordingFileName);\n\n mRecorder = new MediaRecorder();\n mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n mRecorder.setOutputFile(curRecordingFileName);\n mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n try {\n mRecorder.prepare();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaRecorder\");\n }\n\n mRecorder.start();\n }", "public List<ProgressConfigurationType> getAllConfigurations();", "public RecorderManager(int audioSource, int sampleRate, int channelConfig, int audioFormat, String filePath){\n\t\ttry {\n\t\t\tif (audioFormat == AudioFormat.ENCODING_PCM_16BIT) {\n\t\t\t\tbSamples = 16;\n\t\t\t} else {\n\t\t\t\tbSamples = 8;\n\t\t\t}\n\t\t\tif (channelConfig == AudioFormat.CHANNEL_CONFIGURATION_MONO) {\n\t\t\t\tnChannels = 1;\n\t\t\t} else {\n\t\t\t\tnChannels = 2;\n\t\t\t}\n\t\t\tframePeriod = sampleRate * TIMER_INTERVAL / 1000;\n\t\t\tbufferSize = framePeriod * 2 * bSamples * nChannels / 8;\n\t\t\tif (bufferSize < AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)) {\n\t\t\t\t// Check to make sure buffer size is not smaller than the smallest allowed one\n\t\t\t\tbufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);\n\t\t\t\t// Set frame period and timer interval accordingly\n\t\t\t\tLog.w(TAG, \"Increasing buffer size to \" + Integer.toString(bufferSize));\n\t\t\t}\n\t\t\t//record period anand read buffer\n\t\t\tframePeriod = bufferSize / ( 2 * bSamples * nChannels / 8 );\n\t\t\tbuffer = new byte[framePeriod*bSamples/8*nChannels];\n\t\t\t/**\n\t\t\t * audioSource Audio source\n\t\t\t */\n\t\t\taudioRecorder = new AudioRecord(audioSource, sampleRate, channelConfig, audioFormat, bufferSize);\n\n\t\t\tif (audioRecorder.getState() != AudioRecord.STATE_INITIALIZED)\n\t\t\t\tthrow new Exception(\"AudioRecord initialization failed\");\n//\t\t\t//在此处进行数据读取\n//\t\t\taudioRecorder.setRecordPositionUpdateListener(updateListener);\n//\t\t\t//录音 通知周期 及 录音数据读取 buffer 的设定\n//\t\t\taudioRecorder.setPositionNotificationPeriod(framePeriod);\n//\t\t\tLog.i(TAG,\"path :\" +filePath);\n\t\t\t//当前状态为初始化状态\n\t\t\tstate = State.INITIALIZING;\n\t\t} catch (Exception e) {\n\t\t\tLog.e(TAG, \"initialize fail\",e);\n\t\t}\n\t}", "private AeRegistration() {\n\t\tnotifications = new HashMap<String, List<JSONObject>>();\n\t\tsubscriptions = new HashMap<String,String>();\n\t\tsubscribedToResourcesSet = new HashMap<String,String>();\n\t\tsubscriptionsPerSessions = new HashMap<String, Set<String>>();\n\t}", "@Override\n\tpublic void onEnable() {\n\t\tcreateConfig();\n\t\tif(cfg == null) {\n\t \tcfg = getConfig();\n\t }\n\t\t// Listener registrieren\n\t\t//getServer().getPluginManager().registerEvents(new EnderchestListener(this), this));\n\t\t\n\t\t// Befehle registrieren\n\t\t// https://pastebin.com/6NsN6f6X sehr cooles Beispiel für TAB-Vervollständigung\n\t\tthis.getCommand(\"enderchest\").setExecutor(new CommandEnderchest(this));\n\t\t\n\t\t// abschließen\n \tgetLogger().info(pdf.getName() + \" version \" + pdf.getVersion() + \" by \" + pdf.getAuthors().get(0) + \" enabled! :)\");\n\t}", "@Override\n public void configure(Context context) {\n this.context = context;\n this.projectConfigure = new ProjectConfigure(context.getString(\"project_conf_path\", \"\"));\n //初始化变量\n ProjectConfigure.BaseConfigure baseSinkConf = projectConfigure.checkUpdate();\n copyBaseSinkConf(baseSinkConf);\n\n Preconditions.checkArgument(this.batchSize > 0, \"batchSize must be greater than 0\");\n\n this.filePath = (String) Preconditions.checkNotNull((Object)context.getString(\"hdfs.path\"), \"hdfs.path is required\");\n if (this.filePath.endsWith(DIRECTORY_DELIMITER)) {\n this.filePath += DIRECTORY_DELIMITER;\n }\n\n if (this.sinkCounter == null) {\n this.sinkCounter = new SinkCounter(this.getName());\n }\n }", "void subscribe(Long subscriptionId, ApplicationProperties.VendorConfiguration configuration);" ]
[ "0.5974598", "0.52542615", "0.49688068", "0.49036726", "0.48573422", "0.48039958", "0.47804365", "0.47745445", "0.47589064", "0.47195965", "0.4697352", "0.4610838", "0.46044353", "0.45978683", "0.45958093", "0.45796514", "0.45697868", "0.4527876", "0.451325", "0.450803", "0.45061183", "0.44965228", "0.44891825", "0.4481614", "0.44436744", "0.44409528", "0.44334605", "0.44324142", "0.4416991", "0.4396406", "0.4390258", "0.43725482", "0.434871", "0.43486813", "0.43270957", "0.43268722", "0.43259174", "0.43243265", "0.43226165", "0.43209952", "0.42997077", "0.42985997", "0.42970505", "0.4296201", "0.4295324", "0.42897922", "0.42798293", "0.42777878", "0.42687044", "0.4263131", "0.42623124", "0.42583415", "0.4253663", "0.42465365", "0.42464057", "0.42269433", "0.42264992", "0.42251453", "0.4209884", "0.42078915", "0.4207244", "0.4206948", "0.4204261", "0.4198988", "0.41983327", "0.41981992", "0.41969743", "0.41949645", "0.41948402", "0.4190636", "0.41860828", "0.41753724", "0.41741115", "0.41704464", "0.41685298", "0.4167881", "0.4167112", "0.41659567", "0.41637135", "0.41601163", "0.41553304", "0.41541028", "0.41523626", "0.41484308", "0.4146556", "0.41453227", "0.41448638", "0.41399956", "0.41387376", "0.41360134", "0.41227", "0.4121861", "0.41194117", "0.4113852", "0.41121632", "0.4112124", "0.41029984", "0.41008157", "0.40984872", "0.4097337" ]
0.5525819
1
Creates a new delivery channel object to deliver the configuration information to an Amazon S3 bucket, and to an Amazon SNS topic. You can use this action to change the Amazon S3 bucket or an Amazon SNS topic of the existing delivery channel. To change the Amazon S3 bucket or an Amazon SNS topic, call this action and specify the changed values for the S3 bucket and the SNS topic. If you specify a different value for either the S3 bucket or the SNS topic, this action will keep the existing value for the parameter that is not changed. NOTE: Currently, you can specify only one delivery channel per account.
public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest,\n AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public void putChannel(NotificationsChannel notiChannel) throws Exception;", "Response createChannelWithPayload(@NonNull ChannelRegistrationPayload channelPayload) {\n String payload = channelPayload.toJsonValue().toString();\n Logger.verbose(\"ChannelApiClient - Creating channel with payload: \" + payload);\n return requestWithPayload(creationURL, \"POST\", payload);\n }", "WithCreate withDestination(EventChannelDestination destination);", "protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Channel1\";\n String description = \"Channel discription\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(channelId, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Channel 1\";\n String description = \"For testing\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel(){\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n Log.v(\"notification_channel \", \"true\");\n CharSequence name = \"channel_name2\";\n String description = \"channel_description2\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"channel_id2\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n mNotificationManager = getSystemService(NotificationManager.class);\n mNotificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n// CharSequence name = getString(R.string.channel_name);\n// String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"myChannelId\", \"channelName\", importance);\n channel.setDescription(\"this is channel myChannelId\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getActivity().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n Log.d(TAG, \"createNotificationChannel: \" + Build.VERSION.SDK_INT);\n // Importance applicable to all the notifications in this Channel\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel notificationChannel =\n new NotificationChannel(NOTIFICATION_CHANNEL_ID, CHANNEL_NAME, importance);\n\n String channelDescription = \"This is channel description\";\n notificationChannel.setDescription(channelDescription);\n notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n\n //finally create notification channel\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = \"\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel1\";\n String description = \"First Notification Channel\";\n NotificationChannel channel = new NotificationChannel( \"ch1\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "@RequiresApi(Build.VERSION_CODES.O)\n private void createChannel() {\n NotificationManager\n mNotificationManager =\n (NotificationManager) this\n .getSystemService(NOTIFICATION_SERVICE);\n // The id of the channel.\n String id = CHANNEL_ID;\n // The user-visible name of the channel.\n CharSequence name = \"Media playback\";\n // The user-visible description of the channel.\n String description = \"Media playback controls\";\n int importance = NotificationManager.IMPORTANCE_LOW;\n NotificationChannel mChannel = new NotificationChannel(id, name, importance);\n // Configure the notification channel.\n mChannel.setDescription(description);\n mChannel.setShowBadge(false);\n mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n mNotificationManager.createNotificationChannel(mChannel);\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"hello\";\n String description = \"getString(R.string.channel_description)\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"push\";//getString(R.string.channel_name);\n String description = \"pushnotif\";//getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel_name\";\n String description =\"channel_description\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n String name = NOTIFICATION_CHANNEL_NAME;\n String descriptionText = NOTIFICATION_CHANNEL_DESCRIPTION;\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(descriptionText);\n\n // Register the channel with the system\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "Delivery createDelivery();", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = MyShardPrefernces.myNotificationChannelName;\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(MyShardPrefernces.myNoficataionChannelID, name, importance);\n channel.setDescription(\"Notifications for alert Messenging\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createNotificationChannel()\n {\n //Instantiate the NotificationManager\n mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n //Notification Channel constructed\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, \"Simple Notification\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Simple Notification\");\n\n //Create the channel with the NotificationManager\n mNotifyManager.createNotificationChannel(notificationChannel);\n }", "static public void createNotificationChannel(Context ctx) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = ctx.getString(R.string.channel_name);\n String description = ctx.getString(R.string.channel_description);\n String CHANNEL_ID = ctx.getString(R.string.channel_id);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = ctx.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Inwentaryzacja\";\n String description = \"Powiadomienia\";\n int importance = NotificationManager.IMPORTANCE_LOW; // low importance - no sound\n NotificationChannel channel = new NotificationChannel(C.CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = context.getString(R.string.channel_name);\n String description = context.getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createChannels() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID,\n CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);\n\n getManager().createNotificationChannel(channel);\n }\n\n }", "public void CrearNotificacionChannel(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"Notificacion name\";\n NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, name, NotificationManager.IMPORTANCE_DEFAULT);\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"31\", \"test\", importance);\n channel.setDescription(\"hihi\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"ReminderChannel\";\n String description = \"Hello channel\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"notifyAnkit\", name, importance);\n channel.setDescription(description);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private static void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = context.getString(R.string.channel_name);\n String description = context.getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"NOTIFICATION\";\n String description = \"NOTIFICATION\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager)getSystemService(NotificationManager.class);\n\n notificationManager.createNotificationChannel(channel);\n }\n }", "public Channel() {\n this(DSL.name(\"channel\"), null);\n }", "public void createNotificationChannel() {\n mNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Stand up notification\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Notifies every 15 minutes to \" +\n \"stand up and walk\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n // crate a channel with high priority\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID_1, name, importance);\n\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n\n// // Create an Intent for the activity you want to start\n// Intent resultIntent = new Intent(this, MainActivity.class);\n// // Create the TaskStackBuilder and add the intent, which inflates the back stack\n// TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n// stackBuilder.addNextIntentWithParentStack(resultIntent);\n// // Get the PendingIntent containing the entire back stack\n// PendingIntent resultPendingIntent =\n// stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n\n }", "public Channel(String topic) {\n super(topic);\n this.topic = topic;\n this.messages = new HashSet<>();\n }", "public void createChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"Stopwatch\", \"StopWatch\", NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(\"Stopwatch Notifications\");\n Objects.requireNonNull(this.getSystemService(NotificationManager.class)).createNotificationChannel(channel);\n }\n }", "@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}", "public void createNotificationChannel(Activity activity) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n CharSequence name = \"notifier\";\n String description = \"notifies the firebaseUser about app activities\";\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = activity.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\r\n CharSequence name = \"Picture upload\";\r\n String description =\"PRIKACENA SLIKA\";\r\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\r\n NotificationChannel channel = new NotificationChannel(\"slika1\", name, importance);\r\n channel.setDescription(description);\r\n // Register the channel with the system; you can't change the importance\r\n // or other notification behaviors after this\r\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\r\n notificationManager.createNotificationChannel(channel);\r\n }\r\n }", "private void createNotificationChannel(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"DailyReminderChannel\";\n String desc = \"Channel for daily reminders\";\n NotificationChannel channel = new NotificationChannel(\"dailyReminders\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(desc);\n\n NotificationManager manager = getActivity().getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n }", "public void setTopic(String channel, String topic);", "public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Tracker\";\n String description = getString(R.string.app_name);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "Update withDestination(EventChannelDestination destination);", "public void setChannel(Channel channel)\n {\n this.channel = channel;\n }", "@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.notification);\n String description =getString(R.string.notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"lemubitA\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Test\";\n String description = \"Test noti\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(\"Vuongpro1\", name, importance);\n channel.setVibrationPattern(new long[]{300, 300, 300});\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public interface ChannelBuilder {\n\n /**\n * Configure this class with the given key-value pairs\n */\n void configure(Map<String, ?> configs) throws KafkaException;\n\n\n /**\n * returns a Channel with TransportLayer and Authenticator configured.\n * @param id channel id\n * @param key SelectionKey\n */\n KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException;\n\n\n /**\n * Closes ChannelBuilder\n */\n void close();\n\n}", "public void createNotificationChannels(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel notificationChannel = new NotificationChannel(\n CHANNEL_1_ID, \"Channel 1\", NotificationManager.IMPORTANCE_HIGH\n );\n notificationChannel.enableLights(true);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Alarm Message\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(notificationChannel);\n }\n\n }", "KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException;", "public void createNotificationChannel() {\n weatherNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Weather change.\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription\n (\"Conditions have are below threshold\");\n weatherNotificationManager.createNotificationChannel(notificationChannel);\n\n }\n }", "@TargetApi(Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n CharSequence name = getString(R.string.appName);\n String description = getString(R.string.appName);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(name.toString(), name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }", "public PayWithAmazonEvent withSalesChannel(String salesChannel) {\r\n this.salesChannel = salesChannel;\r\n return this;\r\n }", "public void SetChannel(int channel);", "public BroadcastChannel(String channelName)\n {\n mChannelName = channelName;\n }", "static private void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"lw_notification_channel\";\n String description = \"lw_notification_channel_desc\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(Constants.WEATHER_NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n\n // Register Notification channel\n NotificationManager notificationManager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n }", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "public void setUpNotificationChannel() {\n Log.d(TAG, \"Build.version.SDK_INT: \" + Build.VERSION.SDK_INT);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n if (notificationManager == null) {\n\n // get access to Notification Service through a Notification Manager object\n notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n NotificationChannel notificationChannel =\n new NotificationChannel(channelId, channelName, importance);\n\n notificationManager.createNotificationChannel(notificationChannel);\n }\n\n }\n }", "public Channel(String alias) {\n this(DSL.name(alias), CHANNEL);\n }", "private void sendDeliveryRequest(Product product) {\n ACLMessage cfp = new ACLMessage(ACLMessage.CFP);\n try {\n cfp.setContentObject(product);\n } catch (IOException e) {\n System.err.println(\"[STORE] Couldn't set content Object in CFP message with product: \" + product.toString());\n return;\n }\n\n graphicsDisplay.setGreen(\"Product\" + product.getId());\n addBehaviour(new FIPAContractNetInit(this, cfp, couriers));\n }", "private void createNotificationChannel() {\n mNotificationManager =\r\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n\r\n // Notification channels are only available in OREO and higher.\r\n // So, add a check on SDK version.\r\n if (android.os.Build.VERSION.SDK_INT >=\r\n android.os.Build.VERSION_CODES.O) {\r\n\r\n // Create the NotificationChannel with all the parameters.\r\n NotificationChannel notificationChannel = new NotificationChannel\r\n (PRIMARY_CHANNEL_ID,\r\n \"Stand up notification\",\r\n NotificationManager.IMPORTANCE_HIGH);\r\n\r\n notificationChannel.enableLights(true);\r\n notificationChannel.setLightColor(Color.RED);\r\n notificationChannel.enableVibration(true);\r\n notificationChannel.setDescription(\"Daje znać użytkownikowi \" +\r\n \"by wprowadził swoje wydatki\");\r\n mNotificationManager.createNotificationChannel(notificationChannel);\r\n }\r\n }", "public AcknowledgableDelivery(Delivery delivery, Channel channel, BiConsumer<Receiver.AcknowledgmentContext, Exception> exceptionHandler) {\n super(delivery.getEnvelope(), delivery.getProperties(), delivery.getBody());\n this.channel = channel;\n this.exceptionHandler = exceptionHandler;\n }", "public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channel_ = value;\n onChanged();\n return this;\n }", "@Test\n public void testNewChannelAppears() {\n TestUpdateSettings settings = new TestUpdateSettings(ChannelStatus.RELEASE);\n UpdateStrategyCustomization customization = new UpdateStrategyCustomization();\n UpdateStrategy strategy = new UpdateStrategy(9, BuildNumber.fromString(\"IU-95.627\"), InfoReader.read(\"idea-newChannel-release.xml\"), settings, customization);\n\n CheckForUpdateResult result = strategy.checkForUpdates();\n assertEquals(UpdateStrategy.State.LOADED, result.getState());\n BuildInfo update = result.getNewBuildInSelectedChannel();\n assertNull(update);\n\n UpdateChannel newChannel = result.getChannelToPropose();\n assertNotNull(newChannel);\n assertEquals(\"IDEA10EAP\", newChannel.getId());\n assertEquals(\"IntelliJ IDEA X EAP\", newChannel.getName());\n }", "public native boolean createChannel(String appId, String channelKey, String name, int uid, RecordingConfig config);", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if(status.connection_status == enums.connection_status.connected)\n {\n CharSequence name = \"Sample VPN\";\n String description = \"VPN notification\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = home_model.getInstance().getHomeInstance().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }\n }", "interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }", "public Channel createChannel(String channelEndpointName) {\n if (StringUtils.isEmpty(channelEndpointName)) {\n throw new IllegalArgumentException(\"Null channelEndpointName specified\");\n }\n String sourceName = String.format(\"%s.%s\", endpointId, channelEndpointName);\n CAMQPSourceInterface source = CAMQPEndpointManager.createSource(session, sourceName, channelEndpointName, new CAMQPEndpointPolicy());\n return new Channel(sourceName, source);\n }", "public Channel(Name alias) {\n this(alias, CHANNEL);\n }", "boolean deliver(String busType, String topic, Object event);", "public void createNotificationChannel() {\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID,\"Log the game!\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Reminder to log your game on Friday's at 3:05 pm\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "public void setChannel(String channel) {\n\t\tthis.channel = channel;\n\t}", "public void setSalesChannel(String salesChannel) {\r\n this.salesChannel = salesChannel;\r\n }", "EventChannel create();", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public Connection(Channel channel) {\r\n this.channel = channel;\r\n }", "Response updateChannelWithPayload(@NonNull URL channelLocation, @NonNull ChannelRegistrationPayload channelPayload) {\n String payload = channelPayload.toJsonValue().toString();\n Logger.verbose(\"ChannelApiClient - Updating channel with payload: \" + payload);\n return requestWithPayload(channelLocation, \"PUT\", payload);\n }", "EventChannel create(Context context);", "public interface EventChannel {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: The system metadata relating to Event Channel resource.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the source property: Source of the event channel. This represents a unique resource in the partner's\n * resource model.\n *\n * @return the source value.\n */\n EventChannelSource source();\n\n /**\n * Gets the destination property: Represents the destination of an event channel.\n *\n * @return the destination value.\n */\n EventChannelDestination destination();\n\n /**\n * Gets the provisioningState property: Provisioning state of the event channel.\n *\n * @return the provisioningState value.\n */\n EventChannelProvisioningState provisioningState();\n\n /**\n * Gets the partnerTopicReadinessState property: The readiness state of the corresponding partner topic.\n *\n * @return the partnerTopicReadinessState value.\n */\n PartnerTopicReadinessState partnerTopicReadinessState();\n\n /**\n * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this timer expires\n * while the corresponding partner topic is never activated, the event channel and corresponding partner topic are\n * deleted.\n *\n * @return the expirationTimeIfNotActivatedUtc value.\n */\n OffsetDateTime expirationTimeIfNotActivatedUtc();\n\n /**\n * Gets the filter property: Information about the filter for the event channel.\n *\n * @return the filter value.\n */\n EventChannelFilter filter();\n\n /**\n * Gets the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any\n * ambiguity of the origin of creation of the partner topic for the customer.\n *\n * @return the partnerTopicFriendlyDescription value.\n */\n String partnerTopicFriendlyDescription();\n\n /**\n * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.EventChannelInner object.\n *\n * @return the inner object.\n */\n EventChannelInner innerModel();\n\n /** The entirety of the EventChannel definition. */\n interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }\n /** The EventChannel definition stages. */\n interface DefinitionStages {\n /** The first stage of the EventChannel definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the EventChannel definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, partnerNamespaceName.\n *\n * @param resourceGroupName The name of the resource group within the user's subscription.\n * @param partnerNamespaceName Name of the partner namespace.\n * @return the next definition stage.\n */\n WithCreate withExistingPartnerNamespace(String resourceGroupName, String partnerNamespaceName);\n }\n /**\n * The stage of the EventChannel definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }\n /** The stage of the EventChannel definition allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel definition allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel definition allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel definition allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel definition allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n WithCreate withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Begins update for the EventChannel resource.\n *\n * @return the stage of resource update.\n */\n EventChannel.Update update();\n\n /** The template for EventChannel update. */\n interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }\n /** The EventChannel update stages. */\n interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n EventChannel refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n EventChannel refresh(Context context);\n}", "boolean deliver(CommInfrastructure busType, String topic, Object event);", "public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000200;\n channel_ = value;\n onChanged();\n return this;\n }", "EventChannelDestination destination();", "private static DeliveryWrapper createDeliveryWrapper(SupportOrder supportOrder){\r\n\t\tDeliveryWrapper deliveryWrapper = new DeliveryWrapper();\r\n\t\t\r\n\t\tDelivery delivery = new Delivery();\r\n\t\tCustomer customer = new Customer();\r\n\t\tcustomer.setRegistry(supportOrder.getTarget().getRegistry());\r\n\t\tdelivery.setCustomer(customer);\r\n\t\tdelivery.setIssueTime(supportOrder.getStartDate());\r\n\t\tdelivery.setSeries(null);\r\n\t\tdelivery.setNumber(0);\r\n\t\tdelivery.setSecurityLevel(SecurityLevel.OFFICIAL);\r\n\t\tdelivery.setStatus(DeliveryStatus.PENDING);\r\n\t\t\r\n\t\tdeliveryWrapper.setDelivery(delivery);\r\n\t\t\r\n\t\treturn deliveryWrapper;\r\n\t}", "boolean deliver(CommInfrastructure busType, String topic, String event);", "public Builder setChannel(\n int index, io.grpc.channelz.v1.Channel value) {\n if (channelBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureChannelIsMutable();\n channel_.set(index, value);\n onChanged();\n } else {\n channelBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void setChannelName(String channel)\n {\n mChannelName = channel;\n }", "public void setChannel(String channel) {\r\n this.channel = channel == null ? null : channel.trim();\r\n }", "interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }", "private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}", "private void createNotificationChannels() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel1 = new NotificationChannel(CHANNEL_REMINDER_ID, \"Reminder Channel\",NotificationManager.IMPORTANCE_HIGH);\n channel1.setDescription(\"Reminder to drink water\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel1);\n\n\n }\n }", "public void addChannel(String groupName, D3Channel channel);", "public Delivery(Signer from, Signer to, ItemComponent[] payload) {\n\t\tsuper(from, to, payload);\n\t}", "public abstract AbstractDataChannel createDataChannel(int channelId);", "void setChannel(EzyChannel channel);" ]
[ "0.58991146", "0.5700648", "0.5608332", "0.5534192", "0.53952533", "0.53762627", "0.53323007", "0.53094566", "0.5299928", "0.5299928", "0.52881587", "0.52881587", "0.52854127", "0.52839357", "0.52809316", "0.52637386", "0.5250126", "0.5238516", "0.52355784", "0.5228405", "0.51947635", "0.5179625", "0.51754737", "0.51642203", "0.51338595", "0.5122097", "0.5085378", "0.506699", "0.50660914", "0.5060668", "0.50500673", "0.5028637", "0.5028526", "0.5023332", "0.50180686", "0.49728346", "0.49563068", "0.49406362", "0.4936964", "0.49336314", "0.4925215", "0.49236524", "0.4895049", "0.48909795", "0.48732907", "0.48729035", "0.48572326", "0.48389226", "0.48383138", "0.4833893", "0.48164922", "0.4809925", "0.47966152", "0.47825035", "0.47813278", "0.47528666", "0.47279233", "0.47075245", "0.4701842", "0.46974632", "0.46841013", "0.46789494", "0.4677414", "0.46759716", "0.46682736", "0.46668258", "0.46655577", "0.465092", "0.46449426", "0.46427554", "0.462529", "0.46123528", "0.4609262", "0.4608086", "0.45934525", "0.4573614", "0.45728195", "0.456433", "0.4553362", "0.45524085", "0.45442507", "0.45379236", "0.45019394", "0.45000613", "0.44878033", "0.44863832", "0.44828618", "0.44809526", "0.44730076", "0.4468516", "0.44680974", "0.44680858", "0.4454691", "0.44364002", "0.44352487", "0.4417783", "0.4406903", "0.44035006", "0.4402427", "0.4399263" ]
0.6394344
0
Creates a new delivery channel object to deliver the configuration information to an Amazon S3 bucket, and to an Amazon SNS topic. You can use this action to change the Amazon S3 bucket or an Amazon SNS topic of the existing delivery channel. To change the Amazon S3 bucket or an Amazon SNS topic, call this action and specify the changed values for the S3 bucket and the SNS topic. If you specify a different value for either the S3 bucket or the SNS topic, this action will keep the existing value for the parameter that is not changed. NOTE: Currently, you can specify only one delivery channel per account.
public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest, AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public void putChannel(NotificationsChannel notiChannel) throws Exception;", "Response createChannelWithPayload(@NonNull ChannelRegistrationPayload channelPayload) {\n String payload = channelPayload.toJsonValue().toString();\n Logger.verbose(\"ChannelApiClient - Creating channel with payload: \" + payload);\n return requestWithPayload(creationURL, \"POST\", payload);\n }", "WithCreate withDestination(EventChannelDestination destination);", "protected Channel createChannel() throws IOException, TimeoutException, NoSuchAlgorithmException {\n LOGGER.debug(\"Creating channel\");\n Channel channel = connectionProducer.getConnection(config).createChannel();\n LOGGER.debug(\"Created channel\");\n return channel;\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Channel1\";\n String description = \"Channel discription\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(channelId, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Channel 1\";\n String description = \"For testing\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel(){\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n Log.v(\"notification_channel \", \"true\");\n CharSequence name = \"channel_name2\";\n String description = \"channel_description2\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"channel_id2\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n mNotificationManager = getSystemService(NotificationManager.class);\n mNotificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n// CharSequence name = getString(R.string.channel_name);\n// String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"myChannelId\", \"channelName\", importance);\n channel.setDescription(\"this is channel myChannelId\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getActivity().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n Log.d(TAG, \"createNotificationChannel: \" + Build.VERSION.SDK_INT);\n // Importance applicable to all the notifications in this Channel\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel notificationChannel =\n new NotificationChannel(NOTIFICATION_CHANNEL_ID, CHANNEL_NAME, importance);\n\n String channelDescription = \"This is channel description\";\n notificationChannel.setDescription(channelDescription);\n notificationChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n\n //finally create notification channel\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = \"\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel1\";\n String description = \"First Notification Channel\";\n NotificationChannel channel = new NotificationChannel( \"ch1\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "@RequiresApi(Build.VERSION_CODES.O)\n private void createChannel() {\n NotificationManager\n mNotificationManager =\n (NotificationManager) this\n .getSystemService(NOTIFICATION_SERVICE);\n // The id of the channel.\n String id = CHANNEL_ID;\n // The user-visible name of the channel.\n CharSequence name = \"Media playback\";\n // The user-visible description of the channel.\n String description = \"Media playback controls\";\n int importance = NotificationManager.IMPORTANCE_LOW;\n NotificationChannel mChannel = new NotificationChannel(id, name, importance);\n // Configure the notification channel.\n mChannel.setDescription(description);\n mChannel.setShowBadge(false);\n mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);\n mNotificationManager.createNotificationChannel(mChannel);\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"hello\";\n String description = \"getString(R.string.channel_description)\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"push\";//getString(R.string.channel_name);\n String description = \"pushnotif\";//getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"CHANNEL_ID\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"channel_name\";\n String description =\"channel_description\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"1\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n String name = NOTIFICATION_CHANNEL_NAME;\n String descriptionText = NOTIFICATION_CHANNEL_DESCRIPTION;\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(descriptionText);\n\n // Register the channel with the system\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "Delivery createDelivery();", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = MyShardPrefernces.myNotificationChannelName;\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(MyShardPrefernces.myNoficataionChannelID, name, importance);\n channel.setDescription(\"Notifications for alert Messenging\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createNotificationChannel()\n {\n //Instantiate the NotificationManager\n mNotifyManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n //Notification Channel constructed\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID, \"Simple Notification\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Simple Notification\");\n\n //Create the channel with the NotificationManager\n mNotifyManager.createNotificationChannel(notificationChannel);\n }", "static public void createNotificationChannel(Context ctx) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = ctx.getString(R.string.channel_name);\n String description = ctx.getString(R.string.channel_description);\n String CHANNEL_ID = ctx.getString(R.string.channel_id);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = ctx.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n // Create the NotificationChannel, but only on API 26+ because\n // the NotificationChannel class is new and not in the support library\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Inwentaryzacja\";\n String description = \"Powiadomienia\";\n int importance = NotificationManager.IMPORTANCE_LOW; // low importance - no sound\n NotificationChannel channel = new NotificationChannel(C.CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = context.getString(R.string.channel_name);\n String description = context.getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public void createChannels() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID,\n CHANNEL_NAME, NotificationManager.IMPORTANCE_DEFAULT);\n\n getManager().createNotificationChannel(channel);\n }\n\n }", "public void CrearNotificacionChannel(){\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"Notificacion name\";\n NotificationChannel notificationChannel = new NotificationChannel(CHANNEL_ID, name, NotificationManager.IMPORTANCE_DEFAULT);\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"31\", \"test\", importance);\n channel.setDescription(\"hihi\");\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"ReminderChannel\";\n String description = \"Hello channel\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"notifyAnkit\", name, importance);\n channel.setDescription(description);\n\n NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private static void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = context.getString(R.string.channel_name);\n String description = context.getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = context.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"NOTIFICATION\";\n String description = \"NOTIFICATION\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager)getSystemService(NotificationManager.class);\n\n notificationManager.createNotificationChannel(channel);\n }\n }", "public Channel() {\n this(DSL.name(\"channel\"), null);\n }", "public void createNotificationChannel() {\n mNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Stand up notification\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Notifies every 15 minutes to \" +\n \"stand up and walk\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.channel_name);\n String description = getString(R.string.channel_description);\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n // crate a channel with high priority\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID_1, name, importance);\n\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n\n// // Create an Intent for the activity you want to start\n// Intent resultIntent = new Intent(this, MainActivity.class);\n// // Create the TaskStackBuilder and add the intent, which inflates the back stack\n// TaskStackBuilder stackBuilder = TaskStackBuilder.create(this);\n// stackBuilder.addNextIntentWithParentStack(resultIntent);\n// // Get the PendingIntent containing the entire back stack\n// PendingIntent resultPendingIntent =\n// stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n\n }", "public Channel(String topic) {\n super(topic);\n this.topic = topic;\n this.messages = new HashSet<>();\n }", "public void createChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel = new NotificationChannel(\"Stopwatch\", \"StopWatch\", NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(\"Stopwatch Notifications\");\n Objects.requireNonNull(this.getSystemService(NotificationManager.class)).createNotificationChannel(channel);\n }\n }", "@Test\n\tpublic void testChannel() {\n\t\tString requestXml =\n\t\t\t\t\"<FahrenheitToCelsius xmlns=\\\"http://www.w3schools.com/webservices/\\\">\" +\n\t\t\t\t\" <Fahrenheit>55</Fahrenheit>\" +\n\t\t\t\t\"</FahrenheitToCelsius>\";\n\n\t\t// Create the Message object\n\t\tMessage<String> message = MessageBuilder.withPayload(requestXml).build();\n\n\t\t// Send the Message to the handler's input channel\n\t\t//MessageChannel channel = channelResolver.resolveChannelName(\"fahrenheitChannel\");\n\t\tchannel.send(message);\n\t}", "public void createNotificationChannel(Activity activity) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n CharSequence name = \"notifier\";\n String description = \"notifies the firebaseUser about app activities\";\n\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = activity.getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\r\n CharSequence name = \"Picture upload\";\r\n String description =\"PRIKACENA SLIKA\";\r\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\r\n NotificationChannel channel = new NotificationChannel(\"slika1\", name, importance);\r\n channel.setDescription(description);\r\n // Register the channel with the system; you can't change the importance\r\n // or other notification behaviors after this\r\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\r\n notificationManager.createNotificationChannel(channel);\r\n }\r\n }", "private void createNotificationChannel(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n CharSequence name = \"DailyReminderChannel\";\n String desc = \"Channel for daily reminders\";\n NotificationChannel channel = new NotificationChannel(\"dailyReminders\", name, NotificationManager.IMPORTANCE_DEFAULT);\n channel.setDescription(desc);\n\n NotificationManager manager = getActivity().getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel);\n }\n }", "public void setTopic(String channel, String topic);", "public interface ChannelManager {\n int createChannel(String channel, long ttlInSeconds);\n int publishToChannel(String channel, String msg);\n}", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Tracker\";\n String description = getString(R.string.app_name);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "Update withDestination(EventChannelDestination destination);", "public void setChannel(Channel channel)\n {\n this.channel = channel;\n }", "@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }", "@RequiresApi(api = Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = getString(R.string.notification);\n String description =getString(R.string.notification);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(\"lemubitA\", name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"Test\";\n String description = \"Test noti\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(\"Vuongpro1\", name, importance);\n channel.setVibrationPattern(new long[]{300, 300, 300});\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.createNotificationChannel(channel);\n }\n }", "public interface ChannelBuilder {\n\n /**\n * Configure this class with the given key-value pairs\n */\n void configure(Map<String, ?> configs) throws KafkaException;\n\n\n /**\n * returns a Channel with TransportLayer and Authenticator configured.\n * @param id channel id\n * @param key SelectionKey\n */\n KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException;\n\n\n /**\n * Closes ChannelBuilder\n */\n void close();\n\n}", "public void createNotificationChannels(){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){\n NotificationChannel notificationChannel = new NotificationChannel(\n CHANNEL_1_ID, \"Channel 1\", NotificationManager.IMPORTANCE_HIGH\n );\n notificationChannel.enableLights(true);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Alarm Message\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(notificationChannel);\n }\n\n }", "KafkaChannel buildChannel(String id, SelectionKey key, int maxReceiveSize) throws KafkaException;", "public void createNotificationChannel() {\n weatherNotificationManager =\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >=\n android.os.Build.VERSION_CODES.O) {\n\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel\n (PRIMARY_CHANNEL_ID,\n \"Weather change.\",\n NotificationManager.IMPORTANCE_HIGH);\n\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription\n (\"Conditions have are below threshold\");\n weatherNotificationManager.createNotificationChannel(notificationChannel);\n\n }\n }", "@TargetApi(Build.VERSION_CODES.O)\n private void createNotificationChannel() {\n CharSequence name = getString(R.string.appName);\n String description = getString(R.string.appName);\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(name.toString(), name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n notificationManager = getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }", "public PayWithAmazonEvent withSalesChannel(String salesChannel) {\r\n this.salesChannel = salesChannel;\r\n return this;\r\n }", "public void SetChannel(int channel);", "public BroadcastChannel(String channelName)\n {\n mChannelName = channelName;\n }", "static private void createNotificationChannel(Context context) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n CharSequence name = \"lw_notification_channel\";\n String description = \"lw_notification_channel_desc\";\n int importance = NotificationManager.IMPORTANCE_HIGH;\n NotificationChannel channel = new NotificationChannel(Constants.WEATHER_NOTIFICATION_CHANNEL, name, importance);\n channel.setDescription(description);\n\n // Register Notification channel\n NotificationManager notificationManager = (NotificationManager)\n context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (notificationManager != null) {\n notificationManager.createNotificationChannel(channel);\n }\n }\n }", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "public void setUpNotificationChannel() {\n Log.d(TAG, \"Build.version.SDK_INT: \" + Build.VERSION.SDK_INT);\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n\n if (notificationManager == null) {\n\n // get access to Notification Service through a Notification Manager object\n notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n int importance = NotificationManager.IMPORTANCE_HIGH;\n\n NotificationChannel notificationChannel =\n new NotificationChannel(channelId, channelName, importance);\n\n notificationManager.createNotificationChannel(notificationChannel);\n }\n\n }\n }", "public Channel(String alias) {\n this(DSL.name(alias), CHANNEL);\n }", "private void createNotificationChannel() {\n mNotificationManager =\r\n (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\r\n\r\n // Notification channels are only available in OREO and higher.\r\n // So, add a check on SDK version.\r\n if (android.os.Build.VERSION.SDK_INT >=\r\n android.os.Build.VERSION_CODES.O) {\r\n\r\n // Create the NotificationChannel with all the parameters.\r\n NotificationChannel notificationChannel = new NotificationChannel\r\n (PRIMARY_CHANNEL_ID,\r\n \"Stand up notification\",\r\n NotificationManager.IMPORTANCE_HIGH);\r\n\r\n notificationChannel.enableLights(true);\r\n notificationChannel.setLightColor(Color.RED);\r\n notificationChannel.enableVibration(true);\r\n notificationChannel.setDescription(\"Daje znać użytkownikowi \" +\r\n \"by wprowadził swoje wydatki\");\r\n mNotificationManager.createNotificationChannel(notificationChannel);\r\n }\r\n }", "private void sendDeliveryRequest(Product product) {\n ACLMessage cfp = new ACLMessage(ACLMessage.CFP);\n try {\n cfp.setContentObject(product);\n } catch (IOException e) {\n System.err.println(\"[STORE] Couldn't set content Object in CFP message with product: \" + product.toString());\n return;\n }\n\n graphicsDisplay.setGreen(\"Product\" + product.getId());\n addBehaviour(new FIPAContractNetInit(this, cfp, couriers));\n }", "public AcknowledgableDelivery(Delivery delivery, Channel channel, BiConsumer<Receiver.AcknowledgmentContext, Exception> exceptionHandler) {\n super(delivery.getEnvelope(), delivery.getProperties(), delivery.getBody());\n this.channel = channel;\n this.exceptionHandler = exceptionHandler;\n }", "public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n channel_ = value;\n onChanged();\n return this;\n }", "@Test\n public void testNewChannelAppears() {\n TestUpdateSettings settings = new TestUpdateSettings(ChannelStatus.RELEASE);\n UpdateStrategyCustomization customization = new UpdateStrategyCustomization();\n UpdateStrategy strategy = new UpdateStrategy(9, BuildNumber.fromString(\"IU-95.627\"), InfoReader.read(\"idea-newChannel-release.xml\"), settings, customization);\n\n CheckForUpdateResult result = strategy.checkForUpdates();\n assertEquals(UpdateStrategy.State.LOADED, result.getState());\n BuildInfo update = result.getNewBuildInSelectedChannel();\n assertNull(update);\n\n UpdateChannel newChannel = result.getChannelToPropose();\n assertNotNull(newChannel);\n assertEquals(\"IDEA10EAP\", newChannel.getId());\n assertEquals(\"IntelliJ IDEA X EAP\", newChannel.getName());\n }", "public native boolean createChannel(String appId, String channelKey, String name, int uid, RecordingConfig config);", "private void createNotificationChannel() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if(status.connection_status == enums.connection_status.connected)\n {\n CharSequence name = \"Sample VPN\";\n String description = \"VPN notification\";\n int importance = NotificationManager.IMPORTANCE_DEFAULT;\n NotificationChannel channel = new NotificationChannel(CHANNEL_ID, name, importance);\n channel.setDescription(description);\n // Register the channel with the system; you can't change the importance\n // or other notification behaviors after this\n NotificationManager notificationManager = home_model.getInstance().getHomeInstance().getSystemService(NotificationManager.class);\n notificationManager.createNotificationChannel(channel);\n }\n }\n }", "interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }", "public Channel createChannel(String channelEndpointName) {\n if (StringUtils.isEmpty(channelEndpointName)) {\n throw new IllegalArgumentException(\"Null channelEndpointName specified\");\n }\n String sourceName = String.format(\"%s.%s\", endpointId, channelEndpointName);\n CAMQPSourceInterface source = CAMQPEndpointManager.createSource(session, sourceName, channelEndpointName, new CAMQPEndpointPolicy());\n return new Channel(sourceName, source);\n }", "public Channel(Name alias) {\n this(alias, CHANNEL);\n }", "public void createNotificationChannel() {\n mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n\n // Notification channels are only available in OREO and higher.\n // So, add a check on SDK version.\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {\n // Create the NotificationChannel with all the parameters.\n NotificationChannel notificationChannel = new NotificationChannel(PRIMARY_CHANNEL_ID,\"Log the game!\", NotificationManager.IMPORTANCE_HIGH);\n notificationChannel.enableLights(true);\n notificationChannel.setLightColor(Color.RED);\n notificationChannel.enableVibration(true);\n notificationChannel.setDescription(\"Reminder to log your game on Friday's at 3:05 pm\");\n mNotificationManager.createNotificationChannel(notificationChannel);\n }\n }", "boolean deliver(String busType, String topic, Object event);", "public void setChannel(String channel) {\n\t\tthis.channel = channel;\n\t}", "EventChannel create();", "public void setSalesChannel(String salesChannel) {\r\n this.salesChannel = salesChannel;\r\n }", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public Connection(Channel channel) {\r\n this.channel = channel;\r\n }", "Response updateChannelWithPayload(@NonNull URL channelLocation, @NonNull ChannelRegistrationPayload channelPayload) {\n String payload = channelPayload.toJsonValue().toString();\n Logger.verbose(\"ChannelApiClient - Updating channel with payload: \" + payload);\n return requestWithPayload(channelLocation, \"PUT\", payload);\n }", "EventChannel create(Context context);", "public interface EventChannel {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the systemData property: The system metadata relating to Event Channel resource.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the source property: Source of the event channel. This represents a unique resource in the partner's\n * resource model.\n *\n * @return the source value.\n */\n EventChannelSource source();\n\n /**\n * Gets the destination property: Represents the destination of an event channel.\n *\n * @return the destination value.\n */\n EventChannelDestination destination();\n\n /**\n * Gets the provisioningState property: Provisioning state of the event channel.\n *\n * @return the provisioningState value.\n */\n EventChannelProvisioningState provisioningState();\n\n /**\n * Gets the partnerTopicReadinessState property: The readiness state of the corresponding partner topic.\n *\n * @return the partnerTopicReadinessState value.\n */\n PartnerTopicReadinessState partnerTopicReadinessState();\n\n /**\n * Gets the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this timer expires\n * while the corresponding partner topic is never activated, the event channel and corresponding partner topic are\n * deleted.\n *\n * @return the expirationTimeIfNotActivatedUtc value.\n */\n OffsetDateTime expirationTimeIfNotActivatedUtc();\n\n /**\n * Gets the filter property: Information about the filter for the event channel.\n *\n * @return the filter value.\n */\n EventChannelFilter filter();\n\n /**\n * Gets the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to remove any\n * ambiguity of the origin of creation of the partner topic for the customer.\n *\n * @return the partnerTopicFriendlyDescription value.\n */\n String partnerTopicFriendlyDescription();\n\n /**\n * Gets the inner com.azure.resourcemanager.eventgrid.fluent.models.EventChannelInner object.\n *\n * @return the inner object.\n */\n EventChannelInner innerModel();\n\n /** The entirety of the EventChannel definition. */\n interface Definition\n extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate {\n }\n /** The EventChannel definition stages. */\n interface DefinitionStages {\n /** The first stage of the EventChannel definition. */\n interface Blank extends WithParentResource {\n }\n /** The stage of the EventChannel definition allowing to specify parent resource. */\n interface WithParentResource {\n /**\n * Specifies resourceGroupName, partnerNamespaceName.\n *\n * @param resourceGroupName The name of the resource group within the user's subscription.\n * @param partnerNamespaceName Name of the partner namespace.\n * @return the next definition stage.\n */\n WithCreate withExistingPartnerNamespace(String resourceGroupName, String partnerNamespaceName);\n }\n /**\n * The stage of the EventChannel definition which contains all the minimum required properties for the resource\n * to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithSource,\n DefinitionStages.WithDestination,\n DefinitionStages.WithExpirationTimeIfNotActivatedUtc,\n DefinitionStages.WithFilter,\n DefinitionStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n EventChannel create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n EventChannel create(Context context);\n }\n /** The stage of the EventChannel definition allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel definition allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n WithCreate withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel definition allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel definition allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n WithCreate withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel definition allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n WithCreate withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Begins update for the EventChannel resource.\n *\n * @return the stage of resource update.\n */\n EventChannel.Update update();\n\n /** The template for EventChannel update. */\n interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }\n /** The EventChannel update stages. */\n interface UpdateStages {\n /** The stage of the EventChannel update allowing to specify source. */\n interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n Update withSource(EventChannelSource source);\n }\n /** The stage of the EventChannel update allowing to specify destination. */\n interface WithDestination {\n /**\n * Specifies the destination property: Represents the destination of an event channel..\n *\n * @param destination Represents the destination of an event channel.\n * @return the next definition stage.\n */\n Update withDestination(EventChannelDestination destination);\n }\n /** The stage of the EventChannel update allowing to specify expirationTimeIfNotActivatedUtc. */\n interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n Update withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }\n /** The stage of the EventChannel update allowing to specify filter. */\n interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }\n /** The stage of the EventChannel update allowing to specify partnerTopicFriendlyDescription. */\n interface WithPartnerTopicFriendlyDescription {\n /**\n * Specifies the partnerTopicFriendlyDescription property: Friendly description about the topic. This can be\n * set by the publisher/partner to show custom description for the customer partner topic. This will be\n * helpful to remove any ambiguity of the origin of creation of the partner topic for the customer..\n *\n * @param partnerTopicFriendlyDescription Friendly description about the topic. This can be set by the\n * publisher/partner to show custom description for the customer partner topic. This will be helpful to\n * remove any ambiguity of the origin of creation of the partner topic for the customer.\n * @return the next definition stage.\n */\n Update withPartnerTopicFriendlyDescription(String partnerTopicFriendlyDescription);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n EventChannel refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n EventChannel refresh(Context context);\n}", "public Builder setChannel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000200;\n channel_ = value;\n onChanged();\n return this;\n }", "boolean deliver(CommInfrastructure busType, String topic, Object event);", "EventChannelDestination destination();", "private static DeliveryWrapper createDeliveryWrapper(SupportOrder supportOrder){\r\n\t\tDeliveryWrapper deliveryWrapper = new DeliveryWrapper();\r\n\t\t\r\n\t\tDelivery delivery = new Delivery();\r\n\t\tCustomer customer = new Customer();\r\n\t\tcustomer.setRegistry(supportOrder.getTarget().getRegistry());\r\n\t\tdelivery.setCustomer(customer);\r\n\t\tdelivery.setIssueTime(supportOrder.getStartDate());\r\n\t\tdelivery.setSeries(null);\r\n\t\tdelivery.setNumber(0);\r\n\t\tdelivery.setSecurityLevel(SecurityLevel.OFFICIAL);\r\n\t\tdelivery.setStatus(DeliveryStatus.PENDING);\r\n\t\t\r\n\t\tdeliveryWrapper.setDelivery(delivery);\r\n\t\t\r\n\t\treturn deliveryWrapper;\r\n\t}", "public void setChannelName(String channel)\n {\n mChannelName = channel;\n }", "public Builder setChannel(\n int index, io.grpc.channelz.v1.Channel value) {\n if (channelBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureChannelIsMutable();\n channel_.set(index, value);\n onChanged();\n } else {\n channelBuilder_.setMessage(index, value);\n }\n return this;\n }", "boolean deliver(CommInfrastructure busType, String topic, String event);", "public void setChannel(String channel) {\r\n this.channel = channel == null ? null : channel.trim();\r\n }", "interface WithExpirationTimeIfNotActivatedUtc {\n /**\n * Specifies the expirationTimeIfNotActivatedUtc property: Expiration time of the event channel. If this\n * timer expires while the corresponding partner topic is never activated, the event channel and\n * corresponding partner topic are deleted..\n *\n * @param expirationTimeIfNotActivatedUtc Expiration time of the event channel. If this timer expires while\n * the corresponding partner topic is never activated, the event channel and corresponding partner topic\n * are deleted.\n * @return the next definition stage.\n */\n WithCreate withExpirationTimeIfNotActivatedUtc(OffsetDateTime expirationTimeIfNotActivatedUtc);\n }", "private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}", "private void createNotificationChannels() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n NotificationChannel channel1 = new NotificationChannel(CHANNEL_REMINDER_ID, \"Reminder Channel\",NotificationManager.IMPORTANCE_HIGH);\n channel1.setDescription(\"Reminder to drink water\");\n\n NotificationManager manager = getSystemService(NotificationManager.class);\n manager.createNotificationChannel(channel1);\n\n\n }\n }", "public void addChannel(String groupName, D3Channel channel);", "public abstract AbstractDataChannel createDataChannel(int channelId);", "void setChannel(EzyChannel channel);", "public Delivery(Signer from, Signer to, ItemComponent[] payload) {\n\t\tsuper(from, to, payload);\n\t}" ]
[ "0.6394426", "0.5702496", "0.5611848", "0.5536144", "0.53982276", "0.5379577", "0.5335431", "0.5312865", "0.5303212", "0.5303212", "0.5291388", "0.5291388", "0.528876", "0.52875066", "0.5284227", "0.52668446", "0.5253363", "0.52417", "0.5238791", "0.52324414", "0.5197917", "0.51828724", "0.517885", "0.51674503", "0.5134052", "0.51248163", "0.5087962", "0.5070231", "0.5069211", "0.50638956", "0.5053271", "0.5031569", "0.5031516", "0.5026069", "0.5021195", "0.4975763", "0.49597833", "0.49427676", "0.49401233", "0.49360618", "0.4928434", "0.49258694", "0.4898104", "0.4893871", "0.48762843", "0.48739246", "0.48603764", "0.48420295", "0.48395896", "0.4837995", "0.48158172", "0.4812751", "0.4799503", "0.4785477", "0.47841153", "0.4755915", "0.4730411", "0.4710052", "0.47023883", "0.47018102", "0.46872017", "0.46821073", "0.4679467", "0.4678529", "0.4671348", "0.46677983", "0.46663472", "0.46516493", "0.46481583", "0.46445662", "0.46304435", "0.4615134", "0.46118742", "0.4611805", "0.45968482", "0.45753008", "0.45717865", "0.456836", "0.4555307", "0.4554683", "0.45440558", "0.45418298", "0.45037475", "0.45031965", "0.44891623", "0.44863304", "0.44852808", "0.44825745", "0.44737643", "0.44716877", "0.44715565", "0.44674802", "0.44580108", "0.44369334", "0.4434979", "0.44202867", "0.44122213", "0.44068882", "0.44030178", "0.44023582" ]
0.58993787
1
Deletes the specified delivery channel. The delivery channel cannot be deleted if it is the only delivery channel and the configuration recorder is still running. To delete the delivery channel, stop the running configuration recorder using the StopConfigurationRecorder action.
public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest,\n AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public String deleteSub(Channel currentChannel)\n {\n return accessData.deleteSub(currentChannel);\n }", "public boolean removeContestChannel(long contestChannelId) throws ContestManagementException {\r\n return false;\r\n }", "public void clientWasRemoved(ChannelId channelId);", "@Override\n\tpublic String deleteChannelConfig(Integer id) {\n\t\treturn null;\n\t}", "public void removeChannel(int channel) {\n\t\tremoveChannel(channel, LAZY_DEFAULT);\n\t}", "int deleteByExample(CmsChannelCriteria example);", "public void removeActiveChannel(String channel)\n {\n if (activeChannels.contains(channel))\n {\n activeChannels.remove(channel);\n }\n }", "@DeleteMapping(\"/delivery-delivery-types/{id}\")\n public ResponseEntity<Void> deleteDeliveryDeliveryType(@PathVariable Long id) {\n log.debug(\"REST request to delete DeliveryDeliveryType : {}\", id);\n deliveryDeliveryTypeRepository.deleteById(id);\n deliveryDeliveryTypeSearchRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n\tpublic int boardDelete(int boardId) {\n\t\treturn dao.boardDelete(session, boardId);\n\t}", "public yandex.cloud.api.operation.OperationOuterClass.Operation delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteMethod(), getCallOptions(), request);\n }", "public Builder clearChannel() {\n bitField0_ = (bitField0_ & ~0x00000002);\n channel_ = 1;\n onChanged();\n return this;\n }", "public void removeCvchannel(Cvchannel cvchannel);", "int deleteByPrimaryKey(Integer deliveryid);", "@Override\n public DeleteComponentResult deleteComponent(DeleteComponentRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteComponent(request);\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> delete(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request);\n }", "public Builder clearChannel() {\n if (channelBuilder_ == null) {\n channel_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n channelBuilder_.clear();\n }\n return this;\n }", "public AcknowledgableDelivery(Delivery delivery, Channel channel, BiConsumer<Receiver.AcknowledgmentContext, Exception> exceptionHandler) {\n super(delivery.getEnvelope(), delivery.getProperties(), delivery.getBody());\n this.channel = channel;\n this.exceptionHandler = exceptionHandler;\n }", "public Builder clearChannel() {\n \n channel_ = getDefaultInstance().getChannel();\n onChanged();\n return this;\n }", "public void removeCvchannelPack(CvchannelPack cvchannelPack);", "private String delCom(String command, String channel) {\r\n String statement = \"DELETE FROM customCommands WHERE command='\" + command + \"' AND channel = '\"+channel+\"'; \";\r\n manager.connectToDatabase(statement);\r\n return (\"Custom command \" + command + \" was successfully removed.\");\r\n }", "public Builder removeChannel(int index) {\n if (channelBuilder_ == null) {\n ensureChannelIsMutable();\n channel_.remove(index);\n onChanged();\n } else {\n channelBuilder_.remove(index);\n }\n return this;\n }", "@Override\n public DeleteWirelessGatewayResult deleteWirelessGateway(DeleteWirelessGatewayRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteWirelessGateway(request);\n }", "@DELETE\n @Path(\"/generation/{generationId}\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public void deleteGeneration(@PathParam(\"generationId\") final Long generationId) {\n service.deleteCcGeneration(generationId);\n }", "public void deleteListener(ConfigProperties cprop){\n\t\tears.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Listener \"+cprop.getProperty(\"PROJ.id\"));\n\t}", "public void disbandChannel()\r\n\t{\r\n\t\tif (_partys != null)\r\n\t\tfor (L2Party party : _partys)\r\n\t\t\tif (party != null)\r\n\t\t\t\tremoveParty(party);\r\n\t\t_partys = null;\r\n\t}", "public void delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request, responseObserver);\n }", "public String deleteLaunchConfiguration(String lcName) {\n\t\tDeleteLaunchConfigurationRequest request = new DeleteLaunchConfigurationRequest()\n\t\t\t\t.withLaunchConfigurationName(lcName);\n\t\tDeleteLaunchConfigurationResult response = asClient\n\t\t\t\t.deleteLaunchConfiguration(request);\n\t\tString res = \"DeleteLaunchConfiguration: \" + lcName + \" \" + response;\n\t\tlog.info(res);\n\n\t\treturn res;\n\t}", "public void delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteMethod(), responseObserver);\n }", "public Builder clearChannelId() {\n \n channelId_ = getDefaultInstance().getChannelId();\n onChanged();\n return this;\n }", "DeleteDestinationResult deleteDestination(DeleteDestinationRequest deleteDestinationRequest);", "public Builder removeDelivered(int index) {\n if (deliveredBuilder_ == null) {\n ensureDeliveredIsMutable();\n delivered_.remove(index);\n onChanged();\n } else {\n deliveredBuilder_.remove(index);\n }\n return this;\n }", "int deleteByExample(TbaDeliveryinfoCriteria example);", "public io.dstore.values.BooleanValue getDeleteCampaign() {\n if (deleteCampaignBuilder_ == null) {\n return deleteCampaign_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : deleteCampaign_;\n } else {\n return deleteCampaignBuilder_.getMessage();\n }\n }", "public DeleteFlowResponse deleteFlow(DeleteFlowRequest request) throws Exception {\n com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();\n return this.deleteFlowWithOptions(request, runtime);\n }", "@Test\n public void deleteScheduledPlanTest() throws ApiException {\n Long scheduledPlanId = null;\n String response = api.deleteScheduledPlan(scheduledPlanId);\n\n // TODO: test validations\n }", "public Builder clearDeleteCampaign() {\n if (deleteCampaignBuilder_ == null) {\n deleteCampaign_ = null;\n onChanged();\n } else {\n deleteCampaign_ = null;\n deleteCampaignBuilder_ = null;\n }\n\n return this;\n }", "public io.dstore.values.BooleanValueOrBuilder getDeleteCampaignOrBuilder() {\n return getDeleteCampaign();\n }", "@Override\r\n\tpublic void onChannelPersonalDeleteNotify(AirChannel ch)\r\n\t{\n\t\tif (ch != null)\r\n\t\t{\r\n\t\t\t// AirSessionControl.getInstance().SessionChannelOut(ch.getId());\r\n\t\t\tAirSession session = AirtalkeeSessionManager.getInstance().SessionMatch(ch.getCreator());\r\n\t\t\tif (session != null)\r\n\t\t\t{\r\n\t\t\t\tsession.setVisible(true);\r\n\r\n\t\t\t\tString tip = String.format(AirServices.getInstance().getString(R.string.talk_channel_tip_delete), ch.getDisplayName());\r\n\t\t\t\tAirtalkeeMessage.getInstance().MessageSystemGenerate(session, tip, true);\r\n\t\t\t}\r\n\t\t\tif (channelListener != null)\r\n\t\t\t{\r\n\t\t\t\tchannelListener.onChannelPersonalDeleteNotify(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public io.dstore.values.BooleanValueOrBuilder getDeleteCampaignOrBuilder() {\n if (deleteCampaignBuilder_ != null) {\n return deleteCampaignBuilder_.getMessageOrBuilder();\n } else {\n return deleteCampaign_ == null ?\n io.dstore.values.BooleanValue.getDefaultInstance() : deleteCampaign_;\n }\n }", "public Builder clearChannel() {\n bitField0_ = (bitField0_ & ~0x00000200);\n channel_ = getDefaultInstance().getChannel();\n onChanged();\n return this;\n }", "public boolean closeDelivery();", "public void removeGroup(TvBrowserDataServiceChannelGroup group) {\r\n mAvailableChannelGroupsSet.remove(group);\r\n group.deleteAllFiles();\r\n }", "public void releaseMessageDeliveryFromTracking(UUID channelID, long messageID) {\n if(log.isDebugEnabled()) {\n log.debug(\"Releasing tracking of message sent id= \" + messageID);\n }\n messageSendingTracker.get(channelID).remove(messageID);\n }", "public void removeParty(L2Party party)\r\n\t{\r\n\t\t_partys.remove(party);\r\n\t\t_channelLvl = 0;\r\n\t\tfor (L2Party pty : _partys)\r\n\t\t{\r\n\t\t\tif (pty.getLevel() > _channelLvl)\r\n\t\t\t\t_channelLvl = pty.getLevel();\r\n\t\t}\r\n\t\tparty.setCommandChannel(null);\r\n\t\tparty.broadcastToPartyMembers(ExCloseMPCC.STATIC_PACKET);\r\n\r\n\t\tSystemMessage sm;\r\n\t\tif (_partys.size() < 2)\r\n\t\t{\r\n\t\t\tsm = new SystemMessage(SystemMessageId.COMMAND_CHANNEL_DISBANDED);\r\n \t\tbroadcastToChannelMembers(sm);\r\n\t\t\tdisbandChannel();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse if (_partys.size() < 5)\r\n\t\t{\r\n\t\t\tsm = new SystemMessage(SystemMessageId.COMMAND_CHANNEL_ONLY_AT_LEAST_5_PARTIES);\r\n \t\tbroadcastToChannelMembers(sm);\r\n \t\tsm = new SystemMessage(SystemMessageId.S1_PARTIES_REMAINING_UNTIL_CHANNEL);\r\n \t\tsm.addNumber(5 - _partys.size());\r\n\t\t}\r\n\t\tbroadcastToChannelMembers(new ExMultiPartyCommandChannelInfo(this));\r\n\t}", "public io.dstore.values.BooleanValue getDeleteCampaign() {\n return deleteCampaign_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : deleteCampaign_;\n }", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "public void leaveChannel() {\n mRtcEngine.leaveChannel();\n appointment.removeOfCall(new DatabaseUser(MainUser.getMainUser().getId()));\n }", "public void removeChannel(int channel, boolean lazy) {\n\t\tfloat[] toBeDeleted = (float[]) channels[channel];\n\t\t// move all channels after it\n\t\tfor (int i = channel; i < this.channelCount - 1; i++) {\n\t\t\tchannels[i] = channels[i + 1];\n\t\t}\n\t\tif (!lazy) {\n\t\t\tgrow(this.channelCount - 1, true);\n\t\t} else {\n\t\t\t// if not already, insert this channel at the end\n\t\t\tchannels[this.channelCount - 1] = toBeDeleted;\n\t\t}\n\t\tsetChannelCountImpl(channelCount - 1);\n\t}", "public void releaseAllMessagesOfChannelFromTracking(UUID channelID) {\n if(log.isDebugEnabled()) {\n log.debug(\"Releasing tracking of messages sent by channel id = \" + channelID);\n }\n messageSendingTracker.remove(channelID);\n }", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "@Override\n public DeleteWirelessGatewayTaskDefinitionResult deleteWirelessGatewayTaskDefinition(DeleteWirelessGatewayTaskDefinitionRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteWirelessGatewayTaskDefinition(request);\n }", "private void removeChannelFromFavorites(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.listRemove(FAVORITES_SETTING, channel);\r\n }\r\n }", "public void deleteConfig(long rowId) {\n\t\tdb.delete(TABLE_NAME, ROW_ID + \"=\" + rowId, null);\n\t}", "public void delete(CostEngineering costEngineering) {\n cost_engineering_dao.delete(costEngineering);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete MsgReceiverGroup : {}\", id);\n msgReceiverGroupRepository.deleteById(id);\n }", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public PeerRole planToRemoveChannelPeerRoleListWithChannel(PeerRole peerRole, String channelId, Map<String,Object> options)throws Exception;", "@Override\n public DeleteNetworkAnalyzerConfigurationResult deleteNetworkAnalyzerConfiguration(DeleteNetworkAnalyzerConfigurationRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteNetworkAnalyzerConfiguration(request);\n }", "public boolean unregisterChannel(IPacketHandler handler, String channel)\n {\n boolean ret = false;\n ArrayList<IPacketHandler> handlers = channelToHandlers.get(channel);\n ArrayList<String> channels = handlerToChannels.get(handler);\n \n if (handlers != null && handlers.contains(handler))\n {\n handlers.remove(handler);\n if (handlers.size() == 0)\n {\n ret = true;\n channelToHandlers.remove(channel);\n }\n }\n \n if (channels != null && channels.contains(channel))\n {\n channels.remove(channel);\n if (handlers.size() == 0)\n {\n handlerToChannels.remove(handler);\n }\n }\n \n return ret;\n }", "public static void deleteParty(QuestParty party) {\n\t\topenParties.remove(party);\n\t}", "public void deleteOrder(String orderId) {\n\t\torderMapper.deleteOrder(orderId);\n\t}", "int deleteByExample(TSourceChannelsExample example);", "public Builder clearDelivered() {\n if (deliveredBuilder_ == null) {\n delivered_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n deliveredBuilder_.clear();\n }\n return this;\n }", "@Override\r\n\tpublic int deleteBoard(BoardVO board) {\n\t\treturn 0;\r\n\t}", "public void deleteInvitationAttachment(final Attachment attachment);", "public void disconnect() {\n if (connectCount.decrementAndGet() == 0) {\n LOG.trace(\"Disconnecting JGroupsraft Channel {}\", getEndpointUri());\n resolvedRaftHandle.channel().disconnect();\n }\n }", "@Override\n public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) {\n Client client = (Client) ctx.getChannel().getAttachment();\n Player player = client.getPlayer();\n if (player != null && !player.destroyed()) {\n player.destroy(false);\n }\n if(engine.getClients().contains(client)) {\n \tSystem.out.println(\"Remove client\");\n \tengine.removeClient(client);\n }\n }", "@Override\n\tpublic int boardDelete(SpringBoardVO bvo) {\n\t\treturn springBoardDAO.boardDelete(bvo);\n\t}", "@Nullable\n public DeviceManagementDomainJoinConnector delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "@Override\n\tpublic Integer delete(BoardDTO dto) {\n\t\treturn mapper.delete(dto);\n\t}", "public void deleteCanvas(long canvasId)\n\t{\n\t\tCalicoPacket packet = new CalicoPacket();\n\t\tpacket.putInt(NetworkCommand.CANVAS_DELETE);\n\t\tpacket.putLong(canvasId);\n\n\t\tpacket.rewind();\n\t\tPacketHandler.receive(packet);\n\t\tNetworking.send(packet);\n\t}", "public boolean deleteBuild(int buildId);", "private synchronized void removeChannelFromHistory(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.mapRemove(HISTORY_SETTING, channel);\r\n }\r\n }", "@DeleteMapping(\"/deliver-managements/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDeliverManagement(@PathVariable Long id) {\n log.debug(\"REST request to delete DeliverManagement : {}\", id);\n deliverManagementRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@NonNull\n Completable deleteFolder(@NonNull String folderToDelete);", "public void setSzCdPaymentDelivery(java.lang.String szCdPaymentDelivery)\r\n {\r\n this._szCdPaymentDelivery = szCdPaymentDelivery;\r\n }", "public void delete(Conseiller c) {\n\t\t\r\n\t}", "@Override\n public void disconnect(Channel channel)\n {\n Log.e(\"Dudu_SDK\",\n \"disconnect \" + ((user == null) ? \"true\" : user.getUserid()));\n close(false);\n isConnected = false;\n reconnect();\n Log.e(\"Dudu_SDK\",\n \"connectCallBack==null \" + (connectCallBack == null));\n if (connectCallBack != null)\n connectCallBack.disconnect(channel);\n }", "boolean deleteWorkingSchedule(Long workingScheduleId);", "public static void MessageChannelWithDelete(String message, int timer, TextChannel channel) throws InterruptedException, ExecutionException {\n\t\tchannel.sendMessage(message).submit().get().delete().queueAfter(timer, TimeUnit.SECONDS);\n\t}", "public static void deleteEdge(Edge edge,Context context) {\n DatabaseContext dbContext = new DatabaseContext(context);\n SQLiteHelper helper = new SQLiteHelper(dbContext,\"BLEdevice.db\");\n helper.deleteEdge(edge);\n // Log.w(\"deleteEdge\", \"edge cout = \" + coutEdge(context));\n }", "public synchronized void delete(String storeName, AID receiver) throws IOException {\n\t\tFile subDir = getMessageFolder(receiver);\n\n\t\t// Generate the file name by hashing the receiver AID and the message itself\n\t\tFile toDelete = new File(subDir, storeName);\n\n\t\t// Decrement the counter (if 0, it deletes the file). If the subdirectory is empty, remove it as well\n\t\tdecrementCounter(toDelete);\n\t\tif(subDir.list().length == 0) {\n\t\t\tsubDir.delete();\n\t\t}\n\n\t}", "@Override\n public void onUnsubscribe(String channel, int subscribedChannels) {\n super.onUnsubscribe(channel, subscribedChannels);\n System.out.println(\"Channel unsubscribed at : \" + channel);\n }", "private void uponInConnectionDown(InConnectionDown event, int channelId) {\n Node dead = controlView.removeHost(event.getNode());\n if(dead != null && activeView.removeNode(dead)) {\n repair(dead);\n }\n }", "public void deleteJob(ConfigProperties cprop){\n\t\tjobs.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Job \"+cprop.getProperty(\"PROJ.id\"));\n\t}", "public void deleteProductFromCostEngineering(CatalogProduct product, CostEngineering costEngineering) {\n cost_engineering_dao.deleteProductFromCostEngineering(product, costEngineering);\n }", "@Transactional\r\n public void delete(long directProjectId) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".delete(long directProjectId)\";\r\n\r\n deleteEntity(signature, DirectProjectCPConfig.class, directProjectId, \"directProjectId\");\r\n }", "public String getChannelId() {\n return channelId;\n }", "public void deleteFactura(Long facturaId, long clienteId) throws BusinessLogicException {\n FacturaEntity entity = getFactura(clienteId, facturaId);\n if (entity == null) {\n throw new BusinessLogicException(\"La factura con id = \" + facturaId + \" no esta asociada al cliente con id = \" + clienteId);\n }\n fp.delete(entity.getId());\n }", "public void setDeliveryOption(java.lang.String deliveryOption) {\r\n this.deliveryOption = deliveryOption;\r\n }", "public void disconnect(String channelName) throws CommunicationException\n {\n try\n {\n if (channels.containsKey(channelName))\n {\n Channel channel = (Channel)channels.get(channelName);\n if (channel.isConnected())\n {\n Receiver recvr = (Receiver)receivers.get(channelName);\n recvr.doStop();\n channel.disconnect();\n channels.remove(channelName);\n receivers.remove(channelName);\n }\n }\n }\n catch (CommException cex)\n {\n throw new CommunicationException(\"Error al desconectar\", cex);\n }\n }", "public static base_response delete(nitro_service client, appfwconfidfield resource) throws Exception {\n\t\tappfwconfidfield deleteresource = new appfwconfidfield();\n\t\tdeleteresource.fieldname = resource.fieldname;\n\t\tdeleteresource.url = resource.url;\n\t\treturn deleteresource.delete_resource(client);\n\t}", "@Nullable\n public ExternalMeetingRegistrant delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "public void removeActiveChannel(NetworkManager manager, String channel)\n {\n if (connections.containsKey(manager))\n {\n ConnectionInstance con = getConnection(manager);\n con.removeActiveChannel(channel);\n }\n }", "@ApiOperation(\"Delete a chapter group and all related data. This is destructive.\")\n\t@DeleteMapping(\"/{chapterGroupId}\")\n\t@ResponseStatus(HttpStatus.NO_CONTENT)\n\tpublic void delete(@PathVariable int chapterGroupId) {\n\t\tchapterGroupDao.deleteById(chapterGroupId);\n\t}", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Response<Flux<ByteBuffer>>> deleteWithResponse(\n String resourceGroupName, String circuitName, String peeringName, Context context) {\n return this.serviceClient.deleteWithResponseAsync(resourceGroupName, circuitName, peeringName, context);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> delete(String resourceGroupName, String circuitName, String peeringName, Context context) {\n return this.serviceClient.deleteAsync(resourceGroupName, circuitName, peeringName, context);\n }", "@Override\n public DeleteFlywheelResult deleteFlywheel(DeleteFlywheelRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteFlywheel(request);\n }" ]
[ "0.62607545", "0.5033921", "0.5009171", "0.4948878", "0.49452904", "0.48983783", "0.48441502", "0.48267084", "0.48119193", "0.4677046", "0.45691228", "0.4463611", "0.44493058", "0.44460395", "0.44321898", "0.44083828", "0.43965107", "0.4393642", "0.43874088", "0.43510213", "0.43433997", "0.4331487", "0.4309003", "0.43055692", "0.43034875", "0.42986465", "0.42881566", "0.42775998", "0.4271902", "0.4269913", "0.42646354", "0.426341", "0.4263178", "0.4256163", "0.42548275", "0.42407405", "0.42349386", "0.42337927", "0.42203224", "0.4215854", "0.4215709", "0.42135766", "0.4213512", "0.42109504", "0.41965216", "0.41934195", "0.41926292", "0.419043", "0.4179013", "0.4151956", "0.41458723", "0.41432142", "0.41380686", "0.4136017", "0.41349477", "0.41332394", "0.41305348", "0.4129216", "0.4128658", "0.41279402", "0.41186762", "0.4116798", "0.41036534", "0.41001746", "0.40999857", "0.40988466", "0.4098355", "0.40840003", "0.40837795", "0.40755177", "0.40623322", "0.40508822", "0.40494666", "0.40411308", "0.40388402", "0.40387753", "0.40372753", "0.4033213", "0.40326414", "0.40303206", "0.40193197", "0.40187967", "0.40158072", "0.40144184", "0.40125522", "0.40117237", "0.40043983", "0.40015498", "0.3996665", "0.3991527", "0.39904073", "0.3990201", "0.3986755", "0.39828038", "0.39760393", "0.3975272", "0.39732292", "0.3971834", "0.3971732", "0.39684927" ]
0.68092763
0
Deletes the specified delivery channel. The delivery channel cannot be deleted if it is the only delivery channel and the configuration recorder is still running. To delete the delivery channel, stop the running configuration recorder using the StopConfigurationRecorder action.
public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest, AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public String deleteSub(Channel currentChannel)\n {\n return accessData.deleteSub(currentChannel);\n }", "public boolean removeContestChannel(long contestChannelId) throws ContestManagementException {\r\n return false;\r\n }", "public void clientWasRemoved(ChannelId channelId);", "@Override\n\tpublic String deleteChannelConfig(Integer id) {\n\t\treturn null;\n\t}", "public void removeChannel(int channel) {\n\t\tremoveChannel(channel, LAZY_DEFAULT);\n\t}", "int deleteByExample(CmsChannelCriteria example);", "public void removeActiveChannel(String channel)\n {\n if (activeChannels.contains(channel))\n {\n activeChannels.remove(channel);\n }\n }", "@DeleteMapping(\"/delivery-delivery-types/{id}\")\n public ResponseEntity<Void> deleteDeliveryDeliveryType(@PathVariable Long id) {\n log.debug(\"REST request to delete DeliveryDeliveryType : {}\", id);\n deliveryDeliveryTypeRepository.deleteById(id);\n deliveryDeliveryTypeSearchRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "@Override\n\tpublic int boardDelete(int boardId) {\n\t\treturn dao.boardDelete(session, boardId);\n\t}", "public yandex.cloud.api.operation.OperationOuterClass.Operation delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getDeleteMethod(), getCallOptions(), request);\n }", "public Builder clearChannel() {\n bitField0_ = (bitField0_ & ~0x00000002);\n channel_ = 1;\n onChanged();\n return this;\n }", "public void removeCvchannel(Cvchannel cvchannel);", "int deleteByPrimaryKey(Integer deliveryid);", "@Override\n public DeleteComponentResult deleteComponent(DeleteComponentRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteComponent(request);\n }", "public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> delete(\n yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request);\n }", "public Builder clearChannel() {\n if (channelBuilder_ == null) {\n channel_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n channelBuilder_.clear();\n }\n return this;\n }", "public AcknowledgableDelivery(Delivery delivery, Channel channel, BiConsumer<Receiver.AcknowledgmentContext, Exception> exceptionHandler) {\n super(delivery.getEnvelope(), delivery.getProperties(), delivery.getBody());\n this.channel = channel;\n this.exceptionHandler = exceptionHandler;\n }", "public Builder clearChannel() {\n \n channel_ = getDefaultInstance().getChannel();\n onChanged();\n return this;\n }", "public void removeCvchannelPack(CvchannelPack cvchannelPack);", "private String delCom(String command, String channel) {\r\n String statement = \"DELETE FROM customCommands WHERE command='\" + command + \"' AND channel = '\"+channel+\"'; \";\r\n manager.connectToDatabase(statement);\r\n return (\"Custom command \" + command + \" was successfully removed.\");\r\n }", "public Builder removeChannel(int index) {\n if (channelBuilder_ == null) {\n ensureChannelIsMutable();\n channel_.remove(index);\n onChanged();\n } else {\n channelBuilder_.remove(index);\n }\n return this;\n }", "@Override\n public DeleteWirelessGatewayResult deleteWirelessGateway(DeleteWirelessGatewayRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteWirelessGateway(request);\n }", "@DELETE\n @Path(\"/generation/{generationId}\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public void deleteGeneration(@PathParam(\"generationId\") final Long generationId) {\n service.deleteCcGeneration(generationId);\n }", "public void deleteListener(ConfigProperties cprop){\n\t\tears.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Listener \"+cprop.getProperty(\"PROJ.id\"));\n\t}", "public void disbandChannel()\r\n\t{\r\n\t\tif (_partys != null)\r\n\t\tfor (L2Party party : _partys)\r\n\t\t\tif (party != null)\r\n\t\t\t\tremoveParty(party);\r\n\t\t_partys = null;\r\n\t}", "public void delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteMethod(), getCallOptions()), request, responseObserver);\n }", "public String deleteLaunchConfiguration(String lcName) {\n\t\tDeleteLaunchConfigurationRequest request = new DeleteLaunchConfigurationRequest()\n\t\t\t\t.withLaunchConfigurationName(lcName);\n\t\tDeleteLaunchConfigurationResult response = asClient\n\t\t\t\t.deleteLaunchConfiguration(request);\n\t\tString res = \"DeleteLaunchConfiguration: \" + lcName + \" \" + response;\n\t\tlog.info(res);\n\n\t\treturn res;\n\t}", "public void delete(yandex.cloud.api.logging.v1.SinkServiceOuterClass.DeleteSinkRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteMethod(), responseObserver);\n }", "public Builder clearChannelId() {\n \n channelId_ = getDefaultInstance().getChannelId();\n onChanged();\n return this;\n }", "DeleteDestinationResult deleteDestination(DeleteDestinationRequest deleteDestinationRequest);", "public Builder removeDelivered(int index) {\n if (deliveredBuilder_ == null) {\n ensureDeliveredIsMutable();\n delivered_.remove(index);\n onChanged();\n } else {\n deliveredBuilder_.remove(index);\n }\n return this;\n }", "int deleteByExample(TbaDeliveryinfoCriteria example);", "public io.dstore.values.BooleanValue getDeleteCampaign() {\n if (deleteCampaignBuilder_ == null) {\n return deleteCampaign_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : deleteCampaign_;\n } else {\n return deleteCampaignBuilder_.getMessage();\n }\n }", "public DeleteFlowResponse deleteFlow(DeleteFlowRequest request) throws Exception {\n com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions();\n return this.deleteFlowWithOptions(request, runtime);\n }", "@Test\n public void deleteScheduledPlanTest() throws ApiException {\n Long scheduledPlanId = null;\n String response = api.deleteScheduledPlan(scheduledPlanId);\n\n // TODO: test validations\n }", "public Builder clearDeleteCampaign() {\n if (deleteCampaignBuilder_ == null) {\n deleteCampaign_ = null;\n onChanged();\n } else {\n deleteCampaign_ = null;\n deleteCampaignBuilder_ = null;\n }\n\n return this;\n }", "public io.dstore.values.BooleanValueOrBuilder getDeleteCampaignOrBuilder() {\n return getDeleteCampaign();\n }", "@Override\r\n\tpublic void onChannelPersonalDeleteNotify(AirChannel ch)\r\n\t{\n\t\tif (ch != null)\r\n\t\t{\r\n\t\t\t// AirSessionControl.getInstance().SessionChannelOut(ch.getId());\r\n\t\t\tAirSession session = AirtalkeeSessionManager.getInstance().SessionMatch(ch.getCreator());\r\n\t\t\tif (session != null)\r\n\t\t\t{\r\n\t\t\t\tsession.setVisible(true);\r\n\r\n\t\t\t\tString tip = String.format(AirServices.getInstance().getString(R.string.talk_channel_tip_delete), ch.getDisplayName());\r\n\t\t\t\tAirtalkeeMessage.getInstance().MessageSystemGenerate(session, tip, true);\r\n\t\t\t}\r\n\t\t\tif (channelListener != null)\r\n\t\t\t{\r\n\t\t\t\tchannelListener.onChannelPersonalDeleteNotify(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public io.dstore.values.BooleanValueOrBuilder getDeleteCampaignOrBuilder() {\n if (deleteCampaignBuilder_ != null) {\n return deleteCampaignBuilder_.getMessageOrBuilder();\n } else {\n return deleteCampaign_ == null ?\n io.dstore.values.BooleanValue.getDefaultInstance() : deleteCampaign_;\n }\n }", "public void removeGroup(TvBrowserDataServiceChannelGroup group) {\r\n mAvailableChannelGroupsSet.remove(group);\r\n group.deleteAllFiles();\r\n }", "public Builder clearChannel() {\n bitField0_ = (bitField0_ & ~0x00000200);\n channel_ = getDefaultInstance().getChannel();\n onChanged();\n return this;\n }", "public boolean closeDelivery();", "public void releaseMessageDeliveryFromTracking(UUID channelID, long messageID) {\n if(log.isDebugEnabled()) {\n log.debug(\"Releasing tracking of message sent id= \" + messageID);\n }\n messageSendingTracker.get(channelID).remove(messageID);\n }", "public void removeParty(L2Party party)\r\n\t{\r\n\t\t_partys.remove(party);\r\n\t\t_channelLvl = 0;\r\n\t\tfor (L2Party pty : _partys)\r\n\t\t{\r\n\t\t\tif (pty.getLevel() > _channelLvl)\r\n\t\t\t\t_channelLvl = pty.getLevel();\r\n\t\t}\r\n\t\tparty.setCommandChannel(null);\r\n\t\tparty.broadcastToPartyMembers(ExCloseMPCC.STATIC_PACKET);\r\n\r\n\t\tSystemMessage sm;\r\n\t\tif (_partys.size() < 2)\r\n\t\t{\r\n\t\t\tsm = new SystemMessage(SystemMessageId.COMMAND_CHANNEL_DISBANDED);\r\n \t\tbroadcastToChannelMembers(sm);\r\n\t\t\tdisbandChannel();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse if (_partys.size() < 5)\r\n\t\t{\r\n\t\t\tsm = new SystemMessage(SystemMessageId.COMMAND_CHANNEL_ONLY_AT_LEAST_5_PARTIES);\r\n \t\tbroadcastToChannelMembers(sm);\r\n \t\tsm = new SystemMessage(SystemMessageId.S1_PARTIES_REMAINING_UNTIL_CHANNEL);\r\n \t\tsm.addNumber(5 - _partys.size());\r\n\t\t}\r\n\t\tbroadcastToChannelMembers(new ExMultiPartyCommandChannelInfo(this));\r\n\t}", "public io.dstore.values.BooleanValue getDeleteCampaign() {\n return deleteCampaign_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : deleteCampaign_;\n }", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "public void leaveChannel() {\n mRtcEngine.leaveChannel();\n appointment.removeOfCall(new DatabaseUser(MainUser.getMainUser().getId()));\n }", "public void removeChannel(int channel, boolean lazy) {\n\t\tfloat[] toBeDeleted = (float[]) channels[channel];\n\t\t// move all channels after it\n\t\tfor (int i = channel; i < this.channelCount - 1; i++) {\n\t\t\tchannels[i] = channels[i + 1];\n\t\t}\n\t\tif (!lazy) {\n\t\t\tgrow(this.channelCount - 1, true);\n\t\t} else {\n\t\t\t// if not already, insert this channel at the end\n\t\t\tchannels[this.channelCount - 1] = toBeDeleted;\n\t\t}\n\t\tsetChannelCountImpl(channelCount - 1);\n\t}", "public void releaseAllMessagesOfChannelFromTracking(UUID channelID) {\n if(log.isDebugEnabled()) {\n log.debug(\"Releasing tracking of messages sent by channel id = \" + channelID);\n }\n messageSendingTracker.remove(channelID);\n }", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "@Override\n public DeleteWirelessGatewayTaskDefinitionResult deleteWirelessGatewayTaskDefinition(DeleteWirelessGatewayTaskDefinitionRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteWirelessGatewayTaskDefinition(request);\n }", "private void removeChannelFromFavorites(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.listRemove(FAVORITES_SETTING, channel);\r\n }\r\n }", "public void deleteConfig(long rowId) {\n\t\tdb.delete(TABLE_NAME, ROW_ID + \"=\" + rowId, null);\n\t}", "public void delete(CostEngineering costEngineering) {\n cost_engineering_dao.delete(costEngineering);\n }", "public void delete(Long id) {\n log.debug(\"Request to delete MsgReceiverGroup : {}\", id);\n msgReceiverGroupRepository.deleteById(id);\n }", "public PeerRole planToRemoveChannelPeerRoleListWithChannel(PeerRole peerRole, String channelId, Map<String,Object> options)throws Exception;", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public boolean unregisterChannel(IPacketHandler handler, String channel)\n {\n boolean ret = false;\n ArrayList<IPacketHandler> handlers = channelToHandlers.get(channel);\n ArrayList<String> channels = handlerToChannels.get(handler);\n \n if (handlers != null && handlers.contains(handler))\n {\n handlers.remove(handler);\n if (handlers.size() == 0)\n {\n ret = true;\n channelToHandlers.remove(channel);\n }\n }\n \n if (channels != null && channels.contains(channel))\n {\n channels.remove(channel);\n if (handlers.size() == 0)\n {\n handlerToChannels.remove(handler);\n }\n }\n \n return ret;\n }", "@Override\n public DeleteNetworkAnalyzerConfigurationResult deleteNetworkAnalyzerConfiguration(DeleteNetworkAnalyzerConfigurationRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteNetworkAnalyzerConfiguration(request);\n }", "public static void deleteParty(QuestParty party) {\n\t\topenParties.remove(party);\n\t}", "public void deleteOrder(String orderId) {\n\t\torderMapper.deleteOrder(orderId);\n\t}", "int deleteByExample(TSourceChannelsExample example);", "public Builder clearDelivered() {\n if (deliveredBuilder_ == null) {\n delivered_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n deliveredBuilder_.clear();\n }\n return this;\n }", "public void deleteInvitationAttachment(final Attachment attachment);", "@Override\r\n\tpublic int deleteBoard(BoardVO board) {\n\t\treturn 0;\r\n\t}", "public void disconnect() {\n if (connectCount.decrementAndGet() == 0) {\n LOG.trace(\"Disconnecting JGroupsraft Channel {}\", getEndpointUri());\n resolvedRaftHandle.channel().disconnect();\n }\n }", "@Override\n public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) {\n Client client = (Client) ctx.getChannel().getAttachment();\n Player player = client.getPlayer();\n if (player != null && !player.destroyed()) {\n player.destroy(false);\n }\n if(engine.getClients().contains(client)) {\n \tSystem.out.println(\"Remove client\");\n \tengine.removeClient(client);\n }\n }", "@Override\n\tpublic int boardDelete(SpringBoardVO bvo) {\n\t\treturn springBoardDAO.boardDelete(bvo);\n\t}", "@Nullable\n public DeviceManagementDomainJoinConnector delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "@Override\n\tpublic Integer delete(BoardDTO dto) {\n\t\treturn mapper.delete(dto);\n\t}", "public void deleteCanvas(long canvasId)\n\t{\n\t\tCalicoPacket packet = new CalicoPacket();\n\t\tpacket.putInt(NetworkCommand.CANVAS_DELETE);\n\t\tpacket.putLong(canvasId);\n\n\t\tpacket.rewind();\n\t\tPacketHandler.receive(packet);\n\t\tNetworking.send(packet);\n\t}", "public boolean deleteBuild(int buildId);", "@NonNull\n Completable deleteFolder(@NonNull String folderToDelete);", "@DeleteMapping(\"/deliver-managements/{id}\")\n @Timed\n public ResponseEntity<Void> deleteDeliverManagement(@PathVariable Long id) {\n log.debug(\"REST request to delete DeliverManagement : {}\", id);\n deliverManagementRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "private synchronized void removeChannelFromHistory(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.mapRemove(HISTORY_SETTING, channel);\r\n }\r\n }", "public void setSzCdPaymentDelivery(java.lang.String szCdPaymentDelivery)\r\n {\r\n this._szCdPaymentDelivery = szCdPaymentDelivery;\r\n }", "public void delete(Conseiller c) {\n\t\t\r\n\t}", "@Override\n public void disconnect(Channel channel)\n {\n Log.e(\"Dudu_SDK\",\n \"disconnect \" + ((user == null) ? \"true\" : user.getUserid()));\n close(false);\n isConnected = false;\n reconnect();\n Log.e(\"Dudu_SDK\",\n \"connectCallBack==null \" + (connectCallBack == null));\n if (connectCallBack != null)\n connectCallBack.disconnect(channel);\n }", "boolean deleteWorkingSchedule(Long workingScheduleId);", "public static void deleteEdge(Edge edge,Context context) {\n DatabaseContext dbContext = new DatabaseContext(context);\n SQLiteHelper helper = new SQLiteHelper(dbContext,\"BLEdevice.db\");\n helper.deleteEdge(edge);\n // Log.w(\"deleteEdge\", \"edge cout = \" + coutEdge(context));\n }", "public static void MessageChannelWithDelete(String message, int timer, TextChannel channel) throws InterruptedException, ExecutionException {\n\t\tchannel.sendMessage(message).submit().get().delete().queueAfter(timer, TimeUnit.SECONDS);\n\t}", "public synchronized void delete(String storeName, AID receiver) throws IOException {\n\t\tFile subDir = getMessageFolder(receiver);\n\n\t\t// Generate the file name by hashing the receiver AID and the message itself\n\t\tFile toDelete = new File(subDir, storeName);\n\n\t\t// Decrement the counter (if 0, it deletes the file). If the subdirectory is empty, remove it as well\n\t\tdecrementCounter(toDelete);\n\t\tif(subDir.list().length == 0) {\n\t\t\tsubDir.delete();\n\t\t}\n\n\t}", "@Override\n public void onUnsubscribe(String channel, int subscribedChannels) {\n super.onUnsubscribe(channel, subscribedChannels);\n System.out.println(\"Channel unsubscribed at : \" + channel);\n }", "public void deleteJob(ConfigProperties cprop){\n\t\tjobs.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Job \"+cprop.getProperty(\"PROJ.id\"));\n\t}", "private void uponInConnectionDown(InConnectionDown event, int channelId) {\n Node dead = controlView.removeHost(event.getNode());\n if(dead != null && activeView.removeNode(dead)) {\n repair(dead);\n }\n }", "public void deleteProductFromCostEngineering(CatalogProduct product, CostEngineering costEngineering) {\n cost_engineering_dao.deleteProductFromCostEngineering(product, costEngineering);\n }", "@Transactional\r\n public void delete(long directProjectId) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".delete(long directProjectId)\";\r\n\r\n deleteEntity(signature, DirectProjectCPConfig.class, directProjectId, \"directProjectId\");\r\n }", "public String getChannelId() {\n return channelId;\n }", "public void deleteFactura(Long facturaId, long clienteId) throws BusinessLogicException {\n FacturaEntity entity = getFactura(clienteId, facturaId);\n if (entity == null) {\n throw new BusinessLogicException(\"La factura con id = \" + facturaId + \" no esta asociada al cliente con id = \" + clienteId);\n }\n fp.delete(entity.getId());\n }", "public void setDeliveryOption(java.lang.String deliveryOption) {\r\n this.deliveryOption = deliveryOption;\r\n }", "public void disconnect(String channelName) throws CommunicationException\n {\n try\n {\n if (channels.containsKey(channelName))\n {\n Channel channel = (Channel)channels.get(channelName);\n if (channel.isConnected())\n {\n Receiver recvr = (Receiver)receivers.get(channelName);\n recvr.doStop();\n channel.disconnect();\n channels.remove(channelName);\n receivers.remove(channelName);\n }\n }\n }\n catch (CommException cex)\n {\n throw new CommunicationException(\"Error al desconectar\", cex);\n }\n }", "public static base_response delete(nitro_service client, appfwconfidfield resource) throws Exception {\n\t\tappfwconfidfield deleteresource = new appfwconfidfield();\n\t\tdeleteresource.fieldname = resource.fieldname;\n\t\tdeleteresource.url = resource.url;\n\t\treturn deleteresource.delete_resource(client);\n\t}", "@Nullable\n public ExternalMeetingRegistrant delete() throws ClientException {\n return send(HttpMethod.DELETE, null);\n }", "public void removeActiveChannel(NetworkManager manager, String channel)\n {\n if (connections.containsKey(manager))\n {\n ConnectionInstance con = getConnection(manager);\n con.removeActiveChannel(channel);\n }\n }", "@ApiOperation(\"Delete a chapter group and all related data. This is destructive.\")\n\t@DeleteMapping(\"/{chapterGroupId}\")\n\t@ResponseStatus(HttpStatus.NO_CONTENT)\n\tpublic void delete(@PathVariable int chapterGroupId) {\n\t\tchapterGroupDao.deleteById(chapterGroupId);\n\t}", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Response<Flux<ByteBuffer>>> deleteWithResponse(\n String resourceGroupName, String circuitName, String peeringName, Context context) {\n return this.serviceClient.deleteWithResponseAsync(resourceGroupName, circuitName, peeringName, context);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public Mono<Void> delete(String resourceGroupName, String circuitName, String peeringName, Context context) {\n return this.serviceClient.deleteAsync(resourceGroupName, circuitName, peeringName, context);\n }", "@Override\n public DeleteFlywheelResult deleteFlywheel(DeleteFlywheelRequest request) {\n request = beforeClientExecution(request);\n return executeDeleteFlywheel(request);\n }" ]
[ "0.68075246", "0.5031738", "0.5006201", "0.49471864", "0.4941568", "0.48972294", "0.48407054", "0.48260784", "0.481173", "0.4677191", "0.45678326", "0.44613835", "0.44473475", "0.44458106", "0.44315538", "0.4406571", "0.4394761", "0.43921018", "0.43851313", "0.4349098", "0.43400562", "0.43286946", "0.43100408", "0.4306031", "0.4301482", "0.429779", "0.42866203", "0.42766875", "0.42702976", "0.4268049", "0.42633042", "0.42622274", "0.4260554", "0.42554665", "0.42538586", "0.42410254", "0.42350143", "0.4232518", "0.42167947", "0.42150334", "0.42137367", "0.4213652", "0.42119572", "0.42097723", "0.41965842", "0.4193201", "0.41918826", "0.4189694", "0.41773513", "0.41498867", "0.41437906", "0.41432077", "0.41355097", "0.41352892", "0.4134501", "0.4132896", "0.41282338", "0.4128068", "0.41270447", "0.41269726", "0.41199902", "0.41186488", "0.41011438", "0.40998316", "0.40985963", "0.40982324", "0.40972432", "0.40821075", "0.40818763", "0.40750375", "0.40604687", "0.4049604", "0.4049164", "0.40394798", "0.40384302", "0.4038403", "0.40373692", "0.40309384", "0.40306893", "0.40298054", "0.4017836", "0.40160388", "0.40142703", "0.4012388", "0.4011005", "0.40104416", "0.4004983", "0.39997962", "0.3994414", "0.39913255", "0.3989706", "0.39884734", "0.3986328", "0.398203", "0.39750603", "0.39747405", "0.39715168", "0.39704236", "0.3970234", "0.39677772" ]
0.6259443
1
Stops recording configurations of all the resources associated with the account.
public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n synchronized (car) {\n LOG.info(\"Invalidating APPLY Record\");\n try {\n cas.destroyChannel(dir);\n cas.destroyChannel(val);\n cas.destroyChannel(mess);\n cas.destroyChannel(omss);\n cas.destroyChannel(clid);\n\n car.stop();\n for (CadRecord cad : cads) {\n cad.stop();\n }\n } catch (Exception e) {\n LOG.warning(\"Exception while shutting down apply record \" + e.getMessage());\n }\n }\n }", "private void stopRecording() {\n recoTransaction.stopRecording();\n }", "public void stop() {\r\n\t\tisRecording = false;\r\n\t}", "public void stopConferenceRecording();", "public void stop() {\n\t\tconnection.stop();\n\t\tdata.disconnectAll();\n\t\tsaveData();\n\t}", "public void stopRecording() {\n BLog.d(TAG, \"stopRecording()\");\n stopLastRunnable();\n mRecordingRunnable.stopRun();\n try {\n mRecordingThread.interrupt();\n } catch (Exception e) {}\n mRecordingThread = null;\n }", "@FXML\n\tpublic void recorderStopAudio() {\n\t\tcontroller.recorderTimerCancel();\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonPause.setDisable(true);\n\t\trecorderButtonStop.setDisable(true);\n\t\tcontroller.audioRecorderStopAudio();\n\t}", "public void stopRecord() {\n\t\tif (state == State.RECORDING) {\n\t\t\taudioRecorder.stop();\n\t\t\tstate = State.STOPPED;\n\t\t}\n\t\telse {\n\t\t\tLog.e(TAG, \"stop() called on illegal state\");\n\t\t\tstate = State.ERROR;\n\t\t}\n\t\tstate = State.INITIALIZING;\n\t}", "private void exitConfiguration() {\n checkSave();\n System.exit(0);\n }", "private void stopAllAudio() {\n MainActivity.logger(context.getString(R.string.audio_check_10));\n if (audioRecord != null) {\n if (audioRecord.getRecordingState() == AudioRecord.RECORDSTATE_RECORDING) {\n audioRecord.stop();\n }\n audioRecord.release();\n MainActivity.logger(context.getString(R.string.audio_check_11));\n }\n else {\n MainActivity.logger(context.getString(R.string.audio_check_12));\n }\n }", "private void shutdown() {\n mMediaRecorder.reset();\n mMediaRecorder.release();\n mCamera.release();\n\n // once the objects have been released they can't be reused\n mMediaRecorder = null;\n mCamera = null;\n }", "void deactivate(){\n \tthis.config.clear();\n\t\tlog.debug(bundleMarker,\"deactivating...\");\n\t}", "public void stop(BundleContext context) throws Exception {\n super.stop(context);\n ivyCpcSerializer = null;\n ivyAttachmentManager = null;\n resourceBundle = null;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n workspace.removeSaveParticipant(ID);\n colorManager = null;\n ivyMarkerManager = null;\n ivyResolveJob = null;\n retrieveSetupManager = null;\n workspace.removeResourceChangeListener(workspaceListener);\n workspaceListener = null;\n workspace.removeResourceChangeListener(ivyFileListener);\n ivyFileListener = null;\n\n getPreferenceStore().removePropertyChangeListener(propertyListener);\n propertyListener = null;\n\n if (console != null) {\n console.destroy();\n }\n plugin = null;\n }", "private void stopRecording() {\r\n\t\tisRecording = false;\r\n\t\ttry {\r\n\t\t\ttimer.cancel();\r\n\t\t\tbuttonRecord.setText(\"Record\");\r\n\t\t\tbuttonRecord.setIcon(iconRecord);\r\n\t\t\t\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\r\n\t\t\trecorder.stop();\r\n\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\r\n\t\t\tsaveFile();\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\"Error stopping sound recording!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "private void stopRecording() {\n Log.e(TAG, \"Stop recording file: \" + curRecordingFileName);\n if (null != mRecorder) {\n mRecorder.stop();\n mRecorder.release();\n mRecorder = null;\n }\n\n }", "public void terminate() {\n config.closeConnection();\n }", "public static void stop() {\n assert sListener != null;\n ResourceManager.getInstance().addListener(sListener);\n }", "public static void disconnect() {\n if (AppSettings.bluetoothConnection != null) \n \tAppSettings.bluetoothConnection.stop();\n\t}", "public void stop() {\n enable = false;\n }", "public void stop() {\n mediaController.getTransportControls().stop();\n }", "protected void shutdown()\n throws SwiftletException {\n if (config == null)\n return;\n if (traceSpace.enabled) traceSpace.trace(getName(), \"shutdown ...\");\n rlgroups.clear();\n groups.clear();\n users.clear();\n publicRLGroup = null;\n publicGroup = null;\n authenticationOff = true;\n config = null;\n if (traceSpace.enabled) traceSpace.trace(getName(), \"shutdown: done.\");\n }", "public static void stop() {\n enableIncomingMessages(false);\n }", "public void stop() {\n if (isStop.compareAndSet(false, true)) {\n if (bootstrap.config().group() != null) {\n Future future = bootstrap.config().group().shutdownGracefully();\n ((io.netty.util.concurrent.Future) future).syncUninterruptibly();\n }\n for (BrpcChannelGroup channelGroup : healthyInstances) {\n channelGroup.close();\n }\n for (BrpcChannelGroup channelGroup : unhealthyInstances) {\n channelGroup.close();\n }\n if (timeoutTimer != null) {\n timeoutTimer.stop();\n }\n if (namingService != null) {\n namingService.unsubscribe(subscribeInfo);\n }\n if (healthCheckTimer != null) {\n healthCheckTimer.stop();\n }\n if (loadBalanceStrategy != null) {\n loadBalanceStrategy.destroy();\n }\n if (callbackThread != null) {\n callbackThread.shutdown();\n }\n if (threadPool != null) {\n threadPool.stop();\n }\n }\n }", "public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onStop ()\n {\n super.onStop();\n if (receiver != null)\n {\n cleanupReceiver();\n cleanupAccount();\n }\n }", "public void stop() {\n // stop all workers and sessions.\n Iterator<Map.Entry<TauSession, Worker>> it\n = sessionToWorkerMap.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry<TauSession, Worker> entry = it.next();\n entry.getValue().stop();\n }\n\n synchronized (lock) {\n sessionToWorkerMap.clear();\n sessionsList.clear();\n }\n }", "public void stop(boolean save) {}", "public void stopAll() {\n List<String> startedEvents = new ArrayList<>(started.keySet());\n for (String event : startedEvents) {\n stop(event);\n }\n started.clear();\n }", "public void stop() {\n\t\tserver.saveObjectToFile(offlineMessagesFileName, _offlineMessages);\n\t\tserver.saveObjectToFile(onlineClientsFileName, _onlineClients);\n\t\tserver.saveObjectToFile(clientFriendsFileName, _clientFriends);\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t\tserver.stop();\n\t}", "public void deactivate() {\n log.info(\"Stopped\");\n }", "public void stop() {\n assert (timeEnd == null);\n timeEnd = System.currentTimeMillis();\n if (recordAt != null) {\n recordAt.record(this);\n }\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n\n stopRecording();\n }", "public void clearThawed() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state != ConfigurationButton.FREEZE) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "public void disableCtxRecording();", "public void shutdown() {\n if (configurations.isRegisterMXBeans()) {\n JmxConfigurator.get().removeMXBean(this);\n }\n configurations.shutdown();\n }", "private void stopRecording() {\n\n }", "public void stop()\r\n {\r\n debug(\"stop() all timers\");\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n\r\n debug(\"stop() all timers - complete\");\r\n }", "void stopRecording() {\n // Save the track id as the shared preference will overwrite the recording track id.\n SharedPreferences sharedPreferences = getSharedPreferences(\n Constants.SETTINGS_NAME, Context.MODE_PRIVATE);\n long currentTrackId = sharedPreferences.getLong(getString(R.string.recording_track_key), -1);\n \n ITrackRecordingService trackRecordingService = serviceConnection.getServiceIfBound();\n if (trackRecordingService != null) {\n try {\n trackRecordingService.endCurrentTrack();\n } catch (Exception e) {\n Log.e(TAG, \"Unable to stop recording.\", e);\n }\n }\n \n serviceConnection.stop();\n \n if (currentTrackId > 0) {\n Intent intent = new Intent(MyTracks.this, TrackDetail.class);\n intent.putExtra(TrackDetail.TRACK_ID, currentTrackId);\n intent.putExtra(TrackDetail.SHOW_CANCEL, false);\n startActivity(intent);\n }\n }", "public void stop() {\n if (!sequencer.tryAcquire())\n throw new IllegalStateException(\"Can't acquire lock\");\n int errcount = 0;\n final StringBuilder b = new StringBuilder();\n\n try {\n switchState(STOPPED,\"stop\");\n\n errcount += cancelSessionTasks(b);\n errcount += stopDirectoryScanners(b);\n } finally {\n sequencer.release();\n }\n\n sendQueuedNotifications();\n if (errcount > 0) {\n b.insert(0,\"stop partially failed with \"+errcount+\" error(s):\");\n throw new RuntimeException(b.toString());\n }\n }", "public void stop()\n {\n _panel.cleanup();\n _appContext.cleanup();\n }", "@Stop(priority = 99)\n void stop() {\n for (List<ListenerInvocation> list : listenersMap.values()) {\n if (list != null) list.clear();\n }\n\n if (syncProcessor != null) syncProcessor.shutdownNow();\n }", "void stopAll();", "void unsetServiceConfigurationList();", "void stop() {\n try {\n dm.stop(getBundleContext());\n } catch (DirectoryMonitoringException e) {\n LOG.error(\"Failed to stop \" + DirectoryMonitor.class.getName() + \" for the directory \" + monitoredDirectory, e);\n }\n declarationsFiles.clear();\n declarationRegistrationManager.unregisterAll();\n }", "void stop( String profileId );", "public void onStop() {\n connectivityMonitor.unregister();\n requestTracker.pauseRequests();\n }", "private void clearRecord() {\n // Clearing current booking information from sharedPreference\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.clear();\n editor.commit();\n shutdown();\n }", "@Override\n protected void onStop() {\n super.onStop();\n RobotLog.vv(TAG, \"onStop()\");\n\n // We *do* shutdown the robot even when we go into configuration editing\n controllerService.shutdownRobot();\n }", "public final void stopEventGeneration() throws LDAPException {\n if (Debug.LDAP_DEBUG) {\n Debug.trace(Debug.EventsCalls, \"Closing EventGeneration\");\n }\n\n isrunning = false;\n ldapconnection.abandon(searchqueue);\n }", "public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest,\n AsyncHandler<StopConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public void StopRecording()\n {\n handler.stopRecording();\n\n }", "@Deactivate\n protected void stop() throws Exception {\n EventSimulatorMap.getInstance().stopAllActiveSimulations();\n log.info(\"Simulator service file component is deactivated\");\n }", "public void stopRecording() {\n cameraPreview.stopRecording();\n mediaRecorder.stop(); // stop the recording\n releaseMediaRecorder(); // release the MediaRecorder object\n camera.lock(); // take camera access back from MediaRecorder\n isRecording = false;\n }", "@Deactivate\n public void deactivate() {\n loggerThread.interrupt();\n }", "public void stopRecord() {\n\t\tcmd = new StopRecordCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public void stop() {\n\t\tthis.controller.terminate();\n\t}", "File stopRecording();", "public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }", "void stopReportingTask();", "public void stopSurvey(){\n\t\tisSurveying = false;\n\t\t// NOTE: the other flags will be set automatically when isSurveying is set to false\n\t}", "public void stopAndReleaseAudioRecord() {\n if ((mAudioRecord != null) && (mAudioRecord.getState() != AudioRecord.STATE_UNINITIALIZED)) {\n try {\n mAudioRecord.stop();\n mAudioRecord.release();\n } catch (Exception e) {\n Log.e(TAG, \"stopAndReleaseAudioRecord() Exception: \" + e.getMessage());\n }\n }\n mAudioRecord = null;\n }", "public void stop() {\n m_enabled = false;\n }", "public void stopAcceptingLifecycleEvents() {\n adapter.stop();\n LOGGER.info(\"stopped ETL protocol adapter \" + adapter.getClass() + \"'\");\n }", "public void stop() {\n \t\tfor (Expirator e : expirators) {\n \t\t\te.stop();\n \t\t}\n \t}", "private void stopRecordRegistration(SoundRecordingUtil recorder, File wavFile) {\r\n\t\ttry {\r\n\t\t\trecorder.stop();\r\n\t\t\trecorder.save(wavFile);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void destroy() {\r\n final String METHOD_NAME = \"destroy\";\r\n LOGGER.info(\"Entering \" + METHOD_NAME);\r\n\r\n this.filterConfig = null;\r\n\r\n LOGGER.info(\"Exiting \" + METHOD_NAME);\r\n }", "@Override\r\n public void stopAll() {\r\n Log.d(TAG, \"Number of services: \"+ taskRequesterMap.size());\r\n Iterator<Map.Entry<String, TaskRequester>> iterator = taskRequesterMap.entrySet().iterator();\r\n while (iterator.hasNext()) {\r\n Map.Entry<String, TaskRequester> item = iterator.next();\r\n\r\n String name = item.getValue().getName();\r\n String className = item.getValue().getServiceClass().getName();\r\n\r\n// remove(className);\r\n item.getValue().unBind();\r\n Log.d(TAG, \"- \"+name+\" \"+className);\r\n// taskRequesterMap.remove(className);\r\n iterator.remove();\r\n serviceClasses.remove(new TaskModel(name, className, 1));\r\n// taskRequesterMap.remove(new TaskModel(name, className, 1));\r\n }\r\n }", "private void stopRecord() {\n /*\n r6 = this;\n r5 = 0;\n r1 = r6.isRecording;\n if (r1 != 0) goto L_0x0006;\n L_0x0005:\n return;\n L_0x0006:\n r1 = com.baidu.navisdk.BNaviModuleManager.getContext();\n com.baidu.navisdk.util.listener.MediaFocuseChangeListener.releaseAudioFocus(r1);\n com.baidu.navisdk.comapi.tts.TTSPlayerControl.resumeVoiceTTSOutput();\n r1 = 0;\n r6.isRecording = r1;\n r1 = r6.recordProcessIView;\n if (r1 == 0) goto L_0x001c;\n L_0x0017:\n r1 = r6.recordProcessIView;\n r1.clearAnimation();\n L_0x001c:\n r1 = r6.mTimer;\t Catch:{ Exception -> 0x004d }\n if (r1 == 0) goto L_0x0025;\n L_0x0020:\n r1 = r6.mTimer;\t Catch:{ Exception -> 0x004d }\n r1.cancel();\t Catch:{ Exception -> 0x004d }\n L_0x0025:\n r1 = r6.mRecorder;\t Catch:{ Exception -> 0x004d }\n if (r1 == 0) goto L_0x0036;\n L_0x0029:\n r1 = r6.mRecorder;\t Catch:{ Exception -> 0x005c }\n r1.stop();\t Catch:{ Exception -> 0x005c }\n L_0x002e:\n r1 = r6.mRecorder;\t Catch:{ Exception -> 0x004d }\n r1.release();\t Catch:{ Exception -> 0x004d }\n r1 = 0;\n r6.mRecorder = r1;\t Catch:{ Exception -> 0x004d }\n L_0x0036:\n r6.mRecorder = r5;\n r6.mTimer = r5;\n L_0x003a:\n r1 = r6.mOnUgcSoundsRecordCallback;\n if (r1 == 0) goto L_0x004a;\n L_0x003e:\n r1 = r6.mOnUgcSoundsRecordCallback;\n r2 = r6.timeCountTime;\n r2 = 20 - r2;\n r3 = r6.filePath;\n r4 = 1;\n r1.onRecordFinish(r2, r3, r4);\n L_0x004a:\n mUgcSoundsRecordDialog = r5;\n goto L_0x0005;\n L_0x004d:\n r0 = move-exception;\n r0.printStackTrace();\t Catch:{ all -> 0x0056 }\n r6.mRecorder = r5;\n r6.mTimer = r5;\n goto L_0x003a;\n L_0x0056:\n r1 = move-exception;\n r6.mRecorder = r5;\n r6.mTimer = r5;\n throw r1;\n L_0x005c:\n r1 = move-exception;\n goto L_0x002e;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.baidu.navisdk.module.ugc.dialog.UgcSoundsRecordDialog.stopRecord():void\");\n }", "@Override\n public void onDestroy(boolean isChangingConfiguration) {\n\n }", "@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }", "@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }", "void stop()\n {\n this.service_skeleton.stop(0);\n this.registration_skeleton.stop(0);\n }", "public void stopExperiment() {\n control.stopExperiment();\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n if (!isChangingConfigurations()) {\n pickiT.deleteTemporaryFile(this);\n }\n }", "public synchronized void stop()\n {\n try\n {\n logger.info(\"Deactivation of full query log requested.\");\n if (binLog != null)\n {\n logger.info(\"Stopping full query log\");\n binLog.stop();\n binLog = null;\n }\n }\n catch (Exception e)\n {\n throw new RuntimeException(e);\n }\n }", "public void stop() {\n executor.shutdownNow();\n\n Collection<NodeRegistrationContext> allRegistrations = nodeRegistrations.values();\n for (NodeRegistrationContext registration : allRegistrations) {\n sendUnregistrationEvent(registration.resolvedDeployment);\n }\n }", "public void deactivate() {\n serviceTracker.close();\n listenerSR.unregister();\n }", "@Override\r\n public void onDisable()\r\n {\n for (Arena arena : arenaController.getArenas().values())\r\n {\r\n arena.getGameManager().clearArena();\r\n }\r\n\r\n //Close database connection\r\n InputOutput.freeConnection();\r\n }", "@Override\n public void onStop() {\n if(toggleButton.isChecked()) {\n toggleButton.setChecked(false);\n mediaRecorder.stop();\n mediaRecorder.reset();\n Log.v(TAG, \"Recording Stopped\");\n }\n\n mediaProjection = null;\n stopScreenSharing();\n }", "private void stopCallBack() {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.stopCallBack();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void stop() {\n\t\tstopTask();\n\t\tmPlaybillPath = null;\n\t\tmResPlaybill = null;\n\t}", "public void terminateConference();", "public static void exitScheduledClear() {\n stopAutoClear();\n }", "private void unregisterConfigs() throws JMException {\n unregisterMBeans(configmap);\n }", "@Override\n public void stop() {\n }", "public void stopTracking() {\n mContext.unregisterReceiver(this);\n }", "public void stop() {\n\t\trunning = false;\n\t\tfor (ArionumHasher hasher : hashers) {\n\t\t\thasher.setForceStop(true);\n\t\t}\n\n\t\tthreadCollection.clear();\n\t\thashers.clear();\n\t}", "public static void resetConfiguration() {\n\t\t// Ignore\n\t}", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "@Override\r\n\tpublic void stop(BundleContext context) throws Exception {\r\n\t\tsuper.stop(context);\r\n\t\tplugin = null;\r\n\t\tresourceBundle = null;\r\n\t}", "public static synchronized void stop() {\n if (rateHandle != null) {\n rateHandle.cancel(true);\n }\n }", "@Override\r\n\tprotected void onStop() {\n\t\tsuper.onStop();\r\n\t\tGoogleAnalytics.getInstance(MyAccountActivity.this).reportActivityStop(\r\n\t\t\t\tMyAccountActivity.this);\r\n\t}", "@Override\n public void stop() {\n rabbitMQConnectionFactoryManager.stop();\n super.stop();\n }", "public void stopping() {\n super.stopping();\n }", "@Override\n\t\tpublic void stop() {\n\t\t\t// Nothing to do for now\n\t\t}", "protected void stopAllEndpoints() {\n mConnectionsClient.stopAllEndpoints();\n mIsAdvertising = false;\n mIsDiscovering = false;\n mIsConnecting = false;\n mDiscoveredEndpoints.clear();\n mPendingConnections.clear();\n mEstablishedConnections.clear();\n }", "public void stop() throws LifecycleException {\n disable();\n\n try {\n defaultHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n\n // destroy the cache-helpers\n Enumeration helpers = Collections.enumeration(cacheHelpers.values());\n while(helpers.hasMoreElements()) {\n CacheHelper cacheHelper = (CacheHelper)helpers.nextElement();\n try {\n cacheHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n } \n cacheHelpers.clear();\n cacheMappings.clear();\n cacheHelpersByFilterName.clear();\n listeners.clear();\n }", "private void stopSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.stopListening();\n }\n }", "protected void stopWifiScan() {\r\n\r\n //TERMINA LA SCANSIONE BLUETOOTH\r\n\t\thideWifiScanDialog();\r\n BeaconsMonitoringService.action.set(BeaconSession.SCANNING_OFF);\r\n\r\n /*\r\n\t\tif (wifiBroadcastReceiver != null) {\r\n\r\n\t\t\tWifiScanner.stopScanner(this, wifiBroadcastReceiver);\r\n\t\t\twifiBroadcastReceiver = null;\r\n\r\n\t\t}\r\n\t\t// stop scan\r\n\t\t// oh, wait, we can't stop the scan, it's asynchronous!\r\n\t\t// we just have to ignore the result!\r\n\t\tignoreWifiResults = true;\r\n */\r\n\t}", "@Override\n public void stop()\n {\n mAdapter.deactivate(); \n logger.log(Level.INFO, \"CorpusService stopped\" );\n }" ]
[ "0.6482251", "0.6064319", "0.56256074", "0.5462462", "0.5443606", "0.5412942", "0.53987014", "0.5391267", "0.53025097", "0.52890253", "0.5280781", "0.5276029", "0.5236262", "0.5235711", "0.5230489", "0.5229387", "0.5192819", "0.5181428", "0.5143567", "0.5133319", "0.51179826", "0.5068546", "0.5066664", "0.50665057", "0.5057874", "0.5034218", "0.50338405", "0.50221264", "0.50118995", "0.5006901", "0.50057435", "0.50031424", "0.49987268", "0.49933383", "0.4978498", "0.49784085", "0.4978063", "0.49641845", "0.4961854", "0.4947349", "0.49433592", "0.494247", "0.49422592", "0.49411878", "0.49383348", "0.49346358", "0.49118084", "0.49107364", "0.4906937", "0.4905857", "0.4888331", "0.48817316", "0.48788455", "0.48735154", "0.48725682", "0.48654175", "0.48623633", "0.48601112", "0.48582298", "0.48554426", "0.48526475", "0.48517662", "0.4846039", "0.48447382", "0.4843412", "0.48433065", "0.4838301", "0.48381022", "0.4837925", "0.48291126", "0.4825546", "0.4816729", "0.48162735", "0.48103553", "0.48049682", "0.48046476", "0.4797674", "0.47926003", "0.4783347", "0.47753257", "0.47718632", "0.4768278", "0.47649628", "0.4764806", "0.47626722", "0.47597444", "0.47581074", "0.47551885", "0.4752123", "0.47421074", "0.47403592", "0.47355533", "0.47344378", "0.47290555", "0.4728274", "0.47282308", "0.4723358", "0.47218516", "0.47171283", "0.47153223" ]
0.58594924
2
Stops recording configurations of all the resources associated with the account.
public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest, AsyncHandler<StopConfigurationRecorderRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n synchronized (car) {\n LOG.info(\"Invalidating APPLY Record\");\n try {\n cas.destroyChannel(dir);\n cas.destroyChannel(val);\n cas.destroyChannel(mess);\n cas.destroyChannel(omss);\n cas.destroyChannel(clid);\n\n car.stop();\n for (CadRecord cad : cads) {\n cad.stop();\n }\n } catch (Exception e) {\n LOG.warning(\"Exception while shutting down apply record \" + e.getMessage());\n }\n }\n }", "private void stopRecording() {\n recoTransaction.stopRecording();\n }", "public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public void stop() {\r\n\t\tisRecording = false;\r\n\t}", "public void stopConferenceRecording();", "public void stop() {\n\t\tconnection.stop();\n\t\tdata.disconnectAll();\n\t\tsaveData();\n\t}", "public void stopRecording() {\n BLog.d(TAG, \"stopRecording()\");\n stopLastRunnable();\n mRecordingRunnable.stopRun();\n try {\n mRecordingThread.interrupt();\n } catch (Exception e) {}\n mRecordingThread = null;\n }", "@FXML\n\tpublic void recorderStopAudio() {\n\t\tcontroller.recorderTimerCancel();\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonPause.setDisable(true);\n\t\trecorderButtonStop.setDisable(true);\n\t\tcontroller.audioRecorderStopAudio();\n\t}", "public void stopRecord() {\n\t\tif (state == State.RECORDING) {\n\t\t\taudioRecorder.stop();\n\t\t\tstate = State.STOPPED;\n\t\t}\n\t\telse {\n\t\t\tLog.e(TAG, \"stop() called on illegal state\");\n\t\t\tstate = State.ERROR;\n\t\t}\n\t\tstate = State.INITIALIZING;\n\t}", "private void exitConfiguration() {\n checkSave();\n System.exit(0);\n }", "private void stopAllAudio() {\n MainActivity.logger(context.getString(R.string.audio_check_10));\n if (audioRecord != null) {\n if (audioRecord.getRecordingState() == AudioRecord.RECORDSTATE_RECORDING) {\n audioRecord.stop();\n }\n audioRecord.release();\n MainActivity.logger(context.getString(R.string.audio_check_11));\n }\n else {\n MainActivity.logger(context.getString(R.string.audio_check_12));\n }\n }", "private void shutdown() {\n mMediaRecorder.reset();\n mMediaRecorder.release();\n mCamera.release();\n\n // once the objects have been released they can't be reused\n mMediaRecorder = null;\n mCamera = null;\n }", "void deactivate(){\n \tthis.config.clear();\n\t\tlog.debug(bundleMarker,\"deactivating...\");\n\t}", "public void stop(BundleContext context) throws Exception {\n super.stop(context);\n ivyCpcSerializer = null;\n ivyAttachmentManager = null;\n resourceBundle = null;\n IWorkspace workspace = ResourcesPlugin.getWorkspace();\n workspace.removeSaveParticipant(ID);\n colorManager = null;\n ivyMarkerManager = null;\n ivyResolveJob = null;\n retrieveSetupManager = null;\n workspace.removeResourceChangeListener(workspaceListener);\n workspaceListener = null;\n workspace.removeResourceChangeListener(ivyFileListener);\n ivyFileListener = null;\n\n getPreferenceStore().removePropertyChangeListener(propertyListener);\n propertyListener = null;\n\n if (console != null) {\n console.destroy();\n }\n plugin = null;\n }", "private void stopRecording() {\r\n\t\tisRecording = false;\r\n\t\ttry {\r\n\t\t\ttimer.cancel();\r\n\t\t\tbuttonRecord.setText(\"Record\");\r\n\t\t\tbuttonRecord.setIcon(iconRecord);\r\n\t\t\t\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\r\n\r\n\t\t\trecorder.stop();\r\n\r\n\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\r\n\r\n\t\t\tsaveFile();\r\n\r\n\t\t} catch (IOException ex) {\r\n\t\t\tJOptionPane.showMessageDialog(SwingSoundRecorder.this, \"Error\",\r\n\t\t\t\t\t\"Error stopping sound recording!\",\r\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "private void stopRecording() {\n Log.e(TAG, \"Stop recording file: \" + curRecordingFileName);\n if (null != mRecorder) {\n mRecorder.stop();\n mRecorder.release();\n mRecorder = null;\n }\n\n }", "public void terminate() {\n config.closeConnection();\n }", "public static void stop() {\n assert sListener != null;\n ResourceManager.getInstance().addListener(sListener);\n }", "public static void disconnect() {\n if (AppSettings.bluetoothConnection != null) \n \tAppSettings.bluetoothConnection.stop();\n\t}", "public void stop() {\n enable = false;\n }", "public void stop() {\n mediaController.getTransportControls().stop();\n }", "protected void shutdown()\n throws SwiftletException {\n if (config == null)\n return;\n if (traceSpace.enabled) traceSpace.trace(getName(), \"shutdown ...\");\n rlgroups.clear();\n groups.clear();\n users.clear();\n publicRLGroup = null;\n publicGroup = null;\n authenticationOff = true;\n config = null;\n if (traceSpace.enabled) traceSpace.trace(getName(), \"shutdown: done.\");\n }", "public static void stop() {\n enableIncomingMessages(false);\n }", "public void stop() {\n if (isStop.compareAndSet(false, true)) {\n if (bootstrap.config().group() != null) {\n Future future = bootstrap.config().group().shutdownGracefully();\n ((io.netty.util.concurrent.Future) future).syncUninterruptibly();\n }\n for (BrpcChannelGroup channelGroup : healthyInstances) {\n channelGroup.close();\n }\n for (BrpcChannelGroup channelGroup : unhealthyInstances) {\n channelGroup.close();\n }\n if (timeoutTimer != null) {\n timeoutTimer.stop();\n }\n if (namingService != null) {\n namingService.unsubscribe(subscribeInfo);\n }\n if (healthCheckTimer != null) {\n healthCheckTimer.stop();\n }\n if (loadBalanceStrategy != null) {\n loadBalanceStrategy.destroy();\n }\n if (callbackThread != null) {\n callbackThread.shutdown();\n }\n if (threadPool != null) {\n threadPool.stop();\n }\n }\n }", "public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }", "@Override\n protected void onStop ()\n {\n super.onStop();\n if (receiver != null)\n {\n cleanupReceiver();\n cleanupAccount();\n }\n }", "public void stop() {\n // stop all workers and sessions.\n Iterator<Map.Entry<TauSession, Worker>> it\n = sessionToWorkerMap.entrySet().iterator();\n\n while (it.hasNext()) {\n Map.Entry<TauSession, Worker> entry = it.next();\n entry.getValue().stop();\n }\n\n synchronized (lock) {\n sessionToWorkerMap.clear();\n sessionsList.clear();\n }\n }", "public void stop(boolean save) {}", "public void stopAll() {\n List<String> startedEvents = new ArrayList<>(started.keySet());\n for (String event : startedEvents) {\n stop(event);\n }\n started.clear();\n }", "public void stop() {\n\t\tserver.saveObjectToFile(offlineMessagesFileName, _offlineMessages);\n\t\tserver.saveObjectToFile(onlineClientsFileName, _onlineClients);\n\t\tserver.saveObjectToFile(clientFriendsFileName, _clientFriends);\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t\tserver.stop();\n\t}", "public void deactivate() {\n log.info(\"Stopped\");\n }", "public void stop() {\n assert (timeEnd == null);\n timeEnd = System.currentTimeMillis();\n if (recordAt != null) {\n recordAt.record(this);\n }\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n\n stopRecording();\n }", "public void clearThawed() {\n\t\t// Avoid concurrent modification exceptions.\n\t\tfinal ArrayList<ConfigurationButton> list = new ArrayList<>();\n\t\tlist.addAll(configurationToButtonMap.values());\n\t\tfinal Iterator<ConfigurationButton> it = list.iterator();\n\n\t\twhile (it.hasNext()) {\n\t\t\tfinal ConfigurationButton button = it.next();\n\t\t\tif (button.state != ConfigurationButton.FREEZE) {\n\t\t\t\tremove(button.getConfiguration());\n\t\t\t}\n\t\t}\n\t}", "public void disableCtxRecording();", "public void shutdown() {\n if (configurations.isRegisterMXBeans()) {\n JmxConfigurator.get().removeMXBean(this);\n }\n configurations.shutdown();\n }", "private void stopRecording() {\n\n }", "public void stop()\r\n {\r\n debug(\"stop() all timers\");\r\n // Shutdown all the Timers\r\n shutdownWatchListTimers();\r\n\r\n debug(\"stop() all timers - complete\");\r\n }", "void stopRecording() {\n // Save the track id as the shared preference will overwrite the recording track id.\n SharedPreferences sharedPreferences = getSharedPreferences(\n Constants.SETTINGS_NAME, Context.MODE_PRIVATE);\n long currentTrackId = sharedPreferences.getLong(getString(R.string.recording_track_key), -1);\n \n ITrackRecordingService trackRecordingService = serviceConnection.getServiceIfBound();\n if (trackRecordingService != null) {\n try {\n trackRecordingService.endCurrentTrack();\n } catch (Exception e) {\n Log.e(TAG, \"Unable to stop recording.\", e);\n }\n }\n \n serviceConnection.stop();\n \n if (currentTrackId > 0) {\n Intent intent = new Intent(MyTracks.this, TrackDetail.class);\n intent.putExtra(TrackDetail.TRACK_ID, currentTrackId);\n intent.putExtra(TrackDetail.SHOW_CANCEL, false);\n startActivity(intent);\n }\n }", "public void stop() {\n if (!sequencer.tryAcquire())\n throw new IllegalStateException(\"Can't acquire lock\");\n int errcount = 0;\n final StringBuilder b = new StringBuilder();\n\n try {\n switchState(STOPPED,\"stop\");\n\n errcount += cancelSessionTasks(b);\n errcount += stopDirectoryScanners(b);\n } finally {\n sequencer.release();\n }\n\n sendQueuedNotifications();\n if (errcount > 0) {\n b.insert(0,\"stop partially failed with \"+errcount+\" error(s):\");\n throw new RuntimeException(b.toString());\n }\n }", "public void stop()\n {\n _panel.cleanup();\n _appContext.cleanup();\n }", "@Stop(priority = 99)\n void stop() {\n for (List<ListenerInvocation> list : listenersMap.values()) {\n if (list != null) list.clear();\n }\n\n if (syncProcessor != null) syncProcessor.shutdownNow();\n }", "void stopAll();", "void unsetServiceConfigurationList();", "void stop() {\n try {\n dm.stop(getBundleContext());\n } catch (DirectoryMonitoringException e) {\n LOG.error(\"Failed to stop \" + DirectoryMonitor.class.getName() + \" for the directory \" + monitoredDirectory, e);\n }\n declarationsFiles.clear();\n declarationRegistrationManager.unregisterAll();\n }", "void stop( String profileId );", "public void onStop() {\n connectivityMonitor.unregister();\n requestTracker.pauseRequests();\n }", "private void clearRecord() {\n // Clearing current booking information from sharedPreference\n SharedPreferences.Editor editor = sharedpreferences.edit();\n editor.clear();\n editor.commit();\n shutdown();\n }", "@Override\n protected void onStop() {\n super.onStop();\n RobotLog.vv(TAG, \"onStop()\");\n\n // We *do* shutdown the robot even when we go into configuration editing\n controllerService.shutdownRobot();\n }", "public final void stopEventGeneration() throws LDAPException {\n if (Debug.LDAP_DEBUG) {\n Debug.trace(Debug.EventsCalls, \"Closing EventGeneration\");\n }\n\n isrunning = false;\n ldapconnection.abandon(searchqueue);\n }", "public void StopRecording()\n {\n handler.stopRecording();\n\n }", "@Deactivate\n protected void stop() throws Exception {\n EventSimulatorMap.getInstance().stopAllActiveSimulations();\n log.info(\"Simulator service file component is deactivated\");\n }", "public void stopRecording() {\n cameraPreview.stopRecording();\n mediaRecorder.stop(); // stop the recording\n releaseMediaRecorder(); // release the MediaRecorder object\n camera.lock(); // take camera access back from MediaRecorder\n isRecording = false;\n }", "@Deactivate\n public void deactivate() {\n loggerThread.interrupt();\n }", "public void stopRecord() {\n\t\tcmd = new StopRecordCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public void stop() {\n\t\tthis.controller.terminate();\n\t}", "File stopRecording();", "public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }", "void stopReportingTask();", "public void stopSurvey(){\n\t\tisSurveying = false;\n\t\t// NOTE: the other flags will be set automatically when isSurveying is set to false\n\t}", "public void stopAndReleaseAudioRecord() {\n if ((mAudioRecord != null) && (mAudioRecord.getState() != AudioRecord.STATE_UNINITIALIZED)) {\n try {\n mAudioRecord.stop();\n mAudioRecord.release();\n } catch (Exception e) {\n Log.e(TAG, \"stopAndReleaseAudioRecord() Exception: \" + e.getMessage());\n }\n }\n mAudioRecord = null;\n }", "public void stop() {\n m_enabled = false;\n }", "public void stopAcceptingLifecycleEvents() {\n adapter.stop();\n LOGGER.info(\"stopped ETL protocol adapter \" + adapter.getClass() + \"'\");\n }", "public void stop() {\n \t\tfor (Expirator e : expirators) {\n \t\t\te.stop();\n \t\t}\n \t}", "private void stopRecordRegistration(SoundRecordingUtil recorder, File wavFile) {\r\n\t\ttry {\r\n\t\t\trecorder.stop();\r\n\t\t\trecorder.save(wavFile);\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void destroy() {\r\n final String METHOD_NAME = \"destroy\";\r\n LOGGER.info(\"Entering \" + METHOD_NAME);\r\n\r\n this.filterConfig = null;\r\n\r\n LOGGER.info(\"Exiting \" + METHOD_NAME);\r\n }", "@Override\r\n public void stopAll() {\r\n Log.d(TAG, \"Number of services: \"+ taskRequesterMap.size());\r\n Iterator<Map.Entry<String, TaskRequester>> iterator = taskRequesterMap.entrySet().iterator();\r\n while (iterator.hasNext()) {\r\n Map.Entry<String, TaskRequester> item = iterator.next();\r\n\r\n String name = item.getValue().getName();\r\n String className = item.getValue().getServiceClass().getName();\r\n\r\n// remove(className);\r\n item.getValue().unBind();\r\n Log.d(TAG, \"- \"+name+\" \"+className);\r\n// taskRequesterMap.remove(className);\r\n iterator.remove();\r\n serviceClasses.remove(new TaskModel(name, className, 1));\r\n// taskRequesterMap.remove(new TaskModel(name, className, 1));\r\n }\r\n }", "private void stopRecord() {\n /*\n r6 = this;\n r5 = 0;\n r1 = r6.isRecording;\n if (r1 != 0) goto L_0x0006;\n L_0x0005:\n return;\n L_0x0006:\n r1 = com.baidu.navisdk.BNaviModuleManager.getContext();\n com.baidu.navisdk.util.listener.MediaFocuseChangeListener.releaseAudioFocus(r1);\n com.baidu.navisdk.comapi.tts.TTSPlayerControl.resumeVoiceTTSOutput();\n r1 = 0;\n r6.isRecording = r1;\n r1 = r6.recordProcessIView;\n if (r1 == 0) goto L_0x001c;\n L_0x0017:\n r1 = r6.recordProcessIView;\n r1.clearAnimation();\n L_0x001c:\n r1 = r6.mTimer;\t Catch:{ Exception -> 0x004d }\n if (r1 == 0) goto L_0x0025;\n L_0x0020:\n r1 = r6.mTimer;\t Catch:{ Exception -> 0x004d }\n r1.cancel();\t Catch:{ Exception -> 0x004d }\n L_0x0025:\n r1 = r6.mRecorder;\t Catch:{ Exception -> 0x004d }\n if (r1 == 0) goto L_0x0036;\n L_0x0029:\n r1 = r6.mRecorder;\t Catch:{ Exception -> 0x005c }\n r1.stop();\t Catch:{ Exception -> 0x005c }\n L_0x002e:\n r1 = r6.mRecorder;\t Catch:{ Exception -> 0x004d }\n r1.release();\t Catch:{ Exception -> 0x004d }\n r1 = 0;\n r6.mRecorder = r1;\t Catch:{ Exception -> 0x004d }\n L_0x0036:\n r6.mRecorder = r5;\n r6.mTimer = r5;\n L_0x003a:\n r1 = r6.mOnUgcSoundsRecordCallback;\n if (r1 == 0) goto L_0x004a;\n L_0x003e:\n r1 = r6.mOnUgcSoundsRecordCallback;\n r2 = r6.timeCountTime;\n r2 = 20 - r2;\n r3 = r6.filePath;\n r4 = 1;\n r1.onRecordFinish(r2, r3, r4);\n L_0x004a:\n mUgcSoundsRecordDialog = r5;\n goto L_0x0005;\n L_0x004d:\n r0 = move-exception;\n r0.printStackTrace();\t Catch:{ all -> 0x0056 }\n r6.mRecorder = r5;\n r6.mTimer = r5;\n goto L_0x003a;\n L_0x0056:\n r1 = move-exception;\n r6.mRecorder = r5;\n r6.mTimer = r5;\n throw r1;\n L_0x005c:\n r1 = move-exception;\n goto L_0x002e;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.baidu.navisdk.module.ugc.dialog.UgcSoundsRecordDialog.stopRecord():void\");\n }", "@Override\n public void onDestroy(boolean isChangingConfiguration) {\n\n }", "@Override\n public void stop()\n {\n final String funcName = \"stop\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (playing)\n {\n analogOut.setAnalogOutputMode((byte) 0);\n analogOut.setAnalogOutputFrequency(0);\n analogOut.setAnalogOutputVoltage(0);\n playing = false;\n expiredTime = 0.0;\n setTaskEnabled(false);\n }\n }", "@Override\n public void stop() {\n\n leftDrive.setPower(0);\n rightDrive.setPower(0);\n armMotor.setPower(0);\n // extendingArm.setPower(0);\n\n telemetry.addData(\"Status\", \"Terminated Interative TeleOp Mode\");\n telemetry.update();\n\n\n }", "void stop()\n {\n this.service_skeleton.stop(0);\n this.registration_skeleton.stop(0);\n }", "public void stopExperiment() {\n control.stopExperiment();\n }", "@Override\n public void onDestroy() {\n super.onDestroy();\n if (!isChangingConfigurations()) {\n pickiT.deleteTemporaryFile(this);\n }\n }", "public synchronized void stop()\n {\n try\n {\n logger.info(\"Deactivation of full query log requested.\");\n if (binLog != null)\n {\n logger.info(\"Stopping full query log\");\n binLog.stop();\n binLog = null;\n }\n }\n catch (Exception e)\n {\n throw new RuntimeException(e);\n }\n }", "public void stop() {\n executor.shutdownNow();\n\n Collection<NodeRegistrationContext> allRegistrations = nodeRegistrations.values();\n for (NodeRegistrationContext registration : allRegistrations) {\n sendUnregistrationEvent(registration.resolvedDeployment);\n }\n }", "public void deactivate() {\n serviceTracker.close();\n listenerSR.unregister();\n }", "@Override\r\n public void onDisable()\r\n {\n for (Arena arena : arenaController.getArenas().values())\r\n {\r\n arena.getGameManager().clearArena();\r\n }\r\n\r\n //Close database connection\r\n InputOutput.freeConnection();\r\n }", "@Override\n public void onStop() {\n if(toggleButton.isChecked()) {\n toggleButton.setChecked(false);\n mediaRecorder.stop();\n mediaRecorder.reset();\n Log.v(TAG, \"Recording Stopped\");\n }\n\n mediaProjection = null;\n stopScreenSharing();\n }", "private void stopCallBack() {\r\n\t\tfor (RecordingEventHandler oberserver : recordingEventHandlers) {\r\n\t\t\toberserver.stopCallBack();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void stop() {\n\t\tstopTask();\n\t\tmPlaybillPath = null;\n\t\tmResPlaybill = null;\n\t}", "public void terminateConference();", "public static void exitScheduledClear() {\n stopAutoClear();\n }", "private void unregisterConfigs() throws JMException {\n unregisterMBeans(configmap);\n }", "@Override\n public void stop() {\n }", "public void stopTracking() {\n mContext.unregisterReceiver(this);\n }", "public void stop() {\n\t\trunning = false;\n\t\tfor (ArionumHasher hasher : hashers) {\n\t\t\thasher.setForceStop(true);\n\t\t}\n\n\t\tthreadCollection.clear();\n\t\thashers.clear();\n\t}", "public static void resetConfiguration() {\n\t\t// Ignore\n\t}", "public synchronized void stop()\r\n/* 78: */ {\r\n/* 79:203 */ if (!this.monitorActive) {\r\n/* 80:204 */ return;\r\n/* 81: */ }\r\n/* 82:206 */ this.monitorActive = false;\r\n/* 83:207 */ resetAccounting(milliSecondFromNano());\r\n/* 84:208 */ if (this.trafficShapingHandler != null) {\r\n/* 85:209 */ this.trafficShapingHandler.doAccounting(this);\r\n/* 86: */ }\r\n/* 87:211 */ if (this.scheduledFuture != null) {\r\n/* 88:212 */ this.scheduledFuture.cancel(true);\r\n/* 89: */ }\r\n/* 90: */ }", "@Override\r\n\tpublic void stop(BundleContext context) throws Exception {\r\n\t\tsuper.stop(context);\r\n\t\tplugin = null;\r\n\t\tresourceBundle = null;\r\n\t}", "public static synchronized void stop() {\n if (rateHandle != null) {\n rateHandle.cancel(true);\n }\n }", "@Override\r\n\tprotected void onStop() {\n\t\tsuper.onStop();\r\n\t\tGoogleAnalytics.getInstance(MyAccountActivity.this).reportActivityStop(\r\n\t\t\t\tMyAccountActivity.this);\r\n\t}", "@Override\n public void stop() {\n rabbitMQConnectionFactoryManager.stop();\n super.stop();\n }", "public void stopping() {\n super.stopping();\n }", "@Override\n\t\tpublic void stop() {\n\t\t\t// Nothing to do for now\n\t\t}", "protected void stopAllEndpoints() {\n mConnectionsClient.stopAllEndpoints();\n mIsAdvertising = false;\n mIsDiscovering = false;\n mIsConnecting = false;\n mDiscoveredEndpoints.clear();\n mPendingConnections.clear();\n mEstablishedConnections.clear();\n }", "public void stop() throws LifecycleException {\n disable();\n\n try {\n defaultHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n\n // destroy the cache-helpers\n Enumeration helpers = Collections.enumeration(cacheHelpers.values());\n while(helpers.hasMoreElements()) {\n CacheHelper cacheHelper = (CacheHelper)helpers.nextElement();\n try {\n cacheHelper.destroy();\n } catch (Exception e) {\n // XXX: ignore\n }\n } \n cacheHelpers.clear();\n cacheMappings.clear();\n cacheHelpersByFilterName.clear();\n listeners.clear();\n }", "private void stopSensors() {\n for (MonitoredSensor sensor : mSensors) {\n sensor.stopListening();\n }\n }", "protected void stopWifiScan() {\r\n\r\n //TERMINA LA SCANSIONE BLUETOOTH\r\n\t\thideWifiScanDialog();\r\n BeaconsMonitoringService.action.set(BeaconSession.SCANNING_OFF);\r\n\r\n /*\r\n\t\tif (wifiBroadcastReceiver != null) {\r\n\r\n\t\t\tWifiScanner.stopScanner(this, wifiBroadcastReceiver);\r\n\t\t\twifiBroadcastReceiver = null;\r\n\r\n\t\t}\r\n\t\t// stop scan\r\n\t\t// oh, wait, we can't stop the scan, it's asynchronous!\r\n\t\t// we just have to ignore the result!\r\n\t\tignoreWifiResults = true;\r\n */\r\n\t}", "@Override\n public void stop()\n {\n mAdapter.deactivate(); \n logger.log(Level.INFO, \"CorpusService stopped\" );\n }" ]
[ "0.6482251", "0.6064319", "0.58594924", "0.56256074", "0.5462462", "0.5443606", "0.5412942", "0.53987014", "0.5391267", "0.53025097", "0.52890253", "0.5280781", "0.5276029", "0.5236262", "0.5235711", "0.5230489", "0.5229387", "0.5192819", "0.5181428", "0.5143567", "0.5133319", "0.51179826", "0.5068546", "0.5066664", "0.50665057", "0.5057874", "0.5034218", "0.50338405", "0.50221264", "0.50118995", "0.5006901", "0.50057435", "0.50031424", "0.49987268", "0.49933383", "0.4978498", "0.49784085", "0.4978063", "0.49641845", "0.4961854", "0.4947349", "0.49433592", "0.494247", "0.49422592", "0.49411878", "0.49383348", "0.49346358", "0.49118084", "0.49107364", "0.4906937", "0.4888331", "0.48817316", "0.48788455", "0.48735154", "0.48725682", "0.48654175", "0.48623633", "0.48601112", "0.48582298", "0.48554426", "0.48526475", "0.48517662", "0.4846039", "0.48447382", "0.4843412", "0.48433065", "0.4838301", "0.48381022", "0.4837925", "0.48291126", "0.4825546", "0.4816729", "0.48162735", "0.48103553", "0.48049682", "0.48046476", "0.4797674", "0.47926003", "0.4783347", "0.47753257", "0.47718632", "0.4768278", "0.47649628", "0.4764806", "0.47626722", "0.47597444", "0.47581074", "0.47551885", "0.4752123", "0.47421074", "0.47403592", "0.47355533", "0.47344378", "0.47290555", "0.4728274", "0.47282308", "0.4723358", "0.47218516", "0.47171283", "0.47153223" ]
0.4905857
50
Schedules delivery of a configuration snapshot to the Amazon S3 bucket in the specified delivery channel. After the delivery has started, AWS Config sends following notifications using an Amazon SNS topic that you have specified. Notification of starting the delivery. Notification of delivery completed, if the delivery was successfully completed. Notification of delivery failure, if the delivery failed to complete.
public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest,\n AsyncHandler<DeliverConfigSnapshotRequest, DeliverConfigSnapshotResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest,\n AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "@Scheduled(every = \"1s\")\n void schedule() {\n if (message != null) {\n final String endpointUri = \"azure-eventhubs:?connectionString=RAW(\" + connectionString.get() + \")\";\n producerTemplate.sendBody(endpointUri, message + (counter++));\n }\n }", "public AcknowledgableDelivery(Delivery delivery, Channel channel, BiConsumer<Receiver.AcknowledgmentContext, Exception> exceptionHandler) {\n super(delivery.getEnvelope(), delivery.getProperties(), delivery.getBody());\n this.channel = channel;\n this.exceptionHandler = exceptionHandler;\n }", "Update withDestination(EventChannelDestination destination);", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public void putChannel(NotificationsChannel notiChannel) throws Exception;", "void sendScheduledNotifications(JobProgress progress);", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public interface AmazonConfigAsync extends AmazonConfig {\n /**\n * <p>\n * Returns the current status of the specified delivery channel. If a\n * delivery channel is not specified, this action returns the current\n * status of all delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelStatusRequest Container for the\n * necessary parameters to execute the DescribeDeliveryChannelStatus\n * operation on AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannelStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the current status of the specified delivery channel. If a\n * delivery channel is not specified, this action returns the current\n * status of all delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelStatusRequest Container for the\n * necessary parameters to execute the DescribeDeliveryChannelStatus\n * operation on AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannelStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the name of one or more specified configuration recorders.\n * If the recorder name is not specified, this action returns the names\n * of all the configuration recorders associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecordersRequest Container for the\n * necessary parameters to execute the DescribeConfigurationRecorders\n * operation on AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorders service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the name of one or more specified configuration recorders.\n * If the recorder name is not specified, this action returns the names\n * of all the configuration recorders associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecordersRequest Container for the\n * necessary parameters to execute the DescribeConfigurationRecorders\n * operation on AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorders service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest,\n AsyncHandler<DescribeConfigurationRecordersRequest, DescribeConfigurationRecordersResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Starts recording configurations of all the resources associated with\n * the account.\n * </p>\n * <p>\n * You must have created at least one delivery channel to successfully\n * start the configuration recorder.\n * </p>\n *\n * @param startConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StartConfigurationRecorder operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * StartConfigurationRecorder service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Starts recording configurations of all the resources associated with\n * the account.\n * </p>\n * <p>\n * You must have created at least one delivery channel to successfully\n * start the configuration recorder.\n * </p>\n *\n * @param startConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StartConfigurationRecorder operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * StartConfigurationRecorder service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest,\n AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new delivery channel object to deliver the configuration\n * information to an Amazon S3 bucket, and to an Amazon SNS topic.\n * </p>\n * <p>\n * You can use this action to change the Amazon S3 bucket or an Amazon\n * SNS topic of the existing delivery channel. To change the Amazon S3\n * bucket or an Amazon SNS topic, call this action and specify the\n * changed values for the S3 bucket and the SNS topic. If you specify a\n * different value for either the S3 bucket or the SNS topic, this action\n * will keep the existing value for the parameter that is not changed.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param putDeliveryChannelRequest Container for the necessary\n * parameters to execute the PutDeliveryChannel operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * PutDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new delivery channel object to deliver the configuration\n * information to an Amazon S3 bucket, and to an Amazon SNS topic.\n * </p>\n * <p>\n * You can use this action to change the Amazon S3 bucket or an Amazon\n * SNS topic of the existing delivery channel. To change the Amazon S3\n * bucket or an Amazon SNS topic, call this action and specify the\n * changed values for the S3 bucket and the SNS topic. If you specify a\n * different value for either the S3 bucket or the SNS topic, this action\n * will keep the existing value for the parameter that is not changed.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param putDeliveryChannelRequest Container for the necessary\n * parameters to execute the PutDeliveryChannel operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * PutDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest,\n AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Deletes the specified delivery channel.\n * </p>\n * <p>\n * The delivery channel cannot be deleted if it is the only delivery\n * channel and the configuration recorder is still running. To delete the\n * delivery channel, stop the running configuration recorder using the\n * StopConfigurationRecorder action.\n * </p>\n *\n * @param deleteDeliveryChannelRequest Container for the necessary\n * parameters to execute the DeleteDeliveryChannel operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DeleteDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Deletes the specified delivery channel.\n * </p>\n * <p>\n * The delivery channel cannot be deleted if it is the only delivery\n * channel and the configuration recorder is still running. To delete the\n * delivery channel, stop the running configuration recorder using the\n * StopConfigurationRecorder action.\n * </p>\n *\n * @param deleteDeliveryChannelRequest Container for the necessary\n * parameters to execute the DeleteDeliveryChannel operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DeleteDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest,\n AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Stops recording configurations of all the resources associated with\n * the account.\n * </p>\n *\n * @param stopConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StopConfigurationRecorder operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * StopConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Stops recording configurations of all the resources associated with\n * the account.\n * </p>\n *\n * @param stopConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StopConfigurationRecorder operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * StopConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest,\n AsyncHandler<StopConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Schedules delivery of a configuration snapshot to the Amazon S3\n * bucket in the specified delivery channel. After the delivery has\n * started, AWS Config sends following notifications using an Amazon SNS\n * topic that you have specified.\n * </p>\n * \n * <ul>\n * <li>Notification of starting the delivery.</li>\n * <li>Notification of delivery completed, if the delivery was\n * successfully completed.</li>\n * <li>Notification of delivery failure, if the delivery failed to\n * complete.</li>\n * \n * </ul>\n *\n * @param deliverConfigSnapshotRequest Container for the necessary\n * parameters to execute the DeliverConfigSnapshot operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DeliverConfigSnapshot service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Schedules delivery of a configuration snapshot to the Amazon S3\n * bucket in the specified delivery channel. After the delivery has\n * started, AWS Config sends following notifications using an Amazon SNS\n * topic that you have specified.\n * </p>\n * \n * <ul>\n * <li>Notification of starting the delivery.</li>\n * <li>Notification of delivery completed, if the delivery was\n * successfully completed.</li>\n * <li>Notification of delivery failure, if the delivery failed to\n * complete.</li>\n * \n * </ul>\n *\n * @param deliverConfigSnapshotRequest Container for the necessary\n * parameters to execute the DeliverConfigSnapshot operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DeliverConfigSnapshot service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest,\n AsyncHandler<DeliverConfigSnapshotRequest, DeliverConfigSnapshotResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new configuration recorder to record the resource\n * configurations.\n * </p>\n * <p>\n * You can use this action to change the role ( <code>roleARN</code> )\n * of an existing recorder. To change the role, call the action on the\n * existing configuration recorder and specify a role.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param putConfigurationRecorderRequest Container for the necessary\n * parameters to execute the PutConfigurationRecorder operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * PutConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new configuration recorder to record the resource\n * configurations.\n * </p>\n * <p>\n * You can use this action to change the role ( <code>roleARN</code> )\n * of an existing recorder. To change the role, call the action on the\n * existing configuration recorder and specify a role.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param putConfigurationRecorderRequest Container for the necessary\n * parameters to execute the PutConfigurationRecorder operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * PutConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest,\n AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns a list of configuration items for the specified resource. The\n * list contains details about each state of the resource during the\n * specified time interval. You can specify a <code>limit</code> on the\n * number of results returned on the page. If a limit is specified, a\n * <code>nextToken</code> is returned as part of the result that you can\n * use to continue this request.\n * </p>\n * <p>\n * <b>NOTE:</b> Each call to the API is limited to span a duration of\n * seven days. It is likely that the number of records returned is\n * smaller than the specified limit. In such cases, you can make another\n * call, using the nextToken .\n * </p>\n *\n * @param getResourceConfigHistoryRequest Container for the necessary\n * parameters to execute the GetResourceConfigHistory operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * GetResourceConfigHistory service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns a list of configuration items for the specified resource. The\n * list contains details about each state of the resource during the\n * specified time interval. You can specify a <code>limit</code> on the\n * number of results returned on the page. If a limit is specified, a\n * <code>nextToken</code> is returned as part of the result that you can\n * use to continue this request.\n * </p>\n * <p>\n * <b>NOTE:</b> Each call to the API is limited to span a duration of\n * seven days. It is likely that the number of records returned is\n * smaller than the specified limit. In such cases, you can make another\n * call, using the nextToken .\n * </p>\n *\n * @param getResourceConfigHistoryRequest Container for the necessary\n * parameters to execute the GetResourceConfigHistory operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * GetResourceConfigHistory service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest,\n AsyncHandler<GetResourceConfigHistoryRequest, GetResourceConfigHistoryResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns details about the specified delivery channel. If a delivery\n * channel is not specified, this action returns the details of all\n * delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelsRequest Container for the necessary\n * parameters to execute the DescribeDeliveryChannels operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannels service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns details about the specified delivery channel. If a delivery\n * channel is not specified, this action returns the details of all\n * delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelsRequest Container for the necessary\n * parameters to execute the DescribeDeliveryChannels operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannels service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest,\n AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the current status of the specified configuration recorder.\n * If a configuration recorder is not specified, this action returns the\n * status of all configuration recorder associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecorderStatusRequest Container for the\n * necessary parameters to execute the\n * DescribeConfigurationRecorderStatus operation on AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorderStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the current status of the specified configuration recorder.\n * If a configuration recorder is not specified, this action returns the\n * status of all configuration recorder associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecorderStatusRequest Container for the\n * necessary parameters to execute the\n * DescribeConfigurationRecorderStatus operation on AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorderStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest,\n AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n}", "boolean deliver(String busType, String topic, Object event);", "@Scheduled(fixedRateString = \"PT120M\")\n\tvoid someJob(){\n//\t\tString s = \"Testing message.\\nNow time is : \"+new Date();\n////\t\tSystem.out.println(s);\n//\t\tPushNotificationOptions.sendMessageToAllUsers(s);\n//\n\t\t//get all schedules in current dayOfWeek\n\t\tCollection<Notification> notifications = notificationService.findAllByDayOfWeekAndTime();\n\t\tfor(Notification notification : notifications){\n//\t\t\tSystem.out.println(notification.toString());\n//\t\t\tSystem.out.println(!notification.getStatus());\n////\t\t\tSystem.out.println(check(notification.getStartTime()));\n//\t\t\t//check for already not sent notifications , also check for time difference < TIME_CONSTANT\n//\t\t\tif(!notification.getStatus() && check(notification.getStartTime())){\n//\t\t\t\t//send push notification\n//\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n//\t\t\t\t//mark the notification as sent\n//\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n//\t\t\t}\n\t\t\tif(checkForDayTime()){\n\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public void setDeliverLogsPermissionArn(String deliverLogsPermissionArn) {\n this.deliverLogsPermissionArn = deliverLogsPermissionArn;\n }", "@Test\n public final void testAfterSend() throws Exception {\n ChannelController.getInstance().getLocalChannelId(channelId);\n\n final TestChannel channel = new TestChannel();\n\n channel.setChannelId(channelId);\n channel.setServerId(serverId);\n channel.setEnabled(true);\n\n channel.setPreProcessor(new TestPreProcessor());\n channel.setPostProcessor(new TestPostProcessor());\n\n final TestSourceConnector sourceConnector = (TestSourceConnector) TestUtils.createDefaultSourceConnector();\n sourceConnector.setChannel(channel);\n channel.setSourceConnector(sourceConnector);\n channel.setSourceFilterTransformer(TestUtils.createDefaultFilterTransformerExecutor());\n\n final ConnectorProperties connectorProperties = new TestDispatcherProperties();\n ((TestDispatcherProperties) connectorProperties).getQueueConnectorProperties().setQueueEnabled(true);\n ((TestDispatcherProperties) connectorProperties).getQueueConnectorProperties().setSendFirst(true);\n ((TestDispatcherProperties) connectorProperties).getQueueConnectorProperties().setRegenerateTemplate(true);\n\n final DestinationConnector destinationConnector = new TestDispatcher();\n TestUtils.initDefaultDestinationConnector(destinationConnector, connectorProperties);\n destinationConnector.setChannelId(channelId);\n ((TestDispatcher) destinationConnector).setReturnStatus(Status.SENT);\n\n class BlockingTestResponseTransformer extends TestResponseTransformer {\n public volatile boolean waiting = true;\n\n @Override\n public String doTransform(Response response, ConnectorMessage connectorMessage) throws DonkeyException, InterruptedException {\n while (waiting) {\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return super.doTransform(response, connectorMessage);\n }\n }\n final BlockingTestResponseTransformer responseTransformer = new BlockingTestResponseTransformer();\n \n destinationConnector.setResponseTransformerExecutor(TestUtils.createDefaultResponseTransformerExecutor());\n destinationConnector.getResponseTransformerExecutor().setResponseTransformer(responseTransformer);\n\n DestinationChain chain = new DestinationChain();\n chain.setChannelId(channelId);\n chain.setMetaDataReplacer(sourceConnector.getMetaDataReplacer());\n chain.setMetaDataColumns(channel.getMetaDataColumns());\n chain.addDestination(1, TestUtils.createDefaultFilterTransformerExecutor(), destinationConnector);\n channel.addDestinationChain(chain);\n\n if (ChannelController.getInstance().channelExists(channelId)) {\n ChannelController.getInstance().deleteAllMessages(channelId);\n }\n \n channel.deploy();\n channel.start();\n\n class TempClass {\n public long messageId;\n }\n final TempClass tempClass = new TempClass();\n\n for (int i = 1; i <= TEST_SIZE; i++) {\n responseTransformer.waiting = true;\n\n Thread thread = new Thread() {\n @Override\n public void run() {\n ConnectorMessage sourceMessage = TestUtils.createAndStoreNewMessage(new RawMessage(testMessage), channel.getChannelId(), channel.getServerId()).getConnectorMessages().get(0);\n tempClass.messageId = sourceMessage.getMessageId();\n\n try {\n channel.process(sourceMessage, false);\n } catch (InterruptedException e) {\n throw new AssertionError(e);\n }\n }\n };\n thread.start();\n\n Thread.sleep(100);\n // Assert that the response content was stored\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n \n try {\n connection = TestUtils.getConnection();\n long localChannelId = ChannelController.getInstance().getLocalChannelId(channelId);\n statement = connection.prepareStatement(\"SELECT * FROM d_mc\" + localChannelId + \" WHERE message_id = ? AND metadata_id = ? AND content_type = ?\");\n statement.setLong(1, tempClass.messageId);\n statement.setInt(2, 1);\n statement.setInt(3, ContentType.SENT.getContentTypeCode());\n result = statement.executeQuery();\n assertTrue(result.next());\n result.close();\n statement.close();\n \n // Assert that the message status was updated to PENDING\n statement = connection.prepareStatement(\"SELECT * FROM d_mm\" + localChannelId + \" WHERE message_id = ? AND id = ? AND status = ?\");\n statement.setLong(1, tempClass.messageId);\n statement.setInt(2, 1);\n statement.setString(3, String.valueOf(Status.PENDING.getStatusCode()));\n result = statement.executeQuery();\n assertTrue(result.next());\n result.close();\n statement.close();\n \n responseTransformer.waiting = false;\n thread.join();\n \n // Assert that the response transformer was run\n assertTrue(responseTransformer.isTransformed());\n \n // Assert that the message status was updated to SENT\n statement = connection.prepareStatement(\"SELECT * FROM d_mm\" + localChannelId + \" WHERE message_id = ? AND id = ? AND status = ?\");\n statement.setLong(1, tempClass.messageId);\n statement.setInt(2, 1);\n statement.setString(3, String.valueOf(Status.SENT.getStatusCode()));\n result = statement.executeQuery();\n assertTrue(result.next());\n result.close();\n statement.close();\n } finally {\n TestUtils.close(result);\n TestUtils.close(statement);\n TestUtils.close(connection);\n }\n }\n\n channel.stop();\n channel.undeploy();\n //ChannelController.getInstance().removeChannel(channel.getChannelId());\n }", "public void setDeliveryOption(java.lang.String deliveryOption) {\r\n this.deliveryOption = deliveryOption;\r\n }", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest,\n AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "@Scheduled\n\tpublic void executeNotification();", "public void setDeliveryDate(String deliveryDate) {\r\n\t\tthis.deliveryDate = deliveryDate;\r\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n System.out.println(\"MQTT Publish Complete\");\n }", "ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);", "WithCreate withDestination(EventChannelDestination destination);", "boolean deliver(String topic, Object event);", "@Override\n public void configure() throws Exception\n {\n errorHandler(deadLetterChannel(\"jms:queue:deadLetterQueue?transferExchange=true\"));\n\n /*\n * New User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewUserLog\", \"\",\n \"newUserTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.UpdateUserLog\", \"\",\n \"userChangeTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Site Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewSiteLog\", \"\",\n \"newSiteTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Participant Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewParticipantLog\", \"\",\n \"newParticipantTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update Consent Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateConsentLog\", \"\",\n \"updateConsentTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * New Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.NewSpecimenLog\",\n \"\",\n \"newSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY));\n\n /*\n * Update Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateSpecimenLog\", \"\",\n \"updateSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY\n ));\n\n /*\n * Dynamic Extension Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.DynamicExtensionUpdateLog\", \"\",\n \"dynamicExtensionTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * Specimen Characteristic Route\n */\n this.triggerScoreboard(from(\n this.getComponentName() + \":\"\n + \"edu.bcm.dldcc.big.utility.entity.SpecimenCharacteristicsLog\"\n + \"?persistenceUnit=\" + this.getInstance().getPersistenceUnit()\n + \"&consumer.delay=\" + CaTissueRouteBuilder.SPECIMEN_DELAY + \n \"&consumeLockEntity=false\").transacted()\n .removeHeaders(\"Camel*\")\n .setHeader(\"instance\", this.constant(this.getInstance().name())));\n\n from(\"jms:queue:annotationUpdateQueue\")\n .aggregate(header(\"JMSCorrelationID\"),\n new MostRecentAggregationStrategy()).completionTimeout(\n CaTissueRouteBuilder.UPDATE_TIMEOUT)\n .to(\"jms:queue:scoreboardQueue\");\n\n from(\"jms:queue:scoreboardQueue\").removeHeaders(\"Camel*\").beanRef(\n \"scoreboard\", \"updateScoreboards\");\n\n }", "@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }", "@InSequence(1)\n @Test\n public void worksAfterDeployment() throws InterruptedException {\n int sum = sendMessages(10);\n runJob();\n Assert.assertEquals(10, collector.getLastItemCount());\n Assert.assertEquals(sum, collector.getLastSum());\n Assert.assertEquals(1, collector.getNumberOfJobs());\n }", "boolean deliver(CommInfrastructure busType, String topic, String event);", "@Test\n public void ftpConsumer_build_when_configuration_provided() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, aopProxyProvider,null, null, null, null);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(aopProxyProvider).applyPointcut(with(\"testjob\"),with(emptyScheduleConsumer));\n will(returnValue(emptyScheduleConsumer));\n\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setEager(true)\n .setIgnoreMisfire(true)\n .setTimezone(\"UTC\")\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .setMessageProvider(messageProvider)\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n assertTrue(\"eager should be 'true'\", configuration.isEager() == true);\n assertTrue(\"ignoreMisfire should be 'true'\", configuration.isIgnoreMisfire() == true);\n assertTrue(\"Timezone should be 'true'\", configuration.getTimezone() == \"UTC\");\n\n mockery.assertIsSatisfied();\n }", "@Test\n public void ftpConsumer_build_when_configuration_sftp_conf_provided_and_default_sftpMessageProvider_notsupplied() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, null, jtaTransactionManager, baseFileTransferDao, fileChunkDao, transactionalResourceCommandDAO);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setSourceDirectory(\"test/dir\")\n .setRemoteHost(\"testsftphost\")\n .setRemotePort(22)\n .setUsername(\"testUser\")\n .setPassword(\"testPassword\")\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n assertEquals(\"sourceDirectory should be 'test/dir'\",\"test/dir\", configuration.getSourceDirectory());\n assertEquals(\"remoteHost should be 'testsftphost'\",\"testsftphost\", configuration.getRemoteHost());\n assertEquals(\"remotePort should be '22'\",22, configuration.getRemotePort().intValue());\n assertEquals(\"username should be 'testUser'\",\"testUser\", configuration.getUsername());\n assertEquals(\"password should be 'testPassword'\",\"testPassword\", configuration.getPassword());\n\n\n mockery.assertIsSatisfied();\n }", "public void run() {\n id = Thread.currentThread().getId();\n synchronized (this) {\n this.deliveryPending = true;\n }\n try {\n deliver();\n } catch (Exception ex) {\n Log.warning(Log.FAC_NETMANAGER, \"failed delivery: {0}\", ex);\n } finally {\n synchronized (this) {\n this.deliveryPending = false;\n }\n }\n }", "boolean deliver(CommInfrastructure busType, String topic, Object event);", "public void setExpectedDateOfDelivery(java.util.Date expectedDateOfDelivery) {\r\n this.expectedDateOfDelivery = expectedDateOfDelivery;\r\n }", "@Scheduled(cron = \"0 * * * * *\")\r\n\tpublic void run() {\r\n\r\n\t\tString[] emailArray = new String[emailRecipientList.size()];\r\n\t\temailArray = emailRecipientList.toArray(emailArray);\r\n\t\tLOGGER.debug(\"Sending a email to \" + emailArray);\r\n //Current time\r\n\t\tLocalDateTime now = LocalDateTime.now();\r\n\t\t//Current time - 1 hour\r\n\t\tLocalDateTime after = LocalDateTime.now().minusHours(1);\r\n\r\n\t\tTimestamp dateCreatedBefore = Timestamp.valueOf(now);\r\n\t\tTimestamp dateCreatedAfter = Timestamp.valueOf(after);\r\n\t\t// Search for file id's added for the last hour \r\n\t\tList<Long> ids = infoDataService.searchFileId(null, null, \r\n\t\t\t\tdateCreatedBefore, dateCreatedAfter, null, null,null);\r\n\t\t// Create a email body \r\n\t\tStringBuffer emailBody =new StringBuffer();\r\n\t\temailBody.append(\"New Files Uploaded:\");\r\n for(Long id : ids) {\r\n \ttry {\r\n \t FileInfo metaData = infoDataService.findRecordById(id);\r\n \t emailBody.append(System.lineSeparator());\r\n \t emailBody.append(\"*******************************************************\");\r\n \t emailBody.append(System.lineSeparator());\r\n \t emailBody.append(\"ID:\"+metaData.getId());\r\n \t emailBody.append(\", ORIGINAL NAME: \"+metaData.getFileName());\r\n \t Long size = metaData.getSize()/1000;\r\n \t emailBody.append(\", SIZE (KB):\"+size);\r\n \t emailBody.append((metaData.getPublicAccess())?\", PUBLIC ACCESS: true\":\" , PUBLIC ACCESS: false\");\r\n \t emailBody.append(\", TIME UPLOADED:\"+metaData.getUploadedTs().toLocalDateTime());\r\n \t emailBody.append(System.lineSeparator());\r\n \t}\r\n \tcatch(Exception e) {\r\n \t\temailBody.append(Utilities.NO_DATA_FOR_ID+id); \t\t\r\n \t}\r\n }\r\n // Sending a scheduled email \r\n SimpleMailMessage msg = new SimpleMailMessage();\r\n\t\tmsg.setTo(emailArray);\r\n\t\tmsg.setSubject(Utilities.SCHEDULER_SUBJECT);\r\n\t\tmsg.setText(emailBody.toString());\r\n\t\tmsg.setFrom(emailSender);\r\n\r\n\t\t// TODO\r\n\t\t// Uncomment the next line after adding a correct credentials to the\r\n\t\t// application.properies file\r\n\t\t// javaMailSender.send(msg);\r\n\r\n\t}", "@Test\n public final void testStart() throws Exception {\n TestUtils.initChannel(channelId);\n\n TestChannel channel = new TestChannel();\n\n channel.setChannelId(channelId);\n channel.setServerId(serverId);\n channel.setEnabled(true);\n\n channel.setPreProcessor(new TestPreProcessor());\n channel.setPostProcessor(new TestPostProcessor());\n\n TestSourceConnector sourceConnector = (TestSourceConnector) TestUtils.createDefaultSourceConnector();\n sourceConnector.setChannel(channel);\n channel.setSourceConnector(sourceConnector);\n channel.setSourceFilterTransformer(TestUtils.createDefaultFilterTransformerExecutor());\n\n TestDispatcher destinationConnector = new TestDispatcher();\n TestDispatcherProperties connectorProperties = new TestDispatcherProperties();\n connectorProperties.getQueueConnectorProperties().setQueueEnabled(true);\n TestUtils.initDefaultDestinationConnector(destinationConnector, connectorProperties);\n destinationConnector.setChannelId(channelId);\n\n DestinationChain chain = new DestinationChain();\n chain.setChannelId(channelId);\n chain.setMetaDataReplacer(sourceConnector.getMetaDataReplacer());\n chain.setMetaDataColumns(channel.getMetaDataColumns());\n chain.addDestination(1, TestUtils.createDefaultFilterTransformerExecutor(), destinationConnector);\n channel.addDestinationChain(chain);\n\n // Assert that the destination connector has not been deployed\n assertFalse(destinationConnector.isDeployed());\n // Assert that the destination connector is not running\n assertFalse(destinationConnector.getCurrentState() != ChannelState.STOPPED);\n // Assert that the destination connector queue thread is not running\n assertFalse(destinationConnector.isQueueThreadRunning());\n\n destinationConnector.onDeploy();\n\n // Assert that the destination connector has been deployed\n assertTrue(destinationConnector.isDeployed());\n\n destinationConnector.start();\n Thread.sleep(1000);\n\n // Assert that the destination connector is running\n assertTrue(destinationConnector.getCurrentState() != ChannelState.STOPPED);\n // Assert that the destination connector queue thread is running\n assertTrue(destinationConnector.isQueueThreadRunning());\n\n destinationConnector.stop();\n destinationConnector.onUndeploy();\n ChannelController.getInstance().removeChannel(channel.getChannelId());\n }", "EventChannelDestination destination();", "public PayWithAmazonEvent withSalesChannel(String salesChannel) {\r\n this.salesChannel = salesChannel;\r\n return this;\r\n }", "Delivery createDelivery();", "public void run() {\n synchronized (this) {\n if (deliveryPending) return;\n }\n super.run();\n }", "public void sendDataToCrQueue() {\n List<Shares> sharesList = new ArrayList<>();\n amqpTemplate.convertAndSend(\"queueTestKey\", sharesList);\n }", "private void deliver() {\n synchronized (group) {\n while (group.isDeliveryCalled()) {\n group.setPizza(new Pizza()); // Create a new pizza for the group.\n group.setDeliveryCalled(false); // Resetting the condition variable.\n group.notifyAll(); // Awake all sleeping student threads.\n System.out.println(\"Kamal delivered new Pizza and woke up all\");\n\n try {\n System.out.println(\"Kamal went to sleep\");\n group.wait(); // Delivery thread goes to sleep after delivering the pizza.\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Test(enabled = false)\n public void loggingConfiguration() throws Exception {\n testInfo(this.getClass().getSimpleName() + \" - loggingConfiguration\");\n\n try {\n print(account + \": Fetching bucket logging configuration for \" + bucketName);\n BucketLoggingConfiguration loggingConfig = s3.getBucketLoggingConfiguration(bucketName);\n assertTrue(\"Invalid result for bucket logging configuration\", loggingConfig != null);\n assertTrue(\"Expected bucket logging to be disabled, but got enabled\", !loggingConfig.isLoggingEnabled());\n\n boolean error = false;\n try {\n print(account + \": Setting bucket logging configuration before assigning log-delivery group WRITE and READ_ACP permissions for \" + bucketName);\n s3.setBucketLoggingConfiguration(new SetBucketLoggingConfigurationRequest(bucketName, new BucketLoggingConfiguration(bucketName, bucketName)));\n } catch (AmazonS3Exception ex) {\n assertTrue(\"Expected error code to be 400, but got \" + ex.getStatusCode(), ex.getStatusCode() == 400);\n error = true;\n } finally {\n assertTrue(\n \"Expected AmazonS3Exception for enabling bucket logging configuration before assigning log-delivery group appropriate permissions\", error);\n }\n\n print(account + \": Setting canned ACL log-delivery-write for \" + bucketName);\n s3.setBucketAcl(bucketName, CannedAccessControlList.LogDeliveryWrite);\n\n print(account + \": Getting ACL for bucket \" + bucketName);\n AccessControlList acl = s3.getBucketAcl(bucketName);\n assertTrue(\"Mismatch in number of ACLs associated with the bucket. Expected 3 but got \" + acl.getGrants().size(), acl.getGrants().size() == 3);\n\n Iterator<Grant> iterator = acl.getGrants().iterator();\n while (iterator.hasNext()) {\n Grant grant = iterator.next();\n if (grant.getGrantee() instanceof CanonicalGrantee) {\n assertTrue(\"Expected grantee to be bucket owner \" + acl.getOwner().getId() + \", but found \" + grant.getGrantee().getIdentifier(), grant\n .getGrantee().getIdentifier().equals(acl.getOwner().getId()));\n assertTrue(\"Grantee should have full control\", grant.getPermission().equals(Permission.FullControl));\n } else {\n assertTrue(\"Grantee of type GroupGrantee not found\", grant.getGrantee() instanceof GroupGrantee);\n assertTrue(\"Expected grantee to be LogDelivery but found \" + ((GroupGrantee) grant.getGrantee()),\n ((GroupGrantee) grant.getGrantee()).equals(GroupGrantee.LogDelivery));\n assertTrue(\"Grantee does not have \" + Permission.Write.toString() + \" and/or \" + grant.getPermission().equals(Permission.ReadAcp)\n + \" privileges\", grant.getPermission().equals(Permission.Write) || grant.getPermission().equals(Permission.ReadAcp));\n }\n }\n\n print(account + \": Setting bucket logging configuration after assigning log-delivery group WRITE and READ_ACP permissions for \" + bucketName);\n s3.setBucketLoggingConfiguration(new SetBucketLoggingConfigurationRequest(bucketName, new BucketLoggingConfiguration(bucketName, bucketName)));\n\n print(account + \": Fetching bucket logging configuration for \" + bucketName);\n loggingConfig = s3.getBucketLoggingConfiguration(bucketName);\n assertTrue(\"Invalid result for bucket logging configuration\", loggingConfig != null);\n assertTrue(\"Expected bucket logging to be enabled, but got disabled\", loggingConfig.isLoggingEnabled());\n assertTrue(\"Expected destination bucket to be \" + bucketName + \", but got \" + loggingConfig.getDestinationBucketName(), loggingConfig\n .getDestinationBucketName().equals(bucketName));\n assertTrue(\"Expected log file prefix to be \" + bucketName + \", but got \" + loggingConfig.getLogFilePrefix(), loggingConfig.getLogFilePrefix()\n .equals(bucketName));\n\n } catch (AmazonServiceException ase) {\n printException(ase);\n assertThat(false, \"Failed to run loggingConfiguration\");\n }\n }", "private Consumer<Queue> getConsumerPostStart(SolaceConsumerDestination destination,\n\t\t\t\t\t\t\t\t\t\t\t\t ExtendedConsumerProperties<SolaceConsumerProperties> properties) {\n\t\treturn (queue) -> {\n\t\t\tprovisioningProvider.addSubscriptionToQueue(queue, destination.getBindingDestinationName(), properties.getExtension(), true);\n\n\t\t\t//Process additional subscriptions\n\t\t\tfor (String subscription : destination.getAdditionalSubscriptions()) {\n\t\t\t\tprovisioningProvider.addSubscriptionToQueue(queue, subscription, properties.getExtension(), false);\n\t\t\t}\n\t\t};\n\t}", "@Override\n public void execute() {\n eslClient.getEventNotificationService().register(newEventNotificationConfig(URL)\n .forEvent(EVENT1)\n .forEvent(EVENT2)\n .forEvent(EVENT3));\n\n // Get the registered event notifications\n eventNotificationConfig = eslClient.getEventNotificationService().getEventNotificationConfig();\n }", "void iotvPlay(Channel channel, Schedule schedule);", "public void setDeliverLogsStatus(String deliverLogsStatus) {\n this.deliverLogsStatus = deliverLogsStatus;\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n }", "void configureTasks(ScheduledTaskRegistrar taskRegistrar);", "@Test\n public void ftpConsumer_build_when_configuration_ftp_conf_provided() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, null, null, null, null, null);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setSourceDirectory(\"test/dir\")\n .setFilenamePattern(\"*.txt\")\n .setFilterDuplicates(true)\n .setFilterOnFilename(true)\n .setFilterOnLastModifiedDate(true)\n .setRenameOnSuccess(true)\n .setRenameOnSuccess(true)\n .setMoveOnSuccess(true)\n .setRenameOnSuccessExtension(\".done\")\n .setMoveOnSuccessNewPath(\"done\")\n .setChronological(true)\n .setChunking(true)\n .setChunkSize(200)\n .setChecksum(true)\n .setMinAge(120l)\n .setDestructive(true)\n .setMaxRows(20)\n .setAgeOfFiles(30)\n .setClientID(\"testClientId\")\n .setCleanupJournalOnComplete(true)\n .setRemoteHost(\"testsftphost\")\n .setMaxRetryAttempts(3)\n .setRemotePort(22)\n .setUsername(\"testUser\")\n .setPassword(\"testPassword\")\n .setConnectionTimeout(300)\n .setIsRecursive(true)\n .setFtpsKeyStoreFilePassword(\"ftpsKetStoreFilePass\")\n .setFtpsKeyStoreFilePath(\"ftpsKetStoreFilePath\")\n .setFtpsIsImplicit(true)\n .setFtpsProtocol(\"protocol\")\n .setFtpsPort(24)\n .setFTPS(true)\n .setPasswordFilePath(\"testPasswordFilePath\")\n .setSystemKey(\"testKey\")\n .setSocketTimeout(6000)\n .setDataTimeout(60001)\n .setActive(true)\n .setMessageProvider(messageProvider)\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n assertEquals(\"sourceDirectory should be 'test/dir'\",\"test/dir\", configuration.getSourceDirectory());\n assertEquals(\"filenamePattern should be '*.txt'\",\"*.txt\", configuration.getFilenamePattern());\n assertTrue(\"filterDuplicates should be 'true'\", configuration.getFilterDuplicates());\n assertTrue(\"filterOnFilename should be 'true'\", configuration.getFilterOnFilename());\n assertTrue(\"filterOnFilename should be 'true'\", configuration.getFilterOnFilename());\n assertTrue(\"filterOnLastModifiedDate should be 'true'\", configuration.getFilterOnLastModifiedDate());\n assertTrue(\"renameOnSuccess should be 'true'\", configuration.getRenameOnSuccess());\n assertTrue(\"moveOnSuccess should be 'true'\", configuration.getMoveOnSuccess());\n assertEquals(\"renameOnSuccessExtension should be '.done'\",\".done\", configuration.getRenameOnSuccessExtension());\n assertEquals(\"moveOnSuccessNewPath should be 'done'\",\"done\", configuration.getMoveOnSuccessNewPath());\n assertTrue(\"chronological should be 'true'\", configuration.getChronological());\n assertEquals(\"chunkSize should be '200'\",200, configuration.getChunkSize().intValue());\n assertTrue(\"checksum should be 'true'\", configuration.getChecksum());\n assertEquals(\"minAge should be '120'\",120L, configuration.getMinAge().longValue());\n assertTrue(\"destructive should be 'true'\", configuration.getDestructive());\n assertEquals(\"maxRows should be '20'\",20, configuration.getMaxRows().intValue());\n assertEquals(\"ageOfFiles should be '30'\",30, configuration.getAgeOfFiles().intValue());\n assertEquals(\"clientID should be 'testClientId'\",\"testClientId\", configuration.getClientID());\n assertTrue(\"cleanupJournalOnComplete should be 'true'\", configuration.getCleanupJournalOnComplete());\n assertEquals(\"remoteHost should be 'testsftphost'\",\"testsftphost\", configuration.getRemoteHost());\n assertEquals(\"maxRetryAttempts should be '3'\",3, configuration.getMaxRetryAttempts().intValue());\n assertEquals(\"remotePort should be '22'\",22, configuration.getRemotePort().intValue());\n assertEquals(\"username should be 'testUser'\",\"testUser\", configuration.getUsername());\n assertEquals(\"password should be 'testPassword'\",\"testPassword\", configuration.getPassword());\n assertEquals(\"connectionTimeout should be '300'\",300, configuration.getConnectionTimeout().intValue());\n assertTrue(\"isRecursive should be 'true'\", configuration.getIsRecursive());\n assertEquals(\"ftpsKeyStoreFilePassword should be 'ftpsKetStoreFilePass'\",\"ftpsKetStoreFilePass\", configuration.getFtpsKeyStoreFilePassword());\n assertEquals(\"ftpsKeyStoreFilePath should be 'ftpsKetStoreFilePath'\",\"ftpsKetStoreFilePath\", configuration.getFtpsKeyStoreFilePath());\n assertTrue(\"ftpsIsImplicit should be 'true'\", configuration.getFtpsIsImplicit());\n assertEquals(\"ftpsProtocol should be 'protocol'\",\"protocol\", configuration.getFtpsProtocol());\n assertEquals(\"ftpsPort should be 'protocol'\",24, configuration.getFtpsPort().intValue());\n assertTrue(\"FTPS should be 'true'\", configuration.getFTPS());\n assertEquals(\"passwordFilePath should be 'testPasswordFilePath'\", \"testPasswordFilePath\",configuration.getPasswordFilePath());\n assertEquals(\"systemKey should be 'testKey'\", \"testKey\",configuration.getSystemKey());\n assertEquals(\"socketTimeout should be '6000'\",6000, configuration.getSocketTimeout().intValue());\n assertEquals(\"dataTimeout should be '60001'\",60001, configuration.getDataTimeout().intValue());\n assertTrue(\"active should be 'true'\", configuration.getActive());\n\n mockery.assertIsSatisfied();\n }", "@Override\r\n\t\t\t\t\tpublic void deliveryComplete(IMqttDeliveryToken arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void sendNotification(GAIANotification notification) {\n final String message = notification.getRule()+\",\"+notification.getDescription();\n rabbitTemplate.send(rabbitQueueSend, rabbitQueueSend, new Message(message.getBytes(), new MessageProperties()));\n }", "private boolean _autoShowPush() throws SessionException {\n \n long sleeptime = 1000; //1 second\n String ftString = FileType.toFullFiletype(\n (String) this._argTable.get(CMD.SERVERGROUP),\n (String) this._argTable.get(CMD.FILETYPE)); \n \n //---------------------------\n \n //we don't use this client any more, so get rid of it\n if (this._client != null && this._client.isLoggedOn())\n this._client.logout();\n \n //---------------------------\n \n boolean loggerInitError = !_initSessionLogging(\"Notification\", \n \"Notification Report\");\n if (loggerInitError) \n return false;\n \n //---------------------------\n \n //set output dir\n String outputDir = (String) this._argTable.get(CMD.OUTPUT);\n if (outputDir == null)\n outputDir = System.getProperty(\"user.dir\");\n //this._client.changeDir(outputDir); //no longer using client\n\n\n //get the invoke command string\n String invoke = (String) this._argTable.get(CMD.INVOKE);\n if (invoke != null) {\n invoke.trim();\n if (invoke.length() == 0)\n invoke = null;\n }\n\n //set exit on error flag\n boolean exitOnError = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEEXITONERROR) != null)\n exitOnError = true; \n \n //set invoke async flag\n boolean invokeAsync = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEASYNC) != null)\n invokeAsync = true;\n \n //---------------------------\n \n //check format option, and build new formatter\n String format = (String) this._argTable.get(CMD.FORMAT);\n this._dateFormatter = new DateTimeFormatter(format); \n \n //---------------------------\n \n String msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + \"Subscribing to [\" + ftString + \"] file type.\\n\";\n\n if (this._mailmessage)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n //---------------------------\n \n boolean success = true;\n boolean timeToExit = false;\n\n //construct a notification client that will generate new file events\n //final List newFileResults = new Vector();\n final PushFileEventQueue<Result> newResultQueue = \n new PushFileEventQueue<Result>();\n final Map clientOptions = (Map) this._argTable.clone(); \n if (!clientOptions.containsKey(CMD.OUTPUT))\n clientOptions.put(CMD.OUTPUT, \".\"); \n \n try {\n _subscriptionClient = new PushSubscriptionClient(\n this._domainFile, clientOptions, \n Constants.AUTOSHOWFILES, true);\n } catch (SessionException sesEx) {\n msg = \"Unable to construct subscription client. Aborting...\";\n this._logger.error(msg);\n this._logger.debug(null, sesEx);\n throw sesEx;\n }\n \n //---------------------------\n \n //construct subscription event listener that adds new files to local\n //file collection\n SubscriptionEventListener subListener = new SubscriptionEventListener() { \n public void eventOccurred(SubscriptionEvent event)\n {\n _logger.trace(\"Received new notification event\"); \n Object obj = event.getObject();\n \n if (obj instanceof Result)\n {\n //get the filename and add it to our queue!\n Result result = (Result) obj;\n \n //test if this file should be retrieve or not\n String filename = result.getName(); \n synchronized(newResultQueue)\n {\n newResultQueue.addItem(result);\n// if (!newFileResults.contains(result))\n// newFileResults.add(result); \n }\n }\n } \n };\n \n //add anon. listener to client\n _subscriptionClient.addSubscriptionEventListener(subListener);\n \n //---------------------------\n \n //launch subscription client on own thread\n Thread subThread = new Thread(_subscriptionClient);\n subThread.setName(\"Notification_Thread_\"+ftString);\n subThread.start();\n \n //---------------------------\n \n //enter loop\n while (_subscriptionClient.isAlive()) {\n long issueTime = System.currentTimeMillis();\n \n Result[] resultArray;\n \n //---------------------------\n \n //lock newFiles collection, create array of Results from\n //contents. \n synchronized(newResultQueue)\n {\n newResultQueue.advanceQueue();\n List<Result> resultList = newResultQueue.getItemsInProcess();\n resultArray = resultList.toArray(new Result[0]);\n// int size = newFileResults.size();\n// resultArray = new Result[0];\n// resultArray = (Result[]) newFileResults.toArray(resultArray);\n } //end synch\n \n \n for (int i = 0; i < resultArray.length; ++i)\n {\n Result result = resultArray[i];\n \n boolean proceed = _handleNewFile(result, outputDir, \n invoke, exitOnError, \n invokeAsync,\n Constants.AUTOSHOWFILES);\n \n if (!proceed)\n {\n timeToExit = true;\n break;\n }\n \n //invoke event handlers\n this._triggerFileResultEvent(Constants.AUTOSHOWFILES, result);\n \n result.commit();\n newResultQueue.removeItem(result);\n //newFileResults.remove(result); //synch'ed Vector\n \n } //end_for_loop\n \n if (timeToExit)\n break;\n \n //---------------------------\n \n //if we have the same connection, check if we should nap\n this._logger.debug(\"Waiting for new files...\");\n try {\n //assume we are gonna sleep...\n boolean shouldSleep = true;\n while(shouldSleep)\n {\n //check to see if we really should sleep\n synchronized(newResultQueue) {\n shouldSleep = newResultQueue.isEmpty();\n }\n shouldSleep = shouldSleep && _subscriptionClient.isAlive();\n if (shouldSleep)\n Thread.sleep(sleeptime);\n }\n } catch (InterruptedException e) {\n break; //exit the infinite loop and return\n }\n }\n \n //---------------------------\n \n //logout of client, close subscription client (moved to beginning)\n //if (this._client != null && this._client.isLoggedOn())\n // this._client.logout();\n \n if (_subscriptionClient != null && _subscriptionClient.isAlive())\n _subscriptionClient.close();\n \n //---------------------------\n \n return success;\n }", "public void run()\n\tthrows ScheduledTaskException\n{\n\tLog.customer.debug(\"%s::Start of CATMFGDWInvoicePush_FlatFile task ...\",classname);\n\n\t// Read the USPOFlagAction info from cat.dwAction.util\n\tMFGIRFlagAction = ResourceService.getString(\"cat.dwAction\", \"MFGIRFlagAction\");\n\tLog.customer.debug(\"%s::usPOFlagAction ...\", MFGIRFlagAction, classname);\n if (MFGIRFlagAction!=null && ! MFGIRFlagAction.equals(\"None\") && MFGIRFlagAction.indexOf(\"not found\")==-1)\n\t\tisCompletedFlgUpdate = false;\n\tif ( MFGIRFlagAction!=null && MFGIRFlagAction.equals(\"Completed\")&& MFGIRFlagAction.indexOf(\"not found\")==-1)\n \tisCompletedFlgUpdate = true;\n\n\tstartTime = DateFormatter.getStringValue(new ariba.util.core.Date(), \"EEE MMM d hh:mm:ss a z yyyy\", TimeZone.getTimeZone(\"CST\"));\n\tperiodenddate = DateFormatter.toYearMonthDate(Date.getNow());\n\ttry {\n\t\t File out_FlatFile = new File(flatFilePath);\n\t\t Log.customer.debug(\"%s::FilePath:%s\",classname,out_FlatFile);\n\t\t if (!out_FlatFile.exists()) {\n\t\t \tLog.customer.debug(\"%s::if file does not exit then create 1\",classname);\n\t\t\tout_FlatFile.createNewFile();\n\t\t }\n\t\t Log.customer.debug(\"%s::Creating aprint writer obj:\",classname);\n\t\t PrintWriter outPW_FlatFile = new PrintWriter(IOUtil.bufferedOutputStream(out_FlatFile), true);\n\t\t p = Base.getSession().getPartition();\n\t\t message = new FastStringBuffer();\n\t\t mailSubject = \"CATMFGDWInvoicePush_FlatFile Task Completion Status - Completed Successfully\";\n\t\t try\n\t\t {\n\t\t isHeader = false;\n\t\t // Start : SpringRelease_RSD 129 (FDD_131_4.1,4.2 / TDD_131_1.1,1.2)\n\t\t \t\t\t\t\tquery = \"select from ariba.invoicing.core.InvoiceReconciliation\"\n\t\t \t\t\t\t\t+ \" where (DWInvoiceFlag = 'InProcess' or DWInvoiceFlag = 'Processing') \"\n\t\t \t\t\t\t\t+ \"AND this NOT IN (select this from ariba.invoicing.core.InvoiceReconciliation \"\n\t\t \t\t\t\t\t+ \"where (LineItems.Amount.Amount = 0 OR LineItems.Quantity = 0) \"\n\t\t \t\t\t\t\t+ \"AND LineItems.LineType.Category = 1) \";\n \t\t\t\t\t // End : SpringRelease_RSD 129 (FDD_131_4.1,4.2 / TDD_131_1.1,1.2)\n\t\t Log.customer.debug(query);\n AQLQuery aqlquery = null;\n\t\t AQLOptions options = null;\n\t\t AQLResultCollection results = null;\n\n //String topicname = new String(\"InvoiceReconciliationPush\");\n\t\t //String eventsource = new String(\"ibm_caps_invoicereconpush\");\n\n\t\t aqlquery = AQLQuery.parseQuery(query);\n\t\t options = new AQLOptions(p);\n\t\t results = Base.getService().executeQuery(aqlquery, options);\n\t\t totalNumberOfIrs = results.getSize();\n\t\t if(results.getErrors() != null)\n\t\t \tLog.customer.debug(\"ERROR GETTING RESULTS in Results\");\n while(results.next()){\n\t\t\t\tinvrecon = (InvoiceReconciliation)(results.getBaseId(\"InvoiceReconciliation\").get());\n\t\t\t\tif(invrecon != null){\n\t\t\t\t\ttry{\n \tIrLineItem = (BaseVector)invrecon.getLineItems();\n\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Line Item:%s\",classname,IrLineItem);\n\t\t\t\t\t\t// Shaila : Issue 754 : To ensure no IR with zero line item is processed\n\t\t\t\t\t\tint lineCount = invrecon.getLineItemsCount();\n\t\t\t\t\t\tLog.customer.debug(\"%s::Line Item count for IR:%s \",classname,lineCount);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_periodenddate:%s\",classname,periodenddate);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_datasetFacilityCode:%s\",classname,datasetFacilityCode);\n\t\t\t\t\t\t//outPW_FlatFile.write(periodenddate);\n\t\t\t\t\t\t//outPW_FlatFile.write(datasetFacilityCode);\n\t\t\t\t\t\tpartitionNumber = invrecon.getPartitionNumber();\n\t\t\t\t\t\t//String partition_name = String(partitionName);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_Partition:%s\",classname,partitionNumber);\n\n\t\t\t\t\t\tif (partitionNumber==3){\n\t\t\t\t\t\t\t//Date pSD = (Date)invrecon.getFieldValue(\"BlockStampDate\");\n\t\t\t\t\t\t\t// Issue 215\n\t\t\t\t\t\t\t//Date pSD = (Date)invrecon.getFieldValue(\"ControlDate\");\n\t\t\t\t\t\t\tDate pSD = (Date)invrecon.getFieldValue(\"ApprovedDate\");\n\t\t\t\t\t\t\tperiodStartdate = DateFormatter.toYearMonthDate(pSD);\n\t\t\t\t\t\t\tLog.customer.debug(\"%s::Period Start Date:%s\",pSD,classname);\n\t\t\t\t\t\t\tpartitionName = \"mfg1\";\n\t\t\t\t\t\t\tihBookdate = DateFormatter.toYearMonthDate(pSD);\n\t\t\t\t\t\t\t//outPW_FlatFile.write(periodStartdate+\"~/\");\n\t\t\t\t\t\t \t//outPW_FlatFile.write(\"U9\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (lineCount > 0){\n \tint IrLineItem_vector = IrLineItem.size();\n\t\t\t\t\t\t\tfor (int i =0; i<IrLineItem_vector;i++){\n\t\t\t\t\t\t\t\tLineItem irli = (LineItem)IrLineItem.get(i);\n\t\t\t\t\t\t\t\toutPW_FlatFile.write(partitionName+\"~|\");\n\t\t\t\t\t\t\t\tirFacilityFlag = (String)invrecon.getFieldValue(\"FacilityFlag\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir facility flag:%s\",classname,irFacilityFlag);\n\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irFacilityFlag)){\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFacilityFlag+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(recordType+\"~|\");\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(fileLayoutVersion+\"~|\"+\"M\"+\"~|\");\n\n\t\t\t\t\t\t\t\tirUniqueName = (String)invrecon.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUniqueName: %s\",classname,irUniqueName);\n\t\t\t\t\t\t\t\t//Start: Q4 2013 - RSD117 - FDD 2/TDD 2\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(irUniqueName+\"~|\");\n\n\t\t\t\t\t\t\t\tString SupInvNumber = (String)invrecon.getDottedFieldValue(\"Invoice.InvoiceNumber\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: SupInvNumber: \"+ SupInvNumber);\n\t\t\t\t\t\t\t\tint invleng = SupInvNumber.length();\n\t\t\t\t\t\t\t\tif (invleng > 35)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString SupInvNumber1 = getFormatattedTxt(SupInvNumber);\n\t\t\t\t\t\t\t\t\tint invleng1 = SupInvNumber1.length();\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: invleng1: \"+ invleng1);\n\t\t\t\t\t\t\t\t\tString FormattedirUniqueName = getFormatattedTxt(irUniqueName, invleng1);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: FormattedirUniqueName: \"+ FormattedirUniqueName);\n\n\t\t\t\t\t\t\t\t\t// Writing IH-Invoice-No - 4\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(FormattedirUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString FormattedirUniqueName = getFormatattedTxt(irUniqueName, invleng);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: FormattedirUniqueName: \"+ FormattedirUniqueName);\n\n\t\t\t\t\t\t\t\t\t// Writing IH-Invoice-No - 4\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(FormattedirUniqueName+\"~|\");\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//End: Q4 2013 - RSD117 - FDD 2/TDD 2\n\n\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.1 / TDD_129_1.1)\n\t\t\t\t\t\t\t\tif(invrecon.getFieldValue(\"Supplier\") != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tirSupplierLocation = (String)invrecon.getDottedFieldValue(\"Supplier.UniqueName\");\n\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 129 (FDD_129_4.1 / TDD_129_1.1)\n\t\t\t\t\t\t\t\t\tif (irSupplierLocation != null){\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irSupplierLocation:%s\",classname,irSupplierLocation);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irSupplierLocation+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\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\telse{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\tDate Ir_invDate = (Date)invrecon.getFieldValue(\"InvoiceDate\");\n\t\t\t\t\t\t\t\tif (Ir_invDate!=null){\n\t\t\t\t\t\t\t\t\tIrinvdateyymmdd = DateFormatter.toYearMonthDate(Ir_invDate);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Invoice Date:%s\",classname,Irinvdateyymmdd);\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(Irinvdateyymmdd+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//Log.customer.debug(\"%s::ihRecordStatus:%s\",classname,ihRecordStatus);\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(ihRecordStatus+\"~|\");\n\n\t\t\t\t\t\t\t\tMoney IrTotalcost = (Money)invrecon.getFieldValue(\"TotalCost\");\n\t\t\t\t\t\t\t\tif (IrTotalcost!=null){\n\t\t\t\t\t\t\t\t\tIrtotalcostamount = (BigDecimal)invrecon.getDottedFieldValue(\"TotalCost.Amount\");\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Total cost amount:%s\",classname,Irtotalcostamount);\n\t\t\t\t\t\t\t\t\tif (Irtotalcostamount!=null) {\n\t\t\t\t\t\t\t\t\t\tint Ir_tca = Irtotalcostamount.intValue();\n\t\t\t\t\t\t\t\t\t\tif (Ir_tca >= 0) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"01\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (Ir_tca < 0){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"02\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\t\tirTotalCostCurrency = IrTotalcost.getCurrency().getUniqueName();\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irTotalCostCurrency)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalCost Currency:%s\",classname,irTotalCostCurrency);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irTotalCostCurrency+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tirstngTotalCost = BigDecimalFormatter.getStringValue(Irtotalcostamount);\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing IR total cost:%s\",classname,irstngTotalCost);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irstngTotalCost+\"~|\");\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\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\telse {\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n irTotalInvoiceDiscountDollarAmount = (BigDecimal)invrecon.getDottedFieldValue(\"TotalInvoiceDiscountDollarAmount.Amount\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount:%s\",classname,irTotalInvoiceDiscountDollarAmount);\n\t\t\t\t\t\t\t\t/* if (irTotalInvoiceDiscountDollarAmount==Constants.ZeroBigDecimal) {\n\t\t\t\t\t\t\t\t\t//Log.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount is:%s\",classname,TotalInvoiceDiscountDollarAmount_2);\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"0000000000000.00\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\tif (irTotalInvoiceDiscountDollarAmount!=null) {\n\t\t\t\t\t\t\t\t\t\tint ir_TIDDA = irTotalInvoiceDiscountDollarAmount.intValue();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount integer value:%s\",classname,ir_TIDDA);\n\t\t\t\t\t\t\t\t\t\tif (ir_TIDDA==0){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0000000000000.00\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tstrgDiscountAmount = BigDecimalFormatter.getStringValue(irTotalInvoiceDiscountDollarAmount);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writting the discount amount:%s\",classname,strgDiscountAmount);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(strgDiscountAmount+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n }\n else {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::No value for irTotalInvoiceDiscountDollarAmount so leaving it blanck\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t IrLineItem2 = (InvoiceReconciliationLineItem)IrLineItem.get(i);\n\t\t\t\t\t\t\t\t\t IrnumberInCollection = IrLineItem2.getNumberInCollection();\n\t\t\t\t\t\t\t\t\t numberInCollection = IntegerFormatter.getStringValue(IrnumberInCollection);\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::IR number in collection:%s\",classname,numberInCollection);\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(numberInCollection+\"~|\");\n\n\t\t\t\t\t\t\t\t\t IrLineDescritpiton = IrLineItem2.getDescription();\n\t\t\t\t\t\t\t\t\t if (IrLineDescritpiton!=null){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::IR_LineDescription:%s\",classname,IrLineDescritpiton);\n\t\t\t\t\t\t\t\t\t\tirDescItemNumber = IrLineDescritpiton.getItemNumber(); //what if this is blanck, right now considering blanck also as null\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing IR_LineDescription Item Number:%s\",classname,irDescItemNumber);\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irDescItemNumber)){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irDescItemNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"K\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//Writing item desc-15\n\t\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.2 / TDD_129_1.2)\n\t\t\t\t\t\t\t\t\t\tString descDescription = \"\";\n\t\t\t\t\t\t\t\t\t\tString commonCCId = \"\";\n\t\t\t\t\t\t\t\t\t\tdescDescription_temp = (String)IrLineDescritpiton.getFieldValue(\"Description\");\n\t\t\t\t\t\t\t\t\t\tcommonCC = IrLineDescritpiton.getCommonCommodityCode();\n\t\t\t\t\t\t\t\t\t\tif (commonCC!=null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcommonCCId = (String)commonCC.getName().getPrimaryString();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode UniqueName:%s\",classname,commonCCId);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CommonCommdityCode:%s\",classname,commonCCId);\n\n\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(descDescription_temp))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription array is:%s\",classname,descDescription_temp);\n\n\t\t\t\t\t\t\t\t\t\t char[] c_array;\n\t\t\t\t\t\t\t\t\t\t String c_string;\n\t\t\t\t\t\t\t\t\t\t byte[] c_byte_array;\n\t\t\t\t\t\t\t\t\t\t c_array = descDescription_temp.toCharArray();\n\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription:%s\",classname,c_array);\n\t\t\t\t\t\t\t\t\t\t for (char c : c_array)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t c_string = Character.toString(c);\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription:%s\",classname,c_string);\n\n\t\t\t\t\t\t\t\t\t\t\t System.out.print(c_string);\n\t\t\t\t\t\t\t\t\t\t\t c_byte_array = c_string.getBytes();\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription byte array:%s\",classname,c_byte_array);\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription byte array length:%s\",classname,c_byte_array.length);\n\n\t\t\t\t\t\t\t\t\t\t\t if (c_byte_array.length > 1)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription byte array length > 1\",classname);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription:%s\",classname,c_byte_array);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription:%s\",classname,c_string);\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescDescription_temp = commonCCId;\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Setting Description as Common commodity code:%s\",classname,descDescription_temp);\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 129 (FDD_129_4.2 / TDD_129_1.2)\n\n\t\t\t\t\t\t\t\t\t\t\t// Filtering Non-ASCII characters\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description after checking bytes is:%s\",classname,descDescription_temp);\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(descDescription_temp))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = descDescription_temp.replaceAll(\"[^\\\\p{ASCII}]\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\r',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\t',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\n',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\'',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description:%s\",classname,descDescription);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(descDescription+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tirCommodityCode = IrLineDescritpiton.getCommonCommodityCode();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode:%s\",classname,irCommodityCode);\n\t\t\t\t\t\t\t\t\t\tif (irCommodityCode!=null){\n\t\t\t\t\t\t\t\t\t\t\tccUniqueName = irCommodityCode.getUniqueName();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode UniqueName:%s\",classname,ccUniqueName);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ccUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdescSupplierPartNumber = IrLineDescritpiton.getSupplierPartNumber();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description_SupplierPartNumber:%s\",classname,descSupplierPartNumber);\n\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(descSupplierPartNumber)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing Description_SupplierPartNumber:%s\",classname,descSupplierPartNumber);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(descSupplierPartNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tIrLineType = IrLineItem2.getLineType();\n\t\t\t\t\t\t\t\t\tif(IrLineType!=null){\n\t\t\t\t\t\t\t\t\t\tint category = IrLineType.getCategory();\n\t\t\t\t\t\t\t\t\t\tif (category==1){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"01\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\telse if (category==2){\n\t\t\t\t\t\t\t\t\t\t\tString irLineTypeString = (String)IrLineType.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: LineType of Ir Line::%s\",classname,irLineTypeString);\n\t\t\t\t\t\t\t\t\t\t\tif(irLineTypeString.equals(\"VATCharge\")){\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"96\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"02\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==4){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"05\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==8) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"27\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==16){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"13\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==32) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"12\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tBoolean isHaz = (Boolean)IrLineItem2.getFieldValue(\"IsHazmat\");\n\t\t\t\t\t\t\t\t\t// irHazmat = BooleanFormatter.getStringValue(IrLineItem2.getFieldValue(\"IsHazmat\"));\n\t\t\t\t\t\t\t\t\tif(isHaz != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t boolean irHazmatBoolean = isHaz.booleanValue();\n\t\t\t\t\t\t\t\t\t// Log.customer.debug(\"Ir Hazmat value:\",irHazmatBoolean);\n\t\t\t\t\t\t\t\t\t if(irHazmatBoolean)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"3\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0~|\");\n\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\tirHazmat = BooleanFormatter.getStringValue(IrLineItem2.getFieldValue(\"IsHazmat\"));\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Hazmat value:%s\",classname,irHazmat);\n\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irHazmat)){\n\t\t\t\t\t\t\t\t\t\tif (irHazmat==\"true\"){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"3\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t*/\n\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129/131 (FDD_129_4.4 / TDD_129_1.4 / FDD_131_4.4/TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t //BigDecimal irliAmount = IrLineItem2.getAmount().getAmount();\n\t\t\t\t\t\t\t\t\t BigDecimal IrLineQuantity1 = IrLineItem2.getQuantity();\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"::IR LineQuantity:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t String irliQuantity = \"\";\n\n\t\t\t\t\t\t\t\t\t // Writing IL-Bill-Qty-20\n\t\t\t\t\t\t\t\t\t if (IrLineQuantity1 != null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Its Tax line item passing Quantity as 1: \"+taxLineQuantity);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(taxLineQuantity+\"~|\");\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (IrLineItem2.getAmount().isNegative())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(IrLineQuantity1.intValue() < 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"IR LineAmount is negative and quantity is also negative no change required:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tIrLineQuantity1 = IrLineQuantity1.multiply(new BigDecimal(-1));\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"IR LineAmount is negative hence setting LI Quantity as negative:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t //End : SpringRelease_RSD 129/131 (FDD_129_4.4 / TDD_129_1.4 / FDD_131_4.4/TDD_131_1.5)\n\n\n\n\t\t\t\t\t\t\t\t\t//IrUOM = (UnitOfMeasure)IrLineDescritpiton.getUnitOfMeasure();\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\n\t\t\t\t\t\t\t\t\t // Writing IL-Bill-Qty-Unit-Of-Measure-21\n\t\t\t\t\t\t\t\t\t //IrUOM = (UnitOfMeasure)IrLineDescritpiton.getUnitOfMeasure();\n\t\t\t\t\t\t\t\t\t String irUOM_UniqueName1 = \"\";\n\n\t\t\t\t\t\t\t\t \tif(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"Its Tax line item passing UOM as LOT: \");\n\t\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(irUOM_UniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ( IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure\") != null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Not tax line item\");\n\t\t\t\t\t\t\t\t\t\t\tString uOMUniqueName = (String)IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::uOMUniqueName 1 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t Object irUOM_object = \tIrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.CAPSUnitOfMeasure\");\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::irUOM_object 2 %s\",classname,irUOM_object);\n\t\t\t\t\t\t\t\t\t\t\t if(irUOM_object != null)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tirUOM_UniqueName1 = irUOM_object.toString();\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Desc UOM 3:%s\",classname,irUOM_UniqueName1);\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irUOM_UniqueName1))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irUOM_UniqueName1+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUOM_UniqueName writen ti file 4 %s\",classname,irUOM_UniqueName1);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t//\t\t\t\t\t\t\t\t\t\t\t\t\t IF CAPSUnitOfMeasure = Enpty THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 5 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// IF CAPSUnitOfMeasure = NULL THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 6 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tif (IrTotalcost!=null){\n\t\t\t\t\t\t\t\t\t\tirTotalCostCurrency = IrTotalcost.getCurrency().getUniqueName();\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irTotalCostCurrency)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalCost Currency:%s\",classname,irTotalCostCurrency);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irTotalCostCurrency+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.4 / TDD_129_1.4)\n\t\t\t\t\t\t\t\t\tirdecsPrice = BigDecimalFormatter.getStringValue(IrLineDescritpiton.getPrice().getAmount().abs());\n\t\t\t\t\t\t\t\t\t // End : SpringRelease_RSD 129 (FDD_129_4.4 / TDD_129_1.4)\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::Ir desc Price:%s\",classname,irdecsPrice);\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irdecsPrice)){\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(irdecsPrice+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t // Start : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\tString irUOM_UniqueName2 = \"\";\n\n\t\t\t\t\t\t\t\t if ( IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure\") != null)\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t if(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t\t {\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"Its Tax line item passing UOM as LOT: \");\n\t\t\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(irUOM_UniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Not tax line item\");\n\t\t\t\t\t\t\t\t\t\tString uOMUniqueName = (String)IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::uOMUniqueName 1 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t Object irUOM_object = \tIrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.CAPSUnitOfMeasure\");\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::irUOM_object 2 %s\",classname,irUOM_object);\n\t\t\t\t\t\t\t\t\t\t if(irUOM_object != null)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tirUOM_UniqueName2 = irUOM_object.toString();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Desc UOM 3:%s\",classname,irUOM_UniqueName2);\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irUOM_UniqueName2))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irUOM_UniqueName2+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUOM_UniqueName writen ti file 4 %s\",classname,irUOM_UniqueName2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\t\t\t\t\t IF CAPSUnitOfMeasure = Enpty THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 5 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// IF CAPSUnitOfMeasure = NULL THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 6 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"1.0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t irLineAmount = BigDecimalFormatter.getStringValue(IrLineItem2.getAmount().getAmount());\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLineAmount)) {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::Ir Line Amount:%s\",classname,irLineAmount);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irLineAmount+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"00000.0000\"+\"~|\");\n\t\t\t\t\t\t\t\t\t irLineCapsCharge = (ClusterRoot)IrLineItem2.getFieldValue(\"CapsChargeCode\");\n\t\t\t\t\t\t\t\t\t if (irLineCapsCharge!=null){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::Ir Line caps charge code:%s\",classname,irLineCapsCharge);\n\t\t\t\t\t\t\t\t\t\tirCapsUniqueName = (String)irLineCapsCharge.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Line caps charge code UniqueName:%s\",classname,irCapsUniqueName);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irCapsUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t irLinePoNumber = (String)invrecon.getFieldValue(\"PONumber\");\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLinePoNumber)){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::IR Line PO Number:%s\",classname,irLinePoNumber);\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(irLinePoNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t irLinePoLineNumber = IntegerFormatter.getIntValue(IrLineItem2.getFieldValue(\"POLineItemNumber\"));\n\t\t\t\t\t\t\t\t\t irLinePoLinenoString = IntegerFormatter.getStringValue(irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::Line po Line number:%s\",classname,irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLinePoLinenoString) && !irLinePoLinenoString.equals(\"0\")){\n\n\t\t\t\t\t\t\t\t\t \t\tLog.customer.debug(\"%s::Ir Line Po Line Number:%s\",classname,irLinePoLinenoString);\n\t\t\t\t\t\t\t\t\t \t\t//String irLinePoLinenoString = IntegerFormatter.getStringValue(irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irLinePoLinenoString+\"~|\");\n\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t \telse {\n\t\t\t\t\t\t\t\t\t \t\t// IF IR.LineItems. POLineItemNumber is NULL THEN SEND VALUE OF 1\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"1\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t if (irLinePoNumber!=null){\n\t\t\t\t\t\t\t\t\t \tif (StringUtil.startsWithIgnoreCase(irLinePoNumber , \"C\")){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"C\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"P\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"N\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t int partitionNumber_2 = invrecon.getPartitionNumber();\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::partiton number 2nd place:%s\",classname,partitionNumber_2);\n\t\t\t\t\t\t\t\t\t if (partitionNumber_2==2){\n\t\t\t\t\t\t\t\t\t \tirAccounting = IrLineItem2.getAccountings();\n\t\t\t\t\t\t\t\t\t\tif (irAccounting!=null){\n\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting = (BaseVector)irAccounting.getSplitAccountings();\n\t\t\t\t\t\t\t\t\t\t\tirSplitaccSize = irSplitAccounting.size();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Split acc size:%s\",classname,irSplitaccSize);\n\t\t\t\t\t\t\t\t\t\t\tif (irSplitaccSize > 0){\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug (\"%s::getting accounting facility\",classname);\n\t\t\t\t\t\t\t\t\t\t\t\tString ir_AccFac= null;\n\t\t\t\t\t\t\t\t\t\t\t\tString ir_Order_name = null;\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j<irSplitaccSize;j++){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting2 = (SplitAccounting)irSplitAccounting.get(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//String irAccountingFacility = (String)irSplitAccounting2.getFieldValue(\"AccountingFacility\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tString irAccountingFacility = (String)irSplitAccounting2.getFieldValue(\"Facility.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting facility:%s\",classname,irAccountingFacility);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString ir_Order = (String)irSplitAccounting2.getFieldValue(\"Order\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irAccountingFacility)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting facility:%s\",classname,irAccountingFacility);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_AccFac = irAccountingFacility+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(irAccountingFacility+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_AccFac = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(ir_Order)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting Order:%s\",classname,ir_Order);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_Order_name = ir_Order;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_Order_name =(\"~|\");\n }\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ir_AccFac);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ir_Order_name);\n }\n\t\t\t\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \tirAccounting = IrLineItem2.getAccountings();\n\t\t\t\t\t\t\t\t\t\tif (irAccounting!=null){\n\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting = (BaseVector)irAccounting.getSplitAccountings();\n\t\t\t\t\t\t\t\t\t\t\tirSplitaccSize = irSplitAccounting.size();\n\t\t\t\t\t\t\t\t\t\t\tif (irSplitaccSize > 0){\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k<irSplitaccSize;k++){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting2 = (SplitAccounting)irSplitAccounting.get(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\tirFacility = (ClusterRoot)irSplitAccounting2.getFieldValue(\"Facility\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irFacility!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIrFacilityUniqueName = (String)irFacility.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(IrFacilityUniqueName)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Facility:%s\",classname,IrFacilityUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = IrFacilityUniqueName+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = IrFacilityUniqueName+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(IrFacilityUniqueName+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirCostCenter = (ClusterRoot)irSplitAccounting2.getFieldValue(\"CostCenter\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irCostCenter!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCC = (String)irCostCenter.getFieldValue(\"CostCenterCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irCC)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Cost Center:%s\",classname,irCC);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = irCC+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSubAcc = (ClusterRoot)irSplitAccounting2.getFieldValue(\"SubAccount\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irSubAcc!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirSubAccStrng = (String)irSubAcc.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irSubAccStrng)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Sub Account:%s\",classname,irSubAccStrng);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = irSubAccStrng+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirAccount = (ClusterRoot)irSplitAccounting2.getFieldValue(\"Account\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(irAccount!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCode = (String)irAccount.getFieldValue(\"AccountCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irAccCode)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Account code:%s\",classname,irAccCode);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCodeStrng = irAccCode+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCodeStrng = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tirAccCodeStrng = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac2);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irCCString);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irStrngsubacc);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irAccCodeStrng);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\tirBuyerCode = (ClusterRoot)IrLineItem2.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\tif (irBuyerCode!=null){\n\t\t\t\t\t\t\t\t\t\t\t\tirBuyercc = (String)irBuyerCode.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irBuyercc)){\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Buyer Code:%s\",classname,irBuyercc);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irBuyercc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tirLineOrder = (DirectOrder)IrLineItem2.getOrder();\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR line Purchase Order:%s\",classname,irLineOrder);\n\t\t\t\t\t\t\t\t\t\t\t\tif (irLineOrder!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirOrderLineItem = (ariba.purchasing.core.POLineItem)IrLineItem2.getOrderLineItem();\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Order Line Item:%s\",classname,irOrderLineItem);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irOrderLineItem!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirPOLineBuyerCode = (ClusterRoot)irOrderLineItem.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (irPOLineBuyerCode!= null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirPOlinebuyercc = (String)irPOLineBuyerCode.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir PO Line Buyer Code\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irPOlinebuyercc +\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//IsAdHoc - catalog or non catalog, Issue #269 - Dharshan\n\t\t\t\t\t\t\t\t\t\tisAdHocBoolean = true;\n\t\t\t\t\t\t\t\t\t\tisAdHoc = null;\n\t\t\t\t\t\t\t\t\t\tif (irli.getDottedFieldValue(\"IsAdHoc\") != null) {\n\t\t\t\t\t\t\t\t\t\t\tisAdHoc = (Boolean) irli.getDottedFieldValue(\"IsAdHoc\");\n\t\t\t\t\t\t\t\t\t\t\tisAdHocBoolean = BooleanFormatter.getBooleanValue(isAdHoc);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::isAdHocBoolean:%s\",classname,isAdHocBoolean);\n\t\t\t\t\t\t\t\t\t\t\tif(isAdHocBoolean == false){\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|Catalog Item:\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {Log.customer.debug(\"%s::isAdHocBoolean is true, not catalog item\",classname);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {Log.customer.debug(\"%s::isAdHocBoolean is null, leave blank\",classname);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"\\n\");\n\n\n\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t totalNumberOfIrWritten++;\n\t\t\t\t\t\t\t\t\t if(isCompletedFlgUpdate) {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::MFGIRFlagAction is Completed setting DWInvoiceFlag ...\", classname);\n\t\t\t\t\t\t\t\t\t \tinvrecon.setFieldValue(\"DWInvoiceFlag\", \"Completed\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::MFGIRFlagAction is None no action req DWInvoiceFlag ...\", classname);\n\t\t\t\t\t\t\t\t\t \tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t catch(Exception e){\n\t\t\t\t\t\t\t \tLog.customer.debug(e.toString());\n\t\t\t\t\t\t\t \tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t //Base.getSession().transactionCommit();\n\t\t\t\t\t\t\t Log.customer.debug(\"Ending DWInvoicePush program .....\");\n\t\t\t\t\t\t\t //invrecon.setFieldValue(\"DWInvoiceFlag\", \"Completed\");\n\t\t\t\t\t\t\t //Update DWPOFlag in DO based on config\n\n\t\t\t\t\t }\n\t\t\t\t }\n }\n\t\t\tcatch(Exception e){\n\t\t\t\tLog.customer.debug(e.toString());\n\t\t\t\tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\n\t\t\t}\n\t\t\tif (outPW_FlatFile!=null){\n\t\t\t\toutPW_FlatFile.flush();\n\t\t\t\toutPW_FlatFile.close();\n\t\t\t}\n\t\t\tendTime = DateFormatter.getStringValue(new Date(), \"EEE MMM d hh:mm:ss a z yyyy\", TimeZone.getTimeZone(\"CST\"));\n //Process runDWFTP = Runtime.getRuntime().exec(\"/usr/bin/sh /msc/arb821/Server/config/java/schedule/DWFileFTP_UK.sh\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tLog.customer.debug(e.toString());\n\t\t\tmessage.append(\"Task start time : \"+ startTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Task end time : \" + endTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"No of IR Written for DW : \"+ totalNumberOfIrWritten);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"No of IR could not be Written :\"+ (totalNumberOfIrs - totalNumberOfIrWritten));\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"CATMFGDWInvoicePush_FlatFile Task Failed - Exception details below\");\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(e.toString());\n\t\t\tmailSubject = \"CATMFGDWInvoicePush_FlatFile Task Failed\";\n\t\t\tLog.customer.debug(\"%s: Inside Exception message \"+ message.toString() , classname);\n\t\t\tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\t\t}\n\t\tfinally {\n\n\t\t\t\t//Change made by Soumya begins\n\t\t\t\tLog.customer.debug(\"%s::Archive File Path:%s\",classname,archiveFileDataPath);\n\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Starting Copying the flat file to Archive \");\n\t\t\t\tCATFaltFileUtil.copyFile(flatFilePath, archiveFileDataPath);\n\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Completed Copying the flat file to Archive \");\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Changing file permission of Data file.\");\n\t\t\t\t\tRuntime.getRuntime().exec(\"chmod 666 \" + flatFilePath);\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Changed file permission of Data file.\");\n\t\t\t\t}catch (IOException e1) {\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Error in changing Permission. \"+ e1);\n\t\t\t\t}\n\n\t\t\t\t//Change made by Soumya end\n\n\n\t\t\tLog.customer.debug(\"%s: Inside Finally \", classname);\n\t\t\tmessage.append(\"Task start time : \"+ startTime);\n\t\t\tLog.customer.debug(\"%s: Inside Finally added start time\", classname);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Task end time : \" + endTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Total number of IRs to be Written : \"+ totalNumberOfIrs);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Total number of IRs Written : \"+ totalNumberOfIrWritten);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tLog.customer.debug(\"%s: Inside Finally message \"+ message.toString() , classname);\n\n\t\t\t// Sending email\n\t\t\tCatEmailNotificationUtil.sendEmailNotification(mailSubject, message.toString(), \"cat.java.emails\", \"DWPushNotify\");\n\t\t\tmessage = null;\n\t\t\ttotalNumberOfIrWritten =0;\n\t\t\ttotalNumberOfIrs =0;\n\t }\n}", "@Override\n\tpublic void channelParted(String channel) {\n\t}", "private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n\n }", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\t\n\t\t\t}", "public void setGuaranteedDelivery(boolean value) {\r\n this.guaranteedDelivery = value;\r\n }", "@Bean\n public MessageProducer inboundMessageHandler() {\n MqttPahoMessageDrivenChannelAdapter adapter =\n new MqttPahoMessageDrivenChannelAdapter(UUID.randomUUID().toString(), mqttPahoClientFactory.get(), \"/newsMessage/notify\");\n adapter.setCompletionTimeout(5000);\n adapter.setConverter(new JSONMqttMessageConvertor(NewsMessage.class));\n adapter.setQos(1);\n adapter.setOutputChannel(mqttEventHandlerInputChannel);\n return adapter;\n }", "@Override\n public void handleDelivery(String consumerTag, Envelope envelope,\n AMQP.BasicProperties properties, byte[] body) throws IOException \n {\n try\n {\n Object obj = getObjectForBytes(body);\n json = returnJson(obj);\n System.out.println(\"The json is \"+json.toString());\n \n } catch (ClassNotFoundException ex)\n {\n Logger.getLogger(JsonTranslator.class.getName()).log(Level.SEVERE, null, ex);\n }finally \n {\n System.out.println(\" [x] Done\");\n publishJsonData();//VERY INOVATIVE\n //DDO NOT KILL THE \n // channel.basicAck(envelope.getDeliveryTag(), false);\n }\n \n }", "@RequestMapping(value = \"/publish\", method = RequestMethod.POST)\n public String publish(@RequestParam(value = \"destination\", required = false, defaultValue = \"**\") String destination) {\n\n final String myUniqueId = \"config-client1:7002\";\n System.out.println(context.getId());\n final MyCustomRemoteEvent event =\n new MyCustomRemoteEvent(this, myUniqueId, destination, \"--------dfsfsdfsdfsdfs\");\n //Since we extended RemoteApplicationEvent and we've configured the scanning of remote events using @RemoteApplicationEventScan, it will be treated as a bus event rather than just a regular ApplicationEvent published in the context.\n //因为我们在启动类上设置了@RemoteApplicationEventScan注解,所以通过context发送的时间将变成一个bus event总线事件,而不是在自身context中发布的一个ApplicationEvent\n context.publishEvent(event);\n\n return \"event published\";\n }", "@Override\n\tpublic void showGuaranteedDeliverySection() {\n\n\t}", "public PayWithAmazonEvent withFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n return this;\r\n }", "CompletableFuture<Exchange> asyncSend(String endpointUri, Processor processor);", "public synchronized void run() {\n AmazonOrder currentOrder = null;\n\n do {\n try {\n currentOrder = shippingCenterToSection.blockingGet();\n currentOrder.setShippingSectionID(section);\n\n Thread.sleep(generator.nextInt(5000));\n\n if(currentOrder.getTerminatingKey() != true) {\n\n //System.out.println(\"** Center \"+ currentOrder.getShippingCenterID()+ \" Section\"+ currentOrder.getShippingSectionID()+\" | \"+currentOrder.getCategory());\n sendOrder(sectionToShippingDock, currentOrder);\n\n }\n else if(section == 1){\n Thread.sleep(generator.nextInt(6000));\n sendOrder(sectionToShippingDock, currentOrder);\n }\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt();\n }\n\n }\n while(currentOrder.getTerminatingKey() != true);\n\n //System.out.println(\"\\nCenter \"+center+\" section \"+section +\" terminating\\n\");\n }", "@Override\r\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\r\n\t}", "@Test\n public void ftpConsumer_build_when_jobName_and_jobGroup_set() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, aopProxyProvider,null, null, null, null);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(aopProxyProvider).applyPointcut(with(\"testjob\"),with(emptyScheduleConsumer));\n will(returnValue(emptyScheduleConsumer));\n\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .setMessageProvider(messageProvider)\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n\n mockery.assertIsSatisfied();\n\n }", "public void trackDeliveryActivity(ActivityStartEvent activityStartEvent) {\n \tfor (ShipmentTracker shipment: shipments.values()){\n \t\tif (shipment.to==activityStartEvent.getLinkId() ){\n\t\t\t\tif(shipment.driverId == null){\n\t\t\t\t\tif(shipment.shipment.getDeliveryTimeWindow().getStart()<=activityStartEvent.getTime() && activityStartEvent.getTime()<=shipment.shipment.getDeliveryTimeWindow().getEnd()){\n\t\t\t\t\t\tif (shipment.possibleDrivers.contains(activityStartEvent.getPersonId().toString())) {\n\t\t\t\t\t\t\tshipment.driverIdGuess = activityStartEvent.getPersonId();\n\t\t\t\t\t\t\tshipment.deliveryTimeGuess=activityStartEvent.getTime();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (shipment.driverId.toString().equals(activityStartEvent.getPersonId().toString())){\n\t\t\t\t\tshipment.deliveryTime=activityStartEvent.getTime();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void sendDeliveryRequest(Product product) {\n ACLMessage cfp = new ACLMessage(ACLMessage.CFP);\n try {\n cfp.setContentObject(product);\n } catch (IOException e) {\n System.err.println(\"[STORE] Couldn't set content Object in CFP message with product: \" + product.toString());\n return;\n }\n\n graphicsDisplay.setGreen(\"Product\" + product.getId());\n addBehaviour(new FIPAContractNetInit(this, cfp, couriers));\n }", "public void scheduleRegisterChannel(final SelectableChannel channel, final int operations,\r\n final Object handler) {\r\n\r\n beginInvoke(new Runnable() {\r\n public void run() {\r\n try {\r\n registerChannel(channel, operations, handler);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n }", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\n\t}", "public void execute(DelegateExecution execution) {\n System.out.println(\"Sending email now\");\n }", "@Override\n\tpublic void run() {\n\t\tthis.logger.debug(\"activity created sent: \" + body);\n\n\t\tSender sender = new Sender(this.apiKey);\n//\t\tNotification value = new Notification.Builder(\"TiTlE\").body(\"BoDy\").build();\n//\t\tMessage message = new Message.Builder().notification(value)\n//\t\t\t\t.addData(\"message\", body)\n//\t\t\t\t.addData(\"title\", title)\n//\t\t\t\t.build();\n\t\tMessage message = new Message.Builder()\n\t\t\t\t.addData(\"message\", body)\n\t\t\t\t.addData(\"title\", title)\n\t\t\t\t.addData(\"activity_id\", this.activityId)\n\t\t\t\t.build();\n\n\t\ttry {\n\t\t\tResult result = sender.send(message, this.registrationId, 1);\n\t\t\t//System.out.println(\"gcm result success:\" + result.getSuccess() + \" failure:\"+ result.getFailure() + \" fail msg: \" + result.getErrorCodeName());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"activity creation notification sent\");\n\n\t}", "@Test\n public void give_subscriptionCreatedBeforeLastScheduledDelivery_when_getDailySubscriptionsToDeliver_then_returnSubscription() {\n }", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "public interface SftpConsumerBuilder extends ScheduledConsumerBuilder\n{\n SftpConsumerBuilder setCriticalOnStartup(boolean criticalOnStartup);\n\n SftpConsumerBuilder setConfiguredResourceId(String configuredResourceId);\n\n SftpConsumerBuilder setConfiguration(ScheduledConsumerConfiguration scheduledConsumerConfiguration);\n\n SftpConsumerBuilder setMessageProvider(MessageProvider messageProvider);\n\n SftpConsumerBuilder setManagedEventIdentifierService(ManagedEventIdentifierService managedEventIdentifierService);\n\n SftpConsumerBuilder setManagedResourceRecoveryManager(ManagedResourceRecoveryManager managedResourceRecoveryManager);\n\n SftpConsumerBuilder setEventFactory(EventFactory eventFactory);\n\n SftpConsumerBuilder setCronExpression(String cronExpression);\n\n SftpConsumerBuilder setEager(boolean eager);\n\n SftpConsumerBuilder setIgnoreMisfire(boolean ignoreMisfire);\n\n SftpConsumerBuilder setTimezone(String timezone);\n\n SftpConsumerBuilder setSourceDirectory(String sourceDirectory);\n\n SftpConsumerBuilder setFilenamePattern(String filenamePattern);\n\n SftpConsumerBuilder setSourceDirectoryURLFactory(DirectoryURLFactory sourceDirectoryURLFactory);\n\n SftpConsumerBuilder setFilterDuplicates(Boolean filterDuplicates);\n\n SftpConsumerBuilder setFilterOnFilename(Boolean filterOnFilename);\n\n SftpConsumerBuilder setFilterOnLastModifiedDate(Boolean filterOnLastModifiedDate);\n\n SftpConsumerBuilder setRenameOnSuccess(Boolean renameOnSuccess);\n\n SftpConsumerBuilder setRenameOnSuccessExtension(String renameOnSuccessExtension);\n\n SftpConsumerBuilder setMoveOnSuccess(Boolean moveOnSuccess);\n\n SftpConsumerBuilder setMoveOnSuccessNewPath(String moveOnSuccessNewPath);\n\n SftpConsumerBuilder setChronological(Boolean chronological);\n\n SftpConsumerBuilder setChunking(Boolean chunking);\n\n SftpConsumerBuilder setChunkSize(Integer chunkSize);\n\n SftpConsumerBuilder setChecksum(Boolean checksum);\n\n SftpConsumerBuilder setMinAge(Long minAge);\n\n SftpConsumerBuilder setDestructive(Boolean destructive);\n\n SftpConsumerBuilder setMaxRows(Integer maxRows);\n\n SftpConsumerBuilder setAgeOfFiles(Integer ageOfFiles);\n\n SftpConsumerBuilder setClientID(String clientID);\n\n SftpConsumerBuilder setCleanupJournalOnComplete(Boolean cleanupJournalOnComplete);\n\n SftpConsumerBuilder setRemoteHost(String remoteHost);\n\n SftpConsumerBuilder setPrivateKeyFilename(String privateKeyFilename);\n\n SftpConsumerBuilder setMaxRetryAttempts(Integer maxRetryAttempts);\n\n SftpConsumerBuilder setRemotePort(Integer remotePort);\n\n SftpConsumerBuilder setKnownHostsFilename(String knownHostsFilename);\n\n SftpConsumerBuilder setUsername(String username);\n\n SftpConsumerBuilder setPassword(String password);\n\n SftpConsumerBuilder setConnectionTimeout(Integer connectionTimeout);\n\n SftpConsumerBuilder setIsRecursive(Boolean isRecursive);\n\n SftpConsumerBuilder setPreferredKeyExchangeAlgorithm(String preferredKeyExchangeAlgorithm);\n\n SftpConsumerBuilder setScheduledJobGroupName(String scheduledJobGroupName);\n\n SftpConsumerBuilder setScheduledJobName(String scheduledJobName);\n\n \n}", "@Bean\n IntegrationFlow producer() {\n MessageSource<String> messageSource = () -> (run.get() ? MessageBuilder\n .withPayload(\"Greetings @ \" + Instant.now().toString() + \".\").build() : null);\n return IntegrationFlows\n .from(messageSource, ps -> ps.poller(pm -> pm.fixedRate(1000L)))\n .channel(channels.output()).get();\n }", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;", "void schedule(ScheduledJob job);", "private void fireConfigChanged()\n {\n ScmEventBus.getInstance().post(\n new RepositoryHandlerConfigChangedEvent<C>(config));\n }", "@Scheduled(fixedRate = 1000)\n private void send(){\n jmsTemplate.send(\"test.messages\", session -> {\n TextMessage message = session.createTextMessage(Instant.now().toString());\n return message;\n });\n }", "public void setDeliveryclass(String deliveryclass) {\n this.deliveryclass = deliveryclass == null ? null : deliveryclass.trim();\n }", "@Override\n\t\t\tpublic void callStarted(String channel) {\n\t\t\t}", "Response updateChannelWithPayload(@NonNull URL channelLocation, @NonNull ChannelRegistrationPayload channelPayload) {\n String payload = channelPayload.toJsonValue().toString();\n Logger.verbose(\"ChannelApiClient - Updating channel with payload: \" + payload);\n return requestWithPayload(channelLocation, \"PUT\", payload);\n }", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t}", "@Override\n\t\t\t\tpublic void deliveryComplete(MqttDeliveryToken arg0) {\n\t\t\t\t\tSystem.out.println(\"deliveryComplete---------\"\n\t\t\t\t\t\t\t+ arg0.isComplete());\n\t\t\t\t}", "Update withDeliveryPackage(DeliveryPackageInformation deliveryPackage);", "private void routeQueuedEvent() {\n \t\t\n \t\tfinal SleeTransactionManager txMgr = this.container.getTransactionManager();\n \t\t\t\t\n \t\tboolean rollbackTx = true;\n \t\t\n \t\ttry {\n \n \t\t\tEventContextImpl eventContextImpl = de.getEventRouterActivity().getCurrentEventContext();\n \t\t\tif (eventContextImpl == null) {\t\t\t\t\n \t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\tlogger.debug(\"\\n\\n\\nDelivering event : [[[ eventId \"\n \t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t\n \t\t\t\t// event context not set, create it \n \t\t\t\teventContextImpl = new EventContextImpl(de,container);\n \t\t\t\tde.getEventRouterActivity().setCurrentEventContext(eventContextImpl);\n \t\t\t\t// do initial event processing\n \t\t\t\tEventTypeComponent eventTypeComponent = container.getComponentRepositoryImpl().getComponentByID(de.getEventTypeId());\n \t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\tlogger.debug(\"Active services for event \"+de.getEventTypeId()+\": \"+eventTypeComponent.getActiveServicesWhichDefineEventAsInitial());\n \t\t\t\t}\n \t\t\t\tfor (ServiceComponent serviceComponent : eventTypeComponent.getActiveServicesWhichDefineEventAsInitial()) {\n \t\t\t\t\tif (de.getService() == null || de.getService().equals(serviceComponent.getServiceID())) {\n \t\t\t\t\t\tinitialEventProcessor.processInitialEvents(serviceComponent, de, txMgr, this.container.getActivityContextFactory());\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (eventContextImpl.isSuspendedNotTransacted()) {\n \t\t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\t\tlogger.debug(\"\\n\\n\\nFreezing (due to suspended context) event delivery : [[[ eventId \"\n \t\t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t\teventContextImpl.barrierEvent(de);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\t\tlogger.debug(\"\\n\\n\\nResuming event delivery : [[[ eventId \"\n \t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// For each SBB that is attached to this activity context.\n \t\t\tboolean gotSbb = false;\n \t\t\tdo {\n \t\t\t\t\n \t\t\t\tString rootSbbEntityId = null;\n \t\t\t\tClassLoader invokerClassLoader = null;\n \t\t\t\tSbbEntity sbbEntity = null;\n \t\t\t\tSbbObject sbbObject = null;\n \n \t\t\t\ttry {\n \n \t\t\t\t\t/*\n \t\t\t\t\t * Start of SLEE Originated Invocation Sequence\n \t\t\t\t\t * ============================================== This\n \t\t\t\t\t * sequence consists of either: 1) One \"Op Only\" SLEE\n \t\t\t\t\t * Originated Invocation - in the case that it's a\n \t\t\t\t\t * straightforward event routing for the sbb entity. 2) One\n \t\t\t\t\t * \"Op and Remove\" SLEE Originated Invocation - in the case\n \t\t\t\t\t * it's an event routing to a root sbb entity that ends up\n \t\t\t\t\t * in a remove to the same entity since the attachment count\n \t\t\t\t\t * goes to zero after the event invocation 3) One \"Op Only\"\n \t\t\t\t\t * followed by one \"Remove Only\" SLEE Originated Invocation -\n \t\t\t\t\t * in the case it's an event routing to a non-root sbb\n \t\t\t\t\t * entity that ends up in a remove to the corresponding root\n \t\t\t\t\t * entity since the root attachment count goes to zero after\n \t\t\t\t\t * the event invocation Each Invocation Sequence is handled\n \t\t\t\t\t * in it's own transaction. All exception handling for each\n \t\t\t\t\t * invocation sequence is handled here. Any exceptions that\n \t\t\t\t\t * propagate up aren't necessary to be caught. -Tim\n \t\t\t\t\t */\n \n \t\t\t\t\t// If this fails then we propagate up since there's nothing to roll-back anyway\n \t\t\t\t\t\n \t\t\t\t\ttxMgr.begin();\n \t\t\t\t\t\n \t\t\t\t\tActivityContext ac = null;\n \t\t\t\t\tException caught = null;\n \t\t\t\t\tSbbEntity highestPrioritySbbEntity = null;\n \t\t\t\t\tClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();\n \t\t\t\t\t\n \t\t\t\t\tSet<String> sbbEntitiesThatHandledCurrentEvent = eventContextImpl.getSbbEntitiesThatHandledEvent();\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\n \t\t\t\t\t\tac = container.getActivityContextFactory().getActivityContext(de.getActivityContextId(),true);\n \n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\thighestPrioritySbbEntity = nextSbbEntityFinder.next(ac, de.getEventTypeId(), de.getService(), sbbEntitiesThatHandledCurrentEvent);\n \t\t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\t\tlogger.warn(\"Failed to find next sbb entity to deliver the event \"+de+\" in \"+ac.getActivityContextId(), e);\n \t\t\t\t\t\t\thighestPrioritySbbEntity = null;\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tif (highestPrioritySbbEntity == null) {\n \t\t\t\t\t\t\tgotSbb = false;\n \t\t\t\t\t\t\tsbbEntitiesThatHandledCurrentEvent.clear();\t\t\t\t\t\t\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tgotSbb = true;\n \t\t\t\t\t\t\tsbbEntitiesThatHandledCurrentEvent.add(highestPrioritySbbEntity.getSbbEntityId());\t\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tif (gotSbb) {\n \n \t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t.debug(\"Highest priority SBB entity, which is attached to the ac \"+de.getActivityContextId()+\" , to deliver the event: \"\n \t\t\t\t\t\t\t\t\t\t\t\t+ highestPrioritySbbEntity.getSbbEntityId());\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// CHANGE CLASS LOADER\n \t\t\t\t\t\t\tinvokerClassLoader = highestPrioritySbbEntity.getSbbComponent().getClassLoader();\n \t\t\t\t\t\t\tThread.currentThread().setContextClassLoader(invokerClassLoader);\n \n \t\t\t\t\t\t\tsbbEntity = highestPrioritySbbEntity;\n \t\t\t\t\t\t\trootSbbEntityId = sbbEntity.getRootSbbId();\n \n \t\t\t\t\t\t\tEventRouterThreadLocals.setInvokingService(sbbEntity.getServiceId());\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Assign an sbb from the pool\n \t\t\t\t\t\t\tsbbEntity.assignAndActivateSbbObject();\n \t\t\t\t\t\t\tsbbObject = sbbEntity.getSbbObject();\n \t\t\t\t\t\t\tsbbObject.sbbLoad();\n \n \t\t\t\t\t\t\t// GET AND CHECK EVENT MASK FOR THIS SBB ENTITY\n \t\t\t\t\t\t\tSet eventMask = sbbEntity.getMaskedEventTypes(de.getActivityContextId());\n \t\t\t\t\t\t\tif (!eventMask.contains(de.getEventTypeId())) {\n \n \t\t\t\t\t\t\t\t// TIME TO INVOKE THE EVENT HANDLER METHOD\n \t\t\t\t\t\t\t\tsbbObject.setSbbInvocationState(SbbInvocationState.INVOKING_EVENT_HANDLER);\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"---> Invoking event handler: ac=\"+de.getActivityContextId()+\" , sbbEntity=\"+sbbEntity.getSbbEntityId()+\" , sbbObject=\"+sbbObject);\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\tsbbEntity.invokeEventHandler(de,ac,eventContextImpl);\n \n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"<--- Invoked event handler: ac=\"+de.getActivityContextId()+\" , sbbEntity=\"+sbbEntity.getSbbEntityId()+\" , sbbObject=\"+sbbObject);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t// check to see if the transaction is marked for\n \t\t\t\t\t\t\t\t// rollback if it is then we need to get out of\n \t\t\t\t\t\t\t\t// here soon as we can.\n \t\t\t\t\t\t\t\tif (txMgr.getRollbackOnly()) {\n \t\t\t\t\t\t\t\t\tthrow new Exception(\"The transaction is marked for rollback\");\n \t\t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t\tsbbObject.setSbbInvocationState(SbbInvocationState.NOT_INVOKING);\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"Not invoking event handler since event is masked\");\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// IF IT'S AN ACTIVITY END EVENT DETACH SBB ENTITY HERE\n \t\t\t\t\t\t\tif (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {\n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"The event is an activity end event, detaching ac=\"+de.getActivityContextId()+\" , sbbEntity=\"+sbbEntity.getSbbEntityId());\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\thighestPrioritySbbEntity.afterACDetach(de.getActivityContextId());\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// CHECK IF WE CAN CLAIM THE ROOT SBB ENTITY\n \t\t\t\t\t\t\tif (rootSbbEntityId != null) {\n \t\t\t\t\t\t\t\tif (SbbEntityFactory.getSbbEntity(rootSbbEntityId).getAttachmentCount() != 0) {\n \t\t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t\t.debug(\"Not removing sbb entity \"+sbbEntity.getSbbEntityId()+\" , the attachment count is not 0\");\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t// the root sbb entity is not be claimed\n \t\t\t\t\t\t\t\t\trootSbbEntityId = null;\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t// it's a root sbb\n \t\t\t\t\t\t\t\tif (!sbbEntity.isRemoved()\t&& sbbEntity.getAttachmentCount() == 0) {\n \t\t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t\t.debug(\"Removing sbb entity \"+sbbEntity.getSbbEntityId()+\" , the attachment count is not 0\");\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t// If it's the same entity then this is an\n \t\t\t\t\t\t\t\t\t// \"Op and\n \t\t\t\t\t\t\t\t\t// Remove Invocation Sequence\"\n \t\t\t\t\t\t\t\t\t// so we do the remove in the same\n \t\t\t\t\t\t\t\t\t// invocation\n \t\t\t\t\t\t\t\t\t// sequence as the Op\n \t\t\t\t\t\t\t\t\tSbbEntityFactory.removeSbbEntityWithCurrentClassLoader(sbbEntity,true);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\tlogger.error(\"Failure while routing event; second phase. DeferredEvent [\"+ de.getEventTypeId() + \"]\", e);\n \t\t\t\t\t\tif (highestPrioritySbbEntity != null) {\n \t\t\t\t\t\t\tsbbObject = highestPrioritySbbEntity.getSbbObject();\n \t\t\t\t\t\t}\n \t\t\t\t\t\tcaught = e;\n \t\t\t\t\t} \n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t// do a final check to see if there is another SBB to\n \t\t\t\t\t// deliver.\n \t\t\t\t\t// We don't want to waste another loop. Note that\n \t\t\t\t\t// rollback\n \t\t\t\t\t// will not has any impact on this because the\n \t\t\t\t\t// ac.DeliveredSet\n \t\t\t\t\t// is not in the cache.\n \t\t\t\t\tif (gotSbb) {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tif (nextSbbEntityFinder.next(ac, de.getEventTypeId(),de.getService(),sbbEntitiesThatHandledCurrentEvent) == null) {\n \t\t\t\t\t\t\t\tgotSbb = false;\n \t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Throwable e) {\n \t\t\t\t\t\t\tgotSbb = false;\n \t\t\t\t\t\t} \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (!gotSbb) {\n\t\t\t\t\t\tde.eventProcessingSucceed();\n\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\t\t\tlogger.debug(\"Delaying commit for 100ms, needed by wrongly designed tck transaction isolation tests. This only happens with DEBUG log level\");\n\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t}\t\t\t\t\t\t\n \t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\tThread.currentThread().setContextClassLoader(\n \t\t\t\t\t\t\toldClassLoader);\n \n \t\t\t\t\tboolean invokeSbbRolledBack = handleRollback.handleRollback(sbbObject, caught, invokerClassLoader,txMgr);\n \n \t\t\t\t\tboolean invokeSbbRolledBackRemove = false;\n \t\t\t\t\tClassLoader rootInvokerClassLoader = null;\n \t\t\t\t\tSbbEntity rootSbbEntity = null;\n \n \t\t\t\t\tif (!invokeSbbRolledBack && rootSbbEntityId != null) {\n \t\t\t\t\t\t/*\n \t\t\t\t\t\t * If we get here this means that we need to do a\n \t\t\t\t\t\t * cascading remove of the root sbb entity - since the\n \t\t\t\t\t\t * original invocation was done on a non-root sbb entity\n \t\t\t\t\t\t * then this is done in a different SLEE originated\n \t\t\t\t\t\t * invocation, but inside the same SLEE originated\n \t\t\t\t\t\t * invocation sequence. Confused yet? This is case 3) in\n \t\t\t\t\t\t * my previous comment - the SLEE originated invocation\n \t\t\t\t\t\t * sequence contains two SLEE originated invocations:\n \t\t\t\t\t\t * One \"Op Only\" and One \"Remove Only\" This is the\n \t\t\t\t\t\t * \"Remove Only\" part. We don't bother doing this if we\n \t\t\t\t\t\t * already need to rollback\n \t\t\t\t\t\t */\n \n \t\t\t\t\t\tcaught = null;\n \n \t\t\t\t\t\toldClassLoader = Thread.currentThread().getContextClassLoader();\n \n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\trootSbbEntity = SbbEntityFactory.getSbbEntity(rootSbbEntityId);\n \n \t\t\t\t\t\t\trootInvokerClassLoader = rootSbbEntity.getSbbComponent().getClassLoader();\n \t\t\t\t\t\t\tThread.currentThread().setContextClassLoader(rootInvokerClassLoader);\n \n \t\t\t\t\t\t\tSbbEntityFactory.removeSbbEntity(rootSbbEntity,true);\n \n \t\t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\t\tlogger.error(\"Failure while routing event; third phase. Event Posting [\"+ de + \"]\", e);\n \t\t\t\t\t\t\tcaught = e;\n \t\t\t\t\t\t} finally {\n \n \t\t\t\t\t\t\tThread.currentThread().setContextClassLoader(oldClassLoader);\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\t// We have no target sbb object in a Remove Only SLEE\n \t\t\t\t\t\t// originated invocation\n \t\t\t\t\t\t// FIXME emmartins review\n \t\t\t\t\t\tinvokeSbbRolledBackRemove = handleRollback.handleRollback(null, caught, rootInvokerClassLoader,txMgr);\n \t\t\t\t\t}\n \n \t\t\t\t\t/*\n \t\t\t\t\t * We are now coming to the end of the SLEE originated\n \t\t\t\t\t * invocation sequence We may need to run sbbRolledBack This\n \t\t\t\t\t * is done in the same tx if there is no target sbb entity\n \t\t\t\t\t * in any of the SLEE originated invocations making up this\n \t\t\t\t\t * SLEE originated invocation sequence Otherwise we do it in\n \t\t\t\t\t * a separate tx for each SLEE originated invocation that\n \t\t\t\t\t * has a target sbb entity. In other words we might have a\n \t\t\t\t\t * maximum of 2 sbbrolledback callbacks invoked in separate\n \t\t\t\t\t * tx in the case this SLEE Originated Invocation Sequence\n \t\t\t\t\t * contained an Op Only and a Remove Only (since these have\n \t\t\t\t\t * different target sbb entities) Pretty obvious really! ;)\n \t\t\t\t\t */\n \t\t\t\t\tif (invokeSbbRolledBack && sbbEntity == null) {\n \t\t\t\t\t\t// We do it in this tx\n \t\t\t\t\t\thandleSbbRollback.handleSbbRolledBack(null, sbbObject, null, null, invokerClassLoader, false, txMgr);\n \t\t\t\t\t} else if (sbbEntity != null && !txMgr.getRollbackOnly()\n \t\t\t\t\t\t\t&& sbbEntity.getSbbObject() != null) {\n \n \t\t\t\t\t\tsbbObject.sbbStore();\n \t\t\t\t\t\tsbbEntity.passivateAndReleaseSbbObject();\n \n \t\t\t\t\t}\n \n \t\t\t\t\tif (txMgr.getRollbackOnly()) {\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Rolling back SLEE Originated Invocation Sequence\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\ttxMgr.rollback();\n \t\t\t\t\t} else {\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Committing SLEE Originated Invocation Sequence\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\ttxMgr.commit();\n \t\t\t\t\t}\n \n \t\t\t\t\t/*\n \t\t\t\t\t * Now we invoke sbbRolledBack for each SLEE originated\n \t\t\t\t\t * invocation that had a target sbb entity in a new tx - the\n \t\t\t\t\t * new tx creating is handled inside the handleSbbRolledBack\n \t\t\t\t\t * method\n \t\t\t\t\t */\n \t\t\t\t\tif (invokeSbbRolledBack && sbbEntity != null) {\n \t\t\t\t\t\t// Firstly for the \"Op only\" or \"Op and Remove\" part\n \t\t\t\t\t\tsbbEntity.getSbbEntityId();\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Invoking sbbRolledBack for Op Only or Op and Remove\");\n \n \t\t\t\t\t\t}\n \t\t\t\t\t\t//FIXME: baranowb: de is passed for test: tests/sbb/abstractclass/SbbRolledBackNewTransaction.xml\n \t\t\t\t\t\thandleSbbRollback.handleSbbRolledBack(sbbEntity, null, de, new ActivityContextInterfaceImpl(ac), invokerClassLoader, false, txMgr);\n \t\t\t\t\t}\n \t\t\t\t\tif (invokeSbbRolledBackRemove) {\n \t\t\t\t\t\t// Now for the \"Remove Only\" if appropriate\n \t\t\t\t\t\thandleSbbRollback.handleSbbRolledBack(rootSbbEntity, null, null, null, rootInvokerClassLoader, true, txMgr);\t\t\t\t\t\t\n \t\t\t\t\t}\n \n \t\t\t\t\t/*\n \t\t\t\t\t * A note on exception handling here- Any exceptions thrown\n \t\t\t\t\t * further further up that need to be caught in order to\n \t\t\t\t\t * handle rollback or otherwise maintain consistency of the\n \t\t\t\t\t * SLEE state are all handled further up I.e. We *do not*\n \t\t\t\t\t * need to call rollback here. So any exceptions that get\n \t\t\t\t\t * here do not result in the SLEE being in an inconsistent\n \t\t\t\t\t * state, therefore we just log them and carry on.\n \t\t\t\t\t */\n \n \t\t\t\t\trollbackTx = false;\n \t\t\t\t} catch (RuntimeException e) {\n \t\t\t\t\tlogger.error(\n \t\t\t\t\t\t\t\"Unhandled RuntimeException in event router: \", e);\n \t\t\t\t} catch (Exception e) {\n \t\t\t\t\tlogger.error(\"Unhandled Exception in event router: \", e);\n \t\t\t\t} catch (Error e) {\n \t\t\t\t\tlogger.error(\"Unhandled Error in event router: \", e);\n \t\t\t\t\tthrow e; // Always rethrow errors\n \t\t\t\t} catch (Throwable t) {\n \t\t\t\t\tlogger.error(\"Unhandled Throwable in event router: \", t);\n \t\t\t\t} finally {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tif (txMgr.getTransaction() != null) {\n \t\t\t\t\t\t\tif (rollbackTx) {\n \t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t.error(\"Rolling back tx in routeTheEvent.\");\n \t\t\t\t\t\t\t\ttxMgr.rollback();\n \t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t.error(\"Transaction left open in routeTheEvent! It has to be pinned down and fixed! Debug information follows.\");\n \t\t\t\t\t\t\t\tlogger.error(txMgr\n \t\t\t\t\t\t\t\t\t\t.displayOngoingSleeTransactions());\n \t\t\t\t\t\t\t\ttxMgr.commit();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (SystemException se) {\n \n \t\t\t\t\t\tlogger.error(\"Failure in TX operation\", se);\n \t\t\t\t\t}\n \t\t\t\t\tif (sbbEntity != null) {\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Finished delivering the event \"\n \t\t\t\t\t\t\t\t\t\t\t+ de.getEventTypeId()\n \t\t\t\t\t\t\t\t\t\t\t+ \" to the sbbEntity = \"\n \t\t\t\t\t\t\t\t\t\t\t+ sbbEntity.getSbbEntityId()\n \t\t\t\t\t\t\t\t\t\t\t+ \"]]] \\n\\n\\n\");\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tEventRouterThreadLocals.setInvokingService(null);\n \t\t\t\t\n \t\t\t\tif (eventContextImpl.isSuspendedNotTransacted()) {\n \t\t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\t\tlogger.debug(\"\\n\\n\\nSuspended event delivery : [[[ eventId \"\n \t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// need to ensure gotSbb = false if and only if iter.hasNext()\n \t\t\t\t// == false\n \t\t\t} while (gotSbb);\n \n \t\t\t\n \t\t\t/*\n \t\t\t * End of SLEE Originated Invocation Sequence\n \t\t\t * ==========================================\n \t\t\t * \n \t\t\t */\n \n \t\t\tif (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {\n \t\t\t\tactivityEndEventPostProcessor.process(de.getActivityContextId(), txMgr, this.container.getActivityContextFactory());\n \t\t\t} else if (de.getEventTypeId().equals(TimerEventImpl.EVENT_TYPE_ID)) {\n \t\t\t\ttimerEventPostProcessor.process(de,this.container.getTimerFacility());\n\t\t\t}\t\t\t\n \n \t\t\t// we got to the end of the event routing, remove the event context\n \t\t\tde.getEventRouterActivity().setCurrentEventContext(null);\n \t\t\t// manage event references\n \t\t\tDeferredEventReferencesManagement eventReferencesManagement = container.getEventRouter().getDeferredEventReferencesManagement();\n \t\t\teventReferencesManagement.eventUnreferencedByActivity(de.getEvent(), de.getActivityContextId());\n \t\t\t\n \t\t} catch (Exception e) {\n \t\t\tlogger.error(\"Unhandled Exception in event router top try\", e);\n \t\t}\n \t}", "private void sendNotification(Download download) {\n }", "@Transactional(propagation = Propagation.REQUIRED)\n public void notifyLongRunningTask(PipelineRun run, Long duration, NotificationSettings settings) {\n LOGGER.debug(messageHelper.getMessage(MessageConstants.INFO_NOTIFICATION_SUBMITTED, run.getPodId()));\n\n final String instanceTypesToExclude = preferenceManager.getPreference(SystemPreferences\n .SYSTEM_NOTIFICATIONS_EXCLUDE_INSTANCE_TYPES);\n\n if (!noneMatchExcludedInstanceType(run, instanceTypesToExclude)) {\n return;\n }\n\n NotificationMessage notificationMessage = new NotificationMessage();\n\n if (settings.isKeepInformedOwner()) {\n PipelineUser pipelineOwner = userManager.loadUserByName(run.getOwner());\n notificationMessage.setToUserId(pipelineOwner.getId());\n }\n\n notificationMessage.setCopyUserIds(getCCUsers(settings));\n\n notificationMessage.setTemplate(new NotificationTemplate(settings.getTemplateId()));\n if (notificationMessage.getTemplate() == null) {\n LOGGER.error(messageHelper.getMessage(MessageConstants.ERROR_NOTIFICATION_NOT_FOUND,\n settings.getTemplateId()));\n }\n\n notificationMessage.setTemplateParameters(PipelineRunMapper.map(run, settings.getThreshold(), duration));\n monitoringNotificationDao.createMonitoringNotification(notificationMessage);\n }", "@Scheduled(cron = \"0 1 * * * *\")\n public void dailyTasks(){\n logger.info(\"Daily task started\");\n\n logger.info(\"Sending overdue emails\");\n List<Payment> overduePayments = new ArrayList<>();\n List<Payment> futurePayments = new ArrayList<>();\n paymentService.addPendingPayments(futurePayments, overduePayments);\n for(Payment overdue: overduePayments){\n Client client = overdue.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + overdue.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n overdueEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", overdue.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(overdue.getAmount()));\n emailSender.sendEmail(email, overdueEmailSubject, overdueEmailBody );\n }\n for(Payment payment: futurePayments){\n Client client = payment.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + payment.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n futureEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", payment.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(payment.getAmount()));\n emailSender.sendEmail(email, futureEmailSubject, futureEmailBody );\n }\n\n }", "@Test\n public void transient_publish_channel_failed() {\n AblyRealtime pubAbly = null;\n String channelName = \"transient_publish_channel_failed_\" + testParams.name;\n try {\n ClientOptions opts = createOptions(testVars.keys[1].keyStr);\n pubAbly = new AblyRealtime(opts);\n new ConnectionWaiter(pubAbly.connection).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", pubAbly.connection.state, ConnectionState.connected);\n\n final Channel pubChannel = pubAbly.channels.get(channelName);\n Helpers.ChannelWaiter channelWaiter = new Helpers.ChannelWaiter(pubChannel);\n pubChannel.attach();\n channelWaiter.waitFor(ChannelState.failed);\n\n Helpers.CompletionWaiter completionWaiter = new Helpers.CompletionWaiter();\n try {\n pubChannel.publish(\"Lorem\", \"Ipsum!\", completionWaiter);\n fail(\"failed to raise expected exception\");\n } catch(AblyException e) {\n assertEquals(pubChannel.state, ChannelState.failed);\n }\n } catch(AblyException e) {\n fail(\"unexpected exception\");\n } finally {\n if(pubAbly != null) {\n pubAbly.close();\n }\n }\n }", "public void setDeliverTo(String deliverTo){\n\t\tthis.deliverTo = deliverTo;\n\t}", "public void processScheduledEvent(HttpArtifactCacheEvent.Scheduled event) {\n if (event.getOperation() != ArtifactCacheEvent.Operation.STORE) {\n return;\n }\n\n scheduledCount.incrementAndGet();\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "CompletableFuture<Exchange> asyncSend(String endpointUri, Exchange exchange);", "public void publish(String topicName, int qos, byte[] payload) throws Throwable {\n /*\n Use a state machine to decide which step to do next. State change occurs\n when a notification is received that an MQTT action has completed\n */\n state = BEGIN;\n while (state != FINISH) {\n switch (state) {\n case BEGIN:\n // Connect using a non-blocking connect\n if (con == null) {\n con = new MqttConnector();\n }\n if (!client.isConnected()) {\n con.doConnect();\n } else {\n state = CONNECTED;\n }\n break;\n case CONNECTED:\n // Publish using a non-blocking publisher\n Publisher pub = new Publisher();\n pub.doPublish(topicName, qos, payload);\n break;\n case PUBLISHED:\n case DISCONNECTED:\n state = FINISH;\n donext = true;\n break;\n case DISCONNECT:\n Disconnector disc = new Disconnector();\n disc.doDisconnect();\n break;\n case ERROR:\n throw ex;\n }\n if (state == BEGIN) {\n waitForStateChange(STATE_CHECK_INTERVAL_LONG);\n } else {\n waitForStateChange(STATE_CHECK_INTERVAL_SHORT);\n }\n }\n }", "public void goToNotificationSettings(String channel) {\n Intent i = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);\n i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());\n i.putExtra(Settings.EXTRA_CHANNEL_ID, channel);\n startActivity(i);\n }", "@Override\n\tprotected void run(String[] args, SessionConfiguration config, Level logLevel)\n\t\t\tthrows SolclientException {\n\n\t\ttry {\n\n\t\t\t// Determine the numberOfMessageToPublish\n\t\t\tint numberOfMessageToPublish = 10;\n\n\t\t\tString strCount = config.getArgBag().get(\"-n\");\n\t\t\tif (strCount != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnumberOfMessageToPublish = Integer.parseInt(strCount);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tprintUsage(config instanceof SecureSessionConfiguration);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Init\n\t\t\tprint(\" Initializing the Java RTO Messaging API...\");\n\t\t\tint rc = Solclient.init(new String[0]);\n\t\t\tassertReturnCode(\"Solclient.init()\", rc, SolEnum.ReturnCode.OK);\n\n\t\t\t// Set a log level (not necessary as there is a default)\n\t\t\tSolclient.setLogLevel(logLevel);\n\t\t\t\n\t\t\t// Context\n\t\t\tprint(\" Creating a context ...\");\n\t\t\trc = Solclient.createContextForHandle(contextHandle, new String[0]);\n\t\t\tassertReturnCode(\"Solclient.createContext()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t// Session\n\t\t\tprint(\" Creating a session ...\");\n\t\t\tString[] sessionProps = getSessionProps(config, 0);\n\t\t\tSessionEventCallback sessionEventCallback = getDefaultSessionEventCallback();\n\t\t\tMessageCallbackSample messageCallback = getMessageCallback(keepRxMsgs);\n\t\t\trc = contextHandle.createSessionForHandle(sessionHandle,\n\t\t\t\t\tsessionProps, messageCallback, sessionEventCallback);\n\t\t\tassertReturnCode(\"contextHandle.createSession()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t// Connect\n\t\t\tprint(\" Connecting session ...\");\n\t\t\trc = sessionHandle.connect();\n\t\t\tassertReturnCode(\"sessionHandle.connect()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t/*************************************************************************\n\t\t\t * Ensure the endpoint provisioning is supported\n\t\t\t *************************************************************************/\n\t\t\tprint(\"Checking for capability SOLCLIENT_SESSION_CAPABILITY_ENDPOINT_MANAGEMENT...\");\n\t\t\tif (!sessionHandle\n\t\t\t\t\t.isCapable(SolEnum.CapabilityName.CAPABILITY_ENDPOINT_MANAGEMENT)) {\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\"Required Capability is not present: Endpoint management not supported.\");\n\t\t\t}\n\n\t\t\t/*************************************************************************\n\t\t\t * Provision Queue\n\t\t\t *************************************************************************/\n\n\t\t\t// Make a name\n\t\t\tString provQueueName = \"sample_queue_Provision__\"\n\t\t\t\t\t+ System.currentTimeMillis() % 100000;\n\n\t\t\tprint(\"Provisioning queue \" + provQueueName + \"] ...\");\n\n\n\n\t\t\t// Queue Properties\n\n\t\t\tint queueProps = 0;\n\n\t\t\tString[] queueProperties = new String[10];\n\n\t\t\tqueueProperties[queueProps++] = Endpoint.PROPERTIES.PERMISSION;\n\t\t\tqueueProperties[queueProps++] = SolEnum.EndpointPermission.MODIFY_TOPIC;\n\n\t\t\tqueueProperties[queueProps++] = Endpoint.PROPERTIES.QUOTA_MB;\n\t\t\tqueueProperties[queueProps++] = \"100\";\n\n\t\t\tqueueProperties[queueProps++] = Endpoint.PROPERTIES.MAXMSG_REDELIVERY;\n\t\t\tqueueProperties[queueProps++] = \"15\";\n\t\t\t\n\t\t\t// The Queue with name\n\t\t\tqueue = Solclient.Allocator.newQueue(provQueueName,queueProperties);\n\n\t\t\trc = sessionHandle.provision(queue, SolEnum.ProvisionFlags.WAIT_FOR_CONFIRM, 0);\n\t\t\tassertReturnCode(\"sessionHandle.provision()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t/*************************************************************************\n\t\t\t * Bind a Flow to the provisioned endpoint\n\t\t\t *************************************************************************/\n\n\t\t\t// Flow Properties\n\t\t\tint flowProps = 0;\n\t\t\tString[] flowProperties = new String[10];\n\n\t\t\tflowProperties[flowProps++] = FlowHandle.PROPERTIES.BIND_BLOCKING;\n\t\t\tflowProperties[flowProps++] = SolEnum.BooleanValue.DISABLE;\n\n\t\t\t/* Set Acknowledge mode to CLIENT_ACK */\n\n\t\t\tflowProperties[flowProps++] = FlowHandle.PROPERTIES.ACKMODE;\n\t\t\tflowProperties[flowProps++] = SolEnum.AckMode.CLIENT;\n\n\t\t\tFlowEventCallback flowEventCallback = getDefaultFlowEventCallback();\n\n\t\t\t/*************************************************************************\n\t\t\t * Creating flow\n\t\t\t *************************************************************************/\n\t\t\tprint(\"Creating flow\");\n\n\t\t\t// Get a Handle flow\n\n\t\t\trc = sessionHandle.createFlowForHandle(flowHandle, flowProperties,\n\t\t\t\t\tqueue, null, messageCallback, flowEventCallback);\n\n\t\t\tassertReturnCode(\"sessionHandle.createFlowForHandle()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.IN_PROGRESS);\n\n\t\t\t// Publish PERSISTENT messages to Queue\n\t\t\tfor (int i = 0; i < numberOfMessageToPublish; i++) {\n\t\t\t\tcommon_publishMessage(sessionHandle, txMessageHandle, queue,\n\t\t\t\t\t\tSolEnum.MessageDeliveryMode.PERSISTENT);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t} catch (InterruptedException ie) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(2000);\n\t\t\t} catch (InterruptedException ie) {\n\t\t\t}\n\n\t\t\tassertExpectedCount(\"Received Message Count\",\n\t\t\t\t\tnumberOfMessageToPublish, messageCallback.getMessageCount());\n\n\t\t\tprint(\"Test Passed\");\n\n\t\t} catch (Throwable t) {\n\t\t\terror(\"An error has occurred \", t);\n\t\t}\n\n\t}" ]
[ "0.60782987", "0.5752535", "0.5609444", "0.48727196", "0.46867263", "0.46596432", "0.4604125", "0.44918615", "0.4461258", "0.4457175", "0.44212052", "0.4415053", "0.4404407", "0.43678582", "0.42900148", "0.4262773", "0.42575958", "0.42281303", "0.41999128", "0.41971117", "0.4179547", "0.41644064", "0.4157414", "0.41565648", "0.41409424", "0.41330427", "0.41260988", "0.4123389", "0.41199324", "0.41081595", "0.4086765", "0.40823552", "0.40626025", "0.4059292", "0.40372393", "0.4033442", "0.40228888", "0.40214148", "0.40197122", "0.40116367", "0.40048498", "0.3996566", "0.39950815", "0.3989417", "0.39877224", "0.39769104", "0.39763358", "0.3972081", "0.39687377", "0.3965774", "0.39544234", "0.3952272", "0.3948869", "0.39482948", "0.39417902", "0.39321488", "0.39292693", "0.3927174", "0.39185774", "0.39166284", "0.3915981", "0.39159516", "0.3902448", "0.3896017", "0.3886048", "0.38812786", "0.38812786", "0.3873567", "0.38724542", "0.38670018", "0.38627556", "0.38621283", "0.3861897", "0.38586298", "0.38577452", "0.38576382", "0.38566375", "0.38464612", "0.38389882", "0.38365704", "0.3825015", "0.38183472", "0.38133648", "0.38109383", "0.38079226", "0.38015664", "0.3800245", "0.3796144", "0.37916675", "0.37825274", "0.37777764", "0.37773702", "0.3776836", "0.37739816", "0.37728867", "0.37684372", "0.37666854", "0.37622622", "0.3762203", "0.37605676" ]
0.6089227
0
Schedules delivery of a configuration snapshot to the Amazon S3 bucket in the specified delivery channel. After the delivery has started, AWS Config sends following notifications using an Amazon SNS topic that you have specified. Notification of starting the delivery. Notification of delivery completed, if the delivery was successfully completed. Notification of delivery failure, if the delivery failed to complete.
public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest, AsyncHandler<DeliverConfigSnapshotRequest, DeliverConfigSnapshotResult> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest,\n AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "@Scheduled(every = \"1s\")\n void schedule() {\n if (message != null) {\n final String endpointUri = \"azure-eventhubs:?connectionString=RAW(\" + connectionString.get() + \")\";\n producerTemplate.sendBody(endpointUri, message + (counter++));\n }\n }", "public AcknowledgableDelivery(Delivery delivery, Channel channel, BiConsumer<Receiver.AcknowledgmentContext, Exception> exceptionHandler) {\n super(delivery.getEnvelope(), delivery.getProperties(), delivery.getBody());\n this.channel = channel;\n this.exceptionHandler = exceptionHandler;\n }", "Update withDestination(EventChannelDestination destination);", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public void putChannel(NotificationsChannel notiChannel) throws Exception;", "void sendScheduledNotifications(JobProgress progress);", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public interface AmazonConfigAsync extends AmazonConfig {\n /**\n * <p>\n * Returns the current status of the specified delivery channel. If a\n * delivery channel is not specified, this action returns the current\n * status of all delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelStatusRequest Container for the\n * necessary parameters to execute the DescribeDeliveryChannelStatus\n * operation on AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannelStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the current status of the specified delivery channel. If a\n * delivery channel is not specified, this action returns the current\n * status of all delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelStatusRequest Container for the\n * necessary parameters to execute the DescribeDeliveryChannelStatus\n * operation on AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannelStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the name of one or more specified configuration recorders.\n * If the recorder name is not specified, this action returns the names\n * of all the configuration recorders associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecordersRequest Container for the\n * necessary parameters to execute the DescribeConfigurationRecorders\n * operation on AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorders service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the name of one or more specified configuration recorders.\n * If the recorder name is not specified, this action returns the names\n * of all the configuration recorders associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecordersRequest Container for the\n * necessary parameters to execute the DescribeConfigurationRecorders\n * operation on AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorders service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest,\n AsyncHandler<DescribeConfigurationRecordersRequest, DescribeConfigurationRecordersResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Starts recording configurations of all the resources associated with\n * the account.\n * </p>\n * <p>\n * You must have created at least one delivery channel to successfully\n * start the configuration recorder.\n * </p>\n *\n * @param startConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StartConfigurationRecorder operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * StartConfigurationRecorder service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Starts recording configurations of all the resources associated with\n * the account.\n * </p>\n * <p>\n * You must have created at least one delivery channel to successfully\n * start the configuration recorder.\n * </p>\n *\n * @param startConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StartConfigurationRecorder operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * StartConfigurationRecorder service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest,\n AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new delivery channel object to deliver the configuration\n * information to an Amazon S3 bucket, and to an Amazon SNS topic.\n * </p>\n * <p>\n * You can use this action to change the Amazon S3 bucket or an Amazon\n * SNS topic of the existing delivery channel. To change the Amazon S3\n * bucket or an Amazon SNS topic, call this action and specify the\n * changed values for the S3 bucket and the SNS topic. If you specify a\n * different value for either the S3 bucket or the SNS topic, this action\n * will keep the existing value for the parameter that is not changed.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param putDeliveryChannelRequest Container for the necessary\n * parameters to execute the PutDeliveryChannel operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * PutDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new delivery channel object to deliver the configuration\n * information to an Amazon S3 bucket, and to an Amazon SNS topic.\n * </p>\n * <p>\n * You can use this action to change the Amazon S3 bucket or an Amazon\n * SNS topic of the existing delivery channel. To change the Amazon S3\n * bucket or an Amazon SNS topic, call this action and specify the\n * changed values for the S3 bucket and the SNS topic. If you specify a\n * different value for either the S3 bucket or the SNS topic, this action\n * will keep the existing value for the parameter that is not changed.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param putDeliveryChannelRequest Container for the necessary\n * parameters to execute the PutDeliveryChannel operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * PutDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putDeliveryChannelAsync(PutDeliveryChannelRequest putDeliveryChannelRequest,\n AsyncHandler<PutDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Deletes the specified delivery channel.\n * </p>\n * <p>\n * The delivery channel cannot be deleted if it is the only delivery\n * channel and the configuration recorder is still running. To delete the\n * delivery channel, stop the running configuration recorder using the\n * StopConfigurationRecorder action.\n * </p>\n *\n * @param deleteDeliveryChannelRequest Container for the necessary\n * parameters to execute the DeleteDeliveryChannel operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DeleteDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Deletes the specified delivery channel.\n * </p>\n * <p>\n * The delivery channel cannot be deleted if it is the only delivery\n * channel and the configuration recorder is still running. To delete the\n * delivery channel, stop the running configuration recorder using the\n * StopConfigurationRecorder action.\n * </p>\n *\n * @param deleteDeliveryChannelRequest Container for the necessary\n * parameters to execute the DeleteDeliveryChannel operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DeleteDeliveryChannel service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest,\n AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Stops recording configurations of all the resources associated with\n * the account.\n * </p>\n *\n * @param stopConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StopConfigurationRecorder operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * StopConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Stops recording configurations of all the resources associated with\n * the account.\n * </p>\n *\n * @param stopConfigurationRecorderRequest Container for the necessary\n * parameters to execute the StopConfigurationRecorder operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * StopConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest,\n AsyncHandler<StopConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Schedules delivery of a configuration snapshot to the Amazon S3\n * bucket in the specified delivery channel. After the delivery has\n * started, AWS Config sends following notifications using an Amazon SNS\n * topic that you have specified.\n * </p>\n * \n * <ul>\n * <li>Notification of starting the delivery.</li>\n * <li>Notification of delivery completed, if the delivery was\n * successfully completed.</li>\n * <li>Notification of delivery failure, if the delivery failed to\n * complete.</li>\n * \n * </ul>\n *\n * @param deliverConfigSnapshotRequest Container for the necessary\n * parameters to execute the DeliverConfigSnapshot operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DeliverConfigSnapshot service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Schedules delivery of a configuration snapshot to the Amazon S3\n * bucket in the specified delivery channel. After the delivery has\n * started, AWS Config sends following notifications using an Amazon SNS\n * topic that you have specified.\n * </p>\n * \n * <ul>\n * <li>Notification of starting the delivery.</li>\n * <li>Notification of delivery completed, if the delivery was\n * successfully completed.</li>\n * <li>Notification of delivery failure, if the delivery failed to\n * complete.</li>\n * \n * </ul>\n *\n * @param deliverConfigSnapshotRequest Container for the necessary\n * parameters to execute the DeliverConfigSnapshot operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DeliverConfigSnapshot service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DeliverConfigSnapshotResult> deliverConfigSnapshotAsync(DeliverConfigSnapshotRequest deliverConfigSnapshotRequest,\n AsyncHandler<DeliverConfigSnapshotRequest, DeliverConfigSnapshotResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new configuration recorder to record the resource\n * configurations.\n * </p>\n * <p>\n * You can use this action to change the role ( <code>roleARN</code> )\n * of an existing recorder. To change the role, call the action on the\n * existing configuration recorder and specify a role.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param putConfigurationRecorderRequest Container for the necessary\n * parameters to execute the PutConfigurationRecorder operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * PutConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Creates a new configuration recorder to record the resource\n * configurations.\n * </p>\n * <p>\n * You can use this action to change the role ( <code>roleARN</code> )\n * of an existing recorder. To change the role, call the action on the\n * existing configuration recorder and specify a role.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param putConfigurationRecorderRequest Container for the necessary\n * parameters to execute the PutConfigurationRecorder operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * PutConfigurationRecorder service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest,\n AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns a list of configuration items for the specified resource. The\n * list contains details about each state of the resource during the\n * specified time interval. You can specify a <code>limit</code> on the\n * number of results returned on the page. If a limit is specified, a\n * <code>nextToken</code> is returned as part of the result that you can\n * use to continue this request.\n * </p>\n * <p>\n * <b>NOTE:</b> Each call to the API is limited to span a duration of\n * seven days. It is likely that the number of records returned is\n * smaller than the specified limit. In such cases, you can make another\n * call, using the nextToken .\n * </p>\n *\n * @param getResourceConfigHistoryRequest Container for the necessary\n * parameters to execute the GetResourceConfigHistory operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * GetResourceConfigHistory service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns a list of configuration items for the specified resource. The\n * list contains details about each state of the resource during the\n * specified time interval. You can specify a <code>limit</code> on the\n * number of results returned on the page. If a limit is specified, a\n * <code>nextToken</code> is returned as part of the result that you can\n * use to continue this request.\n * </p>\n * <p>\n * <b>NOTE:</b> Each call to the API is limited to span a duration of\n * seven days. It is likely that the number of records returned is\n * smaller than the specified limit. In such cases, you can make another\n * call, using the nextToken .\n * </p>\n *\n * @param getResourceConfigHistoryRequest Container for the necessary\n * parameters to execute the GetResourceConfigHistory operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * GetResourceConfigHistory service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest,\n AsyncHandler<GetResourceConfigHistoryRequest, GetResourceConfigHistoryResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns details about the specified delivery channel. If a delivery\n * channel is not specified, this action returns the details of all\n * delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelsRequest Container for the necessary\n * parameters to execute the DescribeDeliveryChannels operation on\n * AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannels service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns details about the specified delivery channel. If a delivery\n * channel is not specified, this action returns the details of all\n * delivery channels associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b> Currently, you can specify only one delivery channel per\n * account.\n * </p>\n *\n * @param describeDeliveryChannelsRequest Container for the necessary\n * parameters to execute the DescribeDeliveryChannels operation on\n * AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeDeliveryChannels service method, as returned by AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest,\n AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the current status of the specified configuration recorder.\n * If a configuration recorder is not specified, this action returns the\n * status of all configuration recorder associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecorderStatusRequest Container for the\n * necessary parameters to execute the\n * DescribeConfigurationRecorderStatus operation on AmazonConfig.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorderStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;\n\n /**\n * <p>\n * Returns the current status of the specified configuration recorder.\n * If a configuration recorder is not specified, this action returns the\n * status of all configuration recorder associated with the account.\n * </p>\n * <p>\n * <b>NOTE:</b>Currently, you can specify only one configuration\n * recorder per account.\n * </p>\n *\n * @param describeConfigurationRecorderStatusRequest Container for the\n * necessary parameters to execute the\n * DescribeConfigurationRecorderStatus operation on AmazonConfig.\n * @param asyncHandler Asynchronous callback handler for events in the\n * life-cycle of the request. Users could provide the implementation of\n * the four callback methods in this interface to process the operation\n * result or handle the exception.\n * \n * @return A Java Future object containing the response from the\n * DescribeConfigurationRecorderStatus service method, as returned by\n * AmazonConfig.\n * \n *\n * @throws AmazonClientException\n * If any internal errors are encountered inside the client while\n * attempting to make the request or handle the response. For example\n * if a network connection is not available.\n * @throws AmazonServiceException\n * If an error response is returned by AmazonConfig indicating\n * either a problem with the data in the request, or a server side issue.\n */\n public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest,\n AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;\n}", "boolean deliver(String busType, String topic, Object event);", "@Scheduled(fixedRateString = \"PT120M\")\n\tvoid someJob(){\n//\t\tString s = \"Testing message.\\nNow time is : \"+new Date();\n////\t\tSystem.out.println(s);\n//\t\tPushNotificationOptions.sendMessageToAllUsers(s);\n//\n\t\t//get all schedules in current dayOfWeek\n\t\tCollection<Notification> notifications = notificationService.findAllByDayOfWeekAndTime();\n\t\tfor(Notification notification : notifications){\n//\t\t\tSystem.out.println(notification.toString());\n//\t\t\tSystem.out.println(!notification.getStatus());\n////\t\t\tSystem.out.println(check(notification.getStartTime()));\n//\t\t\t//check for already not sent notifications , also check for time difference < TIME_CONSTANT\n//\t\t\tif(!notification.getStatus() && check(notification.getStartTime())){\n//\t\t\t\t//send push notification\n//\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n//\t\t\t\t//mark the notification as sent\n//\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n//\t\t\t}\n\t\t\tif(checkForDayTime()){\n\t\t\t\tPushNotificationOptions.sendMessageToAllUsers(notification.getMessage());\n\t\t\t\tnotificationService.setStatus(notification.getNotificationId());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "public void setDeliverLogsPermissionArn(String deliverLogsPermissionArn) {\n this.deliverLogsPermissionArn = deliverLogsPermissionArn;\n }", "@Test\n public final void testAfterSend() throws Exception {\n ChannelController.getInstance().getLocalChannelId(channelId);\n\n final TestChannel channel = new TestChannel();\n\n channel.setChannelId(channelId);\n channel.setServerId(serverId);\n channel.setEnabled(true);\n\n channel.setPreProcessor(new TestPreProcessor());\n channel.setPostProcessor(new TestPostProcessor());\n\n final TestSourceConnector sourceConnector = (TestSourceConnector) TestUtils.createDefaultSourceConnector();\n sourceConnector.setChannel(channel);\n channel.setSourceConnector(sourceConnector);\n channel.setSourceFilterTransformer(TestUtils.createDefaultFilterTransformerExecutor());\n\n final ConnectorProperties connectorProperties = new TestDispatcherProperties();\n ((TestDispatcherProperties) connectorProperties).getQueueConnectorProperties().setQueueEnabled(true);\n ((TestDispatcherProperties) connectorProperties).getQueueConnectorProperties().setSendFirst(true);\n ((TestDispatcherProperties) connectorProperties).getQueueConnectorProperties().setRegenerateTemplate(true);\n\n final DestinationConnector destinationConnector = new TestDispatcher();\n TestUtils.initDefaultDestinationConnector(destinationConnector, connectorProperties);\n destinationConnector.setChannelId(channelId);\n ((TestDispatcher) destinationConnector).setReturnStatus(Status.SENT);\n\n class BlockingTestResponseTransformer extends TestResponseTransformer {\n public volatile boolean waiting = true;\n\n @Override\n public String doTransform(Response response, ConnectorMessage connectorMessage) throws DonkeyException, InterruptedException {\n while (waiting) {\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return super.doTransform(response, connectorMessage);\n }\n }\n final BlockingTestResponseTransformer responseTransformer = new BlockingTestResponseTransformer();\n \n destinationConnector.setResponseTransformerExecutor(TestUtils.createDefaultResponseTransformerExecutor());\n destinationConnector.getResponseTransformerExecutor().setResponseTransformer(responseTransformer);\n\n DestinationChain chain = new DestinationChain();\n chain.setChannelId(channelId);\n chain.setMetaDataReplacer(sourceConnector.getMetaDataReplacer());\n chain.setMetaDataColumns(channel.getMetaDataColumns());\n chain.addDestination(1, TestUtils.createDefaultFilterTransformerExecutor(), destinationConnector);\n channel.addDestinationChain(chain);\n\n if (ChannelController.getInstance().channelExists(channelId)) {\n ChannelController.getInstance().deleteAllMessages(channelId);\n }\n \n channel.deploy();\n channel.start();\n\n class TempClass {\n public long messageId;\n }\n final TempClass tempClass = new TempClass();\n\n for (int i = 1; i <= TEST_SIZE; i++) {\n responseTransformer.waiting = true;\n\n Thread thread = new Thread() {\n @Override\n public void run() {\n ConnectorMessage sourceMessage = TestUtils.createAndStoreNewMessage(new RawMessage(testMessage), channel.getChannelId(), channel.getServerId()).getConnectorMessages().get(0);\n tempClass.messageId = sourceMessage.getMessageId();\n\n try {\n channel.process(sourceMessage, false);\n } catch (InterruptedException e) {\n throw new AssertionError(e);\n }\n }\n };\n thread.start();\n\n Thread.sleep(100);\n // Assert that the response content was stored\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n \n try {\n connection = TestUtils.getConnection();\n long localChannelId = ChannelController.getInstance().getLocalChannelId(channelId);\n statement = connection.prepareStatement(\"SELECT * FROM d_mc\" + localChannelId + \" WHERE message_id = ? AND metadata_id = ? AND content_type = ?\");\n statement.setLong(1, tempClass.messageId);\n statement.setInt(2, 1);\n statement.setInt(3, ContentType.SENT.getContentTypeCode());\n result = statement.executeQuery();\n assertTrue(result.next());\n result.close();\n statement.close();\n \n // Assert that the message status was updated to PENDING\n statement = connection.prepareStatement(\"SELECT * FROM d_mm\" + localChannelId + \" WHERE message_id = ? AND id = ? AND status = ?\");\n statement.setLong(1, tempClass.messageId);\n statement.setInt(2, 1);\n statement.setString(3, String.valueOf(Status.PENDING.getStatusCode()));\n result = statement.executeQuery();\n assertTrue(result.next());\n result.close();\n statement.close();\n \n responseTransformer.waiting = false;\n thread.join();\n \n // Assert that the response transformer was run\n assertTrue(responseTransformer.isTransformed());\n \n // Assert that the message status was updated to SENT\n statement = connection.prepareStatement(\"SELECT * FROM d_mm\" + localChannelId + \" WHERE message_id = ? AND id = ? AND status = ?\");\n statement.setLong(1, tempClass.messageId);\n statement.setInt(2, 1);\n statement.setString(3, String.valueOf(Status.SENT.getStatusCode()));\n result = statement.executeQuery();\n assertTrue(result.next());\n result.close();\n statement.close();\n } finally {\n TestUtils.close(result);\n TestUtils.close(statement);\n TestUtils.close(connection);\n }\n }\n\n channel.stop();\n channel.undeploy();\n //ChannelController.getInstance().removeChannel(channel.getChannelId());\n }", "public void setDeliveryOption(java.lang.String deliveryOption) {\r\n this.deliveryOption = deliveryOption;\r\n }", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest,\n AsyncHandler<DeleteDeliveryChannelRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "@Scheduled\n\tpublic void executeNotification();", "public void setDeliveryDate(String deliveryDate) {\r\n\t\tthis.deliveryDate = deliveryDate;\r\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n System.out.println(\"MQTT Publish Complete\");\n }", "ScheduledFuture<?> scheduleAtFixedRate(Runnable publisher, long period, TimeUnit timeUnit, ProbeLevel probeLevel);", "boolean deliver(String topic, Object event);", "WithCreate withDestination(EventChannelDestination destination);", "@Override\n public void configure() throws Exception\n {\n errorHandler(deadLetterChannel(\"jms:queue:deadLetterQueue?transferExchange=true\"));\n\n /*\n * New User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewUserLog\", \"\",\n \"newUserTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update User Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.UpdateUserLog\", \"\",\n \"userChangeTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Site Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewSiteLog\", \"\",\n \"newSiteTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * New Participant Route\n */\n this.buildRoute(\"edu.bcm.dldcc.big.utility.entity.NewParticipantLog\", \"\",\n \"newParticipantTopic\",\n CaTissueRouteBuilder.SHORT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY);\n\n /*\n * Update Consent Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateConsentLog\", \"\",\n \"updateConsentTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * New Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.NewSpecimenLog\",\n \"\",\n \"newSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY));\n\n /*\n * Update Specimen Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.UpdateSpecimenLog\", \"\",\n \"updateSpecimenTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.SPECIMEN_DELAY\n ));\n\n /*\n * Dynamic Extension Route\n */\n this.triggerScoreboard(this.buildRoute(\n \"edu.bcm.dldcc.big.utility.entity.DynamicExtensionUpdateLog\", \"\",\n \"dynamicExtensionTopic\",\n CaTissueRouteBuilder.DEFAULT_TIMEOUT,\n CaTissueRouteBuilder.DEFAULT_DELAY));\n\n /*\n * Specimen Characteristic Route\n */\n this.triggerScoreboard(from(\n this.getComponentName() + \":\"\n + \"edu.bcm.dldcc.big.utility.entity.SpecimenCharacteristicsLog\"\n + \"?persistenceUnit=\" + this.getInstance().getPersistenceUnit()\n + \"&consumer.delay=\" + CaTissueRouteBuilder.SPECIMEN_DELAY + \n \"&consumeLockEntity=false\").transacted()\n .removeHeaders(\"Camel*\")\n .setHeader(\"instance\", this.constant(this.getInstance().name())));\n\n from(\"jms:queue:annotationUpdateQueue\")\n .aggregate(header(\"JMSCorrelationID\"),\n new MostRecentAggregationStrategy()).completionTimeout(\n CaTissueRouteBuilder.UPDATE_TIMEOUT)\n .to(\"jms:queue:scoreboardQueue\");\n\n from(\"jms:queue:scoreboardQueue\").removeHeaders(\"Camel*\").beanRef(\n \"scoreboard\", \"updateScoreboards\");\n\n }", "@Override\n public void channelRead(final ChannelHandlerContext ctx,final Object msg) {\n deliveryService.delivery(ctx,msg);\n }", "@InSequence(1)\n @Test\n public void worksAfterDeployment() throws InterruptedException {\n int sum = sendMessages(10);\n runJob();\n Assert.assertEquals(10, collector.getLastItemCount());\n Assert.assertEquals(sum, collector.getLastSum());\n Assert.assertEquals(1, collector.getNumberOfJobs());\n }", "boolean deliver(CommInfrastructure busType, String topic, String event);", "@Test\n public void ftpConsumer_build_when_configuration_provided() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, aopProxyProvider,null, null, null, null);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(aopProxyProvider).applyPointcut(with(\"testjob\"),with(emptyScheduleConsumer));\n will(returnValue(emptyScheduleConsumer));\n\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setEager(true)\n .setIgnoreMisfire(true)\n .setTimezone(\"UTC\")\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .setMessageProvider(messageProvider)\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n assertTrue(\"eager should be 'true'\", configuration.isEager() == true);\n assertTrue(\"ignoreMisfire should be 'true'\", configuration.isIgnoreMisfire() == true);\n assertTrue(\"Timezone should be 'true'\", configuration.getTimezone() == \"UTC\");\n\n mockery.assertIsSatisfied();\n }", "@Test\n public void ftpConsumer_build_when_configuration_sftp_conf_provided_and_default_sftpMessageProvider_notsupplied() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, null, jtaTransactionManager, baseFileTransferDao, fileChunkDao, transactionalResourceCommandDAO);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setSourceDirectory(\"test/dir\")\n .setRemoteHost(\"testsftphost\")\n .setRemotePort(22)\n .setUsername(\"testUser\")\n .setPassword(\"testPassword\")\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n assertEquals(\"sourceDirectory should be 'test/dir'\",\"test/dir\", configuration.getSourceDirectory());\n assertEquals(\"remoteHost should be 'testsftphost'\",\"testsftphost\", configuration.getRemoteHost());\n assertEquals(\"remotePort should be '22'\",22, configuration.getRemotePort().intValue());\n assertEquals(\"username should be 'testUser'\",\"testUser\", configuration.getUsername());\n assertEquals(\"password should be 'testPassword'\",\"testPassword\", configuration.getPassword());\n\n\n mockery.assertIsSatisfied();\n }", "public void run() {\n id = Thread.currentThread().getId();\n synchronized (this) {\n this.deliveryPending = true;\n }\n try {\n deliver();\n } catch (Exception ex) {\n Log.warning(Log.FAC_NETMANAGER, \"failed delivery: {0}\", ex);\n } finally {\n synchronized (this) {\n this.deliveryPending = false;\n }\n }\n }", "boolean deliver(CommInfrastructure busType, String topic, Object event);", "public void setExpectedDateOfDelivery(java.util.Date expectedDateOfDelivery) {\r\n this.expectedDateOfDelivery = expectedDateOfDelivery;\r\n }", "@Scheduled(cron = \"0 * * * * *\")\r\n\tpublic void run() {\r\n\r\n\t\tString[] emailArray = new String[emailRecipientList.size()];\r\n\t\temailArray = emailRecipientList.toArray(emailArray);\r\n\t\tLOGGER.debug(\"Sending a email to \" + emailArray);\r\n //Current time\r\n\t\tLocalDateTime now = LocalDateTime.now();\r\n\t\t//Current time - 1 hour\r\n\t\tLocalDateTime after = LocalDateTime.now().minusHours(1);\r\n\r\n\t\tTimestamp dateCreatedBefore = Timestamp.valueOf(now);\r\n\t\tTimestamp dateCreatedAfter = Timestamp.valueOf(after);\r\n\t\t// Search for file id's added for the last hour \r\n\t\tList<Long> ids = infoDataService.searchFileId(null, null, \r\n\t\t\t\tdateCreatedBefore, dateCreatedAfter, null, null,null);\r\n\t\t// Create a email body \r\n\t\tStringBuffer emailBody =new StringBuffer();\r\n\t\temailBody.append(\"New Files Uploaded:\");\r\n for(Long id : ids) {\r\n \ttry {\r\n \t FileInfo metaData = infoDataService.findRecordById(id);\r\n \t emailBody.append(System.lineSeparator());\r\n \t emailBody.append(\"*******************************************************\");\r\n \t emailBody.append(System.lineSeparator());\r\n \t emailBody.append(\"ID:\"+metaData.getId());\r\n \t emailBody.append(\", ORIGINAL NAME: \"+metaData.getFileName());\r\n \t Long size = metaData.getSize()/1000;\r\n \t emailBody.append(\", SIZE (KB):\"+size);\r\n \t emailBody.append((metaData.getPublicAccess())?\", PUBLIC ACCESS: true\":\" , PUBLIC ACCESS: false\");\r\n \t emailBody.append(\", TIME UPLOADED:\"+metaData.getUploadedTs().toLocalDateTime());\r\n \t emailBody.append(System.lineSeparator());\r\n \t}\r\n \tcatch(Exception e) {\r\n \t\temailBody.append(Utilities.NO_DATA_FOR_ID+id); \t\t\r\n \t}\r\n }\r\n // Sending a scheduled email \r\n SimpleMailMessage msg = new SimpleMailMessage();\r\n\t\tmsg.setTo(emailArray);\r\n\t\tmsg.setSubject(Utilities.SCHEDULER_SUBJECT);\r\n\t\tmsg.setText(emailBody.toString());\r\n\t\tmsg.setFrom(emailSender);\r\n\r\n\t\t// TODO\r\n\t\t// Uncomment the next line after adding a correct credentials to the\r\n\t\t// application.properies file\r\n\t\t// javaMailSender.send(msg);\r\n\r\n\t}", "@Test\n public final void testStart() throws Exception {\n TestUtils.initChannel(channelId);\n\n TestChannel channel = new TestChannel();\n\n channel.setChannelId(channelId);\n channel.setServerId(serverId);\n channel.setEnabled(true);\n\n channel.setPreProcessor(new TestPreProcessor());\n channel.setPostProcessor(new TestPostProcessor());\n\n TestSourceConnector sourceConnector = (TestSourceConnector) TestUtils.createDefaultSourceConnector();\n sourceConnector.setChannel(channel);\n channel.setSourceConnector(sourceConnector);\n channel.setSourceFilterTransformer(TestUtils.createDefaultFilterTransformerExecutor());\n\n TestDispatcher destinationConnector = new TestDispatcher();\n TestDispatcherProperties connectorProperties = new TestDispatcherProperties();\n connectorProperties.getQueueConnectorProperties().setQueueEnabled(true);\n TestUtils.initDefaultDestinationConnector(destinationConnector, connectorProperties);\n destinationConnector.setChannelId(channelId);\n\n DestinationChain chain = new DestinationChain();\n chain.setChannelId(channelId);\n chain.setMetaDataReplacer(sourceConnector.getMetaDataReplacer());\n chain.setMetaDataColumns(channel.getMetaDataColumns());\n chain.addDestination(1, TestUtils.createDefaultFilterTransformerExecutor(), destinationConnector);\n channel.addDestinationChain(chain);\n\n // Assert that the destination connector has not been deployed\n assertFalse(destinationConnector.isDeployed());\n // Assert that the destination connector is not running\n assertFalse(destinationConnector.getCurrentState() != ChannelState.STOPPED);\n // Assert that the destination connector queue thread is not running\n assertFalse(destinationConnector.isQueueThreadRunning());\n\n destinationConnector.onDeploy();\n\n // Assert that the destination connector has been deployed\n assertTrue(destinationConnector.isDeployed());\n\n destinationConnector.start();\n Thread.sleep(1000);\n\n // Assert that the destination connector is running\n assertTrue(destinationConnector.getCurrentState() != ChannelState.STOPPED);\n // Assert that the destination connector queue thread is running\n assertTrue(destinationConnector.isQueueThreadRunning());\n\n destinationConnector.stop();\n destinationConnector.onUndeploy();\n ChannelController.getInstance().removeChannel(channel.getChannelId());\n }", "EventChannelDestination destination();", "Delivery createDelivery();", "public PayWithAmazonEvent withSalesChannel(String salesChannel) {\r\n this.salesChannel = salesChannel;\r\n return this;\r\n }", "public void run() {\n synchronized (this) {\n if (deliveryPending) return;\n }\n super.run();\n }", "public void sendDataToCrQueue() {\n List<Shares> sharesList = new ArrayList<>();\n amqpTemplate.convertAndSend(\"queueTestKey\", sharesList);\n }", "private void deliver() {\n synchronized (group) {\n while (group.isDeliveryCalled()) {\n group.setPizza(new Pizza()); // Create a new pizza for the group.\n group.setDeliveryCalled(false); // Resetting the condition variable.\n group.notifyAll(); // Awake all sleeping student threads.\n System.out.println(\"Kamal delivered new Pizza and woke up all\");\n\n try {\n System.out.println(\"Kamal went to sleep\");\n group.wait(); // Delivery thread goes to sleep after delivering the pizza.\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Test(enabled = false)\n public void loggingConfiguration() throws Exception {\n testInfo(this.getClass().getSimpleName() + \" - loggingConfiguration\");\n\n try {\n print(account + \": Fetching bucket logging configuration for \" + bucketName);\n BucketLoggingConfiguration loggingConfig = s3.getBucketLoggingConfiguration(bucketName);\n assertTrue(\"Invalid result for bucket logging configuration\", loggingConfig != null);\n assertTrue(\"Expected bucket logging to be disabled, but got enabled\", !loggingConfig.isLoggingEnabled());\n\n boolean error = false;\n try {\n print(account + \": Setting bucket logging configuration before assigning log-delivery group WRITE and READ_ACP permissions for \" + bucketName);\n s3.setBucketLoggingConfiguration(new SetBucketLoggingConfigurationRequest(bucketName, new BucketLoggingConfiguration(bucketName, bucketName)));\n } catch (AmazonS3Exception ex) {\n assertTrue(\"Expected error code to be 400, but got \" + ex.getStatusCode(), ex.getStatusCode() == 400);\n error = true;\n } finally {\n assertTrue(\n \"Expected AmazonS3Exception for enabling bucket logging configuration before assigning log-delivery group appropriate permissions\", error);\n }\n\n print(account + \": Setting canned ACL log-delivery-write for \" + bucketName);\n s3.setBucketAcl(bucketName, CannedAccessControlList.LogDeliveryWrite);\n\n print(account + \": Getting ACL for bucket \" + bucketName);\n AccessControlList acl = s3.getBucketAcl(bucketName);\n assertTrue(\"Mismatch in number of ACLs associated with the bucket. Expected 3 but got \" + acl.getGrants().size(), acl.getGrants().size() == 3);\n\n Iterator<Grant> iterator = acl.getGrants().iterator();\n while (iterator.hasNext()) {\n Grant grant = iterator.next();\n if (grant.getGrantee() instanceof CanonicalGrantee) {\n assertTrue(\"Expected grantee to be bucket owner \" + acl.getOwner().getId() + \", but found \" + grant.getGrantee().getIdentifier(), grant\n .getGrantee().getIdentifier().equals(acl.getOwner().getId()));\n assertTrue(\"Grantee should have full control\", grant.getPermission().equals(Permission.FullControl));\n } else {\n assertTrue(\"Grantee of type GroupGrantee not found\", grant.getGrantee() instanceof GroupGrantee);\n assertTrue(\"Expected grantee to be LogDelivery but found \" + ((GroupGrantee) grant.getGrantee()),\n ((GroupGrantee) grant.getGrantee()).equals(GroupGrantee.LogDelivery));\n assertTrue(\"Grantee does not have \" + Permission.Write.toString() + \" and/or \" + grant.getPermission().equals(Permission.ReadAcp)\n + \" privileges\", grant.getPermission().equals(Permission.Write) || grant.getPermission().equals(Permission.ReadAcp));\n }\n }\n\n print(account + \": Setting bucket logging configuration after assigning log-delivery group WRITE and READ_ACP permissions for \" + bucketName);\n s3.setBucketLoggingConfiguration(new SetBucketLoggingConfigurationRequest(bucketName, new BucketLoggingConfiguration(bucketName, bucketName)));\n\n print(account + \": Fetching bucket logging configuration for \" + bucketName);\n loggingConfig = s3.getBucketLoggingConfiguration(bucketName);\n assertTrue(\"Invalid result for bucket logging configuration\", loggingConfig != null);\n assertTrue(\"Expected bucket logging to be enabled, but got disabled\", loggingConfig.isLoggingEnabled());\n assertTrue(\"Expected destination bucket to be \" + bucketName + \", but got \" + loggingConfig.getDestinationBucketName(), loggingConfig\n .getDestinationBucketName().equals(bucketName));\n assertTrue(\"Expected log file prefix to be \" + bucketName + \", but got \" + loggingConfig.getLogFilePrefix(), loggingConfig.getLogFilePrefix()\n .equals(bucketName));\n\n } catch (AmazonServiceException ase) {\n printException(ase);\n assertThat(false, \"Failed to run loggingConfiguration\");\n }\n }", "private Consumer<Queue> getConsumerPostStart(SolaceConsumerDestination destination,\n\t\t\t\t\t\t\t\t\t\t\t\t ExtendedConsumerProperties<SolaceConsumerProperties> properties) {\n\t\treturn (queue) -> {\n\t\t\tprovisioningProvider.addSubscriptionToQueue(queue, destination.getBindingDestinationName(), properties.getExtension(), true);\n\n\t\t\t//Process additional subscriptions\n\t\t\tfor (String subscription : destination.getAdditionalSubscriptions()) {\n\t\t\t\tprovisioningProvider.addSubscriptionToQueue(queue, subscription, properties.getExtension(), false);\n\t\t\t}\n\t\t};\n\t}", "@Override\n public void execute() {\n eslClient.getEventNotificationService().register(newEventNotificationConfig(URL)\n .forEvent(EVENT1)\n .forEvent(EVENT2)\n .forEvent(EVENT3));\n\n // Get the registered event notifications\n eventNotificationConfig = eslClient.getEventNotificationService().getEventNotificationConfig();\n }", "void iotvPlay(Channel channel, Schedule schedule);", "public void setDeliverLogsStatus(String deliverLogsStatus) {\n this.deliverLogsStatus = deliverLogsStatus;\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n }", "void configureTasks(ScheduledTaskRegistrar taskRegistrar);", "@Test\n public void ftpConsumer_build_when_configuration_ftp_conf_provided() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, null, null, null, null, null);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setSourceDirectory(\"test/dir\")\n .setFilenamePattern(\"*.txt\")\n .setFilterDuplicates(true)\n .setFilterOnFilename(true)\n .setFilterOnLastModifiedDate(true)\n .setRenameOnSuccess(true)\n .setRenameOnSuccess(true)\n .setMoveOnSuccess(true)\n .setRenameOnSuccessExtension(\".done\")\n .setMoveOnSuccessNewPath(\"done\")\n .setChronological(true)\n .setChunking(true)\n .setChunkSize(200)\n .setChecksum(true)\n .setMinAge(120l)\n .setDestructive(true)\n .setMaxRows(20)\n .setAgeOfFiles(30)\n .setClientID(\"testClientId\")\n .setCleanupJournalOnComplete(true)\n .setRemoteHost(\"testsftphost\")\n .setMaxRetryAttempts(3)\n .setRemotePort(22)\n .setUsername(\"testUser\")\n .setPassword(\"testPassword\")\n .setConnectionTimeout(300)\n .setIsRecursive(true)\n .setFtpsKeyStoreFilePassword(\"ftpsKetStoreFilePass\")\n .setFtpsKeyStoreFilePath(\"ftpsKetStoreFilePath\")\n .setFtpsIsImplicit(true)\n .setFtpsProtocol(\"protocol\")\n .setFtpsPort(24)\n .setFTPS(true)\n .setPasswordFilePath(\"testPasswordFilePath\")\n .setSystemKey(\"testKey\")\n .setSocketTimeout(6000)\n .setDataTimeout(60001)\n .setActive(true)\n .setMessageProvider(messageProvider)\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n assertEquals(\"sourceDirectory should be 'test/dir'\",\"test/dir\", configuration.getSourceDirectory());\n assertEquals(\"filenamePattern should be '*.txt'\",\"*.txt\", configuration.getFilenamePattern());\n assertTrue(\"filterDuplicates should be 'true'\", configuration.getFilterDuplicates());\n assertTrue(\"filterOnFilename should be 'true'\", configuration.getFilterOnFilename());\n assertTrue(\"filterOnFilename should be 'true'\", configuration.getFilterOnFilename());\n assertTrue(\"filterOnLastModifiedDate should be 'true'\", configuration.getFilterOnLastModifiedDate());\n assertTrue(\"renameOnSuccess should be 'true'\", configuration.getRenameOnSuccess());\n assertTrue(\"moveOnSuccess should be 'true'\", configuration.getMoveOnSuccess());\n assertEquals(\"renameOnSuccessExtension should be '.done'\",\".done\", configuration.getRenameOnSuccessExtension());\n assertEquals(\"moveOnSuccessNewPath should be 'done'\",\"done\", configuration.getMoveOnSuccessNewPath());\n assertTrue(\"chronological should be 'true'\", configuration.getChronological());\n assertEquals(\"chunkSize should be '200'\",200, configuration.getChunkSize().intValue());\n assertTrue(\"checksum should be 'true'\", configuration.getChecksum());\n assertEquals(\"minAge should be '120'\",120L, configuration.getMinAge().longValue());\n assertTrue(\"destructive should be 'true'\", configuration.getDestructive());\n assertEquals(\"maxRows should be '20'\",20, configuration.getMaxRows().intValue());\n assertEquals(\"ageOfFiles should be '30'\",30, configuration.getAgeOfFiles().intValue());\n assertEquals(\"clientID should be 'testClientId'\",\"testClientId\", configuration.getClientID());\n assertTrue(\"cleanupJournalOnComplete should be 'true'\", configuration.getCleanupJournalOnComplete());\n assertEquals(\"remoteHost should be 'testsftphost'\",\"testsftphost\", configuration.getRemoteHost());\n assertEquals(\"maxRetryAttempts should be '3'\",3, configuration.getMaxRetryAttempts().intValue());\n assertEquals(\"remotePort should be '22'\",22, configuration.getRemotePort().intValue());\n assertEquals(\"username should be 'testUser'\",\"testUser\", configuration.getUsername());\n assertEquals(\"password should be 'testPassword'\",\"testPassword\", configuration.getPassword());\n assertEquals(\"connectionTimeout should be '300'\",300, configuration.getConnectionTimeout().intValue());\n assertTrue(\"isRecursive should be 'true'\", configuration.getIsRecursive());\n assertEquals(\"ftpsKeyStoreFilePassword should be 'ftpsKetStoreFilePass'\",\"ftpsKetStoreFilePass\", configuration.getFtpsKeyStoreFilePassword());\n assertEquals(\"ftpsKeyStoreFilePath should be 'ftpsKetStoreFilePath'\",\"ftpsKetStoreFilePath\", configuration.getFtpsKeyStoreFilePath());\n assertTrue(\"ftpsIsImplicit should be 'true'\", configuration.getFtpsIsImplicit());\n assertEquals(\"ftpsProtocol should be 'protocol'\",\"protocol\", configuration.getFtpsProtocol());\n assertEquals(\"ftpsPort should be 'protocol'\",24, configuration.getFtpsPort().intValue());\n assertTrue(\"FTPS should be 'true'\", configuration.getFTPS());\n assertEquals(\"passwordFilePath should be 'testPasswordFilePath'\", \"testPasswordFilePath\",configuration.getPasswordFilePath());\n assertEquals(\"systemKey should be 'testKey'\", \"testKey\",configuration.getSystemKey());\n assertEquals(\"socketTimeout should be '6000'\",6000, configuration.getSocketTimeout().intValue());\n assertEquals(\"dataTimeout should be '60001'\",60001, configuration.getDataTimeout().intValue());\n assertTrue(\"active should be 'true'\", configuration.getActive());\n\n mockery.assertIsSatisfied();\n }", "@Override\r\n\t\t\t\t\tpublic void deliveryComplete(IMqttDeliveryToken arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void sendNotification(GAIANotification notification) {\n final String message = notification.getRule()+\",\"+notification.getDescription();\n rabbitTemplate.send(rabbitQueueSend, rabbitQueueSend, new Message(message.getBytes(), new MessageProperties()));\n }", "private boolean _autoShowPush() throws SessionException {\n \n long sleeptime = 1000; //1 second\n String ftString = FileType.toFullFiletype(\n (String) this._argTable.get(CMD.SERVERGROUP),\n (String) this._argTable.get(CMD.FILETYPE)); \n \n //---------------------------\n \n //we don't use this client any more, so get rid of it\n if (this._client != null && this._client.isLoggedOn())\n this._client.logout();\n \n //---------------------------\n \n boolean loggerInitError = !_initSessionLogging(\"Notification\", \n \"Notification Report\");\n if (loggerInitError) \n return false;\n \n //---------------------------\n \n //set output dir\n String outputDir = (String) this._argTable.get(CMD.OUTPUT);\n if (outputDir == null)\n outputDir = System.getProperty(\"user.dir\");\n //this._client.changeDir(outputDir); //no longer using client\n\n\n //get the invoke command string\n String invoke = (String) this._argTable.get(CMD.INVOKE);\n if (invoke != null) {\n invoke.trim();\n if (invoke.length() == 0)\n invoke = null;\n }\n\n //set exit on error flag\n boolean exitOnError = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEEXITONERROR) != null)\n exitOnError = true; \n \n //set invoke async flag\n boolean invokeAsync = false;\n if (invoke != null && this._argTable.get(CMD.INVOKEASYNC) != null)\n invokeAsync = true;\n \n //---------------------------\n \n //check format option, and build new formatter\n String format = (String) this._argTable.get(CMD.FORMAT);\n this._dateFormatter = new DateTimeFormatter(format); \n \n //---------------------------\n \n String msg = \"FEI5 Information on \"\n + DateTimeUtil.getCurrentDateCCSDSAString() + \"\\n\"\n + \"Subscribing to [\" + ftString + \"] file type.\\n\";\n\n if (this._mailmessage)\n this._emailMessageLogger.info(msg);\n this._logger.info(msg);\n\n //---------------------------\n \n boolean success = true;\n boolean timeToExit = false;\n\n //construct a notification client that will generate new file events\n //final List newFileResults = new Vector();\n final PushFileEventQueue<Result> newResultQueue = \n new PushFileEventQueue<Result>();\n final Map clientOptions = (Map) this._argTable.clone(); \n if (!clientOptions.containsKey(CMD.OUTPUT))\n clientOptions.put(CMD.OUTPUT, \".\"); \n \n try {\n _subscriptionClient = new PushSubscriptionClient(\n this._domainFile, clientOptions, \n Constants.AUTOSHOWFILES, true);\n } catch (SessionException sesEx) {\n msg = \"Unable to construct subscription client. Aborting...\";\n this._logger.error(msg);\n this._logger.debug(null, sesEx);\n throw sesEx;\n }\n \n //---------------------------\n \n //construct subscription event listener that adds new files to local\n //file collection\n SubscriptionEventListener subListener = new SubscriptionEventListener() { \n public void eventOccurred(SubscriptionEvent event)\n {\n _logger.trace(\"Received new notification event\"); \n Object obj = event.getObject();\n \n if (obj instanceof Result)\n {\n //get the filename and add it to our queue!\n Result result = (Result) obj;\n \n //test if this file should be retrieve or not\n String filename = result.getName(); \n synchronized(newResultQueue)\n {\n newResultQueue.addItem(result);\n// if (!newFileResults.contains(result))\n// newFileResults.add(result); \n }\n }\n } \n };\n \n //add anon. listener to client\n _subscriptionClient.addSubscriptionEventListener(subListener);\n \n //---------------------------\n \n //launch subscription client on own thread\n Thread subThread = new Thread(_subscriptionClient);\n subThread.setName(\"Notification_Thread_\"+ftString);\n subThread.start();\n \n //---------------------------\n \n //enter loop\n while (_subscriptionClient.isAlive()) {\n long issueTime = System.currentTimeMillis();\n \n Result[] resultArray;\n \n //---------------------------\n \n //lock newFiles collection, create array of Results from\n //contents. \n synchronized(newResultQueue)\n {\n newResultQueue.advanceQueue();\n List<Result> resultList = newResultQueue.getItemsInProcess();\n resultArray = resultList.toArray(new Result[0]);\n// int size = newFileResults.size();\n// resultArray = new Result[0];\n// resultArray = (Result[]) newFileResults.toArray(resultArray);\n } //end synch\n \n \n for (int i = 0; i < resultArray.length; ++i)\n {\n Result result = resultArray[i];\n \n boolean proceed = _handleNewFile(result, outputDir, \n invoke, exitOnError, \n invokeAsync,\n Constants.AUTOSHOWFILES);\n \n if (!proceed)\n {\n timeToExit = true;\n break;\n }\n \n //invoke event handlers\n this._triggerFileResultEvent(Constants.AUTOSHOWFILES, result);\n \n result.commit();\n newResultQueue.removeItem(result);\n //newFileResults.remove(result); //synch'ed Vector\n \n } //end_for_loop\n \n if (timeToExit)\n break;\n \n //---------------------------\n \n //if we have the same connection, check if we should nap\n this._logger.debug(\"Waiting for new files...\");\n try {\n //assume we are gonna sleep...\n boolean shouldSleep = true;\n while(shouldSleep)\n {\n //check to see if we really should sleep\n synchronized(newResultQueue) {\n shouldSleep = newResultQueue.isEmpty();\n }\n shouldSleep = shouldSleep && _subscriptionClient.isAlive();\n if (shouldSleep)\n Thread.sleep(sleeptime);\n }\n } catch (InterruptedException e) {\n break; //exit the infinite loop and return\n }\n }\n \n //---------------------------\n \n //logout of client, close subscription client (moved to beginning)\n //if (this._client != null && this._client.isLoggedOn())\n // this._client.logout();\n \n if (_subscriptionClient != null && _subscriptionClient.isAlive())\n _subscriptionClient.close();\n \n //---------------------------\n \n return success;\n }", "@Override\n\tpublic void channelParted(String channel) {\n\t}", "public void run()\n\tthrows ScheduledTaskException\n{\n\tLog.customer.debug(\"%s::Start of CATMFGDWInvoicePush_FlatFile task ...\",classname);\n\n\t// Read the USPOFlagAction info from cat.dwAction.util\n\tMFGIRFlagAction = ResourceService.getString(\"cat.dwAction\", \"MFGIRFlagAction\");\n\tLog.customer.debug(\"%s::usPOFlagAction ...\", MFGIRFlagAction, classname);\n if (MFGIRFlagAction!=null && ! MFGIRFlagAction.equals(\"None\") && MFGIRFlagAction.indexOf(\"not found\")==-1)\n\t\tisCompletedFlgUpdate = false;\n\tif ( MFGIRFlagAction!=null && MFGIRFlagAction.equals(\"Completed\")&& MFGIRFlagAction.indexOf(\"not found\")==-1)\n \tisCompletedFlgUpdate = true;\n\n\tstartTime = DateFormatter.getStringValue(new ariba.util.core.Date(), \"EEE MMM d hh:mm:ss a z yyyy\", TimeZone.getTimeZone(\"CST\"));\n\tperiodenddate = DateFormatter.toYearMonthDate(Date.getNow());\n\ttry {\n\t\t File out_FlatFile = new File(flatFilePath);\n\t\t Log.customer.debug(\"%s::FilePath:%s\",classname,out_FlatFile);\n\t\t if (!out_FlatFile.exists()) {\n\t\t \tLog.customer.debug(\"%s::if file does not exit then create 1\",classname);\n\t\t\tout_FlatFile.createNewFile();\n\t\t }\n\t\t Log.customer.debug(\"%s::Creating aprint writer obj:\",classname);\n\t\t PrintWriter outPW_FlatFile = new PrintWriter(IOUtil.bufferedOutputStream(out_FlatFile), true);\n\t\t p = Base.getSession().getPartition();\n\t\t message = new FastStringBuffer();\n\t\t mailSubject = \"CATMFGDWInvoicePush_FlatFile Task Completion Status - Completed Successfully\";\n\t\t try\n\t\t {\n\t\t isHeader = false;\n\t\t // Start : SpringRelease_RSD 129 (FDD_131_4.1,4.2 / TDD_131_1.1,1.2)\n\t\t \t\t\t\t\tquery = \"select from ariba.invoicing.core.InvoiceReconciliation\"\n\t\t \t\t\t\t\t+ \" where (DWInvoiceFlag = 'InProcess' or DWInvoiceFlag = 'Processing') \"\n\t\t \t\t\t\t\t+ \"AND this NOT IN (select this from ariba.invoicing.core.InvoiceReconciliation \"\n\t\t \t\t\t\t\t+ \"where (LineItems.Amount.Amount = 0 OR LineItems.Quantity = 0) \"\n\t\t \t\t\t\t\t+ \"AND LineItems.LineType.Category = 1) \";\n \t\t\t\t\t // End : SpringRelease_RSD 129 (FDD_131_4.1,4.2 / TDD_131_1.1,1.2)\n\t\t Log.customer.debug(query);\n AQLQuery aqlquery = null;\n\t\t AQLOptions options = null;\n\t\t AQLResultCollection results = null;\n\n //String topicname = new String(\"InvoiceReconciliationPush\");\n\t\t //String eventsource = new String(\"ibm_caps_invoicereconpush\");\n\n\t\t aqlquery = AQLQuery.parseQuery(query);\n\t\t options = new AQLOptions(p);\n\t\t results = Base.getService().executeQuery(aqlquery, options);\n\t\t totalNumberOfIrs = results.getSize();\n\t\t if(results.getErrors() != null)\n\t\t \tLog.customer.debug(\"ERROR GETTING RESULTS in Results\");\n while(results.next()){\n\t\t\t\tinvrecon = (InvoiceReconciliation)(results.getBaseId(\"InvoiceReconciliation\").get());\n\t\t\t\tif(invrecon != null){\n\t\t\t\t\ttry{\n \tIrLineItem = (BaseVector)invrecon.getLineItems();\n\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Line Item:%s\",classname,IrLineItem);\n\t\t\t\t\t\t// Shaila : Issue 754 : To ensure no IR with zero line item is processed\n\t\t\t\t\t\tint lineCount = invrecon.getLineItemsCount();\n\t\t\t\t\t\tLog.customer.debug(\"%s::Line Item count for IR:%s \",classname,lineCount);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_periodenddate:%s\",classname,periodenddate);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_datasetFacilityCode:%s\",classname,datasetFacilityCode);\n\t\t\t\t\t\t//outPW_FlatFile.write(periodenddate);\n\t\t\t\t\t\t//outPW_FlatFile.write(datasetFacilityCode);\n\t\t\t\t\t\tpartitionNumber = invrecon.getPartitionNumber();\n\t\t\t\t\t\t//String partition_name = String(partitionName);\n\t\t\t\t\t\tLog.customer.debug(\"%s::IR_Partition:%s\",classname,partitionNumber);\n\n\t\t\t\t\t\tif (partitionNumber==3){\n\t\t\t\t\t\t\t//Date pSD = (Date)invrecon.getFieldValue(\"BlockStampDate\");\n\t\t\t\t\t\t\t// Issue 215\n\t\t\t\t\t\t\t//Date pSD = (Date)invrecon.getFieldValue(\"ControlDate\");\n\t\t\t\t\t\t\tDate pSD = (Date)invrecon.getFieldValue(\"ApprovedDate\");\n\t\t\t\t\t\t\tperiodStartdate = DateFormatter.toYearMonthDate(pSD);\n\t\t\t\t\t\t\tLog.customer.debug(\"%s::Period Start Date:%s\",pSD,classname);\n\t\t\t\t\t\t\tpartitionName = \"mfg1\";\n\t\t\t\t\t\t\tihBookdate = DateFormatter.toYearMonthDate(pSD);\n\t\t\t\t\t\t\t//outPW_FlatFile.write(periodStartdate+\"~/\");\n\t\t\t\t\t\t \t//outPW_FlatFile.write(\"U9\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (lineCount > 0){\n \tint IrLineItem_vector = IrLineItem.size();\n\t\t\t\t\t\t\tfor (int i =0; i<IrLineItem_vector;i++){\n\t\t\t\t\t\t\t\tLineItem irli = (LineItem)IrLineItem.get(i);\n\t\t\t\t\t\t\t\toutPW_FlatFile.write(partitionName+\"~|\");\n\t\t\t\t\t\t\t\tirFacilityFlag = (String)invrecon.getFieldValue(\"FacilityFlag\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir facility flag:%s\",classname,irFacilityFlag);\n\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irFacilityFlag)){\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFacilityFlag+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(recordType+\"~|\");\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(fileLayoutVersion+\"~|\"+\"M\"+\"~|\");\n\n\t\t\t\t\t\t\t\tirUniqueName = (String)invrecon.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUniqueName: %s\",classname,irUniqueName);\n\t\t\t\t\t\t\t\t//Start: Q4 2013 - RSD117 - FDD 2/TDD 2\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(irUniqueName+\"~|\");\n\n\t\t\t\t\t\t\t\tString SupInvNumber = (String)invrecon.getDottedFieldValue(\"Invoice.InvoiceNumber\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: SupInvNumber: \"+ SupInvNumber);\n\t\t\t\t\t\t\t\tint invleng = SupInvNumber.length();\n\t\t\t\t\t\t\t\tif (invleng > 35)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString SupInvNumber1 = getFormatattedTxt(SupInvNumber);\n\t\t\t\t\t\t\t\t\tint invleng1 = SupInvNumber1.length();\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: invleng1: \"+ invleng1);\n\t\t\t\t\t\t\t\t\tString FormattedirUniqueName = getFormatattedTxt(irUniqueName, invleng1);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: FormattedirUniqueName: \"+ FormattedirUniqueName);\n\n\t\t\t\t\t\t\t\t\t// Writing IH-Invoice-No - 4\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(FormattedirUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tString FormattedirUniqueName = getFormatattedTxt(irUniqueName, invleng);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile: FormattedirUniqueName: \"+ FormattedirUniqueName);\n\n\t\t\t\t\t\t\t\t\t// Writing IH-Invoice-No - 4\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(FormattedirUniqueName+\"~|\");\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//End: Q4 2013 - RSD117 - FDD 2/TDD 2\n\n\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.1 / TDD_129_1.1)\n\t\t\t\t\t\t\t\tif(invrecon.getFieldValue(\"Supplier\") != null)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tirSupplierLocation = (String)invrecon.getDottedFieldValue(\"Supplier.UniqueName\");\n\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 129 (FDD_129_4.1 / TDD_129_1.1)\n\t\t\t\t\t\t\t\t\tif (irSupplierLocation != null){\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irSupplierLocation:%s\",classname,irSupplierLocation);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irSupplierLocation+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\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\telse{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\tDate Ir_invDate = (Date)invrecon.getFieldValue(\"InvoiceDate\");\n\t\t\t\t\t\t\t\tif (Ir_invDate!=null){\n\t\t\t\t\t\t\t\t\tIrinvdateyymmdd = DateFormatter.toYearMonthDate(Ir_invDate);\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Invoice Date:%s\",classname,Irinvdateyymmdd);\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(Irinvdateyymmdd+\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//Log.customer.debug(\"%s::ihRecordStatus:%s\",classname,ihRecordStatus);\n\t\t\t\t\t\t\t\t//outPW_FlatFile.write(ihRecordStatus+\"~|\");\n\n\t\t\t\t\t\t\t\tMoney IrTotalcost = (Money)invrecon.getFieldValue(\"TotalCost\");\n\t\t\t\t\t\t\t\tif (IrTotalcost!=null){\n\t\t\t\t\t\t\t\t\tIrtotalcostamount = (BigDecimal)invrecon.getDottedFieldValue(\"TotalCost.Amount\");\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Total cost amount:%s\",classname,Irtotalcostamount);\n\t\t\t\t\t\t\t\t\tif (Irtotalcostamount!=null) {\n\t\t\t\t\t\t\t\t\t\tint Ir_tca = Irtotalcostamount.intValue();\n\t\t\t\t\t\t\t\t\t\tif (Ir_tca >= 0) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"01\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (Ir_tca < 0){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"02\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\t\tirTotalCostCurrency = IrTotalcost.getCurrency().getUniqueName();\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irTotalCostCurrency)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalCost Currency:%s\",classname,irTotalCostCurrency);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irTotalCostCurrency+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tirstngTotalCost = BigDecimalFormatter.getStringValue(Irtotalcostamount);\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing IR total cost:%s\",classname,irstngTotalCost);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irstngTotalCost+\"~|\");\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\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\telse {\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ihBookdate+\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t}\n irTotalInvoiceDiscountDollarAmount = (BigDecimal)invrecon.getDottedFieldValue(\"TotalInvoiceDiscountDollarAmount.Amount\");\n\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount:%s\",classname,irTotalInvoiceDiscountDollarAmount);\n\t\t\t\t\t\t\t\t/* if (irTotalInvoiceDiscountDollarAmount==Constants.ZeroBigDecimal) {\n\t\t\t\t\t\t\t\t\t//Log.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount is:%s\",classname,TotalInvoiceDiscountDollarAmount_2);\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"0000000000000.00\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\t\tif (irTotalInvoiceDiscountDollarAmount!=null) {\n\t\t\t\t\t\t\t\t\t\tint ir_TIDDA = irTotalInvoiceDiscountDollarAmount.intValue();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalInvoiceDiscountDollarAmount integer value:%s\",classname,ir_TIDDA);\n\t\t\t\t\t\t\t\t\t\tif (ir_TIDDA==0){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0000000000000.00\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\tstrgDiscountAmount = BigDecimalFormatter.getStringValue(irTotalInvoiceDiscountDollarAmount);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writting the discount amount:%s\",classname,strgDiscountAmount);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(strgDiscountAmount+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n }\n else {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::No value for irTotalInvoiceDiscountDollarAmount so leaving it blanck\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t IrLineItem2 = (InvoiceReconciliationLineItem)IrLineItem.get(i);\n\t\t\t\t\t\t\t\t\t IrnumberInCollection = IrLineItem2.getNumberInCollection();\n\t\t\t\t\t\t\t\t\t numberInCollection = IntegerFormatter.getStringValue(IrnumberInCollection);\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::IR number in collection:%s\",classname,numberInCollection);\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(numberInCollection+\"~|\");\n\n\t\t\t\t\t\t\t\t\t IrLineDescritpiton = IrLineItem2.getDescription();\n\t\t\t\t\t\t\t\t\t if (IrLineDescritpiton!=null){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::IR_LineDescription:%s\",classname,IrLineDescritpiton);\n\t\t\t\t\t\t\t\t\t\tirDescItemNumber = IrLineDescritpiton.getItemNumber(); //what if this is blanck, right now considering blanck also as null\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing IR_LineDescription Item Number:%s\",classname,irDescItemNumber);\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irDescItemNumber)){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irDescItemNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"K\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//Writing item desc-15\n\t\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.2 / TDD_129_1.2)\n\t\t\t\t\t\t\t\t\t\tString descDescription = \"\";\n\t\t\t\t\t\t\t\t\t\tString commonCCId = \"\";\n\t\t\t\t\t\t\t\t\t\tdescDescription_temp = (String)IrLineDescritpiton.getFieldValue(\"Description\");\n\t\t\t\t\t\t\t\t\t\tcommonCC = IrLineDescritpiton.getCommonCommodityCode();\n\t\t\t\t\t\t\t\t\t\tif (commonCC!=null)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tcommonCCId = (String)commonCC.getName().getPrimaryString();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode UniqueName:%s\",classname,commonCCId);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CommonCommdityCode:%s\",classname,commonCCId);\n\n\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(descDescription_temp))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription array is:%s\",classname,descDescription_temp);\n\n\t\t\t\t\t\t\t\t\t\t char[] c_array;\n\t\t\t\t\t\t\t\t\t\t String c_string;\n\t\t\t\t\t\t\t\t\t\t byte[] c_byte_array;\n\t\t\t\t\t\t\t\t\t\t c_array = descDescription_temp.toCharArray();\n\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription:%s\",classname,c_array);\n\t\t\t\t\t\t\t\t\t\t for (char c : c_array)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t c_string = Character.toString(c);\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription:%s\",classname,c_string);\n\n\t\t\t\t\t\t\t\t\t\t\t System.out.print(c_string);\n\t\t\t\t\t\t\t\t\t\t\t c_byte_array = c_string.getBytes();\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription byte array:%s\",classname,c_byte_array);\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::itemDescription byte array length:%s\",classname,c_byte_array.length);\n\n\t\t\t\t\t\t\t\t\t\t\t if (c_byte_array.length > 1)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription byte array length > 1\",classname);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription:%s\",classname,c_byte_array);\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::itemDescription:%s\",classname,c_string);\n\t\t\t\t\t\t\t\t\t\t\t\t\tdescDescription_temp = commonCCId;\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Setting Description as Common commodity code:%s\",classname,descDescription_temp);\n\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 129 (FDD_129_4.2 / TDD_129_1.2)\n\n\t\t\t\t\t\t\t\t\t\t\t// Filtering Non-ASCII characters\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description after checking bytes is:%s\",classname,descDescription_temp);\n\n\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(descDescription_temp))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = descDescription_temp.replaceAll(\"[^\\\\p{ASCII}]\", \"\");\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\r',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\t',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\n',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tdescDescription = StringUtil.replaceCharByChar(descDescription,'\\'',' ');\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description:%s\",classname,descDescription);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(descDescription+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tirCommodityCode = IrLineDescritpiton.getCommonCommodityCode();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode:%s\",classname,irCommodityCode);\n\t\t\t\t\t\t\t\t\t\tif (irCommodityCode!=null){\n\t\t\t\t\t\t\t\t\t\t\tccUniqueName = irCommodityCode.getUniqueName();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Description CommodityCode UniqueName:%s\",classname,ccUniqueName);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ccUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdescSupplierPartNumber = IrLineDescritpiton.getSupplierPartNumber();\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Description_SupplierPartNumber:%s\",classname,descSupplierPartNumber);\n\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(descSupplierPartNumber)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Writing Description_SupplierPartNumber:%s\",classname,descSupplierPartNumber);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(descSupplierPartNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tIrLineType = IrLineItem2.getLineType();\n\t\t\t\t\t\t\t\t\tif(IrLineType!=null){\n\t\t\t\t\t\t\t\t\t\tint category = IrLineType.getCategory();\n\t\t\t\t\t\t\t\t\t\tif (category==1){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"01\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\telse if (category==2){\n\t\t\t\t\t\t\t\t\t\t\tString irLineTypeString = (String)IrLineType.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: LineType of Ir Line::%s\",classname,irLineTypeString);\n\t\t\t\t\t\t\t\t\t\t\tif(irLineTypeString.equals(\"VATCharge\")){\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"96\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"02\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==4){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"05\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==8) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"27\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==16){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"13\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (category==32) {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"12\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tBoolean isHaz = (Boolean)IrLineItem2.getFieldValue(\"IsHazmat\");\n\t\t\t\t\t\t\t\t\t// irHazmat = BooleanFormatter.getStringValue(IrLineItem2.getFieldValue(\"IsHazmat\"));\n\t\t\t\t\t\t\t\t\tif(isHaz != null)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t boolean irHazmatBoolean = isHaz.booleanValue();\n\t\t\t\t\t\t\t\t\t// Log.customer.debug(\"Ir Hazmat value:\",irHazmatBoolean);\n\t\t\t\t\t\t\t\t\t if(irHazmatBoolean)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"3\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0~|\");\n\t\t\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t\tirHazmat = BooleanFormatter.getStringValue(IrLineItem2.getFieldValue(\"IsHazmat\"));\n\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Hazmat value:%s\",classname,irHazmat);\n\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irHazmat)){\n\t\t\t\t\t\t\t\t\t\tif (irHazmat==\"true\"){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"3\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"0~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t*/\n\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129/131 (FDD_129_4.4 / TDD_129_1.4 / FDD_131_4.4/TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t //BigDecimal irliAmount = IrLineItem2.getAmount().getAmount();\n\t\t\t\t\t\t\t\t\t BigDecimal IrLineQuantity1 = IrLineItem2.getQuantity();\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"::IR LineQuantity:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t String irliQuantity = \"\";\n\n\t\t\t\t\t\t\t\t\t // Writing IL-Bill-Qty-20\n\t\t\t\t\t\t\t\t\t if (IrLineQuantity1 != null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\tif(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Its Tax line item passing Quantity as 1: \"+taxLineQuantity);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(taxLineQuantity+\"~|\");\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (IrLineItem2.getAmount().isNegative())\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tif(IrLineQuantity1.intValue() < 0)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"IR LineAmount is negative and quantity is also negative no change required:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tIrLineQuantity1 = IrLineQuantity1.multiply(new BigDecimal(-1));\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"IR LineAmount is negative hence setting LI Quantity as negative:\" +IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tirliQuantity = BigDecimalFormatter.getStringValue(IrLineQuantity1);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR LineQuantity:%s\",classname,irliQuantity);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irliQuantity+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t //End : SpringRelease_RSD 129/131 (FDD_129_4.4 / TDD_129_1.4 / FDD_131_4.4/TDD_131_1.5)\n\n\n\n\t\t\t\t\t\t\t\t\t//IrUOM = (UnitOfMeasure)IrLineDescritpiton.getUnitOfMeasure();\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\n\t\t\t\t\t\t\t\t\t // Writing IL-Bill-Qty-Unit-Of-Measure-21\n\t\t\t\t\t\t\t\t\t //IrUOM = (UnitOfMeasure)IrLineDescritpiton.getUnitOfMeasure();\n\t\t\t\t\t\t\t\t\t String irUOM_UniqueName1 = \"\";\n\n\t\t\t\t\t\t\t\t \tif(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t \t{\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"Its Tax line item passing UOM as LOT: \");\n\t\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(irUOM_UniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if ( IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure\") != null)\n\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Not tax line item\");\n\t\t\t\t\t\t\t\t\t\t\tString uOMUniqueName = (String)IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::uOMUniqueName 1 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t Object irUOM_object = \tIrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.CAPSUnitOfMeasure\");\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::irUOM_object 2 %s\",classname,irUOM_object);\n\t\t\t\t\t\t\t\t\t\t\t if(irUOM_object != null)\n\t\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\t\tirUOM_UniqueName1 = irUOM_object.toString();\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Desc UOM 3:%s\",classname,irUOM_UniqueName1);\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irUOM_UniqueName1))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irUOM_UniqueName1+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUOM_UniqueName writen ti file 4 %s\",classname,irUOM_UniqueName1);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t//\t\t\t\t\t\t\t\t\t\t\t\t\t IF CAPSUnitOfMeasure = Enpty THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 5 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t// IF CAPSUnitOfMeasure = NULL THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 6 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t\t\tif (IrTotalcost!=null){\n\t\t\t\t\t\t\t\t\t\tirTotalCostCurrency = IrTotalcost.getCurrency().getUniqueName();\n\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irTotalCostCurrency)){\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::TotalCost Currency:%s\",classname,irTotalCostCurrency);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irTotalCostCurrency+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t// Start : SpringRelease_RSD 129 (FDD_129_4.4 / TDD_129_1.4)\n\t\t\t\t\t\t\t\t\tirdecsPrice = BigDecimalFormatter.getStringValue(IrLineDescritpiton.getPrice().getAmount().abs());\n\t\t\t\t\t\t\t\t\t // End : SpringRelease_RSD 129 (FDD_129_4.4 / TDD_129_1.4)\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::Ir desc Price:%s\",classname,irdecsPrice);\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irdecsPrice)){\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(irdecsPrice+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t // Start : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\tString irUOM_UniqueName2 = \"\";\n\n\t\t\t\t\t\t\t\t if ( IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure\") != null)\n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t if(IrLineType!=null && IrLineType.getCategory()== 2)\n\t\t\t\t\t\t\t\t\t {\n\n\t\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"Its Tax line item passing UOM as LOT: \");\n\t\t\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(irUOM_UniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// End : SpringRelease_RSD 131 (FDD_131_4.4 / TDD_131_1.5)\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"Not tax line item\");\n\t\t\t\t\t\t\t\t\t\tString uOMUniqueName = (String)IrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::uOMUniqueName 1 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t Object irUOM_object = \tIrLineItem2.getDottedFieldValue(\"Description.UnitOfMeasure.CAPSUnitOfMeasure\");\n\t\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::irUOM_object 2 %s\",classname,irUOM_object);\n\t\t\t\t\t\t\t\t\t\t if(irUOM_object != null)\n\t\t\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t\t\t\tirUOM_UniqueName2 = irUOM_object.toString();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR Desc UOM 3:%s\",classname,irUOM_UniqueName2);\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(irUOM_UniqueName2))\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irUOM_UniqueName2+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::irUOM_UniqueName writen ti file 4 %s\",classname,irUOM_UniqueName2);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\t\t\t\t\t IF CAPSUnitOfMeasure = Enpty THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 5 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// IF CAPSUnitOfMeasure = NULL THEN LineItems.Description.UnitOfMeasure.UniqueName\n\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(uOMUniqueName))\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(uOMUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::CAPSUnitOfMeasure = Enpty 6 %s\",classname,uOMUniqueName);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"1.0\"+\"~|\");\n\t\t\t\t\t\t\t\t\t irLineAmount = BigDecimalFormatter.getStringValue(IrLineItem2.getAmount().getAmount());\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLineAmount)) {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::Ir Line Amount:%s\",classname,irLineAmount);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irLineAmount+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t outPW_FlatFile.write(\"00000.0000\"+\"~|\");\n\t\t\t\t\t\t\t\t\t irLineCapsCharge = (ClusterRoot)IrLineItem2.getFieldValue(\"CapsChargeCode\");\n\t\t\t\t\t\t\t\t\t if (irLineCapsCharge!=null){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::Ir Line caps charge code:%s\",classname,irLineCapsCharge);\n\t\t\t\t\t\t\t\t\t\tirCapsUniqueName = (String)irLineCapsCharge.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir Line caps charge code UniqueName:%s\",classname,irCapsUniqueName);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irCapsUniqueName+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t irLinePoNumber = (String)invrecon.getFieldValue(\"PONumber\");\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLinePoNumber)){\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::IR Line PO Number:%s\",classname,irLinePoNumber);\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(irLinePoNumber+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t irLinePoLineNumber = IntegerFormatter.getIntValue(IrLineItem2.getFieldValue(\"POLineItemNumber\"));\n\t\t\t\t\t\t\t\t\t irLinePoLinenoString = IntegerFormatter.getStringValue(irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::Line po Line number:%s\",classname,irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t if (!StringUtil.nullOrEmptyOrBlankString(irLinePoLinenoString) && !irLinePoLinenoString.equals(\"0\")){\n\n\t\t\t\t\t\t\t\t\t \t\tLog.customer.debug(\"%s::Ir Line Po Line Number:%s\",classname,irLinePoLinenoString);\n\t\t\t\t\t\t\t\t\t \t\t//String irLinePoLinenoString = IntegerFormatter.getStringValue(irLinePoLineNumber);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irLinePoLinenoString+\"~|\");\n\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t \telse {\n\t\t\t\t\t\t\t\t\t \t\t// IF IR.LineItems. POLineItemNumber is NULL THEN SEND VALUE OF 1\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"1\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t if (irLinePoNumber!=null){\n\t\t\t\t\t\t\t\t\t \tif (StringUtil.startsWithIgnoreCase(irLinePoNumber , \"C\")){\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"C\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"P\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"N\"+\"~|\");\n\t\t\t\t\t\t\t\t\t }\n\n\n\t\t\t\t\t\t\t\t\t int partitionNumber_2 = invrecon.getPartitionNumber();\n\t\t\t\t\t\t\t\t\t Log.customer.debug(\"%s::partiton number 2nd place:%s\",classname,partitionNumber_2);\n\t\t\t\t\t\t\t\t\t if (partitionNumber_2==2){\n\t\t\t\t\t\t\t\t\t \tirAccounting = IrLineItem2.getAccountings();\n\t\t\t\t\t\t\t\t\t\tif (irAccounting!=null){\n\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting = (BaseVector)irAccounting.getSplitAccountings();\n\t\t\t\t\t\t\t\t\t\t\tirSplitaccSize = irSplitAccounting.size();\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Split acc size:%s\",classname,irSplitaccSize);\n\t\t\t\t\t\t\t\t\t\t\tif (irSplitaccSize > 0){\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug (\"%s::getting accounting facility\",classname);\n\t\t\t\t\t\t\t\t\t\t\t\tString ir_AccFac= null;\n\t\t\t\t\t\t\t\t\t\t\t\tString ir_Order_name = null;\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int j = 0; j<irSplitaccSize;j++){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting2 = (SplitAccounting)irSplitAccounting.get(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//String irAccountingFacility = (String)irSplitAccounting2.getFieldValue(\"AccountingFacility\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tString irAccountingFacility = (String)irSplitAccounting2.getFieldValue(\"Facility.UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting facility:%s\",classname,irAccountingFacility);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString ir_Order = (String)irSplitAccounting2.getFieldValue(\"Order\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irAccountingFacility)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting facility:%s\",classname,irAccountingFacility);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_AccFac = irAccountingFacility+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(irAccountingFacility+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_AccFac = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!StringUtil.nullOrEmptyOrBlankString(ir_Order)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Accounting Order:%s\",classname,ir_Order);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_Order_name = ir_Order;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tir_Order_name =(\"~|\");\n }\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ir_AccFac);\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(ir_Order_name);\n }\n\t\t\t\t\t\t\t\t\t\t\t else{\n\t\t\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t \toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \tirAccounting = IrLineItem2.getAccountings();\n\t\t\t\t\t\t\t\t\t\tif (irAccounting!=null){\n\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting = (BaseVector)irAccounting.getSplitAccountings();\n\t\t\t\t\t\t\t\t\t\t\tirSplitaccSize = irSplitAccounting.size();\n\t\t\t\t\t\t\t\t\t\t\tif (irSplitaccSize > 0){\n\n\t\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k<irSplitaccSize;k++){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSplitAccounting2 = (SplitAccounting)irSplitAccounting.get(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\tirFacility = (ClusterRoot)irSplitAccounting2.getFieldValue(\"Facility\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irFacility!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tIrFacilityUniqueName = (String)irFacility.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(IrFacilityUniqueName)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Facility:%s\",classname,IrFacilityUniqueName);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = IrFacilityUniqueName+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = IrFacilityUniqueName+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(IrFacilityUniqueName+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\"+\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirFac2 = (\"AA\"+\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirCostCenter = (ClusterRoot)irSplitAccounting2.getFieldValue(\"CostCenter\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irCostCenter!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCC = (String)irCostCenter.getFieldValue(\"CostCenterCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irCC)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Cost Center:%s\",classname,irCC);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = irCC+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirCCString = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirSubAcc = (ClusterRoot)irSplitAccounting2.getFieldValue(\"SubAccount\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irSubAcc!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirSubAccStrng = (String)irSubAcc.getFieldValue(\"UniqueName\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irSubAccStrng)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Sub Account:%s\",classname,irSubAccStrng);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = irSubAccStrng+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirStrngsubacc = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tirAccount = (ClusterRoot)irSplitAccounting2.getFieldValue(\"Account\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(irAccount!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCode = (String)irAccount.getFieldValue(\"AccountCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irAccCode)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Account code:%s\",classname,irAccCode);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCodeStrng = irAccCode+\"~|\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirAccCodeStrng = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tirAccCodeStrng = (\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t }\n }\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac2);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irCCString);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irStrngsubacc);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irAccCodeStrng);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irFac);\n }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\tirBuyerCode = (ClusterRoot)IrLineItem2.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\tif (irBuyerCode!=null){\n\t\t\t\t\t\t\t\t\t\t\t\tirBuyercc = (String)irBuyerCode.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\tif(!StringUtil.nullOrEmptyOrBlankString(irBuyercc)){\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s:: IR Buyer Code:%s\",classname,irBuyercc);\n\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irBuyercc);\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tirLineOrder = (DirectOrder)IrLineItem2.getOrder();\n\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::IR line Purchase Order:%s\",classname,irLineOrder);\n\t\t\t\t\t\t\t\t\t\t\t\tif (irLineOrder!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\tirOrderLineItem = (ariba.purchasing.core.POLineItem)IrLineItem2.getOrderLineItem();\n\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Order Line Item:%s\",classname,irOrderLineItem);\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (irOrderLineItem!=null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tirPOLineBuyerCode = (ClusterRoot)irOrderLineItem.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (irPOLineBuyerCode!= null){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tirPOlinebuyercc = (String)irPOLineBuyerCode.getFieldValue(\"BuyerCode\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::Ir PO Line Buyer Code\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(irPOlinebuyercc +\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t//outPW_FlatFile.write(\"\\n\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//IsAdHoc - catalog or non catalog, Issue #269 - Dharshan\n\t\t\t\t\t\t\t\t\t\tisAdHocBoolean = true;\n\t\t\t\t\t\t\t\t\t\tisAdHoc = null;\n\t\t\t\t\t\t\t\t\t\tif (irli.getDottedFieldValue(\"IsAdHoc\") != null) {\n\t\t\t\t\t\t\t\t\t\t\tisAdHoc = (Boolean) irli.getDottedFieldValue(\"IsAdHoc\");\n\t\t\t\t\t\t\t\t\t\t\tisAdHocBoolean = BooleanFormatter.getBooleanValue(isAdHoc);\n\t\t\t\t\t\t\t\t\t\t\tLog.customer.debug(\"%s::isAdHocBoolean:%s\",classname,isAdHocBoolean);\n\t\t\t\t\t\t\t\t\t\t\tif(isAdHocBoolean == false){\n\t\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|Catalog Item:\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse {Log.customer.debug(\"%s::isAdHocBoolean is true, not catalog item\",classname);\n\t\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse {Log.customer.debug(\"%s::isAdHocBoolean is null, leave blank\",classname);\n\t\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"~|\");\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\toutPW_FlatFile.write(\"\\n\");\n\n\n\n\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t totalNumberOfIrWritten++;\n\t\t\t\t\t\t\t\t\t if(isCompletedFlgUpdate) {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::MFGIRFlagAction is Completed setting DWInvoiceFlag ...\", classname);\n\t\t\t\t\t\t\t\t\t \tinvrecon.setFieldValue(\"DWInvoiceFlag\", \"Completed\");\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t\t \tLog.customer.debug(\"%s::MFGIRFlagAction is None no action req DWInvoiceFlag ...\", classname);\n\t\t\t\t\t\t\t\t\t \tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t catch(Exception e){\n\t\t\t\t\t\t\t \tLog.customer.debug(e.toString());\n\t\t\t\t\t\t\t \tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t //Base.getSession().transactionCommit();\n\t\t\t\t\t\t\t Log.customer.debug(\"Ending DWInvoicePush program .....\");\n\t\t\t\t\t\t\t //invrecon.setFieldValue(\"DWInvoiceFlag\", \"Completed\");\n\t\t\t\t\t\t\t //Update DWPOFlag in DO based on config\n\n\t\t\t\t\t }\n\t\t\t\t }\n }\n\t\t\tcatch(Exception e){\n\t\t\t\tLog.customer.debug(e.toString());\n\t\t\t\tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\n\t\t\t}\n\t\t\tif (outPW_FlatFile!=null){\n\t\t\t\toutPW_FlatFile.flush();\n\t\t\t\toutPW_FlatFile.close();\n\t\t\t}\n\t\t\tendTime = DateFormatter.getStringValue(new Date(), \"EEE MMM d hh:mm:ss a z yyyy\", TimeZone.getTimeZone(\"CST\"));\n //Process runDWFTP = Runtime.getRuntime().exec(\"/usr/bin/sh /msc/arb821/Server/config/java/schedule/DWFileFTP_UK.sh\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tLog.customer.debug(e.toString());\n\t\t\tmessage.append(\"Task start time : \"+ startTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Task end time : \" + endTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"No of IR Written for DW : \"+ totalNumberOfIrWritten);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"No of IR could not be Written :\"+ (totalNumberOfIrs - totalNumberOfIrWritten));\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"CATMFGDWInvoicePush_FlatFile Task Failed - Exception details below\");\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(e.toString());\n\t\t\tmailSubject = \"CATMFGDWInvoicePush_FlatFile Task Failed\";\n\t\t\tLog.customer.debug(\"%s: Inside Exception message \"+ message.toString() , classname);\n\t\t\tnew ScheduledTaskException(\"Error : \" + e.toString(), e);\n throw new ScheduledTaskException(\"Error : \" + e.toString(), e);\n\t\t}\n\t\tfinally {\n\n\t\t\t\t//Change made by Soumya begins\n\t\t\t\tLog.customer.debug(\"%s::Archive File Path:%s\",classname,archiveFileDataPath);\n\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Starting Copying the flat file to Archive \");\n\t\t\t\tCATFaltFileUtil.copyFile(flatFilePath, archiveFileDataPath);\n\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Completed Copying the flat file to Archive \");\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Changing file permission of Data file.\");\n\t\t\t\t\tRuntime.getRuntime().exec(\"chmod 666 \" + flatFilePath);\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Changed file permission of Data file.\");\n\t\t\t\t}catch (IOException e1) {\n\t\t\t\t\tLog.customer.debug(\"CATMFGDWInvoicePush_FlatFile:Error in changing Permission. \"+ e1);\n\t\t\t\t}\n\n\t\t\t\t//Change made by Soumya end\n\n\n\t\t\tLog.customer.debug(\"%s: Inside Finally \", classname);\n\t\t\tmessage.append(\"Task start time : \"+ startTime);\n\t\t\tLog.customer.debug(\"%s: Inside Finally added start time\", classname);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Task end time : \" + endTime);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Total number of IRs to be Written : \"+ totalNumberOfIrs);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tmessage.append(\"Total number of IRs Written : \"+ totalNumberOfIrWritten);\n\t\t\tmessage.append(\"\\n\");\n\t\t\tLog.customer.debug(\"%s: Inside Finally message \"+ message.toString() , classname);\n\n\t\t\t// Sending email\n\t\t\tCatEmailNotificationUtil.sendEmailNotification(mailSubject, message.toString(), \"cat.java.emails\", \"DWPushNotify\");\n\t\t\tmessage = null;\n\t\t\ttotalNumberOfIrWritten =0;\n\t\t\ttotalNumberOfIrs =0;\n\t }\n}", "private void createObject(JSONObject delivery) {\n\t\t//TODO: create the Object\n\t}", "@Override\n public void deliveryComplete(IMqttDeliveryToken token) {\n\n }", "@Override\n\t\t\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\t\t\n\t\t\t}", "public void setGuaranteedDelivery(boolean value) {\r\n this.guaranteedDelivery = value;\r\n }", "@Bean\n public MessageProducer inboundMessageHandler() {\n MqttPahoMessageDrivenChannelAdapter adapter =\n new MqttPahoMessageDrivenChannelAdapter(UUID.randomUUID().toString(), mqttPahoClientFactory.get(), \"/newsMessage/notify\");\n adapter.setCompletionTimeout(5000);\n adapter.setConverter(new JSONMqttMessageConvertor(NewsMessage.class));\n adapter.setQos(1);\n adapter.setOutputChannel(mqttEventHandlerInputChannel);\n return adapter;\n }", "@Override\n public void handleDelivery(String consumerTag, Envelope envelope,\n AMQP.BasicProperties properties, byte[] body) throws IOException \n {\n try\n {\n Object obj = getObjectForBytes(body);\n json = returnJson(obj);\n System.out.println(\"The json is \"+json.toString());\n \n } catch (ClassNotFoundException ex)\n {\n Logger.getLogger(JsonTranslator.class.getName()).log(Level.SEVERE, null, ex);\n }finally \n {\n System.out.println(\" [x] Done\");\n publishJsonData();//VERY INOVATIVE\n //DDO NOT KILL THE \n // channel.basicAck(envelope.getDeliveryTag(), false);\n }\n \n }", "@Override\n\tpublic void showGuaranteedDeliverySection() {\n\n\t}", "@RequestMapping(value = \"/publish\", method = RequestMethod.POST)\n public String publish(@RequestParam(value = \"destination\", required = false, defaultValue = \"**\") String destination) {\n\n final String myUniqueId = \"config-client1:7002\";\n System.out.println(context.getId());\n final MyCustomRemoteEvent event =\n new MyCustomRemoteEvent(this, myUniqueId, destination, \"--------dfsfsdfsdfsdfs\");\n //Since we extended RemoteApplicationEvent and we've configured the scanning of remote events using @RemoteApplicationEventScan, it will be treated as a bus event rather than just a regular ApplicationEvent published in the context.\n //因为我们在启动类上设置了@RemoteApplicationEventScan注解,所以通过context发送的时间将变成一个bus event总线事件,而不是在自身context中发布的一个ApplicationEvent\n context.publishEvent(event);\n\n return \"event published\";\n }", "public PayWithAmazonEvent withFulfillmentChannel(String fulfillmentChannel) {\r\n this.fulfillmentChannel = fulfillmentChannel;\r\n return this;\r\n }", "CompletableFuture<Exchange> asyncSend(String endpointUri, Processor processor);", "public synchronized void run() {\n AmazonOrder currentOrder = null;\n\n do {\n try {\n currentOrder = shippingCenterToSection.blockingGet();\n currentOrder.setShippingSectionID(section);\n\n Thread.sleep(generator.nextInt(5000));\n\n if(currentOrder.getTerminatingKey() != true) {\n\n //System.out.println(\"** Center \"+ currentOrder.getShippingCenterID()+ \" Section\"+ currentOrder.getShippingSectionID()+\" | \"+currentOrder.getCategory());\n sendOrder(sectionToShippingDock, currentOrder);\n\n }\n else if(section == 1){\n Thread.sleep(generator.nextInt(6000));\n sendOrder(sectionToShippingDock, currentOrder);\n }\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt();\n }\n\n }\n while(currentOrder.getTerminatingKey() != true);\n\n //System.out.println(\"\\nCenter \"+center+\" section \"+section +\" terminating\\n\");\n }", "@Override\r\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\r\n\t}", "public void trackDeliveryActivity(ActivityStartEvent activityStartEvent) {\n \tfor (ShipmentTracker shipment: shipments.values()){\n \t\tif (shipment.to==activityStartEvent.getLinkId() ){\n\t\t\t\tif(shipment.driverId == null){\n\t\t\t\t\tif(shipment.shipment.getDeliveryTimeWindow().getStart()<=activityStartEvent.getTime() && activityStartEvent.getTime()<=shipment.shipment.getDeliveryTimeWindow().getEnd()){\n\t\t\t\t\t\tif (shipment.possibleDrivers.contains(activityStartEvent.getPersonId().toString())) {\n\t\t\t\t\t\t\tshipment.driverIdGuess = activityStartEvent.getPersonId();\n\t\t\t\t\t\t\tshipment.deliveryTimeGuess=activityStartEvent.getTime();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (shipment.driverId.toString().equals(activityStartEvent.getPersonId().toString())){\n\t\t\t\t\tshipment.deliveryTime=activityStartEvent.getTime();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void ftpConsumer_build_when_jobName_and_jobGroup_set() {\n\n final ScheduledConsumer emptyScheduleConsumer = new ScheduledConsumer(scheduler);\n FtpConsumerBuilder ftpConsumerBuilder = new FtpConsumerBuilderImpl(emptyScheduleConsumer,\n scheduledJobFactory, aopProxyProvider,null, null, null, null);\n\n // expectations\n mockery.checking(new Expectations()\n {\n {\n // set event factory\n oneOf(aopProxyProvider).applyPointcut(with(\"testjob\"),with(emptyScheduleConsumer));\n will(returnValue(emptyScheduleConsumer));\n\n oneOf(scheduledJobFactory).createJobDetail(with(emptyScheduleConsumer),\n with(is(CoreMatchers.equalTo(ScheduledConsumer.class))),\n with(\"testjob\"),\n with(\"testGroup\"));\n will(returnValue(jobDetail));\n }\n });\n\n Consumer scheduledConsumer = ftpConsumerBuilder\n .setCronExpression(\"121212\")\n .setConfiguredResourceId(\"testConfigId\")\n .setScheduledJobGroupName(\"testGroup\")\n .setScheduledJobName(\"testjob\")\n .setMessageProvider(messageProvider)\n .build();\n\n assertTrue(\"instance should be a ScheduledConsumer\", scheduledConsumer instanceof ScheduledConsumer);\n\n FtpConsumerConfiguration configuration = ((ConfiguredResource<FtpConsumerConfiguration>) scheduledConsumer).getConfiguration();\n assertEquals(\"cronExpression should be '121212'\",\"121212\", configuration.getCronExpression());\n\n mockery.assertIsSatisfied();\n\n }", "private void sendDeliveryRequest(Product product) {\n ACLMessage cfp = new ACLMessage(ACLMessage.CFP);\n try {\n cfp.setContentObject(product);\n } catch (IOException e) {\n System.err.println(\"[STORE] Couldn't set content Object in CFP message with product: \" + product.toString());\n return;\n }\n\n graphicsDisplay.setGreen(\"Product\" + product.getId());\n addBehaviour(new FIPAContractNetInit(this, cfp, couriers));\n }", "public void scheduleRegisterChannel(final SelectableChannel channel, final int operations,\r\n final Object handler) {\r\n\r\n beginInvoke(new Runnable() {\r\n public void run() {\r\n try {\r\n registerChannel(channel, operations, handler);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n });\r\n }", "public void execute(DelegateExecution execution) {\n System.out.println(\"Sending email now\");\n }", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t\t\n\t}", "@Test\n public void give_subscriptionCreatedBeforeLastScheduledDelivery_when_getDailySubscriptionsToDeliver_then_returnSubscription() {\n }", "@Override\n\tpublic void run() {\n\t\tthis.logger.debug(\"activity created sent: \" + body);\n\n\t\tSender sender = new Sender(this.apiKey);\n//\t\tNotification value = new Notification.Builder(\"TiTlE\").body(\"BoDy\").build();\n//\t\tMessage message = new Message.Builder().notification(value)\n//\t\t\t\t.addData(\"message\", body)\n//\t\t\t\t.addData(\"title\", title)\n//\t\t\t\t.build();\n\t\tMessage message = new Message.Builder()\n\t\t\t\t.addData(\"message\", body)\n\t\t\t\t.addData(\"title\", title)\n\t\t\t\t.addData(\"activity_id\", this.activityId)\n\t\t\t\t.build();\n\n\t\ttry {\n\t\t\tResult result = sender.send(message, this.registrationId, 1);\n\t\t\t//System.out.println(\"gcm result success:\" + result.getSuccess() + \" failure:\"+ result.getFailure() + \" fail msg: \" + result.getErrorCodeName());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//System.out.println(\"activity creation notification sent\");\n\n\t}", "@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}", "public interface SftpConsumerBuilder extends ScheduledConsumerBuilder\n{\n SftpConsumerBuilder setCriticalOnStartup(boolean criticalOnStartup);\n\n SftpConsumerBuilder setConfiguredResourceId(String configuredResourceId);\n\n SftpConsumerBuilder setConfiguration(ScheduledConsumerConfiguration scheduledConsumerConfiguration);\n\n SftpConsumerBuilder setMessageProvider(MessageProvider messageProvider);\n\n SftpConsumerBuilder setManagedEventIdentifierService(ManagedEventIdentifierService managedEventIdentifierService);\n\n SftpConsumerBuilder setManagedResourceRecoveryManager(ManagedResourceRecoveryManager managedResourceRecoveryManager);\n\n SftpConsumerBuilder setEventFactory(EventFactory eventFactory);\n\n SftpConsumerBuilder setCronExpression(String cronExpression);\n\n SftpConsumerBuilder setEager(boolean eager);\n\n SftpConsumerBuilder setIgnoreMisfire(boolean ignoreMisfire);\n\n SftpConsumerBuilder setTimezone(String timezone);\n\n SftpConsumerBuilder setSourceDirectory(String sourceDirectory);\n\n SftpConsumerBuilder setFilenamePattern(String filenamePattern);\n\n SftpConsumerBuilder setSourceDirectoryURLFactory(DirectoryURLFactory sourceDirectoryURLFactory);\n\n SftpConsumerBuilder setFilterDuplicates(Boolean filterDuplicates);\n\n SftpConsumerBuilder setFilterOnFilename(Boolean filterOnFilename);\n\n SftpConsumerBuilder setFilterOnLastModifiedDate(Boolean filterOnLastModifiedDate);\n\n SftpConsumerBuilder setRenameOnSuccess(Boolean renameOnSuccess);\n\n SftpConsumerBuilder setRenameOnSuccessExtension(String renameOnSuccessExtension);\n\n SftpConsumerBuilder setMoveOnSuccess(Boolean moveOnSuccess);\n\n SftpConsumerBuilder setMoveOnSuccessNewPath(String moveOnSuccessNewPath);\n\n SftpConsumerBuilder setChronological(Boolean chronological);\n\n SftpConsumerBuilder setChunking(Boolean chunking);\n\n SftpConsumerBuilder setChunkSize(Integer chunkSize);\n\n SftpConsumerBuilder setChecksum(Boolean checksum);\n\n SftpConsumerBuilder setMinAge(Long minAge);\n\n SftpConsumerBuilder setDestructive(Boolean destructive);\n\n SftpConsumerBuilder setMaxRows(Integer maxRows);\n\n SftpConsumerBuilder setAgeOfFiles(Integer ageOfFiles);\n\n SftpConsumerBuilder setClientID(String clientID);\n\n SftpConsumerBuilder setCleanupJournalOnComplete(Boolean cleanupJournalOnComplete);\n\n SftpConsumerBuilder setRemoteHost(String remoteHost);\n\n SftpConsumerBuilder setPrivateKeyFilename(String privateKeyFilename);\n\n SftpConsumerBuilder setMaxRetryAttempts(Integer maxRetryAttempts);\n\n SftpConsumerBuilder setRemotePort(Integer remotePort);\n\n SftpConsumerBuilder setKnownHostsFilename(String knownHostsFilename);\n\n SftpConsumerBuilder setUsername(String username);\n\n SftpConsumerBuilder setPassword(String password);\n\n SftpConsumerBuilder setConnectionTimeout(Integer connectionTimeout);\n\n SftpConsumerBuilder setIsRecursive(Boolean isRecursive);\n\n SftpConsumerBuilder setPreferredKeyExchangeAlgorithm(String preferredKeyExchangeAlgorithm);\n\n SftpConsumerBuilder setScheduledJobGroupName(String scheduledJobGroupName);\n\n SftpConsumerBuilder setScheduledJobName(String scheduledJobName);\n\n \n}", "@Bean\n IntegrationFlow producer() {\n MessageSource<String> messageSource = () -> (run.get() ? MessageBuilder\n .withPayload(\"Greetings @ \" + Instant.now().toString() + \".\").build() : null);\n return IntegrationFlows\n .from(messageSource, ps -> ps.poller(pm -> pm.fixedRate(1000L)))\n .channel(channels.output()).get();\n }", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;", "void schedule(ScheduledJob job);", "private void fireConfigChanged()\n {\n ScmEventBus.getInstance().post(\n new RepositoryHandlerConfigChangedEvent<C>(config));\n }", "@Scheduled(fixedRate = 1000)\n private void send(){\n jmsTemplate.send(\"test.messages\", session -> {\n TextMessage message = session.createTextMessage(Instant.now().toString());\n return message;\n });\n }", "public void setDeliveryclass(String deliveryclass) {\n this.deliveryclass = deliveryclass == null ? null : deliveryclass.trim();\n }", "@Override\n\t\t\tpublic void callStarted(String channel) {\n\t\t\t}", "Response updateChannelWithPayload(@NonNull URL channelLocation, @NonNull ChannelRegistrationPayload channelPayload) {\n String payload = channelPayload.toJsonValue().toString();\n Logger.verbose(\"ChannelApiClient - Updating channel with payload: \" + payload);\n return requestWithPayload(channelLocation, \"PUT\", payload);\n }", "@Override\n\tpublic void deliveryComplete(IMqttDeliveryToken token) {\n\t}", "@Override\n\t\t\t\tpublic void deliveryComplete(MqttDeliveryToken arg0) {\n\t\t\t\t\tSystem.out.println(\"deliveryComplete---------\"\n\t\t\t\t\t\t\t+ arg0.isComplete());\n\t\t\t\t}", "Update withDeliveryPackage(DeliveryPackageInformation deliveryPackage);", "private void routeQueuedEvent() {\n \t\t\n \t\tfinal SleeTransactionManager txMgr = this.container.getTransactionManager();\n \t\t\t\t\n \t\tboolean rollbackTx = true;\n \t\t\n \t\ttry {\n \n \t\t\tEventContextImpl eventContextImpl = de.getEventRouterActivity().getCurrentEventContext();\n \t\t\tif (eventContextImpl == null) {\t\t\t\t\n \t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\tlogger.debug(\"\\n\\n\\nDelivering event : [[[ eventId \"\n \t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t\n \t\t\t\t// event context not set, create it \n \t\t\t\teventContextImpl = new EventContextImpl(de,container);\n \t\t\t\tde.getEventRouterActivity().setCurrentEventContext(eventContextImpl);\n \t\t\t\t// do initial event processing\n \t\t\t\tEventTypeComponent eventTypeComponent = container.getComponentRepositoryImpl().getComponentByID(de.getEventTypeId());\n \t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\tlogger.debug(\"Active services for event \"+de.getEventTypeId()+\": \"+eventTypeComponent.getActiveServicesWhichDefineEventAsInitial());\n \t\t\t\t}\n \t\t\t\tfor (ServiceComponent serviceComponent : eventTypeComponent.getActiveServicesWhichDefineEventAsInitial()) {\n \t\t\t\t\tif (de.getService() == null || de.getService().equals(serviceComponent.getServiceID())) {\n \t\t\t\t\t\tinitialEventProcessor.processInitialEvents(serviceComponent, de, txMgr, this.container.getActivityContextFactory());\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (eventContextImpl.isSuspendedNotTransacted()) {\n \t\t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\t\tlogger.debug(\"\\n\\n\\nFreezing (due to suspended context) event delivery : [[[ eventId \"\n \t\t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t\teventContextImpl.barrierEvent(de);\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\t\tlogger.debug(\"\\n\\n\\nResuming event delivery : [[[ eventId \"\n \t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// For each SBB that is attached to this activity context.\n \t\t\tboolean gotSbb = false;\n \t\t\tdo {\n \t\t\t\t\n \t\t\t\tString rootSbbEntityId = null;\n \t\t\t\tClassLoader invokerClassLoader = null;\n \t\t\t\tSbbEntity sbbEntity = null;\n \t\t\t\tSbbObject sbbObject = null;\n \n \t\t\t\ttry {\n \n \t\t\t\t\t/*\n \t\t\t\t\t * Start of SLEE Originated Invocation Sequence\n \t\t\t\t\t * ============================================== This\n \t\t\t\t\t * sequence consists of either: 1) One \"Op Only\" SLEE\n \t\t\t\t\t * Originated Invocation - in the case that it's a\n \t\t\t\t\t * straightforward event routing for the sbb entity. 2) One\n \t\t\t\t\t * \"Op and Remove\" SLEE Originated Invocation - in the case\n \t\t\t\t\t * it's an event routing to a root sbb entity that ends up\n \t\t\t\t\t * in a remove to the same entity since the attachment count\n \t\t\t\t\t * goes to zero after the event invocation 3) One \"Op Only\"\n \t\t\t\t\t * followed by one \"Remove Only\" SLEE Originated Invocation -\n \t\t\t\t\t * in the case it's an event routing to a non-root sbb\n \t\t\t\t\t * entity that ends up in a remove to the corresponding root\n \t\t\t\t\t * entity since the root attachment count goes to zero after\n \t\t\t\t\t * the event invocation Each Invocation Sequence is handled\n \t\t\t\t\t * in it's own transaction. All exception handling for each\n \t\t\t\t\t * invocation sequence is handled here. Any exceptions that\n \t\t\t\t\t * propagate up aren't necessary to be caught. -Tim\n \t\t\t\t\t */\n \n \t\t\t\t\t// If this fails then we propagate up since there's nothing to roll-back anyway\n \t\t\t\t\t\n \t\t\t\t\ttxMgr.begin();\n \t\t\t\t\t\n \t\t\t\t\tActivityContext ac = null;\n \t\t\t\t\tException caught = null;\n \t\t\t\t\tSbbEntity highestPrioritySbbEntity = null;\n \t\t\t\t\tClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();\n \t\t\t\t\t\n \t\t\t\t\tSet<String> sbbEntitiesThatHandledCurrentEvent = eventContextImpl.getSbbEntitiesThatHandledEvent();\n \t\t\t\t\t\n \t\t\t\t\ttry {\n \t\t\t\t\t\n \t\t\t\t\t\tac = container.getActivityContextFactory().getActivityContext(de.getActivityContextId(),true);\n \n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\thighestPrioritySbbEntity = nextSbbEntityFinder.next(ac, de.getEventTypeId(), de.getService(), sbbEntitiesThatHandledCurrentEvent);\n \t\t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\t\tlogger.warn(\"Failed to find next sbb entity to deliver the event \"+de+\" in \"+ac.getActivityContextId(), e);\n \t\t\t\t\t\t\thighestPrioritySbbEntity = null;\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tif (highestPrioritySbbEntity == null) {\n \t\t\t\t\t\t\tgotSbb = false;\n \t\t\t\t\t\t\tsbbEntitiesThatHandledCurrentEvent.clear();\t\t\t\t\t\t\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tgotSbb = true;\n \t\t\t\t\t\t\tsbbEntitiesThatHandledCurrentEvent.add(highestPrioritySbbEntity.getSbbEntityId());\t\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tif (gotSbb) {\n \n \t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t.debug(\"Highest priority SBB entity, which is attached to the ac \"+de.getActivityContextId()+\" , to deliver the event: \"\n \t\t\t\t\t\t\t\t\t\t\t\t+ highestPrioritySbbEntity.getSbbEntityId());\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// CHANGE CLASS LOADER\n \t\t\t\t\t\t\tinvokerClassLoader = highestPrioritySbbEntity.getSbbComponent().getClassLoader();\n \t\t\t\t\t\t\tThread.currentThread().setContextClassLoader(invokerClassLoader);\n \n \t\t\t\t\t\t\tsbbEntity = highestPrioritySbbEntity;\n \t\t\t\t\t\t\trootSbbEntityId = sbbEntity.getRootSbbId();\n \n \t\t\t\t\t\t\tEventRouterThreadLocals.setInvokingService(sbbEntity.getServiceId());\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Assign an sbb from the pool\n \t\t\t\t\t\t\tsbbEntity.assignAndActivateSbbObject();\n \t\t\t\t\t\t\tsbbObject = sbbEntity.getSbbObject();\n \t\t\t\t\t\t\tsbbObject.sbbLoad();\n \n \t\t\t\t\t\t\t// GET AND CHECK EVENT MASK FOR THIS SBB ENTITY\n \t\t\t\t\t\t\tSet eventMask = sbbEntity.getMaskedEventTypes(de.getActivityContextId());\n \t\t\t\t\t\t\tif (!eventMask.contains(de.getEventTypeId())) {\n \n \t\t\t\t\t\t\t\t// TIME TO INVOKE THE EVENT HANDLER METHOD\n \t\t\t\t\t\t\t\tsbbObject.setSbbInvocationState(SbbInvocationState.INVOKING_EVENT_HANDLER);\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"---> Invoking event handler: ac=\"+de.getActivityContextId()+\" , sbbEntity=\"+sbbEntity.getSbbEntityId()+\" , sbbObject=\"+sbbObject);\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\tsbbEntity.invokeEventHandler(de,ac,eventContextImpl);\n \n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"<--- Invoked event handler: ac=\"+de.getActivityContextId()+\" , sbbEntity=\"+sbbEntity.getSbbEntityId()+\" , sbbObject=\"+sbbObject);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t// check to see if the transaction is marked for\n \t\t\t\t\t\t\t\t// rollback if it is then we need to get out of\n \t\t\t\t\t\t\t\t// here soon as we can.\n \t\t\t\t\t\t\t\tif (txMgr.getRollbackOnly()) {\n \t\t\t\t\t\t\t\t\tthrow new Exception(\"The transaction is marked for rollback\");\n \t\t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t\tsbbObject.setSbbInvocationState(SbbInvocationState.NOT_INVOKING);\n \t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"Not invoking event handler since event is masked\");\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// IF IT'S AN ACTIVITY END EVENT DETACH SBB ENTITY HERE\n \t\t\t\t\t\t\tif (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {\n \t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t.debug(\"The event is an activity end event, detaching ac=\"+de.getActivityContextId()+\" , sbbEntity=\"+sbbEntity.getSbbEntityId());\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\thighestPrioritySbbEntity.afterACDetach(de.getActivityContextId());\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\t// CHECK IF WE CAN CLAIM THE ROOT SBB ENTITY\n \t\t\t\t\t\t\tif (rootSbbEntityId != null) {\n \t\t\t\t\t\t\t\tif (SbbEntityFactory.getSbbEntity(rootSbbEntityId).getAttachmentCount() != 0) {\n \t\t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t\t.debug(\"Not removing sbb entity \"+sbbEntity.getSbbEntityId()+\" , the attachment count is not 0\");\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t// the root sbb entity is not be claimed\n \t\t\t\t\t\t\t\t\trootSbbEntityId = null;\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\t// it's a root sbb\n \t\t\t\t\t\t\t\tif (!sbbEntity.isRemoved()\t&& sbbEntity.getAttachmentCount() == 0) {\n \t\t\t\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t\t\t.debug(\"Removing sbb entity \"+sbbEntity.getSbbEntityId()+\" , the attachment count is not 0\");\n \t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t// If it's the same entity then this is an\n \t\t\t\t\t\t\t\t\t// \"Op and\n \t\t\t\t\t\t\t\t\t// Remove Invocation Sequence\"\n \t\t\t\t\t\t\t\t\t// so we do the remove in the same\n \t\t\t\t\t\t\t\t\t// invocation\n \t\t\t\t\t\t\t\t\t// sequence as the Op\n \t\t\t\t\t\t\t\t\tSbbEntityFactory.removeSbbEntityWithCurrentClassLoader(sbbEntity,true);\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\tlogger.error(\"Failure while routing event; second phase. DeferredEvent [\"+ de.getEventTypeId() + \"]\", e);\n \t\t\t\t\t\tif (highestPrioritySbbEntity != null) {\n \t\t\t\t\t\t\tsbbObject = highestPrioritySbbEntity.getSbbObject();\n \t\t\t\t\t\t}\n \t\t\t\t\t\tcaught = e;\n \t\t\t\t\t} \n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t// do a final check to see if there is another SBB to\n \t\t\t\t\t// deliver.\n \t\t\t\t\t// We don't want to waste another loop. Note that\n \t\t\t\t\t// rollback\n \t\t\t\t\t// will not has any impact on this because the\n \t\t\t\t\t// ac.DeliveredSet\n \t\t\t\t\t// is not in the cache.\n \t\t\t\t\tif (gotSbb) {\n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tif (nextSbbEntityFinder.next(ac, de.getEventTypeId(),de.getService(),sbbEntitiesThatHandledCurrentEvent) == null) {\n \t\t\t\t\t\t\t\tgotSbb = false;\n \t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Throwable e) {\n \t\t\t\t\t\t\tgotSbb = false;\n \t\t\t\t\t\t} \n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (!gotSbb) {\n\t\t\t\t\t\tde.eventProcessingSucceed();\n\t\t\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\t\t\tlogger.debug(\"Delaying commit for 100ms, needed by wrongly designed tck transaction isolation tests. This only happens with DEBUG log level\");\n\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t}\t\t\t\t\t\t\n \t\t\t\t\t}\n\t\t\t\t\t\n \t\t\t\t\tThread.currentThread().setContextClassLoader(\n \t\t\t\t\t\t\toldClassLoader);\n \n \t\t\t\t\tboolean invokeSbbRolledBack = handleRollback.handleRollback(sbbObject, caught, invokerClassLoader,txMgr);\n \n \t\t\t\t\tboolean invokeSbbRolledBackRemove = false;\n \t\t\t\t\tClassLoader rootInvokerClassLoader = null;\n \t\t\t\t\tSbbEntity rootSbbEntity = null;\n \n \t\t\t\t\tif (!invokeSbbRolledBack && rootSbbEntityId != null) {\n \t\t\t\t\t\t/*\n \t\t\t\t\t\t * If we get here this means that we need to do a\n \t\t\t\t\t\t * cascading remove of the root sbb entity - since the\n \t\t\t\t\t\t * original invocation was done on a non-root sbb entity\n \t\t\t\t\t\t * then this is done in a different SLEE originated\n \t\t\t\t\t\t * invocation, but inside the same SLEE originated\n \t\t\t\t\t\t * invocation sequence. Confused yet? This is case 3) in\n \t\t\t\t\t\t * my previous comment - the SLEE originated invocation\n \t\t\t\t\t\t * sequence contains two SLEE originated invocations:\n \t\t\t\t\t\t * One \"Op Only\" and One \"Remove Only\" This is the\n \t\t\t\t\t\t * \"Remove Only\" part. We don't bother doing this if we\n \t\t\t\t\t\t * already need to rollback\n \t\t\t\t\t\t */\n \n \t\t\t\t\t\tcaught = null;\n \n \t\t\t\t\t\toldClassLoader = Thread.currentThread().getContextClassLoader();\n \n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\trootSbbEntity = SbbEntityFactory.getSbbEntity(rootSbbEntityId);\n \n \t\t\t\t\t\t\trootInvokerClassLoader = rootSbbEntity.getSbbComponent().getClassLoader();\n \t\t\t\t\t\t\tThread.currentThread().setContextClassLoader(rootInvokerClassLoader);\n \n \t\t\t\t\t\t\tSbbEntityFactory.removeSbbEntity(rootSbbEntity,true);\n \n \t\t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\t\tlogger.error(\"Failure while routing event; third phase. Event Posting [\"+ de + \"]\", e);\n \t\t\t\t\t\t\tcaught = e;\n \t\t\t\t\t\t} finally {\n \n \t\t\t\t\t\t\tThread.currentThread().setContextClassLoader(oldClassLoader);\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\t// We have no target sbb object in a Remove Only SLEE\n \t\t\t\t\t\t// originated invocation\n \t\t\t\t\t\t// FIXME emmartins review\n \t\t\t\t\t\tinvokeSbbRolledBackRemove = handleRollback.handleRollback(null, caught, rootInvokerClassLoader,txMgr);\n \t\t\t\t\t}\n \n \t\t\t\t\t/*\n \t\t\t\t\t * We are now coming to the end of the SLEE originated\n \t\t\t\t\t * invocation sequence We may need to run sbbRolledBack This\n \t\t\t\t\t * is done in the same tx if there is no target sbb entity\n \t\t\t\t\t * in any of the SLEE originated invocations making up this\n \t\t\t\t\t * SLEE originated invocation sequence Otherwise we do it in\n \t\t\t\t\t * a separate tx for each SLEE originated invocation that\n \t\t\t\t\t * has a target sbb entity. In other words we might have a\n \t\t\t\t\t * maximum of 2 sbbrolledback callbacks invoked in separate\n \t\t\t\t\t * tx in the case this SLEE Originated Invocation Sequence\n \t\t\t\t\t * contained an Op Only and a Remove Only (since these have\n \t\t\t\t\t * different target sbb entities) Pretty obvious really! ;)\n \t\t\t\t\t */\n \t\t\t\t\tif (invokeSbbRolledBack && sbbEntity == null) {\n \t\t\t\t\t\t// We do it in this tx\n \t\t\t\t\t\thandleSbbRollback.handleSbbRolledBack(null, sbbObject, null, null, invokerClassLoader, false, txMgr);\n \t\t\t\t\t} else if (sbbEntity != null && !txMgr.getRollbackOnly()\n \t\t\t\t\t\t\t&& sbbEntity.getSbbObject() != null) {\n \n \t\t\t\t\t\tsbbObject.sbbStore();\n \t\t\t\t\t\tsbbEntity.passivateAndReleaseSbbObject();\n \n \t\t\t\t\t}\n \n \t\t\t\t\tif (txMgr.getRollbackOnly()) {\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Rolling back SLEE Originated Invocation Sequence\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\ttxMgr.rollback();\n \t\t\t\t\t} else {\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Committing SLEE Originated Invocation Sequence\");\n \t\t\t\t\t\t}\n \t\t\t\t\t\ttxMgr.commit();\n \t\t\t\t\t}\n \n \t\t\t\t\t/*\n \t\t\t\t\t * Now we invoke sbbRolledBack for each SLEE originated\n \t\t\t\t\t * invocation that had a target sbb entity in a new tx - the\n \t\t\t\t\t * new tx creating is handled inside the handleSbbRolledBack\n \t\t\t\t\t * method\n \t\t\t\t\t */\n \t\t\t\t\tif (invokeSbbRolledBack && sbbEntity != null) {\n \t\t\t\t\t\t// Firstly for the \"Op only\" or \"Op and Remove\" part\n \t\t\t\t\t\tsbbEntity.getSbbEntityId();\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Invoking sbbRolledBack for Op Only or Op and Remove\");\n \n \t\t\t\t\t\t}\n \t\t\t\t\t\t//FIXME: baranowb: de is passed for test: tests/sbb/abstractclass/SbbRolledBackNewTransaction.xml\n \t\t\t\t\t\thandleSbbRollback.handleSbbRolledBack(sbbEntity, null, de, new ActivityContextInterfaceImpl(ac), invokerClassLoader, false, txMgr);\n \t\t\t\t\t}\n \t\t\t\t\tif (invokeSbbRolledBackRemove) {\n \t\t\t\t\t\t// Now for the \"Remove Only\" if appropriate\n \t\t\t\t\t\thandleSbbRollback.handleSbbRolledBack(rootSbbEntity, null, null, null, rootInvokerClassLoader, true, txMgr);\t\t\t\t\t\t\n \t\t\t\t\t}\n \n \t\t\t\t\t/*\n \t\t\t\t\t * A note on exception handling here- Any exceptions thrown\n \t\t\t\t\t * further further up that need to be caught in order to\n \t\t\t\t\t * handle rollback or otherwise maintain consistency of the\n \t\t\t\t\t * SLEE state are all handled further up I.e. We *do not*\n \t\t\t\t\t * need to call rollback here. So any exceptions that get\n \t\t\t\t\t * here do not result in the SLEE being in an inconsistent\n \t\t\t\t\t * state, therefore we just log them and carry on.\n \t\t\t\t\t */\n \n \t\t\t\t\trollbackTx = false;\n \t\t\t\t} catch (RuntimeException e) {\n \t\t\t\t\tlogger.error(\n \t\t\t\t\t\t\t\"Unhandled RuntimeException in event router: \", e);\n \t\t\t\t} catch (Exception e) {\n \t\t\t\t\tlogger.error(\"Unhandled Exception in event router: \", e);\n \t\t\t\t} catch (Error e) {\n \t\t\t\t\tlogger.error(\"Unhandled Error in event router: \", e);\n \t\t\t\t\tthrow e; // Always rethrow errors\n \t\t\t\t} catch (Throwable t) {\n \t\t\t\t\tlogger.error(\"Unhandled Throwable in event router: \", t);\n \t\t\t\t} finally {\n \t\t\t\t\ttry {\n \t\t\t\t\t\tif (txMgr.getTransaction() != null) {\n \t\t\t\t\t\t\tif (rollbackTx) {\n \t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t.error(\"Rolling back tx in routeTheEvent.\");\n \t\t\t\t\t\t\t\ttxMgr.rollback();\n \t\t\t\t\t\t\t} else {\n \t\t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t\t.error(\"Transaction left open in routeTheEvent! It has to be pinned down and fixed! Debug information follows.\");\n \t\t\t\t\t\t\t\tlogger.error(txMgr\n \t\t\t\t\t\t\t\t\t\t.displayOngoingSleeTransactions());\n \t\t\t\t\t\t\t\ttxMgr.commit();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (SystemException se) {\n \n \t\t\t\t\t\tlogger.error(\"Failure in TX operation\", se);\n \t\t\t\t\t}\n \t\t\t\t\tif (sbbEntity != null) {\n \t\t\t\t\t\tif (logger.isDebugEnabled()) {\n \t\t\t\t\t\t\tlogger\n \t\t\t\t\t\t\t\t\t.debug(\"Finished delivering the event \"\n \t\t\t\t\t\t\t\t\t\t\t+ de.getEventTypeId()\n \t\t\t\t\t\t\t\t\t\t\t+ \" to the sbbEntity = \"\n \t\t\t\t\t\t\t\t\t\t\t+ sbbEntity.getSbbEntityId()\n \t\t\t\t\t\t\t\t\t\t\t+ \"]]] \\n\\n\\n\");\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tEventRouterThreadLocals.setInvokingService(null);\n \t\t\t\t\n \t\t\t\tif (eventContextImpl.isSuspendedNotTransacted()) {\n \t\t\t\t\tif (logger.isDebugEnabled())\n \t\t\t\t\t\tlogger.debug(\"\\n\\n\\nSuspended event delivery : [[[ eventId \"\n \t\t\t\t\t\t\t+ de.getEventTypeId() + \" on ac \"+de.getActivityContextId()+\"\\n\");\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// need to ensure gotSbb = false if and only if iter.hasNext()\n \t\t\t\t// == false\n \t\t\t} while (gotSbb);\n \n \t\t\t\n \t\t\t/*\n \t\t\t * End of SLEE Originated Invocation Sequence\n \t\t\t * ==========================================\n \t\t\t * \n \t\t\t */\n \n \t\t\tif (de.getEventTypeId().equals(ActivityEndEventImpl.EVENT_TYPE_ID)) {\n \t\t\t\tactivityEndEventPostProcessor.process(de.getActivityContextId(), txMgr, this.container.getActivityContextFactory());\n \t\t\t} else if (de.getEventTypeId().equals(TimerEventImpl.EVENT_TYPE_ID)) {\n \t\t\t\ttimerEventPostProcessor.process(de,this.container.getTimerFacility());\n\t\t\t}\t\t\t\n \n \t\t\t// we got to the end of the event routing, remove the event context\n \t\t\tde.getEventRouterActivity().setCurrentEventContext(null);\n \t\t\t// manage event references\n \t\t\tDeferredEventReferencesManagement eventReferencesManagement = container.getEventRouter().getDeferredEventReferencesManagement();\n \t\t\teventReferencesManagement.eventUnreferencedByActivity(de.getEvent(), de.getActivityContextId());\n \t\t\t\n \t\t} catch (Exception e) {\n \t\t\tlogger.error(\"Unhandled Exception in event router top try\", e);\n \t\t}\n \t}", "private void sendNotification(Download download) {\n }", "@Transactional(propagation = Propagation.REQUIRED)\n public void notifyLongRunningTask(PipelineRun run, Long duration, NotificationSettings settings) {\n LOGGER.debug(messageHelper.getMessage(MessageConstants.INFO_NOTIFICATION_SUBMITTED, run.getPodId()));\n\n final String instanceTypesToExclude = preferenceManager.getPreference(SystemPreferences\n .SYSTEM_NOTIFICATIONS_EXCLUDE_INSTANCE_TYPES);\n\n if (!noneMatchExcludedInstanceType(run, instanceTypesToExclude)) {\n return;\n }\n\n NotificationMessage notificationMessage = new NotificationMessage();\n\n if (settings.isKeepInformedOwner()) {\n PipelineUser pipelineOwner = userManager.loadUserByName(run.getOwner());\n notificationMessage.setToUserId(pipelineOwner.getId());\n }\n\n notificationMessage.setCopyUserIds(getCCUsers(settings));\n\n notificationMessage.setTemplate(new NotificationTemplate(settings.getTemplateId()));\n if (notificationMessage.getTemplate() == null) {\n LOGGER.error(messageHelper.getMessage(MessageConstants.ERROR_NOTIFICATION_NOT_FOUND,\n settings.getTemplateId()));\n }\n\n notificationMessage.setTemplateParameters(PipelineRunMapper.map(run, settings.getThreshold(), duration));\n monitoringNotificationDao.createMonitoringNotification(notificationMessage);\n }", "@Test\n public void transient_publish_channel_failed() {\n AblyRealtime pubAbly = null;\n String channelName = \"transient_publish_channel_failed_\" + testParams.name;\n try {\n ClientOptions opts = createOptions(testVars.keys[1].keyStr);\n pubAbly = new AblyRealtime(opts);\n new ConnectionWaiter(pubAbly.connection).waitFor(ConnectionState.connected);\n assertEquals(\"Verify connected state reached\", pubAbly.connection.state, ConnectionState.connected);\n\n final Channel pubChannel = pubAbly.channels.get(channelName);\n Helpers.ChannelWaiter channelWaiter = new Helpers.ChannelWaiter(pubChannel);\n pubChannel.attach();\n channelWaiter.waitFor(ChannelState.failed);\n\n Helpers.CompletionWaiter completionWaiter = new Helpers.CompletionWaiter();\n try {\n pubChannel.publish(\"Lorem\", \"Ipsum!\", completionWaiter);\n fail(\"failed to raise expected exception\");\n } catch(AblyException e) {\n assertEquals(pubChannel.state, ChannelState.failed);\n }\n } catch(AblyException e) {\n fail(\"unexpected exception\");\n } finally {\n if(pubAbly != null) {\n pubAbly.close();\n }\n }\n }", "@Scheduled(cron = \"0 1 * * * *\")\n public void dailyTasks(){\n logger.info(\"Daily task started\");\n\n logger.info(\"Sending overdue emails\");\n List<Payment> overduePayments = new ArrayList<>();\n List<Payment> futurePayments = new ArrayList<>();\n paymentService.addPendingPayments(futurePayments, overduePayments);\n for(Payment overdue: overduePayments){\n Client client = overdue.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + overdue.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n overdueEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", overdue.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(overdue.getAmount()));\n emailSender.sendEmail(email, overdueEmailSubject, overdueEmailBody );\n }\n for(Payment payment: futurePayments){\n Client client = payment.getClient();\n if(client == null) throw new IllegalStateException(\"Payment \" + payment.getId() + \" should have a valid client \");\n String email = client.getEmail();\n if(StringUtils.isEmpty(email)) continue;\n futureEmailBody.replaceAll(\"\\\\$name\", client.getFirstName()).replaceAll(\"\\\\$unit\", payment.getUnit().getName()).replaceAll(\"\\\\amount\", String.valueOf(payment.getAmount()));\n emailSender.sendEmail(email, futureEmailSubject, futureEmailBody );\n }\n\n }", "public void setDeliverTo(String deliverTo){\n\t\tthis.deliverTo = deliverTo;\n\t}", "public void processScheduledEvent(HttpArtifactCacheEvent.Scheduled event) {\n if (event.getOperation() != ArtifactCacheEvent.Operation.STORE) {\n return;\n }\n\n scheduledCount.incrementAndGet();\n }", "@Override\n public void deliveryComplete(IMqttDeliveryToken arg0) {\n try {\n if(arg0.getMessage()==null){\n //messageDelivered = true;\n }\n } catch (MqttException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "CompletableFuture<Exchange> asyncSend(String endpointUri, Exchange exchange);", "public void goToNotificationSettings(String channel) {\n Intent i = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);\n i.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());\n i.putExtra(Settings.EXTRA_CHANNEL_ID, channel);\n startActivity(i);\n }", "public void publish(String topicName, int qos, byte[] payload) throws Throwable {\n /*\n Use a state machine to decide which step to do next. State change occurs\n when a notification is received that an MQTT action has completed\n */\n state = BEGIN;\n while (state != FINISH) {\n switch (state) {\n case BEGIN:\n // Connect using a non-blocking connect\n if (con == null) {\n con = new MqttConnector();\n }\n if (!client.isConnected()) {\n con.doConnect();\n } else {\n state = CONNECTED;\n }\n break;\n case CONNECTED:\n // Publish using a non-blocking publisher\n Publisher pub = new Publisher();\n pub.doPublish(topicName, qos, payload);\n break;\n case PUBLISHED:\n case DISCONNECTED:\n state = FINISH;\n donext = true;\n break;\n case DISCONNECT:\n Disconnector disc = new Disconnector();\n disc.doDisconnect();\n break;\n case ERROR:\n throw ex;\n }\n if (state == BEGIN) {\n waitForStateChange(STATE_CHECK_INTERVAL_LONG);\n } else {\n waitForStateChange(STATE_CHECK_INTERVAL_SHORT);\n }\n }\n }", "@Override\n\tprotected void run(String[] args, SessionConfiguration config, Level logLevel)\n\t\t\tthrows SolclientException {\n\n\t\ttry {\n\n\t\t\t// Determine the numberOfMessageToPublish\n\t\t\tint numberOfMessageToPublish = 10;\n\n\t\t\tString strCount = config.getArgBag().get(\"-n\");\n\t\t\tif (strCount != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnumberOfMessageToPublish = Integer.parseInt(strCount);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\tprintUsage(config instanceof SecureSessionConfiguration);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Init\n\t\t\tprint(\" Initializing the Java RTO Messaging API...\");\n\t\t\tint rc = Solclient.init(new String[0]);\n\t\t\tassertReturnCode(\"Solclient.init()\", rc, SolEnum.ReturnCode.OK);\n\n\t\t\t// Set a log level (not necessary as there is a default)\n\t\t\tSolclient.setLogLevel(logLevel);\n\t\t\t\n\t\t\t// Context\n\t\t\tprint(\" Creating a context ...\");\n\t\t\trc = Solclient.createContextForHandle(contextHandle, new String[0]);\n\t\t\tassertReturnCode(\"Solclient.createContext()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t// Session\n\t\t\tprint(\" Creating a session ...\");\n\t\t\tString[] sessionProps = getSessionProps(config, 0);\n\t\t\tSessionEventCallback sessionEventCallback = getDefaultSessionEventCallback();\n\t\t\tMessageCallbackSample messageCallback = getMessageCallback(keepRxMsgs);\n\t\t\trc = contextHandle.createSessionForHandle(sessionHandle,\n\t\t\t\t\tsessionProps, messageCallback, sessionEventCallback);\n\t\t\tassertReturnCode(\"contextHandle.createSession()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t// Connect\n\t\t\tprint(\" Connecting session ...\");\n\t\t\trc = sessionHandle.connect();\n\t\t\tassertReturnCode(\"sessionHandle.connect()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t/*************************************************************************\n\t\t\t * Ensure the endpoint provisioning is supported\n\t\t\t *************************************************************************/\n\t\t\tprint(\"Checking for capability SOLCLIENT_SESSION_CAPABILITY_ENDPOINT_MANAGEMENT...\");\n\t\t\tif (!sessionHandle\n\t\t\t\t\t.isCapable(SolEnum.CapabilityName.CAPABILITY_ENDPOINT_MANAGEMENT)) {\n\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\"Required Capability is not present: Endpoint management not supported.\");\n\t\t\t}\n\n\t\t\t/*************************************************************************\n\t\t\t * Provision Queue\n\t\t\t *************************************************************************/\n\n\t\t\t// Make a name\n\t\t\tString provQueueName = \"sample_queue_Provision__\"\n\t\t\t\t\t+ System.currentTimeMillis() % 100000;\n\n\t\t\tprint(\"Provisioning queue \" + provQueueName + \"] ...\");\n\n\n\n\t\t\t// Queue Properties\n\n\t\t\tint queueProps = 0;\n\n\t\t\tString[] queueProperties = new String[10];\n\n\t\t\tqueueProperties[queueProps++] = Endpoint.PROPERTIES.PERMISSION;\n\t\t\tqueueProperties[queueProps++] = SolEnum.EndpointPermission.MODIFY_TOPIC;\n\n\t\t\tqueueProperties[queueProps++] = Endpoint.PROPERTIES.QUOTA_MB;\n\t\t\tqueueProperties[queueProps++] = \"100\";\n\n\t\t\tqueueProperties[queueProps++] = Endpoint.PROPERTIES.MAXMSG_REDELIVERY;\n\t\t\tqueueProperties[queueProps++] = \"15\";\n\t\t\t\n\t\t\t// The Queue with name\n\t\t\tqueue = Solclient.Allocator.newQueue(provQueueName,queueProperties);\n\n\t\t\trc = sessionHandle.provision(queue, SolEnum.ProvisionFlags.WAIT_FOR_CONFIRM, 0);\n\t\t\tassertReturnCode(\"sessionHandle.provision()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.OK);\n\n\t\t\t/*************************************************************************\n\t\t\t * Bind a Flow to the provisioned endpoint\n\t\t\t *************************************************************************/\n\n\t\t\t// Flow Properties\n\t\t\tint flowProps = 0;\n\t\t\tString[] flowProperties = new String[10];\n\n\t\t\tflowProperties[flowProps++] = FlowHandle.PROPERTIES.BIND_BLOCKING;\n\t\t\tflowProperties[flowProps++] = SolEnum.BooleanValue.DISABLE;\n\n\t\t\t/* Set Acknowledge mode to CLIENT_ACK */\n\n\t\t\tflowProperties[flowProps++] = FlowHandle.PROPERTIES.ACKMODE;\n\t\t\tflowProperties[flowProps++] = SolEnum.AckMode.CLIENT;\n\n\t\t\tFlowEventCallback flowEventCallback = getDefaultFlowEventCallback();\n\n\t\t\t/*************************************************************************\n\t\t\t * Creating flow\n\t\t\t *************************************************************************/\n\t\t\tprint(\"Creating flow\");\n\n\t\t\t// Get a Handle flow\n\n\t\t\trc = sessionHandle.createFlowForHandle(flowHandle, flowProperties,\n\t\t\t\t\tqueue, null, messageCallback, flowEventCallback);\n\n\t\t\tassertReturnCode(\"sessionHandle.createFlowForHandle()\", rc,\n\t\t\t\t\tSolEnum.ReturnCode.IN_PROGRESS);\n\n\t\t\t// Publish PERSISTENT messages to Queue\n\t\t\tfor (int i = 0; i < numberOfMessageToPublish; i++) {\n\t\t\t\tcommon_publishMessage(sessionHandle, txMessageHandle, queue,\n\t\t\t\t\t\tSolEnum.MessageDeliveryMode.PERSISTENT);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t} catch (InterruptedException ie) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(2000);\n\t\t\t} catch (InterruptedException ie) {\n\t\t\t}\n\n\t\t\tassertExpectedCount(\"Received Message Count\",\n\t\t\t\t\tnumberOfMessageToPublish, messageCallback.getMessageCount());\n\n\t\t\tprint(\"Test Passed\");\n\n\t\t} catch (Throwable t) {\n\t\t\terror(\"An error has occurred \", t);\n\t\t}\n\n\t}" ]
[ "0.6088026", "0.6077959", "0.56090355", "0.48715034", "0.46872276", "0.46582007", "0.46040872", "0.44928983", "0.44606462", "0.44578212", "0.44187602", "0.44153017", "0.44045612", "0.43689948", "0.4290816", "0.42635378", "0.42578214", "0.4227869", "0.42003953", "0.4198663", "0.41795784", "0.41642672", "0.41573608", "0.4156701", "0.41395658", "0.41347632", "0.41256317", "0.41232562", "0.4119192", "0.41073692", "0.4087313", "0.4082252", "0.4064203", "0.40584052", "0.4038205", "0.403239", "0.4022138", "0.40216318", "0.40196997", "0.40099955", "0.400399", "0.39951265", "0.3993029", "0.39888448", "0.39873594", "0.3977816", "0.39758673", "0.39701056", "0.39678273", "0.39654282", "0.3955695", "0.3952468", "0.3949167", "0.39479154", "0.39431185", "0.39317393", "0.39289585", "0.39278334", "0.39190522", "0.3917059", "0.3916773", "0.3915354", "0.39017764", "0.38957503", "0.38851523", "0.38809997", "0.38809997", "0.38732257", "0.38731027", "0.38676667", "0.38626203", "0.38622168", "0.3861814", "0.38591263", "0.3858748", "0.38579762", "0.38556886", "0.38477904", "0.38390362", "0.38359535", "0.38242978", "0.38181403", "0.38143566", "0.38123313", "0.38077977", "0.38012195", "0.37999126", "0.3795973", "0.37909874", "0.37830734", "0.37784478", "0.37772462", "0.37757072", "0.37752098", "0.37724903", "0.37688208", "0.37660646", "0.37636492", "0.3763453", "0.3759648" ]
0.5751278
2
Creates a new configuration recorder to record the resource configurations. You can use this action to change the role ( roleARN ) of an existing recorder. To change the role, call the action on the existing configuration recorder and specify a role. NOTE: Currently, you can specify only one configuration recorder per account.
public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest,\n AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public static ScreenRecorder configScreeenRecorder() throws Exception, AWTException {\n GraphicsConfiguration gc = GraphicsEnvironment//\r\n .getLocalGraphicsEnvironment()//\r\n .getDefaultScreenDevice()//\r\n .getDefaultConfiguration();\r\n\r\n //Create a instance of ScreenRecorder with the required configurations\r\n ScreenRecorder screenRecorder = new ScreenRecorder(gc,\r\n null, new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n DepthKey, (int)24, FrameRateKey, Rational.valueOf(15),\r\n QualityKey, 1.0f,\r\n KeyFrameIntervalKey, (int) (15 * 60)),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,\"black\",\r\n FrameRateKey, Rational.valueOf(30)),\r\n null,new File(Constant.Path_VideoRecordings));\r\n\r\n return screenRecorder;\r\n}", "public void enableCtxRecording();", "ResourceRole createResourceRole();", "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest,\n AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public native boolean createChannel(String appId, String channelKey, String name, int uid, RecordingConfig config);", "private void setupRecord() {\n\t\tint bufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC,\n\t\t\t\tSAMPLE_RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, bufferSize);\n\n\t\t// Create AudioTrack object to playback the audio.\n\t\tint iMinBufSize = AudioTrack.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_STEREO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioTracker = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, iMinBufSize * 10,\n\t\t\t\tAudioTrack.MODE_STREAM);\n\n\t\taudioTracker.play();\n\t}", "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "@Override\n public void createNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission, final int partnerType) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n final String dynamicRoleName = enterRoleName(roleName);\n selectPartnerType(partnerType);\n enterRoleDescription(roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), dynamicRoleName);\n }", "public InitialConfiguration recordingActive(Boolean recordingActive) {\n this.recordingActive = recordingActive;\n return this;\n }", "private void log4jConfig(String actionName) {\n\t\tString LOG4J_ROLLING_FILE_NAME_TOKEN = \"Launcher\";\n\t Logger rootLogger = LogManager.getRootLogger();\n\t RollingFileAppender fileAppender = (RollingFileAppender)rootLogger.getAppender(\"fileAppender\");\n\n\t // <param name=\"FileNamePattern\" value=\"/var/log/Launcher.log.%d{yyyy-MM-dd}.gz\"/>\n\t String currentLogFile = fileAppender.getFile();\n\t String newLogPattern = currentLogFile.replace(LOG4J_ROLLING_FILE_NAME_TOKEN, actionName);\n\t fileAppender.setFile(newLogPattern);\n\t \n\t fileAppender.activateOptions();\n\t}", "public Builder addParticipant(ParticipantConfig participant) {\n _participantMap.put(participant.getId(), participant);\n return this;\n }", "private static void receiverRecordCreator(DonorReceiver acc) {\n ReceiverOrganInventory organInventory = acc.getRequiredOrgans();\n\n boolean[] organPresent = {\n organInventory.getLiver(), organInventory.getKidneys(), organInventory.getHeart(),\n organInventory.getLungs(), organInventory.getIntestine(), organInventory.getCorneas(),\n organInventory.getMiddleEars(), organInventory.getSkin(), organInventory.getBone(),\n organInventory.getBoneMarrow(), organInventory.getConnectiveTissue(),\n organInventory.getPancreas()\n };\n\n LocalDateTime[] organTimes = {\n organInventory.getLiverTimeStamp(), organInventory.getKidneysTimeStamp(),\n organInventory.getHeartTimeStamp(), organInventory.getLungsTimeStamp(),\n organInventory.getIntestineTimeStamp(), organInventory.getCorneasTimeStamp(),\n organInventory.getMiddleEarsTimeStamp(), organInventory.getSkinTimeStamp(),\n organInventory.getBoneTimeStamp(), organInventory.getBoneMarrowTimeStamp(),\n organInventory.getConnectiveTissueTimeStamp(), organInventory.getPancreasTimeStamp()\n };\n\n String[] organString = {\n \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\", \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\",\n \"Bone Marrow\", \"Connective Tissue\", \"Pancreas\"\n };\n\n for (int i = 0; i < organPresent.length; i++) {\n if (organPresent[i]) {\n ReceiverRecord record = new ReceiverRecord(acc.fullName(), acc.getUserName(),\n acc.getContactDetails().getAddress().getRegion(), organTimes[i], organString[i]);\n records.add(record);\n }\n }\n }", "private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "int insert(RoleResource record);", "public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public void record() {\n if (mCarContext.checkSelfPermission(RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n CarToast.makeText(mCarContext, \"Grant mic permission on phone\",\n CarToast.LENGTH_LONG).show();\n List<String> permissions = Collections.singletonList(RECORD_AUDIO);\n mCarContext.requestPermissions(permissions, (grantedPermissions,\n rejectedPermissions) -> {\n if (grantedPermissions.contains(RECORD_AUDIO)) {\n record();\n }\n });\n return;\n }\n CarAudioRecord record = CarAudioRecord.create(mCarContext);\n\n Thread recordingThread =\n new Thread(\n () -> doRecord(record),\n \"AudioRecorder Thread\");\n recordingThread.start();\n }", "public void create(Singer newRecord);", "@Override\n\tpublic void saveRole(Role role) {\n\t\tthis.roleMapper.insert(role);\n\t}", "@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}", "@RequestLine(\"POST /zones/{zoneName}/rrsets/{rrType}/{hostName}\")\n void createResourceRecord(@Param(\"zoneName\") String zoneName,\n @Param(\"rrType\") int rrType,\n @Param(\"hostName\") String hostName,\n RRSet rrSet);", "public void addRole(String roleName) throws UnsupportedOperationException;", "@Override\n\tpublic void save(Role role) {\n\t\tjdbcTemplate.update(\"insert into role(name, description) values(?,?)\",\n\t\t\t\trole.getName(),role.getDescription());\n\t\n\t}", "@Override\n public Class<AdsconfigRecord> getRecordType() {\n return AdsconfigRecord.class;\n }", "public void setVadRecorder(){\n }", "public WebhookCreateOrUpdateParameters withRunbook(RunbookAssociationProperty runbook) {\n this.runbook = runbook;\n return this;\n }", "protected void initRecorderParameters() {\n\t\tmMediaRecorder.setCamera(mCamera);\n\t\tmMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\t\tmMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\tmMediaRecorder.setVideoEncoder(mVideoEncoder);\n\t\tmMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());\n\t\tmMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY);\n\t\tmMediaRecorder.setVideoFrameRate(mQuality.framerate);\n\t\tmMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate);\n\t\tmMediaRecorder.setOrientationHint(mQuality.orientation);\n\t}", "@Nonnull\n HashMap<String, Object> createAgentConfiguration();", "private void saveConfiguration() {\n }", "public static void configureLog(String logFolder, Class resourceClass, String resourceName){\r\n File f = new File(logFolder);\r\n File flog;\r\n flog = new File(f, LOG4J_CONFIG_FILE);\r\n if(!f.exists()){\r\n if(!f.mkdirs())\r\n throw new RuntimeException(\"Couldn't create \" + f);\r\n }\r\n if (!flog.exists()){\r\n String lf = logFolder.replace(\"\\\\\", \"/\");\r\n String props = TFUtils.readResource(resourceClass, resourceName).replaceAll(FOLDER_TAG, lf);\r\n TFUtils.printlnToFile(flog, props);\r\n }\r\n PropertyConfigurator.configure(flog.getAbsolutePath());\r\n }", "@Override\r\n\tpublic void addCredential(String role) {\n\r\n\t}", "public void scheduleRecording(String recordingName, OcapLocator locator, long startTime, long duration,\n long expiration, int retentionPriority, byte recordingPriority, ExtendedFileAccessPermissions efap,\n String org, MediaStorageVolume msv) throws IllegalArgumentException, InvalidServiceComponentException,\n AccessDeniedException, SecurityException, NoMoreDataEntriesException\n {\n\n OcapRecordingRequest rr = null;\n LocatorRecordingSpec lrs = null;\n OcapRecordingProperties orp = null;\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n\n // May throw Illegal Argument Exception\n orp = new OcapRecordingProperties(OcapRecordingProperties.HIGH_BIT_RATE, expiration, retentionPriority,\n recordingPriority, efap, org, msv);\n\n OcapLocator[] source = new OcapLocator[1];\n source[0] = locator;\n\n // May throw InvalidServiceComponent or IllegalArgumentException\n lrs = new LocatorRecordingSpec(source, new Date(startTime), duration, orp);\n\n recordAndAddAppData(recordingName, duration, orp, rm, lrs);\n }", "private void configureRestorationPulse(final int skillId) {\r\n restoration[skillId] = new SkillRestoration(skillId);\r\n }", "public RecordObject addOAuthSettings(String token, Object record) throws RestResponseException;", "private void startRecording() {\n // When start recording, create a file with format yyyyMMdd_HHmmss.3gp\n // y, M, d, H, m,s are year, month, day, hour, minite and second when start recording\n String currentDateAndTime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n curRecordingFileName = APP_STORAGE + \"/\" + currentDateAndTime + \".3gp\";\n Log.e(TAG, \"Start recording file: \" + curRecordingFileName);\n\n mRecorder = new MediaRecorder();\n mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n mRecorder.setOutputFile(curRecordingFileName);\n mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n try {\n mRecorder.prepare();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaRecorder\");\n }\n\n mRecorder.start();\n }", "void avRecorderSetup() {\n\r\n\t\t \r\n imw = ToolFactory.makeWriter(file.getAbsolutePath());//or \"output.avi\" or \"output.mov\"\r\n imw.open();\r\n imw.setForceInterleave(true);\r\n imw.addVideoStream(0, 0, IRational.make((double)vidRate), widthCapture, heightCapture);\r\n audionumber = imw.addAudioStream(audioStreamIndex, audioStreamId, channelCount, sampleRate);\r\n isc = imw.getContainer().getStream(0).getStreamCoder();\r\n bgr = new BufferedImage(widthCapture, heightCapture, BufferedImage.TYPE_3BYTE_BGR);\r\n sTime = fTime = System.nanoTime();\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void activateLogRotator(final Job job, final CreateJobAdvancedPlugin cja) {\n\t\tif (job.getLogRotator() != null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLogRotator logrotator = new LogRotator(cja.getDaysToKeep(), cja.getNumToKeep(), cja.getArtifactDaysToKeep(),\n\t\t\t\tcja.getArtifactNumToKeep());\n\n\t\tjob.setLogRotator(logrotator);\n\t}", "@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\",\n justification = \"Return value for file delete is not important here.\")\n private void initLogWriter() throws org.apache.geode.admin.AdminException {\n loggingSession.createSession(this);\n\n final LogConfig logConfig = agentConfig.createLogConfig();\n\n // LOG: create logWriterAppender here\n loggingSession.startSession();\n\n // LOG: look in AgentConfigImpl for existing LogWriter to use\n InternalLogWriter existingLogWriter = agentConfig.getInternalLogWriter();\n if (existingLogWriter != null) {\n logWriter = existingLogWriter;\n } else {\n // LOG: create LogWriterLogger\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n // Set this log writer in AgentConfigImpl\n agentConfig.setInternalLogWriter(logWriter);\n }\n\n // LOG: create logWriter here\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n\n // Set this log writer in AgentConfig\n agentConfig.setInternalLogWriter(logWriter);\n\n // LOG:CONFIG: changed next three statements from config to info\n logger.info(LogMarker.CONFIG_MARKER,\n String.format(\"Agent config property file name: %s\",\n AgentConfigImpl.retrievePropertyFile()));\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.getPropertyFileDescription());\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.toPropertiesAsString());\n }", "private void record(){\n clear();\n recording = true;\n paused = false;\n playing = false;\n setBtnState();\n recorder = new Recorder(audioFormat);\n new Thread(recorder).start();\n }", "private void enableRecorderPlayer() {\n\t\tsliderRecordedFileDuration.setDisable(false);\n\t\ttextRecordFileDuration.setDisable(false);\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonSave.setDisable(false);\n\t}", "public void storeRecordingAgents(RecorderFossil recorder, Agenda agenda) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9723:OrglRoot methodsFor: 'operations'!\n{void} storeRecordingAgents: recorder {RecorderFossil}\n\twith: agenda {Agenda}\n\t\"Go ahead and actually store the recorder in the sensor canopy. However, instead of propogating the props immediately, accumulate all those agenda items into the 'agenda' parameter. This is done instead of scheduling them directly because our client needs to schedule something else following all the prop propogation.\"\n\t\n\tself subclassResponsibility!\n*/\n}", "public void saveAccountConfig () {\n\t\ttry {\n\t\t\tthis.accountConfig.store(new FileWriter(new File(this.accountAddress)), \"\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR] Could not save initialization to account properties file: \" + accountAddress);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void saveRecMaterial(RecMatConfigure rec) {\n\t\t\n\t}", "@Override\r\n\tpublic void addRole(Role role) {\n\t\tgetHibernateTemplate().save(role);\r\n\t}", "private void sendVideoRecordingRequest() {\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n assert surfaceTexture != null;\n surfaceTexture.setDefaultBufferSize(mSizePreview.getSize().getWidth(), mSizePreview.getSize().getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n\n try {\n\n // create request for RECORDING template\n /**\n * Create a request suitable for video recording. Specifically, this means\n * that a stable frame rate is used, and post-processing is set for\n * recording quality. These requests would commonly be used with the\n * {@link CameraCaptureSession#setRepeatingRequest} method.\n * This template is guaranteed to be supported on all camera devices except\n * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT} devices\n * that are not {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE\n * BACKWARD_COMPATIBLE}.\n *\n * @see #createCaptureRequest\n */\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n configureCameraParameters(mCaptureRequestBuilder, mRokidCameraParamAEMode, mRokidCameraParamAFMode, mRokidCameraParamAWBMode);\n\n if (mPreviewEnabled) {\n // add Preview surface to target\n mCaptureRequestBuilder.addTarget(previewSurface);\n }\n\n // add Record surface to target\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface), new CameraCaptureSession.StateCallback() {\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n try {\n cameraCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static boolean prepareVideoRecorder(Camera camera, MediaRecorder recorder,\n SurfaceView preview) {\n camera.unlock();\n recorder.setCamera(camera);\n\n // Step2:Set sources\n recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);\n recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\n // Step3:Set a CamcorderProfile\n recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_720P));\n\n // Step4:Set output file\n mRecorderPath = FileUtil.videoDir().getAbsolutePath() + \"/\" + System.currentTimeMillis() + \".mp4\";\n recorder.setOutputFile(mRecorderPath);\n\n // Step5:Set the preview output\n recorder.setPreviewDisplay(preview.getHolder().getSurface());\n\n // Step6:Prepare configured MediaRecorder\n try {\n recorder.prepare();\n } catch (IllegalStateException e) {\n Log.d(TAG,\n \"IllegalStateException preparing MediaRecorder: \"\n + e.getMessage());\n CameraUtil.releaseMediaRecorder(recorder);\n CameraUtil.releaseCamera(camera);\n return false;\n } catch (IOException e) {\n Log.d(TAG, \"IOException preparing MediaRecorder: \" + e.getMessage());\n CameraUtil.releaseMediaRecorder(recorder);\n CameraUtil.releaseCamera(camera);\n return false;\n }\n\n return true;\n }", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.String value) {\n validate(fields()[6], value);\n this.role = value;\n fieldSetFlags()[6] = true;\n return this; \n }", "public void addRole(AppRole role) {\n this.roles.add(role);\n }", "public ModelRecorder(ACTRRuntime runtime)\n {\n\t super(runtime);\n }", "void setRole(final SecurityRole role);", "public synchronized void setRole(final Role newValue) {\n checkWritePermission();\n role = newValue;\n }", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "public CreateServiceRequest withRole(String role) {\n setRole(role);\n return this;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest,\n AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "@Override\n public void populateAndCreateNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n sendRoleDetails(DriverConfig.getDriver(), roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), roleName);\n }", "static File setupRecordRoot(Configuration config) throws IOException {\n String recordDir = getRioHomeDirectory()+\"logs\"+File.separator+\"records\";\n try {\n recordDir = (String)config.getEntry(CybernodeImpl.getConfigComponent(), \n \"recordDirectory\", \n String.class, \n recordDir);\n } catch(ConfigurationException e) {\n logger.warn(\"Exception getting recordDirectory\", e);\n }\n File recordRoot = new File(recordDir); \n checkAccess(recordRoot);\n return(recordRoot);\n }", "@Override\n public synchronized void record(LogEvent le) {\n \n le.setDateEvent(new Date());\n System.out.println(\"Записывается в \"+name+\" лог с датой: \"+SDF.format(le.getDateEvent()));\n String message = layout.getMessage(le);\n \n if (isRotation){\n try {\n if (Files.size(file.toPath())>=maxSize){\n System.out.println(\"Размер файла\" +file.getName()+\" был превышен!\");\n file = getRotationFile(file);\n \n if (changeXML){\n changeXML(file.toPath(), config, name);\n }\n }\n } catch (FileNotFoundException f){\n System.out.println(\"Ошибка ввода-вывода в RollingFileAppender\");\n System.out.println(\"Файд не найден! \"+f.getMessage());\n } catch (IOException ex){\n System.out.println(\"Ошибка ввода-вывода в RollingFileAppender\");\n System.out.println(\"Ошибка в проверке размера файла: \"+ex.getMessage());\n }\n }\n \n try(OutputStreamWriter writer \n = new OutputStreamWriter(Files.newOutputStream(file.toPath(),\n StandardOpenOption.APPEND, StandardOpenOption.WRITE,\n StandardOpenOption.CREATE, StandardOpenOption.DSYNC) )){\n String m2 = new String(message.getBytes(\"UTF-8\"));\n writer.append(m2);\n } catch (IOException ex){\n System.out.println(\"Ошибка ввода-вывода в FileAppender \"+ex.getMessage());\n }\n }", "public void createConfiguration(String configName, String imageID,\n\t\t\tString instantType, String securityGroup) {\n\t\t// asClient.setRegion(usaRegion);\n\t\tCreateLaunchConfigurationRequest lcRequest = new CreateLaunchConfigurationRequest();\n\t\tlcRequest.setLaunchConfigurationName(configName);\n\t\tlcRequest.setImageId(imageID);\n\t\tlcRequest.setInstanceType(instantType);\n\n\t\t/**\n\t\t * EC2 security groups use the friendly name VPC security groups use the\n\t\t * identifier\n\t\t */\n\t\tList securityGroups = new ArrayList();\n\t\tsecurityGroups.add(securityGroup);\n\t\tlcRequest.setSecurityGroups(securityGroups);\n\n\t\tInstanceMonitoring monitoring = new InstanceMonitoring();\n\t\tmonitoring.setEnabled(Boolean.TRUE);// set basic monitoring with FALSE\n\t\tlcRequest.setInstanceMonitoring(monitoring);\n\n\t\tasClient.createLaunchConfiguration(lcRequest);\n\t}", "void save( Configuration configuration, String eventTag )\n throws RegistryException, IndeterminateConfigurationException;", "public Builder deployRole() {\n onlyVerify = false;\n return builder();\n }", "public void setIdRecorder(String idRecorder) {\n this.idRecorder = idRecorder == null ? null : idRecorder.trim();\n }", "private void recordPushLog(String configName) {\n PushLog pushLog = new PushLog();\n pushLog.setAppId(client.getAppId());\n pushLog.setConfig(configName);\n pushLog.setClient(IP4s.intToIp(client.getIp()) + \":\" + client.getPid());\n pushLog.setServer(serverHost.get());\n pushLog.setCtime(new Date());\n pushLogService.add(pushLog);\n }", "public void saveRole(RoleMaster roleMaster) {\n\t\t\r\n\t}", "TeacherRecord createTeacherRecord(String firstName, String lastName, String address, String phone,\n\t\t\tCourseType specialization, String location, String clientId) throws Exception;", "private MediaRecorder createMediaRecorder(Size videoSize, File file) {\n try {\n MediaRecorder mediaRecorder = new MediaRecorder();\n\n mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);\n\n mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n mediaRecorder.setOutputFile(file.getAbsolutePath());\n mediaRecorder.setVideoEncodingBitRate(VIDEO_ENCODING_BIT_RATE);\n mediaRecorder.setVideoFrameRate(VIDEO_FRAME_RATE);\n mediaRecorder.setVideoSize(videoSize.getWidth(), videoSize.getHeight());\n mediaRecorder.setVideoEncoder(VIDEO_ENCODER);\n\n// Camera.Parameters p = camera.getParameters();\n// p.setPreviewFpsRange( 30000, 30000 ); // 30 fps\n// if ( p.isAutoExposureLockSupported() )\n// p.setAutoExposureLock( true );\n// camera.setParameters( p );\n\n return mediaRecorder;\n } catch (Exception e) {\n LOG.warn(\"Failed to create media recorder\", e);\n recordingFailed(e);\n }\n return null;\n }", "public ConfigurationImpl addSecurityRole(String match, RoleSet roles) {\n securitySettings.put(match, roles);\n return this;\n }", "private void startRecording() {\n\n }", "@Override\r\n\tpublic int insert(ApkAutomaticConfiguration record) {\n\t\treturn apkAutomaticConfigurationMapper.insert(record);\r\n\t}", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "void stageAutomatorTypeResource(String id, String resourceType, String resourceName, String version)\n throws IOException;", "@Override\n\tpublic void createResident(Resident resident) {\n\t\tgetSession().saveOrUpdate(resident);\n\t\tSystem.out.println(\"Resident stored successfully\");\n\t\t\n\t}", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;", "public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }", "int insertSelective(RoleResource record);", "@Override\n\tpublic void addRole(Role role) {\n\t\tSnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);\n\t\tlong id = idWorker.nextId();\n\t\trole.setRoleid(Long.toString(id));\n\t\troleMapper.addRole(role);\n\t}", "public void register(CoralEventWhiteboard whiteboard)\n {\n whiteboard.addPermissionAssignmentChangeListener( \n this, null);\n whiteboard.addPermissionAssociationChangeListener(\n this, null);\n whiteboard.addRoleAssignmentChangeListener(\n this, null);\n whiteboard.addRoleImplicationChangeListener(\n this, null);\n whiteboard.addResourceClassInheritanceChangeListener(\n this, null);\n whiteboard.addResourceClassAttributesChangeListener(\n this, null);\n whiteboard.addResourceTreeChangeListener(\n this, null);\n whiteboard.addResourceOwnershipChangeListener(\n this, null);\n whiteboard.addSubjectChangeListener(\n this, null);\n whiteboard.addRoleChangeListener(\n this, null);\n whiteboard.addPermissionChangeListener(\n this, null);\n whiteboard.addResourceCreationListener(\n this, null);\n whiteboard.addResourceChangeListener(\n this, null);\n\t\twhiteboard.addResourceDeletionListener(\n\t\t\tthis, null);\n whiteboard.addResourceClassChangeListener(\n this, null);\n whiteboard.addAttributeClassChangeListener(\n this, null);\n whiteboard.addAttributeDefinitionChangeListener(\n this, null);\n this.whiteboard = whiteboard;\n }", "@RequiresPermissions(ENTITLEMENT_CAN_CREATE)\n public UUID addEntitlement(UUID bundleId, EntitlementSpecifier spec, LocalDate entitlementEffectiveDate, LocalDate billingEffectiveDate, boolean isMigrated, Iterable<PluginProperty> properties, CallContext context)\n throws EntitlementApiException;", "public Builder addResource(ResourceConfig resource) {\n _resourceMap.put(resource.getId(), resource);\n return this;\n }", "public Record(String config, int score) {\n\t\tthis.config = config;\n\t\tthis.score = score;\n\t}", "private boolean prepareMediaRecorder() {\n if (mediaRecorder == null)\n mediaRecorder = new MediaRecorder();\n\n // according to API documents, this should not really be necessary, but the app crashes if not called\n mCamera.unlock();\n\n mediaRecorder.setCamera(mCamera);\n mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);\n mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\n mProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_LOW);\n mediaRecorder.setProfile(mProfile);\n\n mediaRecorder.setOutputFile(getOutputFileName());\n //mediaRecorder.setMaxDuration(60000); // Set max duration 60 sec.\n //mediaRecorder.setMaxFileSize(5000000); // Set max file size 5M\n\n // set preview to previewholder\n // this is actually not needed when it is already set on the Camera object\n if (mCameraPreview != null) {\n mediaRecorder.setPreviewDisplay(mCameraPreview.getHolder().getSurface());\n }\n\n try {\n mediaRecorder.prepare();\n } catch (IllegalStateException e) {\n releaseMediaRecorder();\n return false;\n } catch (IOException e) {\n releaseMediaRecorder();\n return false;\n }\n\n return true;\n }", "public void addToDatabaseRecord(ProductionRecord prodRec, String empUsername) {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n stmt = conn.prepareStatement(\n \"INSERT INTO Productionrecord(production_num, product_id, \"\n + \"serial_num, date_produced, username) VALUES (?, ?, ?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setInt(1, prodRec.getProductionNumber());\n stmt.setInt(2, prodRec.getProductID());\n stmt.setString(3, prodRec.serialnumber);\n stmt.setDate(4, prodRec.getDateProduced());\n stmt.setString(5, empUsername);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void testZRecordingCreation() {\n\t\tsolo.pressSpinnerItem(3, 1);\n\t\tsolo.clickOnText(\"Begin Rehearsing\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.typeText(0, \"testName\");\n\t\tsolo.clickOnText(\"Save\");\n\t\t// If file exists already then overwrite it\n\t\tif (solo.searchButton(\"Yes\")) {\n\t\t\tsolo.clickOnButton(\"Yes\");\n\t\t}\n\t\tsolo.pressMenuItem(4);\n\t\tassertTrue(solo.searchText(\"testName\"));\n\t}", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "public void addRole(String username, String role) throws UserNotExistsException ;", "private void startRecording() {\n myAudioRecorder = new MediaRecorder();\n myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n\n\n Log.i(\"METHOD\", \"Recording exists. File is called: \" + recordedPhrase);\n recordedPhrase = \"audioRecording_\" + num + \".3gp\";\n// recording = new File(Environment.getExternalStorageDirectory(), recordedPhrase);\n myAudioRecorder.setOutputFile(recordedPhrase);\n myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);\n\n // Record audio while button is held\n try {\n // Start recording\n myAudioRecorder.prepare();\n myAudioRecorder.start();\n Log.i(\"METHOD\", \"Audio recorder prepared\");\n } catch (IOException e){\n e.printStackTrace();\n }\n Toast.makeText(getApplication(), \"Audio recording\", Toast.LENGTH_LONG).show();\n }", "protected void onNewWatchLog(ChannelRecord channelRecord) {\n }", "public void insert(RAlarmLog record) {\r\n getSqlMapClientTemplate().insert(\"R_ALARM_LOG.ibatorgenerated_insert\", record);\r\n }", "ISModifyProvidedRole createISModifyProvidedRole();", "public RecorderManager(int audioSource, int sampleRate, int channelConfig, int audioFormat, String filePath){\n\t\ttry {\n\t\t\tif (audioFormat == AudioFormat.ENCODING_PCM_16BIT) {\n\t\t\t\tbSamples = 16;\n\t\t\t} else {\n\t\t\t\tbSamples = 8;\n\t\t\t}\n\t\t\tif (channelConfig == AudioFormat.CHANNEL_CONFIGURATION_MONO) {\n\t\t\t\tnChannels = 1;\n\t\t\t} else {\n\t\t\t\tnChannels = 2;\n\t\t\t}\n\t\t\tframePeriod = sampleRate * TIMER_INTERVAL / 1000;\n\t\t\tbufferSize = framePeriod * 2 * bSamples * nChannels / 8;\n\t\t\tif (bufferSize < AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)) {\n\t\t\t\t// Check to make sure buffer size is not smaller than the smallest allowed one\n\t\t\t\tbufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);\n\t\t\t\t// Set frame period and timer interval accordingly\n\t\t\t\tLog.w(TAG, \"Increasing buffer size to \" + Integer.toString(bufferSize));\n\t\t\t}\n\t\t\t//record period anand read buffer\n\t\t\tframePeriod = bufferSize / ( 2 * bSamples * nChannels / 8 );\n\t\t\tbuffer = new byte[framePeriod*bSamples/8*nChannels];\n\t\t\t/**\n\t\t\t * audioSource Audio source\n\t\t\t */\n\t\t\taudioRecorder = new AudioRecord(audioSource, sampleRate, channelConfig, audioFormat, bufferSize);\n\n\t\t\tif (audioRecorder.getState() != AudioRecord.STATE_INITIALIZED)\n\t\t\t\tthrow new Exception(\"AudioRecord initialization failed\");\n//\t\t\t//在此处进行数据读取\n//\t\t\taudioRecorder.setRecordPositionUpdateListener(updateListener);\n//\t\t\t//录音 通知周期 及 录音数据读取 buffer 的设定\n//\t\t\taudioRecorder.setPositionNotificationPeriod(framePeriod);\n//\t\t\tLog.i(TAG,\"path :\" +filePath);\n\t\t\t//当前状态为初始化状态\n\t\t\tstate = State.INITIALIZING;\n\t\t} catch (Exception e) {\n\t\t\tLog.e(TAG, \"initialize fail\",e);\n\t\t}\n\t}", "Builder roleArn(String roleArn);", "public static void decorateRegionServerConfiguration(Configuration conf) {\n if (!isBackupEnabled(conf)) {\n return;\n }\n\n String classes = conf.get(ProcedureManagerHost.REGIONSERVER_PROCEDURE_CONF_KEY);\n String regionProcedureClass = LogRollRegionServerProcedureManager.class.getName();\n if (classes == null) {\n conf.set(ProcedureManagerHost.REGIONSERVER_PROCEDURE_CONF_KEY, regionProcedureClass);\n } else if (!classes.contains(regionProcedureClass)) {\n conf.set(ProcedureManagerHost.REGIONSERVER_PROCEDURE_CONF_KEY,\n classes + \",\" + regionProcedureClass);\n }\n String coproc = conf.get(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY);\n String regionObserverClass = BackupObserver.class.getName();\n conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,\n (coproc == null ? \"\" : coproc + \",\") + regionObserverClass);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Added region procedure manager: {}. Added region observer: {}\",\n regionProcedureClass, regionObserverClass);\n }\n }", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "private void _writeRole(final Role role) throws IOException {\n _out.startObject();\n _writeReifier(role);\n _writeItemIdentifiers(role);\n _writeType(role);\n _writeKeyValue(\"player\", _topicRef(role.getPlayer()));\n _out.endObject();\n }", "void addNewAccountToFile(Account newAccount);", "void setLoggerConfigFileName(String fileName);", "public void startVideoRecording() {\n this.mActivity.getCameraAppUI().switchShutterSlidingAbility(false);\n if (this.mCameraState == 1) {\n setCameraState(2);\n Tag tag = TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"startVideoRecording: \");\n stringBuilder.append(Thread.currentThread());\n Log.i(tag, stringBuilder.toString());\n ToastUtil.showToast(this.mActivity, this.mActivity.getString(R.string.video_recording_start_toast), 0);\n this.mAppController.onVideoRecordingStarted();\n if (this.mModeSelectionLockToken == null) {\n this.mModeSelectionLockToken = this.mAppController.lockModuleSelection();\n }\n this.mUI.showVideoRecordingHints(false);\n this.mUI.cancelAnimations();\n this.mUI.setSwipingEnabled(false);\n this.mUI.showFocusUI(false);\n this.mAppController.getCameraAppUI().hideRotateButton();\n this.mAppController.getButtonManager().hideEffectsContainerWrapper();\n final long updateStorageSpaceTime = System.currentTimeMillis();\n this.mActivity.updateStorageSpaceAndHint(new OnStorageUpdateDoneListener() {\n public void onStorageUpdateDone(long bytes) {\n Tag access$100 = VideoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"updateStorageSpaceAndHint cost time :\");\n stringBuilder.append(System.currentTimeMillis() - updateStorageSpaceTime);\n stringBuilder.append(\"ms.\");\n Log.d(access$100, stringBuilder.toString());\n if (VideoModule.this.mCameraState != 2) {\n VideoModule.this.pendingRecordFailed();\n return;\n }\n if (bytes <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {\n Log.w(VideoModule.TAG, \"Storage issue, ignore the start request\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mCameraDevice == null) {\n Log.v(VideoModule.TAG, \"in storage callback after camera closed\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mPaused) {\n Log.v(VideoModule.TAG, \"in storage callback after module paused\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mMediaRecorderRecording) {\n Log.v(VideoModule.TAG, \"in storage callback after recording started\");\n } else if (VideoModule.this.isSupported(VideoModule.this.mProfile.videoFrameWidth, VideoModule.this.mProfile.videoFrameHeight)) {\n VideoModule.this.mCurrentVideoUri = null;\n VideoModule.this.mCameraDevice.enableShutterSound(false);\n if (VideoModule.this.mNeedGLRender && VideoModule.this.isSupportEffects()) {\n VideoModule.this.playVideoSound();\n VideoModule.this.initGlRecorder();\n VideoModule.this.pauseAudioPlayback();\n VideoModule.this.mActivity.getCameraAppUI().startVideoRecorder();\n } else {\n VideoModule.this.initializeRecorder();\n if (VideoModule.this.mMediaRecorder == null) {\n Log.e(VideoModule.TAG, \"Fail to initialize media recorder\");\n VideoModule.this.pendingRecordFailed();\n return;\n }\n VideoModule.this.pauseAudioPlayback();\n try {\n long mediarecorderStart = System.currentTimeMillis();\n VideoModule.this.mMediaRecorder.start();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"mMediaRecorder.start() cost time : \");\n stringBuilder2.append(System.currentTimeMillis() - mediarecorderStart);\n Log.d(access$100, stringBuilder2.toString());\n VideoModule.this.playVideoSound();\n VideoModule.this.mCameraDevice.refreshSettings();\n VideoModule.this.mCameraSettings = VideoModule.this.mCameraDevice.getSettings();\n VideoModule.this.setFocusParameters();\n } catch (RuntimeException e) {\n Log.e(VideoModule.TAG, \"Could not start media recorder. \", e);\n VideoModule.this.releaseMediaRecorder();\n VideoModule.this.mCameraDevice.lock();\n VideoModule.this.releaseAudioFocus();\n if (VideoModule.this.mModeSelectionLockToken != null) {\n VideoModule.this.mAppController.unlockModuleSelection(VideoModule.this.mModeSelectionLockToken);\n }\n VideoModule.this.setCameraState(1);\n if (VideoModule.this.shouldHoldRecorderForSecond()) {\n VideoModule.this.mAppController.setShutterEnabled(true);\n }\n VideoModule.this.mAppController.getCameraAppUI().showModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(true);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.onVideoRecordingStop();\n }\n ToastUtil.showToast(VideoModule.this.mActivity.getApplicationContext(), (int) R.string.video_record_start_failed, 0);\n return;\n }\n }\n VideoModule.this.mAppController.getCameraAppUI().setSwipeEnabled(false);\n VideoModule.this.setCameraState(3);\n VideoModule.this.tryLockFocus();\n VideoModule.this.mMediaRecorderRecording = true;\n VideoModule.this.mActivity.lockOrientation();\n VideoModule.this.mRecordingStartTime = SystemClock.uptimeMillis() + 600;\n VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().setAngle(VideoModule.this.mOrientation);\n VideoModule.this.mAppController.getCameraAppUI().hideModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(false);\n }\n if (VideoModule.this.isVideoShutterAnimationEnssential()) {\n VideoModule.this.mAppController.getCameraAppUI().animateBottomBarToVideoStop(R.drawable.ic_stop);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoCaptureButton(true);\n }\n if (VideoModule.this.mAppController.getCameraAppUI().getCurrentModeIndex() == VideoModule.this.mActivity.getResources().getInteger(R.integer.camera_mode_video)) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoPauseButton(false);\n }\n VideoModule.this.mUI.showRecordingUI(true);\n if (VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().getVisibility() == 0) {\n VideoModule.this.mUI.hideCapButton();\n }\n VideoModule.this.showBoomKeyTip();\n VideoModule.this.updateRecordingTime();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"startVideoRecording cost time 1 : \");\n stringBuilder3.append(System.currentTimeMillis() - VideoModule.this.mShutterButtonClickTime);\n Log.d(access$100, stringBuilder3.toString());\n if (VideoModule.this.isSendMsgEnableShutterButton()) {\n VideoModule.this.mHandler.sendEmptyMessageDelayed(6, VideoModule.MIN_VIDEO_RECODER_DURATION);\n }\n VideoModule.this.mActivity.enableKeepScreenOn(true);\n VideoModule.this.mActivity.startInnerStorageChecking(new OnInnerStorageLowListener() {\n public void onInnerStorageLow(long bytes) {\n VideoModule.this.mActivity.stopInnerStorageChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_storage_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n VideoModule.this.mActivity.startBatteryInfoChecking(new OnBatteryLowListener() {\n public void onBatteryLow(int level) {\n VideoModule.this.mActivity.stopBatteryInfoChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_battery_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n } else {\n Log.e(VideoModule.TAG, \"Unsupported parameters\");\n VideoModule.this.pendingRecordFailed();\n }\n }\n });\n }\n }" ]
[ "0.50481737", "0.4869105", "0.45873562", "0.45172718", "0.44795382", "0.4334334", "0.42430255", "0.42152885", "0.4177094", "0.41647002", "0.4146425", "0.41365975", "0.40730664", "0.407008", "0.40637836", "0.40347418", "0.40283012", "0.4013843", "0.39934686", "0.3912276", "0.39096949", "0.38889346", "0.38623148", "0.38594994", "0.38456118", "0.3840371", "0.38387713", "0.3837602", "0.38267133", "0.3818505", "0.38043135", "0.37809524", "0.37800613", "0.37663078", "0.37612066", "0.37608662", "0.37457085", "0.37312517", "0.37237948", "0.3723676", "0.3714338", "0.37096083", "0.37055337", "0.37047476", "0.3693027", "0.36913615", "0.3689167", "0.3688477", "0.3687952", "0.36846867", "0.3667694", "0.36651698", "0.36502293", "0.36502293", "0.36492002", "0.36354035", "0.36352527", "0.36327067", "0.36299863", "0.36292243", "0.3622828", "0.36217394", "0.36114833", "0.3607138", "0.36013147", "0.36002564", "0.3598716", "0.35981223", "0.35958582", "0.35958132", "0.3592792", "0.35918072", "0.3590425", "0.3590231", "0.3582739", "0.35823604", "0.35823193", "0.35764802", "0.35735625", "0.3560409", "0.3559683", "0.35565835", "0.3554482", "0.35543764", "0.35503602", "0.35481447", "0.35475442", "0.35432196", "0.3543078", "0.3542329", "0.3540221", "0.3540046", "0.35323444", "0.3531604", "0.35278264", "0.35236582", "0.35229516", "0.35204697", "0.35097444", "0.35095245" ]
0.56406367
0
Creates a new configuration recorder to record the resource configurations. You can use this action to change the role ( roleARN ) of an existing recorder. To change the role, call the action on the existing configuration recorder and specify a role. NOTE: Currently, you can specify only one configuration recorder per account.
public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest, AsyncHandler<PutConfigurationRecorderRequest, Void> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<Void> putConfigurationRecorderAsync(PutConfigurationRecorderRequest putConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public static ScreenRecorder configScreeenRecorder() throws Exception, AWTException {\n GraphicsConfiguration gc = GraphicsEnvironment//\r\n .getLocalGraphicsEnvironment()//\r\n .getDefaultScreenDevice()//\r\n .getDefaultConfiguration();\r\n\r\n //Create a instance of ScreenRecorder with the required configurations\r\n ScreenRecorder screenRecorder = new ScreenRecorder(gc,\r\n null, new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,\r\n DepthKey, (int)24, FrameRateKey, Rational.valueOf(15),\r\n QualityKey, 1.0f,\r\n KeyFrameIntervalKey, (int) (15 * 60)),\r\n new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,\"black\",\r\n FrameRateKey, Rational.valueOf(30)),\r\n null,new File(Constant.Path_VideoRecordings));\r\n\r\n return screenRecorder;\r\n}", "public void enableCtxRecording();", "ResourceRole createResourceRole();", "public Future<Void> startConfigurationRecorderAsync(StartConfigurationRecorderRequest startConfigurationRecorderRequest,\n AsyncHandler<StartConfigurationRecorderRequest, Void> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public native boolean createChannel(String appId, String channelKey, String name, int uid, RecordingConfig config);", "private void setupRecord() {\n\t\tint bufferSize = AudioRecord.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC,\n\t\t\t\tSAMPLE_RATE, AudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, bufferSize);\n\n\t\t// Create AudioTrack object to playback the audio.\n\t\tint iMinBufSize = AudioTrack.getMinBufferSize(SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_STEREO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT);\n\t\taudioTracker = new AudioTrack(AudioManager.STREAM_MUSIC, SAMPLE_RATE,\n\t\t\t\tAudioFormat.CHANNEL_CONFIGURATION_MONO,\n\t\t\t\tAudioFormat.ENCODING_PCM_16BIT, iMinBufSize * 10,\n\t\t\t\tAudioTrack.MODE_STREAM);\n\n\t\taudioTracker.play();\n\t}", "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "@Override\n public void createNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission, final int partnerType) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n final String dynamicRoleName = enterRoleName(roleName);\n selectPartnerType(partnerType);\n enterRoleDescription(roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), dynamicRoleName);\n }", "public InitialConfiguration recordingActive(Boolean recordingActive) {\n this.recordingActive = recordingActive;\n return this;\n }", "private void log4jConfig(String actionName) {\n\t\tString LOG4J_ROLLING_FILE_NAME_TOKEN = \"Launcher\";\n\t Logger rootLogger = LogManager.getRootLogger();\n\t RollingFileAppender fileAppender = (RollingFileAppender)rootLogger.getAppender(\"fileAppender\");\n\n\t // <param name=\"FileNamePattern\" value=\"/var/log/Launcher.log.%d{yyyy-MM-dd}.gz\"/>\n\t String currentLogFile = fileAppender.getFile();\n\t String newLogPattern = currentLogFile.replace(LOG4J_ROLLING_FILE_NAME_TOKEN, actionName);\n\t fileAppender.setFile(newLogPattern);\n\t \n\t fileAppender.activateOptions();\n\t}", "public Builder addParticipant(ParticipantConfig participant) {\n _participantMap.put(participant.getId(), participant);\n return this;\n }", "private static void receiverRecordCreator(DonorReceiver acc) {\n ReceiverOrganInventory organInventory = acc.getRequiredOrgans();\n\n boolean[] organPresent = {\n organInventory.getLiver(), organInventory.getKidneys(), organInventory.getHeart(),\n organInventory.getLungs(), organInventory.getIntestine(), organInventory.getCorneas(),\n organInventory.getMiddleEars(), organInventory.getSkin(), organInventory.getBone(),\n organInventory.getBoneMarrow(), organInventory.getConnectiveTissue(),\n organInventory.getPancreas()\n };\n\n LocalDateTime[] organTimes = {\n organInventory.getLiverTimeStamp(), organInventory.getKidneysTimeStamp(),\n organInventory.getHeartTimeStamp(), organInventory.getLungsTimeStamp(),\n organInventory.getIntestineTimeStamp(), organInventory.getCorneasTimeStamp(),\n organInventory.getMiddleEarsTimeStamp(), organInventory.getSkinTimeStamp(),\n organInventory.getBoneTimeStamp(), organInventory.getBoneMarrowTimeStamp(),\n organInventory.getConnectiveTissueTimeStamp(), organInventory.getPancreasTimeStamp()\n };\n\n String[] organString = {\n \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\", \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\",\n \"Bone Marrow\", \"Connective Tissue\", \"Pancreas\"\n };\n\n for (int i = 0; i < organPresent.length; i++) {\n if (organPresent[i]) {\n ReceiverRecord record = new ReceiverRecord(acc.fullName(), acc.getUserName(),\n acc.getContactDetails().getAddress().getRegion(), organTimes[i], organString[i]);\n records.add(record);\n }\n }\n }", "private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "int insert(RoleResource record);", "public Future<Void> stopConfigurationRecorderAsync(StopConfigurationRecorderRequest stopConfigurationRecorderRequest) \n throws AmazonServiceException, AmazonClientException;", "public void record() {\n if (mCarContext.checkSelfPermission(RECORD_AUDIO)\n != PackageManager.PERMISSION_GRANTED) {\n CarToast.makeText(mCarContext, \"Grant mic permission on phone\",\n CarToast.LENGTH_LONG).show();\n List<String> permissions = Collections.singletonList(RECORD_AUDIO);\n mCarContext.requestPermissions(permissions, (grantedPermissions,\n rejectedPermissions) -> {\n if (grantedPermissions.contains(RECORD_AUDIO)) {\n record();\n }\n });\n return;\n }\n CarAudioRecord record = CarAudioRecord.create(mCarContext);\n\n Thread recordingThread =\n new Thread(\n () -> doRecord(record),\n \"AudioRecorder Thread\");\n recordingThread.start();\n }", "public void create(Singer newRecord);", "@Override\n\tpublic void saveRole(Role role) {\n\t\tthis.roleMapper.insert(role);\n\t}", "@Override\n\tpublic void addRole(Role r) {\n\t\t\n\t}", "@RequestLine(\"POST /zones/{zoneName}/rrsets/{rrType}/{hostName}\")\n void createResourceRecord(@Param(\"zoneName\") String zoneName,\n @Param(\"rrType\") int rrType,\n @Param(\"hostName\") String hostName,\n RRSet rrSet);", "public void addRole(String roleName) throws UnsupportedOperationException;", "@Override\n\tpublic void save(Role role) {\n\t\tjdbcTemplate.update(\"insert into role(name, description) values(?,?)\",\n\t\t\t\trole.getName(),role.getDescription());\n\t\n\t}", "@Override\n public Class<AdsconfigRecord> getRecordType() {\n return AdsconfigRecord.class;\n }", "public void setVadRecorder(){\n }", "protected void initRecorderParameters() {\n\t\tmMediaRecorder.setCamera(mCamera);\n\t\tmMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\t\tmMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\tmMediaRecorder.setVideoEncoder(mVideoEncoder);\n\t\tmMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());\n\t\tmMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY);\n\t\tmMediaRecorder.setVideoFrameRate(mQuality.framerate);\n\t\tmMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate);\n\t\tmMediaRecorder.setOrientationHint(mQuality.orientation);\n\t}", "public WebhookCreateOrUpdateParameters withRunbook(RunbookAssociationProperty runbook) {\n this.runbook = runbook;\n return this;\n }", "@Nonnull\n HashMap<String, Object> createAgentConfiguration();", "private void saveConfiguration() {\n }", "public static void configureLog(String logFolder, Class resourceClass, String resourceName){\r\n File f = new File(logFolder);\r\n File flog;\r\n flog = new File(f, LOG4J_CONFIG_FILE);\r\n if(!f.exists()){\r\n if(!f.mkdirs())\r\n throw new RuntimeException(\"Couldn't create \" + f);\r\n }\r\n if (!flog.exists()){\r\n String lf = logFolder.replace(\"\\\\\", \"/\");\r\n String props = TFUtils.readResource(resourceClass, resourceName).replaceAll(FOLDER_TAG, lf);\r\n TFUtils.printlnToFile(flog, props);\r\n }\r\n PropertyConfigurator.configure(flog.getAbsolutePath());\r\n }", "public void scheduleRecording(String recordingName, OcapLocator locator, long startTime, long duration,\n long expiration, int retentionPriority, byte recordingPriority, ExtendedFileAccessPermissions efap,\n String org, MediaStorageVolume msv) throws IllegalArgumentException, InvalidServiceComponentException,\n AccessDeniedException, SecurityException, NoMoreDataEntriesException\n {\n\n OcapRecordingRequest rr = null;\n LocatorRecordingSpec lrs = null;\n OcapRecordingProperties orp = null;\n OcapRecordingManager rm = (OcapRecordingManager) OcapRecordingManager.getInstance();\n\n // May throw Illegal Argument Exception\n orp = new OcapRecordingProperties(OcapRecordingProperties.HIGH_BIT_RATE, expiration, retentionPriority,\n recordingPriority, efap, org, msv);\n\n OcapLocator[] source = new OcapLocator[1];\n source[0] = locator;\n\n // May throw InvalidServiceComponent or IllegalArgumentException\n lrs = new LocatorRecordingSpec(source, new Date(startTime), duration, orp);\n\n recordAndAddAppData(recordingName, duration, orp, rm, lrs);\n }", "@Override\r\n\tpublic void addCredential(String role) {\n\r\n\t}", "private void configureRestorationPulse(final int skillId) {\r\n restoration[skillId] = new SkillRestoration(skillId);\r\n }", "private void startRecording() {\n // When start recording, create a file with format yyyyMMdd_HHmmss.3gp\n // y, M, d, H, m,s are year, month, day, hour, minite and second when start recording\n String currentDateAndTime = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n curRecordingFileName = APP_STORAGE + \"/\" + currentDateAndTime + \".3gp\";\n Log.e(TAG, \"Start recording file: \" + curRecordingFileName);\n\n mRecorder = new MediaRecorder();\n mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n mRecorder.setOutputFile(curRecordingFileName);\n mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);\n\n try {\n mRecorder.prepare();\n } catch (IOException e) {\n Log.e(TAG, \"Couldn't prepare and start MediaRecorder\");\n }\n\n mRecorder.start();\n }", "public RecordObject addOAuthSettings(String token, Object record) throws RestResponseException;", "void avRecorderSetup() {\n\r\n\t\t \r\n imw = ToolFactory.makeWriter(file.getAbsolutePath());//or \"output.avi\" or \"output.mov\"\r\n imw.open();\r\n imw.setForceInterleave(true);\r\n imw.addVideoStream(0, 0, IRational.make((double)vidRate), widthCapture, heightCapture);\r\n audionumber = imw.addAudioStream(audioStreamIndex, audioStreamId, channelCount, sampleRate);\r\n isc = imw.getContainer().getStream(0).getStreamCoder();\r\n bgr = new BufferedImage(widthCapture, heightCapture, BufferedImage.TYPE_3BYTE_BGR);\r\n sTime = fTime = System.nanoTime();\r\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void activateLogRotator(final Job job, final CreateJobAdvancedPlugin cja) {\n\t\tif (job.getLogRotator() != null) {\n\t\t\treturn;\n\t\t}\n\n\t\tLogRotator logrotator = new LogRotator(cja.getDaysToKeep(), cja.getNumToKeep(), cja.getArtifactDaysToKeep(),\n\t\t\t\tcja.getArtifactNumToKeep());\n\n\t\tjob.setLogRotator(logrotator);\n\t}", "@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = \"RV_RETURN_VALUE_IGNORED_BAD_PRACTICE\",\n justification = \"Return value for file delete is not important here.\")\n private void initLogWriter() throws org.apache.geode.admin.AdminException {\n loggingSession.createSession(this);\n\n final LogConfig logConfig = agentConfig.createLogConfig();\n\n // LOG: create logWriterAppender here\n loggingSession.startSession();\n\n // LOG: look in AgentConfigImpl for existing LogWriter to use\n InternalLogWriter existingLogWriter = agentConfig.getInternalLogWriter();\n if (existingLogWriter != null) {\n logWriter = existingLogWriter;\n } else {\n // LOG: create LogWriterLogger\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n // Set this log writer in AgentConfigImpl\n agentConfig.setInternalLogWriter(logWriter);\n }\n\n // LOG: create logWriter here\n logWriter = LogWriterFactory.createLogWriterLogger(logConfig, false);\n\n // Set this log writer in AgentConfig\n agentConfig.setInternalLogWriter(logWriter);\n\n // LOG:CONFIG: changed next three statements from config to info\n logger.info(LogMarker.CONFIG_MARKER,\n String.format(\"Agent config property file name: %s\",\n AgentConfigImpl.retrievePropertyFile()));\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.getPropertyFileDescription());\n logger.info(LogMarker.CONFIG_MARKER, agentConfig.toPropertiesAsString());\n }", "private void record(){\n clear();\n recording = true;\n paused = false;\n playing = false;\n setBtnState();\n recorder = new Recorder(audioFormat);\n new Thread(recorder).start();\n }", "private void enableRecorderPlayer() {\n\t\tsliderRecordedFileDuration.setDisable(false);\n\t\ttextRecordFileDuration.setDisable(false);\n\t\trecorderButtonPlay.setDisable(false);\n\t\trecorderButtonSave.setDisable(false);\n\t}", "public void storeRecordingAgents(RecorderFossil recorder, Agenda agenda) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9723:OrglRoot methodsFor: 'operations'!\n{void} storeRecordingAgents: recorder {RecorderFossil}\n\twith: agenda {Agenda}\n\t\"Go ahead and actually store the recorder in the sensor canopy. However, instead of propogating the props immediately, accumulate all those agenda items into the 'agenda' parameter. This is done instead of scheduling them directly because our client needs to schedule something else following all the prop propogation.\"\n\t\n\tself subclassResponsibility!\n*/\n}", "public void saveAccountConfig () {\n\t\ttry {\n\t\t\tthis.accountConfig.store(new FileWriter(new File(this.accountAddress)), \"\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR] Could not save initialization to account properties file: \" + accountAddress);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void saveRecMaterial(RecMatConfigure rec) {\n\t\t\n\t}", "@Override\r\n\tpublic void addRole(Role role) {\n\t\tgetHibernateTemplate().save(role);\r\n\t}", "private void sendVideoRecordingRequest() {\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n assert surfaceTexture != null;\n surfaceTexture.setDefaultBufferSize(mSizePreview.getSize().getWidth(), mSizePreview.getSize().getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n\n try {\n\n // create request for RECORDING template\n /**\n * Create a request suitable for video recording. Specifically, this means\n * that a stable frame rate is used, and post-processing is set for\n * recording quality. These requests would commonly be used with the\n * {@link CameraCaptureSession#setRepeatingRequest} method.\n * This template is guaranteed to be supported on all camera devices except\n * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT} devices\n * that are not {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE\n * BACKWARD_COMPATIBLE}.\n *\n * @see #createCaptureRequest\n */\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n configureCameraParameters(mCaptureRequestBuilder, mRokidCameraParamAEMode, mRokidCameraParamAFMode, mRokidCameraParamAWBMode);\n\n if (mPreviewEnabled) {\n // add Preview surface to target\n mCaptureRequestBuilder.addTarget(previewSurface);\n }\n\n // add Record surface to target\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface), new CameraCaptureSession.StateCallback() {\n @Override\n public void onConfigured(@NonNull CameraCaptureSession cameraCaptureSession) {\n try {\n cameraCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession cameraCaptureSession) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static boolean prepareVideoRecorder(Camera camera, MediaRecorder recorder,\n SurfaceView preview) {\n camera.unlock();\n recorder.setCamera(camera);\n\n // Step2:Set sources\n recorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);\n recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\n // Step3:Set a CamcorderProfile\n recorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_720P));\n\n // Step4:Set output file\n mRecorderPath = FileUtil.videoDir().getAbsolutePath() + \"/\" + System.currentTimeMillis() + \".mp4\";\n recorder.setOutputFile(mRecorderPath);\n\n // Step5:Set the preview output\n recorder.setPreviewDisplay(preview.getHolder().getSurface());\n\n // Step6:Prepare configured MediaRecorder\n try {\n recorder.prepare();\n } catch (IllegalStateException e) {\n Log.d(TAG,\n \"IllegalStateException preparing MediaRecorder: \"\n + e.getMessage());\n CameraUtil.releaseMediaRecorder(recorder);\n CameraUtil.releaseCamera(camera);\n return false;\n } catch (IOException e) {\n Log.d(TAG, \"IOException preparing MediaRecorder: \" + e.getMessage());\n CameraUtil.releaseMediaRecorder(recorder);\n CameraUtil.releaseCamera(camera);\n return false;\n }\n\n return true;\n }", "public void addRole(AppRole role) {\n this.roles.add(role);\n }", "public ModelRecorder(ACTRRuntime runtime)\n {\n\t super(runtime);\n }", "public gr.grnet.aquarium.message.avro.gen.UserAgreementMsg.Builder setRole(java.lang.String value) {\n validate(fields()[6], value);\n this.role = value;\n fieldSetFlags()[6] = true;\n return this; \n }", "void setRole(final SecurityRole role);", "public synchronized void setRole(final Role newValue) {\n checkWritePermission();\n role = newValue;\n }", "LogRecorder getLogRecorder();", "LogRecorder getLogRecorder();", "public CreateServiceRequest withRole(String role) {\n setRole(role);\n return this;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest,\n AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "@Override\n public void populateAndCreateNewRole(final String roleName, final String roleDescription,\n final String unAssignedPermission) {\n\n DriverConfig.setLogString(\"Processing a new role creation with required fields.\", true);\n\n WaitUtil.waitUntil(200);\n\n final WebElement roleManagement = retrieveElementByAttributeValue(DriverConfig.getDriver(),\n TAG_ANCHOR, ATTR_TITLE, roleConfig.get(ROLE_MANAGEMENT_VAL));\n roleManagement.click();\n logger.info(\"check if create new role is displayed.\");\n isDisplayedByLinkText(DriverConfig.getDriver(), roleConfig.get(CREATE_NEW_ROLE_VAL),\n MEDIUM_TIMEOUT);\n DriverConfig.setLogString(\"select create new role link.\", true);\n final WebElement createNewRole = retrieveElementByLinkText(DriverConfig.getDriver(),\n roleConfig.get(CREATE_NEW_ROLE_VAL), MEDIUM_TIMEOUT);\n createNewRole.click();\n DriverConfig.setLogString(\"enter details in create role form.\", true);\n sendRoleDetails(DriverConfig.getDriver(), roleDescription);\n DriverConfig.setLogString(\"select permissions for the role.\", true);\n sendPermissions(DriverConfig.getDriver(), unAssignedPermission);\n DriverConfig.setLogString(\"save & verify the role access.\", true);\n saveAndVerifyRole(DriverConfig.getDriver(), roleName);\n }", "static File setupRecordRoot(Configuration config) throws IOException {\n String recordDir = getRioHomeDirectory()+\"logs\"+File.separator+\"records\";\n try {\n recordDir = (String)config.getEntry(CybernodeImpl.getConfigComponent(), \n \"recordDirectory\", \n String.class, \n recordDir);\n } catch(ConfigurationException e) {\n logger.warn(\"Exception getting recordDirectory\", e);\n }\n File recordRoot = new File(recordDir); \n checkAccess(recordRoot);\n return(recordRoot);\n }", "@Override\n public synchronized void record(LogEvent le) {\n \n le.setDateEvent(new Date());\n System.out.println(\"Записывается в \"+name+\" лог с датой: \"+SDF.format(le.getDateEvent()));\n String message = layout.getMessage(le);\n \n if (isRotation){\n try {\n if (Files.size(file.toPath())>=maxSize){\n System.out.println(\"Размер файла\" +file.getName()+\" был превышен!\");\n file = getRotationFile(file);\n \n if (changeXML){\n changeXML(file.toPath(), config, name);\n }\n }\n } catch (FileNotFoundException f){\n System.out.println(\"Ошибка ввода-вывода в RollingFileAppender\");\n System.out.println(\"Файд не найден! \"+f.getMessage());\n } catch (IOException ex){\n System.out.println(\"Ошибка ввода-вывода в RollingFileAppender\");\n System.out.println(\"Ошибка в проверке размера файла: \"+ex.getMessage());\n }\n }\n \n try(OutputStreamWriter writer \n = new OutputStreamWriter(Files.newOutputStream(file.toPath(),\n StandardOpenOption.APPEND, StandardOpenOption.WRITE,\n StandardOpenOption.CREATE, StandardOpenOption.DSYNC) )){\n String m2 = new String(message.getBytes(\"UTF-8\"));\n writer.append(m2);\n } catch (IOException ex){\n System.out.println(\"Ошибка ввода-вывода в FileAppender \"+ex.getMessage());\n }\n }", "public void createConfiguration(String configName, String imageID,\n\t\t\tString instantType, String securityGroup) {\n\t\t// asClient.setRegion(usaRegion);\n\t\tCreateLaunchConfigurationRequest lcRequest = new CreateLaunchConfigurationRequest();\n\t\tlcRequest.setLaunchConfigurationName(configName);\n\t\tlcRequest.setImageId(imageID);\n\t\tlcRequest.setInstanceType(instantType);\n\n\t\t/**\n\t\t * EC2 security groups use the friendly name VPC security groups use the\n\t\t * identifier\n\t\t */\n\t\tList securityGroups = new ArrayList();\n\t\tsecurityGroups.add(securityGroup);\n\t\tlcRequest.setSecurityGroups(securityGroups);\n\n\t\tInstanceMonitoring monitoring = new InstanceMonitoring();\n\t\tmonitoring.setEnabled(Boolean.TRUE);// set basic monitoring with FALSE\n\t\tlcRequest.setInstanceMonitoring(monitoring);\n\n\t\tasClient.createLaunchConfiguration(lcRequest);\n\t}", "void save( Configuration configuration, String eventTag )\n throws RegistryException, IndeterminateConfigurationException;", "public Builder deployRole() {\n onlyVerify = false;\n return builder();\n }", "public void setIdRecorder(String idRecorder) {\n this.idRecorder = idRecorder == null ? null : idRecorder.trim();\n }", "private void recordPushLog(String configName) {\n PushLog pushLog = new PushLog();\n pushLog.setAppId(client.getAppId());\n pushLog.setConfig(configName);\n pushLog.setClient(IP4s.intToIp(client.getIp()) + \":\" + client.getPid());\n pushLog.setServer(serverHost.get());\n pushLog.setCtime(new Date());\n pushLogService.add(pushLog);\n }", "TeacherRecord createTeacherRecord(String firstName, String lastName, String address, String phone,\n\t\t\tCourseType specialization, String location, String clientId) throws Exception;", "private MediaRecorder createMediaRecorder(Size videoSize, File file) {\n try {\n MediaRecorder mediaRecorder = new MediaRecorder();\n\n mediaRecorder.setVideoSource(MediaRecorder.VideoSource.SURFACE);\n\n mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n mediaRecorder.setOutputFile(file.getAbsolutePath());\n mediaRecorder.setVideoEncodingBitRate(VIDEO_ENCODING_BIT_RATE);\n mediaRecorder.setVideoFrameRate(VIDEO_FRAME_RATE);\n mediaRecorder.setVideoSize(videoSize.getWidth(), videoSize.getHeight());\n mediaRecorder.setVideoEncoder(VIDEO_ENCODER);\n\n// Camera.Parameters p = camera.getParameters();\n// p.setPreviewFpsRange( 30000, 30000 ); // 30 fps\n// if ( p.isAutoExposureLockSupported() )\n// p.setAutoExposureLock( true );\n// camera.setParameters( p );\n\n return mediaRecorder;\n } catch (Exception e) {\n LOG.warn(\"Failed to create media recorder\", e);\n recordingFailed(e);\n }\n return null;\n }", "public void saveRole(RoleMaster roleMaster) {\n\t\t\r\n\t}", "private void startRecording() {\n\n }", "@Override\r\n\tpublic int insert(ApkAutomaticConfiguration record) {\n\t\treturn apkAutomaticConfigurationMapper.insert(record);\r\n\t}", "public ConfigurationImpl addSecurityRole(String match, RoleSet roles) {\n securitySettings.put(match, roles);\n return this;\n }", "@Override\n\tpublic void createResident(Resident resident) {\n\t\tgetSession().saveOrUpdate(resident);\n\t\tSystem.out.println(\"Resident stored successfully\");\n\t\t\n\t}", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "void stageAutomatorTypeResource(String id, String resourceType, String resourceName, String version)\n throws IOException;", "public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }", "public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;", "public void setRole(String role)\n \t\tthrows ParameterException, SignatureException {\n \t\tif (this.signed) {\n \t\t\tthrow new SignatureException(\"Attributes cannot be modified after document is signed\");\n \t\t}\n \n \t\tif (roleFAA.equals(role) || \n \t\t roleBORROWER.equals(role) ||\n \t\t roleAPCSR.equals(role) ||\n \t\t roleLENDER.equals(role)) {\n \t\t\t\n \t\t\tattributes.put(\"Role\", role);\n \t\t} else {\n \t\t\tthrow new ParameterException(\"Invalid Role: \" + role);\n \t\t}\n \t}", "int insertSelective(RoleResource record);", "@Override\n\tpublic void addRole(Role role) {\n\t\tSnowflakeIdWorker idWorker = new SnowflakeIdWorker(0, 0);\n\t\tlong id = idWorker.nextId();\n\t\trole.setRoleid(Long.toString(id));\n\t\troleMapper.addRole(role);\n\t}", "@RequiresPermissions(ENTITLEMENT_CAN_CREATE)\n public UUID addEntitlement(UUID bundleId, EntitlementSpecifier spec, LocalDate entitlementEffectiveDate, LocalDate billingEffectiveDate, boolean isMigrated, Iterable<PluginProperty> properties, CallContext context)\n throws EntitlementApiException;", "public void register(CoralEventWhiteboard whiteboard)\n {\n whiteboard.addPermissionAssignmentChangeListener( \n this, null);\n whiteboard.addPermissionAssociationChangeListener(\n this, null);\n whiteboard.addRoleAssignmentChangeListener(\n this, null);\n whiteboard.addRoleImplicationChangeListener(\n this, null);\n whiteboard.addResourceClassInheritanceChangeListener(\n this, null);\n whiteboard.addResourceClassAttributesChangeListener(\n this, null);\n whiteboard.addResourceTreeChangeListener(\n this, null);\n whiteboard.addResourceOwnershipChangeListener(\n this, null);\n whiteboard.addSubjectChangeListener(\n this, null);\n whiteboard.addRoleChangeListener(\n this, null);\n whiteboard.addPermissionChangeListener(\n this, null);\n whiteboard.addResourceCreationListener(\n this, null);\n whiteboard.addResourceChangeListener(\n this, null);\n\t\twhiteboard.addResourceDeletionListener(\n\t\t\tthis, null);\n whiteboard.addResourceClassChangeListener(\n this, null);\n whiteboard.addAttributeClassChangeListener(\n this, null);\n whiteboard.addAttributeDefinitionChangeListener(\n this, null);\n this.whiteboard = whiteboard;\n }", "public Builder addResource(ResourceConfig resource) {\n _resourceMap.put(resource.getId(), resource);\n return this;\n }", "private boolean prepareMediaRecorder() {\n if (mediaRecorder == null)\n mediaRecorder = new MediaRecorder();\n\n // according to API documents, this should not really be necessary, but the app crashes if not called\n mCamera.unlock();\n\n mediaRecorder.setCamera(mCamera);\n mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);\n mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\n mProfile = CamcorderProfile.get(CamcorderProfile.QUALITY_LOW);\n mediaRecorder.setProfile(mProfile);\n\n mediaRecorder.setOutputFile(getOutputFileName());\n //mediaRecorder.setMaxDuration(60000); // Set max duration 60 sec.\n //mediaRecorder.setMaxFileSize(5000000); // Set max file size 5M\n\n // set preview to previewholder\n // this is actually not needed when it is already set on the Camera object\n if (mCameraPreview != null) {\n mediaRecorder.setPreviewDisplay(mCameraPreview.getHolder().getSurface());\n }\n\n try {\n mediaRecorder.prepare();\n } catch (IllegalStateException e) {\n releaseMediaRecorder();\n return false;\n } catch (IOException e) {\n releaseMediaRecorder();\n return false;\n }\n\n return true;\n }", "public Record(String config, int score) {\n\t\tthis.config = config;\n\t\tthis.score = score;\n\t}", "public void addToDatabaseRecord(ProductionRecord prodRec, String empUsername) {\n // Database credentials\n String pass = \"\";\n\n InputStream passPath = Controller.class.getResourceAsStream(\"/password.txt\");\n if (passPath == null) {\n System.out.println(\"Could not find password in resources folder\");\n }\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(passPath));\n String line = null;\n while (true) {\n try {\n if (!((line = reader.readLine()) != null)) {\n break;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(line);\n if (line != null) {\n pass = line;\n System.out.println(\"Password login: \" + line);\n break;\n }\n }\n Connection conn = null; //Temporary\n PreparedStatement stmt = null; //Temporary\n\n try {\n // STEP 1: Register JDBC driver\n Class.forName(\"org.h2.Driver\");\n\n //STEP 2: Open a connection\n conn = DriverManager.getConnection(\"jdbc:h2:./res/HR\", \"\",\n pass);\n\n stmt = conn.prepareStatement(\n \"INSERT INTO Productionrecord(production_num, product_id, \"\n + \"serial_num, date_produced, username) VALUES (?, ?, ?, ?, ?)\",\n Statement.RETURN_GENERATED_KEYS);\n stmt.setInt(1, prodRec.getProductionNumber());\n stmt.setInt(2, prodRec.getProductID());\n stmt.setString(3, prodRec.serialnumber);\n stmt.setDate(4, prodRec.getDateProduced());\n stmt.setString(5, empUsername);\n\n stmt.executeUpdate();\n\n stmt.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private void setAndWriteFiles()\n\t{\n\t\tSensorConfiguration config = new SensorConfiguration();\n\t\tString versionMajor = ConfigurationInterface_v1_0.VERSION.substring(0,\n\t\t\t\tConfigurationInterface_v1_0.VERSION.indexOf('.'));\n\t\tString versionMinor = ConfigurationInterface_v1_0.VERSION\n\t\t\t\t.substring(ConfigurationInterface_v1_0.VERSION.indexOf('.') + 1);\n\t\tconfig.setConfigurationInterfaceVersion(versionMajor, versionMinor);\n\n\t\tStartModes startModes = new StartModes();\n\t\t// set startMode for sensorConfiguration\n\t\tfor (StartMode element : startModes.getStartModeList())\n\t\t{\n\t\t\tif (element.getName().equals(\"DEFINED_TIME\"))\n\t\t\t{\n\t\t\t\tconfig.setStartMode(element);\n\t\t\t}\n\t\t}\n\n\t\tConfigurationSets configSets = new ConfigurationSets();\n\t\t// set configurationSet for sensorConfiguration\n\t\tfor (ConfigurationSet element : configSets.getConfigSetList())\n\t\t{\n\t\t\tif (element.getName().equals(\"mesana\"))\n\t\t\t{\n\n\t\t\t\tconfig.setConfigurationSet(element);\n\t\t\t}\n\t\t}\n\n\t\tif (config.getStartMode().getName().equals(\"DEFINED_TIME\"))\n\t\t{\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, 10);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 5);\n\t\t\tcalendar.set(Calendar.MINUTE, 11);\n\t\t\tDate date = calendar.getTime();\n\t\t\tconfig.setRecordingStartTime(date);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tconfig.setRecordingStartTime(null);\n\t\t}\n\t\t\n\t\tconfig.setRecordingDuration(12000);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnectionManager.getInstance().currentSensor(0).setSensorConfiguration(config);\n\t\t\t\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeConfigFile();\n\t\t\t\n\t\t\t// write Encrypted data to sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeEncryptedParameters(\"123456789abcd12\");\n\t\t\t\n\t\t\tint index = customerList.getSelectionIndex();\n\t\t\tif (index >= 0 && index <= mCollect.getList().size())\n\t\t\t{\n\t\t\t\tString linkId = mCollect.getList().get(index).getLinkId();\n\t\t\t\tconfig.addParameter(\"LinkId\", linkId);\n\t\t\t}\n\t\t\t// write custom data to additional file in sensor\n\t\t\tConnectionManager.getInstance().currentSensor(0).writeCustomFile();\n\t\t}\n\t\tcatch (SensorNotFoundException e)\n\t\t{\n\t\t\tstatusBar.setText(e.getMessage());\n\t\t}\n\t}", "public void testZRecordingCreation() {\n\t\tsolo.pressSpinnerItem(3, 1);\n\t\tsolo.clickOnText(\"Begin Rehearsing\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.clickOnText(\"Rec\");\n\t\tsolo.typeText(0, \"testName\");\n\t\tsolo.clickOnText(\"Save\");\n\t\t// If file exists already then overwrite it\n\t\tif (solo.searchButton(\"Yes\")) {\n\t\t\tsolo.clickOnButton(\"Yes\");\n\t\t}\n\t\tsolo.pressMenuItem(4);\n\t\tassertTrue(solo.searchText(\"testName\"));\n\t}", "private void startRecording() {\n myAudioRecorder = new MediaRecorder();\n myAudioRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);\n myAudioRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);\n\n\n Log.i(\"METHOD\", \"Recording exists. File is called: \" + recordedPhrase);\n recordedPhrase = \"audioRecording_\" + num + \".3gp\";\n// recording = new File(Environment.getExternalStorageDirectory(), recordedPhrase);\n myAudioRecorder.setOutputFile(recordedPhrase);\n myAudioRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);\n\n // Record audio while button is held\n try {\n // Start recording\n myAudioRecorder.prepare();\n myAudioRecorder.start();\n Log.i(\"METHOD\", \"Audio recorder prepared\");\n } catch (IOException e){\n e.printStackTrace();\n }\n Toast.makeText(getApplication(), \"Audio recording\", Toast.LENGTH_LONG).show();\n }", "protected void onNewWatchLog(ChannelRecord channelRecord) {\n }", "public void insert(RAlarmLog record) {\r\n getSqlMapClientTemplate().insert(\"R_ALARM_LOG.ibatorgenerated_insert\", record);\r\n }", "public void addRole(String username, String role) throws UserNotExistsException ;", "ISModifyProvidedRole createISModifyProvidedRole();", "public RecorderManager(int audioSource, int sampleRate, int channelConfig, int audioFormat, String filePath){\n\t\ttry {\n\t\t\tif (audioFormat == AudioFormat.ENCODING_PCM_16BIT) {\n\t\t\t\tbSamples = 16;\n\t\t\t} else {\n\t\t\t\tbSamples = 8;\n\t\t\t}\n\t\t\tif (channelConfig == AudioFormat.CHANNEL_CONFIGURATION_MONO) {\n\t\t\t\tnChannels = 1;\n\t\t\t} else {\n\t\t\t\tnChannels = 2;\n\t\t\t}\n\t\t\tframePeriod = sampleRate * TIMER_INTERVAL / 1000;\n\t\t\tbufferSize = framePeriod * 2 * bSamples * nChannels / 8;\n\t\t\tif (bufferSize < AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)) {\n\t\t\t\t// Check to make sure buffer size is not smaller than the smallest allowed one\n\t\t\t\tbufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);\n\t\t\t\t// Set frame period and timer interval accordingly\n\t\t\t\tLog.w(TAG, \"Increasing buffer size to \" + Integer.toString(bufferSize));\n\t\t\t}\n\t\t\t//record period anand read buffer\n\t\t\tframePeriod = bufferSize / ( 2 * bSamples * nChannels / 8 );\n\t\t\tbuffer = new byte[framePeriod*bSamples/8*nChannels];\n\t\t\t/**\n\t\t\t * audioSource Audio source\n\t\t\t */\n\t\t\taudioRecorder = new AudioRecord(audioSource, sampleRate, channelConfig, audioFormat, bufferSize);\n\n\t\t\tif (audioRecorder.getState() != AudioRecord.STATE_INITIALIZED)\n\t\t\t\tthrow new Exception(\"AudioRecord initialization failed\");\n//\t\t\t//在此处进行数据读取\n//\t\t\taudioRecorder.setRecordPositionUpdateListener(updateListener);\n//\t\t\t//录音 通知周期 及 录音数据读取 buffer 的设定\n//\t\t\taudioRecorder.setPositionNotificationPeriod(framePeriod);\n//\t\t\tLog.i(TAG,\"path :\" +filePath);\n\t\t\t//当前状态为初始化状态\n\t\t\tstate = State.INITIALIZING;\n\t\t} catch (Exception e) {\n\t\t\tLog.e(TAG, \"initialize fail\",e);\n\t\t}\n\t}", "public static void decorateRegionServerConfiguration(Configuration conf) {\n if (!isBackupEnabled(conf)) {\n return;\n }\n\n String classes = conf.get(ProcedureManagerHost.REGIONSERVER_PROCEDURE_CONF_KEY);\n String regionProcedureClass = LogRollRegionServerProcedureManager.class.getName();\n if (classes == null) {\n conf.set(ProcedureManagerHost.REGIONSERVER_PROCEDURE_CONF_KEY, regionProcedureClass);\n } else if (!classes.contains(regionProcedureClass)) {\n conf.set(ProcedureManagerHost.REGIONSERVER_PROCEDURE_CONF_KEY,\n classes + \",\" + regionProcedureClass);\n }\n String coproc = conf.get(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY);\n String regionObserverClass = BackupObserver.class.getName();\n conf.set(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY,\n (coproc == null ? \"\" : coproc + \",\") + regionObserverClass);\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Added region procedure manager: {}. Added region observer: {}\",\n regionProcedureClass, regionObserverClass);\n }\n }", "Builder roleArn(String roleArn);", "public DriverConfig createBackupDriver()\n {\n DriverConfig driver = new DriverConfig(this);\n \n _backupDriverList.add(driver);\n \n return driver;\n }", "void addNewAccountToFile(Account newAccount);", "private void _writeRole(final Role role) throws IOException {\n _out.startObject();\n _writeReifier(role);\n _writeItemIdentifiers(role);\n _writeType(role);\n _writeKeyValue(\"player\", _topicRef(role.getPlayer()));\n _out.endObject();\n }", "public void startVideoRecording() {\n this.mActivity.getCameraAppUI().switchShutterSlidingAbility(false);\n if (this.mCameraState == 1) {\n setCameraState(2);\n Tag tag = TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"startVideoRecording: \");\n stringBuilder.append(Thread.currentThread());\n Log.i(tag, stringBuilder.toString());\n ToastUtil.showToast(this.mActivity, this.mActivity.getString(R.string.video_recording_start_toast), 0);\n this.mAppController.onVideoRecordingStarted();\n if (this.mModeSelectionLockToken == null) {\n this.mModeSelectionLockToken = this.mAppController.lockModuleSelection();\n }\n this.mUI.showVideoRecordingHints(false);\n this.mUI.cancelAnimations();\n this.mUI.setSwipingEnabled(false);\n this.mUI.showFocusUI(false);\n this.mAppController.getCameraAppUI().hideRotateButton();\n this.mAppController.getButtonManager().hideEffectsContainerWrapper();\n final long updateStorageSpaceTime = System.currentTimeMillis();\n this.mActivity.updateStorageSpaceAndHint(new OnStorageUpdateDoneListener() {\n public void onStorageUpdateDone(long bytes) {\n Tag access$100 = VideoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"updateStorageSpaceAndHint cost time :\");\n stringBuilder.append(System.currentTimeMillis() - updateStorageSpaceTime);\n stringBuilder.append(\"ms.\");\n Log.d(access$100, stringBuilder.toString());\n if (VideoModule.this.mCameraState != 2) {\n VideoModule.this.pendingRecordFailed();\n return;\n }\n if (bytes <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {\n Log.w(VideoModule.TAG, \"Storage issue, ignore the start request\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mCameraDevice == null) {\n Log.v(VideoModule.TAG, \"in storage callback after camera closed\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mPaused) {\n Log.v(VideoModule.TAG, \"in storage callback after module paused\");\n VideoModule.this.pendingRecordFailed();\n } else if (VideoModule.this.mMediaRecorderRecording) {\n Log.v(VideoModule.TAG, \"in storage callback after recording started\");\n } else if (VideoModule.this.isSupported(VideoModule.this.mProfile.videoFrameWidth, VideoModule.this.mProfile.videoFrameHeight)) {\n VideoModule.this.mCurrentVideoUri = null;\n VideoModule.this.mCameraDevice.enableShutterSound(false);\n if (VideoModule.this.mNeedGLRender && VideoModule.this.isSupportEffects()) {\n VideoModule.this.playVideoSound();\n VideoModule.this.initGlRecorder();\n VideoModule.this.pauseAudioPlayback();\n VideoModule.this.mActivity.getCameraAppUI().startVideoRecorder();\n } else {\n VideoModule.this.initializeRecorder();\n if (VideoModule.this.mMediaRecorder == null) {\n Log.e(VideoModule.TAG, \"Fail to initialize media recorder\");\n VideoModule.this.pendingRecordFailed();\n return;\n }\n VideoModule.this.pauseAudioPlayback();\n try {\n long mediarecorderStart = System.currentTimeMillis();\n VideoModule.this.mMediaRecorder.start();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"mMediaRecorder.start() cost time : \");\n stringBuilder2.append(System.currentTimeMillis() - mediarecorderStart);\n Log.d(access$100, stringBuilder2.toString());\n VideoModule.this.playVideoSound();\n VideoModule.this.mCameraDevice.refreshSettings();\n VideoModule.this.mCameraSettings = VideoModule.this.mCameraDevice.getSettings();\n VideoModule.this.setFocusParameters();\n } catch (RuntimeException e) {\n Log.e(VideoModule.TAG, \"Could not start media recorder. \", e);\n VideoModule.this.releaseMediaRecorder();\n VideoModule.this.mCameraDevice.lock();\n VideoModule.this.releaseAudioFocus();\n if (VideoModule.this.mModeSelectionLockToken != null) {\n VideoModule.this.mAppController.unlockModuleSelection(VideoModule.this.mModeSelectionLockToken);\n }\n VideoModule.this.setCameraState(1);\n if (VideoModule.this.shouldHoldRecorderForSecond()) {\n VideoModule.this.mAppController.setShutterEnabled(true);\n }\n VideoModule.this.mAppController.getCameraAppUI().showModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(true);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.onVideoRecordingStop();\n }\n ToastUtil.showToast(VideoModule.this.mActivity.getApplicationContext(), (int) R.string.video_record_start_failed, 0);\n return;\n }\n }\n VideoModule.this.mAppController.getCameraAppUI().setSwipeEnabled(false);\n VideoModule.this.setCameraState(3);\n VideoModule.this.tryLockFocus();\n VideoModule.this.mMediaRecorderRecording = true;\n VideoModule.this.mActivity.lockOrientation();\n VideoModule.this.mRecordingStartTime = SystemClock.uptimeMillis() + 600;\n VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().setAngle(VideoModule.this.mOrientation);\n VideoModule.this.mAppController.getCameraAppUI().hideModeOptions();\n if (VideoModule.this.updateModeSwitchUIinModule()) {\n VideoModule.this.mAppController.getCameraAppUI().setModeSwitchUIVisibility(false);\n }\n if (VideoModule.this.isVideoShutterAnimationEnssential()) {\n VideoModule.this.mAppController.getCameraAppUI().animateBottomBarToVideoStop(R.drawable.ic_stop);\n }\n if (VideoModule.this.isNeedStartRecordingOnSwitching()) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoCaptureButton(true);\n }\n if (VideoModule.this.mAppController.getCameraAppUI().getCurrentModeIndex() == VideoModule.this.mActivity.getResources().getInteger(R.integer.camera_mode_video)) {\n VideoModule.this.mAppController.getCameraAppUI().showVideoPauseButton(false);\n }\n VideoModule.this.mUI.showRecordingUI(true);\n if (VideoModule.this.mAppController.getCameraAppUI().getCameraGLSurfaceView().getVisibility() == 0) {\n VideoModule.this.mUI.hideCapButton();\n }\n VideoModule.this.showBoomKeyTip();\n VideoModule.this.updateRecordingTime();\n access$100 = VideoModule.TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"startVideoRecording cost time 1 : \");\n stringBuilder3.append(System.currentTimeMillis() - VideoModule.this.mShutterButtonClickTime);\n Log.d(access$100, stringBuilder3.toString());\n if (VideoModule.this.isSendMsgEnableShutterButton()) {\n VideoModule.this.mHandler.sendEmptyMessageDelayed(6, VideoModule.MIN_VIDEO_RECODER_DURATION);\n }\n VideoModule.this.mActivity.enableKeepScreenOn(true);\n VideoModule.this.mActivity.startInnerStorageChecking(new OnInnerStorageLowListener() {\n public void onInnerStorageLow(long bytes) {\n VideoModule.this.mActivity.stopInnerStorageChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_storage_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n VideoModule.this.mActivity.startBatteryInfoChecking(new OnBatteryLowListener() {\n public void onBatteryLow(int level) {\n VideoModule.this.mActivity.stopBatteryInfoChecking();\n if (VideoModule.this.mCameraState == 3) {\n VideoModule.this.showQuitDialog(R.string.quit_dialog_title_battery_low, R.string.quit_dialog_msg, VideoModule.this.saveAndQuit);\n }\n }\n });\n } else {\n Log.e(VideoModule.TAG, \"Unsupported parameters\");\n VideoModule.this.pendingRecordFailed();\n }\n }\n });\n }\n }", "void setLoggerConfigFileName(String fileName);" ]
[ "0.5642073", "0.5047842", "0.45872638", "0.45174208", "0.44774234", "0.43341795", "0.42438278", "0.42159456", "0.41770247", "0.41628554", "0.41472912", "0.41362822", "0.40733948", "0.4070424", "0.4063541", "0.4034238", "0.40272212", "0.40138438", "0.39946842", "0.39111403", "0.3907131", "0.38901693", "0.38599506", "0.3858395", "0.38470635", "0.38404924", "0.38384983", "0.3837232", "0.3827107", "0.38205108", "0.3803861", "0.37801325", "0.3778394", "0.37656298", "0.37617725", "0.37611452", "0.3745459", "0.3730186", "0.372404", "0.37234816", "0.3714085", "0.3710037", "0.37062362", "0.37054276", "0.3691244", "0.36905998", "0.36892447", "0.36856213", "0.36850345", "0.36847115", "0.3663768", "0.36624545", "0.3649855", "0.3649855", "0.36466166", "0.36371875", "0.36350316", "0.36308134", "0.3630391", "0.36285096", "0.3623316", "0.3622927", "0.36092675", "0.36074424", "0.36020118", "0.35996526", "0.35981852", "0.3597955", "0.35955495", "0.3594695", "0.359386", "0.3591845", "0.3591304", "0.35907617", "0.35834956", "0.3581871", "0.35797033", "0.35759956", "0.35713896", "0.35608983", "0.35602698", "0.35587183", "0.35554817", "0.35539505", "0.3550376", "0.35493818", "0.35480472", "0.35436267", "0.35424572", "0.35416746", "0.35406247", "0.35374567", "0.3532546", "0.35294107", "0.3528061", "0.3524558", "0.35203063", "0.35200274", "0.35098064", "0.35095844" ]
0.4870392
2
Returns a list of configuration items for the specified resource. The list contains details about each state of the resource during the specified time interval. You can specify a limit on the number of results returned on the page. If a limit is specified, a nextToken is returned as part of the result that you can use to continue this request. NOTE: Each call to the API is limited to span a duration of seven days. It is likely that the number of records returned is smaller than the specified limit. In such cases, you can make another call, using the nextToken .
public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<ConfigurationItem> getAllConfigurationItems() {\n\t\tString path = CONFIGURATION;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\tArrayList<ConfigurationItem> items = getConfigItems(response);\n\t\treturn items;\n\t}", "public PageBeanFieldConfigurationItem getFieldConfigurationItems(Long id, Long startAt, Integer maxResults) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'id' is set\n if (id == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'id' when calling getFieldConfigurationItems\");\n }\n // create path and map variables\n final Map<String, Object> uriVariables = new HashMap<String, Object>();\n uriVariables.put(\"id\", id);\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration/{id}/fields\").buildAndExpand(uriVariables).toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public List<Configuration> getAll();", "private static ArrayList<ConfigurationItem> getConfigItems(HttpResponse<String> response){\n\t\tArrayList<ConfigurationItem> items;\n\t\ttry {\n\t\t\titems = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<ConfigurationItem>>(){});\n\t\t\treturn items;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@GetMapping(\"/config-parameters\")\n @Timed\n public List<ConfigParameter> getAllConfigParameters() {\n log.debug(\"REST request to get all ConfigParameters\");\n return configParameterRepository.findAll();\n }", "public List<StructureTownHallConfigPojo> fetchByResourceCapacity(Integer... values) {\n\t\treturn fetch(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG.RESOURCE_CAPACITY, values);\n\t}", "@GetMapping(\"/limits\") \n\tpublic LimitConfiguration retriveLimitsFromConfigurations() \n\t{\n\t\treturn new LimitConfiguration(configuration.getMaximum(), configuration.getMaximum()); \n\t}", "public List<ProgressSiteConfiguration> getConfigurations(String siteID);", "public PageBeanFieldConfiguration getAllFieldConfigurations(Long startAt, Integer maxResults, List<Long> id, Boolean isDefault) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"isDefault\", isDefault));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfiguration> returnType = new ParameterizedTypeReference<PageBeanFieldConfiguration>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();", "List<Map<String,Object>> getConfigList(Request request, String configtype);", "public int getPollInterval();", "public List<ScheduleResource> neededSpecificResources();", "@RequestMapping(value = \"/ocConfigurations\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic List<OcConfiguration> getAll() {\n\t\tlog.debug(\"REST request to get all OcConfigurations\");\n\t\treturn ocConfigurationRepository.findAll();\n\t}", "private String[] getConfiguration() {\n String[] result = new String[6];\n // Query the latest configuration file made and send it back in an array of strings\n String query = \"SELECT * FROM configuration ORDER BY configuration_id DESC LIMIT 1\";\n sendQuery(query);\n try {\n if(resultSet.next()) {\n for (int i = 1; i < 7; i++) {\n result[i-1] = resultSet.getString(i);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "public static java.util.Iterator<org.semanticwb.process.resources.SWPResourcesConfig> listSWPResourcesConfigs()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.resources.SWPResourcesConfig>(it, true);\r\n }", "public List<ProgressConfigurationType> getAllConfigurations();", "public List<ProgressSiteConfiguration> getConfiguration(String siteID, String type);", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "public Collection<Configuration> findAll() {\n\t\treturn this.configurationRepository.findAll();\n\t}", "public PageBeanFieldConfigurationScheme getAllFieldConfigurationSchemes(Long startAt, Integer maxResults, List<Long> id) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationScheme> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationScheme>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "List<List<String>> getFilters(String resource);", "@GetMapping(\"/ap-constants\")\n @Timed\n public List<ApConstants> getAllApConstants() {\n log.debug(\"REST request to get all ApConstants\");\n return apConstantsRepository.findAll();\n }", "public List<Resource> getAvailableResources();", "private ArrayList getEnabledResources() {\n ArrayList enabledResourceList = new ArrayList();\n String meterData;\n JsonRepresentation responseJson;\n int meterNameIndex = 0;\n int meterStatusIndex = 0;\n JSONArray columnArr, tagArr, pointsArr;\n // Get the active meters from the meter API from UDR Service\n try {\n logger.debug(\"Attempting to get the Enabled Resources\");\n meterData = udrServiceClient.getActiveResources();\n responseJson = new JsonRepresentation(meterData);\n JSONObject jsonObj = responseJson.getJsonObject();\n columnArr = jsonObj.getJSONArray(\"columns\");\n //tagArr = jsonObj.getJSONArray(\"tags\");\n for (int i = 0; i < columnArr.length(); i++) {\n if (\"metername\".equals(columnArr.get(i))) {\n meterNameIndex = i;\n }\n if (\"status\".equals(columnArr.get(i))) {\n meterStatusIndex = i;\n }\n }\n pointsArr = jsonObj.getJSONArray(\"points\");\n HashMap<String, String> enabledResourceMap = new HashMap<String, String>();\n for (int j = 0; j < pointsArr.length(); j++) {\n JSONArray arr = (JSONArray) pointsArr.get(j);\n if (Integer.parseInt(arr.get(meterStatusIndex).toString()) == 1) {\n if (!enabledResourceList.contains(arr.get(meterNameIndex)))\n enabledResourceList.add(arr.get(meterNameIndex));\n }\n }\n } catch (Exception e) {\n logger.error(\"Error while getting the Enabled Resources: \"+e.getMessage());\n e.printStackTrace();\n }\n return enabledResourceList;\n }", "public static List getList(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.getList(key);\n }", "@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}", "@Override\n public Map<SquadronConfig, Integer> getRange() {\n return configuration\n .stream()\n .map(this::buildRange)\n .collect(Collectors.toMap(Pair::getKey, Pair::getValue));\n }", "String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);", "List<CacheHealth> getCacheHealth();", "public abstract List<Log> getAll() throws DatabaseConfigException;", "@Override\n\tpublic List<Object[]> getCRConfig(Short tenantId) {\n\t\tStringBuilder query = new StringBuilder().append(QueryConstants.ALIGMENT_CR_CONFIG);\n\t\tList<Object> queryParam = new ArrayList<Object>();\n\t\tqueryParam.add(tenantId);\n\t\treturn genericDAO.findEntitiesByBuildQueries(query.toString(), queryParam, 0, -1);\t\t\n\t}", "public interface Conf {\n //默认 分页加载的条目数20条\n public int DEFAULT_LIST_ITEM=20;\n}", "List<Registration> allRegUserPagination(long idUser, int currentPage, int elementPerPage);", "@Override\n public GetEventConfigurationByResourceTypesResult getEventConfigurationByResourceTypes(GetEventConfigurationByResourceTypesRequest request) {\n request = beforeClientExecution(request);\n return executeGetEventConfigurationByResourceTypes(request);\n }", "private ApolloConfig loadApolloConfig() {\n if (!m_loadConfigRateLimiter.tryAcquire(5, TimeUnit.SECONDS)) {\n //wait at most 5 seconds\n try {\n TimeUnit.SECONDS.sleep(5);\n } catch (InterruptedException e) {\n }\n }\n String appId = m_configUtil.getAppId();\n String cluster = m_configUtil.getCluster();\n String dataCenter = m_configUtil.getDataCenter();\n Tracer.logEvent(\"Apollo.Client.ConfigMeta\", STRING_JOINER.join(appId, cluster, m_namespace));\n int maxRetries = m_configNeedForceRefresh.get() ? 2 : 1;\n long onErrorSleepTime = 0; // 0 means no sleep\n Throwable exception = null;\n\n List<ServiceDTO> configServices = getConfigServices();\n String url = null;\n for (int i = 0; i < maxRetries; i++) {\n List<ServiceDTO> randomConfigServices = Lists.newLinkedList(configServices);\n Collections.shuffle(randomConfigServices);\n //Access the server which notifies the client first\n if (m_longPollServiceDto.get() != null) {\n randomConfigServices.add(0, m_longPollServiceDto.getAndSet(null));\n }\n\n for (ServiceDTO configService : randomConfigServices) {\n if (onErrorSleepTime > 0) {\n logger.warn(\n \"Load config failed, will retry in {} {}. appId: {}, cluster: {}, namespaces: {}\",\n onErrorSleepTime, m_configUtil.getOnErrorRetryIntervalTimeUnit(), appId, cluster, m_namespace);\n\n try {\n m_configUtil.getOnErrorRetryIntervalTimeUnit().sleep(onErrorSleepTime);\n } catch (InterruptedException e) {\n //ignore\n }\n }\n\n url = assembleQueryConfigUrl(configService.getHomepageUrl(), appId, cluster, m_namespace,\n dataCenter, m_remoteMessages.get(), m_configCache.get());\n\n logger.debug(\"Loading config from {}\", url);\n HttpRequest request = new HttpRequest(url);\n\n\n HttpResponse<ApolloConfig> response = m_httpUtil.doGet(request, ApolloConfig.class);\n m_configNeedForceRefresh.set(false);\n m_loadConfigFailSchedulePolicy.success();\n\n\n if (response.getStatusCode() == 304) {\n logger.debug(\"Config server responds with 304 HTTP status code.\");\n return m_configCache.get();\n }\n\n ApolloConfig result = response.getBody();\n\n logger.debug(\"Loaded config for {}: {}\", m_namespace, result);\n\n return result;\n\n // if force refresh, do normal sleep, if normal config load, do exponential sleep\n// onErrorSleepTime = m_configNeedForceRefresh.get() ? m_configUtil.getOnErrorRetryInterval() :\n// m_loadConfigFailSchedulePolicy.fail();\n }\n\n }\n String message = String.format(\n \"Load Apollo Config failed - appId: %s, cluster: %s, namespace: %s, url: %s\",\n appId, cluster, m_namespace, url);\n throw new ApolloConfigException(message, exception);\n }", "@SystemApi\n @NonNull\n public List<IkeConfigRequest> getConfigurationRequests() {\n return Collections.unmodifiableList(Arrays.asList(mConfigRequests));\n }", "@Override\n public Map<String, Object> getComponentConfiguration() {\n Config conf = new Config();\n // Configure a tick every 10 seconds\n conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, 10);\n return conf;\n }", "java.util.concurrent.Future<ListConfigurationsResult> listConfigurationsAsync(ListConfigurationsRequest listConfigurationsRequest);", "private static List<IConfigElement> getConfigElements()\n {\n\n List<IConfigElement> configElements = new ArrayList<IConfigElement>();\n\n if (ConfigReference.getInstance().isLoaded())\n {\n\n IConfigElement generalConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(Configuration.CATEGORY_GENERAL));\n IConfigElement blockConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(ConfigReference.CATEGORY_BLOCKIDS));\n\n while (generalConfigs.getChildElements().iterator().hasNext())\n {\n Object config = generalConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n\n while (blockConfigs.getChildElements().iterator().hasNext())\n {\n Object config = blockConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n }\n else\n {\n LogHelper.error(\"Attempted to retrieve config information from an unloaded config file.\");\n }\n \n return configElements;\n }", "private Future<List<Record>> getAllEndpoints() {\n Future<List<Record>> future = Future.future();\n discovery.getRecords(record -> record.getType().equals(HttpEndpoint.TYPE),\n future.completer());\n return future;\n }", "private static InternalCacheConfig defaultQueryCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Duration.ofSeconds(100);\n cacheConfig.objectCount = 10_000;\n return cacheConfig;\n }", "public List<ResourceItem> resourceList() {\n return this.resourceList;\n }", "List<PendingAccountStatus> next(int count);", "public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;", "@Override\n public ListConfigurationHistoryResult listConfigurationHistory(ListConfigurationHistoryRequest request) {\n request = beforeClientExecution(request);\n return executeListConfigurationHistory(request);\n }", "PagedIterable<ServiceEndpointPolicy> list(Context context);", "public void setPollingInterval(int seconds) {\n pollingInterval = seconds;\n }", "public ArrayList<Resource> getDynamicInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientDynamicInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuUtilizationAttribute = new Attribute();\n\t\tcpuUtilizationAttribute.setAttributeType(AttributeType.CPUUtilization);\n\t\tcpuUtilizationAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getCPUUsage()));\n\t\tcpuUtilizationAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuUtilizationAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramFreeAttribute = new Attribute();\n\t\tramFreeAttribute.setAttributeType(AttributeType.FreeMemory);\n\t\tramFreeAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getRAMFreeInfo()));\n\n\t\tramResource.addAttribute(ramFreeAttribute);\n\n\t\tramFreeAttribute.setDate(new Date());\n\n\t\tAttribute ramUtilizationAttribute = new Attribute();\n\t\tramUtilizationAttribute\n\t\t\t\t.setAttributeType(AttributeType.MemoryUtilization);\n\t\tramUtilizationAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getRAMUtilizationInfo()));\n\t\tramResource.addAttribute(ramUtilizationAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageFreeAttribute = new Attribute();\n\t\tsstorageFreeAttribute.setAttributeType(AttributeType.FreeStorage);\n\t\tsstorageFreeAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getSStorageFreeInfo()));\n\t\tsstorageFreeAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageFreeAttribute);\n\n\t\tAttribute sstorageUtilizationAttribute = new Attribute();\n\t\tsstorageUtilizationAttribute\n\t\t\t\t.setAttributeType(AttributeType.StorageUtilization);\n\t\tsstorageUtilizationAttribute.setValue(Double\n\t\t\t\t.parseDouble(clientDynamicInfo.getSStorageUtilizationInfo()));\n\t\tsstorageUtilizationAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageUtilizationAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}", "public Map<String, List<TimePeriodModel>> getAllTimePeriods();", "public ListConfigurationForAllNamespaces limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "List<RiceCooker> getPerPage(long startRow, long maxRows);", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ConfigurationList, Configuration> listConfigurationForAllNamespaces();", "public List<ExperimentCatResource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n List<ExperimentCatResource> result = new ArrayList<ExperimentCatResource>();\n EntityManager em = null;\n try {\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n QueryGenerator generator;\n Query q;\n switch (type) {\n case PROJECT:\n generator = new QueryGenerator(PROJECT);\n UserPK userPK = new UserPK();\n userPK.setGatewayId(getGatewayId());\n userPK.setUserName(user);\n Users users = em.find(Users.class, userPK);\n Gateway gatewayModel = em.find(Gateway.class, gatewayId);\n generator.setParameter(\"users\", users);\n if (gatewayModel != null) {\n generator.setParameter(\"gateway\", gatewayModel);\n }\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n\n for (Object o : q.getResultList()) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource = (org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n break;\n case EXPERIMENT:\n generator = new QueryGenerator(EXPERIMENT);\n generator.setParameter(ExperimentConstants.USER_NAME, getUser());\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n for (Object o : q.getResultList()) {\n Experiment experiment = (Experiment) o;\n ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);\n result.add(experimentResource);\n }\n\n break;\n default:\n logger.error(\"Unsupported resource type for worker resource.\", new IllegalArgumentException());\n break;\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }", "List<ResourceUsage> getLast30DaysMemoryInfo() {\n return daoInterface.getLast30DaysMemoryInfo();\n\n }", "@Override\n\tpublic int withIntervalInSeconds() {\n\t\treturn 10;\n\t}", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "public ConnectionConfiguration getResource(){\n\t\t\n\t\t// code for round robin assignment of resources.\n\t\t// flips between one and zero.\n\t\tIterator<String> iterator = resources.getAvailableResources();\n\t\t\t\t\t\t\n\t\twhile (iterator.hasNext()) {\n\t\t\tplugins.add( iterator.next() );\n\t\t\tnumberOfConnections++;\n\t\t}\n\t\t\t\t\t\t\n\t\tConnectionConfiguration config = resources.getResourceFromName(plugins.get(flip)).configuration;\n\t\tflip = (flip + 1) % numberOfConnections;\n\t\tplugins.clear();\n\t\tnumberOfConnections = 0;\n\t\t\n\t\treturn config;\n\t}", "Duration getDefaultPollInterval();", "@Override\n public com.gensym.util.Sequence getItemConfiguration() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.ITEM_CONFIGURATION_);\n return (com.gensym.util.Sequence)retnValue;\n }", "PagedIterable<ServiceEndpointPolicy> list();", "List<Resource> resources();", "@QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftSpeedOverTime> getSpeedReading(\n String spacecraftName, UUID JourneyId, Optional<Integer> pageSize, Optional<String> spagingState);", "public List <ConfigurationPojo> findByApplication(String application)\n throws ExecutionException, InterruptedException {\n CollectionReference configurations = com.google.firebase.cloud.FirestoreClient.getFirestore().collection(\"CONFIGURATIONS\");\n // Create a query against the collection.\n Query query = configurations.whereEqualTo(\"application\", application);\n // retrieve query results asynchronously using query.get()\n ApiFuture<QuerySnapshot> querySnapshot = query.get();\n List<ConfigurationPojo> configurationPojoList= toList(querySnapshot.get().getDocuments());\n return configurationPojoList;\n }", "@GET\n @Path(\"/endpoints\")\n @Produces(ApiOverviewRestEndpoint.MEDIA_TYPE_JSON_V1)\n @Cache\n Response getAvailableEndpoints(@Context final Dispatcher dispatcher);", "public void getConfiguration(final long lastupdate) {\n Logger.log(Logger.Level.DEBUG, TAG, \"getConfiguration\");\n\n configurationApi.getConfiguration(lastupdate)\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n p -> onConfigurationRequestSucess(p),\n this::onConfigurationRequestFailed\n );\n }", "@QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftTemperatureOverTime> getTemperatureReading(\n String spacecraftName, UUID JourneyId, \n Optional<Integer> pageSize, \n Optional<String> pagingState);", "public ArrayList<Configuration> getConfigurations(){\n return configurations;\n }", "@RequestMapping(\"api/getconfigdetails\")\r\n\t\r\n\tpublic List<Product> getConfigDetails()\r\n\t{\n\t\treturn service.getconfig();\r\n\t}", "public ArrayList<Screen> getScreensFromConf(Configuration c) {\n\n ArrayList<Screen> screenArrayList = new ArrayList<>();\n\n for(Screen s : screens)\n if(s.getConfiguration() == c)\n screenArrayList.add(s);\n\n return screenArrayList;\n\n }", "List<Registration> allRegTrailPagination(long idTrail, int currentPage, int elementPerPage);", "public ArrayList<Resource> getStaticInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientStaticInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuSpeedAttribute = new Attribute();\n\t\tcpuSpeedAttribute.setAttributeType(AttributeType.CPUSpeed);\n\t\tcpuSpeedAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getCPUSpeed()));\n\t\tcpuSpeedAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuSpeedAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramTotalAttribute = new Attribute();\n\t\tramTotalAttribute.setAttributeType(AttributeType.TotalMemory);\n\t\tramTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getRAMInfo()));\n\t\tramTotalAttribute.setDate(new Date());\n\t\tramResource.addAttribute(ramTotalAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ OS\n\t\tResource osResource = new Resource();\n\t\tosResource.setResourceType(ResourceType.OS);\n\t\tosResource.setName(clientStaticInfo.getOSInfo());\n\n\t\tresources.add(osResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageTotalAttribute = new Attribute();\n\t\tsstorageTotalAttribute.setAttributeType(AttributeType.TotalStorage);\n\t\tsstorageTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getSStorageInfo()));\n\t\tsstorageTotalAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageTotalAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}", "public com.vmware.converter.DvsHostInfrastructureTrafficResource[] getInfrastructureTrafficResourceConfig() {\r\n return infrastructureTrafficResourceConfig;\r\n }", "@Override\n public GetResourceEventConfigurationResult getResourceEventConfiguration(GetResourceEventConfigurationRequest request) {\n request = beforeClientExecution(request);\n return executeGetResourceEventConfiguration(request);\n }", "public List<Object> getList( String name )\n {\n List<Object> values = null;\n if ( config != null )\n {\n values = config.getList( name );\n LOG.debug( \"getList name [{}]\", name );\n }\n else\n {\n String warn = \"getList invalid config, can't read prop [\" + name + \"]\";\n LOG.warn( warn );\n }\n return values;\n }", "public List<StatisticsConfig> getConfigurations() {\n return configurations;\n }", "public List<MessageResourceHistory> listMessageResourceHistory(Long messageResource) throws Exception;", "long getIntervalInSeconds();", "@QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftPressureOverTime> getPressureReading(\n String spacecraftName, UUID JourneyId, Optional<Integer> pageSize, Optional<String> pagingState);", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n return eventStrings;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n ServiceConfigurationResourceInner get(String resourceUri, String endpointName, String serviceConfigurationName);", "public PageBeanFieldConfigurationIssueTypeItem getFieldConfigurationSchemeMappings(Long startAt, Integer maxResults, List<Long> fieldConfigurationSchemeId) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme/mapping\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"fieldConfigurationSchemeId\", fieldConfigurationSchemeId));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationIssueTypeItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationIssueTypeItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public List<TRptConfigStatus> findTRptConfigStatuss(final SearchFilter<TRptConfigStatus> searchFilter) {\n\t\tLOGGER.info(\"=========== Find TRptConfigStatuss ===========\");\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tfinal OperatorInfo operatorInfo = searchFilter.getOperatorInfo();\n\n\t\tfinal TRptConfigStatus tRptConfigStatus = searchFilter.getEntityClass();\n\t\tfinal int maxresult = paginationInfo.getMaxRows();\n\t\tfinal int index = paginationInfo.getStartIndex();\n\t\t//int maxresult = 3;\n\t\t//int index=0;\n\t\tfinal LogicalOperatorEnum logOpEnum = operatorInfo.getLogicalOperator();\n\n\t\tfinal JPAQuery jpaQuery = new JPAQuery(\"tRptConfigStatusentity\", tRptConfigStatus);\n\n\t\t/*if (tRptConfigStatus.getTRptConfigStatus() == null) {\n\t\t\tjpaQuery.bind(TRPTCONFIGSTATUS, new TRptConfigStatus());\n\t\t} else {\n\t\t\tLOGGER.info(\"tRptConfigStatus {}\", tRptConfigStatus.getTRptConfigStatus());\n\n\t\t\tjpaQuery.bind(TRPTCONFIGSTATUS, tRptConfigStatus.getTRptConfigStatus());\n\t\t}*/\n\t\tjpaQuery.setJPAql(JPAQL);\n\t\tjpaQuery.setRestrictionExpressionStrings(RESTRICTIONS);\n\t\tjpaQuery.setLogicalOperatorEnum(logOpEnum);\n\t\treturn genericDAO.findEntities(jpaQuery, index, maxresult);\n\t}", "@GetMapping(\"/course-resources\")\n @Timed\n public ResponseEntity<List<CourseResource>> getAllCourseResources(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of CourseResources\");\n Page<CourseResource> page = courseResourceService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/course-resources\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig();", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "public ListNamespacedConfiguration limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public List<Configuration> GetConfigurationsFromProject(String idProject) {\n\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\"select * from configurationCrawlers where idProject = \" + idProject ,\n\t\t\t\tnew ConfigurationMapper());\n\t}", "public static Map<String, JSONObject> getAllAPIsByResourcePath(JSONObject resource) {\n Map<String, JSONObject> parameters = new HashMap<String, JSONObject>();\n\n String basePath = (String) resource.get(Constants.API_DOC_11_BASE_PATH);\n String key = null;\n\n JSONArray apiArray = (JSONArray) resource.get(Constants.API_DOC_11_APIS);\n for (Object apiObject : apiArray) {\n\n JSONObject apiInfo = (JSONObject) apiObject;\n String path = (String) apiInfo.get(Constants.API_DOC_11_PATH);\n key = basePath + path;\n parameters.put(key, apiInfo);\n }\n\n return parameters;\n\n }", "Collection<String> readConfigs();", "@Override\n\t\tprotected GetConfigRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getConfigInfo(\"all\");\n\t\t}", "List<Map<String,Object>> getConfigList(VirtualHost vhost, String configtype);", "public long getIntervals(){\n return this.interval;\n }", "public ListConfigurationForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public ExperimentStatisticsResource getExperimentStatistics(String gatewayId, Timestamp fromTime, Timestamp toTime) throws RegistryException {\n ExperimentStatisticsResource experimentStatisticsResource = new ExperimentStatisticsResource();\n List<ExperimentSummaryResource> allExperiments = getExperimentStatisticsForState(null, gatewayId, fromTime, toTime);\n experimentStatisticsResource.setAllExperimentCount(allExperiments.size());\n experimentStatisticsResource.setAllExperiments(allExperiments);\n\n List<ExperimentSummaryResource> createdExperiments = getExperimentStatisticsForState(ExperimentState.CREATED, gatewayId, fromTime, toTime);\n createdExperiments.addAll(getExperimentStatisticsForState(ExperimentState.VALIDATED, gatewayId, fromTime, toTime));\n experimentStatisticsResource.setCreatedExperimentCount(createdExperiments.size());\n experimentStatisticsResource.setCreatedExperiments(createdExperiments);\n\n List<ExperimentSummaryResource> runningExperiments = getExperimentStatisticsForState(ExperimentState.EXECUTING, gatewayId, fromTime, toTime);\n runningExperiments.addAll(getExperimentStatisticsForState(ExperimentState.SCHEDULED, gatewayId, fromTime, toTime));\n runningExperiments.addAll(getExperimentStatisticsForState(ExperimentState.LAUNCHED, gatewayId, fromTime, toTime));\n experimentStatisticsResource.setRunningExperimentCount(runningExperiments.size());\n experimentStatisticsResource.setRunningExperiments(runningExperiments);\n\n List<ExperimentSummaryResource> completedExperiments = getExperimentStatisticsForState(ExperimentState.COMPLETED, gatewayId, fromTime, toTime);\n experimentStatisticsResource.setCompletedExperimentCount(completedExperiments.size());\n experimentStatisticsResource.setCompletedExperiments(completedExperiments);\n\n List<ExperimentSummaryResource> failedExperiments = getExperimentStatisticsForState(ExperimentState.FAILED, gatewayId, fromTime, toTime);\n experimentStatisticsResource.setFailedExperimentCount(failedExperiments.size());\n experimentStatisticsResource.setFailedExperiments(failedExperiments);\n\n List<ExperimentSummaryResource> cancelledExperiments = getExperimentStatisticsForState(ExperimentState.CANCELED, gatewayId, fromTime, toTime);\n cancelledExperiments.addAll(getExperimentStatisticsForState(ExperimentState.CANCELING, gatewayId, fromTime, toTime));\n experimentStatisticsResource.setCancelledExperimentCount(cancelledExperiments.size());\n experimentStatisticsResource.setCancelledExperiments(cancelledExperiments);\n\n return experimentStatisticsResource;\n }", "String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public int getInterval() { return _interval; }", "private TabulatorItems[] getJsonArrayOfItems(Resource resource) {\n ObjectMapper mapper = new ObjectMapper();\n TabulatorItems[] items = null;\n try {\n items = mapper.readValue(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8), TabulatorItems[].class);\n } catch (IOException ex) {\n Logger.getLogger(CollectionApiUIImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n return items;\n }", "@RequestMapping(value = \"/shopressources\", method = RequestMethod.GET)\n List<ShopRessource> getAllShopRessources();" ]
[ "0.5660362", "0.5631486", "0.55803585", "0.53508013", "0.5340651", "0.52229285", "0.51622176", "0.48939565", "0.48420545", "0.47706154", "0.47566536", "0.47435504", "0.4702695", "0.46772763", "0.4606861", "0.4576158", "0.45760247", "0.4558677", "0.454448", "0.45364764", "0.45061308", "0.44962612", "0.44807887", "0.44725642", "0.4466649", "0.44628343", "0.44463983", "0.44432306", "0.44354585", "0.44293794", "0.4425867", "0.44227692", "0.44192064", "0.44064564", "0.4386887", "0.4370403", "0.43562534", "0.43531054", "0.43474656", "0.43392354", "0.43280736", "0.43246174", "0.4316048", "0.4313018", "0.43083766", "0.42822042", "0.42799756", "0.42799217", "0.42798305", "0.42785314", "0.42683095", "0.42652765", "0.42643684", "0.42626002", "0.42586023", "0.42503336", "0.42500696", "0.42419863", "0.4239844", "0.42363003", "0.42342335", "0.4233619", "0.42311737", "0.42275804", "0.421775", "0.42138192", "0.4205478", "0.41908637", "0.41806504", "0.41796577", "0.41753617", "0.4168444", "0.41683418", "0.41675726", "0.4163034", "0.4157694", "0.4154912", "0.41529992", "0.41455114", "0.413883", "0.4138704", "0.41316026", "0.4129829", "0.41243827", "0.41142315", "0.41088185", "0.41054145", "0.41047478", "0.41029015", "0.41015428", "0.40976664", "0.40904415", "0.40857354", "0.40849203", "0.40839258", "0.4070403", "0.40653408", "0.40652075", "0.40584475", "0.40546456" ]
0.44336596
29
Returns a list of configuration items for the specified resource. The list contains details about each state of the resource during the specified time interval. You can specify a limit on the number of results returned on the page. If a limit is specified, a nextToken is returned as part of the result that you can use to continue this request. NOTE: Each call to the API is limited to span a duration of seven days. It is likely that the number of records returned is smaller than the specified limit. In such cases, you can make another call, using the nextToken .
public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest, AsyncHandler<GetResourceConfigHistoryRequest, GetResourceConfigHistoryResult> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<ConfigurationItem> getAllConfigurationItems() {\n\t\tString path = CONFIGURATION;\n\t\tHttpResponse<String> response = sendRequest(path);\n\t\tif(response == null) return null;\n\t\tArrayList<ConfigurationItem> items = getConfigItems(response);\n\t\treturn items;\n\t}", "public PageBeanFieldConfigurationItem getFieldConfigurationItems(Long id, Long startAt, Integer maxResults) throws RestClientException {\n Object postBody = null;\n // verify the required parameter 'id' is set\n if (id == null) {\n throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, \"Missing the required parameter 'id' when calling getFieldConfigurationItems\");\n }\n // create path and map variables\n final Map<String, Object> uriVariables = new HashMap<String, Object>();\n uriVariables.put(\"id\", id);\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration/{id}/fields\").buildAndExpand(uriVariables).toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public List<Configuration> getAll();", "private static ArrayList<ConfigurationItem> getConfigItems(HttpResponse<String> response){\n\t\tArrayList<ConfigurationItem> items;\n\t\ttry {\n\t\t\titems = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<ConfigurationItem>>(){});\n\t\t\treturn items;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@GetMapping(\"/config-parameters\")\n @Timed\n public List<ConfigParameter> getAllConfigParameters() {\n log.debug(\"REST request to get all ConfigParameters\");\n return configParameterRepository.findAll();\n }", "public List<StructureTownHallConfigPojo> fetchByResourceCapacity(Integer... values) {\n\t\treturn fetch(StructureTownHallConfig.STRUCTURE_TOWN_HALL_CONFIG.RESOURCE_CAPACITY, values);\n\t}", "@GetMapping(\"/limits\") \n\tpublic LimitConfiguration retriveLimitsFromConfigurations() \n\t{\n\t\treturn new LimitConfiguration(configuration.getMaximum(), configuration.getMaximum()); \n\t}", "public List<ProgressSiteConfiguration> getConfigurations(String siteID);", "public PageBeanFieldConfiguration getAllFieldConfigurations(Long startAt, Integer maxResults, List<Long> id, Boolean isDefault) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfiguration\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"isDefault\", isDefault));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfiguration> returnType = new ParameterizedTypeReference<PageBeanFieldConfiguration>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList();", "List<Map<String,Object>> getConfigList(Request request, String configtype);", "public int getPollInterval();", "public List<ScheduleResource> neededSpecificResources();", "@RequestMapping(value = \"/ocConfigurations\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic List<OcConfiguration> getAll() {\n\t\tlog.debug(\"REST request to get all OcConfigurations\");\n\t\treturn ocConfigurationRepository.findAll();\n\t}", "private String[] getConfiguration() {\n String[] result = new String[6];\n // Query the latest configuration file made and send it back in an array of strings\n String query = \"SELECT * FROM configuration ORDER BY configuration_id DESC LIMIT 1\";\n sendQuery(query);\n try {\n if(resultSet.next()) {\n for (int i = 1; i < 7; i++) {\n result[i-1] = resultSet.getString(i);\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return result;\n }", "public List<ProgressConfigurationType> getAllConfigurations();", "public static java.util.Iterator<org.semanticwb.process.resources.SWPResourcesConfig> listSWPResourcesConfigs()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.process.resources.SWPResourcesConfig>(it, true);\r\n }", "public List<ProgressSiteConfiguration> getConfiguration(String siteID, String type);", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "public Collection<Configuration> findAll() {\n\t\treturn this.configurationRepository.findAll();\n\t}", "public PageBeanFieldConfigurationScheme getAllFieldConfigurationSchemes(Long startAt, Integer maxResults, List<Long> id) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"id\", id));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationScheme> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationScheme>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "List<List<String>> getFilters(String resource);", "@GetMapping(\"/ap-constants\")\n @Timed\n public List<ApConstants> getAllApConstants() {\n log.debug(\"REST request to get all ApConstants\");\n return apConstantsRepository.findAll();\n }", "public List<Resource> getAvailableResources();", "private ArrayList getEnabledResources() {\n ArrayList enabledResourceList = new ArrayList();\n String meterData;\n JsonRepresentation responseJson;\n int meterNameIndex = 0;\n int meterStatusIndex = 0;\n JSONArray columnArr, tagArr, pointsArr;\n // Get the active meters from the meter API from UDR Service\n try {\n logger.debug(\"Attempting to get the Enabled Resources\");\n meterData = udrServiceClient.getActiveResources();\n responseJson = new JsonRepresentation(meterData);\n JSONObject jsonObj = responseJson.getJsonObject();\n columnArr = jsonObj.getJSONArray(\"columns\");\n //tagArr = jsonObj.getJSONArray(\"tags\");\n for (int i = 0; i < columnArr.length(); i++) {\n if (\"metername\".equals(columnArr.get(i))) {\n meterNameIndex = i;\n }\n if (\"status\".equals(columnArr.get(i))) {\n meterStatusIndex = i;\n }\n }\n pointsArr = jsonObj.getJSONArray(\"points\");\n HashMap<String, String> enabledResourceMap = new HashMap<String, String>();\n for (int j = 0; j < pointsArr.length(); j++) {\n JSONArray arr = (JSONArray) pointsArr.get(j);\n if (Integer.parseInt(arr.get(meterStatusIndex).toString()) == 1) {\n if (!enabledResourceList.contains(arr.get(meterNameIndex)))\n enabledResourceList.add(arr.get(meterNameIndex));\n }\n }\n } catch (Exception e) {\n logger.error(\"Error while getting the Enabled Resources: \"+e.getMessage());\n e.printStackTrace();\n }\n return enabledResourceList;\n }", "public static List getList(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.getList(key);\n }", "@Override\n\tpublic List<Config_Entity> get_all_config() {\n\t\treturn config.get_all_config();\n\t}", "@Override\n public Map<SquadronConfig, Integer> getRange() {\n return configuration\n .stream()\n .map(this::buildRange)\n .collect(Collectors.toMap(Pair::getKey, Pair::getValue));\n }", "String findConfigInfoAggrByPageFetchRows(int startRow, int pageSize);", "public Future<GetResourceConfigHistoryResult> getResourceConfigHistoryAsync(GetResourceConfigHistoryRequest getResourceConfigHistoryRequest) \n throws AmazonServiceException, AmazonClientException;", "List<CacheHealth> getCacheHealth();", "public abstract List<Log> getAll() throws DatabaseConfigException;", "@Override\n\tpublic List<Object[]> getCRConfig(Short tenantId) {\n\t\tStringBuilder query = new StringBuilder().append(QueryConstants.ALIGMENT_CR_CONFIG);\n\t\tList<Object> queryParam = new ArrayList<Object>();\n\t\tqueryParam.add(tenantId);\n\t\treturn genericDAO.findEntitiesByBuildQueries(query.toString(), queryParam, 0, -1);\t\t\n\t}", "public interface Conf {\n //默认 分页加载的条目数20条\n public int DEFAULT_LIST_ITEM=20;\n}", "List<Registration> allRegUserPagination(long idUser, int currentPage, int elementPerPage);", "@Override\n public GetEventConfigurationByResourceTypesResult getEventConfigurationByResourceTypes(GetEventConfigurationByResourceTypesRequest request) {\n request = beforeClientExecution(request);\n return executeGetEventConfigurationByResourceTypes(request);\n }", "private ApolloConfig loadApolloConfig() {\n if (!m_loadConfigRateLimiter.tryAcquire(5, TimeUnit.SECONDS)) {\n //wait at most 5 seconds\n try {\n TimeUnit.SECONDS.sleep(5);\n } catch (InterruptedException e) {\n }\n }\n String appId = m_configUtil.getAppId();\n String cluster = m_configUtil.getCluster();\n String dataCenter = m_configUtil.getDataCenter();\n Tracer.logEvent(\"Apollo.Client.ConfigMeta\", STRING_JOINER.join(appId, cluster, m_namespace));\n int maxRetries = m_configNeedForceRefresh.get() ? 2 : 1;\n long onErrorSleepTime = 0; // 0 means no sleep\n Throwable exception = null;\n\n List<ServiceDTO> configServices = getConfigServices();\n String url = null;\n for (int i = 0; i < maxRetries; i++) {\n List<ServiceDTO> randomConfigServices = Lists.newLinkedList(configServices);\n Collections.shuffle(randomConfigServices);\n //Access the server which notifies the client first\n if (m_longPollServiceDto.get() != null) {\n randomConfigServices.add(0, m_longPollServiceDto.getAndSet(null));\n }\n\n for (ServiceDTO configService : randomConfigServices) {\n if (onErrorSleepTime > 0) {\n logger.warn(\n \"Load config failed, will retry in {} {}. appId: {}, cluster: {}, namespaces: {}\",\n onErrorSleepTime, m_configUtil.getOnErrorRetryIntervalTimeUnit(), appId, cluster, m_namespace);\n\n try {\n m_configUtil.getOnErrorRetryIntervalTimeUnit().sleep(onErrorSleepTime);\n } catch (InterruptedException e) {\n //ignore\n }\n }\n\n url = assembleQueryConfigUrl(configService.getHomepageUrl(), appId, cluster, m_namespace,\n dataCenter, m_remoteMessages.get(), m_configCache.get());\n\n logger.debug(\"Loading config from {}\", url);\n HttpRequest request = new HttpRequest(url);\n\n\n HttpResponse<ApolloConfig> response = m_httpUtil.doGet(request, ApolloConfig.class);\n m_configNeedForceRefresh.set(false);\n m_loadConfigFailSchedulePolicy.success();\n\n\n if (response.getStatusCode() == 304) {\n logger.debug(\"Config server responds with 304 HTTP status code.\");\n return m_configCache.get();\n }\n\n ApolloConfig result = response.getBody();\n\n logger.debug(\"Loaded config for {}: {}\", m_namespace, result);\n\n return result;\n\n // if force refresh, do normal sleep, if normal config load, do exponential sleep\n// onErrorSleepTime = m_configNeedForceRefresh.get() ? m_configUtil.getOnErrorRetryInterval() :\n// m_loadConfigFailSchedulePolicy.fail();\n }\n\n }\n String message = String.format(\n \"Load Apollo Config failed - appId: %s, cluster: %s, namespace: %s, url: %s\",\n appId, cluster, m_namespace, url);\n throw new ApolloConfigException(message, exception);\n }", "@SystemApi\n @NonNull\n public List<IkeConfigRequest> getConfigurationRequests() {\n return Collections.unmodifiableList(Arrays.asList(mConfigRequests));\n }", "@Override\n public Map<String, Object> getComponentConfiguration() {\n Config conf = new Config();\n // Configure a tick every 10 seconds\n conf.put(Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS, 10);\n return conf;\n }", "java.util.concurrent.Future<ListConfigurationsResult> listConfigurationsAsync(ListConfigurationsRequest listConfigurationsRequest);", "private static List<IConfigElement> getConfigElements()\n {\n\n List<IConfigElement> configElements = new ArrayList<IConfigElement>();\n\n if (ConfigReference.getInstance().isLoaded())\n {\n\n IConfigElement generalConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(Configuration.CATEGORY_GENERAL));\n IConfigElement blockConfigs = new ConfigElement(ConfigReference.getInstance().getCategory(ConfigReference.CATEGORY_BLOCKIDS));\n\n while (generalConfigs.getChildElements().iterator().hasNext())\n {\n Object config = generalConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n\n while (blockConfigs.getChildElements().iterator().hasNext())\n {\n Object config = blockConfigs.getChildElements().iterator().next();\n if (config instanceof IConfigElement)\n {\n configElements.add((IConfigElement)config);\n }\n }\n }\n else\n {\n LogHelper.error(\"Attempted to retrieve config information from an unloaded config file.\");\n }\n \n return configElements;\n }", "private Future<List<Record>> getAllEndpoints() {\n Future<List<Record>> future = Future.future();\n discovery.getRecords(record -> record.getType().equals(HttpEndpoint.TYPE),\n future.completer());\n return future;\n }", "private static InternalCacheConfig defaultQueryCacheConfig() {\n InternalCacheConfig cacheConfig = new InternalCacheConfig();\n cacheConfig.maxIdle = Duration.ofSeconds(100);\n cacheConfig.objectCount = 10_000;\n return cacheConfig;\n }", "public List<ResourceItem> resourceList() {\n return this.resourceList;\n }", "List<PendingAccountStatus> next(int count);", "public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;", "PagedIterable<ServiceEndpointPolicy> list(Context context);", "@Override\n public ListConfigurationHistoryResult listConfigurationHistory(ListConfigurationHistoryRequest request) {\n request = beforeClientExecution(request);\n return executeListConfigurationHistory(request);\n }", "public ArrayList<Resource> getDynamicInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientDynamicInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuUtilizationAttribute = new Attribute();\n\t\tcpuUtilizationAttribute.setAttributeType(AttributeType.CPUUtilization);\n\t\tcpuUtilizationAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getCPUUsage()));\n\t\tcpuUtilizationAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuUtilizationAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramFreeAttribute = new Attribute();\n\t\tramFreeAttribute.setAttributeType(AttributeType.FreeMemory);\n\t\tramFreeAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getRAMFreeInfo()));\n\n\t\tramResource.addAttribute(ramFreeAttribute);\n\n\t\tramFreeAttribute.setDate(new Date());\n\n\t\tAttribute ramUtilizationAttribute = new Attribute();\n\t\tramUtilizationAttribute\n\t\t\t\t.setAttributeType(AttributeType.MemoryUtilization);\n\t\tramUtilizationAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getRAMUtilizationInfo()));\n\t\tramResource.addAttribute(ramUtilizationAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageFreeAttribute = new Attribute();\n\t\tsstorageFreeAttribute.setAttributeType(AttributeType.FreeStorage);\n\t\tsstorageFreeAttribute.setValue(Double.parseDouble(clientDynamicInfo\n\t\t\t\t.getSStorageFreeInfo()));\n\t\tsstorageFreeAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageFreeAttribute);\n\n\t\tAttribute sstorageUtilizationAttribute = new Attribute();\n\t\tsstorageUtilizationAttribute\n\t\t\t\t.setAttributeType(AttributeType.StorageUtilization);\n\t\tsstorageUtilizationAttribute.setValue(Double\n\t\t\t\t.parseDouble(clientDynamicInfo.getSStorageUtilizationInfo()));\n\t\tsstorageUtilizationAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageUtilizationAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}", "public Map<String, List<TimePeriodModel>> getAllTimePeriods();", "public void setPollingInterval(int seconds) {\n pollingInterval = seconds;\n }", "public ListConfigurationForAllNamespaces limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "List<RiceCooker> getPerPage(long startRow, long maxRows);", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "@HTTP(\n method = \"GET\",\n path = \"/apis/dapr.io/v1alpha1/configurations\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesListCall<ConfigurationList, Configuration> listConfigurationForAllNamespaces();", "public List<ExperimentCatResource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n List<ExperimentCatResource> result = new ArrayList<ExperimentCatResource>();\n EntityManager em = null;\n try {\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n QueryGenerator generator;\n Query q;\n switch (type) {\n case PROJECT:\n generator = new QueryGenerator(PROJECT);\n UserPK userPK = new UserPK();\n userPK.setGatewayId(getGatewayId());\n userPK.setUserName(user);\n Users users = em.find(Users.class, userPK);\n Gateway gatewayModel = em.find(Gateway.class, gatewayId);\n generator.setParameter(\"users\", users);\n if (gatewayModel != null) {\n generator.setParameter(\"gateway\", gatewayModel);\n }\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n\n for (Object o : q.getResultList()) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource = (org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n break;\n case EXPERIMENT:\n generator = new QueryGenerator(EXPERIMENT);\n generator.setParameter(ExperimentConstants.USER_NAME, getUser());\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n for (Object o : q.getResultList()) {\n Experiment experiment = (Experiment) o;\n ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);\n result.add(experimentResource);\n }\n\n break;\n default:\n logger.error(\"Unsupported resource type for worker resource.\", new IllegalArgumentException());\n break;\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }", "List<ResourceUsage> getLast30DaysMemoryInfo() {\n return daoInterface.getLast30DaysMemoryInfo();\n\n }", "@Override\n\tpublic int withIntervalInSeconds() {\n\t\treturn 10;\n\t}", "private List<Row> getConfigEntries() {\n InputStream inputStream = null;\n try {\n inputStream = getAssets().open(\"config.conf\");\n } catch (IOException ex) {\n System.err.println(\"File konnte nicht gelesen werden!\");\n }\n\n // inputStream in String umwandeln\n String configString = \"\";\n try {\n configString = inputStreamToString(inputStream);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // String in Zeilen umwandeln\n String[] keyValuePairs = configString.trim().split(\"\\n\");\n\n // String in Objekt mit key und value umwandeln\n return Arrays.stream(keyValuePairs).map(r -> {\n String[] temp = r.split(\"=\");\n String key = temp[0];\n String values = temp[1];\n return new Row(key, values);\n }).collect(Collectors.toList());\n }", "public ConnectionConfiguration getResource(){\n\t\t\n\t\t// code for round robin assignment of resources.\n\t\t// flips between one and zero.\n\t\tIterator<String> iterator = resources.getAvailableResources();\n\t\t\t\t\t\t\n\t\twhile (iterator.hasNext()) {\n\t\t\tplugins.add( iterator.next() );\n\t\t\tnumberOfConnections++;\n\t\t}\n\t\t\t\t\t\t\n\t\tConnectionConfiguration config = resources.getResourceFromName(plugins.get(flip)).configuration;\n\t\tflip = (flip + 1) % numberOfConnections;\n\t\tplugins.clear();\n\t\tnumberOfConnections = 0;\n\t\t\n\t\treturn config;\n\t}", "Duration getDefaultPollInterval();", "@Override\n public com.gensym.util.Sequence getItemConfiguration() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.ITEM_CONFIGURATION_);\n return (com.gensym.util.Sequence)retnValue;\n }", "PagedIterable<ServiceEndpointPolicy> list();", "List<Resource> resources();", "@QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftSpeedOverTime> getSpeedReading(\n String spacecraftName, UUID JourneyId, Optional<Integer> pageSize, Optional<String> spagingState);", "public List <ConfigurationPojo> findByApplication(String application)\n throws ExecutionException, InterruptedException {\n CollectionReference configurations = com.google.firebase.cloud.FirestoreClient.getFirestore().collection(\"CONFIGURATIONS\");\n // Create a query against the collection.\n Query query = configurations.whereEqualTo(\"application\", application);\n // retrieve query results asynchronously using query.get()\n ApiFuture<QuerySnapshot> querySnapshot = query.get();\n List<ConfigurationPojo> configurationPojoList= toList(querySnapshot.get().getDocuments());\n return configurationPojoList;\n }", "@GET\n @Path(\"/endpoints\")\n @Produces(ApiOverviewRestEndpoint.MEDIA_TYPE_JSON_V1)\n @Cache\n Response getAvailableEndpoints(@Context final Dispatcher dispatcher);", "public void getConfiguration(final long lastupdate) {\n Logger.log(Logger.Level.DEBUG, TAG, \"getConfiguration\");\n\n configurationApi.getConfiguration(lastupdate)\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n p -> onConfigurationRequestSucess(p),\n this::onConfigurationRequestFailed\n );\n }", "@QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftTemperatureOverTime> getTemperatureReading(\n String spacecraftName, UUID JourneyId, \n Optional<Integer> pageSize, \n Optional<String> pagingState);", "@RequestMapping(\"api/getconfigdetails\")\r\n\t\r\n\tpublic List<Product> getConfigDetails()\r\n\t{\n\t\treturn service.getconfig();\r\n\t}", "public ArrayList<Configuration> getConfigurations(){\n return configurations;\n }", "public ArrayList<Screen> getScreensFromConf(Configuration c) {\n\n ArrayList<Screen> screenArrayList = new ArrayList<>();\n\n for(Screen s : screens)\n if(s.getConfiguration() == c)\n screenArrayList.add(s);\n\n return screenArrayList;\n\n }", "public ArrayList<Resource> getStaticInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientStaticInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuSpeedAttribute = new Attribute();\n\t\tcpuSpeedAttribute.setAttributeType(AttributeType.CPUSpeed);\n\t\tcpuSpeedAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getCPUSpeed()));\n\t\tcpuSpeedAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuSpeedAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramTotalAttribute = new Attribute();\n\t\tramTotalAttribute.setAttributeType(AttributeType.TotalMemory);\n\t\tramTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getRAMInfo()));\n\t\tramTotalAttribute.setDate(new Date());\n\t\tramResource.addAttribute(ramTotalAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ OS\n\t\tResource osResource = new Resource();\n\t\tosResource.setResourceType(ResourceType.OS);\n\t\tosResource.setName(clientStaticInfo.getOSInfo());\n\n\t\tresources.add(osResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageTotalAttribute = new Attribute();\n\t\tsstorageTotalAttribute.setAttributeType(AttributeType.TotalStorage);\n\t\tsstorageTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getSStorageInfo()));\n\t\tsstorageTotalAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageTotalAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}", "List<Registration> allRegTrailPagination(long idTrail, int currentPage, int elementPerPage);", "public com.vmware.converter.DvsHostInfrastructureTrafficResource[] getInfrastructureTrafficResourceConfig() {\r\n return infrastructureTrafficResourceConfig;\r\n }", "@Override\n public GetResourceEventConfigurationResult getResourceEventConfiguration(GetResourceEventConfigurationRequest request) {\n request = beforeClientExecution(request);\n return executeGetResourceEventConfiguration(request);\n }", "public List<Object> getList( String name )\n {\n List<Object> values = null;\n if ( config != null )\n {\n values = config.getList( name );\n LOG.debug( \"getList name [{}]\", name );\n }\n else\n {\n String warn = \"getList invalid config, can't read prop [\" + name + \"]\";\n LOG.warn( warn );\n }\n return values;\n }", "public List<StatisticsConfig> getConfigurations() {\n return configurations;\n }", "public List<MessageResourceHistory> listMessageResourceHistory(Long messageResource) throws Exception;", "long getIntervalInSeconds();", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n List<Event> items = events.getItems();\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n return eventStrings;\n }", "@QueryProvider(providerClass = SpacecraftInstrumentsQueryProvider.class, \n entityHelpers = { SpacecraftTemperatureOverTime.class, SpacecraftPressureOverTime.class, \n SpacecraftLocationOverTime.class, SpacecraftSpeedOverTime.class})\n PagingIterable<SpacecraftPressureOverTime> getPressureReading(\n String spacecraftName, UUID JourneyId, Optional<Integer> pageSize, Optional<String> pagingState);", "@ServiceMethod(returns = ReturnType.SINGLE)\n ServiceConfigurationResourceInner get(String resourceUri, String endpointName, String serviceConfigurationName);", "public PageBeanFieldConfigurationIssueTypeItem getFieldConfigurationSchemeMappings(Long startAt, Integer maxResults, List<Long> fieldConfigurationSchemeId) throws RestClientException {\n Object postBody = null;\n String path = UriComponentsBuilder.fromPath(\"/rest/api/3/fieldconfigurationscheme/mapping\").build().toUriString();\n \n final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();\n final HttpHeaders headerParams = new HttpHeaders();\n final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"startAt\", startAt));\n queryParams.putAll(apiClient.parameterToMultiValueMap(null, \"maxResults\", maxResults));\n queryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf(\"multi\".toUpperCase()), \"fieldConfigurationSchemeId\", fieldConfigurationSchemeId));\n\n final String[] accepts = { \n \"application/json\"\n };\n final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);\n final String[] contentTypes = { };\n final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);\n\n String[] authNames = new String[] { \"OAuth2\", \"basicAuth\" };\n\n ParameterizedTypeReference<PageBeanFieldConfigurationIssueTypeItem> returnType = new ParameterizedTypeReference<PageBeanFieldConfigurationIssueTypeItem>() {};\n return apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);\n }", "public List<TRptConfigStatus> findTRptConfigStatuss(final SearchFilter<TRptConfigStatus> searchFilter) {\n\t\tLOGGER.info(\"=========== Find TRptConfigStatuss ===========\");\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tfinal OperatorInfo operatorInfo = searchFilter.getOperatorInfo();\n\n\t\tfinal TRptConfigStatus tRptConfigStatus = searchFilter.getEntityClass();\n\t\tfinal int maxresult = paginationInfo.getMaxRows();\n\t\tfinal int index = paginationInfo.getStartIndex();\n\t\t//int maxresult = 3;\n\t\t//int index=0;\n\t\tfinal LogicalOperatorEnum logOpEnum = operatorInfo.getLogicalOperator();\n\n\t\tfinal JPAQuery jpaQuery = new JPAQuery(\"tRptConfigStatusentity\", tRptConfigStatus);\n\n\t\t/*if (tRptConfigStatus.getTRptConfigStatus() == null) {\n\t\t\tjpaQuery.bind(TRPTCONFIGSTATUS, new TRptConfigStatus());\n\t\t} else {\n\t\t\tLOGGER.info(\"tRptConfigStatus {}\", tRptConfigStatus.getTRptConfigStatus());\n\n\t\t\tjpaQuery.bind(TRPTCONFIGSTATUS, tRptConfigStatus.getTRptConfigStatus());\n\t\t}*/\n\t\tjpaQuery.setJPAql(JPAQL);\n\t\tjpaQuery.setRestrictionExpressionStrings(RESTRICTIONS);\n\t\tjpaQuery.setLogicalOperatorEnum(logOpEnum);\n\t\treturn genericDAO.findEntities(jpaQuery, index, maxresult);\n\t}", "@GetMapping(\"/course-resources\")\n @Timed\n public ResponseEntity<List<CourseResource>> getAllCourseResources(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of CourseResources\");\n Page<CourseResource> page = courseResourceService.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/course-resources\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "com.google.privacy.dlp.v2.StorageConfig.TimespanConfig getTimespanConfig();", "public ListNamespacedConfiguration limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "private ArrayList<Transaction> getTransactionsOfTheDay(int assetID) throws Exception {\n int i = 1;\n ArrayList<Transaction> currentTransactions = new ArrayList<Transaction>();\n ArrayList<Transaction> allTransactions = new ArrayList<Transaction>();\n\n while (true) {\n String url = MASTER_URL + ASSETS + assetID + \"/history_paginate.api?page=\" + i;\n\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n // request method\n con.setRequestMethod(\"GET\");\n\n // request headers\n con.setRequestProperty(\"token\", USER_TOKEN);\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n // reading input stream\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\n String inputLine;\n String response = \"\";\n while ((inputLine = in.readLine()) != null) {\n response += inputLine;\n }\n in.close();\n\n DateTime assetActiveDateTime = new DateTime().minusDays(1);\n// System.out.println(assetActiveDateTime);\n int day = assetActiveDateTime.getDayOfMonth();\n int month = assetActiveDateTime.getMonthOfYear();\n int year = assetActiveDateTime.getYear();\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n String emptyHistory = \"{\\\"history\\\":[]\";\n if (!response.substring(0,13).equals(emptyHistory)) {\n String arrayResponse = response.substring(11, response.length() - 1);\n CollectionType constructCollectionType =\n TypeFactory.defaultInstance().constructCollectionType(ArrayList.class,\n Transaction.class);\n currentTransactions = mapper.readValue(arrayResponse, constructCollectionType);\n for (Transaction t : currentTransactions){\n DateTime checkoutDateTime = t.getCheckOutDateTime();\n if (day == checkoutDateTime.getDayOfMonth() &&\n month == checkoutDateTime.getMonthOfYear() &&\n year == checkoutDateTime.getYear()) {\n allTransactions.add(t);\n }\n }\n// System.out.println(allTransactions);\n currentTransactions.clear();\n } else {\n break;\n }\n i++;\n }\n return allTransactions;\n }", "public List<Configuration> GetConfigurationsFromProject(String idProject) {\n\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\"select * from configurationCrawlers where idProject = \" + idProject ,\n\t\t\t\tnew ConfigurationMapper());\n\t}", "public static Map<String, JSONObject> getAllAPIsByResourcePath(JSONObject resource) {\n Map<String, JSONObject> parameters = new HashMap<String, JSONObject>();\n\n String basePath = (String) resource.get(Constants.API_DOC_11_BASE_PATH);\n String key = null;\n\n JSONArray apiArray = (JSONArray) resource.get(Constants.API_DOC_11_APIS);\n for (Object apiObject : apiArray) {\n\n JSONObject apiInfo = (JSONObject) apiObject;\n String path = (String) apiInfo.get(Constants.API_DOC_11_PATH);\n key = basePath + path;\n parameters.put(key, apiInfo);\n }\n\n return parameters;\n\n }", "Collection<String> readConfigs();", "@Override\n\t\tprotected GetConfigRes doInBackground(Void... params) {\n\t\t\treturn JsonOA.getConfigInfo(\"all\");\n\t\t}", "List<Map<String,Object>> getConfigList(VirtualHost vhost, String configtype);", "public ListConfigurationForAllNamespaces timeoutSeconds(Number timeoutSeconds) {\n put(\"timeoutSeconds\", timeoutSeconds);\n return this;\n }", "public long getIntervals(){\n return this.interval;\n }", "public ExperimentStatisticsResource getExperimentStatistics(String gatewayId, Timestamp fromTime, Timestamp toTime) throws RegistryException {\n ExperimentStatisticsResource experimentStatisticsResource = new ExperimentStatisticsResource();\n List<ExperimentSummaryResource> allExperiments = getExperimentStatisticsForState(null, gatewayId, fromTime, toTime);\n experimentStatisticsResource.setAllExperimentCount(allExperiments.size());\n experimentStatisticsResource.setAllExperiments(allExperiments);\n\n List<ExperimentSummaryResource> createdExperiments = getExperimentStatisticsForState(ExperimentState.CREATED, gatewayId, fromTime, toTime);\n createdExperiments.addAll(getExperimentStatisticsForState(ExperimentState.VALIDATED, gatewayId, fromTime, toTime));\n experimentStatisticsResource.setCreatedExperimentCount(createdExperiments.size());\n experimentStatisticsResource.setCreatedExperiments(createdExperiments);\n\n List<ExperimentSummaryResource> runningExperiments = getExperimentStatisticsForState(ExperimentState.EXECUTING, gatewayId, fromTime, toTime);\n runningExperiments.addAll(getExperimentStatisticsForState(ExperimentState.SCHEDULED, gatewayId, fromTime, toTime));\n runningExperiments.addAll(getExperimentStatisticsForState(ExperimentState.LAUNCHED, gatewayId, fromTime, toTime));\n experimentStatisticsResource.setRunningExperimentCount(runningExperiments.size());\n experimentStatisticsResource.setRunningExperiments(runningExperiments);\n\n List<ExperimentSummaryResource> completedExperiments = getExperimentStatisticsForState(ExperimentState.COMPLETED, gatewayId, fromTime, toTime);\n experimentStatisticsResource.setCompletedExperimentCount(completedExperiments.size());\n experimentStatisticsResource.setCompletedExperiments(completedExperiments);\n\n List<ExperimentSummaryResource> failedExperiments = getExperimentStatisticsForState(ExperimentState.FAILED, gatewayId, fromTime, toTime);\n experimentStatisticsResource.setFailedExperimentCount(failedExperiments.size());\n experimentStatisticsResource.setFailedExperiments(failedExperiments);\n\n List<ExperimentSummaryResource> cancelledExperiments = getExperimentStatisticsForState(ExperimentState.CANCELED, gatewayId, fromTime, toTime);\n cancelledExperiments.addAll(getExperimentStatisticsForState(ExperimentState.CANCELING, gatewayId, fromTime, toTime));\n experimentStatisticsResource.setCancelledExperimentCount(cancelledExperiments.size());\n experimentStatisticsResource.setCancelledExperiments(cancelledExperiments);\n\n return experimentStatisticsResource;\n }", "String readConfig(String parameter, SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public int getInterval() { return _interval; }", "private TabulatorItems[] getJsonArrayOfItems(Resource resource) {\n ObjectMapper mapper = new ObjectMapper();\n TabulatorItems[] items = null;\n try {\n items = mapper.readValue(new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8), TabulatorItems[].class);\n } catch (IOException ex) {\n Logger.getLogger(CollectionApiUIImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n return items;\n }", "@Override\r\n\tpublic List<Resource> findResourcetime(String condition) {\n\t\tConnection conn=this.getConnection();\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps=conn.prepareStatement(\"select * from resource where inputtime like '%\"+condition+\"%' order by resource_id desc\");\r\n\t\t\tResultSet rs=ps.executeQuery();\r\n\t\t\tList<Resource> list=new ArrayList<Resource>();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tResource d=new Resource();\r\n\t\t\t\td.setResourceid(rs.getInt(1));\r\n\t\t\t\td.setStyleid(rs.getInt(2));\r\n\t\t\t\td.setTitle(rs.getString(3));\r\n\t\t\t\td.setSize(rs.getString(4));\r\n\t\t\t\td.setLanguage(rs.getString(5));\r\n\t\t\t\td.setBanben(rs.getString(6));\r\n\t\t\t\td.setText(rs.getString(7));\r\n\t\t\t\td.setPoint(rs.getInt(8));\r\n\t\t\t\td.setInputtime(rs.getTimestamp(9));\r\n\t\t\t\td.setResadd(rs.getString(10));\r\n\t\t\t\td.setImageadd(rs.getString(11));\r\n\t\t\t\tlist.add(d);\r\n\t\t\t}\r\n\t\t\treturn list;\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}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\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}" ]
[ "0.56617635", "0.5632575", "0.55819064", "0.53520906", "0.53419274", "0.5223785", "0.516395", "0.4894122", "0.48429805", "0.4772592", "0.475803", "0.4742991", "0.47048783", "0.4678625", "0.4608398", "0.45774546", "0.45762756", "0.45595357", "0.45464095", "0.45372623", "0.45065957", "0.44969708", "0.44822764", "0.44737914", "0.44680205", "0.44640592", "0.4447253", "0.444385", "0.44372565", "0.44329047", "0.44311917", "0.4427264", "0.44231883", "0.4420743", "0.4407861", "0.43880266", "0.43709445", "0.43567064", "0.43535554", "0.43484855", "0.4340362", "0.43299818", "0.43260974", "0.43171564", "0.43142983", "0.43102613", "0.42824873", "0.4282485", "0.4282032", "0.42797333", "0.4278925", "0.4270153", "0.42665443", "0.4265395", "0.4263269", "0.4260569", "0.42520392", "0.42503542", "0.42428815", "0.42401993", "0.423655", "0.42357755", "0.42354465", "0.42325127", "0.42288563", "0.4219695", "0.42157018", "0.42060536", "0.41921544", "0.41815832", "0.41812742", "0.41760367", "0.41702494", "0.41700628", "0.41681087", "0.4163934", "0.41590786", "0.41562024", "0.41528192", "0.4145204", "0.41414255", "0.41399968", "0.41334054", "0.41302875", "0.41251093", "0.41147622", "0.4110145", "0.41072363", "0.41064256", "0.4103179", "0.41027603", "0.4097406", "0.40920335", "0.40865582", "0.40848896", "0.40842557", "0.4071707", "0.40667692", "0.40647107", "0.40586793", "0.40553895" ]
0.0
-1
Returns details about the specified delivery channel. If a delivery channel is not specified, this action returns the details of all delivery channels associated with the account. NOTE: Currently, you can specify only one delivery channel per account.
public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public NotificationsChannel getChannel(String channelId) throws Exception;", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest,\n AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}", "public Channel getChannel()\n {\n return channel;\n }", "public String getChannel() {\n\t\treturn channel;\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getChannel() {\n return channel;\n }", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }", "public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}", "public String getChannel() {\r\n return channel;\r\n }", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }", "java.lang.String getChannel();", "public Channel getChannel() {\n return channel;\n }", "@Override\n\tpublic GetChannelConnectionDTO getChannelParameters(String channel) {\n\t\treturn null;\n\t}", "public String getChannelId() {\n return channelId;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }", "public String getChannelId()\n {\n return channelId;\n }", "java.lang.String getChannelName();", "EzyChannel getChannel();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }", "@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showChannel() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> channelList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tchannelList=jdbcTemplate.query(FiinfraConstants.SP_GET_SYSTEM_RECEPIENT_CHANNEL,new Object[]{FiinfraConstants.DELIVERYCHANNEL_ID} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(channelList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t} \n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t} \n\t\tfinally\n\t\t{\n\t\t\treturn response;\n\t\t\t\t} \n\t}", "public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "com.google.ads.googleads.v14.common.YouTubeChannelInfo getYoutubeChannel();", "public String getSalesChannel() {\r\n return salesChannel;\r\n }", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "public String toString() {\r\n\t\tif(subChannel != null)\r\n\t\t\treturn channel + \":\" + subChannel;\r\n\t\treturn channel;\r\n\t}", "public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public io.grpc.channelz.v1.ChannelOrBuilder getChannelOrBuilder(\n int index) {\n return channel_.get(index);\n }", "public ContestChannel getContestChannel(long contestChannelId) throws ContestManagementException {\r\n return null;\r\n }", "com.google.protobuf.ByteString\n getChannelBytes();", "public int getChannel() {\n return channel;\n }", "protected Channel getChannel()\n {\n return mChannel;\n }", "public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}", "public String getChannelCode() {\n return channelCode;\n }", "public Byte getChannel() {\n return channel;\n }", "public ChannelDetails() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public String getChannelUrl()\n {\n return getProvider() != null ? String.format(getProvider().channelUrl(), channelId) : null;\n }", "public Object getChannelActivityHistoryReport() {\n return channelActivityHistoryReport;\n }", "public DmaChannel getChannelAt(int i);", "public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }", "private String getDesiredChannel(final IUpdateSettings settings, final ChannelXmlBean _installedChannelBean)\n\t{\n\t\tString desiredChannel = settings.getUpdateServerChannel().toLowerCase();\n\t\tString currentChannelName = _installedChannelBean.getName();\n\n\t\tif (!currentChannelName.equals(desiredChannel))\n\t\t{\n\t\t\tif (s_log.isInfoEnabled())\n\t\t\t{\n\t\t\t\ts_log.info(\"getDesiredChannel: User is switching distribution channel from \"\n\t\t\t\t\t+ \"installed channel (\" + currentChannelName + \") to new channel (\" + desiredChannel + \")\");\n\t\t\t}\n\t\t}\n\t\treturn desiredChannel;\n\t}", "java.lang.String getChannelId();", "public String getCHANNEL_ID() {\n return CHANNEL_ID;\n }", "public List<String> getChannels() {\n return channels.get();\n }", "@Override\n public int getChannel()\n {\n return channel;\n }", "Channel channel() {\n return channel;\n }", "public List<ContestChannel> getAllContestChannels() throws ContestManagementException {\r\n if (error) {\r\n throw new ContestManagementException(\"error\");\r\n }\r\n\r\n StudioFileType fileType = new StudioFileType();\r\n fileType.setDescription(\"PS\");\r\n fileType.setExtension(\".ps\");\r\n fileType.setImageFile(false);\r\n fileType.setStudioFileType(34);\r\n\r\n ContestChannel channel = new ContestChannel();\r\n channel.setContestChannelId(new Long(2));\r\n channel.setDescription(\"This is a channel\");\r\n\r\n if (invalid) {\r\n channel.setContestChannelId(new Long(-1));\r\n }\r\n\r\n return Arrays.asList(new ContestChannel[] { channel });\r\n }", "public io.grpc.channelz.v1.ChannelOrBuilder getChannelOrBuilder(\n int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index); } else {\n return channelBuilder_.getMessageOrBuilder(index);\n }\n }", "public Channel getChannelAssigned1() {\n return channelAssigned1;\n }", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public Channel getChannelAssigned2() {\n return channelAssigned2;\n }", "public java.util.List<? extends io.grpc.channelz.v1.ChannelOrBuilder> \n getChannelOrBuilderList() {\n return channel_;\n }", "@GET\n\t\t\t@Path(\"/{id}/record\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getChannelRecord() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new ChannelDao(uriInfo,header).getChannelRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getChannelRecord()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }", "public int getChannelId( ) {\r\n return channelId;\r\n }", "public ChannelType getChannelType() {\n return type;\n }", "public Integer getChannelid() {\n return channelid;\n }", "public java.util.List<io.grpc.channelz.v1.Channel> getChannelList() {\n return channel_;\n }", "public Collection getChannelNames()\n {\n return channels.keySet();\n }", "public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}", "@GetMapping(\"/delivery-delivery-types\")\n public List<DeliveryDeliveryType> getAllDeliveryDeliveryTypes() {\n log.debug(\"REST request to get all DeliveryDeliveryTypes\");\n return deliveryDeliveryTypeRepository.findAll();\n }", "public List<ContestChannel> getAllContestChannels() throws ContestManagementException {\r\n return null;\r\n }", "public Collection<String> getChannels();", "public ChannelInfo showDialog() {\n\t\tthis.setVisible(true);\n\t\treturn this.info;\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }", "public ChannelID getChannelID() {\n return channelID1;\n }", "public static ChatChannel getChannel(final String channelName) {\n if (ChatManager.channels.containsKey(channelName))\n return ChatManager.channels.get(channelName);\n else\n return null;\n }", "private void printChannels(GuildMessageReceivedEvent event) {\n // All hail the LAMBDA!\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(category.getName());\n event.getChannel().sendMessage(category.getName()).queue();\n category.getChannels().forEach(guildChannel -> {\n if (guildChannel.getType().equals(ChannelType.TEXT)){\n System.out.println(guildChannel.getName() +\n \":\\thttps://www.discord.com/channels/\" + category.getGuild().getId() + \"/\" + guildChannel.getId());\n event.getChannel().sendMessage(guildChannel.getName() +\n \":\\thttps://www.discord.com/channels/\" + category.getGuild().getId() + \"/\" + guildChannel.getId()).queue();\n }});\n });\n }", "com.google.protobuf.ByteString\n getChannelNameBytes();", "public Integer getChannelCode() {\n return channelCode;\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() {\n if (deliverBuilder_ == null) {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 12) {\n return deliverBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }\n }", "public static Channel getChannel(int channel)\n {\n for (Channel c : Channel.values())\n if (channel == c.ordinal())\n return c;\n throw new IllegalArgumentException(\"Invalid speaker channel \" + channel + \". It must be 0 <= channel <= \" + SUB_WOOFER + \".\");\n }", "@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);", "@XmlAttribute(name = \"channel\")\n public String getChannelName()\n {\n return mChannelName;\n }", "public String getwPrPayChannel() {\n return wPrPayChannel;\n }", "@objid (\"42f8450d-1aca-4f83-a91e-9f7e7fc3c5c7\")\n NaryLink getNaryChannel();", "com.google.ads.googleads.v14.common.YouTubeChannelInfoOrBuilder getYoutubeChannelOrBuilder();", "@Override\n public List<Channel> getChannels() {\n XmlTvParser.TvListing listings = ChannelFeedUtil.getTvListings(this);\n List<Channel> channelList = new ArrayList<>(listings.getChannels());\n\n // Build advertisement list for the channel.\n Advertisement channelAd = new Advertisement.Builder()\n .setType(Advertisement.TYPE_VAST)\n .setRequestUrl(TEST_AD_REQUEST_URL)\n .build();\n List<Advertisement> channelAdList = new ArrayList<>();\n channelAdList.add(channelAd);\n return channelList;\n }", "public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }", "@Override\r\n\tpublic String toString()\r\n\t{\n\t\treturn this.getChannelName()+\"\\t\"+this.getTitle();\r\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder() {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }", "public List<String> getDisplayedChannels() {\n List<String> channels = new LinkedList<>();\n if (stringAxes_.containsKey(NDViewer.CHANNEL_AXIS)) {\n channels = stringAxes_.get(NDViewer.CHANNEL_AXIS);\n }\n if (channels.size() == 0) {\n channels.add(NDViewer.NO_CHANNEL);\n }\n return channels;\n }", "public java.lang.String getChannelId() {\n java.lang.Object ref = channelId_;\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 channelId_ = s;\n return s;\n }\n }", "public ChannelFuture getChannelFuture() {\n return channelFuture;\n }", "public java.util.List<? extends io.grpc.channelz.v1.ChannelOrBuilder> \n getChannelOrBuilderList() {\n if (channelBuilder_ != null) {\n return channelBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(channel_);\n }\n }" ]
[ "0.5597104", "0.5590799", "0.5490315", "0.54313064", "0.53565997", "0.53253806", "0.53213346", "0.5291972", "0.52909315", "0.52909315", "0.52902436", "0.5281644", "0.5277508", "0.5259415", "0.52419126", "0.5238373", "0.52259004", "0.5154559", "0.5122016", "0.51097876", "0.50976986", "0.506138", "0.5001774", "0.4990285", "0.49829635", "0.4979364", "0.497867", "0.49714547", "0.49683207", "0.49587956", "0.49104396", "0.48956886", "0.4887749", "0.48763692", "0.48646566", "0.48559988", "0.48328146", "0.48301768", "0.4825296", "0.48226064", "0.4818335", "0.4803163", "0.4801875", "0.4772495", "0.47705522", "0.47495693", "0.47413355", "0.46985742", "0.46657696", "0.46156114", "0.46143463", "0.460994", "0.4607943", "0.4591286", "0.45888236", "0.4577926", "0.4571444", "0.4569325", "0.4560822", "0.455869", "0.45499578", "0.4546095", "0.45454141", "0.45383126", "0.4530124", "0.45177642", "0.45161226", "0.4498374", "0.44971114", "0.4476676", "0.44727322", "0.4468476", "0.44433925", "0.44418222", "0.44380245", "0.4422308", "0.4420851", "0.4419125", "0.44143572", "0.44134375", "0.44057626", "0.4398077", "0.43900836", "0.43794337", "0.43777162", "0.43695402", "0.43441164", "0.43382165", "0.43141043", "0.43136162", "0.4313454", "0.42905265", "0.42837274", "0.4278663", "0.42775455", "0.42730454", "0.42676985", "0.42675367", "0.42639", "0.42638975" ]
0.6111185
0
Returns details about the specified delivery channel. If a delivery channel is not specified, this action returns the details of all delivery channels associated with the account. NOTE: Currently, you can specify only one delivery channel per account.
public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest, AsyncHandler<DescribeDeliveryChannelsRequest, DescribeDeliveryChannelsResult> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeDeliveryChannelsResult> describeDeliveryChannelsAsync(DescribeDeliveryChannelsRequest describeDeliveryChannelsRequest) \n throws AmazonServiceException, AmazonClientException;", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public NotificationsChannel getChannel(String channelId) throws Exception;", "@ApiModelProperty(value = \"Channel where the Order comes from\")\n public Channel getChannel() {\n return channel;\n }", "public Channel getChannel() {\r\n\t\treturn channel;\r\n\t}", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Channel getChannel()\n\t{\n\t\treturn channel;\n\t}", "public Channel getChannel()\n {\n return channel;\n }", "public String getChannel() {\n\t\treturn channel;\n\t}", "public String getChannel() {\n\t\treturn channel;\n\t}", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getChannelBytes() {\n java.lang.Object ref = channel_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n channel_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getChannel() {\n return channel;\n }", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index);\n } else {\n return channelBuilder_.getMessage(index);\n }\n }", "public String getChannel() {\r\n\t\treturn this.channel;\r\n\t}", "public String getChannel() {\r\n return channel;\r\n }", "public io.grpc.channelz.v1.Channel getChannel(int index) {\n return channel_.get(index);\n }", "java.lang.String getChannel();", "public Channel getChannel() {\n return channel;\n }", "@Override\n\tpublic GetChannelConnectionDTO getChannelParameters(String channel) {\n\t\treturn null;\n\t}", "public String getChannelId() {\n return channelId;\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n }\n }", "public String getChannelId()\n {\n return channelId;\n }", "java.lang.String getChannelName();", "EzyChannel getChannel();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n }\n }", "@objid (\"1bb2731c-131f-497d-9749-1f4f1e705acb\")\n Link getChannel();", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n channel_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getChannel() {\n java.lang.Object ref = channel_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n channel_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@SuppressWarnings(\"finally\")\n\t@Override\n\tpublic Response showChannel() {\n\t\tBaseResponse<NotifyTemplate> br = new BaseResponse<NotifyTemplate>();\n\t\ttry\n\t\t{\n\t\tList<NotifyTemplate> channelList;\n\t\tjdbcTemplate.setDataSource(dataSourceProvider.getDataSource(FiinfraConstants.BU_DEFAULT));\n\t\tchannelList=jdbcTemplate.query(FiinfraConstants.SP_GET_SYSTEM_RECEPIENT_CHANNEL,new Object[]{FiinfraConstants.DELIVERYCHANNEL_ID} ,new BeanPropertyRowMapper<NotifyTemplate>(NotifyTemplate.class));\n\t\tbr.setResponseListObject(channelList); \n\t\tresponse=FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t} \n\t\tcatch (DataAccessException e) {\n\t\t\tresponse = FiinfraResponseBuilder.getErrorResponse(e.getMessage().toString());\n\t\t} \n\t\tfinally\n\t\t{\n\t\t\treturn response;\n\t\t\t\t} \n\t}", "public String getChannelName()\r\n\t{\r\n\t\treturn this.sChannelName;\r\n\t}", "public String getChannelId() {\n\t\treturn channelId;\n\t}", "public int getChannel() {\r\n\t\treturn channel;\r\n\t}", "com.google.ads.googleads.v14.common.YouTubeChannelInfo getYoutubeChannel();", "public String getSalesChannel() {\r\n return salesChannel;\r\n }", "public GiftCardDeliveryCreate getDelivery() {\n return this.delivery;\n }", "public String toString() {\r\n\t\tif(subChannel != null)\r\n\t\t\treturn channel + \":\" + subChannel;\r\n\t\treturn channel;\r\n\t}", "public String getFulfillmentChannel() {\r\n return fulfillmentChannel;\r\n }", "public String getChannelId()\r\n\t{\r\n\t\treturn this.sChannelId;\r\n\t}", "public Future<DescribeDeliveryChannelStatusResult> describeDeliveryChannelStatusAsync(DescribeDeliveryChannelStatusRequest describeDeliveryChannelStatusRequest,\n AsyncHandler<DescribeDeliveryChannelStatusRequest, DescribeDeliveryChannelStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public io.grpc.channelz.v1.ChannelOrBuilder getChannelOrBuilder(\n int index) {\n return channel_.get(index);\n }", "public ContestChannel getContestChannel(long contestChannelId) throws ContestManagementException {\r\n return null;\r\n }", "com.google.protobuf.ByteString\n getChannelBytes();", "public int getChannel() {\n return channel;\n }", "protected Channel getChannel()\n {\n return mChannel;\n }", "public IChannel getChannel() {\n\t\treturn message.getChannel();\n\t}", "public String getChannelCode() {\n return channelCode;\n }", "public Byte getChannel() {\n return channel;\n }", "public ChannelDetails() {\n\t\t// TODO Auto-generated constructor stub\n\t}", "public String getChannelUrl()\n {\n return getProvider() != null ? String.format(getProvider().channelUrl(), channelId) : null;\n }", "public Object getChannelActivityHistoryReport() {\n return channelActivityHistoryReport;\n }", "public DmaChannel getChannelAt(int i);", "public Channel getChannel() throws ConnectException\n {\n return getChannel(null);\n }", "private String getDesiredChannel(final IUpdateSettings settings, final ChannelXmlBean _installedChannelBean)\n\t{\n\t\tString desiredChannel = settings.getUpdateServerChannel().toLowerCase();\n\t\tString currentChannelName = _installedChannelBean.getName();\n\n\t\tif (!currentChannelName.equals(desiredChannel))\n\t\t{\n\t\t\tif (s_log.isInfoEnabled())\n\t\t\t{\n\t\t\t\ts_log.info(\"getDesiredChannel: User is switching distribution channel from \"\n\t\t\t\t\t+ \"installed channel (\" + currentChannelName + \") to new channel (\" + desiredChannel + \")\");\n\t\t\t}\n\t\t}\n\t\treturn desiredChannel;\n\t}", "java.lang.String getChannelId();", "public String getCHANNEL_ID() {\n return CHANNEL_ID;\n }", "public List<String> getChannels() {\n return channels.get();\n }", "@Override\n public int getChannel()\n {\n return channel;\n }", "Channel channel() {\n return channel;\n }", "public List<ContestChannel> getAllContestChannels() throws ContestManagementException {\r\n if (error) {\r\n throw new ContestManagementException(\"error\");\r\n }\r\n\r\n StudioFileType fileType = new StudioFileType();\r\n fileType.setDescription(\"PS\");\r\n fileType.setExtension(\".ps\");\r\n fileType.setImageFile(false);\r\n fileType.setStudioFileType(34);\r\n\r\n ContestChannel channel = new ContestChannel();\r\n channel.setContestChannelId(new Long(2));\r\n channel.setDescription(\"This is a channel\");\r\n\r\n if (invalid) {\r\n channel.setContestChannelId(new Long(-1));\r\n }\r\n\r\n return Arrays.asList(new ContestChannel[] { channel });\r\n }", "public io.grpc.channelz.v1.ChannelOrBuilder getChannelOrBuilder(\n int index) {\n if (channelBuilder_ == null) {\n return channel_.get(index); } else {\n return channelBuilder_.getMessageOrBuilder(index);\n }\n }", "public Channel getChannelAssigned1() {\n return channelAssigned1;\n }", "public org.apache.axis.types.UnsignedInt getChannel() {\n return channel;\n }", "public Future<Void> deleteDeliveryChannelAsync(DeleteDeliveryChannelRequest deleteDeliveryChannelRequest) \n throws AmazonServiceException, AmazonClientException;", "public Channel getChannelAssigned2() {\n return channelAssigned2;\n }", "public java.util.List<? extends io.grpc.channelz.v1.ChannelOrBuilder> \n getChannelOrBuilderList() {\n return channel_;\n }", "@GET\n\t\t\t@Path(\"/{id}/record\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getChannelRecord() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new ChannelDao(uriInfo,header).getChannelRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getChannelRecord()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "public Channel channel()\r\n/* 36: */ {\r\n/* 37: 68 */ return this.channel;\r\n/* 38: */ }", "public int getChannelId( ) {\r\n return channelId;\r\n }", "public ChannelType getChannelType() {\n return type;\n }", "public Integer getChannelid() {\n return channelid;\n }", "public java.util.List<io.grpc.channelz.v1.Channel> getChannelList() {\n return channel_;\n }", "public Collection getChannelNames()\n {\n return channels.keySet();\n }", "public String getSubChannel() {\r\n\t\treturn this.subChannel;\r\n\t}", "public List<ContestChannel> getAllContestChannels() throws ContestManagementException {\r\n return null;\r\n }", "@GetMapping(\"/delivery-delivery-types\")\n public List<DeliveryDeliveryType> getAllDeliveryDeliveryTypes() {\n log.debug(\"REST request to get all DeliveryDeliveryTypes\");\n return deliveryDeliveryTypeRepository.findAll();\n }", "public Collection<String> getChannels();", "public ChannelInfo showDialog() {\n\t\tthis.setVisible(true);\n\t\treturn this.info;\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }", "public ChannelID getChannelID() {\n return channelID1;\n }", "public static ChatChannel getChannel(final String channelName) {\n if (ChatManager.channels.containsKey(channelName))\n return ChatManager.channels.get(channelName);\n else\n return null;\n }", "private void printChannels(GuildMessageReceivedEvent event) {\n // All hail the LAMBDA!\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(category.getName());\n event.getChannel().sendMessage(category.getName()).queue();\n category.getChannels().forEach(guildChannel -> {\n if (guildChannel.getType().equals(ChannelType.TEXT)){\n System.out.println(guildChannel.getName() +\n \":\\thttps://www.discord.com/channels/\" + category.getGuild().getId() + \"/\" + guildChannel.getId());\n event.getChannel().sendMessage(guildChannel.getName() +\n \":\\thttps://www.discord.com/channels/\" + category.getGuild().getId() + \"/\" + guildChannel.getId()).queue();\n }});\n });\n }", "com.google.protobuf.ByteString\n getChannelNameBytes();", "public Integer getChannelCode() {\n return channelCode;\n }", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfo getDeliver() {\n if (deliverBuilder_ == null) {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n } else {\n if (stepInfoCase_ == 12) {\n return deliverBuilder_.getMessage();\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }\n }", "public static Channel getChannel(int channel)\n {\n for (Channel c : Channel.values())\n if (channel == c.ordinal())\n return c;\n throw new IllegalArgumentException(\"Invalid speaker channel \" + channel + \". It must be 0 <= channel <= \" + SUB_WOOFER + \".\");\n }", "@PreAuthorize(\"hasRole('superman')\")\n\tpublic abstract Channel getChannel(String name);", "@XmlAttribute(name = \"channel\")\n public String getChannelName()\n {\n return mChannelName;\n }", "@objid (\"42f8450d-1aca-4f83-a91e-9f7e7fc3c5c7\")\n NaryLink getNaryChannel();", "public String getwPrPayChannel() {\n return wPrPayChannel;\n }", "com.google.ads.googleads.v14.common.YouTubeChannelInfoOrBuilder getYoutubeChannelOrBuilder();", "@Override\n public List<Channel> getChannels() {\n XmlTvParser.TvListing listings = ChannelFeedUtil.getTvListings(this);\n List<Channel> channelList = new ArrayList<>(listings.getChannels());\n\n // Build advertisement list for the channel.\n Advertisement channelAd = new Advertisement.Builder()\n .setType(Advertisement.TYPE_VAST)\n .setRequestUrl(TEST_AD_REQUEST_URL)\n .build();\n List<Advertisement> channelAdList = new ArrayList<>();\n channelAdList.add(channelAd);\n return channelList;\n }", "public ChannelLogger getChannelLogger() {\n return this.channelLogger;\n }", "@Override\r\n\tpublic String toString()\r\n\t{\n\t\treturn this.getChannelName()+\"\\t\"+this.getTitle();\r\n\t}", "@java.lang.Override\n public com.google.cloud.networkmanagement.v1beta1.DeliverInfoOrBuilder getDeliverOrBuilder() {\n if (stepInfoCase_ == 12) {\n return (com.google.cloud.networkmanagement.v1beta1.DeliverInfo) stepInfo_;\n }\n return com.google.cloud.networkmanagement.v1beta1.DeliverInfo.getDefaultInstance();\n }", "public List<String> getDisplayedChannels() {\n List<String> channels = new LinkedList<>();\n if (stringAxes_.containsKey(NDViewer.CHANNEL_AXIS)) {\n channels = stringAxes_.get(NDViewer.CHANNEL_AXIS);\n }\n if (channels.size() == 0) {\n channels.add(NDViewer.NO_CHANNEL);\n }\n return channels;\n }", "public java.lang.String getChannelId() {\n java.lang.Object ref = channelId_;\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 channelId_ = s;\n return s;\n }\n }", "public ChannelFuture getChannelFuture() {\n return channelFuture;\n }", "public java.util.List<? extends io.grpc.channelz.v1.ChannelOrBuilder> \n getChannelOrBuilderList() {\n if (channelBuilder_ != null) {\n return channelBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(channel_);\n }\n }" ]
[ "0.6110857", "0.559632", "0.5591946", "0.54906213", "0.5357151", "0.53259295", "0.53218395", "0.529259", "0.52912277", "0.52912277", "0.5290833", "0.52822286", "0.5278098", "0.52597797", "0.5243151", "0.5238689", "0.52262884", "0.51557094", "0.5122773", "0.51102877", "0.50975364", "0.50618964", "0.50021404", "0.49907598", "0.49839318", "0.49801794", "0.49791467", "0.4972508", "0.49686962", "0.4959286", "0.4910723", "0.4896349", "0.48883224", "0.48768964", "0.48649284", "0.4855083", "0.48308888", "0.48306918", "0.4823669", "0.48230535", "0.4817905", "0.48036513", "0.48023573", "0.4772777", "0.47710732", "0.47500932", "0.47419938", "0.4698744", "0.46659088", "0.4616366", "0.461513", "0.4610175", "0.4609257", "0.4592313", "0.45884344", "0.45786273", "0.45717052", "0.45694944", "0.45614907", "0.45595434", "0.45501623", "0.45465207", "0.45460528", "0.45388794", "0.452958", "0.4518405", "0.45159224", "0.449904", "0.44979662", "0.4477095", "0.44730663", "0.44687757", "0.44434282", "0.44419807", "0.44373792", "0.44212702", "0.44202763", "0.44189465", "0.4414717", "0.44130668", "0.44063756", "0.43985012", "0.43907836", "0.437989", "0.43779832", "0.43693042", "0.43443733", "0.43383455", "0.43147004", "0.43140697", "0.43123943", "0.42904004", "0.42839274", "0.42785987", "0.42783388", "0.42722958", "0.4268322", "0.42680487", "0.4265068", "0.42635354" ]
0.5431373
4
Returns the current status of the specified configuration recorder. If a configuration recorder is not specified, this action returns the status of all configuration recorder associated with the account. NOTE:Currently, you can specify only one configuration recorder per account.
public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest,\n AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler)\n throws AmazonServiceException, AmazonClientException;", "public Recording.Status getStatus() {\n\t\treturn status;\n\t}", "public Integer getAccountStatus() {\n return accountStatus;\n }", "public Integer getRecordStatus() {\n return recordStatus;\n }", "public Integer getRecordStatus() {\n return recordStatus;\n }", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public Account status() {\n RestRequest request = new RestRequest();\n request.setResource(\"account/status\");\n\n return client.get(request, Account.class);\n }", "public String getReportStatus() {\r\n return reportStatus;\r\n }", "ControllerStatusEntity getControllerStatus(String clientId);", "public String getRebillStatus()\n\t{\n\t\tif(response.containsKey(\"status\")) {\n\t\t\treturn response.get(\"status\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public BatchStatus getStatus() {\n return this.status;\n }", "@Override\n public List<Report> getStatusList(){\n List<Report> statusList = null;\n statusList = adminMapper.getStatusList();\n return statusList;\n }", "public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;", "public String getAssessmentandReportingInstanceStatus() {\n return assessmentandReportingInstanceStatus;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.RateBookStatus getStatus();", "@ApiModelProperty(required = true, value = \"Indicates whether the schedule is currently active. The value SKIP is equivalent to ACTIVE except that the customer has requested the next normal occurrence to be skipped.\")\n @NotNull\n\n public StatusEnum getStatus() {\n return status;\n }", "@GET\n\t@Path(\"/status\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getStatus() {\n\t\treturn new JSONObject().put(\"currFloor\", Constants.currFloor).put(\"movingState\", Constants.movingState).toString();\n\t}", "public StatusLogger getStatusLogger();", "ApplicationWebConfigStatus getStatus();", "public com.google.protobuf.ByteString getStatus() {\n return instance.getStatus();\n }", "public List<ProgressConfigurationType> getAllConfigurations();", "public JenkinsStatus getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public int getCBRStatus();", "@java.lang.Override\n public com.clarifai.grpc.api.status.Status getStatus() {\n return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.status.Status getStatus() {\n return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;\n }", "public String getStatus() {\n return status;\n }", "protected DrmJobStatus demoGetStatus() {\n return new DrmJobStatus.Builder()\n // the external job id\n .extJobId(\"EXT_01\")\n // the name of the job queue\n .queueId(\"job_queue_id\")\n // the date the job was submitted to the queue (Don't set this if the job has not been submitted)\n .submitTime(new Date())\n // the date the job started running on the queue (Don't set this if the job has not yet started)\n .startTime(new Date())\n // the date the job completed running (Don't set this if the job has not yet completed)\n .endTime(new Date())\n // the status code\n .jobState(DrmJobState.DONE)\n // the exit code of the job, '0' indicates success\n .exitCode(0)\n // the max memory usage in bytes (can also pass in a string such as \"2 Gb\")\n .memory(2000L)\n // the max swap space used by the job, can accept numBytes or a String (see above)\n .maxSwap(\"2 Gb\")\n // the CPU usage of the job\n .cpuTime(new CpuTime(1000L, TimeUnit.MILLISECONDS))\n // the max number of threads used by the job (Don't call this if not known)\n .maxThreads(1)\n // the max number of processes used by the job (Don't call this if not known)\n .maxProcesses(1)\n .build();\n }", "public String getStatus()\n {\n\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus()\n\t\t{\n\t\t\tElement statusElement = XMLUtils.findChild(mediaElement, STATUS_ELEMENT_NAME);\n\t\t\treturn statusElement == null ? null : statusElement.getTextContent();\n\t\t}", "public Status getStatus() {\n return result;\n }", "public ElevatorServiceStatus getRecords() {\n return new ElevatorServiceStatus(totalWaitTime, totalTravelTime, \n totalTravelDistance.toBigInteger(), passengersServed);\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public Map<String, Serializable> getStatus() {\n return status;\n }", "@ApiModelProperty(value = \"Status of campaign or flow\")\r\n public String getStatus() {\r\n return status;\r\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }" ]
[ "0.61011386", "0.5916069", "0.54097134", "0.53902155", "0.53902155", "0.53607076", "0.53607076", "0.53607076", "0.53607076", "0.5297541", "0.47863257", "0.47403592", "0.46949956", "0.46601203", "0.46590117", "0.46543893", "0.46271545", "0.45939794", "0.45766482", "0.45741585", "0.4551828", "0.45473874", "0.45470324", "0.45418108", "0.45272624", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45082697", "0.45062357", "0.45009845", "0.45009845", "0.44930685", "0.4485568", "0.44804296", "0.44783172", "0.44783172", "0.44783172", "0.44681323", "0.44661993", "0.44592825", "0.44532576", "0.44532576", "0.44532576", "0.44532576", "0.44532576", "0.44517875", "0.4448146", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44438502", "0.44433022", "0.44433022", "0.44433022", "0.44433022", "0.44433022", "0.44433022", "0.44433022" ]
0.7083716
0
Returns the current status of the specified configuration recorder. If a configuration recorder is not specified, this action returns the status of all configuration recorder associated with the account. NOTE:Currently, you can specify only one configuration recorder per account.
public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest, AsyncHandler<DescribeConfigurationRecorderStatusRequest, DescribeConfigurationRecorderStatusResult> asyncHandler) throws AmazonServiceException, AmazonClientException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Future<DescribeConfigurationRecorderStatusResult> describeConfigurationRecorderStatusAsync(DescribeConfigurationRecorderStatusRequest describeConfigurationRecorderStatusRequest) \n throws AmazonServiceException, AmazonClientException;", "public Recording.Status getStatus() {\n\t\treturn status;\n\t}", "public Integer getAccountStatus() {\n return accountStatus;\n }", "public Integer getRecordStatus() {\n return recordStatus;\n }", "public Integer getRecordStatus() {\n return recordStatus;\n }", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public String getRecordStatus() {\r\n\t\treturn recordStatus;\r\n\t}", "public Account status() {\n RestRequest request = new RestRequest();\n request.setResource(\"account/status\");\n\n return client.get(request, Account.class);\n }", "public String getReportStatus() {\r\n return reportStatus;\r\n }", "ControllerStatusEntity getControllerStatus(String clientId);", "public String getRebillStatus()\n\t{\n\t\tif(response.containsKey(\"status\")) {\n\t\t\treturn response.get(\"status\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public List<Report> getStatusList(){\n List<Report> statusList = null;\n statusList = adminMapper.getStatusList();\n return statusList;\n }", "public BatchStatus getStatus() {\n return this.status;\n }", "public Future<DescribeConfigurationRecordersResult> describeConfigurationRecordersAsync(DescribeConfigurationRecordersRequest describeConfigurationRecordersRequest) \n throws AmazonServiceException, AmazonClientException;", "public String getAssessmentandReportingInstanceStatus() {\n return assessmentandReportingInstanceStatus;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public typekey.RateBookStatus getStatus();", "@ApiModelProperty(required = true, value = \"Indicates whether the schedule is currently active. The value SKIP is equivalent to ACTIVE except that the customer has requested the next normal occurrence to be skipped.\")\n @NotNull\n\n public StatusEnum getStatus() {\n return status;\n }", "@GET\n\t@Path(\"/status\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic String getStatus() {\n\t\treturn new JSONObject().put(\"currFloor\", Constants.currFloor).put(\"movingState\", Constants.movingState).toString();\n\t}", "public StatusLogger getStatusLogger();", "ApplicationWebConfigStatus getStatus();", "public com.google.protobuf.ByteString getStatus() {\n return instance.getStatus();\n }", "public List<ProgressConfigurationType> getAllConfigurations();", "public JenkinsStatus getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public int getCBRStatus();", "@java.lang.Override\n public com.clarifai.grpc.api.status.Status getStatus() {\n return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;\n }", "@java.lang.Override\n public com.clarifai.grpc.api.status.Status getStatus() {\n return status_ == null ? com.clarifai.grpc.api.status.Status.getDefaultInstance() : status_;\n }", "public String getStatus() {\n return status;\n }", "protected DrmJobStatus demoGetStatus() {\n return new DrmJobStatus.Builder()\n // the external job id\n .extJobId(\"EXT_01\")\n // the name of the job queue\n .queueId(\"job_queue_id\")\n // the date the job was submitted to the queue (Don't set this if the job has not been submitted)\n .submitTime(new Date())\n // the date the job started running on the queue (Don't set this if the job has not yet started)\n .startTime(new Date())\n // the date the job completed running (Don't set this if the job has not yet completed)\n .endTime(new Date())\n // the status code\n .jobState(DrmJobState.DONE)\n // the exit code of the job, '0' indicates success\n .exitCode(0)\n // the max memory usage in bytes (can also pass in a string such as \"2 Gb\")\n .memory(2000L)\n // the max swap space used by the job, can accept numBytes or a String (see above)\n .maxSwap(\"2 Gb\")\n // the CPU usage of the job\n .cpuTime(new CpuTime(1000L, TimeUnit.MILLISECONDS))\n // the max number of threads used by the job (Don't call this if not known)\n .maxThreads(1)\n // the max number of processes used by the job (Don't call this if not known)\n .maxProcesses(1)\n .build();\n }", "public String getStatus()\n {\n\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus() {\n return status;\n }", "public String getStatus()\n\t\t{\n\t\t\tElement statusElement = XMLUtils.findChild(mediaElement, STATUS_ELEMENT_NAME);\n\t\t\treturn statusElement == null ? null : statusElement.getTextContent();\n\t\t}", "public Status getStatus() {\n return result;\n }", "public ElevatorServiceStatus getRecords() {\n return new ElevatorServiceStatus(totalWaitTime, totalTravelTime, \n totalTravelDistance.toBigInteger(), passengersServed);\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public String getStatus() {\r\n return status;\r\n }", "public Map<String, Serializable> getStatus() {\n return status;\n }", "@ApiModelProperty(value = \"Status of campaign or flow\")\r\n public String getStatus() {\r\n return status;\r\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }" ]
[ "0.7084941", "0.59142995", "0.54072577", "0.5388508", "0.5388508", "0.5359166", "0.5359166", "0.5359166", "0.5359166", "0.5294496", "0.4784541", "0.4737802", "0.4692367", "0.4657992", "0.46577156", "0.46552607", "0.46256158", "0.45922348", "0.457393", "0.45714337", "0.45498466", "0.4545553", "0.4544599", "0.45419386", "0.45250198", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4505617", "0.4503119", "0.4498451", "0.4498451", "0.4490471", "0.4482083", "0.4477727", "0.44755697", "0.44755697", "0.44755697", "0.4465825", "0.4463136", "0.44588062", "0.4450547", "0.4450547", "0.4450547", "0.4450547", "0.4450547", "0.44502032", "0.4445366", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44409224", "0.44404674", "0.44404674", "0.44404674", "0.44404674", "0.44404674", "0.44404674", "0.44404674" ]
0.6102229
1
String[] must be length 3; first index is id.toString(), second is message, third is time
MessageService(Player[] players) { this.players = players; log = new ArrayList<String[]>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void testStringArray() {\n\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\tString array[] = { \"Gimme\", \"a\", \"break\", \"dude\" };\n\t\tmessage.setPayload(array);\n\t\tsend(message);\n\t}", "private static String[] m19261a(long[] jArr, long[] jArr2) {\n AppMethodBeat.m2504i(18986);\n String[] strArr;\n if (jArr2 == null || jArr2.length < 4) {\n strArr = new String[]{ShareConstants.WEB_DIALOG_PARAM_MESSAGE, \"msgId <= \" + jArr[0], \"ImgInfo2\", \"id <= \" + jArr[1], \"videoinfo2\", \"rowid <= \" + jArr[2], \"EmojiInfo\", \"rowid <= \" + jArr[3], \"conversation\", null, \"rconversation\", null};\n AppMethodBeat.m2505o(18986);\n return strArr;\n }\n strArr = new String[12];\n strArr[0] = ShareConstants.WEB_DIALOG_PARAM_MESSAGE;\n strArr[1] = String.format(\"msgId > %d AND msgId <= %d\", new Object[]{Long.valueOf(jArr2[0]), Long.valueOf(jArr[0])});\n strArr[2] = \"ImgInfo2\";\n strArr[3] = String.format(\"id > %d AND id <= %d\", new Object[]{Long.valueOf(jArr2[1]), Long.valueOf(jArr[1])});\n strArr[4] = \"videoinfo2\";\n strArr[5] = String.format(\"rowid > %d AND rowid <= %d\", new Object[]{Long.valueOf(jArr2[2]), Long.valueOf(jArr[2])});\n strArr[6] = \"EmojiInfo\";\n strArr[7] = String.format(\"rowid > %d AND rowid <= %d\", new Object[]{Long.valueOf(jArr2[3]), Long.valueOf(jArr[3])});\n strArr[8] = \"conversation\";\n strArr[9] = null;\n strArr[10] = \"rconversation\";\n strArr[11] = null;\n AppMethodBeat.m2505o(18986);\n return strArr;\n }", "void threadMsg(String[][] msg);", "public MessageRecord(byte[] id, String idText, Timestamp dateCreated, Timestamp lastEdited, String text, byte[] authorId, String authorIdText, byte[] chatId, String chatIdText) {\n super(Message.MESSAGE);\n\n set(0, id);\n set(1, idText);\n set(2, dateCreated);\n set(3, lastEdited);\n set(4, text);\n set(5, authorId);\n set(6, authorIdText);\n set(7, chatId);\n set(8, chatIdText);\n }", "private String[] getConflictedIds(String errorMsg){\n String startStr = \": \";\n String endStr = \";\";\n int startIndex = errorMsg.indexOf(startStr) + startStr.length();\n int endIndex = errorMsg.indexOf(endStr);\n return errorMsg.substring(startIndex, endIndex).split(\",\");\n }", "public String getContentByArrayTypeRandom(int...type){\n\t\tArrayList<String> arrayMessage = new ArrayList<String>();\n\t\tRandom randomGenerator = new Random();\n\t\tfor (int j = 0; j<type.length; j++){\n\t\t\tfor(int i = 0; i<this.type.size(); i++)\n\t\t\t{\t\n\t\t\t\tif(this.type.get(i) == type[j]) {\n\t\t\t\t\tarrayMessage.add(this.content.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint index = randomGenerator.nextInt(arrayMessage.size());\n\t\tString message = arrayMessage.get(index);\n\t\tinfo(\"Message is: \"+message);\n\t\treturn message;\n\t}", "public void sendMessage(String[] messages) {}", "public String getMessageAt(int i){\n return message[i];\n }", "private static void m1853a(Activity activity, String[] strArr) {\n StringBuilder sb = new StringBuilder();\n int i = 0;\n while (i < strArr.length) {\n sb.append(\" \");\n int i2 = i + 1;\n sb.append(i2);\n sb.append('.');\n sb.append(activity.getString(C0517e.f2297k.get(strArr[i]).intValue()));\n sb.append(10);\n i = i2;\n }\n m1852a(activity, activity.getString(C0462R.string.string_permission_request_message, new Object[]{sb.toString()}), (DialogInterface.OnClickListener) new C0535b(activity));\n }", "@Override\n\t\tpublic ChatMessage[] newArray(int arg0) {\n\t\t\treturn new ChatMessage[1];\n\t\t}", "ChatMessage(String input) {\r\n int idx = input.indexOf(']');\r\n int idx2 = input.indexOf(':'); //TODO error handling\r\n timeStamp = input.substring(0, idx+1);\r\n username = input.substring(idx+1, idx2);\r\n message = input.substring(idx2 + 2);\r\n }", "long getMessageId(int index);", "public String getString_entries_id() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,11)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_entries_id(i) == (char)0) break;\n carr[i] = (char)getElement_entries_id(i);\n }\n return new String(carr,0,i);\n }", "private static ArrayList<String> transmit(String[] array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tret.add(array[i]);\n\t\t}\n\t\treturn ret;\t\n\t}", "private void recordMessageID( byte[] messageID ){\n \tsynchronized( this.messageIDs ){\n \t Log.d(TAG, \"New Message, ID: \" + messageID.toString());\n \t messageIDs.add(messageID);\n \t // Remove oldest message ID if too many are stored\n \t if (messageIDs.size() > Constants.MSG_HISTORY_LEN) {\n \t Log.d(TAG, \"Removing Message from History\");\n \t messageIDs.remove(0);\n \t }\n \t}\n }", "private static String[] getStringBasedOnCoordinate(String idNames, String[] id_to_coord_list){\n String[] subID = idNames.split(\"\\\\n\");\n String[] string_of_id = new String[subID.length-1];\n for(int i=1; i< subID.length; i++){\n string_of_id[i-1] = id_to_coord_list[Integer.parseInt(subID[i])-1];\n }\n return string_of_id;\n }", "static String getMessage(Message messageID, String... args) {\r\n \t\tString message = messages[messageID.ordinal()];\r\n \r\n \t\tfor (int i = 0; i < args.length; i++) {\r\n \t\t\tString param = args[i];\r\n \t\t\tmessage = message.replace(\"{\" + i + \"}\", param);\r\n \t\t}\r\n \r\n \t\treturn message;\r\n \r\n \t}", "private boolean validatePacket(String[] packet)throws NullPointerException\n\t{\n\n\t\tif(packet == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Packet was null\");\n\t\t}\n\n\t\tfor(int i = 2 ; i< packet.length ; i++)\n\t\t{\n\t\t\tif(packet.length > MAX_SIZE)\n\t\t\t{\n\t\t\t\tthrow new StringIndexOutOfBoundsException(\"Message \" + (i-1)+\": \" + \"'\" + packet[i] + \"'\" + \"is to long\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private static void storeMessage(String tokenId,String db,String user,String password){\n JSONArray jsonArray = getMailMessageList(tokenId);\n for (int i=0; i<jsonArray.length();i++)\n {\n for (int j=0;j<jsonArray.getJSONObject(i).getJSONArray(\"messages\").length();j++)\n {\n String messageId = jsonArray.getJSONObject(i).getJSONArray(\"messages\").getJSONObject(j)\n .getString(\"id\");\n addIntoDB(getMailMessage(tokenId, messageId),db,user,password);/*insert each mail details into DB */\n }\n }\n }", "private void testIntArray() {\n\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\n\t\tint array[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };\n\t\tmessage.setPayload(array);\n\t\tsend(message);\n\t}", "public static String m18356a(int[] iArr) {\n if (iArr == null) {\n return \"\";\n }\n StringBuffer stringBuffer = new StringBuffer();\n for (int i = 0; i < iArr.length; i++) {\n if (i < iArr.length - 1) {\n stringBuffer.append(iArr[i] + Constants.ACCEPT_TIME_SEPARATOR_SP);\n } else {\n stringBuffer.append(iArr[i]);\n }\n }\n return stringBuffer.toString();\n }", "private static String getMsg(Object... msgs) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (Object object : msgs) {\n\t\t\tsb.append(object.toString()).append(\"\\n\");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String getString_data() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,60)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_data(i) == (char)0) break;\n carr[i] = (char)getElement_data(i);\n }\n return new String(carr,0,i);\n }", "public List<Message> parse(String message) {\n msg = new JSONObject(message);\n data = msg.getJSONArray(\"data\");\n List<Message> msgArray = new ArrayList<Message>();\n for (int i=0; i<data.length(); i++){\n Message tmpmsg = new Message();\n JSONObject tmpObj = data.getJSONObject(i);\n tmpmsg.setKey(tmpObj.getString(\"deviceId\"));\n tmpmsg.setEventTimestamp(Instant.parse(tmpObj.getString(\"time\")));\n tmpmsg.setResponseBody(tmpObj.toString());\n msgArray.add(tmpmsg);\n }\n return msgArray;\n }", "java.lang.String getMessageInfoID();", "private static ArrayList<String> transmit(ArrayList<String> array){\n\n\t\tArrayList<String> ret= new ArrayList<String>();\n\t\tfor (int i = 0; i < array.size(); i++) {\n\t\t\tret.add(array.get(i));\n\t\t}\n\t\treturn ret;\t\n\t}", "@Test\n public void testReadFileToArrayString() throws IOException {\n\n File file = new File(\"..//data//test//chat_readFileToArrayString.txt\");\n Chat chat = new Chat();\n String[] valueArrayString = {\"1\", \"2\", \"3\", \"4\", \"5\"};\n\n String[] testString = chat.getArrayStringFromFile(file);\n\n assertThat(valueArrayString, is(testString));\n\n }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n String string0 = EWrapperMsgGenerator.fundamentalData((-1622103582), \"convertible = \");\n assertEquals(\"id = -1622103582 len = 14\\nconvertible = \", string0);\n }", "public List<Message> listMessages(Integer tid);", "@Order(2)\n\t\t@TestFactory\n\t\tpublic Iterable<DynamicTest> verifyMessageTimeFormat() throws IOException, ParseException {\n\t\t\t\n\t\t\tCollection<DynamicTest> tests = new ArrayList<DynamicTest>();\n\t\t\tString allMessagesResponse = Requests.getMessage(\"\");\n\t\t\t\n\t\t\tArrayList<String> timeIdList = JSONUtils.getAllRecordsByKey(allMessagesResponse, \"time\");\n\t\t\t\n\t\t\tfor (String id : timeIdList){\n\t\t\t\t\n\t\t\t tests.add(DynamicTest.dynamicTest(\n\t\t\t \t\t\"Verify that each 'time' id matches the specified format\", \n\t\t\t \t\t() -> assertEquals(true, id.matches(regexTime))));\n\t\t\t}\n\t\t\treturn tests;\n\t\t}", "private String[] BreakDiscoveryMessageToStrings(String input) {\n return input.split(\"[\" + Constants.STANDART_FIELD_SEPERATOR + \"]\"); //parse the string by the separator char\n }", "private void addMessageToQueue( byte[] buffer ){\n \tsynchronized (this.messages) {\n byte message[] = new byte[buffer.length\n - Constants.MESSAGE_ID_LEN - 1];\n for (int i = Constants.MESSAGE_ID_LEN + 1; i < buffer.length; i++) {\n message[i - Constants.MESSAGE_ID_LEN - 1] = buffer[i];\n }\n messages.add(message);\n }\n }", "java.lang.String getMessageId();", "private ArrayList<String> dataConvertForFromArray(ArrayList<Response.Messages> message_array_list){\n\t\tArrayList<String> all_returned_data = new ArrayList<String>();\n\n\t\tString str1 = \"\";\n\n\t\ttry{\n\t\t\tfrom_data = mf.fFrom(message_array_list);\n\t\t} catch (NullPointerException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t//For loop to combine all data into readable format for message preview list\n\t\tfor (int i = 0; i<message_array_list.size(); i++){\n\t\t\tstr1 = from_data.get(i);\n\t\t\tall_returned_data.add(str1);\n\t\t}\n\t\treturn all_returned_data;\n\t}", "public static byte[] getRequestMessage(int index, int begin, int length)\r\n\t{\n\t\trequest = ByteBuffer.allocate(17);\r\n\t\trequest.put(new byte[]{0,0,0,13,6}); // <length = 13>, <id> = 6\r\n\t\trequest.putInt(index); // <index>\r\n\t\trequest.putInt(begin); // <begin>\r\n\t\trequest.putInt(length); // <length>\r\n\t\treturn request.array();\r\n\t}", "private byte[] uniqueMessageID(Random rand){\n \tbyte[] messageID = new byte[Constants.MESSAGE_ID_LEN];\n \t\n synchronized (this.messageIDs) {\n boolean uniqueID = false;\n while (!uniqueID) {\n rand.nextBytes(messageID); //Fills messageID with random bytes\n uniqueID = true;\n for (byte[] i : messageIDs){\n if (Arrays.equals(i, messageID)) {\n Log.d(TAG, \"Message already recieved, ID starts with: \" //Message exists in messageIDs\n + messageID[0]);\n uniqueID = false;\n break; //Regenerates a random ID and tries again.\n }\n }\n }\n }\n \n return messageID;\n }", "private List<String> getMessages(List<Object> args) {\n String inputArgName = \"input\";\n\n List<String> messages = new ArrayList<>();\n if(hasArg(inputArgName, 1, String.class, args)) {\n // the input is a single message as a string\n String msg = getArg(inputArgName, 1, String.class, args);\n messages.add(msg);\n\n } else if(hasArg(inputArgName, 1, List.class, args)) {\n // the input is a list of messages\n List<Object> arg1 = getArg(inputArgName, 1, List.class, args);\n for(Object object: arg1) {\n String msg = String.class.cast(object);\n messages.add(msg);\n }\n\n } else {\n throw new IllegalArgumentException(format(\"Expected a string or list of strings to parse.\"));\n }\n\n return messages;\n }", "@Override\n public String[] getMessages(int begin, int end) {\n if (begin > end)\n throw new IllegalArgumentException(\"The begin parameter should be smaller \"\n + \"than the end parameter\");\n if (begin < 0 || end >= messages.size())\n throw new IllegalArgumentException(\"The given begin-end interval is not \"\n + \"a subset of the index-range of the messages.\");\n List<String> result = new ArrayList<>();\n for (int i = begin; i<=end; i++)\n result.add(messages.get(i));\n return result.toArray(new String[0]);\n }", "public final void a(int i, int i2, int i3, String str, q qVar, byte[] bArr) {\n AppMethodBeat.i(109251);\n ab.d(TAG, \"netId : \" + i + \" errType :\" + i2 + \" errCode: \" + i3 + \" errMsg :\" + str);\n f fVar;\n if (i2 == 0 && i3 == 0) {\n com.tencent.mm.bt.a acA = this.ehh.acA();\n v vVar;\n if (acA == null) {\n vVar = new v(\"null cannot be cast to non-null type com.tencent.mm.protocal.protobuf.StorySyncResponse\");\n AppMethodBeat.o(109251);\n throw vVar;\n }\n LinkedList linkedList;\n cfa cfa = (cfa) acA;\n tc tcVar = cfa.vTR;\n if (tcVar != null) {\n linkedList = tcVar.jBw;\n }\n linkedList = new LinkedList();\n if (linkedList.size() > 0) {\n b bVar = this.rUU;\n j.p(linkedList, \"cmdList\");\n bVar.mgm = linkedList;\n bVar.mgn.sendEmptyMessage(0);\n AppMethodBeat.o(109251);\n return;\n }\n if (cfa.vTO != null) {\n SKBuiltinBuffer_t sKBuiltinBuffer_t = cfa.vTO;\n j.o(sKBuiltinBuffer_t, \"resp.KeyBuf\");\n if (sKBuiltinBuffer_t.getBuffer() != null) {\n SKBuiltinBuffer_t sKBuiltinBuffer_t2 = cfa.vTO;\n j.o(sKBuiltinBuffer_t2, \"resp.KeyBuf\");\n byte[] toByteArray = sKBuiltinBuffer_t2.getBuffer().toByteArray();\n acA = this.ehh.acz();\n if (acA == null) {\n vVar = new v(\"null cannot be cast to non-null type com.tencent.mm.protocal.protobuf.StorySyncRequest\");\n AppMethodBeat.o(109251);\n throw vVar;\n }\n toByteArray = aa.j(((cez) acA).vTO.getBuffer().toByteArray(), toByteArray);\n if (toByteArray != null) {\n if (((toByteArray.length == 0 ? 1 : 0) == 0 ? 1 : 0) != 0) {\n e RP = g.RP();\n j.o(RP, \"MMKernel.storage()\");\n RP.Ry().set(8195, bo.cd(toByteArray));\n }\n }\n }\n }\n fVar = this.ehi;\n if (fVar == null) {\n j.avw(\"callback\");\n }\n fVar.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.o(109251);\n return;\n }\n fVar = this.ehi;\n if (fVar == null) {\n j.avw(\"callback\");\n }\n fVar.onSceneEnd(i2, i3, str, this);\n AppMethodBeat.o(109251);\n }", "private static String a(long l10, String string2, long l11, byte[] byArray, String string3) {\n Object object;\n Object object2;\n JSONObject jSONObject;\n long l12;\n Object object3;\n int n10;\n Object object4;\n block17: {\n block16: {\n object4 = byArray;\n n10 = TextUtils.isEmpty((CharSequence)string3);\n object3 = \"\";\n if (n10 != 0) {\n return object3;\n }\n long l13 = System.currentTimeMillis();\n long l14 = 1000L;\n l12 = l13 / l14;\n jSONObject = new JSONObject();\n object2 = \"TLS.ver\";\n String string4 = \"2.0\";\n try {\n jSONObject.put((String)object2, (Object)string4);\n object2 = \"TLS.identifier\";\n string4 = string2;\n }\n catch (JSONException jSONException) {\n l14 = l10;\n string4 = string2;\n break block16;\n }\n try {\n jSONObject.put((String)object2, (Object)string2);\n object2 = \"TLS.sdkappid\";\n l14 = l10;\n }\n catch (JSONException jSONException) {\n l14 = l10;\n break block16;\n }\n try {\n jSONObject.put((String)object2, l10);\n object2 = \"TLS.expire\";\n }\n catch (JSONException jSONException) {\n break block16;\n }\n try {\n jSONObject.put((String)object2, l11);\n object2 = \"TLS.time\";\n jSONObject.put((String)object2, l12);\n break block17;\n }\n catch (JSONException jSONException) {}\n }\n object2.printStackTrace();\n }\n n10 = 0;\n object2 = null;\n if (object4 != null) {\n n10 = 2;\n object4 = Base64.encodeToString((byte[])object4, (int)n10);\n object2 = \"TLS.userbuf\";\n try {\n jSONObject.put((String)object2, object4);\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n }\n object = object4;\n } else {\n object = null;\n }\n object2 = d.v.o.c.d(l10, string2, l12, l11, string3, object);\n int n11 = ((String)object2).length();\n if (n11 == 0) {\n return object3;\n }\n object4 = \"TLS.sig\";\n try {\n jSONObject.put((String)object4, object2);\n }\n catch (JSONException jSONException) {\n jSONException.printStackTrace();\n }\n object2 = new Deflater();\n object4 = jSONObject.toString();\n object3 = Charset.forName(\"UTF-8\");\n object4 = object4.getBytes((Charset)object3);\n ((Deflater)object2).setInput((byte[])object4);\n ((Deflater)object2).finish();\n object4 = new byte[2048];\n int n12 = ((Deflater)object2).deflate((byte[])object4);\n ((Deflater)object2).end();\n object4 = d.v.o.c.b(Arrays.copyOfRange(object4, 0, n12));\n return new String((byte[])object4);\n }", "public static String[] strings() {\n\tString[]update = new String[MAX];\n\tfor (int i = 0; i < MAX; i++) {\n\t update[i] = new String (\"george\");\n\t}\n\n\treturn update;\n }", "private ArrayList<String> getTimeArray(ArrayList<String> parameters, int lastWordIndex) {\n return new ArrayList<String>(parameters.subList(lastWordIndex+1, parameters.size()));\n }", "public final void testNotificationStringObjectlongString() {\n Notification n = new Notification(\"type\", \"src\", 1, \"msg\");\n assertEquals(\"type\", n.getType());\n assertEquals(\"src\", n.getSource());\n assertEquals(1, n.getSequenceNumber());\n assertEquals(\"msg\", n.getMessage());\n }", "public static void createNotificationMessages(Object message, List<String> msgJsonList, MessageSource source) {\n AtlasNotificationMessage<?> notificationMsg = new AtlasNotificationMessage<>(CURRENT_MESSAGE_VERSION, message, getHostAddress(), getCurrentUser(), false, source);\n String msgJson = AtlasType.toV1Json(notificationMsg);\n\n boolean msgLengthExceedsLimit = (msgJson.length() * MAX_BYTES_PER_CHAR) > MESSAGE_MAX_LENGTH_BYTES;\n\n if (msgLengthExceedsLimit) { // get utf-8 bytes for msgJson and check for length limit again\n byte[] msgBytes = AtlasNotificationBaseMessage.getBytesUtf8(msgJson);\n\n msgLengthExceedsLimit = msgBytes.length > MESSAGE_MAX_LENGTH_BYTES;\n\n if (msgLengthExceedsLimit) {\n String msgId = getNextMessageId();\n CompressionKind compressionKind = CompressionKind.NONE;\n\n if (MESSAGE_COMPRESSION_ENABLED) {\n byte[] encodedBytes = AtlasNotificationBaseMessage.gzipCompressAndEncodeBase64(msgBytes);\n\n compressionKind = CompressionKind.GZIP;\n\n LOG.info(\"Compressed large message: msgID={}, uncompressed={} bytes, compressed={} bytes\", msgId, msgBytes.length, encodedBytes.length);\n\n msgLengthExceedsLimit = encodedBytes.length > MESSAGE_MAX_LENGTH_BYTES;\n\n if (!msgLengthExceedsLimit) { // no need to split\n AtlasNotificationStringMessage compressedMsg = new AtlasNotificationStringMessage(encodedBytes, msgId, compressionKind);\n\n msgJson = AtlasType.toV1Json(compressedMsg); // msgJson will not have multi-byte characters here, due to use of encodeBase64() above\n msgBytes = null; // not used after this point\n } else { // encodedBytes will be split\n msgJson = null; // not used after this point\n msgBytes = encodedBytes;\n }\n }\n\n if (msgLengthExceedsLimit) {\n // compressed messages are already base64-encoded\n byte[] encodedBytes = MESSAGE_COMPRESSION_ENABLED ? msgBytes : AtlasNotificationBaseMessage.encodeBase64(msgBytes);\n int splitCount = encodedBytes.length / MESSAGE_MAX_LENGTH_BYTES;\n\n if ((encodedBytes.length % MESSAGE_MAX_LENGTH_BYTES) != 0) {\n splitCount++;\n }\n\n for (int i = 0, offset = 0; i < splitCount; i++) {\n int length = MESSAGE_MAX_LENGTH_BYTES;\n\n if ((offset + length) > encodedBytes.length) {\n length = encodedBytes.length - offset;\n }\n\n AtlasNotificationStringMessage splitMsg = new AtlasNotificationStringMessage(encodedBytes, offset, length, msgId, compressionKind, i, splitCount);\n\n String splitMsgJson = AtlasType.toV1Json(splitMsg);\n\n msgJsonList.add(splitMsgJson);\n\n offset += length;\n }\n\n LOG.info(\"Split large message: msgID={}, splitCount={}, length={} bytes\", msgId, splitCount, encodedBytes.length);\n }\n }\n }\n\n if (!msgLengthExceedsLimit) {\n msgJsonList.add(msgJson);\n }\n }", "public String[] getString();", "private byte[] generateRandomMessage(int size) {\r\n\t\t\r\n\t\tif (size < 10) { // minimum length is 10, since first 9 digits \r\n\t\t\t\t\t\t // are used as message id\r\n\t\t\tsize = 10;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tString message = \"\";\r\n\t\t\r\n\t\tfor(int j=0; j<size; j++) {\r\n\t\t\t\r\n\t\t\tmessage += (char)(random.nextInt(10)+'0');\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn message.getBytes();\r\n\t\t\r\n\t}", "static int[] createMessage(int[] data){\r\n\t\tint[] message = new int[6 + data.length + 2];\r\n\t\tmessage[0] = 0xF0;\r\n\t\tmessage[1] = 0x41;\r\n\t\tmessage[2] = 0x7F;\r\n\t\tmessage[3] = 0x00;\r\n\t\tmessage[4] = 0x59;\r\n\t\tmessage[5] = 0x12;\r\n\t\tint total = 0;\r\n\t\tfor(int i = 0; i < data.length; i++){\r\n\t\t\ttotal += data[i];\r\n\t\t\tmessage[6 + i] = data[i];\r\n\t\t}\r\n\t\tmessage[message.length - 2] = 128 - (total % 128);\r\n\t\tmessage[message.length - 1] = 0xF7;\r\n\t\treturn message;\r\n\t}", "@Override\r\n\tpublic void Received(Object o, String msg) {\n\t\tif(interval == 50){\r\n\t\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\t\tif(i == 0){\r\n\t\t\t\t\ttext[i] = null;\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttext[i-1] = text[i];\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\ttext[interval-1] = msg;\r\n\t\t}else{\r\n\t\t\ttext[interval] = msg;\r\n\t\t\tinterval++;\r\n\t\t}\r\n\t}", "public String getStrings(final int msgId) {\n\n String msg = \"\";\n if (msgId != 0) {\n msg = getString(msgId);\n }\n return msg;\n }", "protected abstract void sendMessage(UUID[] players, String[] messages, IntConsumer response);", "@Override\n public void payload(byte[] data) {\n \tmLastMessage.append(new String(data));\n Log.d(TAG, \"Payload received: \" + data);\n }", "public final void testNotificationStringObjectlonglong() {\n Notification n = new Notification(\"type\", \"src\", 1, 2);\n assertEquals(\"type\", n.getType());\n assertEquals(\"src\", n.getSource());\n assertEquals(1, n.getSequenceNumber());\n assertEquals(2, n.getTimeStamp());\n }", "private void Msgdelete() {\n\t\tRequestParams params = new RequestParams();\n\t\tids=new String[myList.size()];\n\t\tfor (int i = 0; i < myList.size(); i++) {\n\t\t\tids[i]=myList.get(i).getId();\n\t\t\t//if (myList.get(i).getIscheck()) { }\n\t\t}\n\t\tGson gson = new Gson();\n\t \n\t\tparams.put(\"customer_id\", 16);\n\t\ttry {\n\t\t\tparams.put(\"ids\", new JSONArray(gson.toJson(ids)));\n\t\t} catch (JSONException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n \n\t\tparams.setUseJsonStreamer(true);\n\t\tMyApplication.getInstance().getClient()\n\t\t\t\t.post(Config.batchRead, params, new AsyncHttpResponseHandler() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody) {\n\t\t\t\t\t\tSystem.out.println(\"-onSuccess---\");\n\t\t\t\t\t\tString responseMsg = new String(responseBody)\n\t\t\t\t\t\t\t\t.toString();\n\t\t\t\t\t\tLog.e(\"LJP\", responseMsg);\n\t\t\t\t\t\t \n\t\t\t\t\t\tJSONObject jsonobject = null;\n\t\t\t\t\t\tint code = 0;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjsonobject = new JSONObject(responseMsg);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\tcode = jsonobject.getInt(\"code\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(code==-2){\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t}else if(code==1){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(), jsonobject.getString(\"message\"),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(int statusCode, Header[] headers,\n\t\t\t\t\t\t\tbyte[] responseBody, Throwable error) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\terror.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "String[] chiediScommessa();", "private void remplirTabNewMess(){\n\t\tCalendar date = Calendar.getInstance();\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);\n\n\t\tString passage[]= new String[7];\n\n\t\tpassage[0]=tab[2]; //sender\n\t\tpassage[1]=tab[1]; //recep\n\t\tpassage[2]=tab[4]; //obj\n\t\tpassage[3]=tab[3]; //txt\n\t\tpassage[4]=\"0\"; //importance\n\t\tpassage[5]=sdf.format(date.getTime()); //date\n\t\tpassage[6]=\"1\"; //non lu\n\n\t\tmessages.add((String[])passage);\n\t\tthis.send(messages);\n\t\tmessagerie.Server.con.closeSocket();\n\n\t}", "public abstract String getEmail( String [ ] strLineDataArray );", "public final void testNotificationStringObjectlong() {\n Notification n = new Notification(\"type\", \"src\", 1);\n assertEquals(\"type\", n.getType());\n assertEquals(\"src\", n.getSource());\n assertEquals(1, n.getSequenceNumber());\n }", "public String assembleMsgs(int status, String[] raw) {\r\n String result = NnStatusMsg.getPlayerMsg(status, locale);\r\n String separatorStr = \"--\\n\";\r\n if (raw != null && raw.length > 0) {\r\n result = result + separatorStr;\r\n for (String s : raw) {\r\n if (s != null) {\r\n s = s.replaceAll(\"null\", \"\");\r\n }\r\n result += s + separatorStr;\r\n }\r\n }\r\n if (result.substring(result.length()-3, result.length()).equals(separatorStr)) {\r\n result = result.substring(0, result.length()-3);\r\n }\r\n return result;\r\n }", "Object getMessageId();", "public final void testNotificationStringObjectlonglongString() {\n Notification n = new Notification(\"type\", \"src\", 1, 2, \"msg\");\n assertEquals(\"type\", n.getType());\n assertEquals(\"src\", n.getSource());\n assertEquals(1, n.getSequenceNumber());\n assertEquals(2, n.getTimeStamp());\n assertEquals(\"msg\", n.getMessage());\n }", "public void receiveMyMessages(String[] messages) {\n final String str0 = messages[0];\n final String str1 = messages[1];\n final String str2 = messages[2];\n final String str3 = messages[3];\n final String str4 = messages[4];\n final String str5 = messages[5];\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n receivedTextView6.setText(str5);\n receivedTextView5.setText(str4);\n receivedTextView4.setText(str3);\n receivedTextView3.setText(str2);\n receivedTextView2.setText(str1);\n receivedTextView1.setText(str0);\n }\n });\n }", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateNewsBulletin(11, 13, \"E{Iw-^%H:1$e/\", \"LW)W-|=b,lie*CW\");\n assertEquals(\"MsgId=11 :: MsgType=13 :: Origin=LW)W-|=b,lie*CW :: Message=E{Iw-^%H:1$e/\", string0);\n }", "@Override\n protected String createEntityAsString(Message entity) {\n String stringToIds = \"\";\n List<User> listUsers = entity.getTo();\n for (User friend : listUsers) {\n stringToIds += friend.getId() + \",\";\n }\n if (stringToIds.length() >= 1)\n stringToIds = stringToIds.substring(0, stringToIds.length() - 1);\n String messageAttributes = \"\";\n messageAttributes += entity.getId() + \";\" +\n entity.getFrom().getId() + \";\" +\n stringToIds + \";\" +\n entity.getMessage() + \";\" +\n entity.getDate().format(Constants.DATE_TIME_FORMATTER);\n return messageAttributes;\n }", "static SocksMessage getMessage( ByteBuffer passedBuffer ) throws LoggableException {\n\n byte[] theMsgId = new byte[4], theId = new byte[4],clientId = new byte[4], tempHostId = new byte[4];\n SocksMessage aMessage;\n\n //Copy over the client id\n passedBuffer.get(clientId, 0, clientId.length);\n \n //Copy over the dest host id\n passedBuffer.get(tempHostId, 0, tempHostId.length);\n \n //Copy over the msg id\n passedBuffer.get(theMsgId, 0, theMsgId.length);\n \n //Copy over the id\n passedBuffer.get(theId, 0, theId.length);\n int fileId = SocketUtilities.byteArrayToInt(theId);\n\n //Copy over the id\n byte[] theSocksBytes = new byte[ passedBuffer.remaining() ];\n passedBuffer.get(theSocksBytes, 0, theSocksBytes.length);\n\n //Create the message type\n aMessage = new SocksMessage( fileId, theSocksBytes );\n aMessage.setSrcHostId(SocketUtilities.byteArrayToInt(clientId));\n aMessage.setDestHostId(SocketUtilities.byteArrayToInt(tempHostId) );\n \n return aMessage;\n \n }", "public void assignString(String[] msg) {\n if (msg.length > 0) {\n msg[0] = new String(\"Ali\");\n }\n }", "long getMessageID();", "long getMessageID();", "private ArrayList<String> dataConvertForMasterList(ArrayList<Response.Messages> message_array_list){\n\t\tArrayList<String> all_returned_data = new ArrayList<String>();\n\n\t\tString str1, str2, str3, str4, longString;\n\t\tstr1 = \"\";\n\t\tstr2 = \"\";\n\t\tstr3 = \"\";\n\t\tstr4 = \"\";\n\t\tlongString = \"\";\n\n\t\tArrayList<String> body_preview_data = new ArrayList<String>();\n\t\tArrayList<String> subject_data = new ArrayList<String>();\n\t\t//ArrayList<String> from_data = new ArrayList<String>(); //Declared above already. Leaving this in for testing purposes\n\t\tArrayList<String> date_data = new ArrayList<String>();\n\n\t\ttry{\n\t\t\tbody_preview_data = mf.fBody_Preview(message_array_list);\n\t\t\tsubject_data = mf.fSubject(message_array_list);\n\t\t\tfrom_data = mf.fFrom(message_array_list);\n\t\t\tdate_data = mf.fDate(message_array_list);\n\t\t} catch (NullPointerException e){\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t//For loop to combine all data into readable format for message preview list\n\t\tfor (int i = 0; i<message_array_list.size(); i++){\n\t\t\tstr1 = date_data.get(i);\n\t\t\tstr2 = from_data.get(i);\n\t\t\tstr3 = subject_data.get(i);\n\t\t\tstr4 = body_preview_data.get(i)+ \"...\";\n\n\t\t\t//Adjust the date string to remove the +0000. First 20 characters (to eliminate time zone declaration)\n\t\t\tString adjust_date = str1.substring(0, Math.min(str1.length(), 20));\n\n\t\t\tlongString = adjust_date + \"\\n\" + str2 + \"\\n\" + str3 + \"\\n\" + str4;\n\n\t\t\tall_returned_data.add(longString);\n\t\t}\n\t\treturn all_returned_data;\n\t}", "private static String formStringFromList(List<Long> ids)\n {\n if (ids == null || ids.size() == 0)\n return null;\n\n StringBuilder idsBuffer = new StringBuilder();\n for (Long id : ids)\n {\n idsBuffer.append(id).append(\",\");\n }\n\n return idsBuffer.toString().substring(0, idsBuffer.length() - 1);\n }", "@Override\n public Message extractEntity(List<String> attributes) {\n Long idMessage = Long.parseLong(attributes.get(0));\n Long idSender = Long.parseLong(attributes.get(1));\n String[] listIDSReceivers = attributes.get(2).split(\",\");\n List<User> listReceivers = new ArrayList<>();\n\n // TODO: verifica in UI daca userii pe care ii adauga exista\n for(int i = 0; i < listIDSReceivers.length; i++) {\n listReceivers.add(userRepository.findOne(Long.parseLong(listIDSReceivers[i])));\n }\n String textMessage = attributes.get(3);\n LocalDateTime data = LocalDateTime.parse(attributes.get(4), Constants.DATE_TIME_FORMATTER);\n Message message = new Message(userRepository.findOne(idSender), listReceivers, \"Subject\",\n textMessage, data);\n message.setId(idMessage);\n return message;\n }", "ChildMessage(String t, int ids[], String nums[],Context ctx){\t\t\t\t\n\t\t\ttext = t;\t\t\t\t\t\t\t\t\t\t\t// Set text for child\n\t\t\tnumbers = new HashMap<String,Integer>();\t\t\t// init numbers hashmap\n\t\t\taddNumbers(ids,nums,ctx);\t\t\t\t\t\t\t\t\n\t\t}", "private String splitmessage(String message){\n String finalmessage = message;\n int length = message.length();\n for(int i = 50; i < length; i = i + 50){\n finalmessage = new StringBuilder(finalmessage).insert(i, \"\\n\").toString();\n }\n return finalmessage;\n }", "int getMessageId();", "Long getMessageTimestamp(String msgId);", "void stampaMessaggio(String messaggio);", "@Test\n public void shouldGiveTwoElementEmptyStringArrayOnOnlyColon() {\n String decodeString = \"Og==\";\n assertThat(\"Two elements is present\", BasicAuth.decode(decodeString), is(arrayWithSize(2)));\n assertThat(\"First element is emptyString\", BasicAuth.decode(decodeString)[0], isEmptyString());\n assertThat(\"Second element is emptyString\", BasicAuth.decode(decodeString)[1], isEmptyString());\n }", "public String constructMessage(String... keys) {\r\n\t\treturn this.constructMessage(\" \", keys);\r\n\t}", "@Test\n public void testRedis() {\n\n String str = \"1\";\n\n String[] strings = StrUtil.splitToArray(str, ',');\n\n System.out.println(strings[0]);\n }", "public String[] getSubjects() {\n/* 329 */ return getStringArray(\"subject\");\n/* */ }", "protected abstract void sendMessage(UUID[] players, BaseComponent[][] messages, IntConsumer response);", "public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }", "public static String getTuple(String[] tuple, int time) throws InterruptedException{\n Thread.sleep((time*60000)/43200);\n String s = String.join(\";\", tuple);\n return s;\n }", "long getMsgId();", "public AtomicLong63Array(int length) {\n int T = MAX_THREAD_ID;\n data = new long[length];\n tag = new long[T];\n save = new long[T];\n }", "private JSONArray parseJSON() {\n JSONArray jsonArray = new JSONArray();\n for (TimestampedMessage m : fPending) {\n JSONTokener jsonTokener = new JSONTokener(m.fMsg);\n JSONObject jsonObject = null;\n JSONArray tempjsonArray = null;\n final char firstChar = jsonTokener.next();\n jsonTokener.back();\n if ('[' == firstChar) {\n tempjsonArray = new JSONArray(jsonTokener);\n for (int i = 0; i < tempjsonArray.length(); i++) {\n jsonArray.put(tempjsonArray.getJSONObject(i));\n }\n } else {\n jsonObject = new JSONObject(jsonTokener);\n jsonArray.put(jsonObject);\n }\n\n }\n return jsonArray;\n }", "long getMessageId();", "long getMessageId();", "@Override\n public void addMessages(String[] messages) {\n if (messages == null)\n throw new IllegalArgumentException(\"null is not a valid parameter.\");\n for (String message : messages)\n addMessage(message);\n }", "void setMessage(char msg[], char attribs[]) {\n copyString(msg, statusLine, 1, MESSAGE_LENGTH);\n notifyDisplay();\n }", "public MessageData insertMessage(int gameId, String message) {\n\n SQLiteDatabase db = getWritableDatabase();\n ContentValues msgVals = new ContentValues();\n msgVals.put(\"game_id\", gameId);\n msgVals.put(\"json_message\", message);\n\n // Place the current timestamp\n msgVals.put(\"timestamp\", now());\n\n long rowid = db.insert(\"messages\", null, msgVals);\n\n String[] args = new String[]{ \"\"+rowid };\n Cursor c = db.rawQuery(\"SELECT message_id, json_message, timestamp, game_id FROM messages WHERE messages.ROWID =?\", args);\n c.moveToFirst();\n\n return new MessageData(\n c.getInt(0),\n c.getString(1),\n c.getLong(2),\n c.getInt(3)\n );\n }", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "io.dstore.engine.Message getMessage(int index);", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n createMsg(data.trim());\n tvAppend(txtResponse, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "private void addMsg(String xmsg) {\n\r\n\t\tSQLiteDatabase db = dbh.getWritableDatabase();\r\n\t\tContentValues values = new ContentValues();\r\n\t\tLog.v(\"-->\", xmsg);\r\n\t\tvalues.put(\"M_ID\", Integer.parseInt(xmsg.substring(0, 2))); // msg id ==\r\n\t\tLog.v(\"values: \", xmsg.substring(0, 2)); // [0,1]\r\n\t\tvalues.put(\"SEQ\", Integer.parseInt(xmsg.substring(2, 4))); // seq\r\n\t\tLog.v(\"values: \", xmsg.substring(2, 4));\r\n\t\tvalues.put(\"MSG\", xmsg.substring(5)); // msg\r\n\t\tLog.v(\"values: \", xmsg.substring(5));\r\n\t\tdb.insertOrThrow(TABLE_NAME, null, values);\r\n\r\n\t}", "public native java.lang.String[] __StringArrayMethod( long __swiftObject, java.lang.String[] arg );", "private Message createMsg(long type,Object event){\r\n Message msg=new Message(0,type,0,\"\",new Object[]{event},\r\n System.currentTimeMillis(),0,0,null,0,0,0);\r\n return msg;\r\n }", "public void setMessages(String[] messages)\n\t{\n\t\tthis.messages = messages;\n\t}", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\tmsg.what = 100;\n\t\t\t\t\tmsg.obj = split[1]+\",\"+split[2];\n\t\t\t\t\tmHandler.sendMessage(msg);\n\t\t\t\t}" ]
[ "0.5940728", "0.56266665", "0.558878", "0.53958255", "0.53873825", "0.5350612", "0.53223604", "0.5245006", "0.5234461", "0.5135935", "0.51341164", "0.5115548", "0.5094964", "0.50617176", "0.49932685", "0.49911743", "0.4945392", "0.49332413", "0.49231458", "0.49161798", "0.48928085", "0.4878135", "0.48659065", "0.4844463", "0.48254278", "0.48234996", "0.48015714", "0.47943288", "0.47798553", "0.4779533", "0.47691843", "0.47520182", "0.47428226", "0.473889", "0.4735492", "0.47325638", "0.47301108", "0.4712947", "0.47096974", "0.470734", "0.4705888", "0.47011235", "0.4694414", "0.46923232", "0.46882972", "0.4688024", "0.46797314", "0.46793032", "0.4672183", "0.4671354", "0.4670888", "0.46701628", "0.46634188", "0.46606266", "0.46596226", "0.46594265", "0.46545863", "0.46526507", "0.46401834", "0.463656", "0.4636213", "0.463185", "0.4612765", "0.4609049", "0.46082848", "0.4597168", "0.4597168", "0.4595567", "0.45925388", "0.45849144", "0.45813626", "0.4568554", "0.45673415", "0.4565013", "0.45642027", "0.45639825", "0.4562609", "0.45566007", "0.45565426", "0.45562115", "0.4552383", "0.4549042", "0.4548998", "0.4547146", "0.45466036", "0.45438406", "0.45438406", "0.45418385", "0.4539823", "0.45361578", "0.45357376", "0.45357376", "0.45357376", "0.45357376", "0.45357376", "0.45330656", "0.45289856", "0.452529", "0.45241135", "0.45224234", "0.45219558" ]
0.0
-1
appends message with "PX: ", where X is playerID
boolean send(String message, PlayerID from, PlayerID to) { for (Player player : players) { if (player.id().equals(to)) { player.sendMsg("P" + from.toString() + ": " + message); log.add(new String[] { from.toString(), message, String.valueOf(System.currentTimeMillis()) }); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getMessage(int player) {\n if (player == 0) {\n return \"Player\";\n }\n return \"CPU\";\n }", "@Override\n\tpublic void tellPlayer(String message) {\n\t\tSystem.out.println(message);\n\t}", "private void sendMessagetoRespectivePlayer(int num) {\n Message msg1;\n if(flag == \"player1\"){\n prevP1 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p1Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p1Handler.obtainMessage(4);\n }\n else{\n msg1 = p1Handler.obtainMessage(5);\n }\n p1Handler.sendMessage(msg1);\n }\n else{\n prevP2 = num;\n int newPositionGroup = num / 10;\n if(winningHoleGroup == newPositionGroup){\n msg1 = p2Handler.obtainMessage(3);\n }\n else if((winningHoleGroup == newPositionGroup-1) || (winningHoleGroup == newPositionGroup+1)){\n msg1 = p2Handler.obtainMessage(4);\n }\n else{\n msg1 = p2Handler.obtainMessage(5);\n }\n p2Handler.sendMessage(msg1);\n }\n }", "private void sendPlayerChat1(String s) {\n\t\tc.getPA().sendFrame200(969, 591);\n\t\tc.getPA().sendFrame126(c.playerName, 970);\n\t\tc.getPA().sendFrame126(s, 971);\n\t\tc.getPA().sendFrame185(969);\n\t\tc.getPA().sendFrame164(968);\n\t}", "private synchronized void sendAdvance(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"5\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\t\r\n\t\t\t}\t\r\n\t\t}", "protected void emit(Player p, String message) {\n }", "public static void getStatus( Player player ) {\n Tools.Prt( player, ChatColor.GREEN + \"=== Premises Messages ===\", programCode );\n Messages.PlayerMessage.keySet().forEach ( ( gn ) -> {\n String mainStr = ChatColor.YELLOW + Messages.PlayerMessage.get( gn );\n mainStr = mainStr.replace( \"%player%\", ChatColor.AQUA + \"%player%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%message%\", ChatColor.AQUA + \"%message%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%tool%\", ChatColor.AQUA + \"%tool%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%digs%\", ChatColor.AQUA + \"%digs%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%nowDurability%\", ChatColor.AQUA + \"%nowDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%targetDurability%\", ChatColor.AQUA + \"%targetDurability%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%score%\", ChatColor.AQUA + \"%score%\" + ChatColor.YELLOW );\n mainStr = mainStr.replace( \"%AreaCode%\", ChatColor.AQUA + \"%AreaCode%\" + ChatColor.YELLOW );\n Tools.Prt( player, ChatColor.WHITE + gn + \" : \" + mainStr, programCode );\n } );\n Tools.Prt( player, ChatColor.GREEN + \"=========================\", programCode );\n }", "public String toString() {\n\t\treturn \"player \" + player.id + \"\\n\";\n\t}", "@Override\r\n\tpublic void showGetPrisonCardMessage(Player player) {\n\t\t\r\n\t}", "protected String getLeftMessage() {\n\t\treturn player2.getName() + \": \" + player2.getScore();\n\t}", "private void out(String otherplayermsg, int commandlength) {\n\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String positionString = otherplayermsg.substring(commandlength + 1, varlength);\n int playerPosition = 0;\n try {\n playerPosition = Integer.parseInt(positionString);\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - out - variable to Int error: \" + b);\n }\n\n boolean gameover = playerPosition == 4;\n sh.addMsg(FINISHED_MESSAGE[playerPosition - 1]);\n\n outofgame[3] = true;\n\n score.addScore(playersName, position);\n\n if (playerPosition == 4) score.display();\n else position++;\n\n if (whosturn == 3 && !gameover) {\n nextTurn();\n displayTable();\n }\n }", "private void publishLine(String msg) {\r\n\t\ttaOutput.appendText(msg);\r\n\t\ttaOutput.appendText(\"\\n\");\r\n\t}", "@Override\n public void sendChatMessage(EntityPlayer player) {\n }", "public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "public static String getPlayerString(float[] playerInfo){\n\t\tif(playerInfo.length!=4)throw new IllegalArgumentException(\"Method only accepts playerinfo of length 4: ID,X,Y,ROT\");\n\t\tplayerInfo[1]*=100.0f;\n\t\tplayerInfo[2]*=100.0f;\n\t\t//P [ID] [X*100] [Y*100] [ROT]\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"P \");\n\t\tfor(int i =0;i<4;i++){\n\t\t\tsb.append((int)playerInfo[i]);\n\t\t\tsb.append(\" \");\n\t\t}\n\t\treturn sb.toString();\n\t}", "public void sendGameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "private static String playersToDrawOnSquare(SquareLM squareLM) throws NullPointerException{\n if(squareLM == null){\n throw new NullPointerException(\"The parameter should not be null\");\n }\n String stringToReturn = \"\";\n for(int idPlayer : squareLM.getPlayers()){\n //'P' if the player is up, 'p' if the player is down\n String markerPlayer;\n if(InfoOnView.getPlayers()[idPlayer].getDown()){\n markerPlayer = \"p\";\n }\n else{\n markerPlayer = \"P\";\n }\n //eg: the player with id 0 is the player 1\n stringToReturn += markerPlayer + (idPlayer + 1);\n }\n //all the rest of the line is blank (' ')\n return lineInsideSquareWithBlankAtTheEnd(stringToReturn);\n }", "public void addPlayer(String playerID) {\r\n\t\tplayerCount++;\r\n\t\tString name = guild.getMemberById(playerID).getEffectiveName();\r\n\t\t// Set up each player uniquely\r\n\t\tif (p2 == null) {\r\n\t\t\tp2 = new Player(1,playerID,GlobalVars.pieces.get(\"blue\"));\r\n\t\t\tp2.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[1][0]);\r\n\t\t\tp2.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[1][1]);\r\n\t\t\tplayers.add(p2);\r\n\t\t\tp1.setNextPlayer(p2);\r\n\t\t\tp2.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the BLUE adventurer\").queue();\r\n\t\t} else if (p3 == null) {\r\n\t\t\tp3 = new Player(2,playerID,GlobalVars.pieces.get(\"yellow\"));\r\n\t\t\tp3.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[2][0]);\r\n\t\t\tp3.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[2][1]);\r\n\t\t\tplayers.add(p3);\r\n\t\t\tp2.setNextPlayer(p3);\r\n\t\t\tp3.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the YELLOW adventurer\").queue();\r\n\t\t} else if (p4 == null) {\r\n\t\t\tp4 = new Player(3,playerID,GlobalVars.pieces.get(\"green\"));\r\n\t\t\tp4.getPiece().setX(GlobalVars.playerCoordsPerRoom[0][0]+GlobalVars.playersOffset[3][0]);\r\n\t\t\tp4.getPiece().setY(GlobalVars.playerCoordsPerRoom[0][1]+GlobalVars.playersOffset[3][1]);\r\n\t\t\tplayers.add(p4);\r\n\t\t\tp3.setNextPlayer(p4);\r\n\t\t\tp4.setNextPlayer(p1);\r\n\t\t\tgameChannel.sendMessage(\"**\"+name+\"** has reincarnated as the GREEN adventurer\").queue();\r\n\t\t}\r\n\t}", "public void outputMessage(String gameMessage){\n System.out.println(gameMessage);\n }", "public abstract void sendTraceTimeCustom(Player p, String prefix);", "public void addMessage(String m) {\n chat.append(\"\\n\" + m);\n }", "private String appendContextMessage(String msg) {\n\t\treturn msg;\r\n\t}", "public void render() {\n stroke(color(50, 50, 50));\n fill(color(50, 50, 50));\n rect(0, 0, getWidth(), getTopHeight());\n int tempX = this.x;\n int fontSize = 150 / (this.players.size() * 2);\n\n this.messages = new ArrayList();\n int count = 0;\n for (Player player : this.players) {\n\n StringBuilder bar = new StringBuilder();\n // max lives = 3\n bar.append(player.name() + \" \");\n for (int i=0; i<3; i++) {\n if (i < player.lives()) {\n bar.append('\\u25AE'); // http://jrgraphix.net/r/Unicode/?range=25A0-25FF\n } else {\n bar.append('\\u25AF');\n }\n }\n\n String message = bar.toString();\n messages.add(message);\n\n textAlign(LEFT);\n textFont(f, fontSize);\n fill(player.getColor());\n text(message, tempX, this.y);\n\n int newX = (int) textWidth(message) + 10;\n tempX += newX;\n count++;\n }\n }", "private void othersturn(String otherplayermsg, int commandlength) {\n boolean burn = false;\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String name = otherplayermsg.substring(commandlength + 1, varlength);\n int varlength2 = 0;\n for (int n = varlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength2 = n;\n break;\n }\n }\n String cardno = otherplayermsg.substring(varlength + 1, varlength2);\n\n // determining which player just had a turn\n int playernumber = 0;\n for (int n = 0; n < 3; n++)\n if (name.equals(otherNames[n])) {\n playernumber = n;\n break;\n }\n\n if (cardno.equals(\"pickup\")) { // other players picks up pile\n cardcount[playernumber] = cardcount[playernumber] + pile.size();\n pile.clear();\n sh.addMsg(otherNames[playernumber] + \" picked up the pile\");\n } else if (cardno.equals(\"burn\")) { // other player burns the pile\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n if (deck == 0 || cardcount[playernumber] > 3) {\n if (cardcount[playernumber] > 0) cardcount[playernumber]--;\n } else deck--;\n } else if (cardno.equals(\"faceup\")) { // otherplayer plays a faceup card\n int varlength3 = 0;\n for (int n = varlength2 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength3 = n;\n break;\n }\n }\n String cardno2 = otherplayermsg.substring(varlength2 + 1, varlength3);\n if (cardno2.equals(\"multi\")) {\n burn = faceupmulti(otherplayermsg, varlength3, playernumber);\n } else {\n try {\n Card card = new Card(Integer.parseInt(cardno2));\n // adding card to pile\n pile.add(card);\n // burning pile if a 10 is played\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n // removing card from table\n for (int n = 0; n < 3; n++)\n if (faceup[playernumber][n] != null)\n if (faceup[playernumber][n].getNumber() == card.getNumber()) {\n faceup[playernumber][n] = null;\n break;\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - variable to Int error: \" + b);\n }\n }\n } else if (cardno.equals(\"facedown\")) { // if player plays one of there face down cards\n int varlength3 = 0;\n for (int n = varlength2 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength3 = n;\n break;\n }\n }\n String cardno2 = otherplayermsg.substring(varlength2 + 1, varlength3);\n if (cardno2.equals(\"pickup\")) {\n for (int n = varlength3 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength2 = n;\n break;\n }\n }\n String cardplayed = otherplayermsg.substring(varlength3 + 1, varlength2);\n int numPlayed = 0;\n try {\n numPlayed = Integer.parseInt(cardplayed);\n } catch (NumberFormatException b) {\n sh.addMsg(\"processTurn - facedown pickup - variable to Int error: \" + b);\n }\n cardcount[playernumber] = cardcount[playernumber] + pile.size() + 1;\n pile.clear();\n sh.addMsg(\n otherNames[playernumber]\n + \" played a \"\n + Card.getCardStringValue(numPlayed)\n + \" and had to picked up the pile\");\n } else {\n try {\n Card card = new Card(Integer.parseInt(cardno2));\n pile.add(card);\n // burning pile if a 10 is played\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer - variable to Int error: \" + b);\n }\n }\n carddowncount[playernumber]--;\n } else if (cardno.equals(\"multi\")) { // if more than 1 card is played at a time\n // determining how many card where played\n int varlength3 = 0;\n for (int n = varlength2 + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength3 = n;\n break;\n }\n }\n String numPlayedString = otherplayermsg.substring(varlength2 + 1, varlength3);\n // converting string to int for processing\n int numPlayed = 0;\n try {\n numPlayed = Integer.parseInt(numPlayedString);\n } catch (NumberFormatException b) {\n sh.addMsg(\"processTurn - multi - variable to Int error: \" + b);\n }\n for (int n = 0; n < numPlayed; n++) {\n varlength2 = varlength3;\n // determining how many card where played\n varlength3 = 0;\n for (int i = varlength2 + 1; i < otherplayermsg.length(); i++) {\n char extract = otherplayermsg.charAt(i);\n if (extract == (':')) {\n varlength3 = i;\n break;\n }\n }\n String cardnoString = otherplayermsg.substring(varlength2 + 1, varlength3);\n // converting string to int for processing\n try {\n Card card = new Card(Integer.parseInt(cardnoString));\n pile.add(card);\n } catch (NumberFormatException b) {\n sh.addMsg(\"processTurn - multi - variable to Int error: \" + b);\n }\n\n if (deck == 0 || cardcount[playernumber] > 3) {\n if (cardcount[playernumber] > 0) cardcount[playernumber]--;\n } else deck--;\n }\n\n // burning pile if a 10 is played or 4 of a kind\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burnPile();\n burn = true;\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n\n } else {\n // adding card to pile\n try {\n Card card = new Card(Integer.parseInt(cardno));\n pile.add(card);\n // burning pile if a 10 is played\n if (pile.topValue() == 10 || pile.isFourOfAKind()) {\n burn = true;\n burnPile();\n // removing cards from pile\n sh.addMsg(name + \" burnt the pile.\");\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"Otherplayer else - variable to Int error: \" + b);\n }\n if (deck == 0 || cardcount[playernumber] > 3) {\n if (cardcount[playernumber] > 0) cardcount[playernumber]--;\n } else deck--;\n }\n if (!burn) nextTurn();\n displayTable();\n }", "public static void sendMessage(CommandSender player, String msg) {\n\t\tint i;\n\t\tString part;\n\t\tCustomColor lastColor = CustomColor.WHITE;\n\t\tfor (String line : msg.split(\"\\n\")) {\n\t\t\ti = 0;\n\t\t\twhile (i < line.length()) {\n\t\t\t\tpart = getMaxString(line.substring(i));\n\t\t\t\tif (i+part.length() < line.length() && part.contains(\" \"))\n\t\t\t\t\tpart = part.substring(0, part.lastIndexOf(\" \"));\n\t\t\t\tpart = lastColor.getCustom() + part;\n\t\t\t\tplayer.sendMessage(replaceColors(part));\n\t\t\t\tlastColor = getLastColor(part);\n\t\t\t\ti = i + part.length() -1;\n\t\t\t}\n\t\t}\n\t}", "public static void privateMessage(Player fromPlayer, Player toPlayer, String[] message) {\n PlayerDataObject fromPDO = PlayerManager.getPlayerDataObject(fromPlayer);\n PlayerDataObject toPDO = PlayerManager.getPlayerDataObject(toPlayer);\n //target.sendMessage(ChatColor.DARK_GRAY + \"[\" + player.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n //player.sendMessage(ChatColor.DARK_GRAY + \"[You > \" + target.getDisplayName() + ChatColor.DARK_GRAY + \"]: \" + ChatColor.WHITE + String.join(\" \", Arrays.copyOfRange(arg3, 1, arg3.length)).trim());\n ComponentBuilder toComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[\" + fromPDO.getFriendlyName() + ChatColor.DARK_GRAY + \" > you]\" + ChatColor.WHITE + \":\");\n toComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + fromPDO.getPlainNick()).create()));\n toComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + fromPDO.getName() + \" \"));\n toComp.append(\" \").reset();\n \n ComponentBuilder fromComp = new ComponentBuilder(ChatColor.DARK_GRAY + \"[You > \" + toPDO.getDisplayName() + ChatColor.DARK_GRAY + \"]\" + ChatColor.WHITE + \":\");\n fromComp.event(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ComponentBuilder(\"PM \" + toPDO.getPlainNick()).create()));\n fromComp.event(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, \"/pm \" + toPDO.getName() + \" \"));\n fromComp.append(\" \").reset();\n \n TextComponent messageComp = new TextComponent();\n for (String part : message) {\n if (part.matches(\"^.*(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|].*$\")) {\n messageComp.addExtra(assembleURLComponent(part));\n messageComp.addExtra(\" \");\n } else {\n messageComp.addExtra(part + \" \");\n }\n }\n \n BaseComponent[] toMSG = toComp\n .append(messageComp)\n .create();\n BaseComponent[] fromMsg = fromComp\n .append(messageComp)\n .create();\n \n toPDO.sendMessageIf(toMSG);\n fromPDO.sendMessageIf(fromMsg);\n }", "void printPlayersActionInfo(Player p) {\n }", "public static void send104m(Player player, int skill) {\n\t\tsendMessage(player, skill, 104273167, player.getXPMode());\n\t\tplayer.sm(\"<col=825200><shad=000000>Well done! You've achieved 104,273,167 XP in this skill! You can now purchase a Mastery Cape from the Wise Old Man.\");\n\t\treturn;\n\t}", "public void addPlayer(String p) {\n this.playersNames.add(p);\n }", "private void addMsg(String xmsg) {\n\r\n\t\tSQLiteDatabase db = dbh.getWritableDatabase();\r\n\t\tContentValues values = new ContentValues();\r\n\t\tLog.v(\"-->\", xmsg);\r\n\t\tvalues.put(\"M_ID\", Integer.parseInt(xmsg.substring(0, 2))); // msg id ==\r\n\t\tLog.v(\"values: \", xmsg.substring(0, 2)); // [0,1]\r\n\t\tvalues.put(\"SEQ\", Integer.parseInt(xmsg.substring(2, 4))); // seq\r\n\t\tLog.v(\"values: \", xmsg.substring(2, 4));\r\n\t\tvalues.put(\"MSG\", xmsg.substring(5)); // msg\r\n\t\tLog.v(\"values: \", xmsg.substring(5));\r\n\t\tdb.insertOrThrow(TABLE_NAME, null, values);\r\n\r\n\t}", "private static void goThroughPassage(Player player) {\n int x = player.getAbsX();\n player.getMovement().teleport(x == 2970 ? x + 4 : 2970, 4384, player.getHeight());\n }", "public void sendNameInfo(Player plr){\r\n\t\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\tsendOnePlayer(plr, message);\r\n\t}", "@Override\n public String toString() {\n newPlayer.addPoints(players[0].getPoints());\n WarPlayer winner = players[mostNumOfCards(players)];\n\n if (winner.getPoints() == players[0].getPoints())\n return \"YOU WON!!! With a score of \" + players[0].getPoints();\n return \"Player\" + mostNumOfCards(players) + \" won!!! With a score of \" + winner.getPoints();\n }", "public String toString(){\n return player.toString() + \"\\nGained a new Skill\";\n }", "public void encodeMessage() {\n for (int i = message.length() - 1; i >= 0; i--) {\n message.insert(i, String.valueOf(message.charAt(i)).repeat(2));\n }\n }", "@Override\n\tpublic void playerJoined(String playerID) {\n\t}", "private void appendAction(String action) {\n \t\tif (board.isSetupPhase())\n \t\t\treturn;\n \n \t\tif (actionLog == \"\")\n \t\t\tactionLog += \"→ \" + action;\n \t\telse\n \t\t\tactionLog += \"\\n\" + \"→ \" + action;\n \n \t}", "public String addRPSPlayed(int p) {\n if(p == 1) {\n return \"rock\";\n } else if(p == 2) {\n return \"paper\";\n } else {\n return \"scissors\";\n }\n }", "void sendPacketToPlayer(Player player, Object packet);", "public void appendMessage(String response) {\n\t\tthis.append(response + newline);\n\t}", "public void logGameWinner(Player p){\n\t\t\n\t\tif(p instanceof HumanPlayer) {\n\t\t\tlog += String.format(\"%nUSER WINS GAME\");\n\t\t\twinName =\"Human\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tAIPlayer ai = (AIPlayer) p;\n\t\t\tlog += String.format(\"%n%s WINS GAME\", ai.getName().toUpperCase());\n\t\t\twinName = ai.getName();\n\t\t}\n\t\tlineBreak();\n\t}", "protected String getRightMessage() {\n\t\treturn player1.getName() + \": \" + player1.getScore();\n\t}", "public String playerString() {\n String outString = \"\";\n outString = (playerName + \",\" + String.valueOf(ID) + \",\" + club + \",\" + position + \",\" +\n String.valueOf(age) + \",\" + String.valueOf(projectedScore)\n + \",\" + String.valueOf(available) + \",\" + String.valueOf(onTeam) + \",\"+String.valueOf(draftPick)+\",\"+String.valueOf(predictedPick));\n\n return outString;\n }", "void drawMessage(String message);", "public void printPlayerStat(Player player);", "private void printMessageLine(String msg) {\n String wholeMessage = \"\";\n for (int i = 0; i < msg.length(); i += 5) {\n if (msg.length() - i > 5) {\n wholeMessage = msg.substring(i, i + 5) + \" \";\n _output.print(wholeMessage);\n } else {\n wholeMessage = msg.substring(i, msg.length());\n _output.println(wholeMessage);\n }\n }\n }", "public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "public void printDetailedPlayer(Player player);", "public static void unknownPlayer(Command command, String player) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"unknown player\").replace(\"%player%\", player);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "private void sendUpdateMessage() {\n Hyperium.INSTANCE.getHandlers().getGeneralChatHandler().sendMessage(\n \"A new version of Particle Addon is out! Get it at https://api.chachy.co.uk/download/ParticleAddon/\" + ChachyMod.INSTANCE.getVersion(() -> \"ParticleAddon\"));\n }", "public void addTextToTheTA(String msg) {\n\t\tguessArea.append(msg);\n\t}", "private void addCapturedHoles(int num){\n if(flag.equals(\"player1\")){\n player1Holes.add(num);\n Message msg = p1Handler.obtainMessage(2);\n msg.arg1 = num;\n p1Handler.sendMessage(msg);\n }\n else {\n player2Holes.add(num);\n Message msg = p2Handler.obtainMessage(2);\n msg.arg1 = num;\n p2Handler.sendMessage(msg);\n }\n }", "void otherPlayerMoved()\r\n {\r\n socketWriter.println(\"OPPONENT_MOVED ,\" + getCurrentBoard());\r\n }", "public static void appendRedemption(Player player) {\n\t\tdouble heal = (player.getMaxPrayer() * 2.5) / 10;\n\t\tplayer.gfx0(436);\n\t\tplayer.prayer = 0;\n\t\tplayer.constitution += heal;\n\t\tplayer.sendMessage(\"Healed \" + heal);\n\t\tplayer.getPA().refreshSkill(3);\n\t\tplayer.getPA().refreshSkill(5);\n\t}", "public void showMessage(int x, int y, String message) {\n }", "public void logWinner(){\n\t\tlog += String.format(\"%nDRAW\");\n\t\tlineBreak();\n\t}", "public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}", "void notifyPlayerJoined(String username);", "public abstract void sendTraceTime(Player p);", "public String getDeathMessage(Player player);", "public void sendNameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDNM\" + lobby.getNameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}", "void sendPacket(Player player, Object packet);", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "private synchronized void sendDecreaceHealth(){\r\n\t\t\tfor(PrintWriter p : players){\r\n\t\t\t\tif(p != null){\r\n\t\t\t\t\tp.println(\"6\");\r\n\t\t\t\t\tp.println(Integer.toString(x));\r\n\t\t\t\t\tp.println(Integer.toString(y));\r\n\t\t\t\t\tp.flush();\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\t\r\n\t\t}", "@Override\n public void printMessage(String msg) {\n if (msg.contains(\"Turno di :\")) {\n inTurno = false;\n for (boolean b : pawnEnabled) {\n b = true;\n }\n }\n final String msgapp = editString(msg);\n Platform.runLater(() -> {\n if (textArea != null) {\n textArea.appendText(msgapp + \"\\n\");\n }\n });\n\n }", "private void lost(String otherplayermsg, int commandlength) {\n\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String name = otherplayermsg.substring(commandlength + 1, varlength);\n\n sh.addMsg(name + \" is the ShitHead\");\n sh.addMsg(\"Game Over\");\n\n score.addScore(name, 4);\n\n for (int n = 0; n < 3; n++) if (otherNames[n].equals(name)) outofgame[n] = true;\n\n score.display();\n }", "private void display(String msg) {\n cg.append(msg + \"\\n\");\n }", "public String toStringCurrentPositions() {\n String playerPosition = \"\";\n int count = 0;\n while(count < NUM_PLAYERS){\n playerPosition += count + \":\" + getPlayerPosition(count) +\" \";\n count++;\n }\n return playerPosition;\n }", "private void sendActionBar(@NonNull final String message) {\n for(UUID playerID : getNewsRecipient()) {\n if(isOnline(playerID)) {\n @NonNull final CraftPlayer player = (CraftPlayer) Bukkit.getPlayer(playerID);\n final String actionMsg = \"{\\\"text\\\":\\\"\" + message + \"\\\"}\";\n final PacketPlayOutChat PACKET = new PacketPlayOutChat(IChatBaseComponent.ChatSerializer.a(actionMsg), (byte) 2);\n player.getHandle().playerConnection.sendPacket(PACKET);\n } else {\n getNewsRecipient().remove(playerID);\n }}\n\n }", "private void otherdetails(String otherplayermsg, int commandlength) {\n // decode variable that came with message\n String variables[] = new String[12];\n for (int i = 0; i < 12; i++) {\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n variables[i] = otherplayermsg.substring(commandlength + 1, varlength);\n commandlength = varlength;\n }\n\n // adding other players details to storage arrays\n for (int n = 0; n < 3; n++) {\n otherNames[n] = variables[4 * n];\n score.addName(variables[4 * n]);\n // sh.addMsg(\"Test - othername \" + otherNames[n] + \" severname \" +\n // servername);//--------------------TEST\n if (otherNames[n].equals(servername)) whosturn = n;\n cardcount[n] = 3;\n carddowncount[n] = 3;\n try {\n for (int i = 0; i < 3; i++) {\n Card card = new Card(Integer.parseInt(variables[4 * n + 1 + i]));\n faceup[n][i] = card;\n }\n } catch (NumberFormatException b) {\n sh.addMsg(\"otherdetails - variable to Int error: \" + b);\n }\n }\n deck = 16;\n if (fastgame) deck = 0;\n displayTable();\n if (swap && !swapdone) { // if performing card swap\n Card inhand[] = new Card[3];\n Card ontable[] = new Card[3];\n for (int n = 0; n < 3; n++) {\n inhand[n] = hand.getCard(n);\n ontable[n] = hand.getFaceUp(n);\n }\n SwapD swapD = new SwapD(sh, inhand, ontable);\n if (swapD.display()) {\n inhand = swapD.getInHand();\n ontable = swapD.getOnTable();\n hand.swap(inhand, ontable);\n displayTable();\n }\n sendCommand(\n \"swap:\"\n + inhand[0].getNumber()\n + \":\"\n + inhand[1].getNumber()\n + \":\"\n + inhand[2].getNumber()\n + \":\"\n + ontable[0].getNumber()\n + \":\"\n + ontable[1].getNumber()\n + \":\"\n + ontable[2].getNumber()\n + \":\");\n swapdone = true;\n }\n }", "public void sendDataToAMQ(){\n\t\t\r\n\t\tList<String> msg = new ArrayList<>();\r\n\t\tif(offsetfollower < (prototype.followerDrivingInfo.meetingLocation - 500)) {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.followerDrivingInfo.speed;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.followerDrivingInfo.speed)+\" carSpeed>\");\t\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.leaderDrivingInfo.speed ;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\t\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\r\n\t\t}\r\n for(int i = 0; i < msg.size();i++)\r\n {\r\n \tamqp.sendMessage(msg.get(i));\r\n }\r\n// \t}\r\n }", "public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }", "private void PrintMessageOnTextChat(MessageWithTime message)\n\t{\n\t\tApplicationManager.textChat.write(message);\n\n\t}", "public static void inter(Player player, int number, String message) {\n\t\tplayer.getPackets().sendIComponentText(275, number, message);\n\t}", "private void reportWinner (Player player) {\n System.out.println();\n System.out.println(\"Player \" + player.name() +\n \" wins.\");\n System.out.println();\n }", "@Override\r\n\tpublic void showWithdrawMessage(String playerName, int amount) {\r\n\t\tString s1 = reader.getElement(\"withdraw\", 0);\r\n\t\tString s2 = reader.getElement(\"withdraw\", 1);\r\n\t\tString msg = playerName + \": \" + s1 + \" \" + amount + \" \" + s2;\t\t\r\n\t\tGUI.showMessage(msg);\r\n\t}", "public static String getXP(){\n\t\treturn (String) \"\" + String.valueOf((int) Math.ceil(mc.thePlayer.experience * mc.thePlayer.xpBarCap())) + \"/\" + mc.thePlayer.xpBarCap();\n\t}", "public static void neverJoined(Command command, String player) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"never joined\").replace(\"%player%\", player);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "private void sendWinnerMessage(RaceTrackMessage playerDisconnectsMessage) {\n\t\tif(playerDisconnectsMessage != null)\n\t\t\ttry{\n\n\t\t\t\tint playerWhoWon = getPlayerWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove()); \n\t\t\t\tint playerWhoWonID = getPlayerIDWhoWonByPlayerID(((DisconnectMessage) playerDisconnectsMessage).getNextPlayerToMove());\n\t\t\t\tif(playerWhoWon != -1){\n\t\t\t\t\tPoint2D lastVec = null;\n\t\t\t\t\tif(getPlayerMap().get(playerWhoWonID) != null)\n\t\t\t\t\t\tlastVec = getPlayerMap().get(playerWhoWonID).getCurrentPosition();\n\n\n\t\t\t\t\tPlayerWonMessage answer;\n\n\t\t\t\t\tanswer = VectorMessageServerHandler.generatePlayerWonMessage(playerWhoWon, playerWhoWon, lastVec);\n\n\t\t\t\t\tcloseGameByPlayerID(playerWhoWon);\n\n\t\t\t\t\tanswer.addClientID(playerWhoWonID);\n\n\t\t\t\t\tsendMessage(answer);\n\t\t\t\t\t\n\t\t\t\t\t//inform the AIs that game is over!!\n\n\t\t\t\t}\n\t\t\t}catch(ClassCastException e){\n\n\t\t\t}\n\t}", "public String gameTie(){\n return points[player1Score] + \"-All\";\n }", "public String position() {\n\t\t\treturn \"\\n\"\n\t\t\t+ \"Player 1 owns: \"\n\t\t\t+ printSet(moves1)\n\t\t\t+ \"Player 2 owns: \"\n\t\t\t+ printSet(moves2)\n\t\t\t+ (isGameOver() ? \"Game is over.\\n\" : \"Player \"\n\t\t\t\t\t+ whoseTurn() + \" moves next.\\n\");\n\t\t}", "public void sendPlayerName(String s) {\n try {\n dOut.writeUTF(s);\n dOut.flush();\n } catch (IOException e) {\n System.out.println(\"Could not send player name\");\n e.printStackTrace();\n }\n }", "private void displayMsg(String msg) {\n //add message to chatList array\n chatList.add(msg);\n //display message in GUI\n mg.appendRoom(msg); \n }", "public void printMsg(String msg)\n\t{\n\t\tmsgArea.append(msg);\n\t}", "public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}", "public void sendMessage() {\n\t\tString myPosition=this.agent.getCurrentPosition();\n\t\tif (myPosition!=null){\n\t\t\t\n\t\t\tList<String> wumpusPos = ((CustomAgent)this.myAgent).getStenchs();\n\t\t\t\n\t\t\tif(!wumpusPos.isEmpty()) {\n\t\t\t\tList<String> agents =this.agent.getYellowpage().getOtherAgents(this.agent);\n\t\t\t\t\n\t\t\t\tACLMessage msg=new ACLMessage(ACLMessage.INFORM);\n\t\t\t\tmsg.setSender(this.myAgent.getAID());\n\t\t\t\tmsg.setProtocol(\"WumpusPos\");\n\t\t\t\tmsg.setContent(wumpusPos.get(0)+\",\"+myPosition);\n\t\t\t\t\n\t\t\t\tfor(String a:agents) {\n\t\t\t\t\tif(this.agent.getConversationID(a)>=0) {\n\t\t\t\t\t\tif(a!=null) msg.addReceiver(new AID(a,AID.ISLOCALNAME));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tthis.agent.sendMessage(msg);\n\t\t\t\tthis.lastPos=myPosition;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}", "@Override\n\tpublic void onMessage(String arg0, String arg1) {\n\t\tSystem.out.print(arg0+arg1);\n\t}", "private void otherout(String otherplayermsg, int commandlength) {\n\n // decode variable that came with message\n int varlength = 0;\n for (int n = commandlength + 1; n < otherplayermsg.length(); n++) {\n char extract = otherplayermsg.charAt(n);\n if (extract == (':')) {\n varlength = n;\n break;\n }\n }\n String name = otherplayermsg.substring(commandlength + 1, varlength);\n\n sh.addMsg(name + \" is out of the game\");\n\n score.addScore(name, position);\n position++;\n\n for (int n = 0; n < 3; n++)\n if (otherNames[n].equals(name)) {\n outofgame[n] = true;\n if (whosturn == n) {\n nextTurn();\n displayTable();\n }\n }\n }", "public void newChatLine(String line) {\n\t\tSystem.out.println(line);\n\t}", "public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}", "void sendUpdatePlayer(int x, int y, int color, byte tool);", "private void msg2(String name, int id, String message) {\n System.out.println(\"[\" + (System.currentTimeMillis() - system_start_time) + \"] \" + name + id +\": \" + message);\n }", "@Override\r\n\tvoid updateMessage(String msg) {\n\t\tSystem.out.println(msg);\r\n\t}", "private void sendCustomMessage(String message, String alli) {\n String frontA = \"V\" + alli;\n String gobbleDeGuck = \"<ID 0><CLR><WIN 0 0 287 31><POS 0 0><SL><S S><BL N><CS 3><GRN><T>\";\n String mid = message;\n String ender = \"</T>\";\n String sendableMsgString = frontA + gobbleDeGuck + mid + ender;\n //\n sendRawMessage(sendableMsgString);\n }", "void drawPlayer(float x, float y, float w)\n\t{\n\t\tline(x, y, x + 50, y);\n\t\tline(x, y, x, y - 50);\n\t\tline(x + 50, y, x + 50, y - 50);\n\t\tline(x, y - 50, x + 50, y - 50);\n\t\tstroke(255,0,0);\n\t}", "private static void debugMessage(GuildMessageReceivedEvent event) {\n String preface = \"[Discord IDs] \";\n\n System.out.println(\"====== PING COMMAND ======\");\n System.out.println(preface + \"`!ping` SENDER:\");\n System.out.println(\n \"\\t{USER} ID: \" + event.getAuthor().getId() +\n \"\\tName: \" + event.getMember().getEffectiveName() +\n \" (\" + event.getAuthor().getAsTag() + \")\");\n\n System.out.println(preface + \"BOT ID:\\t\" + event.getJDA().getSelfUser().getId());\n System.out.println(preface + \"GUILD ID:\\t\" + event.getGuild().getId());\n\n System.out.println(preface + \"ROLES:\");\n event.getGuild().getRoles().forEach(role -> {\n System.out.println(\"\\t{ROLES} ID: \" + role.getId() + \"\\tName: \" + role.getName());\n });\n\n System.out.println(preface + \"MEMBERS:\");\n event.getGuild().getMembers().forEach(member -> {\n System.out.println(\n \"\\t{MEMEBERS} ID: \" + member.getUser().getId() +\n \"\\tName: \" + member.getEffectiveName() +\n \" (\" + member.getUser().getAsTag() + \")\");\n });\n\n System.out.println(preface + \"Categories:\");\n event.getGuild().getCategories().forEach(category -> {\n System.out.println(\"\\t{CATEGORY} ID: \" + category.getId() + \"\\tName: \" + category.getName());\n category.getChannels().forEach(guildChannel -> {\n System.out.println(\n \"\\t\\t:\" + guildChannel.getType().name().toUpperCase() + \":\" +\n \"\\tID: \" + guildChannel.getId() +\n \"\\tName: \" + guildChannel.getName() +\n \"\\tlink: \" + \"https://discord.com/channels/\" + Settings.GUILD_ID + \"/\" + guildChannel.getId());\n });\n });\n System.out.println(\"==== PING COMMAND END ====\");\n }", "protected abstract void sendMessage(UUID[] players, String[] messages, IntConsumer response);", "public StringBuffer2D printPlayers(){\n StringBuffer2D sb = new StringBuffer2D();\n int playerWidth = 15;\n String playerHeader = \"Players\";\n String godHeader = \"God Card\";\n sb.appendln(Color.LIGHTGRAY_UNDERLINED.escape(playerHeader)+\" \".repeat(playerWidth-playerHeader.length())+Color.LIGHTGRAY_UNDERLINED.escape(godHeader));\n if(cellWidth >= 3) {\n sb.appendln(\"\");\n }\n for(Player player : players){\n String playerName = resizedPlayerName(player.getNickName(), playerWidth);\n String cardName = player.getCard().getName();\n //true if currentPlayer\n sb.appendln(Color.fromPlayerColor(player.getColor(), false).escape(playerName)+cardName);\n }\n return sb;\n }", "void chatInfo(String s) {\n game.v.a(s);\n }", "public static String getPosition(int i){\r\n\t\treturn position[playerPosition[i]] + \"(\" + playerPosition[i] + \")\"; \r\n\t}" ]
[ "0.6219398", "0.5972029", "0.59575194", "0.5761679", "0.5683666", "0.5673018", "0.5636179", "0.5602212", "0.5591949", "0.5566642", "0.5557679", "0.5497053", "0.54354286", "0.5405748", "0.54042256", "0.5398009", "0.5397633", "0.5387068", "0.53860354", "0.5377462", "0.5370499", "0.5367497", "0.5348834", "0.53385854", "0.5337672", "0.53313667", "0.5326238", "0.53180784", "0.5306684", "0.53050363", "0.5300027", "0.52953106", "0.5289031", "0.52641505", "0.52579266", "0.52577007", "0.52551955", "0.52520573", "0.52489984", "0.52433187", "0.52412885", "0.52289605", "0.5228207", "0.52277386", "0.52114993", "0.5210691", "0.52069825", "0.5206519", "0.52034044", "0.52031773", "0.519372", "0.51873285", "0.51710606", "0.5167603", "0.5156147", "0.5154113", "0.5149657", "0.5148482", "0.5146791", "0.5140888", "0.5140576", "0.51377106", "0.51362145", "0.5135872", "0.5135808", "0.51349336", "0.5133721", "0.51288146", "0.51271653", "0.5116089", "0.51085407", "0.51082927", "0.510346", "0.5100197", "0.5089224", "0.50774735", "0.50687253", "0.50564027", "0.50465375", "0.50465304", "0.5045147", "0.50404114", "0.50398463", "0.50387055", "0.50386155", "0.50192535", "0.50188553", "0.5018417", "0.5015815", "0.5012609", "0.5009777", "0.5009048", "0.5008209", "0.5006914", "0.5006778", "0.5004908", "0.500062", "0.49972787", "0.4996733", "0.49962065", "0.49960765" ]
0.0
-1
does not include timestamp info
ArrayList<String> requestLog(PlayerID requester) { ArrayList<String> output = new ArrayList<String>(); for (Player player : players) { if (player.id().equals(requester)) { for (String[] q : log) { if (q[0].contains(requester.toString())) output.add(q[1]); } } } return output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isSigned_infos_timestamp() {\n return false;\n }", "@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "boolean hasTimestamp();", "public boolean hasTimestamp() {\n return fieldSetFlags()[6];\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[2];\n }", "public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }", "@Override\n\tpublic List getTime() {\n\t\treturn null;\n\t}", "public boolean hasTimestamp() {\n return timestamp_ != null;\n }", "@Override\n default String getTs() {\n return null;\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "public boolean hasTimestamp() {\n return fieldSetFlags()[0];\n }", "int getTimestamp();", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "default Stream<Pair<T, Long>> withTimestamp() {\n return withTimestamp(null);\n }", "@Override\n\tpublic String getTimestamp()\n\t{\n\t\treturn new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\").format(new Date());\n\t}", "public long getTimeStamp() {return timeStamp;}", "private TimestampUtils(){}", "@Override\n public long extractTimestamp(ControlMessage element) {\n return Long.MAX_VALUE;\n }", "Date getTimestamp()\n{\n return time_stamp;\n}", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean hasTimestamp() {\n return result.hasTimestamp();\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "@Override\r\n\tpublic long getEntryDateTime() {\n\t\treturn 0;\r\n\t}", "public long getTimestamp_() {\n return timestamp_;\n }", "public static boolean isArray_infos_timestamp() {\n return false;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@Nullable\n default Long extractTimestamp(OUT record) {\n return null;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public long getTimestamp();", "public long getTimestamp();", "public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\r\n return ((bitField0_ & 0x00000001) == 0x00000001);\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public boolean hasTimestamp() {\n return ((bitField0_ & 0x00000040) == 0x00000040);\n }", "long getTimestamp();", "long getTimeStamp();", "@Override\n\tpublic boolean ate() {\n\t\treturn false;\n\t}", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public void setTimestamp() {\n timestamp = System.nanoTime();\n }", "public boolean hasDateTime() {\n return false;\n }", "@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 Date getSOHTimestamp() {\r\n/* 265 */ return this._SOHTimestamp;\r\n/* */ }", "public Timestamp() {}", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public abstract long startTimestamp();", "public static int offsetBits_infos_timestamp() {\n return 32;\n }", "public Integer getTimestamp() {\n return timestamp;\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}", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public abstract long getTimestampMillis();", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public java.lang.String getTimestamp() {\n return timestamp;\n }" ]
[ "0.6767597", "0.659148", "0.64716077", "0.6440329", "0.6440329", "0.6430687", "0.6430687", "0.6430687", "0.6430687", "0.6430687", "0.6430687", "0.6430687", "0.6367987", "0.6367742", "0.6342923", "0.63343513", "0.6319175", "0.62926537", "0.6279318", "0.62745386", "0.6267032", "0.6266326", "0.62227744", "0.62227744", "0.62077105", "0.6201787", "0.6194197", "0.6194143", "0.61885744", "0.61838675", "0.6168417", "0.6155394", "0.615298", "0.6144204", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.6142925", "0.61415863", "0.6140499", "0.6131492", "0.6125532", "0.61250556", "0.61250556", "0.61150247", "0.6112184", "0.61108434", "0.6096122", "0.60822314", "0.60822314", "0.6072979", "0.60708845", "0.60679376", "0.60679376", "0.6062849", "0.6062849", "0.60580766", "0.60578746", "0.60438794", "0.60438794", "0.60183686", "0.60109866", "0.60060954", "0.59929717", "0.599297", "0.5973455", "0.5968821", "0.5959555", "0.5950099", "0.59256536", "0.5920544", "0.59175515", "0.5907573", "0.5907573", "0.5907573", "0.5907573", "0.5907573", "0.5907573", "0.5907573", "0.5907573", "0.589129", "0.5888701", "0.5877273", "0.5875018", "0.587071", "0.587071", "0.58700764", "0.5868052", "0.5863778" ]
0.0
-1
Calendar calendar=new GregorianCalendar(2017,0,25); Date date=calendar.getTime(); Room room1=new Room(1,100,2,date,"Zirka","Kiev"); Room room2=new Room(2,110,3,date,"Hilton","Kiev"); Room room3=new Room(3,200,4,date,"Hilton","Kiev"); Room room4=new Room(4,150,3,date,"Hilton","Kiev"); Room[] rooms=new Room[2]; rooms[0]=room1; rooms[1]=room3; GoogleAPI googleAPI= new GoogleAPI(rooms); Room[] rooms1=new Room[2]; rooms1[0]=room2; rooms1[1]=room4; BookingComAPI bookingComAPI=new BookingComAPI(rooms1); Room[] rooms2=new Room[4]; rooms2[0]=room1; rooms2[2]=room3; rooms2[1]=room2; rooms2[3]=room4; TripAdvisorAPI tripAdvisorAPI=new TripAdvisorAPI(rooms2); API googleApis=new API; googleApis=googleAPI; API bookingApis=new API; bookingApis=bookingComAPI; API[] tripAdvisorapis=new API[1]; tripAdvisorapis[2]=tripAdvisorAPI; Controller controller=new Controller(googleApis); System.out.println(controller.check(googleApis,bookingApis));
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n try {\n Model m = new Model();\n //Customer c = new Customer(\"Pam Satan III\", \"[email protected]\", \"Norwich\", \"V\", \"02/12\", \"2136871466\");\n //c = m.CUSTOMERS.getCustomer(c.getName(), c.getEmail());\n /*Customer pam = m.CUSTOMERS.createCustomer(c);\n System.out.println(pam);\n List<Room> list = new ArrayList<>();\n list.add(request);\n //have pam make bookings for this date until she has used up all the available rooms, should exception\n //out\n for(int i = 0; i < 100; i++) {\n m.BOOKINGS.makeBooking(c, list, LocalDate.parse(\"2017-12-24\"), LocalDate.parse(\"2017-12-28\"));\n }\n //Booking booktest = m.BOOKINGS.getBooking(15976);\n int foo = 1;*/\n //c.setName(\"Jordan Jorgens\");\n //m.CUSTOMERS.updateCustomer(c);\n //Customer check = m.CUSTOMERS.getCustomer(12955);\n //System.out.println(check);\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n Room r = (Room)null;\n }", "public void Getbookingscall(String s1,String s2)\r\n\t{\r\n\t\tkeytype = s1;\r\n\t\t\r\n\t\tSystem.out.println(\"keytype:\"+s1);\r\n\t\t\r\n\t\tresstatus = s2;\r\n\t\tSystem.out.println(\"resstatus:\"+s2);\r\n\t\t\r\n\t\tif(keytype == \"wsauth\")\r\n\t\t{\r\n\t\t\tWsauth objwsauth = new Wsauth();\r\n\t\t\tobjwsauth.Wsauthcall();\r\n\t\t\tString keyw = objwsauth.extractingWsauthKey();\r\n\t\t\taccesskey = keyw;\r\n\t\t\tSystem.out.println(\"hello if\"+ accesskey);\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse if(keytype == \"login\")\r\n\t\t{\r\n\t\t\t/*Login objlogin = new Login();\r\n\t\t\tobjlogin.Logincall();\r\n\t\t\tString keyl = objlogin.extractingLoginKey();\r\n\t\t\tSystem.out.println(\"login key in gethousestatus:\"+keyl);\r\n\t\t\taccesskey = keyl;*/\r\n\t\t\t\r\n\t\t\tString keyl = Login.finalloginaccesskey;\r\n\t\t\tSystem.out.println(\"login key in getbookings:\"+keyl);\r\n\t\t\taccesskey = keyl;\r\n\t\t}\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tserverurl = CommonConfig.serverurl;\r\n\t\t\tnightauditdate1 = CommonConfig.nightauditdate1;\r\n\t\t\t\r\n\t\t\tHttpResponse<JsonNode> responsegetbookings = Unirest.post(\"\"+serverurl+\"/ws/web/getbookings\")\r\n\t\t\t\t\t .header(\"content-type\", \"application/json\")\r\n\t\t\t\t\t .header(\"x-ig-sg\", \"D_gg%fkl85_j\")\r\n\t\t\t\t\t .header(\"cache-control\", \"no-cache\")\r\n\t\t\t\t\t .header(\"postman-token\", \"442ccdd8-438b-68ed-d7c1-0aaed145ef9b\")\r\n\t\t\t\t\t .body(\"{\\r\\n \\\"hotelogix\\\": {\\r\\n \\\"version\\\": \\\"1.0\\\",\\r\\n \\\"datetime\\\": \\\"2012-01-16T10:10:15\\\",\\r\\n \\\"request\\\": {\\r\\n \\\"method\\\": \\\"getbookings\\\",\\r\\n \\\"key\\\": \\\"\"+accesskey+\"\\\",\\r\\n \\\"data\\\": {\\r\\n \\\"fromDate\\\": \\\"\"+nightauditdate1+\"\\\",\\r\\n \\\"toDate\\\": \\\"\"+nightauditdate1+\"\\\",\\r\\n \\\"searchBy\\\": \\\"STAYDATE\\\",\\r\\n \\\"reservationStatus\\\":[\\\"\"+resstatus+\"\\\"]\\r\\n }\\r\\n }\\r\\n }\\r\\n }\")\r\n\t\t\t\t\t .asJson();\r\n\t\t\tJsonNode body = responsegetbookings.getBody();\r\n\t\t\tresponseJSONString = body.toString();\r\n\t\t\tSystem.out.println(responseJSONString);\r\n\t\t}\r\n\t\tcatch(UnirestException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public int checkRooms(LocalDate bookdate, int stay, int type, int req, ArrayList<Integer> array) {\n\t\t\t\r\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint count = 0;\r\n\t\t\tBooking bookChecker = null; //Saves the bookings of a hotel to be checked\r\n\t\t\tRooms roomChecker = null; //Saves the rooms of the hotel\r\n\t\t\tLocalDate endBook = bookdate.plusDays(stay); //booking start date + number of nights\r\n\t\t\tboolean booked = false;\r\n\r\n\t\t\tif(req == 0) return 0; //if theres no need for single/double/triple room\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //checking room-wise order\r\n\t\t\t\troomChecker = RoomDetails.get(i);\r\n\t\t\t\tif(type == roomChecker.getCapacity()) { //only check if its the same room type as needed\r\n\t\t\t\t\tk = 0;\r\n\t\t\t\t\twhile(k < Bookings.size()) { //check for bookings of a room\r\n\t\t\t\t\t\tbookChecker = Bookings.get(k);\r\n\t\t\t\t\t\tj=0;\r\n\t\t\t\t\t\tbooked = false;\r\n\t\t\t\t\t\twhile(j < bookChecker.getNumOfRoom()) { //To check if a booked room have clashing schedule with new booking\r\n\t\t\t\t\t\t\tif(roomChecker.getRoomNum() == bookChecker.getRoomNumber(j)) { //if there is a booking for the room\r\n\t\t\t\t\t\t\t\tif(bookdate.isEqual(bookChecker.endDate()) || endBook.isEqual(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts at the same day where another booking ends\r\n\t\t\t\t\t\t\t\t\tbooked = false; //No clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse if(bookdate.isAfter(bookChecker.endDate()) || endBook.isBefore(bookChecker.getStartDate())) {\r\n\t\t\t\t\t\t\t\t\t//New booking starts days after other booking ends, or new booking ends before other booking starts\r\n\t\t\t\t\t\t\t\t\tbooked = false; //no clash\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse { //Any other way means that it clashes and hence room cant be booked\r\n\t\t\t\t\t\t\t\t\tbooked = true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(booked == true) break; //if booked and clash , break\r\n\t\t\t\t\t\tk++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\tif(booked == false) {\r\n\t\t\t\t\t\tarray.add(roomChecker.getRoomNum()); //if no clashing dates, book the room for new cust\r\n\t\t\t\t\t\tcount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (count == req) break; //if there is enough room already, finish\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\treturn count; //returns the number of available rooms acquired\r\n\t\t}", "public static void main(String[] args) {\n TravelAgency Altayyar = new TravelAgency(20);\n \n //creating and storing object for processing using array\n Ticket[] ticketsToAdd = new Ticket[4];\n \n ticketsToAdd[0] = new BusTicket(\"Nora Ali\",\"Riyadh\",\"Jeddah\",\"28/02/2018\",\"Standard\",600);\n ticketsToAdd[1] = new AirlineTicket(\"Sara Saad\",\"Riyadh\",\"Khobar\",\"03/03/2018\",\"Business\",\"Flynas\");\n ticketsToAdd[2] = new AirlineTicket(\"Ahmad Ali\",\"Riyadh\",\"Dammam\",\"13/03/2018\",\"Economy\",\"Saudia\");\n ticketsToAdd[3] = new AirlineTicket(\"Maha Hamad\",\"Riyadh\",\"Jeddah\",\"20/04/2018\",\"Business\",\"Saudia\");\n \n //adding objects\n for (int i = 0; i < ticketsToAdd.length; i++) {\n \n boolean isAdded = Altayyar.addReservation(ticketsToAdd[i]);\n System.out.println((isAdded)?\"The Ticket was added successfully\":\"The Ticket was not added !\");\n }\n \n \n //display all the issued tickets \n Altayyar.display();\n \n\n //cancel a ticket\n boolean isCancelled = Altayyar.cancelReservation(0);\n System.out.println((isCancelled)?\"The ticket was found and cancelled successfully !\":\"Ticket was not found !\");\n \n \n \n \n \n //get and display all tickets belonging to Saudia \n Ticket[] saudiaTickets = Altayyar.allTickets(\"Saudia\");\n \n for (int i = 0; i < saudiaTickets.length; i++) {\n \n System.out.println(saudiaTickets[i].toString());\n }\n \n \n \n //display all the issued tickets after the update \n Altayyar.display();\n \n \n }", "private void makeBooking()\n {\n Scanner sc= new Scanner(System.in);\n Date dt = new Date();\n System.out.println(\"Enter Registered member ID: \");\n int memberID = sc.nextInt();\n if(sportsClub.memberIdentity(memberID))//check id exist or not\n {\n Member mem = sportsClub.searchMember(memberID); // get the obj of that member based on ID\n if(mem != null)\n {\n if(mem.getFinancial())\n {\n \n \n System.out.println(\"Enter the Sport Name u want to Play :\");\n System.out.println(\"Basketball\\nBadminton\" );\n Scanner sc1= new Scanner(System.in);\n String userSportName=sc1.nextLine();\n\n if(mem.statusSport(userSportName))\n {\n Scanner sc2= new Scanner(System.in);\n System.out.println(\"Enter the date u want to play in this format dd-MM-yyyy : \"); \n String stringData=sc2.nextLine();\n LocalDate date = DateUtility.convertDate(stringData);\n System.out.println(\"Please enter the Start Time \"); \n stringData=sc2.nextLine();\n LocalTime startTime = DateUtility.convertTime(stringData);\n System.out.println(\"Please enter the End Time\"); \n stringData=sc2.nextLine();\n LocalTime endTime= DateUtility.convertTime(stringData);\n \n DateUtility du=new DateUtility();\n duration=(int)(du.timeBetweenDateTimes(startTime,endTime));//calculats to get the duration \n Sport s = sportsClub.findSport(userSportName);\n\n if(s.timeCheck(mem.getTotalDuration(userSportName, date)+ duration))//total duration checking (without exceeding limits\n { \n\n if(sportsClub.validateTime(date, startTime, duration)==1)//check the pass condition for the given statement\n { \n\n System.out.println(\"=========Available List==========\");\n for(Court courtObj : s.getAvailableCourts(date, startTime, duration))\n {\n System.out.println(\"\\tCourt number \" + courtObj.getCourtId() + \" is available\");\n } \n System.out.println(\"=====================================\");\n Scanner in= new Scanner(System.in);\n System.out.println(\"Which Court would you like to play in?\");\n int courtNumber = in.nextInt();\n\n Court courtObj = null;\n for(Court c : s.getCourtList())\n {\n if(c.getCourtId() == courtNumber)\n {\n courtObj = c;\n }\n }\n\n Booking book = new Booking(dt.getTime(),date,startTime,endTime,mem,courtObj);\n mem.addBooking(book);\n courtObj.addBooking(book);\n System.out.println(\"Successfully booked the court!\");\n\n }\n else if(sportsClub.validateTime(date, startTime, duration)==5)\n System.out.println(\"Booking done between 8-11pm\");\n else if(sportsClub.validateTime(date, startTime, duration)==4)\n System.out.println(\"only 7 days Advance is available\");\n else if(sportsClub.validateTime(date, startTime, duration )==2)\n System.out.println(\"Booking cannot be done\");\n else if(sportsClub.validateTime(date, startTime, duration)==1)\n System.out.println(\"Bookings cant be advanved by years\");\n else if(sportsClub.validateTime(date, startTime, duration) < 0)\n System.out.println(\"Bookings cant be done for previously!\");\n }\n else\n System.out.println(\"Sorry no slots available for sort\"+userSportName);\n }\n else\n {\n System.out.println(\"Sorry! sport is not is not available.\");\n\n }\n\n }\n else\n System.out.println(\"Finances are poor!\");\n }\n }\n else\n System.out.println(\"Sorry you are not in any club!\");\n\n }", "public static void getRoomsAPI()\n\t{\n\t\ttry\n\t\t{\n\t\t\tWebClient checkIP = new WebClient(\"http://api.conceptnet.io/c/en/room/n?offset=0&limit=1000\");\n\t\t\tcheckIP.post(\"\");\n\t\t\tlong startIP = System.currentTimeMillis();\n\t\t\t\n\t\t\tArrayList<ArrayList<String> > checkq = new ArrayList<ArrayList<String> >();\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tcheckIP.getQueue(checkq);\n\t\t\t\tboolean processedsomething = false;\n\t\t\t\tfor (int i = 0; i < checkq.size(); i++) \n\t\t\t\t{\n\t\t\t\t\tArrayList<String> resultlines = checkq.remove(i);\n\t\t\t\t\t\n\t\t\t\t\tString x = null;\n\t\t\t\t\tString relation = null;\n\t\t\t\t\tString relationweight = null;\n\t\t\t\t\tString y = null;\n\n\t\t\t\t\tfor(int li=0;li<resultlines.size();li++)\n\t\t\t\t\t{\t\t\n\t\t\t\t\t\tprocessedsomething = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tString line = resultlines.get(li);\n\t\t\t\t\t\tline = line.trim();\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(line.startsWith(\"\\\"@id\\\": \\\"/a/[\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tline = line.substring(\"\\\"@id\\\": \\\"/a/[\".length());\n\t\t\t\t\t\t\tint ind = line.indexOf(\",\");\n\t\t\t\t\t\t\trelation = line.substring(0,ind);\n\t\t\t\t\t\t\tline = line.substring(ind+1);\n\t\t\t\t\t\t\tind = line.indexOf(\",\");\n\t\t\t\t\t\t\tx = line.substring(0,ind);\n\t\t\t\t\t\t\tline = line.substring(ind+1);\n\t\t\t\t\t\t\tind = line.indexOf(\"]\");\n\t\t\t\t\t\t\ty = line.substring(0,ind);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(line.startsWith(\"\\\"weight\\\": \"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\trelationweight = line.substring(\"\\\"weight\\\": \".length());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//can now process the edge information\n\t\t\t\t\t\t\t//we only want the things that are a room not things a room is\n\t\t\t\t\t\t\tif(y.equalsIgnoreCase(\"c/en/room/n\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.println(x+\" \"+relation+\" \"+y);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(processedsomething)\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tThread.sleep(16);\n\t\t\t\t\n\t\t\t\tlong time = System.currentTimeMillis();\n//\t\t\t\tif((time-startIP)>1000)\n//\t\t\t\t{\n//\t\t\t\t\t//timeout\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t}", "public void manualBooking() {\n IController<Modules> mic = new Controller<>();\n\n DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(\"dd/MM/yyyy HH:mm\");\n DateTimeFormatter durationFormatter = DateTimeFormatter.ofPattern(\"HH:mm\");\n\n boolean sociallyDistanced;\n LocalDateTime time;\n LocalTime duration;\n Modules module;\n Rooms room;\n\n // Is this booking socially distanced?\n sociallyDistanced = isSociallyDistanced();\n\n // Get Time.\n System.out.println(\"What time would you like this booking to be (HH:MM)?\");\n String sTime = sc.next();\n while (!sTime.matches(\"^[0-9]+:[0-9]+$\")) {\n System.out.println(\"Please make sure you are using the correct format. (HH:MM)\");\n sTime = sc.next();\n }\n sc.nextLine();\n\n // Get date INCLUDE OPTION TO GO FROM `m.getStart()`\n System.out.println(\"What date would you like this booking to be on (dd/mm/yyyy)?\");\n String sDate = sc.next();\n while (!sDate.matches(\"^[0-9]+/[0-9]/+[0-9]{4}$\")) {\n System.out.println(\"Please make sure you are using the correct format. (HH:MM)\");\n sDate = sc.next();\n }\n sc.nextLine();\n\n // Get datetime\n try {\n time = LocalDateTime.parse(sDate + \" \" + sTime, dateTimeFormatter);\n } catch (Exception e) {\n System.out.println(\"That is not a valid date. Going back to menu.\");\n return;\n }\n\n // Get duration.\n System.out.println(\"How long would you like this booking to be? (HH:MM)?\");\n String sDuration = sc.next();\n while (!sDuration.matches(\"^[0-9]{1,2}:[0-9]+$\")) {\n System.out.println(\"Please make sure you are using the correct format. (HH:MM)\");\n sDuration = sc.next();\n }\n sc.nextLine();\n\n // Attempt to set duration\n try {\n duration = LocalTime.parse(sTime, durationFormatter);\n } catch (Exception e) {\n System.out.println(\"That is not a valid time. Going back to menu.\");\n return;\n }\n LocalDateTime endTime = time.plusHours(duration.getHour()).plusMinutes(duration.getMinute());\n\n // Get module.\n Map<String, Modules> moduleMap = new HashMap<>();\n System.out.println(\"Module options\");\n for (Modules m : mic.readAll(Modules.class)) {\n System.out.println(\" \" + m.getModuleID() + \": \" + m.getName());\n moduleMap.put(m.getModuleID(), m);\n }\n String moduleKey = sc.next();\n while (!moduleMap.containsKey(moduleKey)) {\n System.out.println(\"That is not a correct ID for a module. Look at the list above.)\");\n moduleKey = sc.next();\n }\n sc.nextLine();\n\n module = moduleMap.get(moduleKey);\n\n room = getRooms(sociallyDistanced, time, endTime, module);\n\n Bookings newBooking;\n\n\n try {\n // create a non-recurring booking.\n newBooking = new Bookings(sociallyDistanced, time, duration, module, room);\n addBooking(newBooking);\n } catch (Exception e) {\n System.out.println(\"There was an error creating a booking on the date: \" + time.format(DateTimeFormatter.ofPattern(\"dd/MM/yyyy\")));\n }\n\n\n }", "private void OTP_Matchapi() {\n\n final ProgressDialog progressDialog = new ProgressDialog(Vendor_Booking_ConfirmDetails.this);\n progressDialog.setTitle(\"Loading..\");\n progressDialog.show();\n String url = BaseUrl + OTP_MATCH_by_vendor_usergiven;\n AndroidNetworking.post(url)\n .addBodyParameter(\"otp\", otp)\n .addBodyParameter(\"bookingId\", id)\n .addBodyParameter(\"vendor_id\", vid)\n .setPriority(Priority.MEDIUM)\n .build()\n .getAsJSONObject(new JSONObjectRequestListener() {\n @Override\n public void onResponse(JSONObject jsonObject) {\n\n System.out.println(\"booking_match_otp --- \" + \"otp \" + otp + \" bookid \" + id + \" vendor_id \" + vid);\n progressDialog.dismiss();\n try {\n\n String result = jsonObject.getString(\"job_status\");\n String msg = jsonObject.getString(\"start_time\");\n\n if (result.equalsIgnoreCase(\"Inprogress\")) {\n Log.e(\"otpmatchapiresponce- \", jsonObject.toString());\n progressDialog.dismiss();\n Startbooking();\n alertDialog.dismiss();\n } else {\n progressDialog.dismiss();\n alertDialog.dismiss();\n\n\n }\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onError(ANError anError) {\n Log.e(\"error_my_join\", anError.toString());\n\n\n }\n });\n\n\n }", "public static void test() {\n\n Reservation res1 =\n new Reservation(\n -1,\n \"Standard\",\n \"0000111\",\n Timestamp.valueOf(\"2019-06-11 16:10:00\"),\n Timestamp.valueOf(\"2019-06-15 09:00:00\"),\n \"525 W Broadway\",\n \"Vancouver\");\n ReservationsController.makeReservation(res1);\n\n RentalConfirmation rc1 =\n RentalsController.rentVehicle(res1, \"Mastercard\", \"389275920888492\", \"08/22\");\n\n System.out.println(\"Getting the rental added to the database\");\n Rental check = RentalsController.getRental(rc1.getRid());\n System.out.println(check);\n ArrayList<RentalReportCount> rentals =\n RentalsController.getDailyRentalCount(\"2019-11-20\", null, null);\n if (rentals != null && rentals.isEmpty()) {\n System.out.println(\"list is empty\");\n }\n System.out.println(rentals);\n\n RentalsController.deleteRental(rc1.getRid());\n }", "public static void main(String[] args) {\n\r\n\t\tint input;\r\n\t\tSystem.out.println(\"Welcome to hotel Booking\");\r\n\t\tSystem.out.println(\"please enter size of hotel\");\r\n\t\tScanner sObj = new Scanner(System.in);\r\n\t\tint size = sObj.nextInt();\r\n\t\tif(size> 1000 ||size<0) {\r\n\t\t\tSystem.out.println(\"please enter correct size of hotel\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetHotelSize(size);\r\n\t\t\tdo{\r\n\t\t\t\tSystem.out.println(\"please enter start and end day\");\r\n\t\t\t\tint start = sObj.nextInt();\r\n\t\t\t\tint end = sObj.nextInt();\r\n\r\n\t\t\t\tif(start<0 || start>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid Start Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif(end<start || end>365) {\r\n\t\t\t\t\tSystem.out.println(\"Invalid end Date\");\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tint room_number = room_booking(start,end);\r\n\r\n\t\t\t\tif(room_number >0 && room_number <= size) {\r\n\t\t\t\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\t\t\t\tMap<Integer,List<Integer>> booking_details = new HashMap<Integer,List<Integer>>();\r\n\t\t\t\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\t\t\t\tbooking_days.add(i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbooking_details.put(bookingId++,booking_days);\r\n\t\t\t\t\troom_bookings.put(room_number,booking_details);\r\n\t\t\t\t\tSystem.out.println(\"Accept\");\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"Decline\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSystem.out.println(\"Press 1 to continue to check room availablity or 0 to exit\");\r\n\t\t\t\tinput = sObj.nextInt();\r\n\t\t\t}while(input==1); \r\n\t\t}\r\n\t}", "public interface API {\n Room[] findRooms(int price, int persons, String city, String hotel);\n\n Room[] getAllRooms();\n\n}", "public void smartBooking() {\n // Set up the formatters to extract a datetime object from the user's input.\n DateTimeFormatter durationFormatter = DateTimeFormatter.ofPattern(\"HH:mm\");\n\n // Set up the controller objects for the class to use.\n IController<Staff> sic = new Controller<>();\n IController<Modules> mic = new Controller<>();\n\n // Set up the variables which store the information about the booking.\n boolean sociallyDistanced;\n LocalDateTime time;\n LocalDateTime endTime;\n LocalTime duration;\n LocalTime timeOfBooking;\n Staff staffMember;\n Modules module;\n Rooms room;\n int numberOfBookingsPerWeek;\n\n // Get staff.\n staffMember = sic.readById(Staff.class, getStaff().getStaffID(), true); // initialize only the relationship that is needed.\n\n // Read module IDs -> gets module requirements (week commencing, number of bookings required.)\n Map<String, Modules> moduleMap = new HashMap<>();\n System.out.println(\"Module options\");\n for (Modules m : staffMember.getModules()) {\n System.out.print(\" \" + m.getModuleID() + \": \" + m.getName());\n m = mic.readById(Modules.class, m.getModuleID(), true);\n if (!m.getBookings().isEmpty()) System.out.println(\" (this booking already has bookings set up.)\\n\");\n else System.out.println();\n moduleMap.put(m.getModuleID(), m);\n }\n String moduleKey = sc.next();\n while (!moduleMap.containsKey(moduleKey)) {\n System.out.println(\"That is not a correct ID for a module. Look at the list above.)\");\n moduleKey = sc.next();\n }\n sc.nextLine();\n\n // Ask type of lesson (duration) Gets duration from the module requirements\n System.out.println(\"What type of booking is this? \\n\" +\n \"[0]: Practical.\\n\" +\n \"[1]: Lecture.\");\n String type = sc.next();\n while (!type.matches(\"^[01]$\")) {\n System.out.println(\"Please enter (0 or 1)\");\n type = sc.next();\n }\n sc.nextLine();\n\n\n // Get which type of lesson the user wants to book.\n module = mic.readById(Modules.class, moduleKey, true); // update relations.\n ModuleRequirements requirements = module.getModuleRequirements();\n\n if (type.equals(\"0\")) {\n duration = requirements.getPracticalLength();\n numberOfBookingsPerWeek = requirements.getPracticalsPerWeek();\n } else {\n duration = requirements.getLectureLength();\n numberOfBookingsPerWeek = requirements.getLecturesPerWeek();\n }\n\n // Creates a new recurring booking for the number of bookings required per week.\n for (int i = 1; i <= numberOfBookingsPerWeek; i++) {\n System.out.printf(\"------------------Booking #%d/%d------------------\\n\", i, numberOfBookingsPerWeek);\n\n // Ask for day of week -> (0-6), adds the number of days to the week commencing date.\n System.out.println(\"What day would you like this booking to be on? \\n\" +\n \"[0]: Monday.\\n\" +\n \"[1]: Tuesday\\n\" +\n \"[2]: Wednesday\\n\" +\n \"[3]: Thursday\\n\" +\n \"[4]: Friday\\n\" +\n \"[5]: Saturday\\n\" +\n \"[6]: Sunday.\");\n String offset = sc.next();\n while (!offset.matches(\"^[0-6]$\")) {\n System.out.println(\"Please enter (y/n)\");\n offset = sc.next();\n }\n sc.nextLine();\n\n // Ask time -> gets the time for the booking\n System.out.println(\"What time would you like this booking to be (HH:MM)?\");\n String sTime = sc.next();\n while (!sTime.matches(\"^[0-9]+:[0-9]+$\")) {\n System.out.println(\"Please make sure you are using the correct format. (HH:MM)\");\n sTime = sc.next();\n }\n sc.nextLine();\n\n // Attempt to set the time of the booking\n try {\n timeOfBooking = LocalTime.parse(sTime, durationFormatter);\n } catch (Exception e) {\n System.out.println(\"That is not a valid time. Going back to menu.\");\n return;\n }\n\n // Set time\n time = requirements.getWeekCommencing().plusDays(Integer.parseInt(offset)).atTime(timeOfBooking);\n endTime = time.plusHours(duration.getHour()).plusMinutes(duration.getMinute());\n\n // Ask if it is social distanced.\n sociallyDistanced = isSociallyDistanced();\n\n // Ask for the room.\n room = getRooms(sociallyDistanced, time, endTime, module);\n\n List<Bookings> newBookings = new ArrayList<>();\n // Create booking.\n for (int bookingN = 1; bookingN <= module.getWeeks(); bookingN++) {\n newBookings.add(new Bookings(sociallyDistanced, time, duration, module, room));\n\n time = time.plusDays(7);\n }\n\n // Attempt to add the new bookings\n try {\n addBookings(newBookings);\n } catch (Exception e) {\n // Tell the user what went wrong.\n System.out.println(e.getMessage());\n }\n }\n }", "@Override\n\tpublic void takeAppointment() {\n\t\tsearchByMobile();\n\t\tif (count == 0) {\n\t\t\tnew ManagerServiceImplementation().addPatient();\n\t\t}\n\t\tnew DoctorServiceImplementation().showDoctorDetails();\n\t\tSystem.out.println(\"Enter doctor's ID:\");\n\t\tString dID = UtilityClinic.readString();\n\t\tfor (int i = 0; i < UtilityClinic.docJson.size(); i++) {\n\t\t\tJSONObject obj = (JSONObject) UtilityClinic.docJson.get(i);\n\t\t\tif (obj.get(\"Doctor's ID\").toString().equals(dID)) {\n\t\t\t\tif (UtilityClinic.docWisePatCounter.isEmpty()) {\n\t\t\t\t\tfor (int j = 0; j < UtilityClinic.docJson.size(); j++) {\n\t\t\t\t\t\tUtilityClinic.docWisePatCounter.add(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (UtilityClinic.docWisePatCounter.get(i) < 5) {\n\t\t\t\t\tnew Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tUtilityClinic.docWisePatCounter.add(i, UtilityClinic.docWisePatCounter.get(i) + 1);\n\n\t\t\t\t\tif (UtilityClinic.appFile == null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tutil.accessExistingAppJson();\n\t\t\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t\t\tutil.createAppJson();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tutil.readFromAppJson(util.appFile);\n\t\t\t\t\tJSONObject appObject = new JSONObject();\n\t\t\t\t\tAppointment app = new Appointment(obj.get(\"Doctor's name\").toString(), dID, pName, pId,\n\t\t\t\t\t\t\tobj.get(\"Availibility time\").toString());\n\t\t\t\t\tappObject.put(\"Patient's name\", app.getPatientName());\n\t\t\t\t\tappObject.put(\"Patient's ID\", app.getPatientId());\n\t\t\t\t\tappObject.put(\"Doctor's name\", app.getDoctorName());\n\t\t\t\t\tappObject.put(\"Doctor's ID\", app.getDoctorId());\n\t\t\t\t\tappObject.put(\"Time stamp\", app.getTime());\n\t\t\t\t\tUtilityClinic.appJson.add(appObject);\n\t\t\t\t\tutil.writetoJson(UtilityClinic.appJson, util.getAppFileName());\n\t\t\t\t\tutil.readFromAppJson(util.getAppFileName());\n\t\t\t\t\tSystem.out.println(\"Appointment done.....\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Sorry!!! Doctor is not available....Please try on next day.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addBookings(List<Bookings> newBookings) {\n IController<Bookings> bookingController = new Controller<>();\n IController<Students> studentController = new Controller<>();\n IController<Staff> staffController = new Controller<>();\n\n // Get all bookings\n List<Bookings> allBookings = bookingController.readAll(Bookings.class);\n\n\n // Check if any booking clashes.\n int count = 0;\n for (Bookings b : newBookings) {\n System.out.println(\"Checking availability of booking #\" + count);\n for (Bookings booking : allBookings) {\n if (b.conflictsWith(booking)) {\n throw new IllegalArgumentException(\"That booking conflicts with another booking.\");\n }\n }\n\n Modules relatedModule = b.getModule();\n\n if (!b.getRooms().isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"That room is unavailable at the time (\" + b.getTime() + \").\");\n }\n for (Students student : relatedModule.getStudents()) {\n student = studentController.readById(Students.class, student.getStudentID(), true);\n if (!student.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A student is unavailable at this time. [\" + b.getTime() + \"] (\" + student.getStudentID() + \")\");\n }\n }\n for (Staff staff : relatedModule.getStaff()) {\n staff = staffController.readById(Staff.class, staff.getStaffID(), true);\n\n if (!staff.isAvailable(b.getTime(), b.getEnd())) {\n throw new IllegalArgumentException(\"A staff member is unavailable at this time. [\" + b.getTime() + \"] (\" + staff.getStaffID() + \")\");\n }\n }\n\n count++;\n }\n\n // Create the bookings\n for (Bookings b : newBookings) {\n bookingController.create(b);\n System.out.println(b.confirmation() + \"\\n\");\n }\n }", "@Test\r\n\tpublic void makeBooking1() {\r\n\t\tnewFlightSearch.setDepartureTime(new Date(2016-1900,7+1,15));\r\n\t\tnewFlightSearch.setDepartureLoc(\"Akureyri\");\r\n\t\tnewFlightSearch.setArrivalLoc(\"Reykjavík\");\r\n\t\tnewFlightSearch.setPriceRange(new int[]{10000,20000});\r\n\t\tnewFlightSearch.setReturnTrip(false);\r\n\t\tnewFlightSearch.setNumSeats(1);\r\n\t\tnewFlightSearch.setSeatClass(\"Economy\");\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\r\n\t\tFlightBooking testBooking = new FlightBooking(flightResults.get(0),1,\"Gunnar\");\r\n\t\tmockFlightBook bookedFlight = testBooking.bookFlight();\r\n\t\t\r\n\t\tassertThat(bookedFlight.flight, instanceOf(FlightBooking.class));\r\n\t}", "private void checkconflict(final String sname[],final String sid[],final String noofconflicts,final String hostelid[],final\n String floorno[]){\n StringRequest strReq =new StringRequest(Request.Method.POST,\n AppConfig.URL_CONFLICTS, new Response.Listener<String>() {\n\n @Override\n public void onResponse(String response) {\n\n\n try {\n JSONObject jObj = new JSONObject(response);\n //Response from serveR\n String conflicts = jObj.getString(\"conflicts\");//no of conflicts it will show\n String [] wfid = new String[Integer.parseInt(conflicts)];\n String [] sid = new String[Integer.parseInt(conflicts)];\n if(conflicts.equals(\"0\")){\n submitform(roomname,rollId, number, hostel, floor);\n }else{\n JSONArray repeat = jObj.getJSONArray(\"repeat\");\n for(int i=0;i<Integer.parseInt(conflicts);i++){\n JSONObject jobji = repeat.getJSONObject(i);\n wfid[i] = jobji.getString(\"wfid\");\n sid[i] = jobji.getString(\"sid\");\n }\n String m1 = \"Following Roll Number Already have been Submitted:-\";\n for(int i=0;i<Integer.parseInt(conflicts);i++){\n name = name + sid[i].toUpperCase();\n }\n String msg = m1 + name;\n final AlertDialog.Builder alertdialogBuilder = new AlertDialog.Builder(WingForm.this);\n alertdialogBuilder.setTitle(\"Conflicts!\");\n\n\n alertdialogBuilder\n .setMessage(msg)\n .setCancelable(false)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n AlertDialog dialog = alertdialogBuilder.create();\n dialog.show();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting params to saved form url\n int noofstudent = 2*Integer.parseInt(noofconflicts);\n String checkconflicts = \"jbscjas\";//send anything part\n String uid = AppController.getString(WingForm.this,\"Student_id\");\n Map<String, String> params = new LinkedHashMap<String, String>();\n //using LinkedHashmap because backend does not check key value and sees order of variables\n params.put(\"checkconflicts\", checkconflicts);\n params.put(\"noofstudent\", String.valueOf(noofstudent));\n for(int m=0;m<noofstudent;m++){\n params.put(\"sid[\"+m+\"]\",sid[m]);\n }\n\n\n return params;\n }//pori array paas ho rhi hai\n //debug krke dekho smjh aa jaega ek ke sath ek kaise bheju smjh nh aa rha\n\n };\n\n AppController.getInstance().addToRequestQueue(strReq);\n }", "public interface Api {\n /**{\"response\": {\"zbsVer\": 0, \"hostId\": \"001207C40173\", \"room\": [{\"type\": \"\\u603b\\u7ecf\\u7406\", \"roomId\": \"322\", \"name\": \"\\u603b\\u7ecf\\u7406\"}, {\"roomId\": \"350\", \"type\": \"\\u4e3b\\u5367\", \"name\": \"\\u4e3b\\u5367\"}, {\"type\": \"\\u53a8\\u623f\", \"roomId\": \"366\", \"name\": \"\\u5475\\u5475\"}, {\"roomId\": \"381\", \"type\": \"\\u53a8\\u623f\", \"name\": \"\\u53a8\\u623f\"}, {\"roomId\": \"382\", \"type\": \"\\u9910\\u5385\", \"name\": \"\\u9910\\u5385\"}], \"softver\": 104, \"timestamp\": 1501838857, \"zbhVer\": 0, \"lastbackup\": 1499826785, \"pandId\": 101, \"firmver\": 217, \"numbers\": \"15905214137,15252089063,18912345678,15263985632,15152208332\", \"channelNo\": \"f\", \"registerHost\": false, \"name\": \"40173\"}, \"ret\": 0, \"md5\": \"a92c08fdf3a4b4f9aef04b3ce102df32\"}\n\n * 云端接口\n */\n String wrapper_request = \"/wrapper/request\";\n //\n// CloudInterface.h\n// ihome\n//\n// Created by on 3/13/15.\n// Copyright (c) 2015 Co.ltd. All rights reserved.\n\n //测试\n String urlCloud = \"/https://api2.boericloud.com\";\n //正式\n// String urlCloud = \"/https://api.boericloud.com\";\n\n String urlResetMobile = \"/auth/resetMobile\"; //重置手机号码\n String urlNegotiate = \"/auth/negotiate\";\n String urlRegister = \"/auth/register\"; //注册\n String urlSignin = \"/auth/login\"; //登录\n String urlSignOff = \"/auth/logout\"; //登出\n\n String urlResetCloudPassword = \"/auth/resetCloudpassword\"; //重置密码\n String urlSmsVerify = \"/auth/sms_verify\"; //短信验证\n String urlResetPWD = \"/auth/reset_password\"; //忘记密码\n String urlMobileVerify = \"/auth/mobile_verify\"; //验证手机号\n\n String urlUserUpdate = \"/user/update\";\n String urlUserUpdateToken = \"/user/update_token\";\n\n String urlUserPermissions = \"/user/host_permissions\"; //查询用户权限\n String urlUserUpdateExtend = \"/user/update_extend\"; //更新铃声和震动\n String urlUserShowExtend = \"/user/show_extend\"; //获取铃声和震动\n\n String urlHostBind = \"/host/bind\";\n String urlHostShow = \"/host/show\";\n\n String urlHostverifyadminpassword = \"/host/verifyadminpassword\";\n String urlHostSwitch = \"/host/switch\";\n\n String urlWrapperRequest = \"/wrapper/request\";//透传接口,一键备份\n String urlHostRestoreproperty = \"/host/restoreproperty\";//透传接口,一键还原\n\n String urlHostUpgrade = \"/upgrade/latest\";\n String urlHostUpgradeSoftware = \"/host/software_upgrade\";\n\n String urlSystemMessageShow = \"/systemMessage/show\"; //请求某天某类型的系统消息\n\n String urlWarningShow = \"/alarm/show1\"; //请求某天某类型的历史告警\n String urlAlarmDelete = \"/alarm/delete1\";//删除单条或多条历史告警\n String urlAlarmBatchDelete = \"/alarm/batch_delete\";//删除某天某类型的所有告警\n\n String urlSystemMessageDelete = \"/systemMessage/remove\";//删除某天某类型的系统消息\n String urlSystemBatchDelete = \"/systemMessage/batch_delete\";//删除某天某类型的所有系统消息\n\n String urlAlarmRead = \"/alarm/confirm_read\";//确认某条系统告警\n String urlSystemMessageRead = \"/systemMessage/confirmRead\";//确认某条系统消息\n\n String urlAddBlackList = \"/user/add_black_list\";//加入黑名单\n String urlRemoveBlackList = \"/user/remove_black_list\";//移除黑名单\n String urlQueryBlackList = \"/user/query_in_black_list\";//查询用户是否在黑名单内\n\n /*****************************/\n//主机直连 -> 设备相关\n String urlQueryWiseMediaList = \"/device/queryWiseMediaList\";//查询华尔斯背景音乐的歌曲列表\n String urlDeviceScan = \"/device/scan\";//扫描设备\n String urlDeviceLink = \"/device/link\";//关联设备->(新增)\n String urlDeviceQuerylink = \"/device/querylink\";//查询关联设备->(新增)\n String urlDeviceCmd = \"/device/cmd\";//控制设备\n String urlDeviceRemove = \"/device/remove\";//删除设备\n String urlDeviceDismiss = \"/device/dismiss\";//解绑设备\n String urlDeviceUpdateProp = \"/device/updateprop\";//更新设备属性\n String urlDevicesProperties = \"/devices/properties\";//查询设备属性\n String urlDeviceStatus = \"/device/status\";//查询设备状态\n String urlDeviceQueryOneProp = \"/device/queryOneProp\";//查询某一设备的属性->(新增)\n String urlDeviceConfigHgc = \"/device/configHgc\";//配置中控->(新增)\n String urlDeviceDeleteHgcConfig = \"/device/deleteHgcConfig\";//删除中控配置->(新增)\n String urlDeviceQueryHgcConfig = \"/device/queryHgcConfig\";//查询中控配置->(新增)\n String urlDeviceQueryMeterAddr = \"/device/queryMeterAddr\";//查询水电表的地址->(新增)\n String urlDeviceModifyMeterName = \"/device/modifyMeterName\";//修改水电表的名称->(新增)\n String urlDeviceQueryAllDevices = \"/device/queryAllDevices\";//查询所有设备的属性和状态->(新增)\n String urlDeviceSetFloorHeatingTimeTask = \"/device/setFloorHeatingTimeTask\";//设置地暖的定时任务->(新增)\n String urlDeviceSwitchFloorHeatingTimeTask = \"/device/switchFloorHeatingTimeTask\";//开启或者关闭地暖的定时任务->(新增)\n\n //主机直连 -> 主机相关\n String urlHostShowProperty = \"/host/showproperty\";//查询主机信息\n String urlHostModifyProperty = \"/host/modifyproperty\";//修改主机信息\n String urlHostQueryglobaldata = \"/host/queryglobaldata\";//查询全局信息->(新增)\n String urlHostModifyHostName = \"/host/modifyHostName\";//修改主机名称->(新增)\n\n //主机直连 -> 联动模式相关\n String urlPlanShow = \"/plan/show\";//查询指定的联动预案或模式\n String urlPlanUpdate = \"/plan/update\";//更新联动预案或模式\n String urlPlanQueryGlobalModes = \"/plan/queryGlobalModes\";//查询全局模式->(新增)\n String urlPlanModifyModeName = \"/plan/modifyModeName\";//修改模式名称->(新增)\n String urlPlanSetTimeTask = \"/plan/setTimeTask\";//设置模式定时\n String urlPlanTimeTaskSwitch = \"/plan/switchTimeTask\";//开启或关闭模式定时\n String urlPlanAllModes = \"/plan/allModes\";//查询当前主机下所有模式\n\n //主机直连 -> 房间区域相关\n String urlRoomsRemove = \"/room/remove\";//删除房间\n String urlRoomsUpdate = \"/room/update\";//更新房间\n String urlRoomsShow = \"/room/show\";//查询房间\n String urlAreaRemove = \"/room/removearea\";//删除区域\n String urlAreaUpdate = \"/room/updatearea\";//更新区域\n String urlAreaShow = \"/room/showarea\";//查询区域\n String urlRoomsUpdateMode = \"/room/updatemode\";//更新房间模式\n String urlRoomsShowMode = \"/room/showmode\";//查询房间模式\n String urlRoomsActiveMode = \"/room/activemode\";//激活房间模式\n\n//主机直连 -> 告警相关\n\n\n //主机直连 -> 用户相关\n String urlUserLogin = \"/user/login\";//直连登录->(新增)\n String urlUserAuthorizedLogin = \"/user/authorizedLogin\";//授权后的直连登陆(已在云端登陆)->(新增)\n String urlUserLogout = \"/user/logout\";//退出登录->(新增)\n String urlUserSaveUserInfo = \"/user/saveUserInfo\";//直连登录->(新增)\n /*****************************/\n\n String urlReportBloodsugar = \"/health/report_bloodsugar\";//上报血糖值\n String urlDeleteBloodsugar = \"/health/delete_bloodsugar\";//删除血糖值\n String urlUpdateBloodsugar = \"/health/update_bloodsugar\";//修改血糖值\n\n String urlReportBloodPressure = \"/health/report_bloodpressure\";//上报血压值\n String urlDeleteBloodPressure = \"/health/delete_bloodpressure\";//删除血压值\n\n String urlReportBodyWeight = \"/health/report_bodyweight\";//上报体重值\n String urlDeleteBodyWeight = \"/health/delete_bodyweight\";//删除体重值\n\n String urlReportUrine = \"/health/report_urine\"; //上报尿检值\n String urlDeleteUrine = \"/health/delete_urine\";//删除某一条尿检记录\n\n String urlDownHealthCache = \"/data/health_down\";//下载缓存数据\n String urlUploadHealthCache = \"/data/health_upload\";//上传缓存数据\n String urlUploadBloodPressureCache = \"/data/health_upload_blood_pressure\";//上传血压缓存数据\n String urlUploadBloodGlucoseCache = \"/data/health_upload_blood_glucose\";//上传血糖缓存数据\n String urlUploadBodyWeightCache = \"/data/health_upload_body_weight\";//上传体重缓存数据\n String urlUploadUrineCache = \"/data/health_upload_urine\";//上传尿检缓存数据\n\n String urlQueryElec = \"/energy/query_elec\"; //查询电能数据\n String urlQuerySocket = \"/energy/query_socket\"; //查询插座数据\n String urlQueryWater = \"/energy/query_water\"; //查询水表数据\n String urlQueryGas = \"/energy/query_gas\"; //查询气表数据\n\n\n String urlHostShow1 = \"/host/show1\"; //家庭管理中的主机属性\n\n String urlUserInfo = \"/user/userInfo\"; //查找用户信息\n String urlShowInviteCode = \"/user/show_invitecode\"; //查看邀请码\n String urlInvitationConvert = \"/integral/exchange_integral\"; //兑换邀请码\n String urlFamilyAddUser = \"/family/add_user\"; //增加家庭成员\n String urlFamilyTransPermission = \"/family/admin_permission_transfer\"; //转让管理员权限\n String urlFamilyUpdateAlias = \"/family/update_alias\"; //更新主机别名或用户别名\n String urlFamilyDeleteUser = \"/family/delete_user\"; //主机删除用户\n String urlFamilyDeleteHost = \"/family/delete_host\"; //管理员删除主机\n String urlFamilyUserIsAdmin = \"/family/user_isAdmin\"; //当前用户是否为管理员\n String urlFamilyUpdatePermissaion = \"/family/update_permission\"; //更新用户权限\n String urlFamilyUpdateShare = \"/family/update_share\"; //家庭分享健康数据\n String urlFamilyHostAdmin = \"/family/host_admin\"; //查询主机管理员\n\n String urlApplyUserApply = \"/apply/user_apply\"; //主机用户申请\n\n String urlApplyUserApplyV1 = \"/apply/user_apply_v1\"; //主机用户申请接口V1(将判断和推送放在后台)\n String urlApplyUserShow = \"/apply/user_show\"; //查询主机用户申请\n String urlApplyUserDelete = \"/apply/user_delete\"; //删除用户申请\n String urlApplyUserUpdateStatus = \"/apply/user_update_state\"; //更新用户状态\n\n String urlApplyUserUpdateStatusV1 = \"/apply/update_status_v1\"; //更新用户申请状态(将当前状态发送给后台进行筛选)\n String urlApplyUserHost = \"/apply/host_show\"; //查询主机下申请用户\n String urlApplyUserApplyIsExists = \"/apply/user_applyuserid_exist\"; //判断当前用户是否已经申请过\n String urlApplyUserReapply = \"/family/user_reapply\"; //用户重新申请\n String urlApplyQueryUserApplyOrAdnimReject = \"/apply/query_user_apply_reject\"; //查询用户申请或管理员拒绝记录\n\n String urlQueryUserApplyOrShare = \"/apply/query_user_apply_share\"; //查询用户是否有未处理申请或分享\n\n String urlNotificationPush = \"/notification/notification_push\"; //推送通知\n\n String notification_updateMsg = \"/notification_updateMsg\"; //报警通知\n String notification_updateScence = \"/notification_updateScence\"; //场景更新\n String notification_startHomeTimer = \"/notification_startHomeTimer\"; //开启主页轮询\n String notification_stopHomeTimer = \"/notification_stopHomeTimer\"; //关闭主页轮询\n String notification_startDeviceTimer = \"/notification_startDeviceTimer\"; //开启设备轮询\n String notification_stopDeviceTimer = \"/notification_stopDeviceTimer\"; //关闭设备轮询\n String notification_changeHost = \"/notification_changeHost\"; //切换主机\n String notification_updateCity = \"/notification_updateCity\"; //更新城市信息\n String notification_updateFamilyMembers = \"/notification_updateFamilyMembers\"; //更新家庭成员信息\n String notification_removeHomeNotifications = \"/notification_removeHomeNotifications\"; //移除所有通知\n String notification_familyRefresh = \"/notification_familyRefresh\"; //家庭成员刷新\n\n String urlShareUser = \"/share/user_share\"; //查询家庭的接口\n String urlQueryHealth = \"/health/query_health\"; //查询选定日期区间健康数据接口\n String urlQueryRecentHealth = \"/health/query_recent_health\"; //查询最近的健康数据分享接口\n\n String urlQueryRecentNotification = \"/notification/query_recent_notification\"; //查询最近的通知消息\n\n String urlFeedback = \"/feedback/feedback_push\"; //客户端的意见反馈\n\n String urlHostGuard = \"/host/guard\";//门禁对讲接听推送请求\n\n\n String urlStartScanBatch = \"/device/startScanBatch\";//开始批量添加\n String urlStopScanBatch = \"/device/stopScanBatch\";//停止批量添加\n\n String urlQueryDeviceBatch = \"/device/queryDeviceBatch\";//查询设备\n String urlSaveDeviceBatch = \"/device/saveDeviceBatch\";//保存\n\n String urlCommonDevice = \"/device/commondevice\";//设置、取消常用设备\n\n String urlHostShowOnline = \"/host/showonline\"; // 主机是否在线\n String urlgetMsgSettings = \"/settings/find_message_settings_by_mobile\";//获取消息设置\n String urlsetMsgSettings = \"/settings/save_message_settings\";//设置消息设置\n String urlsetPushMsg = \"/notification/notification_push\";//消息推送\n\n String urlQueryAirFilter = \"/energy/query_airFilter\";// 查询 历史记录\n String urlQueryTableWaterFilter = \"/energy/query_tableWaterFilter\";//\n String urlQueryFloorWaterFilter = \"/energy/query_floorWaterFilter\";//\n\n\n}", "@Test\r\n\tpublic void makeBooking2() {\r\n\t\tnewFlightSearch.setDepartureTime(new Date(2016-1900,7+1,15));\r\n\t\tnewFlightSearch.setDepartureLoc(\"Akureyri\");\r\n\t\tnewFlightSearch.setArrivalLoc(\"Reykjavík\");\r\n\t\tnewFlightSearch.setPriceRange(new int[]{10000,20000});\r\n\t\tnewFlightSearch.setReturnTrip(false);\r\n\t\tnewFlightSearch.setNumSeats(1);\r\n\t\tnewFlightSearch.setSeatClass(\"Economy\");\r\n\t\tList<FlightAbstract> flightResults = SearchEngine.flightSearch(newFlightSearch);\r\n\r\n\t\tFlightBooking testBooking = new FlightBooking(flightResults.get(0),1,\"Gunnar\");\r\n\t\tmockFlightBook bookedFlight = testBooking.bookFlight();\r\n\t\t\r\n\t\tassertEquals(bookedFlight.flight.getCustomer(), \"Gunnar\");\r\n\t}", "@Test\n\tpublic void test02() throws Throwable {\n\t\tint startHour=-15;\n\t\tint startMinute=30;\n\t\tint startDay=11;\n\t\tint startMonth=4;\n\t\tint startYear=2017;\n\t\tString title=\"Birthday Party\";\n\t\tString description=\"This is my birthday party.\";\n\t\t//Construct a new Appointment object with the initial data\n\t\tAppt appt1 = new Appt(startHour,\n\t\t\t\tstartMinute ,\n\t\t\t\tstartDay ,\n\t\t\t\tstartMonth ,\n\t\t\t\tstartYear ,\n\t\t\t\ttitle,\n\t\t\t\tdescription);\n\t\t// create another appointment\n\t\tstartHour=14;\n\t\tstartMinute=30;\n\t\tstartDay=11;\n\t\tstartMonth=4;\n\t\tstartYear=2017;\n\t\ttitle=\"Class\";\n\t\tdescription=\"Rescheduled class.\";\n\t\t//Construct a new Appointment object with the initial data\n\t\tAppt appt2 = new Appt(startHour,\n\t\t\t\tstartMinute ,\n\t\t\t\tstartDay ,\n\t\t\t\tstartMonth ,\n\t\t\t\tstartYear ,\n\t\t\t\ttitle,\n\t\t\t\tdescription);\n\t\t// create another appointment\n\t\tstartHour=13;\n\t\tstartMinute=30;\n\t\tstartDay=11;\n\t\tstartMonth=4;\n\t\tstartYear=2017;\n\t\ttitle=\"Meeting Today\";\n\t\tdescription=\"Meeting with the students.\";\n\t\t//Construct a new Appointment object with the initial data\n\t\tAppt appt3 = new Appt(startHour,\n\t\t\t\tstartMinute ,\n\t\t\t\tstartDay ,\n\t\t\t\tstartMonth ,\n\t\t\t\tstartYear ,\n\t\t\t\ttitle,\n\t\t\t\tdescription);\n\t\t//Create CalDay objects\n\t\tCalDay today = new CalDay (new GregorianCalendar(2017,4,11));\n\t\t//Set the calender appointments\n\t\ttoday.addAppt(appt1);\n\t\ttoday.addAppt(appt2);\n\t\ttoday.addAppt(appt3);\n\t\t//Assertions\n\t\tassertTrue(today.isValid());\n\t\tassertEquals(11, today.getDay());\n\t\tassertEquals(4, today.getMonth());\n\t\tassertEquals(2017, today.getYear());\n\t\tassertEquals(2, today.getSizeAppts());\n\t\tassertEquals(\"\\t --- 4/11/2017 --- \\n\" +\n\t\t\t\t\" --- -------- Appointments ------------ --- \\n\" +\n\t\t\t\t\"\\t4/11/2017 at 1:30pm ,Meeting Today, Meeting with the students.\\n\" +\n\t\t\t\t\" \\t4/11/2017 at 2:30pm ,Class, Rescheduled class.\\n\" +\n\t\t\t\t\" \\n\", today.toString());\n\t}", "public interface AddTrainingRoomsContract {\n\n interface view{\n\n void AddTrainingRooms();\n void AddRooms();\n void AddPhoto();\n void showProgress(boolean show);\n boolean isNameValid(String Name);\n boolean isCityValid(String City);\n boolean isAreaValid(String Area);\n boolean isAddressValid(String Address);\n boolean isPhoneValid(String phone);\n boolean isNumberOfRoomsValid(String NumberOfRooms);\n boolean isStartTimeValid(String StartTime);\n boolean isEndTimeValid(String EndTime);\n\n void showMessage(String message);\n }\n\n interface Presenter{\n\n\n void Creat_TrainingRooms(String Name,String City, String Area,String Address,String phone,String Image ,String Starttime,\n String Endtime,String NumberRooms );\n }\n}", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "@Test\n\t public void test01() throws Throwable {\n\t\tint startHour=21;\n\t\tint startMinute=30;\n\t\tint startDay=1;\n\t\tint startMonth=2;\n\t\tint startYear=2018;\n\t\tString title=\"Test 2a\";\n\t\tString description=\"This is test 1a.\";\n\t\t //Construct a new Appointment object with the initial data\t \n\t\tAppt appt1 = new Appt(startHour,\n\t\t startMinute ,\n\t\t startDay ,\n\t\t startMonth ,\n\t\t startYear ,\n\t\t title,\n\t\t description);\n\t\t\t\t \n\t\tstartHour=8;\n\t\tstartMinute=15;\n\t\tstartDay=1;\n\t\tstartMonth=2;\n\t\tstartYear=2018;\n\t\ttitle=\"Test 2b\";\n\t\tdescription=\"This is test 1b.\";\n\t\t //Construct a new Appointment object with the initial data\t \n\t\tAppt appt2 = new Appt(startHour,\n\t\t startMinute ,\n\t\t startDay ,\n\t\t startMonth ,\n\t\t startYear ,\n\t\t title,\n\t\t description);\n\t\t\t\t \n\t// assertions\n\t\tassertTrue(appt1.getValid());\n\t\tassertTrue(appt2.getValid());\n\t\t \n\t\tLinkedList<Appt> appts = new LinkedList<Appt>();\n\t\tappts.add(appt1);\n\t\tappts.add(appt2);\n\t\t \n\t\tCalendar rightnow = Calendar.getInstance();\n \tint thisMonth = rightnow.get(Calendar.MONTH)+1;\n\t\tint thisYear = rightnow.get(Calendar.YEAR);\n\t\tint thisDay = rightnow.get(Calendar.DAY_OF_MONTH);\n\t\tGregorianCalendar today = new GregorianCalendar(thisYear,thisMonth,thisDay);\n\t\tGregorianCalendar tomorrow = (GregorianCalendar)today.clone();\n\t\ttomorrow.add(Calendar.DAY_OF_MONTH,1);\n\t\t//Construct new CalDay object\n\t\tCalDay day = new CalDay(today);\n\t\tday.addAppt(appt1);\n\t\tday.addAppt(appt2);\n\t\tTimeTable timeTable = new TimeTable();\n\t//assertions\n\t\tassertTrue(day.isValid());\n\t\tassertEquals(2, day.getSizeAppts()); //check for two appts added\n\t\tassertEquals(1, timeTable.getApptRange(appts, today, tomorrow).size()); //should return the CalDay between the two dates\n\t }", "public boolean checkRoomAvailabilty(String date,String startTime,String endTime ,String confID);", "public static void main(String[] args){\r\n //Student Name:Chuanxi ZHENG\r\n //Student Number:260760794\r\n //Your code goes here. \r\n System.out.println(\"Please enter the name of your hotel:\");\r\n Scanner in = new Scanner(System.in);\r\n String name = in.nextLine();\r\n Room[] roomArray = new Room[getRandomNumberOfRooms()];\r\n for(int i = 0; i<roomArray.length;i++){\r\n roomArray[i] = new Room(getRandomType());\r\n }\r\n Hotel h = new Hotel(name,roomArray);\r\n System.out.println(\"Welcome! Please choose one of the following options\");\r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n Scanner input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n int choice = input.nextInt();\r\n \r\n while(choice!=5){\r\n //make a reservation\r\n if(choice == 1){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you like to reserve?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.createReservation(username,usertype);\r\n }\r\n //cancel a reservation\r\n if(choice == 2){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n System.out.println(\"What type of room would you want to cancel?\");\r\n input = new Scanner(System.in);\r\n String usertype = input.nextLine();\r\n h.cancelReservation(username,usertype);\r\n }\r\n //see an invoice\r\n if(choice == 3){\r\n System.out.println(\"Please enter your name:\");\r\n input = new Scanner(System.in);\r\n String username = input.nextLine();\r\n h.printInvoice(username);\r\n }\r\n //see hotel information\r\n if(choice == 4){\r\n System.out.println(h.toString());\r\n }\r\n \r\n System.out.println(\"1. Make a reservation\");\r\n System.out.println(\"2. Cancel a reservation\");\r\n System.out.println(\"3. See an invoice\");\r\n System.out.println(\"4. See the hotel info\");\r\n System.out.println(\"5. Exit the booking system\");\r\n \r\n input = new Scanner(System.in);\r\n while(!input.hasNextInt()){\r\n input = new Scanner(System.in);\r\n }\r\n choice = input.nextInt();\r\n }\r\n \r\n //Exit the booking system\r\n if(choice == 5){\r\n System.out.println(\"It was a pleasure doing business with you!\");\r\n }\r\n }", "@Test\n public void GetMEthod() {\n\n RestAssured.baseURI = \"http://www.omdbapi.com/\";\n\n RequestSpecification request = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response = request\n\n .when()\n\n .get(\"/?apikey=5148dbc1&s=Harry Potter\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n int responseCode = response.getStatusCode();\n ResponseBody responseBody = response.getBody();\n ArrayList<String> list=new ArrayList<String>();\n\n //System.out.println(response.asString());\n Gson gson=new Gson();\n String json=response.asString();\n Search obj=gson.fromJson(json,Search.class);\n String imdb=\"\";\n for (Element e:obj.Search\n ) {\n String title=e.getTitle();\n if (title.equals(\"Harry Potter and the Sorcerer's Stone\")){\n imdb=e.getimdbID();\n }\n }\n System.out.println(\"imdbID:\"+imdb);\n //http://www.omdbapi.com/?apikey=5148dbc1&i=tt0241527&type=movie\n RequestSpecification request1 = RestAssured\n\n .given()\n .config(RestAssured.config().sslConfig(new SSLConfig().allowAllHostnames()));\n\n Response response1 = request1\n\n .when()\n\n .get(\"/?apikey=5148dbc1&i=\"+imdb+\"&type=movie\")\n .then()\n .statusCode(200)\n\n\n .extract().response();\n\n String json1=response1.asString();\n Movie obj1=gson.fromJson(json1,Movie.class);\n\n System.out.println(\"Title:\" +obj1.getTitle() + \" Year: \" + obj1.getYear()+ \" Released: \"+obj1.getReleased());\n\n System.out.println(\"---------------------\");\n\n\n\n\n\n }", "public static void main(String[] args) {\n\t\tHotel h = new Hotel();\r\n\t\tRoom r = new Room();\r\n\t\tBed b = new Bed();\r\n\t\tint totalbeds = 0;\r\n\t\tList<Room> rooms = new ArrayList<Room>();\r\n\t\tList<Bed> beds = new ArrayList<Bed>();\r\n\t\tList<Integer> bedsperroom = new ArrayList<Integer>();\r\n\t\tHotelReport report = new HotelReport();\r\n\t\t//these are the values that can change, here they are hard coded in\r\n\t\tString hotelname=\"test\";\r\n\t\tint noofrooms=5;\r\n\t\t\r\n\t\th.setName(hotelname);\r\n\t\t//iterates through the number of rooms\r\n\t\tfor (int i = 1; i <= noofrooms; i++) {\r\n\t\t\t// here if the room is vacent or not has to be set for all rooms simultaneously,\r\n\t\t\t//in reality the user would be able to input different values for each room\r\n\t\t\tint roomfree=0;\r\n\t\t\th.gotVacencies(roomfree);\r\n\t\t\t// a new room object is created and added to the array list of rooms\r\n\t\t\tRoom e = new Room();\r\n\t\t\trooms.add(e);\r\n\t\t\t//again the number of beds in each room has to be the same for each room, \r\n\t\t\t//but in the proper system the user can input different numbers\r\n\t\t\tint bedsinroom=5;\r\n\t\t\t//checks to make sure the beds in room is a vaid number\r\n\t\t\tr.checkBeds(bedsinroom);\r\n\t\t\t//adds the beds in one room to an array list\r\n\t\t\tbedsperroom.add(bedsinroom);\r\n\t\t\t//iterates through the number of beds\r\n\t\t\tfor (int i2 = 1; i2 <= bedsinroom; i2++) {\r\n\t\t\t\t//a new bed object is created and added to the list of beds\r\n\t\t\t\tBed c = new Bed();\r\n\t\t\t\tbeds.add(c);\r\n\t\t\t\t//a bed type is set. as before, in the real system a different type \r\n\t\t\t\t//can be set for each bed\r\n\t\t\t\tint x = 1;\r\n\t\t\t\tc.setBedtype(x);\r\n\t\t\t\t//a running total of the max occupency is taken\r\n\t\t\t\ttotalbeds = totalbeds + x;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//the two arrays are set\r\n\t\th.setRooms(rooms);\r\n\t\tr.setBeds(beds);\r\n\t\t//all values are fed into the report class, which outputs a formatted report\r\n\t\treport.Report(h, bedsperroom, r, totalbeds);\t\r\n\t\t\t\t\r\n\t\t\r\n\r\n}", "public void supervisor_collect()\n {\n try{\n\n\n /* int a = Integer.parseInt(cash1);\n int b = Integer.parseInt(digital1);\n\n int tUnpaid = Integer.parseInt(totalUnpaid);\n\n\n if ((a + b) > tUnpaid || (a+b) == 0) {\n Toast.makeText(getContext(), \"Enter Correct Amount\", Toast.LENGTH_SHORT).show();\n }else {*/\n\n OkHttpClient okHttpClient = new OkHttpClient();\n RestClient.client = new Retrofit.Builder().baseUrl(RestClient.baseUrl).\n client(okHttpClient).\n addConverterFactory(GsonConverterFactory\n .create()).build();\n API api = RestClient.client.create(API.class);\n\n String agent_pin = go_otp;\n\n\n Call<Supervisor_Status_Response> call = api.hap_supervisor_collect(s_id, agent_id, cash.getText().toString(), digital.getText().toString(), paidDate, set_id, total_rides, totalPaid, totalUnpaid, cash2, digital2, amount);\n call.enqueue(new Callback<Supervisor_Status_Response>() {\n @Override\n public void onResponse(Call<Supervisor_Status_Response> call,\n Response<Supervisor_Status_Response> response) {\n getoutResponse = response.body();\n Log.d(\"TAG\", \"onResponse:amith \" + getoutResponse);\n try {\n if (getoutResponse.getStatus().equalsIgnoreCase(\"true\")) {\n\n\n Toast.makeText(getContext(), \"Success\", Toast.LENGTH_SHORT).show();\n getDialog().dismiss();\n\n } else {\n\n Toast.makeText(getContext(), \"please enter valid details\", Toast.LENGTH_SHORT).show();\n getDialog().dismiss();\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n\n @Override\n public void onFailure(Call<Supervisor_Status_Response> call, Throwable t) {\n t.getMessage();\n Toast.makeText(getActivity(),\n \"Try Again\",\n Toast.LENGTH_LONG).show();\n Log.d(\"TAG\", \"onFailure:t\" + t);\n }\n\n });\n// }\n\n }\n catch (Exception e){\n System.out.println(\"msg:\"+e);\n }\n\n }", "private static void demo2() throws RemoteException {\n\t\tCheckOutRoomService service = new CheckOutRoomServiceImpl();\r\n\t\tString clientID = \"0000001\";\r\n\t\tString hotelID = \"00001\";\r\n\t\t//System.out.println(service.checkOutRoom(clientID, hotelID));\r\n\t\tList<String> numbers = new ArrayList<String>();\r\n\t\t\r\n\t\tList<RoomVO> volist = service.getAllRooms(clientID, hotelID);\r\n\t\tfor(RoomVO vo:volist){\r\n\t\t\tshow(vo);\r\n\t\t\tnumbers.add(vo.getRoomNumber());\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(service.checkOutRoom(clientID, hotelID, \"102\"));\r\n\t}", "private void getHotelRoomRateCall(long cityId) {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-DD\", Locale.ENGLISH);\n engCheckInDate = dateFormat.format(checkInDate);\n engCheckOutDate = dateFormat.format(checkOutDate);\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n HotelRoomRateRequest hotelRoomRateRequest = new HotelRoomRateRequest();\n hotelRoomRateRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelRoomRateRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelRoomRateRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelRoomRateRequest.setCityId(cityId);\n hotelRoomRateRequest.setHotelId(Long.parseLong(destination.getKey()));\n hotelRoomRateRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n\n if (kidsAgeArrayList == null)\n kidsAgeArrayList = new ArrayList<>();\n kidsAgeArrayList.clear();\n\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelRoomRateRequest.setOccupancy(occupancyDtoArrayList);\n }\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setLanguageCode(UserDTO.getUserDTO().getLanguage());\n hotelListingRequest.setCityId(cityId);\n hotelListingRequest.setCurrencyCode(UserDTO.getUserDTO().getCurrency());\n hotelListingRequest.setOccupancy(hotelRoomRateRequest.getOccupancy());\n\n String request = new Gson().toJson(hotelRoomRateRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n hotelSearchPresenter.getHotelRoomRate(Constant.API_URL + Constant.HOTELSRATES, request, getActivity());\n\n } else\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }", "public void ShiftForRegApp(String employeeId,String date) {\n\n Map<String,String> shiftdata=new HashMap<String,String>();\n shiftdata.put(\"employeeId\",employeeId);\n shiftdata.put(\"shiftDate\",date);\n\n shift=new ArrayList<>();\n shiftId=new ArrayList<String>();\n\n retrofit2.Call<ShiftType> call = apiService.getShiftType(shiftdata);\n call.enqueue(new Callback<ShiftType>() {\n @Override\n public void onResponse(retrofit2.Call<ShiftType> call, Response<ShiftType> response) {\n\n shift.clear();\n shiftId.clear();\n\n if (response.isSuccessful()) {\n // pd.dismiss();\n shift.add(\"Select\");\n\n if (response.body().getStatus().equals(\"1\")) {\n for(int i=0;i<response.body().getData().size();i++) {\n shiftId.add(response.body().getData().get(i).getShiftID());\n shift.add(response.body().getData().get(i).getShiftName());\n }\n\n // Creating adapter for spinner\n ArrayAdapter arrayAdapter = new ArrayAdapter(Attend_Regularization.this, android.R.layout.simple_spinner_item,shift);\n\n // Drop down layout style - list view with radio button\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n shift_type.setAdapter(arrayAdapter);\n\n //EmpowerApplication.alertdialog(response.body().getMessage(), WorkFromHomeActivity.this);\n\n }else {\n // Creating adapter for spinner\n ArrayAdapter arrayAdapter = new ArrayAdapter(Attend_Regularization.this, android.R.layout.simple_spinner_item,shift);\n\n // Drop down layout style - list view with radio button\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n shift_type.setAdapter(arrayAdapter);\n EmpowerApplication.alertdialog(response.body().getMessage(), Attend_Regularization.this);\n }\n }else {\n switch (response.code()) {\n case 404:\n //Toast.makeText(ErrorHandlingActivity.this, \"not found\", Toast.LENGTH_SHORT).show();\n EmpowerApplication.alertdialog(\"File or directory not found\", Attend_Regularization.this);\n break;\n case 500:\n EmpowerApplication.alertdialog(\"server broken\", Attend_Regularization.this);\n\n //Toast.makeText(ErrorHandlingActivity.this, \"server broken\", Toast.LENGTH_SHORT).show();\n break;\n default:\n EmpowerApplication.alertdialog(\"unknown error\", Attend_Regularization.this);\n\n //Toast.makeText(ErrorHandlingActivity.this, \"unknown error\", Toast.LENGTH_SHORT).show();\n break;\n }\n\n }\n\n\n }\n\n @Override\n public void onFailure(retrofit2.Call<ShiftType> call, Throwable t) {\n // Log error here since request failed\n Log.e(\"TAG\", t.toString());\n //pd.dismiss();\n\n EmpowerApplication.alertdialog(t.getMessage(),Attend_Regularization.this);\n\n }\n });\n }", "public interface apiService {\n\n\n\n String base_url= \"http://192.168.43.154:8081/\";\n\n @GET(\"getprofile\")\n Call<Employee> getProfilehero(@Query(\"racf\") String id,@Query(\"password\") String pass);\n\n @GET(\"getpeopleonleave\")\n Call<Datesss> getdetailsondate(@Query(\"date\") String d);\n\n @GET(\"authentication\")\n Call<Auth> getAuth(@Query(\"racf\") String d,@Query(\"password\") String dd);\n\n @GET(\"getleavedates\")\n Call<leaves> getleavedates(@Query(\"racf\") String d);\n\n @GET(\"getwfhdates\")\n Call<WorkFromHome> getwfhdates(@Query(\"racf\") String dd);\n\n @GET(\"updateno\")\n Call<Auth> updating(@Query(\"racf\") String d,@Query(\"contacts\") String dd,@Query(\"contactnames\") String ddd);\n\n @GET(\"updateworkfromhome\")\n Call<Auth> updatingwfh(@Query(\"racf\") String d,@Query(\"dates\") String dd,@Query(\"reasons\") String ddd);\n\n @GET(\"updateonleave\")\n Call<Auth> updatingleave(@Query(\"racf\") String d,@Query(\"date\") String dd,@Query(\"reason\") String ddd);\n\n\n}", "@CrossOrigin(origins = \"http//localhost:4200\")\n\t@RequestMapping(value = \"/api/availableRooms\", method = RequestMethod.POST)\n\tpublic List<HospitalRoom> availableRooms(@RequestBody SurgeryDTO surgeryDTO) throws ParseException {\n\t\tList<HospitalRoom> ret = new ArrayList<>();\n\t\tSurgery surgery = null;\n\t\ttry {\n\t\t\tsurgery = ss.findById(surgeryDTO.getId());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\n\t\tClinic clinic = surgery.getClinic();\n\t\t// Uzimamo milisekunde kad je zakazano\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm\");\n\t\tDate date = dateFormat.parse(surgeryDTO.getDate());\n\t\t// Prolazimo kroz sve sale i gledamo koja je slobodna u tom trenutku\n\t\tList<HospitalRoom> allRooms = hrs.findByClinicId(surgery.getClinic().getId());\n\t\tfor (HospitalRoom hospitalRoom : allRooms) {\n\t\t\tboolean nadjenaOperacijaKojaJeUTomTerminu = false;\n\t\t\t// Proveravamo da li je zakazana neka operacija tada\n\t\t\tList<Surgery> roomSurgeries = ss.findByHospitalId(hospitalRoom.getId());\n\t\t\tfor (Surgery s : roomSurgeries) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// poredim datum moje operacije i datum operacije u ovom for-u\n\t\t\t\t\tif (surgery.getDate().equals(s.getDate())) {\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tList<Appointment> appsRoom = this.as.findByHospitalRoomId(hospitalRoom.getId());\n\t\t\tfor (Appointment appointment : appsRoom) {\n\t\t\t\tif (nadjenaOperacijaKojaJeUTomTerminu == false) {\n\t\t\t\t\t// Provaravamo datum moje operacije i datum operacije, ako je 0 onda su jednaki\n\t\t\t\t\tif (surgery.getDate().equals(appointment.getDate())) {\n\t\t\t\t\t\t// Da li se poklapaju satnice\n\t\t\t\t\t\tnadjenaOperacijaKojaJeUTomTerminu = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!nadjenaOperacijaKojaJeUTomTerminu)\n\t\t\t\tret.add(hospitalRoom);\n\t\t\tSet<Appointment> roomAppointments = hospitalRoom.getAppointments();\n\t\t}\n\t\treturn ret;\n\t}", "public interface ApplicationConstants {\n\n // Gimnazjum Chocianow\n static final String SCHOOL_SERVER_1 = \"http://gimchocianow.pl\";\n\n // ZS Chocianow\n static final String SCHOOL_SERVER_2 = \"http://zschocianow.pl\";\n\n\n // Php Application URL to store Reg ID created\n static final String APP_SERVER_URL_INSERT_USER = \"/replacement_gcm/insertuser.php\";\n static final String APP_SERVER_URL_REMOVE_USER = \"/replacement_gcm/removeuser.php\";\n\n // Php Application URL to store Data Set of User\n static final String APP_SERVER_URL_INSERT_USER_DATA_IDS = \"/replacement_gcm/insertuserset.php\";\n static final String APP_SERVER_URL_INSERT_USER_MODULES = \"/replacement_gcm/insertusermodules.php\";\n\n // Php Application URL schedule\n static final String APP_SERVER_URL_SCHEDULE = \"/plan/\";\n\n // Php Application URL repl data\n static final String APP_SERVER_URL_REPL_DATA = \"/json/replacements-data.php\";\n\n // Php Application URL repl\n static final String APP_SERVER_URL_REPL = \"/json/replacements.php?date=\";\n\n // Php Application URL lesson plan\n static final String APP_SERVER_URL_LESSON_PLAN = \"/json/lessonplan.php\";\n\n\n\n\n // Google Project Number\n static final String GOOGLE_PROJ_ID = \"670012122702\";\n static final String MSG_KEY = \"m\";\n\n //Schedule list constants\n static final int ROUTE_HOME = -786342765;\n static final int ROUTE_LEVEL_0 = -218312;\n\n //Intent constants\n static final String INTENT_INSTITUTION_ID = \"INTENT_INSTITUTION_ID\";\n static final String INTENT_PAGE_NUMBER = \"INTENT_PAGE_NUMBER\";\n static final String INTENT_NEWS_ID = \"INTENT_NEWS_ID\";\n\n static final String INTENT_LESSONPLAN_URL = \"INTENT_LESSONPLAN_URL\";\n static final String INTENT_LESSONPLAN_NAME = \"INTENT_LESSONPLAN_NAME\";\n\n}", "public static void main(String[] args) throws Exception {\n initForProd();\r\n\r\n // bookingValidation\r\n /**\r\n * bookingValidation refers to verifying the number or price information of flight classes during the booking process to know whether the reservation can be made normally.\r\n */\r\n // 1、get url by Cerberus\r\n String testUrl1 = BASE_URL + \"/bookingValidation\";\r\n URL url1 = new URL(testUrl1);\r\n String completeURI1 = app.updateRequestUri(url1.getPath());\r\n URL completeURL1 = new URL(url1.getProtocol(), url1.getHost(), completeURI1);\r\n System.out.println(\"completeURL1:\" + completeURL1);\r\n // 2、generate request\r\n BookingValidationRequestType bookingValidationRequest = MessageHelper.buildBookingValidationRequest(true);\r\n // 3、get response\r\n BookingValidationResponseType bookingValidationResponse = getResponse(completeURL1.toString(), bookingValidationRequest,\r\n BookingValidationResponseType.class);\r\n System.out.println(bookingValidationResponse);\r\n // process response\r\n\r\n // simpleReservation\r\n /**\r\n * simpleReservation Refers to the booking process in the booking process to know whether the order can be placed correctly.\r\n */\r\n // 1、get url by Cerberus\r\n String testUrl2 = BASE_URL + \"/simpleReservation\";\r\n URL url2 = new URL(testUrl2);\r\n String completeURI2 = app.updateRequestUri(url2.getPath());\r\n URL completeURL2 = new URL(url2.getProtocol(), url2.getHost(), completeURI2);\r\n System.out.println(\"completeURL2:\" + completeURL2);\r\n // 2、generate request\r\n SimpleReservationRequestType reservationRequestType = MessageHelper.buildSimpleReservationRequest(true);\r\n // 3、get response\r\n SimpleReservationResponseType simpleReservationResponse =\r\n getResponse(testUrl2, reservationRequestType, SimpleReservationResponseType.class);\r\n System.out.println(simpleReservationResponse);\r\n // process response\r\n\r\n }", "@Override\n public void storeLiveEvents() {\n try {\n //Get today's date and convert to string\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n Date todayDate = new Date();\n String today = dateFormat.format(todayDate).replaceAll(\"/\", \"-\");\n\n //Retrieve live games json d1ata from APIFootball and convert to JSON array\n String data = httpTools.httpGetURL(\"https://apifootball.com/api/?action=get_events&from=\" + today + \"&to=\" + today + \"&match_live=1&APIkey=aec4fdc3c841ad7b08ac13242f6a6dfc229446b4408bf4a6cb2b7ebe2baef4cf\");\n JSONArray array = new JSONArray(data);\n\n //For every live match\n List<MatchStore> matchList = new ArrayList<>();\n for (int i = 0; i < array.length(); i++) {\n\n //Get the date from live game\n Date date;\n date = getDate(array, i);\n\n\n //Parse all goalscorers and store in a list\n List<Goalscorer> goalscorerList = new ArrayList<>();\n JSONArray goalscorerArray = array.getJSONObject(i).getJSONArray(\"goalscorer\");\n for (int y = 0; y < goalscorerArray.length(); y++) {\n goalscorerList.add(new Goalscorer(goalscorerArray.getJSONObject(y).getString(\"score\"),\n goalscorerArray.getJSONObject(y).getString(\"time\").substring(0, goalscorerArray.getJSONObject(y).getString(\"time\").length() - 1),\n goalscorerArray.getJSONObject(y).getString(\"away_scorer\"),\n goalscorerArray.getJSONObject(y).getString(\"home_scorer\")\n ));\n }\n\n //Home and Away lineup list declarations\n List<Player> startingHomeLineupList = new ArrayList<>();\n List<Player> substitutesHomeList = new ArrayList<>();\n List<Substitutions> substitutionsHomeList = new ArrayList<>();\n\n List<Player> startingAwayLineupList = new ArrayList<>();\n List<Player> substitutesAwayList = new ArrayList<>();\n List<Substitutions> substitutionsAwayList = new ArrayList<>();\n\n //Parse and store home team lineup\n JSONArray startingHomeLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"starting_lineups\");\n for (int y = 0; y < startingHomeLineupArray.length(); y++) {\n startingHomeLineupList.add(new Player(startingHomeLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n startingHomeLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n startingHomeLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store away team lineup\n JSONArray startingAwayLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"away\").getJSONArray(\"starting_lineups\");\n for (int y = 0; y < startingAwayLineupArray.length(); y++) {\n startingAwayLineupList.add(new Player(startingAwayLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n startingAwayLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n startingAwayLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store home team subs\n JSONArray subHomeLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"substitutes\");\n for (int y = 0; y < subHomeLineupArray.length(); y++) {\n substitutesHomeList.add(new Player(subHomeLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n subHomeLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n subHomeLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store away team subs\n JSONArray subAwayLineupArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"away\").getJSONArray(\"substitutes\");\n for (int y = 0; y < subAwayLineupArray.length(); y++) {\n substitutesAwayList.add(new Player(subAwayLineupArray.getJSONObject(y).getString(\"lineup_player\"),\n subAwayLineupArray.getJSONObject(y).getString(\"lineup_number\"),\n subAwayLineupArray.getJSONObject(y).getString(\"lineup_position\")));\n }\n\n //Parse and store home team completed subs\n JSONArray subCompletedHomeArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"substitutions\");\n for (int y = 0; y < subCompletedHomeArray.length(); y++) {\n substitutionsHomeList.add(new Substitutions(subCompletedHomeArray.getJSONObject(y).getString(\"lineup_player\"),\n subCompletedHomeArray.getJSONObject(y).getString(\"lineup_time\")));\n }\n\n //Parse and store away team completed subs\n JSONArray subCompletedAwayArray = array.getJSONObject(i).getJSONObject(\"lineup\").getJSONObject(\"home\").getJSONArray(\"substitutions\");\n for (int y = 0; y < subCompletedAwayArray.length(); y++) {\n substitutionsAwayList.add(new Substitutions(subCompletedAwayArray.getJSONObject(y).getString(\"lineup_player\"),\n subCompletedAwayArray.getJSONObject(y).getString(\"lineup_time\")));\n }\n\n //Complete home and away team lineups\n Lineup homeLineup = new Lineup(startingHomeLineupList, substitutesHomeList, substitutionsHomeList);\n Lineup awayLineup = new Lineup(startingAwayLineupList, substitutesAwayList, substitutionsAwayList);\n\n //Add live match data to match list\n matchList.add(new MatchStore(Integer.parseInt(array.getJSONObject(i).getString(\"match_id\")),\n Integer.parseInt(array.getJSONObject(i).getString(\"country_id\")),\n Integer.parseInt(array.getJSONObject(i).getString(\"league_id\")),\n date,\n array.getJSONObject(i).getString(\"match_status\"),\n array.getJSONObject(i).getString(\"match_hometeam_name\"),\n array.getJSONObject(i).getString(\"match_awayteam_name\"),\n array.getJSONObject(i).getString(\"match_hometeam_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_score\"),\n array.getJSONObject(i).getString(\"match_hometeam_halftime_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_halftime_score\"),\n array.getJSONObject(i).getString(\"match_hometeam_extra_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_extra_score\"),\n array.getJSONObject(i).getString(\"match_hometeam_penalty_score\"),\n array.getJSONObject(i).getString(\"match_awayteam_penalty_score\"),\n array.getJSONObject(i).getString(\"match_live\")\n ));\n }\n //Store live match updated data\n dataService.storeKeyEventsInUpdate(matchList);\n for (MatchStore m:matchList){\n gameDAO.storeLiveEvents(m);\n }\n\n } catch (JSONException j) {\n j.printStackTrace();\n }\n catch (Exception e){\n e.printStackTrace();\n }\n }", "public void postGetRoomWIP() {\n if (!mIsInForegroundMode) {\n Log.d(\"SCXTT\", \"were OUT so abort postGetRoomWIP\");\n return;\n }\n\n Log.d(\"SCXTT\", \"postGetRoomWIP set looking = 1\");\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n AsyncHttpClient client = new AsyncHttpClient();\n RequestParams params = new RequestParams();\n params.put(\"cmd\", \"getroom\");\n params.put(\"user_id\", deviceSingleton.getUserId());\n params.put(\"location\", deviceSingleton.getMyLocStr());\n params.put(\"text\", \"notused\");\n\n client.post(Constants.API_URL, params, new AsyncHttpResponseHandler() {\n @Override\n public void onStart() {\n // called before request is started\n }\n\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n //setting the new location AND GETTING THE JSON RESPONSE!\n String decoded = null; // example for one encoding type\n try {\n decoded = new String(response, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n Log.v(TAG, \"API call onSuccess = \" + statusCode + \", Headers: \" + headers[0] + \", response.length: \" + response.length +\n \", decoded:\" + decoded);\n\n try {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n JSONArray list = new JSONArray(decoded);\n Log.d(TAG, \"API Call postGetRoomWIP getroom returned list.length: \" + list.length());\n LatLngBounds.Builder builder = new LatLngBounds.Builder();\n roomArray.clear();\n\n for (int i = 0; i < list.length(); i++) {\n JSONObject obj = list.getJSONObject(i);\n String nickName = obj.getString(\"nickname\");\n String mLocation = obj.getString(\"location\");\n String gmtDateString = obj.getString(\"loc_time\");\n // add the guys above to Room roomObj\n Room roomObj = new Room(deviceSingleton.getSecretCode(), nickName, mLocation, gmtDateString);\n roomArray.add(roomObj);\n }\n Log.v(TAG, \"postGetRoomWIP remove this next call to updatePointsOnMapWithAPIData and make a notification trigger it like iOS\");\n try {\n updatePointsOnMapWithAPIData();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] errorResponse, Throwable e) {\n Log.v(TAG, \"postGetRoomWIP API call onFailure = \" + errorResponse);\n // called when response HTTP status is \"4XX\" (eg. 401, 403, 404)\n }\n\n @Override\n public void onRetry(int retryNo) {\n // called when request is retried\n }\n });\n Log.v(TAG, \"API call response out of catch = \" + response);\n\n }", "public void getDataFromApi()\n {\n\n if(methodcode.equals(\"popular\"))\n {\n ApiInterface apiServicePopular =\n ApiClient.getClient().create(ApiInterface.class);\n // second response needed\n Call<MoviesResponse> callPopular = apiServicePopular.getPopularMovies(API_KEY,\"\");\n callPopular.enqueue(new Callback<MoviesResponse>() {\n @Override\n public void onResponse(Call<MoviesResponse>call, Response<MoviesResponse> response) {\n movies = response.body().getResults();\n Toast.makeText(getApplicationContext(),\"Popular Movies Received\",Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFailure(Call<MoviesResponse>call, Throwable t) {\n // Log error here since request failed\n Toast.makeText(getApplicationContext(),\"Error in Receiving\",Toast.LENGTH_LONG).show();\n\n }\n });\n\n }\n else if(methodcode.equals(\"nowplaying\"))\n {\n ApiInterface apiServiceNowPlay =\n ApiClient.getClient().create(ApiInterface.class);\n // second response needed\n Call<MoviesResponse> callNowPlay = apiServiceNowPlay.getNowPlayingMovies(API_KEY,\"\");\n callNowPlay.enqueue(new Callback<MoviesResponse>() {\n @Override\n public void onResponse(Call<MoviesResponse>call, Response<MoviesResponse> response) {\n movies = response.body().getResults();\n Toast.makeText(getApplicationContext(),\"Now Playing Movies Received\",Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFailure(Call<MoviesResponse>call, Throwable t) {\n // Log error here since request failed\n Toast.makeText(getApplicationContext(),\"Error in Receiving\",Toast.LENGTH_LONG).show();\n\n }\n });\n\n }\n else if(methodcode.equals(\"toprated\"))\n {\n ApiInterface apiServiceTopRated =\n ApiClient.getClient().create(ApiInterface.class);\n // second response needed\n Call<MoviesResponse> callTopRated = apiServiceTopRated.getTopRatedMovies(API_KEY,\"\");\n callTopRated.enqueue(new Callback<MoviesResponse>() {\n @Override\n public void onResponse(Call<MoviesResponse>call, Response<MoviesResponse> response) {\n movies = response.body().getResults();\n Toast.makeText(getApplicationContext(),\"TopRated Movies Received\",Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFailure(Call<MoviesResponse>call, Throwable t) {\n // Log error here since request failed\n Toast.makeText(getApplicationContext(),\"Error in Receiving\",Toast.LENGTH_LONG).show();\n\n }\n });\n\n }\n else if(methodcode.equals(\"upcoming\"))\n {\n ApiInterface apiServiceUpcoming =\n ApiClient.getClient().create(ApiInterface.class);\n // second response needed\n Call<MoviesResponse> callUpcoming = apiServiceUpcoming.getPopularMovies(API_KEY,\"\");\n callUpcoming.enqueue(new Callback<MoviesResponse>() {\n @Override\n public void onResponse(Call<MoviesResponse>call, Response<MoviesResponse> response) {\n movies = response.body().getResults();\n Toast.makeText(getApplicationContext(),\"Upcoming Movies Received\",Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFailure(Call<MoviesResponse>call, Throwable t) {\n // Log error here since request failed\n Toast.makeText(getApplicationContext(),\"Error in Receiving\",Toast.LENGTH_LONG).show();\n\n }\n });\n }\n else if(methodcode.equals(\"discover\"))\n {\n ApiInterface apiServiceDiscover =\n ApiClient.getClient().create(ApiInterface.class);\n // second response needed\n Call<MoviesResponse> callDiscover = apiServiceDiscover.getDiscoveredMovies(API_KEY,sortbydata,genredata,yeardata,\"\");\n callDiscover.enqueue(new Callback<MoviesResponse>() {\n @Override\n public void onResponse(Call<MoviesResponse>call, Response<MoviesResponse> response) {\n movies = response.body().getResults();\n Toast.makeText(getApplicationContext(),\"Searched Movies Received\",Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFailure(Call<MoviesResponse>call, Throwable t) {\n // Log error here since request failed\n Toast.makeText(getApplicationContext(),\"Error in Receiving\",Toast.LENGTH_LONG).show();\n\n }\n });\n\n }\n\n }", "@Test\n\tpublic void testPost()\n\t{\n\t\t\n\t\t\n\t\tList<Map<String, Object>> totalBookings=new ArrayList<Map<String,Object>>();\n\t\t\n\t\tMap<String, Object> payload=new HashMap<String, Object>();\n\t\tpayload.put(\"firstname\", \"Wakil\");\n\t\tpayload.put(\"lastname\", \"Khan\");\n\t\tpayload.put(\"totalprice\", 123);\n\t\tpayload.put(\"depositpaid\",false);\n\t\tpayload.put(\"additionalneeds\", \"dinner\");\n\t\t\n\t\tMap<String, Object> dates=new LinkedHashMap<>();\n\t\tdates.put(\"checkin\", \"2021-05-02\");\n\t\tdates.put(\"checkout\", \"2021-05-05\");\n\t\t\n\t\tpayload.put(\"bookingdates\", dates);\n\t\t\n\t\tMap<String, Object> payload2=new HashMap<String, Object>();\n\t\tpayload2.put(\"firstname\", \"Hasnath\");\n\t\tpayload2.put(\"lastname\", \"Khan\");\n\t\tpayload2.put(\"totalprice\", 123);\n\t\tpayload2.put(\"depositpaid\",false);\n\t\tpayload2.put(\"additionalneeds\", \"dinner\");\n\t\t\n\t\tMap<String, Object> dates2=new LinkedHashMap<>();\n\t\tdates2.put(\"checkin\", \"2021-05-02\");\n\t\tdates2.put(\"checkout\", \"2021-05-05\");\n\t\t\n\t\tpayload2.put(\"bookingdates\", dates);\n\t\t\n\t\t\n\t\tMap<String, Object> payload3=new HashMap<String, Object>();\n\t\tpayload3.put(\"firstname\", \"Mamun\");\n\t\tpayload3.put(\"lastname\", \"Khan\");\n\t\tpayload3.put(\"totalprice\", 123);\n\t\tpayload3.put(\"depositpaid\",false);\n\t\tpayload3.put(\"additionalneeds\", \"dinner\");\n\t\t\n\t\tMap<String, Object> dates3=new LinkedHashMap<>();\n\t\tdates3.put(\"checkin\", \"2021-05-02\");\n\t\tdates3.put(\"checkout\", \"2021-05-05\");\n\t\t\n\t\tpayload3.put(\"bookingdates\", dates);\n\t\t\n\t\t\n\t\ttotalBookings.add(payload);\n\t\ttotalBookings.add(payload2);\n\t\ttotalBookings.add(payload3);\n\t\t\n\t\n\t\tResponse resp=given()\n\t\t\t\t.log()\n\t\t\t\t.all()\n\t\t\t.contentType(ContentType.JSON)\n\t\t\t.body(totalBookings)\n\t\t\t.post(\"https://restful-booker.herokuapp.com/booking\");\n\t\t\n\t\tSystem.out.println(resp.getStatusCode());\n\t\t\n\t\tSystem.out.println(resp.asPrettyString());\n\t\t\n\t\tSystem.out.println(resp.jsonPath().get(\"bookingid\"));\n\t\t\n\t\tSystem.out.println(resp.jsonPath().get(\"booking.bookingdates.checkout\"));\n\t\t\n\t\tAssert.assertNotNull(resp.jsonPath().get(\"bookingid\"));\n\t\t\n\t\tAssert.assertTrue(resp.jsonPath().get(\"bookingid\")!=null);\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tRestAssured.baseURI=\"https://rahulshettyacademy.com\";\n\t\tString response=given().log().all().queryParam(\"key\",\"qaclick123\").header(\"Content-Type\",\"application/json\")\n\t\t.body(Paylod.Addplace()).when().post(\"maps/api/place/add/json\")\n\t\t.then().assertThat().statusCode(200).body(\"scope\", equalTo(\"APP\")).\n\t\theader(\"Server\",\"Apache/2.4.18 (Ubuntu)\").extract().response().asString();\n\t\t\n\t\tSystem.out.println(response);\n\t\tJsonPath jsonparse =jsonParsing.inputToJson(response);\n\t\t//JsonPath jsonparse = new JsonPath(response);\n\t\tString placeID=jsonparse.getString(\"place_id\");\n\t\tSystem.out.println(placeID);\n\t\tSystem.out.println(\"-----------------End of Add API Test----------------------------------------\");\n\t\t\n//update the place added with new address - automation PUT (update place) API\n\t\t\n\t\t\n\t\tString newAddress = \"170 IndraNagar,IND\";\n\n\t\tgiven().log().all().queryParam(\"key\", \"qaclick123\").header(\"Content-Type\",\"application/json\")\n\t\t.body(\"{\\r\\n\" + \n\t\t\t\t\"\\\"place_id\\\":\\\"\"+placeID+\"\\\",\\r\\n\" + \n\t\t\t\t\"\\\"address\\\":\\\"\"+newAddress+\"\\\",\\r\\n\" + \n\t\t\t\t\"\\\"key\\\":\\\"qaclick123\\\"\\r\\n\" + \n\t\t\t\t\"}\\r\\n\" + \"\").when().put(\"maps/api/place/update/json\")\n\t\t.then().log().all().assertThat().statusCode(200).body(\"msg\", equalTo(\"Address successfully updated\"));\n\t\tSystem.out.println(\"-----------------End of Update API Test----------------------------------------\");\n\t\t\n\t\t// GetAPI to get the place to see if new address is added to the Place\n\t\tString newPlace=given().log().all().queryParam(\"key\", \"qaclick123\").queryParam(\"place_id\", placeID)\n\t\t.when().get(\"/maps/api/place/get/json\")\n\t\t.then().log().all().assertThat().statusCode(200).extract().response().asString();\n\t\t\n\t\t\n\t\tJsonPath jsparse =jsonParsing.inputToJson(newPlace);\n\t\t//JsonPath jsparse = new JsonPath(newPlace);\n\t\tString actualAddress=jsparse.getString(\"address\");\n\t\tSystem.out.println(actualAddress);\n\t\t//cucumber junit , testng testing framework - to add assertions -we have to use one of this frmwork,\n\t\t//since in java we do not have such assertion scenarios\n\t\tAssert.assertEquals(actualAddress,newAddress);\n\t\t\n\t\t\n\t\t\n\t}", "public interface TaxiBookingsAPI {\n\n @FormUrlEncoded\n @POST(Constant.taxiBookingsURL)\n Call<TaxiBookingApiResponse> getAllTaxiBookings(@Field(\"access_token\") String accessToken,\n @Field(\"booking_type\") String bookingType,\n @Field(\"page_no\") String pageNo);\n\n @FormUrlEncoded\n @POST(Constant.taxiBookingDetailsURL)\n Call<TaxiBookingDetailsApiResponse> getTaxiBookingDetails(@Field(\"access_token\") String accessToken,\n @Field(\"booking_id\") String bookingId);\n\n @FormUrlEncoded\n @POST(Constant.rejectTaxiBookingURL)\n Call<RejectBookingApiResponse> rejectTaxiBooking(@Field(\"access_token\") String accessToken,\n @Field(\"booking_id\") String bookingId);\n\n\n\n}", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"{exam}/{start}/{section}/{exam}\")\n public String examination(@QueryParam(\"matric\") String matric,@QueryParam(\"exam\")String exam,@QueryParam(\"type\")String type,@QueryParam(\"status\") String status,@QueryParam(\"time\") String time,@QueryParam(\"score\")String score,@QueryParam(\"attempt\")String attempt,@QueryParam(\"complete\") boolean complete){\n System.out.println(\"touching registered Exams to get information)\");\n \n \n \n if(status == null){\n if(type != null){\n StudentResourceGetRegisteredExams regExam = new StudentResourceGetRegisteredExams();\n \n String typeF = \"\";\n if(Integer.parseInt(type) == 5){\n typeF = \"1\";\n }\n if(Integer.parseInt(type) == 6){\n typeF = \"2\"; \n }\n if(Integer.parseInt(type) == 7){\n typeF = \"3\";\n }\n if(Integer.parseInt(type) == 8){\n typeF = \"4\";\n }\n \n return new Gson().toJson(regExam.createExams(matric, exam, typeF,type));\n \n }\n else{\n return new Gson().toJson(\"Log In\");\n \n }\n }\n \n \n if(status.equals(\"result\")){\n StudentResourceResult results = new StudentResourceResult();\n \n \n try{\n \n return new Gson().toJson(results.postResult(matric, exam, attempt, time, score, type,complete));\n }\n catch(ArrayIndexOutOfBoundsException e){\n e.printStackTrace();\n \n }\n \n \n \n }\n \n \n // return StudentResourceGetRegisteredExams.getStudentsExams(matric, exam);\n \n \n return \"\";\n }", "public static void example2(ApiEndpoint apiEndpoint, String email, String password) {\n System.out.println(\"--- EXAMPLE 2 ---\");\n try {\n HashMap<String, String> params = new HashMap<>();\n\n System.out.print(\"Retrieving authToken...\");\n AuthToken authToken = AuthService.getAuthToken(apiEndpoint, email, password);\n System.out.println(\"Done!\");\n\n System.out.print(\"Retrieving Vehicle List...\");\n // Uncomment following line, if you want to include the vehicles the user has been granted read rights to.\n //params.put(\"includeAccessGrantVehicles\", \"true\");\n ActionResponse vResp = AuthService.runAction(apiEndpoint, authToken, \"v1/vehicle\", ActionTypes.GET, params, null);\n System.out.println(\"Done!\");\n System.out.println(\"Response \"+vResp.httpCode+\": \"+vResp.jsonArray.toJSONString());\n\n System.out.print(\"Retrieving first vehicle(including all vehicle states) from previous response...\");\n JSONObject firstV = (JSONObject)(vResp.jsonArray.get(0));\n params.clear();\n // we are settings all 'with*' to true here in order to retrieve all vehicle information and not just basic meta data\n params.put(\"withBase\", \"true\");\n params.put(\"withRemoteFunctionsState\", \"true\");\n params.put(\"withLockState\", \"true\");\n params.put(\"withClimaState\", \"true\");\n params.put(\"withDrivingState\", \"true\");\n params.put(\"withGeoState\", \"true\");\n params.put(\"withBatteryState\", \"true\");\n params.put(\"includeAccessGrantVehicles\", \"true\");\n ActionResponse singlevResp = AuthService.runAction(apiEndpoint, authToken, \"v1/vehicle/\"+firstV.get(\"id\"), ActionTypes.GET, params, null);\n System.out.println(\"Done!\");\n System.out.println(\"Response \"+singlevResp.httpCode+\": \"+singlevResp.jsonObject.toJSONString());\n\n // Print out SoC\n JSONObject baseState = (JSONObject)(singlevResp.jsonObject.get(\"base\"));\n if(baseState != null) {\n System.out.println(\"Vehicle SoC: \" + baseState.get(\"soc\"));\n }\n\n } catch (RcmsClientException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n System.out.println(\"--- END OF EXAMPLE 2 ---\");\n }", "private void getBikeModel(final Booking booking, final View view, final ArrayList<Booking> trackingDaos, final Context context) {\n\n try {\n final String vehicleId = booking.getVehicleId().trim();\n //query to get information of the registered bike\n db.collection(\"my_vehicle\").document(booking.getVehicleId())\n .get().addOnSuccessListener(new OnSuccessListener<DocumentSnapshot>() {\n @Override\n public void onSuccess(DocumentSnapshot documentSnapshot) {\n Vehicle vehicle = documentSnapshot.toObject(Vehicle.class);\n String mVehicleId = documentSnapshot.getId();\n\n if (mVehicleId.equals(vehicleId)) {\n booking.setModel(vehicle.getManufacturer() + \" \" + vehicle.getModel());\n }\n //variable initilizations to pass into booking constructor\n long bookId = booking.getBookingID();\n String sType = booking.getServiceType();\n String makeNModel = booking.getModel();\n String status = booking.getStatus();\n String message = booking.getMessage();\n Date dateOfService = booking.getDateOfService();\n String workshopId = booking.getWorkshopId();\n String category = booking.getRepairCategory();\n String description = booking.getRepairDescription();\n String messageSeen = booking.getMessageSeen();\n String viewColor = null;\n\n if (status.equals(\"accepted\") || status.equals(\"progress\")) {\n viewColor = String.valueOf(context.getResources().getColor(R.color.green));\n }\n if (status.equals(\"completed\")) {\n viewColor = String.valueOf(context.getResources().getColor(R.color.red));\n }\n //adding all the variables\n trackingDaos.add(new Booking(bookId, sType, viewColor, makeNModel, message\n , status, messageSeen, category, description, workshopId, dateOfService, \"\"));\n\n //Tracking adapter initilizations, setup and passing values to the adapter\n recyclerView = view.findViewById(R.id.tracking_recycler_view);\n recyclerView.setHasFixedSize(true);\n layoutManager = new LinearLayoutManager(getActivity());\n trackingAdapter = new TrackingAdapter(trackingDaos);\n\n progressBar.setVisibility(View.GONE);\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setAdapter(trackingAdapter);\n //tracking recylcer view on item click listener\n trackingAdapter.setOnItemClickListener(new TrackingAdapter.OnItemClickListener() {\n @Override\n public void onItemClick(int position) {\n\n Booking data = trackingDaos.get(position);\n //values passed into the bundler object to pass data to next ativity\n Bundle bundle = new Bundle();\n bundle.putLong(\"bookingID\", data.getBookingID());\n bundle.putString(\"bookingStatus\", data.getStatus());\n bundle.putString(\"serviceType\", data.getServiceType());\n bundle.putString(\"serviceDate\", String.valueOf(data.getDateOfService()));\n bundle.putString(\"model\", data.getModel());\n bundle.putString(\"workshopID\", data.getWorkshopId());\n bundle.putString(\"repairCat\", data.getRepairCategory());\n bundle.putString(\"repairDesc\", data.getRepairDescription());\n bundle.putString(\"message\", data.getMessage());\n\n //display tracking summary\n TrackingViewDetails trackingViewDetails = new TrackingViewDetails();\n trackingViewDetails.setArguments(bundle);\n trackingViewDetails.show(getActivity().getSupportFragmentManager(), \"View Details\");\n\n }\n });\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //log error\n Log.d(TAG, e.toString());\n }\n });\n }catch (Exception e){\n e.printStackTrace();\n Log.d(TAG, e.toString());\n }\n }", "public static void main(String[] args) throws Exception {\n Boolean end = false;\n ArrayList<Room> rooms = new ArrayList<Room>();\n ArrayList<Meeting> meetings = new ArrayList<Meeting>();\n initializeLog();\n\n // To perform operations on RoomSchedular by selecting a case\n while (!end) {\n switch (mainMenu()) {\n case 1:\n logger.info(addRoom(rooms));\n break;\n case 2:\n logger.info(removeRoom(rooms));\n break;\n case 3:\n logger.info(scheduleRoom(rooms));\n break;\n case 4:\n logger.info(listSchedule(rooms));\n break;\n case 5:\n logger.info(listRooms(rooms));\n break;\n case 6:\n logger.info(saveRoomJSON(rooms));\n break;\n case 7:\n logger.info(saveScheduleJSON(rooms));\n break;\n case 8:\n // here i changed room to meeting because in method it is given\n // meeting\n logger.info(saveMeetingJSON(meetings));\n\n break;\n case 9:\n\n logger.info(importRoomJSON());\n\n break;\n case 10:\n logger.info(importScheduleJSON());\n break;\n case 11:\n logger.info(importMeetingJSON());\n break;\n\n default:\n logger.info(\"Invalid case selection\");\n break;\n }\n\n }\n\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "private void getValidity(){\n String start_time = spin_start.getSelectedItem().toString();\n String end_time = spin_end.getSelectedItem().toString();\n String day = spin_day.getSelectedItem().toString();\n\n String[] start = start_time.split(\":\");\n String[] end = end_time.split(\":\");\n\n //Set the 2 hours\n int hourStart = Integer.parseInt(start[0]);\n int hourEnd = Integer.parseInt(end[0]);\n\n //Set the minutes\n int minuteStart = Integer.parseInt(start[1]);\n int minuteEnd = Integer.parseInt(end[1]);\n\n boolean valid = true;\n\n if(hourStart == hourEnd && minuteStart >= minuteEnd)\n valid = false;\n if(hourStart > hourEnd)\n valid = false;\n if(valid) {\n valid = isAvailabilityExist(day, start_time, end_time);\n if (valid) {\n valid = isAppointmentExist(day, start_time, end_time);\n if (valid) {\n createAppointment(day, start_time, end_time);\n } else\n Toast.makeText(this, \"There is already an appointment at the time you try to use.\", Toast.LENGTH_LONG).show();\n\n } else\n Toast.makeText(this, \"Please make sure you select an appointment \" +\n \"in the availability of the service provider.\", Toast.LENGTH_LONG).show();\n\n }else\n Toast.makeText(this, \"The time you try to get an appointment is not valid.\", Toast.LENGTH_LONG).show();\n }", "public void clickSchedule(View view) {\n\n final String WorkoutText=WorkoutName.getText().toString();\n\n //Toast.makeText(CalendarActivity.this, WorkoutText, Toast.LENGTH_LONG).show();\n\n Calendar notification = Calendar.getInstance();\n notification.set(Calendar.DAY_OF_MONTH, _day );\n notification.set(Calendar.MONTH, _month);\n notification.set(Calendar.HOUR,_hour);\n notification.set(Calendar.MINUTE, _minute);\n final String date = String.valueOf(_day) + '-' + String.valueOf(_month) + '-' + String.valueOf(_year);\n final String _time = time.getText().toString().replace(\" \",\"\");\n System.out.println(_time);\n final Session session = new Session(this);\n\n\n\n Schedule schedule = new Schedule(session.getUsername(), date, _time, WorkoutText);\n\n OkHttpClient httpClient = new OkHttpClient();\n Retrofit.Builder builder = new Retrofit.Builder()\n .baseUrl(WorkoutAPI.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(httpClient);\n\n Retrofit retrofit = builder.build();\n WorkoutAPI requests = retrofit.create(WorkoutAPI.class);\n\n Call<ResponseBody> call = requests.newSchedulePost(schedule);\n call.enqueue(new Callback<ResponseBody>() {\n @Override\n public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {\n\n if(response.code() == 201){\n System.out.println(\"Success\");\n Session session = new Session(CalendarActivity.this);\n session.setDate(date);\n session.setTime(_time);\n session.setWorkout(WorkoutText);\n Intent intent = new Intent(getApplicationContext(),BodyListActivity.class);\n startActivity(intent);\n\n// PendingIntent alarmIntent = PendingIntent.getBroadcast(getApplicationContext(),111,intent,PendingIntent.FLAG_UPDATE_CURRENT);\n//\n// AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n// alarmManager.set(AlarmManager.RTC_WAKEUP, notification.getTimeInMillis(), alarmIntent);\n //include AlarmManager after Millis to set up intervals\n }else{\n System.out.println(\"Failed\");\n }\n }\n\n @Override\n public void onFailure(Call<ResponseBody> call, Throwable t) {\n System.out.println(\"Throws: \" + t);\n }\n\n });\n\n\n\n\n\n\n }", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nSystem.out.println(\"Enter the name\");\nString name=s.nextLine();\nSystem.out.println(\"Enter the address\");\nString address=s.nextLine();\nSystem.out.println(\"Number of room\");\nint room=s.nextInt();\nSystem.out.println(\"Number of persons\");\nint persons=s.nextInt();\nSystem.out.println(\"AC OR Non-AC\");\nString ac=s.next();\nSystem.out.println(\"Booking Date\");\nString booking=s.next();\nSystem.out.println(\"Checkout Date\");\nString checkout=s.next();\nLocalDate ds=LocalDate.parse(booking);\nLocalDate de=LocalDate.parse(checkout);\nlong total=ChronoUnit.DAYS.between(ds, de);\nlong total=0;int p=(person%2);\nSystem.out.println(\"Reg-Details: \");\nSystem.out.println(\"Name : \"+name);\nSystem.out.println(\"Address : \"+address);\nSystem.out.println(\"No.of rooms : \"+room);\nSystem.out.println(\"No.of.Guest : \"+persons);\nint ac_amount=0,flag=0;\nif(ac.equals(\"AC\"))\n{\n\tac_amount=100;\n\tflag=1;\n}\n\t\nelse\n{\n\tac_amount=0;\n\tflag=0;\n}\nif(flag==1)\n\tSystem.out.println(\"AC :Yes\");\nelse\n\tSystem.out.println(\"AC :No\");\n\n\n\nint rent=500,flag1=0;;\n\nif(persons==(room*2)+1)\n{\n\t\n\tint amount=(int)((500+ac_amount)*(persons*total))+250;\n\tSystem.out.print(\"Amount :\"+amount);\n}\n\t\nelse\n{\n\tint amount=(int)((500+ac_amount)*(persons*total));\n\tSystem.out.print(\"Amount :\"+amount);\n\t\n\t}\n\n}", "public void ReuseMethodsforDPRcheckavailabitlity(String Enterrooms, String roomtype) throws IOException, InterruptedException, ParseException\r\n\t{\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSeleniumRepo.driver.navigate().refresh();\r\n\t\t\tarrival_date();\r\n\t\t\tdeparture_date();\r\n\t\t\tpopup_ok();\r\n\t\t\tRooms_and_Guests();\r\n\t\t\tselect_Rooms(Enterrooms);\r\n\t\t\tClick_SpecialRate();\r\n\t\t\tSpecialRateplan_Validation();\r\n\t\t\tClick_Done();\r\n\t\t\tclick_CheckavailabitlityButton();\r\n\t\t\troom_type(roomtype);\r\n\t\t\tBookRoom();\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "private void CallOnGoingRideAPI(){\n\n JsonObject object = OnGoingRideObject();\n AtroadsService service = ServiceFactory.createRetrofitService(getActivity(), AtroadsService.class);\n mSubscription = service.OnGoingRidesResponse(object)\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<OnGoingRidesResponseModel>() {\n @Override\n public void onCompleted() {\n }\n\n @Override\n public void onError(Throwable e) {\n if (e instanceof HttpException) {\n ((HttpException) e).code();\n ((HttpException) e).message();\n ((HttpException) e).response().errorBody();\n try {\n ((HttpException) e).response().errorBody().string();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n e.printStackTrace();\n }\n }\n\n @Override\n public void onNext(OnGoingRidesResponseModel mResponse) {\n Log.i(TAG, \"OnGoingRidesResponseModel: \"+mResponse);\n Toast.makeText(getActivity(), mResponse.getMessage(), Toast.LENGTH_SHORT).show();\n if(mResponse.getStatus() == 0)\n {\n //Toast.makeText(PairSuccessScreen.this, mResponse.getMessage(), Toast.LENGTH_SHORT).show();\n }\n else if(mResponse.getStatus() == 1)\n {\n if(mResponse.getResult().size() == 0)\n {\n ongoing_ride_cardview.setVisibility(View.INVISIBLE);\n lin_nodata.setVisibility(View.VISIBLE);\n }\n else {\n ongoing_ride_cardview.setVisibility(View.VISIBLE);\n lin_nodata.setVisibility(View.GONE);\n number.setText(\" : \"+mResponse.getResult().get(0).getAutoNumber());\n dateandtime.setText(\"\"+Utilities.GetCurrentDateTime());\n pickup.setText(\"\"+mResponse.getResult().get(0).getUserSourceAddress());\n droplocation.setText(\"\"+mResponse.getResult().get(0).getUserDestAddress());\n List<Double> srcList = mResponse.getResult().get(0).getUserSourceLatLong();\n List<Double> destList = mResponse.getResult().get(0).getUserDestLatLong();\n LatLng srcLatLng = new LatLng(srcList.get(0),srcList.get(1));\n LatLng destLatLng = new LatLng(destList.get(0),destList.get(1));\n// new FetchURL(getActivity()).execute(getUrl(srcLatLng, destLatLng,\n// \"driving\"), \"driving\");\n\n\n// RideStatus = getIntent().getStringExtra(\"RideStatus\");\n// UserRideId = getIntent().getIntExtra(\"UserRideId\",0);\n// AutoNo = getIntent().getStringExtra(\"AutoNo\");\n ongoing_ride_cardview.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n SharedPreferences pref1 = getActivity().getSharedPreferences(\"PairedUserPref\", 0); // 0 - for private mode\n int user_ride_id = pref1.getInt(\"user_ride_id\",0);\n\n Intent i = new Intent(getActivity(), PairSuccessScreen.class);\n i.putExtra(\"RideStatus\",\"RideStarted\");\n i.putExtra(\"UserRideId\",user_ride_id);\n i.putExtra(\"AutoNo\",mResponse.getResult().get(0).getAutoNumber());\n startActivity(i);\n }\n });\n\n\n }\n\n }\n }\n });\n\n }", "public AirQuality getAirQuality(String cityName){\n String place = cityName.toLowerCase().replaceAll(\"\\\\d\",\"\");\n // https://www.baeldung.com/spring-5-webclient\n // https://springframework.guru/spring-5-webclient/ -> testam os endpoints\n // TODO: https://stackoverflow.com/questions/60289283/webclient-map-nested-object -> passar pa objetos\n // dizer que é melhor que RestTemplate que vai tar decrepeat\n AirQuality workingAQ = airQualityRepository.findByCityName(place);\n if (workingAQ != null && (ChronoUnit.MINUTES.between(workingAQ.getDate(), LocalDateTime.now()) < 50)){\n return workingAQ;\n }\n\n Api01MainResponse response01 = externalCaller.getFromApiOne(place);\n Api02MainResponse response02 = null;\n\n List<Pollutant> pollutantList = new ArrayList<>();\n\n if (response01.getError() != null){\n System.out.println(\"Couldn't get data from API01. Cause: \" + response01.getError().getDescription());\n response02 = externalCaller.getFromApiTwo(place);\n\n if (response02.getError() != null){\n System.out.println(\"Couldn't get data from API02. Cause: \" + response02.getError().getDetail());\n\n // If both API's requests have problems, send Null Object\n return new AirQualityNull();\n }\n\n // If API01 request doesn't work, but API02 does, use it\n for (Api02MainResponse.Api02Data.Api02Pollutants.Api02Pollutant p : response02.getAllPollutants()){\n pollutantList.add( new Pollutant(p.getDisplay_name().toLowerCase(), p.getFull_name().toLowerCase(), p.getConcentration().getValue() ,p.getConcentration().getUnits()) );\n }\n\n workingAQ = new AirQuality(place, \"portugal\", LocalDateTime.parse(response02.getApi02Date().split(\"Z\")[0] ) ,pollutantList);\n airQualityRepository.save(workingAQ);\n return workingAQ;\n }\n\n // If API01 request works, use it\n for (Api01MainResponse.Api01Response.Api01Periods.Api01Pollutant p: response01.getAllPollutants()){\n pollutantList.add( new Pollutant(p.getType(), p.getName(), p.getValueUGM3(), \"ug/m3\" ));\n }\n workingAQ = new AirQuality(place, \"portugal\", LocalDateTime.parse(response01.getApi01Date().split(\"\\\\+\")[0]) ,pollutantList);\n airQualityRepository.save(workingAQ);\n return workingAQ;\n }", "void startChecking()\n {\n UnitModel model = new UnitModel();\n model.UNIT_ID = Globals.unitId;\n Observable<RoomMeetingsResponse> data = retrofitInterface.roomreservations(model);\n\n subscription = data\n .subscribeOn(Schedulers.newThread())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<RoomMeetingsResponse>() {\n @Override\n public void onCompleted() {\n\n }\n\n @Override\n public void onError(Throwable e) {\n e.printStackTrace();\n\n }\n\n @Override\n public void onNext(RoomMeetingsResponse serviceResponse) {\n //sweetAlertDialog.hide();\n progress_rel.setVisibility(View.GONE);\n OngoingReactAsync(serviceResponse);\n }\n });\n }", "@Test\r\n\tpublic void UpdatebookingTest()\r\n\t{\n\t\t\r\n\t\tResponse responsecreate = createBooking(); \r\n\t\tresponsecreate.print();\r\n\t\t//get bookingid of booking\r\n\t\tint bookingid=responsecreate.jsonPath().getInt(\"bookingid\");\r\n\t\t\r\n\t\t//update \r\n\t\t//\r\n\t\t\r\n\t\tJSONObject body=new JSONObject();\r\n\t\tbody.put(\"firstname\", \"Devaaa\");\r\n\t\tbody.put(\"lastname\", \"Dadhavjadhav\");\r\n\t\tbody.put(\"totalprice\", 125);\r\n\t\tbody.put(\"depositpaid\", false);\r\n\r\n \r\n\t\tJSONObject bookingdates=new JSONObject();\r\n\t\tbookingdates.put(\"checkin\", \"2021-08-16\");\r\n\t\tbookingdates.put(\"checkout\", \"2021-09-17\");\r\n\t\t\r\n\t\tbody.put(\"bookingdates\", bookingdates);\r\n\t\tbody.put(\"additionalneeds\", \"Breakfast\");\r\n\t\t\r\n\t\t// update booking //username and password add\r\n\r\n\t\tResponse responseUpdate=RestAssured.given().auth().preemptive().basic(\"admin\", \"password123\").contentType(ContentType.JSON)\r\n\t\t\t\t.body(body.toString()).put(\"https://restful-booker.herokuapp.com/booking/\"+ bookingid);\r\n\t\t\r\n\t\tresponseUpdate.print();\r\n\t\tresponseUpdate.getStatusCode();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t// verify response 200\r\n\t\tAssert.assertEquals(responseUpdate.getStatusCode(), 200);\r\n//\t\t\t//verify all field\r\n//\t\t\tSoftAssert softassert=new SoftAssert();\r\n//\t\t\t\r\n//\t\t\tString actualfirstname=response.jsonPath().getString(\"firstname\");\r\n//\t\t\tsoftassert.assertEquals(actualfirstname, \"deva\");\r\n//\t\t\t\r\n//\t\t\tString actuallastname=response.jsonPath().getString(\"lastname\");\r\n//\t\t\tsoftassert.assertEquals(actuallastname, \"jadhav\");\r\n//\t\t\t\r\n//\t\t\tint actualtotalprice=response.jsonPath().getInt(\"totalprice\");\r\n//\t\t\tsoftassert.assertEquals(actualtotalprice, 255);\r\n//\t\t\t\r\n//\t\t\tboolean actualdepositpaid=response.jsonPath().getBoolean(\"depositpaid\");\r\n//\t\t\tsoftassert.assertFalse(actualdepositpaid, \"false\");\r\n//\t\t\t \r\n//\t\t\tString actualcheckin=response.jsonPath().getString(\"bookingdates.checkin\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckin, \"2021-08-14\");\r\n//\t\t\t\r\n//\t\t\tString actualcheckout=response.jsonPath().getString(\"bookingdates.checkout\");\r\n//\t\t\tsoftassert.assertEquals(actualcheckout, \"2021-09-07\");\r\n//\t\t\t\r\n//\t\t\tString actualadditionalneeds=response.jsonPath().getString(\"additionalneeds\");\r\n//\t\t\tsoftassert.assertEquals(actualadditionalneeds, \"c\");\r\n//\t\t\tsoftassert.assertAll();\r\n//\t\r\n\r\n}", "@Test\n public void testgetMatch() throws java.lang.Exception{\n\n /* org.seadva.matchmaker.webservice.MatchMakerServiceStub stub =\n new org.seadva.matchmaker.webservice.MatchMakerServiceStub();//the default implementation should point to the right endpoint\n\n org.seadva.matchmaker.webservice.GetMatchRequest getMatchRequest18=\n (org.seadva.matchmaker.webservice.GetMatchRequest)getTestObject(org.seadva.matchmaker.webservice.GetMatchRequest.class);\n // TODO : Fill in the getMatchRequest18 here\n\n ClassAdType param = new ClassAdType();\n\n param.setType(\"user\");\n CharacteristicsType characteristicsType = new CharacteristicsType();\n CharacteristicType[] characs = new CharacteristicType[1];\n CharacteristicType charac = new CharacteristicType();\n charac.setName(\"license\");\n charac.setValue(\"CC\");\n characs[0] = charac;\n characteristicsType.setCharacteristic(characs);\n param.setCharacteristics(characteristicsType);\n\n RequirementsType reqs = new RequirementsType();\n RuleType rules = new RuleType();\n rules.setObject(\"dspace\");\n rules.setSubject(\"type\");\n rules.setPredicate(\"equals\");\n reqs.addRule(rules);\n param.setRequirements(reqs);\n\n PreferencesType preferencesType = new PreferencesType();\n RuleType[] rs = new RuleType[1];\n rs[0] = rules;\n preferencesType.setRule(rs);\n param.setPreferences(preferencesType);\n\n getMatchRequest18.setUserClassAd(param);\n GetMatchResponse resourcesResponse = stub.getMatch(\n getMatchRequest18);\n for(int i =0; i<resourcesResponse.getResourceClassAd().getCharacteristics().getCharacteristic().length;i++)\n System.out.print(\"printing \"+\n resourcesResponse.getResourceClassAd().getType()+\" \\n\"+\n resourcesResponse.getResourceClassAd().getCharacteristics().getCharacteristic()[i].getName() + \" : \" +\n resourcesResponse.getResourceClassAd().getCharacteristics().getCharacteristic()[i].getValue() + \"\\n\");\n param.setPreferences(new PreferencesType());\n assertNotNull(resourcesResponse);\n \n */\n\n\n GetMatchRequest getMatchRequest=\n new GetMatchRequest();\n\n ClassAdType param = new ClassAdType();\n\n param.setType(\"user\");\n CharacteristicsType characteristicsType = new CharacteristicsType();\n CharacteristicType[] characs = new CharacteristicType[2];\n CharacteristicType licCharac = new CharacteristicType();\n licCharac.setName(\"license\");\n licCharac.setValue(\"CC\");\n CharacteristicType sizeCharac = new CharacteristicType();\n sizeCharac.setName(\"dataCollectionSize\");\n sizeCharac.setValue(\"1073741825\");\n characs[0] = licCharac;\n characs[1] = sizeCharac;\n characteristicsType.setCharacteristic(characs);\n param.setCharacteristics(characteristicsType);\n\n RequirementsType reqs = new RequirementsType();\n RuleType rules = new RuleType();\n rules.setSubject(\"type\");\n rules.setPredicate(\"equals\");\n rules.setObject(\"cloud\");\n reqs.addRule(rules);\n param.setRequirements(reqs);\n\n PreferencesType preferencesType = new PreferencesType();\n RuleType[] rs = new RuleType[1];\n rs[0] = rules;\n preferencesType.setRule(rs);\n param.setPreferences(preferencesType);\n\n getMatchRequest.setUserClassAd(param);\n MatchMakerServiceStub stub = null;\n try {\n stub = new MatchMakerServiceStub();\n } catch (AxisFault axisFault) {\n axisFault.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n GetMatchResponse resourcesResponse = null;\n try {\n resourcesResponse = stub.getMatch(\n getMatchRequest);\n System.out.print(\"printing \"+\n resourcesResponse.getResourceClassAd().getType()+\" \\n\");\n for(int i =0; i<resourcesResponse.getResourceClassAd().getCharacteristics().getCharacteristic().length;i++)\n System.out.print(\n resourcesResponse.getResourceClassAd().getCharacteristics().getCharacteristic()[i].getName() + \" : \" +\n resourcesResponse.getResourceClassAd().getCharacteristics().getCharacteristic()[i].getValue() + \"\\n\");\n param.setPreferences(new PreferencesType());\n assertNotNull(resourcesResponse);\n } catch (RemoteException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public interface GrosirMobilApi {\n\n String v1 = \"v1\";\n String v2 = \"v2\";\n\n String loginPath = \"/api/auth/loginMobile\";\n String tipeUsahaPath = \"/api/registrasi/tipeusahamobile\";\n String questionOnePath = \"/api/registrasi/KebutuhanKendaraanBulanMobile\";\n String questionTwoPath = \"/api/registrasi/Rata2PenjualanMobile\";\n String questionThreePath = \"/api/registrasi/KebutuhanPembelianMobile\";\n String questionFourPath = \"/api/registrasi/JenisMobilMobile\";\n String questionFivePath = \"/api/registrasi/SumberInfoMobile\";\n String tahunKendaraanPath = \"/api/registrasi/TahunKendaraanMobile\";\n String asalKendaraanPath = \"/api/registrasi/AsalKendaraanMobile\";\n String saveDataRegisterPath = \"/api/registrasi/SimpanMobile\";\n String validationOtpPath = \"/api/registrasi/validasiOtpMobile\";\n String resendOtpPath = \"/api/registrasi/resendOtp\";\n String logoutPath = \"/api/auth/logout\";\n String provincePath = \"/api/registrasi/Propinsi\";\n String kabupatenPath = \"/api/registrasi/Kabupaten\";\n String kecamatanPath = \"/api/registrasi/Kecamatan\";\n String kelurahanPath = \"/api/registrasi/Kelurahan\";\n String checkActiveTokenPath = \"/api/cekaktiftokenMobile\";\n String wareHousePath = \"/api/lokasi/warehouseMobile\";\n String homeLivePath = \"/api/Live/HomeMobile\";\n String homeComingSoonPath = \"/api/comingsoon/listeventMobile\";\n String homeHistoryPath = \"/api/Live/RiwayatMobile\";\n String liveVehicleDetailPath = \"/api/Live/detailMobile\";\n String timeServerPath = \"/api/jamserverMobile\";\n String liveNegoPath = \"/api/Live/LiveNegoMobile\";\n String liveBuyNowPath = \"/api/Live/LiveBuyNow\";\n String listCartPath = \"/api/Live/datakeranjang\";\n String setAndUnsetFavoritePath = \"/api/favorite/setAndUnsetFavorite\";\n String changePasswordPath = \"/api/auth/changePasswordForgot\";\n String generateVaPath = \"/api/Pembayaran/GenerateVA\";\n String invoiceVaPath = \"/api/Pembayaran/InvoiceVA\";\n String historyTransactionPath = \"/api/Live/RiwayatMobile\";\n String checkStatusHistoryTransactionPath = \"/api/Pembayaran/cekStatusPembayaran\";\n String merekPath = \"/api/filter/merek\";\n String gradePath = \"/api/filter/grade\";\n String infoMenuPath = \"/api/info/getInfo\";\n\n\n //@Headers(\"X-Requested-With:XMLHttpRequest\")\n\n @Headers(\"Content-Type: application/json\")\n @POST(loginPath)\n Single<LoginResponse> loginApi(@Body LoginRequest loginRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(logoutPath)\n Call<GeneralResponse> logoutApi(@Header(\"Authorization\") String authToken);\n\n// @Headers(\"Content-Type: application/json\")\n// @POST(historyBillPaymentPath)\n// Single<HistoryBillPaymentResponse> historyBillPaymentApi(@Header(\"Authorization\") String authToken,\n// @Body HistoryTransactionRequest historyTransactionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(checkActiveTokenPath)\n Call<CheckActiveTokenResponse> checkActiveTokenApi(@Header(\"Authorization\") String authToken);\n\n @Headers(\"Content-Type: application/json\")\n @GET(provincePath)\n Call<ProvinceResponse> provinceApi();\n\n @Headers(\"Content-Type: application/json\")\n @POST(kabupatenPath)\n Call<KabupatenResponse> kabupatenApi(@Body KabupatenRequest kabupatenRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(kecamatanPath)\n Call<KecamatanResponse> kecamatanApi(@Body KecamatanRequest kecamatanRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(saveDataRegisterPath)\n Call<SaveDataRegisterResponse> saveDataRegisterApi(@Body SaveDataRegisterRequest saveDataRegisterRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(validationOtpPath)\n Call<GeneralResponse> validationOtpApi(@Body ValidationOtpRequest validationOtpRequest);\n\n\n @Headers(\"Content-Type: application/json\")\n @POST(resendOtpPath)\n Call<GeneralResponse> resendOtpApi(@Body ResendOtpRequest resendOtpRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(kelurahanPath)\n Call<KelurahanResponse> kelurahanApi(@Body KelurahanRequest kelurahanRequest);\n\n @Headers(\"Content-Type: application/json\")\n @GET(tipeUsahaPath)\n Call<TipeUsahaResponse> tipeUsahaApi(); \n \n @Headers(\"Content-Type: application/json\")\n @GET(questionOnePath)\n Call<QuestionResponse> questionOneApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionTwoPath)\n Call<QuestionResponse> questionTwoApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionThreePath)\n Call<QuestionResponse> questionThreeApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionFourPath)\n Call<QuestionResponse> questionFourApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(questionFivePath)\n Call<QuestionResponse> questionFiveApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(tahunKendaraanPath)\n Call<QuestionResponse> tahunKendaraanApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(asalKendaraanPath)\n Call<QuestionResponse> asalKendaraanApi();\n\n @Headers(\"Content-Type: application/json\")\n @GET(wareHousePath)\n Call<WareHouseResponse> wareHouseApi(@Header(\"Authorization\") String authToken);\n\n @Headers(\"Content-Type: application/json\")\n @POST(homeLivePath)\n Call<HomeLiveResponse> homeLiveApi(@Header(\"Authorization\") String authToken,\n @Body HomeLiveRequest homeLiveRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(homeComingSoonPath)\n Call<HomeComingSoonResponse> homeComingSoonApi(@Header(\"Authorization\") String authToken,\n @Body HomeComingSoonRequest homeComingSoonRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(homeHistoryPath)\n Call<HomeHistoryResponse> homeHistoryApi(@Header(\"Authorization\") String authToken,\n @Body HomeHistoryRequest homeHistoryRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(liveVehicleDetailPath)\n Call<VehicleDetailResponse> liveVehicleDetailApi(@Header(\"Authorization\") String authToken,\n @Body VehicleDetailRequest vehicleDetailRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(timeServerPath)\n Call<TimeServerResponse> timeServerApi();\n\n @Headers(\"Content-Type: application/json\")\n @POST(liveNegoPath)\n Call<GeneralNegoAndBuyNowResponse> liveNegoApi(@Header(\"Authorization\") String authToken,\n @Body NegoAndBuyNowRequest negoAndBuyNowRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(liveBuyNowPath)\n Call<GeneralNegoAndBuyNowResponse> liveBuyNowApi(@Header(\"Authorization\") String authToken,\n @Body NegoAndBuyNowRequest negoAndBuyNowRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(setAndUnsetFavoritePath)\n Call<GeneralResponse> setAndUnsetFavoriteApi(@Header(\"Authorization\") String authToken,\n @Body FavoriteRequest favoriteRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(listCartPath)\n Call<CartResponse> lisCartApi(@Header(\"Authorization\") String authToken);\n\n @Headers(\"Content-Type: application/json\")\n @POST(changePasswordPath)\n Call<GeneralResponse> changePasswordApi(@Body ChangePasswordRequest changePasswordRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(generateVaPath)\n Call<GenerateVaResponse> generateVaApi(@Header(\"Authorization\") String authToken,\n @Body GenerateVaRequest favoriteRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(invoiceVaPath)\n Call<InvoiceVaResponse> invoiceVaApi(@Header(\"Authorization\") String authToken,\n @Body InvoiceVaRequest invoiceVaRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(historyTransactionPath)\n Call<HistoryTransactionResponse> historyTransactionApi(@Header(\"Authorization\") String authToken,\n @Body HistoryTransactionRequest historyTransactionRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(merekPath)\n Call<MerekResponse> filterMerekApi(@Header(\"Authorization\") String authToken,\n @Body MerekRequest merekRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(gradePath)\n Call<GradeResponse> filterGradeApi(@Header(\"Authorization\") String authToken,\n @Body MerekRequest merekRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(infoMenuPath)\n Call<InfoMenuResponse> infoMenuApi(@Header(\"Authorization\") String authToken,\n @Body MerekRequest merekRequest);\n\n @Headers(\"Content-Type: application/json\")\n @POST(checkStatusHistoryTransactionPath)\n Call<CheckStatusHistoryTransactionResponse> checkStatusHistoryTransactionApi(@Header(\"Authorization\") String authToken,\n @Body CheckStatusHistoryRequest historyTransactionRequest);\n\n}", "private void calletCampaignTrainingService() {\n\n String accessTokenId = marketPreference.getString(Constants.LOGIN_ACCESSTOKEN_ID, null);\n final String userId = marketPreference.getString(Constants.LOGIN_USER_ID, null);\n String roleId = marketPreference.getString(Constants.LOGIN_ROLE_ID, null);\n\n String campaignId = campaignOutput.getCompaignId();\n\n\n\n\n builder = getHttpClient();\n Retrofit retrofit = new Retrofit.Builder().baseUrl(Config.BASE_URL).addConverterFactory(GsonConverterFactory.create()).client(builder.build()).build();\n final Api api = retrofit.create(Api.class);\n\n Call<List<CampaignTrainingOutput>> call = (Call<List<CampaignTrainingOutput>>) api.getCampaignTraining(accessTokenId,\n userId,\n roleId,\n Constants.SERVICE_GET_CAMPAIGN_TRAINING,\n campaignId);\n call.enqueue(new Callback<List<CampaignTrainingOutput>>() {\n @Override\n public void onResponse(Call<List<CampaignTrainingOutput>> call, Response<List<CampaignTrainingOutput>> response) {\n\n //Checking for response code\n if (response.code() == 200 ) {\n\n\n campaignTrainingOutputList = response.body();\n\n\n if (campaignTrainingOutputList.size() == 0)\n {\n progressDialog.setVisibility(View.GONE);\n trainingList.setVisibility(View.GONE);\n\n errorDisplay.setVisibility(View.VISIBLE);\n\n errorDisplayIcon.setImageResource(R.drawable.ic_error_training);\n errorDisplayText.setText(getString( R.string.error_no_data_campaign_training));\n errorDisplayTryClick.setVisibility(View.GONE);\n\n\n }\n else {\n\n //Hiding views\n progressDialog.setVisibility(View.GONE);\n errorDisplay.setVisibility(View.GONE);\n\n trainingList.setVisibility(View.VISIBLE);\n\n campaignTrainingListAdapter = new CampaignTrainingListAdapter(CampaignTrainingActivity.this,campaignTrainingOutputList);\n trainingList.setAdapter(campaignTrainingListAdapter);\n campaignTrainingListAdapter.notifyDataSetChanged();\n\n }\n\n\n }\n //If status code is not 200\n else\n {\n\n progressDialog.setVisibility(View.GONE);\n trainingList.setVisibility(View.GONE);\n\n\n errorDisplay.setVisibility(View.VISIBLE);\n\n errorDisplayIcon.setImageResource(R.drawable.ic_error_code);\n errorDisplayText.setText(getString(R.string.error_response_code) + response.code());\n\n }\n }\n\n @Override\n public void onFailure(Call<List<CampaignTrainingOutput>> call, Throwable t) {\n\n\n Log.e(\"Failure\",t.toString());\n\n if (t instanceof IOException) {\n\n progressDialog.setVisibility(View.GONE);\n trainingList.setVisibility(View.GONE);\n\n errorDisplay.setVisibility(View.VISIBLE);\n\n errorDisplayIcon.setImageResource(R.drawable.ic_error_training);\n errorDisplayText.setText(getString( R.string.error_no_data_campaign_training));\n errorDisplayTryClick.setVisibility(View.GONE);\n\n }\n else\n {\n //Hiding views\n progressDialog.setVisibility(View.GONE);\n trainingList.setVisibility(View.GONE);\n\n\n errorDisplay.setVisibility(View.VISIBLE);\n\n errorDisplayIcon.setImageResource(R.drawable.ic_error_server);\n errorDisplayText.setText(getString(R.string.error_server));\n\n }\n\n\n }\n\n });\n }", "private void getInfoShipment() {\n // Registro del LocalDateTime Converter\n Gson gson = new GsonBuilder()\n\n .registerTypeAdapter(LocalDateTime.class, new JsonDeserializer<LocalDateTime>() {\n @Override\n public LocalDateTime deserialize(JsonElement json, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {\n return LocalDateTime.parse(json.getAsString());\n //return LocalDateTime.parse(json.getAsString(), DateTimeFormatter.ofPattern(\"yyyy::MM::dd HH::mm::ss\"));\n }\n }).create();\n // creacion de Instacia RETROFIT\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"https://api.busterminal.octword.net\") // OCTWORD AP\n .addConverterFactory(GsonConverterFactory.create(gson)) // GSON CONVERRTER\n .build(); // Llama a la clase INTERFAZ\n JasonPlaceHolder jsonPlaceHolder = retrofit.create(JasonPlaceHolder.class);\n\n\n Call<Shipment> call = jsonPlaceHolder.getShipmentInfo();\n call.enqueue(new Callback<Shipment>() {\n @Override\n public void onResponse(Call<Shipment> call, Response<Shipment> response) {\n if (!response.isSuccessful()) {\n // mesaje de Error\n mJsoTxtView.setText(\"Codigo: \" + response.code());\n return;\n }\n // response del servidor0\n\n String content = \"\";\n\n content = \"XKey:\" + response.body().getXKey() +\n \"\\n SenderCustomerXKey:\" + response.body().getSenderCustomerXKey() +\n \"\\n ReceiverFullName:\" + response.body().getReceiverFullName() +\n \"\\n ReceiverMobilPhone:\" + response.body().getReceiverMobilPhone() +\n \"\\n ReceiverEmail:\" + response.body().getReceiverEmail() +\n \"\\n XPassword:\" + response.body().getXPassword() +\n \"\\n TrackingNumber:\" + response.body().getTrackingNumber() +\n \"\\n XDate:\" + response.body().getXDate()+\n \"\\n XFrom:\" + response.body().getXFrom() +\n \"\\n XTo:\" + response.body().getXTo() +\n \"\\n XContent:\" + response.body().getXContent() +\n \"\\n DeclaredAmount:\" + response.body().getDeclaredAmount() +\n \"\\n Fee:\" + response.body().getFee() +\n \"\\n PayWhenReceived:\" + response.body().getPayWhenReceived() +\n \"\\n PaymentStatus:\" + response.body().getPaymentStatus() +\n \"\\n InvoiceXValue:\" + response.body().getInvoiceXValue() +\n \"\\n ShipmentStatus:\" + response.body().getShipmentStatus() +\n \"\\n BusXKey:\" + response.body().getBusXKey() +\n \"\\n BusDriverXKey:\" + response.body().getBusDriverXKey();\n\n\n mJsoTxtView.append(content);\n\n\n }\n\n @Override\n public void onFailure(Call<Shipment> call, Throwable t) {\n mJsoTxtView.setText(t.getMessage());\n }\n });\n {\n\n }\n\n }", "public void allBookings() {\n\t\t\tint i = 0;\r\n\t\t\tint k = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tint roomNum; //Room number\r\n\t\t\tint buffNum; //buff room number\r\n\t\t\tint index = 0; //saves the index of the date stored in the arraylist dateArray\r\n\t\t\tBooking buff; //Booking buffer to use\r\n\t\t\tRooms roomCheck;\r\n\t\t\tArrayList<LocalDate> dateArray = new ArrayList<LocalDate>(); //Saves the booking dates of a room\r\n\t\t\tArrayList<Integer> nights = new ArrayList<Integer>(); //Saves the number of nights a room is booked for\r\n\t\t\t\r\n\t\t\twhile(i < RoomDetails.size()) { //Looping Room Number-wise\r\n\t\t\t\troomCheck = RoomDetails.get(i);\r\n\t\t\t\troomNum = roomCheck.getRoomNum();\r\n\t\t\t\tSystem.out.print(this.Name + \" \" + roomNum);\r\n\t\t\t\twhile(k < Bookings.size()) { //across all bookings\r\n\t\t\t\t\tbuff = Bookings.get(k);\r\n\t\t\t\t\twhile(j < buff.getNumOfRoom()) { //check each booked room\r\n\t\t\t\t\t\tbuffNum = buff.getRoomNumber(j);\r\n\t\t\t\t\t\tif(buffNum == roomNum) { //If a booking is found for a specific room (roomNum)\r\n\t\t\t\t\t\t\tdateArray.add(buff.getStartDate()); //add the date to the dateArray\r\n\t\t\t\t\t\t\tCollections.sort(dateArray); //sort the dateArray\r\n\t\t\t\t\t\t\tindex = dateArray.indexOf(buff.getStartDate()); //get the index of the newly add date\r\n\t\t\t\t\t\t\tnights.add(index, buff.getDays()); //add the number of nights to the same index as the date\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tj++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tk++;\r\n\t\t\t\t\tj=0;\r\n\t\t\t\t}\r\n\t\t\t\ti++;\r\n\t\t\t\tprintOccupancy(dateArray, nights); //print the occupancy of the room\r\n\t\t\t\tk=0;\r\n\t\t\t\tdateArray.clear(); //cleared to be used again\r\n\t\t\t\tnights.clear(); //cleared to be used again\r\n\t\t\t}\r\n\t\t}", "@Test\r\n\tpublic void testGetRooms() {\r\n\t\tassertEquals(rooms, breaku1.getRooms());\r\n\t\tassertEquals(rooms, externu1.getRooms());\r\n\t\tassertEquals(rooms, meetingu1.getRooms());\r\n\t\tassertEquals(rooms, teachu1.getRooms());\r\n\t}", "boolean hasFindGameRoomsResponse();", "@Test\n\tpublic void testBasicBookingOrder() throws Exception {\n\t\t\n\t\t// 1. initialize screen object\n\t\tScreen testScreen = new Screen(5,5);\n\t\tTicketBookingSystem ticketBookingSystemObj = new TicketBookingSystem(testScreen);\n\t\t\n\t\tticketBookingSystemObj.screenForTicketBooking = testScreen;\n\t\tMap<String, SeatAvailabilityPerRow> testHashMap = new HashMap<String, SeatAvailabilityPerRow>();\n\t\ttestHashMap = testScreen.getHashmapMaxConsecutiveSeatAvailablitity();\n\t\t\n\t\t//Test Case 1: to check whether the number of rows and columns is calculated as expected\n\t\tif(!testScreen.equals(getExpectedScreen(\"1\"))){\n\t\t\t\n\t\t\tthrow (new Exception(\"Test case 1 failed due to expected screen \"\n\t\t\t\t\t+ \"is : \\n\"\n\t\t\t\t\t+ getExpectedScreen(\"1\") + \"\\n the actual screen is : \"\n\t\t\t\t\t\t\t+ \"\\n\" + testScreen));\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tint numberOfSeatsRequested = 3;\n\t\tBookTickets b1 = new BookTickets(numberOfSeatsRequested,\"\");\n\t\tticketBookingSystemObj.findAndHoldSeatsForUser(numberOfSeatsRequested,b1,numberOfSeatsRequested);\n\t\t\t\n\t\t//Test Case 2: to check after booking 3 seats\n\t\t\n\t\tif(!testScreen.equals(getExpectedScreen(\"2\"))){\n\t\t\tthrow (new Exception(\"Test case 2 failed due to expected screen is: \"\n\t\t\t\t\t+ \"\\n\" + getExpectedScreen(\"2\") + \"\\n Actual is: \\n \" + testScreen));\n\t\t}\n\t\t\t\t\n\t\t//Test Case 3:\n\t\t//After booking 3 tickets trying to book 5 tickets\n\t\t\n\t\tnumberOfSeatsRequested = 5;\n\t\tb1 = new BookTickets(numberOfSeatsRequested,\"\");\n\t\tticketBookingSystemObj.findAndHoldSeatsForUser(numberOfSeatsRequested,b1,numberOfSeatsRequested);\n\t\t\n\t\tif(!testScreen.equals(getExpectedScreen(\"3\"))){\n\t\t\tthrow (new Exception(\"Test case 3 failed due to expected screen is: \"\n\t\t\t\t\t+ \"\\n\" + getExpectedScreen(\"3\") + \"\\n Actual is: \\n \" + testScreen));\n\t\t}\n\t\t\n\n\t\t//Test Case 4:\n\t\t//After booking 3 tickets, then 5 tickets, trying to book 8 tickets\n\n\t\tnumberOfSeatsRequested = 9;\n\t\tb1 = new BookTickets(numberOfSeatsRequested,\"\");\n\t\tticketBookingSystemObj.findAndHoldSeatsForUser(numberOfSeatsRequested,b1,numberOfSeatsRequested);\n\n\t\tif(!testScreen.equals(getExpectedScreen(\"4\"))){\n\t\t\tthrow (new Exception(\"Test case 4 failed due to expected screen is: \"\n\t\t\t\t\t+ \"\\n\" + getExpectedScreen(\"4\") + \"\\n Actual is: \\n \" + testScreen));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@Test\n public void testBusinessClassReservationMethods() {\n \n busClassRes = new BusinessClassReservation(\"Passenger, One\", planeOneClass , true); //1A\n busClassRes.findSeat();\n\n busClassRes = new BusinessClassReservation(\"Passenger, Two\", planeOneClass, false); //1B\n busClassRes.findSeat();\n\n //firstClassRes = new FirstClassReservation(\"Passenger, Three\", planeOneClass, true); //2A\n //firstClassRes.findSeat();\n \n //firstClassRes = new FirstClassReservation(\"Passenger, Three\", planeOneClass, true); //2E\n //firstClassRes.findSeat();\n \n //firstClassRes = new FirstClassReservation(\"Passenger, Three\", planeOneClass, true); //3A\n //firstClassRes.findSeat();\n \n boolean[][] currentSeat = planeOneClass.getSeatOccupationMap();\n assertTrue(currentSeat[0][0]);\n assertTrue(currentSeat[0][1]);\n //assertTrue(currentSeat[1][0]);\n //assertTrue(currentSeat[1][5]);\n //assertTrue(currentSeat[2][0]);\n //assertTrue(currentSeat[2][5]);\n }", "public static void createAllergyRecords(final Context context, final HashMap<String, String> data) {\n\n // Set initial state\n loader.setVisibility(View.VISIBLE);\n allergyRecyclerViewList.setVisibility(View.GONE);\n\n // Url\n String url = ServiceUrls.KEY_HEALTHBOOK_ALLERGIES.concat(StringConstants.KEY_CREATE);\n\n // Set data\n final HashMap<String, Object> postData = new HashMap<>();\n postData.put(StringConstants.KEY_PATIENT_ID, SharedPreferenceService.getValue(context, StringConstants.KEY_PATIENT_ID));\n postData.put(StringConstants.KEY_ALLERGY_ID, data.get(StringConstants.KEY_ALLERGY_ID));\n postData.put(StringConstants.KEY_ALLERGY_TYPE, data.get(StringConstants.KEY_ALLERGY_TYPE));\n postData.put(StringConstants.KEY_ALLERGY_KIND_OF_REACTION, data.get(StringConstants.KEY_ALLERGY_KIND_OF_REACTION));\n postData.put(StringConstants.KEY_START_DATE, DateTimeUtils.convertTimestampToUTC(\n Long.valueOf(data.get(StringConstants.KEY_START_DATE))));\n postData.put(StringConstants.KEY_ALLERGY_COMMENTS, data.get(StringConstants.KEY_ALLERGY_COMMENTS));\n\n // Set Headers\n final HashMap<String, String> headers = new HashMap<>();\n headers.put(StaticConstants.KEY_AUTHORIZATION,\n StaticConstants.KEY_BEARER\n .concat(\" \")\n .concat(SharedPreferenceService.getValue(context, StringConstants.KEY_TOKEN)));\n\n\n if (Validation.isConnected(context)) {\n\n /**\n * API Call\n */\n APICallService.PostAPICall(activity, context, url, postData, headers, new APIInterface() {\n\n @Override\n public void onSuccess(JSONObject response) {\n\n try {\n\n // Create in Local Database\n Allergy mAllergyModel = new Allergy(\n SharedPreferenceService.getValue(context, StringConstants.KEY_PATIENT_ID),\n response.getString(StringConstants.KEY_P_ID),\n data.get(StringConstants.KEY_ALLERGY_ID),\n data.get(StringConstants.KEY_ALLERGY_NAME),\n data.get(StringConstants.KEY_SEARCH_LIST_HYPERLINK),\n data.get(StringConstants.KEY_ALLERGY_TYPE),\n data.get(StringConstants.KEY_ALLERGY_KIND_OF_REACTION),\n DateTimeUtils.convertTimestampToDate(Long.valueOf(data.get(StringConstants.KEY_START_DATE))),\n data.get(StringConstants.KEY_ALLERGY_COMMENTS));\n\n mAllergyModel.save();\n allergyBindingAdapter.notifyDataSetChanged();\n readAllergyList(getInstance().getContext());\n\n } catch (Exception e) {\n\n // Show content\n loader.setVisibility(View.GONE);\n allergyRecyclerViewList.setVisibility(View.VISIBLE);\n\n // Log error\n ErrorHandlers.handleError(activity);\n Crashlytics.logException(e);\n }\n }\n\n @Override\n public void onError(VolleyError error) {\n\n // Show content\n loader.setVisibility(View.GONE);\n allergyRecyclerViewList.setVisibility(View.VISIBLE);\n }\n });\n } else {\n\n\n // Show content\n loader.setVisibility(View.GONE);\n allergyRecyclerViewList.setVisibility(View.VISIBLE);\n\n // Internet Not Available\n ErrorHandlers.handleInternetConnectionFailure(activity);\n }\n }", "public static void main(String[] args){\n \r\n Log.registroTraza( \"Iniciando ejecución de la tarea SolicitudesAVencerse\");\r\n \r\n String strSQL, strFechaRecibo, strReqRpta, strRadicado, strIdResp = \"\";\r\n int totalSolAlertadas=0, totalSolVencidas=0;\r\n String[] strTemp = null;\r\n int lgTiempoRpta, lgRestante, lgTiempoConfig; \r\n Vector arrConsecutivos = new Vector();\r\n Vector arrFechasCreacion = new Vector();\r\n Vector arrReqRpta = new Vector();\r\n Vector arrTiempoRpta = new Vector();\r\n Vector arrIdsResp = new Vector();\r\n Comunes comun = new Comunes();\r\n Notificacion n = new Notificacion();\r\n Calendar fechaRecibo = null;\r\n Calendar fechaRpta = null;\r\n Calendar fechaActual = null;\r\n \r\n try{\r\n strSQL = \"select g.txtNroDiasAlerta from buzon.buzon_generales g where g.txtCodigo = 'frmGeneral'\";\r\n String[] strDatosGral = GestionSQL.getFila(strSQL, \"Buzon\");\r\n lgTiempoConfig = Integer.parseInt(strDatosGral[0]);\r\n \r\n strSQL = \"select DISTINCT p.txtRadicado, p.dtFechaCreacion, r.txtReqRpta, r.txtTiempoRpta, p.txtNomCargo from buzon_pqrs p INNER JOIN buzon_retroalimentacion r on (p.txtTipoPQRS = r.txtCodigo) where (p.txtIdEstado <> 'AT' and p.txtIdEstado <> 'CPU') ORDER BY CAST(p.txtRadicado AS SIGNED)\";\r\n Vector arrSols = GestionSQL.consultaSQL(strSQL,\"Buzon\",\"ALERTASSOLS\");\r\n \r\n if (arrSols != null){ \r\n for (int i=0;i<arrSols.size();i++){\r\n strTemp = arrSols.get(i).toString().split(\",\");\r\n arrConsecutivos.add(strTemp[0]);\r\n arrFechasCreacion.add(strTemp[1]);\r\n arrReqRpta.add(strTemp[2]);\r\n arrTiempoRpta.add(strTemp[3]); \r\n arrIdsResp.add(strTemp[4]);\r\n } \r\n\r\n //Obtener los feriados.\r\n\r\n Vector arrFechas = new Vector();\r\n strSQL = \"SELECT d.dtFecha from users.users_dias_no_habiles d order by d.dtFecha\";\r\n arrFechas = GestionSQL.consultaSQL(strSQL, \"Users\", \"FECHAS\"); \r\n\r\n for(int i=0;i<arrConsecutivos.size();i++){\r\n strRadicado = arrConsecutivos.get(i).toString(); \r\n strReqRpta = arrReqRpta.get(i).toString();\r\n strIdResp = arrIdsResp.get(i).toString();\r\n lgRestante = 0; \r\n fechaRecibo = null;\r\n fechaRpta = null;\r\n fechaActual = comun.calcularFechaActual();\r\n\r\n if (strReqRpta.equals(\"S\")){ \r\n lgTiempoRpta = Integer.parseInt(arrTiempoRpta.get(i).toString());\r\n fechaRecibo = Calendar.getInstance(); \r\n\r\n strFechaRecibo = arrFechasCreacion.get(i).toString();\r\n strTemp = strFechaRecibo.split(\"-\"); \r\n fechaRecibo.set(Integer.parseInt(strTemp[0]),(Integer.parseInt(strTemp[1])-1),Integer.parseInt(strTemp[2]));\r\n fechaRecibo.set(Calendar.SECOND, 0);\r\n fechaRecibo.set(Calendar.MILLISECOND, 0); \r\n\r\n fechaRpta= Calendar.getInstance();\r\n fechaRpta.set(Calendar.SECOND, 0);\r\n fechaRpta.set(Calendar.MILLISECOND, 0); \r\n fechaRpta = comun.incrementarDiasHabiles(fechaRecibo, lgTiempoRpta, arrFechas); \r\n\r\n lgRestante = (comun.getDiasHabiles(fechaActual, fechaRpta, arrFechas)-1); \r\n\r\n if ((lgRestante <= lgTiempoConfig) && (lgRestante > 0)){ \r\n n.NotificacionSolAVencer(strRadicado, Long.valueOf(lgRestante + 1), strIdResp); \r\n totalSolAlertadas = totalSolAlertadas + 1;\r\n }else{\r\n if (lgRestante<0){\r\n n.NotificacionSolVencidas(strRadicado, fechaRpta, strIdResp);\r\n totalSolVencidas = totalSolVencidas + 1;\r\n } \r\n } \r\n } \r\n }\r\n }\r\n }catch(Exception e){\r\n Log.registroTraza(\"Se generó un error en la tarea SolicitudesAVencerse: \" + e.getMessage());\r\n }\r\n\r\n SimpleDateFormat formato = new SimpleDateFormat(\"hh:mm:ss\");\r\n Log.registroTraza( \"Tarea SolicitudesAVencerse invocada a la hora: \" + formato.format(new Date()) + \". Solicitudes alertadas: \" + totalSolAlertadas + \". Solicitudes vencidas: \" + totalSolVencidas);\r\n\r\n }", "public void initdata(){\n\n sectionList.clear();\n apnmntList.clear();\n\n ///get the list of date\n db.collection(\"appointmentsColl\").document(UserId)\n .collection(\"Date\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n\n for(QueryDocumentSnapshot queryDocumentSnapshot : task.getResult()){\n\n ///get the list of appointments inside the same date\n db.collection(\"appointmentsColl\").document(UserId)\n .collection(\"Date\").document(queryDocumentSnapshot .getId())\n .collection(\"appointmentsID\")\n .get()\n .addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n apnmntList = new ArrayList();\n for (DocumentSnapshot querysnapshot: task.getResult()){\n\n ///save appointment fields to class\n apnmtDetails details = new apnmtDetails(\n querysnapshot.getString(\"customer name\"),\n querysnapshot.getString(\"barberID\"),\n querysnapshot.getString(\"shop name\"),\n querysnapshot.getString(\"name\"),\n querysnapshot.getString(\"type\"),\n querysnapshot.getString(\"status\"),\n querysnapshot.getString(\"price\"),\n querysnapshot.getString(\"time slot\"),\n querysnapshot.getString(\"date\"),\n querysnapshot.getString(\"customerID\"),\n userType,\n querysnapshot.getId(),\n querysnapshot.getString(\"review\")\n );\n\n if(!details.getServicestatus().equalsIgnoreCase(\"Completed\")){\n ///adding appointmnets into an arraylist\n apnmntList.add(details);\n ///saving the value of the section title and the appointments arraylist inside one object\n String tempdate = queryDocumentSnapshot .getString(\"date\");\n\n DateTimeFormatter f = new DateTimeFormatterBuilder().parseCaseInsensitive()\n .append(DateTimeFormatter.ofPattern(\"dd/MMM/yyyy\")).toFormatter(Locale.ENGLISH);\n\n LocalDate datetime = LocalDate.parse(tempdate, f);\n\n section = new Section(queryDocumentSnapshot .getString(\"date\"),datetime,apnmntList);\n }\n }\n\n ///check if date exist but there is no appointment\n if(section.getSectionItem() == null){\n\n section.setSectionName(null);\n\n }else{\n ////initializing a new array list with the section's objects\n sectionList.add(section);\n\n ///remove duplicates if there are any\n Set<Section> set = new HashSet<>(sectionList);\n sectionList.clear();\n sectionList.addAll(set);\n\n ///sort according to date\n Collections.sort(sectionList, new Comparator<Section>() {\n public int compare(Section o1, Section o2) {\n return o1.getSectionDate().compareTo(o2.getSectionDate());\n }\n });\n ///notify main recyclerview\n mainRecyclerAdapter.notifyDataSetChanged();\n }\n }\n });\n\n }\n }\n });\n }", "public ReservationApi()\r\n {\r\n }", "public static void main(String[] args) {\n Scanner s=new Scanner(System.in);\r\n int amount;\r\n \r\n //Calendar calendar = Calendar.getInstance();\r\n System.out.println(\"Enter the name : \");\r\n String name=s.next();\r\n System.out.println(\"Enter the address : \");\r\n String address=s.next();\r\n System.out.println(\"Number of rooms : \");\r\n int number=s.nextInt();\r\n System.out.println(\"Number of persons : \");\r\n int person=s.nextInt();\r\n System.out.println(\"AC or Non-AC : \");\r\n String option=s.next();\r\n System.out.println(\"Booking Date : \");\r\n String start =s.next();\r\n LocalDate ds = LocalDate.parse(start);\r\n System.out.println(\"Checkout Date : \");\r\n String end = s.next();\r\n LocalDate de = LocalDate.parse(end);\r\n long totaldays = ChronoUnit.DAYS.between(ds,de);\r\n //calendar.add(calendar.DATE, 5);\r\n //Date check=calendar.getTime();\r\n \r\n \r\n System.out.println(\"--------Registration Details--------\");\r\n System.out.println(\"Name:\"+name); \r\n System.out.println(\"Address:\"+address); \r\n System.out.println(\"No of rooms:\"+number);\r\n System.out.println(\"No of guest:\"+person);\r\n System.out.println(\"AC:\"+option);\r\n System.out.println(\"No of days:\"+totaldays);\r\n //System.out.println(\"Amount:\"+amount); \r\n int rent=500,ac=150,person1=250;\r\n int acperson=person1/number;\r\n if(option.contentEquals(\"yes\"))\r\n { \r\n int amount1=(int)((person1*number)*totaldays+acperson*ac);\r\n System.out.println(\"Amount:\"+amount1);\r\n }\r\n else\r\n {\r\n \tint amount2=(int)((int)person*number*totaldays+ac+250);\r\n \tSystem.out.println(\"Amount:\"+amount2);\r\n \t\r\n }\r\n\t}", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private void SaveAppoint(View view)\n {\n String userIdStr = getSharedPreferences(\"prefs\",0).getString(\"Id_User\", \"\");\n if(userIdStr.equals(\"\"))\n {\n Intent i = new Intent(this, LoginActivity.class);\n startActivity(i);\n finish();\n return;\n }\n\n dbAdapter = new DbAdapter(this);\n\n //covert unix-datetime (in seconds) to string\n Date appointTime = new Date(dateTimeUnix * 1000L);\n SimpleDateFormat sdf = new SimpleDateFormat(\"EEE, d MMM yyyy hh:mm aaa\");\n AppointmentTime = sdf.format(appointTime);\n\n //bind model\n bModel = new Booking();\n userIdStr = getSharedPreferences(\"prefs\", 0).getString(\"Id_User\", \"1\");\n int userIdInt = Integer.parseInt(userIdStr);\n bModel.setId_User(userIdStr);\n bModel.setAppointmentTime(this.AppointmentTime);\n bModel.setClinic(txtV.getText().toString());\n bModel.setCreationTime(sdf.format( Calendar.getInstance().getTime() ));\n if(spinDrList.getSelectedItemPosition() == 0)\n {\n Snackbar.make(view, \"Select a doctor\", Snackbar.LENGTH_LONG).show();\n return;\n }\n bModel.setDoctor(VariablesGlobal.DrProfiles.get(spinDrList.getSelectedItemPosition() -1).name);\n bModel.setDRAVAILABLE(\"1\");\n bModel.setId_Doc((VariablesGlobal.DrProfiles.get(spinDrList.getSelectedItemPosition() - 1)).id_doc);\n\n //make json from model\n formData = gson.toJson(bModel);\n\n //chk if u r coming from List of appoints or from Map\n if (app == null) //i.e. Coming from Map, hence a non-existing booking, so create a new one\n {\n\n paramsApiUri[0] = VariablesGlobal.API_URI + \"/api/values/newAppointment\";\n paramsApiUri[1] = formData;\n paramsApiUri[2] = \"POST\";\n }\n else\n {\n int appointId = getSharedPreferences(\"prefs\", 0).getInt(\"Id_Appointment\", 0);\n paramsApiUri[0] = VariablesGlobal.API_URI + \"/api/values/UpdateAppoint/\" + appointId;\n paramsApiUri[1] = formData;\n paramsApiUri[2] = \"POST\";\n }\n\n //pass args to AsyncTask to read db\n dbAdapter.execute(paramsApiUri);\n if(Bookings_AllActivity.instance != null)\n {\n Bookings_AllActivity.instance.finish();\n }\n }", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "private ApiReturnModel getBookingsOnclinic(Clinic clinic,String date) {\n\t\tlogger.debug(\"In get bookings on clinic\");\r\n\t\tUtils utils=new Utils();\r\n\t\tApiReturnModel returnModel = null;\r\n\t\tList<BookingModel> bookings=null;\r\n\t\t\r\n\t\tif(date!=null){\r\n\t\t\tDate bookingByDate=utils.convertStringToDateOnly(date);\r\n\t\t\tbookings = contentDao.findBookingsOnClinic(clinic,utils.convertStringToDateOnly(bookingByDate));\r\n\t\t}else\r\n\t\t\tbookings = contentDao.findBookingsOnClinic(clinic);\r\n\t\t// User user=userDao.findByid(Integer.parseInt(userId));\r\n\t\treturnModel=commonReturnBookingModel(bookings);\r\n\t\treturn returnModel;\r\n\t}", "public static int room_booking(int start, int end){\r\n\r\n\t\tint selected_room = -1;\r\n\t\t// booking_days list is to store all the days between start and end day\r\n\t\tList<Integer> booking_days = new ArrayList<>();\r\n\t\tfor(int i=start;i<=end; i++) {\r\n\t\t\tbooking_days.add(i);\r\n\t\t}\r\n\r\n\t\tfor(int roomNo : hotel_size) {\r\n\r\n\t\t\tif(room_bookings.keySet().contains(roomNo)) {\r\n\t\t\t\tfor (Map.Entry<Integer, Map<Integer,List<Integer>>> entry : room_bookings.entrySet()) {\r\n\r\n\t\t\t\t\tList<Integer> booked_days_for_a_room = new ArrayList<Integer>();\r\n\t\t\t\t\tif(roomNo == entry.getKey()) {\r\n\t\t\t\t\t\tentry.getValue().forEach((bookingId, dates)->{\r\n\t\t\t\t\t\t\tbooked_days_for_a_room.addAll(dates);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tList<Integer> check_elements = new ArrayList<Integer>();\r\n\t\t\t\t\t\tfor(int element : booking_days) {\r\n\t\t\t\t\t\t\tif(booked_days_for_a_room.contains(element)) {\r\n\t\t\t\t\t\t\t\tstatus = false;\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\telse {\r\n\t\t\t\t\t\t\t\tcheck_elements.add(element);\r\n\t\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\t\tstatus = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(status) {\r\n\t\t\t\t\t\t\tselected_room = roomNo;\r\n\t\t\t\t\t\t\treturn selected_room;\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\telse {\r\n\t\t\t\tselected_room = roomNo;\r\n\t\t\t\tstatus = true;\r\n\t\t\t\treturn selected_room;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn selected_room;\r\n\t}", "public void submitRequest(String location, WebViewModel vmodel) {\n String weatherUrl = \"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/\" + location + \"?key=QZ2CJDXT7CYASXM6598KXSPDX\";\n //URL below is free API testing\n //String weatherUrl = \"https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/%22%20+%20location%20+%20%22?key=QZ2CJDXT7CYASXM6598KXSPDX\";\n\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest\n (Request.Method.GET, weatherUrl, null, new Response.Listener<JSONObject>() {\n\n @RequiresApi(api = Build.VERSION_CODES.N)\n @Override\n public void onResponse(JSONObject response) {\n String cityName = \"\";\n String countryName = \"\";\n String time = \"\";\n String temperature = \"\";\n String maxTemp = \"\";\n String minTemp = \"\";\n String skyCondition = \"\";\n String humidity = \"\";\n String tomorrow = \"\";\n String tonight = \"\";\n JSONArray daysArray;\n SimpleDateFormat dateProperFormat;\n\n try {\n location_splicer(response.getString(\"resolvedAddress\"));\n } catch(JSONException e) {\n System.out.println(\"Error gathering location\");\n }\n try {\n cityName = cityName + cityName_holder;\n } catch (Exception e) {\n System.out.println(\"Error gathering cityName\");\n }\n try {\n countryName = countryName + countryName_holder;\n } catch (Exception e) {\n System.out.println(\"Error gathering countryName\");\n }\n\n //Let's get weather objects for each day.\n try {\n daysArray = response.getJSONArray(\"days\");\n } catch (JSONException e) {\n e.printStackTrace();\n daysArray = null;\n System.out.println(\"ERROR DAYSARRAY\");\n }\n\n try {\n Date currentTime = Calendar.getInstance().getTime();\n Locale locale = Locale.getDefault();\n dateProperFormat =\n new SimpleDateFormat (\"yyyy-MM-dd\", locale);\n\n time = daysArray.getJSONObject(0).getString(\"datetime\");\n\n }catch (JSONException e) {\n System.out.println(\"Error gathering time\");\n }\n\n try {\n temperature = daysArray.getJSONObject(0).getString(\"temp\");\n //temperature = response.getJSONObject(\"currentConditions\").getString(\"temp\");\n if (temperature.length() > 2) {\n temperature = temperature.substring(0,2);\n }\n //temperature = response.getJSONArray(\"days\").getJSONObject(0).getString(\"temp\");\n }catch (JSONException e) {\n System.out.println(\"Error gathering temperature\");\n }\n try {\n maxTemp = daysArray.getJSONObject(0).getString(\"tempmax\");\n } catch (JSONException e) {\n System.out.println(\"Error getting max temperature\");\n }\n try {\n minTemp = daysArray.getJSONObject(0).getString(\"tempmin\");\n } catch (JSONException e) {\n System.out.println(\"Error getting max temperature\");\n }\n try {\n skyCondition = daysArray.getJSONObject(0).getString(\"icon\");\n\n //response.getJSONObject(\"currentConditions\").getString(\"conditions\");\n } catch (JSONException e) {\n System.out.println(\"Error gathering conditions\");\n }\n try {\n humidity = daysArray.getJSONObject(0).getString(\"humidity\");\n } catch (JSONException e) {\n System.out.println(\"Error gathering humidity\");\n }\n try {\n JSONArray hours = daysArray.getJSONObject(0).getJSONArray(\"hours\");\n tonight = \"unknown\";\n for (int i = 0; i < hours.length(); i++) {\n if (hours.getJSONObject(i).getString(\"datetime\").equals(\"23:00:00\")) {\n tonight = hours.getJSONObject(i).getString(\"temp\");\n }\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n try {\n tomorrow = daysArray.getJSONObject(1).getString(\"tempmax\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n WeatherReport newReport = new WeatherReport(cityName, countryName);\n\n newReport.updateWeatherReport(time, temperature, condition_parcer(skyCondition), humidity, maxTemp, minTemp, tomorrow, tonight);\n System.out.println(\"***JSON DATA***\");\n System.out.println(time);\n System.out.println(cityName);\n System.out.println(countryName);\n System.out.println(temperature);\n System.out.println(skyCondition);\n System.out.println(newReport.getHumidity());\n vmodel.addWeatherReport(newReport, context);\n System.out.println(\"Checking vmodel: \" +\n vmodel.getRecentReport().getLocationName_city() +\n \" is set as current city\");\n\n }\n }, error -> System.out.println(\"ERROR GETTING WEATHER\"));\n\n\n // Access the RequestQueue through your singleton class.\n this.addToRequestQueue(jsonObjectRequest);\n\n }", "public Booking makeBooking(Customer customer, Airline flight, int baggage, String type, Date date);", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public void bookHotelScenarioTest() throws BookHotelFault, DatatypeConfigurationException, CancelHotelFault{\n // Booking of an hotel in Paris\n BookHotelInputType input = CreateBookHotelInputType(\"booking_Hotel_4\", \"Tick Joachim\", \"50408824\", 2, 11);\n boolean result = bookHotel(input);\n assertEquals(true, result);\n System.out.println(\"first test result: \" + result); \n \n if(result == true){\n // Trying to get the list of hotel from Paris and we should have only one hotel because the NY hotel is already booked\n GetHotelInputType getInput = CreateGetHotelInputType(\"Paris\");\n GetHotelsOutputType getOutput = getHotels(getInput);\n int expectedNbHotels = 1;\n int resultNbHotels = 0;\n if (getOutput.getHotelInformations().isEmpty() == false){\n resultNbHotels = getOutput.getHotelInformations().size();\n } \n cancelHotel(\"booking_Hotel_4\");\n assertEquals(expectedNbHotels, resultNbHotels); \n } \n else {\n assertEquals(true, false);\n }\n }", "@BeforeAll\n public static void setUp() {\n\n unsolvedCourseSchedule = new RoomSchedule();\n\n \n // fixed periods I'm defining\n \tRoomPeriods fixedRoomPeriod1=new RoomPeriods(1, 1);\n \tfixedRoomPeriod1.setSessionName(\"Session Fixed 1\");\n \t\n \tRoomPeriods fixedRoomPeriod2=new RoomPeriods(1, 2);\n \tfixedRoomPeriod2.setSessionName(\"Session Fixed 2\");\n \t\n // I'm adding fixed periods to schedule, these are known fixed schedule items\n \tunsolvedCourseSchedule.getLectureList().add(fixedRoomPeriod1);\n \tunsolvedCourseSchedule.getLectureList().add(fixedRoomPeriod2); \n \n /* I'm adding 10 more schedule items which are [null,null] , I'm expecting optoplanner assign period and room numbers. \n * [ THEY ARE LINKED with annotations, @PlanningVariable,\t@ValueRangeProvider(id = \"availablePeriods\", @ProblemFactCollectionProperty]\n */\n for(int i = 0; i < 10; i++){ \t \t\n unsolvedCourseSchedule.getLectureList().add(new RoomPeriods()); \n }\n \n // \n unsolvedCourseSchedule.getPeriodList().addAll(Arrays.asList(new Integer[] { 1, 2, 3 }));\n unsolvedCourseSchedule.getRoomList().addAll(Arrays.asList(new Integer[] { 1, 2 }));\n }", "public interface APIInterface {\n// @GET(\"api/home/books\")\n// Call<BookListResponse> getBookList();\n//\n// @GET(\"api/home/tests\")\n// Call<BookListResponse> getTestList();\n//\n// @GET(\"api/home/banners\")\n// Call<BannerResponse> getBanners();\n//\n\n @GET\n Call<LectureResponse> loadLectures(@Url String url);\n\n @GET\n Call<HomeResponse> loadHomePageFromApi(@Url String url);\n\n @GET(\"api/root\")\n Call<RootApiResponse> loadApiList();\n\n @GET\n Call<BannerResponse> loadBanners(@Url String url);\n\n @GET\n Call<BookListResponse> loadBookList(@Url String url);\n\n @GET\n Call<PracticeDetailResponse> loadPracticeDetail(@Url String url);\n\n @GET\n Call<PracticeListResponse> loadPracticeList(@Url String url);\n\n @GET\n Call<SectionResponse> loadSections(@Url String url);\n\n @GET\n Call<QuestionResponse> loadQuestion(@Url String url);\n\n @GET\n Call<ReadingTestResponse> loadReadingTest(@Url String url);\n\n @GET\n Call<ReadingQuestionResponse> loadReadingAnswer(@Url String url);\n\n @GET\n Call<AudioListRespone> loadAudioList(@Url String url);\n\n @FormUrlEncoded\n @POST\n Call<LoginResponse> login(@Url String url,\n @Field(\"email\") String username,\n @Field(\"password\") String password,\n @Field(\"facebookId\") String facebookId,\n @Field(\"googlePlusId\") String googlePlusId);\n\n @FormUrlEncoded\n @POST\n Call<BaseResponse> logout(@Url String url,\n @Field(\"accessToken\") String accessToken);\n}", "public List<Room> findAppropriate(String applicationId) throws DAOException {\n List<Room> rooms = new ArrayList<Room>();\n Map<Integer, Integer> dayCompletionList;\n boolean isAvailable = true;\n int minPlacesAvailable;\n int neededPlacesAmount = 0;\n Date mainArrival = null;\n Date mainDeparture = null;\n PreparedStatement statement = null;\n PreparedStatement getApplicationData = null;\n PreparedStatement getRoomType = null;\n PreparedStatement getApplicationsForRoom = null;\n ResultSet applicationDataResultSet;\n ResultSet resultSet;\n ResultSet roomTypeResultSet;\n ResultSet applicationsForRoom;\n try {\n getApplicationData = proxyConnection.prepareStatement(SQL_SELECT_APPLICATION_DATA);\n getApplicationData.setLong(1, Long.parseLong(applicationId));\n\n applicationDataResultSet = getApplicationData.executeQuery();\n if (applicationDataResultSet.next()) {\n neededPlacesAmount = applicationDataResultSet.getInt(1);\n mainArrival = applicationDataResultSet.getDate(2);\n mainDeparture = applicationDataResultSet.getDate(3);\n }\n getRoomType = proxyConnection.prepareStatement(SQL_SELECT_ROOM_TYPE);\n getApplicationsForRoom = proxyConnection.prepareStatement(SQL_SELECT_APPLICATIONS_FOR_ROOM);\n getApplicationsForRoom.setInt(1, CONFIRMED);\n\n statement = proxyConnection.prepareStatement(SQL_SELECT_ROOMS_FOR_APPLICATION);\n statement.setLong(1, Long.parseLong(applicationId));\n\n resultSet = statement.executeQuery();\n while (resultSet.next()) {//all rooms of type\n dayCompletionList = new HashMap<>();\n Room room = new Room();\n room.setId(resultSet.getLong(1));\n room.setMaxPlaces(resultSet.getInt(2));\n room.setPrice(resultSet.getInt(3));\n getRoomType.setLong(1, Long.parseLong(resultSet.getString(4)));\n\n roomTypeResultSet = getRoomType.executeQuery();\n if (roomTypeResultSet.next()) {\n room.setType(roomTypeResultSet.getString(1));\n }\n getApplicationsForRoom.setLong(2, room.getId());\n getApplicationsForRoom.setDate(3, mainDeparture);\n getApplicationsForRoom.setDate(4, mainArrival);\n\n applicationsForRoom = getApplicationsForRoom.executeQuery();\n //number of day from 0 year\n int firstDay;\n int lastDay;\n int placesAmount = 0;\n minPlacesAvailable = room.getMaxPlaces();\n //through all confirmed applications for current room (only in case smn has already booked it)\n while (applicationsForRoom.next()) {\n placesAmount = applicationsForRoom.getInt(1);\n firstDay = applicationsForRoom.getInt(2);\n lastDay = applicationsForRoom.getInt(3);\n Integer i = firstDay;\n while (i <= lastDay) {\n if (dayCompletionList.containsKey(i)) {\n dayCompletionList.put(i, dayCompletionList.get(i) + placesAmount);\n } else {\n dayCompletionList.put(i, placesAmount);\n }\n i++;\n }\n }\n //заполненность дней по подтвержденным заявкам (сколько уже занято)\n for (int amount : dayCompletionList.values()) {\n if (room.getMaxPlaces() - amount < minPlacesAvailable) {\n //сколько осталось мест на такой период\n minPlacesAvailable = room.getMaxPlaces() - amount;\n }\n if (amount + neededPlacesAmount > room.getMaxPlaces()) {\n isAvailable = false;\n }\n }\n if (isAvailable) {\n room.setFreePlaces(minPlacesAvailable);\n rooms.add(room);\n }\n }\n } catch (SQLException e) {\n throw new DAOException(e);\n } finally {\n close(statement);\n close(getApplicationData);\n close(getApplicationsForRoom);\n close(getRoomType);\n }\n return rooms;\n }", "public interface Jsonkey {\n\n /*Basic key*/\n public static final String statusCode = \"status_code\";\n public static final String message = \"message\";\n\n\n\n public static final String KEY_CarDeatils = \"cardetail\";\n public static final String Id= \"carId\";\n public static final String Vin = \"vin\";\n public static final String rfid= \"rfid\";\n public static final String make = \"make\";\n public static final String modelYear = \"modelYear\";\n public static final String lotCode = \"lotCode\";\n public static final String color = \"color\";\n public static final String modelNumber = \"modelNumber\";\n public static final String price = \"KEY_price\";\n public static final String miles = \"miles\";\n public static final String fuel = \"fuel\";\n public static final String driveType = \"driveType\";\n public static final String cylinder = \"cylinder\";\n public static final String vehicleType = \"vehicleType\";\n public static final String hasTitle = \"hasTitle\";\n public static final String locationTitle = \"locationTitle\";\n public static final String company = \"company\";\n public static final String stockNumber = \"stockNumber\";\n public static final String purchasedFrom = \"purchasedFrom\";\n public static final String note = \"note\";\n public static final String noteDate = \"noteDate\";\n public static final String gpsInstalled = \"gpsInstalled\";\n public static final String vehicleStatus = \"vehicleStatus\";\n public static final String hasRfid = \"hasRfid\";\n public static final String vacancy = \"vacancy\";\n public static final String vehicleStage = \"vehicleStage\";\n public static final String serviceStage = \"serviceStage\";\n public static final String problem = \"problem\";\n public static final String doneDate = \"doneDate\";\n public static final String doneDateLotCode = \"doneDateLotCode\";\n public static final String mechanic = \"mechanic\";\n public static final String auctionName = \"auctionName\";\n public static final String auctionDate = \"auctionDate\";\n public static final String carReadyForAuction = \"carReadyForAuction\";\n public static final String carAtAuction = \"carAtAuction\";\n public static final String companyInsuranceImage = \"companyInsuranceImage\";\n public static final String registrationDate = \"registrationDate\";\n public static final String insuranceDate = \"insuranceDate\";\n public static final String gasTank = \"gasTank\";\n public static final String hasLocation = \"hasLocation\";\n public static final String model = \"model\";\n public static final String maxHp = \"maxHp\";\n public static final String maxTorque = \"maxTorque\";\n public static final String fuelType = \"fuelType\";\n public static final String oilCapacity = \"oilCapacity\";\n public static final String gps = \"gps\";\n public static final String title = \"title\";\n public static final String count = \"count\";\n public static final String inGps = \"inGps\";\n public static final String images= \"images\";\n public static final String stage= \"stage\";\n public static final String salesPrice= \"salesPrice\";\n\n\n /* \"images\": [\n \"http://drivehere.com/inventory2/app/webroot/files/images/1480782684373Image.jpeg\",\n \"http://drivehere.com/inventory2/app/webroot/files/images/1480782687411.jpg\",\n \"http://drivehere.com/inventory2/app/webroot/files/images/1480974299633Image.jpeg\"\n ],\n \"imageCompanyInsurance\": null,\n \"imageCount\": 3,\n \"userId\": \"0\",\n \"purchasePrice\": \"6295.00\",\n \"reconExp\": \"\",\n \"tradeInAmount\": \"0.00\",\n \"cost\": \"0.00\",\n \"salesPrice\": \"0.00\",\n \"userWhoUploaded\": \"50\",\n \"dateSold\": \"0000-00-00 00:00:00\",\n \"customerFullName\": \"\",\n \"mpgCity\": \"\",\n \"mpgHighway\": \"\",\n \"transmissionType\": \"\",\n \"gears\": \"\",\n \"\": \"Ready\",\n \"dateoneInformation\": \"\",\n \"createdDate\": \"2016-11-29 05:50:42\",\n \"modifiedDate\": \"2017-01-13 11:31:20\",\n \"atTheAuction\": \"\",\n \"floorPrice\": \"\",\n \"condition\": \"\",\n \"auctionMile\": \"\",\n \"auctionNote\": \"\",\n \"carReady\": \"\",\n \"status\": \"0\",\n \"scannDate\": \"2017-01-13 09:31:10\",\n \"stageDate\": \"12/05/2016\",\n \"insuranceExpirationDate\": \"0000-00-00\",\n \"inspectionExperationDate\": \"0000-00-00\",\n \"isDecode\": \"false\",\n \"greetingMiles\": \"\",\n \"missing\": null*/\n}", "public interface API {\r\n\r\n // String SERVER_URL = \"http://192.168.11.150:8080\";\r\n// String SERVER_URL = \"http://10.0.2.2:8080/\";\r\n String SERVER_URL = \"http://societyfocus.com/\";\r\n String API_PATH_PATTERN = \"service/\";\r\n\r\n interface ILoginHeaderParams {\r\n String SOCIETY = \"X-Society\";\r\n String USERNAME = \"X-Username\";\r\n String PASSWORD = \"X-Password\";\r\n String DEVICE_ID = \"X-DeviceID\";\r\n String DEVICE_IDOld = \"X-DeviceIDOld\";\r\n String ACCESS_TOKEN = \"X-AccessToken\";\r\n }\r\n\r\n interface IPostLoginHeaderParams {\r\n String AUTH_TOKEN = \"X-Auth-Token\";\r\n\r\n }\r\n\r\n interface IAssetParams {\r\n String ID = \"id\";\r\n }\r\n\r\n interface IEventParams {\r\n String MONTH = \"month\";\r\n String YEAR = \"year\";\r\n }\r\n\r\n @GET(API_PATH_PATTERN + \"social/fblogin\")\r\n public Call<LoginResponse>\r\n fblogin(@Header(ILoginHeaderParams.DEVICE_ID) String deviceID,\r\n @Header(ILoginHeaderParams.DEVICE_IDOld) String deviceIDOld,\r\n @Query(\"accesstoken\") String FBToken);\r\n\r\n @GET\r\n public Call<GraphPhotoResponse> graphcall(@Url String url);\r\n\r\n @POST(API_PATH_PATTERN + \"access/login\")\r\n public Call<LoginResponse>\r\n login(@Header(ILoginHeaderParams.SOCIETY) String society,\r\n @Header(ILoginHeaderParams.USERNAME) String username,\r\n @Header(ILoginHeaderParams.PASSWORD) String password,\r\n @Header(ILoginHeaderParams.DEVICE_ID) String deviceID,\r\n @Header(ILoginHeaderParams.DEVICE_IDOld) String deviceIDOld);\r\n\r\n @POST(API_PATH_PATTERN + \"upload/image/base64\")\r\n public Call<UploadImageResponse> uploadimage(@Body UploadImage uploadImage);\r\n\r\n @GET(API_PATH_PATTERN + \"v1/comment/add/complaint_{Complaint_ID}/{MESSAGE}\")\r\n public Call<AddCommentResponse> getAddComment(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken,\r\n @Path(\"Complaint_ID\") String complaintID, @Path(\"MESSAGE\") String message);\r\n\r\n @GET(API_PATH_PATTERN + \"user/getalluser\")\r\n public Call<MembersResponse> getAllUsers(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken);\r\n\r\n @GET(API_PATH_PATTERN + \"society/asset/getall\")\r\n public Call<AssetsResponse> getAllSocietyAssets(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken);\r\n\r\n @GET(API_PATH_PATTERN + \"society/panel\")\r\n public Call<PanelResponse> getSocietyPanel(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken);\r\n\r\n @GET(API_PATH_PATTERN + \"society\")\r\n public Call<SocietyListResponse> getSocietyList();\r\n\r\n @POST(API_PATH_PATTERN + \"v1/complaint/save\")\r\n public Call<ComplaintResponse> saveComplaint(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Body Complaint complaint);\r\n\r\n @GET(API_PATH_PATTERN + \"v1/complaint/getusercomplaint\")\r\n public Call<ComplaintListResponse> getUserComplaints(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken);\r\n\r\n @GET(API_PATH_PATTERN + \"v1/complaint/get/{id}\")\r\n public Call<ComplaintCommentResponse> getComplaintDetails(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Path(\"id\") String complaintID);\r\n\r\n @POST(API_PATH_PATTERN + \"user/modifymyuser\")\r\n public Call<UserResponse> modifyUser(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Body User user);\r\n\r\n @GET(API_PATH_PATTERN + \"user/modify/oldpass/{oldpassword}/newpass/{newpassword}/email/{email}\")\r\n public Call<BaseResponse> modifyPassword(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Path(\"oldpassword\") String oldpassword, @Path(\"newpassword\") String newpassword, @Path(\"email\") String email);\r\n\r\n @POST(API_PATH_PATTERN + \"society/asset/book\")\r\n public Call<BookAssetResponse> saveAssetBooking(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Body BookAsset bookAsset);\r\n\r\n @POST(API_PATH_PATTERN + \"society/asset/getassetbyuser\")\r\n public Call<AssetbookingByUserResponse> getAssetBooking(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken);\r\n\r\n @GET(API_PATH_PATTERN + \"vehicle/getvehilcebynumber/{vehiclenumber}\")\r\n public Call<CarSearchResponse> searchVehicleNumber(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Path(\"vehiclenumber\") int vehiclenumber);\r\n\r\n @GET(API_PATH_PATTERN + \"society/noticeboard/getall\")\r\n public Call<NoticeBoardResponse> getAllNotices(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken);\r\n\r\n @POST(API_PATH_PATTERN + \"society/noticeboard/add\")\r\n public Call<AddNewNoticeResponse> addNewNotice(@Header(IPostLoginHeaderParams.AUTH_TOKEN) String authToken, @Body AddNewNotice newNotice);\r\n}", "private void getData(){\n StringRequest stringRequest = new StringRequest(\n Request.Method.GET,\n Constants.BOILER_URL+mechID+\"/\"+SharedPrefManager.getInstance(this).getUsertype(),\n\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n JSONObject j = null;\n try {\n //Parsing the fetched Json String to JSON Object\n j = new JSONObject(response);\n\n //Storing the Array of JSON String to our JSON Array\n JSONObject result = j.getJSONObject(\"response\");\n\n String address1=result.getString(\"address1\");\n String address2=result.getString(\"address2\");\n String inspname=result.getString(\"insname\");\n tvAddr1.setText(address1);\n tvAddr2.setText(address2);\n tvIns.setText(inspname);\n\n //Toast.makeText(getApplicationContext(),result.getString(\"equipments\"), Toast.LENGTH_LONG).show();\n // tvAddr2.setText(equipmentID);\n equip = result.getJSONArray(Constants.BOILER_ARRAY);\n\n //Calling method getEquipment to get the Equipments from the JSON Array\n getEquipment(equip);\n } catch (JSONException e) {\n\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n //Creating a request queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n\n //Adding request to the queue\n requestQueue.add(stringRequest);\n\n }", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n Log.d(\"@@@@@LOOK HERE TIME@@\", show);\n Log.d(\"@@@@@LOOK HERE DATE@@\", show2);\n Log.d(\"@@@@@LOOK HERE DATETIME\", show3);\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n if (start == null) {\n // All-day events don't have start times, so just use\n // the start date.\n start = event.getStart().getDate();\n }\n\n eventStrings.add(\n String.format(\"%s (%s)\", event.getSummary(), start));\n }\n List<String> realStrings = new ArrayList<String>();\n for (String a:eventStrings\n ) {\n // Log.d(\"@@@@\", a);\n String day;\n String korTimeSpeech = null;\n String newSpeech = null;\n day = a.substring(a.indexOf(\"(\"), a.indexOf(\")\"));\n day = day.substring(1);\n\n if(day.length() > 16) {\n int hour = Integer.parseInt(day.substring(11, 13));\n if(hour < 12) {\n korTimeSpeech = \"오전 \";\n } else{\n korTimeSpeech = \"오후 \";\n hour = hour - 12;\n }\n korTimeSpeech = korTimeSpeech + hour + \"시 \" + day.substring(14, 16) + \"분에 \";\n newSpeech = a.substring(0, a.indexOf(\"(\"));\n newSpeech = korTimeSpeech + newSpeech;\n //Make it in day format\n day = day.substring(0, day.indexOf(\"T\"));\n }else {\n // korTimeSpeech = day.substring(11, 13) + \"시 \" + day.substring(14, 16) + \"분에 \";\n newSpeech = a.substring(0, a.indexOf(\"(\"));\n newSpeech = newSpeech;\n }\n\n if (day.equals(nowDay)) {\n realStrings.add(newSpeech);\n }\n }\n\n return realStrings;\n }", "Room mo12151c();", "@Test\n\tpublic void testBook() throws Exception {\n\t\tString createdReservationID = bookingManagement.book(USER_ID, Arrays.asList(room1.getId()),\n\t\t\t\tvalidStartDate, validEndDate);\n\t\t// a reservation must be returned\n\t\tassertNotNull(\"Reservation id is null\", createdReservationID);\n\t\tassertFalse(\"Reservation id is emtpy\", createdReservationID.isEmpty());\n\t\t// check if returned reservation is correct\n\t\tReservation createdReservation = bookingManagement.getReservation(createdReservationID);\n\t\tassertNotNull(\"Reservation of returned id was not found\", createdReservation);\n\n\t\tassertEquals(USER_ID, createdReservation.getBookingUserId());\n\n\t\tassertEquals(1, createdReservation.getBookedFacilityIds().size());\n\t\tassertTrue(createdReservation.getBookedFacilityIds().contains(room1.getId()));\n\t\tassertEquals(validStartDate, createdReservation.getStartTime());\n\t\tassertEquals(validEndDate, createdReservation.getEndTime());\n\t}", "public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }", "public static void main(String[] args) throws IOException {\n Scanner scanner = new Scanner(System.in);\r\n \r\n RoomManager rm = new RoomManager();\r\n String text;\r\n int input = 0;\r\n while (input != 5)\r\n {\r\n System.out.println(\"1. add type, 2. add room, 3. rooms avail, 4. reserve\");\r\n input = scanner.nextInt();\r\n \r\n if (input == 1)\r\n {\r\n System.out.println(\"Enter name of room type\");\r\n text = scanner.next();\r\n rm.AddRoomType(text);\r\n }\r\n if (input == 2)\r\n {\r\n System.out.println(\"Enter room type\");\r\n text = scanner.next();\r\n double money;\r\n int roomn;\r\n System.out.println(\"Enter room number\");\r\n roomn = scanner.nextInt();\r\n System.out.println(\"Enter room cost\");\r\n money = scanner.nextDouble();\r\n rm.AddRoom(text, roomn, money);\r\n }\r\n if (input == 3)\r\n {\r\n LocalDate before = new LocalDate();\r\n LocalDate after = new LocalDate();\r\n System.out.println(\"Enter number of day from now to checkin\");\r\n int days = scanner.nextInt();\r\n before = before.plusDays(days);\r\n System.out.println(\"Enter number of day from now to checkout\");\r\n days = scanner.nextInt();\r\n after = after.plusDays(days);\r\n rm.CheckAvail(before, after);\r\n }\r\n if (input == 4)\r\n {\r\n LocalDate before = new LocalDate();\r\n LocalDate after = new LocalDate();\r\n System.out.println(\"Enter number of day from now to checkin\");\r\n int days = scanner.nextInt();\r\n before.plusDays(days);\r\n System.out.println(\"Enter number of day from now to checkout\");\r\n days = scanner.nextInt();\r\n after.plusDays(days);\r\n System.out.println(\"Enter room type\");\r\n text = scanner.next();\r\n double rmprice = rm.MakeReserve(text, before, after);\r\n System.out.println(rmprice);\r\n //rm.CheckAvail(before, after);\r\n }\r\n }\r\n }", "public void checkOfficeActionPeriod1(){\n\n System.out.println(\"checking Office Action period 1 status for filings : \"+firstOfficeActionDuration);\n\n BaseTradeMarkApplicationService baseTradeMarkApplicationService = serviceBeanFactory.getBaseTradeMarkApplicationService();\n\n\n for(Iterator<BaseTrademarkApplication> iter = baseTradeMarkApplicationService.findAll().iterator(); iter.hasNext(); ) {\n\n BaseTrademarkApplication current = iter.next();\n if(current.getApplicationFilingDate() != null && current.getFilingStatus().equals(\"Non-Final Action Mailed\") == true){\n // check that date + duration against current time\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod() + current.getOfficeActionResponsePeriod()) < new Date().getTime()){\n\n System.out.println(\"Filing has expired from the office action period\");\n\n // check if office action has been completed ..\n for(Iterator<OfficeActions> iter3 = current.getOfficeActions().iterator(); iter3.hasNext(); ) {\n OfficeActions current3 = iter3.next();\n\n if(current3.isOfficeActionCompleted() == false && current.getFilingStatus().contains(\"Abandoned\") == false){\n\n // remove office action ..or set it to inactive\n // so on the dashboard. we only show actions that are active\n //\n // do the same thing. create petition object and attach it to the filing\n Petition petition = new Petition();\n petition.setParentMarkImagePath(current.getTradeMark().getTrademarkImagePath());\n petition.setStandardCharacterMark(current.isStandardTextMark());\n petition.setStandardCharacterText(current.getTradeMark().getTrademarkStandardCharacterText());\n petition.setParentMarkOwnerName(current.getPrimaryOwner().getOwnerDisplayname());\n petition.setParentSerialNumber(current.getTrademarkName());\n petition.setParentRegistrationNumber(current.getRegistrationID());\n\n petition.setActionID(String.valueOf(current3.getInternalID()));\n\n long dueDate = new Date().getTime()+current.getBlackOutPeriod()+current.getOfficeActionResponsePeriod()+current.getPetitionPeriod();\n petition.setDueDate(new Date(dueDate));\n\n\n current.setFilingStatus(\"Abandoned - Failure to Respond or Late Response\");\n petition.setOfficeActionCode(\"Abandoned - Failure to Respond or Late Response\");\n petition.setPetitionTitle(\"Failure to Respond Timely to Office Action\");\n\n petition.setActivePetition(true);\n current.addPetition(petition);\n petition.setTrademarkApplication(current);\n current3.setActiveAction(false);\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Filing Abandoned\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n\n\n // go back and set any active actions to in-active\n //for(Iterator<OfficeActions> iter2 = current.getOfficeActions().iterator(); iter2.hasNext(); ) {\n // OfficeActions current2 = iter2.next();\n // current2.setActiveAction(false);\n\n //}\n\n baseTradeMarkApplicationService.save(current);\n\n\n }\n\n\n\n }\n\n\n\n // only execute below code if office action is not completed...\n\n\n }\n else{\n System.out.println(\"filing is still in respond to office action period or filing is in a different state\");\n\n\n }\n }\n else{\n if(current.getFilingStatus().equals(\"TEAS RF New Application\") || current.getFilingStatus().equals(\"New Application\") ){\n if((current.getApplicationFilingDate().getTime() + current.getBlackOutPeriod() + current.getOfficeActionResponsePeriod() ) < new Date().getTime()){\n boolean acceptedFiling = true;\n\n for(Iterator<OfficeActions> iter4 = current.getOfficeActions().iterator(); iter4.hasNext(); ) {\n OfficeActions current4 = iter4.next();\n if(current4.isActiveAction() && current4.getOfficeActionCode().equals(\"global default action\") == false){\n if(current4.isOfficeActionCompleted() == true){\n // skip examiner review period\n // filing is accepted\n // change filing status\n // create filing document event\n\n current4.setActiveAction(false);\n\n\n\n }\n else {\n acceptedFiling = false;\n\n System.out.println(\"office action is not completed\");\n }\n\n }\n\n\n }\n\n if(acceptedFiling == true){\n current.setFilingStatus(\"Accepted Filing\");\n current.setApplicationAcceptedDate(new Date());\n\n // create accepted filing date\n\n\n\n\n FilingDocumentEvent filingDocumentEvent = new FilingDocumentEvent();\n filingDocumentEvent.setEventDescription(\"Filing Accepted\");\n\n filingDocumentEvent.setDocumentType(\"XML\");\n Date date = new Date();\n filingDocumentEvent.setEventDate(date);\n\n current.addFilingDocumentEvent(filingDocumentEvent);\n\n\n // go back and set any active actions to in-active\n //for(Iterator<OfficeActions> iter2 = current.getOfficeActions().iterator(); iter2.hasNext(); ) {\n // OfficeActions current2 = iter2.next();\n // current2.setActiveAction(false);\n\n //}\n\n baseTradeMarkApplicationService.save(current);\n\n }\n // if there are no office actions ..it is also compelete\n\n }\n // check for accepted filings\n }\n\n\n\n\n\n\n\n\n\n\n\n\n }\n\n }\n\n }", "private void getcolldate(final String outlet) {\n\n String url = outlet + \"billcollection.php?billdate=\" + reqdate;\n JsonObjectRequest jreq = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n try {\n int success = 0;\n try {\n success = response.getInt(\"success\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n if (success == 1) {\n JSONArray ja = response.getJSONArray(\"items\");\n //for (int i = 0; i < ja.length(); i++) {\n // BillCollbean billbean = new BillCollbean();\n JSONObject jobj = ja.getJSONObject(0);\n\n //}\n\n String subtot = jobj.getString(\"sub_tot\");\n String others = jobj.getString(\"scamount\");\n String grndtot = jobj.getString(\"grand_amt\");\n String gstrdisc = jobj.getString(\"discount\");\n\n if ((subtot.equals(\"null\") || subtot == null) && (others.equals(\"null\") || others == null) && (grndtot.equals(\"null\") || grndtot == null)) {\n // Toast.makeText(MainActivity.this, \"Null\",Toast.LENGTH_SHORT).show();\n txtpaidtotal.setText(\"0.00\");\n txtothertotal.setText(\"0.00\");\n txttotalamount.setText(\"0.00\");\n txtdscnttotal.setText(\"0.00\");\n } else {\n /* txtpaidtotal.setText(\"\" + decimvalue.format(Double.parseDouble(subtot)));\n txtothertotal.setText(\"\" + decimvalue.format(Double.parseDouble(others)));\n txttotalamount.setText(\"\" + decimvalue.format(Double.parseDouble(grndtot)));*/\n\n txtpaidtotal.setText(String.format(\"%.2f\", Double.parseDouble(subtot)));\n txtothertotal.setText(String.format(\"%.2f\", Double.parseDouble(others)));\n txttotalamount.setText(String.format(\"%.2f\", Double.parseDouble(grndtot)));\n if (gstrdisc.equals(\"0\") || gstrdisc == \"0\") {\n txtdscnttotal.setText(\"0.00\");\n } else {\n // txtdscnttotal.setText(\"\" + decimvalue.format(Double.parseDouble(gstrdisc)));\n txtdscnttotal.setText(String.format(\"%.2f\", Double.parseDouble(gstrdisc)));\n }\n }\n\n //getparcelamount(outlet);\n\n } else if (success == 0) {\n Toast.makeText(TablesCheck.this, \"No Items found...\", Toast.LENGTH_SHORT).show();\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(jreq);\n }", "public interface API {\n\n //Penyakit\n @GET(\"penyakitall/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @GET(\"penyakit/{page}/{count_page}\")\n Call<DiseaseResponse>\n getDiseaseListByLokasi(@Path(\"page\") String page, @Path(\"count_page\") String count_page, @Query(\"id_desa\") String id_desa);\n\n @POST(\"penyakit\")\n Call<DiseasePostResponse>\n postDisease(@Body DiseaseBody diseaseBody);\n @DELETE(\"penyakit\")\n Call<DeletePenyakitResponse> deletePenyakit(@Query(\"Id_penyakit\") String id_penyakit);\n\n @PUT(\"penyakit\")\n Call<PutPenyakitResponse> editPenyakit(@Query(\"Id_penyakit\") String id_penyakit,\n @Body PutPenyakitBody putPenyakitBody);\n\n @GET(\"tipepenyakit/{page}/{count_page}\")\n Call<TipePenyakitResponse>\n getTipePenyakitList(@Path(\"page\") String page, @Path(\"count_page\") String count_page);\n\n @POST(\"multimedia\")\n Call<MultimediaPostResponse>\n postMultimedia(@Body MultimediaBody multimediaBody);\n}", "private List<String> getDataFromApi() throws IOException {\n // List the next 10 events from the primary calendar.\n DateTime now = new DateTime(System.currentTimeMillis());\n Date nowToday = new Date(System.currentTimeMillis());\n Date now2 = new Date();\n Log.d(\"TIME\", now2.toString()); // Fri Apr 14 11:45:53 GMT-04:00 2017\n String show = DateFormat.getTimeInstance().format(nowToday); // 오후 4:22:40\n String show2 = DateFormat.getDateInstance().format(nowToday); // 2017. 4. 7.\n String show3 = DateFormat.getDateTimeInstance().format(nowToday); // 2017. 4. 7. 오후 4:22:40\n // String show4 = DateFormat.getDateInstance().format(now); 이건 안됌 에러\n\n\n java.text.SimpleDateFormat toDateTime = new java.text.SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ssZ\");\n //Date todayDate = new Date();\n // String todayName = dayName.format(todayDate);\n\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n\n calendar.setTime(nowToday);\n calendar.add(Calendar.HOUR, 2);\n Date twoFromNow = calendar.getTime();\n\n\n\n List<String> eventStrings = new ArrayList<String>();\n Events events = mService.events().list(\"primary\")\n .setMaxResults(10)\n .setTimeMin(now)\n .setTimeMax(new DateTime(twoFromNow, TimeZone.getDefault()))\n .setOrderBy(\"startTime\")\n .setSingleEvents(true)\n .execute();\n\n\n List<Event> items = events.getItems();\n // List<Map<String, String>> pairList = new ArrayList<Map<String, String>>();\n // String nowDay = now.toString().substring(0, now.toString().indexOf(\"T\"));\n\n\n for (Event event : items) {\n DateTime start = event.getStart().getDateTime();\n\n // Only get events with exact start time set, exclude all day\n if (start != null) {\n eventStrings.add(\n String.format(\"%s //// %s)\", event.getSummary(), start));\n }\n\n\n }\n\n return eventStrings;\n }", "public interface ApiInterface {\n String ENDPOINT = \"http://ibacor.com/api/\";\n String API_BMKG = \"bmkg?\";\n String GEMPA = \"view=gempa\";\n\n\n @GET(API_BMKG+GEMPA)\n Call<Data>\n getDataGempa();\n\n class Factory {\n\n public static ApiInterface create(Context context) {\n\n OkHttpClient.Builder builder = new OkHttpClient().newBuilder();\n builder.readTimeout(30, TimeUnit.SECONDS);\n builder.connectTimeout(20, TimeUnit.SECONDS);\n builder.writeTimeout(60, TimeUnit.SECONDS);\n\n if (BuildConfig.DEBUG) {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BASIC);\n builder.addInterceptor(interceptor);\n }\n\n int cacheSize = 10 * 1024 * 1024; // 10 MiB\n Cache cache = new Cache(context.getCacheDir(), cacheSize);\n builder.cache(cache);\n\n OkHttpClient client = builder.build();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(ApiInterface.ENDPOINT)\n .client(client)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create())\n .build();\n\n return retrofit.create(ApiInterface.class);\n }\n }\n\n}", "public void bookRoom(int hotelId, String roomNumber, int people){\n\n\n\n }", "public ArrayList<Timestamp> generateNonSportSchedule(int faculties[], String course[] ,Date startDate, Date endDate){\r\n \t\r\n \t\r\n \tArrayList<CourseStructure > allCourseStructure = new ArrayList<CourseStructure>();\r\n \tArrayList<CourseStructure > tempCourseStructure = new ArrayList<CourseStructure>();\r\n \tArrayList<Timestamp> allFreeSlot = new ArrayList<Timestamp>();\r\n \t\r\n \t\r\n \t// get all structureCourse based on faculty\r\n \tif(faculties.length>0){\r\n \t\tFacultyCourseManager facultyCourseManager = new FacultyCourseManager();\r\n \t\tallCourseStructure = facultyCourseManager.getCourseByFaculty(faculties);\r\n \t}//end if(faculties.length>0)\r\n \t\r\n \t//get all structureCourse based on course\r\n \tif(course.length>0){\r\n \t\tCourseStructureManager coursestructure = new CourseStructureManager();\r\n \t\ttempCourseStructure = coursestructure.getAllCourseStructureByCourse(course);\r\n \t}//end if(course.length>0)\r\n \t\r\n \t//merge both CourseStructure Arraylist\r\n \tfor(int i =0 ; i<tempCourseStructure.size();i++){\r\n \t\tif(!allCourseStructure.contains(tempCourseStructure.get(i))){\r\n \t\t\tallCourseStructure.add(tempCourseStructure.get(i));\r\n \t\t}//end if(!allCourseStructure.contains(tempCourseStructure.get(i))){\r\n \t}//for(int i =0 ; i<tempCourseStructure.size();i++)\r\n \t\r\n \t\r\n \t\r\n \t /* implement a genetic algorithm\r\n \t * to find the best fit date\r\n \t */\r\n \t//variables\r\n \tArrayList<Timestamp> allSolutions = new ArrayList<Timestamp>();\r\n \tArrayList<Integer> solutionFitness = new ArrayList<Integer>();\r\n \tint totalTime,fitnessValue=0;\r\n \tTimestamp time = new Timestamp(startDate.getYear(), startDate.getMonth(), startDate.getDate(), 8, 0, 0, 0);\r\n \tboolean result;\r\n \t//initialize population\r\n \t/*university start at 8a.m to 8p.m\r\n \t * This makes 12 hr\r\n \t * Total time = (endDate -StartDate) * 12\r\n \t */\r\n \t \r\n \t\r\n \tlong daysBetween = endDate.getTime()- startDate.getTime();\r\n \t\r\n totalTime = (int)( (daysBetween * 12)/ (1000 * 60 * 60 * 24) );\r\n allSolutions.add(time);\r\n Calendar calender = Calendar.getInstance();\r\n \tfor(int i=1;i<totalTime;i++){\r\n \t\tif(time.getHours()>0 && time.getHours()<20){\r\n \t\t\tcalender.setTime(time);\r\n \t\t\t\r\n \t\t\tcalender.add(Calendar.HOUR, 1);\r\n \t\t\tlong tim = calender.getTime().getTime();\r\n \t\t\ttime = new Timestamp(tim);\r\n \t\t\tallSolutions.add(time);\r\n \t\t}//end if(time.getHours()>0 && time.getHours()<8){\r\n \t\telse{\r\n \t\t\tcalender.setTime(time);\r\n \t\t\t\r\n \t\t\tcalender.add(Calendar.HOUR, 12);\r\n \t\t\tlong tim = calender.getTime().getTime();\r\n \t\t\ttime = new Timestamp(tim);\r\n \t\t\tallSolutions.add(time); \t\t\t\r\n \t\t}//end else \t\t \t\t\r\n \t}//end for(int i=1;i<totalTime;i++){\r\n \t\r\n \t\r\n \t//fitness\r\n \t/*\r\n \t * if current timetable slot is free = increase by 1\r\n \t * if module is not in current timetable slot = increase by 1\r\n \t * if module is not a degree = increase by 1\r\n \t * if module is not year 3 = increase by 1 \r\n \t */\r\n \tTimetableManager timetableManager = new TimetableManager();\r\n \t//travel through population\r\n \tfor(int i=0; i<allSolutions.size();i++){\r\n \t\t//travel through course Structure\r\n \r\n \t\tfor(int j=0;j<allCourseStructure.size();j++){\r\n \t\t\t\r\n \t\t\t//check for current timetable slot\r\n \t\tint day = allSolutions.get(i).getDay();\r\n \t\tTime temTime = new Time(allSolutions.get(i).getTime());\r\n \t\t\r\n \t\t//check for course structure timetable slot\r\n \t\tresult = timetableManager.findTimetableByDayTime(temTime, getDays(day), allCourseStructure.get(j).getCourse_structure_id());\r\n \t\tif(!result){\r\n \t\t\tfitnessValue++;\r\n \t\t}//end if(!result) \r\n \t\t\t\r\n \t\t}//end for(int j=0;j<allCourseStructure.size();j++){\r\n \t\t\r\n \t\tsolutionFitness.add(fitnessValue);\r\n \t\tfitnessValue = 0;\r\n \t}//end for (int i=0; i<allSolutions.size();i++){\r\n \t\r\n \tint maxFitness = Collections.max(solutionFitness);\r\n \tfor(int i =0 ; i<allSolutions.size();i++){\r\n \t\tif(solutionFitness.get(i) == maxFitness){\r\n \t\t\tallFreeSlot.add(allSolutions.get(i));\r\n \t\t}\t\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \treturn allFreeSlot; \t\r\n }", "public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }", "public static void main(String[] args) {\n\t\t\n\t\tString code=\"4%2F1QFgMB-IBwhzNScNudUsvg4wEwJPFpHUahVAC5hwahXTHpg26ZFeTtC5bl69P55H6_jVbxE8tuD6voRw5d30ZB8\";\n\t\t\n\t\tString authentication = given().log().all().urlEncodingEnabled(false)\n\t\t.queryParam(\"redirect_uri\", \"https://rahulshettyacademy.com/getCourse.php\")\n\t\t.queryParam(\"code\", code)\n\t\t.queryParam(\"client_id\", \"692183103107-p0m7ent2hk7suguv4vq22hjcfhcr43pj.apps.googleusercontent.com\")\n\t\t.queryParam(\"client_secret\", \"erZOWM9g3UtwNRj340YYaK_W\")\n\t\t.queryParam(\"grant_type\", \"authorization_code\")\n\t\t.queryParams(\"state\", \"verifyfjdss\")\n\t\t.queryParam(\"scope\", \"https://www.googleapis.com/auth/userinfo.email\")\n\t\t.when().log().all()\n\t\t.post(\"https://www.googleapis.com/oauth2/v4/token\")\n\t\t.asString();\n\t\t\n\t\t//System.out.println(authentication);\n\t\t\n\t\tJsonPath jP = new JsonPath(authentication);\n\t\tString accessToken = jP.get(\"access_token\");\n\t\t\n\t\tGetCourse gc = given()\n\t\t.queryParam(\"access_token\", accessToken)\n\t\t.expect().defaultParser(Parser.JSON)\n\t\t.when()\n .get(\"https://rahulshettyacademy.com/getCourse.php\")\n .as(GetCourse.class);\n\t\tSystem.out.println(\"--------------**************--------------\");\n\t\tSystem.out.println(\"Instructor name\"+gc.getInstructor());\n\t\t\n\t\tList<Api> api =gc.getCourses().getApi();\n\t\tfor(int i=0; i<api.size();i++) {\n\t\t\tif(api.get(i).getCourseTitle().equalsIgnoreCase(\"SoapUI Webservices testing\")) {\n\t\t\t\tSystem.out.println(\"Price of course \"+api.get(i).getPrice());\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "protected void getResultsFromApi(SheetsTaskListener listener) {\n if (! isGooglePlayServicesAvailable()) {\n acquireGooglePlayServices();\n } else if (mCredential.getSelectedAccountName() == null) {\n chooseAccount();\n } else if (! isDeviceOnline()) {\n Toast.makeText(getApplicationContext(), R.string.str_no_network, Toast.LENGTH_LONG).show();\n finish();\n } else {\n new MakeRequestTask(mCredential, listener).execute();\n }\n }", "public void enrollmentPost(String patient, String comment, String program, String date){\n Callback<Enrollment> callback = new Callback<Enrollment>() {\n\n @Override\n public void success(Enrollment serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceEnrollmentServerEvent(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postEnrollments(patient, comment, program, date, callback);\n }", "public void check_in(String type) {\n int index=searchRoom(type);\n if (index<=0)\n {\n System.out.println(\"There is no available \"+type+\" room!\");\n }else\n {\n int roomNo=roomlist.get(index).getRoomid();\n /*New object is created and this object`s availability wiil be \"not available,statu will be \"check in\"*/\n Room room = new Room(type,roomNo,\"not available\",\"check in\",this,roomlist.get(index).getRoomcharge());\n changeList(room);\n System.out.println(toString());\n System.out.println(\"Checked in of the room \"+roomNo+\" .\");\n }\n }", "public void showMemberBookings()\n {\n try\n {\n System.out.println(\"Please enter the memeber ID\");\n int memberId =sc.nextInt();\n Member mem = sportsClub.searchMember(memberId); \n \n if(mem==null || mem.getBookings()==null)\n {\n System.out.println(\"Sorry! Member is not found.\");\n }\n else\n {\n for(Booking bookingObj : mem.getBookings())\n {\n System.out.println(\"Booking made by \"+mem.getMemberName() +\" for \" + bookingObj.getBookingDate() + \" at \" + bookingObj.getBookingTime() + \" for \" + bookingObj.getBookingEndTime() + \" minutes on Court number \" + bookingObj.getCourt().getCourtId());\n\n }\n if(mem.getBookings().size()==0)\n System.out.println(\"Sorry! Currebtly no bookings done by the member \");\n }\n }\n catch(Exception e)\n {\n System.out.println(\"Error\"+e);\n }\n\n }", "@Test\r\n\tpublic void testCreateTickets() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tJsonObject[] result = roc.createTickets(1, true);\t\t\t\t\r\n\t\t\t\tcollector.checkThat(result[0], notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresult = roc.createTickets(1, false);\t\t\t\t\r\n\t\t\t\tcollector.checkThat(result[0], notNullValue());\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}" ]
[ "0.67278385", "0.63831", "0.63093156", "0.6183257", "0.6129377", "0.6064313", "0.60338867", "0.59939355", "0.5979546", "0.59146076", "0.59017575", "0.5899112", "0.58907175", "0.5861457", "0.5767716", "0.57378286", "0.573513", "0.56813514", "0.56784797", "0.5677419", "0.5675713", "0.56575084", "0.5650697", "0.5644609", "0.5640074", "0.56354785", "0.5622926", "0.5604512", "0.56040746", "0.56017333", "0.5599593", "0.5598127", "0.5583167", "0.5524846", "0.55184835", "0.55039406", "0.54994655", "0.5485147", "0.547302", "0.5452555", "0.54501283", "0.54498607", "0.54430014", "0.54424685", "0.54401803", "0.5437544", "0.54367816", "0.5419758", "0.54144657", "0.54080147", "0.54014647", "0.5391945", "0.53800195", "0.5379827", "0.53789276", "0.53782797", "0.5377927", "0.53674406", "0.53626233", "0.53601074", "0.53416955", "0.5329557", "0.5323838", "0.5315689", "0.53143185", "0.53132415", "0.53107226", "0.5307926", "0.5305034", "0.5296714", "0.5289494", "0.5289084", "0.5287132", "0.5286974", "0.52739155", "0.52552104", "0.5248415", "0.52447104", "0.5242712", "0.5235668", "0.52285945", "0.5223191", "0.5220063", "0.5218316", "0.5211517", "0.52074176", "0.5205516", "0.52024925", "0.52008563", "0.5190179", "0.5186778", "0.51857376", "0.5174838", "0.51674205", "0.5158263", "0.51538306", "0.5152865", "0.5147347", "0.5142124", "0.51409435", "0.5139377" ]
0.0
-1
Use this factory method to create a new instance of this fragment using the provided parameters.
public static IndividualInformationFragment newInstance(long individualId) { IndividualInformationFragment fragment = new IndividualInformationFragment(); Bundle args = new Bundle(); args.putLong(INDIVIDUAL_ID, individualId); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public CuartoFragment() {\n }", "public StintFragment() {\n }", "public ExploreFragment() {\n\n }", "public RickAndMortyFragment() {\n }", "public FragmentMy() {\n }", "public LogFragment() {\n }", "public FeedFragment() {\n }", "public HistoryFragment() {\n }", "public HistoryFragment() {\n }", "public static MyFeedFragment newInstance() {\n return new MyFeedFragment();\n }", "public WkfFragment() {\n }", "public static ScheduleFragment newInstance() {\n ScheduleFragment fragment = new ScheduleFragment();\n Bundle args = new Bundle();\n //args.putString(ARG_PARAM1, param1);\n //args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment(){}", "public WelcomeFragment() {}", "public static ForumFragment newInstance() {\n ForumFragment fragment = new ForumFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n\n return fragment;\n }", "public static NotificationFragment newInstance() {\n NotificationFragment fragment = new NotificationFragment();\n Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public progFragment() {\n }", "public HeaderFragment() {}", "public static RouteFragment newInstance() {\n RouteFragment fragment = new RouteFragment();\n Bundle args = new Bundle();\n //fragment.setArguments(args);\n return fragment;\n }", "public EmployeeFragment() {\n }", "public Fragment_Tutorial() {}", "public NewShopFragment() {\n }", "public FavoriteFragment() {\n }", "public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }", "public static MessageFragment newInstance() {\n MessageFragment fragment = new MessageFragment();\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }", "public CreateEventFragment() {\n // Required empty public constructor\n }", "public static RecipeListFragment newInstance() {\n RecipeListFragment fragment = new RecipeListFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n\t\treturn new ScreenSlidePageFragment();\n\t}", "public NoteActivityFragment() {\n }", "public static WeekViewFragment newInstance(int param1, int param2) {\n WeekViewFragment fragment = new WeekViewFragment();\n //WeekViewFragment 객체 생성\n Bundle args = new Bundle();\n //Bundle 객체 생성\n args.putInt(ARG_PARAM1, param1);\n //ARG_PARAM1에 param1의 정수값 넣어서 args에 저장\n args.putInt(ARG_PARAM2, param2);\n //ARG_PARAM2에 param2의 정수값 넣어서 args에 저장\n fragment.setArguments(args);\n //args를 매개변수로 한 setArguments() 메소드 수행하여 fragment에 저장\n return fragment; //fragment 반환\n }", "public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static Fragment newInstance() {\n StatisticsFragment fragment = new StatisticsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public EventHistoryFragment() {\n\t}", "public HomeFragment() {}", "public PeopleFragment() {\n // Required empty public constructor\n }", "public static FeedFragment newInstance() {\n FeedFragment fragment = new FeedFragment();\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public VantaggiFragment() {\n // Required empty public constructor\n }", "public AddressDetailFragment() {\n }", "public ArticleDetailFragment() { }", "public static DropboxMainFrag newInstance() {\n DropboxMainFrag fragment = new DropboxMainFrag();\n // set arguments in Bundle\n return fragment;\n }", "public RegisterFragment() {\n }", "public EmailFragment() {\n }", "public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }", "public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static ParqueosFragment newInstance() {\n ParqueosFragment fragment = new ParqueosFragment();\n return fragment;\n }", "public ForecastFragment() {\n }", "public FExDetailFragment() {\n \t}", "public static AddressFragment newInstance(String param1) {\n AddressFragment fragment = new AddressFragment();\n\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n\n return fragment;\n }", "public TripNoteFragment() {\n }", "public ItemFragment() {\n }", "public NoteListFragment() {\n }", "public CreatePatientFragment() {\n\n }", "public DisplayFragment() {\n\n }", "public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public static MainFragment newInstance() {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public ProfileFragment() {\n\n }", "public BackEndFragment() {\n }", "public CustomerFragment() {\n }", "public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public ArticleDetailFragment() {\n }", "public static Fragment newInstance() {\n return new SettingsFragment();\n }", "public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }", "public PeersFragment() {\n }", "public TagsFragment() {\n }", "public static ProfileFragment newInstance() {\n ProfileFragment fragment = new ProfileFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, \"\");\n args.putString(ARG_PARAM2, \"\");\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance() {\n FriendsFragment fragment = new FriendsFragment();\n\n return fragment;\n }", "public HomeSectionFragment() {\n\t}", "public static FirstFragment newInstance(String text) {\n\n FirstFragment f = new FirstFragment();\n Bundle b = new Bundle();\n b.putString(\"msg\", text);\n\n f.setArguments(b);\n\n return f;\n }", "public PersonDetailFragment() {\r\n }", "public static LogFragment newInstance(Bundle params) {\n LogFragment fragment = new LogFragment();\n fragment.setArguments(params);\n return fragment;\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public VehicleFragment() {\r\n }", "public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}", "public static NoteFragment newInstance(String param1, String param2) {\n NoteFragment fragment = new NoteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(Context context) {\n MainFragment fragment = new MainFragment();\n if(context != null)\n fragment.setVariables(context);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new CrimeListFragment();\n\t}", "public static MoneyLogFragment newInstance() {\n MoneyLogFragment fragment = new MoneyLogFragment();\n return fragment;\n }", "public static ForecastFragment newInstance() {\n\n //Create new fragment\n ForecastFragment frag = new ForecastFragment();\n return(frag);\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MainFragment newInstance(String param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyTaskFragment newInstance(String param1) {\n MyTaskFragment fragment = new MyTaskFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }", "public static MainFragment newInstance(int param1, String param2) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_PARAM1, param1);\n\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public PlaylistFragment() {\n }", "public static HistoryFragment newInstance() {\n HistoryFragment fragment = new HistoryFragment();\n return fragment;\n }", "public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static PersonalFragment newInstance(String param1, String param2) {\n PersonalFragment fragment = new PersonalFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }" ]
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.6646188", "0.66410166", "0.6640725", "0.6634425", "0.66188246", "0.66140765", "0.6608169", "0.66045964", "0.65977716", "0.6592119", "0.659137", "0.65910816", "0.65830594", "0.65786606", "0.6562876", "0.65607685", "0.6557126", "0.65513307", "0.65510213", "0.65431285", "0.6540448", "0.65336084", "0.6532555", "0.6528302", "0.6524409", "0.652328", "0.6523149", "0.6516528", "0.65049976", "0.6497274", "0.6497235", "0.64949715", "0.64944136", "0.6484968", "0.6484214", "0.64805835", "0.64784926", "0.64755154", "0.64710265", "0.6466466", "0.6457089", "0.645606", "0.6454554", "0.6452161", "0.64520335", "0.6450325", "0.64488834", "0.6446765", "0.64430225", "0.64430225", "0.64430225", "0.64420956", "0.6441306", "0.64411277", "0.6438451", "0.64345145", "0.64289486", "0.64287597", "0.6423755", "0.64193285", "0.6418699", "0.6414679", "0.6412867", "0.6402168", "0.6400724", "0.6395624", "0.6395109", "0.6391252", "0.63891554", "0.63835025", "0.63788056", "0.63751805", "0.63751805", "0.63751805", "0.6374796", "0.63653135", "0.6364529", "0.6360922", "0.63538784", "0.6351111", "0.635067" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_individual_information, container, false); if(member != null) { TextView nameView = v.findViewById(R.id.member_information_member_name); nameView.setText(member.getFormattedName()); TextView callingView = v.findViewById(R.id.member_information_calling); if(member.getCurrentCallings() != null && !member.getCurrentCallings().isEmpty()) { String names = member.getCurrentCallingsWithTime().toString(); callingView.setText(names.substring(1, names.length() -1)); } else { TextView callingLabel = v.findViewById(R.id.member_information_calling_label); callingLabel.setVisibility(View.GONE); callingView.setVisibility(View.GONE); } TextView proposedCalling = v.findViewById(R.id.member_information_proposed_calling); if(member.getProposedCallings() != null && member.getProposedCallings().size() > 0) { String names = member.getProposedCallingsWithStatus().toString(); proposedCalling.setText(names.substring(1, names.length() -1)); } else { TextView proposedCallingLabel = v.findViewById(R.id.member_information_proposed_label); proposedCallingLabel.setVisibility(View.GONE); proposedCalling.setVisibility(View.GONE); } createViewItems(v, member); } return v; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
/ Create xml for bottom sheet.
public void createViewItems(View v, final Member member) { TableLayout tableLayout = v.findViewById(R.id.member_information_table_layout); tableLayout.setGravity(Gravity.CENTER); /* Set the horizontal separating border. */ tableLayout.addView(getBorderView()); /* For phone */ if((member.getIndividualPhone() == null || member.getIndividualPhone().isEmpty()) && (member.getHouseholdPhone() == null || member.getHouseholdPhone().isEmpty())) { TextView noData = getNoDataTextView(getResources().getText(R.string.no_phone_number).toString()); TableRow tableRow = getTableRow(); tableRow.addView(noData); tableLayout.addView(tableRow); } else { /* Individual phone. */ String phone = member.getIndividualPhone(); if(phone != null && !phone.isEmpty()) { /* Phone number. */ TextView individualPhoneView = getPhoneTextView(phone); /* SMS image button. */ ImageButton individualPhoneImageButton = getPhoneImageButton(phone); /* Add all items to tablerow. */ TableRow tableRow = getTableRow(); tableRow.addView(individualPhoneView); tableRow.addView(individualPhoneImageButton); tableLayout.addView(tableRow, new TableLayout.LayoutParams(TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT)); /* Get underneath text. */ TableRow underRow = getTableRow(); underRow.addView(getIndividualHouseholdTextView(getResources().getText(R.string.list_display_options_individual).toString())); tableLayout.addView(underRow); } /* Home phone. */ phone = member.getHouseholdPhone(); if(phone != null && !phone.isEmpty()) { /* Phone number. */ TextView homePhoneView = getPhoneTextView(phone); /* SMS image button. */ ImageButton homePhoneImageButton = getPhoneImageButton(phone); /* Add all items to tablerow. */ TableRow tableRow = getTableRow(); tableRow.addView(homePhoneView); tableRow.addView(homePhoneImageButton); tableLayout.addView(tableRow); /* Get underneath text. */ TableRow underRow = getTableRow(); underRow.addView(getIndividualHouseholdTextView(getResources().getText(R.string.household).toString())); tableLayout.addView(underRow); } } /* For Email */ /* Set the horizontal separating border. */ tableLayout.addView(getBorderView()); if((member.getIndividualEmail() == null || member.getIndividualEmail().isEmpty()) && (member.getHouseholdEmail() == null || member.getHouseholdEmail().isEmpty())) { TextView noData = getNoDataTextView(getResources().getText(R.string.no_email_address).toString()); TableRow tableRow = getTableRow(); tableRow.addView(noData); tableLayout.addView(tableRow); } else { String email = member.getIndividualEmail(); if(email != null && !email.isEmpty()) { /* Individual email text. */ TextView individualEmailView = getEmailTextView(email); /* Under email text. */ TextView individualTextView = getIndividualHouseholdTextView(getResources().getText(R.string.list_display_options_individual).toString()); /* Add all items to tableRow. */ TableRow tableRow = getTableRow(); tableRow.addView(individualEmailView); tableLayout.addView(tableRow); TableRow underRow = getTableRow(); underRow.addView(individualTextView); tableLayout.addView(underRow); } email = member.getHouseholdEmail(); if(email != null && !email.isEmpty()) { /* Home email text. */ TextView householdEmailView = getEmailTextView(email); /* Under email text. */ TextView householdTextView = getIndividualHouseholdTextView(getResources().getText(R.string.household).toString()); /* Add all items to tableRow. */ TableRow tableRow = getTableRow(); tableRow.addView(householdEmailView); TableRow underRow = getTableRow(); underRow.addView(householdTextView); tableLayout.addView(underRow); } } /* Add address to the view. */ tableLayout.addView(getBorderView()); if(member.getStreetAddress() != null && member.getStreetAddress().length() > 0) { try { /* Get address and encode it. */ final String strAddress = member.getStreetAddress(); final String encodedAddress = URLEncoder.encode(strAddress, "UTF-8"); TextView textView = getEmailTextView(member.getStreetAddress()); textView.setPadding(45, 30, 0, 20); textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.marker_pin_blue, 0, 0, 0); Linkify.addLinks(textView, Linkify.MAP_ADDRESSES); /* Set the onclick listener. */ textView.setMovementMethod(LinkMovementMethod.getInstance()); textView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { initGoogleMap(encodedAddress); } }); /* Add items to tablerow and then table. */ TableRow tableRow = getTableRow(); tableRow.addView(textView); tableLayout.addView(tableRow); } catch (Error | UnsupportedEncodingException e) { e.printStackTrace(); } } else { /* Add no address information. */ TextView textView = getNoDataTextView(getResources().getText(R.string.no_address).toString()); TableRow tableRow = getTableRow(); tableRow.addView(textView); tableLayout.addView(tableRow); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_menu_prueba, container, false);\n\n btn_bottom_sheet = (Button) view.findViewById(R.id.btn_bottom_sheet);\n bottom_sheet = (LinearLayout) view.findViewById(R.id.bottom_shent);\n\n sheetBehavior = BottomSheetBehavior.from(bottom_sheet);\n\n btn_bottom_sheet.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (sheetBehavior.getState() != BottomSheetBehavior.STATE_EXPANDED) {\n sheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\n btn_bottom_sheet.setText(\"Close sheet\");\n } else {\n sheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n btn_bottom_sheet.setText(\"Expand sheet\");\n }\n }\n });\n\n sheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {\n @Override\n public void onStateChanged(@NonNull View view, int newState) {\n switch (newState) {\n case BottomSheetBehavior.STATE_HIDDEN:\n break;\n case BottomSheetBehavior.STATE_EXPANDED: {\n btn_bottom_sheet.setText(\"Close Sheet\");\n }\n break;\n case BottomSheetBehavior.STATE_COLLAPSED: {\n btn_bottom_sheet.setText(\"Expand Sheet\");\n }\n break;\n case BottomSheetBehavior.STATE_DRAGGING:\n break;\n case BottomSheetBehavior.STATE_SETTLING:\n break;\n }\n }\n\n @Override\n public void onSlide(@NonNull View view, float v) {\n\n }\n });\n\n\n return view;\n }", "@Override\n protected Sheet createSheet() {\n Sheet sheet = Sheet.createDefault();\n // Create a set of properties\n Sheet.Set set = Sheet.createPropertiesSet();\n\n set.put(getNameProperty());\n set.put(getMajorProperty());\n set.put(getMinorProperty());\n set.put(getPatchProperty());\n set.put(getDescriptionProperty());\n set.put( getGitProperty());\n set.put( getBranchProperty());\n\n // Add the set of properties to the sheet\n sheet.put(set);\n\n return sheet;\n }", "private void buildBalanceSheetPane() // buildBalanceSheetPane method start\n\t{\n\t\t// creating object\n\t\tBSOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tBSOutput.setText(log.balanceSheet());\n\t\tBSOutput.setEditable(false);\n\t\tBSOutput.setFont(font);\n\t\tBSOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\tbalanceSheetPane.add(BSOutput);\n\t\tbalanceSheetPane.add(new JScrollPane(BSOutput));\n\t}", "protected String getXML() {\n\n StringBuffer b = new StringBuffer(\"title =\\\"\");\n b.append(title);\n b.append(\"\\\" xAxisTitle=\\\"\");\n b.append(xAxisTitle);\n b.append(\"\\\" yAxisTitle=\\\"\");\n b.append(yAxisTitle);\n b.append(\"\\\" xRangeMin=\\\"\");\n b.append(xRangeMin);\n b.append(\"\\\" xRangeMax=\\\"\");\n b.append(xRangeMax);\n b.append(\"\\\" xRangeIncr=\\\"\");\n b.append(xRangeIncr);\n b.append(\"\\\" yRangeMin=\\\"\");\n b.append(yRangeMin);\n b.append(\"\\\" yRangeMax=\\\"\");\n b.append(yRangeMax);\n b.append(\"\\\" yRangeIncr=\\\"\");\n b.append(yRangeIncr);\n b.append(\"\\\" >\\n\");\n\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource)dataSources.get(i);\n b.append(ds.toXML());\n b.append(\"\\n\");\n }\n\n return b.toString();\n }", "private void createBottomPanel() {\n humanPaquetView = new ViewDeckVisible(false);\n this.getContentPane().add(humanPaquetView);\n }", "private void initBottom(BorderPane root) {\n // Make bottom box for buttons\n HBox bottomButtons = new HBox();\n bottomButtons.setPrefWidth(150);\n bottomButtons.setAlignment(Pos.CENTER);\n bottomButtons.setPadding(new Insets(0, 60, 20, 60));\n bottomButtons.setSpacing(50);\n\n // Report button\n Button downReportBut = new Button(\"Download Report\");\n downReportBut.setOnAction(e -> {\n downloadReport();\n });\n // Add to HBox\n bottomButtons.getChildren().addAll(downReportBut);\n\n // Add to root\n root.setBottom(bottomButtons);\n root.setPadding(new Insets(20));\n\n }", "void createWorkSheet() {\n wb = new HSSFWorkbook();\n for (int SheetNumber = 0; SheetNumber < keywords.length - 1; SheetNumber++) {\n sheet[SheetNumber] = wb.createSheet(keywords[SheetNumber]);\n // Create row at index zero ( Top Row)\n HSSFRow row = sheet[SheetNumber].createRow((short) 0);\n String[] headers = {\"Title\", \"Category\", \"Developer\", \"Description\", \"Release Date\", \"currentVersionReleaseDate\", \"Version\", \"Website\", \"Rating Counts\", \"Average User Rating\", \"Average User Rating For Current Version\", \"Market URL\", \"Size\"};\n for (int i = 0; i <= 12; i++) {\n\n HSSFCell cell = row.createCell((short) i);\n cell.setCellType(HSSFCell.CELL_TYPE_STRING);\n cell.setCellValue(headers[i]);\n excelFileCreated = false;\n }\n }\n }", "public void creatTemplate(Sheet sheet, String title) {\n\n String label1 = \"TẬP ĐOÀN VIỄN THÔNG QUÂN ĐỘI\";\n String label2 = \"TỔNG CÔNG TY VIỄN THÔNG VIETTEL\";\n String label3 = \"CỘNG HOÀ XÃ HỘI CHỦ NGHĨA VIỆT NAM\";\n String label4 = \"Độc Lập - Tự Do - Hạnh Phúc\";\n\n createCellObject(sheet, 0, 0, label1, getCsSubTitle());\n createCellObject(sheet, 0, 1, label2, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 5, 0, label3, getCsSubTitle());\n createCellObject(sheet, 5, 1, label4, getCsCenterNoboderBoldweight());\n createCellObject(sheet, 1, 4, title, getCsTitle());\n\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 0, 2);\n ExcelWriterUtils.mergeCells(sheet, 0, 0, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 1, 1, 5, 8);\n ExcelWriterUtils.mergeCells(sheet, 4, 4, 1, 6);\n\n setRowHeight(sheet, 4, 630);\n }", "private String toXML(){\n return \"<paint>\\n\"+\"\\t<background_color>\" + this.backgroundColor +\n \"</background_color>\\n\" + touchArea.toXML() + \"</paint>\\n\";\n }", "private void createContent(WritableSheet sheet) throws WriteException,\n RowsExceededException {\n int row = 2;\n for (int i = 0; i < mExcelObject.getmCheckInUserNews().size(); i++) {\n // First column\n Post data = mExcelObject.getmCheckInUserNews().get(i);\n addNumber(sheet, 0, row, i+1 );\n // Second column\n addLabel(sheet, 1, row, data.author());\n addLabel(sheet, 2, row, data.title);\n addLabel(sheet, 3, row, data.body);\n addLabel(sheet, 4, row, data.downloadeUrl);\n row++;\n }\n\n }", "private void toXW() {\n if (fragment_XW == null) {\n fragment_XW = new Fragment_XW();\n fragmenttransaction.add(R.id.frame_content, fragment_XW);\n } else {\n fragmenttransaction.show(fragment_XW);\n }\n }", "public void createMarksheet() {\n }", "public void xmlPresentation () {\n System.out.println ( \"****** XML Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n Books books = new Books();\n books.setBooks(new ArrayList<Book>());\n\n bookArrayList = new Request().postRequestBook();\n\n for (Book aux: bookArrayList) {\n books.getBooks().add(aux);\n }\n\n try {\n javax.xml.bind.JAXBContext jaxbContext = JAXBContext.newInstance(Books.class);\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n jaxbMarshaller.marshal(books, System.out);\n } catch (JAXBException e) {\n System.out.println(\"Error: \"+ e);\n }\n ClientEntry.showMenu ( );\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n View view = inflater.inflate(R.layout.bottom_sheet, container, false);\n calendarGroup = view.findViewById(R.id.calendar_group);\n calendarView = view.findViewById(R.id.calendar_view);\n calendarButton = view.findViewById(R.id.today_calendar_button);\n enterTodo = view.findViewById(R.id.enter_todo_et);\n saveButton = view.findViewById(R.id.save_todo_button);\n priorityButton = view.findViewById(R.id.priority_todo_button);\n priorityRadioGroup = view.findViewById(R.id.radioGroup_priority);\n Chip todayChip = view.findViewById(R.id.today_chip);\n todayChip.setOnClickListener(this);\n Chip tommorowChip = view.findViewById(R.id.tomorrow_chip);\n tommorowChip.setOnClickListener(this);\n Chip nextWeekChip = view.findViewById(R.id.next_week_chip);\n nextWeekChip.setOnClickListener(this);\n priority = Priority.LOW;\n return view;\n }", "public static Element createBodyElement(ReportDesigner reportDesigner,String type, String title,String xAxisTitle, String yAxisTitle){\r\n\t\tElement bodyNode = doc.createElement(\"body\");\r\n\r\n\t\tElement extendedItemNode = doc.createElement(\"extended-item\");\r\n\t\textendedItemNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_ID,reportDesigner.getNextId());\r\n\t\textendedItemNode.setAttribute(\"extensionName\",\"Chart\");\r\n\t\textendedItemNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_NAME,\"NewChart\");\r\n\t\tbodyNode.appendChild(extendedItemNode);\r\n\r\n\t\tElement xmlPropNode = doc.createElement(\"xml-property\");\r\n\t\txmlPropNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_NAME,\"xmlRepresentation\");\r\n\r\n\t\t//Store document as the following method replaces it.\r\n\t\tDocument prevDoc = doc;\r\n\t\txmlPropNode.appendChild(doc.createCDATASection(createChartCDATASection(type,title,xAxisTitle, yAxisTitle,reportDesigner)));\r\n\r\n\t\t//Restore our doc\r\n\t\tdoc = prevDoc;\r\n\t\textendedItemNode.appendChild(xmlPropNode);\r\n\r\n\t\taddExtendedItemNonXmlProps(extendedItemNode,reportDesigner);\r\n\r\n\t\treturn bodyNode;\r\n\t}", "public void writeXML(OutputStream stream) throws IOException {\n\t\tPrintWriter out = new PrintWriter(stream);\n\t\tout.println(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tout.println(\"<VLToolBars version=\\\"1.0\\\">\");\n\t\txmlWriteContainer(out);\n\n\t\tout.println(\"</VLToolBars>\");\n\t\tout.flush();\n\t}", "public Sheet createSheet() {\n\t\treturn null;\n\t}", "public void createXml(String fileName) { \n\t\tElement root = this.document.createElement(\"TSETInfoTables\"); \n\t\tthis.document.appendChild(root); \n\t\tElement metaDB = this.document.createElement(\"metaDB\"); \n\t\tElement table = this.document.createElement(\"table\"); \n\t\t\n\t\tElement column = this.document.createElement(\"column\");\n\t\tElement columnName = this.document.createElement(\"columnName\");\n\t\tcolumnName.appendChild(this.document.createTextNode(\"test\")); \n\t\tcolumn.appendChild(columnName); \n\t\tElement columnType = this.document.createElement(\"columnType\"); \n\t\tcolumnType.appendChild(this.document.createTextNode(\"INTEGER\")); \n\t\tcolumn.appendChild(columnType); \n\t\t\n\t\ttable.appendChild(column);\n\t\tmetaDB.appendChild(table);\n\t\troot.appendChild(metaDB); \n\t\t\n\t\tTransformerFactory tf = TransformerFactory.newInstance(); \n\t\ttry { \n\t\t\tTransformer transformer = tf.newTransformer(); \n\t\t\tDOMSource source = new DOMSource(document); \n\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"gb2312\"); \n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\"); \n\t\t\tPrintWriter pw = new PrintWriter(new FileOutputStream(fileName)); \n\t\t\tStreamResult result = new StreamResult(pw); \n\t\t\ttransformer.transform(source, result); \n\t\t\tlogger.info(\"Generate XML file success!\");\n\t\t} catch (TransformerConfigurationException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (IllegalArgumentException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (FileNotFoundException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} catch (TransformerException e) { \n\t\t\tlogger.error(e.getMessage());\n\t\t} \n\t}", "protected void createContents() {\n\n\t}", "private void createChart() {\n\t\tchartSpace = CTChartSpace.Factory.newInstance();\n\t\tchart = chartSpace.addNewChart();\n\t\tCTPlotArea plotArea = chart.addNewPlotArea();\n\n\t\tplotArea.addNewLayout();\n\t\tchart.addNewPlotVisOnly().setVal(true);\n\n\t\tCTPrintSettings printSettings = chartSpace.addNewPrintSettings();\n\t\tprintSettings.addNewHeaderFooter();\n\n\t\tCTPageMargins pageMargins = printSettings.addNewPageMargins();\n\t\tpageMargins.setB(0.75);\n\t\tpageMargins.setL(0.70);\n\t\tpageMargins.setR(0.70);\n\t\tpageMargins.setT(0.75);\n\t\tpageMargins.setHeader(0.30);\n\t\tpageMargins.setFooter(0.30);\n\t\tprintSettings.addNewPageSetup();\n\t}", "public JComponent createBottomPanel() {\n\t\tJButton[] buttons = new JButton[0];\n\t/*\tbuttons[0] = new JButton(\"Save\");\n\t\tbuttons[0].setActionCommand(\"0\");\n\t\tbuttons[1] = new JButton(\"Cancel\");\n\t\tbuttons[1].setActionCommand(\"1\");*/\n\t\tActionHandler actHand = new ActionHandler();\n\t//\tfields[PRODUCT_NAME].addActionListener(actHand);\n\t\treturn new ButtonAndMessagePanel(buttons, messageLabel, actHand);\n\t}", "protected View getBottomLayout() {\n\t\treturn new View(this);\n\t}", "public void calculateWindow()\n {\n Vector2 windowBottomLeftBounds = new Vector2(1000000, 1000000);\n Vector2 windowTopRightBounds = new Vector2(-1000000, -1000000);\n for (Element<?> e : children())\n {\n if (e.id() != null && (e.id().startsWith(id() + \"hBar\") || e.id().startsWith(id() + \"vBar\")))\n {\n continue;\n }\n for (Element<?> child : e)\n {\n Vector2 alignmentVector = child.alignment().alignmentVector();\n Vector2 bottomLeftBounds = new Vector2(child.x() - (alignmentVector.x * child.width()), child.y()\n - (alignmentVector.y * child.height()));\n Vector2 topRightBounds = new Vector2(bottomLeftBounds.x + child.width(), bottomLeftBounds.y + child.height());\n // left\n if (windowBottomLeftBounds.x > bottomLeftBounds.x)\n {\n windowBottomLeftBounds.x = bottomLeftBounds.x;\n }\n // bottom\n if (windowBottomLeftBounds.y > bottomLeftBounds.y)\n {\n windowBottomLeftBounds.y = bottomLeftBounds.y;\n }\n // right\n if (windowTopRightBounds.x < topRightBounds.x)\n {\n windowTopRightBounds.x = topRightBounds.x;\n }\n // top\n if (windowTopRightBounds.y < topRightBounds.y)\n {\n windowTopRightBounds.y = topRightBounds.y;\n }\n }\n }\n \n content = new CRectangle(windowBottomLeftBounds.x, windowBottomLeftBounds.y, windowTopRightBounds.x - windowBottomLeftBounds.x,\n windowTopRightBounds.y - windowBottomLeftBounds.y);\n content.origin = new Vector2(0, 0);\n \n calculateScrollSize();\n }", "BODY createBODY();", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_sign_up, container, false);\n unbinder = ButterKnife.bind(this, view);\n\n mLayoutBottomSheet = view.findViewById(R.id.layout_bottom_sheet);\n\n mBottomSheetBehavior = BottomSheetBehavior.from(mLayoutBottomSheet);\n mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_DRAGGING);\n mBottomSheetBehavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {\n @Override\n public void onStateChanged(@NonNull View bottomSheet, int newState) {\n switch (newState) {\n case BottomSheetBehavior.STATE_EXPANDED:\n break;\n\n case BottomSheetBehavior.STATE_DRAGGING:\n mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\n break;\n }\n }\n\n @Override\n public void onSlide(@NonNull View bottomSheet, float slideOffset) {\n\n }\n });\n\n final CoordinatorLayout coordinatorLayout = view.findViewById(R.id.coordinatorLayout);\n ImageView cancel = mLayoutBottomSheet.findViewById(R.id.IV_cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);\n coordinatorLayout.setVisibility(View.GONE);\n }\n });\n\n// ButtonCustomFont buttonCustomFont = view.findViewById(R.id.BTN_BottomSheet);\n// buttonCustomFont.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// HelperMethod.showToast(getContext(), \"good\");\n// mBottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\n// coordinatorLayout.setVisibility(View.VISIBLE);\n// }\n// });\n return view;\n }", "private void drawWindowSetup(){\n\t\t//draw header\n\t\ttopBar.draw(graphics);\n\t\t//draw footer\n\t\tbottomBar.draw(graphics);\n\t\t//draw right bar\n\t\trightBar.draw(graphics);\n\t}", "private void createDOMTree(){\n\t\t\tElement rootEle = dom.createElement(\"html\");\r\n\t\t\tdom.appendChild(rootEle);\r\n\t\t\t\r\n\t\t\t//\t\t\tcreates <head> and <title> tag\r\n\t\t\tElement headEle = dom.createElement(\"head\");\r\n\t\t\tElement titleEle = dom.createElement(\"title\");\r\n\t\t\t\r\n\t\t\t//\t\t\tset value to <title> tag\r\n\t\t\tText kuerzelText = dom.createTextNode(\"Auswertung\");\r\n\t\t\ttitleEle.appendChild(kuerzelText);\r\n\t\t\theadEle.appendChild(titleEle);\r\n\t\t\t\r\n\t\t\tElement linkEle = dom.createElement(\"link\");\r\n\t\t\tlinkEle.setAttribute(\"rel\", \"stylesheet\");\r\n\t\t\tlinkEle.setAttribute(\"type\", \"text/css\");\r\n\t\t\tlinkEle.setAttribute(\"href\", \"./format.css\");\r\n\t\t\theadEle.appendChild(linkEle);\r\n\t\t\t\r\n\t\t\trootEle.appendChild(headEle);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tElement bodyEle = dom.createElement(\"body\");\r\n\t\t\tElement divEle = dom.createElement(\"div\");\r\n\t\t\tdivEle.setAttribute(\"id\", \"cont\");\r\n\t\t\t\r\n\t\t\tVector<String> tmp = myData.get(0);\r\n\t\t\tElement h2Ele = dom.createElement(\"h2\");\r\n\t\t\tString h1Str = \"\";\r\n\t\t\tfor(Iterator i = tmp.iterator(); i.hasNext(); )\r\n\t\t\t{\r\n\t\t\t\th1Str = h1Str + (String)i.next() + \" \";\r\n\t\t\t}\r\n\t\t\tText aText = dom.createTextNode(h1Str);\r\n\t\t\th2Ele.appendChild(aText);\r\n\t\t\tdivEle.appendChild(h2Ele);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tElement tableEle = dom.createElement(\"table\");\r\n//\t\t\ttableEle.setAttribute(\"border\", \"1\");\r\n\t\t\t\r\n\t\t\ttmp = myData.get(0);\r\n\t\t\tElement trHeadEle = createTrHeadElement(tmp);\r\n\t\t\ttableEle.appendChild(trHeadEle);\r\n\t\t\tmyData.remove(0);\r\n\t\t\t\r\n\t\t\tIterator it = myData.iterator();\r\n\t\t\twhile(it.hasNext()) {\r\n\t\t\t\ttmp = (Vector<String>)it.next();\r\n\t\t\t\tElement trEle = createTrElement(tmp);\r\n\t\t\t\ttableEle.appendChild(trEle);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdivEle.appendChild(tableEle);\r\n\t\t\tbodyEle.appendChild(divEle);\r\n\t\t\trootEle.appendChild(bodyEle);\r\n\t\t\t\r\n\t\t}", "public void exportXLS() {\n\t\t// Create a Workbook\n\t\tWorkbook workbook = new HSSFWorkbook(); // new HSSFWorkbook() for\n\t\t\t\t\t\t\t\t\t\t\t\t// generating `.xls` file\n\n\t\t/*\n\t\t * CreationHelper helps us create instances of various things like DataFormat,\n\t\t * Hyperlink, RichTextString etc, in a format (HSSF, XSSF) independent way\n\t\t */\n\t\tCreationHelper createHelper = workbook.getCreationHelper();\n\n\t\t// Create a Sheet\n\t\tSheet sheet = workbook.createSheet(\"العقود\");\n\n\t\t// Create a Font for styling header cells\n\t\tFont headerFont = workbook.createFont();\n\t\theaderFont.setBold(true);\n\t\theaderFont.setFontHeightInPoints((short) 14);\n\t\theaderFont.setColor(IndexedColors.RED.getIndex());\n\n\t\t// Create a CellStyle with the font\n\t\tCellStyle headerCellStyle = workbook.createCellStyle();\n\t\theaderCellStyle.setFont(headerFont);\n\n\t\t// Create a Row\n\t\tRow headerRow = sheet.createRow(0);\n\n\t\tString[] columns = { \"الرقم\", \"رقم العقد \", \"تاريخ البداية\", \"تاريخ النهاية\", \"المستثمر\", \"حالة الفاتورة\" };\n\t\t// Create cells\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tCell cell = headerRow.createCell(i);\n\t\t\tcell.setCellValue(columns[i]);\n\t\t\tcell.setCellStyle(headerCellStyle);\n\t\t}\n\n\t\t// Create Cell Style for formatting Date\n\t\tCellStyle dateCellStyle = workbook.createCellStyle();\n\t\tdateCellStyle.setDataFormat(createHelper.createDataFormat().getFormat(\"dd-MM-yyyy\"));\n\n\t\t// Create Other rows and cells with employees data\n\t\tint rowNum = 1;\n\t\tint num = 1;\n//\t\tfor (ContractDirect contObj : contractsDirectList) {\n//\t\t\tRow row = sheet.createRow(rowNum++);\n//\t\t\trow.createCell(0).setCellValue(num);\n//\t\t\trow.createCell(1).setCellValue(contObj.getContractNum());\n//\n//\t\t\tif (!tableHigriMode) {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartContDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndContDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t} else {\n//\t\t\t\tCell date1 = row.createCell(2);\n//\t\t\t\tdate1.setCellValue(contObj.getStartDate());\n//\t\t\t\tdate1.setCellStyle(dateCellStyle);\n//\t\t\t\tCell date2 = row.createCell(3);\n//\t\t\t\tdate2.setCellValue(contObj.getEndDate());\n//\t\t\t\tdate2.setCellStyle(dateCellStyle);\n//\t\t\t}\n//\n//\t\t\tInvestor inv = (Investor) dataAccessService.findEntityById(Investor.class, contObj.getInvestorId());\n//\t\t\trow.createCell(4).setCellValue(inv.getName());\n//\t\t\trow.createCell(5).setCellValue(contObj.getPayStatusName());\n//\t\t\tnum++;\n//\t\t}\n\n\t\t// Resize all columns to fit the content size\n\t\tfor (int i = 0; i < columns.length; i++) {\n\t\t\tsheet.autoSizeColumn(i);\n\t\t}\n\n\t\t// Write the output to a file\n\n\t\ttry {\n\t\t\tString path = \"D:/العقود.xls\";\n\t\t\tFileOutputStream fileOut = new FileOutputStream(path);\n\t\t\tworkbook.write(fileOut);\n\t\t\tfileOut.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttry {\n\n\t\t\tworkbook.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\t// Closing the workbook\n\n\t}", "ISheet addSheet();", "void onActionFromExport() {\n\t\ttry {\n\t\t\tHSSFWorkbook document = new HSSFWorkbook();\n\t\t\tHSSFSheet sheet = ReportUtil.createSheet(document);\n\n\t\t\tsheet.setMargin((short) 0, 0.5);\n\t\t\tReportUtil.setColumnWidths(sheet, 0, 0.5, 1, 0.5, 2, 2, 3, 2, 3, 2, 4, 3, 5, 2, 6, 2, 7, 2, 8, 3, 9, 3, 10,\n\t\t\t\t\t3, 11, 2, 12, 2);\n\n\t\t\tMap<String, HSSFCellStyle> styles = ReportUtil.createStyles(document);\n\n\t\t\tint sheetNumber = 0;\n\t\t\tint rowIndex = 1;\n\t\t\tint colIndex = 1;\n\t\t\tLong index = 1L;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"empList\"), styles.get(\"title\"), 5);\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, ++rowIndex, 1,\n\t\t\t\t\tmessages.get(\"date\") + \": \" + format.format(new Date()), styles.get(\"plain-left-wrap\"), 5);\n\t\t\trowIndex += 2;\n\n\t\t\t/* column headers */\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1, messages.get(\"number-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2, messages.get(\"firstname-label\"),\n\t\t\t\t\tstyles.get(\"header-wrap\"));\n\n\t\t\tif (lastname) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"lastname-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (origin1) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"persuasion-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (register) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"register-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (status) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"status-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (gender) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"gender-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (occ) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"occupation-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (birthday) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"birthDate-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (phoneNo) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"phoneNo-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (email) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"email-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (org) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"organization-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (appointment) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"appointment-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegree) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цэргийн цол\", styles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeStatus) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цолны статус\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (militaryDegreeDate) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, \"Цол авсан огноо\",\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (TotalWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"TotalOrgWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (StateWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"stateWorkedYear-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"courtOrgTotalWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtMilitaryWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i,\n\t\t\t\t\t\tmessages.get(\"CourtSimpleWorkedYear-label\"), styles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tif (familyCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"familyCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\t\t\tif (childCount) {\n\t\t\t\ti++;\n\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 2 + i, messages.get(\"childCount-label\"),\n\t\t\t\t\t\tstyles.get(\"header-wrap\"));\n\t\t\t}\n\n\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\n\t\t\trowIndex++;\n\t\t\tif (listEmployee != null)\n\t\t\t\tfor (Employee empDTO : listEmployee) {\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\tlistEmployee.indexOf(empDTO) + 1 + \"\", styles.get(\"plain-left-wrap-border\"));\n\n\t\t\t\t\tif (lastname) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getLastname() != null) ? empDTO.getLastname() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++, empDTO.getFirstName(),\n\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\n\t\t\t\t\tif (origin1) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOrigin().getName() != null) ? empDTO.getOrigin().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (register) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getRegisterNo() != null) ? empDTO.getRegisterNo() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (status) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getEmployeeStatus() != null) ? empDTO.getEmployeeStatus().name() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (gender) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\tmessages.get((empDTO.getGender() != null) ? empDTO.getGender().toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (occ) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t(empDTO.getOccupation() != null) ? empDTO.getOccupation().getName() : \"\",\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (birthday) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getBirthDate() != null) ? format.format(empDTO.getBirthDate()) : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (phoneNo) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getPhoneNo() != null) ? empDTO.getPhoneNo() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (email) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.geteMail() != null) ? empDTO.geteMail() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (org) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getOrganization() != null) ? empDTO.getOrganization().getName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (appointment) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((empDTO.getAppointment() != null) ? empDTO.getAppointment().getAppointmentName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegree) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getMilitary().getMilitaryName() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeStatus) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? dao.getEmployeeMilitary(empDTO.getId()).getDegreeStatus().name() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (militaryDegreeDate) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((dao.getEmployeeMilitary(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? format.format(dao.getEmployeeMilitary(empDTO.getId()).getOlgosonOgnoo())\n\t\t\t\t\t\t\t\t\t\t: \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (TotalWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getTotalOrgWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getTotalOrgWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\tif (StateWorkedYear) {\n\t\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t\t((getStateWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t\t? getStateWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtOrgTotalWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtOrgTotalWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (CourtMilitaryWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtMilitaryWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtMilitaryWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (CourtSimpleWorkedYear) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, colIndex++,\n\t\t\t\t\t\t\t\t((getCourtSimpleWorkedYearExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getCourtSimpleWorkedYearExport(empDTO.getId()).toString() : \"\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (familyCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getFamilyCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getFamilyCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tif (childCount) {\n\t\t\t\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex,\n\t\t\t\t\t\t\t\tcolIndex++, ((getChildCountExport(empDTO.getId()) != null)\n\t\t\t\t\t\t\t\t\t\t? getChildCountExport(empDTO.getId()) : \"0\"),\n\t\t\t\t\t\t\t\tstyles.get(\"plain-left-wrap-border\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tReportUtil.setRowHeight(sheet, rowIndex, 3);\n\t\t\t\t\trowIndex++;\n\t\t\t\t\tindex++;\n\t\t\t\t\tcolIndex = 1;\n\n\t\t\t\t}\n\n\t\t\trowIndex += 2;\n\n\t\t\tExcelAPI.setCellValue(document, sheetNumber, rowIndex, 1,\n\t\t\t\t\t\"ТАЙЛАН ГАРГАСАН: \" + \"..................................... / \"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getLastname().charAt(0) + \".\"\n\t\t\t\t\t\t\t+ loginState.getEmployee().getFirstName() + \" /\",\n\t\t\t\t\tstyles.get(\"plain-left-wrap\"), 8);\n\t\t\trowIndex++;\n\n\t\t\tOutputStream out = response.getOutputStream(\"application/vnd.ms-excel\");\n\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"employeeList.xls\\\"\");\n\n\t\t\tdocument.write(out);\n\t\t\tout.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public HBox TableBottomBox()\n {\n HBox bottomBox = new HBox();\n bottomBox.setAlignment(Pos.BOTTOM_RIGHT);\n bottomBox.setSpacing(400);\n\n // add button to add to bottom box\n Button homeButton = new Button();\n homeButton.setPrefWidth(200);\n homeButton.setPrefHeight(50);\n homeButton.setText(\"Home\");\n \n homeButton.setOnMouseClicked((event -> {\n ui.goToScene(new HomeScene(ui));\n }));\n\n Button addNewButton = new Button();\n addNewButton.setPrefWidth(200);\n addNewButton.setPrefHeight(50);\n addNewButton.setText(\"Add New Hike\");\n \n addNewButton.setOnMouseClicked((event -> {\n ui.goToScene(new CreateHikeScene(ui));\n }));\n \n bottomBox.getChildren().addAll(addNewButton, homeButton);\n \n return bottomBox;\n }", "private void init() {\n\n bottomSheet = new myBottomSheet(view,getResources().getConfiguration().orientation,R.id.bottomsheet);\n\n if (bottomSheet.verificarOrientacaoVertical(getOrientation())) {\n\n behavior = bottomSheet.getMyBottomSheetBehavior();\n relativeLayout = view.findViewById(R.id.bottomsheet);\n\n if (relativeLayout.getVisibility() == View.VISIBLE && !liberarCalculo) {\n relativeLayout.setVisibility(View.INVISIBLE);\n }\n\n resultadoFinalSimples = view.findViewById(R.id.resultado_permutacaoFinal);\n\n\n if (!jaCalculou){\n resultadoFinalSimples.setText(\"$$\\\\bold{Resultado}$$\");\n }\n\n }\n\n\n this.inputElementos = view.findViewById(R.id.elementos_permutacao);\n this.inputPosicoes = view.findViewById(R.id.posicoes_permutacao);\n\n this.txtElementos = view.findViewById(R.id.txt_elementos);\n this.txtPosicoes = view.findViewById(R.id.txt_posicoes);\n\n\n this.formulaPermutacao = view.findViewById(R.id.formula_permutacao);\n this.resultadoPermutacao = view.findViewById(R.id.resultado_permutacaoPasso);\n\n this.toastMessage = Toast.makeText(getContext(), null, Toast.LENGTH_SHORT);\n\n this.btnCalcular = view.findViewById(R.id.btn_calcular);\n\n String formulaPermutacao = \"$$\\\\normalsize \\\\bold{Formula}$$\" + \" $${P(n, p)} = \\\\frac{n!} {(n-p)!}, n \\\\geqslant p$$\";\n\n this.formulaPermutacao.setText(formulaPermutacao);\n }", "protected String toXMLFragment() {\n StringBuffer xml = new StringBuffer();\n if (isSetStepConfig()) {\n StepConfig stepConfig = getStepConfig();\n xml.append(\"<StepConfig>\");\n xml.append(stepConfig.toXMLFragment());\n xml.append(\"</StepConfig>\");\n } \n if (isSetExecutionStatusDetail()) {\n StepExecutionStatusDetail executionStatusDetail = getExecutionStatusDetail();\n xml.append(\"<ExecutionStatusDetail>\");\n xml.append(executionStatusDetail.toXMLFragment());\n xml.append(\"</ExecutionStatusDetail>\");\n } \n return xml.toString();\n }", "Board createLayout();", "private void setupGuideLayout() {\n bottomSheetGuideTitle.setText(getGuideTitle());\n bottomSheetText.setText(getGuideAbstract());\n bottomSheetSchematic.setImageResource(getGuideSchematics());\n bottomSheetDesc.setText(getGuideDescription());\n // if sensor doesn't image in it's guide and hence returns 0 for getGuideSchematics(), hide the visibility of bottomSheetSchematic\n if (getGuideSchematics() != 0) {\n bottomSheetSchematic.setImageResource(getGuideSchematics());\n } else {\n bottomSheetSchematic.setVisibility(View.GONE);\n }\n // If a sensor has extra content than provided in the standard layout, create a new layout\n // and attach the layout id with getGuideExtraContent()\n if (getGuideExtraContent() != 0) {\n LayoutInflater I = (LayoutInflater) this.getSystemService(LAYOUT_INFLATER_SERVICE);\n assert I != null;\n View childLayout = I.inflate(getGuideExtraContent(), null);\n bottomSheetAdditionalContent.addView(childLayout);\n }\n }", "public BottomSheetMenu(@NonNull Context context) {\n super(context);\n\n this.context = context;\n\n LayoutInflater inflater = LayoutInflater.from(context);\n\n rootView = (LinearLayout) inflater.inflate(R.layout.bottom_sheet_dialog, null);\n\n setContentView(rootView);\n }", "private void createConent() {\n\t\tdockPanel = new DockLayoutPanel(Unit.PX);\n\t\tribbonBarPanel = new RibbonBarContainer();\n\t\tbattleMatCanvasPanel = new SimpleLayoutPanel();\n\t\tmainPanel = new LayoutPanel();\n\t\tmainPanel.setSize(\"100%\", \"100%\");\n\t\tbattleMatCanvas = new BattleMatCanvas();\n\t\tbattleMatCanvasPanel.clear();\n\t\tbattleMatCanvasPanel.add(battleMatCanvas);\n\t\teast.setSize(\"100%\", \"100%\");\n\t\teast.add(assetManagementPanel);\n\t\tsplitPanel = new SplitLayoutPanel() {\n\t\t\t@Override\n\t\t\tpublic void onResize() {\n\t\t\t\tsuper.onResize();\n\t\t\t\tbattleMatCanvas.onResize();\n\t\t\t};\n\t\t};\n\t\tmainPanel.add(splitPanel);\n\t\tdockPanel.clear();\n\t\tdockPanel.addNorth(ribbonBarPanel, Constants.RIBBON_BAR_SIZE);\n\t\tdockPanel.add(mainPanel);\n\t\t// MUST CALL THIS METHOD to set the constraints; if you don't not much\n\t\t// will be displayed!\n\t\tdockPanel.forceLayout();\n\n\t\tWindow.addResizeHandler(new ResizeHandler() {\n\t\t\tpublic void onResize(final ResizeEvent event) {\n\t\t\t\tdoWindowResize(event);\n\t\t\t}\n\t\t});\n\t}", "private JPanel getBottomPanel() {\r\n if (BottomPanel == null) {\r\n BottomPanel = new JPanel();\r\n BottomPanel.setLayout(null);\r\n BottomPanel.setBounds(new Rectangle(-1, 592, 525, 30));\r\n BottomPanel.setBorder(BorderFactory.createLineBorder(Color.gray, 1));\r\n BottomPanel.add(CardPrio, null);\r\n BottomPanel.add(Pr1, null);\r\n BottomPanel.add(pr2, null);\r\n BottomPanel.add(pr3, null);\r\n BottomPanel.add(pr4, null);\r\n }\r\n return BottomPanel;\r\n }", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "private void Add_Bottom_Top(String s) {\n\t\tBottom_Layout b = new Bottom_Layout(s);\n\t\tScrollPane sc = new ScrollPane();\n\t\t\n\t\tthis.mainPanel.add(b.getBottom(), BorderLayout.CENTER);\n\t\t\n\t}", "private void showDialog() {\n\n BaseBottomSheetDialog dialog = new BaseBottomSheetDialog(this);\n dialog.setContentView(R.layout.bottom_sheet);\n dialog.show();\n\n }", "public void save() {\n int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);\r\n int minute = Calendar.getInstance().get(Calendar.MINUTE);\r\n\r\n // Hierarchie: 2010/04/05/01_05042010_00002.xml\r\n File dir = getOutputDir();\r\n File f = new File(dir, getCode().replace(' ', '_') + \".xml\");\r\n Element topLevel = new Element(\"ticket\");\r\n topLevel.setAttribute(new Attribute(\"code\", this.getCode()));\r\n topLevel.setAttribute(\"hour\", String.valueOf(hour));\r\n topLevel.setAttribute(\"minute\", String.valueOf(minute));\r\n // Articles\r\n for (Pair<Article, Integer> item : this.items) {\r\n Element e = new Element(\"article\");\r\n e.setAttribute(\"qte\", String.valueOf(item.getSecond()));\r\n // Prix unitaire\r\n e.setAttribute(\"prix\", String.valueOf(item.getFirst().getPriceInCents()));\r\n e.setAttribute(\"prixHT\", String.valueOf(item.getFirst().getPriceHTInCents()));\r\n e.setAttribute(\"idTaxe\", String.valueOf(item.getFirst().getIdTaxe()));\r\n e.setAttribute(\"categorie\", item.getFirst().getCategorie().getName());\r\n e.setAttribute(\"codebarre\", item.getFirst().getCode());\r\n e.setText(item.getFirst().getName());\r\n topLevel.addContent(e);\r\n }\r\n // Paiements\r\n for (Paiement paiement : this.paiements) {\r\n final int montantInCents = paiement.getMontantInCents();\r\n if (montantInCents > 0) {\r\n final Element e = new Element(\"paiement\");\r\n String type = \"\";\r\n if (paiement.getType() == Paiement.CB) {\r\n type = \"CB\";\r\n } else if (paiement.getType() == Paiement.CHEQUE) {\r\n type = \"CHEQUE\";\r\n } else if (paiement.getType() == Paiement.ESPECES) {\r\n type = \"ESPECES\";\r\n }\r\n e.setAttribute(\"type\", type);\r\n e.setAttribute(\"montant\", String.valueOf(montantInCents));\r\n topLevel.addContent(e);\r\n }\r\n\r\n }\r\n try {\r\n final XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());\r\n out.output(topLevel, new FileOutputStream(f));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\n public Worksheet createWorksheet() {\n return model;\n }", "@AutoGenerated\r\n\tprivate TabSheet buildTabSheet_1() {\n\t\ttabSheet_1 = new TabSheet();\r\n\t\ttabSheet_1.setWidth(\"100.0%\");\r\n\t\ttabSheet_1.setHeight(\"100.0%\");\r\n\t\ttabSheet_1.setImmediate(true);\r\n\t\t\r\n\t\t// generalPanel\r\n\t\tgeneralPanel = buildGeneralPanel();\r\n\t\ttabSheet_1.addTab(generalPanel, \"General settings\", null);\r\n\t\t\r\n\t\t// videoPanel\r\n\t\tvideoPanel = buildVideoPanel();\r\n\t\ttabSheet_1.addTab(videoPanel, \"Video settings\", null);\r\n\t\t\r\n\t\t// audioPanel\r\n\t\taudioPanel = buildAudioPanel();\r\n\t\ttabSheet_1.addTab(audioPanel, \"Audio settings\", null);\r\n\t\t\r\n\t\treturn tabSheet_1;\r\n\t}", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }", "@Override\n\tprotected void buildExcelDocument(Map<String, Object> model,\n\t\t\tHSSFWorkbook workbook, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tDate date = new Date();\n\t\tString filename = Tools.date2Str(date, \"yyyyMMddHHmmss\");\n\t\tHSSFSheet sheet;\n\t\tHSSFCell cell;\n\t\tresponse.setContentType(\"application/octet-stream\");\n\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\"+filename+\".xls\");\n\t\tsheet = workbook.createSheet(\"sheet1\");\n\t\t\n\t\t//第一行表头\n\t\tPageData pdHead = (PageData) model.get(\"pdHead\");\n\t\t//第二行标题\n\t\tList<String> titles = (List<String>) model.get(\"titles\");\n\t\tint row = 0;\n\t\t\n\t\tif(StringUtil.isNotEmpty(pdHead)) {\n\t\t\tHSSFCellStyle headerStyle = workbook.createCellStyle(); //标题样式\n\t\t\theaderStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\t\theaderStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\n\t\t\tHSSFFont headerFont = workbook.createFont();\t//标题字体\n\t\t\theaderFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t\t\theaderFont.setFontHeightInPoints((short)11);\n\t\t\theaderStyle.setFont(headerFont);\n\t\t\t\n\t\t\tCellRangeAddress region = new CellRangeAddress(row, row, (short) 0, (short) titles.size()); \n\t\t\t\n\t\t\tString title = pdHead.getString(\"name\");\n\t\t\tcell = getCell(sheet, row, 0);\n\t\t\tcell.setCellStyle(headerStyle);\n\t\t\tsetText(cell,title);\n\t\t\tshort height=25*18*2;\n\t\t\tsheet.getRow(row).setHeight(height);\n\t\t\tsheet.addMergedRegion(region);\n\t\t\t\n\t\t\trow = 1;\n\t\t}\n\t\t\n\t\t\n\t\tint len = titles.size();\n\t\tHSSFCellStyle headerStyle = workbook.createCellStyle(); //标题样式\n\t\theaderStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\theaderStyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\n\t\tHSSFFont headerFont = workbook.createFont();\t//标题字体\n\t\theaderFont.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\n\t\theaderFont.setFontHeightInPoints((short)11);\n\t\theaderStyle.setFont(headerFont);\n\t\tshort width = 20,height=25*20;\n\t\tsheet.setDefaultColumnWidth(width);\n\t\tfor(int i=0; i<len; i++){ //设置标题\n\t\t\tString title = titles.get(i);\n\t\t\tcell = getCell(sheet, row, i);\n\t\t\tcell.setCellStyle(headerStyle);\n\t\t\tsetText(cell,title);\n\t\t}\n\t\t\n\t\tsheet.getRow(row).setHeight(height);\n\t\t\n\t\tHSSFCellStyle contentStyle = workbook.createCellStyle(); //内容样式\n\t\tcontentStyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\tList<PageData> varList = (List<PageData>) model.get(\"varList\");\n\t\tint varCount = varList.size();\n\t\tfor(int i=0; i<varCount; i++){\n\t\t\trow++;\n\t\t\tPageData vpd = varList.get(i);\n\t\t\tfor(int j=0;j<len;j++){\n\t\t\t\tString varstr = vpd.get(\"var\"+(j+1)).toString() != null ? vpd.get(\"var\"+(j+1)).toString() : \"\";\n\n\n\t\t\t\tcell = getCell(sheet, row, j);\n\t\t\t\tcell.setCellStyle(contentStyle);\n\t\t\t\tsetText(cell,varstr);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@AutoGenerated\n\tprivate HorizontalLayout buildHlToolbar() {\n\t\thlToolbar = new HorizontalLayout();\n\t\thlToolbar.setImmediate(false);\n\t\thlToolbar.setWidth(\"100.0%\");\n\t\thlToolbar.setHeight(\"100.0%\");\n\t\thlToolbar.setMargin(false);\n\t\t\n\t\t// btnFirstRegister\n\t\tbtnFirstRegister = new Button();\n\t\tbtnFirstRegister.setCaption(\"<<\");\n\t\tbtnFirstRegister.setImmediate(true);\n\t\tbtnFirstRegister.setWidth(\"-1px\");\n\t\tbtnFirstRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnFirstRegister);\n\t\t\n\t\t// btnPreviousRegister\n\t\tbtnPreviousRegister = new Button();\n\t\tbtnPreviousRegister.setCaption(\"<\");\n\t\tbtnPreviousRegister.setImmediate(true);\n\t\tbtnPreviousRegister.setWidth(\"-1px\");\n\t\tbtnPreviousRegister.setHeight(\"-1px\");\n\t\tbtnPreviousRegister.setTabIndex(1);\n\t\thlToolbar.addComponent(btnPreviousRegister);\n\t\t\n\t\t// lblCountRegister\n\t\tlblCountRegister = new Label();\n\t\tlblCountRegister.setStyleName(\"nav-toolbar-separator\");\n\t\tlblCountRegister.setImmediate(false);\n\t\tlblCountRegister.setWidth(\"50px\");\n\t\tlblCountRegister.setHeight(\"-1px\");\n\t\tlblCountRegister.setValue(\"1/1\");\n\t\thlToolbar.addComponent(lblCountRegister);\n\t\thlToolbar.setComponentAlignment(lblCountRegister, new Alignment(48));\n\t\t\n\t\t// btnNextRegister\n\t\tbtnNextRegister = new Button();\n\t\tbtnNextRegister.setCaption(\">\");\n\t\tbtnNextRegister.setImmediate(true);\n\t\tbtnNextRegister.setWidth(\"-1px\");\n\t\tbtnNextRegister.setHeight(\"-1px\");\n\t\tbtnNextRegister.setTabIndex(2);\n\t\thlToolbar.addComponent(btnNextRegister);\n\t\t\n\t\t// btnLastRegister\n\t\tbtnLastRegister = new Button();\n\t\tbtnLastRegister.setCaption(\">>\");\n\t\tbtnLastRegister.setImmediate(true);\n\t\tbtnLastRegister.setWidth(\"-1px\");\n\t\tbtnLastRegister.setHeight(\"-1px\");\n\t\tbtnLastRegister.setTabIndex(3);\n\t\thlToolbar.addComponent(btnLastRegister);\n\t\t\n\t\t// btnDownRegister\n\t\tbtnDownRegister = new Button();\n\t\tbtnDownRegister.setCaption(\"v\");\n\t\tbtnDownRegister.setImmediate(true);\n\t\tbtnDownRegister.setWidth(\"-1px\");\n\t\tbtnDownRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDownRegister);\n\t\t\n\t\t// btnUpRegister\n\t\tbtnUpRegister = new Button();\n\t\tbtnUpRegister.setCaption(\"^\");\n\t\tbtnUpRegister.setImmediate(true);\n\t\tbtnUpRegister.setWidth(\"-1px\");\n\t\tbtnUpRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnUpRegister);\n\t\t\n\t\t// btnDisplayRegister\n\t\tbtnDisplayRegister = new Button();\n\t\tbtnDisplayRegister.setCaption(\"C\");\n\t\tbtnDisplayRegister.setImmediate(false);\n\t\tbtnDisplayRegister.setWidth(\"-1px\");\n\t\tbtnDisplayRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDisplayRegister);\n\t\t\n\t\t// imgSeparator\n\t\timgSeparator = new Embedded();\n\t\timgSeparator.setImmediate(false);\n\t\timgSeparator.setWidth(\"-1px\");\n\t\timgSeparator.setHeight(\"-1px\");\n\t\timgSeparator.setSource(new ThemeResource(\n\t\t\t\t\"../konekti/images/separator.png\"));\n\t\timgSeparator.setType(1);\n\t\timgSeparator.setMimeType(\"image/png\");\n\t\thlToolbar.addComponent(imgSeparator);\n\t\t\n\t\t// btnRefreshRegister\n\t\tbtnRefreshRegister = new Button();\n\t\tbtnRefreshRegister.setCaption(\"R\");\n\t\tbtnRefreshRegister.setImmediate(true);\n\t\tbtnRefreshRegister.setWidth(\"-1px\");\n\t\tbtnRefreshRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnRefreshRegister);\n\t\t\n\t\t// btnAddRegister\n\t\tbtnAddRegister = new Button();\n\t\tbtnAddRegister.setCaption(\"A\");\n\t\tbtnAddRegister.setImmediate(true);\n\t\tbtnAddRegister.setWidth(\"-1px\");\n\t\tbtnAddRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnAddRegister);\n\t\t\n\t\t// btnEditRegister\n\t\tbtnEditRegister = new Button();\n\t\tbtnEditRegister.setCaption(\"U\");\n\t\tbtnEditRegister.setImmediate(true);\n\t\tbtnEditRegister.setWidth(\"-1px\");\n\t\tbtnEditRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnEditRegister);\n\t\t\n\t\t// btnDeleteRegister\n\t\tbtnDeleteRegister = new Button();\n\t\tbtnDeleteRegister.setCaption(\"D\");\n\t\tbtnDeleteRegister.setImmediate(true);\n\t\tbtnDeleteRegister.setWidth(\"-1px\");\n\t\tbtnDeleteRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDeleteRegister);\n\t\t\n\t\t// imgSeparatorGroup\n\t\timgSeparatorGroup = new Embedded();\n\t\timgSeparatorGroup.setImmediate(false);\n\t\timgSeparatorGroup.setWidth(\"-1px\");\n\t\timgSeparatorGroup.setHeight(\"-1px\");\n\t\timgSeparatorGroup.setSource(new ThemeResource(\n\t\t\t\t\"../konekti/images/separator_group.png\"));\n\t\timgSeparatorGroup.setType(1);\n\t\timgSeparatorGroup.setMimeType(\"image/png\");\n\t\thlToolbar.addComponent(imgSeparatorGroup);\n\t\thlToolbar.setComponentAlignment(imgSeparatorGroup, new Alignment(48));\n\t\t\n\t\t// btnConfirmRegister\n\t\tbtnConfirmRegister = new Button();\n\t\tbtnConfirmRegister.setCaption(\"[]\");\n\t\tbtnConfirmRegister.setImmediate(true);\n\t\tbtnConfirmRegister.setWidth(\"-1px\");\n\t\tbtnConfirmRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnConfirmRegister);\n\t\t\n\t\t// btnCancelRegister\n\t\tbtnCancelRegister = new Button();\n\t\tbtnCancelRegister.setCaption(\"X\");\n\t\tbtnCancelRegister.setImmediate(true);\n\t\tbtnCancelRegister.setWidth(\"-1px\");\n\t\tbtnCancelRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnCancelRegister);\n\t\t\n\t\treturn hlToolbar;\n\t}", "private void createPlacesListBottomSheet(final List<Place> mPlaceList)\n {\n GooglePlacesDisplayAdapterCustom adapter = new GooglePlacesDisplayAdapterCustom(mPlaceList);\n adapter.setOnItemClickListener(new GooglePlacesDisplayAdapterCustom.OnItemClickListener() {\n @Override\n public void onItemClick(GooglePlacesDisplayAdapterCustom.ItemHolder item, int position) {\n //dismissDialog();\n Toast.makeText(ARExploreActivity.this, mPlaceList.get(position).getName(), Toast.LENGTH_LONG).show();\n performPlaceDetailSearch(mPlaceList.get(position).getPlace_id());\n }\n });\n RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);\n recyclerView.setHasFixedSize(true);\n recyclerView.setLayoutManager(new LinearLayoutManager(this));\n recyclerView.setAdapter(adapter);\n\n placeListBottomSheetBehavior.setHideable(true); // so that the list can be hideded\n //placeListBottomSheetBehavior.setPeekHeight(peekHeight);\n extendButton.setVisibility(View.VISIBLE); //show extendbutton\n placeListBottomSheetBehavior.setState(placeListBottomSheetBehavior.STATE_EXPANDED);\n if(currentDisplayMode==DISPLAY_PLACE_DETAIL)\n {\n bottomsheetbehaviorgoogle.setHideable(true);\n bottomsheetbehaviorgoogle.setState(BottomSheetBehaviorGoogleMapsLike.STATE_HIDDEN);\n previousDisplayMode = currentDisplayMode;\n }\n currentDisplayMode = DISPLAY_PLACE_LIST;\n }", "abstract void toXML(StringBuilder xml, int level);", "protected abstract void toXml(PrintWriter result);", "private JPanel getPageSheet() {\r\n\t\tif (pageSheet == null) {\r\n\t\t\trecordNumInit = new JLabel();\r\n\t\t\trecordNumInit.setBounds(new java.awt.Rectangle(497,0,70,20));\r\n\t\t\trecordNumInit.setText(\"\");\r\n\t\t\trecordNumInit.setBackground(new Color(255, 204, 204));\r\n\t\t\tfieldIdInit = new JLabel();\r\n\t\t\tfieldIdInit.setBounds(new Rectangle(83, 20, 87, 20));\r\n\t\t\tfieldIdInit.setText(\"JLabel\");\r\n\t\t\tpageSheet = new JPanel();\r\n\t\t\tpageSheet.setBounds(new Rectangle(10, 135, 770, 340));\r\n\t\t\tpageSheet.setLayout(null);\r\n\t\t\tpageSheet.add(fieldIdInit, null);\r\n\t\t\t\r\n\t\t\timageButton = new CustomerImage(\"\");\r\n\t\t\timageButton.setVerticalAlignment(SwingConstants.CENTER);\r\n\t\t\timageButton.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\timageButton.setBounds(new Rectangle(480, 0, 207, 60));\r\n\t\t\tpageSheet.add(imageButton);\r\n\t\t\tpageSheet.add(recordNumInit, null);\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\tcheckInit = new JCheckBox(\"\");\r\n\t\t\tcheckInit.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tcheckInit.setBounds(3, 20, 70, 20);\r\n\t\t\tpageSheet.add(checkInit);\r\n\t\t\t\r\n\t\t\tfiledNameInit = new JLabel();\r\n\t\t\tfiledNameInit.setText(\"JLabel\");\r\n\t\t\tfiledNameInit.setBounds(new Rectangle(83, 20, 87, 20));\r\n\t\t\tfiledNameInit.setBounds(180, 20, 140, 20);\r\n\t\t\tpageSheet.add(filedNameInit);\r\n\t\t\t\r\n\t\t\tfieldTypeInit = new JLabel();\r\n\t\t\tfieldTypeInit.setText(\"JLabel\");\r\n\t\t\tfieldTypeInit.setBounds(new Rectangle(83, 20, 87, 20));\r\n\t\t\tfieldTypeInit.setBounds(348, 20, 100, 20);\r\n\t\t\tpageSheet.add(fieldTypeInit);\r\n\t\t}\r\n\t\treturn pageSheet;\r\n\t}", "private void createTable() {\n table = new Table();\n table.bottom();\n table.setFillParent(true);\n }", "@AutoGenerated\n\tprivate HorizontalLayout buildLayoutButtons() {\n\t\tlayoutButtons = new HorizontalLayout();\n\t\tlayoutButtons.setImmediate(false);\n\t\tlayoutButtons.setWidth(\"-1px\");\n\t\tlayoutButtons.setHeight(\"-1px\");\n\t\tlayoutButtons.setMargin(false);\n\t\t\n\t\t// btnSave\n\t\tbtnSave = new Button();\n\t\tbtnSave.setCaption(\"Salvar\");\n\t\tbtnSave.setImmediate(true);\n\t\tbtnSave.setWidth(\"-1px\");\n\t\tbtnSave.setHeight(\"-1px\");\n\t\tlayoutButtons.addComponent(btnSave);\n\t\t\n\t\t// btnCancel\n\t\tbtnCancel = new Button();\n\t\tbtnCancel.setCaption(\"Cancelar\");\n\t\tbtnCancel.setImmediate(true);\n\t\tbtnCancel.setWidth(\"-1px\");\n\t\tbtnCancel.setHeight(\"-1px\");\n\t\tlayoutButtons.addComponent(btnCancel);\n\t\t\n\t\treturn layoutButtons;\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"带进度条的表\");\r\n\t\tshell.setLayout(new FillLayout());\r\n\r\n\t\tTable table = new Table(shell, SWT.BORDER);\r\n\t\ttable.setHeaderVisible(true);\r\n\t\ttable.setLinesVisible(true);\r\n\r\n//\t\t两列\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tnew TableColumn(table, SWT.NONE);\r\n\t\t}\r\n\t\ttable.getColumn(0).setText(\"Task\");\r\n\t\ttable.getColumn(1).setText(\"Progress\");\r\n\r\n//\t\t四十行\r\n\t\tfor (int i = 0; i < 40; i++) {\r\n\t\t\tTableItem item = new TableItem(table, SWT.NONE);\r\n\t\t\titem.setText(\"Task \" + i);\r\n//\t\t\t行数为5的倍数时添加进度条\r\n\t\t\tif (i % 5 == 0) {\r\n\t\t\t\tProgressBar bar = new ProgressBar(table, SWT.NONE);\r\n\t\t\t\tbar.setSelection(i); // 进度条显示的百分比\r\n\t\t\t\tTableEditor editor = new TableEditor(table);\r\n\t\t\t\teditor.grabHorizontal = editor.grabVertical = true; // 宽度高度同表格\r\n\t\t\t\teditor.setEditor(bar, item, 1); // 在表格上方显示进度条\r\n\t\t\t}\r\n\t\t}\r\n\t\ttable.getColumn(0).pack();\r\n\t\ttable.getColumn(1).setWidth(128);\r\n\r\n\t\tshell.pack();\r\n\t}", "public static int create(EcoSystem system){\n \n \n XSSFWorkbook workbook = new XSSFWorkbook();\n XSSFSheet sheet = workbook.createSheet(\"Customer Details\");\n\n //Custom font style for header\n CellStyle cellStyle = sheet.getWorkbook().createCellStyle();\n Font font = sheet.getWorkbook().createFont();\n font.setBold(true);\n cellStyle.setFont(font);\n \n int rowCount = 0;\n int columnCount1 = 0;\n \n //Creating header row\n \n String s[] = {\"CUSTOMER ID\",\"CUSTOMER NAME\",\"CONTACT NO.\",\"EMAIL ID\",\"USAGE(Gallons)\",\"BILLING DATE\",\"TOTAL BILL($)\"};\n Row row1 = sheet.createRow(++rowCount);\n for(String s1 : s){\n Cell header = row1.createCell(++columnCount1);\n header.setCellValue(s1);\n header.setCellStyle(cellStyle);\n }\n \n \n \n for(Network network : system.getNetworkList()){\n for(Enterprise enterprise : network.getEnterpriseDirectory().getEnterpriseList()){\n if(enterprise instanceof WaterEnterprise){\n for(Organization organization : enterprise.getOrganizationDirectory().getOrganizationList()){\n if(organization instanceof CustomerOrganization){\n for(Employee employee : organization.getEmployeeDirectory().getEmployeeList()){\n Customer customer = (Customer) employee;\n Row row = sheet.createRow(++rowCount);\n int columnCount = 0;\n for(int i = 0 ; i<7 ; i++ ){\n Cell cell = row.createCell(++columnCount);\n if(i==0){\n cell.setCellValue(customer.getId());\n }\n else if(i == 1){\n cell.setCellValue(customer.getName());\n }\n else if(i == 2){\n cell.setCellValue(customer.getContactNo());\n }\n else if(i == 3){\n cell.setCellValue(customer.getEmailId());\n }\n else if(i == 4){\n cell.setCellValue(customer.getTotalUsageVolume());\n }\n else if(i == 5){\n if(customer.getBillingDate() != null)\n cell.setCellValue(String.valueOf(customer.getBillingDate()));\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n else if(i == 6){\n if(customer.getTotalBill() != 0)\n cell.setCellValue(customer.getTotalBill());\n else\n cell.setCellValue(\"Bill Not yet available\");\n }\n }\n }\n }\n }\n }\n }\n }\n \n \n try (FileOutputStream outputStream = new FileOutputStream(\"Customer_details.xlsx\")) {\n workbook.write(outputStream);\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"File not found\");\n return 0;\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"IOException\");\n return 0;\n }\n return 1;\n }", "private void createToolbar() {\r\n // the visible toolbar is actually a toolbar next to a combobox.\r\n // That is why we need this extra composite, layout and numColums = 2.\r\n final Composite parent = new Composite(SHELL, SWT.FILL);\r\n final GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n parent.setLayout(layout);\r\n\r\n final ToolBar bar = new ToolBar(parent, SWT.NONE);\r\n final GridData data = new GridData();\r\n data.heightHint = 55;\r\n data.grabExcessVerticalSpace = false;\r\n bar.setLayoutData(data);\r\n bar.setLayout(new GridLayout());\r\n\r\n createOpenButton(bar);\r\n\r\n createGenerateButton(bar);\r\n\r\n createSaveButton(bar);\r\n\r\n createSolveButton(bar);\r\n\r\n createAboutButton(bar);\r\n\r\n algorithmCombo = new AlgorithmCombo(parent);\r\n }", "private void createContent(WritableSheet sheet,List<ReportRowDataMapper> reportContent) throws WriteException,\r\n\t\t\tRowsExceededException {\n\t\t\r\n\t\tfor (ReportRowDataMapper reportRowDataMapper : reportContent) {\r\n\t\t\t\r\n\t\t}\r\n\t\tfor (int i = 1; i < 20; i++) {\r\n\t\t\t// First column\r\n\t\t\taddLabel(sheet, 0, i, \"Boring text \" + i);\r\n\t\t\t// Second column\r\n\t\t\taddLabel(sheet, 1, i, \"Another text\");\r\n\t\t}\r\n\t}", "public interface BottomSheetView {\n\n void setData(List<Flavor> recipe);\n\n void showBottomSheet();\n\n void hideBottomSheet();\n\n}", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public WorksheetBuilderImpl() {\n model = new BasicWorksheet();\n }", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n stylesheetEClass = createEClass(STYLESHEET);\n createEAttribute(stylesheetEClass, STYLESHEET__CHAR_SET);\n createEReference(stylesheetEClass, STYLESHEET__IMPORTS);\n createEReference(stylesheetEClass, STYLESHEET__STATEMENTS);\n\n cssTopLevelStatementEClass = createEClass(CSS_TOP_LEVEL_STATEMENT);\n\n cssOtherTopLevelDeclarationEClass = createEClass(CSS_OTHER_TOP_LEVEL_DECLARATION);\n\n importDeclarationEClass = createEClass(IMPORT_DECLARATION);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__IMPORT_URI);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__URL);\n createEAttribute(importDeclarationEClass, IMPORT_DECLARATION__MEDIA);\n\n mediaDeclarationEClass = createEClass(MEDIA_DECLARATION);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA_QUERIES);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEDIA);\n createEReference(mediaDeclarationEClass, MEDIA_DECLARATION__MEMBERS);\n\n mediaDeclarationMembersEClass = createEClass(MEDIA_DECLARATION_MEMBERS);\n\n mediaQueryEClass = createEClass(MEDIA_QUERY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__ONLY);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__NOT);\n createEAttribute(mediaQueryEClass, MEDIA_QUERY__MEDIA_TYPE);\n createEReference(mediaQueryEClass, MEDIA_QUERY__EXPRESSIONS);\n\n mediaQueryExpressionEClass = createEClass(MEDIA_QUERY_EXPRESSION);\n createEAttribute(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__FEATURE);\n createEReference(mediaQueryExpressionEClass, MEDIA_QUERY_EXPRESSION__EXPRESSION);\n\n pageDeclarationEClass = createEClass(PAGE_DECLARATION);\n createEAttribute(pageDeclarationEClass, PAGE_DECLARATION__PSEUDO_PAGE);\n createEReference(pageDeclarationEClass, PAGE_DECLARATION__BODY);\n\n namespaceDeclarationEClass = createEClass(NAMESPACE_DECLARATION);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__NAME);\n createEAttribute(namespaceDeclarationEClass, NAMESPACE_DECLARATION__URL);\n\n fontFaceDeclarationEClass = createEClass(FONT_FACE_DECLARATION);\n createEReference(fontFaceDeclarationEClass, FONT_FACE_DECLARATION__BODY);\n\n ruleSetEClass = createEClass(RULE_SET);\n createEReference(ruleSetEClass, RULE_SET__SELECTORS);\n createEReference(ruleSetEClass, RULE_SET__BODY);\n\n ruleSetBodyEClass = createEClass(RULE_SET_BODY);\n createEReference(ruleSetBodyEClass, RULE_SET_BODY__DECLARATIONS);\n\n propertyDeclarationEClass = createEClass(PROPERTY_DECLARATION);\n createEReference(propertyDeclarationEClass, PROPERTY_DECLARATION__VALUES_LISTS);\n\n knownPropertyDeclarationEClass = createEClass(KNOWN_PROPERTY_DECLARATION);\n createEAttribute(knownPropertyDeclarationEClass, KNOWN_PROPERTY_DECLARATION__NAME);\n\n unrecognizedPropertyDeclarationEClass = createEClass(UNRECOGNIZED_PROPERTY_DECLARATION);\n createEAttribute(unrecognizedPropertyDeclarationEClass, UNRECOGNIZED_PROPERTY_DECLARATION__NAME);\n\n propertyValuesListsEClass = createEClass(PROPERTY_VALUES_LISTS);\n createEReference(propertyValuesListsEClass, PROPERTY_VALUES_LISTS__LISTS);\n\n propertyValuesListEClass = createEClass(PROPERTY_VALUES_LIST);\n createEReference(propertyValuesListEClass, PROPERTY_VALUES_LIST__VALUES);\n\n propertyValueEClass = createEClass(PROPERTY_VALUE);\n createEReference(propertyValueEClass, PROPERTY_VALUE__VALUE);\n createEAttribute(propertyValueEClass, PROPERTY_VALUE__IMPORTANT);\n\n selectorEClass = createEClass(SELECTOR);\n\n simpleSelectorEClass = createEClass(SIMPLE_SELECTOR);\n\n typeSelectorEClass = createEClass(TYPE_SELECTOR);\n createEReference(typeSelectorEClass, TYPE_SELECTOR__NAMESPACE_PREFIX);\n createEAttribute(typeSelectorEClass, TYPE_SELECTOR__TYPE);\n\n namespacePrefixEClass = createEClass(NAMESPACE_PREFIX);\n createEReference(namespacePrefixEClass, NAMESPACE_PREFIX__NAMESPACE);\n\n universalSelectorEClass = createEClass(UNIVERSAL_SELECTOR);\n createEReference(universalSelectorEClass, UNIVERSAL_SELECTOR__NAMESPACE_PREFIX);\n\n attributeSelectorEClass = createEClass(ATTRIBUTE_SELECTOR);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__ATTRIBUTE);\n createEAttribute(attributeSelectorEClass, ATTRIBUTE_SELECTOR__MATCHER);\n createEReference(attributeSelectorEClass, ATTRIBUTE_SELECTOR__VALUE);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEReference(attributeEClass, ATTRIBUTE__NAMESPACE_PREFIX);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n\n attributeValueLiteralEClass = createEClass(ATTRIBUTE_VALUE_LITERAL);\n\n idSelectorEClass = createEClass(ID_SELECTOR);\n createEAttribute(idSelectorEClass, ID_SELECTOR__NAME);\n\n classSelectorEClass = createEClass(CLASS_SELECTOR);\n createEAttribute(classSelectorEClass, CLASS_SELECTOR__NAME);\n\n pseudoSelectorEClass = createEClass(PSEUDO_SELECTOR);\n\n noArgsPseudoClassSelectorEClass = createEClass(NO_ARGS_PSEUDO_CLASS_SELECTOR);\n createEAttribute(noArgsPseudoClassSelectorEClass, NO_ARGS_PSEUDO_CLASS_SELECTOR__PSEUDO);\n\n pseudoElementSelectorEClass = createEClass(PSEUDO_ELEMENT_SELECTOR);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__DOUBLE_SEMI_COLON);\n createEAttribute(pseudoElementSelectorEClass, PSEUDO_ELEMENT_SELECTOR__PSEUDO);\n\n languagePseudoClassSelectorEClass = createEClass(LANGUAGE_PSEUDO_CLASS_SELECTOR);\n createEAttribute(languagePseudoClassSelectorEClass, LANGUAGE_PSEUDO_CLASS_SELECTOR__LANGUGAGE_ID);\n\n functionalPseudoClassSelectorEClass = createEClass(FUNCTIONAL_PSEUDO_CLASS_SELECTOR);\n createEAttribute(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__PSEUDO);\n createEReference(functionalPseudoClassSelectorEClass, FUNCTIONAL_PSEUDO_CLASS_SELECTOR__ARGUMENT);\n\n typeArgumentEClass = createEClass(TYPE_ARGUMENT);\n\n linearArgumentEClass = createEClass(LINEAR_ARGUMENT);\n createEReference(linearArgumentEClass, LINEAR_ARGUMENT__COEFFICIENT);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT_SIGN);\n createEAttribute(linearArgumentEClass, LINEAR_ARGUMENT__CONSTANT);\n\n coefficientEClass = createEClass(COEFFICIENT);\n createEAttribute(coefficientEClass, COEFFICIENT__IDENT);\n createEAttribute(coefficientEClass, COEFFICIENT__INT);\n\n constantArgumentEClass = createEClass(CONSTANT_ARGUMENT);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__SIGN);\n createEAttribute(constantArgumentEClass, CONSTANT_ARGUMENT__INT);\n\n parityArgumentEClass = createEClass(PARITY_ARGUMENT);\n createEAttribute(parityArgumentEClass, PARITY_ARGUMENT__PARITY);\n\n negationSelectorEClass = createEClass(NEGATION_SELECTOR);\n createEReference(negationSelectorEClass, NEGATION_SELECTOR__SIMPLE_SELECTOR);\n\n valueLiteralEClass = createEClass(VALUE_LITERAL);\n\n numberLiteralEClass = createEClass(NUMBER_LITERAL);\n\n sizeLiteralEClass = createEClass(SIZE_LITERAL);\n\n stringLiteralEClass = createEClass(STRING_LITERAL);\n createEAttribute(stringLiteralEClass, STRING_LITERAL__VALUE);\n\n colorLiteralEClass = createEClass(COLOR_LITERAL);\n\n componentColorLiteralEClass = createEClass(COMPONENT_COLOR_LITERAL);\n\n colorComponentLiteralEClass = createEClass(COLOR_COMPONENT_LITERAL);\n createEReference(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__NUMBER);\n createEAttribute(colorComponentLiteralEClass, COLOR_COMPONENT_LITERAL__PERCENTAGE);\n\n urlLiteralEClass = createEClass(URL_LITERAL);\n createEAttribute(urlLiteralEClass, URL_LITERAL__VALUE);\n\n bareWordLiteralEClass = createEClass(BARE_WORD_LITERAL);\n createEAttribute(bareWordLiteralEClass, BARE_WORD_LITERAL__BARE_WORD);\n\n functionCallLiteralEClass = createEClass(FUNCTION_CALL_LITERAL);\n createEAttribute(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__FUNCTION);\n createEReference(functionCallLiteralEClass, FUNCTION_CALL_LITERAL__ARGUMENTS);\n\n descendantCombinatorEClass = createEClass(DESCENDANT_COMBINATOR);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__LEFT);\n createEAttribute(descendantCombinatorEClass, DESCENDANT_COMBINATOR__WS_I);\n createEReference(descendantCombinatorEClass, DESCENDANT_COMBINATOR__RIGHT);\n\n childCombinatorEClass = createEClass(CHILD_COMBINATOR);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__LEFT);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_L);\n createEAttribute(childCombinatorEClass, CHILD_COMBINATOR__WS_R);\n createEReference(childCombinatorEClass, CHILD_COMBINATOR__RIGHT);\n\n adjacentSiblingCombinatorEClass = createEClass(ADJACENT_SIBLING_COMBINATOR);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__LEFT);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_L);\n createEAttribute(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__WS_R);\n createEReference(adjacentSiblingCombinatorEClass, ADJACENT_SIBLING_COMBINATOR__RIGHT);\n\n generalSiblingCombinatorEClass = createEClass(GENERAL_SIBLING_COMBINATOR);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__LEFT);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_L);\n createEAttribute(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__WS_R);\n createEReference(generalSiblingCombinatorEClass, GENERAL_SIBLING_COMBINATOR__RIGHT);\n\n simpleSelectorSequenceEClass = createEClass(SIMPLE_SELECTOR_SEQUENCE);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__HEAD);\n createEReference(simpleSelectorSequenceEClass, SIMPLE_SELECTOR_SEQUENCE__SIMPLE_SELECTORS);\n\n universalNamespacePrefixEClass = createEClass(UNIVERSAL_NAMESPACE_PREFIX);\n\n withoutNamespacePrefixEClass = createEClass(WITHOUT_NAMESPACE_PREFIX);\n\n stringAttributeValueLiteralEClass = createEClass(STRING_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(stringAttributeValueLiteralEClass, STRING_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerAttributeValueLiteralEClass = createEClass(INTEGER_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(integerAttributeValueLiteralEClass, INTEGER_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n decimalAttributeValueLiteralEClass = createEClass(DECIMAL_ATTRIBUTE_VALUE_LITERAL);\n createEAttribute(decimalAttributeValueLiteralEClass, DECIMAL_ATTRIBUTE_VALUE_LITERAL__VALUE);\n\n integerLiteralEClass = createEClass(INTEGER_LITERAL);\n createEAttribute(integerLiteralEClass, INTEGER_LITERAL__INT);\n\n decimalLiteralEClass = createEClass(DECIMAL_LITERAL);\n createEAttribute(decimalLiteralEClass, DECIMAL_LITERAL__DECIMAL);\n\n quantifiedSizeLiteralEClass = createEClass(QUANTIFIED_SIZE_LITERAL);\n createEReference(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__NUMBER);\n createEAttribute(quantifiedSizeLiteralEClass, QUANTIFIED_SIZE_LITERAL__DIMENSION);\n\n qualifiedSizeLiteralEClass = createEClass(QUALIFIED_SIZE_LITERAL);\n createEAttribute(qualifiedSizeLiteralEClass, QUALIFIED_SIZE_LITERAL__BAREWORD);\n\n fontHeightLiteralEClass = createEClass(FONT_HEIGHT_LITERAL);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__FONT_HEIGHT);\n createEReference(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT);\n createEAttribute(fontHeightLiteralEClass, FONT_HEIGHT_LITERAL__LINE_HEIGHT_DIMENSION);\n\n rgbColorEClass = createEClass(RGB_COLOR);\n createEAttribute(rgbColorEClass, RGB_COLOR__RGB);\n\n namedColorEClass = createEClass(NAMED_COLOR);\n createEAttribute(namedColorEClass, NAMED_COLOR__COLOR);\n\n componentRGBColorEClass = createEClass(COMPONENT_RGB_COLOR);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__RED);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__GREEN);\n createEReference(componentRGBColorEClass, COMPONENT_RGB_COLOR__BLUE);\n\n componentRGBAlphaColorEClass = createEClass(COMPONENT_RGB_ALPHA_COLOR);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__RED);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__GREEN);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__BLUE);\n createEReference(componentRGBAlphaColorEClass, COMPONENT_RGB_ALPHA_COLOR__OPACITY);\n\n componentHSLColorEClass = createEClass(COMPONENT_HSL_COLOR);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__HUE);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__SATURATION);\n createEReference(componentHSLColorEClass, COMPONENT_HSL_COLOR__LIGHTNESS);\n\n componentHSLAlphaColorEClass = createEClass(COMPONENT_HSL_ALPHA_COLOR);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__HUE);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__SATURATION);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__LIGHTNESS);\n createEReference(componentHSLAlphaColorEClass, COMPONENT_HSL_ALPHA_COLOR__OPACITY);\n\n alphaLiteralEClass = createEClass(ALPHA_LITERAL);\n createEReference(alphaLiteralEClass, ALPHA_LITERAL__OPACITY);\n\n // Create enums\n knownPropertiesEEnum = createEEnum(KNOWN_PROPERTIES);\n attributeSelectorMatchersEEnum = createEEnum(ATTRIBUTE_SELECTOR_MATCHERS);\n noArgsPseudosEEnum = createEEnum(NO_ARGS_PSEUDOS);\n pseudoElementsEEnum = createEEnum(PSEUDO_ELEMENTS);\n functionalPseudoClassesEEnum = createEEnum(FUNCTIONAL_PSEUDO_CLASSES);\n paritiesEEnum = createEEnum(PARITIES);\n dimensionsEEnum = createEEnum(DIMENSIONS);\n colorNamesEEnum = createEEnum(COLOR_NAMES);\n }", "public void createHeader() {\n\t\tHBox box = new HBox();\n\t\tButton printBtn = new Button(\"Print\");\n\t\tprintBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton printAllBtn = new Button(\"Print allemaal\");\n\t\tprintAllBtn.getStyleClass().addAll(\"btn\", \"btn-primary\");\n\t\tButton cancelBtn = new Button(\"Annuleer\");\n\t\tcancelBtn.getStyleClass().addAll(\"btn\", \"btn-danger\");\n\t\tbox.getChildren().addAll(createTitle(), printBtn, printAllBtn, cancelBtn);\n\t\t\n\t\tprintBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printSelected(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tprintAllBtn.setOnAction(e -> {\n\t\t\ttry {\n\t\t\t\tprintController.printAll(debiteuren);\n\t\t\t} catch (Exception e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t\tSystem.out.println(\"Nothing selected mate\");\n\t\t\t}\n\t\t});\n\t\t\n\t\tcancelBtn.setOnAction(e -> {\n\t\t\tprintController.cancel();\n\t\t});\n\t\t\n\t\tsetTop(box);\n\t}", "private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\t// Setzt die Hintergrundfarbe auf Grün\n\t\tmainLayout.addStyleName(\"backgroundErfassung\");\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\n\t\treturn mainLayout;\n\t}", "BossBar createBossBar(String title, BossColor color, BossStyle style);", "@OnClick(R.id.openBottomsheetLayout)\n void openBottomSheet() {\n\n BottomSheetDialogOnRecordVideoScreen dialog = new BottomSheetDialogOnRecordVideoScreen(getActivity(), mItemClickListener); // Setting dialogview\n Window window = dialog.getWindow();\n window.setGravity(Gravity.BOTTOM);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.show();\n }", "private void layout() {\n\n\n _abortButton= makeAbortButton();\n _abortButton.addStyleName(\"download-group-abort\");\n _content.addStyleName(\"download-group-content\");\n _detailUI= new DetailUIInfo[getPartCount(_monItem)];\n layoutDetails();\n }", "public HSSFWorkbook generateExcel(String inicio, String fin, String empleado, String cargo, String nomdep, Vector<String> dias) {\r\n\r\n // Initialize rowIndex\r\n rowIndex = 0;\r\n\r\n // New Workbook\r\n workbook = new HSSFWorkbook();\r\n\r\n // Generate fonts\r\n headerFont = createFont(HSSFColor.WHITE.index, (short) 12, true);\r\n headerFont1 = createFont(HSSFColor.WHITE.index, (short) 17, true);\r\n headerFont2 = createFont(HSSFColor.WHITE.index, (short) 12, true);\r\n contentFont = createFont(HSSFColor.BLACK.index, (short) 11, false);\r\n contentFont2 = createFont(HSSFColor.BLACK.index, (short) 11, false);\r\n\r\n // Generate styles\r\n headerStyle1 = createStyle(headerFont1, HSSFCellStyle.ALIGN_CENTER, HSSFColor.BLUE.index, false, HSSFColor.BLACK.index);\r\n headerStyle2 = createStyle(headerFont2, HSSFCellStyle.ALIGN_CENTER, HSSFColor.BLUE.index, false, HSSFColor.BLACK.index);\r\n contentStyle2 = createStyle(contentFont2, HSSFCellStyle.ALIGN_LEFT, HSSFColor.WHITE.index, false, HSSFColor.BLACK.index);\r\n headerStyle = createStyle(headerFont, HSSFCellStyle.ALIGN_CENTER, HSSFColor.LIGHT_BLUE.index, false, HSSFColor.DARK_BLUE.index);\r\n oddRowStyle = createStyle(contentFont, HSSFCellStyle.ALIGN_LEFT, HSSFColor.WHITE.index, false, HSSFColor.WHITE.index);\r\n evenRowStyle = createStyle(contentFont, HSSFCellStyle.ALIGN_LEFT, HSSFColor.LIGHT_TURQUOISE.index, false, HSSFColor.GREY_25_PERCENT.index);\r\n\r\n // New sheet\r\n HSSFSheet sheet = workbook.createSheet(\"PERCEPCIONES Y DEDUCCIONES\");\r\n HSSFRow headerRow1 = sheet.createRow(rowIndex++);\r\n \r\n HSSFCell headerCell1 = null;\r\n\r\n if (nomdep.contains(\"-SELECCIONE UNA OPCION-\")) {\r\n headerCell1 = headerRow1.createCell(0);\r\n headerCell1.setCellStyle(headerStyle1);\r\n headerCell1.setCellValue(\"PERCEPCIONES Y DEDUCCIONES \" + inicio + \"/\" + fin);\r\n } else {\r\n headerCell1 = headerRow1.createCell(0);\r\n headerCell1.setCellStyle(headerStyle1);\r\n headerCell1.setCellValue(\"PERCEPCIONES Y DEDUCCIONES \" + inicio + \"/\" + fin + \" \" + nomdep);\r\n }\r\n\r\n CellRangeAddress re = new CellRangeAddress(0, 0, 0, 3);\r\n sheet.addMergedRegion(re);\r\n\r\n \r\n\r\n // Table content\r\n HSSFRow contentRow = null;\r\n HSSFCell contentCell = null;\r\n\r\n // Obtain table content values\r\n List<List<String>> contentRowValues = PercepcionesReport.getContentnombres(nomdep, dias);\r\n for (List<String> rowValues : contentRowValues) {\r\n // Table header\r\n HSSFRow headerRow = sheet.createRow(rowIndex++);\r\n List<String> headerValues = PercepcionesReport.getHeadersnom();\r\n\r\n HSSFCell headerCell = null;\r\n for (int i = 0; i < headerValues.size(); i++) {\r\n headerCell = headerRow.createCell(i);\r\n headerCell.setCellStyle(headerStyle2);\r\n headerCell.setCellValue(headerValues.get(i));\r\n }\r\n // At each row creation, rowIndex must grow one unit\r\n contentRow = sheet.createRow(rowIndex++);\r\n for (int i = 0; i < rowValues.size(); i++) {\r\n contentCell = contentRow.createCell(i);\r\n contentCell.setCellValue(rowValues.get(i));\r\n // Style depends on if row is odd or even\r\n contentCell.setCellStyle(contentStyle2);\r\n }\r\n HSSFRow headerRow4 = sheet.createRow(rowIndex++);\r\n List<String> headerValues4 = PercepcionesReport.getHeaders();\r\n\r\n HSSFCell headerCell4 = null;\r\n for (int i = 0; i < headerValues4.size(); i++) {\r\n headerCell4 = headerRow4.createCell(i);\r\n headerCell4.setCellStyle(headerStyle);\r\n headerCell4.setCellValue(headerValues4.get(i));\r\n }\r\n // Autosize columns\r\n for (int i = 0; i < headerValues4.size(); sheet.autoSizeColumn(i++));\r\n \r\n String idemp=rowValues.get(0);\r\n for (int dia = 0; dia < dias.size(); dia++) {\r\n String fecha=dias.elementAt(dia);\r\n List<List<String>> contentRowValues2 = PercepcionesReport.getContent(idemp, fecha);\r\n for (List<String> rowValues2 : contentRowValues2) {\r\n // At each row creation, rowIndex must grow one unit\r\n contentRow = sheet.createRow(rowIndex++);\r\n for (int i = 0; i < rowValues2.size(); i++) {\r\n contentCell = contentRow.createCell(i);\r\n contentCell.setCellValue(rowValues2.get(i));\r\n // Style depends on if row is odd or even\r\n contentCell.setCellStyle(rowIndex % 2 == 0 ? oddRowStyle : evenRowStyle);\r\n }\r\n }\r\n }\r\n// Autosize columns\r\n for (int i = 0; i < headerValues.size(); sheet.autoSizeColumn(i++));\r\n }\r\n HSSFRow headerRow00 = sheet.createRow(rowIndex++);\r\n String datos = empleado + \" \" + cargo;\r\n String da[] = new String[5];\r\n da[1] = \"Realizado por\";\r\n da[2] = \"Fecha y Hora\";\r\n da[3] = datos;\r\n da[4] = fecha();\r\n\r\n HSSFCell headerCell00 = null;\r\n for (int i = 1; i < 3; i++) {\r\n headerCell00 = headerRow00.createCell(i);\r\n headerCell00.setCellStyle(headerStyle);\r\n headerCell00.setCellValue(da[i]);\r\n }\r\n HSSFRow headerRow000 = sheet.createRow(rowIndex++);\r\n HSSFCell headerCell000 = null;\r\n for (int i = 1; i < 3; i++) {\r\n\r\n headerCell000 = headerRow000.createCell(i);\r\n headerCell000.setCellStyle(oddRowStyle);\r\n headerCell000.setCellValue(da[i + 2]);\r\n }\r\n \r\n\r\n return workbook;\r\n }", "public void writeXMLFinisher() {\n\t\tJavaIO.createXMLFile(getCurrentPath(), \"coveragePriorJ.xml\", \"</list>\", true);\n\t}", "private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "public JPanel bottomPanel() {\n\t\tJPanel bpanel = new JPanel(null);\n\t\tbpanel.setBounds(0, 400, 700, 100);\n\t\tbpanel.setBackground(Color.PINK);\n\t\tlbldescribe.setBounds(450, 10, 250, 50);\n\t\tlbldescribe.setForeground(Color.WHITE);\n\t\tbpanel.add(lbldescribe);\n\t\treturn bpanel;\n\t}", "@AutoGenerated\n\tprivate Panel buildPnToolbar() {\n\t\tpnToolbar = new Panel();\n\t\tpnToolbar.setImmediate(false);\n\t\tpnToolbar.setWidth(\"100.0%\");\n\t\tpnToolbar.setHeight(\"100.0%\");\n\t\t\n\t\t// hlToolbar\n\t\thlToolbar = buildHlToolbar();\n\t\tpnToolbar.setContent(hlToolbar);\n\t\t\n\t\treturn pnToolbar;\n\t}", "private static StyleBuilder getHeaderStyle(ExportData metaData){\n \n /*pour la police des entàtes de HARVESTING*/\n if(metaData.getTitle().equals(ITitle.HARVESTING)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de SERVICING*/\n if(metaData.getTitle().equals(ITitle.SERVICING)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de FERTILIZATION*/\n if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }/*pour la police des entetes de CONTROL_PHYTO*/\n if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setFontSize(7)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n\n }else{\n return stl.style().setBorder(stl.pen1Point().setLineColor(Color.BLACK))\n .setPadding(5)\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setVerticalAlignment(VerticalAlignment.MIDDLE)\n .setForegroundColor(Color.WHITE)\n .setBackgroundColor(new Color(60, 91, 31))\n .bold(); \n }\n \n }", "private void createLegend()\n\t{\n\t\txml = new XMLOut(rfoDir + legendName, \"reprap-fab-at-home-build version=\\\"0.1\\\"\");\n\t\tfor(int i = 0; i < astl.size(); i++)\n\t\t{\n\t\t\txml.push(\"object name=\\\"object-\" + i + \"\\\"\");\n\t\t\t xml.push(\"files\");\n\t\t\t STLObject stlo = astl.get(i);\n\t\t\t for(int subObj = 0; subObj < stlo.size(); subObj++)\n\t\t\t {\n\t\t\t\t xml.push(\"file location=\\\"\" + stlName(stlo.getUnique(subObj)) + \"\\\" filetype=\\\"application/sla\\\" material=\\\"\" + \n\t\t\t\t\t\t stlo.attributes(subObj).getMaterial() + \"\\\"\");\n\t\t\t\t xml.pop();\n\t\t\t }\n\t\t\t xml.pop();\n\t\t\t writeTransform(stlo.trans());\n\t\t\txml.pop();\n\t\t}\n\t\txml.close();\n\t}", "public void printToXML() {\n String fileString = \"outputDisposal.xml\";\n //Creating the path object of the file\n Path filePath = Paths.get(fileString);\n if (Files.notExists(filePath)) {\n try {\n Files.createFile(filePath);\n } catch (IOException e1) {\n\n e1.printStackTrace();\n }\n }\n //Converting the path object to file to use in the FileWriter constructor \n File newFile = filePath.toFile();\n\n /*\n Typical try-with-resources block that features three streams: FileWriter,BufferedWriter and PrintWriter.\n The FileWriter object connects the file tho the stream.\n The BufferedWriter object \n */\n try ( PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(newFile)))) {\n for (PickUp pck : pickups) {\n out.print(pck);\n }\n\n } catch (IOException e) {\n System.err.println(e);\n }\n\n }", "private BarData generateDataBar() {\n\n ArrayList<BarEntry> entries = new ArrayList<>();\n\n for (int i = 0; i < 12; i++) {\n entries.add(new BarEntry(i, (int) (Math.random() * 70) + 30));\n }\n\n BarDataSet d = new BarDataSet(entries, \"New DataSet 1\");\n // 设置相邻的柱状图之间的距离\n d.setColors(ColorTemplate.VORDIPLOM_COLORS);\n // 设置高亮的透明度\n d.setHighLightAlpha(255);\n\n BarData cd = new BarData(d);\n cd.setBarWidth(0.9f);\n return cd;\n }", "BottombarViewFlipper getBottomBar();", "public int xlsWriter(List<CeoMypageDto> datas, String fileName, CeoMypageDto ceoDto )\n\t{\n\t\tint flag = 1;\n\t\tint startRow =2;\n\t\tint startCol =1;\n\t\t//workbook생성\n\t\tHSSFWorkbook workBook = new HSSFWorkbook();\n\t\t\n\t\t//work sheet생성\n\t\tif(fileName.equals(\"\"))fileName=\"sheet1\";\n\t\tHSSFSheet workSheet = workBook.createSheet(fileName);\n\t\t\n\t\t//행생성\n\t\tHSSFRow row = workSheet.createRow(startRow);\n\t\tHSSFRow row1 = workSheet.createRow(startRow+1);\n\t\tHSSFRow row2 = workSheet.createRow(startRow+2);\n\t\t\n\t\t//cell생성\n\t\tHSSFCell cell;\n\t\t\n\t\t//스타일 설정\n\n\n\t\t//스타일 객체 생성 \n\t\tHSSFCellStyle styleHd = workBook.createCellStyle(); //제목 스타일\n\t\tHSSFCellStyle styleBody = workBook.createCellStyle(); //내용 스타일\n\n\n\t\t//제목 폰트\n\t\tHSSFFont font = workBook.createFont();\n\t\tfont.setFontHeightInPoints((short)12);\n\t\tfont.setBoldweight((short)font.BOLDWEIGHT_BOLD);\n\n\t\t//제목 스타일에 폰트 적용, 정렬\n\t\tstyleHd.setFont(font);\n\t\tstyleHd.setAlignment(HSSFCellStyle.ALIGN_CENTER);\n\t\tstyleHd.setVerticalAlignment (HSSFCellStyle.VERTICAL_CENTER);\n styleHd.setFillBackgroundColor(HSSFColor.SKY_BLUE.index);\n styleHd.setFillForegroundColor(HSSFColor.SKY_BLUE.index);\n \n \n\t\tstyleHd.setFillPattern(CellStyle.SOLID_FOREGROUND);\n\t\t\n\t\t//날짜부분\n\t\tcell = row.createCell(startCol);\n\t\tcell.setCellValue(ceoDto.getSTART_DATE());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row.createCell(startCol+2);\n\t\tcell.setCellValue(ceoDto.getEND_DATE());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\t//검색어, 페이지넘 부분 \n\t\tcell = row1.createCell(startCol);\n\t\tcell.setCellValue(ceoDto.getSEARCH().replace(\"%\", \"\"));\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row1.createCell(startCol+2);\n\t\tcell.setCellValue(ceoDto.getPAGE_NUM());\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t// 제목부분 \n\t\tcell = row2.createCell(startCol);\n\t\tcell.setCellValue(\"분류\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+1);\n\t\tcell.setCellValue(\"상품이름\");\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+2);\n\t\tcell.setCellValue(\"구매색상\");\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+3);\n\t\tcell.setCellValue(\"구매사이즈\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+4);\n\t\tcell.setCellValue(\"구매자\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+5);\n\t\tcell.setCellValue(\"상품수량\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+6);\n\t\tcell.setCellValue(\"재고\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+7);\n\t\tcell.setCellValue(\"실제 구매가격\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\t\tcell = row2.createCell(startCol+8);\n\t\tcell.setCellValue(\"구매시간\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\t\t\n\t\tcell = row2.createCell(startCol+9);\n\t\tcell.setCellValue(\"배송상태\");\t\t\n\t\tcell.setCellStyle(styleHd);\n\n\n\n\t\t\n\t\tfor(int i=0;i<datas.size();i++)\n\t\t{\n\t\t\tCeoMypageDto vo = (CeoMypageDto)datas.get(i);\n\t\t\trow = workSheet.createRow(i+(startRow+3));\n\t\t \t\n\t\t\tcell = row.createCell(startCol+0);\n\t\t\tcell.setCellValue(vo.getITEM());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+1);\n\t\t\tcell.setCellValue(vo.getPRO_NAME());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+2);\n\t\t\tcell.setCellValue(vo.getSEL_COLOR());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+3);\n\t\t\tcell.setCellValue(vo.getSEL_SIZE());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+4);\n\t\t\tcell.setCellValue(vo.getUSER_ID());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+5);\n\t\t\tcell.setCellValue(vo.getSEL_NUM());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+6);\n\t\t\tcell.setCellValue(vo.getSTOCK());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+7);\n\t\t\tcell.setCellValue(vo.getFINAL_PRICE());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+8);\n\t\t\tcell.setCellValue(vo.getSELTIME());\n\t\t\t\n\t\t\tcell = row.createCell(startCol+9);\n\t\t\tcell.setCellValue(vo.getDEL_STEP());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor (int i=0;i<4;i++) \n\t\t{ \n\t\t\tworkSheet.autoSizeColumn(i);\n\t\t\tworkSheet.setColumnWidth(i, (workSheet.getColumnWidth(i))+512 ); //이건 자동으로 조절 하면 너무 딱딱해 보여서 자동조정한 사이즈에 (short)512를 추가해 주니 한결 보기 나아졌다.\n\t\t}\n\t\tworkSheet.setColumnWidth(0, 200);\n\t\t\n\t\t\n\t\tFile file=new File(PATH+fileName+\"_\"+ExcelUtil.getPK()+\".xls\" );\n\t\tFileOutputStream fo = null;\n\t\ttry{\n\t\t\tfo = new FileOutputStream(file);\n\t\t\tworkBook.write(fo);\n\t\t}catch(FileNotFoundException fnf){\n\t\t\tflag = -1;\n\t\t\tfnf.printStackTrace();\n\t\t\t\n\t\t}catch(IOException io){\n\t\t\tflag = -1;\n\t\t\tio.printStackTrace();\n\t\t}finally{\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\tif(workBook!=null)workBook.close();\n\t\t\t\tif(fo!=null)fo.close();\n\t\t\t\t\n\t\t\t}catch(IOException io){\n\t\t\t\tflag = -1;\n\t\t\t\tio.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn flag;\n\t}", "private void init(Context context) {\n inflate(context, R.layout.bottom_sheet_layout, this);\n\n /*Components*/\n tvHeader = findViewById(R.id.tv_message);\n loadingAnimationView = findViewById(R.id.error_animation_view);\n errorLayout = findViewById(R.id.error_layout);\n\n /*Sheet setup*/\n sheetHeader = findViewById(R.id.sheet_header);\n sheetLayout = findViewById(R.id.sheet_layout);\n bottomSheetBehavior = BottomSheetBehavior.from(sheetLayout);\n\n /*Recycler setup*/\n recyclerView = findViewById(R.id.rv_vehicles);\n llm = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);\n recyclerView.setLayoutManager(llm);\n adapter = new VehiclesAdapter(context, new ArrayList<>());\n recyclerView.setAdapter(adapter);\n }", "protected abstract Widget instantiateFooterPanel () ;", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // setContentView(R.layout.view_bottom_popwindow_container);\n initViews();\n initValues();\n }", "public void createPackageContents() {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n kShapeLayoutEClass = createEClass(KSHAPE_LAYOUT);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__XPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__YPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__WIDTH);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__HEIGHT);\r\n createEReference(kShapeLayoutEClass, KSHAPE_LAYOUT__INSETS);\r\n\r\n kEdgeLayoutEClass = createEClass(KEDGE_LAYOUT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__BEND_POINTS);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__SOURCE_POINT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__TARGET_POINT);\r\n\r\n kLayoutDataEClass = createEClass(KLAYOUT_DATA);\r\n\r\n kPointEClass = createEClass(KPOINT);\r\n createEAttribute(kPointEClass, KPOINT__X);\r\n createEAttribute(kPointEClass, KPOINT__Y);\r\n\r\n kInsetsEClass = createEClass(KINSETS);\r\n createEAttribute(kInsetsEClass, KINSETS__TOP);\r\n createEAttribute(kInsetsEClass, KINSETS__BOTTOM);\r\n createEAttribute(kInsetsEClass, KINSETS__LEFT);\r\n createEAttribute(kInsetsEClass, KINSETS__RIGHT);\r\n\r\n kIdentifierEClass = createEClass(KIDENTIFIER);\r\n createEAttribute(kIdentifierEClass, KIDENTIFIER__ID);\r\n\r\n kVectorEClass = createEClass(KVECTOR);\r\n createEAttribute(kVectorEClass, KVECTOR__X);\r\n createEAttribute(kVectorEClass, KVECTOR__Y);\r\n\r\n kVectorChainEClass = createEClass(KVECTOR_CHAIN);\r\n }", "private HBox addBottomBox() {\n HBox bottom = new HBox();\n bottom.setAlignment(Pos.CENTER_LEFT);\n bottom.setStyle(\"-fx-background-color: DAE6F3;\");\n\n HBox pB = new HBox();\n pB.setPrefWidth(300);\n TextField pT = getTextField(\"Plant\", \"Enter an Integer number for Plant <=30\", \"Enter a custom number for Plant quantity.\");\n pB.getChildren().add(pT);\n\n HBox tB = new HBox();\n TextField tT = getTextField(\"Yoshi\", \"Enter an Integer number for Yoshi <=30\", \"Enter a custom number for Yoshi quantity.\");\n tB.getChildren().add(tT);\n\n bottom.getChildren().addAll(pB, tB);\n return bottom;\n }", "public ExcelSaver(Data itemsToSave) {\n\t\twb = new HSSFWorkbook();\n\t\ts = wb.createSheet();\n\t\theaders = new ArrayList<>(Attribute.getAtts().keySet().stream().filter(Attribute::isSel).collect(Collectors.toList()));\n//\t\theaders.add(\"Group\");\n\t\tsetHeaders(headers);\n\t\tsave(itemsToSave);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\txActivityDiagramArbiterEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER);\n\n\t\txActivityDiagramArbiterStateEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_STATE);\n\n\t\txActivityDiagramArbiterTransitionEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_TRANSITION);\n\t}", "public String generateXML() \n { \n \n String xml = new String();\n \n String nodetype = new String();\n if (type.equals(\"internal\")){\n nodetype = \"INTERNAL\"; //change this for change in XML node name\n }\n else {\n nodetype = \"LEAF\"; //change this for change in XML node name\n }\n \n xml = \"<\" + nodetype;\n if (!name.equals(\"\")){\n xml = xml + \" name = \\\"\" + name + \"\\\"\";\n }\n if (length >0){\n xml = xml + \" length = \\\"\" + length + \"\\\"\";\n }\n //Section below tests tree size and depths\n // if (level > 0){\n // xml = xml + \" level = \\\"\" + level + \"\\\"\";\n // }\n //if (depth > 0){\n // xml = xml + \" depth = \\\"\" + depth + \"\\\"\";\n //}\n //if (newicklength > 0){\n // xml = xml + \" newicklength = \\\"\" + newicklength + \"\\\"\";\n //}\n // if (treesize > 0){\n // xml = xml + \" treesize = \\\"\" + treesize + \"\\\"\";\n //}\n //if (startxcoord >= 0){\n // xml = xml + \" startx = \\\"\" + startxcoord + \"\\\"\";\n //}\n //if (endxcoord >= 0){\n // xml = xml + \" endx = \\\"\" + endxcoord + \"\\\"\";\n //}\n //Test section done\n xml = xml + \">\";\n \n if (!children.isEmpty()){ //if there are children in this node's arraylist\n Iterator it = children.iterator();\n while(it.hasNext()){\n Node child = (Node) it.next();\n xml = xml + child.generateXML(); //The recursive coolness happens here!\n }\n }\n xml = xml + \"</\" + nodetype + \">\";\n \n return xml;\n }", "private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }", "private void buildAccountBalancePane() // buildAccountBalancePane method start\n\t{\n\t\t// creating object\n\t\tbalanceOutput = new JTextArea();\n\t\t\n\t\t// object settings\n\t\tbalanceOutput.setText(log.balanceReport());\n\t\tbalanceOutput.setEditable(false);\n\t\tbalanceOutput.setFont(font);\n\t\tbalanceOutput.setRows(20);\n\t\t\n\t\t// adding object and scroll bar to panel\n\t\taccountBalancePane.add(balanceOutput);\n\t\taccountBalancePane.add(new JScrollPane(balanceOutput));\n\t}", "@Override\n protected void buildExcelDocument(Map<String, Object> model, Workbook workbook,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n response.setHeader(\"Content-Disposition\", \"attachment; filename=\\\"Du Report.xls\\\"\");\n\n @SuppressWarnings(\"unchecked\")\n List<ReportByGroup> reportList = (List<ReportByGroup>) model.get(\"reportList\");\n\n String[] month = new String[] { \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\", \"January\",\n \"February\", \"March\" };\n\n // create excel xls sheet\n Sheet sheet = workbook.createSheet(\"Report Du Detail\");\n // sheet.setDefaultColumnWidth(12);\n\n // create style for header cells\n CellStyle style = workbook.createCellStyle();\n Font font = workbook.createFont();\n font.setFontName(\"Arial\");\n style.setFillForegroundColor(HSSFColor.BLUE.index);\n style.setFillPattern(FillPatternType.SOLID_FOREGROUND);\n style.setAlignment(HorizontalAlignment.CENTER);\n style.setWrapText(true);\n style.setBorderRight(BorderStyle.THIN);\n style.setRightBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderLeft(BorderStyle.THIN);\n style.setLeftBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderTop(BorderStyle.THIN);\n style.setTopBorderColor(IndexedColors.BLACK.getIndex());\n style.setBorderBottom(BorderStyle.THIN);\n style.setBottomBorderColor(IndexedColors.BLACK.getIndex());\n font.setBold(true);\n font.setColor(HSSFColor.WHITE.index);\n style.setFont(font);\n\n CellStyle style1 = workbook.createCellStyle();\n // style1.setAlignment(HorizontalAlignment.CENTER);\n // style1.setWrapText(true);\n style1.setBorderRight(BorderStyle.THIN);\n style1.setRightBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderLeft(BorderStyle.THIN);\n style1.setLeftBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderTop(BorderStyle.THIN);\n style1.setTopBorderColor(IndexedColors.BLACK.getIndex());\n style1.setBorderBottom(BorderStyle.THIN);\n style1.setBottomBorderColor(IndexedColors.BLACK.getIndex());\n // style1.setFont(font);\n\n // create header row\n Row header = sheet.createRow(0);\n Row header1 = sheet.createRow(1);\n Row header2 = sheet.createRow(2);\n\n header.createCell(0).setCellValue(\"STT\");\n header.getCell(0).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 0, // first column (0-based)\n 0 // last column (0-based)\n ));\n header.createCell(1).setCellValue(\"Vị trí\");\n header.getCell(1).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 1, // first column (0-based)\n 1 // last column (0-based)\n ));\n\n header.createCell(2).setCellValue(\"\");\n header.getCell(2).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 2, // first column (0-based)\n 2 // last column (0-based)\n ));\n\n header.createCell(3).setCellValue(\"Số lượng đã tuyển trong tháng\");\n header.getCell(3).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 0, // last row (0-based)\n 3, // first column (0-based)\n 26 // last column (0-based)\n ));\n header.createCell(27).setCellValue(\"SL tuyển dụng \" + this.year);\n header.getCell(27).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(0, // first row (0-based)\n 2, // last row (0-based)\n 27, // first column (0-based)\n 27 // last column (0-based)\n ));\n\n header1.createCell(0).setCellValue(\"\");\n header1.getCell(0).setCellStyle(style);\n header1.createCell(1).setCellValue(\"\");\n header1.getCell(1).setCellStyle(style);\n int k = 0;\n for (int i = 3; i < 27; i++) {\n if (i % 2 != 0) {\n header1.createCell(i).setCellValue(month[k++]);\n header1.getCell(i).setCellStyle(style);\n sheet.addMergedRegion(new CellRangeAddress(1, // first row (0-based)\n 1, // last row (0-based)\n i, // first column (0-based)\n i + 1 // last column (0-based)\n ));\n } else {\n header1.createCell(i).setCellValue(\"\");\n header1.getCell(i).setCellStyle(style);\n }\n }\n\n header2.createCell(0).setCellValue(\"\");\n header2.getCell(0).setCellStyle(style);\n header2.createCell(1).setCellValue(\"\");\n header2.getCell(1).setCellStyle(style);\n for (int i = 3; i < 27; i++) {\n if (i % 2 != 0) {\n header2.createCell(i).setCellValue(\"NEW\");\n header2.getCell(i).setCellStyle(style);\n } else {\n header2.createCell(i).setCellValue(\"TT\");\n header2.getCell(i).setCellStyle(style);\n }\n }\n\n int rowCount = 3;\n\n for (ReportByGroup item : reportList) {\n Row row = sheet.createRow(rowCount++);\n row.createCell(0).setCellValue(rowCount - 3);\n if (item.getDepartment() == null) {\n row.createCell(1).setCellValue(item.getGroup());\n } else {\n row.createCell(1).setCellValue(\"\");\n }\n row.createCell(2).setCellValue(item.getDepartment());\n int a = 3;\n for (StatisticMonth number : item.getStatisticMonth()) {\n if (number.getNumberOfNew() == 0) {\n row.createCell(a++).setCellValue(\"\");\n } else {\n row.createCell(a++).setCellValue(number.getNumberOfNew());\n }\n if (number.getNumberOfTT() == 0) {\n row.createCell(a++).setCellValue(\"\");\n } else {\n row.createCell(a++).setCellValue(number.getNumberOfTT());\n }\n }\n if (item.getTotal() == 0) {\n row.createCell(a).setCellValue(\"\");\n } else {\n row.createCell(a).setCellValue(item.getTotal());\n }\n\n for (int i = 0; i < 28; i++) {\n row.getCell(i).setCellStyle(style1);\n }\n }\n sheet.autoSizeColumn(0);\n sheet.autoSizeColumn(1);\n sheet.autoSizeColumn(2);\n sheet.autoSizeColumn(3);\n sheet.autoSizeColumn(4);\n sheet.autoSizeColumn(5);\n sheet.autoSizeColumn(6);\n sheet.autoSizeColumn(7);\n sheet.autoSizeColumn(8);\n sheet.autoSizeColumn(9);\n sheet.autoSizeColumn(10);\n sheet.autoSizeColumn(11);\n sheet.autoSizeColumn(12);\n sheet.autoSizeColumn(13);\n sheet.autoSizeColumn(14);\n sheet.autoSizeColumn(15);\n sheet.autoSizeColumn(16);\n sheet.autoSizeColumn(17);\n sheet.autoSizeColumn(18);\n sheet.autoSizeColumn(19);\n sheet.autoSizeColumn(20);\n sheet.autoSizeColumn(21);\n sheet.autoSizeColumn(22);\n sheet.autoSizeColumn(23);\n sheet.autoSizeColumn(24);\n sheet.autoSizeColumn(25);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tcontrolEClass = createEClass(CONTROL);\n\t\tcreateEReference(controlEClass, CONTROL__MIDI);\n\t\tcreateEAttribute(controlEClass, CONTROL__BACKGROUND);\n\t\tcreateEAttribute(controlEClass, CONTROL__CENTERED);\n\t\tcreateEAttribute(controlEClass, CONTROL__COLOR);\n\t\tcreateEAttribute(controlEClass, CONTROL__H);\n\t\tcreateEAttribute(controlEClass, CONTROL__INVERTED);\n\t\tcreateEAttribute(controlEClass, CONTROL__INVERTED_X);\n\t\tcreateEAttribute(controlEClass, CONTROL__INVERTED_Y);\n\t\tcreateEAttribute(controlEClass, CONTROL__LOCAL_OFF);\n\t\tcreateEAttribute(controlEClass, CONTROL__NAME);\n\t\tcreateEAttribute(controlEClass, CONTROL__NUMBER);\n\t\tcreateEAttribute(controlEClass, CONTROL__NUMBER_X);\n\t\tcreateEAttribute(controlEClass, CONTROL__NUMBER_Y);\n\t\tcreateEAttribute(controlEClass, CONTROL__OSC_CS);\n\t\tcreateEAttribute(controlEClass, CONTROL__OUTLINE);\n\t\tcreateEAttribute(controlEClass, CONTROL__RESPONSE);\n\t\tcreateEAttribute(controlEClass, CONTROL__SCALEF);\n\t\tcreateEAttribute(controlEClass, CONTROL__SCALET);\n\t\tcreateEAttribute(controlEClass, CONTROL__SECONDS);\n\t\tcreateEAttribute(controlEClass, CONTROL__SIZE);\n\t\tcreateEAttribute(controlEClass, CONTROL__TEXT);\n\t\tcreateEAttribute(controlEClass, CONTROL__TYPE);\n\t\tcreateEAttribute(controlEClass, CONTROL__W);\n\t\tcreateEAttribute(controlEClass, CONTROL__X);\n\t\tcreateEAttribute(controlEClass, CONTROL__Y);\n\n\t\tlayoutEClass = createEClass(LAYOUT);\n\t\tcreateEReference(layoutEClass, LAYOUT__TABPAGE);\n\t\tcreateEAttribute(layoutEClass, LAYOUT__MODE);\n\t\tcreateEAttribute(layoutEClass, LAYOUT__ORIENTATION);\n\t\tcreateEAttribute(layoutEClass, LAYOUT__VERSION);\n\n\t\tmidiEClass = createEClass(MIDI);\n\t\tcreateEAttribute(midiEClass, MIDI__CHANNEL);\n\t\tcreateEAttribute(midiEClass, MIDI__DATA1);\n\t\tcreateEAttribute(midiEClass, MIDI__DATA2F);\n\t\tcreateEAttribute(midiEClass, MIDI__DATA2T);\n\t\tcreateEAttribute(midiEClass, MIDI__TYPE);\n\t\tcreateEAttribute(midiEClass, MIDI__VAR);\n\n\t\ttabpageEClass = createEClass(TABPAGE);\n\t\tcreateEReference(tabpageEClass, TABPAGE__CONTROL);\n\t\tcreateEAttribute(tabpageEClass, TABPAGE__NAME);\n\n\t\ttopEClass = createEClass(TOP);\n\t\tcreateEReference(topEClass, TOP__LAYOUT);\n\t}", "public void makeBottomBox() {\n if (timePanel == null) {\n Util.spew (\"makeBottomBox: null timePanel\");\n return;\n }\n bottomBox = new VBox(\"bottomBox\", VBox.Border.TWO_PIXELS_LEFT_RIGHT_BOTTOM_BORDER);\n BoxConstraints bc = new BoxConstraints(\n BoxConstraints.Stretch.SPRING, BoxConstraints.Align.FILL);\n\n // Put the time panel in an HBox and add to the bottom box\n timeBox = new HBox(\"timeBox\", HBox.Border.ONE_PIXEL_BELOW_BORDER);\n timeBox.setBackground(Color.white);\n bc.stretchType = BoxConstraints.Stretch.SPRING;\n timeBox.add(timePanel, bc);\n bc.stretchType = BoxConstraints.Stretch.INCOMPRESSIBLE;\n bottomBox.add(timeBox, bc);\n\n timeBox.setVisible(timePanel.isVisible());\n }", "private void makeKMLString(){\n kmlString = \"<Placemark><visibility>1</visibility>\";\n\n if(name != \"\" && name != null){\n\t\t kmlString +=\"<name>\"+name+\"</name>\";\n\t }\n\n //set time stamp\n //we may not always want this\n //TODO: need to add an UI option: animatePlacemark\n /*\n if(point_time != \"\" && point_time!=null){\n\t\t\tkmlString +=\"<TimeStamp><when>\"+point_time+\"</when></TimeStamp>\";\n\t }\n\t */\n\n\n if(description != \"\" && description != null){\n kmlString += description;\n }\n\n if(style != \"\" && style != null){\n kmlString += style;\n }\n\n if(region != \"\" && region != null){\n\t\t kmlString += region;\n\t\t}\n\n kmlString += \"<styleUrl>#style1_roll_over_labels_Earthwatch</styleUrl>\";\n kmlString += \"<Point>\"\n + \"<coordinates>\"+point_lon+\",\"+point_lat+\",\"+\"0</coordinates>\"\n + \"</Point>\"\n + \"</Placemark>\";\n }", "private void addViewBody() {\n\t\tJButton medicosButton = new JButton(\"Médicos\");\n\t\tmedicosButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new MedicosView());\n\t\t});\n\t\tthis.add(medicosButton);\n\n\t\tJButton clientesButton = new JButton(\"Clientes\");\n\t\tclientesButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new ClientesView());\n\t\t});\n\t\tthis.add(clientesButton);\n\n\t\tJButton novaConsultaButton = new JButton(\"Nova Consulta\");\n\t\tnovaConsultaButton.addActionListener((ActionEvent e) -> {\n\t\t\tRouter.getInstance().goToView(new CadastroConsultaView());\n\t\t});\n\t\tthis.add(novaConsultaButton);\n\n\t\tJButton novoTesteButton = new JButton(\"Novo Teste [EM BREVE]\");\n\t\tnovoTesteButton.setEnabled(false);\n\t\tthis.add(novoTesteButton);\n\t}", "@Override\n public ReportDesign buildReportDesign(ReportDefinition reportDefinition) {\n ReportDesign rd = createExcelTemplateDesign(getExcelDesignUuid(), reportDefinition, \"SMCRegister.xls\");\n Properties props = new Properties();\n props.put(\"repeatingSections\", \"sheet:1,row:10-12,dataset:SMC\");\n props.put(\"sortWeight\", \"5000\");\n rd.setProperties(props);\n return rd;\n }", "protected void process(XSSFWorkbook workbook, List<ExportExcelSheetConfiguration<BEANTYPE>> sheetConfigs) {\r\n\t\tfor (ExportExcelSheetConfiguration<BEANTYPE> sheetConfig : sheetConfigs) {\r\n\t\t\tSheet sheet = workbook.createSheet(sheetConfig.getSheetname());\r\n\t\t\tsheet.setAutobreaks(true);\r\n\r\n\t\t\tint rowNum = 0;\r\n\t\t\trowNum = addSheetTitle(workbook, sheetConfig, sheet, rowNum);\r\n\t\t\trowNum = addSheetGeneratedBy(workbook, sheetConfig, sheet, rowNum);\r\n\t\t\taddComponents(workbook, sheetConfig, sheet, rowNum);\r\n\t\t}\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "private void toZB() {\n if (zhiBoFragment == null) {\n zhiBoFragment = new ZhiBoFragment();\n fragmenttransaction.add(R.id.frame_content, zhiBoFragment);\n } else {\n fragmenttransaction.show(zhiBoFragment);\n }\n }" ]
[ "0.58001333", "0.5799423", "0.57784504", "0.5572429", "0.5549788", "0.5498309", "0.5448956", "0.5420219", "0.5409715", "0.54077977", "0.53672343", "0.53432214", "0.531649", "0.5304369", "0.52670556", "0.5205819", "0.5187485", "0.51438636", "0.51308364", "0.51134056", "0.51081705", "0.5084553", "0.5074122", "0.5063075", "0.50600445", "0.50477374", "0.50351554", "0.50236636", "0.50111985", "0.50079674", "0.50018233", "0.50005347", "0.49876463", "0.49804032", "0.49486917", "0.49483836", "0.4945512", "0.4944614", "0.49272478", "0.49171695", "0.48902854", "0.48803002", "0.48719868", "0.487127", "0.4870446", "0.48539293", "0.4846263", "0.48413002", "0.48375323", "0.48355174", "0.48352352", "0.48307505", "0.48126644", "0.4812019", "0.48090503", "0.48024562", "0.4786994", "0.47779718", "0.477672", "0.4769776", "0.4760059", "0.4760059", "0.4760059", "0.47597742", "0.47550717", "0.4752292", "0.4745495", "0.47435024", "0.47423035", "0.47370282", "0.47338405", "0.47321737", "0.47312906", "0.472446", "0.471287", "0.47126383", "0.47086337", "0.47066358", "0.47036704", "0.47019765", "0.46931744", "0.46908087", "0.4685998", "0.4670669", "0.4665653", "0.46618122", "0.46584734", "0.46581784", "0.46574402", "0.465636", "0.46554157", "0.46548325", "0.46526408", "0.46503374", "0.4639855", "0.46328086", "0.46243793", "0.4623438", "0.4622937", "0.46178252", "0.46168062" ]
0.0
-1
/ Phone Number link.
private TextView getPhoneTextView(String content) { TextView textView = getTextView(content); TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT); layoutParams.weight = 20f; layoutParams.gravity = Gravity.CENTER_VERTICAL; Linkify.addLinks(textView, Linkify.PHONE_NUMBERS); textView.setLayoutParams(layoutParams); textView.setPadding(45, 30, 0, 0); textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.phone_blue, 0, 0, 0); textView.setCompoundDrawablePadding(30); return textView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "java.lang.String getPhoneNumber();", "public String getPhoneNumber() {\r\n return number;\r\n }", "public String getPhoneNumber(){\r\n\t\treturn phoneNumber;\r\n\t}", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "java.lang.String getPhonenumber();", "public String getPhoneNumber() {\r\n return phoneNumber;\r\n }", "public String getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public String getPhoneNumber()\n\t{\n\t\treturn this._phoneNumber;\n\t}", "public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}", "public String getPhoneNumber() {\n\t\treturn this.phoneNumber;\n\t}", "public String getPhonenumber() {\n return phonenumber;\n }", "public String getPhonenumber() {\n\t\treturn phonenumber;\n\t}", "public String getSLinkPhone() {\n return sLinkPhone;\n }", "public int getPhoneNumber() {\n\t\treturn phoneNumber;\n\t}", "public String getPhoneNum()\r\n {\r\n\treturn phoneNum;\r\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "@Override\n public String getphoneNumber() {\n return ((EditText)findViewById(R.id.phoneNumberUserPage)).getText().toString().trim();\n }", "public String getPhoneNumber() {\n return this.phoneNumber;\n }", "public java.lang.CharSequence getPhoneNumber() {\n return phone_number;\n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return phoneNumber;\n }", "public String getPhoneNumber() {\n return mPhoneNumber;\n }", "public String getphoneNum() {\n\t\treturn _phoneNum;\n\t}", "public String formatPhoneNumber(String number) {\n return \"+44\" + number.substring(1, 11);\n }", "public String getPhone_number() {\n return phone_number;\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\r\n private void callToHelplineNumber(String number) {\r\n Intent intentCall = new Intent(Intent.ACTION_CALL);\r\n intentCall.setData(Uri.parse(\"tel:\"+number));\r\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED)\r\n {\r\n Toast.makeText(getApplicationContext(),\"Please grant permission\",Toast.LENGTH_SHORT).show();\r\n requestPermissions();\r\n }\r\n else\r\n {\r\n startActivity(intentCall);\r\n }\r\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum() {\n return phoneNum;\n }", "public String getPhoneNum()\r\n {\r\n return phoneNum;\r\n }", "String formatPhoneNumber(String phoneNumber);", "public String getPhoneNumber() throws NullPointerException {\n\n\t\tString phoneNumber = user.getPhoneNumber();\n\t\tif (phoneNumber == null || phoneNumber.isEmpty()) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\treturn Utils.formatPhoneNumber(phoneNumber);\n\t}", "public void setPhoneNum(String phoneNum) {\n this.phoneNum = phoneNum;\n }", "@Override\r\n \t\t\tpublic void onClick(View v) {\n \t\tIntent phoneIntent = new Intent(Intent.ACTION_CALL);\r\n phoneIntent.setData(Uri.parse(\"tel:\"+phoneNumber));\r\n startActivity(Intent.createChooser(phoneIntent, \"Calling number...\"));\r\n \t\t\t}", "java.lang.String getPhone();", "public String getTelephoneNumber() {\n\t\treturn telephoneNumber;\n\t}", "public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }", "public void setphoneNum(String phoneNum) {\n\t\t_phoneNum = phoneNum;\n\t}", "private String getMyPhoneNO() {\n String mPhoneNumber;\n TelephonyManager tMgr = (TelephonyManager) this.getActivity().getSystemService(Context\n .TELEPHONY_SERVICE);\n mPhoneNumber = tMgr.getLine1Number();\n if(mPhoneNumber == null)\n mPhoneNumber = \"+NoNotFound\";\n return mPhoneNumber;\n }", "public String getPhoneNumber(){\n return phone_number;\n }", "java.lang.String getUserPhone();", "public void createPhoneIntent(View view){\n Intent intent = new Intent(Intent.ACTION_DIAL);\n\n //Step 2: Add the telephonne number as a data (URI) to the intent using \"tel:phone_num\";\n Uri uri = Uri.parse(\"tel:09095966472\");\n intent.setData(uri);\n\n //Step 3: Start the activity\n startActivity(intent);\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public String getTelephoneNumber() {\n return telephoneNumber;\n }", "public void getPhoneNumber(ArrayList<String> document) {\r\n String line = \"\";\r\n for(int i = 0; i < document.size(); i++)\r\n {\r\n if(document.get(i).contains(\"Fax:\"))\r\n {\r\n continue;\r\n }\r\n if(document.get(i).contains(\"(\") || document.get(i).contains(\"-\"))\r\n {\r\n line = document.get(i);\r\n break;\r\n }\r\n }\r\n number = line.replaceAll(\"[^\\\\d]\", \"\");\r\n }", "public Integer getPhonenumber() {\n return phonenumber;\n }", "@AutoEscape\n\tpublic String getPhone();", "public void setTelephoneNumber(String newNumber)\r\n\t{\r\n\t\ttelephoneNumber = newNumber;\r\n\t}", "public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}", "public String getPhone() {\r\n // Bouml preserved body begin 00040C82\r\n\t return phoneNumber;\r\n // Bouml preserved body end 00040C82\r\n }", "public void setPhoneNumber() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setter method initialized\r\n System.out.println(\"Phone Number : \"+phoneNumber);}", "public void setPhoneNumbr(String phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}", "public java.lang.String getPhone_number() {\n return phone_number;\n }", "void formatPhoneNumber(String phoneNumber) throws PhoneNumberFormatException;", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "boolean hasPhoneNumber();", "public String Phone() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(phone);\r\n\t\t\t\tStr_phoneno = element.getText();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Phone Number NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Str_phoneno;\r\n\t\t\t\r\n\t\t}", "public com.politrons.avro.AvroPerson.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.phone_number = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public String getMyPhoneNumber() {\n return ((TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE))\n .getLine1Number();\n }", "public String returnPhoneNumber() {\n\t\treturn this.registration_phone.getAttribute(\"value\");\r\n\t}", "private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}", "@ApiModelProperty(value = \"Collection of information that identifies a phone number, as defined by telecom services.\")\n\n@Pattern(regexp=\"\\\\+[0-9]{1,3}-[0-9()+\\\\-]{1,30}\") \n public String getPhoneNumber() {\n return phoneNumber;\n }", "public String inputPhoneNumber() {\n String phoneNumber = editTextPhoneNumber.getText().toString();\n return phoneNumber;\n }", "public void setPhoneNo(String value) {\n setAttributeInternal(PHONENO, value);\n }", "@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }", "public String getPhoneNumberString() {\n return mPhoneNumberString;\n }", "public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}", "public void setSLinkPhone(String sLinkPhone) {\n this.sLinkPhone = sLinkPhone;\n }", "public String getPhoneNo() {\n return (String)getAttributeInternal(PHONENO);\n }", "public String getSenderPhoneNumber();", "private void dialPhoneNumber(String phoneNumber) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + phoneNumber));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public java.lang.String getContactPhoneNumber()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTACTPHONENUMBER$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\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 phoneNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\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 phoneNumber_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public void onPressNumber(View view) {\r\n CallHelper.callNumber(this, event.contactNumber);\r\n }", "@SuppressWarnings(\"ResourceType\")\n public static void callPhoneNum(Context context, String phoneNum) {\n Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse(\"tel:\" + phoneNum));\n context.startActivity(intent);\n }", "public void setPhoneNumber(int phoneNumber) {\n\t\tthis.phoneNumber = phoneNumber;\n\t}", "@ApiModelProperty(value = \"Phone number, as entered. Does not need to be formatted in any particular way. Required.\")\n public String getNumber() {\n return number;\n }", "public Builder setPhoneNumber(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n phoneNumber_ = value;\n onChanged();\n return this;\n }", "public String getPhoneNumber(int n) {\r\n\t\tif(phone.size()>n && n>=0)\r\n\t\t\treturn phone.get(n);\r\n\t\telse\r\n\t\t\treturn null;\t\t\r\n\t}", "public services enterAccountPhoneNumber() throws IOException {\n \tCommonUtils.insertText(\"css\", pageobj.getpageObjects().getProperty(\"crm_phone_textbox\"), \"7799095959\", wd);\n \treturn this;\n \t\n }", "@Override\n public void onClick(View v) {\n Uri number = Uri.parse(\"tel: 08963451822\");\n Intent call = new Intent(Intent.ACTION_DIAL);\n call.setData(number);\n startActivity(call);\n }", "@java.lang.Override\n public com.google.protobuf.StringValue getPhoneNumber() {\n return phoneNumber_ == null ? com.google.protobuf.StringValue.getDefaultInstance() : phoneNumber_;\n }", "public synchronized String getTelephoneNumber()\r\n {\r\n return telephoneNumber;\r\n }", "public String getaPhone() {\n return aPhone;\n }", "public java.lang.String getPhoneNumber() {\n java.lang.Object ref = phoneNumber_;\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 phoneNumber_ = s;\n return s;\n }\n }" ]
[ "0.7069675", "0.7069675", "0.7069675", "0.70168114", "0.6916356", "0.6838308", "0.68039", "0.6758538", "0.6741988", "0.6740571", "0.67246914", "0.6719776", "0.6698281", "0.66968036", "0.66850924", "0.6653973", "0.6649202", "0.6646238", "0.66449964", "0.66428864", "0.6640036", "0.6625825", "0.6620352", "0.6608756", "0.6608756", "0.6608756", "0.6608756", "0.6608756", "0.6608756", "0.6608756", "0.6608756", "0.6608756", "0.654376", "0.65068024", "0.6478443", "0.64772826", "0.6466235", "0.64528424", "0.64528424", "0.64528424", "0.6425781", "0.64045316", "0.6399246", "0.6384836", "0.63364214", "0.6331987", "0.631973", "0.63168645", "0.62959903", "0.62850136", "0.6281009", "0.62809825", "0.626974", "0.6265416", "0.6256608", "0.625097", "0.6227154", "0.6224736", "0.62016565", "0.619994", "0.6180829", "0.6180517", "0.6179295", "0.61772627", "0.61768657", "0.61752343", "0.61752343", "0.61752343", "0.61752343", "0.61752343", "0.6166208", "0.61626995", "0.615698", "0.6155317", "0.61527395", "0.6151625", "0.6151036", "0.6150992", "0.61462885", "0.61388856", "0.6136168", "0.61283356", "0.6083352", "0.6072457", "0.6061426", "0.6059755", "0.6047092", "0.6043629", "0.6042946", "0.60369915", "0.6034878", "0.60294026", "0.6027416", "0.60137486", "0.6009439", "0.60083", "0.5999337", "0.5998231", "0.5995045", "0.59918654", "0.5990557" ]
0.0
-1
/ The SMS Text Message button next to the phone number.
private ImageButton getPhoneImageButton(final String content) { ImageButton imageButton = new ImageButton(this.getContext()); TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT); layoutParams.weight = 0f; layoutParams.gravity = Gravity.CENTER_VERTICAL; imageButton.setLayoutParams(layoutParams); imageButton.setBackgroundColor(getResources().getColor(R.color.ldstools_white)); imageButton.setContentDescription("sms message"); imageButton.setPadding(0,30,30, 0); imageButton.setImageResource(R.drawable.sms_blue); if(content != null && content.length() > 0) { imageButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sendSMS(content); } }); } return imageButton; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\tsetTextSend();\r\n\t\t\t}", "public void sendMessage(View buttonView)\n {\n state = 0;\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.Message);\n EditText editTextPhoneNumber = (EditText) findViewById(R.id.Phone);\n String message = editText.getText().toString();\n String phoneNumberMessage = editTextPhoneNumber.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n intent.putExtra(EXTRA_PHONEMESSAGE, phoneNumberMessage);\n startActivity(intent);\n }", "@Override\r\n\t public void onClick(View arg0) {\n\t screenDialog.dismiss();\r\n\t String sms = messageText.getText().toString();\r\n\t \ttry {\r\n\t\t\t\tSmsManager smsManager = SmsManager.getDefault();\r\n\t\t\t\tsmsManager.sendTextMessage(phone, null, sms, null, null);\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"SMS Sent!\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"SMS faild, please try again later!\",\r\n\t\t\t\t\t\tToast.LENGTH_LONG).show();\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t }", "public void smsSendMessage(String phoneNumber, String messageContent) {\n try {\n //EditText editText = (EditText) findViewById(R.id.editText_main);\n // Set the destination phone number to the string in editText.\n String destinationAddress = \"07956765611\";\n // Find the sms_message view.\n //EditText smsEditText = (EditText) findViewById(R.id.sms_message);\n // Get the text of the SMS message.\n String smsMessage = \"Hi Kobi\";\n // Set the service center address if needed, otherwise null.\n String scAddress = null;\n // Set pending intents to broadcast\n // when message sent and when delivered, or set to null.\n PendingIntent sentIntent = null, deliveryIntent = null;\n // Use SmsManager.\n SmsManager smsManager = SmsManager.getDefault();\n\n smsManager.sendTextMessage\n (destinationAddress, scAddress, smsMessage,\n sentIntent, deliveryIntent);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tUri uri = Uri.parse(\"smsto://08000000123\");\n\t\t\tIntent intent = new Intent(Intent.ACTION_SENDTO, uri);\n\t\t\tintent.putExtra(\"sms_body\", \"SMS message\");\n\t\t\tstartActivity(intent);\n\t\t}", "@Override\n public void onClick(View v) {\n sendMessage(phone_from_intent);\n }", "@Override\n public void onClick(View v) {\n if (v == mBtnSendSms) {\n String strMobileNumber = mEditTextMobileNumber.getText().toString().trim();\n String strSmeBody = mEditTextSmsBody.getText().toString().trim();\n sendSms(strMobileNumber, strSmeBody);// Send SMS Method\n }\n\n }", "public void onClick(View v)\r\n {\n sendSMS(textView.getText().toString());\r\n }", "public void btnHelpClick(){\n try {\n String Tag = TAG + \"-BtnHelp\";\n // Get number\n String number = getMyPhoneNO();\n ReceiveMessageThread receiveMessageThread;\n // Mount the message to be sent\n String msg = \"*SOS*;Number:\" + number + \";\";\n Log.i(Tag, msg);\n // Show message to user\n showProgressDialog(\"Sending distress message...\");\n // Disable Help Button\n btn_help.setEnabled(false);\n // Start thread to send message\n receiveMessageThread = new ReceiveMessageThread(msgHandler, msg);\n receiveMessageThread.start();\n }\n catch (Exception e){\n Log.i(TAG , \"Caught this exception: \" + e.getMessage());\n }\n }", "@Override\n public void onClick(View view) {\n phoneNumberEditText.setText(phoneNumberEditText.getText().toString() + ((Button)view).getText().toString());\n }", "@Override\n\tpublic String getText() {\n\t\treturn \"MMS: \" + text;\n\t}", "@Step\n public void clickSendSMSButton(){\n actionWithWebElements.clickOnElement(sendSMSButton);\n }", "@Override\n\tpublic void SendMessage() {\n\t\tSystem.out.println( phoneName+\"'s SendMessage.\" );\n\t}", "protected void sendSMS(String number) {\n Uri uri = Uri.parse(\"smsto:\" + number);\n Intent sendIntent = new Intent(Intent.ACTION_SENDTO, uri);\n sendIntent.putExtra(\"sms_body\", \"Denk an deinen TODO\");\n context.startActivity(sendIntent);\n }", "public void sms(int nr, String text) {\n Provider.sendeSms (nr, text);\n }", "public String getMessageButton() {\n return messageButton;\n }", "public void send(View v)\r\n {\r\n \t// get the phone number from the phone number text field\r\n String phoneNumber = phoneTextField.getText().toString();\r\n // get the message from the message text box\r\n String msg = msgTextField.getText().toString(); \r\n\r\n // make sure the fields are not empty\r\n if (phoneNumber.length()>0 && msg.length()>0)\r\n {\r\n \t// call the sms manager\r\n PendingIntent pi = PendingIntent.getActivity(this, 0,\r\n new Intent(this, SendSMSActivity.class), 0);\r\n SmsManager sms = SmsManager.getDefault();\r\n \r\n // this is the function that does all the magic\r\n sms.sendTextMessage(phoneNumber, null, msg, pi, null);\r\n \r\n }\r\n else\r\n {\r\n \t// display message if text fields are empty\r\n Toast.makeText(getBaseContext(),\"All field are required\",Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n }", "private void sendMessage(String contactNumber) {\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\" + contactNumber));\n startActivity(intent);\n }", "private void sendTextInBox() {\n\t\tmodelAdapter.send(textFieldMessage.getText());\n\t textFieldMessage.setText(\"\");\n\t }", "protected void sendSMSMessage(String phonnumber) {\n String message = null;\r\n if (BookElectionFrgament.BTTtime == true) {\r\n message = \"Hey! The tee time booking is confirmed as follows Date -\" + BookElectionFrgament.formattedDate + \"\\n, Time - \" + BookElectionFrgament.timeselected + \"\\n, No. of Holes - \" + BookElectionFrgament.hole + \"\\nSee you at Karma Lakelands! \";\r\n } else if (Bookingdriverange.BDRTime == true) {\r\n message = \"Hey! The driving range booking is confirmed as follows Date -\" + Bookingdriverange.formattedDate + \"\\n, Time - \" + Bookingdriverange.timeselected + \"\\n, Balls - \" + Bookingdriverange.bucketselected + \"\\nSee you at Karma Lakelands! \";\r\n\r\n }\r\n\r\n try {\r\n SmsManager smsManager = SmsManager.getDefault();\r\n\r\n smsManager.sendTextMessage(phonnumber, null, message, null, null);\r\n\r\n // Customdialog messagedialog= new Customdialog(SMS1.this);\r\n // messagedialog.show();\r\n\r\n Toast.makeText(getApplicationContext(), \"Your message has been sent successfully!\", Toast.LENGTH_SHORT).show();\r\n } catch (Exception e) {\r\n Toast.makeText(getApplicationContext(), \"SMS failed, please try again.\", Toast.LENGTH_SHORT).show();\r\n e.printStackTrace();\r\n }\r\n }", "private void displayMessage13(String message) {\n TextView greenwashReadMore = (TextView) findViewById(R.id.read_more13);\n greenwashReadMore.setTextColor(Color.BLACK);\n greenwashReadMore.setText(message);\n greenwashReadMore.setGravity(Gravity.CENTER);\n }", "public void sendSmsMessage(String phoneNumber, String message)\n {\n if(phoneNumber != null)\n chatTransport.getParentChatSession()\n .setDefaultSmsNumber(phoneNumber);\n\n SMSManager.sendSMS(phoneNumber, message, chatTransport, chatPanel);\n\n this.dispose();\n }", "public void sendmessage(View v){\n \tIntent intent =new Intent();//意图\n \tintent.setAction(Intent.ACTION_SENDTO);//设置发短信意图\n \tintent.setData(Uri.parse(\"smsto:\"+1358752546));//设置拨号的信息\n \t//问题:怎么不能用11位电话号码\n \tString message=\"我是水哥,有妹子么\";\n \tintent.putExtra(\"sms_body\", message);\n \tstartActivity(intent);//开启意图\t \n }", "private void sendSMS() {\n String msg = \"\";\n\n switch (s) {\n case \"Accelerometre\":\n msg = acce;\n break;\n case \"Lumiere\":\n msg = light;\n break;\n case \"Proximite\":\n msg = proxi;\n break;\n case \"Gyroscope\":\n msg = gyro;\n break;\n }\n\n String num = numero.getText().toString();\n\n final int PERMISSION_REQUEST_CODE = 1;\n\n if (checkSelfPermission(android.Manifest.permission.SEND_SMS) ==\n PackageManager.PERMISSION_DENIED) {\n Log.d(\" permission \", \" permission denied to SEND_SMS - requesting it \");\n String[] permissions = {android.Manifest.permission.SEND_SMS};\n requestPermissions(permissions, PERMISSION_REQUEST_CODE);\n } else {\n if (num.length() == 10) {\n SmsManager.getDefault().sendTextMessage(num, null, msg, null, null);\n numero.setText(\"\");\n } else {\n //On affiche un petit message d'erreur dans un Toast\n Toast toast = Toast.makeText(CapteurActivity.this, \"Veuilliez écrire un numero a 10 chiffres\", Toast.LENGTH_LONG);\n toast.show();\n\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tString body = etBody.getText().toString();\n\t\t\t\t\tTApplicatioin.multiUserChat.sendMessage(body);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t}", "public void displayMessage(View view) {\n // I got the following line of code from StackOverflow: http://stackoverflow.com/questions/5620772/get-text-from-pressed-button\n String s = (String) ((Button)view).getText();\n CharSequence msg = new StringBuilder().append(\"This button will launch my \").append(s.toString()).append(\" app\").toString();\n Toast.makeText(view.getContext(),msg, Toast.LENGTH_SHORT).show();\n }", "private void displayMessage10(String message) {\n TextView techRepReadMore = (TextView) findViewById(R.id.read_more10);\n techRepReadMore.setTextColor(Color.BLACK);\n techRepReadMore.setText(message);\n techRepReadMore.setGravity(Gravity.CENTER);\n }", "private void showSendSMSActivity() {\n Uri uri = getIntent().getData();\n if (uri == null) {\n return;\n }\n\n // get phone number where to send the SMS\n String ssp = uri.getSchemeSpecificPart();\n String number = ContactsAccessHelper.normalizePhoneNumber(ssp);\n if (number.isEmpty()) {\n return;\n }\n\n // find person by phone number in contacts\n String person = null;\n ContactsAccessHelper db = ContactsAccessHelper.getInstance(this);\n Contact contact = db.getContact(this, number);\n if (contact != null) {\n person = contact.name;\n }\n\n // get SMS thread id by phone number\n int threadId = db.getSMSThreadIdByNumber(this, number);\n if (threadId >= 0) {\n // get the count of unread sms of the thread\n int unreadCount = db.getSMSMessagesUnreadCountByThreadId(this, threadId);\n\n // open thread's SMS conversation activity\n Bundle arguments = new Bundle();\n arguments.putInt(FragmentArguments.THREAD_ID, threadId);\n arguments.putInt(FragmentArguments.UNREAD_COUNT, unreadCount);\n arguments.putString(FragmentArguments.CONTACT_NUMBER, number);\n String title = (person != null ? person : number);\n CustomFragmentActivity.show(this, title, SMSConversationFragment.class, arguments);\n }\n\n // open SMS sending activity\n Bundle arguments = new Bundle();\n arguments.putString(FragmentArguments.CONTACT_NAME, person);\n arguments.putString(FragmentArguments.CONTACT_NUMBER, number);\n String title = getString(R.string.New_message);\n CustomFragmentActivity.show(this, title, SMSSendFragment.class, arguments);\n }", "public void sendMessage (View view)\r\n\t{\r\n\t\t// Respond to the button click\r\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\r\n\t\tEditText editText = (EditText) findViewById(R.id.edit_message);\r\n\t\tString message = editText.getText().toString();\r\n\t\tintent.putExtra(EXTRA_MESSAGE, message);\r\n\t\tstartActivity(intent);\r\n\t}", "public void onClick(View view) {\n sendSMSMessage(profile_general,phoneNo);\n GoHome();\n }", "private void displayMessage23(String message) {\n TextView virtualBankReadMore = (TextView) findViewById(R.id.read_more23);\n virtualBankReadMore.setTextColor(Color.BLACK);\n virtualBankReadMore.setText(message);\n virtualBankReadMore.setGravity(Gravity.CENTER);\n }", "public String getText_txt_ThankYou_Message_Text(){\r\n\t\treturn txt_ThankYou_Message_Text.getText();\r\n\t}", "public void onClick(View v) {\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString phoneno=phonenoET.getText().toString();\n\t\t\t\t\t\t\tif(phoneno.equals(\"\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Enter Phone No.\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(phoneno.length()!=10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Wrong Phone No.\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//uniquecode=\"hello\";\n\t\t\t\t\t\t\t\t//double code=Math.random();\n\t\t\t\t\t\t\t\t//Toast.makeText(getApplicationContext(),\"\"+code+\"\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\tuniquecode=Integer.toString((int)(Math.random()*1000000000));\n\t\t\t\t\t\t\t\t//Toast.makeText(getApplicationContext(),\"Unique CODE: \"+uniquecode,Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t\tSmsManager sms=SmsManager.getDefault();\n\t\t\t\t\t\t\t\tsms.sendTextMessage(phoneno, null,\"Unique CODE: \"+uniquecode, null, null);\n\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Msg Sent\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t\tDate date = new Date();\n\t\t\t\t\t\t\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\t\t\t\tString currentDate = dateFormat.format(date);\n\t\t\t\t\t\t\t\tSimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\t\t\t\t\t\tString currentTime = timeFormat.format(date);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmBuilder.setContentTitle(\"Unique Code Sent\");\n\t\t\t\t\t\t\t\tmBuilder.setContentText(\"to \"+phoneno+\"\\non \"+currentDate+\"\");\n\t\t\t\t\t\t\t\tmBuilder.setTicker(\"Password Alert!\");\n\t\t\t\t\t\t\t\tmBuilder.setSmallIcon(R.drawable.ic_launcher);\n\t\t\t\t\t\t\t\t//mBuilder.setNumber(++numMessages);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\t\t\t\t\t\t\t/* notificationID allows you to update the notification later on. */ \n\t\t\t\t\t\t\t\tmNotificationManager.notify((int)(Math.random()*1000), mBuilder.build());\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Intent i=new Intent(getApplicationContext(),Read_Activity.class);\n\t\t\t\t\t\t\t\t//startActivity(i);\n\t\t\t\t\t\t\t\tphonenoET.setEnabled(false);\n\t\t\t\t\t\t\t\tsendb.setEnabled(false);\n\t\t\t\t\t\t\t\tucodeET.setVisibility(0);\n\t\t\t\t\t\t\t\tnextb.setVisibility(0);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(Exception ex)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),ex.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\"Msg not Sent\",Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(checkPhoneNum()){\r\n\t\t\t\t\tet_phone.setVisibility(View.GONE);\r\n\t\t\t\t\tly_two.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tbt_next.setVisibility(View.GONE);\r\n\t\t\t\t\tbt_login.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tsetTextSend();\r\n\t\t\t\t\tsendSmsNew(phoneNum);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(mContext, \"请输入正确的手机号\", Toast.LENGTH_LONG).show();\r\n\t\t\t\t}\r\n\t\t\t}", "private void displayMessage11(String message) {\n TextView setTicReadMore = (TextView) findViewById(R.id.read_more11);\n setTicReadMore.setTextColor(Color.BLACK);\n setTicReadMore.setText(message);\n setTicReadMore.setGravity(Gravity.CENTER);\n }", "@Step\n public void enterSmsIntoInput(String smsCode){\n actionWithWebElements.enterTextIntoInput(confirmationSmsCodeInput, smsCode);\n }", "private void displayMessage12(String message) {\n TextView jokkoReadMore = (TextView) findViewById(R.id.read_more12);\n jokkoReadMore.setTextColor(Color.BLACK);\n jokkoReadMore.setText(message);\n jokkoReadMore.setGravity(Gravity.CENTER);\n }", "public String get_ButtomBarAlertmsg_txt() {\r\n\t\tWebElement alrtmsg = driver.findElementByAccessibilityId(\"displayMessageTextBlock\");\r\n\t\treturn FetchText(alrtmsg);\r\n\t}", "public void launchText(){\n\t\tString s = Telephony.Sms.getDefaultSmsPackage(context);\n \n if (s != null && s.length() > 2) {\n \tIntent sendIntent = pacman.getLaunchIntentForPackage(s);\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Texting App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}", "private void displayMessage15(String message) {\n TextView gomywayReadMore = (TextView) findViewById(R.id.read_more15);\n gomywayReadMore.setTextColor(Color.BLACK);\n gomywayReadMore.setText(message);\n gomywayReadMore.setGravity(Gravity.CENTER);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(phone_num_edt.getText().length() != 0){\n\t\t\t\t\tIntent callIntent = new Intent(Intent.ACTION_CALL);\n\t\t\t\t callIntent.setData(Uri.parse(\"tel:\" + phone_num_edt.getText().toString()));\n\t\t\t\t startActivity(callIntent);\n\t\t\t\t}else{\n\t\t\t\t\tphone_num_edt.setText(list.get(0).getCallnumber());\n\t\t\t\t\tphone_num_edt.setSelection(phone_num_edt.getText().length());\n\t\t\t\t}\n\t\t\t}", "public void sendMessage(View v) {\n // retrieve the text typed in by the user in the EditText\n String message = ((EditText)(findViewById(R.id.editText_message))).getText().toString();\n // create an implicit intent to any app with SENDTO capability\n // set the destination (5556 is the phone number of the second emulator instance)\n Uri destination = Uri.parse(\"smsto:5556\");\n Intent smsIntent = new Intent(Intent.ACTION_SENDTO, destination);\n // pass the composed message to the messaging activity\n smsIntent.putExtra(\"sms_body\", message);\n // launch the intent\n startActivity(smsIntent);\n }", "private void SendSms()\n {\n try {\n Intent i = new Intent();\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\" + number[index])));\n startActivity(i);\n Toast.makeText(this, \"Option sms Chosen...\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n\n }\n }", "private static void sendSms(Context context, String number, String message)\n {\n \t// Create an intent for sending an sms to a specified number\n \t\tIntent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(Constants.URI_SMS + number));\n \t\t\n \t\t// Optional, text to send\n \t\tintent.putExtra(Constants.URI_SMS_BODY, message);\n \t\t\n \t\t((Activity) context).finish();\n \t\tcontext.startActivity(intent);\n }", "public void onClick(View view) {\n\t\t\tsendSMSMessage(profile_silent,phoneNo);\n\t\t\tGoHome();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(phoneet.getText().toString().length()==11){\r\n\t\t\t\t\tphonell.setVisibility(View.GONE);\r\n\t\t\t\t\tyanzhengmall.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tphonetv.setTextColor(getResources().getColor(R.color.bg_Black));\r\n\t\t\t\t\tyanzhengmatv.setTextColor(getResources().getColor(R.color.top_background));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToastUtil.showToast(RegisterActivity.this, \"手机号格式不正确\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void onClick(View v) {\n\t\t\t\tLog.d(\"on\", \"274\");\n\t\t\t\tIntent smsIntent = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tsmsIntent.setType(\"vnd.android-dir/mms-sms\");\n\t\t\t\tsmsIntent.putExtra(\"sms_body\", translatedText);\n\t\t\t\tstartActivity(smsIntent);\n\n\t\t\t}", "public void updateSendButtonText() {\r\n sendButton.setText(topModel.getSendButtonText());\r\n }", "private void setMsgButton(final String extId, final String nickname){\n\t\tButton newMessage = (Button) findViewById(R.id.logout);\n\t BeButton b = new BeButton(context);\n\t newMessage.setShadowLayer(0.1f, 0, -2.0f, Color.BLACK);\n\t newMessage.setVisibility(LinearLayout.VISIBLE);\n\t newMessage.setText(context.getString(R.string.messagesend));\n\t newMessage.setBackgroundDrawable(\n\t \t\tb.setPressedBackg(\n\t\t\t \t\tnew BDrawableGradient(0,(int) (ratio*50),BDrawableGradient.BLU_BUTTON_GRADIENT),\n\t\t\t\t\t\tnew BDrawableGradient(0,(int) (ratio*50),BDrawableGradient.BLU_ROLL_BUTTON_GRADIENT),\n\t\t\t\t\t\tnew BDrawableGradient(0,(int) (ratio*50),BDrawableGradient.BLU_ROLL_BUTTON_GRADIENT)));\t\t\t \t \n\t newMessage.setOnClickListener(new Button.OnClickListener(){\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessagesWrite mw = new MessagesWrite(context);\n\t\t\t\tmw.setToExtId(extId);\n\t\t\t\tmw.setToNickname(nickname);\n\t\t\t\tmw.show();\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tRandom ra=new Random();\r\n\t\t\t\tint val=ra.nextInt(999);\r\n\t\t\t\tSmsManager sms=SmsManager.getDefault();\r\n\t\t\t\tsms.sendTextMessage(txt_phone.getText().toString(), null, val+\"\", null, null);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIntent i=new Intent(getApplicationContext(), OTP_Reg.class);\r\n\t\t\t\ti.putExtra(\"name\", txt_name.getText().toString());\r\n\t\t\t\ti.putExtra(\"phone\", txt_phone.getText().toString());\r\n\t\t\t\ti.putExtra(\"otp\", val+\"\");\r\n\t\t\t\t\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void onClick(View v) {\n String dest = txcontacts.getText().toString().trim();\r\n if (PhoneNumberUtils.isWellFormedSmsAddress(dest)) {\r\n\r\n // dest, serviceCenter (null for default), message,\r\n // sentIntent, deliveryIntent\r\n // Set the second parameter to null. The scAddress relates\r\n // to the address of the server on the cellular network that will handle\r\n // the message, it is not the address of the sender.\r\n\r\n smsManager.sendTextMessage(txcontacts.getText().toString(), null, etmessage.getText()\r\n .toString(), sentIntent, null);\r\n\r\n Toast.makeText(Message.this, \"SMS message sent\", Toast.LENGTH_LONG).show();\r\n etmessage.setText(\"\");\r\n\r\n } else {\r\n Toast.makeText(Message.this, \"SMS destination invalid - try again\", Toast.LENGTH_LONG).show();\r\n }\r\n }", "public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n String message = \"You pressed the button!\";\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }", "private void sendSMS(String phoneNumber, String message) {\n ArrayList<PendingIntent> sentPendingIntents = new ArrayList<PendingIntent>();\n ArrayList<PendingIntent> deliveredPendingIntents = new ArrayList<PendingIntent>();\n PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,\n new Intent(this, SmsSentReceiver.class), 0);\n PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,\n new Intent(this, SmsDeliveredReceiver.class), 0);\n try {\n SmsManager sms = SmsManager.getDefault();\n ArrayList<String> mSMSMessage = sms.divideMessage(message);\n for (int i = 0; i < mSMSMessage.size(); i++) {\n sentPendingIntents.add(i, sentPI);\n deliveredPendingIntents.add(i, deliveredPI);\n }\n sms.sendMultipartTextMessage(phoneNumber, null, mSMSMessage,\n sentPendingIntents, deliveredPendingIntents);\n\n } catch (Exception e) {\n Snackbar.make(fab, \"SMS sending failed...\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n e.printStackTrace();\n }\n\n }", "@Override\n public void onClick(View view) {\n\n runOnUiThread(\n new Runnable() {\n @Override\n public void run() {\n MainActivity\n .this\n .connectionManager.getTo().println(\n MainActivity\n .this\n .send_text.getText().toString()\n );\n }\n }\n );\n\n }", "@Override\n public void onClick(View arg0) {\n\n String messageToSend = \"Thank you for shopping. Your order will be delivered soon.\";\n String number = \"6476710881\";\n SmsManager.getDefault().sendTextMessage(number, null, messageToSend, null,null);\n Toast.makeText(getApplicationContext(), \"Your Payment is done\", Toast.LENGTH_LONG).show();\n\n Intent myIntent = new Intent(getApplicationContext(),LoginActivity.class);\n startActivity(myIntent);\n\n }", "public void sendSmsMessage(String phoneNumber, String message)\n throws Exception {\n }", "private void displayMessage4(String message) {\n TextView vulaMobileReadMore = (TextView) findViewById(R.id.read_more4);\n vulaMobileReadMore.setTextColor(Color.BLACK);\n vulaMobileReadMore.setText(message);\n vulaMobileReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage9(String message) {\n TextView letiArtsReadMore = (TextView) findViewById(R.id.read_more9);\n letiArtsReadMore.setTextColor(Color.BLACK);\n letiArtsReadMore.setText(message);\n letiArtsReadMore.setGravity(Gravity.CENTER);\n }", "@Test\n public void smsTest() {\n driver.findElement(MobileBy.id(\"com.google.android.apps.messaging:id/start_new_conversation_button\")).click();\n \n wait.until(ExpectedConditions.elementToBeClickable(MobileBy.id(\"com.google.android.apps.messaging:id/recipient_text_view\")));\n driver.findElementById(\"recipient_text_view\").sendKeys(\"9980698804\");\n \n ((AndroidDriver<MobileElement>) driver).pressKey(new KeyEvent(AndroidKey.ENTER));\n \n \n driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);\n \n // Focus on the message text box\n String messageBoxLocator = \"resourceId(\\\"com.google.android.apps.messaging:id/compose_message_text\\\")\";\n driver.findElement(MobileBy.AndroidUIAutomator(messageBoxLocator)).click();\n \n driver.findElementById(\"com.google.android.apps.messaging:id/compose_message_text\").sendKeys(\"Hello from Appium\");\n \n // Send the message\n driver.findElementById(\"com.google.android.apps.messaging:id/send_message_button_icon\").click();\n \n // Wait for message to show\n wait.until(ExpectedConditions.presenceOfElementLocated(MobileBy.id(\"message_text\")));\n \n // Assertion\n String sentMessageText = driver.findElementById(\"com.google.android.apps.messaging:id/message_text\").getText();\n Assert.assertEquals(sentMessageText, \"Hello from Appium\");\n }", "public void Text_Message(View view) {\r\n adb= new AlertDialog.Builder(this);\r\n adb.setCancelable(false);\r\n adb.setTitle(\"Message Input\");\r\n final EditText eT= new EditText(this);\r\n eT.setHint(\"Type Message Here\");\r\n adb.setView(eT);\r\n adb.setPositiveButton(\"Show\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n String str= eT.getText().toString();\r\n Toast.makeText(MainActivity.this,str,Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n adb.setNegativeButton(\"Cancle\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.dismiss();\r\n }\r\n });\r\n AlertDialog ad=adb.create();\r\n ad.show();\r\n }", "private void customSendRedButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendRedButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"R\");\n }", "public SendSmsDialog( ChatPanel chatPanel,\n ChatTransport chatTransport,\n String message)\n {\n super(chatPanel.getChatContainer().getFrame());\n\n this.chatPanel = chatPanel;\n\n this.chatTransport = chatTransport;\n\n this.smsMessage = message;\n\n this.setTitle(title);\n\n this.getContentPane().add(mainPanel, BorderLayout.CENTER);\n this.getContentPane().add(buttonPanel, BorderLayout.SOUTH);\n\n this.mainPanel.setBorder(\n BorderFactory.createEmptyBorder(20, 20, 20, 20));\n this.mainPanel.add(phoneNumberLabel, BorderLayout.WEST);\n this.mainPanel.add(phoneNumberBox, BorderLayout.CENTER);\n this.mainPanel.add(detailsArea, BorderLayout.SOUTH);\n\n String defaultSmsNumber\n = chatTransport.getParentChatSession().getDefaultSmsNumber();\n\n phoneNumberBox.setText(defaultSmsNumber);\n\n this.detailsArea.setOpaque(false);\n this.detailsArea.setLineWrap(true);\n this.detailsArea.setWrapStyleWord(true);\n this.detailsArea.setEditable(false);\n\n this.buttonPanel.add(sendButton);\n\n this.sendButton.addActionListener(new ActionListener()\n {\n public void actionPerformed(ActionEvent event)\n {\n sendSmsMessage( phoneNumberBox.getText(),\n smsMessage);\n }\n });\n }", "private void displayMessage7(String message) {\n TextView maxReadMore = (TextView) findViewById(R.id.read_more7);\n maxReadMore.setTextColor(Color.BLACK);\n maxReadMore.setText(message);\n maxReadMore.setGravity(Gravity.CENTER);\n }", "public void sendMessage(String phoneNumber, String message) {\n\n if(message.isEmpty() || message.replace(\" \",\"\").isEmpty()){\n Toast.makeText(getApplicationContext(), \"Empty SMS!\",\n Toast.LENGTH_LONG).show();\n return;\n }\n\n if(phoneNumber != null) {\n PendingIntent piSent = PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(SENT), 0);\n PendingIntent piDelivered = PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(DELIVERED), 0);\n SmsManager smsManager = SmsManager.getDefault();\n\n int length = message.length();\n try {\n if (length > MAX_SMS_MESSAGE_LENGTH) {\n ArrayList<String> messagelist = smsManager.divideMessage(message);\n smsManager.sendMultipartTextMessage(phoneNumber, null, messagelist, null, null);\n Toast.makeText(getApplicationContext(), \"More than one SMS sent.\",\n Toast.LENGTH_LONG).show();\n } else {\n smsManager.sendTextMessage(phoneNumber, null, message, piSent, piDelivered);\n Toast.makeText(getApplicationContext(), \"SMS sent.\",\n Toast.LENGTH_LONG).show();\n }\n addSentMessageToDB(phoneNumber,message);\n addSentMessageToThread(message);\n } catch (Exception e) {\n Toast.makeText(getApplicationContext(),\n \"SMS failed, please try again.\",\n Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n else{\n Toast.makeText(getApplicationContext(),\n \"The contact does not have a phone number\",\n Toast.LENGTH_LONG).show();\n }\n }", "public void returnbottomText() {\n\t\trebote = this.getIntent().getStringExtra(\"buttonname\");\n\n\t\ttext.setText(rebote);\n\n\t}", "@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) { \r\n case R.id.send: \r\n \tif(!number.getText().toString().equals(\"\")&&number.getText().toString()!=null){\r\n\t\t\t\tif(!content.getText().toString().equals(\"\")&&content.getText().toString()!=null){\r\n\t\t\t\t\t//创建一个PendingIntent对象\r\n\t\t\t\t\tPendingIntent pi = PendingIntent.getActivity(SendSmsAct.this, 0, new Intent(), 0);\r\n\t\t\t\t\t//发送短信\r\n\t\t\t\t\t//短信具有字数限制,分条发送\r\n//\t\t\t\t\t ArrayList<String> list = sManager.divideMessage(content.getText().toString()); //因为一条短信有字数限制,因此要将长短信拆分 \r\n//\t\t\t for(String text:list){ \r\n//\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, text, pi, null);\r\n//\t\t\t }\r\n//\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, content.getText().toString(), pi, null);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (content.getText().toString().length() > 70) { \r\n\t\t\t\t\t\t ArrayList<String> msgs = sManager.divideMessage(content.getText().toString()); \r\n\t\t\t\t\t\t ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>(); \r\n\t\t\t\t\t\t for(int i = 0;i<msgs.size();i++){ \r\n\t\t\t\t\t\t sentIntents.add(pi); \r\n\t\t\t\t\t\t } \r\n\t\t\t\t\t\t sManager.sendMultipartTextMessage(number.getText().toString(), null, msgs, sentIntents, null); \r\n\t\t\t\t\t\t} else { \r\n\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, content.getText().toString(), pi, null); \r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t//提示短信发送成功\r\n\t\t\t\t\tToast.makeText(SendSmsAct.this, \"短信发送成功\", 8000).show();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(SendSmsAct.this, \"无信息内容\", 8000).show();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tToast.makeText(SendSmsAct.this, \"无号码\", 8000).show();\r\n\t\t\t}\r\n break; \r\n case R.id.encrysend: \r\n \tif(!number.getText().toString().equals(\"\")&&number.getText().toString()!=null){\r\n\t\t\t\tif(!content.getText().toString().equals(\"\")&&content.getText().toString()!=null){\r\n\t\t\t\t\t//从数据库中读取私钥,并使用MD5解密\r\n\t\t\t\t\tString userName = \"\";\r\n\t\t\t\t\tuserName = FileUtil.readFileSdcard(FileUtil.Folder_NAME+\"/me.txt\");\r\n\t\t\t\t\tif(userName.equals(\"\")){\r\n\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"未创建密钥\", 8000).show();\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tSQLiteHelper sqlLH = new SQLiteHelper(SendSmsAct.this);\r\n\t\t\t\t\t\tprivateKey2 = sqlLH.queryPrivateKey(userName);\r\n\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@privateKey2\"+privateKey2);\r\n\t\t\t\t\t\tif(privateKey2.equals(\"\")){\r\n\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"未创建密钥\", 8000).show();\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t//通过弹出窗口来输入私钥,获取privateKey\r\n\t\t\t\t\t\t\tAlertDialog.Builder builder = new Builder(SendSmsAct.this);\r\n\t\t\t\t\t\t\tbuilder.setTitle(\"请输入口令\"); //设置对话框标题\r\n\t\t\t\t\t\t\tbuilder.setIcon(android.R.drawable.btn_star); //设置对话框标题前的图标\r\n\t\t\t\t\t\t\tfinal EditText edit = new EditText(SendSmsAct.this);\r\n\t\t\t\t\t\t\tedit.setTransformationMethod(PasswordTransformationMethod.getInstance());\r\n\t\t\t\t\t\t\tbuilder.setView(edit);\r\n\t\t\t\t\t\t\tbuilder.setPositiveButton(\"确认\", \r\n\t\t\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t\t\t\tprivateKey = edit.getText().toString();\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@privateKey\"+privateKey);\r\n\t\t\t\t\t\t\t\tif(!MD5Util.encryph(privateKey).equals(privateKey2)){\r\n\t\t\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"口令不符\", 8000).show();\r\n\r\n\t\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\t\t//从本地文件中读取收件人的公钥\r\n\t\t\t\t\t\t\t\t\t\tString name = number.getText().toString();\r\n\t\t\t\t\t\t\t\t\t\tString publicKey = \"\";\r\n\t\t\t\t\t\t\t\t\t\tpublicKey = FileUtil.readFileSdcard(FileUtil.File_NAME+name+\".txt\");\r\n\t\t\t\t\t\t\t\t\t\tif(!publicKey.equals(\"\")){\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@publicKey\"+publicKey);\r\n\t\t\t\t\t\t\t\t\t\t\tDhKey dhkey = new DhKey(MD5Util.encryph(privateKey));\r\n\t\t\t\t\t\t\t\t\t\t\tBigInteger k = dhkey.getK(publicKey);\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@K\"+k);\r\n\t\t\t\t\t\t\t\t\t\t\tString message = content.getText().toString();\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@message\"+message);\r\n//\t\t\t\t\t\t\t\t\t\t\tAESUtil aes = new AESUtil();\r\n//\t\t\t\t\t\t\t\t\t\t\tString ciphermessage = \"yyyy:\"+aes.AESEncode(k.toString(), message);\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\tDESUtil Des = new DESUtil();\r\n\t\t\t\t\t\t\t\t\t\t\tString ciphermessage = \"yyyy:\"+Des.DESEncode(k.toString(), message);\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\t\r\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"@@@@@@@@AESEncode\"+ciphermessage);\r\n\t\t\t\t\t\t\t\t\t\t\t//创建一个PendingIntent对象\r\n\t\t\t\t\t\t\t\t\t\t\tPendingIntent pi = PendingIntent.getActivity(SendSmsAct.this, 0, new Intent(), 0);\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\t//短信具有字数限制,分条发送\r\n//\t\t\t\t\t\t\t\t\t\t\t ArrayList<String> list = sManager.divideMessage(ciphermessage); //因为一条短信有字数限制,因此要将长短信拆分 \r\n//\t\t\t\t\t\t\t\t\t for(String text:list){ \r\n//\t\t\t\t\t\t\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, text, pi, null);\r\n//\t\t\t\t\t\r\n//\t\t\t\t\t\t\t\t\t }\r\n//\t\t\t\t\t\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, ciphermessage, pi, null);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (ciphermessage.length() > 70) { \r\n\t\t\t\t\t\t\t\t\t\t\t\t ArrayList<String> msgs = sManager.divideMessage(ciphermessage); \r\n\t\t\t\t\t\t\t\t\t\t\t\t ArrayList<PendingIntent> sentIntents = new ArrayList<PendingIntent>(); \r\n\t\t\t\t\t\t\t\t\t\t\t\t for(int i = 0;i<msgs.size();i++){ \r\n\t\t\t\t\t\t\t\t\t\t\t\t sentIntents.add(pi); \r\n\t\t\t\t\t\t\t\t\t\t\t\t } \r\n\t\t\t\t\t\t\t\t\t\t\t\t sManager.sendMultipartTextMessage(number.getText().toString(), null, msgs, sentIntents, null); \r\n\t\t\t\t\t\t\t\t\t\t\t\t} else { \r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsManager.sendTextMessage(number.getText().toString(), null, ciphermessage, pi, null); \r\n\t\t\t\t\t\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\t\t\t\t\t//提示短信发送成功\r\n\t\t\t\t\t\t\t\t\t\t\tToast.makeText(SendSmsAct.this, \"短信发送成功\", 8000).show();\r\n\t\t\t\t\t\t\t\t\t\t\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\tToast.makeText(SendSmsAct.this, \"无收件人公钥,查证\", 8000).show();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tbuilder.setNegativeButton(\"取消\", new DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\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\tbuilder.setCancelable(true); //设置按钮是否可以按返回键取消,false则不可以取消\r\n\t\t\t\t\t\t\tAlertDialog dialog = builder.create(); //创建对话框\r\n\t\t\t\t\t\t\tdialog.setCanceledOnTouchOutside(true); //设置弹出框失去焦点是否隐藏,即点击屏蔽其它地方是否隐藏\r\n\t\t\t\t\t\t\tdialog.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\tToast.makeText(SendSmsAct.this, \"无信息内容\", 8000).show();\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tToast.makeText(SendSmsAct.this, \"无号码\", 8000).show();\r\n\t\t\t}\r\n break; \r\n \r\n case R.id.nokey:\r\n \tIntent intent = new Intent();\r\n \tintent.setClass(SendSmsAct.this,ProduceKeyAct.class); \r\n \tstartActivity(intent);\r\n default: \r\n break; \r\n } \r\n\t}", "void requestSendSMSCode(Context context,String phone);", "@Override\n public void onClick(View view) {\n String sms = \"FINDME location is \";\n if (LOCATION != null) {\n sms = sms + \"coordinates\" + \"*\" + LOCATION.latitude + \"*\" + LOCATION.longitude;\n }\n sendSms(\"0473848248\", sms);\n }", "private void setupButtonClickEvents() {\n tvPhone1 = (TextView)findViewById(R.id.textViewPhone1Display);\n btn1Call = (Button) findViewById(R.id.button1Call);\n btn1Call.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + tvPhone1.getText()));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n });\n\n /**\n * Set button click listener for texting first contact\n */\n btn1Text = (Button) findViewById(R.id.button1Text);\n btn1Text.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Intent sendIntent = new Intent(Intent.ACTION_VIEW);\n sendIntent.setData(Uri.parse(\"sms:\" + tvPhone1.getText()));\n sendIntent.putExtra(\"sms_body\", \"Hi\");\n if (sendIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(sendIntent);\n }\n }\n });\n\n /**\n * Set up button click listener for calling second contact\n */\n tvPhone2 = (TextView)findViewById(R.id.textViewPhone2Display);\n btn2Call = (Button) findViewById(R.id.button2Call);\n btn2Call.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + tvPhone2.getText()));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n });\n\n /**\n * Set button click listener for texting second contact\n */\n btn2Text = (Button) findViewById(R.id.button2Text);\n btn2Text.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Intent sendIntent = new Intent(Intent.ACTION_VIEW);\n sendIntent.setData(Uri.parse(\"sms:\" + tvPhone2.getText()));\n sendIntent.putExtra(\"sms_body\", \"Hi\");\n if (sendIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(sendIntent);\n }\n }\n });\n\n /**\n * Set up button click listener for calling third contact\n */\n tvPhone3 = (TextView)findViewById(R.id.textViewPhone3Display);\n btn3Call = (Button) findViewById(R.id.button3Call);\n btn3Call.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + tvPhone3.getText()));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }\n });\n\n /**\n * Set button click listener for texting third contact\n */\n btn3Text = (Button) findViewById(R.id.button3Text);\n btn3Text.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n Intent sendIntent = new Intent(Intent.ACTION_VIEW);\n sendIntent.setData(Uri.parse(\"sms:\" + tvPhone3.getText()));\n sendIntent.putExtra(\"sms_body\", \"Hi\");\n if (sendIntent.resolveActivity(getPackageManager()) != null) {\n startActivity(sendIntent);\n }\n }\n });\n\n }", "@Override\n public void onClick(View view) {\n String phoneNumber = phoneNumberEditText.getText().toString();\n // atata timp cat exista caractere in EditText => ele pot fi sterse\n if (phoneNumber.length() > 0) {\n // se sterge mereu ultima cifra / ultimul caracter\n phoneNumber = phoneNumber.substring(0, phoneNumber.length() - 1);\n phoneNumberEditText.setText(phoneNumber);\n }\n }", "private void displayMessage8(String message) {\n TextView kytabuReadMore = (TextView) findViewById(R.id.read_more8);\n kytabuReadMore.setTextColor(Color.BLACK);\n kytabuReadMore.setText(message);\n kytabuReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage17(String message) {\n TextView pushCvReadMore = (TextView) findViewById(R.id.read_more17);\n pushCvReadMore.setTextColor(Color.BLACK);\n pushCvReadMore.setText(message);\n pushCvReadMore.setGravity(Gravity.CENTER);\n }", "public void sendClick(View view) {\n String message = input.getText().toString();\n uart.send(message);\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (btn1==e.getSource()) { //만약 버튼(btn1)클릭 시 동작\n\t\t\tto = tfphone.getText(); //텍스트필드(전화번호) 값가져와서 String to로 변형\n\t\t\ttext = tftext.getText(); //텍스트 필드(텍스트) 값자겨와서 String text로 변형 \n\t\t\t\t\t\t\t\t\t\t\t\t//문자전송(인자)가 String 이기때문에 String으로 변형해줘야함\n\t\t\tExampleSend ex = new ExampleSend(); //ExampleSend클래스 객체 생성\n\t\t\tex.문자전송(to, text);\n\t\t}\n\t\tif (btn2 == e.getSource()) {\n\t\t\ttfphone.setText(\"\");\n\t\t\ttftext.setText(\"\");\n\t\t}\n\t}", "public String getText() {\n\t\treturn fragTelephone.getText().toString();\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n String inputText = inputEditText.getText().toString();\n\n // Show the user's input text\n messageTextView.setText(inputText);\n\n }", "private void displayMessage(String message) {\n TextView seeBoxReadMore = (TextView) findViewById(R.id.read_more1);\n seeBoxReadMore.setTextColor(Color.BLACK);\n seeBoxReadMore.setText(message);\n seeBoxReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage18(String message) {\n TextView wecyclersReadMore = (TextView) findViewById(R.id.read_more18);\n wecyclersReadMore.setTextColor(Color.BLACK);\n wecyclersReadMore.setText(message);\n wecyclersReadMore.setGravity(Gravity.CENTER);\n }", "public void sendMessage(View view) {\n\t\t// Do something in response to button\n\t\tIntent intent = new Intent(this, DisplayMessageActivity.class);\n\t\tstartActivity(intent);\n\n\t}", "public String getText_txt_Fuel_Rewards_Page_Button(){\r\n\t\treturn txt_Fuel_Rewards_Page_Button.getText();\r\n\t}", "public void onClickSend(View view) {\n //String string = editText.getText().toString();\n //serialPort.write(string.getBytes());\n //tvAppend(txtResponse, \"\\nData Sent : \" + string + \"\\n\");\n }", "@Override\r\n public void messageReceived(String messageText) {\n Log.e(\"Message\",messageText);\r\n Toast.makeText(StatusScreen.this,\"Message: \"+messageText,Toast.LENGTH_LONG).show();\r\n\r\n // If your OTP is six digits number, you may use the below code\r\n\r\n Pattern pattern = Pattern.compile(OTP_REGEX);\r\n Matcher matcher = pattern.matcher(messageText);\r\n String otp = \"\";\r\n while (matcher.find())\r\n {\r\n otp = matcher.group();\r\n }\r\n\r\n Toast.makeText(StatusScreen.this,\"OTP: \"+ otp ,Toast.LENGTH_LONG).show();\r\n\r\n }", "@Override\n public void onClick(View view) {\n String msg = mSendView.getText().toString();\n currMessage = msg;\n mSendView.setText(\"\");\n sendMessage(msg);\n refresh();\n\n }", "public String getText_click_Digital_coupons_button(){\r\n\t\treturn click_Digital_coupons_button.getText();\r\n\t}", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n //EditText editText = (EditText) findViewById(R.id.edit_message);\n //String message = editText.getText().toString();\n //intent.putExtra(EXTRA_MESSAGE, message);\n\n startActivity(intent);\n }", "private void displayMessage14(String message) {\n TextView ologaReadMore = (TextView) findViewById(R.id.read_more14);\n ologaReadMore.setTextColor(Color.BLACK);\n ologaReadMore.setText(message);\n ologaReadMore.setGravity(Gravity.CENTER);\n }", "public void onClickSend(View view) {\n String string = editText.getText().toString();\n serialPort.write(string.getBytes());\n tvAppend(textView, \"\\nData Sent : \" + string + \"\\n\");\n\n }", "private void customSendBlueButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_customSendBlueButtonActionPerformed\n String custom = customMessageField.getText();\n Msg.send(\"Clicked - message: \" + custom);\n sendCustomMessage(custom, \"B\");\n }", "private void txtmobilenoActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public static void enviarSMS(Activity actividad, String texto, String numerodestino) {\n Uri uri = Uri.parse(\"smsto:\" + numerodestino);\n Intent i = new Intent(Intent.ACTION_SENDTO, uri);\n i.putExtra(\"sms_body\", texto);\n //i.setPackage(\"com.whatsapp\");\n actividad.startActivity(i);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsmsDialog= new Comments();\n\t\t\t\tsmsDialog.show(getSupportFragmentManager(), \"sms\");\n\t\t\t}", "protected View ShowWord() {\n\t\tTextView btn=new TextView(this);\n\t\tbtn.setId(index);\n\t\tbtn.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n//\t\tbtn.setText(\"text not sent here!!!!! \"); //這一行是可以顯示文字的\n\t\treturn btn;\n\t}", "public void sendMessage(View view) {\n Intent intent = new Intent(this, DisplayMessageActivity.class);\n EditText editText = (EditText) findViewById(R.id.editText);\n String message = editText.getText().toString();\n intent.putExtra(EXTRA_MESSAGE, message);\n startActivity(intent);\n\n }", "private void displayMessage5(String message) {\n TextView agricycleReadMore = (TextView) findViewById(R.id.read_more5);\n agricycleReadMore.setTextColor(Color.BLACK);\n agricycleReadMore.setText(message);\n agricycleReadMore.setGravity(Gravity.CENTER);\n }", "@Override\r\n\tpublic void onClick(View arg0) {\n\t\tIntent myobj=new Intent(Intent.ACTION_SENDTO,Uri.parse(\"smsto:\"+e2.getText().toString()));\r\n\t\tmyobj.putExtra(\"sms_body\",e1.getText().toString());\r\n\t\tstartActivity(myobj);\r\n\t}", "private void displayMessage16(String message) {\n TextView mookhReadMore = (TextView) findViewById(R.id.read_more16);\n mookhReadMore.setTextColor(Color.BLACK);\n mookhReadMore.setText(message);\n mookhReadMore.setGravity(Gravity.CENTER);\n }", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "private void composeSmsMessage(String message) {\n Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(CDC_SMS_PREFIX));\n intent.putExtra(\"sms_body\", message);\n if (intent.resolveActivity(getPackageManager()) != null) {\n Log.d(TAG, \"Ready to send sms\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }\n }", "private void displayMessage22(String message) {\n TextView kiliVrReadMore = (TextView) findViewById(R.id.read_more22);\n kiliVrReadMore.setTextColor(Color.BLACK);\n kiliVrReadMore.setText(message);\n kiliVrReadMore.setGravity(Gravity.CENTER);\n }" ]
[ "0.66984624", "0.6621541", "0.66147375", "0.6475605", "0.6367677", "0.6362509", "0.6335388", "0.6310011", "0.6280395", "0.6267969", "0.6230612", "0.60913926", "0.60486156", "0.60461605", "0.60136515", "0.60133994", "0.60012674", "0.5999881", "0.59865564", "0.59759736", "0.59368825", "0.5934056", "0.5892003", "0.58894354", "0.5869486", "0.5853594", "0.5842854", "0.5831641", "0.58266747", "0.5817688", "0.58090603", "0.5807963", "0.5790403", "0.5787114", "0.5775566", "0.5775167", "0.574791", "0.5747257", "0.5728837", "0.5721721", "0.57187974", "0.5718394", "0.57152194", "0.5708581", "0.5701248", "0.569443", "0.56908756", "0.5686278", "0.5673313", "0.56673265", "0.5667202", "0.56642586", "0.56564814", "0.5648587", "0.5645711", "0.56363934", "0.56354606", "0.56340355", "0.5631887", "0.56280684", "0.5614076", "0.56080776", "0.55939317", "0.5591503", "0.5579128", "0.5574715", "0.55630296", "0.55566245", "0.5550684", "0.5549983", "0.5547667", "0.5542498", "0.5531377", "0.5530078", "0.5518763", "0.5508276", "0.5506475", "0.54964703", "0.549446", "0.5489542", "0.548731", "0.5484913", "0.54815817", "0.5480919", "0.5480064", "0.54674995", "0.5461714", "0.54615116", "0.54590493", "0.54454815", "0.54369235", "0.54352355", "0.5434926", "0.5434246", "0.54320055", "0.5428722", "0.54254603", "0.54245985", "0.5424573", "0.5408182" ]
0.58215636
29
/ Email link text View.
private TextView getEmailTextView(String content) { TextView textView = getTextView(content); TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT); layoutParams.weight = 1; Linkify.addLinks(textView, Linkify.EMAIL_ADDRESSES); textView.setLayoutParams(layoutParams); textView.setPadding(45, 30, 0, 0); textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mail_blue, 0, 0, 0); textView.setCompoundDrawablePadding(30); return textView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String linkText();", "Observable<String> messageBodyRecipientTextViewText();", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n TextView tv=(TextView)findViewById(R.id.txtView);\n Linkify.addLinks(tv, Linkify.EMAIL_ADDRESSES);\n \n \n }", "Observable<String> messageBodySenderTextViewText();", "public void openGmail (View view) {\n TextView textView = (TextView) findViewById(R.id.emailContent);\n String emailContent = textView.getText().toString();\n Log.i(TAG, \"emailContent: \" + emailContent);\n\n /**\n * code was adapted from the information here:\n * https://javadevnotes.com/java-string-split-newline-examples\n */\n /*takes the above string object, splits it into parts seperated by\n * line breaks and puts it into an array\n */\n String[] content = emailContent.split(\"\\\\r?\\\\n\");\n\n // created string objects out of the array for each part of the email\n String emailAddress = content[0];\n String emailSubject = content[1];\n String emailBody = content [2];\n\n /***\n * following code was adapted from here:\n * https://www.javatpoint.com/how-to-send-email-in-android-using-intent\n */\n //opens an email client of users choice and prepopulates with data sent back to mainactivity\n Intent email = new Intent(Intent.ACTION_SEND);\n email.putExtra(Intent.EXTRA_EMAIL, new String[]{emailAddress});\n email.putExtra(Intent.EXTRA_SUBJECT, emailSubject);\n email.putExtra(Intent.EXTRA_TEXT, emailBody);\n\n //need this to prompts email client only\n email.setType(\"message/rfc822\");\n startActivity(Intent.createChooser(email, \"Choose an Email client :\"));\n\n }", "public List<String> linkTexts()\n\t{\n\t\t\n\t\tList<String> links=new ArrayList<String>();\n\t\tlinks.add(linkString);\n\t\tlinks.add(\"Facebook.com\");\n\t\tlinks.add(\"google.com;\");\n\t\tlinks.add(\"gmail.com\");\n\t\tlinks.add(\"shine.com\");\n\t\tlinks.add(\"nukari.com\");\n\t\t\n\t\t// Like the above we have to add number of link text are passed to achieve the DataDriven approach through BBD \n\t\t\t\n\t\treturn links;\n\t\t\n\t}", "public void img_email(View view) {\n try {\n String txt = \"Good morning \\n\" + \"My suggestion is\";\n Intent sendemail = new Intent(Intent.ACTION_SEND);\n sendemail.setData( Uri.parse(\"mailto:\"));\n sendemail.setType((\"message/rfc822\"));\n sendemail.putExtra(Intent.EXTRA_EMAIL, \"[email protected]\");\n sendemail.putExtra(Intent.EXTRA_SUBJECT, \"Application Issam Drmas\");\n sendemail.putExtra(Intent.EXTRA_TEXT, txt);\n startActivity(sendemail);\n }catch (Exception e) {\n Toast.makeText(this,\"Sorry cannot find the application\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onTextLinkClick(View textView, String clickedString) {\n if(clickedString.equalsIgnoreCase(\"_fertilization\")){\n Log.e(\"Hyperlink is :1: \" + clickedString, \"Hyperlink is :: \" + clickedString);\n }else if(clickedString.equalsIgnoreCase(\"_Nitrogen\")){\n Intent i = new Intent(CP_Fertilization.this,Nitrogen.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_Phosphorous_and_potash\")) {\n Intent i = new Intent(CP_Fertilization.this,PhosphorusandPotash.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_calcium\")) {\n Intent i = new Intent(CP_Fertilization.this,CalciumnMagnisium.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_sulphur\")) {\n Intent i = new Intent(CP_Fertilization.this,Sulphur.class);\n startActivity(i);\n }else if(clickedString.equalsIgnoreCase(\"_micronutrients\")) {\n Intent i = new Intent(CP_Fertilization.this,Micronutrient.class);\n startActivity(i);\n }else\n {\n Log.e(\"Hyperlink is :x: \" + clickedString, \"Hyperlink is :: \" + clickedString);\n }\n }", "public void onPressMail(View view) {\r\n MailHelper.mailRecipient(this, event.mail);\r\n }", "@NotNull\n private static String addHyperlinksToText(@NotNull String text, @NotNull NotificationHyperlink... hyperlinks) {\n if (hyperlinks.length == 0) {\n return text;\n }\n StringBuilder b = new StringBuilder();\n b.append(text);\n\n for (NotificationHyperlink hyperlink : hyperlinks) {\n b.append(\"<br>\\n\").append(hyperlink.toHtml());\n }\n\n return b.toString();\n }", "public static void fromHtml(TextView textView, String html) {\n Context context = textView.getContext();\n\n // For displaying <img> tags\n Picasso picasso = Picasso.with(context);\n PicassoImageGetter imageGetter = new PicassoImageGetter(picasso, textView);\n\n Spanned htmlText;\n if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {\n htmlText = Html.fromHtml(html, imageGetter, null);\n } else {\n htmlText = Html.fromHtml(html,\n Html.FROM_HTML_OPTION_USE_CSS_COLORS |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_BLOCKQUOTE |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_HEADING |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_LIST |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_LIST_ITEM |\n Html.FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH |\n Html.TO_HTML_PARAGRAPH_LINES_CONSECUTIVE,\n imageGetter,\n null\n );\n }\n\n URLSpan[] currentSpans = htmlText.getSpans(0, htmlText.length(), URLSpan.class);\n\n // So pressing on links will work (open up a browser or email client)\n SpannableString buffer = new SpannableString(htmlText);\n Linkify.addLinks(buffer, Linkify.ALL);\n\n // Turn @username mentions into clickable links\n Linkify.TransformFilter filter = new Linkify.TransformFilter() {\n public final String transformUrl(final Matcher match, String url) {\n return match.group();\n }\n };\n\n Pattern mentionPattern = Pattern.compile(\"@([A-Za-z0-9_-]+)\");\n Linkify.addLinks(buffer, mentionPattern, null, null, filter);\n\n for (URLSpan span : currentSpans) {\n int end = htmlText.getSpanEnd(span);\n int start = htmlText.getSpanStart(span);\n buffer.setSpan(span, start, end, 0);\n }\n\n Spanned finalHtmlText = buffer;\n\n BetterLinkMovementMethod linker = BetterLinkMovementMethod.newInstance();\n textView.setMovementMethod(linker);\n linker.setOnLinkClickListener((tv, url) -> {\n if (url.startsWith(\"@\")) {\n // Username mention - show user profile screen\n try {\n JSONObject item = new JSONObject();\n item.put(\"login\", url.substring(1));\n Intent intent = new Intent(context, UserProfile.class);\n intent.putExtra(\"user\", new BetterJSONObject(item));\n context.startActivity(intent);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return true;\n\n } else {\n // Regular URL - use default action (e.g. open browser)\n return false;\n }\n });\n\n textView.setLinksClickable(true);\n textView.setFocusable(false);\n textView.setText(finalHtmlText);\n }", "public void sendLink(String emailId, String otp) {\n\t\tString to = emailId;\n\n\t\t// Sender's email ID needs to be mentioned\n\t\tString from = \"[email protected]\";\n\t\tfinal String username = \"[email protected]\";\n\t\tfinal String password = \"9784261079\";// change accordingly\n\n\t\t// Assuming you are sending email through relay.jangosmtp.net\n\t\tString host = \"smtp.gmail.com\";\n\n\t\tProperties props = new Properties();\n\t\tprops.put(\"mail.smtp.auth\", \"true\");\n\t\tprops.put(\"mail.smtp.starttls.enable\", \"true\");\n\t\tprops.put(\"mail.smtp.host\", host);\n\t\tprops.put(\"mail.smtp.port\", \"25\");\n\n\t\t// Get the Session object.\n\t\tSession session = Session.getInstance(props,\n\t\t\t\tnew javax.mail.Authenticator() {\n\t\t\t\t\tprotected PasswordAuthentication getPasswordAuthentication() {\n\t\t\t\t\t\treturn new PasswordAuthentication(username, password);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\ttry {\n\t\t\t// Create a default MimeMessage object.\n\t\t\tMessage message = new MimeMessage(session);\n\n\t\t\t// Set From: header field of the header.\n\t\t\tmessage.setFrom(new InternetAddress(from));\n\n\t\t\t// Set To: header field of the header.\n\t\t\tmessage.setRecipients(Message.RecipientType.TO,\n\t\t\t\t\tInternetAddress.parse(to));\n\n\t\t\t// Set Subject: header field\n\t\t\tmessage.setSubject(\"Link For Magic\");\n\n\t\t\t// Now set the actual message\n\t\t\tmessage.setText(\"Welcome to Atithi::\" + otp\n\t\t\t\t\t+ \"\\n Please do not share it with anyone.\");\n\t\t\tTransport.send(message);\n\t\t} catch (MessagingException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n Intent share=new Intent(android.content.Intent.ACTION_SEND);\n\n share.setType(\"text/plain\");\n share.putExtra(android.content.Intent.EXTRA_SUBJECT,news.getTitle());\n share.putExtra(android.content.Intent.EXTRA_TEXT,\"Follow the link : \"+MainActivity.base_url+news.getAbsolute_url()+\" to read more\");\n startActivity(Intent.createChooser(share,\"Share via\"));\n\t\t\t\t\t\t}", "public String getLink();", "private TextView getPhoneTextView(String content) {\n TextView textView = getTextView(content);\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 20f;\n layoutParams.gravity = Gravity.CENTER_VERTICAL;\n Linkify.addLinks(textView, Linkify.PHONE_NUMBERS);\n textView.setLayoutParams(layoutParams);\n textView.setPadding(45, 30, 0, 0);\n textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.phone_blue, 0, 0, 0);\n textView.setCompoundDrawablePadding(30);\n return textView;\n }", "public void sendButtonClick(View v){\n String title = getText(R.string.mail_title).toString();\n String mailto = \"mailto:\" + emailAdress;\n Intent openEmailApp = new Intent(Intent.ACTION_SENDTO);\n openEmailApp.setType(\"plain/text\");\n openEmailApp.setData(Uri.parse(mailto));\n openEmailApp.putExtra(Intent.EXTRA_SUBJECT, userName + title);\n openEmailApp.putExtra(Intent.EXTRA_TEXT, evaluationMessage);\n startActivity(openEmailApp);\n }", "@Test\n public void testLink() {\n try {\n Message email = emailUtils.getMessagesBySubject(\"You've received a document via HelloSign\", true, 5)[0];\n String link = emailUtils.getUrlsFromMessage(email, Data.mainUrl + \"/t\").get(0);\n\n driver.get(link);\n\n //TODO: continue testing\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "private void sendInvitationLink(){\n String invitationLink = mInvitationURL;\n String msg = \"Давайте вместе сыграем в Мюнхгаузена! Используйте мою реферерную ссылку: \"\n + invitationLink;\n\n System.out.println(msg);\n\n NSMutableArray<NSString> array = new NSMutableArray<NSString>();\n array.add(msg);\n\n UIActivityViewController activityViewController = new UIActivityViewController(array,null);\n UIViewController currentViewController = UIApplication.getSharedApplication().getKeyWindow().getRootViewController();\n\n if (isIpad()) {\n UIPopoverPresentationController popoverController = activityViewController.getPopoverPresentationController();\n popoverController.setSourceRect(new CGRect(UIScreen.getMainScreen().getBounds().getWidth()/2, UIScreen.getMainScreen().getBounds().getHeight()/2,0,0));\n popoverController.setSourceView(activityViewController.getView());\n popoverController.setPermittedArrowDirections(new UIPopoverArrowDirection(0));\n }\n\n currentViewController.presentViewController(activityViewController,true,null);\n\n// if (!MFMailComposeViewController.canSendMail()){\n// System.out.println(\"Device can't send email\")\n// return;\n// }\n//\n// MFMailComposeViewController mailer = new MFMailComposeViewController();\n// mailer.setMailComposeDelegate(new MFMailComposeViewControllerDelegate() {\n// @Override\n// public void didFinish(MFMailComposeViewController mfMailComposeViewController, MFMailComposeResult mfMailComposeResult, NSError nsError) {\n//\n// }\n// });\n//\n// mailer.setSubject(\"Invitation\");\n// mailer.setMessageBody(msg, true);\n// mailer.presentViewController(mailer, true, null);\n\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(c, \"yes\" + article.getWeblink(), Toast.LENGTH_LONG).show();\n }", "public void contact(View view){\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(\"mailto:\" + \"[email protected]\"));\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"Complaint: MLS App\");\n\n//emailIntent.putExtra(Intent.EXTRA_HTML_TEXT, body); //If you are using HTML in your body text\n\n startActivity(Intent.createChooser(emailIntent, \"What App would you like?\"));\n }", "String getLink();", "@Override\n public void onClick(View view) {\n Intent replyMailIntent = new Intent(\n EmailViewerActivity.this, MailEditorActivity.class);\n // Put message ID that this activity receive from InboxActivity\n replyMailIntent.putExtra(MailEditorActivity.KEY_REPLY,\n getIntent().getExtras().getInt(KEY_EXTRA));\n // Start the reply activity when this button is clicked\n startActivity(replyMailIntent);\n }", "@Override\n public void onItemClick(AdapterView<?> listView, View view,\n int position, long id) {\n Cursor cursor = (Cursor) listView.getItemAtPosition(position);\n\n\n String email =\n cursor.getString(cursor.getColumnIndexOrThrow(\"email\"));\n Intent newI = new Intent(Intent.ACTION_SENDTO);\n newI.setData(Uri.parse(\"mailto:\" + email));\n startActivity(newI);\n\n }", "java.lang.String getLinkToDiscussion();", "public Hyperlink(){\n this.href = \"\";\n this.text = new TextSpan(\"\");\n }", "public void testText() {\r\n\r\n Map<String, String> parameters = new HashMap<String, String>();\r\n ConnectionParameters cp = new ConnectionParameters(new MockConnectionEl(parameters,\r\n \"mailto:[email protected]\"), MockDriverContext.INSTANCE);\r\n MailConnection mc = new MailConnection(cp) {\r\n @Override\r\n protected void send(MimeMessage message) {\r\n try {\r\n assertEquals(\"[email protected]\", message.getRecipients(Message.RecipientType.TO)[0].toString());\r\n assertEquals(\"Message. *example*\", message.getContent());\r\n } catch (Exception e) {\r\n throw new IllegalStateException(e);\r\n }\r\n\r\n }\r\n };\r\n mc.executeScript(new StringResource(\"Message. $example\"), MockParametersCallbacks.SIMPLE);\r\n }", "private Text href() {\n\t\tText href = text();\r\n\r\n\t\tif (syntaxError)\r\n\t\t\treturn null;\r\n\r\n\t\treturn href;\r\n\t}", "@Override\n\tpublic void sendHtmlEmail(MimeMessage mm) {\n\t\t\n\t}", "public static String getText()\n\t{\n\t\treturn enterURL.getText().toString();\n\t}", "public String makeLink(@SuppressWarnings(\"unused\") int type, @SuppressWarnings(\"unused\") String link, @SuppressWarnings(\"unused\") String text) {\n\t\treturn null;\n\t\t/*\n\t\t * if( text == null ) text = link;\n\t\t * \n\t\t * text = callMutatorChain( m_linkMutators, text );\n\t\t * \n\t\t * return m_renderer.makeLink( type, link, text );\n\t\t */\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\treturn \"下载链接:\"+showLink;\n\t\t}", "static CharSequence linkifyUrls(FormattedTweetText tweetText,\n final LinkClickListener listener, boolean stripLastPhotoEntity, final int linkColor) {\n if (tweetText == null) return null;\n\n if (TextUtils.isEmpty(tweetText.text)) {\n return tweetText.text;\n }\n\n final SpannableStringBuilder spannable\n = new SpannableStringBuilder(tweetText.text);\n\n final List<FormattedUrlEntity> urls = tweetText.urlEntities;\n\n final List<FormattedMediaEntity> media\n = tweetText.mediaEntities;\n final FormattedMediaEntity lastPhoto;\n if (stripLastPhotoEntity) {\n lastPhoto = getLastPhotoEntity(tweetText);\n } else {\n lastPhoto = null;\n }\n\n /*\n * We combine and sort the entities here so that we can correctly calculate the offsets\n * into the text.\n */\n final List<FormattedUrlEntity> combined = mergeAndSortEntities(urls, media);\n\n addUrlEntities(spannable, combined, lastPhoto, listener, linkColor);\n return spannable;\n }", "public String getTextForDisplay() {\n\t\tif (textForDisplay == null) {\n\t\t\ttextForDisplay = \"\";\n\t\t\tif (text != null) {\n\t\t\t\ttextForDisplay = new String(text);\n\t\t\t}\n\t\t\tif (entities != null) {\n\t\t\t\tif (entities.urls != null) {\n\t\t\t\t\tfor (Url url : entities.urls) {\n\t\t\t\t\t\ttextForDisplay = textForDisplay.replace(url.url,\n\t\t\t\t\t\t\t\turl.display_url);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (entities.media != null) {\n\t\t\t\t\tfor (Media media : entities.media) {\n\t\t\t\t\t\ttextForDisplay = textForDisplay.replace(media.url,\n\t\t\t\t\t\t\t\tmedia.display_url);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\ttextForDisplay = textForDisplay.replace(\"&lt;\", \"<\")\n\t\t\t\t\t.replace(\"&gt;\", \">\").replace(\"&amp;\", \"&\");\n\t\t}\n\t\treturn textForDisplay;\n\t}", "public String getMessageTextAsHTML();", "public void sendMailAction(View view) {\n String name = getPlayerName();\n String message = createShortQuizSummary(finalScore, name);\n String mailto = \"mailto:\" + getPlayerMail() +\n \"?cc=\" + \"\" +\n \"&subject=\" + Uri.encode(name + getResources().getString(R.string.score_in_quiz)) +\n \"&body=\" + Uri.encode(message);\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO);\n emailIntent.setData(Uri.parse(mailto));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n }\n\n }", "public void createMailClientIntent(View view){\n String subject = SUBJECT;\n String body = TEXT_TO_SHARE;\n\n //Step 2: Create an mailClientIntent with action 'Intent.ACTION_SENDTO'\n Intent mailClientIntent = new Intent(Intent.ACTION_SENDTO);\n\n //Step 3: Set the intent data (\"mailto:recipientEmail\")\n Uri datauri = Uri.parse(\"mailto:[email protected]\");\n mailClientIntent.setData(datauri);\n\n //Step 4: Add the text to share as an extra (Intent.EXTRA_TEXT)\n mailClientIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n mailClientIntent.putExtra(Intent.EXTRA_TEXT, body);\n\n //Step 5: Check if any Mail Client is available to ACCEPT this intent\n if(mailClientIntent.resolveActivity(getPackageManager()) != null){\n startActivity(mailClientIntent);\n }\n else{\n Toast.makeText(this, \"No available client\", Toast.LENGTH_LONG).show();\n }\n }", "public void readMore1(View view) {\n String readMore1 = \"Founder: Johann Kok\" + \"\\nWebsite: http://www.seebox.co.za\";\n displayMessage(readMore1);\n }", "public static String renderAsLink(final String message)\n {\n final Element div = DOM.createDiv();\n div.setInnerHTML(message);\n div.setClassName(LINK_STYLE);\n return DOM.toString(div);\n }", "@Click public void aboutEmailButton() {\n\n Intent emailIntent = new Intent(\n Intent.ACTION_SENDTO, Uri.parse(\"mailto:\" + Uri.encode(EMAIL))\n );\n //emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n //emailIntent.putExtra(Intent.EXTRA_TEXT, body);\n\n //startActivity(emailIntent);\n //startActivity(Intent.createChooser(emailIntent, \"Send an email\"));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n app.toasty(R.string.error_no_email_client);\n e.printStackTrace();\n }\n }", "TextView getDescriptionView();", "public void readMore22(View view) {\n String readMore22 = \"Website: http://www.kilivr.com/\";\n displayMessage22(readMore22);\n }", "public String verifyLinkTextByText(String object, String data) {\n\t\tlogger.debug(\"Verifying link Text\");\n\t\ttry {\n\t\t\t\n\t\t\twaitForPageLoad(driver);\n\t\t\tString actual = wait.until(explicitWaitForElement(By.linkText(OR.getProperty(object)))).getText().trim();\n\t\t\tString expected = data.trim();\n\n\t\t\tif (actual.equals(expected)) {\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\t} else {\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified \\t actual is =>\" + actual + \"expected is =>\" + expected;\n\t\t\t}\n\n\t\t} catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t}catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\" + e.getMessage();\n\n\t\t}\n\n\t}", "void sendHtmlMail(String to, String subject, String content);", "public String getSLinkEmail() {\n return sLinkEmail;\n }", "public void tradeEmail(Trade model, Activity view) {\n String subject = \"SSCTE Trade Completed\" ;\n String body = model.getOwner().getName() + \" has accepted a trade with \" + model.getBorrower().getName() + \".\\n\" +\n \"+=================================+\\n\" +\n \" \" + model.getOwner().getName() + \"'s cards traded:\\n\";\n for (Card card : model.getOwnerList()) {\n body = body + \" [\" + card.getQuantity() + \"] \" + card.getName() + \"\\n\";\n }\n body = body +\n \"+=====================+\\n\" +\n \" \" + model.getBorrower().getName() + \"'s cards traded:\\n\";\n for (Card card : model.getBorrowList()) {\n body = body + \" [\" + card.getQuantity() + \"] \" + card.getName() + \"\\n\";\n }\n body = body +\n \"+=================================+\\n\\n\" +\n \" [Add some comments for continuing trade here]\";\n\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(\n \"mailto\",model.getOwner().getEmail() + \",\"+model.getBorrower().getEmail(), null));\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n emailIntent.putExtra(Intent.EXTRA_TEXT, body);\n view.startActivity(Intent.createChooser(emailIntent, \"Send email...\"));\n }", "public void emailResult(View view) {\n // Getting username only\n Intent myIntent = getIntent();\n String nameOfUser = myIntent.getStringExtra(\"EditTextValue\");\n\n String result = \"Name: \" + nameOfUser;\n result += \"\\nMy score: \" + score;\n\n // Create a new intent to send information to any mailing app\n Intent myResult = new Intent(Intent.ACTION_SENDTO);\n myResult.setData(Uri.parse(\"mailto:\"));\n myResult.putExtra(Intent.EXTRA_SUBJECT, \"Quiz result for \" + nameOfUser);\n myResult.putExtra(Intent.EXTRA_TEXT, result);\n if (myResult.resolveActivity(getPackageManager()) != null) {\n startActivity(myResult);\n }\n }", "void onLinkClicked(@Nullable ContentId itemId);", "public String getTextUrl(String text) {\n return StrUtils.createUrlFromString(text);\n }", "String getPlayerMail() {\r\n EditText editText = (EditText) findViewById(R.id.mail_edit_text_view);\r\n return editText.getText().toString();\r\n }", "public static String transformPlainText(String text) {\r\n\t\t// url auto-linking\r\n\t\ttext = text.replaceAll(\"((http|https)://[0-9A-Za-z-_=\\\\?\\\\.\\\\$#&/]*)\", \"<a href=\\\"$1\\\">$1</a>\");\r\n\t\tString html = \"<pre>\" + text + \"</pre>\";\r\n\t\treturn html;\r\n\t}", "public void sendMail(View view) {\n\n contentManager = new ContentManager(this);\n contentManager.sendEmail(helpBinding.mail.getText().toString(), new EmailListener() {\n @Override\n public void onSuccess(EmailResponse emailResponse) {\n showToast(emailResponse.getMessage());\n }\n\n @Override\n public void onFailed(String message, int responseCode) {\n showToast(message);\n }\n\n @Override\n public void startLoading(String requestId) {\n showToast(getString(R.string.sendEmail));\n }\n\n @Override\n public void endLoading(String requestId) {\n\n }\n });\n }", "public LinkDisplay()\n\t{\n\t\treturn;\n\t}", "public void readMore14(View view) {\n String readMore14 = \"Website: http://ologa.com/\";\n displayMessage14(readMore14);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ttry {\n\t\t\t\t\tString body = etBody.getText().toString();\n\t\t\t\t\tTApplicatioin.multiUserChat.sendMessage(body);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t}", "public LinkButton( String text) {\n\t\tsuper( text);\n\t\tinit();\n\t}", "public String getRelatedActivitiesListViewTxt() {\n\t\tString methodID = \"getRelatedActivitiesListViewTxt\";\n\t\t\n\t\tWebElement relActivitiesLisViewInfo = driver.findElement(By.xpath(\"//*[@id='activity_related']/ul\"));\n\t\t\n\t\treturn relActivitiesLisViewInfo.getText();\t\t\n\t}", "public String getViewText() {\n \t\treturn \"featured-partner-view_text_t\";\n \t}", "public void onClickAddLink(View v) {\n linkDefined = true;\n switch ((int) linkType.getSelectedItemId()) {\n case 0:\n linkTypeValue = \"link\";\n break;\n case 1:\n linkTypeValue = \"media\";\n break;\n default:\n break;\n }\n linkStringList += links.getText() + \"|\" + linkTypeValue + \";\";\n links.setText(\"\");\n }", "public String verifyLinkTextBytext(String object, String data) {\n\t\tlogger.debug(\"Verifying link Text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement(By.linkText(OR.getProperty(object)))).getText();\n\t\t\tString expected = data.trim();\n\t\t\tlogger.debug(actual + \"actual\");\n\t\t\tlogger.debug(expected + \"expec\");\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\";\n\n\t\t} \n\t\tcatch(TimeoutException ex){\n\t\t\treturn Constants.KEYWORD_FAIL + ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\" + e.getMessage();\n\n\t\t}\n\n\t}", "public static String getElementText(Element e) {\n\t\tString text = e.getText();\n\t\tfor (int i = 1; i < 10; i++) {\n\t\t\tString n = Integer.toString(i);\n\t\t\tString link = e.attributeValue(\"link\" + n);\n\t\t\tString url = e.attributeValue(\"url\" + n);\n\t\t\tString style = e.attributeValue(\"style\" + n);\n\n\t\t\tif (link == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ttext = applyMarkup(text, link, url, style);\n\t\t}\n\t\treturn text;\n\t}", "public void readMore24(View view) {\n String readMore24 = \"Website: http://www.smsgh.com\";\n displayMessage24(readMore24);\n }", "@Override\n public void onClick(View view) {\n final Intent intent = new Intent(context, ArticleViewActivity.class);\n intent.putExtra(\"link\", model.link);\n context.startActivity(intent);\n }", "public String verifyLinkText(String object, String data) {\n\t\tlogger.debug(\"Verifying link Text\");\n\t\ttry {\n\t\t\tString actual = wait.until(explicitWaitForElement((By.xpath(OR.getProperty(object))))).getText();\n\t\t\tString expected = data.trim();\n\t\t\tlogger.debug(\"act\" + actual);\n\t\t\tlogger.debug(\"expected\" + expected);\n\t\t\tif (actual.equals(expected))\n\t\t\t\treturn Constants.KEYWORD_PASS;\n\t\t\telse\n\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\";\n\n\t\t} \n\t\tcatch(TimeoutException ex){\n\t\t\treturn Constants.KEYWORD_FAIL + ex.getCause();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn Constants.KEYWORD_FAIL + \" -- Link text not verified\" + e.getMessage();\n\n\t\t}\n\n\t}", "@Override\n\tpublic void sendTextPlainEmail(Object object,Object...objects) {\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n Intent i = new Intent(Intent.ACTION_SEND);\n i.setType(\"message/rfc822\");\n i.putExtra(Intent.EXTRA_EMAIL , new String[]{\"\"});\n i.putExtra(Intent.EXTRA_SUBJECT, \"\");\n i.putExtra(Intent.EXTRA_TEXT , \"\");\n try {\n startActivity(Intent.createChooser(i, \"Envoyer un mail\"));\n } catch (android.content.ActivityNotFoundException ex) {\n Toast.makeText(MainActivity.this, \"There are no email clients installed.\", Toast.LENGTH_SHORT).show();\n }\n }", "public void onClick(View arg0) {\n\t\t\t\tString emailAddress = \"[email protected]\";\r\n\t\t\t\tString emailSubject = edittextEmailSubject.getText().toString();\r\n\t\t\t\tString emailText = edittextEmailText.getText().toString();\r\n\t\t\t\tString emailAddressList[] = {emailAddress};\r\n\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_SEND); \r\n\t\t\t\tintent.setType(\"plain/text\");\r\n\t\t\t\tintent.putExtra(Intent.EXTRA_EMAIL, emailAddressList); \r\n\t\t\t\tintent.putExtra(Intent.EXTRA_SUBJECT, emailSubject); \r\n\t\t\t\tintent.putExtra(Intent.EXTRA_TEXT, emailText); \r\n\t\t\t\tstartActivity(Intent.createChooser(intent, \"Choice App to send email:\"));\r\n\t\t\t}", "@Nullable\n @Override\n public String getPresentableText() {\n return url;\n }", "public String getLink(){\n return mLink;\n }", "public Link linkTo() {\n Label text = Label.of(name);\n URIObject target = FSURICodec.encode(this);\n return Link.textTarget(text, target);\n }", "public String getLink() {\r\n return link;\r\n }", "public void clickOnEmailLink1InFooter() {\n\t By element =By.xpath(\"//a[text()='CE at VIN' ]\");\n\t scrollIntoView(element);\n\t _normalWait(3000);\n\t waitAndClick(emailLink1InFooter);\n\t }", "public String getSourceText() {\n\t\treturn getSource().replaceAll(\"<a.*>(.*)</a>\", \"$1\");\n\t}", "private void startEmailActivity(String email, String subject, String text) {\n try {\n StringBuilder builder = new StringBuilder();\n builder.append(\"mailto:\");\n builder.append(email);\n\n Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(builder.toString()));\n intent.putExtra(Intent.EXTRA_SUBJECT, subject);\n intent.putExtra(Intent.EXTRA_TEXT, text);\n startActivity(intent);\n overridePendingTransition(R.anim.fade_in, R.anim.fade_out);\n } catch (ActivityNotFoundException e) {\n // can't start activity\n }\n }", "public void readMore13(View view) {\n String readMore13 = \"Founder: Harouna Ba\" + \"\\nWebsite: http://greenwashafrica.com/\";\n displayMessage13(readMore13);\n }", "public void readMore4(View view) {\n String readMore4 = \"Founder: Dr. William Mapham\" + \"\\nWebsite: http://www.vulamobile.com/\";\n displayMessage4(readMore4);\n }", "public String getLink() {\n return link;\n }", "public void generateEnquireLink();", "@Override\n public void onClick(View v) {\n String shareBody =item.title.toString()+\"\\n\\n\"+getResources().getString(R.string.item_show)+\"\\n\"+ Config.APP_IMAGES_URL.replace(\"uploads/\",\"share/\")+item.id;\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.app_name)));\n }", "public String getLink()\n {\n return link;\n }", "public void sendEmail(View view) {\n //deckare enauk addresses\n String[] addresses = {\n \"[email protected]\",\n \"[email protected]\"\n };\n String subject = \"Coffee Order\";\n Intent intent = new Intent(Intent.ACTION_SENDTO);\n intent.setData(Uri.parse(\"mailto:\")); // only email apps should handle this\n intent.putExtra(Intent.EXTRA_EMAIL, addresses);\n intent.putExtra(Intent.EXTRA_SUBJECT, subject);\n intent.putExtra(Intent.EXTRA_TEXT, message);\n// if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n// }\n }", "private void subscribeShortLink() {\n mProductDetailsViewModel.getShortLink().observe(this, shortLink -> {\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(TEXT_PLAIN);\n intent.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.app_name));\n intent.putExtra(Intent.EXTRA_TEXT, shortLink.toString());\n startActivity(intent);\n });\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\n\t\t\t\ti.setType(\"text/plain\");\n\t\t\t\ti.putExtra(Intent.EXTRA_SUBJECT, \"Sharing URL\");\n\t\t\t\ti.putExtra(Intent.EXTRA_TEXT, prodUrl);\n\t\t\t\tstartActivity(Intent.createChooser(i, \"Share URL\"));\n\t\t\t}", "public void readMore11(View view) {\n String readMore11 = \"Website: http://www.settic.sn/\";\n displayMessage11(readMore11);\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "public String getLink() {\n return link;\n }", "private void displayMessage4(String message) {\n TextView vulaMobileReadMore = (TextView) findViewById(R.id.read_more4);\n vulaMobileReadMore.setTextColor(Color.BLACK);\n vulaMobileReadMore.setText(message);\n vulaMobileReadMore.setGravity(Gravity.CENTER);\n }", "private void displayMessage12(String message) {\n TextView jokkoReadMore = (TextView) findViewById(R.id.read_more12);\n jokkoReadMore.setTextColor(Color.BLACK);\n jokkoReadMore.setText(message);\n jokkoReadMore.setGravity(Gravity.CENTER);\n }", "public String getPlainText();", "@Override\n public void onClick(View arg0) {\n Intent email = new Intent(Intent.ACTION_SEND);\n // Put essentials like email address, subject & body text\n email.putExtra(Intent.EXTRA_EMAIL,\n new String[]{\"[email protected]\"});\n email.putExtra(Intent.EXTRA_SUBJECT,\n \"Daily Grades\");\n //email.putExtra(Intent.EXTRA_TEXT, mydb.getDailyGrade().toString());\n // This MIME type indicates email\n email.setType(\"message/rfc822\");\n // createChooser shows user a list of app that can handle\n // this MIME type, which is, email\n startActivity(Intent.createChooser(email,\n \"Choose an Email client :\"));\n\n }", "public List<String> getAnchorText(){\n\t\treturn AnchorText;\n\t\t\n\t}", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\tfeedbackText = parent.getItemAtPosition(position).toString();\n\t\t\t}", "@Override\n\tpublic void showMailDialog() {\n\t\t\n\t}", "public void readMore18(View view) {\n String readMore18 = \"Website: http://www.wecyclers.com\";\n displayMessage18(readMore18);\n }", "public void SaveEmailAddress(View view) {\r\n\t\tEditText edit = (EditText)findViewById(R.id.EmailText);\r\n\t\tString email = edit.getText().toString();\t\t\r\n\t\tToast.makeText(this, email, Toast.LENGTH_LONG).show();\r\n\t}", "public String getText_click_My_Rewards_Link(){\r\n\t\treturn click_My_Rewards_Link.getText();\r\n\t}", "public void readMore19(View view) {\n String readMore19 = \"Website: https://www.ace.ng\";\n displayMessage19(readMore19);\n }", "public String getDisplayText() {\r\n\t\treturn Strings.isNOTNullOrEmpty(this.getText())\r\n\t\t\t\t\t\t? this.getText()\r\n\t\t\t\t\t\t: Strings.isNOTNullOrEmpty(this.getDescription())\r\n\t\t\t\t\t\t\t\t? this.getDescription()\r\n\t\t\t\t\t\t\t\t: this.getUrl() != null\r\n\t\t\t\t\t\t\t\t\t\t? this.getUrl().asString()\r\n\t\t\t\t\t\t\t\t\t\t: \"NO TEXT DEFINED\";\r\n\t}", "java.lang.String getView();" ]
[ "0.70264375", "0.67030835", "0.6285912", "0.6260847", "0.61289465", "0.61111003", "0.60709095", "0.59926915", "0.5972659", "0.58758044", "0.587346", "0.58125067", "0.57822067", "0.57599807", "0.5754433", "0.5746454", "0.5741268", "0.5729787", "0.5705055", "0.568666", "0.5681838", "0.5671342", "0.5670287", "0.5653612", "0.56203157", "0.5589559", "0.55311954", "0.5530123", "0.5520579", "0.5496971", "0.5490403", "0.5469716", "0.54677695", "0.54661095", "0.5461439", "0.545622", "0.54556805", "0.5455228", "0.545068", "0.5448553", "0.544816", "0.54445267", "0.5440256", "0.5422746", "0.5416487", "0.5411368", "0.53991044", "0.5385488", "0.5384015", "0.53823096", "0.5358064", "0.53540105", "0.5353273", "0.5347942", "0.5342732", "0.5332638", "0.5330908", "0.5322097", "0.5317318", "0.53164303", "0.531081", "0.5303741", "0.52999085", "0.5299333", "0.5280725", "0.5279231", "0.5277715", "0.5277241", "0.52731603", "0.52670604", "0.526664", "0.52449864", "0.5242587", "0.5236699", "0.5232868", "0.52271", "0.52256143", "0.52244306", "0.5221066", "0.5218141", "0.5205653", "0.51974666", "0.51971674", "0.5193809", "0.5193809", "0.5193809", "0.5193809", "0.5190146", "0.5185007", "0.51678294", "0.51653886", "0.5163581", "0.51622856", "0.51564664", "0.515443", "0.5149311", "0.51489496", "0.5146552", "0.51326764", "0.5132234" ]
0.7378907
0
/ Underneath text showing Individual or Household.
private TextView getIndividualHouseholdTextView(String content) { TextView textView = getTextView(content); TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT); layoutParams.weight = 1f; textView.setLayoutParams(layoutParams); textView.setPadding(160, 0, 0, 20); textView.setTextColor(getResources().getColor(R.color.ldstools_gray_light)); return textView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void display() {\r\n String kind;\r\n if (profit == true) {\r\n kind = \"profit\";\r\n }\r\n\r\n else kind = \"non-profit\";\r\n System.out.println(name + \" is a \" + kind + \" organization that has\" + \" \" + revenue + \" dollars in revenue\" );\r\n }", "@Override\n public String displayUponBeingSelected() {\n\n StringBuilder sb = new StringBuilder();\n sb.append(String.format(\"Information about '%s'\\n\", foodLabel));\n sb.append(String.format(\"Brand: %s\\n\", brand));\n sb.append(String.format(\"Category: %s\\n\", category));\n sb.append(String.format(\"Item type: %s\\n\", StringUtils.capitalize(categoryLabel)));\n sb.append(String.format(\"Measure(s): %s\\n\", StringUtils.join(measures, \", \")));\n sb.append(String.format(\"Food ID: %s\\n\", foodId));\n sb.append(String.format(\"Food URI: %s\\n\", foodUri));\n sb.append(String.format(\"Image link: %s\\n\", imageLink));\n sb.append(String.format(\"Yielding search term: %s\\n\", yieldingSearchTerm));\n sb.append(formatBasicNutrients());\n\n return sb.toString();\n\n }", "private String displayText() {\n // Location is unknown, tell the user as such.\n if (!storage.explored[numX][numY])\n return \" Unknown Location\";\n // Uses the specific cell to generate the name.\n if (numX == 8 && numY == 4)\n return \" Great Hollow Entrance\";\n if ((numY == 3 || numY == 2 || numY == 1) && (numX == 7 || numX == 8 || numX == 9))\n return \" Faron Woods\";\n if (numY == 0 && (numX == 7 || numX == 8))\n return \" Faron Woods\";\n if (numY == 4 && (numX == 7 || numX == 9))\n return \" Faron Woods\";\n if (numY == 5 && (numX == 7 || numX == 9))\n return \" Faron Woods Entrance\";\n if (numY == 5 && numX == 8)\n return \" Carthell Village Outskirts\";\n if ((numY == 7 || numY == 8) && numX == 7)\n return \" Carthell Village Outskirts\";\n if (numY == 6 && numX == 8)\n return \" Aragoth's Fountain\";\n if (numY == 6 && numX == 7)\n return \" Unoccupied House\";\n if (numY == 9 && numX == 11)\n return \" Carthell Library\";\n if (numY == 8 && numX == 10)\n return \" Carthell Marketplace\";\n if (numY == 7 && numX == 11)\n return \" Four Statue Square\";\n if (numY == 6 && (numX == 9 || numX == 10 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 7 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numY == 8 && (numX == 8 || numX == 9 || numX == 11 || numX == 12))\n return \" Carthell Village\";\n if (numY == 9 && (numX == 8 || numX == 9 || numX == 10 || numX == 12))\n return \" Carthell Village\";\n if (numX == 10 && numY == 3)\n return \" Fairy Queen's Fountain\";\n return \"\";\n }", "public void displayLable() {\n\t\tSystem.out.println(\"Name of Company :\"+name+ \" Address :\"+address);\r\n\t}", "String getDisplayText();", "public void display(){\r\n \r\n System.out.println(\"\\n\\nHigh Population City\");\r\n highPop.display();\r\n System.out.println(\"Capital City\");\r\n capital.display();\r\n System.out.print(\"State Name: \" + stateName + \"\\nState Population: \" + statePop + \"\\n------------\");\r\n }", "@Override\r\n\tpublic Town getDroghedaDescription() {\n\t\treturn new Town(\"A beautiful and unique place to visit for those with a love of art or history\");\r\n\t}", "public String showDetails() {\n\t\treturn \"Person Name is : \" + name + \"\\n\" + \"Person Address is : \" + address;\n\t}", "public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }", "@Override\n public String toString() {\n String isStudyAbroadTextRepresentation = (isStudyAbroad) ? \":study abroad\" : \"\";\n return String.format(\"%s:international%s\", super.toString(), isStudyAbroadTextRepresentation);\n }", "public Town getNavanDescription1() {\n\t\treturn new Town(\r\n\t\t\t\t\"Brú na Bóinne Visitor Centre, opened in 1997, is designed to present the archaeological heritage of the Boyne Valley, which includes the megalithic passage tombs\");\r\n\t}", "public void display () {\n super.display ();\n if (joined == true) {\n System.out.println(\"Staff name: \"+staffName+\n \"\\nSalary: \"+salary+\n \"\\nWorking hour: \"+workingHour+\n \"\\nJoining date: \"+joiningDate+\n \"\\nQualification: \"+qualification+\n \"\\nAppointed by: \"+appointedBy);\n }\n }", "public void displayBreakfastNutrition(Recipe breakfast){\n //calculate the nutritional information of the Recipe / Meal and return the information as a string\n String lineOne = calculateNutritionLineOne(breakfast);\n String lineTwo = calculateNutritionLineTwo(breakfast);\n //format and display the breakfast nutritional information text\n setUpNutritionLabel(breakfastNutritionOne, breakfastColor, lineOne);\n setUpNutritionLabel(breakfastNutritionTwo, breakfastColor, lineTwo);\n }", "public void Blueprint(){\r\n System.out.println(\"House features:\\nSquare Footage - \" + footage + \r\n \"\\nStories - \" + stories + \"\\nBedrooms - \" + bedrooms + \r\n \"\\nBathrooms - \" + bathrooms + \"\\n\");\r\n }", "private void createGrpPharmacyDetails() {\n\t\tgrpPharmacyDetails = new Group(getShell(), SWT.NONE);\n\t\tgrpPharmacyDetails.setText(\"Facility Details (shown on labels and reports)\");\n\t\tgrpPharmacyDetails.setBounds(new Rectangle(40, 250, 720, 320));\n\t\tgrpPharmacyDetails.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t}", "private static void displayOwner() {\n // Clear the screen\n clearScreen();\n\n // Display UI\n System.out.println(\"Welcome, Owner.\\n\\n\"\n + \"Choose an option:\\n\"\n + \"- (O)ccupancy - View occupancy of rooms\\n\"\n + \"- (D)ata [(c)ounts|(d)ays|(r)evenue] - View data on \"\n + \"counts, days, or revenue of each room\\n\"\n + \"- (S)tays - Browse list of reservations\\n\"\n + \"- (R)ooms - View list of rooms\\n\"\n + \"- (B)ack - Goes back to main menu\\n\");\n }", "public void showHouses() {\n System.out.println(\"-----Houses List-----\");\n System.out.println(\"No\\tOwner\\tPhone\\t\\tAddress\\t\\t\\t\\tRent\\tState\");\n houseService.listHouse();\n System.out.println(\"------List Done------\");\n }", "@Override\n public String displayUponMatchingResult() {\n\n if (brand == null || brand.equals(\"N/A\")) {\n return String.format(\"%s (%s)\", foodLabel, category);\n } else {\n return String.format(\"%s (%s by %s)\", foodLabel, category, brand);\n }\n\n }", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }", "@Override\r\n\tpublic Town getTraleeDescription() {\n\t\treturn new Town(\r\n\t\t\t\t\"The Museum collects, records, preserves, displays, and communicates material relating to the archaeological, historical and cultural heritage of County Kerry\");\r\n\t}", "@Override\r\n public void display() { //implements abstract display() method from Division.java\r\n System.out.println(\"Division Name: \" + getDivisionName());\r\n System.out.println(\"Account Number: \" + getAccountNumber());\r\n\r\n System.out.println(\"Country: \" + getCountry());\r\n System.out.println(\"Language Spoken: \" + getLanguageSpoken() + \"\\n\");\r\n\r\n }", "protected void DisplayVenueAndPitchNames()\n {\n TextView venueName = (TextView) findViewById(R.id.venueName);\n TextView pitchName = (TextView) findViewById(R.id.pitchName);\n venueName.setText(venueNameTitle);\n pitchName.setText(pitch.getPitchName());\n }", "public void showInfomation()\n\t{\n\t\tSystem.out.println(\"\\nMeal\"+\"\\n\\tnumber: \"+ number +\"\\n\\tdishName: \" + dishName +\"\\n\\tprice : \" + price+\"$\");\n\t}", "public void displayLunchNutrition(Recipe lunch){\n //calculate the nutritional information of the Recipe / Meal and return the information as a string\n String lineOne = calculateNutritionLineOne(lunch);\n String lineTwo = calculateNutritionLineTwo(lunch);\n //format and display the lunch nutritional information text\n setUpNutritionLabel(lunchNutritionOne, lunchColor, lineOne);\n setUpNutritionLabel(lunchNutritionTwo, lunchColor, lineTwo);\n }", "void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }", "@Override\n protected String[] getText() {\n return new String[] {\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.title\").getUnformattedText(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.owner\").getUnformattedText() + \" \" + owner.getPlayerName(),\n MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.price\").getUnformattedText() + price,\n restricted ? MyTown.instance.LOCAL.getLocalization(\"mytown.sign.sell.description.restricted\").getUnformattedText() : \"\"\n };\n }", "void showOrdersText();", "public void displayNames()\r\n {\r\n // ensure there is at least one Cat in the collection\r\n if (catCollection.size() > 0) {\r\n System.out.println(\"The current guests in \"+businessName);\r\n for (Cat eachCat : catCollection) {\r\n System.out.println(eachCat.getName());\r\n }\r\n }\r\n else {\r\n System.out.println(businessName + \" is empty!\");\r\n }\r\n }", "String getDisplay_description();", "public void display() {\n\t\tSystem.out.println(state+\" and its' capital is \"+capital);\n\t}", "public String displayText(){\n String displayText = \"\";\n displayText = \"Title: \" + getTitle() + \"\\nAuthor: \" + getAuthor() + \"\\nDescription: \" +getDescription();\n\n return displayText;\n\n }", "public static void displayTextCountries(){\n for (Country country : countryList){\n System.out.println(country.getCountryName() + \",\" + country.getIndicator(1) + \",\" + country.getIndicator(2) + \",\" + country.getIndicator(3) + \",\" + country.getIndicator(4) + \",\" + country.getIndicator(5) + \",\" + country.getIndicator(6) + \",\" + country.getIndicator(7) + \",\" + country.getIndicator(8));\n }\n }", "public String getDisplayText()\n {\n return (getName().length() > 0) ? getName() : \"Neuer Diätplan\";\n }", "public Town getDescription1() {\n\t\treturn new Town(\"Dublin Zoo, located in the beautiful Phoenix Park, is Ireland’s top family attraction attracting over one million visitors last year.\");\r\n\t}", "private void displayChampionshipDetails()\n {\n displayLine();\n System.out.println(\"########Formula 9131 Championship Details########\");\n displayLine();\n System.out.println(getDrivers().getChampionshipDetails());\n }", "public String displayData() {\n\t String s = \"\";\n\t s += super.toString() + \"\\nNumber of Rentable Units: \" + numRentableUnits + \"\\nAverage Unit Size: \" + avgUnitSize + \"\\nParking Available: \" + ((parkingAvailable == true) ? \"Y\" : \"N\");\n\t return s;\n\t}", "@Override\n public String toString()\n {\n return String.format(\"%-20s\\t\\t%-30s%-30s\",number, name, party);\n}", "public static void displaySubTitles()\r\n {\n }", "public void display() {\n System.out.println(\"Title: \" + this.title);\n System.out.println(\"Description: \" + this.des);\n System.out.println(\"Price Per Night: $\" + this.price);\n System.out.println(\"Max Guests: \" + this.guests);\n System.out.println(\"Length of stay: \" + this.days + \" days\");\n System.out.println(\"Total for stay: $\" + this.total);\n System.out.println(\"-----------------------------------\");\n }", "protected abstract String display();", "public Town getNavanDescription() {\n\t\treturn new Town(\r\n\t\t\t\t\"This small monastic site is well worth a stop. Striking round tower, very well preserved and very serene. \");\r\n\t}", "private void homeTitles() {\n String udata = \"B U I L D M A N\";\n SpannableString content = new SpannableString(udata);\n content.setSpan(new UnderlineSpan(), 0, udata.length(), 0);\n mBuilder_txv.setText(content);\n }", "public String toString(){\r\n\t\t// Number of households\r\n\t\tString output = \";\\\"\" + this.getTotalHouseholds() + \"\\\"\";\r\n\t\tIterator<Data> iter = this.data.values().iterator();\r\n\t\r\n\t\t// Compile the list of the makeup of each household.\r\n\t\twhile(iter.hasNext()){\r\n\t\t\toutput += \";\" + iter.next().toString();\r\n\t\t}\t// end while\r\n\t\r\n\t\treturn output;\r\n\t}", "public void show()\n {\n System.out.println( getFullName() + \", \" +\n String.format(Locale.ENGLISH, \"%.1f\", getAcademicPerformance()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getSocialActivity()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getCommunicability()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getInitiative()) + \", \" +\n String.format(Locale.ENGLISH,\"%.1f\", getOrganizationalAbilities())\n );\n }", "@Override public String toString() { return getDisplayedText(); }", "private void drawAgentInfo(Graphics2D graphics, int x, int y,\n int width, int height, Insets borders)\n {\n final int verticalSpaceBeforeText = 20;\n // Find the size of string in the font being used by the current\n // Graphics2D context.\n FontMetrics font = graphics.getFontMetrics();\n String agentInfo = null;\n int textWidth = 0;\n int textHeight = 0;\n int totalTextHeight = 0;\n int maxTextWidth = 0;\n\n if (GRID_LEGEND_HORIZONTAL) {\n agentInfo = \"Infected: \" + simulation.getNumInfectedHumans() +\n \" \" +\n \"Uninfected: \" + simulation.getNumUninfectedAgents() +\n \" \" +\n \"Infested: \" + simulation.getNumInfestedHosts() +\n \" \" +\n \"Uninfested: \" + simulation.getNumUninfestedHosts() +\n \" \" +\n \"Treated: \" + simulation.getNumTreatedAgents();\n \n Rectangle2D rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight = textHeight;\n maxTextWidth = textWidth;\n int startStringAt = (width - textWidth) / 2;\n\n // center text horizontally (max sure left side at least draws w/in\n // the viewport window -- i.e., x at least 0)\n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + verticalSpaceBeforeText);\n\n } else {\n agentInfo = \"Infected: \" + simulation.getNumInfectedHumans();\n Rectangle2D rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight = textHeight;\n maxTextWidth = textWidth;\n \n int startStringAt = (width - textWidth) / 2;\n\n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n \n agentInfo = \"Uninfected: \" + simulation.getNumUninfectedAgents();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n\n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n \n agentInfo = \"Infested: \" + simulation.getNumInfestedHosts();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n \n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n \n agentInfo = \"Uninfested: \" + simulation.getNumUninfestedHosts();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n \n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n agentInfo = \"Treated: \" + simulation.getNumTreatedAgents();\n rect = font.getStringBounds(agentInfo, graphics);\n\n textWidth = (int)(rect.getWidth());\n textHeight = (int)(rect.getHeight());\n totalTextHeight += textHeight;\n if (textWidth > maxTextWidth){\n maxTextWidth = textWidth;\n }\n //startStringAt = (width - textWidth) / 2;\n \n graphics.drawString(agentInfo, Math.max(x + startStringAt, 0), \n y + height + totalTextHeight + verticalSpaceBeforeText);\n }\n\n // Make sure the image plus text (which may be a new one loaded in) is\n // visible in the scroll pane. If this isn't somewhere, scrollbars \n // won't work in the main screen's encompassing JScrollPane.\n setPreferredSize(\n new Dimension(\n Math.max(width + borders.left + borders.right, maxTextWidth + 10),\n height + borders.top + borders.bottom \n + verticalSpaceBeforeText + totalTextHeight + 10));\n\n }", "public void printDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeight() + \" inches\");\n System.out.println(\"Weight: \" + (int) getWeight() + \" pounds\");\n\n // unary, binary, ternary(3)\n // ternary operator\n String travelMessage = canTravel ? \"Does travel\" : \"Does not travel\";\n System.out.println(travelMessage);\n\n String smokeMessage = smokes ? \"Does smoke\" : \"Does not smoke\";\n System.out.println(smokeMessage);\n\n // ternary operators can replace simple if-else statement\n // System.out.print(\"Does \");\n // if (!isCanTravel())\n // System.out.print(\"not \");\n // System.out.println(\"travel\");\n // System.out.print(\"Does \");\n // if (!isSmokes())\n // System.out.print(\"not \");\n // System.out.println(\"smoke\");\n }", "public void display()\r\n\t{\r\n\t\tSystem.out.println(\"Dollar: $\"+getAmount());\r\n\t\tSystem.out.println(\"Rupiah: Rp.\"+dollarTorp());\r\n\t}", "String getDisplay_name();", "public void displayValues()\n {\n \tSystem.out.println(\"The name of a bicycle is \"+name);\n \tSystem.out.println(\"The cost of a bicycle is \"+cost);\n \tSystem.out.println(\"The total numer of gears \"+gears);\n \t\n \t\n }", "public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }", "@Override\r\n\tpublic Town getDroghedaName() {\n\t\treturn new Town(\"Highlanes Gallery\");\r\n\t}", "public void displayseat() {\n\t\tString occ;\n\t\tif (this.isOccupied()) {\n\t\t\tocc = ANSI_RED+\"XX\"+ANSI_RESET+\"..\"+ANSI_RED+\"XX\"+ANSI_RESET;\n\t\t}\n\t\telse if (this.isReserved()){\n\t\t\tocc = ANSI_GREEN+\"ME\"+ANSI_RESET+\"..\"+ANSI_GREEN+\"ME\"+ANSI_RESET;\n\t\t}\n\t\telse {\n\t\t\tocc = ANSI_BLUE+\"__\"+ANSI_RESET+\"..\"+ANSI_BLUE+\"__\"+ANSI_RESET;\n\t\t}\n\t\tSystem.out.print(\"[\" + occ + \"]\");\n\t}", "public void display()\r\n {\r\n System.out.println(\"Description: \" +description);\r\n if(!customersName.equals(\"\")) {\r\n System.out.println(\"Customer Name: \" +customersName);\r\n }\r\n }", "@Override\n public String toString (){\n return \"Party name is \" + this.partyName + \" total cost is \" + this.totalCost;\n }", "public void display(){\r\n System.out.println(\"The Vacancy Number is : \" + getVacancyNumber());\r\n System.out.println(\"The Designation is : \" + getDesignation());\r\n System.out.println(\"The Job Type is : \" + getJobType());\r\n }", "@Override\n public String getDescription() {\n return \"Digital goods listing\";\n }", "public void display_round_start_text() {\n }", "private String addDisplay() {\n\t\t// One Parameter: DisplayName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|image:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}", "public Town getDroghedaDescription1() {\n\t\treturn new Town(\"The River Boyne (Irish: An Bhóinn or Abhainn na Bóinne) is a river in Leinster, Ireland, the course of which is about 112 kilometres\");\r\n\t}", "public String toString() {\r\n //Done:this\r\n String s = super.toString()+String.format(\"; Owner: %s\", getOwner());\r\n if (hasPool()) {\r\n s+=\"; has a pool\";\r\n }\r\n if (calcLotArea()-calcBuildingArea() > calcBuildingArea()) {\r\n s+=\"; has a big open space\";\r\n }\r\n return s;\r\n }", "public void display() {\r\n System.out.println(\"<<Person>>>\" + this); \r\n }", "public void displayModelDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeightInFeetAndInches());\n System.out.println(\"Weight: \" + getWeight() + \" pounds\");\n String travelMessage = canTravel ? \"yep\" : \"nope\";\n System.out.println(\"Travels: \" + travelMessage);\n String smokeMessage = smokes ? \"yep\" : \"nope\";\n System.out.println(\"Smokes\" + smokeMessage);\n System.out.println(\"Hourly rate: $\" + calculatePayDollarsPerHour());\n }", "public void print()\r\n {\n if (getOccupants().length != 0)\r\n {\r\n \t// will use the print method in the person class\r\n getOccupants()[0].print();\r\n }\r\n else if (this.explored)\r\n {\r\n System.out.print(\"[ H ]\");\r\n }\r\n else\r\n {\r\n System.out.print(\"[ ]\");\r\n }\r\n\r\n }", "public void visOversikt() {\r\n System.out.println(\"\\nPerson Oversikt:\");\r\n\r\n for(Person person : personListe.values()) {\r\n System.out.println(\"\\n\" + person);\r\n System.out.println(person + \" eier \" + (person.eierSize() + person.utlaantSize()) + \" DVD'er\");\r\n System.out.println(person + \" laaner ut \" + person.utlaantSize() + \" DVD'er\");\r\n System.out.println(person + \" laaner \" + person.laanerSize() + \" DVD'er\");\r\n }\r\n }", "private void displayOneLoan(ResultSet rs) throws SQLException {\n // Note the two different ways in which to retrieve the value of a column\n // Either by specifying the column number or by specifying the column name\n\n String name = rs.getString(1) + \" \" + rs.getString(2);\n\n System.out.printf(\"%s owns Loan # %s, in the amount of $%.2f\\n\",\n name, rs.getString(3), rs.getFloat(\"amount\"));\n }", "@Override\n public String toString(){\n return \"|Lege navn: \"+legeNavn+\" |Kon.ID: \"+konID+\"|\";\n }", "public String display(){\r\n\t\tif(this.AWD==true){\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" AWD\";\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn super.display()+\" \"+model+\" \"+this.price+\"$ SF: \"+this.safetyRating+\" RNG: \" +this.maxRange+\" 2WD\";\r\n\t\t}\r\n \r\n\t}", "public String toString() {\n\t\treturn super.toString() + \"\\nLevel: \" + getTitle(level) + edu.toString();\n\t}", "public void displayPrize()\n {\n System.out.println(name + \", Worth: $\" + worth + \n \", Cost: $\" + cost);\n }", "@Override\r\n public String toString() {\r\n String financialAidAsString = \"\";\r\n if (financialAid != 0)\r\n financialAidAsString = \":financial aid $\" + String.format(\"%,.2f\", financialAid);\r\n return super.toString() + \"resident\" + financialAidAsString;\r\n }", "public String printInfo() {\n\t\treturn \"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming Center Information\"+\r\n\t\t\t\t\"\\n=====================================================================\"+\r\n\t\t\t\t\"\\n Gaming center Name \\t= \" + centerName +\r\n\t\t\t\t\"\\n Location \\t\\t= \" + location + \r\n\t\t\t\t\"\\n Contact Number \\t= \" + contact+\r\n\t\t\t\t\"\\n Operating hour \\t= \"+ operatingHour+\r\n\t\t\t\t\"\\n Number of Employee \\t= \"+ noOfEmployee+ \" pax\";\r\n\t}", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "public String about(){\n\treturn \"This subclass of Protagonist, Archer, is one with slightly above average attack and defense, good for balanced gameplay.\";\n }", "public void showBookingsByName(JTextArea output, String firstName, String lastName)\r\n {\r\n output.setText(\"Bookinger på \" + firstName + \" \" + lastName + \"\\n\\n\");\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getGuest().getFirstname().equals(firstName) || \r\n booking.getGuest().getLastname().equals(lastName))\r\n {\r\n output.append(booking.toString() \r\n + \"\\n*******************************************************\\n\");\r\n }//End of if\r\n }// End of while\r\n }", "public void showInfomation()\n {\n\t System.out.println(\"\\nSide\"+\"\\n\\tnumber: \"+ super.getNumber() +\"\\n\\tdishName: \" + super.getDishName() + \"\\n\\tmaker: \"+maker+\"\\n\\tprice : \" + super.getPrice()+\"$\");\n }", "@Override\n\tpublic String getDisplayName() {\n\t\treturn getGivenName() + \" \" + getFamilyName();\n\t}", "@Override\r\n\tpublic String getShowDescribing() {\n\t\treturn \"所属乡镇:\"+ getSsxz().getName();\r\n\t}", "@Override\n public java.lang.String getLabelToDisplay() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.LABEL_TO_DISPLAY_);\n return (java.lang.String)retnValue;\n }", "private void displayTenantUnit(){\n Landlord landlord = dm.getLandlord();\n if (unit.getPhoto() != null) {\n GlideApp.with(this /* context */)\n .load(unit.getPhoto())\n .placeholder(R.drawable.unit_placeholder).transition(withCrossFade())\n .into(imgUnitPhoto);\n }\n colToolbar.setTitle(unit.getName());\n lblName.setText(unit.getName());\n lblAddress.setText(unit.getAddress().toString());\n lblType.setText(unit.getTypeString());\n String beds = Integer.toString(unit.getBeds());\n lblBeds.setText(beds);\n String baths = Double.toString(unit.getBaths());\n lblBaths.setText(baths);\n String sqft = Integer.toString(unit.getSquareFeet());\n lblSqFt.setText(sqft);\n String rent = Double.toString(unit.getRent());\n lblCost.setText(rent);\n String rentDay = Integer.toString(unit.getRentDueDay());\n lblRentDue.setText(rentDay);\n String year = Integer.toString(unit.getYearBuilt());\n lblYearBuilt.setText(year);\n String name = landlord.getFirstName() + \" \" + landlord.getLastName();\n lblUnitLandlord.setText(name);\n }", "public String toDisplay(){\n\t\treturn String.format(\"%s | %c | %.2f | %.2f\",name ,gender ,taxableIncome ,taxAmount);\n\t}", "public void showAccommodatedGuests(JTextArea output)\r\n {\r\n output.setText(\"Innlosjerte gjester\\n\");\r\n \r\n String company = \"\\n\\nFirmagjester\\n\";\r\n String noCompany = \"\\n\\nPrivatgjester\\n\";\r\n \r\n Iterator<Booking> iter = bookings.iterator();\r\n \r\n while(iter.hasNext())\r\n {\r\n Booking booking = iter.next();\r\n \r\n if(booking.getCheckedIn() && !booking.getCheckedOut())\r\n {\r\n Person guest = booking.getGuest();\r\n \r\n if(guest instanceof PrivateGuest)\r\n noCompany += \" \" + guest.getFirstname() + \" \" + guest.getLastname() + \r\n \"\\t\\tBookingnr: \\t\" + booking.getBookingNr() + \"\\n\";\r\n else if(guest instanceof CompanyGuest)\r\n {\r\n CompanyGuest companyGuest = (CompanyGuest)guest;\r\n company += \" \" + companyGuest.getCompanyName() + \" ved \" + \r\n companyGuest.getFirstname() + \" \" + \r\n companyGuest.getLastname() + \"\\tBookingnr: \\t\" + booking.getBookingNr() \r\n + \"\\n\";\r\n }\r\n }// End of if\r\n }// End of while\r\n \r\n output.append(noCompany);\r\n output.append(company);\r\n }", "public void displayDinnerNutrition(Recipe dinner){\n //calculate the nutritional information of the Recipe / Meal and return the information as a string\n String lineOne = calculateNutritionLineOne(dinner);\n String lineTwo = calculateNutritionLineTwo(dinner);\n //format and display the lunch nutritional information text\n setUpNutritionLabel(dinnerNutritionOne, dinnerColor, lineOne);\n setUpNutritionLabel(dinnerNutritionTwo, dinnerColor, lineTwo);\n }", "public Town getDescription() {\n\t\treturn new Town(\"A visit will teach you everything you ever wanted to know about this world famous beer. \");\r\n\t}", "protected void banner(String name) {\n System.out.println(\"---------: \");\n System.out.println(String.format(\"%s: \", name));\n System.out.println(\"---------: \");\n }", "public String getDisplay() {\n\t\tString output;\n\t\tStringBuilder tempout = new StringBuilder();\n\t\tfor(Entry<String, ParkingSpace> entry:hashmap.entrySet()) {\n\t\t\tString key = entry.getKey();\n\t\t\tVehicle temp = entry.getValue().getVehicle();\n\t\t\ttempout.append(\"Plate# \" + key + \" \" + temp.toString() + \"\\n\");\n\t\t}\n\t\toutput = tempout.toString();\n\t\treturn output;\n\t}", "public static void nameAndAddress () {\n\t\tSystem.out.println(\"Andrew Meiling\");\n\t\tSystem.out.println(\"224 South Dennis Ave\");\n\t\tSystem.out.println(\"Republic, MO 65738\");\n\t}", "void display() {\n System.out.println(\"============================================================================================\");\n System.out.println(\"Name of the book:: \" + Bname);\n System.out.println(\"Price of the book:: Rs \" + price);\n System.out.println(\"============================================================================================\");\n }", "public String getDisplayText() {\n\n\t\tString s = FindAndReplace.replace(this.getDescription(), \"<br>\", \"\\n\", true);\n\t\treturn removeEntityRefs(s);\n\t}", "private void displayGameHeader()\n {\n System.out.println(\"########Welcome to Formula 9131 Championship########\");\n }", "public String toString () {\r\n\t\t\r\n\t\treturn \"Title: \"+this.title +\", Company: \"+company+\", Annual Salary: \"+annualSalary;\r\n\t}", "protected void drawTitle(Graphics2D g2) {\n //int xloc = leftDisplay + (rightDisplay - leftDisplay)*xCenter/getWidth();\n FontRenderContext frc = g2.getFontRenderContext();\n Font font = new Font(\"Arial\", Font.BOLD, 9);\n String str = dataSet.getGeneRange().getName() + \" Chr\" + dataSet.getChromosome();\n g2.setColor(Singleton.getUserPreferences().getThumbnailTextColor());\n TextLayout tl = new TextLayout(str, font, frc);\n int x = 2;\n int y = 10;\n tl.draw(g2, x, y);\n \n /*for (Model model : viewData.getModels()) {\n System.out.println(\"Rendering with model \" + model.toString() + \"\\thaving #snps: \" + snps.size());*/\n String modelStr = viewData.getModels().get(0).toString();\n //String modelStr = dataSet.getModels().get(0).toString();\n TextLayout modelTl = new TextLayout(modelStr, font, frc);\n int INTER_TITLE_BREAK = 20;\n int modelX = x;\n int modelY = 20;\n if(tl.getBounds().getWidth() + modelTl.getBounds().getWidth() + INTER_TITLE_BREAK < getWidth()) {\n modelY = y;\n modelX = x + (int) Math.round(tl.getBounds().getWidth()) + INTER_TITLE_BREAK;\n }\n modelTl.draw(g2, modelX, modelY);\n }", "private void listToString() {\n textList.clear();\n for (int x = 0; x < party.size(); x++) {\n Agent thisAgent = party.getMember(x);\n Statistics thisAgentStats = thisAgent.getStats();\n textList.add(thisAgent.getName());\n textList.add(\"HP:\" + thisAgentStats.getCurrentHP() + \"/\" + thisAgentStats.getMaxHP() + \" MP:\" + thisAgentStats.getCurrentMP() + \"/\" + thisAgentStats.getMaxMP());\n }\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "public String getDisplayName();", "public String getDisplayName();", "public String getDisplayName();", "public String getDisplayName();", "public String toString() {\n // returns information about property\n if (owner != null) {\n return owner.getName()+\",\"+numberHouses;\n }else{\n return \"NULL\";\n }\n }" ]
[ "0.65321374", "0.621902", "0.6141568", "0.61067307", "0.5973308", "0.59082425", "0.5871989", "0.5866203", "0.58299506", "0.5798294", "0.5763763", "0.57563615", "0.5752289", "0.57211745", "0.57039535", "0.56929076", "0.56723136", "0.5661329", "0.5659291", "0.5650448", "0.56461024", "0.56450635", "0.56433994", "0.563183", "0.5631414", "0.560895", "0.56074053", "0.5586098", "0.5579092", "0.5550294", "0.5539787", "0.5530509", "0.5530263", "0.5513371", "0.5478601", "0.5475375", "0.5469591", "0.5468757", "0.5458751", "0.5457352", "0.5452404", "0.54468066", "0.54442954", "0.54279965", "0.542133", "0.54199696", "0.541975", "0.54033834", "0.5397896", "0.5391163", "0.5384738", "0.5372173", "0.5369736", "0.53631014", "0.5361213", "0.53540134", "0.53491604", "0.5347651", "0.5345362", "0.5338745", "0.53375465", "0.53121114", "0.53034717", "0.5302944", "0.53005487", "0.52960575", "0.5289155", "0.5282935", "0.52823484", "0.5273261", "0.52732086", "0.52693474", "0.5263962", "0.52588385", "0.52552193", "0.5251685", "0.5248427", "0.52415144", "0.5240652", "0.524038", "0.52402365", "0.5239028", "0.52366066", "0.52340955", "0.5234017", "0.5231688", "0.5224951", "0.52231985", "0.52218807", "0.5220937", "0.5217506", "0.5216054", "0.52129966", "0.52090824", "0.52072823", "0.5206195", "0.5206195", "0.5206195", "0.5206195", "0.52038157" ]
0.67227304
0
/ Generic TextView creation.
private TextView getTextView(String content) { TextView textView = new TextView(this.getContext()); textView.setEms(30); textView.setTextColor(getResources().getColor(R.color.ldstools_black)); if(content != null && !content.isEmpty()) { textView.setText(content); } return textView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract TextView getTextView();", "Text createText();", "@Override\n\tpublic View getView(Context context, ViewGroup parent) {\n\t\ttv = new TextView(context);\n\t\treturn tv;\n\t}", "public CustomTextView(Context context) {\n\t\tsuper(context);\n\t}", "public TextWithLabel(Context context, AttributeSet attrs)\r\n {\r\n \r\n // Call the super class constructor to create a basic Textbox: \r\n super(context, attrs);\r\n \r\n // Generate new TextView for the label: \r\n labelView = new TextView(context, attrs);\r\n \r\n // Get custom attributes from XML file:\r\n getCustomAttributes(attrs);\r\n\r\n \r\n /**** Set some attributes: **********************\r\n * Could add more attributes?\r\n ************************************************/\r\n labelView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PT, labelSize);\r\n labelView.setGravity( android.view.Gravity.RIGHT );\r\n \r\n /**** Set text colour... ************************/\r\n //Resources res = getResources();\r\n //int color = res.getColor(R.color.normal_text);\r\n //labelView.setTextColor(color);\r\n //itemView.setTextColor(color);\r\n \r\n // Add the new text boxes to this layout: \r\n addView(labelView);\r\n \r\n }", "public TextView a(Context context) {\n TextView textView = new TextView(context);\n textView.setGravity(17);\n textView.setTextSize(2, 12.0f);\n textView.setTypeface(Typeface.DEFAULT_BOLD);\n textView.setLayoutParams(new LayoutParams(-2, -2));\n TypedValue typedValue = new TypedValue();\n getContext().getTheme().resolveAttribute(16843534, typedValue, true);\n textView.setBackgroundResource(typedValue.resourceId);\n textView.setAllCaps(true);\n int i = (int) (16.0f * getResources().getDisplayMetrics().density);\n textView.setPadding(i, i, i, i);\n return textView;\n }", "public RTextView(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit(context,attrs);\n\t}", "public View makeView() {\r\n TextView myText = new TextView(RandomAlphabetActivity.this);\r\n myText.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.FILL_PARENT));\r\n\r\n myText.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);\r\n myText.setTextSize(200);\r\n myText.setTypeface(null, Typeface.BOLD);\r\n\r\n myText.setTextColor(Color.WHITE);\r\n return myText;\r\n }", "public TextView getTextView(String text,int textsize){\n TextView textView=new TextView(context);\n textView.setTextColor(Color.parseColor(\"#000000\"));\n textView.setTextSize(textsize);\n textView.setGravity(Gravity.CENTER);\n textView.setText(text);\n textView.setLayoutParams(layoutParams);\n return textView;\n }", "public RTextView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(context,attrs);\n\t}", "public MTEditText(Context context) {\n super(context);\n init(context, null, 0);\n }", "@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}", "private TextView m25227b(Context context) {\n TextView textView = new TextView(context);\n textView.setLayoutParams(new LayoutParams(-1, -1));\n textView.setGravity(17);\n textView.setText(this.options.getMessageText());\n textView.setTextColor(this.options.getMessageColor());\n textView.setTextSize(2, 18.0f);\n return textView;\n }", "public InnerTextView(Context context) {\n\t super(context);\n\t \n\t\t}", "public CustomTextView(Context context, AttributeSet attributeSet, int defStyleAttr) {\n\t\tsuper(context, attributeSet, defStyleAttr);\n\t}", "@SuppressLint(\"SetTextI18n\")\n @Override\n public Object instantiateItem(ViewGroup container, int position) {\n TextView tv = new TextView(getContext());\n tv.setBackgroundColor(Colors[position]);\n tv.setTextColor(Color.WHITE);\n tv.setText(\"\"+position);\n container.addView(tv);\n return tv;\n }", "public CustomTextView(Context context, AttributeSet attributeSet) {\n\t\tsuper(context, attributeSet);\n\t}", "private TextView createDateTextView(String strDate) {\n TextView dateTv = new TextView(this);\n dateTv.append(strDate);\n dateTv.setTextSize(14);\n dateTv.setEms(10);\n dateTv.setTextColor(Color.parseColor(\"#aaaaaa\"));\n\n return dateTv;\n }", "public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }", "protected View ShowWord() {\n\t\tTextView btn=new TextView(this);\n\t\tbtn.setId(index);\n\t\tbtn.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n//\t\tbtn.setText(\"text not sent here!!!!! \"); //這一行是可以顯示文字的\n\t\treturn btn;\n\t}", "private void initCreateAccountTextView() {\n\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewCreateAccount);\n // El que hizo esto es un Dios\n textViewCreateAccount.setText(fromHtml(\"<font color='#000'>¿No tienes cuenta? </font><font color='#6dbaf8'>Registrate</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }\n });\n }", "private RelativeLayout m25221a(Context context) {\n RelativeLayout relativeLayout = new RelativeLayout(context);\n relativeLayout.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));\n View textView = new TextView(context);\n textView.setPadding(0, SizeUtil.dp5, 0, SizeUtil.dp5);\n textView.setGravity(17);\n textView.setText(this.options.getTitle());\n textView.setTextColor(this.options.getTitleColor());\n textView.setTextSize(2, 20.0f);\n textView.setTypeface(null, 1);\n context = new LayoutParams(-1, -2);\n context.addRule(14, -1);\n context.addRule(15, -1);\n textView.setLayoutParams(context);\n relativeLayout.addView(textView, textView.getLayoutParams());\n return relativeLayout;\n }", "public TextView TvCreateRelative(int x, int y, int w, int h) {\n TextView tv = new TextView(this);\n setViewPos(tv, x, y, w, h);\n tv.setTextColor(-1);\n return tv;\n }", "@Override\n public ViewHolder onCreateViewHolder(ViewGroup arg0, int arg1) {\n\n return new ViewHolder(new TextView(RecyclerViewActivity.this)) {\n\n };\n }", "TextView getDescriptionView();", "private TextView m25232e(Context context) {\n View textView = new TextView(context);\n context = new LayoutParams(-2, -2);\n context.addRule(12, -1);\n context.addRule(14, -1);\n context.setMargins(0, 0, 0, SizeUtil.dp5);\n textView.setPadding(SizeUtil.dp20, SizeUtil.dp5, SizeUtil.dp20, SizeUtil.dp5);\n textView.setLayoutParams(context);\n textView.setText(this.options.getAcceptButtonText());\n textView.setTextColor(this.options.getAcceptButtonTextColor());\n textView.setTypeface(null, 1);\n BitmapUtil.stateBackgroundDarkerByPercentage(textView, this.options.getAcceptButtonBackgroundColor(), 30);\n textView.setTextSize(2, 18.0f);\n textView.setOnClickListener(new C57457(this));\n return textView;\n }", "private void initCreateAccountTextView() {\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewLogin);\n textViewCreateAccount.setText(fromHtml(\"<font color='#000000'>Sudah Memiliki Akun ? </font><font color='#03A9F4'>Login</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(daftar.this, activity_login.class);\n startActivity(intent);\n }\n });\n }", "public Text()\n {\n super();\n initialize();\n }", "private TextView createViewByTitle(String title, String name) {\n TextView targetTitleView = new TextView(this);\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n params.topMargin = (int) (10 / getResources().getDisplayMetrics().density);\n targetTitleView.setLayoutParams(params);\n targetTitleView.setText(capitalize(title));\n targetTitleView.setHint(name);\n targetTitleView.setTextColor(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary));\n return targetTitleView;\n }", "public BubbleTextView(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}", "@Function Text createTextNode(String data);", "protected IControlCreator getTextControlCreator() {\r\n\t\treturn new IControlCreator() {\r\n\r\n\t\t\tpublic Control createControl(Composite parent, int style) {\r\n\t\t\t\tText retVal = getWidgetFactory().createText(parent, \"\", style/* |mutabilityStyle */); //$NON-NLS-1$\r\n\t\t\t\t//\t\t\t\t\tretVal.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\t\t\t\treturn retVal;\r\n\t\t\t}\r\n\t\t};\r\n\t}", "public TextView mo30762a(Context context, String str, int i, int i2) {\n TextView textView = new TextView(context);\n textView.setTextColor(ViewCompat.MEASURED_STATE_MASK);\n textView.setGravity(i2 | 1);\n textView.setTextSize(0, (float) i);\n textView.setText(str);\n textView.setBackgroundColor(-1);\n return textView;\n }", "public Text createTextNode(String data, Element parent);", "private void createText() {\n Texture texture = new Texture(Gdx.files.internal(\"Text/item.png\"));\n texture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n TextureRegion region = new TextureRegion(texture);\n display = new BitmapFont(Gdx.files.internal(\"Text/item.fnt\"), region, false);\n display.setUseIntegerPositions(false);\n display.setColor(Color.BLACK);\n }", "public TimeView createView(Context context, boolean isCenterView)\n\t{\n\t\treturn new TimeTextView(context, isCenterView, 25);\n\t}", "ElementText createElementText();", "public Text(double x, double y, String text, TextStyle style)\n {\n super(x, y, text);\n this.style = style;\n initialize();\n }", "public MyText(String text, double x1, double y2, Color color, int fontSize) {\n\t\tthis.x1 = x1;\n\t\tthis.y2 = y2;\n\t\tthis.text = text;\n\t\tthis.color = color;\n\t\tthis.fontSize = fontSize;\n\t}", "public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }", "@Override\r\n\tpublic void setupView() {\n\t\ttv = (TextView) findViewById(R.id.mjson_layout_text);\r\n\t}", "protected TextView textView( final int childViewIndex )\n {\n return updater.textView( childViewIndex );\n }", "public BadgeTextView(Context context, AttributeSet attrs, int defStyleAttr) {\n super(context, attrs, defStyleAttr);\n\n init();\n }", "private InnerTextView newAItem() {\n\t\tInnerTextView newTextView = null;\n\t\ttry {\n\t\t\tnewTextView = new InnerTextView(getContext());\n\t\t\tnewTextView.setMinWidth(MIN_TEXT_WIDTH);\n\t\t\tnewTextView.setSingleLine(true);\n\t\t\tnewTextView.setEllipsize(TextUtils.TruncateAt.valueOf(\"END\"));\n\t\t\tnewTextView.setTextSize(mItemFontSize);\n\t\t\tnewTextView.getPaint().setTextSize(mItemFontSize);\n\t\t\tnewTextView.setTextColor(mItemFontColor);\n\t\t\tnewTextView.setGravity(Gravity.CENTER);\n\t\t\tnewTextView.setBackgroundResource(R.drawable.bg_new_message_to_bg);\n\t\t\t\n\t\t\tif (BOLDSTYLE.equals(mItemStyle)) {\n\t\t\t\tnewTextView.getPaint().setFakeBoldText(true);\n\t\t\t}\n\t\t\tnewTextView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (!mInnerEditText.hasFocus()) {\n\t\t\t\t\t\tmInnerEditText.requestFocus();\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tInnerTextView textItem = (InnerTextView)v;\n\t\t\t\t\tif(textItem != null && textItem.isBubbleSelected() \n\t\t\t\t\t\t\t&& DeviceUtils.isAboveAndroidOS4_4()){\n\t\t\t\t\t\tonTextItemDelete();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\t} \n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\tshowKeyboard();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch(Exception err) {\n\t\t\tnewTextView = null;\n\t\t}\n\t\t\n\t\treturn newTextView;\n\t}", "java.lang.String getView();", "private void IsiTabel(String text) {\n IsiTabel = new TextView(getActivity());\n IsiTabel.setText(text);\n IsiTabel.setTextColor(getResources().getColor(R.color.fontTabel));\n IsiTabel.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));\n IsiTabel.setBackground(getResources().getDrawable(R.drawable.background_tabel));\n TR.addView(IsiTabel);\n }", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "public Text(String text)\n {\n super(text);\n initialize();\n }", "private static View createTabView(final Context context, final String text) {\r\n\t\tView view;\r\n\t\tview = LayoutInflater.from(context).inflate(\r\n\t\t\t\tR.layout.generic_tabs_custom_layout, null);\r\n\t\tTextView tv = (TextView) view.findViewById(R.id.tabsText);\r\n\t\ttv.setText(text);\r\n\t\treturn view;\r\n\t}", "public void onTextViewCreated(TextView textView) {\n textView.setSingleLine(true);\n textView.setMaxLines(1);\n }", "private void createTextPanel() {\r\n Composite textPanel = new Composite(this, SWT.NONE);\r\n textPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n textPanel.setLayout(new GridLayout(2, true));\r\n\r\n createLabel(textPanel, \"Name\");\r\n _nameText = new Text(textPanel, SWT.BORDER | SWT.RIGHT);\r\n _nameText.setLayoutData(new GridData(SWT.FILL, SWT.HORIZONTAL, true, true));\r\n _nameText.addKeyListener(new TextKeyListener());\r\n\r\n createLabel(textPanel, \"Group\");\r\n _numberGroupText = new Text(textPanel, SWT.BORDER | SWT.RIGHT);\r\n _numberGroupText.setLayoutData(new GridData(SWT.FILL, SWT.HORIZONTAL, true, true));\r\n _numberGroupText.addKeyListener(new TextKeyListener());\r\n\r\n createCheckButtonPanel(textPanel);\r\n }", "public TextButton (String text)\n { \n this(text, 20); \n }", "public final TText addText(final String text, final int x, final int y,\n final int width, final int height) {\n\n return new TText(this, text, x, y, width, height, \"ttext\");\n }", "public Text(double x, double y, String text)\n {\n super(x, y, text);\n initialize();\n }", "TextView getTitleView();", "public void TextView_Config(){\n textviewBaro=(TextView) findViewById(R.id.textviewGravity);\n textviewAcceleration=(TextView) findViewById(R.id.textviewAcceleration);\n textviewGyro=(TextView) findViewById(R.id.textviewGyro);\n display=(TextView)findViewById(R.id.textView1);\n }", "public TextController createText(ControllerCore genCode) {\n\t\ttextTXT = new TextController(\"text\", getParentController(controlItemSCSCLC), genCode) {\n\t\t\t@Override\n\t\t\tpublic void initialize() {\n\t\t\t\tsetLinkedController(text$1LBL);\n\t\t\t\tsetProperty(\"text\");\n\t\t\t\tsuper.initialize();\n\t\t\t}\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tif (null != fieldBindManager)\n\t\t\t\t\t\tfieldBindManager = new XjcFieldBindingManager(this);\n\t\t\t\t\tgetControl().addFocusListener(new XjcFocusListener(this));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn textTXT;\n\t}", "Builder addText(Text value);", "public Text(double x, double y, VDMColor c, int thickness,\n String text, boolean bold, String font) {\n super(x, y, c, thickness);\n\n _b = bold;\n _t = text;\n _f = font;\n }", "public Text(String text, TextStyle style)\n {\n super(text);\n this.style = style;\n initialize();\n }", "private TextView getPhoneTextView(String content) {\n TextView textView = getTextView(content);\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 20f;\n layoutParams.gravity = Gravity.CENTER_VERTICAL;\n Linkify.addLinks(textView, Linkify.PHONE_NUMBERS);\n textView.setLayoutParams(layoutParams);\n textView.setPadding(45, 30, 0, 0);\n textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.phone_blue, 0, 0, 0);\n textView.setCompoundDrawablePadding(30);\n return textView;\n }", "private Text createText(String text, int offset) {\n\t\tText res = new Text(text);\n\t\tres.setFont(new Font(\"Minecraftia\", 60));\n\t\tres.setFill(Color.YELLOW);\n\t\tres.getTransforms().add(new Rotate(-50, 300, 200, 20, Rotate.X_AXIS));\n\t\tres.setX(canvas.getWidth() / 2);\n\t\tres.setY(canvas.getHeight() / 2 + offset);\n\t\tres.setId(\"handCursor\");\n\t\tres.setOnMouseEntered(e -> {\n\t\t\tres.setText(\"> \" + res.getText() + \" <\");\n\t\t});\n\t\tres.setOnMouseExited(e -> {\n\t\t\tres.setText(res.getText().replaceAll(\"[<> ]\", \"\"));\n\t\t});\n\t\treturn res;\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n TextView textView;\n if (convertView == null) {\n // If it's not recycled, initialize some attributes\n textView = new TextView(mContext);\n textView.setTextSize(convertPixelsToDp(height / 30, mContext));\n\n textView.setTextColor(ContextCompat.getColor(mContext, R.color.colorBodyText));\n\n textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);\n\n textView.setPadding(10, 8, 10, 8);\n } else {\n textView = (TextView) convertView;\n textView.setTextColor(ContextCompat.getColor(mContext, R.color.colorBodyText));\n }\n\n textView.setText(texts[position]);\n return textView;\n }", "public CustomTextInputLayout(Context context, AttributeSet attrs, int defStyleAttr) {\n super(context, attrs, defStyleAttr);\n }", "public interface ITextView extends AnimatorView {\n\n\n /**\n * Gives the user a copy of the file output as a string.\n *\n * @return file output as a string\n */\n String getFileOutput();\n\n\n}", "@Override\r\n public View getView(int position, View convertView, ViewGroup parent) {\r\n TextView textview;\r\n\r\n if (convertView == null) {\r\n textview = mTextViews.get(position);\r\n } else {\r\n textview = (TextView) convertView;\r\n }\r\n\r\n android.widget.AbsListView.LayoutParams params =\r\n new android.widget.AbsListView.LayoutParams(mColumnWidth, mColumnHeight);\r\n textview.setLayoutParams(params);\r\n\r\n return textview;\r\n }", "protected TextView textView( final View parentView, final int childViewIndex )\n {\n return updater.textView( parentView, childViewIndex );\n }", "public Text(double x, double y, String text, TextStyle style, Accent accent)\n {\n super(x, y, text);\n this.style = style;\n this.accent = accent;\n initialize();\n }", "private void setupTextView() {\n painterTextViewMoves = findViewById(R.id.painterTextView1);\n painterTextViewTime = findViewById(R.id.painterTextView2);\n painterTextViewPoints = findViewById(R.id.painterTextView3);\n painterTextViewInstructions = findViewById(R.id.painterInstructionsView);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) \n {\n TextView text = (TextView)super.getView(position, convertView, parent);\n text.setTypeface(MainActivity.pixelFont);\n\t\treturn text;\n }", "private TextView createSeatTextView(String strDate, List<String> seatNo) {\n TextView seatsTv = new TextView(this);\n seatsTv.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);\n seatsTv.setTextAlignment(View.TEXT_ALIGNMENT_TEXT_END);\n seatsTv.setTextSize(14);\n seatsTv.setEms(10);\n seatsTv.setTextColor(Color.parseColor(\"#aaaaaa\"));\n seatsTv.setPadding(0, 0, 10, 0);\n\n String seat = \"\";\n for(String s : seatNo) {\n seat += s + \" \";\n }\n\n seat = seat.trim();\n seat = seat.replace(\" \", \",\");\n\n seatsTv.append(seat);\n\n return seatsTv;\n }", "public TextBox(String id, String text, Vector position, Vector size, Font font, boolean editable, int maxLength) {\n\t\tsuper(id, -5, position);\n\t\t\n\t\tthis.text = text;\n\t\tthis.size = new Vector(size);\n\t\tthis.font = font;\n\t\tthis.editable = editable;\n\t\tthis.typing = false;\n\t\tthis.maxLength = maxLength;\n\t\tthis.cursorTimer = System.currentTimeMillis();\n\t\tthis.cursorShow = true;\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n TextView tv = new TextView(this);\n tv.setText(\"请在拨号键盘输入*#*#0123#*#*, 你会有发现哦~\");\n tv.setTextSize(30);\n setContentView(tv);\n }", "public void createToolTip(View view, Tooltip.Gravity gravity, String text){\n Tooltip.make(this,\n new Tooltip.Builder(101)\n .anchor(view, gravity)\n .closePolicy(new Tooltip.ClosePolicy()\n .insidePolicy(true, false)\n .outsidePolicy(true, false), 3000)\n .activateDelay(800)\n .showDelay(300)\n .text(text)\n .maxWidth(700)\n .withArrow(true)\n .withOverlay(true)\n .withStyleId(R.style.ToolTipLayoutCustomStyle)\n .floatingAnimation(Tooltip.AnimationBuilder.DEFAULT)\n .build()\n ).show();\n }", "public CustomTextInputLayout(Context context, AttributeSet attrs) {\n super(context, attrs);\n }", "@Override\n\tpublic final Text createTextNode(String data) {\n\t\tTextRemote remote = createTextNode0(data);\n\t\treturn LocalDom.nodeFor(remote);\n\t}", "public void createToolTip(View view, Tooltip.Gravity gravity, String text){\n Tooltip.make(getContext(),\n new Tooltip.Builder(101)\n .anchor(view, gravity)\n .closePolicy(new Tooltip.ClosePolicy()\n .insidePolicy(true, false)\n .outsidePolicy(true, false), 3000)\n .activateDelay(800)\n .showDelay(300)\n .text(text)\n .maxWidth(700)\n .withArrow(true)\n .withOverlay(true)\n .withStyleId(R.style.ToolTipLayoutCustomStyle)\n .floatingAnimation(Tooltip.AnimationBuilder.DEFAULT)\n .build()\n ).show();\n }", "@Override\n\tpublic ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n\t\tContext ctx = parent.getContext();\n\t\tTextView view = new TextView(ctx);\n\t\tint standardPad = (int) ctx.getResources().getDimension(R.dimen.padding_standard);\n\t\tint tinyPad = (int) ctx.getResources().getDimension(R.dimen.padding_tiny);\n\t\tview.setPadding(standardPad, tinyPad, standardPad, tinyPad);\n\t\tFrameLayout.LayoutParams params = new FrameLayout.LayoutParams(\n\t\t\t\tFrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT);\n\t\tview.setLayoutParams(params);\n\t\tview.setLineSpacing(tinyPad, view.getLineSpacingMultiplier());\n\t\treturn new ItemViewHolder(view);\n\t}", "protected void setUpTextView(TextView textView, String text) {\n textView.setText(text);\n textView.setVisibility(text.isEmpty() ? View.GONE : View.VISIBLE);\n }", "public TextView getView(int paramInt, View paramView, ViewGroup paramViewGroup) {\n }", "private View createCurrency() {\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tblp.leftMargin = 5;\r\n\t\tt.setLayoutParams(blp);\r\n\r\n\t\tif (account.getCurrency().length() > 3) {\r\n\t\t\tt.setText(account.getCurrency().substring(3));\r\n\t\t} else {\r\n\t\t\tt.setText(account.getCurrency());\r\n\t\t}\r\n\t\tt.setTextSize(16);\r\n\t\tTypeface font = CurrencyUtil.currencyFace;\r\n\t\tt.setTypeface(font);\r\n\t\tif (account.getBalance() < 0) {\r\n\t\t\tt.setTextColor(getContext().getResources().getColor(R.color.negative));\r\n\t\t} else {\r\n\t\t\tt.setTextColor(getContext().getResources().getColor(R.color.positive));\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_one,container,false);\n view.findViewById(R.id.lay1);\n TxtViw1=(TextView)view.findViewById(R.id.lay1);\n String string=\"The director has put a lot of efforts in giving Baadshaho a period film look\" +\n \"The vehicles and props have been designed as per the need of the narration.\" +\n \"However, it is yet to be seen whether Baadshaho works as a complete package or not.\";\n TxtViw1.setText(string);\n return view;\n }", "@Override\n public void viewCreated() {\n TextView title = (TextView) inflater.inflate(R.layout.layout_custom_title, null);\n title.setId(R.id.txt_title);\n title.setText(R.string.balance_title);\n layout.addView(title);\n // [END Creating the title textview]\n\n // [START Creating amount textview]\n // Filling it with content, changing the design and moving it below the title\n amount = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n amount.setId(R.id.txt_amount);\n amount.setTextSize(TypedValue.COMPLEX_UNIT_PT, 30f);\n amount.setAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.fade_in));\n amount.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n\n RelativeLayout.LayoutParams amountParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT\n );\n amountParams.addRule(RelativeLayout.BELOW, title.getId());\n amountParams.addRule(RelativeLayout.CENTER_IN_PARENT);\n amountParams.setMargins(20, 20, 20, 20);\n\n layout.addView(amount, amountParams);\n // [END Creating amount textview]\n\n // [START Creating a description textview]\n // to describe what the amount means and moving it below the amount\n TextView description = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n description.setId(R.id.txt_description);\n description.setText(R.string.balance_description);\n\n RelativeLayout.LayoutParams descParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n );\n descParams.addRule(RelativeLayout.BELOW, amount.getId());\n\n layout.addView(description, descParams);\n // [END Creating a description textview]\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBeginNewText();\r\n\t\t\t}", "private void createContents() {\n // シェル\n super.createContents(this.parent, SWT.CLOSE | SWT.TITLE, false);\n this.getShell().setText(\"つぶやく\");\n this.shell = this.getShell();\n\n // レイアウト\n GridLayout glShell = new GridLayout(3, false);\n // glShell.horizontalSpacing = 1;\n glShell.marginHeight = 10;\n glShell.marginWidth = 10;\n // glShell.verticalSpacing = 1;\n this.shell.setLayout(glShell);\n\n Label thumnail = new Label(this.shell, SWT.NONE);\n GridData gdThumnail = new GridData(SWT.CENTER, SWT.CENTER, false, false, 3, 1);\n thumnail.setLayoutData(gdThumnail);\n try {\n Image orig = SwtUtils.makeImage(this.imageFile);\n thumnail.setImage(SwtUtils.scaleToFit(orig, 400, 300));\n orig.dispose();\n } catch (IOException e2) {\n SwtUtils.errorDialog(e2, TweetDialog.this.shell);\n }\n\n final Text text = new Text(this.shell, SWT.MULTI | SWT.BORDER | SWT.WRAP);\n GridData gdText = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1);\n gdText.widthHint = SwtUtils.DPIAwareWidth(300);\n gdText.heightHint = SwtUtils.DPIAwareHeight(80);\n text.setLayoutData(gdText);\n\n Label userName = new Label(this.shell, SWT.NONE);\n userName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n try {\n userName.setText(TwitterClient.getInstance().getUser().getScreenName());\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n\n final Label remainChars = new Label(this.shell, SWT.NONE);\n remainChars.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n text.addModifyListener(new ModifyListener() {\n\n @Override\n public void modifyText(ModifyEvent e) {\n int remain = 117 - text.getText().length();\n remainChars.setText(String.valueOf(remain));\n }\n });\n text.setText(\"\");\n\n Button tweet = new Button(this.shell, SWT.NONE);\n GridData gdTweet = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n gdTweet.widthHint = SwtUtils.DPIAwareWidth(100);\n tweet.setLayoutData(gdTweet);\n tweet.setText(\"つぶやく\");\n tweet.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n TwitterClient.getInstance().tweet(\n TweetDialog.this, text.getText(), TweetDialog.this.imageFile);\n TweetDialog.this.shell.close();\n ApplicationMain.logPrint(\"つぶやきました\");\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n }\n });\n\n this.shell.pack();\n }", "private static StyleableToast makeToast(String text, @ToastLength int length) {\n StyleableToast st = new StyleableToast(BaseApplication.getInstance(), text, length);\n st.setBackgroundColor(BaseApplication.getInstance().getResources().getColor(R.color.colorPrimary));\n st.setTextColor(Color.WHITE);\n st.setIcon(R.drawable.ic_shape_square_plus_white_24dp);\n st.spinIcon();\n //st.setMaxAlpha();\n //st.show();\n\n return st;\n }", "public static void text(final String sender, final String nachricht)\n {\n act.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n\n i=-i;\n String text=\"<br />\";\n text+=sender + \": \" + nachricht+\"\";\n RelativeLayout rel = new RelativeLayout(act.getApplicationContext());\n TextView textview=new TextView(act.getApplicationContext());\n textview.setTextSize(17);\n textview.setTextColor(Color.parseColor(\"#131313\"));\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);\n params.addRule(RelativeLayout.ALIGN_PARENT_RIGHT,1);\n\n RelativeLayout.LayoutParams params2=params;\n params2.setMargins(5,5,5,0);\n rel.setLayoutParams(params2);\n textview.setWidth(layout.getWidth()/2);\n textview.setLayoutParams(params);\n textview.setId(chatid);\n if(sender.equals(name))\n {\n rel.setGravity(Gravity.RIGHT);\n if(i==1)\n {\n textview.setBackgroundResource(R.drawable.rounded_corner2);\n }\n else\n {\n textview.setBackgroundResource(R.drawable.rounded_corner);\n }\n }\n else\n {\n rel.setGravity(Gravity.LEFT);\n if(i==1)\n {\n textview.setBackgroundResource(R.drawable.rounded_corner2);\n }\n else\n {\n textview.setBackgroundResource(R.drawable.rounded_corner);\n }\n\n }\n textview.append(Html.fromHtml((text)));\n textview.append(Html.fromHtml((\"<br />\")));\n\n rel.addView(textview);\n layout.addView(rel);\n\n final ScrollView scroll = (ScrollView) vi.findViewById(R.id.chatscroll);\n scroll.post(new Runnable() {\n @Override\n public void run() {\n scroll.fullScroll(View.FOCUS_DOWN);\n }\n });\n\n chatid=chatid+1;\n }\n });\n\n }", "private void instanciarTextButtons(){\n for (int buttons : textIds) {\n TextView btn = findViewById(buttons);\n ComponentesAuxiliares.definirFonte(this, btn);\n }\n }", "public final TText addText(final String text, final int x,\n final int y, final int width, final int height, final String colorKey) {\n\n return new TText(this, text, x, y, width, height, colorKey);\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n TextView label = new TextView(context);\n label.setTextColor(Color.BLACK);\n label.setPadding(16, 16, 16, 16);\n label.setText(urbanizacionList.get(position).getDescripcion());\n\n return label;\n }", "interface View extends BaseView {\n void onTextLoaded(String text);\n }", "public interface ILetterViewFactory {\n\t\n\t/**\n\t * Gets the letter view.\n\t *\n\t * @param username the username\n\t * @param inLetterText the in letter text\n\t * @param dateText the date text\n\t * @param alignLeft the align left\n\t * @return the letter view\n\t */\n\tILetterView getLetterView(String username, String inLetterText, String dateText, boolean alignLeft);\n}", "public TextFragment()\n\t{\n\t}", "public DialogLabel(String text, int posX, int posY, Pos pos) {\n\t\tsuper(text);\n\t\tsetup(posX, posY, pos);\n\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tif(mFontName!=null && !mFontName.equals(\"\")) {\n\t\t\tif(isInEditMode()) {\n\t\t\t\tif(mPlaceholder!=null && !mPlaceholder.equals(\"\")) {\n\t\t\t\t\tsetText(mPlaceholder);\n\t\t\t\t} else {\n\t\t\t\t\tLog.i(\"RTextView\", \"No placeholder was given. Using default char 'x'.\");\n\t\t\t\t\tsetText(\"x\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsetTypeface(mTypeface);\n\t\tsuper.onDraw(canvas);\n\t}", "public CustomTextInputLayout(Context context) {\n super(context);\n }", "private void renderText(CharSequence source) {\n \n }", "private void createTextPanel()\n\t{\t\t\n\t\ttextPanel.setLayout (new BorderLayout());\n\t\ttextPanel.add(entry, BorderLayout.CENTER);\n\t\t\n\t}", "private TextView getEmailTextView(String content) {\n TextView textView = getTextView(content);\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.MATCH_PARENT);\n layoutParams.weight = 1;\n Linkify.addLinks(textView, Linkify.EMAIL_ADDRESSES);\n textView.setLayoutParams(layoutParams);\n textView.setPadding(45, 30, 0, 0);\n textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.mail_blue, 0, 0, 0);\n textView.setCompoundDrawablePadding(30);\n return textView;\n }", "public TextBoxCommentary(final GraphicView parent, String text)\n\t{\n\t\tsuper(parent);\n\n\t\tinit(text);\n\t}" ]
[ "0.75386286", "0.7176444", "0.6981829", "0.6958659", "0.6942979", "0.6918209", "0.6898624", "0.6834429", "0.674891", "0.6717132", "0.6675211", "0.6671226", "0.66399884", "0.6577318", "0.6542897", "0.6538999", "0.6474559", "0.64576685", "0.6409738", "0.63759094", "0.63737214", "0.63492167", "0.6347399", "0.6278374", "0.626616", "0.6231042", "0.6199437", "0.6191416", "0.61531943", "0.61437815", "0.6141056", "0.6134642", "0.61335415", "0.61231524", "0.6096924", "0.608924", "0.60727936", "0.60479146", "0.6039588", "0.6034788", "0.6020866", "0.59986776", "0.5993162", "0.5988728", "0.5983099", "0.59813786", "0.5970371", "0.5920851", "0.5919806", "0.5899419", "0.58988297", "0.5889123", "0.5887918", "0.5875539", "0.5869583", "0.584813", "0.5847639", "0.5844161", "0.584169", "0.5828016", "0.58238626", "0.5810202", "0.5807585", "0.5786628", "0.5773159", "0.57454437", "0.5731963", "0.57218516", "0.5702839", "0.56933576", "0.56885046", "0.56764096", "0.5663073", "0.5660192", "0.5648507", "0.5646811", "0.56452537", "0.56428725", "0.563813", "0.5628402", "0.5626574", "0.56252456", "0.5625039", "0.56143177", "0.5602009", "0.5601272", "0.5593363", "0.55923355", "0.5582328", "0.55783635", "0.55782396", "0.55672914", "0.55579126", "0.5551284", "0.55501765", "0.5548665", "0.5542693", "0.5541806", "0.5538756", "0.5534587" ]
0.6861206
7
/ TextView for no data.
private TextView getNoDataTextView(String content) { TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT); layoutParams.gravity = Gravity.CENTER_HORIZONTAL; TextView textView = getTextView(content); textView.setLayoutParams(layoutParams); textView.setPadding(25, 30, 0, 30); return textView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void noDataFoundTextView();", "@MediumTest\n\t public void testInfoTextViewText_isEmpty() {\n\t assertEquals(\"\", mtextView1.getText());\n\t }", "public static void displayNoResults()\n {\n tableData.add(new Company(null, \"No results found\"));\n tableView.setItems(tableData); \n }", "public void show_message_no_data() {\n\t\tAlertDialog.Builder dialog=new AlertDialog.Builder(this);\n\t\t\n dialog.setTitle(\"Notice\");\n dialog.setMessage(\"No data for TI list\");\n \n dialog.setPositiveButton(\"OK\",new DialogListener(this, dialog, 0));\n \n dialog.create();\n dialog.show();\n\t\t\n\t}", "@Override\n public String getText() {\n return null;\n }", "@Override\n\tpublic String textContent() {\n\t\treturn null;\n\t}", "private void onDataEmpty() {\n mArticlesView.showNoArticles();\n }", "private void updateEmptyView()\n\t{\n\t\tif (_forecastAdapter.getItemCount() == 0)\n\t\t{\n\t\t\tTextView textView = (TextView) getView().findViewById(R.id.recyclerview_forecast_empty);\n\n\t\t\t//if cursor is empty\n\t\t\tif (textView != null)\n\t\t\t{\n\t\t\t\tint message = R.string.empty_forecast_list;\n\n\t\t\t\[email protected] int locationStatus = Util\n\t\t\t\t\t\t.getLocationStatus(getContext());\n\n\t\t\t\tswitch (locationStatus)\n\t\t\t\t{\n\t\t\t\t\tcase SunshineSyncAdapter.LOCATION_STATUS_SERVER_DOWN:\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage = R.string.empty_forecast_list_server_down;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SunshineSyncAdapter.LOCATION_STATUS_SERVER_INVALID:\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage = R.string.empty_forecast_list_server_error;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase SunshineSyncAdapter.LOCATION_STATUS_INVALID:\n\t\t\t\t\t{\n\t\t\t\t\t\tmessage = R.string.empty_forecast_list_invalid_location;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif (!Util.isNetworkAvailable(getContext()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmessage = R.string.empty_forecast_list_no_network;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttextView.setText(message);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic String getText() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String getText() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getText() {\n\t\treturn null;\r\n\t}", "private void showEmpty() {\n MTool.Toast(getContext(), R.string.netNoGeilible);\n if (getVisibility() != VISIBLE) setVisibility(VISIBLE);\n resetEmptyImg(R.drawable.ic_no_net);\n if (mClick != null) {\n mTvEmpty.setText(R.string.noNetWork);\n mEmptyView.setOnClickListener(v -> mClick.handleOnCallBack());\n } else\n mTvEmpty.setText(R.string.noNetWorkB);\n mEmptyView.setVisibility(VISIBLE);\n }", "private void showEmptyListView() {\n\t\tempty_icon.setBackgroundResource(R.drawable.ic_search_large);\n\t\tempty_label.setText(R.string.setting_friend_have_no_friend);\n\t\tempty_layout.setVisibility(View.VISIBLE);\n\t\tlst_friend.setVisibility(View.GONE);\n\t}", "private void displayTextView() {\n wellnessEntryErrorTextView.setText(\"This is an error message e.g no data\");\n wellnessEntryErrorTextView.setVisibility(View.VISIBLE);\n recyclerView.setVisibility(View.GONE);\n }", "public String getNoneText() {\r\n return ValueBindings.get(this, \"noneText\", noneText, \"None\");\r\n }", "@Override\n public boolean isNoTitle() {\n return true;\n }", "public void testGetContentDescription_emptyTweet() {\n final Locale originalLocale = TestUtils.setLocale(getContext(), Locale.ENGLISH);\n final BaseTweetView view = createView(context, TestFixtures.TEST_TWEET);\n view.setTweet(TestFixtures.EMPTY_TWEET);\n Assert.assertThat(view.getContentDescription(), is(getResources().getString(R.string.tw__loading_tweet)));\n TestUtils.setLocale(getContext(), originalLocale);\n }", "private void assertStreamItemViewHasNoTag() {\n Object tag = mView.getTag();\n assertNull(\"should not have a tag\", tag);\n }", "public View getEmptyView(String str) {\n View inflate = View.inflate(this, R.layout.empty_view, (ViewGroup) null);\n ((TextView) inflate.findViewById(R.id.tv_tip)).setText(str);\n return inflate;\n }", "@Override\n\tpublic String display() {\n\t\treturn null;\n\t}", "@Override\n public void infoUsersNotHaveData() {\n mSearchChildView.showEmptyArtistsLayout();\n }", "@Override\r\n\tpublic String display() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String display() {\n\t\treturn null;\r\n\t}", "@Override\n public String asText() {\n return null;\n }", "private void setText(String str, TextView viewTitle, TextView viewData) {\n if (str.length() == 0) {\n viewTitle.setVisibility(View.GONE);\n viewData.setVisibility(View.GONE);\n } else {\n viewData.setText(str);\n }\n }", "public String getText() {\n return \"\";\n }", "@Override\n\tpublic String display() {\n\t\treturn \"null\";\n\t}", "public boolean getNoDisplay() {\n\t\treturn false;\n\t}", "private void showNoFavoriteMoviesTextView(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(false);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.VISIBLE);\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\n View emptyView = mListView.getEmptyView();\n\n if (emptyView instanceof TextView) {\n ((TextView) emptyView).setText(emptyText);\n }\n }", "public void setEmptyText(CharSequence emptyText) {\r\n\t\tView emptyView = mListView.getEmptyView();\r\n\r\n\t\tif (emptyText instanceof TextView) {\r\n\t\t\t((TextView) emptyView).setText(emptyText);\r\n\t\t}\r\n\t}", "private void clearResponseUi() {\n mTxtAuthentication.setText(R.string.noData);\n mTxtATR.setText(R.string.noData);\n mTxtResponseApdu.setText(R.string.noData);\n mTxtEscapeResponse.setText(R.string.noData);\n mTxtScan.setText(\"\");\n }", "private void emptyLayout() {\n mTvEmpty.setText(R.string.text_receive_list_empty);\n mIvEmpty.setImageResource(R.drawable.ic_money_payment);\n mIvEmpty.setContentDescription(getString(R.string.descr_hand_money_empty));\n mListView.setEmptyView(mEmptyView);\n }", "public void setEmptyText(CharSequence emptyText) {\n\t\tif (mListView != null){\n\t\t\tView emptyView = mListView.getEmptyView();\n\n\t\t\tif (emptyText instanceof TextView) {\n\t\t\t\t((TextView) emptyView).setText(emptyText);\n\t\t\t}\n\t\t}\n }", "String getText()\n {\n return \"\";\n }", "public void displayEmptyView() {\n if (peers_.size() == 0) {\n list_view_.getEmptyView().setVisibility(View.VISIBLE);\n } else {\n list_view_.getEmptyView().setVisibility(View.INVISIBLE);\n }\n }", "private void emptyView(){\n if(adapter.getItemCount() <= 0){\n v.setVisibility(View.GONE);\n empty.setVisibility(View.VISIBLE);\n } else {\n v.setVisibility(View.VISIBLE);\n empty.setVisibility(View.GONE);\n }\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n //Changes all text views to nothing\n asiaCapital.setText(\"\");\n asiaLanguage.setText(\"\");\n asiaCurrency.setText(\"\");\n asiaVisa.setText(\"\");\n }", "private void displayNoImage() {\n\t\tGRect imageRect = new GRect(LEFT_MARGIN, nameY + IMAGE_MARGIN,\n\t\t\t\tIMAGE_WIDTH, IMAGE_HEIGHT);\n\t\tadd(imageRect);\n\t\tGLabel noImage = new GLabel(\"No Image\");\n\t\tnoImage.setFont(PROFILE_IMAGE_FONT);\n\t\tdouble labelWidth = LEFT_MARGIN + IMAGE_WIDTH / 2 - noImage.getWidth()\n\t\t\t\t/ 2;\n\t\tdouble labelHeight = nameY + IMAGE_MARGIN + IMAGE_HEIGHT / 2;\n\t\tadd(noImage, labelWidth, labelHeight);\n\t}", "@Override\n protected void onDataChanged() {\n binding.empty.setVisibility(mAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);\n }", "private String getNullValueText() {\n return getNull();\n }", "@Override // com.android.systemui.statusbar.notification.row.StackScrollerDecorView\n public void onFinishInflate() {\n super.onFinishInflate();\n this.mEmptyText = (TextView) findContentView();\n }", "private void drawNoResultsMessage()\n\t{\n\t\tFont font = new Font(\"Invalid\", Font.BOLD, 30);\t\t\n\t\ttitle.setBounds((super.getWidth()/2) - 380, (super.getHeight()/2) - 70, 800, 50);\n\t\ttitle.setFont(font);\n\t\tthis.add(title);\n\t}", "public void resetText(View view) {\n display();\n }", "@Override\n public void onDataNotAvailable() {\n Log.d(TAG, \"onDataNotAvailable: \");\n }", "private TextView getTextView(String content) {\n TextView textView = new TextView(this.getContext());\n textView.setEms(30);\n textView.setTextColor(getResources().getColor(R.color.ldstools_black));\n if(content != null && !content.isEmpty()) {\n textView.setText(content);\n }\n return textView;\n }", "public void setNoneText(String noneText) {\r\n this.noneText = noneText;\r\n }", "public static boolean validateTextViewEmpty(TextView textView,\n String message,\n Context context,\n String textData)\n {\n\n if (textView.getText().toString().equals(textData))\n {\n Toast toast = Toast.makeText(context, \"\" + message, Toast.LENGTH_LONG);\n toast.show();\n return false;\n }\n else\n {\n return true;\n }\n\n\n }", "private void showNothing(){\n errorTextView.setVisibility(View.INVISIBLE);\n errorButton.setVisibility(View.INVISIBLE);\n errorButton.setEnabled(false);\n recyclerView.setVisibility(View.INVISIBLE);\n progressBar.setVisibility(View.INVISIBLE);\n noFavoriteMoviesTextView.setVisibility(View.INVISIBLE);\n }", "public String asText() {\n\t\treturn \"\";\n\t}", "private void showEmptyView() {\n mEmptyView.setVisibility(View.VISIBLE);\n mDashboardList.setVisibility(View.INVISIBLE);\n }", "public void setEmptyScreen() {\n emptyText.setVisibility(View.VISIBLE);\n todoRecyclerView.setVisibility(View.GONE);\n }", "@Then ( \"^Unselected patient text is displayed when no patient is selected.$\" )\r\n public void noPatientSelectedText () {\r\n waitForAngular();\r\n assertTextPresent( \"Please select a patient for which to view Obstetrics Records.\" );\r\n }", "public boolean isNoDatamessagePresent() {\r\n\t\treturn isElementVisible(addVehiclesHeader.replace(\"Add Vehicle\", \"No data\"), SHORTWAIT);\r\n\t}", "@Test\r\n public void studNoText() {\r\n onView(withId(R.id.Stud_id)).perform(typeText(\"123456\"));\r\n }", "private String notFound() {\n\t\tquestionBot.put(owner.id(), \"Desculpe, não entendi sua resposta\");\n\t\treturn buildMessage(questionBot.get(owner.id()));\n\t}", "@Then ( \"^No current pregnancies text is displayed when the patient is selected and has no current pregnancies.$\" )\r\n public void noCurrentPregnanciesText () {\r\n waitForAngular();\r\n assertTextPresent( \"There are no current Obstetrics records for this Patient.\" );\r\n }", "public void clearText() {\r\n\t\tSystem.out.println(\"UNIMPLEMENTED: clear displayed text\");\r\n\t\t// TODO implement text clearing\r\n\t}", "public String getText() {\n\t\treturn null;\n\t}", "private void displayNoRoomMsg() {\n\t\t \n\t\t //displays error message to user\n\t\t System.out.println(\"Unable to move in that direction.\\n\"\n\t\t\t\t \t\t\t\t+ \"There is no Room in that direction.\\n\");\n\t }", "public void XXXtestEmptyContentDescription() throws Throwable {\n view.setTitle(\"RawIViewPart\");\n verifySettings(\"RawIViewPart\", \"RawIViewPart\", \"\");\n verifyEvents(true, false, true);\n }", "@Override\n public int getCount() {\n return m_data == null ? 0 : m_data.length;\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tahoraNoOnClick();\n\t\t\t}", "@Override\n\tpublic String toString(View v) {\n\t\treturn null;\n\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\n\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic int display() {\n\t\treturn 0;\n\t}", "public void showNoNotifications(){\n noNotificationsTitle.setVisibility(View.VISIBLE);\n noNotificationsText.setVisibility(View.VISIBLE);\n noNotificationsImage.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tswitch(v.getId()) {\n\t\t\tcase R.id.know_text:\n\t\t\t\tmHandler.sendEmptyMessage(v.getId());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public void popUpEmptyTextView() {\n final Intent intent = new Intent(this, AddUserDetailsActivity.class);\n AlertDialog alertDialog = new AlertDialog.Builder(AddUserDetailsActivity.this).create();\n alertDialog.setTitle(\"ERROR\");\n alertDialog.setMessage(\"One of the fields have been left empty, please try again.\"\n );\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n //Intent intent = new Intent(this, AddUserDetailsActivity.class);\n startActivity(intent);\n finish();\n\n }\n });\n alertDialog.show();\n }", "public void onNothingSelected(AdapterView<?> arg0) {\n beens.get(index).beizhu=\"\";\n arg0.setVisibility(View.VISIBLE);\n }", "public void testNoData() {\n\n InternalContest contest = new InternalContest();\n \n // Add scoreboard account and set the scoreboard account for this client (in contest)\n contest.setClientId(createBoardAccount (contest));\n\n checkOutputXML(contest);\n }", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "private void switchToNoContentView() {\n no_content.setVisibility(View.VISIBLE);\n mRecyclerView.setVisibility(View.GONE);\n }", "public boolean isEmpty() {\n return (this.text == null);\n }", "public void showEmptyView() {\n mStateView.showViewEmpty();\n }", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n String userEnteredText = ((EditText) findViewById(R.id.editText)).getText().toString();\n\n // If the text field is empty , update label with default text string.\n if (userEnteredText.isEmpty()) {\n textView.setText(\"Enter your own text\");\n } else {\n textView.setText(userEnteredText);\n }\n }", "public void onNothingSelected(AdapterView<?> arg0) {\n\t }", "private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t}", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t}", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t}" ]
[ "0.82532215", "0.70363235", "0.6858785", "0.67501926", "0.6728538", "0.66758233", "0.6638112", "0.65936446", "0.65471745", "0.65120953", "0.65120953", "0.64817697", "0.64241713", "0.6351484", "0.63202983", "0.63136625", "0.6304757", "0.6298403", "0.6294386", "0.62803483", "0.62801725", "0.6237981", "0.6237981", "0.6224385", "0.61961204", "0.61384755", "0.61357826", "0.6129705", "0.6118368", "0.6093601", "0.6093601", "0.6093601", "0.6093601", "0.6093601", "0.6093601", "0.6093601", "0.6093015", "0.6087163", "0.60708433", "0.60574365", "0.60498595", "0.6040281", "0.6038589", "0.60259867", "0.6014869", "0.6013365", "0.5990307", "0.598034", "0.59791505", "0.5943227", "0.5933227", "0.5926589", "0.5920075", "0.5917271", "0.5916148", "0.5910233", "0.58704484", "0.5860196", "0.5834633", "0.5831715", "0.5818827", "0.58075637", "0.5806315", "0.5795562", "0.5793691", "0.578115", "0.5779904", "0.57708067", "0.57707477", "0.57699907", "0.5769358", "0.5768825", "0.5768455", "0.5767017", "0.5763669", "0.57608354", "0.5758777", "0.5745853", "0.5744222", "0.57406807", "0.57390517", "0.5737908", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5732665", "0.5728589", "0.5725203", "0.57245207", "0.57212424", "0.57212424", "0.57212424" ]
0.7668352
1
/ Separating horizontal border.
private View getBorderView() { View view = new View(this.getContext()); TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, 1); view.setLayoutParams(layoutParams); view.setBackgroundColor(getResources().getColor(R.color.ldstools_gray_light)); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testBorderHorizontal() {\n System.out.println(\"borderHorizontal\");\n int x = 0;\n int y = 0;\n int decks = 0;\n int i = 0;\n int[][] field = null;\n int state = 0; \n instance.borderHorizontal(x, y, decks, i, field, state);\n \n }", "Border createBorder();", "private void renderBorder() {\n\t\trenderHorizontalLine(0, BORDER_SIGN_HORIZONTAL);\n\t\trenderHorizontalLine(this.output.length - 1, BORDER_SIGN_HORIZONTAL);\n\t\trenderVerticalLine(0, BORDER_SIGN_VERTICAL);\n\t\trenderVerticalLine(this.output[0].length - 1, BORDER_SIGN_VERTICAL);\n\n\t\tthis.output[0][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[0][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][0] = BORDER_SIGN_EDGE;\n\t\tthis.output[this.output.length - 1][this.output[0].length - 1] = BORDER_SIGN_EDGE;\n\t}", "private String generateHorizontalDivider(Table inputTable) {\n StringBuilder horDivBuilder = new StringBuilder();\n for (int i = 0; i < inputTable.getColumnSize(); i++) {\n horDivBuilder.append(X_DIV);\n for (int j = 0; j < getColWidth(i) + XPADD; j++) {\n horDivBuilder.append(H_DIV);\n }\n }\n horDivBuilder.append(X_DIV + NEWLN);\n return horDivBuilder.toString();\n }", "public static void addHorizontalSeparator(int[][] matrix, int x, int y) {\n\t\tfor (int i = 0; i < 8; ++i) {\n\t\t\tmatrix[x + i][y] = W;\n\t\t}\n\t}", "@Override \n public void paintBorder(Component c, Graphics g, int x, int y, int width, int height){ \n g.setColor( c.getForeground() ); \n g.drawLine(0, height - 1, width, height - 1); //Border Bottom \n }", "private void drawHorizontalLines(){\r\n\r\n\t\tdouble x1 = START_X;\r\n\t\tdouble x2 = getWidth();\r\n\t\tdouble y1 = GRAPH_MARGIN_SIZE;\r\n\t\tdouble y2 = y1;\r\n\r\n\t\tdrawLine(x1,y1,x2,y2);\r\n\r\n\t\tdouble newY1 = getHeight() - y1;\r\n\t\tdouble newY2 = newY1;\r\n\r\n\t\tdrawLine(x1,newY1,x2,newY2);\r\n\t}", "@Override\n public float getBorderWidth() {\n return mBorderWidth;\n }", "private void addHorizontalSeparator(TableLayout tableLayout){\n View view = new View(getApplicationContext());\n view.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, 1));\n view.setBackgroundColor(Color.rgb(50, 50, 50));\n tableLayout.addView(view);\n }", "public float border() {\n\t\treturn borderThickness;\n\t}", "@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x - 1, y, width + 5, height);\n\t\t}", "public TextureBorder getBorderX() {\n return mBorderX;\n }", "private Line createSeparator(int length){\n\n Line sep = new Line();\n sep.setEndX(length);\n sep.setStroke(Color.DARKGRAY);\n return sep;\n\n }", "public static Component horizontal() {\n return Box.createRigidArea(new Dimension(gap, 0));\n }", "public BorderInfo getBorderStart() {\n return borderStart.getBorderInfo();\n }", "@Override\n\t\tpublic void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n\t\t\tsuper.paintBorder(c, g, x, y, width + 1, height);\n\t\t}", "default boolean isHorizontalLineSegment() {\n return false;\n }", "private void drawTopBorder(StringBuffer canvas) {\n \t\t\tfor (int i=0; i<width; i++)\r\n \t\t\t\tcanvas.append('_'); //Top bar.\r\n \t\t\tcanvas.append('\\n');}", "protected abstract void drawBorderLine(\n // CSOK: ParameterNumber\n final float x1, final float y1, final float x2, final float y2,\n final boolean horz, final boolean startOrBefore, final int style,\n final Color col);", "private int computeHorizontalBorderClassCount ()\n {\n int extendingBorderCount = 0;\n int extendedBorderCount = 0;\n for (String sortedClass : sortedClasses)\n {\n ProjectDependenciesAnalyzer.DependencyInfo info = infos.get (sortedClass);\n double extending = info.getNormalizedExtending ();\n if (extending < 0.05)\n {\n extendingBorderCount++;\n }\n else if (extending > 0.95)\n {\n extendedBorderCount++;\n }\n }\n return Math.max (extendingBorderCount, extendedBorderCount);\n }", "IOverlayStyle borderThickness(int thick);", "@SuppressWarnings(\"unchecked\")\n public void insertarLineaSeparacion() {\n Tag hr = new Tag(\"hr\");\n hr.addAttribute(new Attribute(\"style\", \"width: 100%; height: 2px;\"));\n // <hr style=\"width: 100%; height: 2px;\">\n body.add(hr);\n }", "boolean checkBorders();", "public Border getBorder()\n {\n return null;\n }", "@Override\r\n\tpublic int getBorderWidth(Object entity) {\n\t\treturn 0;\r\n\t}", "public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {\n if (!(g instanceof Graphics2D)) {\n return;\n }\n\n Graphics2D g2d = (Graphics2D) g;\n\n drawVLine(g2d, Side.LEFT, x + getMargin(Side.LEFT), y, height);\n drawVLine(g2d, Side.RIGHT, x + width - getMargin(Side.RIGHT) - getBorderWidth(Side.RIGHT),\n y,\n height);\n drawHLine(g2d, Side.TOP, x, y + getMargin(Side.TOP), width);\n drawHLine(g2d, Side.BOTTOM, x,\n y + height - getMargin(Side.BOTTOM) - getBorderWidth(Side.BOTTOM), width);\n }", "protected void paintComponentBorder(Graphics g) {\r\n int height = this.getHeight();\r\n int width = this.getWidth();\r\n Color c = g.getColor();\r\n g.setColor(getUiPrefs().getBorderColor());\r\n g.drawRoundRect(0, 0, width - 1, height - getInsets().bottom, 10, 10);\r\n g.setColor(c);\r\n }", "protected void drawSeparator(Graphics g,int x,int y,int w,int h)\n {\n g.setColor(new Color(0x868686));\n g.drawLine(x+0,y+0,x+w-1,y+0);\n g.drawLine(x+0,y+0,x+0,y+1);\n g.drawLine(x+w-1,y+0,x+w-1,y+1);\n g.setColor(Color.black);\n g.drawLine(x+1,y+1,x+w-2,y+1);\n\n g.setColor(new Color(0x868686));\n g.drawLine(x+0,y+0,x+0,y+h-1);\n g.setColor(Color.black);\n g.drawLine(x+1,y+1,x+1,y+h-1);\n\n g.setColor(new Color(0xD7D3CB));\n g.drawLine(x+0,y+h-1,x+w-1,y+h-1);\n\n g.setColor(new Color(0xD7D3CB));\n g.drawLine(x+w-1,y+1,x+w-1,y+h-1);\n }", "public void resetBorders(){\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, 10));\n } else {\n topborder.add(new TopBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, 0, topborder.get(i - 1).getHeight() + 1));\n }\n }\n\n\n for (int i = 0; i * 25 < width + 40; i++) {\n if (i == 0) {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25,height-minBorderHeight));\n } else {\n botborder.add(new BotBorder(BitmapFactory.decodeResource(getResources(), R.drawable.newborder), i * 25, botborder.get(i - 1).getY() - 1));\n }\n }\n }", "public Horizontal() {\r\n }", "public double getBorderCenterX()\n {\n return borderCenterX;\n }", "private void createAreaWithBorder(int borderWidth, int borderHeight){\n image.setColor(borderColor);\n image.fillRect(0, 0, fieldWidth, fieldHeight);\n \n image.setColor(backgroundColor);\n image.fillRect(borderWidth, borderHeight, fieldWidth - (borderWidth * 2), fieldHeight - (borderHeight * 2));\n }", "protected void paintBorder (Graphics g)\r\n {\n }", "private static String writeHorisontalBorder(List<StudentRecord> records) {\n\t\tint maxJMBAG = getMax(records, FieldValueGetters.JMBAG);\n\t\tint maxLast = getMax(records, FieldValueGetters.LAST_NAME);\n\t\tint maxFirst = getMax(records, FieldValueGetters.FIRST_NAME);\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(maxJMBAG + 2));\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(maxLast + 2));\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(maxFirst + 2));\n\t\tsb.append(\"+\");\n\t\tsb.append(writeEqualsSigns(3));\n\t\tsb.append(\"+\\n\");\n\t\treturn sb.toString();\n\t}", "private void updateBorder() {\n m_hexPanel.setBorder(new TitledBorder(String.format(\"Binary data of '%s'\", m_module\n .getConfiguration().getName())));\n }", "default Integer getHorizontalMargin() {\n return null;\n }", "public CssBorderWidth() {\n }", "@Override\n protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawRoundRect(0, 0, getWidth() - 1, getHeight() - 1, 15, 50);\n }", "private HBox hboxFormat() {\n HBox hbox = new HBox(10); // 10 = spacing between elements\n return hbox;\n }", "String[] addBorder(String[] picture) {\n final int BORDER_HEIGHT = picture.length + 2; // the hight of the border\n final int BORDER_LENGTH = picture[0].length() + 2; // the length of the border\n final int TOP_BORDER = 0; // index of the top border\n final int BOTTOM_BORDER = BORDER_HEIGHT - 1; // index of the bottom border\n \n // a new array to store the output strings with the borders added\n String[] output = new String[BORDER_HEIGHT];\n \n // starting at the row after the top border\n int row = TOP_BORDER + 1;\n \n // examine each line in the supplied picture\n for (String line : picture){\n \n // concat \"*\" to the beginning and end, then add it to the output array\n output[row++] = \"*\" + line + \"*\";\n }\n \n // initialize the top and bottom borders to empty strings to avoid including a null\n output[TOP_BORDER] = \"\";\n output[BOTTOM_BORDER] = \"\";\n \n // concat a number of \"*\" characters of the appropiate length to become\n // the top and bottom borders\n for (int col = 0; col < BORDER_LENGTH; col++){\n output[TOP_BORDER] += \"*\";\n output[BOTTOM_BORDER] += \"*\";\n }\n \n // return the ouput array of strings that includes the border\n return output;\n}", "private void drawBorders(Graphics g) {\n\t\tRectangle field = g.getClipBounds();\n\t\tdouble[] thisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\tdouble[] upToThisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\tdouble[] leftToThisCoordinate = plotSheet.toCoordinatePoint(0, 0, field);\n\t\t\n\t\tdouble thisF_xy;\n\t\tdouble upToThisF_xy;\n\t\tdouble leftToThisF_xy;\n\t\t\n\t\tfor(int i = field.x+plotSheet.getFrameThickness() + 1; i < field.x + field.width-plotSheet.getFrameThickness(); i++) {\n\t\t\tfor(int j = field.y+plotSheet.getFrameThickness() + 1; j < field.y +field.height-plotSheet.getFrameThickness(); j++) {\n\t\t\t\tthisCoordinate = plotSheet.toCoordinatePoint(i, j, field);\n\t\t\t\tupToThisCoordinate = plotSheet.toCoordinatePoint(i, j-1, field);\n\t\t\t\tleftToThisCoordinate = plotSheet.toCoordinatePoint(i-1, j, field);\n\t\t\t\tthisF_xy = function.f(thisCoordinate[0], thisCoordinate[1]);\n\t\t\t\tupToThisF_xy = function.f(upToThisCoordinate[0], upToThisCoordinate[1]);\n\t\t\t\tleftToThisF_xy = function.f(leftToThisCoordinate[0], leftToThisCoordinate[1]);\n\t\t\t\t\n\t\t\t\tif(onBorder(thisF_xy, upToThisF_xy) || onBorder(thisF_xy, leftToThisF_xy)) {\n\t\t\t\t\tg.drawLine(i, j, i, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void setLineWidth(Integer width) {\n style.setBorderWidth(width);\n }", "void integrateBorderSegment(int side, BorderSpecification segment) {\n switch(side) {\n case CommonBorderPaddingBackground.START:\n borderStart = collapsingBorderModel.determineWinner(borderStart, segment);\n break;\n case CommonBorderPaddingBackground.END:\n borderEnd = collapsingBorderModel.determineWinner(borderEnd, segment);\n break;\n default: assert false;\n }\n }", "void setBorder(Color color, int thickness);", "private void setBorder(TitledBorder titledBorder) {\n\n}", "@Override\n public void draw(Canvas onCanvas) {\n Paint border = new Paint();\n border.setColor(Color.BLACK);\n border.setStyle(Paint.Style.STROKE);\n border.setStrokeWidth(1);\n\n // -1 on width and height because the 1st pixel (0 index) is included\n // Java's placement on the border lines are really weird...\n //\n // It draws the top and left borders on the 0 pixel\n // BUT it draws the right and bottom ones PAST the last pixel\n // WHY U DO DIS\n onCanvas.drawRect(0, 0, getW() - 1, getH() - 1, border);\n\n super.draw(onCanvas);\n }", "public java.lang.String getCrossBorderIndicator() {\r\n return crossBorderIndicator;\r\n }", "public boolean getBorderVisible() {\n checkWidget();\n return borderLeft == 1;\n }", "public ValueExpression getBorder() {\n return border;\n }", "public Border getBorder() {\n\t return border;\n\t}", "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "public XSSFBorderFormatting createBorderFormatting(){\n CTDxf dxf = getDxf(true);\n CTBorder border;\n if(!dxf.isSetBorder()) {\n border = dxf.addNewBorder();\n } else {\n border = dxf.getBorder();\n }\n\n return new XSSFBorderFormatting(border, _sh.getWorkbook().getStylesSource().getIndexedColors());\n }", "private Label createSeparator(Composite parent) {\n \t\tLabel separator= new Label(parent, SWT.NONE);\n \t\tseparator.setVisible(false);\n \t\tGridData gd= new GridData();\n \t\tgd.horizontalAlignment= GridData.FILL;\n \t\tgd.verticalAlignment= GridData.BEGINNING;\n \t\tgd.heightHint= 4;\n \t\tseparator.setLayoutData(gd);\n \t\treturn separator;\n \t}", "public void drawBorder(int x1, int y1, int x2, int y2)\r\n\t{\r\n\t\tg.drawLine(x1, y1, x1, y2);\r\n\t\tg.drawLine(x1, y1, x2, y1);\r\n\t\tg.drawLine(x1, y2, x2, y2);\r\n\t\tg.drawLine(x2, y1, x2, y2);\r\n\t}", "public Bordereau() {\n\t\tsuper();\n\t}", "double getHeaderMargin();", "public Color getBorderColor();", "private void addSeparator() {\n JSeparator separator = new JSeparator( SwingConstants.VERTICAL );\n separator.setPreferredSize( new Dimension( 2, 24 ) );\n toolPanel.add(separator);\n\t}", "private void calculateBorder(ArrayList<double[]> contour,\r\n ArrayList<double[]> border) {\r\n\r\n // Circumradius\r\n double circumradius = (sideLength * Math.sqrt(3)) / 3;\r\n\r\n // Reduce the circumradius by the border width\r\n double scaledCircumRadius = circumradius - borderWidth;\r\n\r\n // Make sure the radius never drops below zero\r\n if (scaledCircumRadius < 0)\r\n scaledCircumRadius = 0;\r\n\r\n // Scaling factor\r\n double scale = scaledCircumRadius / circumradius;\r\n\r\n // Scale each vertex of the contour of the whole polygon\r\n for (double[] vertex : contour) {\r\n double[] borderVertex = new double[9];\r\n borderVertex[0] = vertex[0] * scale;\r\n borderVertex[1] = vertex[1] * scale;\r\n border.add(borderVertex);\r\n }\r\n }", "void border(Keywords.BorderSide first, Keywords.BorderSide second, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);", "private void createCanvasBorders() {\n\n\t\tLabel lblBorderMiddle = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderMiddle.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t\tlblBorderMiddle.setBounds(0, 72, 285, 2);\n\n\t\tLabel lblBorderBottom = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderBottom.setBounds(0, 198, 285, 2);\n\t\tlblBorderBottom.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderLeft = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderLeft.setBounds(0, 0, 2, 200);\n\t\tlblBorderLeft.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderRight = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderRight.setBounds(283, 0, 2, 200);\n\t\tlblBorderRight.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\n\t\tLabel lblBorderTop = new Label(canvasLabel, SWT.NONE);\n\t\tlblBorderTop.setBounds(0, 0, 285, 2);\n\t\tlblBorderTop.setBackground(ResourceUtils.getColor(iDartColor.BLACK));\n\t}", "protected boolean isHorizontal() {\n\t\treturn true;\n\t}", "private void setBorderWidth(int width) {\n this.borderWidth = width;\n Rectangle r = (Rectangle) this.getChildren().get(0);\n r.setStrokeWidth(width);\n }", "private void printSeparator() {\r\n\t\tthis.printLineGap();\r\n\t}", "@Override\n public int getBorderColor() {\n return mBorderColor;\n }", "CellStyleCriterion border(Keywords.BorderSide first, Keywords.BorderSide second, Consumer<BorderCriterion> borderConfiguration);", "public void moveLeft() {\n if (rec.getUpperLeft().getX() - 5 < leftBorder) {\n rec.getUpperLeft().setX(leftBorder);\n } else {\n rec.getUpperLeft().setX(rec.getUpperLeft().getX() - 5);\n }\n\n }", "private static void printTeamTableDivider() {\n System.out.format(\"+----------------------+----------------------+----------------------\" +\n \"+----------------------+%n\");\n }", "public Pattern getHorizPattern() {\n\t\treturn horizPattern;\n\t}", "public LineBorderPanel()\n {\n\tthis(null);\n }", "void integrateBorderSegment(int side, TableFObj parent) {\n switch (side) {\n case CommonBorderPaddingBackground.BEFORE:\n case CommonBorderPaddingBackground.AFTER:\n integrateBorderSegment(side, parent, true, true, true);\n break;\n case CommonBorderPaddingBackground.START:\n borderStart = collapsingBorderModel.determineWinner(borderStart,\n parent.borderStart);\n break;\n case CommonBorderPaddingBackground.END:\n borderEnd = collapsingBorderModel.determineWinner(borderEnd,\n parent.borderEnd);\n break;\n default: assert false;\n }\n }", "public Border getBorder() {\n\t\treturn border;\n\t}", "public static void bottomHalf() {\n\n for(int i = 1; i <= SIZE; i++) {\n for(int j = 1; j <= i - 1; j++) {\n System.out.print(\" \");\n }\n \n\t System.out.print(\"\\\\_\");\n\t for(int j = 3*SIZE-i; j >= i; j--) {\n\t System.out.print(\"/\\\\\");\n\t }\n\t System.out.println(\"_/\");\n }\n }", "private List<String> extractBorders ()\n {\n List<String> borders = new ArrayList<String> ();\n for (String sortedClass : sortedClasses)\n {\n ProjectDependenciesAnalyzer.DependencyInfo info = infos.get (sortedClass);\n double x = info.getNormalizedUsing ();\n double y = info.getNormalizedExtending ();\n if (x < 0.05 || x > 0.95 || y < 0.05 || y > 0.95)\n {\n borders.add (sortedClass);\n }\n }\n sortedClasses.removeAll (borders);\n return borders;\n }", "void border(Keywords.BorderSide first, Keywords.BorderSide second, Keywords.BorderSide third, @DelegatesTo(BorderCriterion.class) @ClosureParams(value=FromString.class, options = \"org.modelcatalogue.spreadsheet.query.api.BorderCriterion\") Closure borderConfiguration);", "IOverlayStyle borderOffset(int offset);", "IOverlayStyle borderColor(int color);", "public SeparatorControl() {\n _separator = new JSeparator();\n }", "private static void breakRow(int width) {\n\t\tSystem.out.println();\n\t\tfor (int i = 0; i < (width * 2 + 4); i++) {\n\t\t\tSystem.out.print('-');\n\t\t}\n\t\tSystem.out.println();\n\t}", "CellStyleCriterion border(Keywords.BorderSide first, Keywords.BorderSide second, Keywords.BorderSide third, Consumer<BorderCriterion> borderConfiguration);", "public static String trimHorizontalSpace(String str) {\n String horizontalSpace = \"\\\\h\";\n str = str.replaceAll(\"(^\" + horizontalSpace + \"*)|(\" + horizontalSpace + \"*$)\", \"\");\n return str;\n }", "public void createScreenBorders() {\n // set the screen's borders.\n this.upper = 0;\n this.lower = 600;\n this.left = 0;\n this.right = 800;\n }", "int defaultHorizontal() {\n int horizontal;\n if (isDate(clazz) || isDateTime(clazz)\n || isLocalDate(clazz) || isLocalDateTime(clazz)\n || isTime(clazz) || isLocalTime(clazz)\n || isChar(clazz) || isBool(clazz)) {\n horizontal = Horizontals.CENTER;\n } else if (isInt(clazz) || isLong(clazz)\n || isFloat(clazz) || isDouble(clazz)\n || isBigDecimal(clazz)) {\n horizontal = Horizontals.RIGHT;\n } else {\n horizontal = Horizontals.LEFT;\n }\n return horizontal;\n }", "public boolean getShowHorizontalLines() {\r\n return calendarTable.getShowHorizontalLines();\r\n }", "static void afficherLigneSep(int taille) {\n System.out.print(\" \");\n for (int i = 0; i < taille - 1; i++) {\n System.out.print(\"---+\");\n }\n System.out.println(\"---\");\n }", "public GoalViewer()\r\n/* 25: */ {\r\n/* 26: 28 */ setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n/* 27: */ }", "public static void printDivider() {\n System.out.println(Message.LINE_DIVIDER);\n }", "private void calculateSpanWidthBorders(int totalSpace){\r\n if(spanWidthBorders == null || spanWidthBorders.length != mSpanCount + 1\r\n || spanWidthBorders[spanWidthBorders.length - 1] != totalSpace){\r\n spanWidthBorders = new int[mSpanCount + 1];\r\n }\r\n spanWidthBorders[0] = 0;\r\n sizePerSpan = totalSpace / mSpanCount;\r\n int sizePerSpanRemainder = totalSpace % mSpanCount;\r\n int consumedPixels = 0;\r\n int additionalSize = 0;\r\n for (int i = 1; i <= mSpanCount; i++) {\r\n int itemSize = sizePerSpan;\r\n additionalSize += sizePerSpanRemainder;\r\n if (additionalSize > 0 && (mSpanCount - additionalSize) < sizePerSpanRemainder) {\r\n itemSize += 1;\r\n additionalSize -= mSpanCount;\r\n }\r\n consumedPixels += itemSize;\r\n spanWidthBorders[i] = consumedPixels;\r\n }\r\n }", "private void generateBorder() {\n\t\tfor (int y = 0; y < height; y++) {\n\t\t\tfor (int x = 0; x < width; x++) {\n\t\t\t\tif (x == 0 || y == 0 || x == width - 1 || y == height - 1) {\n\t\t\t\t\ttiles[x + y * width] = Tile.darkGrass;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected boolean isBorder(int x, int y){\n if(super.getLocationX() == x)\n return true;\n //top border\n if (super.getLocationY() == y)\n return true;\n\n //right border\n if((super.getLocationX() + super.getWidth() - 1) == x)\n return true;\n\n //bottom border\n if ((super.getLocationY() + super.getHeight() - 1) == y)\n return true;\n\n //return false if not\n return false;\n }", "public boolean isBorderOpaque() {\n // TODO codavaj!!\n return false;\n }", "protected void paintBorder(Graphics g) {\n g.setColor(getForeground());\n g.drawOval(0, 0, getSize().width-1, getSize().height-1);\n }", "public static void addVerticalSeparator(int[][] matrix, int x, int y) {\n\t\tfor (int i = 0; i < 8; ++i) {\n\t\t\tmatrix[x][y + i] = W;\n\t\t}\n\t}", "public static Component horizontal(int width) {\n return Box.createRigidArea(new Dimension(width, 0));\n }", "@Override\n\t\tpublic void setBorder(Border border) {\n\t\t}", "public Color getBorderColor() {\r\n return this.borderColor;\r\n }", "void updateBorder(int offset) {\n setBorder(new EmptyBorder(0, offset, 0, 0));\n }", "@Test\n\tpublic void bottomLeftHorizWhiteCapture()\n\t{\n\t\tData d=new Data();\n\t\td.set(32,112);\n\t\td.set(1,113);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(113);\n\t\tassertTrue(1==test_arr.get(0).getX() && 10==test_arr.get(0).getY());\n\n\t}", "public void drawLeftTriangle(){\n\t //This loop draws the left triangle. It also decrements the width to make the triangle more distinct.\n\t for(int j = 0; j < height; j++)\n\t {\n\t \tfor(int k = 0; k < width; k++)\n\t \t{\n\t\t\t System.out.print(appearance);\n\t\t\t \n\t\t\t System.out.print(\"\");\n\t\t\t}\n\t\t\twidth--;//Decreases width.\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t System.out.println(\"\");\n\t}", "String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }" ]
[ "0.69684523", "0.6623149", "0.6543728", "0.64780784", "0.6444522", "0.6350783", "0.63417155", "0.63005364", "0.6276092", "0.6135395", "0.6024818", "0.6009567", "0.59848964", "0.5974013", "0.59210145", "0.590801", "0.58656305", "0.5829833", "0.5784316", "0.57548195", "0.57492363", "0.57268274", "0.5723634", "0.56943125", "0.5664367", "0.566278", "0.5648724", "0.562953", "0.5626297", "0.5619341", "0.56182927", "0.5608962", "0.5605814", "0.55978394", "0.5597471", "0.5578685", "0.55709124", "0.55542517", "0.5541605", "0.5535816", "0.55197746", "0.5519306", "0.5489773", "0.54817593", "0.54745924", "0.54728776", "0.546731", "0.54666495", "0.5456767", "0.54529107", "0.5450716", "0.5447405", "0.54457396", "0.54408336", "0.54329765", "0.54246306", "0.5420252", "0.5414993", "0.5414327", "0.5411717", "0.54085577", "0.5405624", "0.54032713", "0.539361", "0.53822494", "0.5381095", "0.5380237", "0.53641117", "0.5357643", "0.53525877", "0.53511673", "0.53448254", "0.53429884", "0.5315551", "0.5306343", "0.52892697", "0.52752674", "0.52678865", "0.5264371", "0.5262273", "0.52470744", "0.522993", "0.522559", "0.5215359", "0.521058", "0.5201377", "0.51987314", "0.51978135", "0.51962274", "0.519608", "0.5189458", "0.5185693", "0.5180226", "0.5179937", "0.5178287", "0.5174364", "0.51716745", "0.51658", "0.5163772", "0.5134914" ]
0.5406732
61
Creates a default instance.
public AnalysisContext createDefaultAnalysisContext(ApplicationGroup group) { AnalysisContext defaultAnalysisContext = new AnalysisContext(group); ensureSystemRulesPathsPresent(defaultAnalysisContext); entityManager.persist(defaultAnalysisContext); return defaultAnalysisContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract S createDefault();", "private Default()\n {}", "Instance createInstance();", "defaultConstructor(){}", "public Instance() {\n }", "final Truerandomness defaultInstance() {\n\n\t\ttry {\n\t\t\treturn newInstance();\n\t\t} catch (Throwable t) {\n\t\t\t// hide\n\t\t}\n\n\t\t// not supported\n\t\treturn null;\n\t}", "Reproducible newInstance();", "void DefaultConstructor(){}", "public DefaultApplication() {\n\t}", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "public static Service newInstance() {\n return newInstance(DEFAULT_PROVIDER_NAME);\n }", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "protected Document createDefaultModel() {\n return new PlainDocument();\n }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static StaticFactoryInsteadOfConstructors getInstance(Object optionalParameters){\n return new StaticFactoryInsteadOfConstructors();\n }", "public Factory() {\n\t\tsuper();\n\t}", "public Settings loadDefault() {\n return new Settings();\n }", "public static final Account createDefaultStudentAccount() {\n Name name = new Name(\"Bob\");\n Credential credential = new Credential(\"student\", \"student\");\n MatricNumber matricNumber = new MatricNumber(\"A0123456X\");\n PrivilegeLevel privilegeLevel = new PrivilegeLevel(1);\n Account student = new Account(name, credential, matricNumber, privilegeLevel);\n return student;\n }", "public DefaultStorage() {\n }", "public T newInstance();", "public GameConfig createDefaultConfig() {\n\n return null;\n }", "public static DocumentationSettings getDefault(){\n return INSTANCE;\n }", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "public static GenericBootstrap byDefaultProvider() {\n return new GenericBootstrapImpl();\n }", "public void create(){}", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "T create();", "T create();", "public static DesignViewCreatorForExternal getDefault() {\n\t\tif(creator == null){\n\t\t\tcreator = new DesignViewCreatorForExternal();\n\t\t\tversions = new Hashtable();\n\t\t}\n\t\treturn creator;\n\t}", "protected Document createDefaultModel()\n\t{\n\t\treturn new IntegerDocument();\n\t}", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public ObjectFactory() {\r\n\t}", "public ScreenDefaultTemplateMapper()\n {\n \t// empty\n }", "public ObjectFactory() {\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public DefaultLoaderDefinition() {\n\t\t// nothing to do\n\t}", "public DefaultImpl() {\n this(DEFAULT_DATE_FORMAT);\n }", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "E createDefaultElement();", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public static Resource createDummyInstance(OntClass clazz)\n\t{\n\t\treturn createDummyInstance(ModelFactory.createDefaultModel(), clazz);\n\t}", "private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }", "public static HomeFactory getDefault() {\n if (Utilities.isWindows()) {\n return getDefaultWindows();\n } else if (Utilities.isMac()) {\n return getDefaultMac();\n } else {\n return getDefaultUx();\n }\n }", "public Factory() {\n this(getInternalClient());\n }", "public Builder() {\n\t\t\tsuper(Defaults.NAME);\n\t\t}", "public static BalanceRequest defaultInstance() {\n return DEFAULT;\n }", "static SecurityHandler create() {\n return DEFAULT_INSTANCE;\n }", "DefaultAttribute()\n {\n }", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "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 DefaultCoupledResource() {\n }", "public Node generateDefaultNode(Position pos) {\n\t\tNode n = generateNode(pos);\n\t\tn.finishInitializationWithDefaultModels(true);\n\t\treturn n;\n\t}", "static Sbpayment newInstance() {\n return new DefaultSbpayment();\n }", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "static public InstanceGenerator create(String className, Instances training, Instances testing)\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(Instances.class, Instances.class).newInstance(training, testing);\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 static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public void initializeDefault() {\n\t\tthis.numAuthorsAtStart = 5;\n\t\tthis.numPublicationsAtStart = 20;\n\t\tthis.numCreationAuthors = 0;\n\t\tthis.numCreationYears = 10;\n\n\t\tyearInformation = new DefaultYearInformation();\n\t\tyearInformation.initializeDefault();\n\t\tpublicationParameters = new DefaultPublicationParameters();\n\t\tpublicationParameters.initializeDefault();\n\t\tpublicationParameters.setYearInformation(yearInformation);\n\t\tauthorParameters = new DefaultAuthorParameters();\n\t\tauthorParameters.initializeDefault();\n\t\ttopicParameters = new DefaultTopicParameters();\n\t\ttopicParameters.initializeDefault();\n\t}", "public XONImageMaker() {\r\n\t\tthis(true, null);\r\n\t}", "public static InstallerRegistry getDefault() {\n InstallerRegistry regs = defaultInstance.get();\n if (regs != null)\n return regs;\n regs = new InstallerRegistry();\n defaultInstance = new WeakReference<InstallerRegistry>(regs);\n return regs;\n }", "public Activator() {\r\n\t}", "public LabelFactory() {\n this(0);\n }", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "public void create() {\n\t\t\n\t}", "public DefaultRouterNode() {\n }", "default void init() {\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }", "public ObjectFactory() {\r\n }" ]
[ "0.74622464", "0.7266583", "0.69056815", "0.6843333", "0.66286296", "0.66246265", "0.65477836", "0.6528028", "0.6491646", "0.6456478", "0.6328999", "0.63220507", "0.63107383", "0.6302806", "0.6295166", "0.62434435", "0.61760706", "0.6164891", "0.6164861", "0.61559397", "0.61553764", "0.6151422", "0.61209714", "0.6112456", "0.610228", "0.60902655", "0.60705405", "0.60547036", "0.60536706", "0.60370046", "0.6030335", "0.6030335", "0.6018799", "0.6013032", "0.60067326", "0.5987728", "0.5986932", "0.59745026", "0.59713376", "0.5961969", "0.5956997", "0.5955066", "0.59541583", "0.595176", "0.595176", "0.595176", "0.59503156", "0.59425336", "0.5941465", "0.5936057", "0.5913324", "0.5891266", "0.5880541", "0.587527", "0.58713526", "0.58681834", "0.5856049", "0.584976", "0.58475065", "0.58455276", "0.58442295", "0.58425635", "0.58291143", "0.58234984", "0.5819777", "0.58027244", "0.58025545", "0.5793886", "0.57897425", "0.5769881", "0.576923", "0.5763462", "0.57546914", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147", "0.5752147" ]
0.0
-1
Creates a new instance.
public AnalysisContext create(AnalysisContext analysisContext) { this.ensureSystemRulesPathsPresent(analysisContext); this.loadPackagesToAnalysisContext(analysisContext); entityManager.persist(analysisContext); return analysisContext; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "public void create() {\n\t\t\n\t}", "Reproducible newInstance();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public T newInstance();", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "T create();", "T create();", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public CMObject newInstance();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public abstract void create();", "InstanceModel createInstanceOfInstanceModel();", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public Factory() {\n\t\tsuper();\n\t}", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public abstract boolean create(T newInstance);", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "<T> T newInstance(URI description) throws EnvironmentException;", "public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}", "public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public Factory() {\n this(getInternalClient());\n }", "For createFor();", "public ObjectFactory() {\n super(grammarInfo);\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "T create() throws PersistException;", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public ApplicationCreator() {\n }", "@Override\r\n public void instantiate() {\r\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public SingleRequest<?> create() {\n return new SingleRequest<>();\n }", "public ObjectFactory() {\n\t}", "public ObjectFactory() {\r\n\t}", "public Open() {\n //creates a new open instance\n }", "protected abstract void construct();", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "Klassenstufe createKlassenstufe();", "Snapshot create();", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "void create(T t);", "void create( State state );", "public Activator() {\r\n\t}", "OBJECT createOBJECT();", "public Produto() {}", "public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic AnalysisGraph createNewInstance() {\n\t\tAnalysisGraph graph = new AnalysisGraph();\n\t\tgraph.currentIndex = currentIndex;\n\t\t\n\t\tgraph.nodes = (HashMap<String, Node>) nodes.clone();\n\t\tgraph.nodeList = (ArrayList<Node>)((ArrayList<Node>) nodeList).clone();\n\t\tgraph.links = (ArrayList<Link>)((ArrayList<Link>) links).clone();\n\t\treturn graph;\n\t}", "DynamicInstance createDynamicInstance();", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7834167", "0.72893584", "0.70771503", "0.7048765", "0.70209944", "0.6839274", "0.67782235", "0.6770133", "0.67429745", "0.6701039", "0.6690158", "0.6630354", "0.66046286", "0.6600776", "0.6600776", "0.6597608", "0.6592152", "0.6564594", "0.65268713", "0.652679", "0.6475239", "0.6442598", "0.63414943", "0.63365746", "0.63303816", "0.63249475", "0.627689", "0.627521", "0.6227869", "0.620804", "0.6167403", "0.6164787", "0.610737", "0.6102229", "0.60939527", "0.60640883", "0.60597515", "0.60330635", "0.60064733", "0.600185", "0.59933734", "0.59891814", "0.5978862", "0.5975761", "0.59642875", "0.59642875", "0.59642875", "0.595006", "0.5948986", "0.5939949", "0.5935609", "0.59320545", "0.5930863", "0.5930863", "0.5930808", "0.59303784", "0.59288776", "0.59219015", "0.5912657", "0.5900076", "0.58830214", "0.5879637", "0.5878685", "0.58779675", "0.58684635", "0.5859659", "0.5852349", "0.5844357", "0.5844119", "0.58357304", "0.582402", "0.581462", "0.58129567", "0.5803098", "0.58003926", "0.5787434", "0.5786469", "0.57835597", "0.578337", "0.5780014", "0.57761306", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006" ]
0.0
-1
Updates an existing instance.
public AnalysisContext update(AnalysisContext analysisContext) { AnalysisContext original = this.get(analysisContext.getId()); this.ensureSystemRulesPathsPresent(analysisContext); this.loadPackagesToAnalysisContext(analysisContext); analysisContext.setApplicationGroup(original.getApplicationGroup()); return entityManager.merge(analysisContext); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void update(String identifier, T instance) throws IOException;", "public void update(T instance) throws Exception {\n String primaryKeyValue=ReflectionUtils.getFieldValue(instance,instance.getPrimaryKeyName());\n if(null==primaryKeyValue){\n throw new Exception(\"This is no primary key value\");\n }\n\n initDBTableMeta(instance);\n String setClause=buildSQLKeyValueMap(instance,\",\");\n String whereClause =instance.getPrimaryKeyName()+\"=\"+primaryKeyValue;\n String sql = UPDATE+tableName+SET+setClause+WHERE+whereClause;\n logger.info(\"usedSql={}\", sql);\n\n }", "void update(ReferenceData instance) throws DataException;", "@Override\n\tpublic void update(Instance ins) {\n\t\t\n\t}", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void update(){}", "public void update(){}", "public void update() throws NotFoundException {\n\tUserDA.update(this);\n }", "public void update(Instalacion t) {\n this.instalaciones.save(t);\n\n }", "public void update() {\n manager.update();\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 void updateEntity();", "public static void setInstance(Singleton updated) {\n instance = updated;\n }", "@Override\r\n\tpublic void update(ReportingUrlCreation transientInstance){\n\t\ttry {\r\n\t\t\tgetSession().update(transientInstance);\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tre.printStackTrace();\r\n\t\t\tthrow re;\r\n\t\t}\r\n\t}", "E update(E entity);", "E update(E entity);", "E update(E entity) throws ValidationException;", "@Override\r\n\tpublic T update(T entity) throws Exception {\n\t\ttry {\r\n\t\t\tthis.getcurrentSession().update(entity);\r\n\t\t\treturn entity;\r\n\t\t}catch (NonUniqueObjectException e) {\r\n\t\t\tthis.getcurrentSession().merge(entity);\r\n\t\t\treturn entity;\r\n\t\t} catch (DataAccessException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tthrow new Exception(\"更新\" + entity.getClass().getName() + \"实例失败\", e);\r\n\t\t}\r\n\t}", "public void update(Object obj) throws HibException;", "void update(T instace);", "public void update(E entity);", "public ModifyInstanceResponse ModifyInstance(ModifyInstanceRequest req) throws TencentCloudSDKException{\n JsonResponseModel<ModifyInstanceResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<ModifyInstanceResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"ModifyInstance\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }", "public Address update(Address entity);", "Product update(Product product, long id);", "T update(T entity);", "T update(T entity);", "E update(ID id, E entity, RequestContext context);", "@PUT\n @Path(\"/update\")\n public void put() {\n System.out.println(\"PUT invoked\");\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n SqlManagedInstanceInner update(\n String resourceGroupName, String sqlManagedInstanceName, SqlManagedInstanceUpdate parameters);", "public boolean update(New object);", "public Client update(Client updated) throws EntityNotFoundException;", "public void updateClassifier(Instance instance) throws Exception {\n\n if (m_Train.equalHeaders(instance.dataset()) == false) {\n throw new Exception(\"Incompatible instance types\");\n }\t\n update(instance);\t\n }", "@Override\n\tpublic void update(Entry entry) {\n\t\tentryDAO.save(entry);\n\t}", "public void update()\n {\n modifier = coral.getCurrentSubject();\n modified = new Date();\n try\n {\n persistence.save(this);\n }\n catch(SQLException e)\n {\n throw new BackendException(\"failed to update resource's persitent image\", e);\n }\n try\n {\n Resource impl = coral.getStore().getResource(getId());\n coralEventHub.getGlobal().fireResourceChangeEvent(impl, modifier);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"inconsistent data\", e);\n }\n }", "void update(CE entity);", "public void update() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.update(this); // routine now uses leaseDao to get CampLease class\r\n\t}", "public void update(T obj) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t\t\n\t}", "public <T> T update(T entity);", "public void update() {}", "@Override\n\tpublic void update(Object entidade) {\n\t\t\n\t}", "public void update(T obj) {\n\t\tSession session = this.sessionFactory.getCurrentSession();\n\t\tsession.update(obj);\n\t}", "public Hoppy update(Hoppy hoppy) throws DataAccessException;", "Weather update(Long id, WeatherInformation weatherInformation);", "void update(T obj) throws PersistException;", "public void update(T entity) {\n\t\tsessionFactory.getCurrentSession().update(entity);\n\t}", "@Override\r\n\tpublic void update(T t) {\n\t\tgetSession().update(t);\r\n\t}", "void update(T entity) throws Exception;", "public void save(Object instance);", "Update withIdentity(Identity identity);", "public App update(App obj) {\n JsonNode n = getClient().put(\n String.format(Routes.APP_UPDATE, obj.getId()),\n toJsonNode(obj)\n );\n obj.merge(getMapper().convertValue(n, App.class));\n return obj;\n }", "void update(Student entity);", "public void update(Speaker speaker) {\n\t\tdao.update(speaker);\r\n\t}", "void update(Serializable objectId);", "public void update()\n\t{\n\t\tsuper.update();\n\t}", "public HrJBorrowcontract update(HrJBorrowcontract entity);", "public void attemptToUpdate();", "public PtJJdwcy update(PtJJdwcy entity);", "void update(T entity);", "void update(T entity);", "@ServiceMethod(returns = ReturnType.SINGLE)\n public VirtualMachineScaleSetVMInner update(\n String resourceGroupName,\n String vmScaleSetName,\n String instanceId,\n VirtualMachineScaleSetVMInner parameters,\n Context context) {\n return updateAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context).block();\n }", "public boolean update(Object obj) throws Exception;", "@Override\n public void update(T entity) throws SQLException {\n\n this.dao.update(entity);\n\n }", "public void update(User user);", "@Override\r\n\tpublic void update(Member member) {\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tsession.update(member);\r\n\t\tsession.flush();\r\n\t}", "E update(E entiry);", "public void update(K id, Update<P> update);", "Patient update(Patient patient);", "@PutMapping(\"/book\")\n public ResponseEntity<?> update(@RequestBody Book book) {\n bookService.update(book);\n\n return ResponseEntity.ok().body(\"Book has been updated successfully.\");\n }", "public Account update(Account user);", "@Override\n\tpublic void update(Member member) {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tsession.update(member);\n\t}", "@Override\n\tpublic PI update(PIDTO updated) throws NotFoundException {\n\t\treturn null;\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public VirtualMachineScaleSetVMInner update(\n String resourceGroupName, String vmScaleSetName, String instanceId, VirtualMachineScaleSetVMInner parameters) {\n return updateAsync(resourceGroupName, vmScaleSetName, instanceId, parameters).block();\n }", "boolean update(T entity) throws Exception;", "Product updateProductById(Long id);", "public void update(Account account) {\n\t\t\n\t}", "Account.Update update();", "public void update( final T model )\n\t{\n\t\tthis.dao.save( model );\n\t}", "public boolean update(ModelObject obj);", "@Test\n public void testUpdateSightingGP() throws InvalidIdException, InvalidEntityException {\n Sighting original = new Sighting(1, LocalDate.parse(\"2010-01-01\"), loc1, hero1);\n Sighting updated = new Sighting(1, LocalDate.parse(\"2015-01-01\"), loc1, hero1);\n \n Sighting toCheck = service.getSightingById(1);\n assertEquals(original, toCheck);\n \n service.updateSighting(updated);\n \n toCheck = service.getSightingById(1);\n assertEquals(updated, toCheck);\n assertNotEquals(original, toCheck);\n }", "public boolean update(Product product);", "@Override\n\tpublic void updateEntity(T t) {\n\t\tgetSession().update(t);\n\t}", "@Test\r\n public void testUpdate() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(recordDao.findActivityRecord(record.getId()));\r\n\r\n record.setDistance(15);\r\n record.setTime(20L);\r\n recordDao.update(record);\r\n\r\n ActivityRecord recordFound = recordDao.findActivityRecord(record.getId());\r\n assertEquals(recordFound.getDistance(), new Integer(15));\r\n assertEquals(recordFound.getTime(), new Long(20));\r\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<VirtualMachineScaleSetVMInner> updateAsync(\n String resourceGroupName,\n String vmScaleSetName,\n String instanceId,\n VirtualMachineScaleSetVMInner parameters,\n Context context) {\n return beginUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, parameters, context)\n .last()\n .flatMap(this.client::getLroFinalResultOrError);\n }", "Item update(Item item);", "@Override\r\n\tpublic void update(Account account) throws ServiceException {\n\r\n\t}", "void update(T objectToUpdate);", "@Override\n\tpublic void update() {\n\t\tobj.update();\n\t}", "@Override\n\tpublic Account update(Account account) {\n\t\taccount=initializeAccountForModification(account);\n\t\treturn accountRepository.save(account);\n\t}", "public void updateInstanceConfig(String clusterName, String instanceName,\n InstanceConfig instanceConfig) {\n updateInstanceConfig(clusterName, instanceName, instanceConfig, false);\n }", "void update(Discount discount) throws ServiceException;", "@Override\n\tpublic ImageEntity update(Object entity) {\n\t\tDatabaseContext.merge(entity);\n\t\treturn (ImageEntity) entity;\n\t}", "public void update(IEntity entity) throws SQLException;", "default E update(ID id, E entity) {\n return update(id, entity, null);\n }", "void update(Reservierung reservierung, int id) throws ReservierungException;", "@Override\n public void execute() {\n final VpcOffering result = _vpcProvSvc.updateVpcOffering(getId(), getVpcOfferingName(), getDisplayText(), getState());\n if (result != null) {\n final VpcOfferingResponse response = _responseGenerator.createVpcOfferingResponse(result);\n response.setResponseName(getCommandName());\n this.setResponseObject(response);\n } else {\n throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, \"Failed to update VPC offering\");\n }\n }", "public void updateByObject()\r\n\t{\n\t}", "public void update() {\n }", "@Override\r\n\tpublic void save(T instance) {\r\n\t\tif (isManaged(instance)) {\r\n\t\t\tgetEntityManager().merge(instance);\r\n\t\t} else {\r\n\t\t\tgetEntityManager().persist(instance);\r\n\t\t}\r\n\t}", "Update withDescription(String description);", "Update withDescription(String description);", "@Override\r\n\tpublic void update(BbsDto dto) {\n\t\t\r\n\t}" ]
[ "0.6620575", "0.6391556", "0.63141656", "0.6280964", "0.6198101", "0.59903586", "0.59903586", "0.59579283", "0.5925469", "0.58945876", "0.5844963", "0.5772836", "0.5728505", "0.5676608", "0.56695056", "0.56695056", "0.56404114", "0.5567734", "0.55664927", "0.55634886", "0.5548194", "0.554412", "0.55356073", "0.5534344", "0.5515005", "0.5515005", "0.5512531", "0.55090505", "0.5508471", "0.55004287", "0.54998094", "0.54827756", "0.54628855", "0.54606795", "0.5438306", "0.54361075", "0.5431785", "0.54268247", "0.5421867", "0.54194915", "0.5419454", "0.5402695", "0.53968275", "0.5392073", "0.5387341", "0.53710365", "0.53708804", "0.5364819", "0.53511107", "0.5346384", "0.53427315", "0.53333086", "0.5323152", "0.531207", "0.53093976", "0.5302235", "0.5300261", "0.5299795", "0.5299795", "0.52797526", "0.52770865", "0.52769506", "0.5266828", "0.52651054", "0.5264254", "0.5263552", "0.5262467", "0.5259736", "0.525648", "0.5251995", "0.525079", "0.52468777", "0.5246497", "0.52459264", "0.5236743", "0.5235555", "0.52253085", "0.5224945", "0.522232", "0.52220154", "0.5214602", "0.5210505", "0.52089584", "0.52065057", "0.5197988", "0.51964146", "0.51928425", "0.5187896", "0.5182958", "0.51739097", "0.5171573", "0.5171251", "0.5167396", "0.51559097", "0.5150474", "0.5146271", "0.51440173", "0.5142849", "0.5129839", "0.5129839", "0.51234007" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { for(int i = 1;i<100;i++){ MyThread mt = new MyThread("Thread"+i); Thread t = new Thread(mt); t.start(); } }
{ "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
// ACTIVE > EVENTS //
public void setActiveListener(boolean active) { if (active) { // Support without at load MassivePlugin plugin = this.getPlugin(); if (plugin.isEnabled()) { Bukkit.getPluginManager().registerEvents(this, this.getPlugin()); } } else { HandlerList.unregisterAll(this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void onActive(AcStatusEvent event) {\n\n\t\t}", "BasicEvents createBasicEvents();", "private void createEvents() {\n\t}", "public interface ActiveEvent {\n\n /**\n * Dispatch the event to its target, listeners of the events source,\n * or do whatever it is this event is supposed to do.\n */\n public void dispatch();\n}", "Event getEvent();", "public String getEventName();", "public GameEvent[] getEvents();", "private void doEvents() {\n\t\tapplyEvents(generateEvents());\t\t\n\t}", "IEvent[] getEvents();", "public abstract Event[] getInitialEvents();", "public void activated() \r\n\t{\r\n\t\t\r\n\t}", "public void onEvent(EventIterator events) {\n\n }", "EventType getEvent();", "boolean isActive();", "boolean isActive();", "boolean isActive();", "int isActive();", "@Override\n\tpublic Boolean isActve() {\n\t\treturn active;\n\t}", "public boolean isActive() { return true; }", "@Override\n\tpublic void loadEvents() {\n\t\t\n\t}", "EventUse createEventUse();", "public boolean getActive();", "public boolean getActive();", "@Override\n public boolean usesEvents()\n {\n return false;\n }", "public interface Events {\n\n /**\n * Archive has stored the entities within a SIP.\n * <p>\n * Indicates that a SIP has been sent to the archive. May represent an add,\n * or an update.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Number of entities archived</dd>\n * <dt>eventTarget</dt>\n * <dd>every archived entity</dd>\n * </dl>\n * </p>\n */\n public static final String ARCHIVE = \"archive\";\n\n /**\n * Signifies that an entity has been identified as a member of a specific\n * batch load process.\n * <p>\n * There may be an arbitrary number of independent events signifying the\n * same batch (same outcome, date, but different sets of targets). A unique\n * combination of date and outcome (batch label) identify a batch.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>Batch label/identifier</dd>\n * <dt>eventTarget</dt>\n * <dd>Entities in a batch</dd>\n * </dl>\n * </p>\n */\n public static final String BATCH = \"batch\";\n\n /**\n * File format characterization.\n * <p>\n * Indicates that a format has been verifiably characterized. Format\n * characterizations not accompanied by a corresponding characterization\n * event can be considered to be unverified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>format, in the form \"scheme formatId\" (whitespace separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of characterized file</dd>\n * </dl>\n * </p>\n */\n public static final String CHARACTERIZATION_FORMAT =\n \"characterization.format\";\n\n /**\n * Advanced file characterization and/or metadata extraction.\n * <p>\n * Indicates that some sort of characterization or extraction has produced a\n * document containing file metadata.\n * </p>\n * *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>id of File containing metadata</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File the metadata describes</dd>\n * </dl>\n */\n public static final String CHARACTERIZATION_METADATA =\n \"characterization.metadata\";\n\n /**\n * Initial deposit/transfer of an item into the DCS, preceding ingest.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>SIP identifier uid</dd>\n * <dt>eventTarget</dt>\n * <dd>id of deposited entity</dd>\n * </dl>\n * </p>\n */\n public static final String DEPOSIT = \"deposit\";\n\n /**\n * Content retrieved by dcs.\n * <p>\n * Represents the fact that content has been downloaded/retrieved by the\n * dcs.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstances\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been downloaded</dd>\n * </dl>\n */\n public static final String FILE_DOWNLOAD = \"file.download\";\n\n /**\n * uploaaded/downloaded file content resolution.\n * <p>\n * Indicates that the reference URI to a unit of uploaded or downloaded file\n * content has been resolved and replaced with the DCS file access URI.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>reference_URI</code> 'to' <code>dcs_URI</code></dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been resolved</dd>\n * </dl>\n */\n public static final String FILE_RESOLUTION_STAGED = \"file.resolution\";\n\n /**\n * Indicates the uploading of file content.\n * <p>\n * Represents the physical receipt of bytes from a client.\n * </p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>http header-like key/value pairs representing circumstanced\n * surrounding upload</dd>\n * <dt>eventTarget</dt>\n * <dd>id of File whose staged content has been uploaded</dd>\n * </dl>\n */\n public static final String FILE_UPLOAD = \"file.upload\";\n\n /**\n * Fixity computation/validation for a particular File.\n * <p>\n * Indicates that a particular digest has been computed for given file\n * content. Digest values not accompanied by a corresponding event may be\n * considered to be un-verified.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd>computed digest value of the form \"alorithm value\" (whitepsace\n * separated)</dd>\n * <dt>eventTarget</dt>\n * <dd>id of digested file</dd>\n * </dl>\n * </p>\n */\n public static final String FIXITY_DIGEST = \"fixity.digest\";\n\n /**\n * Assignment of an identifier to the given entity, replacing an\n * existing/temporary id. *\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventOutcome</dt>\n * <dd><code>old_identifier</code> 'to' <code>new_identifier</code></dd>\n * <dt>eventTarget</dt>\n * <dd>new id of object</dd>\n * </dl>\n */\n public static final String ID_ASSIGNMENT = \"identifier.assignment\";\n\n /**\n * Marks the start of an ingest process.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_START = \"ingest.start\";\n\n /**\n * Signifies a successful ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_SUCCESS = \"ingest.complete\";\n\n /**\n * Signifies a failed ingest outcome.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of all entities an ingest SIP</dd>\n * </dl>\n * </p>\n */\n public static final String INGEST_FAIL = \"ingest.fail\";\n\n /**\n * Signifies that a feature extraction or transform has successfully\n * occurred.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM = \"transform\";\n\n /**\n * Signifies that a feature extraction or transform failed.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of a DeliverableUnit or Collection</dd>\n * </dl>\n * </p>\n */\n public static final String TRANSFORM_FAIL = \"transform.fail\";\n\n /**\n * Signifies a file has been scanned by the virus scanner.\n * <p>\n * Indicates that a file has been scanned by a virus scanner. There could be\n * more than one event for a file.\n * </p>\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of file whose content was scanned</dd>\n * </dl>\n * </p>\n */\n public static final String VIRUS_SCAN = \"virus.scan\";\n\n /**\n * Signifies an new deliverable unit is being ingested as an update to the target deliverable unit.\n * <p>\n * <dl>\n * <dt>eventType</dt>\n * <dd>{@value}</dd>\n * <dt>eventTarget</dt>\n * <dd>id of the deliverable unit being updated</dd>\n * </dl>\n * </p>\n */\n public static final String DU_UPDATE = \"du.update\";\n\n}", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "public void consulterEvent() {\n\t\t\n\t}", "void currentStateChanged();", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void startEvent() {\n\t\t\r\n\t}", "@Override\n public boolean isActive() {\n return true;\n }", "public void activate(){\r\n\r\n\t}", "@Override\n\tpublic boolean isEventStarted() {\n\t\treturn status>=EventStarted;\n\t}", "private void createEvents()\r\n\t{\r\n\t\teventsCount.add(new Event(RequestMethod.PUT, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.GET, 0));\r\n\t\teventsCount.add(new Event(RequestMethod.POST, 0));\r\n\t}", "@Test\n public void testNearFront()\n {\n String sName = \"near-front-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "public void activate(){\r\n\t\tactive=true;\r\n\t}", "private\n boolean\n allowEvents()\n {\n return itsAllowEvents;\n }", "EventUses createEventUses();", "protected void activeActivity() {\n\t\tLog.i(STARTUP, \"active activity\");\n\t\tcheckActiveActivity();\n\t}", "boolean hasActive();", "public AutoEvents() {\n super();\n _autoEventList = new ArrayList();\n }", "@Override\r\n\tpublic void onEvent(Object e) {\n\t}", "@Override\r\n public void processEvent(IAEvent e) {\n\r\n }", "public void activate();", "static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}", "public void active() {\n createClassIfNotExists();\n\n globalHook = new OAuditingHook(security);\n\n retainTask =\n new TimerTask() {\n public void run() {\n retainLogs();\n }\n };\n\n long delay = 1000L;\n long period = 1000L * 60L * 60L * 24L;\n\n timer.scheduleAtFixedRate(retainTask, delay, period);\n\n Orient.instance().addDbLifecycleListener(this);\n if (context instanceof OServerAware) {\n if (((OServerAware) context).getDistributedManager() != null) {\n ((OServerAware) context).getDistributedManager().registerLifecycleListener(this);\n }\n }\n\n if (systemDbImporter != null && systemDbImporter.isEnabled()) {\n systemDbImporter.start();\n }\n }", "Event () {\n // Nothing to do here.\n }", "BasicEvent createBasicEvent();", "@Test\n public void testNear()\n {\n String sName = \"near-client-listener\";\n generateEvents(sName);\n checkEvents(true, false);\n }", "@Override\r\n\tprotected void initEvents() {\n\t\t\r\n\t}", "private void initializeEvents() {\r\n\t}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic int getEventType() {\n\t\treturn 0;\r\n\t}", "public String getEventId();", "void parseEventList() {\n\t\tfor (int eventsId : events.keySet()) {\n\t\t\tfinal Event event = events.get(eventsId);\n\t\t\tif (users.get(event.getUser().getName()).isActiveStatus()\n\t\t\t\t\t&& !event.isViewed()\n\t\t\t\t\t&& event.getInnerSisdate().compareTo(\n\t\t\t\t\t\t\tnew GregorianCalendar()) >= 0) {\n\t\t\t\tevent.setViewed(true);\n\t\t\t\tfinal SimpleDateFormat fm = new SimpleDateFormat(\n\t\t\t\t\t\t\"dd.MM.yyyy-HH:mm:ss\");\n\t\t\t\tt.schedule(new TimerTask() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tif (event.isActive()) {\n\t\t\t\t\t\t\tgenerateEventMessage(\"User \"\n\t\t\t\t\t\t\t\t\t+ event.getUser().getName()\n\t\t\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t\t\t+ fm.format(event.getInnerSisdate()\n\t\t\t\t\t\t\t\t\t\t\t.getTime()) + \" \" + event.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}, event.getInnerSisdate().getTime());\n\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public boolean active() {\n return false;\n }", "public Boolean isActive();", "public abstract boolean isActive();", "public interface OnStateListener{\n public void getState(String name);\n }", "public void activate()\n {\n }", "public boolean isActive(){\n return active;\n }", "public boolean isActive(){\n return active;\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "@Override\n protected void initializeEventList()\n {\n }", "void onStarted();", "@Override\n\tpublic void channelActive(GaoContext context) {\n\t\t\n\t}", "public void onActivation() { }", "@Override\n\tpublic void activate() {\n\t\t\n\t}", "@Override\n public void onActivate() {\n }", "public void invokeEvents() {\n\t\tIntent i = alertMe.createIntentFromSession();\n\t\ti.setClass(this, AlertMeEventHistory.class);\n\t\ti.putExtra(AlertMeConstants.INTENT_REQUEST_KEY, AlertMeConstants.INVOKE_HISTORY);\n startActivityForResult(i, AlertMeConstants.INVOKE_HISTORY);\n }", "@DISPID(8) //= 0x8. The runtime will prefer the VTID if present\r\n @VTID(15)\r\n short persistsEvents();", "public abstract Map<String, Event> getEvents();", "@Override\r\n\tpublic void onEvent(Event arg0) {\n\r\n\t}", "ScheduledEvents getScheduledEvents();", "public boolean active(){\r\n\t\treturn active;\r\n\t}", "List<StatusListener> mo9950b();", "com.walgreens.rxit.ch.cda.EIVLEvent getEvent();", "public interface Event {\n\n}", "public interface Event {\n\n}", "@Override\n public boolean isActive() {\n return active;\n }", "public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }", "EventManager()\n {\n }", "@Override\n public void activate() {\n\n }", "public interface Event\n\t{\n\t\tpublic static final String EVENT_ID = \"aether.event.id\";\n\t\tpublic static final String TIME = \"aether.event.time\";\n\t\tpublic static final String EVENT_TYPE = \"aether.event.type\";\n\t}", "public void setActiveStatus(Boolean active){ this.status = active; }", "@Override\r\n public boolean isActive() {\r\n return m_active;\r\n }" ]
[ "0.68703955", "0.65916324", "0.65146685", "0.63341033", "0.6066739", "0.60426253", "0.60134894", "0.5998379", "0.5978087", "0.59634393", "0.59355605", "0.5929459", "0.5919127", "0.59106326", "0.59106326", "0.59106326", "0.58961326", "0.5878147", "0.58634824", "0.58529055", "0.5850799", "0.5792962", "0.5792962", "0.577864", "0.577711", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57698417", "0.57647574", "0.57547134", "0.57395804", "0.57305396", "0.57305396", "0.5719587", "0.5718593", "0.5711736", "0.5689723", "0.5687682", "0.56873304", "0.56842643", "0.5678193", "0.56741464", "0.56708646", "0.56656927", "0.565943", "0.56560653", "0.5631755", "0.56199557", "0.5619936", "0.56127584", "0.5604988", "0.56007", "0.5599486", "0.559725", "0.559173", "0.559173", "0.5590992", "0.5585746", "0.5579202", "0.5579092", "0.5574024", "0.55734605", "0.5572077", "0.5567255", "0.5567255", "0.55672413", "0.5564606", "0.55583954", "0.5556452", "0.55457836", "0.55294603", "0.55280936", "0.5526582", "0.55232036", "0.55207103", "0.551719", "0.5516209", "0.5514316", "0.5513563", "0.5512661", "0.5512593", "0.5512593", "0.55097306", "0.55039656", "0.55029774", "0.54988045", "0.5496678", "0.54949063", "0.5494416" ]
0.0
-1
// ACTIVE > TASK //
public void setActiveTask(boolean active) { if (active) { if (this.getPeriod() != null) { // Support without at load MassivePlugin plugin = this.getPlugin(); if (plugin.isEnabled()) { if (this.isSync()) { this.task = Bukkit.getScheduler().runTaskTimer(this.getPlugin(), this, this.getDelay(), this.getPeriod()); } else { this.task = Bukkit.getScheduler().runTaskTimerAsynchronously(this.getPlugin(), this, this.getDelay(), this.getPeriod()); } } } } else { if (this.task != null) { this.task.cancel(); this.task = null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int activeTasks();", "boolean updateActiveTask(Task task);", "public interface Task extends Runnable {\n\n /**\n * Get the task name\n *\n * @return\n */\n public String getTaskName();\n\n /**\n *\n * @return true if the task is in active, else false\n */\n public boolean isActive();\n\n /**\n * @return priority of the task\n */\n public int getPriority();\n\n /**\n *\n * @return the sequence number of the task. If two tasks has same priority,\n * then the task with less sequence number executes first.\n */\n public int getSequenceNumber();\n}", "abstract boolean shouldTaskActivate();", "public List<TaskDescription> getActiveTasks();", "@Override\n public TaskForceState getState() {\n return TaskForceState.ACTIVE;\n }", "public void subTask(String name) {\n\r\n\t}", "@VisibleForTesting(otherwise = VisibleForTesting.NONE)\r\n LiveData<Task> getActiveTask();", "@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}", "int createParentTask();", "public Task getTask(Integer tid);", "public void beginTask(String tr) {\n\t\t\n\t}", "@Override\r\n\tpublic void subTask(String name) {\n\t}", "@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}", "Task createTask();", "Task createTask();", "Task createTask();", "String getTaskId();", "TaskStatus getStatus();", "public void subTask(String tr) {\n\t\t\n\t}", "Object getTaskId();", "protected abstract void createTasks();", "WorkingTask getWorkingTask();", "public interface TaskBase {\n\t/**\n\t * @return Returns the name of the task\n\t */\n\tpublic String GetName();\n\n\t/**\n\t * Called upon entering autonomous mode\n\t */\n\tpublic void Initialize();\n\n\t/**\n\t * Called every autonomous update\n\t * \n\t * @return Return task result enum\n\t */\n\tpublic TaskReturnType Run();\n\n}", "public Task getTask() { return task; }", "public String getTask(){\n\treturn task;\n}", "public TaskCurrent() {\n\t}", "public void beginTask(String tr, int i) {\n\t\t\n\t}", "public static void main(String[] args) {\n Task a = new Task(\"s\", new Date(0), new Date(1000*3600*24*7), 3600);\n a.setActive(true);\n System.out.println(a.getStartTime());\n System.out.println(a.getEndTime());\n System.out.println(a.nextTimeAfter(new Date(0)));\n\n\n\n }", "public int getCustTask()\n\t{\n\t\treturn task;\n\t}", "public ITask getTask() {\n \t\treturn task;\n \t}", "public abstract String getTaskName();", "@Transactional \n public void start(){\n\t \n System.out.println(repositoryService.createDeployment().addClasspathResource(\"diagrams/taskProcess.bpmn\").deploy().getName());\n Map<String, Object> vars1 = new HashMap<String, Object>();\n\t \n\tString procId = runtimeService.startProcessInstanceByKey(\"myProcess\", vars1).getId();\n \n System.out.println(\"启动流程流程id=\"+procId);\n \n // 获得第一个任务\n List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(\"bin\").list();\n //List<Task> tasks = taskService.createTaskQuery().taskCandidateUser(\"test\").list();\n for (Task task : tasks) {\n System.out.println(\"要分配的任名称 \" + task.getName());\n //分配的用户\n taskService.claim(task.getId(), \"bin\");\n }\n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n for (Task task : tasks) {\n System.out.println(\"接收到的任务 \" + task.getName());\n // 执行(完成)任务\n taskService.complete(task.getId());\n } \n \n tasks = taskService.createTaskQuery().taskCandidateGroup(\"management\").list();\n for (Task task : tasks) {\n System.out.println(\"分配任务\" + task.getName());\n // 分配给的人\n taskService.claim(task.getId(), \"bin\");\n \n }\n \n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n \n for (Task task : tasks) {\n \t System.out.println(\"收到的任务\" + task.getName());\n taskService.complete(task.getId());\n }\n \n \n }", "public void startTask() {\n\t}", "int getTask() {\n return task;\n }", "public void checkTask(String task){\r\n\t\t\r\n\t}", "public String getTask() {\n return task;\n }", "public String getTask() {\n return task;\n }", "public interface Task {\n\n /**\n * Getter for the conversaitonal object concerned with this task.\n * @return the conversational object owning this task\n */\n ConversationalObject getTaskOwner();\n\n /**\n * Stter for the conversaitonal object concerned with this task.\n * @param taskOwner the task owner to set.\n */\n void setTaskOwner(ConversationalObject taskOwner);\n\n /**\n * Getter for the status of this task\n * @return the current status of this task\n */\n TaskStatus getStatus();\n\n /**\n * Setter for the status of this task\n * @param status\n */\n void setStatus(TaskStatus status);\n\n /**\n * Getter for the stage of this task. It is strongly recomended that concrete\n * task classes declare static final string variables to refer to there\n * possible stages.\n * @return The current stage of this task\n */\n String getStage();\n\n /**\n * Getter for the result of this task.\n * @return the result of this task, or {@code null} if the task is not\n * finished.\n */\n TaskResult getResult();\n\n /**\n * Getter for the set of tasks that depend from this task\n * @return The set of dependent tasks (can be null)\n */\n Set<Task> getDependentTasks();\n\n /**\n * Setter for the set of tasks that depend from this task\n * @param dependentTasks the set of dependent tasks to set\n */\n void setDependentTasks(Set<Task> dependentTasks);\n\n /**\n * Getter for the aggregated task this task has generated and is dependent on.\n * @return The aggregated task, if any (can be null)\n */\n Task getAggregatedTask();\n\n /**\n * Setter for the aggregated task this task has generated and is dependent on.\n * @param aggregatedTask the aggregated task to set\n */\n void setAggregatedTask(Task aggregatedTask);\n\n // TODO Other references could be added to extend the tasks model: e.g.\n // (1) subtasks: list of tasks composing this task, i.e. that should be\n // executed\n // in sequence in order to complete this task, and\n // (2) supertask: reversely, task this task is a subtask of.\n\n /**\n * Getter for the set of conversations this task generated and is now\n * dependent on.\n * @return the set of generated conversations\n */\n Set<OnGoingConversation> getGeneratedConversations();\n\n /**\n * Setter for generatedConversations.\n * @param generatedConversations the set of generatedConversations to set\n */\n void setGeneratedConversations(\n Set<OnGoingConversation> generatedConversations);\n\n /**\n * Cuts all references to other objects so that the garbage collector can\n * destroy them after having destroyed this task, if they are not referenced\n * by other objects than this task. Should be executed before removing the\n * last reference to this task (usually before removing this task from the set\n * of tasks of a conversational object)\n */\n void clean();\n\n /**\n * Executes the task. Specific to each concrete task class.\n */\n void execute();\n}", "@Override\n\t\tpublic void beginTask(String arg0, int arg1) {\n\n\t\t}", "@Override\n\tpublic void preExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Task begin execute!\");\n\t}", "public abstract void task();", "public String getTaskName();", "public interface TaskManager {\n\t/**\n\t * @return all the tasks that have to be executed\n\t */\n\tvoid getTasks();\n}", "public interface ITask {\n\n String getId();\n boolean isComplete();\n\n}", "@Override\n\tpublic void task() {\n\t\tst.subTask();\n System.out.println(\"This is UI Task\");\n\t}", "public void setTaskName(String name) {\n\r\n\t}", "boolean hasTask();", "@Override\n public void activateTask(@NonNull String taskId) {\n }", "public interface Task {\n\t\t/** Insertion tuples */\n\t\tpublic TupleSet insertions();\n\n\t\t/** Deletion tuples. */\n\t\tpublic TupleSet deletions();\n\n\t\t/** The program name that should evaluate the tuples. */\n\t\tpublic String program();\n\n\t\t/** The name of the table to which the tuples belong. */\n\t\tpublic TableName name();\n\t}", "public String getType() {\n return \"Task\";\n }", "public Task getTask() {\n return task;\n }", "String addTask(Task task);", "public void setTask(Task inTask){\n punchTask = inTask;\n }", "public void activatedTask(BudgetValue budget, Sentence sentence, boolean isInput) {\r\n Task task = new Task(sentence, budget, this);\r\n newTasks.add(task);\r\n }", "public interface SingletonTask extends Task {\n}", "@Override\n public String toString() {\n return \"Task no \"+id ;\n }", "public Task addResponsibleTask() {\n for (Task task : getTasks()) {\n if (isActiveResponsible(task)) {\n task.setProp(WorkflowSpecificModel.Props.ACTIVE, Boolean.FALSE);\n }\n }\n // Create new active responsible task\n Task task = addTask();\n task.getNode().getAspects().add(WorkflowSpecificModel.Aspects.RESPONSIBLE);\n task.setProp(WorkflowSpecificModel.Props.ACTIVE, Boolean.TRUE);\n return task;\n }", "public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);", "public interface ITaskController {\n\n void showTasks();\n Task addTask();\n boolean removeTask();\n boolean performTask(String path);\n Task takeTask(int taskNum);\n}", "public void a() {\n NamedRunnable active;\n synchronized (this.mTasks) {\n if (!this.mTasks.isEmpty()) {\n this.mActive = this.mTasks.remove(0);\n } else {\n this.mActive = null;\n com.alipay.mobile.common.task.Log.v(TAG, \"mTasks is empty.\");\n }\n active = this.mActive;\n }\n if (active != null) {\n com.alipay.mobile.common.task.Log.d(TAG, \"StandardPipeline.scheduleNext()\");\n if (this.a != null) {\n this.a.execute(active);\n return;\n }\n throw new RuntimeException(\"The StandardPipeline's Executor is null.\");\n }\n com.alipay.mobile.common.task.Log.d(TAG, \"StandardPipeline.scheduleNext(mTasks is empty)\");\n }", "@Test\n\t@Deployment(resources=\"process.bpmn\")\n\tpublic void testCompletionOftask() {\n\t\tProcessInstanceWithVariables processInstance = (ProcessInstanceWithVariables) processEngine().getRuntimeService().startProcessInstanceByKey(PROCESS_DEFINITION_KEY);\n\t\t\n\t\t//Obtain a reference to the current task\n\t\tTaskAssert taskAssert = assertThat(processInstance).task();\n\t\tTaskEntity task = (TaskEntity) taskAssert.getActual();\n\t\ttask.delegate(\"user\");\n\t\ttask.resolve();\n\t\n\t\t\n\t}", "Task(String name) {\n this.name = name;\n }", "@SuppressWarnings(\"unchecked\")\n public List<Item> getActiveTasks() {\n Session session = this.factory.openSession();\n List<Item> list = session.createQuery(\"from Item where status = 0\").list();\n session.close();\n return list;\n }", "ITaskView getTaskView();", "private static void executeTask02() {\n }", "@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}", "public abstract SystemTask getTask(Project project);", "private String getTaskName() {\n \n \t\treturn this.environment.getTaskName() + \" (\" + (this.environment.getIndexInSubtaskGroup() + 1) + \"/\"\n \t\t\t+ this.environment.getCurrentNumberOfSubtasks() + \")\";\n \t}", "void addSubTask(AuctionTask task);", "public interface OrderedTask {\n\n /**\n * @return The set of tasks this task is directly dependent on.\n */\n Set<OrderedTask> getPredecessors();\n \n /**\n * Returns the depth in the task \"tree\" (based on the predecessors). This is used to order\n * the tasks in {@link OrderedTaskComparator}.\n * <p>\n * The standard {@link PriorityQueue} class requires total ordering of the elements which\n * would not be possible based only on the predecessors. The depth of an element gives us a good\n * measure upon which the total ordering can be based.\n * \n * @return the depth in the task tree\n */\n int getDepth();\n \n /**\n * @return true if this task is considered finished.\n */\n boolean isFinished(); \n \n void setFinished(boolean value);\n}", "@Override\n public String toString()\n {\n if(!isActive()) return \"Task \" + title + \" is inactive\";\n else\n {\n if(!isRepeated()) return \"Task \" + title + \" at \" + time;\n else return \"Task \" + title + \" from \" + start + \" to \" + end + \" every \" + repeat + \" seconds\";\n }\n }", "String getTaskName();", "String getTaskName();", "private Task getFirstTestTask() {\n Task task = new Task();\n task.setName(\"Buy Milk\");\n task.setCalendarDateTime(TODAY);\n task.addTag(\"personal\");\n task.setCompleted();\n return task;\n }", "public TaskProvider getTaskProvider();", "int createSubtask(int parentId);", "@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}", "int insertTask(TaskInfo taskInfo);", "@Override\n public String getTaskType() {\n return \"T\";\n }", "public String getTaskId() {\n return this.taskId;\n }", "public void updateTask() {}", "public interface ITask extends PropertyChangeListener{\n\tvoid execute();\n\tvoid interrupt();\n\tboolean toBeRemoved();\n\n\t//Using update tick\n\tboolean updateTick();\n\n\t//Using time\n\t//long getWaittime();\n\t//long getEndtime();\n\n\n}", "public Task getTask(){\n return punchTask;\n }", "public TaskState getTaskState() {\n return this.taskState;\n }", "public interface Task {\n void execute() ;\n}", "public String getTaskId(){\r\n\t\treturn this.taskId;\r\n\t}", "TaskFactory getTaskFactory();", "@Override\n public void taskStarting() {\n\n }", "public String GiveTask(){\n return \"[\" + getStatusIcon() + \"] \" + this.description;\n }", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "TaskNode getNode(Task task);", "public Task(String name) {\n\t\tthis.name=name;\n\t}", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "public String getTaskName(){\r\n\t\treturn this.taskName;\r\n\t}", "public Task makeTask() {\n Task new_task = new Task();\n new_task.setAction(this);\n new_task.setDeadline(\n new Date(System.currentTimeMillis() + deadlineSeconds() * 1000L));\n\n return new_task;\n }", "@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "public void myTasks() {\n mMyTasks = true;\n onResume();\n }", "private void arrangeSingleTask(final Task task) {\n\t\ttask.arrangeTask(list,markerStatus,0);\n \tif (task.isReverseScheduled())\n\t\t\tnumberOfReverseScheduledTasks++;\n\t}" ]
[ "0.74015385", "0.719019", "0.69491816", "0.690613", "0.68000823", "0.6709815", "0.67001945", "0.6673955", "0.66594356", "0.6637147", "0.65756226", "0.65188956", "0.65091777", "0.64779073", "0.6464802", "0.6464802", "0.6464802", "0.6461576", "0.6441868", "0.6418894", "0.6403769", "0.6400048", "0.6393469", "0.63902014", "0.63607347", "0.63505507", "0.63267213", "0.62925106", "0.6287513", "0.62866616", "0.625445", "0.6232803", "0.6222188", "0.62040454", "0.6201412", "0.6193709", "0.6181071", "0.6181071", "0.61760753", "0.6166767", "0.61564416", "0.6149733", "0.61473787", "0.614571", "0.6120446", "0.6103122", "0.61016196", "0.60900337", "0.6074115", "0.6067992", "0.602427", "0.602234", "0.6021576", "0.6009344", "0.60076827", "0.60030967", "0.6001454", "0.59985363", "0.599585", "0.59895784", "0.5984907", "0.5980151", "0.597409", "0.59728783", "0.5971957", "0.59622717", "0.596106", "0.59549004", "0.5953877", "0.5953002", "0.5946579", "0.59452444", "0.5938489", "0.5938489", "0.5938068", "0.5934235", "0.5929658", "0.59286416", "0.5923368", "0.59212154", "0.59183294", "0.59123445", "0.59096277", "0.59072286", "0.59071225", "0.5902925", "0.58909756", "0.58842254", "0.58704984", "0.5853419", "0.5846894", "0.5846017", "0.58431596", "0.58424604", "0.58415765", "0.5827483", "0.5817723", "0.58107084", "0.5809308", "0.58055013" ]
0.6446069
18
// ACTIVE > INNER //
public void setActiveInner(boolean active) { // NOTE: Here you can add some extra custom logic. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getActive()\r\n/* */ {\r\n/* 200 */ return this.active;\r\n/* */ }", "int isActive();", "public boolean isActive() { return true; }", "boolean isActive();", "boolean isActive();", "boolean isActive();", "public Active getActive() {\n return _active;\n }", "public boolean isActive(){\n return active;\n }", "public boolean isActive(){\n return active;\n }", "public boolean getActive();", "public boolean getActive();", "public Boolean isActive(){return status;}", "public void setActive() {\n\t\tactive = true;\n\t}", "@Override\n\tpublic Boolean isActve() {\n\t\treturn active;\n\t}", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "public boolean isActive();", "@Override\r\n public boolean isActive() {\r\n return m_active;\r\n }", "public void activate(){\r\n\t\tactive=true;\r\n\t}", "public abstract Boolean isActive();", "public abstract boolean isActive();", "public void setActiveStatus(Boolean active){ this.status = active; }", "public boolean isActive(){\r\n\t\treturn active_;\r\n\t}", "public Boolean isActive();", "public boolean active(){\r\n\t\treturn active;\r\n\t}", "public boolean isActive() \n {\n return this.active;\n }", "public void toggleActive(){\n this.active = !this.active;\n }", "public boolean isActive(){\n\t\treturn active;\n\t}", "public boolean isActive()\r\n\t{\r\n\t\treturn active;\r\n\t}", "boolean isInactive() {\n/* 4818 */ return this.inactive;\n/* */ }", "public void setActive(boolean active){\r\n\t\tactive_ = active;\r\n\t}", "public void setActive(boolean active) { \n this.active = active;\n }", "public boolean isActive( ) {\n\t\treturn active;\n\t}", "boolean hasActive();", "public boolean isActive()\n {\n return active;\n }", "@Override\n public boolean isActive() {\n return active;\n }", "public void activated() \r\n\t{\r\n\t\t\r\n\t}", "@Override\n public boolean isActive() {\n return true;\n }", "public void setActive(boolean active) {\r\n this.active = active;\r\n }", "public boolean isActive() {\r\n return active;\r\n }", "public Boolean getActive() {\n\t\treturn this.Active;\n\t}", "public void setActive(boolean active)\n {\n this.active = active;\n }", "public boolean activate(){\n mIsActive = true;\n return mIsActive;\n }", "public int active() {\n return this.active;\n }", "public void setActive(boolean active) {\r\n this.active = active;\r\n }", "public boolean getActive()\n {\n return this.active;\n }", "public boolean isActive() \n {\n return mIsActive;\n }", "public boolean isActive() {\n return this.active;\n }", "public void setActive(boolean active) {\n this.active = active;\n }", "public void setActive(boolean active) {\n this.active = active;\n }", "public void setActive(boolean active) {\n this.active = active;\n }", "public static boolean isActive(){\n return active;\n }", "public Boolean getActive() {\n return this.active;\n }", "public Boolean getActive() {\n return this.active;\n }", "@Override\r\n\tpublic boolean getState() {\n\t\treturn activated;\r\n\t}", "public void setActive( boolean tof ) {\n\t\tthis.active = tof;\n\t}", "public boolean isActive() {\r\n\t\treturn active;\r\n\t}", "public boolean isActive() {\r\n return active;\r\n }", "public boolean isActive() {\r\n return active;\r\n }", "@Override\n public boolean isActive() {\n return amIActive;\n }", "@Override\n public boolean isActive() {\n return amIActive;\n }", "public boolean active() //ignores them. yeahhhhhh\r\n\t{\r\n\t\treturn super.getPhase();\r\n\t}", "public boolean isActive() {\n\t\treturn active;\n\t}", "public void activate(){\r\n\r\n\t}", "public void setActive(Boolean active) {\n\t\tthis.Active = active;\n\t}", "public boolean isActive() {\n return active;\n }", "public boolean isActive() {\n return active;\n }", "public boolean isActive() {\n return active;\n }", "public boolean isActive() {\n return active;\n }", "public boolean isActive() {\n return active;\n }", "public boolean isActive() {\n return active;\n }", "public boolean isActive(){\n\t\treturn false;\n\t}", "OperationalState operationalState();", "OperationalState operationalState();", "public boolean toggleActive(){\r\n isActive = !isActive;\r\n return isActive;\r\n }", "public int isActive() {\n return isActive;\n }", "public void setActive(Boolean active) {\n this.active = active;\n }", "public void setActive(boolean isActive) {\r\n\t\tthis.isActive = isActive;\r\n\t}", "@Override\n public boolean active() {\n return false;\n }", "@Override\n public boolean isActive() {\n return isActive;\n }", "public void setActive(boolean active) {\n _isActive = active;\n }", "public void setActive(boolean value) {\n this.active = value;\n }", "public void setActive(Boolean active)\r\n/* */ {\r\n/* 207 */ this.active = active;\r\n/* */ }", "private Criteria buildActiveCriteria(){\r\n Criteria criteria = new Criteria();\r\n criteria.addEqualTo(KRADPropertyConstants.ACTIVE, true);\r\n\r\n return criteria;\r\n }", "protected synchronized void setActive(final boolean b) {\n active = b;\n }", "public void setIsActive(Integer isActive) {\n this.isActive = isActive;\n }", "public void setIsActive(Byte isActive) {\n this.isActive = isActive;\n }", "public void setActive(boolean active);" ]
[ "0.61812365", "0.6043999", "0.6040526", "0.6032546", "0.6032546", "0.6032546", "0.587033", "0.5867184", "0.5867184", "0.58398366", "0.58398366", "0.58394533", "0.58356625", "0.58056515", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.5802301", "0.57915866", "0.5788331", "0.5787225", "0.5777951", "0.5773928", "0.57697004", "0.5769137", "0.573827", "0.5735023", "0.57238895", "0.5715792", "0.57030576", "0.57029086", "0.5683377", "0.5647498", "0.5638697", "0.562742", "0.56257004", "0.56122416", "0.560712", "0.55994844", "0.55892986", "0.5581705", "0.5579683", "0.55684584", "0.5567239", "0.55386627", "0.5538007", "0.55350786", "0.55132306", "0.55043244", "0.549677", "0.549677", "0.549677", "0.54868495", "0.5482122", "0.5482122", "0.5474432", "0.5465953", "0.546083", "0.5457881", "0.5457881", "0.5455352", "0.5455352", "0.54490626", "0.5442256", "0.5440526", "0.5425714", "0.5417347", "0.5417347", "0.5417347", "0.5417347", "0.5417347", "0.5417347", "0.5411682", "0.5409289", "0.5409289", "0.54061157", "0.5403922", "0.5391335", "0.53904784", "0.5388733", "0.53850204", "0.5382913", "0.5375461", "0.5364471", "0.53555775", "0.53473485", "0.53465027", "0.5345654", "0.5341451" ]
0.71119213
0
// IS OFF HAND //
public static boolean isOffHand(PlayerInteractEntityEvent event) { try { return event.getHand() == org.bukkit.inventory.EquipmentSlot.OFF_HAND; } catch (Throwable t) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void off() {\n\n\t}", "@Override\r\n\tpublic void off() {\n\r\n\t}", "@Override\n\tpublic void off() {\n\n\t}", "public void off() throws Exception;", "@Override\n\tpublic void turnOff() {\n\n\t}", "public void turn_off () {\n this.on = false;\n }", "public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}", "@Override\n public void turnOff() {\n System.out.println(\"this wont happen\");\n }", "public boolean method_4088() {\n return false;\n }", "@Override\n\tpublic void canTakeOff() {\n\t\tSystem.out.println(\"I CANNOT TAKE OFF UNLESS YA JUMP ME OVER SOMMAT\");\n\t}", "public boolean method_2453() {\r\n return false;\r\n }", "public boolean method_218() {\r\n return false;\r\n }", "@Override\r\n\tpublic String takeOff() {\n\t\tString despegar = \"Puede despegar\";\r\n\t\treturn despegar;\r\n\t}", "public Boolean off()\r\n\t{\r\n\t\tString cmd;\r\n\t\t\r\n\t\tcmd = \"flippers/off?null=true\";\r\n\t\treturn cmdSimpleResult(cmd);\r\n\t}", "@Override\n\tpublic void off() {\n\t\tSystem.out.println(\"turn off the \"+name+\" Light\");\n\t}", "public void switchOff();", "public boolean method_216() {\r\n return false;\r\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public void off() {\n\t\tSystem.out.println(\"Tuner is off\");\n\t}", "public void turnOff() {\n\t\tOn = false;\n\t\tVolume = 1;\n\t\tChannel = 1;\n\t}", "public boolean method_208() {\r\n return false;\r\n }", "private OffState() {\n instance = this;\n }", "public boolean mo72a() {\n return false;\n }", "protected boolean func_70041_e_() { return false; }", "public boolean method_4093() {\n return false;\n }", "protected abstract void switchOffCustom();", "public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }", "@Override\n\tpublic void msgTurnOff() {\n\t\t\n\t}", "@Override\n\tpublic void turnOn() {\n\n\t}", "public void setEngineOff();", "public boolean method_210() {\r\n return false;\r\n }", "public abstract void mo20900UP();", "public void engineOff(){\n engine = false;\n }", "public final boolean aow() {\n return false;\n }", "public final void mo92083O() {\n }", "public void off() {\n this.relay.set(Relay.Value.kOff);\n }", "public void turnOff() {\n\t\tisOn = false;\n\t}", "public boolean isOn() {\n\t\treturn false;\n\t}", "protected boolean func_70814_o() { return true; }", "public boolean method_108() {\r\n return false;\r\n }", "public boolean method_214() {\r\n return false;\r\n }", "public boolean method_196() {\r\n return false;\r\n }", "public void setSensorOff() {\n\n }", "public boolean mo8810b() {\n return false;\n }", "private void m50366E() {\n }", "public boolean method_4102() {\n return false;\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void offLineMode ();", "@Override\n\tpublic boolean identifiesOffense() {\n\t\treturn false;\n\t}", "public boolean method_3897() {\r\n return false;\r\n }", "@Override\r\n\tpublic String takeOff() {\n\t\treturn \"El Helicoptero esta despegando\";\r\n\t}", "public void off() {\n // Sets the LED pin state to (low)\n ledPin.low();\n }", "public boolean mo64135b() {\n return false;\n }", "public void turnOff() {\n update(0,0,0);\n this.status = false;\n }", "public void mo3494b() {\n this.f9354e = false;\n }", "public void buyFarm(){\n bought = !bought;\n }", "@Override\r\n\tprotected int _twoDScanningOnOff(boolean onOff) throws NotOpenSerialException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t SerialPortErrorException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t SendTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t RecvTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseCodeException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ProtocolParsingException {\r\n\t\treturn 0;\r\n\t}", "public boolean method_194() {\r\n return false;\r\n }", "public boolean method_4132() {\n return false;\n }", "static void m7753b() {\n f8029a = false;\n }", "public abstract void wgb_onDisable();", "@Override\r\n\tprotected int _oneDScanningOnOff(boolean onOff) throws NotOpenSerialException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t SerialPortErrorException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t SendTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t RecvTimeoutException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ResponseCodeException, \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ProtocolParsingException {\r\n\t\treturn 0;\r\n\t}", "public boolean method_198() {\r\n return false;\r\n }", "public boolean mo2467a() {\n return false;\n }", "public boolean mo7081t() {\n return false;\n }", "public boolean mo2469c() {\n return false;\n }", "public void mo11153b() {\n m48032c(false);\n }", "@Override\n\tpublic boolean paie() {\n\t\treturn false;\n\t}", "public void turnOff(){\n vendingMachine = null;\n Logger.getGlobal().log(Level.INFO,\" Turning Off...\");\n }", "public void turnLightsOff()\n {\n set(Relay.Value.kOff);\n }", "@Override\r\n\tboolean isSunk() {\r\n\t\treturn false;\r\n\t}", "public boolean isDirect()\r\n/* 76: */ {\r\n/* 77:111 */ return false;\r\n/* 78: */ }", "public boolean mo8393h() {\n return false;\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public boolean mo56165b() {\n return false;\n }", "public boolean mo9236at() {\n return false;\n }", "public void mo2470d() {\n }", "protected final boolean wasSwitchedOff() {\r\n\t\treturn switchedOff;\r\n\t}", "public abstract void mo20899UO();", "public abstract void mo56925d();", "public void mo21779D() {\n }", "public boolean mo7339w() {\n return false;\n }", "public void disconnetti() {\n\t\tconnesso = false;\n\t}", "private void checkOffStatus(ServiceState s) {\n assertFalse(s.getRoaming());\n assertNull(s.getOperatorAlphaLong());\n assertNull(s.getOperatorAlphaShort());\n assertNull(s.getOperatorNumeric());\n assertFalse(s.getIsManualSelection());\n }", "@Override\r\n\tpublic String takeOff() {\n\t\treturn \"SuperMan I Take Off\";\r\n\t}", "@Override\r\n\tpublic void offMachine() {\n\t\t System.out.println(\"Off the machine when the cook is done \");\r\n\t}", "void disable() {\n }", "public void mo3370l() {\n }", "public boolean mo7085w() {\n return false;\n }", "public final void mo51373a() {\n }", "private Unescaper() {\n\n\t}", "protected void mo6255a() {\n }", "void unsetStraight();", "public boolean mo55998a() {\n return false;\n }", "public boolean mo100108c() {\n return false;\n }" ]
[ "0.7202544", "0.70998317", "0.7097315", "0.6898583", "0.675851", "0.6649892", "0.6478214", "0.6464344", "0.6457769", "0.64170825", "0.63725674", "0.6357615", "0.634019", "0.63249034", "0.63214666", "0.62699074", "0.6269071", "0.623589", "0.6220539", "0.6212829", "0.62081325", "0.62060356", "0.62054557", "0.62021625", "0.61852646", "0.61791325", "0.6176527", "0.6141757", "0.61395156", "0.6113223", "0.6110022", "0.6109832", "0.61058044", "0.60964537", "0.6090545", "0.6068215", "0.6066194", "0.60609996", "0.60604376", "0.6055932", "0.6045688", "0.60447806", "0.6044387", "0.6043912", "0.60196525", "0.6013272", "0.59944355", "0.59941196", "0.59918785", "0.59745276", "0.5961813", "0.59558123", "0.59458184", "0.59432244", "0.59357476", "0.5934593", "0.59269", "0.5921228", "0.59210414", "0.591984", "0.59191936", "0.5912232", "0.59065014", "0.59057254", "0.59036237", "0.5901431", "0.5901309", "0.5898904", "0.5896485", "0.58957285", "0.5894096", "0.5892451", "0.589036", "0.5884541", "0.5884541", "0.5884541", "0.5884541", "0.5884541", "0.5884541", "0.5884541", "0.5881506", "0.58782613", "0.5871301", "0.5869402", "0.58687943", "0.5868415", "0.5866485", "0.5854821", "0.5850302", "0.58453226", "0.58394337", "0.5838169", "0.58380014", "0.58353496", "0.58292973", "0.58286095", "0.5827962", "0.5824885", "0.581848", "0.5813255", "0.58116275" ]
0.0
-1
/ OverlayItem item = hOverlays.get(index); AlertDialog.Builder dialog = new AlertDialog.Builder(pcontext); dialog.setTitle(item.getTitle()); dialog.setMessage(item.getSnippet()); dialog.show();
@Override protected boolean onTap(int index) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showPopUp() {\n ListView listViewItems = new ListView(this);\n listViewItems.setAdapter(adapter);\n listViewItems.setAdapter(adapter);\n\n // put the ListView in the pop up\n alertDialog = new AlertDialog.Builder(MainActivity.this)\n .setView(listViewItems)\n .setTitle(\"alertDialog\")\n .show();\n }", "@Override\n public void onClick(View v) {\n String getInput = mBandNum.getText().toString();\n\n AlertDialog.Builder viewArrayList = new AlertDialog.Builder(mContext);\n int bandTtl = mBands.size();\n String cntBands = \"\";\n for (int i = 0; i < bandTtl; i++) {\n cntBands = cntBands + \"Band \" + (i + 1) + \" is \" + mBands.get(i) + \"\\n\";\n\n }\n viewArrayList.setMessage(cntBands);\n viewArrayList.setIcon(R.drawable.guitar_s);\n viewArrayList.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n\n viewArrayList.setTitle(\"Bands You Added\");\n viewArrayList.create();\n viewArrayList.show();\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_edit)\n .setTitle(\"Textual Description\")\n .setMessage(\"Is this the location where you would like to describe something?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n GridPoint gp = myGridPoint();\n MarkerOptions markerOptions = new MarkerOptions().gridPoint(gp);\n markerOptions.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED));\n Marker marker = mMap.addMarker(markerOptions);\n describe();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n String AlertTxt = \"\\\"\" + productList.get(position).getTitle() + \"\\\"\\n\" + getResources().getString(R.string.freeques);\n\n FreeShopDialog alert = new FreeShopDialog.Builder()\n .setMessage(AlertTxt)\n .setImage(productList.get(position).getImageId())\n .setYesButton(R.string.yes)\n .setNoButton(R.string.no)\n .setLayout(R.layout.shop_box)\n .setPosition(position)\n .build();\n alert.setActivity(activity);\n alert.show(getFragmentManager(), \"FREESHIT\");\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet));\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n // .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "private void createNoMapsAlert(){\n \t\tAlertDialog.Builder builder = new AlertDialog.Builder(noteEdit);\r\n \t\tbuilder.setMessage(R.string.no_maps_alert)\r\n \t\t\t\t.setPositiveButton(R.string.start_google_maps,\r\n \t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n \t\t\t\t\t\t\t\t\tint id) {\r\n \t\t\t\t\t\t\t\t//mDbHelper.updatePositionNotification(mRowId, \"true\");\r\n \t\t\t\t\t\t\t\t// FIRE ZE MISSILES!\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t})\r\n \t\t\t\t.setNegativeButton(R.string.cancel,\r\n \t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n \t\t\t\t\t\t\t\t\tint id) {\r\n \t\t\t\t\t\t\t\t// User cancelled the dialog\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t});\r\n \t\t// Create the AlertDialog object and return it\r\n \t\tbuilder.show();\r\n \t}", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker arg0) {\n\t\t\t\tString id = arg0.getTitle();\n\t\t\t\t\n\t\t\t\tif(id.startsWith(\"Dis\") || id.startsWith(\"my\")){\n\t\t\t\t\tif(id.startsWith(\"Dis\")){\n\t\t\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).setTitle(\"Warning\")\n\t\t\t\t\t .setMessage(\"Please select a right victim!!!\")\n\t\t\t\t\t .setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t \t // finish();\n\t\t\t\t }\n\t\t\t\t }).create();\n\t\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\tif(id.startsWith(\"my\")){\n\t\t\t\t\t\tmyLocation = arg0.getPosition();\n\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t\t .setMessage(\"Do you what to update your current location?\")\n\t\t\t\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t setFlag = false;\n\t\t\t }\n\t\t\t })\n\t\t\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t \n\t\t\t }\n\t\t\t }).create();\n\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tvicLocation = arg0.getPosition();\n\t\t\t\t\tfinal String PoVictim = readOneVictim(id);\n\t\t\t\t\tLog.d(\"victim infomtion:\",PoVictim);\n\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t .setMessage(\"What do you want to do with this victim?\")\n\t\t\t .setNegativeButton(\"Edit/Delect Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t EditVictim(PoVictim);\n\t\t }\n\t\t })\n\t\t .setPositiveButton(\"Find THIS Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t //String[] PoVIF = PoVictim.split(\",\");\n\t\t \t vicFlag = true;\n\t\t \t //LatLng vic = new LatLng(42.39398619218224,-72.52872716635466);\n\t\t \t if(vicLocation != null && myLocation != null){\n\t\t \t\t if(wayList != null){\n\t\t \t\t\t wayList.clear();\n\t\t \t\t }\n\t\t \t\t \n\t\t \t\t if(indoorFlag){ //when isindoor return true\n\t\t \t\t\t wayList = findOneVictim(myLocation, vicLocation);\n\t\t \t\t\t if(wayList != null){\n\t\t \t\t\t\t getPath();\n\t\t \t\t\t\t}\n\t\t \t\t }else{\n\t\t \t\t\t LatLng door = getNearestDoor(vicLocation);\n\t\t \t\t\t //get the first part outdoor path \n\t\t \t\t\t findDirections(myLocation.latitude,myLocation.longitude,door.latitude,door.longitude,GMapV2Direction.MODE_DRIVING );\n\t\t \t\t\t //wayList.addAll(findOneVictim(door, vicLocation));\n\t\t \t\t } \n\t\t \t }\n\t\t }\n\t\t }).create();\n\t\t\t dialog.show();\n\t\t\t\t}\t\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n BootstrapEditText et = (BootstrapEditText)v.findViewById(R.id.areaTitle);\n\n mListener.onAreaDialogPositiveClick(AreaDialogFragment.this, et.getEditableText().toString());\n\n }", "public void popUp(ArrayList<Integer> list){\n\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\n alert.setTitle(\"You Have Won The Game!\");\n alert.setHeaderText(\"Your Score: \" + animal.getPoints() + \"!\");\n alert.setContentText(Integer.toString(list.get(0)));\n\n String highScoreContent = String.format(\"Highscore\\n1. \" + list.get(0) + \"\\n2. \" + list.get(1) + \"\\n3. \" + list.get(2) + \"\\n4. \" + list.get(3) + \"\\n5. \" + list.get(4));\n alert.setContentText(highScoreContent);\n\n ButtonType backToMainMenu = new ButtonType(\"Back to Main Menu\");\n ButtonType quit = new ButtonType(\"Quit Game\");\n alert.getButtonTypes().setAll(backToMainMenu,quit);\n\n alert.setOnCloseRequest(e -> {\n ButtonType result = alert.getResult();\n if(result!= null && result == quit){\n primaryStage.close();\n } else {\n sceneManager sm = new sceneManager(primaryStage);\n sm.toMenuScene();\n }\n });\n\n alert.show();\n }", "private void openPlacesDialog() {\n DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n int height = 200;\n int width = 100;\n BitmapDrawable bitmapdraw = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_car_marker);\n Bitmap b = bitmapdraw.getBitmap();\n Bitmap smallMarker = Bitmap.createScaledBitmap(b, width, height, false);\n // Add a marker for the selected place, with an info window\n // showing information about that place.\n mMap.addMarker(new MarkerOptions()\n .title(mLikelyPlaceNames[which])\n .position(markerLatLng)\n .snippet(markerSnippet))\n .setIcon(BitmapDescriptorFactory.fromBitmap(smallMarker));\n\n // Position the customer_map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(getActivity())\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tString txt = aa.getItem(which);\n\t\t\t\t\t\n\t\t\t\t\tad.setTitle(txt);\n\t\t\t\t\t\n\t\t\t\t\tet.setText(txt);\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tprotected View getPopupView(final PoiItem item) {\n\r\n\t\tView view = mInflater.inflate(ResUtil.getInstance(context).getLayout(\"ct_traffic__popup\"), null);\r\n\t\tWindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);\r\n\t\tDisplayMetrics dm = new DisplayMetrics();\r\n\t\twm.getDefaultDisplay().getMetrics(dm);\r\n\r\n\t\tTextView nameTextView = (TextView) view.findViewById(ResUtil.getInstance(context).getId(\"PoiName\"));\r\n\t\tnameTextView.setMaxWidth((int) (dm.widthPixels * 0.6));\r\n\t\tTextView addressTextView = (TextView) view.findViewById(ResUtil.getInstance(context).getId(\"PoiAddress\"));\r\n\t\tnameTextView.setText(item.getTitle());\r\n\t\tString address = item.getSnippet();\r\n\t\tif (address == null || address.length() == 0) {\r\n\t\t\taddress = \"\";\r\n\t\t}\r\n\t\taddressTextView.setText(address);\r\n\t\tImageView feedback = (ImageView) view.findViewById(ResUtil.getInstance(context).getId(\"feedback\"));\r\n\t\tfeedback.setOnClickListener(new View.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(context, PoiInfoActivity.class);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tintent.putExtra(\"poi\", item);\r\n\t\t\t\tif (poiIds != null && !poiIds.isEmpty())\r\n\t\t\t\t\tintent.putExtra(\"poiId\", poiIds.get(number));\r\n\t\t\t\tcontext.startActivity(intent);\r\n\t\t\t}\r\n\t\t});\r\n\t\tLinearLayout layout = (LinearLayout) view.findViewById(ResUtil.getInstance(context).getId(\"LinearLayoutPopup\"));\r\n\t\tlayout.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tIntent intent = new Intent(context, RouteActivity.class);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putString(\"name\", item.getTitle());\r\n\t\t\t\tbundle.putParcelable(\"geo\", item.getPoint());\r\n\t\t\t\tintent.putExtras(bundle);\r\n\t\t\t\tcontext.startActivity(intent);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn view;\r\n\t}", "private void openPlacesDialog() {\n // Ask the user to choose the place where they are now.\n DialogInterface.OnClickListener listener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // The \"which\" argument contains the position of the selected item.\n LatLng markerLatLng = mLikelyPlaceLatLngs[which];\n String markerSnippet = mLikelyPlaceAddresses[which];\n if (mLikelyPlaceAttributions[which] != null) {\n markerSnippet = markerSnippet + \"\\n\" + mLikelyPlaceAttributions[which];\n }\n\n // Position the map's camera at the location of the marker.\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(markerLatLng,\n DEFAULT_ZOOM));\n }\n };\n\n // Display the dialog.\n AlertDialog dialog = new AlertDialog.Builder(this)\n .setTitle(R.string.pick_place)\n .setItems(mLikelyPlaceNames, listener)\n .show();\n }", "public void onCreateDialogSingleChoice(List<String> list, final String title, int pos) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n//Source of the data in the DIalog\n String[] array = list.toArray(new String[list.size()]);\n for (int i = 0; i < list.size(); i++) {\n array[i] = list.get(i);\n }\n// Set the dialog title\n builder.setTitle(title)\n\n// Specify the list array, the items to be selected by default (null for none),\n// and the listener through which to receive callbacks when items are selected\n .setSingleChoiceItems(array, pos, (dialog, which) -> {\n// TODO Auto-generated method stub\n\n\n })\n\n// Set the action buttons\n .setPositiveButton(\"Ok\", (dialog, id) -> {\n// User clicked OK, so save the result somewhere\n// or return them to the component that opened the dialog\n\n ListView lw = ((AlertDialog) dialog).getListView();\n Object checkedItem = lw.getAdapter().getItem(lw.getCheckedItemPosition());\n\n if (title.equalsIgnoreCase(\"Title\")) {\n vEdtTxtTitle.setText(checkedItem.toString());\n mSelectPosi = lw.getCheckedItemPosition();\n } else if (title.equalsIgnoreCase(\"Security Question\")) {\n vEdtTxtSecurityQsn.setText(checkedItem.toString());\n mSelectPosiSecurity = lw.getCheckedItemPosition();\n }\n\n Log.d(getLocalClassName(), \" Selected Item \" + checkedItem.toString());\n// ad.dismiss();\n dialog.dismiss();\n\n })\n .setNegativeButton(\"Cancel\", (dialog, id) -> {\n// ad.dismiss();\n dialog.dismiss();\n });\n builder.show();\n }", "private void openDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.allmark));\n\t\tfinal List<ReaderTags> listData = ReaderDataBase\n\t\t\t\t.getReaderDataBase(this);\n\t\tif (listData.size() > 0) {\n\t\t\tListView list = new ListView(this);\n\t\t\tfinal MTagAdapter myAdapter = new MTagAdapter(this, listData);\n\t\t\tlist.setAdapter(myAdapter);\n\t\t\tlist.setOnItemClickListener(new OnItemClickListener() {\n\t\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tJump(arg2, listData, myAdapter);\n\t\t\t\t}\n\t\t\t});\n\t\t\tlist.setOnItemLongClickListener(new OnItemLongClickListener() {\n\n\t\t\t\tpublic boolean onItemLongClick(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\tdeleteOneDialog(arg2, listData, myAdapter);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tbuilder.setView(list);\n\t\t} else {\n\t\t\tTextView txt = new TextView(this);\n\t\t\ttxt.setText(getString(R.string.nomark));\n\t\t\ttxt.setPadding(10, 5, 0, 5);\n\t\t\ttxt.setTextSize(16f);\n\t\t\tbuilder.setView(txt);\n\t\t}\n\t\tbuilder.setNegativeButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\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}", "@Override\n\tprotected OverlayItem createItem(int i) {\n\t\treturn mOverlays.get(i);\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n DialogFragment newFragment = PopupBook.newInstance(\n R.string.dismis,books,books.get(+position),b_adapter,inbin,true);\n newFragment.show(getFragmentManager(), \"dialog\");\n\n\n // /books.get(+position);\n //AlertDialog.Builder a = pop_helper.PopProduct(books.get(+position),getApplicationContext(),(ViewGroup) findViewById(R.id.layout_root));\n //final AlertDialog alertDialog = a.create();\n\n //alertDialog.show();\n\n }", "@Override\n public void onItemClick(View view, Medal obj, int position) {\n TextView txt;\n final Dialog dialog = new Dialog(getContext());\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE); // before\n dialog.setContentView(R.layout.popup_medals);\n txt = dialog.findViewById(R.id.titlePop);\n txt.setText(obj.title);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n dialog.setCancelable(true);\n dialog.show();\n }", "private void createSettingsAlertDialog(final View view, final int i){\n final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n LayoutInflater inflater = this.getLayoutInflater();\n final View dialogView = inflater.inflate(R.layout.alert_dialog_settings, null);\n dialogBuilder.setView(dialogView);\n\n final EditText etInsertInfo = dialogView.findViewById(R.id.et_insert_info);\n etInsertInfo.setText(setTextOfAlertDialog(i));\n\n dialogBuilder.setCancelable(true);\n dialogBuilder.setTitle(view.getTag().toString());\n dialogBuilder.setPositiveButton(R.string.bt_ok, new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n updateContact(i, etInsertInfo.getText().toString());\n mImageAdapter.notifyDataChange(mContact);\n }\n });\n AlertDialog ad = dialogBuilder.create();\n ad.show();\n }", "public void onClick(DialogInterface dialog, int item) {\n Log.i(\"DIALOG\", \"Escolha: \" + items[item]);\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n ((TextView) levelDialog.findViewById(R.id.evaluation_title)).setText(st_place[position][0]);\n current_position = position;\n levelDialog.show();\n }", "@Override public void onItemClick(View view, int position) {\n final Dialog dialog = new Dialog(Informal.this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.dialog_informal);\n Button btn = (Button) dialog.findViewById(R.id.dialog_btn);\n TextView mTextView = (TextView)dialog.findViewById(R.id.dialog_event_name);\n TextView description = (TextView)dialog.findViewById(R.id.dialog_description_text);\n mTextView.setText(Constants.mEvents_Informal[position]);\n description.setText(getString(Constants.mEvents_Informal_description[position]));\n dialog.show();\n btn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n }", "private void notifyUiApiFailure() {\n\n if (stillAlive()) {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(getActivity());\n View convertView = getActivity().getLayoutInflater().inflate(R.layout.api_error_alert_title, null);\n alertDialog.setCustomTitle(convertView);\n\n alertDialog.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n // Set the line color\n Dialog d = alertDialog.show();\n int dividerId = d.getContext().getResources().getIdentifier(\"android:id/titleDivider\", null, null);\n View divider = d.findViewById(dividerId);\n divider.setBackground(new ColorDrawable(Color.parseColor(\"#00274c\")));\n }\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {\n\n final int x = position;\n LayoutInflater inflater = getLayoutInflater();\n View layout = inflater.inflate(R.layout.car_item_edit, null);\n TextView tv = (TextView) layout.findViewById(R.id.car_item_editdialog_textview);\n final EditText et = (EditText) layout.findViewById(R.id.car_item_editdialog_edittext);\n\n String hintText = bundle.getString(userName[position]);\n tv.setText(hintText);\n\n builder = new AlertDialog.Builder(CarItemActivity.this);\n alert = builder.setView(layout)\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n Object edittext;\n String key = userName[x];\n String ObjectId = bundle_id.getString(\"ObjectId\");\n if(position == 3 || position == 4) {\n edittext = Integer.parseInt(et.getText().toString());\n }\n else{\n edittext = et.getText().toString();\n }\n\n AVObject caritem_edit = AVObject.createWithoutData(\"Car\",ObjectId);\n caritem_edit.put(key,edittext);\n caritem_edit.saveInBackground(new SaveCallback() {\n @Override\n public void done(AVException e) {\n if(e == null){\n ToastUtil.show(CarItemActivity.this,\"修改成功\");\n }else{\n ToastUtil.show(CarItemActivity.this,e.getMessage());\n }\n }\n });\n dialog.dismiss();\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 alert.show();\n }", "void optionsDialog(){\r\n\t\tString title = getString(R.string.select_option);\r\n\t\tString[] options = getResources().getStringArray(R.array.options);\r\n\t\t\r\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\t \r\n\t\t// set the dialog title\r\n\t builder.setTitle(title);\r\n\t \r\n\t // specify the list array\r\n\t builder.setItems(options, new DialogInterface.OnClickListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tswitch(which){\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\t// open update dialog\r\n\t\t\t\t\tupdateDialog();\r\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t// open delete dialog\r\n\t\t\t\t\tdeleteDialog();\r\n\t\t\t\t\tdialog.dismiss();\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 \r\n\r\n\t // show dialog\r\n\t\tAlertDialog alert = builder.create();\r\n\t\talert.show();\r\n\t}", "@Override\n public void onItemClick(AdapterView arg0, View arg1, int arg2,\n long arg3) {\n ListView listView = (ListView) arg0;\n getAlertDialog(\"Word\",listView.getItemAtPosition(arg2).toString()).show();\n\n }", "static void showOverlay() {\n\t\ti1.setOverlay(OL);\n\t}", "public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n AlertDialog.Builder builder = new AlertDialog.Builder(parent.getContext());\n\n String productName= MainActivity.datastores.get(itemPos).productList.get(position).getName();\n int salePrice= MainActivity.datastores.get(itemPos).productList.get(position).getSale_price();\n\n // 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(String.format(getResources().getString(R.string.dialog_message), productName, salePrice))\n .setTitle(R.string.dialog_title)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n })\n .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });;\n\n // 3. Get the AlertDialog from create()\n AlertDialog dialog = builder.create();\n dialog.show();\n\n Toast.makeText(getBaseContext(),Integer.toString(position), Toast.LENGTH_SHORT).show();\n }", "public void pantryAlert(){\n final ArrayList<Integer> mSelectedItems = new ArrayList<Integer>();\n final CharSequence[] items = new CharSequence[pantryStorage.getItems().size()];\n\n for(int i=0;i<items.length;i++){\n items[i] = pantryStorage.getItems().get(i);\n }\n\n AlertDialog.Builder builder = new AlertDialog.Builder(MyIngredientsActivity.this);\n\n // set the dialog title\n builder.setTitle(\"Choose One or More\")\n\n // specify the list array, the items to be selected by default (null for none),\n // and the listener through which to receive call backs when items are selected\n // R.array.choices were set in the resources res/values/strings.xml\n .setMultiChoiceItems(items, null, new DialogInterface.OnMultiChoiceClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which, boolean isChecked) {\n\n if (isChecked) {\n // if the user checked the item, add it to the selected items\n mSelectedItems.add(which);\n }\n\n else if (mSelectedItems.contains(which)) {\n // else if the item is already in the array, remove it\n mSelectedItems.remove(Integer.valueOf(which));\n }\n\n // you can also add other codes here,\n // for example a tool tip that gives user an idea of what he is selecting\n // showToast(\"Just an example description.\");\n }\n\n })\n\n // Set the action buttons\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n // user clicked OK, so save the mSelectedItems results somewhere\n // here we are trying to retrieve the selected items indices\n String selectedItems = \"\";\n for(Integer i : mSelectedItems){\n selectedItems += items[i] + \",\";\n Log.d(\"selectedIndex = \",items[i].toString());\n }\n\n recipeText.setText(selectedItems);\n //showToast(\"Selected index: \" + selectedIndex);\n\n }\n })\n\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // removes the AlertDialog in the screen\n }\n })\n\n .show();\n\n }", "public void openAlert(View view) {\n try {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setTitle(\"Create New Project\");\n\n// set positive button: Yes message\n alertDialogBuilder.setPositiveButton(\"Create Project\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n// go to a new activity of the app\n/*Intent positveActivity = new Intent(getContext(), PositiveActivity.class);\nstartActivity(positveActivity);*/\n }\n });\n\n // set neutral button: Exit the app message\n alertDialogBuilder.setNeutralButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // exit the app and go to the HOME\n //AlertDialogActivity.this.finish();\n }\n });\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setHint(\"Project Name\");\n input.setLayoutParams(lp);\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.setView(input);\n alertDialog.show();\n\n\n } catch (Exception e) {\n Log.d(\"BaseManager\", \"openAlert(): \" + e);\n }\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_gallery)\n .setTitle(\"Complete Boundary\")\n .setMessage(\"Are you sure you want to complete your croft boundary?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n completePolygon();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setItems(items, new DialogInterface.OnClickListener(){\n @Override\n public void onClick(DialogInterface dialog, int which) {\n mListener.onPinOptionsItemSelected(PinOptionsDialogFragment.this, items[which].toString());\n }\n });\n return builder.create();\n }", "private void popupWindowOfOptions(View v) {\n \t \n \t\tOrderManager.clearOption();\n \t\t\n \t\tint nOrderBoardTextId = v.getId();\n \tOrder _Order = (Order) ResourceManager.get(nOrderBoardTextId);\n \tint nMenuDbId = _Order.MENU_ID;\n \tint nMenuResourceId = MenuManager.getResourceIdByDbId(nMenuDbId);\n \tMenu mMenu = MenuManager.getMenuByResourceId(nMenuResourceId);\n \t\n \tint nTempIdForCurrentOrder = IdManager.getRandomId();\n \tIdManager.setTemporaryId(nTempIdForCurrentOrder);\n \tResourceManager.put(nTempIdForCurrentOrder, _Order);\n \t\n try {\n \t\n \tint nPopupHeight = 760;\n \t\tint nPopupWith = 520;\n \t\n \tint nSubTitleHeight = 40;\n \tint nOptionListLayoutHeight = 210;\n \t\n \tString strMenuNameEng = mMenu.NAME_ENG;\n \tString strMenuNameOth = mMenu.NAME_OTH;\n \t\n \t// Popup layout\n LinearLayout popLayout = new LinearLayout(this);\n popLayout.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n popLayout.setGravity(Gravity.CENTER);\n popLayout.setBackgroundColor(0x22000000);\n \n \t // Inner layout\n \t LinearLayout innerLayout = new LinearLayout(this);\n \t innerLayout.setLayoutParams(new LayoutParams(nPopupWith-20,nPopupHeight-20));\n \t innerLayout.setPadding(10,10,10,10);\n \t innerLayout.setOrientation(LinearLayout.VERTICAL);\n \t innerLayout.setGravity(Gravity.CENTER);\n \t innerLayout.setBackgroundColor(0xddffffff);\n \t\t \n \t\t // title eng\n \t\t TextView tvTitleEng = new TextView(this);\n \t\t tvTitleEng.setGravity(Gravity.CENTER);\n \t\t tvTitleEng.setText(strMenuNameEng);\n \t\t tvTitleEng.setTextColor(0xff000000);\n \t\t tvTitleEng.setTextSize(23);\n \t\t tvTitleEng.setHeight(50);\n \t\t tvTitleEng.setWidth(470);\n \t\t \n \t\t // title oth\n \t\t TextView tvTitleOth = new TextView(this);\n \t\t tvTitleOth.setGravity(Gravity.TOP|Gravity.CENTER);\n \t\t tvTitleOth.setText(strMenuNameOth);\n \t\t tvTitleOth.setTextColor(0xff000000);\n \t\t tvTitleOth.setTextSize(13);\n \t\t tvTitleOth.setHeight(55);\n \t\t tvTitleOth.setWidth(470);\n \t\t \n \t\t // common option title\n \t\t TextView tvCO = new TextView(this);\n \t\t tvCO.setText(\"* Common Option\");\n \t\t tvCO.setPadding(10,0,0,0);\n \t\t tvCO.setTextSize(15);\n \t\t tvCO.setTextColor(0xff5f2d09);\n \t\t tvCO.setHeight(nSubTitleHeight);\n \t\t tvCO.setWidth(470);\n \t\t \n \t\t // common option layout\n \t\t ScrollView svCO = new ScrollView(this);\n \t\t svCO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llCO = new LinearLayout(this);\n \t\t llCO.setLayoutParams(new LayoutParams(470,LayoutParams.WRAP_CONTENT));\n \t\t llCO.setPadding(15,10,10,10);\n \t\t llCO.setOrientation(LinearLayout.VERTICAL);\n \t\t llCO.setGravity(Gravity.TOP);\n \t\t \n \t\t showCommonOptions (mMenu, llCO);\n \t\t \t\n \t\t \tsvCO.addView(llCO);\n \t\t \t\n \t\t\t // specific option title\n \t\t\t \n \t\t TextView tvSO = new TextView(this);\n \t\t tvSO.setPadding(10,0,0,0);\n \t\t tvSO.setText(\"* Specific Option\");\n \t\t tvSO.setTextSize(15);\n \t\t tvSO.setTextColor(0xff5f2d09);\n \t\t tvSO.setHeight(nSubTitleHeight);\n \t\t tvSO.setWidth(470);\n \t \n \t\t ScrollView svSO = new ScrollView(this);\n \t\t svSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t \n \t\t LinearLayout llSO = new LinearLayout(this);\n \t\t llSO.setLayoutParams(new LayoutParams(470,nOptionListLayoutHeight));\n \t\t llSO.setPadding(15,10,10,10);\n \t\t llSO.setOrientation(LinearLayout.VERTICAL);\n \t\t llSO.setGravity(Gravity.TOP);\n \t\n \t\t showSpecificOptions (mMenu, llSO);\n \t\t \n \t\t svSO.addView(llSO);\n \t\t \n \t\t // button group\n \t\t \n \t\t int nButtonHeight = 50;\n \t\t int nButtonWidth = 100;\n \t\t \n \t\t LinearLayout llButtonGroup = new LinearLayout(this);\n \t\t llButtonGroup.setLayoutParams(new LayoutParams(470,80));\n \t\t llButtonGroup.setPadding(10, 0, 10, 4);\n \t\t llButtonGroup.setOrientation(LinearLayout.HORIZONTAL);\n \t\t llButtonGroup.setGravity(Gravity.CENTER|Gravity.BOTTOM);\n \t\t \n \t\t // confirm button\n \t \n \t \tint nConfirmId = IdManager.getRandomId();\n \t\t Button btnConfirm = new Button(this);\n \t\t btnConfirm.setId(nConfirmId);\n \t\t btnConfirm.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnConfirm.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnConfirm.setText(CaptionManager.getCaption().CONFIRM);\n \t\t btnConfirm.setTextSize(13);\n \t\t \n \t\t // add options to an order\n \t\t btnConfirm.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \t\n \t\t\t \tOrder currentOrder = (Order)ResourceManager.get(IdManager.getTemporaryId());\n \t\t\t \t\n \t\t\t \tArrayList<Order> orderList = addOptionsToOrder(currentOrder);\n \t\t\t \tOrderManager.requestUpdateOptions(currentOrder,orderList);\n \t \t\t\t\tloadOrderBoard();\n \t \t\t\t\tOrderManager.clearOption();\n \t \t\t\t\t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // cancel button\n \t\t Button btnCancel = new Button(this);\n \t\t btnCancel.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnCancel.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnCancel.setText(CaptionManager.getCaption().CANCEL);\n \t\t btnCancel.setTextSize(13);\n \t\t btnCancel.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \tOrderManager.clearOption();\n \t\t\t \t_PopupWindowOfOptions.dismiss();\n \t\t\t }\n \t\t });\n \t\t \n \t\t // detail button\n \t\t final int nTempId = 808080;\n \t\t Mapper.put(Integer.valueOf(nTempId), mMenu);\n \t\t \n \t\t Button btnDetail = new Button(this);\n \t\t btnDetail.setBackgroundResource(R.drawable.color_button_basic);\n \t\t btnDetail.setLayoutParams(new LayoutParams(nButtonWidth,nButtonHeight));\n \t\t btnDetail.setText(CaptionManager.getCaption().DETAIL);\n \t\t btnDetail.setTextSize(13);\n \t\t btnDetail.setOnClickListener(new OnClickListener() {\n \t\t\t public void onClick(View v) {\n \t\t\t \n \t\t\t \tMenu menu = (Menu)Mapper.get(Integer.valueOf(808080));\n \t\t\t \tint nMenuRscId = menu.RESOURCE_ID;\n \t\t\t \tpopupWindowDetail(nMenuRscId);\n \t\t\t }\n \t\t });\n \t\t\t \n \t llButtonGroup.addView(btnConfirm);\n \t llButtonGroup.addView(btnCancel);\n \t llButtonGroup.addView(btnDetail);\n \t \n \t\t innerLayout.addView(tvTitleEng);\n \t innerLayout.addView(tvTitleOth);\n \t innerLayout.addView(tvCO);\n \t innerLayout.addView(svCO);\n \t innerLayout.addView(tvSO);\n \t innerLayout.addView(svSO);\n \t innerLayout.addView(llButtonGroup);\n \t \n popLayout.addView(innerLayout);\n\n // show popup\n _PopupWindowOfOptions = new PopupWindow(popLayout, nPopupWith, nPopupHeight, true);\n _PopupWindowOfOptions.showAtLocation(popLayout, Gravity.CENTER, 0, 0);\n \t\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void createDisplayEditOverlay() {\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_myplaces)\n .setTitle(\"Collect GPS Point\")\n .setMessage(\"Is this the location where you would like to collect a GPS point?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n digitiseMarker(digitise());\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "private AlertDialog showOrderDetails(int pos) {\n AlertDialog.Builder diabuilder = new AlertDialog.Builder(this);\n diabuilder .setTitle(R.string.alertOrderTitle)\n .setMessage(helpInfo[pos])\n .setPositiveButton(R.string.btnOK, this)\n .setIcon(R.drawable.cart);\n diabuilder.create();\n return diabuilder.show();\n }", "public void onItemClick(AdapterView<?> arg0, View arg1, int index,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t final int idex = index;\n\t\t\t\t final long position = arg3;\n\t\t\t\t final AlertDialog dlg2 = new AlertDialog.Builder(PropagandaListActivity.this).create();\n\t\t\t\t\tdlg2.show();\t\t\t\t\t\n\t\t\t\t\tdlg2.getWindow().setContentView(R.layout.dialog_new);\n\t\t\t\t\tButton confirm =(Button)dlg2.findViewById(R.id.button_confirm);\n\t\t\t\t\tButton cancel =(Button)dlg2.findViewById(R.id.button_cancel);\n\t\t\t\t\tTextView tv = (TextView)dlg2.findViewById(R.id.notice_message);\n\t\t\t\t\ttv.setTextSize(16);\n\t\t\t\t\ttv.setText(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2));\n\t\t\t\t confirm.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id,0));//8宣传列表\n\t\t\t\t\t\t\tdlg2.dismiss();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t cancel.setOnClickListener(new OnClickListener() {\n\t\t\t\t \t\n\t\t\t\t \t \n\t\t\t\t \tpublic void onClick(View v) {\n\t\t\t\t \t\t// TODO Auto-generated method stub\n\t\t\t\t \t\t\n\t\t\t\t \t\tdlg2.dismiss();\n\t\t\t\t \t}\n\t\t\t\t });\n/*\t\t\t\t \n\t\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(PropagandaListActivity.mContext);\n\t\t\t\tbuilder.setMessage(MainActivity.resources.getString(R.string.propagandalist_toast1)+GameData.pro[index].money+MainActivity.resources.getString(R.string.propagandalist_toast2))\n\t\t\t\t .setPositiveButton(MainActivity.resources.getString(R.string.dialog_ok), new DialogInterface.OnClickListener(){\t\t\t\t \t \n\t\t\t\t\t\t\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tConnection.sendMessage(GameProtocol.\n\t\t\t\t\t\t\t\t\tCONNECTION_SEND_JointAdvocacy_Req,\n\t\t\t\t\t\t\t\t\tConstructData.Join_JointAdvocacy_Req(GameData.pro[idex].id));//8宣传列表\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}})\n\t\t\t\t .setNegativeButton(MainActivity.resources.getString(R.string.dialog_return), new DialogInterface.OnClickListener(){\n\n\t\t\t\t\t\t \n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t}} );\n\t\t\t\tbuilder.create().show();*/\n\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t}", "public void show_dialog(final View view){\n final String tag = String.valueOf(view.getTag());\n LayoutInflater inflater = getLayoutInflater();\n final View layout = inflater.inflate(R.layout.food_information_layout,(ViewGroup) findViewById(R.id.foodInformation));\n\n final AlertDialog alertDialog=new AlertDialog.Builder(AddItemActivity.this)\n .setTitle(\"Food Information\").setView(layout).setPositiveButton(\"Confirm\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n add_item_to_grid(view);\n TextView textView2=(TextView)layout.findViewById(R.id.DaysLeft);\n String quality_period=textView2.getText().toString();\n qualityPeriodToDB(tag,quality_period);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n }).show();\n TextView textView=(TextView)alertDialog.findViewById(R.id.foodName);\n textView.setText(tag);\n\n TextView textView2=(TextView)alertDialog.findViewById(R.id.DaysLeft);\n String quality_period= qualityPeriodFromDB(tag);\n textView2.setText(quality_period);\n\n TextView textView3=(TextView)layout.findViewById(R.id.bestBefore);\n try {\n String bestBefore=calculateDate(quality_period);\n textView3.setText(bestBefore);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "private void openPickAlert(int i) {\n String[] name = {\"TAKE A PHOTO\", \"CHOOSE FROM GALLERY\"};\n int[] icons = {R.drawable.ic_menu_camera, R.drawable.ic_menu_gallery};\n CommonUtils.getInstance(ProfileScreenActivity.this).openDialog(this, name, icons, new OnBottomDialogItemListener() {\n @Override\n public void onItemClick(View view, int position, int type, Object t) {\n switch (type) {\n case GlobalValues.ClickOperations.APAPTER_BOTTOM_DIALOG_CLICK:\n switch (position) {\n case 0:\n openCamera();\n break;\n case 1:\n openGallerypicker();\n break;\n }\n break;\n }\n }\n });\n\n }", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n txtVwMostrar.setText(asDatos[i]);\n\n new AlertDialog.Builder(this).setTitle(\"Selección de la lista\").setMessage(asDatos[i]).setIcon(R.drawable.ic_launcher_background)\n //Botones\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"Pues OK\", Toast.LENGTH_SHORT).show();\n\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"Cancelar :p\", Toast.LENGTH_SHORT).show();\n }\n })\n .setNeutralButton(\"que haces\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n Toast.makeText(getApplicationContext(),\"neutral\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void SHOW_CUSTOM_DIALOG_HESO(View v) {\n\t\tdialog_heso = new Dialog_HESO(TAB_THONGTIN_HOSO.this);\n\t\tdialog_heso.show();\n\t\tWindowManager.LayoutParams lp = new WindowManager.LayoutParams();\n\t\tlp.copyFrom(dialog_heso.getWindow().getAttributes());\n\t\tlp.width = Tht_Screen.get_screen_width_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tlp.height = Tht_Screen.get_screen_heigth_percent(TAB_THONGTIN_HOSO.this, 90);\n\t\tdialog_heso.getWindow().setAttributes(lp);\n\t\tARR_MAU_HESO = mdb.get_ARR_HESO(Variables.DNV.MaDV);\n\t\tmAdapter_HESO = new Lst_HESO(ARR_MAU_HESO, TAB_THONGTIN_HOSO.this);\n\t\tDialog_HESO.lv_HESO.setAdapter(mAdapter_HESO);\n\t\tDialog_HESO.tv_PT_TT.setText(getString(R.string.PT_TT)+String.valueOf(Variables.HSCT_CHON.PT_TT));\n\t\tDialog_HESO.tv_PT_C.setText(getString(R.string.PT_C)+String.valueOf(Variables.HSCT_CHON.PT_C));\n\t\tDialog_HESO.tv_PT_TL.setText(getString(R.string.PT_TL)+String.valueOf(Variables.HSCT_CHON.PT_TL));\n\t\tDialog_HESO.tv_PT_K.setText(getString(R.string.PT_K)+String.valueOf(Variables.HSCT_CHON.PT_K));\n\t\tDialog_HESO.tv_PT_VAT.setText(getString(R.string.PT_VAT)+String.valueOf(Variables.HSCT_CHON.PT_VAT));\n\t\tDialog_HESO.tv_PT_NC.setText(getString(R.string.PT_NC)+String.valueOf(Variables.HSCT_CHON.PT_NC)+\" %\");\n\t\tDialog_HESO.tv_PT_C1.setText(getString(R.string.PT_C1)+String.valueOf(Variables.HSCT_CHON.PT_C1));\n\t\tDialog_HESO.tv_PT_NC1.setText(getString(R.string.PT_NC1)+String.valueOf(Variables.HSCT_CHON.PT_NC1)+\" %\");\n\t\t\n\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\t\t\t\t\t\t\t\t\t\tString visualInspection = commonList.get(position);\n\t\t\t\t\t\t\t\t\t\tLog.e(\"TAG\", \"Value for visualInspection:\" + visualInspection);\n\t\t\t\t\t\t\t\t\t\tdropVisualInspect.setText(visualInspection);\n\t\t\t\t\t\t\t\t\t\t// visualInspectionText =\n\t\t\t\t\t\t\t\t\t\t// visualInspection;\n\t\t\t\t\t\t\t\t\t\tdialog.dismiss();\n\n\t\t\t\t\t\t\t\t\t}", "@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(GameInitializerActivity.this).create();\n\t\t\t\tLayoutInflater factory = LayoutInflater.from(GameInitializerActivity.this);\n\t\t\t\tfinal View view = factory.inflate(R.layout.activity_about_popupwindow, null);\n\t\t\t\talertDialog.setView(view);\n\t\t\t\talertDialog.setButton3(\"OK. I Got this !!\", dialogClickListener);\n\t\t\t\talertDialog.show();\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private void ItemFragmentDescription(String activityTitle) {\n onView(withId(R.id.description_tv)).perform(click());\n onView(withText(String.format(\"%s %s\", \"About\", activityTitle))).check(matches(isDisplayed()));\n onView(withText(R.string.points_of_interest)).check(matches(isDisplayed()));\n onView(withText(\"Close\")).perform(click()); //close the alert dialog\n }", "public void onInfoWindowClick(Marker marker2) {\n\n AlertDialog.Builder builder2 = new AlertDialog.Builder(Detalles.this);\n builder2.setTitle(\"Epicent\");\n builder2.setMessage(\"Referencia : \" +\"ddddddd\" +\"\\n\" +\n \"Fecha local : \" + \"ccccccc\" +\"\\n\" +\n \"Hora local : \" + \"ccccccc\"+ \"\\n\" +\n \"Profundidad : \" + \"ccccccc\"+\" km\"+ \"\\n\" +\n \"Intensidad : \" + \"ccccccc\"+ \"\\n\" +\n \"Magnitud : \" + \"ccccccc\"+ \"\\n\" +\n \"Ubicación : \" + \"ccccccc\"+ \", \" + \"ccccccc\");\n builder2.setNegativeButton(\"Cerrar\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog2, int which) {\n dialog2.cancel();\n }\n });\n\n builder2.setCancelable(true);\n builder2.create().show();\n\n }", "@Override\n public void onClick(View view) {\n PopupMenu popup = new PopupMenu(mContext, holder.tv_option_menu);\n //inflating menu from xml resource\n popup.inflate(R.menu.menu_options);\n //adding click listener\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.menu1:\n shareStories(headlinesList.get(position).getUrl());\n return true;\n case R.id.menu2:\n //handle menu2 click\n db.insertNote(headlinesList.get(position));\n return true;\n default:\n return false;\n }\n }\n });\n //displaying the popup\n popup.show();\n\n }", "private void showAlertDialog(String key) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);\n //create a new layout xml for this?\n //final View customLayout = getLayoutInflater().inflate(R.layout.activity_scanner_result, null);\n //alertDialog.setView(customLayout);\n alertDialog.setTitle(\"Alert Dialog - Duplicate Check\").setMessage(\"Oh No!! Record \"+key+\" is found in database..\");\n alertDialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // send data from the AlertDialog to the Activity\n //EditText editText = customLayout.findViewById(R.id.edit_studentName);\n Toast.makeText(ScannerActivity.this,\"Redirecting...\",Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(ScannerActivity.this, ScannerResult.class);\n assignObjValue(laptopCheckOutInfoList, key);\n intent.putExtra(\"laptop_record_info\", laptopCheckOutInfo); //return the object li as a serialized object\n startActivity(intent);\n }\n });\n AlertDialog alert = alertDialog.create();\n alert.setCanceledOnTouchOutside(false);\n alert.show();\n }", "public void popUpDialogBox(View passedView, int code) {\n mBuilder = new AlertDialog.Builder(TrailActivity.this);\n if(code == 0) {\n Date editedTrailDt = null;\n editedView = passedView;\n editedTrailName = (EditText) editedView.findViewById(R.id.TrailNametxt);\n editedTrailModule = (EditText) editedView.findViewById(R.id.Moduletxt);\n editedTrailCode = (EditText) editedView.findViewById(R.id.TrailCodetxt);\n editedTrailDate = (EditText) editedView.findViewById(R.id.datetxt);\n try { editedTrailDt = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.ENGLISH).parse(editedTrailDate.getText().toString().trim()); }\n catch (ParseException e) { e.printStackTrace(); }\n editedTrailId = geTrailId(editedTrailCode.getText().toString(), editedTrailDt);\n }\n else editedView = null;\n initDialogBoxViews(passedView);\n setDateClickListener();\n setTrailDateClickListener();\n setAddtrailBtnClickListener();\n mBuilder.setView(passedView);\n dialog = mBuilder.create();\n dialog.show();\n }", "public void onHelp(View view)\n {\n // Instantiate a dialog box builder\n AlertDialog.Builder builder = new AlertDialog.Builder(view.getContext());\n\n // Parameterize the builder\n builder.setTitle(R.string.helpTitle);\n builder.setMessage(R.string.helpMessage);\n builder.setPositiveButton(android.R.string.ok, null);\n\n // Create the dialog box and show it\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void showDialog(Activity activity, final List<Photo> photoList) {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(activity);\n LayoutInflater inflater = activity.getLayoutInflater();\n final View dialogView = inflater.inflate(R.layout.refine_results_dialog_layout, null);\n dialogBuilder.setView(dialogView);\n\n final EditText text = dialogView.findViewById(R.id.title_text);\n\n dialogBuilder.setTitle(R.string.dialog_title);\n dialogBuilder.setMessage(R.string.dialog_message);\n dialogBuilder.setPositiveButton(R.string.dialog_button_text, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n refineResults(photoList, text.getText().toString());\n }\n });\n dialogBuilder.setNegativeButton(R.string.cancel_dialog_button_text, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n //pass\n }\n });\n AlertDialog b = dialogBuilder.create();\n b.show();\n }", "private void alert(String title, String msj){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(getActivity());\n alertDialog.setTitle(title);\n alertDialog.setMessage(msj);\n alertDialog.setPositiveButton(getString(R.string.alert_accept), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n alertDialog.show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case 0:\n notice.setText(items[0]);\n noticeTime = 1;\n break;\n case 1:\n notice.setText(items[1]);\n noticeTime = 2;\n break;\n case 2:\n notice.setText(items[2]);\n noticeTime = 3;\n break;\n case 3:\n notice.setText(items[3]);\n noticeTime = 4;\n break;\n case 4:\n notice.setText(items[4]);\n noticeTime = 5;\n showCustom();\n break;\n }\n }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tdismissWindow();\n\t\t\t\t// 明确点击事件的位置\n\t\t\t\tif (position == 0 || position == userapp.size() + 1) {\n\t\t\t\t\treturn;\n\t\t\t\t} else if (position <= userapp.size()) {\n\t\t\t\t\tint newposition = position - 1;\n\t\t\t\t\tappinfo = userapp.get(newposition);\n\t\t\t\t} else {\n\t\t\t\t\tint newposition = position - userapp.size() - 1 - 1;\n\t\t\t\t\tappinfo = systemapp.get(newposition);\n\n\t\t\t\t}\n\t\t\t\tSystem.out.println(appinfo.getPackName());\n\t\t\t\tView vw = View.inflate(AppMangerActivity.this,\n\t\t\t\t\t\tR.layout.pop_laoout, null);\n\t\t\t\tlinear = (LinearLayout) vw.findViewById(R.id.pop_linear);\n\t\t\t\tlinearone = (LinearLayout) vw.findViewById(R.id.pop_linearone);\n\t\t\t\tlineartwo = (LinearLayout) vw.findViewById(R.id.pop_lineartwo);\n\t\t\t\tlinear.setOnClickListener(AppMangerActivity.this);\n\t\t\t\tlinearone.setOnClickListener(AppMangerActivity.this);\n\t\t\t\tlineartwo.setOnClickListener(AppMangerActivity.this);\n\t\t\t\t// -2表示窗体包裹内容\n\t\t\t\twindow = new PopupWindow(vw, -2, -2);\n\t\t\t\t// 动画效果的播放必须要求弹出窗体有背景颜色\n\t\t\t\twindow.setBackgroundDrawable(new ColorDrawable(\n\t\t\t\t\t\tColor.TRANSPARENT));\n\t\t\t\tint[] location = new int[2];\n\t\t\t\tview.getLocationInWindow(location);\n\t\t\t\tint dp = DensityUtil.dip2px(AppMangerActivity.this, 50);\n\t\t\t\twindow.showAtLocation(parent, Gravity.LEFT | Gravity.TOP, dp,\n\t\t\t\t\t\tlocation[1]);\n\t\t\t\tScaleAnimation scale = new ScaleAnimation(0.3f, 1.0f, 0.3f,\n\t\t\t\t\t\t1.0f, Animation.RELATIVE_TO_SELF, 0.5f,\n\t\t\t\t\t\tAnimation.RELATIVE_TO_SELF, 0.5f);\n\t\t\t\tscale.setDuration(300);\n\t\t\t\tAlphaAnimation alpha = new AlphaAnimation(0.3f, 1.0f);\n\t\t\t\talpha.setDuration(300);\n\t\t\t\tAnimationSet set = new AnimationSet(false);\n\t\t\t\tset.addAnimation(scale);\n\t\t\t\tset.addAnimation(alpha);\n\t\t\t\tvw.startAnimation(set);\n\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n }", "public void alertForOuitMessage() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(context);\n final AlertDialog alert = builder.create();\n alert.getWindow().getAttributes().windowAnimations = R.style.alertAnimation;\n View view = alert.getLayoutInflater().inflate(R.layout.quiz_quit_alert, null);\n TextView title1 = (TextView) view.findViewById(R.id.title1);\n title1.setText(context.getString(R.string.quiz_quit_are));\n title1.setTypeface(VodafoneRg);\n TextView title2 = (TextView) view.findViewById(R.id.title2);\n title2.setText(context.getString(R.string.quiz_quit_progress));\n title2.setTypeface(VodafoneRg);\n TextView quiz_text = (TextView) view.findViewById(R.id.quit_text);\n quiz_text.setTypeface(VodafoneRg);\n LinearLayout quit_layout = (LinearLayout) view.findViewById(R.id.quit_layout);\n alert.setCustomTitle(view);\n TextView quit_icon = (TextView) view.findViewById(R.id.quit_icon);\n quit_icon.setTypeface(materialdesignicons_font);\n quit_icon.setText(Html.fromHtml(\"&#xf425;\"));\n quit_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alert.dismiss();\n finish();\n }\n });\n alert.show();\n }", "@Override\n\tprotected boolean onTap(int index) {\n\t\tfinal Lot lot = LotData.getLots().get(Integer.valueOf(mOverlays.get(index).getSnippet()));\n\n\t\t// create dialog view\n\t\tLayoutInflater inflater = (LayoutInflater) mContext\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tView layout = inflater.inflate(R.layout.lotdialog, null);\n\n\t\t// set lot name\n\t\tTextView title = (TextView) layout.findViewById(R.id.label);\n\t\ttitle.setText(\"Lot \" + lot.getName());\n\n\t\t// set lot icon\n\t\tImageView icon = (ImageView) layout.findViewById(R.id.icon);\n\t\ticon.setImageDrawable(Util.getImage(lot.getName(), mContext));\n\n\t\t// set lot count progress\n\t\tTextProgressBar progressBar = (TextProgressBar) layout\n\t\t\t\t.findViewById(R.id.progress);\n\t\tif (lot.getLatestCount() == -1)\n\t\t{\n\t\t\tprogressBar.setVisibility(View.INVISIBLE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tprogressBar.setLot(lot);\n\t\t}\n\t\t\n\t\tView dirLink = layout.findViewById(R.id.dirLink);\n\t\tdirLink.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// launch Google Maps, show directions to lot\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW, Uri\n\t\t\t\t\t\t.parse(\"http://maps.google.com/maps?f=d&daddr=\"\n\t\t\t\t\t\t\t\t+ lot.getLatitude() + \",\" + lot.getLongitude()\n\t\t\t\t\t\t\t\t+ \" (Lot \" + lot.getName() + \")\"));\n\t\t\t\tintent.setComponent(new ComponentName(\n\t\t\t\t\t\t\"com.google.android.apps.maps\",\n\t\t\t\t\t\t\"com.google.android.maps.MapsActivity\"));\n\t\t\t\tmContext.startActivity(intent);\n\t\t\t}\n\t\t});\n\t\t\n\t\tView statLink = layout.findViewById(R.id.statLink);\n\t\tstatLink.setOnClickListener(new OnClickListener()\n\t\t{\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tIntent intent = new Intent(mContext,\n\t\t\t\t\t\tLotActivity.class);\n\t\t\t\tintent.putExtra(\"lot\", lot.getID());\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\t// show dialog\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(mContext);\n\t\tbuilder.setView(layout);\n\t\tAlertDialog alertDialog = builder.create();\n\t\talertDialog.show();\n\t\treturn true;\n\t}", "public void handleResultShow(){\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Make a selection\");\n\n //create the String[] to display the search result to user\n final CharSequence[] sArray = new CharSequence[searchResult.size()];\n for (int i = 0; i < searchResult.size(); i++){\n sArray[i] = searchResult.get(i).getSymbolwithName();\n }\n builder.setItems(sArray, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //add the selection stock to main page\n validateAdd(searchResult.get(which));\n updatePrice();\n }\n });\n\n builder.setNegativeButton(\"Nevermind\", null);\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }", "public AlertDialog openAdder() {\n // build the AlertDialog\n AlertDialog.Builder addBuilder = new AlertDialog.Builder(this);\n addBuilder.setTitle(\"Add item\");\n addBuilder.setMessage(\"Name of new item:\");\n\n // have editable text field to specify new item\n final EditText editText = new EditText(this);\n addBuilder.setView(editText);\n\n // add item when positive button is clicked\n addBuilder.setPositiveButton(\"Add\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n items.add(new Item(editText.getText().toString(), false));\n itemsAdapter.notifyDataSetChanged();\n }\n });\n\n // do nothing when negative button is clicked\n addBuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n\n return addBuilder.create();\n }", "public void showDialog(View view){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Warning!\");\n builder.setMessage(\"Are you sure you want to stop the service? Playback will be stopped\");\n builder.setPositiveButton(\"YES\", (dialog, which) -> {\n // reset items in list to default state\n adapter = new ListAdapter(ClipActivity.this, audioList, durationList);\n mRecyclerView.setAdapter(adapter);\n findViewById(R.id.overlay).setVisibility(View.GONE);\n\n // disable the respective buttons\n startButton.setEnabled(true);\n stopButton.setEnabled(false);\n resumeButton.setEnabled(false);\n pauseButton.setEnabled(false);\n stopPlayback.setEnabled(false);\n playButton.setEnabled(false);\n\n // bind service again and then stopService\n if(!mIsBound)\n getApplicationContext().bindService(ClipServiceIntent, mConnection, 0);\n Intent stopIntent = new Intent(\"StopService\");\n sendBroadcast(stopIntent);\n });\n builder.setNegativeButton(\"CANCEL\", (dialog, which) -> { dialog.dismiss(); });\n builder.create().show();\n }", "private void openHelpDialog() {\r\n\t\t// Get view and put relevant information into the view.\r\n\t\tLayoutInflater li = LayoutInflater.from(this);\r\n\t\tView view = li.inflate(R.layout.archive_help_dialog, null);\r\n\r\n\t\tnew AlertDialog.Builder(this)\r\n\t\t\t\t.setTitle(\r\n\t\t\t\t\t\tgetResources().getString(R.string.action_archive)\r\n\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t+ getResources()\r\n\t\t\t\t\t\t\t\t\t\t.getString(R.string.action_help))\r\n\t\t\t\t.setIcon(R.drawable.icon)\r\n\t\t\t\t.setView(view)\r\n\t\t\t\t.setNegativeButton(R.string.dialog_general_button_close,\r\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\tint whichButton) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}).show();\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(View v) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(Resume_create_employee.this);\n builder.setTitle(\"Select\");\n ListView list = new ListView(Resume_create_employee.this);\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(Resume_create_employee.this, R.layout.shortlistitem,\n R.id.textView1, str_exp);\n\n list.setAdapter(adapter);\n list.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n // TODO Auto-generated method stub\n if (dialog.isShowing()) {\n\n dialog.dismiss();\n\n\n }\n res_exp.setText(str_exp[position]+ \" years\");\n res_exp.setTextColor(Color.parseColor(\"#000000\"));\n }\n });\n builder.setView(list);\n dialog = builder.create();\n dialog.show();\n }", "private void openPopupMold(final int position, String start_dt, String end_dt, final String KEY) {\n final Dialog dialog = new Dialog(CompositeActivity.this, R.style.Theme_AppCompat_DayNight_Dialog_Alert);\n View dialogView;\n\n if (KEY.equals(\"WK\")) {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_worker, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n StaffType = dialog.findViewById(R.id.StaffType);\n StaffType.setText(compositeMasterArrayList.get(position).getStaffTp());\n dialog.findViewById(R.id.rll2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n popupWorker(StaffType);\n }\n });\n\n\n } else {\n dialogView = LayoutInflater.from(CompositeActivity.this).inflate(R.layout.change_mold, null);\n dialog.setCancelable(false);\n dialog.setContentView(dialogView);\n }\n\n final TextView ngaystart, giostart, Used;\n ngaystart = dialog.findViewById(R.id.ngaystart);\n giostart = dialog.findViewById(R.id.giostart);\n\n final TextView ngayend, gioend;\n ngayend = dialog.findViewById(R.id.ngayend);\n gioend = dialog.findViewById(R.id.gioend);\n Used = dialog.findViewById(R.id.Used);\n tvid = dialog.findViewById(R.id.tvid);\n tvid.setText(compositeMasterArrayList.get(position).getCode());\n\n if (compositeMasterArrayList.get(position).getUseYn().equals(\"Y\")) {\n Used.setText(\"USE\");\n } else {\n Used.setText(\"UNUSE\");\n }\n dialog.findViewById(R.id.im1).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openCameraScan();\n }\n });\n\n dialog.findViewById(R.id.confirm).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (tvid.getText().toString().length() != 0) {\n //so sanh 2 ngay duoc chon\n Date dsend = new Date();\n Date dstart = new Date();\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n dstart = sdf.parse(ngaystart.getText().toString() + \" \" + giostart.getText().toString());\n dsend = sdf.parse(ngayend.getText().toString() + \" \" + gioend.getText().toString());\n\n } catch (ParseException ex) {\n Log.e(\"rrr\", ex.getMessage());\n }\n\n if (dsend.after(dstart)) {\n\n String us = Used.getText().toString();\n String keyus = \"\";\n if (us.equals(\"USE\")) {\n keyus = \"Y\";\n } else {\n keyus = \"N\";\n }\n if (KEY.equals(\"WK\")) {\n showDialog();\n modifyProcessMachineWK(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n } else {\n showDialog();\n modifyProcessMachine(KEY,compositeMasterArrayList.get(position).getPmId(),keyus,ngaystart.getText().toString() + \" \" + giostart.getText().toString(),ngayend.getText().toString() + \" \" + gioend.getText().toString());\n }\n\n } else {\n AlertError.alertError(\"Start day was bigger than end day. That is wrong\", CompositeActivity.this);\n }\n\n } else {\n tvid.setError(\"Please input here!\");\n }\n\n }\n });\n\n dialog.findViewById(R.id.rl2).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openPpUse(Used);\n }\n });\n\n final String yy, MM, dd, hh, mm, ss, yye, MMe, dde, hhe, mme, sse;\n if (start_dt.length() == 19) {\n yy = start_dt.substring(0, 4);\n MM = start_dt.substring(5, 7);\n dd = start_dt.substring(8, 10);\n hh = start_dt.substring(11, 13);\n mm = start_dt.substring(14, 16);\n ss = start_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n if (end_dt.length() == 19) {\n yye = end_dt.substring(0, 4);\n MMe = end_dt.substring(5, 7);\n dde = end_dt.substring(8, 10);\n hhe = end_dt.substring(11, 13);\n mme = end_dt.substring(14, 16);\n sse = end_dt.substring(17, 19);\n } else {\n AlertError.alertError(\"Format date incorrect.\", CompositeActivity.this);\n return;\n }\n ngaystart.setText(yy + \"-\" + MM + \"-\" + dd);\n ngayend.setText(yye + \"-\" + MMe + \"-\" + dde);\n giostart.setText(hh + \":\" + mm + \":\" + ss);\n gioend.setText(hhe + \":\" + mme + \":\" + sse);\n\n ngaystart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngaystart);\n }\n });\n giostart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(giostart, hh, mm);\n }\n });\n ngayend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogDay(ngayend);\n }\n });\n gioend.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogHour(gioend, hhe, mme);\n }\n });\n\n dialog.findViewById(R.id.btclose).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n dialog.cancel();\n }\n });\n\n dialog.show();\n }", "AlertDialog getAlertDialog();", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public Dialog onCreateDialog(int id) {\n switch (id) {\n\n case QUALIFICATION_ALERTDIALOG:\n\n AlertDialog.Builder builder1 = new AlertDialog.Builder(UpdateProfileActivity.this)\n .setTitle(\"Job Type\")\n .setSingleChoiceItems(qualificationList, -1, new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // TODO Auto-generated method stub\n // Toast.makeText(getApplicationContext(),\"The selected\" + experienceList[which], Toast.LENGTH_LONG).show();\n etQualification.setText(qualificationList[which]);\n //dismissing the dialog when the user makes a selection.\n dialog.dismiss();\n }\n });\n AlertDialog alertdialog1 = builder1.create();\n return alertdialog1;\n\n\n }\n return null;\n\n }", "public OverlayListItem() {\n this.id = -1;\n }", "private void pop(){\n AlertDialog.Builder start = new AlertDialog.Builder(this);\n start.setTitle(\"THE ADVANCED HANGMAN - INSTRUCTIONS\");\n start.setMessage(\"The advanced hangman is an advanced version of the traditional hangman game. \\nThe objective of the game is to guess the correct word within six chances.\\nThis game is like a treasure hunt game. Two hints will be provided. \\n\\nHint 1: when the player makes two wrong guesses. This hint will be a one vague one. \\n\\nHint 2: when the player makes four wrong guesses. This hint will be a sort of giveaway. \\n\\n NOTE : The hints appear for a short period of time. Be attentive.\");\n start.setPositiveButton(\"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n MainActivity.this.play(); //is pressed ok, play function is called.\n }\n });\n start.show();\n }", "@Override \n\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t \t\n\t\t\t }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "void getItemDetails(String details, final SellMenuItem SellItem) {\n// final String[] options=details.split(\"\\\\|\");\n final String[] options = details.split(\"\\\\\\\\\");\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"اختر تفاصيل القطعه\");\n\n\n builder.setItems(options, new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n SellItem.setF4(options[which]);\n\n menuItems.add(SellItem);\n\n\n adapter.notifyDataSetChanged();\n\n }\n });\n builder.show();\n\n\n }", "private void showTip() {\n if (alertDialog == null) {\n alertDialog = new AlertDialog.Builder(this)\n .create();\n }\n alertDialog.show();\n View tipView = View.inflate(this, R.layout.edit_alert_layout, null);\n View tv_yes = (TextView) tipView.findViewById(R.id.tv_yes);\n tv_yes.setOnClickListener(this);\n tipView.findViewById(R.id.tv_no).setOnClickListener(this);\n alertDialog.setContentView(tipView);\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onShow(DialogInterface arg0) {\n\n }" ]
[ "0.6119529", "0.61047375", "0.60630524", "0.6048027", "0.6023161", "0.5933967", "0.59222716", "0.5876435", "0.5858195", "0.5855563", "0.58516175", "0.5847033", "0.582627", "0.58177733", "0.58132434", "0.58063453", "0.58028996", "0.58005995", "0.57991683", "0.57855105", "0.5742617", "0.5730902", "0.5694687", "0.5691224", "0.5686313", "0.56861633", "0.56791466", "0.5653558", "0.5650948", "0.56156087", "0.5612395", "0.56082916", "0.5595838", "0.5591844", "0.55839336", "0.5581271", "0.5580071", "0.5571437", "0.55574906", "0.55549", "0.5549378", "0.55480105", "0.5540796", "0.55389196", "0.553823", "0.5536254", "0.5535466", "0.5529919", "0.5525182", "0.55247724", "0.551716", "0.5513126", "0.55106497", "0.54952747", "0.54946023", "0.5484796", "0.5484796", "0.54823893", "0.5481268", "0.5479722", "0.54693246", "0.5465629", "0.5461556", "0.54574895", "0.54574895", "0.5456299", "0.5456299", "0.54557496", "0.54557496", "0.54557496", "0.54557496", "0.5447085", "0.5447085", "0.5447085", "0.5447085", "0.5446318", "0.5436405", "0.5433439", "0.54304343", "0.54304343", "0.5430388", "0.54296064", "0.5429184", "0.5420215", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5414937", "0.5413225", "0.541203", "0.5407124", "0.5407124", "0.5407124", "0.5406853" ]
0.0
-1
TODO Autogenerated method stub
@Override public void draw(Canvas arg0, MapView arg1, boolean arg2) { super.draw(arg0, arg1, arg2); }
{ "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
Stores the userfriendly name of the shape
private Primitive(String shape) { this.shape = shape; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getShapeName();", "void setShapeLabel(String Label);", "public static String getCurrentShapeName() {\n\t\treturn currentShapeName;\n\t}", "String getLayerShapeName();", "String getShapeLabel();", "public void setShape(Info shape) {\n \n }", "public void setShape(String shape)\n\t{\n \t \n \tlength.setVisible(false); \n \twidth.setVisible(false); \n \theight.setVisible(false); \n \tradius.setVisible(false); \n \tradius2.setVisible(false); \n \troll.setVisible(false); \n \tpitch.setVisible(false); \n \tyaw.setVisible(false); \n \tquality.setVisible(false); \n \tsides.setVisible(false);\n \t\n \tlengthText.setVisible(false); \n \twidthText.setVisible(false); \n \theightText.setVisible(false); \n \tradiusText.setVisible(false); \n \tradius2Text.setVisible(false); \n \trollText.setVisible(false); \n \tpitchText.setVisible(false); \n \tyawText.setVisible(false); \n \tqualityText.setVisible(false); \n \tsidesText.setVisible(false);\n \t\n\t\tif(shape.equals(\"Cube\"))\n \t{\n \t\tlengthText.setVisible(true);\n \t\tlength.setVisible(true);\n \t\twidthText.setVisible(true);\n \t\twidth.setVisible(true);\n \t\theightText.setVisible(true);\n \t\theight.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\tyawText.setVisible(true);\n \t\tyaw.setVisible(true);\n \t\t\n \t\tlength.setText(\"1\");\n \t\twidth.setText(\"1\");\n \t\theight.setText(\"1\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\tyaw.setText(\"0\");\n \t}\n \telse if(shape.equals(\"Sphere\"))\n \t{\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\tqualityText.setVisible(true);\n \t\tquality.setVisible(true);\n \t\t\n \t\tradius.setText(\"1\");\n \t\tquality.setText(\"15\");\n \t}\n \telse if(shape.equals(\"Prism\"))\n \t{\n \t\theightText.setVisible(true);\n \t\theight.setVisible(true);\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\tsidesText.setVisible(true);\n \t\tsides.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\tyawText.setVisible(true);\n \t\tyaw.setVisible(true);\n \t\t\n \t\theight.setText(\"1\");\n \t\tradius.setText(\"1\");\n \t\tsides.setText(\"4\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\tyaw.setText(\"0\");\n \t\t\n \t}\n \telse if(shape.equals(\"Cylinder\"))\n \t{\n \t\theightText.setVisible(true);\n \t\theight.setVisible(true);\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\t//yawText.setVisible(true);\n \t\t//yaw.setVisible(true);\n \t\t\n \t\theight.setText(\"1\");\n \t\tradius.setText(\"1\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\t//yaw.setText(\"0\");\n \t}\n \telse if(shape.equals(\"Torus\"))\n \t{\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\tradius2Text.setVisible(true);\n \t\tradius2.setVisible(true);\n \t\tqualityText.setVisible(true);\n \t\tquality.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\tyawText.setVisible(true);\n \t\tyaw.setVisible(true);\n \t\t\n \t\tradius.setText(\"1\");\n \t\tradius2.setText(\"2\");\n \t\tquality.setText(\"15\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\tyaw.setText(\"0\");\n \t}\n \t\n\t}", "@Override//overring a library function\n public String toString() {\n return shape + \" \" + name;//toString() is called everytime printing is done\n }", "void enterShapeEditor(String layer, String shape);", "public String whatShape();", "public String toString() {\n\t\t\treturn shape;\n\t\t}", "@Override\n\tpublic String shape() {\n\t\treturn \"Text\";\n\t}", "void xsetName(org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName name);", "void displayShape(Shape shape);", "public String getShapeType(){\n\t\treturn shapeType;\n\t}", "public String saveShape(){\n\t\tString s = \"\";\n\t\ts+=\"Circle\\n\";\n\t\ts+= this.circle.toString();\n\t\tint xPoint = this.circle.getCentre().getX();\n\t\tint yPoint = this.circle.getCentre().getY();\n\t\tint radius = this.circle.getRadius();\n\t\ts+= \"\\tcenter:(\"+ xPoint + \",\"+ yPoint+\")\\n\";\n\t\ts+= \"\\tradius:\"+ radius+\"\\n\";\n\t\ts+= \"End Circle\\n\";\n\t\t\n\t\treturn s;\n\t}", "public String getRandomShape(){\n\t\tRandom randon = new Random();\n\t\treturn Shape.values()[randon.nextInt(Shape.values().length)].toString();\n\t}", "protected static String convertGeomName(Object value, boolean isDisplay)\n \t{\n \t\tif (value == null || !(value instanceof String)) return null;\n \t\tString str = (String)value;\n \t\tint indexOfAt = str.indexOf('@');\n \t\tif (isDisplay)\n \t\t{\n \t\t\tif (indexOfAt >= 0)\n \t\t\t{\n \t\t\t\tString newS = \"\";\n \t\t\t\tfor (int i = 0; i < str.length(); i++)\n \t\t\t\t{\n \t\t\t\t\tchar c = str.charAt(i);\n \t\t\t\t\tif (c == '@') c = '_';\n \t\t\t\t\tnewS += c;\n \t\t\t\t}\n \t\t\t\tstr = newS;\n \t\t\t}\n \t\t} else if (indexOfAt < 0) return null;\n \t\treturn str;\n \t}", "public void setName (String name){\n \n boyName = name;\n }", "org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName xgetName();", "public ShapeNode(Shape key) {\r\n super(Children.LEAF, Lookups.fixed( new Object[] {key} ) );\r\n this.shape = key;\r\n setIconBaseWithExtension(key.getImage());\r\n \r\n // Set image label\r\n String imagePath = key.getImage();\r\n \r\n if (imagePath.contains(\"/d.png\"))\r\n setDisplayName(\"<html><b> Dimension </b></html>\");\r\n else if (imagePath.contains(\"/f.png\"))\r\n setDisplayName(\"<html><b> Feature </b></html>\");\r\n \r\n else if (imagePath.contains(\"/p.png\"))\r\n setDisplayName(\"<html><b> Perception </b></html>\");\r\n \r\n \r\n \r\n \r\n }", "public String Name() {\t\t\r\n\t\treturn BrickFinder.getDefault().getName();\r\n\t}", "public void decideName()\n {\n System.out.println(\"What do want your newly tamed WIND dragon to be named?\");\n String name = new String(input.nextLine());\n \n setName(name);\n }", "IShape getShape(String name);", "public String toString() {\n String str = \"\";\n str += \"Shape: \" + name + \"\\n\";\n str += \"Center: \" + \"(\" + (xPosition+radius) + \",\" + (yPosition+radius) + \")\" + \"\\n\";\n str += \"Radius: \" + radius + \"\\n\";\n str += \"Color: \" + color + \"\\n\";\n str += \"Selected: \" + isSelected + \"\\n\";\n return str;\n }", "public StringKey getName() {\n return ModelBundle.SHIP_NAME.get(name);\n }", "public void assignShape() {\n\t\t\n\t}", "@Override\n\tpublic void getShape() {\n\n\t}", "public void setShape(ShapeType shape) {\n\t\tthis.shape = shape;\n\t}", "@Override\n\tpublic String getSaveString() {\n\t\tString save = \"Absorber \"+this.name+\" \"+this.x/GameBoard.PixelsPerL+\" \"+this.y/GameBoard.PixelsPerL+\" \"+this.width+\" \"+this.height;\n\t\treturn save;\n\t}", "public void setName (String Name);", "public void setName (String Name);", "public void setName (String Name);", "public void setMyShape(int shapeIndex){this.myShape = shapeIndex;}", "public void saveLocation(String name) {\n // Storing name in pref\n editor.putString(POSITION, name);\n\n // commit changes\n editor.commit();\n }", "protected abstract String getName();", "void drawShape(Shape s) {\n }", "AbstractVariationPointName createAbstractVariationPointName();", "@Override\n public void run(){\n gameItem = shapeFactory.getShape(shapeButton, shapeName);\n if (gameItem != null) {\n gameItem.clearName(); //clears text\n gameItem.draw(); //draws new shape\n }\n }", "protected abstract String name ();", "public String getName() {return this.name.getText();}", "@Test(expected = IllegalArgumentException.class)\n public void sameShapeName() {\n\n testAnimation.addShape(r, 1, 100);\n\n // new shape with same name\n IShape f = new Rectangle(\"R\",\n 2, 4,\n 3, 50, 10,\n 30.0, 75.0);\n\n testAnimation.addShape(f, 30, 80);\n }", "VariationPointName createVariationPointName();", "private void setShape(ChamberShape theShape) {\n mySize = theShape;\n createDoorsFromExits();\n }", "IShape getCurrentShape();", "void drawMancalaShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);", "@Override\n public void setName(String name) {\n \n }", "private void addShapeNameButtons() {\n popupPanel.add(SHAPE_NAME_LABEL);\n ButtonGroup bg = new ButtonGroup();\n for (String name : model.getIds()) {\n JRadioButton jb = new JRadioButton(name);\n bg.add(jb);\n shapeNames.add(jb);\n popupPanel.add(jb);\n }\n\n }", "private void displayName(String name) {\n\t\tGLabel profileName = new GLabel(name);\n\t\tprofileName.setFont(PROFILE_NAME_FONT);\n\t\tprofileName.setColor(Color.BLUE);\n\t\tadd(profileName, LEFT_MARGIN, TOP_MARGIN + profileName.getHeight());\n\t\tnameY = profileName.getY();\n\t}", "public void rename()\n\t{\n\t\t// get the object within the node\n\t\tObject string = this.getUserObject();\n\n\t\t// should always be a string, given the constructor\n\t\tif (string instanceof String)\n\t\t{\n\t\t\tstring = JOptionPane.showInputDialog(\"Enter a New Name\");\n\n\t\t\tif (string != null && string instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(string);\n\t\t\t\tthis.name = (String) string;\n\t\t\t}\n\t\t}\n\t}", "public String toString() {\n\t\treturn String.format(\"Shape: %s,Color: %s\", shape, color);\n\t}", "@Override\n\t\t\tpublic String getName() {\n\t\t\t\treturn name;\n\t\t\t}", "void setName(String name_);", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "public String getName() {\n Boolean color = this.getColor();\n if (!color) {\n return \"bQ\";\n }\n return \"wQ\";\n }", "abstract String getName();", "public void setName(String name){this.name = name;}", "@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}", "private Text initNameText(){\n Text name = new Text(Values.NAME);\n name.setStyle(\"-fx-font-weight: bold;\" + \"-fx-font-size: 24;\");\n return name;\n }", "public void setName(String name){this.name=name;}", "public void setCurrentShape(Shape currentShape, JTextField textfield ) {\n\t\t\n\t\tthis.currentShape = currentShape;\n\t\tthis.statusText = textfield;\n\t}", "public void setShape( final FireShapes shape ) {\r\n\t\tthis.shape = shape;\r\n\t}", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();" ]
[ "0.77659214", "0.6842729", "0.6826816", "0.6742754", "0.6693903", "0.6250861", "0.6142378", "0.6122507", "0.6122308", "0.6093659", "0.59950376", "0.5953063", "0.5942682", "0.5927368", "0.58863795", "0.58226395", "0.5792852", "0.57656765", "0.5691445", "0.56913424", "0.56704754", "0.566196", "0.5651567", "0.56349766", "0.56252867", "0.56008625", "0.5596397", "0.5594972", "0.5592859", "0.5590461", "0.5586595", "0.5586595", "0.5586595", "0.55817807", "0.5554296", "0.55533963", "0.5553269", "0.5550586", "0.5536334", "0.55220115", "0.55111605", "0.5493047", "0.5491623", "0.5484068", "0.5480226", "0.5463885", "0.5463116", "0.545882", "0.5457854", "0.54534173", "0.5431615", "0.5427604", "0.54200083", "0.54172766", "0.54149914", "0.5405798", "0.54028356", "0.54005563", "0.5400293", "0.538744", "0.53866947", "0.5379901", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749", "0.5377749" ]
0.0
-1
Returns the userfriendly name of the shape
public String toString() { return shape; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getShapeName();", "String getLayerShapeName();", "String getShapeLabel();", "public String whatShape();", "public static String getCurrentShapeName() {\n\t\treturn currentShapeName;\n\t}", "@Override//overring a library function\n public String toString() {\n return shape + \" \" + name;//toString() is called everytime printing is done\n }", "org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName xgetName();", "public String getRandomShape(){\n\t\tRandom randon = new Random();\n\t\treturn Shape.values()[randon.nextInt(Shape.values().length)].toString();\n\t}", "@Override\n\tpublic String shape() {\n\t\treturn \"Text\";\n\t}", "void displayShape(Shape shape);", "public String toString() {\n\t\treturn String.format(\"Shape: %s,Color: %s\", shape, color);\n\t}", "public String getName() {\n Boolean color = this.getColor();\n if (!color) {\n return \"bQ\";\n }\n return \"wQ\";\n }", "IShape getShape(String name);", "public String getShapeType(){\n\t\treturn shapeType;\n\t}", "public String toStringShort() {\n\treturn AbstractFormatter.shape(this);\n}", "public String toString() {\n String str = \"\";\n str += \"Shape: \" + name + \"\\n\";\n str += \"Center: \" + \"(\" + (xPosition+radius) + \",\" + (yPosition+radius) + \")\" + \"\\n\";\n str += \"Radius: \" + radius + \"\\n\";\n str += \"Color: \" + color + \"\\n\";\n str += \"Selected: \" + isSelected + \"\\n\";\n return str;\n }", "void setShapeLabel(String Label);", "public String Name() {\t\t\r\n\t\treturn BrickFinder.getDefault().getName();\r\n\t}", "@Override\n\tpublic String getShape() {\n\t\treturn \"Rectangle\";\n\t}", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();" ]
[ "0.8744489", "0.78085697", "0.7744992", "0.72506595", "0.687967", "0.67593014", "0.66548145", "0.6600809", "0.65518904", "0.6461386", "0.64506435", "0.6282266", "0.62779033", "0.62591356", "0.6252478", "0.6251019", "0.62115633", "0.6204647", "0.61751735", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295", "0.6168295" ]
0.6983785
4
A constructor for the mesh class for nonprimitive geometries
public Mesh(int[][] faces, Vector[] verts) { // Will be read in from a file this.faces = faces; this.verts = verts; normals = new Vector[faces.length]; // One normal for each face ds = new double[faces.length]; // One d value for each face for (int i = 0; i < faces.length; i++) { normals[i] = this.normal(faces[i]); // Calculate the normal to the face ds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the d value for the face } calcBoxVerts(); // Calculates and stores the vertices of the arbitrarily orientated bounding box }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Mesh() {\n this(DEFAULT_COORDS);\n }", "public Mesh(String shape) {\n\t\tthis(primitiveFromStr(shape)); // Call the other constructor for primitive geometries\n\t}", "public ShapeTriMesh() {\n\t\tsuper();\n\t\tthis.setName(UUID.randomUUID().toString());\n\t}", "public Mesh() {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n }", "public DiscMesh() {\n this(1f, 25);\n }", "public MeshPart() {\n\t}", "public MeshLike() {\n this.vertices = new ArrayList<Vector3>();\n this.normals = new ArrayList<Vector3>();\n this.texCoords = new ArrayList<Vector2>();\n this.faces = new ArrayList<Face>();\n this.foundNormals = false;\n this.foundTexture = false;\n this.vOffset = 0;\n this.tOffset = 0;\n this.nOffset = 0;\n }", "public Mesh(Primitive shape) {\n\t\tswitch (shape) {\n\t\t\tcase CUBE:\n\t\t\t\tgenerateCube();\n\t\t\t\tbreak;\n\t\t\tcase CUBOID:\n\t\t\t\tgenerateCube();\n\t\t\t\tscale(2, 1, 1); // Stretch the cube along the x-axis to give a cuboid\n\t\t\t\tbreak;\n\t\t\tcase TRIANGULAR_PRISM:\n\t\t\t\tgeneratePrism();\n\t\t\t\tbreak;\n\t\t\tcase SPHERE:\n\t\t\t\tgenerateSphere();\n\t\t\t\tbreak;\n\t\t\tcase CONVEX_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size (to allow a better demonstration of how the lens works) and then squash the sphere along the x-axis\n\t\t\t\tbreak;\n\t\t\tcase CONCAVE_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size and squash along the x-axis\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < verts.length; i++) {\n\t\t\t\t\tif (verts[i].getElement(0) < -0.0001) { // Don't move points in the middle of the x-axis\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) + 0.8); // Move points on the left to the right. This part still bulges out to the left, but when it is on the right it is concave\n\t\t\t\t\t} else if (verts[i].getElement(0) > 0.0001) {\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) - 0.8); // Move points on the right to the left.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The faces are 'inside out', so the ordering of the vertices must be reversed in order to make the normals point the correct way\n\t\t\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\t\t\t// Swap the first and last vertices (0 and 2)\n\t\t\t\t\tint temp = faces[i][0];\n\t\t\t\t\tfaces[i][0] = faces[i][2];\n\t\t\t\t\tfaces[i][2] = temp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HALF_CYLINDER:\n\t\t\t\tgenerateHalfCylinder();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\"Mesh constructor cannot take a null primitive\");\n\t\t}\n\t\tnormals = new Vector[faces.length];\n\t\tds = new double[faces.length];\n\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\tnormals[i] = normal(faces[i]); // Calculate the normal for the face\n\t\t\tds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the value of d for the face\n\t\t}\n\t\tcalcBoxVerts(); // Calculate and store the vertices of the AOBB\n\t}", "private MeshUtil() {}", "public Shape(TriangleMesh mesh) {\n super(mesh);\n this.mesh = mesh;\n setVisuals(\"purple\");\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "Vertex(){}", "public Mesh(String Path) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n \r\n ReadFile reader = new ReadFile(Path);\r\n String[] text = new String[0];\r\n try {\r\n text = reader.OpenFile();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Mesh.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (String text1 : text) {\r\n if (text1.length() > 0) {\r\n if (text1.charAt(0) == 'v') {\r\n text1 = text1.replaceAll(\"v\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n vertices.add(new Vertex(Double.valueOf(tmp[0]), Double.valueOf(tmp[1]), Double.valueOf(tmp[2])));\r\n }\r\n } else if (text1.charAt(0) == 'f') {\r\n text1 = text1.replaceAll(\"f\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n tris.add(new Triangle(vertices.get(Integer.valueOf(tmp[0]) - 1), vertices.get(Integer.valueOf(tmp[1]) - 1), vertices.get(Integer.valueOf(tmp[2]) - 1)));\r\n }\r\n }\r\n } else {\r\n //do nothing\r\n }\r\n }\r\n }", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "public QuadMesh() {\n lastInfo = new GeometryIntersectionInformation();\n lastRay = null;\n minMax = null;\n boundingVolume = null;\n triangleMeshGroupCache = null;\n\n vertexPositions = null;\n vertexNormals = null;\n vertexBinormals = null;\n vertexTangents = null;\n vertexColors = null;\n vertexUvs = null;\n quadIndices = null;\n incidentQuadsPerVertexArray = null;\n }", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public KmlGeometryFeature(){\r\n }", "public MultiShapeLayer() {}", "public QuadMesh\n (boolean isBeingSplit,\n Matrix4f cubeMatrix, \n\t\tVector3f color,\n\t\tboolean inAtmosphere, \n\t\tVector3f meshOffset, \n\t\tboolean inFrustum, \n\t\tfloat arcLengthOverSize, \n\t\tVector3f center, \n\t\tfloat intensity, \n\t\tTexture2D Heightmap, \n\t\tString f ,\n\t\tQuadMesh p, \n\t\tVector3f v1, \n\t\tVector3f v2, \n\t\tVector3f v3, \n\t\tVector3f v4,\n\t\tfloat size,\n\t\tint x, \n\t\tint y, \n\t\tboolean hasChildren, \n\t\tArrayList<QuadMesh> children, \n\t\tBoundingSphere sphere, \n\t\tGeometry mesh, \n\t\tVector3f faceIndex, \n\t\tfloat centerOff,\n\t\tGeometry bsp)\t\n{\n\t\tfirst = v1;\n\t\tsecond = v2;\n\t\tthird = v3;\n\t\tfourth = v4;\n\t\twidth = size;\n\t\tindex1 = x;\n\t\tindex2 = y;\n\t\tthis.hasChildren = hasChildren;\n\t\tthis.children = children;\n\t\tparent = p;\n\t\tface = f;\n\t\tthis.sphere = sphere;\n\t\tthis.mesh = mesh;\n\t\tthis.faceIndex = faceIndex;\n\t\tthis.centerOff = centerOff;\n\t\tthis.Heightmap = Heightmap;\n\t\tthis.intensity = intensity;\n\t\tthis.arcLengthOverSize = arcLengthOverSize;\n\t\tthis.center = center;\n\t\tthis.inFrustum = inFrustum;\n\t\tthis.meshOffset = meshOffset;\n\t\tthis.inAtmosphere = inAtmosphere;\n\t\tthis.color = color;\n\t\tthis.cubeMatrix = cubeMatrix;\n\t\tthis.bsp = bsp;\n\n\t\n\t}", "public Mesh(ArrayList<Vertex> inputVertices, ArrayList<Triangle> inputFaces) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = inputVertices;\r\n tris = inputFaces;\r\n }", "public Vertex(){\n\n }", "public Mesh(final float[] vertices) {\n vertexCount = vertices.length / COORDS_PER_VERTEX;\n vertexBuffer = Core.arrayAsBuffer(vertices);\n }", "protected Shape() {}", "public Mesh(float[] positions, float[] textureCoords, float[] normals, int[] indices) {\n this(positions, textureCoords, normals, indices, \n Utils.buildIntArray(MAX_WEIGHTS * positions.length / 3, 0),\n Utils.buildFloatArray(MAX_WEIGHTS * positions.length / 3, 0));\n }", "public Mesh(float[] positions, float[] textureCoords, float[] normals, int[] indices, int[] jointIndices, float[] weights) {\n vertexCount = indices.length;\n\n this.positions = positions;\n this.textureCoords = textureCoords;\n this.normals = normals;\n this.indices = indices;\n this.jointIndices = jointIndices;\n this.weights = weights;\n\n material = new Material();\n\n //Set vertices\n vertices = new Vector3f[positions.length/3];\n for(int i = 0; i<positions.length; i+=3) {\n vertices[i/3] = new Vector3f(positions[i], positions[i+1], positions[i+2]);\n }\n\n //Set faces\n faces = new Face[indices.length/3];\n for(int i = 0; i<indices.length; i+=3) {\n Vector3f[] faceVertices = new Vector3f[3];\n for(int j = 0; j<3; j++) {\n faceVertices[j] = vertices[indices[i+j]];\n }\n faces[i/3] = new Face(faceVertices);\n }\n }", "public LeanTextGeometry() {}", "VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }", "public WB_Normal3d() {\r\n\t\tsuper();\r\n\t}", "public ThreeVector() { \r\n\t\t//returns null for no arguments\r\n\t}", "public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public Shape(MeshView mv) {\n Mesh m = mv.getMesh();\n\n if (m instanceof TriangleMesh) {\n this.mesh = (TriangleMesh) m;\n super.setMesh(m);\n } else {\n throw new IllegalArgumentException(\"Constructing Shape from invalid kind of mesh: \" + m);\n }\n\n setVisuals(\"purple\");\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public Polygon() {\n N = 0;\n a = new Point[4];\n }", "@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }", "public StarsMesh() {\r\n\r\n\t\tvertices = new float[star_count * 3];\r\n\t\tindices = new short[star_count];\r\n\r\n\t\tRandom gen = new Random(System.currentTimeMillis());\r\n\r\n\t\tfor (int x = 0; x < star_count * 3; x += 3) {\r\n\t\t\tint rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(250) - 125) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x] = rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(130) - 65) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x + 1] = rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(200) - 100) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x + 2] = rand;\r\n\r\n\t\t\t// vertices[x+2] = 0;\r\n\r\n\t\t\tindices[x / 3] = (short) ((short) x / 3);\r\n\t\t}\r\n\r\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\r\n\t\tvbb.order(ByteOrder.nativeOrder());\r\n\t\tvertexBuffer = vbb.asFloatBuffer();\r\n\t\tvertexBuffer.put(vertices);\r\n\t\tvertexBuffer.position(0);\r\n\r\n\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\r\n\t\tibb.order(ByteOrder.nativeOrder());\r\n\t\tindexBuffer = ibb.asShortBuffer();\r\n\t\tindexBuffer.put(indices);\r\n\t\tindexBuffer.position(0);\r\n\t}", "public NewShape() {\r\n\t\tsuper();\r\n\t}", "public Vector3 () {\n }", "private PolygonEditor()\n {\n this(null, 1.0f);\n }", "public CarrierShape()\n {\n super();\n }", "public Vector3D() {\n zero();\n }", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "public Triangle() {\n this(0,0,0,0,0);\n }", "public Sphere(final Material m) {\n super(m);\n this.c = new Point3(0,0,0);\n this.r = 1;\n }", "public Sphere (final Material material) {\n super(material);\n\n this.c = new Point3(0,0,0);\n this.r = 1;\n }", "public OpenGLModel() {\n\n\n\t}", "public Triangle() {}", "public FloatVector3D(){}", "public BoundingBox3d() {\n reset();\n }", "public TriMeshCollideable( CollisionEngine eng )\n {\n super( eng );\n \n // To avoid lots of casts\n this.gfxObject = null;\n }", "public QuadCurve () {\n }", "public Triangle(\n IPoint firstPoint,\n IPoint secondPoint,\n IPoint thirdPoint,\n IPrimitive parent)\n {\n super(parent);\n this.addVertex(firstPoint);\n this.addVertex(secondPoint);\n this.addVertex(thirdPoint);\n\n }", "public Triangle() {\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n // prepare shaders and OpenGL program\n int vertexShader = MyGLRenderer.loadShader(\n GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(\n GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram); // create OpenGL program executables\n\n }", "public DiscMesh(float radius, int numVertices) {\n Validate.nonNegative(radius, \"radius\");\n Validate.inRange(\n numVertices, \"number of vertices\", 3, Integer.MAX_VALUE);\n\n setMode(Mode.TriangleFan);\n\n float[] normals = new float[numAxes * numVertices];\n float[] positions = new float[numAxes * numVertices];\n float[] texCoords = new float[2 * numVertices];\n\n for (int vi = 0; vi < numVertices; ++vi) {\n normals[numAxes * vi] = 0f;\n normals[numAxes * vi + 1] = 0f;\n normals[numAxes * vi + 2] = 1f;\n\n float theta = FastMath.TWO_PI * vi / numVertices;\n float sin = FastMath.sin(theta);\n float cos = FastMath.cos(theta);\n positions[numAxes * vi] = radius * cos;\n positions[numAxes * vi + 1] = radius * sin;\n positions[numAxes * vi + 2] = 0f;\n\n texCoords[2 * vi] = (1f + cos) / 2f;\n texCoords[2 * vi + 1] = (1f + sin) / 2f;\n }\n\n setBuffer(Type.Normal, numAxes, normals);\n setBuffer(Type.Position, numAxes, positions);\n setBuffer(Type.TexCoord, 2, texCoords);\n\n updateBound();\n setStatic();\n }", "public ArangoDBVertex() {\n\t\tsuper();\n\t}", "public Shape(URL url, String unit) {\n ArrayList<Shape> shapes;\n\n if (url.toString().toLowerCase().endsWith(\"obj\")) {\n shapes = loadOBJ(url, unit);\n } else if (url.toString().toLowerCase().endsWith(\"stl\")) {\n shapes = loadSTL(url, unit);\n } else {\n throw new IllegalArgumentException(\"Shape contructor: Not OBJ/STL file: \" + url);\n }\n\n if (shapes.size() != 1) {\n throw new IllegalArgumentException(\"Contructing shape from OBJ/STL file containing more or fewer than one mesh: \" + url);\n }\n this.mesh = (TriangleMesh) shapes.get(0).getMesh();\n super.setMesh(this.mesh);\n setVisuals(\"green\");\n }", "public Shape()\n\t{\n\t\tinitShape();\n\t}", "GLMesh(BindStates bindStates, IOpenGL opengl)\n {\n this.bindStates = bindStates;\n this.opengl = opengl;\n }", "public TriangleComponent()\n {\n status=-1;\n }", "public ColladaFloatVector() {\n super();\n }", "public interface ITriangleMesh {\n /**\n * Add a new vertex (given by position) to the vertex list. The new vertex is\n * appended to the end of the list.\n */\n int addVertex(Vector position);\n\n /**\n * Index in vertex list.\n */\n Vertex getVertex(int index);\n\n int getNumberOfVertices();\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(AbstractTriangle t);\n\n int getNumberOfTriangles();\n\n AbstractTriangle getTriangle(int triangleIndex);\n\n /**\n * Clear mesh - remove all triangles and vertices.\n */\n void clear();\n\n /**\n * Compute the triangles normals.\n */\n void computeTriangleNormals();\n\n\n Vector getTextureCoordinate(int index);\n\n /**\n * Add texture coordinate to mesh.\n */\n void addTextureCoordinate(Vector t);\n\n /**\n * Return the number of texture coordinates in the mesh.\n */\n int getNumberOfTextureCoordinates();\n\n /**\n * Set color to all triangles and all vertices of the mesh.\n */\n void setColor(Vector color);\n}", "public Cylinder() {\n\t\tthis(1.0);\n\t}", "public GObject(Point3D[] v, Face[] f)\n {\n\t this.vertex = v;\n\t this.face = f;\n }", "public FieldLineNode(){\n\t\tthis(1, new Vector3f(0,1,0));\n\t}", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "private void mkMesh()\n\t{\n\t\t/* this initialises the the two FloatBuffer objects */\n\t\n\t\tfloat vertices[] = {\n\t\t\t-0.5f, -0.5f, 0.0f,\t\t// V1 - bottom left\n\t\t\t-0.5f, 0.5f, 0.0f,\t\t// V2 - top left\n\t\t\t 0.5f, -0.5f, 0.0f,\t\t// V3 - bottom right\n\t\t\t 0.5f, 0.5f, 0.0f\t\t\t// V4 - top right\n\t\t\t};\n\t\tfloat texture[] = { \t\t\n\t\t\t// Mapping coordinates for the vertices\n\t\t\t0.0f, 1.0f,\t\t// top left\t\t(V2)\n\t\t\t0.0f, 0.0f,\t\t// bottom left\t(V1)\n\t\t\t1.0f, 1.0f,\t\t// top right\t(V4)\n\t\t\t1.0f, 0.0f\t\t// bottom right\t(V3)\n\t\t\t};\n\t\t/* cache the number of floats in the vertices data */\n\t\tvertexCount = vertices.length;\n\t\t\n\t\t// a float has 4 bytes so we allocate for each coordinate 4 bytes\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\t\n\t\t// allocates the memory from the byte buffer\n\t\tvertexBuffer = byteBuffer.asFloatBuffer();\n\t\t\n\t\t// fill the vertexBuffer with the vertices\n\t\tvertexBuffer.put(vertices);\n\t\t\n\t\t// set the cursor position to the beginning of the buffer\n\t\tvertexBuffer.position(0);\n\t\t\n\t\tbyteBuffer = ByteBuffer.allocateDirect(texture.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\ttextureBuffer = byteBuffer.asFloatBuffer();\n\t\ttextureBuffer.put(texture);\n\t\ttextureBuffer.position(0);\n\t}", "private Mesh createMesh(final int pTrianglesCount) {\n\t\tfinal int pSpeed \t\t\t= 20;\n\t\tfinal int pVertexCount\t \t= Mesh.VERTEX_SIZE * pTrianglesCount * 3; \t\n\t\tfinal float pColor \t\t\t= new Color(0f,0f,0f).getABGRPackedFloat();\n\t\tfinal float pSegmentWidth \t= CAMERA_WIDTH/pTrianglesCount;\n\t\tfinal float[] pBufferData \t= new float[pVertexCount];\t\n\t\t\n\t\tmHeightOffsetCurrent = new float[pVertexCount];\t\t\n\t\t\n\t\t//create triangles \n\t\t// A--B\n\t\t// \\ |\n\t\t// \\|\n\t\t// C\n\t\t//\n\t\tint i = 0;\n\t\tfloat x = 0f;\n\t\tfinal float pInitialHeight = 400;\n\t\tfor (int triangleIndex = 0;triangleIndex<pTrianglesCount;triangleIndex++){\n\t\t\t //first triangle \n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = 0;\t\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\t\n\t\t\t \n\t\t\t i = i+3;\n\t\t\t x = x+pSegmentWidth;\n\t\t }\n\t\t \n\t\tfinal VertexBufferObjectManager VBOM = getVertexBufferObjectManager();\n\t\tfinal HighPerformanceMeshVertexBufferObject pMeshVBO = new HighPerformanceMeshVertexBufferObject(VBOM, pBufferData, pBufferData.length, DrawType.DYNAMIC, true, Mesh.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT);\n\t\t\n//\t\tpMesh = new Mesh(0, 0,pVertexCount,DrawMode.TRIANGLES,pMeshVBO){\t\t\n//\t\t\t\n//\t\t\tfloat progress_x = 0;\n//\t\t\t\n//\t\t\t@Override\n//\t\t protected void onManagedUpdate(final float pSecondsElapsed) { \n//\t\t\t\tsuper.onManagedUpdate(pSecondsElapsed);\n//\t\t\t\tdrawBySine(pSecondsElapsed);\n//\t\t this.mMeshVertexBufferObject.setDirtyOnHardware(); // include this line\n//\t\t progress_x+=(pSpeed*pSecondsElapsed);\n//\t\t };\n//\t\t\t\n//\t\t\tvoid drawBySine(final float pSecondsElapsed){\n//\t\t\t\tfinal float[] pBuff = pMeshVBO.getBufferData();\n//\t\t\t\tfor (int i = 0;i<((pTrianglesCount)*3);i++){ //FIRST part of triangles \n//\t\t\t\t\tif (i%3==0||i==0||((i-1)%3==0)){\n//\t\t\t\t\t\t//every vertex (v0) of triangle must be connected to previous triangle at second vertex (v1) to prevent stairs\n//\t\t\t\t\t\tif (i%3==0&&i>0){ \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = mHeightOffsetCurrent[i-2];\n//\t\t\t\t\t\t} else { \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = getNormalizedSine(i+progress_x, mTouchY, pTrianglesCount*3);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} \n//\t\t\t\t\tpBuff[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = mHeightOffsetCurrent[i];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\tfloat getNormalizedSine(float x, float halfY, float maxX) {\t\n//\t\t\t double factor = (2 * Math.PI) / maxX;\n//\t\t\t return (float) ((Math.sin(x * factor) * halfY) + halfY);\n//\t\t\t}\n//\t\t\t\n//\t\t};\n\t\treturn pMesh;\n\t}", "public Triangle() {\n setPointsAs0();\n S = 0;\n }", "public interface FlatGeometry {\r\n}", "public abstract com.jme.scene.Geometry getJMEGeometry();", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public MyVertex( ) {\n // Set ID and increment so next Vertex count++\n id = count;\n count++;\n\n // Set color to NULL initially\n color = null;\n\n // Create new Lists\n incidentEdges = new ArrayList< Edge >( );\n adjacentVertices = new ArrayList< Vertex >( );\n }", "public Mesh load(String filename)\r\n\t{\r\n\t\tMesh mesh = new Mesh(); mesh.addFileMetaData(filename);\r\n \r\n\t\t//Open file and read in vertices/faces\r\n\t\tScanner sc;\r\n\t\tString line;\r\n\t\t\r\n\t\ttry{\r\n\t\t\tBufferedReader ins = new BufferedReader(new FileReader(filename));\r\n\t\t\tins.readLine(); //ID; always \"nff\"\r\n\t\t\tins.readLine(); //Version\r\n\t\t\t\r\n\t\t\t//We need to move through the header to find the start of the first object\r\n\t\t\t//This will be the first line that contains text that does not start with\r\n\t\t\t//\"viewpos\" or \"viewdir\" (optional features) or \"//\" (comment)\r\n\t\t\twhile(true){\r\n\t\t\t\tline = ins.readLine();\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\r\n\t\t\t\tif(sc.hasNext() == true){\r\n\t\t\t\t\tString token = sc.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((\"viewpos\".equalsIgnoreCase(token) == false) && \r\n\t\t\t\t\t\t\t(\"viewdir\".equalsIgnoreCase(token) == false) &&\r\n\t\t\t\t\t\t\t(\"//\".equals(token.substring(0, 2)) == false)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsc.close();\r\n\t\t\t\r\n\t\t\t//The rest of the file is filled up with objects\r\n\t\t\twhile(true){\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\tString name = sc.next();\r\n\t\t\t\tsc.close();\r\n\t\t\t\t\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\r\n\t\t\t\tVector<Point> vertices = new Vector<Point>();\r\n\t\t\t\tVector<Face> faces = new Vector<Face>();\r\n\t\t\t\t\r\n\t\t\t\tint vertexCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have vertexCount lines next with 3 floats per line\r\n\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextFloat() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfloat x = sc.nextFloat();\r\n\t\t\t\t\t\tfloat y = sc.nextFloat();\r\n\t\t\t\t\t\tfloat z = sc.nextFloat();\r\n\t\t\t\t\t\tvertices.add(new Point(x, y, z));\r\n\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsc.close();\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\tint polygonCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have polygonCount lines defining the faces\r\n\t\t\t\t//The first int on each line gives the number of\r\n\t\t\t\t//vertices making up that particular face\r\n\t\t\t\t//Then the indexes of those vertices are listed\r\n\t\t\t\twhile(polygonCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextInt() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvertexCount = sc.nextInt();\r\n\t\t\t\t\t\tArrayList<Integer> al = new ArrayList<Integer>();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\t\t\tal.add(sc.nextInt());\r\n\t\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfaces.add(new Face(al));\r\n\t\t\t\t\t\tpolygonCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmesh.addData(vertices, faces, -1, name);\r\n\t\t\t\t\r\n\t\t\t\t//The last thing we need to do is read up to and including\r\n\t\t\t\t//the next object's name or until we reach the end of the file\r\n\t\t\t\t\r\n\t\t\t\twhile((line = ins.readLine()) != null){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//The next non-blank line that doesn't start with \"//\" is the start of the next object\r\n\t\t\t\t\tif((sc.hasNext() == true) && (sc.next().substring(0, 2).equals(\"//\") == false)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsc.close();\r\n\t\t\t\tif(line == null){ //EOF\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null; \r\n\t\t}\r\n\t\t\r\n\t\tmesh.initialize();\r\n \r\n\t\treturn mesh;\r\n\t}", "public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}", "public Scene() {}", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}", "public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.setP2(new Point());\n this.setP3(new Point());\n }", "Vertex createVertex();", "public abstract void constructHull();", "public Triangle(float c0X, float c0Y, float c1X, float c1Y, float c2X, float c2Y, float r, float g, float b) {\n triangleCoords[0] = c0X;\n triangleCoords[1] = c0Y;\n triangleCoords[2] = 0;\n triangleCoords[3] = c1X;\n triangleCoords[4] = c1Y;\n triangleCoords[5] = 0;\n triangleCoords[6] = c2X;\n triangleCoords[7] = c2Y;\n triangleCoords[8] = 0;\n color[0] = r;\n color[1] = g;\n color[2] = b;\n centerX = (c0X+c1X) / 2.0f;\n centerY = (float)(c0Y - ((c1X-c0X)/(Math.sqrt(3)*2.0f)));\n\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n\n // The drawn object (This triangle) needs to claim shaders for vertex and fragment, so it can be drawn\n int vertexShader = MyGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER,\n vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER,\n fragmentShaderCode);\n\n // create empty OpenGL ES Program ( = one openGL procedure responsible for drawing this shape)\n mProgram = GLES20.glCreateProgram();\n\n // add the vertex shader to program\n GLES20.glAttachShader(mProgram, vertexShader);\n\n // add the fragment shader to program\n GLES20.glAttachShader(mProgram, fragmentShader);\n\n // creates OpenGL ES program executables\n GLES20.glLinkProgram(mProgram);\n }", "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public GeoPoint(Geometry geometry, Point3D point) {\n\tsuper();\n\tthis.geometry = geometry;\n\tthis.point = point;\n}", "public static DeformableMesh3D createRectangleMesh(double width, double height, double depth, double segment_size){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n //For the complete length there will be n+1 nodes\n int nx = (int)(width/segment_size + 0.5) + 1;\n int ny = (int)(height/segment_size+0.5) + 1;\n int nz = (int)(depth/segment_size+0.5) + 1;\n double actual_w = (nx-1)*segment_size;\n double actual_h = (ny-1)*segment_size;\n double actual_z = (nz-1)*segment_size;\n\n int dex;\n\n //top face x-y @ actual_z/2\n int top_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n dex = top_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex-1\n });\n }\n }\n }\n\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n actual_z/2\n });\n //first\n int a_dex = top_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = top_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = top_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = top_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, a_dex, b_dex});\n triangles.add(new int[]{dex, b_dex, c_dex});\n triangles.add(new int[]{dex, c_dex, d_dex});\n triangles.add(new int[]{dex, d_dex, a_dex});\n\n }\n }\n\n\n //bottom face x-y @ -actual_z/2\n int bottom_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n\n dex = bottom_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n -actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n //bottom face\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n -actual_z/2\n });\n //first\n int a_dex = bottom_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = bottom_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = bottom_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = bottom_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n\n //left face y-z @ -actual_x/2\n int left_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = left_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n -actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n\n //left face connections\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i,\n left_starting_dex + i*(nz-2)\n });\n\n }\n\n //left face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = left_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = left_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = left_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = left_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //left face merging triangles\n for(int i = 1; i<ny; i++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i-1;\n int b_dex = bottom_starting_dex + i;\n int c_dex = left_starting_dex + i*(nz-2);\n int d_dex = left_starting_dex + (i-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i;\n b_dex = top_starting_dex + i-1;\n c_dex = left_starting_dex + (i-1)*(nz-2) + (nz-3);\n d_dex = left_starting_dex + (i)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //right face y-z @ actual_x/2\n int right_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = right_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2)\n });\n\n }\n\n //right face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = right_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = right_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = right_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = right_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //right face merging triangles\n for(int i = 1; i<ny; i++){\n /*\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n */\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i + ny*(nx-1);\n int b_dex = bottom_starting_dex + i-1 + ny*(nx-1);\n int c_dex = right_starting_dex + (i-1)*(nz-2);\n int d_dex = right_starting_dex + (i)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i-1 + ny*(nx-1);\n b_dex = top_starting_dex + i + ny*(nx-1);\n c_dex = right_starting_dex + (i)*(nz-2) + (nz-3);\n d_dex = right_starting_dex + (i-1)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n\n //front face x-z @ -actual_y/2\n int front_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n -actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny\n });\n\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny\n });\n\n }\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n front_starting_dex + (j-1),\n left_starting_dex + j - 1\n });\n\n connections.add(new int[]{\n front_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1\n });\n }\n\n //front face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = front_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = front_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = front_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //front face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (i-2)*(nz - 2);\n int b_dex = front_starting_dex + (i-1)*(nz - 2);\n int c_dex = bottom_starting_dex + i*ny;\n int d_dex = bottom_starting_dex + (i-1)*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = front_starting_dex + (i-1)*(nz - 2) + (nz-3);\n b_dex = front_starting_dex + (i-2)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i-1)*ny;\n d_dex = top_starting_dex + i*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //front face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (j-1);\n int b_dex = front_starting_dex + (j-2);\n int c_dex = left_starting_dex + j - 2;\n int d_dex = left_starting_dex + j - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = front_starting_dex + (j-2) + (nz-2)*(nx-3);\n b_dex = front_starting_dex + (j-1) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 1;\n d_dex = right_starting_dex + j - 2;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //front triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = front_starting_dex;\n b_dex = bottom_starting_dex + ny;\n c_dex = bottom_starting_dex;\n d_dex = left_starting_dex;\n } else{\n a_dex = front_starting_dex + nz-3;\n b_dex = left_starting_dex + nz-3;\n c_dex = top_starting_dex;\n d_dex = top_starting_dex + ny;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = front_starting_dex + (nx-3)*(nz - 2);\n b_dex = right_starting_dex;\n c_dex = bottom_starting_dex + (nx-1)*(ny);\n d_dex = bottom_starting_dex + (nx-2)*(ny);\n } else{\n a_dex = front_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = top_starting_dex + (nx-2)*(ny);\n c_dex = top_starting_dex + (nx-1)*(ny);\n d_dex = right_starting_dex + nz-3;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n\n //back plane\n int back_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny + ny-1\n });\n\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny + ny-1\n });\n\n }\n\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n back_starting_dex + (j-1),\n left_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n\n connections.add(new int[]{\n back_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n }\n\n //back face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = back_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = back_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = back_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //back face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (i-1)*(nz - 2);\n int b_dex = back_starting_dex + (i-2)*(nz - 2);\n int c_dex = bottom_starting_dex + (i-1)*ny + ny - 1;\n int d_dex = bottom_starting_dex + (i)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = back_starting_dex + (i-2)*(nz - 2) + (nz-3);\n b_dex = back_starting_dex + (i-1)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i)*ny + ny - 1;\n d_dex = top_starting_dex + (i-1)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //back face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (j-2);\n int b_dex = back_starting_dex + (j-1);\n int c_dex = left_starting_dex + j - 1 + (ny-1)*(nz-2);\n int d_dex = left_starting_dex + j - 2 + (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = back_starting_dex + (j-1) + (nz-2)*(nx-3);\n b_dex = back_starting_dex + (j-2) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 2+ (ny-1)*(nz-2);\n d_dex = right_starting_dex + j - 1+ (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //back triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = back_starting_dex;\n b_dex = left_starting_dex + (ny-1)*(nz-2);\n c_dex = bottom_starting_dex + ny -1;\n d_dex = bottom_starting_dex + 2*ny - 1;\n } else{\n a_dex = back_starting_dex + nz-3;\n b_dex = top_starting_dex + 2*ny - 1;\n c_dex = top_starting_dex + ny - 1;\n d_dex = left_starting_dex + (ny)*(nz-2) - 1 ;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = back_starting_dex + (nx-3)*(nz - 2);\n b_dex = bottom_starting_dex + (nx-1)*(ny) - 1;\n c_dex = bottom_starting_dex + (nx)*(ny) - 1;\n d_dex = right_starting_dex + (nz-2)*(ny-1);\n } else{\n a_dex = back_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = right_starting_dex + (nz-2)*(ny-1) + nz - 3;\n c_dex = top_starting_dex + (nx)*(ny) -1;\n d_dex = top_starting_dex + (nx-1)*(ny) -1;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n final DeformableMesh3D mesh = new DeformableMesh3D(pts, connections, triangles);\n\n return mesh;\n }", "public void testCreateMeshFactory() {\r\n SXRContext sxrContext = TestDefaultSXRViewManager.mSXRContext;\r\n assertNotNull(sxrContext.createQuad(11, 22));\r\n }", "public NCLBody() {}", "public Material() {}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public Polyhedron (Transform t, String filename, boolean active, boolean cull)\n\t{\n\t\tsuper (t, cull);\n\t\tsuper.setActive(active);\n\t\tReadFile(filename);\n\t\tFileName = filename;\n\t}", "public Shape(Vector2f[] points, Vector2f[] normals) {\n\t\tthis.points = points.clone();\n\t\tthis.normals = normals.clone();\n\t\n\t\tcalculateBPRange();\n\t}", "public CMLVector3() {\r\n }", "public Triangle()\n {\n\n this(new Point(-0.5f, (float)-Math.tan(Math.PI / 6), 0f), new Point(\n 0.5f,\n (float)-Math.tan(Math.PI / 6),\n 0f), new Point(0f, (float)Math.sqrt(0.75)\n + (float)-Math.tan(Math.PI / 6), 0f));\n }", "public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}", "public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }", "protected AbstractMatrix3D() {}", "private Primitive(String shape) {\n\t\t\tthis.shape = shape;\n\t\t}" ]
[ "0.7794233", "0.73954946", "0.7273254", "0.72416824", "0.72314286", "0.717358", "0.69835323", "0.6844675", "0.6817136", "0.67603886", "0.6720665", "0.6647357", "0.65744865", "0.65683013", "0.6564657", "0.6479718", "0.64473003", "0.6415116", "0.63958776", "0.63154566", "0.62279737", "0.6227744", "0.621517", "0.6199192", "0.6130002", "0.6091212", "0.60856616", "0.6048531", "0.6029347", "0.59763426", "0.5947775", "0.59153116", "0.59135807", "0.5902121", "0.5888832", "0.5881814", "0.58760434", "0.5875388", "0.58666956", "0.584912", "0.58180994", "0.58103526", "0.5807138", "0.5785235", "0.5780515", "0.57724565", "0.5761059", "0.575058", "0.57461196", "0.5744766", "0.5735225", "0.5727868", "0.57186675", "0.5716253", "0.5699521", "0.5698518", "0.5679987", "0.5659381", "0.5652346", "0.56466174", "0.5644919", "0.5639887", "0.56350726", "0.561048", "0.55783534", "0.5571051", "0.5569696", "0.5568954", "0.5565813", "0.55535036", "0.5547388", "0.5546527", "0.55417144", "0.55406827", "0.55406535", "0.5537249", "0.55366", "0.5533863", "0.5529864", "0.55238193", "0.5512999", "0.5511339", "0.5511046", "0.55075425", "0.5501405", "0.54976004", "0.54971594", "0.5494602", "0.5493161", "0.5477825", "0.5476141", "0.54686236", "0.5468509", "0.5468091", "0.5452052", "0.5446472", "0.54455376", "0.54441994", "0.5421472", "0.5413112" ]
0.5556199
69
A constructor for the mesh class for primitive geometries
public Mesh(Primitive shape) { switch (shape) { case CUBE: generateCube(); break; case CUBOID: generateCube(); scale(2, 1, 1); // Stretch the cube along the x-axis to give a cuboid break; case TRIANGULAR_PRISM: generatePrism(); break; case SPHERE: generateSphere(); break; case CONVEX_LENS: generateSphere(); scale(0.6, 2, 2); // Increase the size (to allow a better demonstration of how the lens works) and then squash the sphere along the x-axis break; case CONCAVE_LENS: generateSphere(); scale(0.6, 2, 2); // Increase the size and squash along the x-axis for (int i = 0; i < verts.length; i++) { if (verts[i].getElement(0) < -0.0001) { // Don't move points in the middle of the x-axis verts[i].setElement(0, verts[i].getElement(0) + 0.8); // Move points on the left to the right. This part still bulges out to the left, but when it is on the right it is concave } else if (verts[i].getElement(0) > 0.0001) { verts[i].setElement(0, verts[i].getElement(0) - 0.8); // Move points on the right to the left. } } // The faces are 'inside out', so the ordering of the vertices must be reversed in order to make the normals point the correct way for (int i = 0; i < faces.length; i++) { // Swap the first and last vertices (0 and 2) int temp = faces[i][0]; faces[i][0] = faces[i][2]; faces[i][2] = temp; } break; case HALF_CYLINDER: generateHalfCylinder(); break; default: throw new IllegalArgumentException("Mesh constructor cannot take a null primitive"); } normals = new Vector[faces.length]; ds = new double[faces.length]; for (int i = 0; i < faces.length; i++) { normals[i] = normal(faces[i]); // Calculate the normal for the face ds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the value of d for the face } calcBoxVerts(); // Calculate and store the vertices of the AOBB }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Mesh() {\n this(DEFAULT_COORDS);\n }", "public Mesh(String shape) {\n\t\tthis(primitiveFromStr(shape)); // Call the other constructor for primitive geometries\n\t}", "public Mesh() {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n }", "public ShapeTriMesh() {\n\t\tsuper();\n\t\tthis.setName(UUID.randomUUID().toString());\n\t}", "public DiscMesh() {\n this(1f, 25);\n }", "public Shape(TriangleMesh mesh) {\n super(mesh);\n this.mesh = mesh;\n setVisuals(\"purple\");\n }", "public MeshPart() {\n\t}", "public MeshLike() {\n this.vertices = new ArrayList<Vector3>();\n this.normals = new ArrayList<Vector3>();\n this.texCoords = new ArrayList<Vector2>();\n this.faces = new ArrayList<Face>();\n this.foundNormals = false;\n this.foundTexture = false;\n this.vOffset = 0;\n this.tOffset = 0;\n this.nOffset = 0;\n }", "public QuadMesh() {\n lastInfo = new GeometryIntersectionInformation();\n lastRay = null;\n minMax = null;\n boundingVolume = null;\n triangleMeshGroupCache = null;\n\n vertexPositions = null;\n vertexNormals = null;\n vertexBinormals = null;\n vertexTangents = null;\n vertexColors = null;\n vertexUvs = null;\n quadIndices = null;\n incidentQuadsPerVertexArray = null;\n }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "public Mesh(ArrayList<Vertex> inputVertices, ArrayList<Triangle> inputFaces) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = inputVertices;\r\n tris = inputFaces;\r\n }", "private MeshUtil() {}", "public Mesh(String Path) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n \r\n ReadFile reader = new ReadFile(Path);\r\n String[] text = new String[0];\r\n try {\r\n text = reader.OpenFile();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Mesh.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (String text1 : text) {\r\n if (text1.length() > 0) {\r\n if (text1.charAt(0) == 'v') {\r\n text1 = text1.replaceAll(\"v\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n vertices.add(new Vertex(Double.valueOf(tmp[0]), Double.valueOf(tmp[1]), Double.valueOf(tmp[2])));\r\n }\r\n } else if (text1.charAt(0) == 'f') {\r\n text1 = text1.replaceAll(\"f\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n tris.add(new Triangle(vertices.get(Integer.valueOf(tmp[0]) - 1), vertices.get(Integer.valueOf(tmp[1]) - 1), vertices.get(Integer.valueOf(tmp[2]) - 1)));\r\n }\r\n }\r\n } else {\r\n //do nothing\r\n }\r\n }\r\n }", "public Mesh(final float[] vertices) {\n vertexCount = vertices.length / COORDS_PER_VERTEX;\n vertexBuffer = Core.arrayAsBuffer(vertices);\n }", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "Vertex(){}", "public Vertex3D() {\n this(0.0, 0.0, 0.0);\n }", "public QuadMesh\n (boolean isBeingSplit,\n Matrix4f cubeMatrix, \n\t\tVector3f color,\n\t\tboolean inAtmosphere, \n\t\tVector3f meshOffset, \n\t\tboolean inFrustum, \n\t\tfloat arcLengthOverSize, \n\t\tVector3f center, \n\t\tfloat intensity, \n\t\tTexture2D Heightmap, \n\t\tString f ,\n\t\tQuadMesh p, \n\t\tVector3f v1, \n\t\tVector3f v2, \n\t\tVector3f v3, \n\t\tVector3f v4,\n\t\tfloat size,\n\t\tint x, \n\t\tint y, \n\t\tboolean hasChildren, \n\t\tArrayList<QuadMesh> children, \n\t\tBoundingSphere sphere, \n\t\tGeometry mesh, \n\t\tVector3f faceIndex, \n\t\tfloat centerOff,\n\t\tGeometry bsp)\t\n{\n\t\tfirst = v1;\n\t\tsecond = v2;\n\t\tthird = v3;\n\t\tfourth = v4;\n\t\twidth = size;\n\t\tindex1 = x;\n\t\tindex2 = y;\n\t\tthis.hasChildren = hasChildren;\n\t\tthis.children = children;\n\t\tparent = p;\n\t\tface = f;\n\t\tthis.sphere = sphere;\n\t\tthis.mesh = mesh;\n\t\tthis.faceIndex = faceIndex;\n\t\tthis.centerOff = centerOff;\n\t\tthis.Heightmap = Heightmap;\n\t\tthis.intensity = intensity;\n\t\tthis.arcLengthOverSize = arcLengthOverSize;\n\t\tthis.center = center;\n\t\tthis.inFrustum = inFrustum;\n\t\tthis.meshOffset = meshOffset;\n\t\tthis.inAtmosphere = inAtmosphere;\n\t\tthis.color = color;\n\t\tthis.cubeMatrix = cubeMatrix;\n\t\tthis.bsp = bsp;\n\n\t\n\t}", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "public KmlGeometryFeature(){\r\n }", "public Mesh(float[] positions, float[] textureCoords, float[] normals, int[] indices, int[] jointIndices, float[] weights) {\n vertexCount = indices.length;\n\n this.positions = positions;\n this.textureCoords = textureCoords;\n this.normals = normals;\n this.indices = indices;\n this.jointIndices = jointIndices;\n this.weights = weights;\n\n material = new Material();\n\n //Set vertices\n vertices = new Vector3f[positions.length/3];\n for(int i = 0; i<positions.length; i+=3) {\n vertices[i/3] = new Vector3f(positions[i], positions[i+1], positions[i+2]);\n }\n\n //Set faces\n faces = new Face[indices.length/3];\n for(int i = 0; i<indices.length; i+=3) {\n Vector3f[] faceVertices = new Vector3f[3];\n for(int j = 0; j<3; j++) {\n faceVertices[j] = vertices[indices[i+j]];\n }\n faces[i/3] = new Face(faceVertices);\n }\n }", "public Sphere(final Material m) {\n super(m);\n this.c = new Point3(0,0,0);\n this.r = 1;\n }", "public Sphere (final Material material) {\n super(material);\n\n this.c = new Point3(0,0,0);\n this.r = 1;\n }", "public Triangle(\n IPoint firstPoint,\n IPoint secondPoint,\n IPoint thirdPoint,\n IPrimitive parent)\n {\n super(parent);\n this.addVertex(firstPoint);\n this.addVertex(secondPoint);\n this.addVertex(thirdPoint);\n\n }", "public Vertex(){\n\n }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "public Mesh(float[] positions, float[] textureCoords, float[] normals, int[] indices) {\n this(positions, textureCoords, normals, indices, \n Utils.buildIntArray(MAX_WEIGHTS * positions.length / 3, 0),\n Utils.buildFloatArray(MAX_WEIGHTS * positions.length / 3, 0));\n }", "public ThreeVector() { \r\n\t\t//returns null for no arguments\r\n\t}", "public Mesh(int[][] faces, Vector[] verts) { // Will be read in from a file\n\t\tthis.faces = faces;\n\t\tthis.verts = verts;\n\t\tnormals = new Vector[faces.length]; // One normal for each face\n\t\tds = new double[faces.length]; // One d value for each face\n\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\tnormals[i] = this.normal(faces[i]); // Calculate the normal to the face\n\t\t\tds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the d value for the face\n\t\t}\n\t\tcalcBoxVerts(); // Calculates and stores the vertices of the arbitrarily orientated bounding box\n\t}", "public WB_Normal3d() {\r\n\t\tsuper();\r\n\t}", "public FloatVector3D(){}", "public MultiShapeLayer() {}", "private Primitive(String shape) {\n\t\t\tthis.shape = shape;\n\t\t}", "@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }", "GLMesh(BindStates bindStates, IOpenGL opengl)\n {\n this.bindStates = bindStates;\n this.opengl = opengl;\n }", "public Triangle() {\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n // prepare shaders and OpenGL program\n int vertexShader = MyGLRenderer.loadShader(\n GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(\n GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram); // create OpenGL program executables\n\n }", "public Vec3(){\n\t\tthis(0,0,0);\n\t}", "public Shape(MeshView mv) {\n Mesh m = mv.getMesh();\n\n if (m instanceof TriangleMesh) {\n this.mesh = (TriangleMesh) m;\n super.setMesh(m);\n } else {\n throw new IllegalArgumentException(\"Constructing Shape from invalid kind of mesh: \" + m);\n }\n\n setVisuals(\"purple\");\n }", "public ColladaFloatVector() {\n super();\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 Plane() {\r\n\t\tvecX = new Vector3D();\r\n\t\tvecY = new Vector3D();\r\n\t\tnorm = new Vector3D();\r\n\t\tthis.setD(0);\r\n\t\tpos = new Position3D();\r\n\t}", "public StarsMesh() {\r\n\r\n\t\tvertices = new float[star_count * 3];\r\n\t\tindices = new short[star_count];\r\n\r\n\t\tRandom gen = new Random(System.currentTimeMillis());\r\n\r\n\t\tfor (int x = 0; x < star_count * 3; x += 3) {\r\n\t\t\tint rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(250) - 125) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x] = rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(130) - 65) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x + 1] = rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(200) - 100) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x + 2] = rand;\r\n\r\n\t\t\t// vertices[x+2] = 0;\r\n\r\n\t\t\tindices[x / 3] = (short) ((short) x / 3);\r\n\t\t}\r\n\r\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\r\n\t\tvbb.order(ByteOrder.nativeOrder());\r\n\t\tvertexBuffer = vbb.asFloatBuffer();\r\n\t\tvertexBuffer.put(vertices);\r\n\t\tvertexBuffer.position(0);\r\n\r\n\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\r\n\t\tibb.order(ByteOrder.nativeOrder());\r\n\t\tindexBuffer = ibb.asShortBuffer();\r\n\t\tindexBuffer.put(indices);\r\n\t\tindexBuffer.position(0);\r\n\t}", "public Triangle(float c0X, float c0Y, float c1X, float c1Y, float c2X, float c2Y, float r, float g, float b) {\n triangleCoords[0] = c0X;\n triangleCoords[1] = c0Y;\n triangleCoords[2] = 0;\n triangleCoords[3] = c1X;\n triangleCoords[4] = c1Y;\n triangleCoords[5] = 0;\n triangleCoords[6] = c2X;\n triangleCoords[7] = c2Y;\n triangleCoords[8] = 0;\n color[0] = r;\n color[1] = g;\n color[2] = b;\n centerX = (c0X+c1X) / 2.0f;\n centerY = (float)(c0Y - ((c1X-c0X)/(Math.sqrt(3)*2.0f)));\n\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n\n // The drawn object (This triangle) needs to claim shaders for vertex and fragment, so it can be drawn\n int vertexShader = MyGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER,\n vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER,\n fragmentShaderCode);\n\n // create empty OpenGL ES Program ( = one openGL procedure responsible for drawing this shape)\n mProgram = GLES20.glCreateProgram();\n\n // add the vertex shader to program\n GLES20.glAttachShader(mProgram, vertexShader);\n\n // add the fragment shader to program\n GLES20.glAttachShader(mProgram, fragmentShader);\n\n // creates OpenGL ES program executables\n GLES20.glLinkProgram(mProgram);\n }", "public MAPPrimitive(MAPPrimitiveType type, int verticeCount) {\n this.type = type;\n this.vertices = new int[verticeCount];\n }", "public Vector3 () {\n }", "public interface ITriangleMesh {\n /**\n * Add a new vertex (given by position) to the vertex list. The new vertex is\n * appended to the end of the list.\n */\n int addVertex(Vector position);\n\n /**\n * Index in vertex list.\n */\n Vertex getVertex(int index);\n\n int getNumberOfVertices();\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(AbstractTriangle t);\n\n int getNumberOfTriangles();\n\n AbstractTriangle getTriangle(int triangleIndex);\n\n /**\n * Clear mesh - remove all triangles and vertices.\n */\n void clear();\n\n /**\n * Compute the triangles normals.\n */\n void computeTriangleNormals();\n\n\n Vector getTextureCoordinate(int index);\n\n /**\n * Add texture coordinate to mesh.\n */\n void addTextureCoordinate(Vector t);\n\n /**\n * Return the number of texture coordinates in the mesh.\n */\n int getNumberOfTextureCoordinates();\n\n /**\n * Set color to all triangles and all vertices of the mesh.\n */\n void setColor(Vector color);\n}", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "private void mkMesh()\n\t{\n\t\t/* this initialises the the two FloatBuffer objects */\n\t\n\t\tfloat vertices[] = {\n\t\t\t-0.5f, -0.5f, 0.0f,\t\t// V1 - bottom left\n\t\t\t-0.5f, 0.5f, 0.0f,\t\t// V2 - top left\n\t\t\t 0.5f, -0.5f, 0.0f,\t\t// V3 - bottom right\n\t\t\t 0.5f, 0.5f, 0.0f\t\t\t// V4 - top right\n\t\t\t};\n\t\tfloat texture[] = { \t\t\n\t\t\t// Mapping coordinates for the vertices\n\t\t\t0.0f, 1.0f,\t\t// top left\t\t(V2)\n\t\t\t0.0f, 0.0f,\t\t// bottom left\t(V1)\n\t\t\t1.0f, 1.0f,\t\t// top right\t(V4)\n\t\t\t1.0f, 0.0f\t\t// bottom right\t(V3)\n\t\t\t};\n\t\t/* cache the number of floats in the vertices data */\n\t\tvertexCount = vertices.length;\n\t\t\n\t\t// a float has 4 bytes so we allocate for each coordinate 4 bytes\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\t\n\t\t// allocates the memory from the byte buffer\n\t\tvertexBuffer = byteBuffer.asFloatBuffer();\n\t\t\n\t\t// fill the vertexBuffer with the vertices\n\t\tvertexBuffer.put(vertices);\n\t\t\n\t\t// set the cursor position to the beginning of the buffer\n\t\tvertexBuffer.position(0);\n\t\t\n\t\tbyteBuffer = ByteBuffer.allocateDirect(texture.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\ttextureBuffer = byteBuffer.asFloatBuffer();\n\t\ttextureBuffer.put(texture);\n\t\ttextureBuffer.position(0);\n\t}", "public Object3D() {\n objectVectors = new ArrayList<>();\n linesToDraw = new ArrayList<>();\n }", "private Mesh createMesh(final int pTrianglesCount) {\n\t\tfinal int pSpeed \t\t\t= 20;\n\t\tfinal int pVertexCount\t \t= Mesh.VERTEX_SIZE * pTrianglesCount * 3; \t\n\t\tfinal float pColor \t\t\t= new Color(0f,0f,0f).getABGRPackedFloat();\n\t\tfinal float pSegmentWidth \t= CAMERA_WIDTH/pTrianglesCount;\n\t\tfinal float[] pBufferData \t= new float[pVertexCount];\t\n\t\t\n\t\tmHeightOffsetCurrent = new float[pVertexCount];\t\t\n\t\t\n\t\t//create triangles \n\t\t// A--B\n\t\t// \\ |\n\t\t// \\|\n\t\t// C\n\t\t//\n\t\tint i = 0;\n\t\tfloat x = 0f;\n\t\tfinal float pInitialHeight = 400;\n\t\tfor (int triangleIndex = 0;triangleIndex<pTrianglesCount;triangleIndex++){\n\t\t\t //first triangle \n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = 0;\t\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\t\n\t\t\t \n\t\t\t i = i+3;\n\t\t\t x = x+pSegmentWidth;\n\t\t }\n\t\t \n\t\tfinal VertexBufferObjectManager VBOM = getVertexBufferObjectManager();\n\t\tfinal HighPerformanceMeshVertexBufferObject pMeshVBO = new HighPerformanceMeshVertexBufferObject(VBOM, pBufferData, pBufferData.length, DrawType.DYNAMIC, true, Mesh.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT);\n\t\t\n//\t\tpMesh = new Mesh(0, 0,pVertexCount,DrawMode.TRIANGLES,pMeshVBO){\t\t\n//\t\t\t\n//\t\t\tfloat progress_x = 0;\n//\t\t\t\n//\t\t\t@Override\n//\t\t protected void onManagedUpdate(final float pSecondsElapsed) { \n//\t\t\t\tsuper.onManagedUpdate(pSecondsElapsed);\n//\t\t\t\tdrawBySine(pSecondsElapsed);\n//\t\t this.mMeshVertexBufferObject.setDirtyOnHardware(); // include this line\n//\t\t progress_x+=(pSpeed*pSecondsElapsed);\n//\t\t };\n//\t\t\t\n//\t\t\tvoid drawBySine(final float pSecondsElapsed){\n//\t\t\t\tfinal float[] pBuff = pMeshVBO.getBufferData();\n//\t\t\t\tfor (int i = 0;i<((pTrianglesCount)*3);i++){ //FIRST part of triangles \n//\t\t\t\t\tif (i%3==0||i==0||((i-1)%3==0)){\n//\t\t\t\t\t\t//every vertex (v0) of triangle must be connected to previous triangle at second vertex (v1) to prevent stairs\n//\t\t\t\t\t\tif (i%3==0&&i>0){ \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = mHeightOffsetCurrent[i-2];\n//\t\t\t\t\t\t} else { \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = getNormalizedSine(i+progress_x, mTouchY, pTrianglesCount*3);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} \n//\t\t\t\t\tpBuff[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = mHeightOffsetCurrent[i];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\tfloat getNormalizedSine(float x, float halfY, float maxX) {\t\n//\t\t\t double factor = (2 * Math.PI) / maxX;\n//\t\t\t return (float) ((Math.sin(x * factor) * halfY) + halfY);\n//\t\t\t}\n//\t\t\t\n//\t\t};\n\t\treturn pMesh;\n\t}", "public Vector3D() {\n zero();\n }", "public GeoPoint(Geometry geometry, Point3D point) {\n\tsuper();\n\tthis.geometry = geometry;\n\tthis.point = point;\n}", "public OpenGLModel() {\n\n\n\t}", "public abstract com.jme.scene.Geometry getJMEGeometry();", "public GObject(Point3D[] v, Face[] f)\n {\n\t this.vertex = v;\n\t this.face = f;\n }", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public QuadCurve () {\n }", "protected Shape() {}", "public Light(double xPos, double yPos, double zPos){\n this(xPos, yPos, zPos, 1.0, 1.0, 1.0, 1);\n }", "public Triangle() {\n this(0,0,0,0,0);\n }", "public CarrierShape()\n {\n super();\n }", "public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public Triangle() {}", "public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}", "public BoundingBox3d() {\n reset();\n }", "public Element(final int type, final int count, final int size, final int materialId, final int[][] inputs, final int handle, final float[][] values) {\n\t\t\t\t//android.util.Log.d(TAG+\".Geometry.Element\",\"NEW\");\n\t\t\t\tthis.type = type;\n\t\t\t\tthis.count = count;\n\t\t\t\tthis.size = size;\n\t\t\t\tthis.materialId = materialId;\n\t\t\t\tthis.inputs = inputs;\n\t\t\t\tthis.values = values;\n\t\t\t\tthis.handle = handle;\n\t\t\t\tfor(int[]input : inputs) this.stride += input[SIZE];\n\t\t\t\tthis.stride *= GlBuffer.SIZEOF_JAVA_FLOAT;\n\t\t\t}", "public Cylinder() {\n\t\tthis(1.0);\n\t}", "public Light(){\n this(0.0, 0.0, 0.0);\n }", "public DiscMesh(float radius, int numVertices) {\n Validate.nonNegative(radius, \"radius\");\n Validate.inRange(\n numVertices, \"number of vertices\", 3, Integer.MAX_VALUE);\n\n setMode(Mode.TriangleFan);\n\n float[] normals = new float[numAxes * numVertices];\n float[] positions = new float[numAxes * numVertices];\n float[] texCoords = new float[2 * numVertices];\n\n for (int vi = 0; vi < numVertices; ++vi) {\n normals[numAxes * vi] = 0f;\n normals[numAxes * vi + 1] = 0f;\n normals[numAxes * vi + 2] = 1f;\n\n float theta = FastMath.TWO_PI * vi / numVertices;\n float sin = FastMath.sin(theta);\n float cos = FastMath.cos(theta);\n positions[numAxes * vi] = radius * cos;\n positions[numAxes * vi + 1] = radius * sin;\n positions[numAxes * vi + 2] = 0f;\n\n texCoords[2 * vi] = (1f + cos) / 2f;\n texCoords[2 * vi + 1] = (1f + sin) / 2f;\n }\n\n setBuffer(Type.Normal, numAxes, normals);\n setBuffer(Type.Position, numAxes, positions);\n setBuffer(Type.TexCoord, 2, texCoords);\n\n updateBound();\n setStatic();\n }", "public Polygon() {\n N = 0;\n a = new Point[4];\n }", "public abstract Geometry computeGeometry();", "private PolygonEditor()\n {\n this(null, 1.0f);\n }", "public Vector3D() {\r\n\t\tthis(0.0);\r\n\t}", "public abstract void constructHull();", "public TriangleComponent()\n {\n status=-1;\n }", "public ColladaSkinnedMesh(String name, TriMesh target, \n int[] vertexIndices) \n {\n super (name, target);\n\n this.vertexIndices = vertexIndices;\n }", "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public Polyhedron (Transform t, String filename, boolean active, boolean cull, Color color)\n\t{\n\t\tsuper (t, cull);\n\t\tsuper.setActive(active);\n\t\tReadFile(filename);\n\t\tFileName = filename;\n\t\tthis.color = color;\n\t}", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public Mesh load(String filename)\r\n\t{\r\n\t\tMesh mesh = new Mesh(); mesh.addFileMetaData(filename);\r\n \r\n\t\t//Open file and read in vertices/faces\r\n\t\tScanner sc;\r\n\t\tString line;\r\n\t\t\r\n\t\ttry{\r\n\t\t\tBufferedReader ins = new BufferedReader(new FileReader(filename));\r\n\t\t\tins.readLine(); //ID; always \"nff\"\r\n\t\t\tins.readLine(); //Version\r\n\t\t\t\r\n\t\t\t//We need to move through the header to find the start of the first object\r\n\t\t\t//This will be the first line that contains text that does not start with\r\n\t\t\t//\"viewpos\" or \"viewdir\" (optional features) or \"//\" (comment)\r\n\t\t\twhile(true){\r\n\t\t\t\tline = ins.readLine();\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\r\n\t\t\t\tif(sc.hasNext() == true){\r\n\t\t\t\t\tString token = sc.next();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif((\"viewpos\".equalsIgnoreCase(token) == false) && \r\n\t\t\t\t\t\t\t(\"viewdir\".equalsIgnoreCase(token) == false) &&\r\n\t\t\t\t\t\t\t(\"//\".equals(token.substring(0, 2)) == false)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsc.close();\r\n\t\t\t\r\n\t\t\t//The rest of the file is filled up with objects\r\n\t\t\twhile(true){\r\n\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\tString name = sc.next();\r\n\t\t\t\tsc.close();\r\n\t\t\t\t\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\r\n\t\t\t\tVector<Point> vertices = new Vector<Point>();\r\n\t\t\t\tVector<Face> faces = new Vector<Face>();\r\n\t\t\t\t\r\n\t\t\t\tint vertexCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have vertexCount lines next with 3 floats per line\r\n\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextFloat() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tfloat x = sc.nextFloat();\r\n\t\t\t\t\t\tfloat y = sc.nextFloat();\r\n\t\t\t\t\t\tfloat z = sc.nextFloat();\r\n\t\t\t\t\t\tvertices.add(new Point(x, y, z));\r\n\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tsc.close();\r\n\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\tint polygonCount = sc.nextInt();\r\n\t\t\t\t\r\n\t\t\t\t//We have polygonCount lines defining the faces\r\n\t\t\t\t//The first int on each line gives the number of\r\n\t\t\t\t//vertices making up that particular face\r\n\t\t\t\t//Then the indexes of those vertices are listed\r\n\t\t\t\twhile(polygonCount > 0){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(ins.readLine());\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(sc.hasNextInt() == false){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tvertexCount = sc.nextInt();\r\n\t\t\t\t\t\tArrayList<Integer> al = new ArrayList<Integer>();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\twhile(vertexCount > 0){\r\n\t\t\t\t\t\t\tal.add(sc.nextInt());\r\n\t\t\t\t\t\t\tvertexCount--;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfaces.add(new Face(al));\r\n\t\t\t\t\t\tpolygonCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmesh.addData(vertices, faces, -1, name);\r\n\t\t\t\t\r\n\t\t\t\t//The last thing we need to do is read up to and including\r\n\t\t\t\t//the next object's name or until we reach the end of the file\r\n\t\t\t\t\r\n\t\t\t\twhile((line = ins.readLine()) != null){\r\n\t\t\t\t\tsc.close();\r\n\t\t\t\t\tsc = new Scanner(line);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//The next non-blank line that doesn't start with \"//\" is the start of the next object\r\n\t\t\t\t\tif((sc.hasNext() == true) && (sc.next().substring(0, 2).equals(\"//\") == false)){\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsc.close();\r\n\t\t\t\tif(line == null){ //EOF\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null; \r\n\t\t}\r\n\t\t\r\n\t\tmesh.initialize();\r\n \r\n\t\treturn mesh;\r\n\t}", "public Polyhedron (Transform t, String filename, boolean active, boolean cull)\n\t{\n\t\tsuper (t, cull);\n\t\tsuper.setActive(active);\n\t\tReadFile(filename);\n\t\tFileName = filename;\n\t}", "public CMLVector3() {\r\n }", "public Sphere (final Point3 c, final double r, final Material material) {\n super(material);\n\n this.c = c;\n this.r = r;\n }", "public NewShape() {\r\n\t\tsuper();\r\n\t}", "public Sphere(Point3D c, double r, Color color, Material material)\r\n\t{\r\n\t\tthis(c,r, color);\r\n\t\tsuper._material = material;\r\n\t}", "VertexNetwork() {\r\n /* This constructor creates an empty list of vertex locations. \r\n read The transmission range is set to 0.0. */\r\n transmissionRange = 0.0;\r\n location = new ArrayList<Vertex>(0);\r\n }", "public Shape(Vertex2D[] points, Vector2f[] normals) {\n\t\tthis.points = new Vector2f[points.length];\n\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\tthis.points[i] = new Vector2f(points[i].getData(0));\n\t\t}\n\t\t\n\t\tcalculateBPRange();\n\t\t\n\t\tthis.normals = normals.clone();\n\t}", "PrimitiveType(String name) {\n\tthis.primitiveElem = new PrimitiveElem(name);\n\t\n }", "public Triangle (double x1,double y1,double x2, double y2,double x3,double y3)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(x3,y3);\r\n }", "public Shape(Vector2f[] points, Vector2f[] normals) {\n\t\tthis.points = points.clone();\n\t\tthis.normals = normals.clone();\n\t\n\t\tcalculateBPRange();\n\t}", "public Sphere(double nx, double ny, double nz, double size) {\n this.x = nx;\n this.y = ny;\n this.z = nz;\n this.radius = size;\n }", "public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.setP2(new Point());\n this.setP3(new Point());\n }", "private void setGeometryData() {\n // allocate vertices\n final int factorK = (innerRadius == 0 ? 1 : 2);\n final int verts = factorK * ((zSamples - 2) * (radialSamples) + 2); // rs + 1\n setVertexCoordsSize (verts);\n setNormalCoordsSize (verts);\n\n // generate geometry\n final double fInvRS = 1.0 / (radialSamples);\n final double fZFactor = 1.0 / (zSamples - 1); // 2.0 / (zSamples - 1);\n\n // Generate points on the unit circle to be used in computing the mesh\n // points on a sphere slice.\n final double[] afSin = new double[(radialSamples + 1)];\n final double[] afCos = new double[(radialSamples + 1)];\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fAngle = phi0 + dPhi * fInvRS * iR;\n afCos[iR] = Math.cos (fAngle);\n afSin[iR] = Math.sin (fAngle);\n }\n // afSin[radialSamples] = afSin[0];\n // afCos[radialSamples] = afCos[0];\n\n double radDiff = Math.abs (outerRadius - innerRadius);\n\n for ( int icnt = 0; icnt < 2; icnt++ ) {\n radius = (icnt == 0 ? innerRadius : outerRadius);\n if ( radius == 0.0 ) {\n continue;\n }\n double zNP = centerZ; // 0.0;\n double zSP = centerZ; // 0.0;\n\n // generate the sphere itself\n int i = 0;\n Vector3D tempVa;\n Vector3D kSliceCenter;\n\n for ( int iZ = 1; iZ < (zSamples - 1); iZ++ ) { // -1\n //final double fAFraction = 0.5 * Math.PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2)\n final double fAFraction = theta1 - iZ * fZFactor * dTheta;\n final double fZFraction = Math.sin (fAFraction); // in (-1,1)\n final double fZ = radius * fZFraction;\n\n // compute center of slice\n kSliceCenter = new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + fZ\n );\n\n // compute radius of slice\n final double fSliceRadius = Math.sqrt (\n Math.abs (\n radius * radius - fZ * fZ\n )\n );\n\n // compute slice vertices with duplication at end point\n Vector3D kNormal;\n final int iSave = i;\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fRadialFraction = iR * fInvRS; // in [0,1)\n final Vector3D kRadial = new Vector3D (\n afCos[iR],\n afSin[iR],\n 0\n );\n tempVa = new Vector3D (\n fSliceRadius * kRadial.getX (),\n fSliceRadius * kRadial.getY (),\n fSliceRadius * kRadial.getZ ()\n );\n\n zNP = Math.\n max (kSliceCenter.getZ (), zNP);\n zSP = Math.\n min (kSliceCenter.getZ (), zSP);\n\n putVertex (\n (kSliceCenter.getX () + tempVa.getX ()),\n (kSliceCenter.getY () + tempVa.getY ()),\n (kSliceCenter.getZ () + tempVa.getZ ())\n );\n tempVa = getVertexCoord (i);\n\n kNormal = new Vector3D (\n tempVa.getX () - center.getX (),\n tempVa.getY () - center.getY (),\n tempVa.getZ () - center.getZ ()\n );\n double mag = Math.sqrt (\n Math.pow (kNormal.getX (), 2) +\n Math.pow (kNormal.getY (), 2) +\n Math.pow (kNormal.getZ (), 2)\n );\n kNormal = new Vector3D (\n kNormal.getX () / mag,\n kNormal.getY () / mag,\n kNormal.getZ () / mag\n );\n if ( !viewInside ) {\n putNormal (\n kNormal.getX (),\n kNormal.getY (),\n kNormal.getZ ()\n );\n } else {\n putNormal (\n -kNormal.getX (),\n -kNormal.getY (),\n -kNormal.getZ ()\n );\n }\n i++;\n }\n\n// setVertexCoord(i, getVertexCoord(iSave));\n// setNormalCoord(i, getNormalCoord(iSave));\n putVertex (getVertexCoord (iSave));\n putNormal (getNormalCoord (iSave));\n i++;\n }\n\n // south pole\n if ( theta0 == -0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n (center.getZ () - radius)\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, -1));\n } else {\n putNormal (new Vector3D (0, 0, 1));\n }\n setNormalCount (i + 1);\n i++;\n }\n\n // north pole\n if ( theta1 == 0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + radius\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, 1));\n } else {\n putNormal (new Vector3D (0, 0, -1));\n }\n setNormalCount (i + 1);\n i++;\n }\n }\n\n }", "public Shape(URL url, String unit) {\n ArrayList<Shape> shapes;\n\n if (url.toString().toLowerCase().endsWith(\"obj\")) {\n shapes = loadOBJ(url, unit);\n } else if (url.toString().toLowerCase().endsWith(\"stl\")) {\n shapes = loadSTL(url, unit);\n } else {\n throw new IllegalArgumentException(\"Shape contructor: Not OBJ/STL file: \" + url);\n }\n\n if (shapes.size() != 1) {\n throw new IllegalArgumentException(\"Contructing shape from OBJ/STL file containing more or fewer than one mesh: \" + url);\n }\n this.mesh = (TriangleMesh) shapes.get(0).getMesh();\n super.setMesh(this.mesh);\n setVisuals(\"green\");\n }", "@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}", "public Sphere(Point3 c, double r, Material material) {\n\t\tsuper(material);\n\t\tthis.c = c;\n\t\tthis.r = r;\n\t}", "public Triangle() {\n setPointsAs0();\n S = 0;\n }", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "Triangle(){\n side1 = 1.0;\n side2 = 1.0;\n side3 = 1.0;\n }" ]
[ "0.752818", "0.7372802", "0.7278099", "0.712675", "0.70095944", "0.6884514", "0.6804084", "0.67596227", "0.67220056", "0.66917104", "0.66535825", "0.6638034", "0.6625776", "0.6560493", "0.64182144", "0.64081293", "0.63656926", "0.63473916", "0.6337472", "0.6334738", "0.6221981", "0.6146889", "0.6090646", "0.60773915", "0.6064609", "0.60628027", "0.60360503", "0.60191923", "0.6004561", "0.5980204", "0.5961354", "0.5957751", "0.5950841", "0.5936109", "0.5929136", "0.5928712", "0.5920337", "0.59000957", "0.5884132", "0.58706015", "0.5831893", "0.5826436", "0.58171815", "0.57911587", "0.5783862", "0.5782908", "0.57744104", "0.5769418", "0.5767217", "0.57662344", "0.57602745", "0.5690937", "0.5688479", "0.5686183", "0.56832355", "0.567809", "0.5675923", "0.56716853", "0.56694424", "0.5661241", "0.56349933", "0.5609002", "0.55994433", "0.559865", "0.5596254", "0.5585528", "0.55689746", "0.55619115", "0.5554455", "0.5553025", "0.55512893", "0.5548346", "0.55442446", "0.5543176", "0.554172", "0.553423", "0.55319744", "0.5529441", "0.5509213", "0.5502799", "0.5502687", "0.5500103", "0.5499209", "0.54964536", "0.5488054", "0.5487616", "0.5486856", "0.54861784", "0.5485668", "0.54840434", "0.54743713", "0.54718393", "0.54682744", "0.54679865", "0.5458669", "0.5455605", "0.54440457", "0.54316574", "0.54180294", "0.54163796" ]
0.721187
3
A constructor for the Mesh class for primitive geometries where the shape needs to be determined from its name
public Mesh(String shape) { this(primitiveFromStr(shape)); // Call the other constructor for primitive geometries }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ShapeTriMesh() {\n\t\tsuper();\n\t\tthis.setName(UUID.randomUUID().toString());\n\t}", "public Mesh(Primitive shape) {\n\t\tswitch (shape) {\n\t\t\tcase CUBE:\n\t\t\t\tgenerateCube();\n\t\t\t\tbreak;\n\t\t\tcase CUBOID:\n\t\t\t\tgenerateCube();\n\t\t\t\tscale(2, 1, 1); // Stretch the cube along the x-axis to give a cuboid\n\t\t\t\tbreak;\n\t\t\tcase TRIANGULAR_PRISM:\n\t\t\t\tgeneratePrism();\n\t\t\t\tbreak;\n\t\t\tcase SPHERE:\n\t\t\t\tgenerateSphere();\n\t\t\t\tbreak;\n\t\t\tcase CONVEX_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size (to allow a better demonstration of how the lens works) and then squash the sphere along the x-axis\n\t\t\t\tbreak;\n\t\t\tcase CONCAVE_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size and squash along the x-axis\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < verts.length; i++) {\n\t\t\t\t\tif (verts[i].getElement(0) < -0.0001) { // Don't move points in the middle of the x-axis\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) + 0.8); // Move points on the left to the right. This part still bulges out to the left, but when it is on the right it is concave\n\t\t\t\t\t} else if (verts[i].getElement(0) > 0.0001) {\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) - 0.8); // Move points on the right to the left.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The faces are 'inside out', so the ordering of the vertices must be reversed in order to make the normals point the correct way\n\t\t\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\t\t\t// Swap the first and last vertices (0 and 2)\n\t\t\t\t\tint temp = faces[i][0];\n\t\t\t\t\tfaces[i][0] = faces[i][2];\n\t\t\t\t\tfaces[i][2] = temp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HALF_CYLINDER:\n\t\t\t\tgenerateHalfCylinder();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\"Mesh constructor cannot take a null primitive\");\n\t\t}\n\t\tnormals = new Vector[faces.length];\n\t\tds = new double[faces.length];\n\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\tnormals[i] = normal(faces[i]); // Calculate the normal for the face\n\t\t\tds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the value of d for the face\n\t\t}\n\t\tcalcBoxVerts(); // Calculate and store the vertices of the AOBB\n\t}", "private Primitive(String shape) {\n\t\t\tthis.shape = shape;\n\t\t}", "AbstractShape(String name, double x, double y, double w, double h, int r, int g, int b) {\n this.name = name;\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.r = r;\n this.g = g;\n this.b = b;\n }", "public Shape(TriangleMesh mesh) {\n super(mesh);\n this.mesh = mesh;\n setVisuals(\"purple\");\n }", "public Shape(String name, Material material) {\n this.name = name;\n this.material = material;\n }", "IShape getShape(String name);", "protected Shape() {}", "public NewShape() {\r\n\t\tsuper();\r\n\t}", "public Shape(ShapeType shape, Color color, int width, int height, int posX, int posY, String name) {\n\t\tsuper(posX, posY, width, height, name);\n\t\tthis.shape = shape;\n\t\tthis.color = color;\n\t}", "public GeometricObject(String name)\r\n\t{\r\n\t\tif (name == null || name.length() == 0)\r\n\t\t\tValidation.reportError(\"invalid name\");\r\n\t\telse\r\n\t\t\tthis.name = name;\r\n\t}", "String getShapeName();", "public Shape(MeshView mv) {\n Mesh m = mv.getMesh();\n\n if (m instanceof TriangleMesh) {\n this.mesh = (TriangleMesh) m;\n super.setMesh(m);\n } else {\n throw new IllegalArgumentException(\"Constructing Shape from invalid kind of mesh: \" + m);\n }\n\n setVisuals(\"purple\");\n }", "public Mesh(String Path) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n \r\n ReadFile reader = new ReadFile(Path);\r\n String[] text = new String[0];\r\n try {\r\n text = reader.OpenFile();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Mesh.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (String text1 : text) {\r\n if (text1.length() > 0) {\r\n if (text1.charAt(0) == 'v') {\r\n text1 = text1.replaceAll(\"v\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n vertices.add(new Vertex(Double.valueOf(tmp[0]), Double.valueOf(tmp[1]), Double.valueOf(tmp[2])));\r\n }\r\n } else if (text1.charAt(0) == 'f') {\r\n text1 = text1.replaceAll(\"f\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n tris.add(new Triangle(vertices.get(Integer.valueOf(tmp[0]) - 1), vertices.get(Integer.valueOf(tmp[1]) - 1), vertices.get(Integer.valueOf(tmp[2]) - 1)));\r\n }\r\n }\r\n } else {\r\n //do nothing\r\n }\r\n }\r\n }", "public interface ShapeTemplate { #\n\t//Show/hide when rendering\n\tpublic void show();\n\tpublic void hide();\n\tpublic boolean getVisible();\n\t\n\t//Storage/retreival of shape mesh\n\tpublic char[][] regenCharTable();\n\tpublic char[][] getCharTable();\n\tpublic String[] getStringTable();\n\t\n\t//Internal storage of current rendered position\n\tpublic Position getPosition();\n\tpublic void setPosition(int x, int y);\n\t\n\t//Width/height accessor properties\n\tpublic int getWidth();\n\tpublic int getHeight();\n\t\n\t//Fill\n\tpublic char getFillChar();\n\tpublic void setFillChar(char newChar);\n\tpublic boolean getFilled();\n\tpublic void setFilled(boolean isFilled);\n\t\n\t//ToString\n\tpublic String toString();\n}", "public MultiShapeLayer() {}", "public Mesh() {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n }", "public Shape()\n\t{\n\t\tinitShape();\n\t}", "public Mesh() {\n this(DEFAULT_COORDS);\n }", "public Vertex(String name){\r\n this.name = name;\r\n }", "public Triangle(int x1, int y1, int x2, int y2, int x3, int y3, String name){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.x3 = x3;\n this.y3 = y3;\n this.name = name;\n \n \n }", "public Shape(String color) { \n System.out.println(\"Shape constructor called\"); \n this.color = color; \n }", "public KmlGeometryFeature(){\r\n }", "public MultiShape3D( Geometry geometry )\n {\n this( geometry, (Appearance)null );\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public MeshPart() {\n\t}", "protected Geometry buildSimpleShape(\r\n \tfloat\t\tpLength\r\n ,\tboolean\t\tpRotate\r\n ) {\n Material mat_csg = new Material( assetManager, \"Common/MatDefs/Misc/ShowNormals.j3md\" );\r\n \tif ( pLength > 0 ) {\r\n \tGeometry aCylinder = new Geometry( \"Cylinder\", new Cylinder( 32, 32, 1.1f, pLength, true ) );\r\n \taCylinder.setMaterial( mat_csg );\r\n\t \tif ( pRotate ) aCylinder.rotate( 0.4f, 0.4f, 0f );\r\n\t \treturn( aCylinder );\r\n \t\t\r\n \t} else {\r\n \t\t// Just a cube\r\n\t \tGeometry aCube = new Geometry( \"Box\", new Box(1,1,1) );\r\n\t \taCube.setMaterial( mat_csg );\r\n\t\r\n\t \tif ( pRotate ) aCube.rotate( 0.4f, 0.4f, 0f );\r\n\t \treturn( aCube );\r\n \t}\r\n\r\n }", "protected CylinderShade(String name) {\n\tsuper(name);\n }", "public ThreeDShapes(String threedname, int sidenum, int edge, int vert, \r\n double dep, double rad)\r\n {\r\n super(threedname,sidenum);\r\n edges = edge;\r\n vertexs = vert;\r\n depth = dep;\r\n radius = rad;\r\n }", "Shape1(){\n\t\tSystem.out.println(\"Shape is constructed\");\n\t}", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "public CarrierShape()\n {\n super();\n }", "public Mesh(ArrayList<Vertex> inputVertices, ArrayList<Triangle> inputFaces) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = inputVertices;\r\n tris = inputFaces;\r\n }", "Shape getShape();", "Shape newShape(GraphicalObject g) throws RemoteException;", "public Shape(URL url, String unit) {\n ArrayList<Shape> shapes;\n\n if (url.toString().toLowerCase().endsWith(\"obj\")) {\n shapes = loadOBJ(url, unit);\n } else if (url.toString().toLowerCase().endsWith(\"stl\")) {\n shapes = loadSTL(url, unit);\n } else {\n throw new IllegalArgumentException(\"Shape contructor: Not OBJ/STL file: \" + url);\n }\n\n if (shapes.size() != 1) {\n throw new IllegalArgumentException(\"Contructing shape from OBJ/STL file containing more or fewer than one mesh: \" + url);\n }\n this.mesh = (TriangleMesh) shapes.get(0).getMesh();\n super.setMesh(this.mesh);\n setVisuals(\"green\");\n }", "public ShapeAction(CustomFrame the_frame, Node the_shape, String the_name)\n {\n super(the_name);\n my_frame = the_frame;\n Transform3D t3D = new Transform3D();\n TransformGroup tg = new TransformGroup(t3D);\n tg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n tg.setCapability(TransformGroup.ENABLE_PICK_REPORTING);\n tg.addChild(the_shape);\n bg.addChild(tg);\n bg.setCapability(BranchGroup.ALLOW_DETACH);\n bg.compile();\n }", "public Vertex(String argName) {\n name = argName;\n }", "Shape createShape(BorderType borderType);", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "public Shape() {\n\t\tthis(DEFAULT_X_POS, DEFAULT_Y_POS, DEFAULT_DELTA_X, DEFAULT_DELTA_Y, DEFAULT_WIDTH, DEFAULT_HEIGHT);\n\t}", "public abstract Shape createPath();", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "private Shape createPath(final Geometry geom) {\n return new LiteShape(geom, true, maxDistance);\n }", "public DiscMesh() {\n this(1f, 25);\n }", "private void setGeometry() {\n GeometryDescriptor geomDesc = featureSource.getSchema().getGeometryDescriptor();\n geometryAttributeName = geomDesc.getLocalName();\n\n Class<?> clazz = geomDesc.getType().getBinding();\n\n if (Polygon.class.isAssignableFrom(clazz) || MultiPolygon.class.isAssignableFrom(clazz)) {\n geometryType = GeomType.POLYGON;\n\n } else if (LineString.class.isAssignableFrom(clazz)\n || MultiLineString.class.isAssignableFrom(clazz)) {\n\n geometryType = GeomType.LINE;\n\n } else {\n geometryType = GeomType.POINT;\n }\n}", "String getLayerShapeName();", "public ShapeFile(){\n numShapes = 0;\n }", "abstract Shape nodeShape(String node, Graphics2D g2d);", "public QuadMesh\n (boolean isBeingSplit,\n Matrix4f cubeMatrix, \n\t\tVector3f color,\n\t\tboolean inAtmosphere, \n\t\tVector3f meshOffset, \n\t\tboolean inFrustum, \n\t\tfloat arcLengthOverSize, \n\t\tVector3f center, \n\t\tfloat intensity, \n\t\tTexture2D Heightmap, \n\t\tString f ,\n\t\tQuadMesh p, \n\t\tVector3f v1, \n\t\tVector3f v2, \n\t\tVector3f v3, \n\t\tVector3f v4,\n\t\tfloat size,\n\t\tint x, \n\t\tint y, \n\t\tboolean hasChildren, \n\t\tArrayList<QuadMesh> children, \n\t\tBoundingSphere sphere, \n\t\tGeometry mesh, \n\t\tVector3f faceIndex, \n\t\tfloat centerOff,\n\t\tGeometry bsp)\t\n{\n\t\tfirst = v1;\n\t\tsecond = v2;\n\t\tthird = v3;\n\t\tfourth = v4;\n\t\twidth = size;\n\t\tindex1 = x;\n\t\tindex2 = y;\n\t\tthis.hasChildren = hasChildren;\n\t\tthis.children = children;\n\t\tparent = p;\n\t\tface = f;\n\t\tthis.sphere = sphere;\n\t\tthis.mesh = mesh;\n\t\tthis.faceIndex = faceIndex;\n\t\tthis.centerOff = centerOff;\n\t\tthis.Heightmap = Heightmap;\n\t\tthis.intensity = intensity;\n\t\tthis.arcLengthOverSize = arcLengthOverSize;\n\t\tthis.center = center;\n\t\tthis.inFrustum = inFrustum;\n\t\tthis.meshOffset = meshOffset;\n\t\tthis.inAtmosphere = inAtmosphere;\n\t\tthis.color = color;\n\t\tthis.cubeMatrix = cubeMatrix;\n\t\tthis.bsp = bsp;\n\n\t\n\t}", "public Cube(String shapeName, double sideLength){\n super(shapeName, sideLength, sideLength, sideLength);\n }", "@Override\n\tpublic void setGeometry(String geometry) {\n\t\t\n\t}", "public Shape createShape(int shapeId, String name) {\n return registeredShapes.get(shapeId).create(name);\n }", "public static Primitive primitiveFromStr(String shape) {\n\t\tshape = shape.trim();\n\t\tswitch (shape) {\n\t\t\tcase \"Cube\":\n\t\t\t\treturn Primitive.CUBE;\n\t\t\tcase \"Cuboid\":\n\t\t\t\treturn Primitive.CUBOID;\n\t\t\tcase \"Triangular prism\":\n\t\t\t\treturn Primitive.TRIANGULAR_PRISM;\n\t\t\tcase \"Sphere\":\n\t\t\t\treturn Primitive.SPHERE;\n\t\t\tcase \"Convex lens\":\n\t\t\t\treturn Primitive.CONVEX_LENS;\n\t\t\tcase \"Concave lens\":\n\t\t\t\treturn Primitive.CONCAVE_LENS;\n\t\t\tcase \"Half-cylinder\":\n\t\t\t\treturn Primitive.HALF_CYLINDER;\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}", "public Shape getShape();", "public interface FlatGeometry {\r\n}", "public MultiShape3D()\n {\n this( (Geometry)null, (Appearance)null );\n }", "Vertex(){}", "public wVertex(String s){\r\n name = s;\r\n adjacencies = new ArrayList<Edge>();\r\n }", "private static ClosedShape createShape(String[] input) {\r\n String shapeName = input[0];\r\n\r\n switch (shapeName) {\r\n case \"oval\":\r\n return createOval(input);\r\n case \"circle\":\r\n return createCircle(input);\r\n case \"square\":\r\n return createSquare(input);\r\n case \"rect\":\r\n return createRect(input);\r\n case \"hexagon\":\r\n return createHexagon(input);\r\n default:\r\n throw new IllegalArgumentException();\r\n }\r\n }", "@Override\n public void create() {\n shapeRenderer = new ShapeRenderer();\n }", "public String whatShape();", "private MeshUtil() {}", "PrimitiveType(String name) {\n\tthis.primitiveElem = new PrimitiveElem(name);\n\t\n }", "public abstract com.jme.scene.Geometry getJMEGeometry();", "public abstract void constructHull();", "public void add(String s) { \n\t\t\n\t\t//get list of values\n\t\tString[] values = s.split(\"[ ]*,[ ]*\"); \n\t\t\n\t\tif(values[0].equals(\"CIRCLE\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\tDouble.parseDouble(values[3]), new Color(Double.parseDouble(values[4]), Double.parseDouble(values[5]), Double.parseDouble(values[6]), 1),\n\t\t\t\t\t50, 50, 15, 15, \"\", ShapeType.CIRCLE));\n\t\t}\n\t\telse if (values[0].equals(\"RECTANGLE\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[5]), Double.parseDouble(values[6]), Double.parseDouble(values[7]), 1),\n\t\t\t\t\tDouble.parseDouble(values[3]), Double.parseDouble(values[4]), 15, 15, \"\", ShapeType.RECTANGLE));\n\t\t}\n\t\telse if (values[0].equals(\"OVAL\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[5]), Double.parseDouble(values[6]), Double.parseDouble(values[7]), 1),\n\t\t\t\t\tDouble.parseDouble(values[3]), Double.parseDouble(values[4]), 15, 15, \"\", ShapeType.OVAL));\n\t\t}\n\t\telse if (values[0].equals(\"ROUNDRECT\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[7]), Double.parseDouble(values[8]), Double.parseDouble(values[9]), 1),\n\t\t\t\t\tDouble.parseDouble(values[3]), Double.parseDouble(values[4]), \n\t\t\t\t\tDouble.parseDouble(values[5]), Double.parseDouble(values[6]), \"\", ShapeType.ROUNDRECT));\n\t\t}\n\t\telse if (values[0].equals(\"TEXT\")) {\n\t\t\tadd(new Shape(Double.parseDouble(values[1]), Double.parseDouble(values[2]),\n\t\t\t\t\t50, new Color(Double.parseDouble(values[3]), Double.parseDouble(values[4]), Double.parseDouble(values[5]), 1),\n\t\t\t\t\t50, 50, 15, 15, \"textex\", ShapeType.TEXT));\n\t\t}\n\t\telse{\n\t\t\tadd(new Shape(0, 0, 0, new Color(0, 0, 0, 1), 0, 0, 0, 0, \"\", ShapeType.UNKNOWN));\n\t\t}\n\t\t\t\n\t\n\t}", "@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }", "public Shape(double x, double y, double r, Color c, double w, double h, double aw, double ah, String t, ShapeType ty) {\n\t\t\tcenterX = new SimpleDoubleProperty(this, \"CenterX\");\n\t\t\tsetCenterX(x);\n\t\t\tcenterY = new SimpleDoubleProperty(this, \"CenterY\");\n\t\t\tsetCenterY(y);\n\t\t\tradius = new SimpleDoubleProperty(this, \"radius\");\n\t\t\tsetRadius(r);\n\t\t\tcolor = new SimpleObjectProperty<Color>(this, \"color\");\n\t\t\tsetColor(c);\n\t\t\twidth = new SimpleDoubleProperty(this, \"width\");\n\t\t\tsetWidth(w);\n\t\t\theight = new SimpleDoubleProperty(this, \"height\");\n\t\t\tsetHeight(h);\n\t\t\tarcwidth = new SimpleDoubleProperty(this, \"arcWidth\");\n\t\t\tsetArcwidth(aw);\n\t\t\tarcheight = new SimpleDoubleProperty(this, \"arcHeight\");\n\t\t\tsetArcheight(ah);\n\t\t\ttext = new SimpleStringProperty(this, \"text\");\n\t\t\tsetText(t);\n\t\t\ttype = new SimpleObjectProperty<ShapeType>(this, \"type\");\n\t\t\tsetType(ty);\n\t\t\tdelete = new SimpleBooleanProperty(this, \"delete\");\n\t\t\tsetDelete(false);\n\t\t}", "public abstract Geometry computeGeometry();", "public Shape getShape() { return shape; }", "public Shape(int x, int y, int deltaX, int deltaY, int width, int height,String text) {\n\t\t_x = x;\n\t\t_y = y;\n\t\t_deltaX = deltaX;\n\t\t_deltaY = deltaY;\n\t\t_width = width;\n\t\t_height = height;\n\t\tthis.text = text;\n\t}", "public Shape(){\n\t\t//System.out.println(\"This is abstract class Shape\");\n\t}", "public TriangleGizmo(String name, double x1, double y1) {\n\t\t\tdouble w = 20;\n\t\t\tdouble h = 20;\n\t\t\txpos1 = x1*20;\n\t\t\txpos2 = (x1*20) + w;\n\t\t\txpos3 = xpos2;\n\t\t\typos1 = y1*20;\n\t\t\typos2 = y1*20;\n\t\t\typos3 = ypos2 + h;\n\t\t\twidth = w;\n\t\t\theight = h;\n\t\t\tcolour = Color.WHITE;\n\t\t\tls1 = new LineSegment(x1*20, y1*20, xpos2, ypos2);\n\t\t\tls2 = new LineSegment(xpos2, ypos2, xpos3, ypos3);\n\t\t\tls3 = new LineSegment(x1*20, y1*20, xpos3, ypos3);\n\t\t\tsetName(name);\n\t\t}", "@DISPID(1610940422) //= 0x60050006. The runtime will prefer the VTID if present\n @VTID(28)\n Factory shapeFactory();", "ShapeType getShapeType();", "public void setMyShape(int shapeIndex){this.myShape = shapeIndex;}", "public Triangle(float c0X, float c0Y, float c1X, float c1Y, float c2X, float c2Y, float r, float g, float b) {\n triangleCoords[0] = c0X;\n triangleCoords[1] = c0Y;\n triangleCoords[2] = 0;\n triangleCoords[3] = c1X;\n triangleCoords[4] = c1Y;\n triangleCoords[5] = 0;\n triangleCoords[6] = c2X;\n triangleCoords[7] = c2Y;\n triangleCoords[8] = 0;\n color[0] = r;\n color[1] = g;\n color[2] = b;\n centerX = (c0X+c1X) / 2.0f;\n centerY = (float)(c0Y - ((c1X-c0X)/(Math.sqrt(3)*2.0f)));\n\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n\n // The drawn object (This triangle) needs to claim shaders for vertex and fragment, so it can be drawn\n int vertexShader = MyGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER,\n vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER,\n fragmentShaderCode);\n\n // create empty OpenGL ES Program ( = one openGL procedure responsible for drawing this shape)\n mProgram = GLES20.glCreateProgram();\n\n // add the vertex shader to program\n GLES20.glAttachShader(mProgram, vertexShader);\n\n // add the fragment shader to program\n GLES20.glAttachShader(mProgram, fragmentShader);\n\n // creates OpenGL ES program executables\n GLES20.glLinkProgram(mProgram);\n }", "private void setShape(){\n // 0 - index of the vertex at the top of the polygon\n shapex[0] = x + MathUtils.cos(radians) * 8;\n shapey[0] = y + MathUtils.sin(radians) * 8;\n\n // 1 - index of the vertex at the bottom left of the polygon\n shapex[1] = x + MathUtils.cos(radians - 4 * 3.1415f / 5) * 8;\n shapey[1] = y + MathUtils.sin(radians - 4 * 3.1415f / 5) * 8;\n\n // 2 - index of the vertex at the bottom right of the polygon\n shapex[2] = x + MathUtils.cos(radians + 4 * 3.1415f / 5) * 8;\n shapey[2] = y + MathUtils.sin(radians + 4 * 3.1415f / 5) * 8;\n }", "BasicShader( String name ) {\n this( name, null );\n }", "GLMesh(BindStates bindStates, IOpenGL opengl)\n {\n this.bindStates = bindStates;\n this.opengl = opengl;\n }", "void addShape(IShape shape);", "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 Shape(URL url) {\n this(url, \"cm\");\n }", "public ShapeTest(Shape shape) {\r\n\t\t\r\n\t\tthis.shape = shape;\r\n\t}", "public void setShape(Info shape) {\n \n }", "public Vertex (String name)\n\t{\n\t vertexName = name ;\n\t adjacencyList = new DoublyLinkedList<>();\n\t indegree = 0;\n\t\t\n\t}", "public ShapeNode(Shape key) {\r\n super(Children.LEAF, Lookups.fixed( new Object[] {key} ) );\r\n this.shape = key;\r\n setIconBaseWithExtension(key.getImage());\r\n \r\n // Set image label\r\n String imagePath = key.getImage();\r\n \r\n if (imagePath.contains(\"/d.png\"))\r\n setDisplayName(\"<html><b> Dimension </b></html>\");\r\n else if (imagePath.contains(\"/f.png\"))\r\n setDisplayName(\"<html><b> Feature </b></html>\");\r\n \r\n else if (imagePath.contains(\"/p.png\"))\r\n setDisplayName(\"<html><b> Perception </b></html>\");\r\n \r\n \r\n \r\n \r\n }", "@Override\n public Shape getShape(String shapeType){\n\t\treturn null;\n }", "public Triangle() {\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (number of coordinate values * 4 bytes per float)\n triangleCoords.length * 4);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n\n // create a floating point buffer from the ByteBuffer\n vertexBuffer = bb.asFloatBuffer();\n // add the coordinates to the FloatBuffer\n vertexBuffer.put(triangleCoords);\n // set the buffer to read the first coordinate\n vertexBuffer.position(0);\n\n // prepare shaders and OpenGL program\n int vertexShader = MyGLRenderer.loadShader(\n GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = MyGLRenderer.loadShader(\n GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n mProgram = GLES20.glCreateProgram(); // create empty OpenGL Program\n GLES20.glAttachShader(mProgram, vertexShader); // add the vertex shader to program\n GLES20.glAttachShader(mProgram, fragmentShader); // add the fragment shader to program\n GLES20.glLinkProgram(mProgram); // create OpenGL program executables\n\n }", "@Test(expected = IllegalArgumentException.class)\n public void testNoShapeWithSameNameCaseInsensitive() {\n model1.addShape(Rectangle.createRectangle(\"R\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n model1.addShape(Oval.createOval(\"r\", new Point.Double(500, 200),\n new Color(0, 0, 0), 0, 10, 10, 10));\n }", "public EpsShape(Shape shape) {\n\t\tthis(shape,false);\n\t}", "public Seagull(String name){\n this.name = name;\n this.color = SWT.COLOR_DARK_BLUE;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testMakingShapeWithNullName() {\n model1.addShape(Oval.createOval(null, new Point.Double(500, 100),\n new Color(0, 0, 1), 6, 100, 60.0, 30.0));\n }", "public static ShapeId fromParts(String namespace, String name) {\n return fromParts(namespace, name, null);\n }", "public interface ITriangleMesh {\n /**\n * Add a new vertex (given by position) to the vertex list. The new vertex is\n * appended to the end of the list.\n */\n int addVertex(Vector position);\n\n /**\n * Index in vertex list.\n */\n Vertex getVertex(int index);\n\n int getNumberOfVertices();\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(AbstractTriangle t);\n\n int getNumberOfTriangles();\n\n AbstractTriangle getTriangle(int triangleIndex);\n\n /**\n * Clear mesh - remove all triangles and vertices.\n */\n void clear();\n\n /**\n * Compute the triangles normals.\n */\n void computeTriangleNormals();\n\n\n Vector getTextureCoordinate(int index);\n\n /**\n * Add texture coordinate to mesh.\n */\n void addTextureCoordinate(Vector t);\n\n /**\n * Return the number of texture coordinates in the mesh.\n */\n int getNumberOfTextureCoordinates();\n\n /**\n * Set color to all triangles and all vertices of the mesh.\n */\n void setColor(Vector color);\n}", "@Test(expected = IllegalArgumentException.class)\n public void sameShapeName() {\n\n testAnimation.addShape(r, 1, 100);\n\n // new shape with same name\n IShape f = new Rectangle(\"R\",\n 2, 4,\n 3, 50, 10,\n 30.0, 75.0);\n\n testAnimation.addShape(f, 30, 80);\n }", "abstract void geometryMethod();", "public ColladaSkinnedMesh(String name, TriMesh target, \n int[] vertexIndices) \n {\n super (name, target);\n\n this.vertexIndices = vertexIndices;\n }", "@Override\n public String getName() {\n return \"Polygons 2D Module\";\n }" ]
[ "0.7233299", "0.7155353", "0.67610234", "0.67478615", "0.6706788", "0.6488349", "0.6301576", "0.62363833", "0.62114805", "0.61978996", "0.6146003", "0.6141299", "0.60964876", "0.60951287", "0.60418487", "0.6040869", "0.60276043", "0.60148686", "0.59989494", "0.5981388", "0.593779", "0.5923854", "0.5903054", "0.57832015", "0.57593477", "0.5744038", "0.5736698", "0.5723939", "0.5703051", "0.57010597", "0.56946933", "0.56879765", "0.56828684", "0.5661919", "0.5641011", "0.56378645", "0.56207484", "0.5612681", "0.5611258", "0.5599713", "0.55963844", "0.5563459", "0.5550024", "0.5545725", "0.55435675", "0.55288744", "0.55261344", "0.5519071", "0.54977906", "0.5490676", "0.5474012", "0.5466602", "0.54597014", "0.5458876", "0.5457138", "0.5449308", "0.54414153", "0.54382765", "0.5438115", "0.5409262", "0.5407954", "0.53808784", "0.5374907", "0.53616816", "0.53572696", "0.53539234", "0.53538775", "0.53448516", "0.53374004", "0.53364956", "0.5333112", "0.53291047", "0.5322995", "0.53148997", "0.5308203", "0.53033084", "0.52809113", "0.52737904", "0.526704", "0.52654535", "0.52649045", "0.5260306", "0.5247932", "0.52427006", "0.5241732", "0.5234743", "0.5220418", "0.5215393", "0.5215247", "0.5212536", "0.5212336", "0.520377", "0.51953036", "0.5194133", "0.5192284", "0.51920813", "0.51897264", "0.51844937", "0.5182355", "0.5172934" ]
0.8264852
0
Returns a primitive shape as a Primitive object from its name/String representation
public static Primitive primitiveFromStr(String shape) { shape = shape.trim(); switch (shape) { case "Cube": return Primitive.CUBE; case "Cuboid": return Primitive.CUBOID; case "Triangular prism": return Primitive.TRIANGULAR_PRISM; case "Sphere": return Primitive.SPHERE; case "Convex lens": return Primitive.CONVEX_LENS; case "Concave lens": return Primitive.CONCAVE_LENS; case "Half-cylinder": return Primitive.HALF_CYLINDER; default: return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Primitive(String shape) {\n\t\t\tthis.shape = shape;\n\t\t}", "PrimitiveType(String name) {\n\tthis.primitiveElem = new PrimitiveElem(name);\n\t\n }", "public static DataPrimitive of(PrimitiveType primitiveType, VariableName variableName) {\n return new DataPrimitive(\n variableName,\n DataPurpose.any(),\n DataValidator.empty(),\n primitiveType,\n new LinkedHashSet<>(),\n null);\n }", "PrimitiveType createPrimitiveType();", "public static JPrimitiveType parse(JCodeModel codeModel, String typeName) {\n if (typeName.equals(\"void\"))\n return codeModel.VOID;\n else if (typeName.equals(\"boolean\"))\n return codeModel.BOOLEAN;\n else if (typeName.equals(\"byte\"))\n return codeModel.BYTE;\n else if (typeName.equals(\"short\"))\n return codeModel.SHORT;\n else if (typeName.equals(\"char\"))\n return codeModel.CHAR;\n else if (typeName.equals(\"int\"))\n return codeModel.INT;\n else if (typeName.equals(\"float\"))\n return codeModel.FLOAT;\n else if (typeName.equals(\"long\"))\n return codeModel.LONG;\n else if (typeName.equals(\"double\"))\n return codeModel.DOUBLE;\n else\n throw new IllegalArgumentException(\"Not a primitive type: \" + typeName);\n }", "public PrimitiveType getPrimitiveType();", "PrimitiveProperty createPrimitiveProperty();", "PrimitiveTypeSourceReference createPrimitiveTypeSourceReference();", "@JsonCreator\n public static ComputeType fromString(String name) {\n return fromString(name, ComputeType.class);\n }", "public static PrimitivesToAnonymize createPrimitivesToAnonymize(String enumName) {\n\t\tPrimitivesToAnonymize primitivesToAnonymize = null;\n\t\tswitch (enumName) {\n\t\t\tcase R.ANONYMIZE_ALL:\n\t\t\t\tprimitivesToAnonymize = PrimitivesToAnonymize.ALL;\n\t\t\t\tbreak;\n\t\t\tcase R.ANONYMIZE_ALL_BUT_BENCH:\n\t\t\t\tprimitivesToAnonymize = PrimitivesToAnonymize.ALL_BUT_BENCH;\n\t\t\t\tbreak;\n\t\t\tcase R.ANONYMIZE_NONE:\n\t\t\t\tprimitivesToAnonymize = PrimitivesToAnonymize.NONE;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\t\"There is no PrimitivesToAnonymize enum associated with the string: \" + enumName);\n\t\t}\n\t\treturn primitivesToAnonymize;\n\t}", "public final PrimitiveType findPrimitiveType(String name)\n {\n for (int i = 0; i < primitiveTypes.size(); i++) {\n PrimitiveType a = (PrimitiveType)(primitiveTypes.elementAt(i));\n if (a.getName().equals(name))\n return a;\n }\n return null;\n }", "public static Class<?> getPrimitiveClass(String name) {\n Method method = null;\n try {\n method = Class.class.getDeclaredMethod(\"getPrimitiveClass\", String.class);\n } catch (NoSuchMethodException e) {\n throw new RuntimeException(e);\n }\n method.setAccessible(true);\n Class<?> clazz = null;\n try {\n clazz = (Class<?>) method.invoke(null, name);\n } catch (IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(e);\n }\n return clazz;\n }", "public PrimitiveType getPrimitiveType() {\n return primitiveType;\n }", "public static DataPrimitive ofDataBusinessType(\n DataPurpose dataPurpose, PrimitiveType primitiveType, VariableName variableName) {\n return new DataPrimitive(\n variableName,\n dataPurpose,\n DataValidator.empty(),\n primitiveType,\n new LinkedHashSet<>(),\n null);\n }", "public Mesh(String shape) {\n\t\tthis(primitiveFromStr(shape)); // Call the other constructor for primitive geometries\n\t}", "String getModeledPrimitiveType(Object elementID) throws Exception;", "private static QualifiedName makePrimitiveInstanceMethodName(String methodName, String primitiveTypeName) {\r\n \r\n if(methodName == null || primitiveTypeName == null) {\r\n throw new IllegalArgumentException(\"makePrimitiveInstanceMethodName must not be passed null values\");\r\n }\r\n \r\n // Trivial case: If we are given the name of a primitive type in CAL form (eg, \"Int\")\r\n // then we don't need to do any particular work to get things into the correct form.\r\n if(Character.isUpperCase(primitiveTypeName.charAt(0))) {\r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, methodName + primitiveTypeName);\r\n }\r\n \r\n // Non-trivial case: we need to convert the first character of the primitive type name\r\n // to upper-case.\r\n StringBuilder buffer = new StringBuilder(methodName.length() + primitiveTypeName.length());\r\n buffer.append(methodName);\r\n buffer.append(Character.toUpperCase(primitiveTypeName.charAt(0)));\r\n buffer.append(primitiveTypeName.substring(1));\r\n \r\n return QualifiedName.make(CAL_Prelude.MODULE_NAME, buffer.toString());\r\n }", "private DataPrimitive(\n VariableName variableName,\n DataPurpose dataPurpose,\n DataValidator dataValidator,\n PrimitiveType primitiveType,\n Set<Annotation> annotations,\n DataObject dataObject) {\n super(\n DataPrimaryType.PRIMITIVE,\n variableName,\n dataPurpose,\n dataValidator,\n DataSourceType.DEFAULT);\n this.primitiveType = primitiveType;\n this.annotations = annotations;\n this.dataObject = dataObject;\n }", "PrimitiveTypesLibrary createPrimitiveTypesLibrary();", "private DataPrimitive(\n PrimitiveType primitiveType,\n VariableName variableName,\n Set<Annotation> annotations,\n DataPurpose dataPurpose,\n DataObject dataObject) {\n this(variableName, dataPurpose, DataValidator.empty(), primitiveType, annotations, dataObject);\n }", "public String getPrimitiveEntity();", "public PrimitiveType getAstPrimitiveType(AST ast, String typeName) {\r\n\t\tCode typeCode = dataTypeUtils.getPrimitiveTypeCodes().get(\r\n\t\t\t\ttypeName.toLowerCase());\r\n\t\tPrimitiveType primitiveType = ast.newPrimitiveType(typeCode);\r\n\t\treturn primitiveType;\r\n\t}", "public T casePrimitiveDefinition(PrimitiveDefinition object)\n {\n return null;\n }", "private static PrimitiveType getPrimitiveType(HashMap<Vertex, Curvature> curvatures, Vertex v) {\n\n\t\tCurvature c = curvatures.get(v);\n\t\t\n\t\tif (Math.abs(c.getSaturation()) < 0.20)\n\t\t\treturn PrimitiveType.PLANE;\n\n\t\tfloat hue = c.getHue();\n\n\t\tif (hue < 15 * Math.PI / 180)\n\t\t\treturn PrimitiveType.SPHERE_CONVEX;\n\t\telse if (hue >= 15 * Math.PI / 180 && hue < 75 * Math.PI / 180)\n\t\t\treturn PrimitiveType.CONE_CONVEX;\n\t\telse if (hue >= 75 * Math.PI / 180 && hue < 150 * Math.PI / 180\n\t\t\t\t|| hue >= 230 * Math.PI / 180)\n\t\t\treturn PrimitiveType.SPHERE_CONCAVE;\n\t\telse\n\t\t\treturn PrimitiveType.CONE_CONCAVE;\n\t}", "public static ClassReference fromPrimitive(Primitive primitive) {\n\t\tswitch (primitive) {\n\t\tcase BOOLEAN:\n\t\t\treturn BOOLEAN;\n\t\tcase BYTE:\n\t\t\treturn BYTE;\n\t\tcase CHAR:\n\t\t\treturn CHAR;\n\t\tcase SHORT:\n\t\t\treturn SHORT;\n\t\tcase INT:\n\t\t\treturn INT;\n\t\tcase LONG:\n\t\t\treturn LONG;\n\t\tcase FLOAT:\n\t\t\treturn FLOAT;\n\t\tcase DOUBLE:\n\t\t\treturn DOUBLE;\n\t\tcase REFERENCE:\n\t\t\treturn OBJECT;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "IShape getShape(String name);", "public @NotNull Waypoint fromPrimitive(@NotNull PersistentDataContainer primitive, @NotNull PersistentDataAdapterContext context) {\n return new Waypoint(\n primitive.get(new NamespacedKey(SimpleHome.instance(), \"name\"), PersistentDataType.STRING),\n primitive.get(new NamespacedKey(SimpleHome.instance(), \"worldName\"), PersistentDataType.STRING),\n primitive.get(new NamespacedKey(SimpleHome.instance(), \"x\"), PersistentDataType.DOUBLE),\n primitive.get(new NamespacedKey(SimpleHome.instance(), \"y\"), PersistentDataType.DOUBLE),\n primitive.get(new NamespacedKey(SimpleHome.instance(), \"z\"), PersistentDataType.DOUBLE)\n );\n }", "public abstract Number getPrimitiveType();", "public static Class getPrimitiveClass(final String className) {\n if (className.equals(\"void\")) {\n return void.class;\n } else if (className.equals(\"long\")) {\n return long.class;\n } else if (className.equals(\"int\")) {\n return int.class;\n } else if (className.equals(\"short\")) {\n return short.class;\n } else if (className.equals(\"double\")) {\n return double.class;\n } else if (className.equals(\"float\")) {\n return float.class;\n } else if (className.equals(\"byte\")) {\n return byte.class;\n } else if (className.equals(\"boolean\")) {\n return boolean.class;\n } else if (className.equals(\"char\")) {\n return char.class;\n } else {\n return null;\n }\n }", "public static LazyPrimitive<?, ?> createLazyPrimitiveClass(PrimitiveObjectInspector oi) {\n PrimitiveCategory p = oi.getPrimitiveCategory();\n switch (p) {\n case BOOLEAN:\n return new LazyBoolean((LazyBooleanObjectInspector) oi);\n case BYTE:\n return new LazyByte((LazyByteObjectInspector) oi);\n case SHORT:\n return new LazyShort((LazyShortObjectInspector) oi);\n case INT:\n return new LazyInteger((LazyIntObjectInspector) oi);\n case LONG:\n return new LazyLong((LazyLongObjectInspector) oi);\n case FLOAT:\n return new LazyFloat((LazyFloatObjectInspector) oi);\n case DOUBLE:\n return new LazyDouble((LazyDoubleObjectInspector) oi);\n case STRING:\n return new LazyString((LazyStringObjectInspector) oi);\n default:\n throw new RuntimeException(\"Internal error: no LazyObject for \" + p);\n }\n }", "public interface PrimitiveSerializationTag {\n byte VOID = 0;\n byte VERSION = (byte) 0xFF;\n byte TRUE = (byte) 'T'; // kTrue\n byte FALSE = (byte) 'F'; // kFalse\n byte UNDEFINED = (byte) '_'; // kUndefined\n byte NULL = (byte) '0'; // kNull\n byte INT32 = (byte) 'I'; // kInt32\n byte UINT32 = (byte) 'U'; // kUint32\n byte DOUBLE = (byte) 'N'; // kDouble\n byte BIG_INT = (byte) 'Z'; // kBigInt\n byte UTF8_STRING = (byte) 'S'; // kUtf8String\n byte ONE_BYTE_STRING = (byte) '\"'; // kOneByteString\n byte TWO_BYTE_STRING = (byte) 'c'; // kTwoByteString\n byte PADDING = (byte) '\\0'; // kPadding\n byte DATE = (byte) 'D'; // kDate\n byte THE_HOLE = (byte) '-'; // kTheHole\n byte OBJECT_REFERENCE = (byte) '^'; // kObjectReference\n byte HOST_OBJECT = (byte) '\\\\'; // kHostObject\n}", "public String toPrimitive(String fieldType) {\n String res = \"\";\n if (fieldType.equals(\"Integer\")) { res = \"int\"; }\n else if (fieldType.equals(\"Short\")) { res = \"short\"; }\n else if (fieldType.equals(\"Long\")) { res = \"long\"; }\n else if (fieldType.equals(\"Byte\")) { res = \"byte\"; }\n else if (fieldType.equals(\"Character\")) { res = \"char\"; }\n else if (fieldType.equals(\"Float\")) { res = \"float\"; }\n else if (fieldType.equals(\"Double\")) { res = \"double\"; }\n else if (fieldType.equals(\"Boolean\")) { res = \"boolean\"; }\n else { return fieldType; }\n return res;\n }", "public DataPrimitive withVariableName(String variableName) {\n return new DataPrimitive(\n new VariableName(variableName),\n getDataPurpose(),\n getDataValidator(),\n getPrimitiveType(),\n getAnnotations(),\n getDataObject());\n }", "public static PrimitiveDefList loadPrimitiveDefs(String partName) {\n String path = getPrimitiveDefsFileName(partName);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "private Class isPrimitive(String className) {\n Class result = null;\n switch (className) {\n case (\"Byte\"):\n case (\"byte\"):\n result = Byte.class;\n break;\n\n case (\"Short\"):\n case (\"short\"):\n result = Short.class;\n break;\n\n case (\"Integer\"):\n case (\"int\"):\n result = Integer.class;\n break;\n\n case (\"Long\"):\n case (\"long\"):\n result = Long.class;\n break;\n\n case (\"Float\"):\n case (\"float\"):\n result = Float.class;\n break;\n\n case (\"Double\"):\n case (\"double\"):\n result = Double.class;\n break;\n\n case (\"Boolean\"):\n case (\"boolean\"):\n result = Boolean.class;\n break;\n\n case (\"Character\"):\n case (\"char\"):\n result = Character.class;\n break;\n case(\"String\"):\n result = String.class;\n break;\n\n }\n return result;\n }", "public final EObject rulePrimitiveType() throws RecognitionException {\n EObject current = null;\n int rulePrimitiveType_StartIndex = input.index();\n Enumerator lv_primitiveType_0_0 = null;\n\n\n enterRule(); \n \n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 32) ) { return current; }\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1829:28: ( ( (lv_primitiveType_0_0= rulePrimitiveTypeSpec ) ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1830:1: ( (lv_primitiveType_0_0= rulePrimitiveTypeSpec ) )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1830:1: ( (lv_primitiveType_0_0= rulePrimitiveTypeSpec ) )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1831:1: (lv_primitiveType_0_0= rulePrimitiveTypeSpec )\n {\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1831:1: (lv_primitiveType_0_0= rulePrimitiveTypeSpec )\n // ../de.jevopi.mitra2/src-gen/de/jevopi/mitra2/parser/antlr/internal/InternalMitraParser.g:1832:3: lv_primitiveType_0_0= rulePrimitiveTypeSpec\n {\n if ( state.backtracking==0 ) {\n \n \t newCompositeNode(grammarAccess.getPrimitiveTypeAccess().getPrimitiveTypePrimitiveTypeSpecEnumRuleCall_0()); \n \t \n }\n pushFollow(FOLLOW_rulePrimitiveTypeSpec_in_rulePrimitiveType3448);\n lv_primitiveType_0_0=rulePrimitiveTypeSpec();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getPrimitiveTypeRule());\n \t }\n \t\tset(\n \t\t\tcurrent, \n \t\t\t\"primitiveType\",\n \t\tlv_primitiveType_0_0, \n \t\t\"PrimitiveTypeSpec\");\n \t afterParserOrEnumRuleCall();\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n if ( state.backtracking>0 ) { memoize(input, 32, rulePrimitiveType_StartIndex); }\n }\n return current;\n }", "public static DataPrimitive ofDataBusinessTypeWithDataObject(\n DataPurpose dataPurpose,\n PrimitiveType primitiveType,\n VariableName variableName,\n DataObject dataObject) {\n return new DataPrimitive(\n variableName,\n dataPurpose,\n DataValidator.empty(),\n primitiveType,\n new LinkedHashSet<>(),\n dataObject);\n }", "public Class<?> getPrimitiveType();", "public PrimitiveSchemaType getEmptyPrimitiveSchemaType(String schemaTypeName,\n ElementOrigin elementOrigin,\n String externalSourceGUID,\n String externalSourceName,\n String methodName) throws InvalidParameterException\n {\n PrimitiveSchemaType schemaType = new PrimitiveSchemaType();\n\n schemaType.setType(this.getElementType(schemaTypeName,\n SchemaElementMapper.PRIMITIVE_SCHEMA_TYPE_TYPE_NAME,\n elementOrigin,\n externalSourceGUID,\n externalSourceName,\n methodName));\n return schemaType;\n }", "public BuiltInAtomicType getPrimitiveType() {\r\n return BuiltInAtomicType.STRING;\r\n }", "public String getPrimitiveType() {\r\n return type;\r\n }", "public RMPoint convertedPointFromShape(RMPoint aPoint, RMShape aShape)\n{\n return convertPointFromShape(new RMPoint(aPoint), aShape);\n}", "public final EObject rulePrimitiveTypeCS() throws RecognitionException {\n EObject current = null;\n\n AntlrDatatypeRuleToken lv_name_0_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:5720:2: ( ( (lv_name_0_0= rulePrimitiveTypeIdentifier ) ) )\n // InternalMyDsl.g:5721:2: ( (lv_name_0_0= rulePrimitiveTypeIdentifier ) )\n {\n // InternalMyDsl.g:5721:2: ( (lv_name_0_0= rulePrimitiveTypeIdentifier ) )\n // InternalMyDsl.g:5722:3: (lv_name_0_0= rulePrimitiveTypeIdentifier )\n {\n // InternalMyDsl.g:5722:3: (lv_name_0_0= rulePrimitiveTypeIdentifier )\n // InternalMyDsl.g:5723:4: lv_name_0_0= rulePrimitiveTypeIdentifier\n {\n if ( state.backtracking==0 ) {\n\n \t\t\t\tnewCompositeNode(grammarAccess.getPrimitiveTypeCSAccess().getNamePrimitiveTypeIdentifierParserRuleCall_0());\n \t\t\t\n }\n pushFollow(FOLLOW_2);\n lv_name_0_0=rulePrimitiveTypeIdentifier();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\t\tif (current==null) {\n \t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getPrimitiveTypeCSRule());\n \t\t\t\t}\n \t\t\t\tset(\n \t\t\t\t\tcurrent,\n \t\t\t\t\t\"name\",\n \t\t\t\t\tlv_name_0_0,\n \t\t\t\t\t\"org.eclipse.ocl.xtext.completeocl.CompleteOCL.PrimitiveTypeIdentifier\");\n \t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\n }\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n\n \tleaveRule();\n\n }\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public GraphicsPrimitive makePrimitive(SurfaceType paramSurfaceType1, CompositeType paramCompositeType, SurfaceType paramSurfaceType2) {\n/* 122 */ return null;\n/* */ }", "private PrimitiveType getTrianglePrimitiveType(HashMap<Vertex, Curvature> curvatures,\n\t\t\tTriangle triangle) {\n\t\treturn getTrianglePrimitiveType(curvatures, triangle, true);\n\t}", "public final void mT__21() throws RecognitionException {\r\n try {\r\n int _type = T__21;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:19:7: ( 'primitive' )\r\n // ../org.ow2.mindEd.adl.textual/src-gen/org/ow2/mindEd/adl/textual/parser/antlr/internal/InternalFractal.g:19:9: 'primitive'\r\n {\r\n match(\"primitive\"); \r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n }\r\n }", "SimpleLiteral createSimpleLiteral();", "@JsonCreator\n public static ProgrammingState fromString(String name) {\n return fromString(name, ProgrammingState.class);\n }", "Literal createLiteral();", "Literal createLiteral();", "public static synchronized boolean isPrimitive(String value){\n\t\treturn ClassRegistry.xmlprimitives.containsKey(value);\n\t}", "public final JavaliParser.primitiveType_return primitiveType() throws RecognitionException {\n\t\tJavaliParser.primitiveType_return retval = new JavaliParser.primitiveType_return();\n\t\tretval.start = input.LT(1);\n\n\t\tObject root_0 = null;\n\n\t\tToken tok=null;\n\n\t\tObject tok_tree=null;\n\t\tRewriteRuleTokenStream stream_92=new RewriteRuleTokenStream(adaptor,\"token 92\");\n\t\tRewriteRuleTokenStream stream_90=new RewriteRuleTokenStream(adaptor,\"token 90\");\n\t\tRewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\n\n\t\ttry {\n\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:2: (tok= 'int' -> Identifier[$tok, $tok.text] |tok= 'float' -> Identifier[$tok, $tok.text] |tok= 'boolean' -> Identifier[$tok, $tok.text] )\n\t\t\tint alt40=3;\n\t\t\tswitch ( input.LA(1) ) {\n\t\t\tcase 92:\n\t\t\t\t{\n\t\t\t\talt40=1;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 90:\n\t\t\t\t{\n\t\t\t\talt40=2;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 86:\n\t\t\t\t{\n\t\t\t\talt40=3;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tNoViableAltException nvae =\n\t\t\t\t\tnew NoViableAltException(\"\", 40, 0, input);\n\t\t\t\tthrow nvae;\n\t\t\t}\n\t\t\tswitch (alt40) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:561:4: tok= 'int'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,92,FOLLOW_92_in_primitiveType2636); \n\t\t\t\t\tstream_92.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 562:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:563:5: tok= 'float'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,90,FOLLOW_90_in_primitiveType2651); \n\t\t\t\t\tstream_90.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 564:7: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3 :\n\t\t\t\t\t// /home/luca/svn-repos/cd_students/2015ss/master/CD2_A1/src/cd/parser/Javali.g:565:4: tok= 'boolean'\n\t\t\t\t\t{\n\t\t\t\t\ttok=(Token)match(input,86,FOLLOW_86_in_primitiveType2669); \n\t\t\t\t\tstream_86.add(tok);\n\n\t\t\t\t\t// AST REWRITE\n\t\t\t\t\t// elements: \n\t\t\t\t\t// token labels: \n\t\t\t\t\t// rule labels: retval\n\t\t\t\t\t// token list labels: \n\t\t\t\t\t// rule list labels: \n\t\t\t\t\t// wildcard labels: \n\t\t\t\t\tretval.tree = root_0;\n\t\t\t\t\tRewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.getTree():null);\n\n\t\t\t\t\troot_0 = (Object)adaptor.nil();\n\t\t\t\t\t// 566:3: -> Identifier[$tok, $tok.text]\n\t\t\t\t\t{\n\t\t\t\t\t\tadaptor.addChild(root_0, (Object)adaptor.create(Identifier, tok, (tok!=null?tok.getText():null)));\n\t\t\t\t\t}\n\n\n\t\t\t\t\tretval.tree = root_0;\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t\tretval.tree = (Object)adaptor.rulePostProcessing(root_0);\n\t\t\tadaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n\t\t}\n\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\tthrow re;\n\t\t}\n\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "public StringPrimitiveTypeHandler(Descriptors.FieldDescriptor fieldDescriptor) {\n this.fieldDescriptor = fieldDescriptor;\n }", "@JsonCreator\n public static JobInputType fromString(String name) {\n return fromString(name, JobInputType.class);\n }", "public VariablePrimitive(String nom) {\n\t\tsuper(nom, true);\n\t}", "public Shape createShape(int shapeId, String name) {\n return registeredShapes.get(shapeId).create(name);\n }", "ShapeType getShapeType();", "FmprimitivesFactory getFmprimitivesFactory();", "public PrimitiveTypeImpl getPrimitiveType(TypeKind kind) {\n switch(kind) {\n case BOOLEAN:\n return PrimitiveTypeImpl.BOOLEAN;\n case BYTE:\n return PrimitiveTypeImpl.BYTE;\n case CHAR:\n return PrimitiveTypeImpl.CHAR;\n case DOUBLE:\n return PrimitiveTypeImpl.DOUBLE;\n case FLOAT:\n return PrimitiveTypeImpl.FLOAT;\n case INT:\n return PrimitiveTypeImpl.INT;\n case LONG:\n return PrimitiveTypeImpl.LONG;\n case SHORT:\n return PrimitiveTypeImpl.SHORT;\n default:\n throw new IllegalArgumentException();\n }\n }", "public final void primitiveType() throws RecognitionException {\n int primitiveType_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"primitiveType\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(445, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 55) ) { return ; }\n // Java.g:446:5: ( 'boolean' | 'char' | 'byte' | 'short' | 'int' | 'long' | 'float' | 'double' )\n dbg.enterAlt(1);\n\n // Java.g:\n {\n dbg.location(446,5);\n if ( (input.LA(1)>=56 && input.LA(1)<=63) ) {\n input.consume();\n state.errorRecovery=false;state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n dbg.recognitionException(mse);\n throw mse;\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 55, primitiveType_StartIndex); }\n }\n dbg.location(454, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"primitiveType\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "@JsonCreator\n public static ImageCropType fromString(String name) {\n return fromString(name, ImageCropType.class);\n }", "@JsonCreator\n public static DataType fromString(String name) {\n return fromString(name, DataType.class);\n }", "StringOperation createStringOperation();", "@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }", "@Pure\n\tprotected Primitives getPrimitiveTypes() {\n\t\treturn this.primitives;\n\t}", "public static Type Type(String str) {\n\t\ttry {\n\t\t\tJavaIdentifierInputStream jin = new JavaIdentifierInputStream(str);\n\t\t\tBinaryInputStream bin = new BinaryInputStream(jin);\n\t\t\tBinaryAutomataReader reader = new BinaryAutomataReader(bin,\n\t\t\t\t\tTypes.SCHEMA);\n\t\t\tAutomaton automaton = reader.read();\n\t\t\treader.close();\n\n\t\t\treturn Type.construct(automaton);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"runtime failure constructing type\", e);\n\t\t}\n\t}", "public PrimObject reference(String name) {\n return resolveObject(name);\n }", "public PrimitiveType getDefaultPrimitiveType()\n {\n try {\n return (PrimitiveType)(primitiveTypes.elementAt(0));\n } catch(Exception e) {\n return null;\n }\n }", "public Literal getLiteral(Object literalData);", "private TsPrimitiveType readOneValue() {\n switch (dataType) {\n case BOOLEAN:\n return new TsBoolean(valueDecoder.readBoolean(valueInputStream));\n case INT32:\n return new TsInt(valueDecoder.readInt(valueInputStream));\n case INT64:\n return new TsLong(valueDecoder.readLong(valueInputStream));\n case FLOAT:\n return new TsFloat(valueDecoder.readFloat(valueInputStream));\n case DOUBLE:\n return new TsDouble(valueDecoder.readDouble(valueInputStream));\n case TEXT:\n return new TsBinary(valueDecoder.readBinary(valueInputStream));\n default:\n break;\n }\n throw new UnSupportedDataTypeException(\"Unsupported data type :\" + dataType);\n }", "String getShapeName();", "Shape newShape(GraphicalObject g) throws RemoteException;", "public final EObject ruleTechnologySpecificPrimitiveType() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token lv_name_2_0=null;\n Token otherlv_3=null;\n Token otherlv_4=null;\n Token otherlv_6=null;\n Token lv_default_8_0=null;\n Token otherlv_9=null;\n EObject lv_basicBuiltinPrimitiveTypes_5_0 = null;\n\n EObject lv_basicBuiltinPrimitiveTypes_7_0 = null;\n\n\n\n \tenterRule();\n\n try {\n // InternalMappingDsl.g:4061:2: ( (otherlv_0= 'primitive' otherlv_1= 'type' ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= 'based' otherlv_4= 'on' ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) ) (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )* ( (lv_default_8_0= 'default' ) )? )? otherlv_9= ';' ) )\n // InternalMappingDsl.g:4062:2: (otherlv_0= 'primitive' otherlv_1= 'type' ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= 'based' otherlv_4= 'on' ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) ) (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )* ( (lv_default_8_0= 'default' ) )? )? otherlv_9= ';' )\n {\n // InternalMappingDsl.g:4062:2: (otherlv_0= 'primitive' otherlv_1= 'type' ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= 'based' otherlv_4= 'on' ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) ) (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )* ( (lv_default_8_0= 'default' ) )? )? otherlv_9= ';' )\n // InternalMappingDsl.g:4063:3: otherlv_0= 'primitive' otherlv_1= 'type' ( (lv_name_2_0= RULE_ID ) ) (otherlv_3= 'based' otherlv_4= 'on' ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) ) (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )* ( (lv_default_8_0= 'default' ) )? )? otherlv_9= ';'\n {\n otherlv_0=(Token)match(input,27,FOLLOW_84); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getPrimitiveKeyword_0());\n \t\t\n otherlv_1=(Token)match(input,54,FOLLOW_7); \n\n \t\t\tnewLeafNode(otherlv_1, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getTypeKeyword_1());\n \t\t\n // InternalMappingDsl.g:4071:3: ( (lv_name_2_0= RULE_ID ) )\n // InternalMappingDsl.g:4072:4: (lv_name_2_0= RULE_ID )\n {\n // InternalMappingDsl.g:4072:4: (lv_name_2_0= RULE_ID )\n // InternalMappingDsl.g:4073:5: lv_name_2_0= RULE_ID\n {\n lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_85); \n\n \t\t\t\t\tnewLeafNode(lv_name_2_0, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getNameIDTerminalRuleCall_2_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTechnologySpecificPrimitiveTypeRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_2_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n\n }\n\n\n }\n\n // InternalMappingDsl.g:4089:3: (otherlv_3= 'based' otherlv_4= 'on' ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) ) (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )* ( (lv_default_8_0= 'default' ) )? )?\n int alt110=2;\n int LA110_0 = input.LA(1);\n\n if ( (LA110_0==55) ) {\n alt110=1;\n }\n switch (alt110) {\n case 1 :\n // InternalMappingDsl.g:4090:4: otherlv_3= 'based' otherlv_4= 'on' ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) ) (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )* ( (lv_default_8_0= 'default' ) )?\n {\n otherlv_3=(Token)match(input,55,FOLLOW_86); \n\n \t\t\t\tnewLeafNode(otherlv_3, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getBasedKeyword_3_0());\n \t\t\t\n otherlv_4=(Token)match(input,56,FOLLOW_87); \n\n \t\t\t\tnewLeafNode(otherlv_4, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getOnKeyword_3_1());\n \t\t\t\n // InternalMappingDsl.g:4098:4: ( (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType ) )\n // InternalMappingDsl.g:4099:5: (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType )\n {\n // InternalMappingDsl.g:4099:5: (lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType )\n // InternalMappingDsl.g:4100:6: lv_basicBuiltinPrimitiveTypes_5_0= rulePrimitiveType\n {\n\n \t\t\t\t\t\tnewCompositeNode(grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getBasicBuiltinPrimitiveTypesPrimitiveTypeParserRuleCall_3_2_0());\n \t\t\t\t\t\n pushFollow(FOLLOW_81);\n lv_basicBuiltinPrimitiveTypes_5_0=rulePrimitiveType();\n\n state._fsp--;\n\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTechnologySpecificPrimitiveTypeRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tadd(\n \t\t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\t\"basicBuiltinPrimitiveTypes\",\n \t\t\t\t\t\t\tlv_basicBuiltinPrimitiveTypes_5_0,\n \t\t\t\t\t\t\t\"de.fhdo.ddmm.data.DataDsl.PrimitiveType\");\n \t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t\t\t\t\t\n\n }\n\n\n }\n\n // InternalMappingDsl.g:4117:4: (otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) ) )*\n loop108:\n do {\n int alt108=2;\n int LA108_0 = input.LA(1);\n\n if ( (LA108_0==25) ) {\n alt108=1;\n }\n\n\n switch (alt108) {\n \tcase 1 :\n \t // InternalMappingDsl.g:4118:5: otherlv_6= ',' ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) )\n \t {\n \t otherlv_6=(Token)match(input,25,FOLLOW_87); \n\n \t \t\t\t\t\tnewLeafNode(otherlv_6, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getCommaKeyword_3_3_0());\n \t \t\t\t\t\n \t // InternalMappingDsl.g:4122:5: ( (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType ) )\n \t // InternalMappingDsl.g:4123:6: (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType )\n \t {\n \t // InternalMappingDsl.g:4123:6: (lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType )\n \t // InternalMappingDsl.g:4124:7: lv_basicBuiltinPrimitiveTypes_7_0= rulePrimitiveType\n \t {\n\n \t \t\t\t\t\t\t\tnewCompositeNode(grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getBasicBuiltinPrimitiveTypesPrimitiveTypeParserRuleCall_3_3_1_0());\n \t \t\t\t\t\t\t\n \t pushFollow(FOLLOW_81);\n \t lv_basicBuiltinPrimitiveTypes_7_0=rulePrimitiveType();\n\n \t state._fsp--;\n\n\n \t \t\t\t\t\t\t\tif (current==null) {\n \t \t\t\t\t\t\t\t\tcurrent = createModelElementForParent(grammarAccess.getTechnologySpecificPrimitiveTypeRule());\n \t \t\t\t\t\t\t\t}\n \t \t\t\t\t\t\t\tadd(\n \t \t\t\t\t\t\t\t\tcurrent,\n \t \t\t\t\t\t\t\t\t\"basicBuiltinPrimitiveTypes\",\n \t \t\t\t\t\t\t\t\tlv_basicBuiltinPrimitiveTypes_7_0,\n \t \t\t\t\t\t\t\t\t\"de.fhdo.ddmm.data.DataDsl.PrimitiveType\");\n \t \t\t\t\t\t\t\tafterParserOrEnumRuleCall();\n \t \t\t\t\t\t\t\n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop108;\n }\n } while (true);\n\n // InternalMappingDsl.g:4142:4: ( (lv_default_8_0= 'default' ) )?\n int alt109=2;\n int LA109_0 = input.LA(1);\n\n if ( (LA109_0==51) ) {\n alt109=1;\n }\n switch (alt109) {\n case 1 :\n // InternalMappingDsl.g:4143:5: (lv_default_8_0= 'default' )\n {\n // InternalMappingDsl.g:4143:5: (lv_default_8_0= 'default' )\n // InternalMappingDsl.g:4144:6: lv_default_8_0= 'default'\n {\n lv_default_8_0=(Token)match(input,51,FOLLOW_68); \n\n \t\t\t\t\t\tnewLeafNode(lv_default_8_0, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getDefaultDefaultKeyword_3_4_0());\n \t\t\t\t\t\n\n \t\t\t\t\t\tif (current==null) {\n \t\t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getTechnologySpecificPrimitiveTypeRule());\n \t\t\t\t\t\t}\n \t\t\t\t\t\tsetWithLastConsumed(current, \"default\", true, \"default\");\n \t\t\t\t\t\n\n }\n\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n otherlv_9=(Token)match(input,34,FOLLOW_2); \n\n \t\t\tnewLeafNode(otherlv_9, grammarAccess.getTechnologySpecificPrimitiveTypeAccess().getSemicolonKeyword_4());\n \t\t\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final String getPrimitiveStringValue() {\r\n return (String) (value = value.toString());\r\n }", "@JsonCreator\n public static CreateMode fromString(String name) {\n return fromString(name, CreateMode.class);\n }", "Shape getShape();", "public Mesh(Primitive shape) {\n\t\tswitch (shape) {\n\t\t\tcase CUBE:\n\t\t\t\tgenerateCube();\n\t\t\t\tbreak;\n\t\t\tcase CUBOID:\n\t\t\t\tgenerateCube();\n\t\t\t\tscale(2, 1, 1); // Stretch the cube along the x-axis to give a cuboid\n\t\t\t\tbreak;\n\t\t\tcase TRIANGULAR_PRISM:\n\t\t\t\tgeneratePrism();\n\t\t\t\tbreak;\n\t\t\tcase SPHERE:\n\t\t\t\tgenerateSphere();\n\t\t\t\tbreak;\n\t\t\tcase CONVEX_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size (to allow a better demonstration of how the lens works) and then squash the sphere along the x-axis\n\t\t\t\tbreak;\n\t\t\tcase CONCAVE_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size and squash along the x-axis\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < verts.length; i++) {\n\t\t\t\t\tif (verts[i].getElement(0) < -0.0001) { // Don't move points in the middle of the x-axis\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) + 0.8); // Move points on the left to the right. This part still bulges out to the left, but when it is on the right it is concave\n\t\t\t\t\t} else if (verts[i].getElement(0) > 0.0001) {\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) - 0.8); // Move points on the right to the left.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The faces are 'inside out', so the ordering of the vertices must be reversed in order to make the normals point the correct way\n\t\t\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\t\t\t// Swap the first and last vertices (0 and 2)\n\t\t\t\t\tint temp = faces[i][0];\n\t\t\t\t\tfaces[i][0] = faces[i][2];\n\t\t\t\t\tfaces[i][2] = temp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HALF_CYLINDER:\n\t\t\t\tgenerateHalfCylinder();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\"Mesh constructor cannot take a null primitive\");\n\t\t}\n\t\tnormals = new Vector[faces.length];\n\t\tds = new double[faces.length];\n\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\tnormals[i] = normal(faces[i]); // Calculate the normal for the face\n\t\t\tds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the value of d for the face\n\t\t}\n\t\tcalcBoxVerts(); // Calculate and store the vertices of the AOBB\n\t}", "public PropositionOrPrimitive to() {\n //the value is an element or a link\n\t\tString v = value;\n\t\tif (v.startsWith(\"Element\") || v.startsWith(\"Link\")\n\t\t\t\t|| v.startsWith(\"SerializedViewObject\")) {\n\t\t\tTelosParserKB kb = this.telosKB;\n\t\t\tTelosParserIndividual ind = (TelosParserIndividual) kb.individual(v);\n\t\t\treturn ind;\n\t\t}\n\t\t//the value is one of the individual in the KB\n\t\tTelosParserKB kb = this.telosKB;\n\t\tTelosParserIndividual ind = (TelosParserIndividual) kb.individual(v);\n\t\tif(ind!=null){\n\t\t\treturn ind;\n\t\t}\n\t\t//the value is a primitive\n\t\tint size = v.length();\n\t\ttry {\n\t\t\tInteger.parseInt(v);\n\t\t} catch (NumberFormatException nfe) {\n\t\t\ttry {\n\t\t\t\tDouble.parseDouble(v);\n\t\t\t} catch (NumberFormatException nfe2) {\n\t\t\t\t//the value is a string\n\t\t\t\tif (size > 1 && (v.substring(0, 1)).equals(\"\\\"\"))\n\t\t\t\t\treturn (new TelosString(v.substring(1, size-1)));\n\t\t\t\telse\n\t\t\t\t\treturn (new TelosString(v.substring(0, size)));\t\t\n\t\t\t}\n\t\t\treturn (new TelosReal(v));\n\t\t}\n\t\treturn (new TelosInteger(v));\n\t}", "public static FuseIOOperation fromString(String text) {\n for (FuseIOOperation type : FuseIOOperation.values()) {\n if (type.toString().equalsIgnoreCase(text)) {\n return type;\n }\n }\n throw new IllegalArgumentException(\"No constant with text \" + text + \" found\");\n }", "public static ShapeId fromParts(String namespace, String name) {\n return fromParts(namespace, name, null);\n }", "LocalSimpleType getSimpleType();", "public final PrimitiveType findPrimitiveType(int index)\n {\n return (PrimitiveType)(primitiveTypes.elementAt(-index - 1));\n }", "public Type type(String name);", "private static void loadJson(JsonPrimitive primitive, ConfigImpl config, String key) {\n String value = null;\n if (primitive.isBoolean()) {\n boolean bool = primitive.getAsBoolean();\n value = bool ? \"true\" : \"false\";\n } else if (primitive.isString()) {\n value = primitive.getAsString();\n } else if (primitive.isNumber()) {\n value = Double.toString(primitive.getAsDouble());\n }\n config.set(key, value);\n }", "private static ClosedShape createShape(String[] input) {\r\n String shapeName = input[0];\r\n\r\n switch (shapeName) {\r\n case \"oval\":\r\n return createOval(input);\r\n case \"circle\":\r\n return createCircle(input);\r\n case \"square\":\r\n return createSquare(input);\r\n case \"rect\":\r\n return createRect(input);\r\n case \"hexagon\":\r\n return createHexagon(input);\r\n default:\r\n throw new IllegalArgumentException();\r\n }\r\n }", "@JsonCreator\n public static DiskMode fromString(String name) {\n return fromString(name, DiskMode.class);\n }", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "@Test\r\n public void testWrapperToPrimitive() {\n final Class<?>[] primitives = {\r\n Boolean.TYPE, Byte.TYPE, Character.TYPE, Short.TYPE,\r\n Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE\r\n };\r\n for (Class<?> primitive : primitives) {\r\n Class<?> wrapperCls = Classes.primitiveToWrapper(primitive);\r\n assertFalse(\"Still primitive\", wrapperCls.isPrimitive());\r\n assertEquals(wrapperCls + \" -> \" + primitive, primitive,\r\n Classes.wrapperToPrimitive(wrapperCls));\r\n }\r\n }", "public DataPrimitive(String value) {\n\t\tsuper();\n\t\tif (value == null) {\n\t\t\tthis.value = \"\"; \n\t\t} else {\n\t\t\tthis.value = value;\n\t\t}\n\t}", "public final String[] getPrimitiveTypeNames()\n {\n String[] names = null;\n \n if (primitiveTypes.size() > 0)\n {\n int index = 0;\n names = new String[primitiveTypes.size()];\n Iterator i = primitiveTypes.iterator();\n while (i.hasNext())\n names[index++] = ((PrimitiveType)(i.next())).getName();\n }\n return names;\n }", "public static ObjectInstance getBasicTypesObjectInstance()\n {\n ObjectName o = null;\n try\n {\n Hashtable<String, String> properties = new Hashtable<String, String>(\n 1);\n properties.put(\"isBoolean\", Boolean.toString((getBasicTypesMBean()\n .getIsBoolean())));\n properties.put(\"byte\", Byte\n .toString(getBasicTypesMBean().getByte()));\n properties.put(\"charLetter\", String.valueOf(getBasicTypesMBean()\n .getCharLetter()));\n properties.put(\"doubleNumber\", Double\n .toString((getBasicTypesMBean().getDoubleNumber())));\n properties.put(\"floatNumber\", Float.toString((getBasicTypesMBean()\n .getFloatNumber())));\n properties.put(\"intNumber\", Integer.toString(getBasicTypesMBean()\n .getIntNumber()));\n properties.put(\"longNumber\", Long.toString(getBasicTypesMBean()\n .getLongNumber()));\n properties.put(\"shortNumber\", Short.toString(getBasicTypesMBean()\n .getShortNumber()));\n properties.put(\"theLabel\", getBasicTypesMBean().getTheLabel());\n o = new ObjectName(_domain, properties);\n }\n catch (Exception e)\n {\n Assert\n .fail(\"Creation of 'BasicTypes' ObjectInstance could not be created. \"\n + e.getMessage());\n }\n return new ObjectInstance(o, new BasicTypes().getClass().getName());\n }", "public long getPrimitiveId() {\r\n return id;\r\n }", "String objectRead();", "@Override\n public PrimitiveSegment createFromParcel(Parcel in) {\n in.readInt();\n return new PrimitiveSegment(in);\n }", "public void testAssertPropertyReflectionEquals_equalsPrimitive() {\r\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\r\n }", "public Shape getShape();", "private JavaType(C_PTR primitivePointerType) {\n this.primitivePointerType = primitivePointerType;\n }", "public static ShapeId from(String absoluteShapeId) {\n int namespacePosition = absoluteShapeId.indexOf('#');\n if (namespacePosition <= 0 || namespacePosition == absoluteShapeId.length() - 1) {\n throw new ShapeIdSyntaxException(\"Invalid shape ID: \" + absoluteShapeId);\n }\n\n String namespace = absoluteShapeId.substring(0, namespacePosition);\n String name;\n String memberName = null;\n\n int memberPosition = absoluteShapeId.indexOf('$');\n if (memberPosition == -1) {\n name = absoluteShapeId.substring(namespacePosition + 1);\n } else if (memberPosition < namespacePosition) {\n throw new ShapeIdSyntaxException(\"Invalid shape ID: \" + absoluteShapeId);\n } else {\n name = absoluteShapeId.substring(namespacePosition + 1, memberPosition);\n memberName = absoluteShapeId.substring(memberPosition + 1);\n }\n\n return fromParts(namespace, name, memberName);\n }", "@JsonCreator\n public static OutputType fromString(String name) {\n return fromString(name, OutputType.class);\n }", "String getShapeLabel();" ]
[ "0.7309327", "0.6738547", "0.6406399", "0.6151789", "0.6004581", "0.60038245", "0.5883975", "0.5782555", "0.5731998", "0.56511766", "0.5620622", "0.56187564", "0.5593262", "0.5592575", "0.5590723", "0.55815554", "0.55763036", "0.5572789", "0.55350024", "0.5474297", "0.5465188", "0.54626477", "0.5439419", "0.54147077", "0.5412361", "0.53976536", "0.5353835", "0.5346158", "0.5268383", "0.5223725", "0.5176198", "0.517506", "0.51466036", "0.51271284", "0.51080817", "0.5098186", "0.5091015", "0.5076134", "0.5075519", "0.5070912", "0.5057936", "0.5035201", "0.5017004", "0.5016952", "0.50091136", "0.50061303", "0.49844745", "0.49801806", "0.49778348", "0.49778348", "0.49752843", "0.49489114", "0.4924895", "0.49167684", "0.49042538", "0.4898644", "0.4893504", "0.48375446", "0.4828768", "0.48200107", "0.48081145", "0.48076105", "0.48046502", "0.4799686", "0.47990033", "0.47949585", "0.47941282", "0.47896877", "0.47818276", "0.47778428", "0.4768594", "0.47676423", "0.4763231", "0.47516182", "0.47293243", "0.47130874", "0.47006357", "0.46921977", "0.468946", "0.4688986", "0.4687596", "0.4673243", "0.46682066", "0.46619633", "0.46575448", "0.46518612", "0.46384114", "0.4619746", "0.46108893", "0.46087822", "0.4598185", "0.45941094", "0.4589533", "0.4587618", "0.45815188", "0.45803073", "0.4578406", "0.4573761", "0.45728266", "0.4564881" ]
0.76681507
0
Creates the vertices and faces that define a cube of side length 2 units
private void generateCube() { verts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)}; verts[0].setElement(0, -1); verts[0].setElement(1, -1); verts[0].setElement(2, -1); verts[1].setElement(0, 1); verts[1].setElement(1, -1); verts[1].setElement(2, -1); verts[2].setElement(0, -1); verts[2].setElement(1, -1); verts[2].setElement(2, 1); verts[3].setElement(0, 1); verts[3].setElement(1, -1); verts[3].setElement(2, 1); verts[4].setElement(0, -1); verts[4].setElement(1, 1); verts[4].setElement(2, -1); verts[5].setElement(0, 1); verts[5].setElement(1, 1); verts[5].setElement(2, -1); verts[6].setElement(0, -1); verts[6].setElement(1, 1); verts[6].setElement(2, 1); verts[7].setElement(0, 1); verts[7].setElement(1, 1); verts[7].setElement(2, 1); faces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CubeGL2(double width, double height, double depth) {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n\n for (int i = 0; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) width;\n }\n for (int i = 1; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) height;\n }\n for (int i = 2; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) depth;\n }\n\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public CubeGL2() {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public SoCubeWithoutTop()\n//\n////////////////////////////////////////////////////////////////////////\n{\n nodeHeader.SO_NODE_CONSTRUCTOR();\n\n nodeHeader.SO_NODE_ADD_SFIELD(width,\"width\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(height,\"height\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(depth,\"depth\", (2.0f));\n\n isBuiltIn = true;\n\n if (nodeHeader.SO_NODE_IS_FIRST_INSTANCE()) {\n // Initialize corner coordinate values\n coords[0].setValue(-1.0f, 1.0f, -1.0f); // Left Top Back\n coords[1].setValue( 1.0f, 1.0f, -1.0f); // Right Top Back\n coords[2].setValue(-1.0f, -1.0f, -1.0f); // Left Bottom Back\n coords[3].setValue( 1.0f, -1.0f, -1.0f); // Right Bottom Back\n coords[4].setValue(-1.0f, 1.0f, 1.0f); // Left Top Front\n coords[5].setValue( 1.0f, 1.0f, 1.0f); // Right Top Front\n coords[6].setValue(-1.0f, -1.0f, 1.0f); // Left Bottom Front\n coords[7].setValue( 1.0f, -1.0f, 1.0f); // Right Bottom Front\n\n // Initialize face vertices to point into coords. The order of\n // vertices around the faces is chosen so that the texture\n // coordinates match up: texture coord (0,0) is at the first\n // vertex and (1,1) is at the third. The vertices obey the\n // right-hand rule for each face.\n verts[1][2] = verts[2][3] = verts[4][3] = coords[0];\n verts[1][3] = verts[3][2] = verts[4][2] = coords[1];\n verts[1][1] = verts[2][0] = verts[5][0] = coords[2];\n verts[1][0] = verts[3][1] = verts[5][1] = coords[3];\n verts[0][3] = verts[2][2] = verts[4][0] = coords[4];\n verts[0][2] = verts[3][3] = verts[4][1] = coords[5];\n verts[0][0] = verts[2][1] = verts[5][3] = coords[6];\n verts[0][1] = verts[3][0] = verts[5][2] = coords[7];\n\n // Initialize texture coordinates. These are for the 4 corners of\n // each face, starting at the lower left corner\n texCoords[0].setValue(0.0f, 0.0f);\n texCoords[1].setValue(1.0f, 0.0f);\n texCoords[2].setValue(1.0f, 1.0f);\n texCoords[3].setValue(0.0f, 1.0f);\n\n // Initialize face normals\n normals[0].setValue( 0.0f, 0.0f, 1.0f); // Front\n normals[1].setValue( 0.0f, 0.0f, -1.0f); // Back\n normals[2].setValue(-1.0f, 0.0f, 0.0f); // Left\n normals[3].setValue( 1.0f, 0.0f, 0.0f); // Right\n normals[4].setValue( 0.0f, 1.0f, 0.0f); // Top\n normals[5].setValue( 0.0f, -1.0f, 0.0f); // Bottom\n\n }\n}", "public Cube(String shapeName, double sideLength){\n super(shapeName, sideLength, sideLength, sideLength);\n }", "public Cube(double sideLength) {\n super.setName(\"Cube\");\n if (sideLength > 0) {\n this.sideLength = sideLength;\n } else {\n throw new IllegalArgumentException(\n \"The side length should be greater than 0.\");\n }\n }", "public RubiksCube(){\n\t\tString[] c = {\n\t\t\t\t\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\"W\",\n\t\t\t\t\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\"R\",\n\t\t\t\t\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\"B\",\n\t\t\t\t\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\"G\",\n\t\t\t\t\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\"O\",\n\t\t\t\t\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\"Y\",\n\t\t};\n\t\tthis.cube = c;\n\t}", "public Cube() {\n\t\t// a float is 4 bytes, therefore we multiply the number if\n\t\t// vertices with 4.\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tvbb.order(ByteOrder.nativeOrder());\n\t\tvertexBuffer = vbb.asFloatBuffer();\n\t\tvertexBuffer.put(vertices);\n\t\tvertexBuffer.position(0);\n\t\t\n\t\t// Setup texture-coords-array buffer, in float. An float has 4 bytes (NEW)\n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t texBuffer.put(texCoords);\n\t texBuffer.position(0);\n\t\t\n\t\t// short is 2 bytes, therefore we multiply the number if\n\t\t// vertices with 2.\n//\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\n//\t\tibb.order(ByteOrder.nativeOrder());\n//\t\tindexBuffer = ibb.asShortBuffer();\n//\t\tindexBuffer.put(indices);\n//\t\tindexBuffer.position(0);\n\t}", "public void createMesh(GL2 gl){\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(y + pos[1]*chunkHeight <= ChunkManager.map2D(x + pos[0]*chunkSize, z + pos[2]*chunkSize)){\r\n\t\t\t\t\t\tblocks[x][y][z] = (byte) (2.7*(y+pos[1]*chunkHeight)/13+1); // Initialize each block\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tblocks[x][y][z] = 0;\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\tvertexCount = 0;\r\n\t\t// Allocate the buffers (Change to one buffer, or use short/byte buffer for normals and color)\r\n\t\tvertexData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tnormalData = Buffers.newDirectFloatBuffer(chunkSize*chunkHeight*chunkSize*18*3);\r\n\t\tcolorsData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(BlockType.isActive(blocks[x][y][z])){\r\n\t\t\t\t\t\tcreateCube(x, y, z); // If the cube is active, add it to the Buffer\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// correct the buffer size, and rewind\r\n\t\tnormalData.flip();\r\n\t\tvertexData.flip();\r\n\t\tcolorsData.flip();\r\n\t\tgl.glGenBuffers(3, buffer, 0); // allocate the buffers and get IDs\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[0]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, vertexData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[1]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, normalData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[2]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, colorsData, GL.GL_DYNAMIC_DRAW);\r\n\t\t// set buffer as null now that it's done being used, hope it will be garbage collected\r\n\t\tvertexData = null;\r\n\t\tnormalData = null;\r\n\t\tcolorsData = null;\t\t\r\n\t}", "public static DeformableMesh3D createRectangleMesh(double width, double height, double depth, double segment_size){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n //For the complete length there will be n+1 nodes\n int nx = (int)(width/segment_size + 0.5) + 1;\n int ny = (int)(height/segment_size+0.5) + 1;\n int nz = (int)(depth/segment_size+0.5) + 1;\n double actual_w = (nx-1)*segment_size;\n double actual_h = (ny-1)*segment_size;\n double actual_z = (nz-1)*segment_size;\n\n int dex;\n\n //top face x-y @ actual_z/2\n int top_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n dex = top_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex-1\n });\n }\n }\n }\n\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n actual_z/2\n });\n //first\n int a_dex = top_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = top_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = top_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = top_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, a_dex, b_dex});\n triangles.add(new int[]{dex, b_dex, c_dex});\n triangles.add(new int[]{dex, c_dex, d_dex});\n triangles.add(new int[]{dex, d_dex, a_dex});\n\n }\n }\n\n\n //bottom face x-y @ -actual_z/2\n int bottom_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n\n dex = bottom_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n -actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n //bottom face\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n -actual_z/2\n });\n //first\n int a_dex = bottom_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = bottom_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = bottom_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = bottom_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n\n //left face y-z @ -actual_x/2\n int left_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = left_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n -actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n\n //left face connections\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i,\n left_starting_dex + i*(nz-2)\n });\n\n }\n\n //left face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = left_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = left_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = left_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = left_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //left face merging triangles\n for(int i = 1; i<ny; i++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i-1;\n int b_dex = bottom_starting_dex + i;\n int c_dex = left_starting_dex + i*(nz-2);\n int d_dex = left_starting_dex + (i-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i;\n b_dex = top_starting_dex + i-1;\n c_dex = left_starting_dex + (i-1)*(nz-2) + (nz-3);\n d_dex = left_starting_dex + (i)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //right face y-z @ actual_x/2\n int right_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = right_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2)\n });\n\n }\n\n //right face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = right_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = right_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = right_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = right_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //right face merging triangles\n for(int i = 1; i<ny; i++){\n /*\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n */\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i + ny*(nx-1);\n int b_dex = bottom_starting_dex + i-1 + ny*(nx-1);\n int c_dex = right_starting_dex + (i-1)*(nz-2);\n int d_dex = right_starting_dex + (i)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i-1 + ny*(nx-1);\n b_dex = top_starting_dex + i + ny*(nx-1);\n c_dex = right_starting_dex + (i)*(nz-2) + (nz-3);\n d_dex = right_starting_dex + (i-1)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n\n //front face x-z @ -actual_y/2\n int front_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n -actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny\n });\n\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny\n });\n\n }\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n front_starting_dex + (j-1),\n left_starting_dex + j - 1\n });\n\n connections.add(new int[]{\n front_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1\n });\n }\n\n //front face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = front_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = front_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = front_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //front face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (i-2)*(nz - 2);\n int b_dex = front_starting_dex + (i-1)*(nz - 2);\n int c_dex = bottom_starting_dex + i*ny;\n int d_dex = bottom_starting_dex + (i-1)*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = front_starting_dex + (i-1)*(nz - 2) + (nz-3);\n b_dex = front_starting_dex + (i-2)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i-1)*ny;\n d_dex = top_starting_dex + i*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //front face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (j-1);\n int b_dex = front_starting_dex + (j-2);\n int c_dex = left_starting_dex + j - 2;\n int d_dex = left_starting_dex + j - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = front_starting_dex + (j-2) + (nz-2)*(nx-3);\n b_dex = front_starting_dex + (j-1) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 1;\n d_dex = right_starting_dex + j - 2;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //front triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = front_starting_dex;\n b_dex = bottom_starting_dex + ny;\n c_dex = bottom_starting_dex;\n d_dex = left_starting_dex;\n } else{\n a_dex = front_starting_dex + nz-3;\n b_dex = left_starting_dex + nz-3;\n c_dex = top_starting_dex;\n d_dex = top_starting_dex + ny;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = front_starting_dex + (nx-3)*(nz - 2);\n b_dex = right_starting_dex;\n c_dex = bottom_starting_dex + (nx-1)*(ny);\n d_dex = bottom_starting_dex + (nx-2)*(ny);\n } else{\n a_dex = front_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = top_starting_dex + (nx-2)*(ny);\n c_dex = top_starting_dex + (nx-1)*(ny);\n d_dex = right_starting_dex + nz-3;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n\n //back plane\n int back_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny + ny-1\n });\n\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny + ny-1\n });\n\n }\n\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n back_starting_dex + (j-1),\n left_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n\n connections.add(new int[]{\n back_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n }\n\n //back face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = back_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = back_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = back_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //back face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (i-1)*(nz - 2);\n int b_dex = back_starting_dex + (i-2)*(nz - 2);\n int c_dex = bottom_starting_dex + (i-1)*ny + ny - 1;\n int d_dex = bottom_starting_dex + (i)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = back_starting_dex + (i-2)*(nz - 2) + (nz-3);\n b_dex = back_starting_dex + (i-1)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i)*ny + ny - 1;\n d_dex = top_starting_dex + (i-1)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //back face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (j-2);\n int b_dex = back_starting_dex + (j-1);\n int c_dex = left_starting_dex + j - 1 + (ny-1)*(nz-2);\n int d_dex = left_starting_dex + j - 2 + (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = back_starting_dex + (j-1) + (nz-2)*(nx-3);\n b_dex = back_starting_dex + (j-2) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 2+ (ny-1)*(nz-2);\n d_dex = right_starting_dex + j - 1+ (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //back triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = back_starting_dex;\n b_dex = left_starting_dex + (ny-1)*(nz-2);\n c_dex = bottom_starting_dex + ny -1;\n d_dex = bottom_starting_dex + 2*ny - 1;\n } else{\n a_dex = back_starting_dex + nz-3;\n b_dex = top_starting_dex + 2*ny - 1;\n c_dex = top_starting_dex + ny - 1;\n d_dex = left_starting_dex + (ny)*(nz-2) - 1 ;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = back_starting_dex + (nx-3)*(nz - 2);\n b_dex = bottom_starting_dex + (nx-1)*(ny) - 1;\n c_dex = bottom_starting_dex + (nx)*(ny) - 1;\n d_dex = right_starting_dex + (nz-2)*(ny-1);\n } else{\n a_dex = back_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = right_starting_dex + (nz-2)*(ny-1) + nz - 3;\n c_dex = top_starting_dex + (nx)*(ny) -1;\n d_dex = top_starting_dex + (nx-1)*(ny) -1;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n final DeformableMesh3D mesh = new DeformableMesh3D(pts, connections, triangles);\n\n return mesh;\n }", "@Override\r\n\t\tpublic int cube() {\n\t\t\treturn width*width*width;\r\n\t\t}", "private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }", "public static float[] createCube (float x, float y, float z) {\r\n int offset = CUBE_LENGTH/2;\r\n return new float[] {\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z,\r\n x + offset, y - offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y + offset, z,\r\n x + offset, y + offset, z,\r\n x - offset, y + offset, z - CUBE_LENGTH,\r\n x - offset, y + offset, z,\r\n x - offset, y - offset, z,\r\n x - offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y + offset, z,\r\n x + offset, y + offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z - CUBE_LENGTH,\r\n x + offset, y - offset, z\r\n };\r\n }", "Cube(int l, int b, int h)\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=l;\r\n\t\tbredth=b;\r\n\t\theight=h;\r\n\t}", "public RubiksCube(int size) {\n this.size = size;\n faces = new Face[FACES_AMOUNT];\n for (int i = 0; i < FACES_AMOUNT; i++)\n faces[i] = new Face(size, i);\n }", "public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }", "Cube()\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=10;\r\n\t\tbredth=20;\r\n\t\theight=30;\r\n\t}", "static void createCubes(double width, double height) {\n \t\r\n \tmaxY=f(startingBound);\r\n \tmaxX=startingBound;\r\n \t\r\n \t//need a function to find the max\r\n \tfor(double i=startingBound; i<=endingBound; i=i+dx) {\r\n \t\tif(f(i)>maxY)\r\n \t\t\tmaxY=f(i);\r\n \t\t\r\n \t\tif(i>maxX)\r\n \t\t\tmaxX=i;\r\n \t}\r\n \tdouble size=height/2-100;\r\n \tSystem.out.println(size);\r\n \tscaleY=maxY/(size);\r\n \tscaleX=(width-100)/maxX;\r\n \t\r\n \tfor(double x=startingBound; x<=endingBound; x=x+dx) {\r\n \t\t//System.out.println(x+\", \"+f(x));\r\n \t\tcubes.add(new Cube(x*scaleX, -f(x)/scaleY, 0, f(x)/scaleY, dx*scaleX));\r\n \t\t//cubes.add(new Cube(x, 100, 0, 100, 100));\r\n \t}\r\n \t\r\n \t\r\n }", "public Cube222 () {\n\t\tstate_ = new Cubie[8];\n\t\tstate_[0] = new Cubie('O','W','G',0); // front, clockwise\n\t\tstate_[1] = new Cubie('O','W','B',1);\n\t\tstate_[2] = new Cubie('R','W','B',2);\n\t\tstate_[3] = new Cubie('R','W','G',3);\n\t\tstate_[4] = new Cubie('O','Y','G',4); // back, behind front\n\t\tstate_[5] = new Cubie('O','Y','B',5);\n\t\tstate_[6] = new Cubie('R','Y','B',6);\n\t\tstate_[7] = new Cubie('R','Y','G',7);\n\t}", "public void createNewCube() {\n CUBE = new Cube();\n }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "public Cube(double edge)\n {\n this.edge = edge;\n this.volume = Math.pow(edge,3);\n }", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public void makeTriangleBox(int offsetX, int offsetY, int myWidth, int myHeight, int numTriHorizontal, int numTriVertical, int collRect, float[][] verts) {\n //Top Triangles\n for (int i = 0; i < numTriHorizontal; i++) {\n verts[i][0] = (i*myWidth/numTriHorizontal) + offsetX;\n verts[i][1] = offsetY;\n verts[i][2] = ((i+1)*(myWidth/numTriHorizontal)) + offsetX;\n verts[i][3] = offsetY;\n verts[i][4] = (myWidth/(2*numTriHorizontal)) + (i*myWidth/numTriHorizontal) + offsetX;\n if(i%2==0) {\n verts[i][5] = (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY;\n } else {\n verts[i][5] = (float)((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY;\n }\n\n }\n\n //Left Triangles\n\n for (int i = numTriHorizontal; i < (numTriVertical + numTriHorizontal); i++) {\n verts[i][0] = offsetX;\n verts[i][1] = offsetY + ((i-numTriHorizontal) * (myWidth/numTriHorizontal));\n verts[i][2] = offsetX;\n verts[i][3] = offsetY + ((i-(numTriHorizontal-1)) * (myWidth/numTriHorizontal));\n if(i%2==0) {\n verts[i][4] = offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal));\n } else {\n verts[i][4] = offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal));\n }\n verts[i][5] = offsetY + ((i-numTriHorizontal) * (myWidth/numTriHorizontal)) + myWidth/(2*numTriHorizontal);\n\n }\n\n\n //Right Triangles\n for(int i=numTriVertical+numTriHorizontal; i<(2*numTriVertical)+numTriHorizontal; i++) {\n verts[i][0] = width-offsetX;\n verts[i][1] = offsetY + ((i-(numTriVertical+numTriHorizontal)) * (myWidth/numTriHorizontal));\n verts[i][2] = width-offsetX;\n verts[i][3] = offsetY + ((i-(numTriVertical+(numTriHorizontal-1))) * (myWidth/numTriHorizontal));\n if(i%2==0) {\n verts[i][4] = width-(offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)));\n } else {\n verts[i][4] = width-(offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)));\n }\n verts[i][5] = offsetY + ((i-(numTriVertical+numTriHorizontal)) * (myWidth/numTriHorizontal)) + myWidth/(2*numTriHorizontal);\n\n }\n\n //Bottom Triangles\n for(int i=(2*numTriVertical)+numTriHorizontal; i<(2*numTriVertical)+(2*numTriHorizontal); i++) {\n verts[i][0] = ((i-((2*numTriVertical)+numTriHorizontal))*myWidth/numTriHorizontal) + offsetX;\n verts[i][1] = (height-100) - offsetY;\n verts[i][2] = ((i-((2*numTriVertical)+numTriHorizontal) +1)*(myWidth/numTriHorizontal)) + offsetX;\n verts[i][3] = (height-100) - offsetY;\n verts[i][4] = (myWidth/(2*numTriHorizontal)) + ((i-((2*numTriVertical)+numTriHorizontal))*myWidth/numTriHorizontal) + offsetX;\n if(i%2==0) {\n verts[i][5] = (float)((height-100) - ( ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY));\n } else {\n verts[i][5] = (float)((height-100) - ( ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY));\n }\n\n }\n\n }", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "private void makeCubes(int number) {\n for (int i = 0; i < number; i++) {\n // randomize 3D coordinates\n Vector3f loc = new Vector3f(\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20),\n FastMath.nextRandomInt(-20, 20));\n rootNode.attachChild(\n myBox(\"Cube\" + i, loc, ColorRGBA.randomColor()));\n }\n }", "private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}", "public Cube(Square square)\n {\n this.edge = square.getSide();\n this.volume = Math.pow(this.edge,3);\n }", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "RubiksCubeModel(\n List<Colour> frontColours,\n List<Colour> leftColours,\n List<Colour> backColours,\n List<Colour> rightColours,\n List<Colour> topColours,\n List<Colour> bottomColours) {\n }", "protected void buildScene() {\n Geometry cube1 = buildCube(ColorRGBA.Red);\n cube1.setLocalTranslation(-1f, 0f, 0f);\n Geometry cube2 = buildCube(ColorRGBA.Green);\n cube2.setLocalTranslation(0f, 0f, 0f);\n Geometry cube3 = buildCube(ColorRGBA.Blue);\n cube3.setLocalTranslation(1f, 0f, 0f);\n\n Geometry cube4 = buildCube(ColorRGBA.randomColor());\n cube4.setLocalTranslation(-0.5f, 1f, 0f);\n Geometry cube5 = buildCube(ColorRGBA.randomColor());\n cube5.setLocalTranslation(0.5f, 1f, 0f);\n\n rootNode.attachChild(cube1);\n rootNode.attachChild(cube2);\n rootNode.attachChild(cube3);\n rootNode.attachChild(cube4);\n rootNode.attachChild(cube5);\n }", "public void drawCube() {\r\n GLES20.glUseProgram(program);\r\n\r\n GLES20.glUniform3fv(lightPosParam, 1, lightPosInEyeSpace, 0);\r\n\r\n // Set the Model in the shader, used to calculate lighting\r\n GLES20.glUniformMatrix4fv(modelParam, 1, false, model, 0);\r\n\r\n // Set the ModelView in the shader, used to calculate lighting\r\n GLES20.glUniformMatrix4fv(modelViewParam, 1, false, modelView, 0);\r\n\r\n // Set the position of the cube\r\n GLES20.glVertexAttribPointer(positionParam, COORDS_PER_VERTEX, GLES20.GL_FLOAT, false, 0, vertices);\r\n\r\n // Set the ModelViewProjection matrix in the shader.\r\n GLES20.glUniformMatrix4fv(modelViewProjectionParam, 1, false, modelViewProjection, 0);\r\n\r\n // Set the normal positions of the cube, again for shading\r\n GLES20.glVertexAttribPointer(normalParam, 3, GLES20.GL_FLOAT, false, 0, normals);\r\n GLES20.glVertexAttribPointer(colorParam, 4, GLES20.GL_FLOAT, false, 0, isLookingAtObject(this) ? cubeFoundColors : colors);\r\n\r\n GLES20.glDrawArrays(GLES20.GL_TRIANGLES, 0, 36);\r\n checkGLError(\"Drawing cube\");\r\n }", "private float[] createCubeVertexCol(float[] cubeColorArray) {\r\n float[] cubeColors = new float[cubeColorArray.length * 24];\r\n if (cubeColorArray[0] == 0) {\r\n for (int i = 0; i < cubeColors.length; i++) {\r\n cubeColors[i] = 1;\r\n }\r\n for (int i = 0; i < 12; i += 3) {\r\n cubeColors[i] = 0.8f;\r\n cubeColors[i + 1] = 1;\r\n cubeColors[i + 2] = 0.5f;\r\n }\r\n return cubeColors;\r\n }\r\n for (int i = 0; i < cubeColors.length; i++) {\r\n cubeColors[i] = cubeColorArray[i % cubeColorArray.length];\r\n }\r\n return cubeColors;\r\n }", "public void printCube(String title) {\n System.out.print(\"\\n\");\n System.out.println(\"[ \" + title + \" ]\");\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,1)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,2)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.UP).getSquare(3,3)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,1)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,2)));\n System.out.println(singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.LEFT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.FRONT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.RIGHT).getSquare(3,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.BACK).getSquare(3,3)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,1)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,1)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,2)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,2)));\n System.out.println(\" \" + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(1,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(2,3)) + singleChar(getRubiksFace(RubiksFace.RubiksFacePosition.DOWN).getSquare(3,3)));\n }", "public CubeState(){\n ep = new PermutationGroup(12);\n cp = new PermutationGroup(8);\n eo = new EdgeOrientation();\n co = new CubieOrientation();\n }", "private void createWVertices() {\n\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\tvertices.add(new Vertex('w', this.countWID++));\n\t\t}\n\t}", "public void setup(){\n\t\t gl.glEnable(GL.GL_BLEND);\n\t\t gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);\n\t\t for (int i = 0; i< cubes.length; i++){\n\t\t cubes[i] = this.s.new Cube(\n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\tMath.round(p.random(-100, 100)), \n\t\t \t\t5,//Math.round(random(-100, 100)),\n\t\t \t\tMath.round(p.random(-10, 10)), \n\t\t \t\t\tMath.round(p.random(-10, 10)), \n\t\t\t\t\tMath.round( p.random(-10, 10))\n\t\t );\n\t\t cubRotation[i]=new Vector3D();\n\t\t cubRotationFactor[i]=new Vector3D();\n\t\t cubRotationFactor[i].x = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].y = (float)Math.random()/2f;\n\t\t cubRotationFactor[i].z = (float)Math.random()/2f;\n\t\t \n\t\t cubColor[i]=new Vector3D();\n\t\t cubColor[i].x = (float)Math.random();\n\t\t cubColor[i].y = (float)Math.random();\n\t\t cubColor[i].z = (float)Math.random();\n\t\t }\n\t\t \n\t\t try {\n\t\t\togl.makeProgram(\n\t\t\t\t\t\t\"glass\",\n\t\t\t\t\t\tnew String[] {},\n\t\t\t\t\t\tnew String[] {\"SpecularColor1\",\"SpecularColor2\",\"SpecularFactor1\",\"SpecularFactor2\",\"LightPosition\"}, //\"GlassColor\",\n\t\t\t\t\t\togl.loadGLSLShaderVObject(\t\"resources/robmunro/perform/ol5/glass_c.vert\" ), \n\t\t\t\t\t\togl.loadGLSLShaderFObject(\t\"resources/robmunro/perform/ol5/glass_c.frag\"\t)\n\t\t\t\t);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}", "static public void init() {\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=MeshFrame.HEIGHT; i>=HeightScale;i-=HeightScale){\r\n\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\r\n\t\t\tfor (int j = 0; j <= MeshFrame.WIDTH; j+=WidthScale) {\r\n\t\t\t\tGL11.glVertex3f(j, i, 0);\r\n\t\t\t\tGL11.glVertex3f(j, i-HeightScale, 0);\r\n\t\t\t}\r\n\t\t\tGL11.glEnd();\r\n\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "private void createLayers() {\n mAktieCubeLayers[kUp] = new AktieCubeLayer(AktieCubeLayer.kAxisY);\n mAktieCubeLayers[kDown] = new AktieCubeLayer(AktieCubeLayer.kAxisY);\n mAktieCubeLayers[kLeft] = new AktieCubeLayer(AktieCubeLayer.kAxisX);\n mAktieCubeLayers[kRight] = new AktieCubeLayer(AktieCubeLayer.kAxisX);\n mAktieCubeLayers[kFront] = new AktieCubeLayer(AktieCubeLayer.kAxisZ);\n mAktieCubeLayers[kBack] = new AktieCubeLayer(AktieCubeLayer.kAxisZ);\n mAktieCubeLayers[kMiddle] = new AktieCubeLayer(AktieCubeLayer.kAxisX);\n mAktieCubeLayers[kEquator] = new AktieCubeLayer(AktieCubeLayer.kAxisY);\n mAktieCubeLayers[kSide] = new AktieCubeLayer(AktieCubeLayer.kAxisZ);\n }", "public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Right face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Left face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n // Bottom face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f\n };\n mCubeNormals.put(mCubeNormalData).position(0);\n\n }", "private void generateSphere() {\n\t\tint segments = 14;\n\t\tint rings = 15; // Use an odd number of rings of faces so that halfway up the sphere is the middle of a ring and not a loop of edges\n\t\tverts = new Vector[segments * (rings - 1) + 2]; // There are rings + 1 rings of vertices, but the first and last of these are each a single vertex\n\t\tfaces = new int[2 * segments * (rings - 1)][3]; // Apart from the first and last, each ring has segments number of square faces, so 2 * segments triangular faces. The first and last each have segments triangular faces\n\t\tverts[0] = new Vector(3);\n\t\tverts[0].setElement(1, -1); // The lowest point of the sphere\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, 1}; // The last face involves the last vertex in the second ring and loops back to the first vertex in the second ring\n\t\t\t} else {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, i + 2}; // Triangles involving the lowest vertex and two consecutive vertices in the second ring of vertices\n\t\t\t}\n\t\t}\n\t\tdouble pitchIncrement = Math.PI / rings; // The increment in pitch (angle above horizontal) between rings of vertices\n\t\tdouble pitch = pitchIncrement - Math.PI / 2; // The lowest point had a pitch of -pi/2\n\t\tdouble headingIncrement = Math.PI * 2.0 / segments; // The increment in heading between segments\n\t\tdouble heading = -Math.PI;\n\t\tfor (int r = 0; r < rings - 1; r++) { // Last ring is a single point and must be treated separately\n\t\t\tdouble y = Math.sin(pitch); // The y co-ordinate for each vertex in this ring\n\t\t\tdouble modulus = Math.cos(pitch); // The radius of the circle which this ring lies on\n\t\t\tfor (int s = 0; s < segments; s++) {\n\t\t\t\tdouble x = modulus * Math.cos(heading); // x co-ordinate for the next vertex\n\t\t\t\tdouble z = modulus * Math.sin(heading); // z co-ordinate for the next vertex\n\t\t\t\tverts[segments * r + s + 1] = new Vector(3);\n\t\t\t\tverts[segments * r + s + 1].setElements(new double[] {x, y, z});\n\t\t\t\theading += headingIncrement;\n\t\t\t}\n\t\t\t// Make faces between the vertices just added and the next ring of vertices to be added\n\t\t\tif (r != rings - 2) { // The second to last ring doesn't make faces with the next ring up in the same way because the last ring is a single vertex\n\t\t\t\tfor (int i = 0; i < segments; i++) {\n\t\t\t\t\tif (i == segments - 1) { // The last two faces make use of the first vertex in the next ring by looping back to the start\n\t\t\t\t\t\t// Two faces in the same plane\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, segments * r + 1 + segments};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, segments * r + 1 + segments, segments * r + 1};\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Two faces that are in the same plane and appear as a quadrilateral\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, (segments * r + i + 1) + segments + 1};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments + 1, (segments * r + i + 1) + 1};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpitch += pitchIncrement;\n\t\t}\n\t\tverts[verts.length - 1] = new Vector(3);\n\t\tverts[verts.length - 1].setElement(1, 1); // The last and highest vertex\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) { // Last face completes the ring and includes the last vertex of the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1};\n\t\t\t} else { // Faces involving the last vertex and two consecutive vertices in the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1 + i + 1};\n\t\t\t}\n\t\t}\n\t}", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "Triangle(){\n side1 = 1.0;\n side2 = 1.0;\n side3 = 1.0;\n }", "CubeModel() {\n r = 0;\n c = 0;\n s = 4;\n grid = new boolean [4][4];\n the_cube = new boolean[6];\n moves = 0;\n\n }", "public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public BranchGroup cubo2(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.2,.05,.2);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(.5,.6,.5);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n // rotate.mul(objScale);\n TransformGroup objRotate = new TransformGroup(rotate);\n \n //objRotate.addChild(new ColorCube(0.4));\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n \n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\n\t \n\t // Set up the background\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "public void startApp() throws MIDletStateChangeException {\n // Catch exceptions here before they go too far.\n try {\n // Create a new M3G world.\n myWorld = new World();\n\n // In this world, we have a root group which will contain everything else\n // and which is tilted 15 degrees towards the camera.\n Group rootGroup2 = new Group();\n myWorld.addChild(rootGroup2);\n rootGroup2.setOrientation(15.0f, 1.0f, 0.0f, 0.0f);\n\n // Under this, we have a second group which will be the one we rotate\n // to get an all-round view of the game grid.\n rootGroup = new Group();\n rootGroup2.addChild(rootGroup);\n\n // We now create a parallel camera - parallel projection is faster than\n // perspective, and since we are rendering 512 separate objects that's a\n // saving worth having.\n Camera myCamera = new Camera();\n myWorld.addChild(myCamera);\n myWorld.setActiveCamera(myCamera);\n\n myCamera.setParallel(CUBESIZE * 1.5f, 1.0f, -CUBESIZE, CUBESIZE);\n\n // This is geometry data for the shape that represents a single cell - a cube. \n // It consists of 6 triangle strips, one for each face, each of which\n // has 2 triangles (and therefore 4 vertices). We will set the vertex\n // colors so that the colors of the sides are different from each other.\n\n // This data is shared by all the cells in the grid, rather than each having\n // its own copy. This keeps memory overhead down.\n int[][] aaStripLengths = {\n { 4 },\n { 4 },\n { 4 },\n { 4 },\n { 4 },\n { 4 }\n };\n\n // These are the vertex positions\n short[] aPos =\n {\n \n // Front\n -1, -1, 1, // B\n 1, -1, 1, // C\n -1, 1, 1, // A\n 1, 1, 1, // D\n // Bottom\n -1, -1, -1, // F\n 1, -1, -1, // G\n -1, -1, 1, // B\n 1, -1, 1, // C\n // Top\n -1, 1, 1, // A\n 1, 1, 1, // D\n -1, 1, -1, // E\n 1, 1, -1, // H\n // Right\n 1, 1, 1, // D\n 1, -1, 1, // C\n 1, 1, -1, // H\n 1, -1, -1, // G\n // Left\n -1, -1, 1, // B\n -1, 1, 1, // A\n -1, -1, -1, // F\n -1, 1, -1, // E\n // Back\n 1, -1, -1, // G\n -1, -1, -1, // F\n 1, 1, -1, // H\n -1, 1, -1 // E\n };\n\n // These are the colors for the vertices\n byte[] aCol =\n {\n \n // Front\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // Bottom\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, // Top\n 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, \n // Right\n -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, \n // Left\n -1, 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, // Back\n 0, -1, -1, 0, -1, -1, 0, -1, -1, 0, -1, -1,\n };\n\n // Calculate the number of submeshes and vertices directly from the sizes\n // of the arrays. This prevents us getting a mismatch if we decide to change\n // the cells to a different shape later.\n int cSubmeshes = aaStripLengths.length;\n int cVertices = aPos.length / 3;\n\n // We will share a default appearance between all the faces on the cube. Each\n // face is a separate \"submesh\" - it can have a separate appearance if we wish.\n Appearance app = new Appearance();\n\n // We need to specify an appearance and the submesh data for each face.\n Appearance[] appa = new Appearance[cSubmeshes];\n IndexBuffer[] iba = new IndexBuffer[cSubmeshes];\n\n int startIndex = 0;\n\n for (int i = 0; i < cSubmeshes; i++) {\n // We use the same appearance for each.\n appa[i] = app;\n\n // And we create a new triangle strip array for each submesh.\n // The start index for each one just follows on from previous submeshes.\n iba[i] = new TriangleStripArray(startIndex, aaStripLengths[i]);\n\n for (int j = 0; j < aaStripLengths[i].length; j++)\n startIndex += aaStripLengths[i][j];\n }\n\n // Now we create a new vertex buffer that contains all the above information\n VertexBuffer vertexBuffer = new VertexBuffer();\n vertexBuffer.setDefaultColor(0xFFFFFFFF); // white\n\n {\n // Copy the vertex positions into a VertexArray object\n VertexArray vaPos = new VertexArray(cVertices, 3, 2);\n vaPos.set(0, cVertices, aPos);\n vertexBuffer.setPositions(vaPos, 0.40f, null);\n }\n\n {\n // Copy the vertex colors into a VertexArray object\n VertexArray vaCols = new VertexArray(cVertices, 3, 1);\n vaCols.set(0, cVertices, aCol);\n vertexBuffer.setColors(vaCols);\n }\n\n // Create all the cells, in a random state.\n // The X, Y and Z positions of the cells range from -CUBESIZE/2 to +CUBESIZE/2 units.\n // They are all children of the rootGroup object.\n cells = new Mesh[NUMCELLS];\n nextState = new byte[NUMCELLS];\n currentState = new byte[NUMCELLS];\n rand = new Random();\n\n int index = 0;\n\n for (int i = 0; i < CUBESIZE; i++) {\n float x = ((i * 2) - CUBESIZE) * 0.5f;\n\n for (int j = 0; j < CUBESIZE; j++) {\n float y = ((j * 2) - CUBESIZE) * 0.5f;\n\n for (int k = 0; k < CUBESIZE; k++) {\n float z = ((k * 2) - CUBESIZE) * 0.5f;\n\n Mesh m = new Mesh(vertexBuffer, iba, appa);\n m.setTranslation(x, y, z);\n rootGroup.addChild(m);\n\n // This test gives a 1 in 4 chance of being alive at the start\n currentState[index] = (rand.nextInt() > 0x40000000) ? (byte)1 : (byte)0;\n cells[index++] = m;\n }\n }\n }\n\n // Attach to display\n myDisplay.setCurrent(myCanvas);\n\n // Force a repaint so that we get the update loop started.\n myCanvas.repaint();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void mkMesh()\n\t{\n\t\t/* this initialises the the two FloatBuffer objects */\n\t\n\t\tfloat vertices[] = {\n\t\t\t-0.5f, -0.5f, 0.0f,\t\t// V1 - bottom left\n\t\t\t-0.5f, 0.5f, 0.0f,\t\t// V2 - top left\n\t\t\t 0.5f, -0.5f, 0.0f,\t\t// V3 - bottom right\n\t\t\t 0.5f, 0.5f, 0.0f\t\t\t// V4 - top right\n\t\t\t};\n\t\tfloat texture[] = { \t\t\n\t\t\t// Mapping coordinates for the vertices\n\t\t\t0.0f, 1.0f,\t\t// top left\t\t(V2)\n\t\t\t0.0f, 0.0f,\t\t// bottom left\t(V1)\n\t\t\t1.0f, 1.0f,\t\t// top right\t(V4)\n\t\t\t1.0f, 0.0f\t\t// bottom right\t(V3)\n\t\t\t};\n\t\t/* cache the number of floats in the vertices data */\n\t\tvertexCount = vertices.length;\n\t\t\n\t\t// a float has 4 bytes so we allocate for each coordinate 4 bytes\n\t\tByteBuffer byteBuffer = ByteBuffer.allocateDirect(vertices.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\t\n\t\t// allocates the memory from the byte buffer\n\t\tvertexBuffer = byteBuffer.asFloatBuffer();\n\t\t\n\t\t// fill the vertexBuffer with the vertices\n\t\tvertexBuffer.put(vertices);\n\t\t\n\t\t// set the cursor position to the beginning of the buffer\n\t\tvertexBuffer.position(0);\n\t\t\n\t\tbyteBuffer = ByteBuffer.allocateDirect(texture.length * 4);\n\t\tbyteBuffer.order(ByteOrder.nativeOrder());\n\t\ttextureBuffer = byteBuffer.asFloatBuffer();\n\t\ttextureBuffer.put(texture);\n\t\ttextureBuffer.position(0);\n\t}", "public void testCreateMeshFactory() {\r\n SXRContext sxrContext = TestDefaultSXRViewManager.mSXRContext;\r\n assertNotNull(sxrContext.createQuad(11, 22));\r\n }", "private Geometry buildCube(ColorRGBA color) {\n Geometry cube = new Geometry(\"Box\", new Box(0.5f, 0.5f, 0.5f));\n Material mat = new Material(assetManager, \"TestMRT/MatDefs/ExtractRGB.j3md\");\n mat.setColor(\"Albedo\", color);\n cube.setMaterial(mat);\n return cube;\n }", "public static void main(String[] args) {\n Cube cube1 = new Cube(5);\n // call one of methods for class instance\n // cube1.toConsole();\n\n // Create cube instance via AbstractFactory\n IGeometry cube2 = AbstractFactory.create(10, Figure.CUBE);\n System.out.println(cube2.getPerimeter());\n }", "private void calcBoxVerts() {\n\t\tif (verts != null) {\n\t\t\tdouble minX = verts[0].getElement(0);\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = verts[0].getElement(1);\n\t\t\tdouble maxY = minY;\n\t\t\tdouble minZ = verts[0].getElement(2);\n\t\t\tdouble maxZ = minZ;\n\t\t\tfor (int i = 1; i < verts.length; i++) {\n\t\t\t\tif (verts[i].getElement(0) < minX) {\n\t\t\t\t\tminX = verts[i].getElement(0);\n\t\t\t\t} else if (verts[i].getElement(0) > maxX) {\n\t\t\t\t\tmaxX = verts[i].getElement(0);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(1) < minY) {\n\t\t\t\t\tminY = verts[i].getElement(1);\n\t\t\t\t} else if (verts[i].getElement(1) > maxY) {\n\t\t\t\t\tmaxY = verts[i].getElement(1);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(2) < minZ) {\n\t\t\t\t\tminZ = verts[i].getElement(2);\n\t\t\t\t} else if (verts[i].getElement(2) > maxZ) {\n\t\t\t\t\tmaxZ = verts[i].getElement(2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVector[] boxVerts = new Vector[8];\n\t\t\tboxVerts[0] = new Vector(3);\n\t\t\tboxVerts[0].setElements(new double[] {minX, minY, minZ});\n\t\t\tboxVerts[1] = new Vector(3);\n\t\t\tboxVerts[1].setElements(new double[] {maxX, minY, minZ});\n\t\t\tboxVerts[2] = new Vector(3);\n\t\t\tboxVerts[2].setElements(new double[] {minX, minY, maxZ});\n\t\t\tboxVerts[3] = new Vector(3);\n\t\t\tboxVerts[3].setElements(new double[] {maxX, minY, maxZ});\n\t\t\tboxVerts[4] = new Vector(3);\n\t\t\tboxVerts[4].setElements(new double[] {minX, maxY, minZ});\n\t\t\tboxVerts[5] = new Vector(3);\n\t\t\tboxVerts[5].setElements(new double[] {maxX, maxY, minZ});\n\t\t\tboxVerts[6] = new Vector(3);\n\t\t\tboxVerts[6].setElements(new double[] {minX, maxY, maxZ});\n\t\t\tboxVerts[7] = new Vector(3);\n\t\t\tboxVerts[7].setElements(new double[] {maxX, maxY, maxZ});\n\t\t\tthis.boxVerts = boxVerts;\n\t\t} else {\n\t\t\tthis.boxVerts = null;\n\t\t}\n\t}", "public CubieCube inverseCube() {\n\n CubieCube clone = this.clone();\n for (int i = 0; i < edgesValues.length; i++) {\n clone.eo[i] = this.eo[clone.ep[i]];\n }\n for (int i = 0; i < cornerValues.length; i++) {\n char ori = this.co[clone.cp[i]];\n if (ori >= 3)\n clone.co[i] = ori;\n else {\n clone.co[i] = (char) -ori;\n if (clone.co[i] < 0)\n clone.co[i] += 3;\n }\n }\n return clone;\n }", "private void generateHalfCylinder() {\n\t\tint segments = 32;\n\t\tverts = new Vector[segments * 2];\n\t\tfaces = new int[4 * segments - 4][3];\n\t\tdouble heading = 0;\n\t\tdouble headingIncrement = Math.PI / (segments - 1); // The increment in heading between segments of vertices\n\t\tfor (int s = 0; s < segments; s++) {\n\t\t\tdouble x = Math.cos(heading); // x co-ordinate of points on the segment\n\t\t\tdouble z = Math.sin(heading); // z co-ordinate of points on the segment\n\t\t\tverts[s] = new Vector(3);\n\t\t\tverts[s].setElements(new double[] {x, -1, z}); // Vertex on the bottom semi-circle\n\t\t\tverts[s + segments] = new Vector(3);\n\t\t\tverts[s + segments].setElements(new double[] {x, 1, z}); // Vertex on the top semi-circle\n\t\t\theading += headingIncrement;\n\t\t}\n\t\tfor (int i = 0; i < segments - 1; i++) { // Vertical faces approximating the curved surface\n\t\t\tfaces[i * 2] = new int[] {i, i + segments, i + segments + 1}; // Face involving a point on the bottom semi-circle, the point directly above it (top semi-circle and the same segment) and the point directly above and one segment across\n\t\t\tfaces[i * 2 + 1] = new int[] {i, i + segments + 1, i + 1}; // Face involving a point on the bottom semi-circle, the point above and one segment across and the point one segment across on the bottom semi-circle\n\t\t}\n\t\tfor (int i = 0; i < segments - 2; i++) { // Horizontal faces approximating the semi-circles at the top and bottom\n\t\t\tfaces[segments * 2 - 2 + i] = new int[] {0, i + 1, i + 2}; // For the bottom semi-circle, the first vertex connected to the (i + 1)th vertex and the (i + 2)th vertex\n\t\t\tfaces[segments * 2 - 2 + i + segments - 2] = new int[] {segments, segments + i + 2, segments + i + 1}; // The same as above but for the top semi-circle\n\t\t}\n\t\t// Faces representing the vertical square cross-section\n\t\tfaces[4 * segments - 6] = new int[] {0, segments * 2 - 1, segments}; // The first vertex, the last vertex and the one above the first\n\t\tfaces[4 * segments - 5] = new int[] {0, segments - 1, segments * 2 - 1}; // The first vertex, the last vertex on the bottom and the last vertex (on the top)\n\t}", "public Square(int x, int y, int side)\n\t{\n\t\tsuper();\n\t\toneside = side;\n\t\tanchor = new Point(x, y);\n\t\tvertices.add(new Point(x, y));\n\t\tvertices.add(new Point(x + side, y)); // upper right\n\t\tvertices.add(new Point(x + side, y + side)); // lower right\n\t\tvertices.add(new Point(x, y + side)); // lower left\n\t}", "public void createSideBlocks() {\n Fill fill = new FillColor(Color.darkGray);\n Block topB = new Block(new Rectangle(new Point(0, 0), 800, 45), fill);\n Block rightB = new Block(new Rectangle(new Point(775, 25), 25, 576), fill);\n Block leftB = new Block(new Rectangle(new Point(0, 25), 25, 576), fill);\n //add each screen-side block to game and set 1 hitpoint.\n topB.addToGame(this);\n topB.setHitPoints(1);\n rightB.addToGame(this);\n rightB.setHitPoints(1);\n leftB.addToGame(this);\n leftB.setHitPoints(1);\n }", "CubeModel(CubeModel cube) {\n initialize(cube);\n\n }", "protected abstract Triangle makeTriangle(final Vector3d edge1, final Vector3d edge2,\n\t\t\tfinal Vector3d edge3);", "private void construct(){\n TriangleMesh mesh;\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/bunny.obj\");\n mesh.setMaterial(new MaterialNode(0.1f, 0.1f, .5f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/cube.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 0, 0));\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/teddy.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 0, 1, 0));\n mesh.setMaterial(new MaterialNode(0.1f, .5f, 0.1f, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n mesh = ObjImporter.loadMesh(\"data/aufgabe3/sphere.obj\");\n mesh.addTransformation(new TransformationNode(TransformationType.TRANSLATE, 1, 1, 0));\n mesh.setMaterial(new MaterialNode(1, 0, 0, 1));\n mesh.getRenderer().setShadingType(ShadingType.GOURAUD);\n scene.addNode(mesh);\n\n scene.calculateNormals();\n scene.setupRendering();\n }", "protected void building(double xCoord, double yCoord, double len, double width, double height)\n {\n double x1 = (xCoord - (width/2)); // Low x\n double x2 = (xCoord + (width/2)); // High x\n double y1 = (yCoord - (len/2)); // Low y\n double y2 = (yCoord + (len/2)); // High y\n\n Vertex vertex1, vertex2, vertex3;\n\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n Vertex vert1, vert2, vert3;\n\n pos1 = new Triple(x1, y1, 0); \n pos2 = new Triple(x2, y1, 0); \n pos3 = new Triple(x2, y1, height);\n pos4 = new Triple(x1, y1, height);\n pos5 = new Triple(x1, y2, 0); \n pos6 = new Triple(x2, y2, 0); \n pos7 = new Triple(x2, y2, height);\n pos8 = new Triple(x1, y2, height);\n\n col1 = new Triple(1, 0, 0); \n col2 = new Triple(0, 1, 0); \n col3 = new Triple(0, 0, 1); \n col4 = new Triple(1, 0, 1); \n \n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos2, 0, 1), \n new Vertex(pos3, 1, 1), \n\t\t\t\t 25 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 25 ) );\n \n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos5, 0, 1), \n new Vertex(pos8, 1, 1),\n 26 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 26 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0), \n new Vertex(pos6, 0, 1), \n new Vertex(pos7, 1, 1),\n 24 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos3, 1, 0), \n new Vertex(pos2, 0, 0),\n 24 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0), \n new Vertex(pos6, 0, 1), \n new Vertex(pos7, 1, 1),\n 27 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos8, 1, 0), \n new Vertex(pos5, 0, 0),\n 27 ) );\n\n // Top Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0), \n new Vertex(pos3, 0, 1), \n new Vertex(pos7, 1, 1),\n 28 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos8, 1, 0), \n new Vertex(pos4, 0, 0),\n 28 ) );\n }", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public RubiksCube(String[] c){\n\t\tif(c.length == 54){\n\t\t\tString[] tab = new String[c.length];\n\t\t\tfor(int i=0; i<c.length;i++){\n\t\t\t\ttab[i] = c[i];\n\t\t\t}\n\t\t\tthis.cube = tab;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Wrong input table size : \" + c.length);\n\t\t}\n\t}", "public void rebuildMesh(float initX, float initY, float initZ) {\r\n VBOColorHandle = glGenBuffers();\r\n VBOVertexHandle = glGenBuffers();\r\n VBOTextureHandle = glGenBuffers();\r\n int height;\r\n FloatBuffer VertexPositionData = BufferUtils.createFloatBuffer(CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * 72);\r\n FloatBuffer VertexColorData = BufferUtils.createFloatBuffer(CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * 72);\r\n FloatBuffer VertexTextureData = BufferUtils.createFloatBuffer(CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE * 72);\r\n for (float x = -initX; x < -initX + CHUNK_SIZE; x++) {\r\n for (float z = -initZ; z < -initZ + CHUNK_SIZE; z++) {\r\n height = (int) (((sNoise.getNoise((int)x + (int)initX/2, (int)z + (int)initZ/2)) + 1) / 2 * 10) + 5;\r\n for (float y = 0; y <= height; y++) {\r\n VertexPositionData.put(createCube((float)(initX + x * CUBE_LENGTH), (float)(initY + y * CUBE_LENGTH), (float)(initZ + z * CUBE_LENGTH)));\r\n VertexColorData.put(createCubeVertexCol(getCubeColor(blocks[(int) x + (int)initX][(int) y][(int) z + (int)initZ])));\r\n VertexTextureData.put(createTexCube((float) 0, (float) 0, blocks[(int) x + (int)initX][(int) y][(int) z + (int)initZ]));\r\n }\r\n if (height < 11) {\r\n for (float y = height; y < 11; y++) {\r\n VertexPositionData.put(createCube((float)(initX + x * CUBE_LENGTH), (float)(initY + y * CUBE_LENGTH), (float)(initZ + z * CUBE_LENGTH)));\r\n VertexColorData.put(createCubeVertexCol(getCubeColor(blocks[(int) x + (int)initX][(int) y][(int) z + (int)initZ])));\r\n VertexTextureData.put(createTexCube((float) 0, (float) 0, blocks[(int) x + (int)initX][(int) y][(int) z + (int)initZ]));\r\n }\r\n }\r\n }\r\n }\r\n VertexColorData.flip();\r\n VertexPositionData.flip();\r\n VertexTextureData.flip();\r\n glBindBuffer(GL_ARRAY_BUFFER, VBOVertexHandle);\r\n glBufferData(GL_ARRAY_BUFFER, VertexPositionData, GL_STATIC_DRAW);\r\n glBindBuffer(GL_ARRAY_BUFFER, 0);\r\n glBindBuffer(GL_ARRAY_BUFFER, VBOColorHandle);\r\n glBufferData(GL_ARRAY_BUFFER, VertexColorData, GL_STATIC_DRAW);\r\n glBindBuffer(GL_ARRAY_BUFFER, 0);\r\n glBindBuffer(GL_ARRAY_BUFFER, VBOTextureHandle);\r\n glBufferData(GL_ARRAY_BUFFER, VertexTextureData, GL_STATIC_DRAW);\r\n glBindBuffer(GL_ARRAY_BUFFER, 0);\r\n }", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "void doubleBox(int sides, float x1, float y1, float z1, float x2, float y2, float z2)\r\n/* 100: */ {\r\n/* 101: 99 */ int s2 = sides << 1 & 0x2A | sides >> 1 & 0x15;\r\n/* 102: */ \r\n/* 103:101 */ this.context.renderBox(sides, x1, y1, z1, x2, y2, z2);\r\n/* 104:102 */ this.context.renderBox(s2, x2, y2, z2, x1, y1, z1);\r\n/* 105: */ }", "private void setUpVAO() {\n\t\tfloat[] vertices = { -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1 };\n\t\tquad = Loader.loadToVAO(vertices, 2);\n\t}", "public final AstValidator.cube_clause_return cube_clause() throws RecognitionException {\n AstValidator.cube_clause_return retval = new AstValidator.cube_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree CUBE119=null;\n AstValidator.cube_item_return cube_item120 =null;\n\n\n CommonTree CUBE119_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:296:2: ( ^( CUBE cube_item ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:296:4: ^( CUBE cube_item )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n CUBE119=(CommonTree)match(input,CUBE,FOLLOW_CUBE_in_cube_clause1282); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n CUBE119_tree = (CommonTree)adaptor.dupNode(CUBE119);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(CUBE119_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_cube_item_in_cube_clause1284);\n cube_item120=cube_item();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, cube_item120.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "public TriangleGamePane(Grid grid, int width, int height) {\n super(grid, width, height);\n }", "public static Level[] createPhaseTwoLevel(){\n\t\tLevel[] testLevels = new Level[1];\n\t\t\n\t\tSquare Level1Piece1[] = new Square[6]; \n\t\tLevel1Piece1[0] = new Square(0,0);\n\t\tLevel1Piece1[1] = new Square(1,0);\n\t\tLevel1Piece1[2] = new Square(2,0);\n\t\tLevel1Piece1[3] = new Square(3,0);\n\t\tLevel1Piece1[4] = new Square(4,0);\n\t\tLevel1Piece1[5] = new Square(5,0);\t\t\n\t\t\n\t\tSquare Level1Piece2[] = new Square[6]; \n\t\tLevel1Piece2[0] = new Square(0,1);\n\t\tLevel1Piece2[1] = new Square(0,0);\n\t\tLevel1Piece2[2] = new Square(1,0);\n\t\tLevel1Piece2[3] = new Square(2,0);\n\t\tLevel1Piece2[4] = new Square(3,0);\n\t\tLevel1Piece2[5] = new Square(4,0);\t\t\n\t\t\n\t\tSquare Level1Piece3[] = new Square[6]; \n\t\tLevel1Piece3[0] = new Square(0,0);\n\t\tLevel1Piece3[1] = new Square(0,1);\n\t\tLevel1Piece3[2] = new Square(0,2);\n\t\tLevel1Piece3[3] = new Square(1,0);\n\t\tLevel1Piece3[4] = new Square(1,1);\n\t\tLevel1Piece3[5] = new Square(1,2);\t\t\n\t\t\n\t\tSquare Level1Piece4[] = new Square[6]; \n\t\tLevel1Piece4[0] = new Square(0,0);\n\t\tLevel1Piece4[1] = new Square(1,0);\n\t\tLevel1Piece4[2] = new Square(1,1);\n\t\tLevel1Piece4[3] = new Square(1,2);\n\t\tLevel1Piece4[4] = new Square(1,3);\n\t\tLevel1Piece4[5] = new Square(2,3);\n\t\t\n\t\tSquare Level1Piece5[] = new Square[6]; \n\t\tLevel1Piece5[0] = new Square(2,0);\n\t\tLevel1Piece5[1] = new Square(2,1);\n\t\tLevel1Piece5[2] = new Square(1,1);\n\t\tLevel1Piece5[3] = new Square(0,1);\n\t\tLevel1Piece5[4] = new Square(0,2);\n\t\tLevel1Piece5[5] = new Square(1,2);\t\n\t\t\n\t\tSquare Level1Piece6[] = new Square[6]; \n\t\tLevel1Piece6[0] = new Square(2,0);\n\t\tLevel1Piece6[1] = new Square(2,1);\n\t\tLevel1Piece6[2] = new Square(1,1);\n\t\tLevel1Piece6[3] = new Square(0,1);\n\t\tLevel1Piece6[4] = new Square(1,2);\n\t\tLevel1Piece6[5] = new Square(2,2);\t\n\t\t\n\t\tArrayList<Piece> bullPenPieceArray=new ArrayList<Piece>();\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece1,Level1Piece1[0],2));\n\t\tbullPenPieceArray.get(0).setColor(Color.BLUE);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece2,Level1Piece2[0],2));\n\t\tbullPenPieceArray.get(1).setColor(Color.GREEN);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece3,Level1Piece3[0],2));\n\t\tbullPenPieceArray.get(2).setColor(Color.YELLOW);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece4,Level1Piece4[0],2));\n\t\tbullPenPieceArray.get(3).setColor(Color.ORANGE);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece5,Level1Piece5[0],2));\n\t\tbullPenPieceArray.get(4).setColor(Color.RED);\n\t\tbullPenPieceArray.add(new Piece(0,0,Level1Piece6,Level1Piece6[0],2));\n\t\tbullPenPieceArray.get(5).setColor(Color.PINK);\n\t\tBullpen bp = new Bullpen(bullPenPieceArray);\n\t\t\n\t\t\n\t\tSquare[] sq = new Square[36]; \n\t\tfor (int i1=0;i1<6;i1++){\n\t\t\tfor (int j=0;j<6;j++){\n\t\t\t\tsq[i1*6+j] = new Square(i1,j);\n\t\t\t}\n\t\t}\n\t\tSquare hitSquares[] = new Square[6]; \n\t\thitSquares[0] = new Square(0,0);\n\t\thitSquares[1] = new Square(1,0);\n\t\thitSquares[2] = new Square(2,0);\n\t\thitSquares[3] = new Square(3,0);\n\t\thitSquares[4] = new Square(4,0);\n\t\thitSquares[5] = new Square(5,0);\t\n\t\tHint hints = new Hint(hitSquares);\n\t\tBoard bd = new Board(sq);\n\t\tbd.sethint(hints);\n\t\t\n\t\ttestLevels[0] = new PuzzleLevel(0,GetLevelTpye(0%3),bd,bp,8);\n\t\ttestLevels[0].updateLevelStar(new Achievement(0));\n\t\t\n\t\treturn testLevels;\n\t}", "@Override\n \tpublic void globe(int M, int N) {\n\t\tvertices = new double[][] { { 1, 1, 1, 0, 0, 1 },\n\t\t\t\t{ 1, -1, 1, 0, 0, 1 }, { -1, -1, 1, 0, 0, 1 },\n\t\t\t\t{ -1, 1, 1, 0, 0, 1 }, { 1, 1, -1, 0, 0, -1 },\n\t\t\t\t{ 1, -1, -1, 0, 0, -1 }, { -1, -1, -1, 0, 0, -1 },\n\t\t\t\t{ -1, 1, -1, 0, 0, -1 }, { 1, 1, 1, 1, 0, 0 },\n\t\t\t\t{ 1, -1, 1, 1, 0, 0 }, { 1, -1, -1, 1, 0, 0 },\n\t\t\t\t{ 1, 1, -1, 1, 0, 0 }, { -1, 1, 1, -1, 0, 0 },\n\t\t\t\t{ -1, -1, 1, -1, 0, 0 }, { -1, -1, -1, -1, 0, 0 },\n\t\t\t\t{ -1, 1, -1, -1, 0, 0 }, { 1, 1, 1, 0, 1, 0 },\n\t\t\t\t{ -1, 1, 1, 0, 1, 0 }, { -1, 1, -1, 0, 1, 0 },\n\t\t\t\t{ 1, 1, -1, 0, 1, 0 }, { 1, -1, 1, 0, -1, 0 },\n\t\t\t\t{ -1, -1, 1, 0, -1, 0 }, { -1, -1, -1, 0, -1, 0 },\n\t\t\t\t{ 1, -1, -1, 0, -1, 0 }, };\n \t\tfaces = new int[6][4];\n \t\tfor (int i = 0; i < faces.length; i++) {\n \t\t\tfaces[i] = new int[] { i * 4, i * 4 + 1, i * 4 + 2, i * 4 + 3 };\n \t\t}\n \n \t\tthis.m.identity();\n \t}", "public Triangle(double side1, double side2, double side3) {\n\t\tthis.side1 = side1;\n\t\tthis.side2 = side2;\n\t\tthis.side3 = side3;\n\t}", "public static float[] createTexCube(float x, float y, Block block) {\r\n float offset = 1/16f;\r\n switch(type.getID()) {\r\n case 0:\r\n switch(block.getID()) {\r\n case 0:\r\n return new float[] {\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 0, y + offset * 1,\r\n x + offset * 0, y + offset * 0,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 4, y + offset * 0,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1\r\n };\r\n case 1:\r\n return new float[] {\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1\r\n };\r\n case 2:\r\n return new float[] {\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12,\r\n x + offset * 14, y + offset * 13,\r\n x + offset * 13, y + offset * 13,\r\n x + offset * 13, y + offset * 12,\r\n x + offset * 14, y + offset * 12\r\n };\r\n case 3:\r\n return new float[] {\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 3, y + offset * 0\r\n };\r\n case 4:\r\n return new float[] {\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 1, y + offset * 0,\r\n x + offset * 2, y + offset * 0\r\n };\r\n case 5:\r\n return new float[] {\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1\r\n };\r\n }\r\n case 1:\r\n switch(block.getID()) {\r\n case 0:\r\n return new float[] {\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1,\r\n x + offset * 4, y + offset * 2,\r\n x + offset * 3, y + offset * 2,\r\n x + offset * 3, y + offset * 1,\r\n x + offset * 4, y + offset * 1\r\n };\r\n case 1:\r\n return new float[] {\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6,\r\n x + offset * 9, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 9, y + offset * 6\r\n };\r\n case 2:\r\n return new float[] {\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14,\r\n x + offset * 14, y + offset * 15,\r\n x + offset * 13, y + offset * 15,\r\n x + offset * 13, y + offset * 14,\r\n x + offset * 14, y + offset * 14\r\n };\r\n case 3:\r\n return new float[] {\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6,\r\n x + offset * 8, y + offset * 7,\r\n x + offset * 7, y + offset * 7,\r\n x + offset * 7, y + offset * 6,\r\n x + offset * 8, y + offset * 6\r\n };\r\n case 4:\r\n return new float[] {\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14,\r\n x + offset * 1, y + offset * 15,\r\n x + offset * 0, y + offset * 15,\r\n x + offset * 0, y + offset * 14,\r\n x + offset * 1, y + offset * 14\r\n };\r\n case 5:\r\n return new float[] {\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1,\r\n x + offset * 2, y + offset * 2,\r\n x + offset * 1, y + offset * 2,\r\n x + offset * 1, y + offset * 1,\r\n x + offset * 2, y + offset * 1\r\n };\r\n }\r\n }\r\n \r\n return new float[] {\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2,\r\n x + offset * 15, y + offset * 1,\r\n x + offset * 16, y + offset * 1,\r\n x + offset * 16, y + offset * 2,\r\n x + offset * 15, y + offset * 2\r\n };\r\n }", "public boolean isOpaqueCube()\r\n/* 26: */ {\r\n/* 27:41 */ return false;\r\n/* 28: */ }", "public static Scene scene2() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene2\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initAmbient(new Vec(0.4))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game).\r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t// Add lighting condition:\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.7));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "public static Scene scene3() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene3\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\t\t\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game). \r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Add light sources:\r\n\t\tCutoffSpotlight cutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 45.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(1.0,0.6,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(-4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,1.0,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(0.0, 4.0, 0.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,0.6,1.0));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.2));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "int getNumberOfVertexes();", "static Texture loadCubeMap(String name) {\n\n GL4 gl = (GL4) GLContext.getCurrentGL(); // this gl context not appropriate?\n GLProfile glp = gl.getGLProfile();\n Texture cubeMap = TextureIO.newTexture(GL4.GL_TEXTURE_CUBE_MAP);\n\n // System.out.println(\"estimated memory \" + cubeMap.getEstimatedMemorySize());\n\n try {\n TextureData top = TextureIO.newTextureData(glp, new File(name + \"/top.png\"), false, \"png\");\n TextureData bot = TextureIO.newTextureData(glp, new File(name + \"/bot.png\"), false, \"png\");\n TextureData left = TextureIO.newTextureData(glp, new File(name + \"/left.png\"), false, \"png\");\n TextureData right = TextureIO.newTextureData(glp, new File(name + \"/right.png\"), false, \"png\");\n TextureData front = TextureIO.newTextureData(glp, new File(name + \"/front.png\"), false, \"png\");\n TextureData back = TextureIO.newTextureData(glp, new File(name + \"/back.png\"), false, \"png\");\n\n // System.out.println(\"front is null \" + (top == null));\n\n cubeMap.updateImage(gl, right, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_X);\n cubeMap.updateImage(gl, left, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_X);\n cubeMap.updateImage(gl, top, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_Z);\n cubeMap.updateImage(gl, bot, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_Z);\n cubeMap.updateImage(gl, front, GL4.GL_TEXTURE_CUBE_MAP_POSITIVE_Y);\n cubeMap.updateImage(gl, back, GL4.GL_TEXTURE_CUBE_MAP_NEGATIVE_Y);\n\n } catch (Exception e) {\n System.out.println(\"failed load \" + name + \" cubemap\");\n }\n\n // System.out.println(\"estimated memory \" + cubeMap.getEstimatedMemorySize());\n\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_S, GL4.GL_CLAMP_TO_EDGE);\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_T, GL4.GL_CLAMP_TO_EDGE);\n // gl.glTexParameteri(GL4.GL_TEXTURE_CUBE_MAP, GL4.GL_TEXTURE_WRAP_R, GL4.GL_CLAMP_TO_EDGE);\n\n return cubeMap;\n }", "public Triangle (int x, int y, int z){ \r\n \r\n \r\n }", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "public static void renderCube(double x, double y, double z, int xDim, int yDim, int zDim, int offsetU, int offsetV, IIcon icon, int flag)\n\t{\n\t\trenderCube(x, y, z, xDim, yDim, zDim, offsetU, offsetV, icon, flag, 16, 16);\n\t}", "public void buildVerticies(){\n\t\tfor(Entry<HexLocation, TerrainHex> entry : hexes.entrySet()){\n\t\t\t\n\t\t\tVertexLocation vertLoc1 = new VertexLocation(entry.getKey(), VertexDirection.NorthWest);\n\t\t\tVertex v1 = new Vertex(vertLoc1);\n\t\t\tverticies.put(vertLoc1, v1);\n\t\t\t\n\t\t\tVertexLocation vertLoc2 = new VertexLocation(entry.getKey(), VertexDirection.NorthEast);\n\t\t\tVertex v2 = new Vertex(vertLoc2);\n\t\t\tverticies.put(vertLoc2, v2);\n\t\t\t\n\t\t\tVertexLocation vertLoc3 = new VertexLocation(entry.getKey(), VertexDirection.East);\n\t\t\tVertex v3 = new Vertex(vertLoc3);\n\t\t\tverticies.put(vertLoc3, v3);\n\t\t\t\n\t\t\tVertexLocation vertLoc4 = new VertexLocation(entry.getKey(), VertexDirection.SouthEast);\n\t\t\tVertex v4 = new Vertex(vertLoc4);\n\t\t\tverticies.put(vertLoc4, v4);\n\t\t\t\n\t\t\tVertexLocation vertLoc5 = new VertexLocation(entry.getKey(), VertexDirection.SouthWest);\n\t\t\tVertex v5 = new Vertex(vertLoc5);\n\t\t\tverticies.put(vertLoc5, v5);\n\t\t\t\n\t\t\tVertexLocation vertLoc6 = new VertexLocation(entry.getKey(), VertexDirection.West);\n\t\t\tVertex v6 = new Vertex(vertLoc6);\n\t\t\tverticies.put(vertLoc6, v6);\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public static int cube(int n){\n return n*n*n;\n }", "public BranchGroup cubo3(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.01,1,1);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(-.01,-.5,2);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n // rotate.mul(objScale);\n TransformGroup objRotate = new TransformGroup(rotate);\n \n //objRotate.addChild(new ColorCube(0.4));\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n\n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\n\t \n\t // Set up the background\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "@Override\n public boolean isOpaqueCube() {\n return false;\n }", "int cubeCol() {\n return c; \n }", "public Block[][][] getCubes(){ return cubes; }", "public levelTwo()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1); \n prepare();\n }", "public boolean isOpaqueCube()\r\n/* 61: */ {\r\n/* 62: 82 */ return false;\r\n/* 63: */ }", "public void setVertices(float x0, float y0, float z0,\n float x1, float y1, float z1,\n float x2, float y2, float z2) {\n x_array[0] = x0;\n x_array[1] = x1;\n x_array[2] = x2;\n \n y_array[0] = y0;\n y_array[1] = y1;\n y_array[2] = y2;\n \n z_array[0] = z0;\n z_array[1] = z1;\n z_array[2] = z2;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Cube(\" + this.nom + \")@(\" + this.centre.getX() + \", \" + this.centre.getY() + \", \" + this.centre.getZ() + \") ar�te : \"+this.arete;\n\t}", "private void paint(int sideLength) {\n\n float fac = randomStart;\n while (sideLength >= 2) {\n\n for (int py = 0; py < _height; py += sideLength) {\n for (int px = 0; px < _width; px += sideLength) {\n // fetch corner colors\n float c1 = mono[repeat(px, py, _width, _height)];\n float c3 = mono[repeat(px + sideLength, py, _width, _height)];\n float c7 = mono[repeat(px, py + sideLength, _width, _height)];\n float c9 = mono[repeat(px + sideLength, py + sideLength, _width,\n _height)];\n\n int shortX = px / sideLength; \n int shortY = py / sideLength; \n \n \n float c2 = (c1 + c3) / 2 + calcFac(fac, shortX, shortY);\n float c4 = (c1 + c7) / 2 + calcFac(fac, shortX, shortY);\n float c5 = (c1 + c3 + c7 + c9) / 4 + calcFac(fac, shortX, shortY);\n\n mono[repeat(px + sideLength / 2, py, _width, _height)] = c2;\n mono[repeat(px, py + sideLength / 2, _width, _height)] = c4;\n mono[repeat(px + sideLength / 2, py + sideLength / 2, _width, _height)] = c5;\n }\n }\n\n fac = fac * randomFactor + randomSummand;\n\n sideLength /= 2;\n }\n }", "public String toString(){\n\t\treturn (\"this triangle has side 1 of length\"+side1+\"side 2 of length\"+side2+\"and side 3 of length\"+side3);\n\t}", "private TransformGroup createBox(\n\t\tfloat x,\n\t\tfloat z,\n\t\tfloat size,\n\t\tfloat height,\n\t\tColor3f col) {\n\n\t\t//quadrilatere\n\t\tQuadArray quad =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\tquad.setCoordinate(0, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t1,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(2, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(3, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(4, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t5,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t6,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t7,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\n\t\tquad.setCoordinate(8, new Point3f(0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(9, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t10,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(11, new Point3f(0.001f, height - 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(\n\t\t\t12,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t13,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t14,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(15, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(16, new Point3f(size - 0.001f, 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t17,\n\t\t\tnew Point3f(size - 0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(18, new Point3f(0.001f, 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(19, new Point3f(0.001f, 0.001f, 0.001f));\n\n\t\tquad.setCoordinate(20, new Point3f(0.001f, height - 0.001f, 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t21,\n\t\t\tnew Point3f(0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t22,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, size - 0.001f));\n\t\tquad.setCoordinate(\n\t\t\t23,\n\t\t\tnew Point3f(size - 0.001f, height - 0.001f, 0.001f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\tquad.setColor(i, col);\n\n\t\t//dessine les aretes\n\n\t\t//quadrilatere\n\t\tQuadArray aretes =\n\t\t\tnew QuadArray(24, QuadArray.COORDINATES | QuadArray.COLOR_3);\n\t\taretes.setCoordinate(0, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(1, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(2, new Point3f(size, height, 0.0f));\n\t\taretes.setCoordinate(3, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(4, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(5, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(6, new Point3f(size, height, size));\n\t\taretes.setCoordinate(7, new Point3f(0.0f, height, size));\n\n\t\taretes.setCoordinate(8, new Point3f(0.0f, 0.0f, 0.0f));\n\t\taretes.setCoordinate(9, new Point3f(0.0f, 0.0f, size));\n\t\taretes.setCoordinate(10, new Point3f(0.0f, height, size));\n\t\taretes.setCoordinate(11, new Point3f(0.0f, height, 0.0f));\n\n\t\taretes.setCoordinate(12, new Point3f(size, 0.0f, 0.0f));\n\t\taretes.setCoordinate(13, new Point3f(size, 0.0f, size));\n\t\taretes.setCoordinate(14, new Point3f(size, height, size));\n\t\taretes.setCoordinate(15, new Point3f(size, height, 0.0f));\n\n\t\tfor (int i = 0; i < 24; i++)\n\t\t\taretes.setColor(i, new Color3f(1f, 1f, 1f));\n\n\t\t// move the box\n\t\tTransform3D translate = new Transform3D();\n\t\ttranslate.set(new Vector3f(x, 0.0f, z));\n\n\t\tTransformGroup tg = new TransformGroup(translate);\n\n\t\t// create the box\n\t\ttg.addChild(new Shape3D(quad));\n\t\ttg.addChild(new Shape3D(aretes, lineApp()));\n\t\treturn tg;\n\t}", "@Override\n public boolean isOpaqueCube()\n {\n return false;\n }", "public CubeEarth() {\n this(1, null);\n }", "public Triangle() {}" ]
[ "0.7406442", "0.73660535", "0.73304194", "0.7162521", "0.6756996", "0.6625802", "0.6612362", "0.656734", "0.65505254", "0.6298832", "0.6268742", "0.6237462", "0.62337303", "0.6229326", "0.6205036", "0.6189189", "0.61617625", "0.61486", "0.6143528", "0.6134301", "0.6062339", "0.6026812", "0.6025811", "0.5999353", "0.5948345", "0.59404224", "0.591475", "0.5819941", "0.57785714", "0.5759463", "0.5759229", "0.5754124", "0.57506484", "0.57444894", "0.5737278", "0.5727415", "0.5705044", "0.56407773", "0.5607928", "0.5588305", "0.5583265", "0.5563913", "0.55574626", "0.55480886", "0.5547213", "0.5539798", "0.5521153", "0.5482431", "0.5450947", "0.5411754", "0.5370631", "0.5366539", "0.5362737", "0.5361035", "0.5357509", "0.5351126", "0.5343949", "0.53396297", "0.53381723", "0.5333632", "0.5316704", "0.52997726", "0.5285985", "0.5262014", "0.5248474", "0.5230437", "0.52176017", "0.5209068", "0.5202739", "0.52017343", "0.51985705", "0.5198395", "0.51921105", "0.51899755", "0.517693", "0.51748425", "0.51744634", "0.517186", "0.51662576", "0.51604205", "0.5159937", "0.5148686", "0.5137916", "0.51324713", "0.5130089", "0.5129258", "0.5116371", "0.5113839", "0.5111523", "0.51113766", "0.5107754", "0.51061106", "0.51015264", "0.5097508", "0.5095798", "0.50936604", "0.5093428", "0.5088351", "0.50876355", "0.5087301" ]
0.78625673
0
Creates the vertices and faces that define a triangular prism with sides of length 2
private void generatePrism() { double halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal verts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)}; verts[0].setElements(new double[] {-1, -halfAltitude, -1}); verts[1].setElements(new double[] {0, halfAltitude, -1}); verts[2].setElements(new double[] {1, -halfAltitude, -1}); // Use the same triangle of vertices but offset by 2 units along the z-axis verts[3].setElements(verts[0]); verts[4].setElements(verts[1]); verts[5].setElements(verts[2]); verts[3].setElement(2, 1); verts[4].setElement(2, 1); verts[5].setElement(2, 1); faces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "public static DeformableMesh3D createRectangleMesh(double width, double height, double depth, double segment_size){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n //For the complete length there will be n+1 nodes\n int nx = (int)(width/segment_size + 0.5) + 1;\n int ny = (int)(height/segment_size+0.5) + 1;\n int nz = (int)(depth/segment_size+0.5) + 1;\n double actual_w = (nx-1)*segment_size;\n double actual_h = (ny-1)*segment_size;\n double actual_z = (nz-1)*segment_size;\n\n int dex;\n\n //top face x-y @ actual_z/2\n int top_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n dex = top_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex-1\n });\n }\n }\n }\n\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n actual_z/2\n });\n //first\n int a_dex = top_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = top_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = top_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = top_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, a_dex, b_dex});\n triangles.add(new int[]{dex, b_dex, c_dex});\n triangles.add(new int[]{dex, c_dex, d_dex});\n triangles.add(new int[]{dex, d_dex, a_dex});\n\n }\n }\n\n\n //bottom face x-y @ -actual_z/2\n int bottom_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n\n dex = bottom_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n -actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n //bottom face\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n -actual_z/2\n });\n //first\n int a_dex = bottom_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = bottom_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = bottom_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = bottom_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n\n //left face y-z @ -actual_x/2\n int left_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = left_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n -actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n\n //left face connections\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i,\n left_starting_dex + i*(nz-2)\n });\n\n }\n\n //left face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = left_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = left_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = left_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = left_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //left face merging triangles\n for(int i = 1; i<ny; i++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i-1;\n int b_dex = bottom_starting_dex + i;\n int c_dex = left_starting_dex + i*(nz-2);\n int d_dex = left_starting_dex + (i-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i;\n b_dex = top_starting_dex + i-1;\n c_dex = left_starting_dex + (i-1)*(nz-2) + (nz-3);\n d_dex = left_starting_dex + (i)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //right face y-z @ actual_x/2\n int right_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = right_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2)\n });\n\n }\n\n //right face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = right_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = right_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = right_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = right_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //right face merging triangles\n for(int i = 1; i<ny; i++){\n /*\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n */\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i + ny*(nx-1);\n int b_dex = bottom_starting_dex + i-1 + ny*(nx-1);\n int c_dex = right_starting_dex + (i-1)*(nz-2);\n int d_dex = right_starting_dex + (i)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i-1 + ny*(nx-1);\n b_dex = top_starting_dex + i + ny*(nx-1);\n c_dex = right_starting_dex + (i)*(nz-2) + (nz-3);\n d_dex = right_starting_dex + (i-1)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n\n //front face x-z @ -actual_y/2\n int front_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n -actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny\n });\n\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny\n });\n\n }\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n front_starting_dex + (j-1),\n left_starting_dex + j - 1\n });\n\n connections.add(new int[]{\n front_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1\n });\n }\n\n //front face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = front_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = front_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = front_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //front face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (i-2)*(nz - 2);\n int b_dex = front_starting_dex + (i-1)*(nz - 2);\n int c_dex = bottom_starting_dex + i*ny;\n int d_dex = bottom_starting_dex + (i-1)*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = front_starting_dex + (i-1)*(nz - 2) + (nz-3);\n b_dex = front_starting_dex + (i-2)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i-1)*ny;\n d_dex = top_starting_dex + i*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //front face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (j-1);\n int b_dex = front_starting_dex + (j-2);\n int c_dex = left_starting_dex + j - 2;\n int d_dex = left_starting_dex + j - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = front_starting_dex + (j-2) + (nz-2)*(nx-3);\n b_dex = front_starting_dex + (j-1) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 1;\n d_dex = right_starting_dex + j - 2;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //front triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = front_starting_dex;\n b_dex = bottom_starting_dex + ny;\n c_dex = bottom_starting_dex;\n d_dex = left_starting_dex;\n } else{\n a_dex = front_starting_dex + nz-3;\n b_dex = left_starting_dex + nz-3;\n c_dex = top_starting_dex;\n d_dex = top_starting_dex + ny;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = front_starting_dex + (nx-3)*(nz - 2);\n b_dex = right_starting_dex;\n c_dex = bottom_starting_dex + (nx-1)*(ny);\n d_dex = bottom_starting_dex + (nx-2)*(ny);\n } else{\n a_dex = front_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = top_starting_dex + (nx-2)*(ny);\n c_dex = top_starting_dex + (nx-1)*(ny);\n d_dex = right_starting_dex + nz-3;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n\n //back plane\n int back_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny + ny-1\n });\n\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny + ny-1\n });\n\n }\n\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n back_starting_dex + (j-1),\n left_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n\n connections.add(new int[]{\n back_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n }\n\n //back face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = back_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = back_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = back_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //back face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (i-1)*(nz - 2);\n int b_dex = back_starting_dex + (i-2)*(nz - 2);\n int c_dex = bottom_starting_dex + (i-1)*ny + ny - 1;\n int d_dex = bottom_starting_dex + (i)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = back_starting_dex + (i-2)*(nz - 2) + (nz-3);\n b_dex = back_starting_dex + (i-1)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i)*ny + ny - 1;\n d_dex = top_starting_dex + (i-1)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //back face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (j-2);\n int b_dex = back_starting_dex + (j-1);\n int c_dex = left_starting_dex + j - 1 + (ny-1)*(nz-2);\n int d_dex = left_starting_dex + j - 2 + (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = back_starting_dex + (j-1) + (nz-2)*(nx-3);\n b_dex = back_starting_dex + (j-2) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 2+ (ny-1)*(nz-2);\n d_dex = right_starting_dex + j - 1+ (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //back triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = back_starting_dex;\n b_dex = left_starting_dex + (ny-1)*(nz-2);\n c_dex = bottom_starting_dex + ny -1;\n d_dex = bottom_starting_dex + 2*ny - 1;\n } else{\n a_dex = back_starting_dex + nz-3;\n b_dex = top_starting_dex + 2*ny - 1;\n c_dex = top_starting_dex + ny - 1;\n d_dex = left_starting_dex + (ny)*(nz-2) - 1 ;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = back_starting_dex + (nx-3)*(nz - 2);\n b_dex = bottom_starting_dex + (nx-1)*(ny) - 1;\n c_dex = bottom_starting_dex + (nx)*(ny) - 1;\n d_dex = right_starting_dex + (nz-2)*(ny-1);\n } else{\n a_dex = back_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = right_starting_dex + (nz-2)*(ny-1) + nz - 3;\n c_dex = top_starting_dex + (nx)*(ny) -1;\n d_dex = top_starting_dex + (nx-1)*(ny) -1;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n final DeformableMesh3D mesh = new DeformableMesh3D(pts, connections, triangles);\n\n return mesh;\n }", "public void setupTriangles(VrState state);", "private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "private void generateSphere() {\n\t\tint segments = 14;\n\t\tint rings = 15; // Use an odd number of rings of faces so that halfway up the sphere is the middle of a ring and not a loop of edges\n\t\tverts = new Vector[segments * (rings - 1) + 2]; // There are rings + 1 rings of vertices, but the first and last of these are each a single vertex\n\t\tfaces = new int[2 * segments * (rings - 1)][3]; // Apart from the first and last, each ring has segments number of square faces, so 2 * segments triangular faces. The first and last each have segments triangular faces\n\t\tverts[0] = new Vector(3);\n\t\tverts[0].setElement(1, -1); // The lowest point of the sphere\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, 1}; // The last face involves the last vertex in the second ring and loops back to the first vertex in the second ring\n\t\t\t} else {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, i + 2}; // Triangles involving the lowest vertex and two consecutive vertices in the second ring of vertices\n\t\t\t}\n\t\t}\n\t\tdouble pitchIncrement = Math.PI / rings; // The increment in pitch (angle above horizontal) between rings of vertices\n\t\tdouble pitch = pitchIncrement - Math.PI / 2; // The lowest point had a pitch of -pi/2\n\t\tdouble headingIncrement = Math.PI * 2.0 / segments; // The increment in heading between segments\n\t\tdouble heading = -Math.PI;\n\t\tfor (int r = 0; r < rings - 1; r++) { // Last ring is a single point and must be treated separately\n\t\t\tdouble y = Math.sin(pitch); // The y co-ordinate for each vertex in this ring\n\t\t\tdouble modulus = Math.cos(pitch); // The radius of the circle which this ring lies on\n\t\t\tfor (int s = 0; s < segments; s++) {\n\t\t\t\tdouble x = modulus * Math.cos(heading); // x co-ordinate for the next vertex\n\t\t\t\tdouble z = modulus * Math.sin(heading); // z co-ordinate for the next vertex\n\t\t\t\tverts[segments * r + s + 1] = new Vector(3);\n\t\t\t\tverts[segments * r + s + 1].setElements(new double[] {x, y, z});\n\t\t\t\theading += headingIncrement;\n\t\t\t}\n\t\t\t// Make faces between the vertices just added and the next ring of vertices to be added\n\t\t\tif (r != rings - 2) { // The second to last ring doesn't make faces with the next ring up in the same way because the last ring is a single vertex\n\t\t\t\tfor (int i = 0; i < segments; i++) {\n\t\t\t\t\tif (i == segments - 1) { // The last two faces make use of the first vertex in the next ring by looping back to the start\n\t\t\t\t\t\t// Two faces in the same plane\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, segments * r + 1 + segments};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, segments * r + 1 + segments, segments * r + 1};\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Two faces that are in the same plane and appear as a quadrilateral\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, (segments * r + i + 1) + segments + 1};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments + 1, (segments * r + i + 1) + 1};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpitch += pitchIncrement;\n\t\t}\n\t\tverts[verts.length - 1] = new Vector(3);\n\t\tverts[verts.length - 1].setElement(1, 1); // The last and highest vertex\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) { // Last face completes the ring and includes the last vertex of the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1};\n\t\t\t} else { // Faces involving the last vertex and two consecutive vertices in the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1 + i + 1};\n\t\t\t}\n\t\t}\n\t}", "public Prism(int numSides, double radius, double height) {\n Vector3d toTop = new Vector3d(0.0, 0.0, height);\n double centralAngle = 2.0 * Math.PI / numSides;\n\n Face bottomFace = new Face(numSides);\n Face topFace = new Face(numSides);\n int vertexIndex = 0;\n for (int i = 0; i < numSides; i++) {\n double totalAngle = centralAngle * i;\n double x = radius * Math.cos(totalAngle);\n double y = radius * Math.sin(totalAngle);\n Vector3d bottomVertex = new Vector3d(x, y, -height / 2.0);\n\n Vector3d topVertex = new Vector3d();\n topVertex.add(bottomVertex, toTop);\n\n addVertexPositions(bottomVertex, topVertex);\n\n bottomFace.setVertexIndex(numSides - i - 1, vertexIndex);\n topFace.setVertexIndex(i, vertexIndex + 1);\n\n Face quad = new Face(4);\n int nextBottom = (vertexIndex + 2) % (2 * numSides);\n int nextTop = nextBottom + 1;\n quad.setAllVertexIndices(vertexIndex, nextBottom, nextTop,\n vertexIndex + 1);\n\n addFace(quad);\n\n vertexIndex += 2;\n }\n\n addFaces(bottomFace, topFace);\n\n setVertexNormalsToFaceNormals();\n }", "private void generateHalfCylinder() {\n\t\tint segments = 32;\n\t\tverts = new Vector[segments * 2];\n\t\tfaces = new int[4 * segments - 4][3];\n\t\tdouble heading = 0;\n\t\tdouble headingIncrement = Math.PI / (segments - 1); // The increment in heading between segments of vertices\n\t\tfor (int s = 0; s < segments; s++) {\n\t\t\tdouble x = Math.cos(heading); // x co-ordinate of points on the segment\n\t\t\tdouble z = Math.sin(heading); // z co-ordinate of points on the segment\n\t\t\tverts[s] = new Vector(3);\n\t\t\tverts[s].setElements(new double[] {x, -1, z}); // Vertex on the bottom semi-circle\n\t\t\tverts[s + segments] = new Vector(3);\n\t\t\tverts[s + segments].setElements(new double[] {x, 1, z}); // Vertex on the top semi-circle\n\t\t\theading += headingIncrement;\n\t\t}\n\t\tfor (int i = 0; i < segments - 1; i++) { // Vertical faces approximating the curved surface\n\t\t\tfaces[i * 2] = new int[] {i, i + segments, i + segments + 1}; // Face involving a point on the bottom semi-circle, the point directly above it (top semi-circle and the same segment) and the point directly above and one segment across\n\t\t\tfaces[i * 2 + 1] = new int[] {i, i + segments + 1, i + 1}; // Face involving a point on the bottom semi-circle, the point above and one segment across and the point one segment across on the bottom semi-circle\n\t\t}\n\t\tfor (int i = 0; i < segments - 2; i++) { // Horizontal faces approximating the semi-circles at the top and bottom\n\t\t\tfaces[segments * 2 - 2 + i] = new int[] {0, i + 1, i + 2}; // For the bottom semi-circle, the first vertex connected to the (i + 1)th vertex and the (i + 2)th vertex\n\t\t\tfaces[segments * 2 - 2 + i + segments - 2] = new int[] {segments, segments + i + 2, segments + i + 1}; // The same as above but for the top semi-circle\n\t\t}\n\t\t// Faces representing the vertical square cross-section\n\t\tfaces[4 * segments - 6] = new int[] {0, segments * 2 - 1, segments}; // The first vertex, the last vertex and the one above the first\n\t\tfaces[4 * segments - 5] = new int[] {0, segments - 1, segments * 2 - 1}; // The first vertex, the last vertex on the bottom and the last vertex (on the top)\n\t}", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "Triangle(){\n side1 = 1.0;\n side2 = 1.0;\n side3 = 1.0;\n }", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "public void makeTriangleBox(int offsetX, int offsetY, int myWidth, int myHeight, int numTriHorizontal, int numTriVertical, int collRect, float[][] verts) {\n //Top Triangles\n for (int i = 0; i < numTriHorizontal; i++) {\n verts[i][0] = (i*myWidth/numTriHorizontal) + offsetX;\n verts[i][1] = offsetY;\n verts[i][2] = ((i+1)*(myWidth/numTriHorizontal)) + offsetX;\n verts[i][3] = offsetY;\n verts[i][4] = (myWidth/(2*numTriHorizontal)) + (i*myWidth/numTriHorizontal) + offsetX;\n if(i%2==0) {\n verts[i][5] = (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY;\n } else {\n verts[i][5] = (float)((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY;\n }\n\n }\n\n //Left Triangles\n\n for (int i = numTriHorizontal; i < (numTriVertical + numTriHorizontal); i++) {\n verts[i][0] = offsetX;\n verts[i][1] = offsetY + ((i-numTriHorizontal) * (myWidth/numTriHorizontal));\n verts[i][2] = offsetX;\n verts[i][3] = offsetY + ((i-(numTriHorizontal-1)) * (myWidth/numTriHorizontal));\n if(i%2==0) {\n verts[i][4] = offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal));\n } else {\n verts[i][4] = offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal));\n }\n verts[i][5] = offsetY + ((i-numTriHorizontal) * (myWidth/numTriHorizontal)) + myWidth/(2*numTriHorizontal);\n\n }\n\n\n //Right Triangles\n for(int i=numTriVertical+numTriHorizontal; i<(2*numTriVertical)+numTriHorizontal; i++) {\n verts[i][0] = width-offsetX;\n verts[i][1] = offsetY + ((i-(numTriVertical+numTriHorizontal)) * (myWidth/numTriHorizontal));\n verts[i][2] = width-offsetX;\n verts[i][3] = offsetY + ((i-(numTriVertical+(numTriHorizontal-1))) * (myWidth/numTriHorizontal));\n if(i%2==0) {\n verts[i][4] = width-(offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)));\n } else {\n verts[i][4] = width-(offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)));\n }\n verts[i][5] = offsetY + ((i-(numTriVertical+numTriHorizontal)) * (myWidth/numTriHorizontal)) + myWidth/(2*numTriHorizontal);\n\n }\n\n //Bottom Triangles\n for(int i=(2*numTriVertical)+numTriHorizontal; i<(2*numTriVertical)+(2*numTriHorizontal); i++) {\n verts[i][0] = ((i-((2*numTriVertical)+numTriHorizontal))*myWidth/numTriHorizontal) + offsetX;\n verts[i][1] = (height-100) - offsetY;\n verts[i][2] = ((i-((2*numTriVertical)+numTriHorizontal) +1)*(myWidth/numTriHorizontal)) + offsetX;\n verts[i][3] = (height-100) - offsetY;\n verts[i][4] = (myWidth/(2*numTriHorizontal)) + ((i-((2*numTriVertical)+numTriHorizontal))*myWidth/numTriHorizontal) + offsetX;\n if(i%2==0) {\n verts[i][5] = (float)((height-100) - ( ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY));\n } else {\n verts[i][5] = (float)((height-100) - ( ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY));\n }\n\n }\n\n }", "private void createNVertices() {\n\t\tfor (int i = 0; i < this.numNVertices; i++) {\n\t\t\tvertices.add(new Vertex('n', this.countNID++));\n\t\t}\n\t}", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public void triangulo() {\n fill(0);\n stroke(255);\n strokeWeight(5);\n triangle(width/2, 50, height+100, 650, 350, 650);\n //(width/2, height-100, 350, 150, 900, 150);\n }", "public Triangle() {}", "public Triangle (int tipX, int tipY, int height, String orientation){\n super.points = new ArrayList();\n x1 = tipX;\n y1 = tipY;\n this.height = height;\n defineVertexes(orientation);\n definePoints();\n }", "public Triangle() {\n\t\tsuper.addPoint(new java.awt.Point(0,1));\n\t\tsuper.addPoint(new java.awt.Point(1,0));\n\t\tsuper.addPoint(new java.awt.Point(2,1));\n\t}", "public Triangle(){\n\t\tside1=1.0;\n\t\tside2=1.0;\n\t\tside3=1.0;\n\t}", "public void triangulate() {\n // Save the outline and calculate normals\n outline = new Vector<PlanarEdge>();\n for (PlanarEdge e : subdivision.getEdges()) {\n if (e.isRealEdge()) {\n outline.add(e);\n }\n }\n // Calculate outline normals\n outline_normals = new Vector3f[outline.size()];\n for (PlanarEdge e : outline) {\n TriangulationVertex vert = (TriangulationVertex) e.getDestination();\n // Normal 1\n Vector3f normal1 = new Vector3f(vert.getOutGoingEdge()\n .getDestination().getPoint())\n .subtractLocal(vert.getPoint()).normalizeLocal();\n // Vector3f normal1 = new\n // Vector3f(vert.getOutGoingEdge().getDestination().getPoint()).subtractLocal(vert.getPoint());\n normal1.z = -normal1.x;\n normal1.x = normal1.y;\n normal1.y = normal1.z;\n normal1.z = 0;\n // Normal 2\n Vector3f normal2 = new Vector3f(vert.getPoint()).subtractLocal(\n vert.getInGoingEdge().getOrigin().getPoint())\n .normalizeLocal();\n // Vector3f normal2 = new\n // Vector3f(vert.getPoint()).subtractLocal(vert.getInGoingEdge().getOrigin().getPoint());\n normal2.z = -normal2.x;\n normal2.x = normal2.y;\n normal2.y = normal2.z;\n normal2.z = 0;\n normal1.addLocal(normal2).normalizeLocal();\n\n outline_normals[vert.getIndex()] = normal1;\n }\n\n // Calculate the triangulation of the surface.\n surface = subdivision.triangulate();\n }", "public Vertex[] Vertices (TrianglePair pair)\n\t{\n\t\tFace tri1 = trimesh.faces[pair.face1];\n\t\tFace tri2 = trimesh.faces[pair.face2];\n\t\tVertex[] verts1 = new Vertex[3];\n\t\tVertex[] verts2 = new Vertex[3];\n\t\tverts1[0] = trimesh.vertices[tri1.fvlist[0]];\n\t\tverts1[1] = trimesh.vertices[tri1.fvlist[1]];\n\t\tverts1[2] = trimesh.vertices[tri1.fvlist[2]];\n\t\tverts2[0] = trimesh.vertices[tri2.fvlist[0]];\n\t\tverts2[1] = trimesh.vertices[tri2.fvlist[1]];\n\t\tverts2[2] = trimesh.vertices[tri2.fvlist[2]];\n\t\tboolean[] equalVerts = new boolean[9];\n\t\tVertex[] retverts = new Vertex[4];\n\t\tequalVerts[0] = (verts1[0] == verts2[0]);\n\t\tequalVerts[1] = (verts1[0] == verts2[1]);\n\t\tequalVerts[2] = (verts1[0] == verts2[2]);\n\t\tequalVerts[3] = (verts1[1] == verts2[0]);\n\t\tequalVerts[4] = (verts1[1] == verts2[1]);\n\t\tequalVerts[5] = (verts1[1] == verts2[2]);\n\t\tequalVerts[6] = (verts1[2] == verts2[0]);\n\t\tequalVerts[7] = (verts1[2] == verts2[1]);\n\t\tequalVerts[8] = (verts1[2] == verts2[2]);\n\t\tint eqto1in1 = 0, eqto1in2 = 0, eqto2in1 = 0, eqto2in2 = 0;\n\t\tint i;\n\t\tfor (i = 0; i < 9; i++)\n\t\t{\n\t\t\tif (equalVerts[i])\n\t\t\t{\n\t\t\t\teqto1in1 = i / 3;\n\t\t\t\teqto1in2 = i % 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor (i = 8; i >= 0; i--)\n\t\t{\n\t\t\tif (equalVerts[i])\n\t\t\t{\n\t\t\t\teqto2in1 = i / 3;\n\t\t\t\teqto2in2 = i % 3;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tretverts[0] = verts1[eqto1in1];\n\t\tretverts[1] = verts1[eqto2in1];\n\t\tint lone1, lone2;\n\t\tif (eqto1in1 == 0)\n\t\t{\n\t\t\tif (eqto2in1 == 1)\n\t\t\t\tlone1 = 2;\n\t\t\telse // eqto2in1 == 2\n\t\t\t\tlone1 = 1;\n\t\t}\n\t\telse if (eqto1in1 == 1)\n\t\t{\n\t\t\tif (eqto2in1 == 0)\n\t\t\t\tlone1 = 2;\n\t\t\telse // eqto2in1 == 2\n\t\t\t\tlone1 = 0;\n\t\t}\n\t\telse // eqto1in1 == 2\n\t\t{\n\t\t\tif (eqto2in1 == 0)\n\t\t\t\tlone1 = 1;\n\t\t\telse // eqto2in1 == 1\n\t\t\t\tlone1 = 0;\n\t\t}\n\t\tif (eqto1in2 == 0)\n\t\t{\n\t\t\tif (eqto2in2 == 1)\n\t\t\t\tlone2 = 2;\n\t\t\telse // eqto2in2 == 2\n\t\t\t\tlone2 = 1;\n\t\t}\n\t\telse if (eqto1in2 == 1)\n\t\t{\n\t\t\tif (eqto2in2 == 0)\n\t\t\t\tlone2 = 2;\n\t\t\telse // eqto2in2 == 2\n\t\t\t\tlone2 = 0;\n\t\t}\n\t\telse // eqto1in2 == 2\n\t\t{\n\t\t\tif (eqto2in2 == 0)\n\t\t\t\tlone2 = 1;\n\t\t\telse // eqto2in2 == 1\n\t\t\t\tlone2 = 0;\n\t\t}\n\t\tretverts[2] = verts1[lone1];\n\t\tretverts[3] = verts2[lone2];\n\t\treturn retverts;\n\t}", "public Triangle (double x1,double y1,double x2, double y2,double x3,double y3)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(x3,y3);\r\n }", "public List<Triangle2D> tesselatePolygon(Polygon2D poly);", "protected abstract Triangle makeTriangle(final Vector3d edge1, final Vector3d edge2,\n\t\t\tfinal Vector3d edge3);", "public Vector2f[] generatePatch(){\n\t\tVector2f[] vertices = new Vector2f[16];\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0);\n\t\tvertices[index++] = new Vector2f(0.333f,0);\n\t\tvertices[index++] = new Vector2f(0.666f,0);\n\t\tvertices[index++] = new Vector2f(1,0);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.333f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.333f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.333f);\n\t\tvertices[index++] = new Vector2f(1,0.333f);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.666f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.666f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.666f);\n\t\tvertices[index++] = new Vector2f(1,0.666f);\n\t\n\t\tvertices[index++] = new Vector2f(0,1);\n\t\tvertices[index++] = new Vector2f(0.333f,1);\n\t\tvertices[index++] = new Vector2f(0.666f,1);\n\t\tvertices[index++] = new Vector2f(1,1);\n\t\t\n\t\treturn vertices;\n\t}", "@Override\n public void printFigure() {\n System.out.println(\"It is triangular prism\");\n }", "@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\r\n\t}", "public void rasterizeTriangles(VrState state);", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public abstract Vector2[] getVertices();", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public ShapeTriMesh() {\n\t\tsuper();\n\t\tthis.setName(UUID.randomUUID().toString());\n\t}", "private static Array<Vector2>[] sliceByOneSide(PolygonShape shape, Vector2 p1, Vector2 p2){\n\t\tVector2[] polyPoints = PolyUtils.getVertices(shape);\n\t\tArray<Vector2> leftVerticies = new Array<>();\n\t\tArray<Vector2> rightVerticies = new Array<>();\n\t\tleftVerticies.add(new Vector2(p1));\n\t\tleftVerticies.add(new Vector2(p2));\n\t\trightVerticies.add(new Vector2(p1));\n\t\trightVerticies.add(new Vector2(p2));\n\n\n\t\tfor (Vector2 vertex : polyPoints) {\n\t\t\tif (det(p1, p2, vertex) > 0){\n\t\t\t\tleftVerticies.add(vertex);\n\t\t\t} else {\n\t\t\t\trightVerticies.add(vertex);\n\t\t\t}\n\t\t}\n\n\t\tleftVerticies = arrangeClockwise(leftVerticies);\n\t\trightVerticies = arrangeClockwise(rightVerticies);\n\t\treturn (Array<Vector2>[]) new Array[]{leftVerticies, rightVerticies};\n\t}", "public void makeCylinder (float radius, int radialDivisions, int heightDivisions)\r\n {\r\n \t// Midpoint for top and bottom surfaces\r\n \tPoint midTop = new Point( 0f, 0.5f, 0f);\r\n \tPoint midBot = new Point( 0f, -0.5f, 0f );\r\n \t\r\n \tPoint upper[] = new Point[radialDivisions + 1];\r\n \tPoint lower[] = new Point[radialDivisions + 1];\r\n \t\r\n \t// Calculate x and z coordinates using parametric equations\r\n \t// Top circular surface\r\n \tfor(int i = 0; i <= radialDivisions; i ++)\r\n \t{\r\n \t\tupper[i] = new Point();\r\n \t\t\r\n \t\tupper[i].x = radius * (float)( Math.cos( Math.toRadians((360.0/radialDivisions ) * i ) ) );\r\n \t\tupper[i].z = radius * (float)( Math.sin( Math.toRadians((360.0/radialDivisions ) * i ) ) );\r\n \t\tupper[i].y = 0.5f;\r\n \t\t\r\n \t}\r\n \t\r\n \t// Bottom circle\r\n \tfor(int i = 0; i <= radialDivisions; i ++)\r\n \t{\r\n \t\tlower[i] = new Point();\r\n \t\t\r\n \t\tlower[i].x = radius * (float)( Math.cos( ( Math.toRadians(360.0/radialDivisions * ( i ) ) ) ) );\r\n \t\tlower[i].z = radius * (float)( Math.sin( ( Math.toRadians(360.0/radialDivisions * ( i ) ) ) ) );\r\n \t\tlower[i].y = -0.5f;\r\n \t\t\r\n \t}\r\n \t\r\n \t// Print both the top and bottom circular faces\r\n \tfor( int i = 0; i < radialDivisions; i ++ )\r\n \t{\r\n \t\tthis.addTriangle(midTop.x, midTop.y, midTop.z, upper[i + 1].x, upper[i + 1].y, upper[i + 1].z, upper[i].x, upper[i].y, upper[i].z);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i < radialDivisions; i ++ )\r\n \t{\r\n \t\tthis.addTriangle(midBot.x, midBot.y, midBot.z, lower[i].x, lower[i].y, lower[i].z, lower[i + 1].x, lower[i + 1].y, lower[i + 1].z);\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \t// Curved Surface\r\n \tfloat v = -0.5f;\r\n \t\r\n \tfloat vert[] = new float[heightDivisions + 1];\r\n \t\r\n \tfor( int i = 0; i <= heightDivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)heightDivisions);\r\n \t}\r\n \t\r\n \t// Display the curved surface faces\r\n \tfor( int j = 0; j < heightDivisions; j ++ )\r\n \t\tfor(int k = 0; k < radialDivisions; k ++ )\r\n \t\t{\r\n \t\t\tif( k == radialDivisions - 1 )\r\n \t\t\t{\r\n \t\t\t\tPoint tempP1 = new Point(lower[k].x, vert[j], lower[k].z);\r\n \t\t\t\tPoint tempP2 = new Point(lower[0].x, vert[j], lower[0].z);\r\n \t\t\t\tPoint tempP3 = new Point(lower[0].x, vert[j + 1], lower[0].z);\r\n \t\t\t\tPoint tempP4 = new Point(lower[k].x, vert[j + 1], lower[k].z);\r\n \t\t\t\t\r\n \t\t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP4.x, tempP4.y, tempP4.z, tempP3.x, tempP3.y, tempP3.z );\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP2.x, tempP2.y, tempP2.z);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tPoint tempP1 = new Point(lower[k].x, vert[j], lower[k].z);\r\n \t\t\t\tPoint tempP2 = new Point(lower[k + 1].x, vert[j], lower[k + 1].z);\r\n \t\t\t\tPoint tempP3 = new Point(lower[k + 1].x, vert[j + 1], lower[k + 1].z);\r\n \t\t\t\tPoint tempP4 = new Point(lower[k].x, vert[j + 1], lower[k].z);\r\n \t\t\t\t\r\n \t\t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP4.x, tempP4.y, tempP4.z, tempP3.x, tempP3.y, tempP3.z );\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP2.x, tempP2.y, tempP2.z);\r\n \t\t\t}\r\n \t\t}\r\n }", "public void drawPolygon (int xC, int yC, int xP, int yP,int ribs, Graphics g){\r\n \r\n \tint n = ribs; \r\n \t//delta keep the the original delta , this size of delta will increase in delta size each time.\r\n \tdouble delta = (2* Math.PI)/ n;\r\n \tdouble deltaTemp = delta;\r\n \t//List of Points that I keep during n rotation.\r\n \tList <Point> points; \r\n \tfloat x,y,newX,newY;\r\n \t//First Sliding\r\n \tx = xP - xC;\r\n \ty = yP - yC;\r\n \tnewX = x; \t\r\n \tnewY = y; \t\r\n \tList <Point> vertexs = new ArrayList();\r\n \t//Follow delta angle rotation n times and write a list of vertices to vertexs list.\r\n \tfor (int i = 0; i < n ; i++)\r\n \t{\r\n \t\tnewX = (int) ((x*Math.cos(delta) - y*Math.sin(delta)));\r\n \t\tnewY = (int) ((x*Math.sin(delta) + y*Math.cos(delta))); \r\n \t\tvertexs.add(new Point(Math.round(newX),Math.round(newY))); \t\r\n \t\tSystem.out.println(vertexs.get(i).x+\",\"+vertexs.get(i).y);\r\n \t\tdelta = delta + deltaTemp;\r\n \t}\r\n \t//Sliding back\r\n \tfor (int i = 0; i < vertexs.size(); i++ ){\r\n \t\tvertexs.get(i).x = (int) (vertexs.get(i).getX() + xC);\r\n \t\tvertexs.get(i).y = (int) (vertexs.get(i).getY() + yC);\r\n \t\tg.drawRect(vertexs.get(i).x, vertexs.get(i).y ,1,1);\r\n \t}\r\n \t//draw line between the list of the points we got.\r\n \tfor (int z = 0 ; z < vertexs.size(); z++){\r\n \t\tif (z == vertexs.size()-1)\r\n \t\t\tdrawLine((int) Math.round(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(0).getX()), (int)(vertexs.get(0).getY()),g);\r\n \t\telse\r\n \t\t\tdrawLine((int)(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(z+1).getX()), (int)(vertexs.get(z+1).getY()),g);\r\n\r\n \t\t}\r\n \t\r\n }", "public PosicionVertice[] getVertices(PosicionVertice rpv[]) {\n \n // inicializacion\n rpv = (rpv == null) ? new PosicionVertice[2] : rpv;\n for (int i=0; i<rpv.length; i++) {\n rpv[i] = (rpv[i] == null) ? new PosicionVertice() : rpv[i];\n }\n normaliza();\n \n switch(getOrientacion()) {\n case Este:\n rpv[0].setPos(getX(), getY()-1);\n rpv[0].setOrientacion(OrientacionVertice.Sur);\n rpv[1].setPos(getX()+1, getY());\n rpv[1].setOrientacion(OrientacionVertice.Norte);\n break;\n case NorEste:\n rpv[0].setPos(getX(), getY());\n rpv[0].setOrientacion(OrientacionVertice.Norte);\n rpv[1].setPos(getX(), getY()-1);\n rpv[1].setOrientacion(OrientacionVertice.Sur);\n break; \n case NorOeste:\n rpv[0].setPos(getX(), getY());\n rpv[0].setOrientacion(OrientacionVertice.Norte);\n rpv[1].setPos(getX()-1, getY());\n rpv[1].setOrientacion(OrientacionVertice.Sur);\n break; \n }\n return rpv;\n }", "void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);", "Triangle (double side1, double side2, double side3){\n this.side1 = side1;\n this.side2 = side2;\n this.side3 = side3;\n }", "public MPolygon computeVertex_xyz(FOV f) {\r\n\r\n\t\tMPolygon mpolygon = new MPolygon();\r\n\r\n\t\tdouble radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2));\r\n\t\tdouble radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4));\r\n\t\tdouble radian3 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 4));\r\n\t\tdouble radian4 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 2));\r\n\t\tdouble radianD = MPolygon.toRadian(450 - f.getDirection());\r\n\r\n\t\tMPoint p1 = new MPoint();\r\n\t\tp1.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\t\tp1.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\r\n\t\tMPoint p2 = new MPoint();\r\n\t\tp2.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\t\tp2.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\r\n\t\tMPoint p3 = new MPoint();\r\n\t\tp3.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\t\tp3.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\r\n\t\tMPoint p4 = new MPoint();\r\n\t\tp4.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\t\tp4.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\r\n\t\tMPoint D = new MPoint();\r\n\t\tD.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\t\tD.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\r\n\t\tMPoint location = new MPoint();\r\n\t\tlocation.x = f.getLatitude();\r\n\t\tlocation.y = f.getLongitude();\r\n\t\tmpolygon.setP1(p1);\r\n\t\tmpolygon.setP2(p2);\r\n\t\tmpolygon.setP3(p2);\r\n\t\tmpolygon.setP4(p4);\r\n\t\tmpolygon.setD(D);\r\n\t\tmpolygon.setLocation(location);\r\n\r\n\t\treturn mpolygon;\r\n\r\n\t}", "public Triangle(int width, int height, int perpendicular, int x, int y){\n super(x,y);\n setWidth(width);\n setHeight(height);\n setPerpendicular(perpendicular);\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"(Triangle \"+verts+\")\" ;\n\t}", "public Triangle() {\n setPointsAs0();\n S = 0;\n }", "protected void building(double xCoord, double yCoord, double len, double width, double height)\n {\n double x1 = (xCoord - (width/2)); // Low x\n double x2 = (xCoord + (width/2)); // High x\n double y1 = (yCoord - (len/2)); // Low y\n double y2 = (yCoord + (len/2)); // High y\n\n Vertex vertex1, vertex2, vertex3;\n\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n Vertex vert1, vert2, vert3;\n\n pos1 = new Triple(x1, y1, 0); \n pos2 = new Triple(x2, y1, 0); \n pos3 = new Triple(x2, y1, height);\n pos4 = new Triple(x1, y1, height);\n pos5 = new Triple(x1, y2, 0); \n pos6 = new Triple(x2, y2, 0); \n pos7 = new Triple(x2, y2, height);\n pos8 = new Triple(x1, y2, height);\n\n col1 = new Triple(1, 0, 0); \n col2 = new Triple(0, 1, 0); \n col3 = new Triple(0, 0, 1); \n col4 = new Triple(1, 0, 1); \n \n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos2, 0, 1), \n new Vertex(pos3, 1, 1), \n\t\t\t\t 25 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 25 ) );\n \n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos5, 0, 1), \n new Vertex(pos8, 1, 1),\n 26 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 26 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0), \n new Vertex(pos6, 0, 1), \n new Vertex(pos7, 1, 1),\n 24 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos3, 1, 0), \n new Vertex(pos2, 0, 0),\n 24 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0), \n new Vertex(pos6, 0, 1), \n new Vertex(pos7, 1, 1),\n 27 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos8, 1, 0), \n new Vertex(pos5, 0, 0),\n 27 ) );\n\n // Top Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0), \n new Vertex(pos3, 0, 1), \n new Vertex(pos7, 1, 1),\n 28 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos8, 1, 0), \n new Vertex(pos4, 0, 0),\n 28 ) );\n }", "public Prism(int numSides) {\n this(numSides, RADIUS, HEIGHT);\n }", "public Mesh(String Path) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n \r\n ReadFile reader = new ReadFile(Path);\r\n String[] text = new String[0];\r\n try {\r\n text = reader.OpenFile();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Mesh.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (String text1 : text) {\r\n if (text1.length() > 0) {\r\n if (text1.charAt(0) == 'v') {\r\n text1 = text1.replaceAll(\"v\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n vertices.add(new Vertex(Double.valueOf(tmp[0]), Double.valueOf(tmp[1]), Double.valueOf(tmp[2])));\r\n }\r\n } else if (text1.charAt(0) == 'f') {\r\n text1 = text1.replaceAll(\"f\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n tris.add(new Triangle(vertices.get(Integer.valueOf(tmp[0]) - 1), vertices.get(Integer.valueOf(tmp[1]) - 1), vertices.get(Integer.valueOf(tmp[2]) - 1)));\r\n }\r\n }\r\n } else {\r\n //do nothing\r\n }\r\n }\r\n }", "private Mesh createMesh(final int pTrianglesCount) {\n\t\tfinal int pSpeed \t\t\t= 20;\n\t\tfinal int pVertexCount\t \t= Mesh.VERTEX_SIZE * pTrianglesCount * 3; \t\n\t\tfinal float pColor \t\t\t= new Color(0f,0f,0f).getABGRPackedFloat();\n\t\tfinal float pSegmentWidth \t= CAMERA_WIDTH/pTrianglesCount;\n\t\tfinal float[] pBufferData \t= new float[pVertexCount];\t\n\t\t\n\t\tmHeightOffsetCurrent = new float[pVertexCount];\t\t\n\t\t\n\t\t//create triangles \n\t\t// A--B\n\t\t// \\ |\n\t\t// \\|\n\t\t// C\n\t\t//\n\t\tint i = 0;\n\t\tfloat x = 0f;\n\t\tfinal float pInitialHeight = 400;\n\t\tfor (int triangleIndex = 0;triangleIndex<pTrianglesCount;triangleIndex++){\n\t\t\t //first triangle \n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = 0;\t\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\t\n\t\t\t \n\t\t\t i = i+3;\n\t\t\t x = x+pSegmentWidth;\n\t\t }\n\t\t \n\t\tfinal VertexBufferObjectManager VBOM = getVertexBufferObjectManager();\n\t\tfinal HighPerformanceMeshVertexBufferObject pMeshVBO = new HighPerformanceMeshVertexBufferObject(VBOM, pBufferData, pBufferData.length, DrawType.DYNAMIC, true, Mesh.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT);\n\t\t\n//\t\tpMesh = new Mesh(0, 0,pVertexCount,DrawMode.TRIANGLES,pMeshVBO){\t\t\n//\t\t\t\n//\t\t\tfloat progress_x = 0;\n//\t\t\t\n//\t\t\t@Override\n//\t\t protected void onManagedUpdate(final float pSecondsElapsed) { \n//\t\t\t\tsuper.onManagedUpdate(pSecondsElapsed);\n//\t\t\t\tdrawBySine(pSecondsElapsed);\n//\t\t this.mMeshVertexBufferObject.setDirtyOnHardware(); // include this line\n//\t\t progress_x+=(pSpeed*pSecondsElapsed);\n//\t\t };\n//\t\t\t\n//\t\t\tvoid drawBySine(final float pSecondsElapsed){\n//\t\t\t\tfinal float[] pBuff = pMeshVBO.getBufferData();\n//\t\t\t\tfor (int i = 0;i<((pTrianglesCount)*3);i++){ //FIRST part of triangles \n//\t\t\t\t\tif (i%3==0||i==0||((i-1)%3==0)){\n//\t\t\t\t\t\t//every vertex (v0) of triangle must be connected to previous triangle at second vertex (v1) to prevent stairs\n//\t\t\t\t\t\tif (i%3==0&&i>0){ \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = mHeightOffsetCurrent[i-2];\n//\t\t\t\t\t\t} else { \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = getNormalizedSine(i+progress_x, mTouchY, pTrianglesCount*3);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} \n//\t\t\t\t\tpBuff[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = mHeightOffsetCurrent[i];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\tfloat getNormalizedSine(float x, float halfY, float maxX) {\t\n//\t\t\t double factor = (2 * Math.PI) / maxX;\n//\t\t\t return (float) ((Math.sin(x * factor) * halfY) + halfY);\n//\t\t\t}\n//\t\t\t\n//\t\t};\n\t\treturn pMesh;\n\t}", "public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }", "public List<ga_Triangle2D> tesselatePolygon(ga_Polygon poly);", "public ColinearTrioV2() {\n\t\tthis(generateRandomPointArray());\n\t}", "public Triangles()\n {\n this.triangles = new ArrayList<>();\n }", "public Triangle(int width, int height, int perpendicular) {\n this(width,height,perpendicular,0,0);\n }", "public static ArrayList<Triangle> Triangulation(ArrayList<Point> points){\n\t\t\n\t\t\n\t\t\n\t\tpoints.sort(new PointComperator());\n\t\tpoints.add(MainFrame.buutomLeft);\n\t\tStack<Point> CH= new Stack<Point>();\n\t\tArrayList<Triangle> T=new ArrayList<Triangle>();\n\t\tCH.push(MainFrame.buutomLeft);\n\t\tCH.push(points.get(0));\n\t\tCH.push(points.get(1));\n\t\t\n\t\tfor (int i = 0; i < points.size(); i++) {\n\t\t\tPoint curr=points.get(i);\n\t\t\tif(Orient(CH.get(CH.size()-2),CH.peek(), curr))\n\t\t\t{\n\t\t\t\tT.add(new Triangle(curr, CH.peek(), MainFrame.buutomLeft));\n\t\t\t\tCH.push(curr);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tT.add(new Triangle(CH.peek(), curr, MainFrame.buutomLeft));\n\n\t\t\t\twhile(!Orient(CH.get(CH.size()-2),CH.peek(),curr)) {\n\t\t\t\t\tPoint temp = CH.pop();\n\t\t\t\t\tT.add(new Triangle(temp, CH.peek(), curr));\n\t\t\t\t}\n\t\t\t\tCH.push(curr);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn T;\n\t}", "public Triangle(\n IPoint firstPoint,\n IPoint secondPoint,\n IPoint thirdPoint,\n IPrimitive parent)\n {\n super(parent);\n this.addVertex(firstPoint);\n this.addVertex(secondPoint);\n this.addVertex(thirdPoint);\n\n }", "public TriangleBumper(Double x,Double y,Double orientation,List<Gadget>triggeredGadgets){\n this.x = x;\n this.y = y;\n this.collideCirc = new ArrayList<Circle>(); //corner that ball will collide with\n this.collideLine = new ArrayList<LineSegment>(); //side that ball will collide with\n this.orientation = orientation;\n this.triggeredGadgets = new ArrayList<>();\n for (Gadget gadget : triggeredGadgets){\n this.triggeredGadgets.add(gadget);\n }\n //circle at each corner\n //line segment at each side\n if(this.orientation == 0.0){\n this.circles = Arrays.asList(new Circle(x,y,0.0), new Circle(x, y+1, 0.0), new Circle(x+1, y, 0.0));\n this.lines = Arrays.asList(new LineSegment(x+1, y, x, y+1), new LineSegment(x, y, x, y+1), new LineSegment(x,y, x+1, y));\n }else if (this.orientation == 90.0){\n this.circles = Arrays.asList(new Circle(x,y,0.0), new Circle(x+1, y, 0.0), new Circle(x+1, y+1,0.0));\n this.lines = Arrays.asList(new LineSegment(x, y, x+1, y), new LineSegment(x+1, y, x+1, y+1), new LineSegment(x,y, x+1, y+1));\n }else if (this.orientation == 180.0){\n this.circles = Arrays.asList(new Circle(x,y+1, 0.0), new Circle(x+1, y, 0.0), new Circle(x+1, y+1, 0.0));\n this.lines = Arrays.asList(new LineSegment(x, y+1, x+1, y), new LineSegment(x+1, y, x+1, y+1), new LineSegment(x+1, y+1, x, y+1));\n }else{\n this.circles = Arrays.asList(new Circle(x,y,0.0), new Circle(x, y+1, 0.0), new Circle(x+1, y+1, 0.0));\n this.lines = Arrays.asList(new LineSegment(x,y,x, y+1), new LineSegment(x,y+1, x+1, y+1), new LineSegment(x+1, y+1, x, y));\n }\n checkRep();\n\n }", "public TriangleStripGenerator2d(final int rowLength, final boolean reverseOrder) {\n\t\ttriangs = new LinkedList<Triangle>();\n\t\tthis.reverseOrder = reverseOrder;\n\t\tlastRow = null;\n\t\tcurrentRow = new Vector3d[rowLength];\n\t\trowIndex = 0;\n\t}", "public List<Point2D> getConcentricTriangleTips(List <Voter> voters, int repPerDistrict)\n {\n numVoters = voters.size();\n\n int numTriangles;\n if (repPerDistrict == 1)\n numTriangles = 12;\n else if (repPerDistrict == 3)\n numTriangles = 5;\n else\n return null;\n\n List<Point2D> triTips = new ArrayList<Point2D>();\n List<Polygon2D> triangles = new ArrayList<Polygon2D>();\n final double centerX = 500;\n final double centerY = 500*Math.tan(Math.PI/6);\n final double cos30 = Math.cos(Math.PI/6);\n final double sin30 = Math.sin(Math.PI/6);\n\n // Distance between vertices of triangle to center\n // TODO: Use a binary search algorithm instead of step; too slow\n double distFromCenter = 0;\n double step = 0.5;\n\n // Find most inner triangle\n Polygon2D innerTriangle;\n int innerVoterCount;\n double topX, topY, leftX, rightX, botY;\n\n do {\n distFromCenter += step;\n\n topX = centerX;\n topY = centerY + distFromCenter;\n\n leftX = centerX - distFromCenter*cos30;\n rightX = centerX + distFromCenter*cos30;\n\n botY = centerY - distFromCenter*sin30;\n\n innerTriangle = new Polygon2D();\n innerTriangle.append(topX, topY);\n innerTriangle.append(leftX, botY);\n innerTriangle.append(rightX, botY);\n // System.out.println(topY);\n\n innerVoterCount = Run.countInclusion(voters, innerTriangle);\n } while (needsMoreVoters(innerVoterCount));\n System.out.println(\"found inner triangle\");\n System.out.println(innerVoterCount);\n\n triangles.add(innerTriangle);\n triTips.add(new Point2D.Double(topX, topY));\n\n // Draw numTriangles-1 more triangles around it, each with 20/22 districts\n Polygon2D triangle;\n int voterCount;\n\n for (int i = 0; i < numTriangles - 2; i++) {\n do {\n distFromCenter += step;\n\n topX = centerX;\n topY = centerY + distFromCenter;\n\n leftX = centerX - distFromCenter*cos30;\n rightX = centerX + distFromCenter*cos30;\n\n botY = centerY - distFromCenter*sin30;\n\n triangle = new Polygon2D();\n triangle.append(topX, topY);\n triangle.append(leftX, botY);\n triangle.append(rightX, botY);\n\n voterCount = Run.countInclusion(voters, triangle);\n System.out.println(topY);\n } while (needsMoreVoters(voterCount - innerVoterCount, repPerDistrict == 3 ? 20:22));\n System.out.println(\"found an outer triangle\");\n System.out.println(voterCount - innerVoterCount);\n\n innerVoterCount = voterCount;\n triangles.add(triangle);\n triTips.add(new Point2D.Double(topX, topY));\n }\n\n // Last outer triangle; not necessary but keeping the code for completeness\n Polygon2D outerTriangle = new Polygon2D();\n outerTriangle.append(topX, 500*Math.sqrt(3));\n outerTriangle.append(0, 0);\n outerTriangle.append(1000, 0);\n voterCount = Run.countInclusion(voters, outerTriangle);\n\n System.out.println(\"found an outer triangle\");\n System.out.println(voterCount - innerVoterCount);\n\n triangles.add(outerTriangle);\n triTips.add(new Point2D.Double(topX, 500*Math.sqrt(3)));\n\n return triTips;\n }", "void computeTriangleNormals();", "private void createWVertices() {\n\t\tfor (int i = 0; i < this.numWVertices; i++) {\n\t\t\tvertices.add(new Vertex('w', this.countWID++));\n\t\t}\n\t}", "public void triangle(){\n Shape triangle = new Shape();\n triangle.addPoint(new Point(0,0));\n triangle.addPoint(new Point(6,0));\n triangle.addPoint(new Point(3,6));\n for (Point p : triangle.getPoints()){\n System.out.println(p);\n }\n double peri = getPerimeter(triangle);\n System.out.println(\"perimeter = \"+peri);\n }", "int getVertices();", "public Triangle() { \n super(\"Triangle: \");\n this.setP1(new Point());\n this.setP2(new Point());\n this.setP3(new Point());\n }", "Vertex createVertex();", "public Voronoi(int dim);", "public static void main(String[] args) {\n double[] xCoordinates = new double[] {0.0, 0.5, 1.0};\n double[] yCoordinates = new double[] {0.0, Math.sqrt(3)/2, 0.0};\n int n = Integer.parseInt(args[0]);\n double length = 1.0;\n StdDraw.polygon(xCoordinates, yCoordinates);\n // this will create the outlined triangle\n // now we must call the sierpinksi triangle to actually fill it so \n // we use \n sierpinski(n, 0.5, 0, length/2);\n // the x coordinates will be at the midpoint of the base therefore x is x/2 and y remains zero. \n //length will also change because you are beginning the function from the middle of the triangle's base\n\t// WRITE YOUR CODE HERE \n }", "public void makeSphere (float radius, int slices, int stacks)\r\n {\r\n \t\r\n \tPoint lower[][] = new Point[stacks + 1][slices + 1];\r\n \tfloat rad[] = new float[stacks + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for each stack\r\n \tfor(int i = 0; i <= stacks; i ++)\r\n \t{\r\n \t\trad[i] = (float)Math.sqrt((0.5f * 0.5f) - (( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) * ( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) ));\r\n\t\t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Calculate the vertices for each stack\r\n \tfor(int i = 0; i <= stacks; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= slices; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for the next stack\r\n \t\tvert += (1.0f / (float)stacks);\r\n \t}\r\n \t\r\n \t\r\n \t// Print all the triangles using the vertices\r\n \tfor(int i = 0 ; i < stacks; i++)\r\n \t\tfor(int j = 0 ; j < slices; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t}\r\n }", "public SVCustom build(){\n if(this.disks < 1) return new SVCustom();\n SVCustom s = new SVCustom(new Point(100, (int)Math.pow(2, this.disks)*104 - 52));\n int left[] = new int[]{0,1};\n int right[] = new int[]{1,2};\n int bottom[] = new int[]{0,2};\n SierpinskiTriangle t = new SierpinskiTriangle(0,this.disks,this.disks-1, left, right, bottom, buildInitial(this.disks));\n s.setAttribute(\"font-family\", \"Arial\");\n s.addContent(t, \"Triangle\");\n return s;\n }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public void testCreateMeshFactory() {\r\n SXRContext sxrContext = TestDefaultSXRViewManager.mSXRContext;\r\n assertNotNull(sxrContext.createQuad(11, 22));\r\n }", "public Polytope(PolytopePoint a, PolytopePoint b, PolytopePoint c, PolytopePoint d){\n\t\tfaces = new ArrayList<PolytopeTriangle>();//construct array list to hold the faces of the polytope\n\t\t//construct the initial faces of the polytope using the given vertices that are from the simplex\n\t\t//GJK terminated with\n\t\tfaces.add(new PolytopeTriangle(a,b,c));\n\t\tfaces.add(new PolytopeTriangle(a,c,d));\n\t\tfaces.add(new PolytopeTriangle(a,d,b));\n\t\tfaces.add(new PolytopeTriangle(b,d,c));\n\t}", "public int getTriangleCount();", "public TripsFragment() {\n }", "public static InterleavedVertexBuffer createInterleavedRightTriangleWithColor() {\n InterleavedVertexBuffer.Builder right = new InterleavedVertexBuffer.Builder(BufferUsage.STATIC);\n right.add(\"a_Pos\", new VerticesData(BufferTestUtil.createTriangleData(0.5f, 0.5f, 0.5f, 0)));\n right.add(\"a_Color\", new ColorData(BufferTestUtil.createColors()));\n return right.build();\n }", "public ArrayList<Triangle> getOccluderVertexData();", "private void drawTriangle(GL2 gl2, int x1, int y1, int x2, int y2, int x3, int y3, int r, int g, int b)\n {\n gl2.glBegin(GL2.GL_TRIANGLES);\n gl2.glColor3f(r, g, b);\n gl2.glVertex2f(x1, y1);\n gl2.glVertex2f(x2, y2);\n gl2.glVertex2f(x3, y3);\n gl2.glEnd();\n }", "public Triangle(double side1, double side2, double side3) {\n\t\tthis.side1 = side1;\n\t\tthis.side2 = side2;\n\t\tthis.side3 = side3;\n\t}", "private void createVertices(int iX, int iY, int iXO, int iYO, int num, int increment) {\n int y = iY;\n if (num == 0 && increment == 0) {\n BracketNode last = new BracketNode(\"\", iX, y - 20, iXO, 20);\n nodes.add(last);\n getChildren().addAll(new Line(iX, iY, iX + iXO, iY), last);\n last.setName(currentBracket.getBracket().get(location));\n bracketMap.put(last, location);\n nodeMap.put(location, last);\n } else {\n ArrayList<BracketNode> aNodeList = new ArrayList<>();\n for (int i = 0; i < num; i++) {\n Point2D tl = new Point2D(iX, y);\n Point2D tr = new Point2D(iX + iXO, y);\n Point2D bl = new Point2D(iX, y + iYO);\n Point2D br = new Point2D(iX + iXO, y + iYO);\n BracketNode nTop = new BracketNode(\"\", iX, y - 20, iXO, 20);\n aNodeList.add(nTop);\n nodes.add(nTop);\n BracketNode nBottom = new BracketNode(\"\", iX, y + (iYO - 20), iXO, 20);\n aNodeList.add(nBottom);\n nodes.add(nBottom);\n Line top = new Line(tl.getX(), tl.getY(), tr.getX(), tr.getY());\n Line bottom = new Line(bl.getX(), bl.getY(), br.getX(), br.getY());\n Line right = new Line(tr.getX(), tr.getY(), br.getX(), br.getY());\n getChildren().addAll(top, bottom, right, nTop, nBottom);\n isTop = !isTop;\n y += increment;\n }\n ArrayList<Integer> tmpHelp = helper(location, num);\n for (int j = 0; j < aNodeList.size(); j++) {\n //System.out.println(currentBracket.getBracket().get(tmpHelp.get(j)));\n aNodeList.get(j).setName(currentBracket.getBracket().get(tmpHelp.get(j)));\n bracketMap.put(aNodeList.get(j), tmpHelp.get(j));\n nodeMap.put(tmpHelp.get(j), aNodeList.get(j));\n //System.out.println(bracketMap.get(aNodeList.get(j)));\n }\n }\n\n }", "public interface ITriangleMesh {\n /**\n * Add a new vertex (given by position) to the vertex list. The new vertex is\n * appended to the end of the list.\n */\n int addVertex(Vector position);\n\n /**\n * Index in vertex list.\n */\n Vertex getVertex(int index);\n\n int getNumberOfVertices();\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);\n\n /**\n * Add a new triangle to the mesh with the vertex indices a, b, c. The index\n * of the first vertex is 0.\n */\n void addTriangle(AbstractTriangle t);\n\n int getNumberOfTriangles();\n\n AbstractTriangle getTriangle(int triangleIndex);\n\n /**\n * Clear mesh - remove all triangles and vertices.\n */\n void clear();\n\n /**\n * Compute the triangles normals.\n */\n void computeTriangleNormals();\n\n\n Vector getTextureCoordinate(int index);\n\n /**\n * Add texture coordinate to mesh.\n */\n void addTextureCoordinate(Vector t);\n\n /**\n * Return the number of texture coordinates in the mesh.\n */\n int getNumberOfTextureCoordinates();\n\n /**\n * Set color to all triangles and all vertices of the mesh.\n */\n void setColor(Vector color);\n}", "public static void main(String[] args) {\n\t\t\r\n\t\tTriangle t=new Triangle();\r\n\t\tt.draw();\r\n\t\t\r\n\t\tRectangle r= new Rectangle();\r\n\t\tr.draw();\r\n\t\t\r\n\t\tShape s = new Triangle();\r\n\t\ts.name=\"삼각형\";\r\n\t\ts.degree=60;\r\n\t\ts.drawLine();\r\n\t\ts.draw();//Shape의 draw() 호출되지않고 Triangle의 draw() 호출됨 \r\n\t\t/*\r\n\t\ts.dot=\"\";\r\n\t\ts.angleDegree=180;\r\n\t\ts.drawCoordinate();\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t}", "public Triangle(Point p1, Point p2, Point p3) {\n this.p1 = p1;\n this.p2 = p2;\n this.p3 = p3;\n this.path = buildPath();\n }", "public EquilateralTriangle(double length) {\n super(\"Equilateral Triangle\", 3, length);\n }", "public Triangle (int x, int y, int z){ \r\n \r\n \r\n }", "public Polygon getTriangle() {\n\n Matrix4 normalProjection = new Matrix4().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n\n spriteDebugger.setProjectionMatrix(normalProjection);\n spriteDebugger.begin(ShapeRenderer.ShapeType.Line);\n spriteDebugger.polygon(getLine().getVertices());\n spriteDebugger.setColor(Color.PURPLE);\n spriteDebugger.end();\n\n spriteDebugger.end();\n return getLine();\n }", "public TriangleGizmo(String name, double x1, double y1) {\n\t\t\tdouble w = 20;\n\t\t\tdouble h = 20;\n\t\t\txpos1 = x1*20;\n\t\t\txpos2 = (x1*20) + w;\n\t\t\txpos3 = xpos2;\n\t\t\typos1 = y1*20;\n\t\t\typos2 = y1*20;\n\t\t\typos3 = ypos2 + h;\n\t\t\twidth = w;\n\t\t\theight = h;\n\t\t\tcolour = Color.WHITE;\n\t\t\tls1 = new LineSegment(x1*20, y1*20, xpos2, ypos2);\n\t\t\tls2 = new LineSegment(xpos2, ypos2, xpos3, ypos3);\n\t\t\tls3 = new LineSegment(x1*20, y1*20, xpos3, ypos3);\n\t\t\tsetName(name);\n\t\t}", "private void paint(int sideLength) {\n\n float fac = randomStart;\n while (sideLength >= 2) {\n\n for (int py = 0; py < _height; py += sideLength) {\n for (int px = 0; px < _width; px += sideLength) {\n // fetch corner colors\n float c1 = mono[repeat(px, py, _width, _height)];\n float c3 = mono[repeat(px + sideLength, py, _width, _height)];\n float c7 = mono[repeat(px, py + sideLength, _width, _height)];\n float c9 = mono[repeat(px + sideLength, py + sideLength, _width,\n _height)];\n\n int shortX = px / sideLength; \n int shortY = py / sideLength; \n \n \n float c2 = (c1 + c3) / 2 + calcFac(fac, shortX, shortY);\n float c4 = (c1 + c7) / 2 + calcFac(fac, shortX, shortY);\n float c5 = (c1 + c3 + c7 + c9) / 4 + calcFac(fac, shortX, shortY);\n\n mono[repeat(px + sideLength / 2, py, _width, _height)] = c2;\n mono[repeat(px, py + sideLength / 2, _width, _height)] = c4;\n mono[repeat(px + sideLength / 2, py + sideLength / 2, _width, _height)] = c5;\n }\n }\n\n fac = fac * randomFactor + randomSummand;\n\n sideLength /= 2;\n }\n }", "public void convertInTriangles(final @NotNull Vertex... polygon)\n {\n if ((polygon == null) || (polygon.length < 3))\n {\n return;\n }\n\n final int length = polygon.length;\n final Vertex first = polygon[0];\n\n for (int i = 2; i < length; i++)\n {\n this.triangles.add(new Triangle(first, polygon[i - 1], polygon[i]));\n }\n }", "public static Tensor of(int n, Scalar s_hi, Scalar s_lo) {\n int n2 = n * 2;\n Tensor polygon = Tensors.empty();\n Scalar[] rad = new Scalar[] { s_hi, s_lo };\n int count = 0;\n for (Tensor u : CirclePoints.of(2 * n2))\n polygon.append(u.multiply(rad[count++ % 2]));\n return polygon;\n }", "public String toString(){\n return \"Triangle: side1 = \" + side1 + \" side2 = \" + side2 + \" side3 = \" + side3;\n }", "private List<TriangleBatch> loadTriangles(URL filePath) {\r\n\t\ttriangleStrips = new ArrayList<TriangleBatch>();\r\n\t\tFile fi;\r\n\t\ttry {\r\n\t\t\tfi = new File(filePath.toURI());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (fi == null || !fi.canRead()) {\r\n\t\t\t\tthrow new OMTException(\"Can't open ABEMesh! \" + fi.toString(), null);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tFileInputStream file = new FileInputStream(fi);\r\n\t\t\t\r\n\t\t\t//read number of points (stored as unsigned int)\r\n\t\t\tbyte[] numberOfPoints = new byte[BitMath.sizeOfUnsignedInt];\r\n\t\t\tfile.read(numberOfPoints);\r\n\t\t\tnumOfPoints = BitMath.convertByteArrayToInt(numberOfPoints);\r\n\t\t\t\r\n\t\t\t//read points\r\n\t\t\t//3 floats for normals followed by 3 floats for coordinates per point\r\n\t\t\tpoints = new byte[BitMath.sizeOfFloat * 6 * numOfPoints];\r\n\t\t\tfile.read(points);\r\n\r\n\t\t\t\r\n\t\t\t//read number of triangle strips\r\n\t\t\tbyte[] numberOfTriangleStrips = new byte[BitMath.sizeOfUnsignedInt];\r\n\t\t\tfile.read(numberOfTriangleStrips);\r\n\t\t\t\r\n\t\t\tthis.processNormalsAndVertices();\r\n\t\t\t\r\n\t\t\t//read triangle strips\r\n\t\t\tint numberOfTriStrips = BitMath.convertByteArrayToInt(numberOfTriangleStrips);\r\n\r\n\t\t\tfor (int i = 0; i < numberOfTriStrips; i++) {\r\n\t\t\t\t\r\n\t\t\t\t//read number of points in the strip\r\n\t\t\t\tbyte[] numberOfPointsInStrip = new byte[BitMath.sizeOfUnsignedShort];\r\n\t\t\t\tfile.read(numberOfPointsInStrip);\r\n\t\t\t\t\r\n\t\t\t\t//read point indicies\r\n\t\t\t\tint numberOfPtsInStrip = BitMath.convertByteArrayToInt(numberOfPointsInStrip);\r\n\t\t\t\tbyte[] triangles = new byte[BitMath.sizeOfUnsignedInt * numberOfPtsInStrip];\r\n\t\t\t\tfile.read(triangles);\r\n\t\t\t\t\r\n\t\t\t\tif (numberOfPtsInStrip > 0) {\r\n\t\t\t\t\ttriangleStrips.add(createTriangleStrip(numberOfPtsInStrip, triangles));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn triangleStrips;\r\n\t}", "public Triangle() {\n\t\tsuper();\n\t\tthis.base = 0;\n\t\tthis.height = 0;\n\t\t\n\t}", "public String toString(){\n\t\treturn (\"this triangle has side 1 of length\"+side1+\"side 2 of length\"+side2+\"and side 3 of length\"+side3);\n\t}", "private void createMiniTriangles(int[] xPoints, int[] yPoints, int[] color) {\n\t\tint[] xMidpoints = new int[NUM_TRIANGLE_SIDES];\n\t\tint[] yMidpoints = new int[NUM_TRIANGLE_SIDES];\n\n\t\tfor (int i = 0; i < NUM_TRIANGLE_SIDES; i++) {\n\t\t\txMidpoints[i] = avg(xPoints[i], xPoints[(i + 1) % NUM_TRIANGLE_SIDES]);\n\t\t\tyMidpoints[i] = avg(yPoints[i], yPoints[(i + 1) % NUM_TRIANGLE_SIDES]);\n\t\t}\n\n\t\t// midpoint i, midpoint i+1, point i\n\t\tfor (int i = 0; i < NUM_TRIANGLE_SIDES; i++) {\n\t\t\tint[] xMini = {xMidpoints[i], xMidpoints[(i + TRI_TYPE) % NUM_TRIANGLE_SIDES], xPoints[i]};\n\t\t\tint[] yMini = {yMidpoints[i], yMidpoints[(i + TRI_TYPE) % NUM_TRIANGLE_SIDES], yPoints[i]};\n\t\t\tint colorVal = (i + this.rotateOffset) % NUM_TRIANGLE_SIDES;\n\t\t\tthis.drawMiniTriangle(xMini, yMini, color[colorVal], colorVal);\n\t\t}\n\t\tif (IS_ROT_ON) {\n\t\t\tthis.rotateOffset += ROT_OFFSET_BY;\n\t\t}\n\t}", "public Triangle() {\n this(0,0,0,0,0);\n }", "public Triangle(IPoint firstPoint, IPoint secondPoint, IPoint thirdPoint)\n {\n this(firstPoint, secondPoint, thirdPoint, null);\n\n }", "public void DrawCylinder(float radius, float height, int nSegments ) \n\t{\n\t\tGL11.glBegin(GL11.GL_TRIANGLES);\n\t\tPoint4f point4f7 = new Point4f();\n\t\tPoint4f point4f8 = new Point4f(0.0f, 0.0f, 1.0f, 0.0f);\n\t\tfor(float i=0.0f; i < nSegments; i += 1.0f) {\n\t\t\t//First, the origin is located at the center of the circle below. First, draw the triangle above the side.\n\t\t\tfloat angle = (float)Math.PI * i * 2.0f / nSegments;\n\t\t\tfloat nextAngle = (float)Math.PI * (i + 1.0f) * 2.0f / nSegments;\n\t\t\tfloat x1 = (float)Math.sin((double)angle)*radius, y1 = (float)Math.cos((double)angle)*radius;\n\t\t\tfloat x2 = (float)Math.sin((double)nextAngle)*radius, y2 = (float)Math.cos((double)nextAngle)*radius;\n\n\t\t\tPoint4f point4f1 = new Point4f(x1, y1, 0.0f, 0.0f);\n\t\t\tPoint4f point4f2 = new Point4f(x2, y2, 1.0f, 0.0f);\n\t\t\tPoint4f point4f3 = new Point4f(x1, y1, 1.0f, 0.0f);\n\t\t\tVector4f v = point4f2.MinusPoint(point4f1);\n\t\t\tVector4f w = point4f3.MinusPoint(point4f1);\n\t\t\tVector4f normal = v.cross(w).Normal();\n//\t\t\tGL11.glNormal3f( normal.x, normal.y, normal.z);\n\t\t\tGL11.glNormal3f( x1, y1, 0.0f);\n\t\t\tGL11.glVertex3f(x1, y1, 0.0f);\n\t\t\tGL11.glNormal3f( x2, y2, height);\n GL11.glVertex3f(x2, y2, height);\n GL11.glNormal3f( x1, y1, height);\n GL11.glVertex3f(x1, y1, height);\n \n //Draw the triangle on top of the lid according to the triangle on top of the side.\n Vector4f v2 = point4f2.MinusPoint(point4f8);\n Vector4f w2 = point4f3.MinusPoint(point4f8);\n Vector4f normal2 = v2.cross(w2).Normal();\n GL11.glNormal3f( normal2.x, normal2.y, normal2.z);\n GL11.glVertex3f(0.0f, 0.0f, height);\n GL11.glVertex3f(x2, y2, height);\n GL11.glVertex3f(x1, y1, height);\n \n //Draw the triangle below the sides.\n Point4f point4f4 = new Point4f(x1, y1, 0.0f, 0.0f);\n\t\t\tPoint4f point4f5 = new Point4f(x2, y2, 0.0f, 0.0f);\n\t\t\tPoint4f point4f6 = new Point4f(x1, y1, 1.0f, 0.0f);\n\t\t\tVector4f v1 = point4f5.MinusPoint(point4f4);\n\t\t\tVector4f w1 = point4f6.MinusPoint(point4f4);\n\t\t\tVector4f normal1 = v1.cross(w1).Normal();\n//\t\t\tGL11.glNormal3f( normal1.x, normal1.y, normal1.z);\n\t\t\tGL11.glNormal3f( x1, y1, 0.0f);\n\t\t\tGL11.glVertex3f(x1, y1, 0.0f);\n\t\t\tGL11.glNormal3f( x2, y2, 0.0f);\n GL11.glVertex3f(x2, y2, 0.0f);\n GL11.glNormal3f( x2, y2, height);\n GL11.glVertex3f(x2, y2, height);\n \n //Draw the triangle on the lower lid according to the triangle below the side.\n Vector4f v3 = point4f4.MinusPoint(point4f7);\n Vector4f w3 = point4f5.MinusPoint(point4f7);\n Vector4f normal3 = v3.cross(w3).Normal();\n GL11.glNormal3f( normal3.x, normal3.y, normal3.z);\n GL11.glVertex3f(0.0f, 0.0f, 0.0f);\n GL11.glVertex3f(x2, y2, 0.0f);\n GL11.glVertex3f(x1, y1, 0.0f);\n\t\t}\n\t\tGL11.glEnd();\n\t}", "public Triangle( Point p1, Point p2, Point p3 ) {\n super(\"Triangle: \");\n this.setP1(p1);\n this.setP2(p2);\n this.setP3(p3);\n }", "private List<List<Edge>> dfs(List<Point> vertices, int start, int end) {\n\n /**\n * used for the answer returned\n */\n List<List<Edge>> allTessellations = new ArrayList<>();\n\n /**\n * Base Case: Return an empty list if current polygon is already a\n * triangle. If the difference between the end vertices and the start\n * vertices is less than 3, there can't be any possible tessellations\n * made\n */\n if (end - start < 3) {\n return allTessellations;\n }\n\n /**\n * iterate through the current polygon\n */\n for (int k = start + 1; k < end; k++) {\n\n /**\n * placeholder for storing possible tessellations\n */\n List<Edge> temp = new ArrayList<>();\n\n /**\n * Add the length of the internal edge to the list \n *\n * An internal edge can only be internal if the k vertices is either\n * not the adjacent vertices of the start or end point of the\n * current tessellation of the polygon.\n */\n if (start + 1 < k) {\n temp.add(new Edge(new Point(vertices.get(k).getxPos(), vertices.get(k).getyPos()),\n new Point(vertices.get(start).getxPos(), vertices.get(start).getyPos())));\n }\n\n if (end - 1 > k) {\n temp.add(new Edge(new Point(vertices.get(k).getxPos(), vertices.get(k).getyPos()),\n new Point(vertices.get(end).getxPos(), vertices.get(end).getyPos())));\n }\n\n /**\n * get the left and right tessellations\n */\n List<List<Edge>> left = dfs(vertices, start, k);\n List<List<Edge>> right = dfs(vertices, k, end);\n\n /**\n * if the left and right tessellations are empty then only add the\n * temp list\n * \n * if not, then get the cartesian product of each side to get every \n * possible tessellation with both lists\n */\n if (left.isEmpty() && right.isEmpty()) \n allTessellations.add(temp);\n else\n allTessellations.addAll(combine(left, right, temp));\n\n }\n\n return allTessellations;\n\n }", "public int numVertices() { return numV; }" ]
[ "0.6167903", "0.6118857", "0.6034279", "0.59991217", "0.59595466", "0.59210604", "0.5913202", "0.58041966", "0.57696694", "0.5724866", "0.5717725", "0.57101846", "0.56997454", "0.56385845", "0.55345976", "0.5502206", "0.5499063", "0.5464177", "0.5454458", "0.5451688", "0.543605", "0.5419265", "0.5386096", "0.53834355", "0.5382826", "0.5364222", "0.53510296", "0.533449", "0.5323329", "0.5315241", "0.5310303", "0.5310153", "0.53011644", "0.5294559", "0.52896756", "0.5287458", "0.5286477", "0.5276824", "0.5264323", "0.52557945", "0.52458596", "0.52421695", "0.5233605", "0.52314246", "0.5225828", "0.51889455", "0.51875836", "0.5169221", "0.51521313", "0.5140996", "0.5134822", "0.51155037", "0.51135576", "0.51083946", "0.5091433", "0.5089412", "0.5084549", "0.5071607", "0.5050341", "0.5049591", "0.50437653", "0.5019355", "0.5018226", "0.5018005", "0.5015335", "0.49901763", "0.49825135", "0.49734876", "0.49644774", "0.49569342", "0.4953628", "0.49504817", "0.49392092", "0.4933388", "0.49321333", "0.49315476", "0.49280137", "0.4926411", "0.4922807", "0.49127465", "0.49106055", "0.4909888", "0.49018764", "0.4895152", "0.48903263", "0.4880555", "0.48752204", "0.48741287", "0.48741245", "0.48738116", "0.4868759", "0.4864864", "0.48640448", "0.4862274", "0.4850136", "0.48494464", "0.48470795", "0.484627", "0.48445392", "0.48424205" ]
0.7691077
0
Creates the vertices and faces that define an approximation of a sphere with radius 1
private void generateSphere() { int segments = 14; int rings = 15; // Use an odd number of rings of faces so that halfway up the sphere is the middle of a ring and not a loop of edges verts = new Vector[segments * (rings - 1) + 2]; // There are rings + 1 rings of vertices, but the first and last of these are each a single vertex faces = new int[2 * segments * (rings - 1)][3]; // Apart from the first and last, each ring has segments number of square faces, so 2 * segments triangular faces. The first and last each have segments triangular faces verts[0] = new Vector(3); verts[0].setElement(1, -1); // The lowest point of the sphere for (int i = 0; i < segments; i++) { if (i == segments - 1) { faces[i] = new int[] {0, i + 1, 1}; // The last face involves the last vertex in the second ring and loops back to the first vertex in the second ring } else { faces[i] = new int[] {0, i + 1, i + 2}; // Triangles involving the lowest vertex and two consecutive vertices in the second ring of vertices } } double pitchIncrement = Math.PI / rings; // The increment in pitch (angle above horizontal) between rings of vertices double pitch = pitchIncrement - Math.PI / 2; // The lowest point had a pitch of -pi/2 double headingIncrement = Math.PI * 2.0 / segments; // The increment in heading between segments double heading = -Math.PI; for (int r = 0; r < rings - 1; r++) { // Last ring is a single point and must be treated separately double y = Math.sin(pitch); // The y co-ordinate for each vertex in this ring double modulus = Math.cos(pitch); // The radius of the circle which this ring lies on for (int s = 0; s < segments; s++) { double x = modulus * Math.cos(heading); // x co-ordinate for the next vertex double z = modulus * Math.sin(heading); // z co-ordinate for the next vertex verts[segments * r + s + 1] = new Vector(3); verts[segments * r + s + 1].setElements(new double[] {x, y, z}); heading += headingIncrement; } // Make faces between the vertices just added and the next ring of vertices to be added if (r != rings - 2) { // The second to last ring doesn't make faces with the next ring up in the same way because the last ring is a single vertex for (int i = 0; i < segments; i++) { if (i == segments - 1) { // The last two faces make use of the first vertex in the next ring by looping back to the start // Two faces in the same plane faces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, segments * r + 1 + segments}; faces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, segments * r + 1 + segments, segments * r + 1}; } else { // Two faces that are in the same plane and appear as a quadrilateral faces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, (segments * r + i + 1) + segments + 1}; faces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments + 1, (segments * r + i + 1) + 1}; } } } pitch += pitchIncrement; } verts[verts.length - 1] = new Vector(3); verts[verts.length - 1].setElement(1, 1); // The last and highest vertex for (int i = 0; i < segments; i++) { if (i == segments - 1) { // Last face completes the ring and includes the last vertex of the second to last ring faces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1}; } else { // Faces involving the last vertex and two consecutive vertices in the second to last ring faces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1 + i + 1}; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setGeometryData() {\n // allocate vertices\n final int factorK = (innerRadius == 0 ? 1 : 2);\n final int verts = factorK * ((zSamples - 2) * (radialSamples) + 2); // rs + 1\n setVertexCoordsSize (verts);\n setNormalCoordsSize (verts);\n\n // generate geometry\n final double fInvRS = 1.0 / (radialSamples);\n final double fZFactor = 1.0 / (zSamples - 1); // 2.0 / (zSamples - 1);\n\n // Generate points on the unit circle to be used in computing the mesh\n // points on a sphere slice.\n final double[] afSin = new double[(radialSamples + 1)];\n final double[] afCos = new double[(radialSamples + 1)];\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fAngle = phi0 + dPhi * fInvRS * iR;\n afCos[iR] = Math.cos (fAngle);\n afSin[iR] = Math.sin (fAngle);\n }\n // afSin[radialSamples] = afSin[0];\n // afCos[radialSamples] = afCos[0];\n\n double radDiff = Math.abs (outerRadius - innerRadius);\n\n for ( int icnt = 0; icnt < 2; icnt++ ) {\n radius = (icnt == 0 ? innerRadius : outerRadius);\n if ( radius == 0.0 ) {\n continue;\n }\n double zNP = centerZ; // 0.0;\n double zSP = centerZ; // 0.0;\n\n // generate the sphere itself\n int i = 0;\n Vector3D tempVa;\n Vector3D kSliceCenter;\n\n for ( int iZ = 1; iZ < (zSamples - 1); iZ++ ) { // -1\n //final double fAFraction = 0.5 * Math.PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2)\n final double fAFraction = theta1 - iZ * fZFactor * dTheta;\n final double fZFraction = Math.sin (fAFraction); // in (-1,1)\n final double fZ = radius * fZFraction;\n\n // compute center of slice\n kSliceCenter = new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + fZ\n );\n\n // compute radius of slice\n final double fSliceRadius = Math.sqrt (\n Math.abs (\n radius * radius - fZ * fZ\n )\n );\n\n // compute slice vertices with duplication at end point\n Vector3D kNormal;\n final int iSave = i;\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fRadialFraction = iR * fInvRS; // in [0,1)\n final Vector3D kRadial = new Vector3D (\n afCos[iR],\n afSin[iR],\n 0\n );\n tempVa = new Vector3D (\n fSliceRadius * kRadial.getX (),\n fSliceRadius * kRadial.getY (),\n fSliceRadius * kRadial.getZ ()\n );\n\n zNP = Math.\n max (kSliceCenter.getZ (), zNP);\n zSP = Math.\n min (kSliceCenter.getZ (), zSP);\n\n putVertex (\n (kSliceCenter.getX () + tempVa.getX ()),\n (kSliceCenter.getY () + tempVa.getY ()),\n (kSliceCenter.getZ () + tempVa.getZ ())\n );\n tempVa = getVertexCoord (i);\n\n kNormal = new Vector3D (\n tempVa.getX () - center.getX (),\n tempVa.getY () - center.getY (),\n tempVa.getZ () - center.getZ ()\n );\n double mag = Math.sqrt (\n Math.pow (kNormal.getX (), 2) +\n Math.pow (kNormal.getY (), 2) +\n Math.pow (kNormal.getZ (), 2)\n );\n kNormal = new Vector3D (\n kNormal.getX () / mag,\n kNormal.getY () / mag,\n kNormal.getZ () / mag\n );\n if ( !viewInside ) {\n putNormal (\n kNormal.getX (),\n kNormal.getY (),\n kNormal.getZ ()\n );\n } else {\n putNormal (\n -kNormal.getX (),\n -kNormal.getY (),\n -kNormal.getZ ()\n );\n }\n i++;\n }\n\n// setVertexCoord(i, getVertexCoord(iSave));\n// setNormalCoord(i, getNormalCoord(iSave));\n putVertex (getVertexCoord (iSave));\n putNormal (getNormalCoord (iSave));\n i++;\n }\n\n // south pole\n if ( theta0 == -0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n (center.getZ () - radius)\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, -1));\n } else {\n putNormal (new Vector3D (0, 0, 1));\n }\n setNormalCount (i + 1);\n i++;\n }\n\n // north pole\n if ( theta1 == 0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + radius\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, 1));\n } else {\n putNormal (new Vector3D (0, 0, -1));\n }\n setNormalCount (i + 1);\n i++;\n }\n }\n\n }", "public Sphere(double nx, double ny, double nz, double size) {\n this.x = nx;\n this.y = ny;\n this.z = nz;\n this.radius = size;\n }", "public Sphere(float radius) {\n\t\tsuper();\n\t\tthis.radius = radius;\n\t}", "public void makeSphere (float radius, int slices, int stacks)\r\n {\r\n \t\r\n \tPoint lower[][] = new Point[stacks + 1][slices + 1];\r\n \tfloat rad[] = new float[stacks + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for each stack\r\n \tfor(int i = 0; i <= stacks; i ++)\r\n \t{\r\n \t\trad[i] = (float)Math.sqrt((0.5f * 0.5f) - (( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) * ( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) ));\r\n\t\t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Calculate the vertices for each stack\r\n \tfor(int i = 0; i <= stacks; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= slices; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for the next stack\r\n \t\tvert += (1.0f / (float)stacks);\r\n \t}\r\n \t\r\n \t\r\n \t// Print all the triangles using the vertices\r\n \tfor(int i = 0 ; i < stacks; i++)\r\n \t\tfor(int j = 0 ; j < slices; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t}\r\n }", "public float[] makeVertices(float radius, float[] color)\n {\n int noOfComponents = 3 + 3 + 3; // 3 position coordinates, 3 color coordinates, 3 normal coordinates\n float[] vertices = new float[(verticalResolution+1) * horizontalResolution * noOfComponents];\n int vertexNumberInc = 3 + 3 + 3; // three position coordinates, three color values, three normal coordinates\n int vertexNumber = 0;\n\n float elevation = 0;\n float elevationInc = (float) (Math.PI / verticalResolution);\n float azimuth = 0;\n float azimuthInc = (float) (2* Math.PI / horizontalResolution);\n for(int elevationIndex = 0; elevationIndex <= verticalResolution; elevationIndex++) {\n azimuth = 0;\n for(int azimuthIndex = 0; azimuthIndex < horizontalResolution; azimuthIndex++) {\n // position coordinates in spherical coordinates\n float xPos = radius * (float) (Math.sin(elevation) * Math.cos(azimuth));\n float yPos = radius * (float) (Math.sin(elevation) * Math.sin(azimuth));\n float zPos = radius * (float) Math.cos(elevation);\n vertices[vertexNumber] = xPos;\n vertices[vertexNumber+1] = yPos;\n vertices[vertexNumber+2] = zPos;\n // color coordinates (for all vertices the same)\n vertices[vertexNumber+3] = color[0];\n vertices[vertexNumber+4] = color[1];\n vertices[vertexNumber+5] = color[2];\n // coordinates of normal vector\n // for a sphere this vector is identical to the normalizes position vector\n float normalizationFactor = 1 / (float) Math.sqrt((xPos * xPos) + (yPos * yPos) + (zPos * zPos));\n vertices[vertexNumber+6] = xPos * normalizationFactor;\n vertices[vertexNumber+7] = yPos * normalizationFactor;\n vertices[vertexNumber+8] = zPos * normalizationFactor;\n\n vertexNumber += vertexNumberInc;\n azimuth += azimuthInc;\n }\n elevation += elevationInc;\n }\n return vertices;\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 float getSphereRadius();", "public Sphere(double radius, Point3D center) {\n super(radius);\n _center = center;\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 }", "void drawSphere(GL2 gl,GLU glu, double r, int lats, int longs) {\n\n\n\n GLUquadric qobj = glu.gluNewQuadric();\n\n gl.glColor4f(0.0f, 0.0f, 1.0f,0.01f);\n glu.gluQuadricDrawStyle(qobj, GLU.GLU_LINE);\n glu.gluQuadricNormals(qobj, GLU.GLU_SMOOTH);\n\n glu.gluSphere(qobj, r, 70, 70);\n\n /*\n int i, j;\n for(i = 0; i <= lats; i++) {\n float lat0 = (float) (Math.PI * (-0.5 + (double) (i - 1) / lats));\n float z0 = (float) (Math.sin(lat0));\n float zr0 = (float) (Math.cos(lat0));\n\n float lat1 = (float) (Math.PI * (-0.5 + (double) i / lats));\n float z1 = (float) (Math.sin(lat1));\n float zr1 = (float) (Math.expm1(lat1));\n\n gl.glBegin(GL_LINE_STRIP);\n gl.glColor3f(0.0f, 1.0f, 1.0f);\n for(j = 0; j <= longs; j++) {\n float lng = (float) (2. * Math.PI * (double) (j - 1) / longs);\n float x = (float) (r*Math.cos(lng));\n float y = (float) (r*Math.sin(lng));\n\n\n\n gl.glNormal3f(x * z0, y * z0,(float)r* zr0);\n gl.glVertex3f(x * z0, y * z0, (float) r*zr0);\n //gl.glNormal3f(x * zr1, y * zr1, (float) r*z1);\n //gl.glVertex3f(x * zr1, y * zr1, (float)r*z1);\n }\n gl.glEnd();\n }\n */\n }", "private void drawCenterSphere() {\n\t\t//Draw sphere\n\t\tgl.glColor3d(0, 0, 0);\n\t\tgl.glEnable(GL2.GL_LIGHTING);\n\t\tglut.glutSolidSphere(0.01, 50, 50);\n\t}", "private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }", "public Sphere( double radius, Point3d center, Material material ) {\n \tsuper();\n \tthis.radius = radius;\n \tthis.center = center;\n \tthis.material = material;\n }", "public Sphere( double radius, Point3d center, Material material ) {\r\n \tsuper();\r\n \tthis.radius = radius;\r\n \tthis.center = center;\r\n \tthis.material = material;\r\n }", "private Sphere renderPreviewStar() {\n int radius = 20;\n Sphere sphere = new Sphere(radius);\n\n PhongMaterial material = new PhongMaterial();\n material.setSelfIlluminationMap(PlanetarySystem.starExteriorMap);\n sphere.setMaterial(material);\n return sphere;\n }", "public static void setScene() {\n\n Shape ground = new Plane(vec3(0.0, -1.0, 0.0), vec3(0, 1, -0.2), new Diffuse(new Vec3(1,1,1), white));\n \n /* Shape globe1 = new Sphere(vec3(0.0, 2, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe2 = new Sphere(vec3(2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n Shape globe3 = new Sphere(vec3(-2, 0, -6.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.5, 0.5, 0.5)));\n*/\n Shape globe1T = new Sphere(vec3(0.0, 2, -2.0), 0.3, new Diffuse(new Vec3(1,1,1), white));\n // Shape globe2T = new Sphere(vec3(-0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1),yellow));\n // Shape globe3T = new Sphere(vec3(0.5, -2, -3.0), 0.5, new Diffuse(new Vec3(1,1,1), yellow));\n\n \n \n Shape globe4 = new Sphere(vec3(0.0, 2, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe5 = new Sphere(vec3(2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n Shape globe6 = new Sphere(vec3(-2, 0, -4.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.3, 0.3, 0.3)));\n \n Shape globe7 = new Sphere(vec3(0.0, 2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe8 = new Sphere(vec3(2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe9 = new Sphere(vec3(-2, 0, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n Shape globe7D = new Sphere(vec3(0.0, -2, -8.0), 0.5, new Diffuse(new Vec3(1,1,1), new Vec3(0.7, 0.7, 0.7)));\n\n Shape globeC = new Sphere(vec3(0.0, 0.0, -6.0), 1.0, new Diffuse(new Vec3(1,1,1), red));\n \n ArrayList<Shape> shapes = new ArrayList<>();\n shapes.add(bg);\n shapes.add(ground);\n shapes.add(globe1T);\n // shapes.add(globe2T);\n // shapes.add(globe3T);\n //shapes.add(globe4);\n //shapes.add(globe5);\n shapes.add(globe7);\n shapes.add(globe8);\n shapes.add(globe9);\n shapes.add(globe7D);\n shapes.add(globeC);\n gr = new Group(shapes);\n /////////////////////////////--------------------------------------\n \n \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 Sphere(final Material m) {\n super(m);\n this.c = new Point3(0,0,0);\n this.r = 1;\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}", "public void texturedSphere(float r, PGraphics t) {\n int v1,v11,v2;\n r = (r + 240 ) * 0.33f;\n beginShape(TRIANGLE_STRIP);\n texture(t);\n float iu=(float)(t.width-1)/(sDetail);\n float iv=(float)(t.height-1)/(sDetail);\n float u=0,v=iv;\n for (int i = 0; i < sDetail; i++) {\n vertex(0, -r, 0,u,0);\n vertex(sphereX[i]*r, sphereY[i]*r, sphereZ[i]*r, u, v);\n u+=iu;\n }\n vertex(0, -r, 0,u,0);\n vertex(sphereX[0]*r, sphereY[0]*r, sphereZ[0]*r, u, v);\n endShape(); \n \n // Middle rings\n int voff = 0;\n for(int i = 2; i < sDetail; i++) {\n v1=v11=voff;\n voff += sDetail;\n v2=voff;\n u=0;\n beginShape(TRIANGLE_STRIP);\n texture(t);\n for (int j = 0; j < sDetail; j++) {\n vertex(sphereX[v1]*r, sphereY[v1]*r, sphereZ[v1++]*r, u, v);\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2++]*r, u, v+iv);\n u+=iu;\n }\n \n // Close each ring\n v1=v11;\n v2=voff;\n vertex(sphereX[v1]*r, sphereY[v1]*r, sphereZ[v1]*r, u, v);\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2]*r, u, v+iv);\n endShape();\n v+=iv;\n }\n u=0;\n \n // Add the northern cap\n beginShape(TRIANGLE_STRIP);\n texture(t);\n for (int i = 0; i < sDetail; i++) {\n v2 = voff + i;\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2]*r, u, v);\n vertex(0, r, 0,u,v+iv); \n u+=iu;\n }\n vertex(sphereX[voff]*r, sphereY[voff]*r, sphereZ[voff]*r, u, v);\n endShape();\n \n}", "void setupGrid() {\n\n // create a Switch for the spheres, allow switch changes\n gridSwitch = new Switch(Switch.CHILD_NONE);\n gridSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up an appearance to make the square3s with red ambient,\n // black emmissive, red diffuse and black specular coloring\n Material material = new Material(red, black, red, black, 64);\n Appearance appearance = new Appearance();\n appearance.setMaterial(material);\n\n // create a grid of quads\n int gridSize = 20; // grid is gridSize quads along each side\n int numQuads = gridSize * gridSize;\n int numVerts = numQuads * 4; // 4 verts per quad\n // there will be 3 floats per coord and 4 coords per quad\n float[] coords = new float[3 * numVerts];\n // All the quads will use the same normal at each vertex, so\n // allocate an array to hold references to the same normal\n Vector3f[] normals = new Vector3f[numVerts];\n Vector3f vertNormal = new Vector3f(0.0f, 0.0f, 1.0f);\n float edgeLength = 5.0f; // length of each edge of the grid\n float gridGap = 0.03f; // the gap between each quad\n // length of each quad is (total length - sum of the gaps) / gridSize\n float quadLength = (edgeLength - gridGap * (gridSize - 1)) / gridSize;\n\n // create a grid of quads in the z=0 plane\n // each has a TransformGroup to position the sphere which contains\n // a link to the shared group for the sphere\n float curX, curY;\n for (int y = 0; y < gridSize; y++) {\n curY = y * (quadLength + gridGap); // offset to lower left corner\n curY -= edgeLength / 2; // center on 0,0\n for (int x = 0; x < gridSize; x++) {\n // this is the offset into the vertex array for the first\n // vertex of the quad\n int vertexOffset = (y * gridSize + x) * 4;\n // this is the offset into the coord array for the first\n // vertex of the quad, where there are 3 floats per vertex\n int coordOffset = vertexOffset * 3;\n curX = x * (quadLength + gridGap); // offset to ll corner\n curX -= edgeLength / 2; // center on 0,0\n // lower left corner\n coords[coordOffset + 0] = curX;\n coords[coordOffset + 1] = curY;\n coords[coordOffset + 2] = 0.0f; // z\n // lower right corner\n coords[coordOffset + 3] = curX + quadLength;\n coords[coordOffset + 4] = curY;\n coords[coordOffset + 5] = 0.0f; // z\n // upper right corner\n coords[coordOffset + 6] = curX + quadLength;\n coords[coordOffset + 7] = curY + quadLength;\n coords[coordOffset + 8] = 0.0f; // z\n // upper left corner\n coords[coordOffset + 9] = curX;\n coords[coordOffset + 10] = curY + quadLength;\n coords[coordOffset + 11] = 0.0f; // z\n for (int i = 0; i < 4; i++) {\n normals[vertexOffset + i] = vertNormal;\n }\n }\n }\n // now that we have the data, create the QuadArray\n QuadArray quads = new QuadArray(numVerts, QuadArray.COORDINATES\n | QuadArray.NORMALS);\n quads.setCoordinates(0, coords);\n quads.setNormals(0, normals);\n\n // create the shape\n Shape3D shape = new Shape3D(quads, appearance);\n\n // add it to the switch\n gridSwitch.addChild(shape);\n }", "public Point3d sampleHemisphere();", "@Override\n \tpublic void globe(int M, int N) {\n\t\tvertices = new double[][] { { 1, 1, 1, 0, 0, 1 },\n\t\t\t\t{ 1, -1, 1, 0, 0, 1 }, { -1, -1, 1, 0, 0, 1 },\n\t\t\t\t{ -1, 1, 1, 0, 0, 1 }, { 1, 1, -1, 0, 0, -1 },\n\t\t\t\t{ 1, -1, -1, 0, 0, -1 }, { -1, -1, -1, 0, 0, -1 },\n\t\t\t\t{ -1, 1, -1, 0, 0, -1 }, { 1, 1, 1, 1, 0, 0 },\n\t\t\t\t{ 1, -1, 1, 1, 0, 0 }, { 1, -1, -1, 1, 0, 0 },\n\t\t\t\t{ 1, 1, -1, 1, 0, 0 }, { -1, 1, 1, -1, 0, 0 },\n\t\t\t\t{ -1, -1, 1, -1, 0, 0 }, { -1, -1, -1, -1, 0, 0 },\n\t\t\t\t{ -1, 1, -1, -1, 0, 0 }, { 1, 1, 1, 0, 1, 0 },\n\t\t\t\t{ -1, 1, 1, 0, 1, 0 }, { -1, 1, -1, 0, 1, 0 },\n\t\t\t\t{ 1, 1, -1, 0, 1, 0 }, { 1, -1, 1, 0, -1, 0 },\n\t\t\t\t{ -1, -1, 1, 0, -1, 0 }, { -1, -1, -1, 0, -1, 0 },\n\t\t\t\t{ 1, -1, -1, 0, -1, 0 }, };\n \t\tfaces = new int[6][4];\n \t\tfor (int i = 0; i < faces.length; i++) {\n \t\t\tfaces[i] = new int[] { i * 4, i * 4 + 1, i * 4 + 2, i * 4 + 3 };\n \t\t}\n \n \t\tthis.m.identity();\n \t}", "@Test\n public void SphereTriangleInitial() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(new Point3D(0, 0, -1000), new Vector(0, 0, 1), new Vector(0, -1, 0)));\n scene.setDistance(1000);\n scene.setBackground(Color.BLACK);\n scene.setAmbientLight(new AmbientLight(Color.BLACK, 0));\n\n scene.addGeometries(new Sphere(new Color(java.awt.Color.BLUE), new Material(0.5, 0.5, 30), //\n 60, new Point3D(0, 0, 200)), //\n new Triangle(new Color(java.awt.Color.BLUE), new Material(0.5, 0.5, 30), //\n new Point3D(-70, 40, 0), new Point3D(-40, 70, 0), new Point3D(-68, 68, 4)));\n\n scene.addLights(new PointLight(new Color(400, 240, 0),\n new Point3D(-100, 100, -200), 1, 1E-5, 1.5E-7).setRadius(15));\n\n ImageWriter imageWriter = new ImageWriter(\"sphereTriangleInitial\", 200, 200, 400, 400);\n Render render = new Render(imageWriter, scene).setSuperSampling(500).setMultithreading(3).setDebugPrint();\n\n render.renderImage();\n render.writeToImage();\n }", "@Test\n public void trianglesTransparentSphere() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(new Point3D(0, 0, -1000), new Vector(0, 0, 1), new Vector(0, -1, 0)));\n scene.setDistance(1000);\n scene.setBackground(Color.BLACK);\n scene.setAmbientLight(new AmbientLight(new Color(java.awt.Color.WHITE), 0.15));\n\n scene.addGeometries( //\n new Triangle(Color.BLACK, new Material(0.5, 0.5, 60), //Right triangle\n new Point3D(-150, 150, 115), new Point3D(150, 150, 135), new Point3D(75, -75, 150)), //\n new Triangle(Color.BLACK, new Material(0.5, 0.5, 60), //\n new Point3D(-150, 150, 115), new Point3D(-70, -70, 140), new Point3D(75, -75, 150)), //\n new Sphere(new Color(java.awt.Color.BLUE), new Material(0.2, 0.2, 30, 0, 0.3), // )\n 30, new Point3D(60, -50, 50)),\n new Triangle(Color.BLACK, new Material(0.3, 0.3, 30), new Point3D(-30, 20, 100),\n new Point3D(-15, 30, 95), new Point3D(17, 87, 122)));\n\n scene.addLights(new SpotLight(new Color(700, 400, 400), //\n new Point3D(60, -50, 0), 1, 4E-5, 2E-7, new Vector(0, 0, 1)).setRadius(12));\n\n ImageWriter imageWriter = new ImageWriter(\"soft shadow without transparency + triangle between - 500Ray 12Radius\", 200, 200, 600, 600);\n Render render = new Render(imageWriter, scene).setSuperSampling(500).setMultithreading(3).setDebugPrint();\n\n render.renderImage();\n render.writeToImage();\n }", "private void setUp9SpheresScene() {\n camera = new Camera(\n new Point3D(0, 0, 9),\n new Point3D(0,0,0),\n new Point3D(0,1,0),\n Math.PI * 0.5, width, height\n );\n camera.moveForward(1.0);\n\n exposure = 1.0;\n ambientLight = new LightIntensity();\n ambientLight.red = 0.2;\n ambientLight.green = 0.2;\n ambientLight.blue = 0.2;\n\n lightSources.add(\n new LightSource(\n new LightIntensity(.7, .7, .7),\n new RectFace(\n new Point3D(-1.1, 9.99, -5.0),\n new Point3D(1.1, 9.99, -5.0),\n new Point3D(-1.1, 9.99, -6.0)\n )\n ));\n\n Material reflective = new Material();\n reflective.diffuseReflectivity.red = 0.2;\n reflective.diffuseReflectivity.green = 0.2;\n reflective.diffuseReflectivity.blue = 0.2;\n reflective.directReflectivity = LightIntensity.makeUniformRGB(0.5);\n\n Material glass = new Material();\n glass.diffuseReflectivity.red = 0.0;\n glass.diffuseReflectivity.green = 0.0;\n glass.diffuseReflectivity.blue = 0.0;\n glass.passthroughIntensity.red = 0.9;\n glass.passthroughIntensity.green = 0.9;\n glass.passthroughIntensity.blue = 0.9;\n glass.directReflectivity = LightIntensity.makeUniformRGB(0.1);\n glass.refractionIndex = 1.33;\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-9,0), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-9,0), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-9,0), 1), reflective));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-9,2), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-9,2), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-9,2), 1), glass));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-9,4), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-9,4), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-9,4), 1), reflective));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-6,0), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-6,0), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-6,0), 1), glass));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-6,2), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-6,2), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-6,2), 1), reflective));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-6,4), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-6,4), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-6,4), 1), glass));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-3,0), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-3,0), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-3,0), 1), reflective));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-3,2), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-3,2), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-3,2), 1), glass));\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(0,-3,4), 1), reflective));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-2,-3,4), 1), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-4,-3,4), 1), reflective));\n\n Box boundingBox = new Box(\n new Point3D(-10,10, 10),\n new Point3D(-10,10, -10),\n new Point3D(10,10, 10),\n new Point3D(-10,-10, 10)\n );\n\n Material leftWallMaterial = new Material();\n leftWallMaterial.diffuseReflectivity = new LightIntensity(.7,.7, 0.3);\n leftWallMaterial.directReflectivity = LightIntensity.makeUniformRGB(.3);\n\n Material rightWallMaterial = new Material();\n rightWallMaterial.diffuseReflectivity = new LightIntensity(.7,0.3, .7);\n rightWallMaterial.directReflectivity = LightIntensity.makeUniformRGB(.3);\n\n Material frontWallMaterial = new Material();\n frontWallMaterial.diffuseReflectivity = new LightIntensity(0.3,0.3, 0.3);\n frontWallMaterial.directReflectivity = LightIntensity.makeUniformRGB(.3);\n\n Material backWallMaterial = new Material();\n backWallMaterial.diffuseReflectivity = new LightIntensity(.7,0.3, 0.3);\n backWallMaterial.directReflectivity = LightIntensity.makeUniformRGB(.3);\n\n Material topWallMaterial = new Material();\n topWallMaterial.diffuseReflectivity = new LightIntensity(.7,.7, .7);\n topWallMaterial.directReflectivity = LightIntensity.makeUniformRGB(.3);\n\n Material bottomWallMaterial = new Material();\n bottomWallMaterial.diffuseReflectivity = new LightIntensity(.7,.7, .7);\n bottomWallMaterial.directReflectivity = LightIntensity.makeUniformRGB(.3);\n\n try {\n bottomWallMaterial.texture = ImageIO.read(new File(\"C:\\\\Class_work\\\\checkerboard.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n solids.add(new RectFace.FaceSolid(boundingBox.left, leftWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.right, rightWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.front, frontWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.back, backWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.top, topWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.bottom, bottomWallMaterial));\n }", "private void setUp2SpheresScene() {\n camera = new Camera(\n new Point3D(0, 0, 9),\n new Point3D(0,0,0),\n new Point3D(0,1,0),\n Math.PI * 0.5, width, height\n );\n camera.moveForward(1.0);\n\n exposure = 1.0;\n ambientLight = new LightIntensity();\n ambientLight.red = 0.2;\n ambientLight.green = 0.2;\n ambientLight.blue = 0.2;\n\n lightSources.add(\n new LightSource(\n new LightIntensity(.7, .7, .3),\n new RectFace(\n new Point3D(-1.1, 9.99, -5.0),\n new Point3D(1.1, 9.99, -5.0),\n new Point3D(-1.1, 9.99, -6.1)\n )\n ));\n\n lightSources.add(\n new LightSource(\n new LightIntensity(.4, .3, .7),\n new RectFace(\n new Point3D(-4.1, 2.99, -5.0),\n new Point3D(-2.9, 2.99, -5.0),\n new Point3D(-4.1, 2.99, -6.1)\n )\n ));\n\n Material reflective = new Material();\n reflective.diffuseReflectivity.red = 0.2;\n reflective.diffuseReflectivity.green = 0.2;\n reflective.diffuseReflectivity.blue = 0.2;\n reflective.directReflectivity = LightIntensity.makeUniformRGB(0.5);\n\n Material glass = new Material();\n glass.diffuseReflectivity.red = 0.0;\n glass.diffuseReflectivity.green = 0.0;\n glass.diffuseReflectivity.blue = 0.0;\n glass.passthroughIntensity.red = 0.9;\n glass.passthroughIntensity.green = 0.9;\n glass.passthroughIntensity.blue = 0.9;\n glass.directReflectivity = LightIntensity.makeUniformRGB(0.1);\n glass.refractionIndex = 1.33;\n\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(-5, -3, -5), 2.5), glass));\n solids.add(new Sphere.SphereSolid(new Sphere(new Point3D(5, -3, -5), 2.5), new Material()));\n\n Box boundingBox = new Box(\n new Point3D(-10,10, 10),\n new Point3D(-10,10, -10),\n new Point3D(10,10, 10),\n new Point3D(-10,-10, 10)\n );\n\n Material leftWallMaterial = new Material();\n leftWallMaterial.diffuseReflectivity = new LightIntensity(.7,.7, 0.3);\n\n Material rightWallMaterial = new Material();\n rightWallMaterial.diffuseReflectivity = new LightIntensity(.7,0.3, .7);\n\n Material frontWallMaterial = new Material();\n frontWallMaterial.diffuseReflectivity = new LightIntensity(0.3,0.3, 0.3);\n\n Material backWallMaterial = new Material();\n backWallMaterial.diffuseReflectivity = new LightIntensity(.7,0.3, 0.3);\n\n Material topWallMaterial = new Material();\n topWallMaterial.diffuseReflectivity = new LightIntensity(.7,.7, .7);\n\n Material bottomWallMaterial = new Material();\n bottomWallMaterial.diffuseReflectivity = new LightIntensity(.7,.7, .7);\n\n try {\n bottomWallMaterial.texture = ImageIO.read(new File(\"C:\\\\Class_work\\\\checkerboard.png\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n solids.add(new RectFace.FaceSolid(boundingBox.left, leftWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.right, rightWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.front, frontWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.back, backWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.top, topWallMaterial));\n solids.add(new RectFace.FaceSolid(boundingBox.bottom, bottomWallMaterial));\n }", "public Sphere (final Material material) {\n super(material);\n\n this.c = new Point3(0,0,0);\n this.r = 1;\n }", "@Override\n public int octree_function(Object... obj) //public static int\n //o_sphere(\t\t\t/* compute intersection with sphere */\n //\tOBJECT.OBJREC so,\n //\tRAY r\n //)\n {\n OBJECT.OBJREC so = (OBJECT.OBJREC) obj[0];\n RAY r = (RAY) obj[1];\n double a, b, c;\t/* coefficients for quadratic equation */\n double[] root = new double[2];\t/* quadratic roots */\n int nroots;\n double t = 0;\n double[] ap;\n int i;\n\n if (so.oargs.nfargs != 4) {\n//\t\tobjerror(so, USER, \"bad # arguments\");\n }\n ap = so.oargs.farg;\n if (ap[3] < -FVECT.FTINY) {\n//\t\tobjerror(so, WARNING, \"negative radius\");\n so.otype = (short) (so.otype == OTYPES.OBJ_SPHERE\n ? OTYPES.OBJ_BUBBLE : OTYPES.OBJ_SPHERE);\n ap[3] = -ap[3];\n } else if (ap[3] <= FVECT.FTINY) {\n//\t\tobjerror(so, USER, \"zero radius\");\n }\n /*\n *\tWe compute the intersection by substituting into\n * the surface equation for the sphere. The resulting\n * quadratic equation in t is then solved for the\n * smallest positive root, which is our point of\n * intersection.\n *\tSince the ray is normalized, a should always be\n * one. We compute it here to prevent instability in the\n * intersection calculation.\n */\n /* compute quadratic coefficients */\n a = b = c = 0.0;\n for (i = 0; i < 3; i++) {\n a += r.rdir.data[i] * r.rdir.data[i];\n t = r.rorg.data[i] - ap[i];\n b += 2.0 * r.rdir.data[i] * t;\n c += t * t;\n }\n c -= ap[3] * ap[3];\n\n nroots = ZEROES.quadratic(root, a, b, c);\t/* solve quadratic */\n\n for (i = 0; i < nroots; i++) /* get smallest positive */ {\n if ((t = root[i]) > FVECT.FTINY) {\n break;\n }\n }\n if (i >= nroots) {\n return (0);\t\t\t/* no positive root */\n }\n\n if (t >= r.rot) {\n return (0);\t\t\t/* other is closer */\n }\n\n r.ro = so;\n r.rot = t;\n /* compute normal */\n a = ap[3];\n if (so.otype == OTYPES.OBJ_BUBBLE) {\n a = -a;\t\t\t/* reverse */\n }\n for (i = 0; i < 3; i++) {\n r.rop.data[i] = r.rorg.data[i] + r.rdir.data[i] * t;\n r.ron.data[i] = (r.rop.data[i] - ap[i]) / a;\n }\n r.rod = -FVECT.DOT(r.rdir, r.ron);\n r.rox = null;\n r.pert.data[0] = r.pert.data[1] = r.pert.data[2] = 0.0;\n r.uv[0] = r.uv[1] = 0.0;\n\n return (1);\t\t\t/* hit */\n }", "@Test\n\tpublic void testSphereRadiusOne()\n\t{\n\t\tfinal EllipseRegionOfInterest ellipse = new EllipseRegionOfInterest( 3 );\n\t\tellipse.setOrigin( new double[] { 1, 1, 1 } );\n\t\tellipse.setRadius( 1 );\n\t\ttestEllipse( ellipse );\n\n\t}", "void setupSpheres() {\n\n // create a Switch for the spheres, allow switch changes\n spheresSwitch = new Switch(Switch.CHILD_ALL);\n spheresSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up an appearance to make the Sphere with objColor ambient,\n // black emmissive, objColor diffuse and white specular coloring\n Material material = new Material(objColor, black, objColor, white, 32);\n Appearance appearance = new Appearance();\n appearance.setMaterial(material);\n\n // create a sphere and put it into a shared group\n Sphere sphere = new Sphere(0.5f, appearance);\n SharedGroup sphereSG = new SharedGroup();\n sphereSG.addChild(sphere);\n\n // create a grid of spheres in the z=0 plane\n // each has a TransformGroup to position the sphere which contains\n // a link to the shared group for the sphere\n for (int y = -2; y <= 2; y++) {\n for (int x = -2; x <= 2; x++) {\n TransformGroup tg = new TransformGroup();\n tmpVector.set(x * 1.2f, y * 1.2f, -0.1f);\n tmpTrans.set(tmpVector);\n tg.setTransform(tmpTrans);\n tg.addChild(new Link(sphereSG));\n spheresSwitch.addChild(tg);\n }\n }\n }", "public Sphere (final Point3 c, final double r, final Material material) {\n super(material);\n\n this.c = c;\n this.r = r;\n }", "public void texturedSphere(float r, PImage t) {\n int v1, v11, v2;\n r = (r + 240 ) * 0.33f;\n// tint(255, 48);\n beginShape(TRIANGLE_STRIP);\n texture(t);\n float iu=(float)(t.width-1)/(sDetail);\n float iv=(float)(t.height-1)/(sDetail);\n float u=0, v=iv;\n for (int i = 0; i < sDetail; i++) {\n vertex(0, -r, 0, u, 0);\n vertex(sphereX[i]*r, sphereY[i]*r, sphereZ[i]*r, u, v);\n u+=iu;\n }\n vertex(0, -r, 0, u, 0);\n vertex(sphereX[0]*r, sphereY[0]*r, sphereZ[0]*r, u, v);\n endShape(); \n \n // Middle rings\n int voff = 0;\n for (int i = 2; i < sDetail; i++) {\n v1=v11=voff;\n voff += sDetail;\n v2=voff;\n u=0;\n// tint(255, 255);\n beginShape(TRIANGLE_STRIP);\n texture(t);\n for (int j = 0; j < sDetail; j++) {\n vertex(sphereX[v1]*r, sphereY[v1]*r, sphereZ[v1++]*r, u, v);\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2++]*r, u, v+iv);\n u+=iu;\n }\n \n // Close each ring\n v1=v11;\n v2=voff;\n vertex(sphereX[v1]*r, sphereY[v1]*r, sphereZ[v1]*r, u, v);\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2]*r, u, v+iv);\n endShape();\n v+=iv;\n }\n u=0;\n \n // Add the northern cap\n// tint(255, 131);\n beginShape(TRIANGLE_STRIP);\n texture(t);\n for (int i = 0; i < sDetail; i++) {\n v2 = voff + i;\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2]*r, u, v);\n vertex(0, r, 0, u, v+iv); \n u+=iu;\n }\n vertex(sphereX[voff]*r, sphereY[voff]*r, sphereZ[voff]*r, u, v);\n endShape();\n }", "public Sphere(Point3 c, double r, Material material) {\n\t\tsuper(material);\n\t\tthis.c = c;\n\t\tthis.r = r;\n\t}", "public float sphereRadius() {\r\n\t\treturn LeapJNI.Hand_sphereRadius(this.swigCPtr, this);\r\n\t}", "public static Scene scene8() {\r\n\t\t// Define basic properties of the scene\r\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0),\r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0),\r\n\t\t\t\t\t\t/*Distance to plain =*/ 1.5)\r\n\t\t\t\t.initName(\"scene8\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initBackgroundColor(new Vec(0.81,0.93,1))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(3);\r\n\t\t// Add Surfaces to the scene.\r\n\r\n\t\tShape plainShape = new Plain(new Vec(0.0,-1,0.0), new Point(0.0, -1, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial().initKa(new Vec(0.2)).initReflectionIntensity(0.1);\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\tShape transparentSphere = new Sphere(new Point(0, 10, -25), 10);\r\n\t\tMaterial transparentSphereMat = Material.getGlassMaterial(false)\r\n\t\t\t\t.initRefractionIndex(0).initReflectionIntensity(0.4).initKs(new Vec(1.0)).initKd(new Vec(0));\r\n\t\tSurface transparentSphereSurface = new Surface(transparentSphere, transparentSphereMat);\r\n\t\tfinalScene.addSurface(transparentSphereSurface);\r\n\r\n\t\tdouble[] radiuses = new double[] { 0.3, 0.8, 1, 1.5, 2, 1.4, 0.2, 0.9, 1.2, 2.1 };\r\n\r\n\t\tfor (int i = -10; i < 10; i+=3) {\r\n\t\t\tint sphereCenterZ = -5 + (int)(Math.random() * 3);\r\n\t\t\tint radiusIndex = (int)(Math.random() * 10);\r\n\t\t\tdouble radius = radiuses[radiusIndex];\r\n\t\t\tShape distantSphere1 = new Sphere(new Point(i, radiuses[radiusIndex] - 1, sphereCenterZ), radius);\r\n\t\t\tMaterial distantSphere1Mat = Material.getRandomMaterial();\r\n\t\t\tSurface distantSphere1Surface = new Surface(distantSphere1, distantSphere1Mat);\r\n\t\t\tfinalScene.addSurface(distantSphere1Surface);\r\n\t\t}\r\n\r\n\t\t// Add light sources:\r\n\t\tLight dirLight = new DirectionalLight(new Vec(-4.0, -1.0, -2.5), new Vec(0.3));\r\n\t\tfinalScene.addLightSource(dirLight);\r\n\r\n\t\tdirLight = new DirectionalLight(new Vec(-4.0, -1.0, -2.5), new Vec(0.3));\r\n\t\tfinalScene.addLightSource(dirLight);\r\n\r\n\t\treturn finalScene;\r\n\t}", "public Sphere(Point3D c, double r, Color color)\r\n\t{\r\n\t\tthis(c, r);\r\n\t\tsuper._emission = color;\r\n\t}", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "@Override\r\n protected void initModel() {\n model = new Sphere(\"projectil Model\", 5, 5, 0.2f);\r\n model.setModelBound(new BoundingBox());\r\n model.updateModelBound();\r\n }", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public Point sphereCoords(double r, double phi, double theta) {\n\t\t\n\t\tx = r*Math.sin(phi)*Math.cos(theta);\n\t\ty = r*Math.sin(phi)*Math.sin(theta);\n\t\tz = r*Math.cos(phi);\n\t\treturn this;\n\t}", "public void makeCone (float radius, int radialDivisions, int heightDivisions)\r\n {\r\n \tPoint lower[][] = new Point[heightDivisions + 1][radialDivisions + 1];\r\n \t\r\n \tfloat rad[] = new float[heightDivisions + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for every subdivision along the height\r\n \tfor(int i = 0; i < heightDivisions; i ++)\r\n \t{\r\n \t\trad[i] = radius * ( 1.0f - ( 1f /(float)heightDivisions) * i );\r\n \t}\r\n \t\r\n \t// Calculate curved surface vertices for every subdivision along the height\r\n \tfor(int i = 0; i <= heightDivisions; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= radialDivisions; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)radialDivisions) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)radialDivisions) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for next iteration\r\n \t\tvert += (1f / (float)heightDivisions);\r\n \t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Print the bottom circular surface\r\n \tfor(int i = 0; i <= radialDivisions - 1; i ++)\r\n \t{\r\n \t\tthis.addTriangle(lower[0][i].x, vert, lower[0][i].z, 0f, vert, 0f, lower[0][i+1].x, vert, lower[0][i+1].z );\r\n \t}\r\n \t\r\n \t// Print the curved surface\r\n \tfor(int i = 0 ; i < heightDivisions; i++)\r\n \t\tfor(int j = 0 ; j < radialDivisions; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t\t\r\n \t\t}\r\n }", "public static void main(String[] args){\n Mesh3D box = Mesh3D.box(10, 20, 60);\n \n Line3D lineX = box.getLineX();\n Line3D lineY = box.getLineY();\n Line3D lineZ = box.getLineZ();\n lineX.show();\n lineY.show();\n lineZ.show();\n box.translateXYZ(100, 0.0, 0.0); \n box.show();\n Line3D line = new Line3D(); \n List<Point3D> intersects = new ArrayList<Point3D>();\n \n for(int p = 0; p < 100; p++){\n double r = 600;\n double theta = Math.toRadians(90.0);//Math.toRadians(Math.random()*180.0);\n double phi = Math.toRadians(Math.random()*360.0-180.0);\n line.set(0.0,0.0,0.0, \n Math.sin(theta)*Math.cos(phi)*r,\n Math.sin(theta)*Math.sin(phi)*r,\n Math.cos(theta)*r\n );\n intersects.clear();\n box.intersectionRay(line, intersects);\n System.out.println(\"theta/phi = \" + Math.toDegrees(theta) + \" \"\n + Math.toDegrees(phi) + \" intersects = \" + intersects.size());\n \n }\n }", "public Spherical toSpherical() {\n\t\tdouble rho = Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));\n\t\t// z = rho cos(phi), phi = arccos(z / rho)\n\t\tdouble phi = Math.acos(z / rho);\n\t\t// r^2 = x^2 + y^2, r = sqrt(x^2 + y^2)\n\t\t// x = r cos(theta), theta = arccos(x / r)\n\t\tdouble r = xyToR(x, y);\n\t\tdouble theta = Math.acos(x / r);\n\t\treturn new Spherical(rho, theta, phi);\n\t}", "public DiscMesh(float radius, int numVertices) {\n Validate.nonNegative(radius, \"radius\");\n Validate.inRange(\n numVertices, \"number of vertices\", 3, Integer.MAX_VALUE);\n\n setMode(Mode.TriangleFan);\n\n float[] normals = new float[numAxes * numVertices];\n float[] positions = new float[numAxes * numVertices];\n float[] texCoords = new float[2 * numVertices];\n\n for (int vi = 0; vi < numVertices; ++vi) {\n normals[numAxes * vi] = 0f;\n normals[numAxes * vi + 1] = 0f;\n normals[numAxes * vi + 2] = 1f;\n\n float theta = FastMath.TWO_PI * vi / numVertices;\n float sin = FastMath.sin(theta);\n float cos = FastMath.cos(theta);\n positions[numAxes * vi] = radius * cos;\n positions[numAxes * vi + 1] = radius * sin;\n positions[numAxes * vi + 2] = 0f;\n\n texCoords[2 * vi] = (1f + cos) / 2f;\n texCoords[2 * vi + 1] = (1f + sin) / 2f;\n }\n\n setBuffer(Type.Normal, numAxes, normals);\n setBuffer(Type.Position, numAxes, positions);\n setBuffer(Type.TexCoord, 2, texCoords);\n\n updateBound();\n setStatic();\n }", "public Sphere(Point3D c, double r, Color color, Material material)\r\n\t{\r\n\t\tthis(c,r, color);\r\n\t\tsuper._material = material;\r\n\t}", "public static double squareToUniformSpherePdf(Tuple3d v) {\n // TODO: Fill in this method.\n return 0;\n }", "public Vector3f getSphereCenter() {\n\t\tfloat[] arr = getMinMax();\n\t\t\n\t\treturn new Vector3f((arr[0]+arr[1])/2,(arr[2]+arr[3])/2,(arr[4]+arr[5])/2);\n\t}", "public static double sphereArea(double radius) {\r\n return 4 * Math.PI * radius * radius;\r\n }", "private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}", "public float getSphereRadius() {\n\t\treturn sphereRadius;\n\t}", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "private void addTestListData() {\n\t\ts.add(new Sphere(quad, sky, 1000, 0, 0, 0, -90, 0, 0));\n\t\t\n//\t\ts.add(new Sphere(quad, planets[0], 3.8f, 50, 40, -50, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[1], 9.5f, 40, 40, -20, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[2], 10.f, 0, 40, -20, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[3], 5.3f,-20, 40, -50, -90, 0, 0));\n//\t\t\n//\t\ts.add(new Sphere(quad, planets[4], 112f, 410, 120, 100, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[5], 94.5f, 100, 120, 260, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[6], 40f, -170, 100, 240, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[7], 38.8f, -270, 100, 200, -90, 0, 0));\n//\t\t\n//\t\ts.add(new Sphere(quad, planets[8], 5, -110, 50, 50, -90, 0, 0));\n//\t\ts.add(new Sphere(quad, planets[9], 2.5f, 0, 40, -40, -90, 0, 0));\n//\t\t\n//\t\ts.add(new Disc(quad, ring, 225, 100, 120, 260, -90, 0, 0));\n\t\t\n\t\tms.add(new ModelShape(models[2], 12, 6, 12, 0, 0, 0, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[3], 1, 1, 1, -50, 15, -50, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[4], 1, 1, 1, 0, 15, -70, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[5], 1, 1, 1, 0, 15, -70, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[6], 1, 1, 1, 0, 15, -70, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[7], 1, 1, 1, 0, 15, -70, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[8], 3, 3, 3, 0, 20, -45, 0, 0, 0));\n//\t\tms.add(new ModelShape(models[9], 1, 1, 1, 30, 15, -40, 0, 0, 0));\n\t\t//ms.add(new ModelShape(models[10], 0.2f, 0.2f, 0.2f, 0, -30, -40, 0, 0, 0));\n\t}", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public Prism(int numSides, double radius, double height) {\n Vector3d toTop = new Vector3d(0.0, 0.0, height);\n double centralAngle = 2.0 * Math.PI / numSides;\n\n Face bottomFace = new Face(numSides);\n Face topFace = new Face(numSides);\n int vertexIndex = 0;\n for (int i = 0; i < numSides; i++) {\n double totalAngle = centralAngle * i;\n double x = radius * Math.cos(totalAngle);\n double y = radius * Math.sin(totalAngle);\n Vector3d bottomVertex = new Vector3d(x, y, -height / 2.0);\n\n Vector3d topVertex = new Vector3d();\n topVertex.add(bottomVertex, toTop);\n\n addVertexPositions(bottomVertex, topVertex);\n\n bottomFace.setVertexIndex(numSides - i - 1, vertexIndex);\n topFace.setVertexIndex(i, vertexIndex + 1);\n\n Face quad = new Face(4);\n int nextBottom = (vertexIndex + 2) % (2 * numSides);\n int nextTop = nextBottom + 1;\n quad.setAllVertexIndices(vertexIndex, nextBottom, nextTop,\n vertexIndex + 1);\n\n addFace(quad);\n\n vertexIndex += 2;\n }\n\n addFaces(bottomFace, topFace);\n\n setVertexNormalsToFaceNormals();\n }", "@Test\n public void bonusTMoveCamera2() {\n Scene scene = new Scene(\"Test scene\");\n scene.setCamera(new Camera(new Point3D(3100, -3100, -2600), new Vector(-2, 2, 2), new Vector(-1, -2, 1)));\n scene.setDistance(600);\n scene.setBackground(Color.BLACK);\n scene.setAmbientLight(new AmbientLight(new Color(java.awt.Color.WHITE), 0.15));\n\n scene.addGeometries( //\n new Plane(new Material(0.4, 0.1, 60, 0, 0), new Color(java.awt.Color.DARK_GRAY),\n new Point3D(0, 400, 100), new Vector(0, -1, 0)),\n new Polygon(Color.BLACK, new Material(0.2, 0.3, 200, 0.5, 0),\n new Point3D(-1, -300, 500), new Point3D(-1, -140, 500), new Point3D(1, -140, 500), new Point3D(1, -300, 500)),\n new Sphere(new Color(java.awt.Color.yellow), new Material(0.2, 0.2, 200, 0, 0.6), // )\n 80, new Point3D(-1, -120, 500)),\n new Polygon(Color.BLACK, new Material(0.2, 0.2, 200, 0.9, 0),\n new Point3D(-150, -150, 1999), new Point3D(-150, 200, 1999), new Point3D(150, 200, 1999), new Point3D(150, -150, 1999)),\n new Sphere(new Color(800, 0, 0), new Material(0.3, 0.5, 200, 0.2, 0), // )\n 140, new Point3D(300, 260, 600)),\n new Sphere(new Color(0, 0, 200), new Material(0.25, 0.25, 20, 0, 0.25), // )\n 140, new Point3D(-260, 260, 0)),\n new Sphere(new Color(400, 20, 20), new Material(0.2, 0.5, 200, 0, 0.3), // )\n 100, new Point3D(-600, 300, 1300)),\n new Triangle(new Color(100, 300, 100), new Material(0.25, 0.5, 100, 0.25, 0),\n new Point3D(-100, 400, 150), new Point3D(100, 400, 350), new Point3D(0, 200, 250)));\n\n scene.addLights(new SpotLight(new Color(700, 400, 400), //no. 1\n new Point3D(0, 0, -1500), 1, 4E-5, 2E-7, new Vector(0, 0, 1)).setRadius(15),\n new PointLight(new Color(200, 400, 200), new Point3D(0.001, -100, 499), 1, 4E-5, 2E-7).setRadius(15),//no.2\n new PointLight(new Color(200, 200, 400), new Point3D(0.001, -50, 1000), 1, 4E-5, 2E-7).setRadius(25));//no.3\n\n ImageWriter imageWriter = new ImageWriter(\"The magical room moving camera to right - soft shadow 5\", 200, 200, 1000, 1000);\n Render render = new Render(imageWriter, scene).setSuperSampling(400).setMultithreading(3).setDebugPrint();\n\n render.renderImage();\n render.writeToImage();\n }", "private void generateHalfCylinder() {\n\t\tint segments = 32;\n\t\tverts = new Vector[segments * 2];\n\t\tfaces = new int[4 * segments - 4][3];\n\t\tdouble heading = 0;\n\t\tdouble headingIncrement = Math.PI / (segments - 1); // The increment in heading between segments of vertices\n\t\tfor (int s = 0; s < segments; s++) {\n\t\t\tdouble x = Math.cos(heading); // x co-ordinate of points on the segment\n\t\t\tdouble z = Math.sin(heading); // z co-ordinate of points on the segment\n\t\t\tverts[s] = new Vector(3);\n\t\t\tverts[s].setElements(new double[] {x, -1, z}); // Vertex on the bottom semi-circle\n\t\t\tverts[s + segments] = new Vector(3);\n\t\t\tverts[s + segments].setElements(new double[] {x, 1, z}); // Vertex on the top semi-circle\n\t\t\theading += headingIncrement;\n\t\t}\n\t\tfor (int i = 0; i < segments - 1; i++) { // Vertical faces approximating the curved surface\n\t\t\tfaces[i * 2] = new int[] {i, i + segments, i + segments + 1}; // Face involving a point on the bottom semi-circle, the point directly above it (top semi-circle and the same segment) and the point directly above and one segment across\n\t\t\tfaces[i * 2 + 1] = new int[] {i, i + segments + 1, i + 1}; // Face involving a point on the bottom semi-circle, the point above and one segment across and the point one segment across on the bottom semi-circle\n\t\t}\n\t\tfor (int i = 0; i < segments - 2; i++) { // Horizontal faces approximating the semi-circles at the top and bottom\n\t\t\tfaces[segments * 2 - 2 + i] = new int[] {0, i + 1, i + 2}; // For the bottom semi-circle, the first vertex connected to the (i + 1)th vertex and the (i + 2)th vertex\n\t\t\tfaces[segments * 2 - 2 + i + segments - 2] = new int[] {segments, segments + i + 2, segments + i + 1}; // The same as above but for the top semi-circle\n\t\t}\n\t\t// Faces representing the vertical square cross-section\n\t\tfaces[4 * segments - 6] = new int[] {0, segments * 2 - 1, segments}; // The first vertex, the last vertex and the one above the first\n\t\tfaces[4 * segments - 5] = new int[] {0, segments - 1, segments * 2 - 1}; // The first vertex, the last vertex on the bottom and the last vertex (on the top)\n\t}", "@Override\n protected void createMesh() {\n rayLight.getScope().add(camera);\n\n light = new PointLight(Color.GAINSBORO);\n light.setTranslateX(-300);\n light.setTranslateY(300);\n light.setTranslateZ(-2000);\n\n light2 = new PointLight(Color.ALICEBLUE);\n light2.setTranslateX(300);\n light2.setTranslateY(-300);\n light2.setTranslateZ(2000);\n\n light3 = new PointLight(Color.SPRINGGREEN);\n light3.setTranslateY(-2000);\n //create a target\n target1 = new Sphere(180);\n target1.setId(\"t1\");\n target1.setDrawMode(DrawMode.LINE);\n target1.setCullFace(CullFace.NONE);\n target1.setTranslateX(500);\n target1.setTranslateY(500);\n target1.setTranslateZ(500);\n target1.setMaterial(red);\n // create another target\n target2 = new Sphere(150);\n target2.setId(\"t2\");\n target2.setDrawMode(DrawMode.LINE);\n target2.setCullFace(CullFace.NONE);\n target2.setTranslateX(-500);\n target2.setTranslateY(-500);\n target2.setTranslateZ(-500);\n target2.setMaterial(blue);\n\n origin = new Box(20, 20, 20);\n origin.setDrawMode(DrawMode.LINE);\n origin.setCullFace(CullFace.NONE);\n \n model = new Group(target1, target2, origin, light, light2, light3, rayLight);\n }", "RedSphere() {\n Random random = new Random();\n for (int i = 0; i < 6; i++) {\n value[i] = random.nextInt(33) + 1;\n }\n }", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}", "public Mesh() {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n }", "public static double squareToUniformHemispherePdf(Tuple3d v) {\n // TODO: Fill in this method.\n return 0;\n }", "private static void addTriangle(Hull3f sphere, Point3f p1, Point3f p2,\n Point3f p3, float resolution) {\n if ((p1.distance(p2) < resolution) || (p2.distance(p3) < resolution) || (p3.distance(p1) < resolution)) {\n Triangle3f t;\n t = new Triangle3f(p1, p2, p3);\n sphere.getTriangles().add(t);\n } else {\n Point3f p12;\n p12 = new Point3f(p1);\n p12.add(p2);\n Point3fLogic.normalize(p12);\n Point3f p23;\n p23 = new Point3f(p2);\n p23.add(p3);\n Point3fLogic.normalize(p23);\n Point3f p31;\n p31 = new Point3f(p3);\n p31.add(p1);\n Point3fLogic.normalize(p31);\n addTriangle(sphere, p1, p12, p31, resolution);\n addTriangle(sphere, p2, p23, p12, resolution);\n addTriangle(sphere, p3, p31, p23, resolution);\n addTriangle(sphere, p12, p23, p31, resolution);\n }\n }", "Spherical(final ParameterValueGroup parameters, final ParameterDescriptorGroup descriptor)\r\n throws ParameterNotFoundException\r\n {\r\n super(parameters, descriptor);\r\n ensureSpherical();\r\n }", "public static Scene scene3() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene3\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t// (1) A plain that represents the ground floor.\r\n\t\tShape plainShape = new Plain(new Vec(0.0,1.0,0.0), new Point(0.0, -1.0, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial();\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\t\t\r\n\t\t// (2) We will also add spheres to form a triangle shape (similar to a pool game). \r\n\t\tfor (int depth = 0; depth < 4; depth++) {\r\n\t\t\tfor(int width=-1*depth; width<=depth; width++) {\r\n\t\t\t\tShape sphereShape = new Sphere(new Point((double)width, 0.0, -1.0*(double)depth), 0.5);\r\n\t\t\t\tMaterial sphereMat = Material.getRandomMaterial();\r\n\t\t\t\tSurface sphereSurface = new Surface(sphereShape, sphereMat);\r\n\t\t\t\tfinalScene.addSurface(sphereSurface);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Add light sources:\r\n\t\tCutoffSpotlight cutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 45.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(1.0,0.6,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(-4.0, 4.0, -3.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,1.0,0.6));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tcutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 30.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(0.0, 4.0, 0.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(0.6,0.6,1.0));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\tDirectionalLight directionalLight=new DirectionalLight(new Vec(0.5,-0.5,0.0),new Vec(0.2));\r\n\t\tfinalScene.addLightSource(directionalLight);\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "public static WritableImage mapToSphere(WritableImage img) {\n\t\tWritableImage result = new WritableImage((int)img.getWidth(), (int)img.getHeight());\n\t\tPixelWriter writer = result.getPixelWriter();\n\t\tPixelReader pixels = img.getPixelReader();\n\t\t\n\t\tfor (int y = 0; y < result.getHeight(); y ++) {\n\t\t\tfor (int x = 0; x < result.getWidth(); x++) {\n\t\t\t\tdouble xT = MathUtils.map(x, 0.0, img.getWidth() - 1, 0.0, 1.0);\n\t\t\t\tdouble yT = MathUtils.map(y, 0.0, img.getHeight() - 1, 0.0, 1.0);\n\t\t\t\tdouble u = (int)(xT/(xT*xT + yT*yT + 1));\n\t\t\t\tdouble v = (int)(yT/(xT*xT + yT*yT + 1));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\" + u + \", \" + v);\n\t\t\t\t\n\t\t\t\tint fromX = (int)(u*(img.getWidth() - 1));\n\t\t\t\tint fromY = (int)(v*(img.getHeight() - 1));\n\t\t\t\twriter.setColor(x, y, pixels.getColor(fromX, fromY));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\n protected void interpolate(double frac) {\n ray.project(dist * frac);\n // set the sphere to ray position\n s.setTranslateX(ray.getPosition().getX());\n s.setTranslateY(ray.getPosition().getY());\n s.setTranslateZ(ray.getPosition().getZ());\n\n }", "public static double squareToCosineHemispherePdf(Tuple3d v) {\n // TODO: Fill in this method.\n return 0;\n }", "@Override\n\tpublic BoundingSphereTree getBoundingSpheres() {\n\t\tthis.boundingSphere.setSphereColore3d(1,0,0);\n\t\tboundingSphereTree.setBoundingSphere(this.boundingSphere);\n\t\tboundingSphereTree.getList().add(wheels.getlWheel().getBoundingSphereTree());\n\t\tboundingSphereTree.getList().add(wheels.getrWheel().getBoundingSphereTree());\n\t\treturn boundingSphereTree;\n\t}", "public void testCreateMeshFactory() {\r\n SXRContext sxrContext = TestDefaultSXRViewManager.mSXRContext;\r\n assertNotNull(sxrContext.createQuad(11, 22));\r\n }", "@Override\n public void start(Stage primaryStage) throws Exception {\n PerspectiveCamera camera = new PerspectiveCamera(true);\n camera.setTranslateZ(-10000);\n camera.setNearClip(0.1);\n camera.setFarClip(100000.0);\n\n //Creates group that holds sphere\n Group group = new Group();\n //Create subscene that holds group\n SubScene world = new SubScene(group, 3.0 * WIDTH / 4.0, HEIGHT, true, SceneAntialiasing.DISABLED);\n\n //Container for controls\n VBox controls = new VBox(10);\n controls.setAlignment(Pos.TOP_CENTER);\n controls.setPadding(new Insets(10, 0, 0, 0));\n\n //Slider that changes G value\n Label gLabel = new Label(\"Gravitational Constant\");\n Slider gConstant = new Slider(.001, 100000, 6.67408 * Math.pow(10, 2));\n gConstant.valueProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n VectorUpdater.G = newValue.doubleValue();\n }\n });\n\n //Slider that changes simulation speed\n Label timeLabel = new Label(\"Simulation Speed\");\n Slider timeConstant = new Slider(0, 10, 0);\n timeConstant.valueProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n delay = newValue.longValue();\n }\n });\n\n //Slider the controls zoom\n Label zoomLabel = new Label(\"Zoom\");\n Slider zoom = new Slider(-50000, 10000, -10000);\n zoom.valueProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n camera.setTranslateZ(newValue.doubleValue());\n }\n });\n\n //All control text fields\n TextField massField = new TextField(\"Mass\");\n TextField radiusField = new TextField(\"Radius\");\n TextField x = new TextField(\"X Coordinate\");\n TextField y = new TextField(\"Y Coordinate\");\n TextField z = new TextField(\"Z Coordinate\");\n TextField vx = new TextField(\"X Velocity\");\n TextField vy = new TextField(\"Y Velocity\");\n TextField vz = new TextField(\"Z Velocity\");\n Label pad = new Label();\n pad.setPrefHeight(40);\n\n //Control buttons\n Button addSphere = new Button(\"Add Sphere\");\n HBox buttons = new HBox(5);\n Button toggle = new Button(\"Start\");\n Button clear = new Button(\"Clear\");\n buttons.setAlignment(Pos.CENTER);\n buttons.getChildren().addAll(toggle, clear);\n\n //Adds items to control menu\n controls.getChildren().addAll(massField, radiusField, x, y, z, vx, vy, vz, addSphere, pad, gLabel, gConstant, timeLabel,\n timeConstant, zoomLabel, zoom, buttons);\n\n //Animates program\n AnimationTimer timer = new AnimationTimer() {\n long time = System.nanoTime();\n\n @Override\n public void handle(long now) {\n if ((now - time) * Math.pow(10, -7) > delay) {\n VectorUpdater.updateVectors(spheres, 0.017);\n for (PhysicalSphere sphere : spheres) {\n double dx = sphere.getVelocityVector().getX() * 0.017;\n double dy = sphere.getVelocityVector().getY() * 0.017;\n double dz = sphere.getVelocityVector().getZ() * 0.017;\n sphere.setTranslateX(sphere.getTranslateX() + dx);\n sphere.setTranslateY(sphere.getTranslateY() + dy);\n sphere.setTranslateZ(sphere.getTranslateZ() + dz);\n }\n time = now;\n }\n }\n };\n\n\n addSphere.setOnAction(event -> {\n //Checks all text fields and formats ones that are not numbers\n for (Node field : controls.getChildren()) {\n if (field instanceof TextField) {\n try {\n Double.parseDouble(((TextField) field).getText());\n } catch (Exception e) {\n ((TextField) field).setText(\"0\");\n }\n }\n }\n //Velocity vector\n Point3D velocity = new Point3D(Double.parseDouble(vx.getText()), Double.parseDouble(vy.getText()),\n Double.parseDouble(vz.getText()));\n double mass = Double.parseDouble(massField.getText());\n double radius = Double.parseDouble(radiusField.getText());\n if(mass == 0)\n mass = 500;\n if(radius == 0)\n radius = 500;\n PhysicalSphere sphere = new PhysicalSphere(radius, mass, velocity);\n group.getChildren().add(sphere);\n sphere.setTranslateX(Double.parseDouble(x.getText()));\n sphere.setTranslateY(Double.parseDouble(y.getText()));\n sphere.setTranslateZ(Double.parseDouble(z.getText()));\n spheres.add(sphere);\n massField.setText(\"Mass\");\n radiusField.setText(\"Radius\");\n vx.setText(\"X Velocity\");\n vy.setText(\"Y Velocity\");\n vz.setText(\"Z Velocity\");\n x.setText(\"X Coordinate\");\n y.setText(\"Y Coordinate\");\n z.setText(\"Z Coordinate\");\n });\n\n //Clears spheres\n clear.setOnAction(event -> {\n group.getChildren().clear();\n spheres.clear();\n });\n\n //Toggles timer\n toggle.setOnAction(event -> {\n if (toggle.getText().equals(\"Start\")) {\n timer.start();\n toggle.setText(\"Stop\");\n } else {\n timer.stop();\n toggle.setText(\"Start\");\n }\n });\n\n //Gets anchor\n world.setOnMousePressed(event -> {\n anchorX = event.getSceneX();\n anchorY = event.getSceneY();\n });\n\n //Adds drag amount to anchor\n world.setOnMouseDragged(event -> {\n camera.setTranslateX(cameraX + (anchorX - event.getSceneX()) * 10);\n camera.setTranslateY(cameraY + (anchorY - event.getSceneY()) * 10);\n });\n\n //Logs new camera location\n world.setOnMouseReleased(event -> {\n cameraX = camera.getTranslateX();\n cameraY = camera.getTranslateY();\n });\n\n //Create border layout\n BorderPane layout = new BorderPane();\n layout.setPadding(new Insets(0, 10, 0, 10));\n layout.setCenter(world);\n layout.setRight(controls);\n\n //Create main scene and add layout\n Scene scene = new Scene(layout, WIDTH, HEIGHT, true);\n world.setFill(Color.LIGHTSTEELBLUE);\n world.setCamera(camera);\n\n //Make the main stage\n primaryStage.setTitle(\"3D Physics Simulation\");\n primaryStage.setScene(scene);\n primaryStage.show();\n }", "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 void update() { \n rS = globeR;\n // *Generate the vector of the obj on the surface\n drawPosS = sphereToCart(lon, lat, rS);\n // *Generate the vector of the obj inside the globe\n drawPosD = sphereToCart(lon, lat, rD);\n }", "public MPolygon computeVertex_xyz(FOV f) {\r\n\r\n\t\tMPolygon mpolygon = new MPolygon();\r\n\r\n\t\tdouble radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2));\r\n\t\tdouble radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4));\r\n\t\tdouble radian3 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 4));\r\n\t\tdouble radian4 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 2));\r\n\t\tdouble radianD = MPolygon.toRadian(450 - f.getDirection());\r\n\r\n\t\tMPoint p1 = new MPoint();\r\n\t\tp1.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\t\tp1.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\r\n\t\tMPoint p2 = new MPoint();\r\n\t\tp2.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\t\tp2.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\r\n\t\tMPoint p3 = new MPoint();\r\n\t\tp3.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\t\tp3.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\r\n\t\tMPoint p4 = new MPoint();\r\n\t\tp4.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\t\tp4.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\r\n\t\tMPoint D = new MPoint();\r\n\t\tD.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\t\tD.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\r\n\t\tMPoint location = new MPoint();\r\n\t\tlocation.x = f.getLatitude();\r\n\t\tlocation.y = f.getLongitude();\r\n\t\tmpolygon.setP1(p1);\r\n\t\tmpolygon.setP2(p2);\r\n\t\tmpolygon.setP3(p2);\r\n\t\tmpolygon.setP4(p4);\r\n\t\tmpolygon.setD(D);\r\n\t\tmpolygon.setLocation(location);\r\n\r\n\t\treturn mpolygon;\r\n\r\n\t}", "public void makeCylinder (float radius, int radialDivisions, int heightDivisions)\r\n {\r\n \t// Midpoint for top and bottom surfaces\r\n \tPoint midTop = new Point( 0f, 0.5f, 0f);\r\n \tPoint midBot = new Point( 0f, -0.5f, 0f );\r\n \t\r\n \tPoint upper[] = new Point[radialDivisions + 1];\r\n \tPoint lower[] = new Point[radialDivisions + 1];\r\n \t\r\n \t// Calculate x and z coordinates using parametric equations\r\n \t// Top circular surface\r\n \tfor(int i = 0; i <= radialDivisions; i ++)\r\n \t{\r\n \t\tupper[i] = new Point();\r\n \t\t\r\n \t\tupper[i].x = radius * (float)( Math.cos( Math.toRadians((360.0/radialDivisions ) * i ) ) );\r\n \t\tupper[i].z = radius * (float)( Math.sin( Math.toRadians((360.0/radialDivisions ) * i ) ) );\r\n \t\tupper[i].y = 0.5f;\r\n \t\t\r\n \t}\r\n \t\r\n \t// Bottom circle\r\n \tfor(int i = 0; i <= radialDivisions; i ++)\r\n \t{\r\n \t\tlower[i] = new Point();\r\n \t\t\r\n \t\tlower[i].x = radius * (float)( Math.cos( ( Math.toRadians(360.0/radialDivisions * ( i ) ) ) ) );\r\n \t\tlower[i].z = radius * (float)( Math.sin( ( Math.toRadians(360.0/radialDivisions * ( i ) ) ) ) );\r\n \t\tlower[i].y = -0.5f;\r\n \t\t\r\n \t}\r\n \t\r\n \t// Print both the top and bottom circular faces\r\n \tfor( int i = 0; i < radialDivisions; i ++ )\r\n \t{\r\n \t\tthis.addTriangle(midTop.x, midTop.y, midTop.z, upper[i + 1].x, upper[i + 1].y, upper[i + 1].z, upper[i].x, upper[i].y, upper[i].z);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i < radialDivisions; i ++ )\r\n \t{\r\n \t\tthis.addTriangle(midBot.x, midBot.y, midBot.z, lower[i].x, lower[i].y, lower[i].z, lower[i + 1].x, lower[i + 1].y, lower[i + 1].z);\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \t// Curved Surface\r\n \tfloat v = -0.5f;\r\n \t\r\n \tfloat vert[] = new float[heightDivisions + 1];\r\n \t\r\n \tfor( int i = 0; i <= heightDivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)heightDivisions);\r\n \t}\r\n \t\r\n \t// Display the curved surface faces\r\n \tfor( int j = 0; j < heightDivisions; j ++ )\r\n \t\tfor(int k = 0; k < radialDivisions; k ++ )\r\n \t\t{\r\n \t\t\tif( k == radialDivisions - 1 )\r\n \t\t\t{\r\n \t\t\t\tPoint tempP1 = new Point(lower[k].x, vert[j], lower[k].z);\r\n \t\t\t\tPoint tempP2 = new Point(lower[0].x, vert[j], lower[0].z);\r\n \t\t\t\tPoint tempP3 = new Point(lower[0].x, vert[j + 1], lower[0].z);\r\n \t\t\t\tPoint tempP4 = new Point(lower[k].x, vert[j + 1], lower[k].z);\r\n \t\t\t\t\r\n \t\t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP4.x, tempP4.y, tempP4.z, tempP3.x, tempP3.y, tempP3.z );\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP2.x, tempP2.y, tempP2.z);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tPoint tempP1 = new Point(lower[k].x, vert[j], lower[k].z);\r\n \t\t\t\tPoint tempP2 = new Point(lower[k + 1].x, vert[j], lower[k + 1].z);\r\n \t\t\t\tPoint tempP3 = new Point(lower[k + 1].x, vert[j + 1], lower[k + 1].z);\r\n \t\t\t\tPoint tempP4 = new Point(lower[k].x, vert[j + 1], lower[k].z);\r\n \t\t\t\t\r\n \t\t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP4.x, tempP4.y, tempP4.z, tempP3.x, tempP3.y, tempP3.z );\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP2.x, tempP2.y, tempP2.z);\r\n \t\t\t}\r\n \t\t}\r\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public static Scene scene7() {\r\n\t\tPoint cameraPosition = new Point(-3.0, 1.0, 6.0);\r\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */cameraPosition,\r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0),\r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene7\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initBackgroundColor(new Vec(0.01,0.19,0.22))\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(3);\r\n\r\n\t\tShape plainShape = new Plain(new Vec(0.0,-4.3,0.0), new Point(0.0, -4.3, 0.0));\r\n\t\tMaterial plainMat = Material.getMetalMaterial()\r\n\t\t\t\t.initKa(new Vec(0.11,0.09,0.02)).initReflectionIntensity(0.1);\r\n\t\tSurface plainSurface = new Surface(plainShape, plainMat);\r\n\t\tfinalScene.addSurface(plainSurface);\r\n\r\n\t\tShape transparentSphere = new Sphere(new Point(1.5, 0, -3.5), 4);\r\n\t\tMaterial transparentSphereMat = Material.getGlassMaterial(true)\r\n\t\t\t\t.initRefractionIntensity(0.8).initRefractionIndex(1.35).initReflectionIntensity(0.4);\r\n\t\tSurface transparentSphereSurface = new Surface(transparentSphere, transparentSphereMat);\r\n\t\tfinalScene.addSurface(transparentSphereSurface);\r\n\r\n\t\tPoint sunPosition = new Point(0, 3, -45);\r\n\t\tShape sunDome = new Dome(sunPosition, 8, new Vec(0, 1, 0));\r\n\t\tMaterial sunDomeMat = Material.getMetalMaterial().initKa(new Vec(0.95,0.84,0.03));\r\n\t\tSurface sunDomeSurface = new Surface(sunDome, sunDomeMat);\r\n\t\tfinalScene.addSurface(sunDomeSurface);\r\n\r\n\t\tVec sunDirection = cameraPosition.sub(sunPosition);\r\n\t\tLight sunLight = new DirectionalLight(sunDirection, new Vec(0.95,0.84,0.03));\r\n\t\tfinalScene.addLightSource(sunLight);\r\n\r\n\t\treturn finalScene;\r\n\t}", "public Sphere2(\n\t\t\tString description, Vector3D centre, double radius,\n\t\t\tboolean inverse,\n\t\t\tSurfaceProperty surfaceProperty,\n\t\t\tSceneObject parent,\n\t\t\tStudio studio\n\t\t)\n\t{\n\t\tsuper(description, surfaceProperty, parent, studio);\n\t\tthis.centre = centre; //passes current sphere's center and radius\n\t\tthis.radius = radius;\n\t\tthis.inverse = inverse;\n\t}", "public StarsMesh() {\r\n\r\n\t\tvertices = new float[star_count * 3];\r\n\t\tindices = new short[star_count];\r\n\r\n\t\tRandom gen = new Random(System.currentTimeMillis());\r\n\r\n\t\tfor (int x = 0; x < star_count * 3; x += 3) {\r\n\t\t\tint rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(250) - 125) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x] = rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(130) - 65) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x + 1] = rand;\r\n\r\n\t\t\twhile ((rand = gen.nextInt(200) - 100) == 0)\r\n\t\t\t\t;\r\n\t\t\tvertices[x + 2] = rand;\r\n\r\n\t\t\t// vertices[x+2] = 0;\r\n\r\n\t\t\tindices[x / 3] = (short) ((short) x / 3);\r\n\t\t}\r\n\r\n\t\tByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length * 4);\r\n\t\tvbb.order(ByteOrder.nativeOrder());\r\n\t\tvertexBuffer = vbb.asFloatBuffer();\r\n\t\tvertexBuffer.put(vertices);\r\n\t\tvertexBuffer.position(0);\r\n\r\n\t\tByteBuffer ibb = ByteBuffer.allocateDirect(indices.length * 2);\r\n\t\tibb.order(ByteOrder.nativeOrder());\r\n\t\tindexBuffer = ibb.asShortBuffer();\r\n\t\tindexBuffer.put(indices);\r\n\t\tindexBuffer.position(0);\r\n\t}", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public QuadMesh\n (boolean isBeingSplit,\n Matrix4f cubeMatrix, \n\t\tVector3f color,\n\t\tboolean inAtmosphere, \n\t\tVector3f meshOffset, \n\t\tboolean inFrustum, \n\t\tfloat arcLengthOverSize, \n\t\tVector3f center, \n\t\tfloat intensity, \n\t\tTexture2D Heightmap, \n\t\tString f ,\n\t\tQuadMesh p, \n\t\tVector3f v1, \n\t\tVector3f v2, \n\t\tVector3f v3, \n\t\tVector3f v4,\n\t\tfloat size,\n\t\tint x, \n\t\tint y, \n\t\tboolean hasChildren, \n\t\tArrayList<QuadMesh> children, \n\t\tBoundingSphere sphere, \n\t\tGeometry mesh, \n\t\tVector3f faceIndex, \n\t\tfloat centerOff,\n\t\tGeometry bsp)\t\n{\n\t\tfirst = v1;\n\t\tsecond = v2;\n\t\tthird = v3;\n\t\tfourth = v4;\n\t\twidth = size;\n\t\tindex1 = x;\n\t\tindex2 = y;\n\t\tthis.hasChildren = hasChildren;\n\t\tthis.children = children;\n\t\tparent = p;\n\t\tface = f;\n\t\tthis.sphere = sphere;\n\t\tthis.mesh = mesh;\n\t\tthis.faceIndex = faceIndex;\n\t\tthis.centerOff = centerOff;\n\t\tthis.Heightmap = Heightmap;\n\t\tthis.intensity = intensity;\n\t\tthis.arcLengthOverSize = arcLengthOverSize;\n\t\tthis.center = center;\n\t\tthis.inFrustum = inFrustum;\n\t\tthis.meshOffset = meshOffset;\n\t\tthis.inAtmosphere = inAtmosphere;\n\t\tthis.color = color;\n\t\tthis.cubeMatrix = cubeMatrix;\n\t\tthis.bsp = bsp;\n\n\t\n\t}", "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void intersect( Ray ray, IntersectResult result ) {\n \t\tVector3d e = new Vector3d(ray.eyePoint);\n \t\te.sub(this.center);\n \t\tdouble a = ray.viewDirection.dot(ray.viewDirection);\n \t\tdouble b = 2 * ray.viewDirection.dot(e);\n \t\tdouble c = e.dot(e) - this.radius * this.radius;\n \t\tdouble discriminant = b*b - 4*a*c;\n \t\t\n \t\tif (discriminant == 0.0) {\n \t\t\t\n \t\t\tdouble t_pos = -0.5 * b / a;\n \t\t\t// scale ray viewDirection to be t_pos length\n\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n\t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n\t\t\tpoint_of_intersection.scale(t_pos);\n\t\t\tpoint_of_intersection.add(ray.eyePoint);\n\t\t\t\n\t\t\t// normal is point_of_intersection - sphere.center\n\t\t\tVector3d normal = new Vector3d();\n\t\t\tnormal.add(point_of_intersection);\n\t\t\tnormal.sub(this.center);\n\t\t\tnormal.normalize();\n\t\t\t\n\t\t\tresult.p.set(point_of_intersection);\n\t\t\tresult.material = this.material;\n\t\t\tresult.t = t_pos;\n\t\t\tresult.n.set(normal);\n \t\t\t\n \t\t}\n \t\telse if (discriminant > 0.0) {\n \t\t\t\n \t\t\t// solve quadratic formula\n \t\t\tdouble q = (b > 0) ? -0.5 * (b + Math.sqrt(discriminant)) : -0.5 * (b - Math.sqrt(discriminant));\n \t\t\tdouble t_pos = q / a;\n \t\t\tdouble t_neg = c / q;\n \t\t\t\n \t\t\tif (t_pos < t_neg) {\n \t\t\t\tdouble temp = t_pos;\n \t\t\t\tt_pos = t_neg;\n \t\t\t\tt_neg = temp;\n \t\t\t}\n \t\t\t\t\n \t\t\tif (t_neg > 0) {\n \t\t\t\t// scale ray viewDirection to be t_neg length\n \t\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n \t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n \t\t\tpoint_of_intersection.scale(t_neg);\n \t\t\tpoint_of_intersection.add(ray.eyePoint);\n \t\t\t\n \t\t\t// normal is point_of_intersection - sphere.center\n \t\t\tVector3d normal = new Vector3d();\n \t\t\tnormal.add(point_of_intersection);\n \t\t\tnormal.sub(this.center);\n \t\t\tnormal.normalize();\n \t\t\t\n \t\t\tresult.p.set(point_of_intersection);\n \t\t\tresult.material = this.material;\n \t\t\tresult.t = t_neg;\n \t\t\tresult.n.set(normal);\n \t\t\t}\n\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n\n }", "public boolean isSphereInBox(final Vec3 inP, float fRadius)\n {\n float fDist;\n float fDistSq = 0;\n Vec4 p = m.getInverseSimple().multiply(inP.toPoint());\n\n // Add distance squared from sphere centerpoint to box for each axis\n for (int i = 0; i < 3; i++)\n {\n if (abs(p.get(i)) > extents.get(i))\n {\n fDist = abs(p.get(i)) - extents.get(i);\n fDistSq += fDist * fDist;\n }\n }\n\n\n return (fDistSq <= fRadius * fRadius);\n }", "public static Scene scene4() {\n\t\tScene finalScene = new Scene().initAmbient(new Vec(1.0))\r\n\t\t\t\t.initCamera(/* Camera Position = */new Point(0.0, 2.0, 6.0), \r\n\t\t\t\t\t\t/* Towards Vector = */ new Vec(0.0, -0.1 ,-1.0),\r\n\t\t\t\t\t\t/* Up vector = */new Vec(0.0, 1.0, 0.0), \r\n\t\t\t\t\t\t/*Distance to plain =*/ 2.0)\r\n\t\t\t\t.initName(\"scene4\").initAntiAliasingFactor(1)\r\n\t\t\t\t.initRenderRefarctions(true).initRenderReflections(true).initMaxRecursionLevel(6);\r\n // Add Surfaces to the scene.\r\n\t\t\r\n\t\t// (2) Add two domes to make it look like we split a sphere in half. \r\n\t\tShape domeShape = new Dome(new Point(2.0, 0.0, -10.0), 5.0, new Vec(1.0, 0.0, 0.0));\r\n\t\tMaterial domeMat = Material.getRandomMaterial();\r\n\t\tSurface domeSurface = new Surface(domeShape, domeMat);\r\n\t\tfinalScene.addSurface(domeSurface);\r\n\t\t\r\n\t\tdomeShape = new Dome(new Point(-2.0, 0.0, -10.0), 5.0, new Vec(-1.0, 0.0, 0.0));\r\n\t\tdomeSurface = new Surface(domeShape, domeMat);\r\n\t\tfinalScene.addSurface(domeSurface);\r\n\t\t\r\n\t\t// Add light sources:\r\n\t\tCutoffSpotlight cutoffSpotlight = new CutoffSpotlight(new Vec(0.0, -1.0, 0.0), 75.0);\r\n\t\tcutoffSpotlight.initPosition(new Point(0.0, 6.0, -10.0));\r\n\t\tcutoffSpotlight.initIntensity(new Vec(.5,0.5,0.5));\r\n\t\tfinalScene.addLightSource(cutoffSpotlight);\r\n\t\t\r\n\t\treturn finalScene;\r\n\t}", "public Mesh(Primitive shape) {\n\t\tswitch (shape) {\n\t\t\tcase CUBE:\n\t\t\t\tgenerateCube();\n\t\t\t\tbreak;\n\t\t\tcase CUBOID:\n\t\t\t\tgenerateCube();\n\t\t\t\tscale(2, 1, 1); // Stretch the cube along the x-axis to give a cuboid\n\t\t\t\tbreak;\n\t\t\tcase TRIANGULAR_PRISM:\n\t\t\t\tgeneratePrism();\n\t\t\t\tbreak;\n\t\t\tcase SPHERE:\n\t\t\t\tgenerateSphere();\n\t\t\t\tbreak;\n\t\t\tcase CONVEX_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size (to allow a better demonstration of how the lens works) and then squash the sphere along the x-axis\n\t\t\t\tbreak;\n\t\t\tcase CONCAVE_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size and squash along the x-axis\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < verts.length; i++) {\n\t\t\t\t\tif (verts[i].getElement(0) < -0.0001) { // Don't move points in the middle of the x-axis\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) + 0.8); // Move points on the left to the right. This part still bulges out to the left, but when it is on the right it is concave\n\t\t\t\t\t} else if (verts[i].getElement(0) > 0.0001) {\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) - 0.8); // Move points on the right to the left.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The faces are 'inside out', so the ordering of the vertices must be reversed in order to make the normals point the correct way\n\t\t\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\t\t\t// Swap the first and last vertices (0 and 2)\n\t\t\t\t\tint temp = faces[i][0];\n\t\t\t\t\tfaces[i][0] = faces[i][2];\n\t\t\t\t\tfaces[i][2] = temp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HALF_CYLINDER:\n\t\t\t\tgenerateHalfCylinder();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\"Mesh constructor cannot take a null primitive\");\n\t\t}\n\t\tnormals = new Vector[faces.length];\n\t\tds = new double[faces.length];\n\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\tnormals[i] = normal(faces[i]); // Calculate the normal for the face\n\t\t\tds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the value of d for the face\n\t\t}\n\t\tcalcBoxVerts(); // Calculate and store the vertices of the AOBB\n\t}", "@Override\n\tpublic List<BoundingSphere> getBoundingSpheres() {\n\t\tLinkedList<BoundingSphere> res = new LinkedList<BoundingSphere>();\n\t\tBoundingSphere s1 = new BoundingSphere(0.9, new Point(0,0,0));\n\t\ts1.setSphereColore3d(0,0,0);\n\t\tres.add(s1);\n\t\tBoundingSphere temp = this.carFront.getBoundingSpheres().get(0);\n\t\tres.add(temp);\n\t\ttemp = this.carCenter.getBoundingSpheres().get(0);\n\t\tres.add(temp);\n\t\ttemp = this.carBack.getBoundingSpheres().get(0);\n\t\tres.add(temp);\n\n\t\treturn res;\n\n\n\t}", "public RayTracer() {\n\t\tspheres = new ArrayList<Sphere>();\n\t\tspheres.add(new Sphere(-2.0f, 0.0f, -15.0f, 4.0f, 1.00f, 0.32f, 0.36f, 0.1f, 0.8f, 100.0f));\n\t\tspheres.add(new Sphere(5.0f, 5.0f, -15.0f, 2.0f, 0.00f, 0.92f, 0.36f, 0.1f, 0.8f, 100.0f));\n\t\tspheres.add(new Sphere(10.0f, -8.0f, -30.0f, 6.0f, 0.36f, 0.32f, 1.00f, 0.1f, 0.8f, 100.0f));\n\n\t\tlight = new Light(5.0f, 10.0f, 10.0f, 1.0f); // (x, y, z, intensity).\n\t\tcamera = new Camera(512, 512, 50.0f); // (width, height, fov).\n\t}", "public interface FrameSphere3DReadOnly extends Sphere3DReadOnly, FrameShape3DReadOnly\n{\n /** {@inheritDoc} */\n @Override\n FramePoint3DReadOnly getPosition();\n\n /**\n * {@inheritDoc}\n * <p>\n * Note that the centroid is also the position of this sphere.\n * </p>\n */\n @Override\n default FramePoint3DReadOnly getCentroid()\n {\n return getPosition();\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} remain unmodified.\n * </p>\n *\n * @param line the line expressed in world coordinates that may intersect this\n * sphere. Not modified.\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if the frame argument is not expressed in the same\n * reference frame as {@code this}.\n */\n default int intersectionWith(FrameLine3DReadOnly line, Point3DBasics firstIntersectionToPack, Point3DBasics secondIntersectionToPack)\n {\n return intersectionWith(line.getPoint(), line.getDirection(), firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} remain unmodified.\n * </p>\n *\n * @param line the line expressed in world coordinates that may intersect this\n * sphere. Not modified.\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if {@code line} is not expressed in the same reference\n * frame as {@code this}.\n */\n default int intersectionWith(FrameLine3DReadOnly line, FramePoint3DBasics firstIntersectionToPack, FramePoint3DBasics secondIntersectionToPack)\n {\n return intersectionWith(line.getPoint(), line.getDirection(), firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} remain unmodified.\n * </p>\n *\n * @param line the line expressed in world coordinates that may intersect this\n * sphere. Not modified.\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n */\n default int intersectionWith(Line3DReadOnly line, FramePoint3DBasics firstIntersectionToPack, FramePoint3DBasics secondIntersectionToPack)\n {\n return intersectionWith(line.getPoint(), line.getDirection(), firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} remain unmodified.\n * </p>\n *\n * @param line the line expressed in world coordinates that may intersect this\n * sphere. Not modified.\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if any of the frame arguments is not expressed in the\n * same reference frame as {@code this}.\n */\n default int intersectionWith(Line3DReadOnly line, FixedFramePoint3DBasics firstIntersectionToPack, FixedFramePoint3DBasics secondIntersectionToPack)\n {\n return intersectionWith(line.getPoint(), line.getDirection(), firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} remain unmodified.\n * </p>\n *\n * @param line the line expressed in world coordinates that may intersect this\n * sphere. Not modified.\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if any of the arguments is not expressed in the same\n * reference frame as {@code this}.\n */\n default int intersectionWith(FrameLine3DReadOnly line, FixedFramePoint3DBasics firstIntersectionToPack, FixedFramePoint3DBasics secondIntersectionToPack)\n {\n return intersectionWith(line.getPoint(), line.getDirection(), firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} are set to\n * {@link Double#NaN}.\n * </p>\n *\n * @param pointOnLine a point expressed in world located on the infinitely long line.\n * Not modified.\n * @param lineDirection the direction expressed in world of the line. Not modified.s\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if any of the frame arguments is not expressed in the\n * same reference frame as {@code this}.\n */\n default int intersectionWith(FramePoint3DReadOnly pointOnLine,\n FrameVector3DReadOnly lineDirection,\n Point3DBasics firstIntersectionToPack,\n Point3DBasics secondIntersectionToPack)\n {\n checkReferenceFrameMatch(pointOnLine, lineDirection);\n return Sphere3DReadOnly.super.intersectionWith(pointOnLine, lineDirection, firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} are set to\n * {@link Double#NaN}.\n * </p>\n *\n * @param pointOnLine a point expressed in world located on the infinitely long line.\n * Not modified.\n * @param lineDirection the direction expressed in world of the line. Not modified.s\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n */\n default int intersectionWith(Point3DReadOnly pointOnLine,\n Vector3DReadOnly lineDirection,\n FramePoint3DBasics firstIntersectionToPack,\n FramePoint3DBasics secondIntersectionToPack)\n {\n if (firstIntersectionToPack != null)\n firstIntersectionToPack.setReferenceFrame(getReferenceFrame());\n if (secondIntersectionToPack != null)\n secondIntersectionToPack.setReferenceFrame(getReferenceFrame());\n return Sphere3DReadOnly.super.intersectionWith(pointOnLine, lineDirection, firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} are set to\n * {@link Double#NaN}.\n * </p>\n *\n * @param pointOnLine a point expressed in world located on the infinitely long line.\n * Not modified.\n * @param lineDirection the direction expressed in world of the line. Not modified.s\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if any of the frame arguments is not expressed in the\n * same reference frame as {@code this}.\n */\n default int intersectionWith(Point3DReadOnly pointOnLine,\n Vector3DReadOnly lineDirection,\n FixedFramePoint3DBasics firstIntersectionToPack,\n FixedFramePoint3DBasics secondIntersectionToPack)\n {\n if (firstIntersectionToPack != null)\n checkReferenceFrameMatch(firstIntersectionToPack);\n if (secondIntersectionToPack != null)\n checkReferenceFrameMatch(secondIntersectionToPack);\n return Sphere3DReadOnly.super.intersectionWith(pointOnLine, lineDirection, firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} are set to\n * {@link Double#NaN}.\n * </p>\n *\n * @param pointOnLine a point expressed in world located on the infinitely long line.\n * Not modified.\n * @param lineDirection the direction expressed in world of the line. Not modified.s\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if either {@code pointOnLine} or {@code lineDirection} is\n * not expressed in the same reference frame as\n * {@code this}.\n */\n default int intersectionWith(FramePoint3DReadOnly pointOnLine,\n FrameVector3DReadOnly lineDirection,\n FramePoint3DBasics firstIntersectionToPack,\n FramePoint3DBasics secondIntersectionToPack)\n {\n checkReferenceFrameMatch(pointOnLine, lineDirection);\n if (firstIntersectionToPack != null)\n firstIntersectionToPack.setReferenceFrame(getReferenceFrame());\n if (secondIntersectionToPack != null)\n secondIntersectionToPack.setReferenceFrame(getReferenceFrame());\n return Sphere3DReadOnly.super.intersectionWith(pointOnLine, lineDirection, firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /**\n * Computes the coordinates of the possible intersections between a line and this sphere.\n * <p>\n * In the case the line and this sphere do not intersect, this method returns {@code 0} and\n * {@code firstIntersectionToPack} and {@code secondIntersectionToPack} are set to\n * {@link Double#NaN}.\n * </p>\n *\n * @param pointOnLine a point expressed in world located on the infinitely long line.\n * Not modified.\n * @param lineDirection the direction expressed in world of the line. Not modified.s\n * @param firstIntersectionToPack the coordinate in world of the first intersection. Can be\n * {@code null}. Modified.\n * @param secondIntersectionToPack the coordinate in world of the second intersection. Can be\n * {@code null}. Modified.\n * @return the number of intersections between the line and this sphere. It is either equal to 0, 1,\n * or 2.\n * @throws ReferenceFrameMismatchException if any of the arguments is not expressed in the same\n * reference frame as {@code this}.\n */\n default int intersectionWith(FramePoint3DReadOnly pointOnLine,\n FrameVector3DReadOnly lineDirection,\n FixedFramePoint3DBasics firstIntersectionToPack,\n FixedFramePoint3DBasics secondIntersectionToPack)\n {\n checkReferenceFrameMatch(pointOnLine, lineDirection);\n if (firstIntersectionToPack != null)\n checkReferenceFrameMatch(firstIntersectionToPack);\n if (secondIntersectionToPack != null)\n checkReferenceFrameMatch(secondIntersectionToPack);\n return Sphere3DReadOnly.super.intersectionWith(pointOnLine, lineDirection, firstIntersectionToPack, secondIntersectionToPack);\n }\n\n /** {@inheritDoc} */\n @Override\n default void getBoundingBox(BoundingBox3DBasics boundingBoxToPack)\n {\n Sphere3DReadOnly.super.getBoundingBox(boundingBoxToPack);\n }\n\n /** {@inheritDoc} */\n @Override\n default void getBoundingBox(ReferenceFrame destinationFrame, BoundingBox3DBasics boundingBoxToPack)\n {\n EuclidFrameShapeTools.boundingBoxSphere3D(this, destinationFrame, boundingBoxToPack);\n }\n\n /** {@inheritDoc} */\n @Override\n default FrameShape3DPoseReadOnly getPose()\n {\n return null;\n }\n\n /** {@inheritDoc} */\n @Override\n FixedFrameSphere3DBasics copy();\n\n /**\n * Gets a representative {@code String} of this frame sphere 3D given a specific format to use.\n * <p>\n * Using the default format {@link EuclidCoreIOTools#DEFAULT_FORMAT}, this provides a {@code String}\n * as follows:\n *\n * <pre>\n * Sphere 3D: [position: (-0.362, -0.617, 0.066 ), radius: 0.906] - worldFrame\n * </pre>\n * </p>\n */\n @Override\n default String toString(String format)\n {\n return EuclidFrameShapeIOTools.getFrameSphere3DString(format, this);\n }\n}", "@Test\n public void testSerializeDeserialize() throws GeometryException, AlgebraException, IOException, ClassNotFoundException {\n final UniformRandomizer randomizer = new UniformRandomizer(new Random());\n final double alphaEuler1 = 0.0;\n final double betaEuler1 = 0.0;\n final double gammaEuler1 = 0.0;\n final double alphaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n final double betaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n final double gammaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n\n final double horizontalFocalLength1 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double verticalFocalLength1 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double horizontalFocalLength2 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double verticalFocalLength2 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n\n final double skewness1 = randomizer.nextDouble(MIN_SKEWNESS, MAX_SKEWNESS);\n final double skewness2 = randomizer.nextDouble(MIN_SKEWNESS, MAX_SKEWNESS);\n\n final double horizontalPrincipalPoint1 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double verticalPrincipalPoint1 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double horizontalPrincipalPoint2 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double verticalPrincipalPoint2 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n\n final double cameraSeparation = randomizer.nextDouble(MIN_CAMERA_SEPARATION,\n MAX_CAMERA_SEPARATION);\n\n final Point3D center1 = new InhomogeneousPoint3D(\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE),\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE),\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE));\n final Point3D center2 = new InhomogeneousPoint3D(\n center1.getInhomX() + cameraSeparation,\n center1.getInhomY() + cameraSeparation,\n center1.getInhomZ() + cameraSeparation);\n\n final Rotation3D rotation1 = new MatrixRotation3D(alphaEuler1, betaEuler1,\n gammaEuler1);\n final Rotation3D rotation2 = new MatrixRotation3D(alphaEuler2, betaEuler2,\n gammaEuler2);\n\n final PinholeCameraIntrinsicParameters intrinsic1 =\n new PinholeCameraIntrinsicParameters(horizontalFocalLength1,\n verticalFocalLength1, horizontalPrincipalPoint1,\n verticalPrincipalPoint1, skewness1);\n final PinholeCameraIntrinsicParameters intrinsic2 =\n new PinholeCameraIntrinsicParameters(horizontalFocalLength2,\n verticalFocalLength2, horizontalPrincipalPoint2,\n verticalPrincipalPoint2, skewness2);\n\n final PinholeCamera camera1 = new PinholeCamera(intrinsic1, rotation1,\n center1);\n final PinholeCamera camera2 = new PinholeCamera(intrinsic2, rotation2,\n center2);\n\n final FundamentalMatrix fundMatrix1 = new FundamentalMatrix(camera1, camera2);\n\n // serialize and deserialize\n final byte[] bytes = SerializationHelper.serialize(fundMatrix1);\n final FundamentalMatrix fundMatrix2 = SerializationHelper.deserialize(bytes);\n\n // check\n assertEquals(fundMatrix1.getInternalMatrix(), fundMatrix2.getInternalMatrix());\n }", "public EarthGeometry(){\n\t\tgcl1 = new GeodeticCalculator();\n\t\trnd1 = new Random(56789);\n\t}", "public void calculate() {\n\t\t\n\t\tHashMap<Integer, Vertex> vertices = triangulation.getVertices();\n\t\tHashMap<Integer, Face> faces = triangulation.getFaces();\n\n\t\tHashMap<Integer, Integer> chords = new HashMap<Integer, Integer>();\n\t\tList<Vertex> onOuterCircle = new LinkedList<Vertex>();\n\t\tList<Edge> outerCircle = new LinkedList<Edge>();\n\n\t\tfor (Vertex v : vertices.values()) {\n\t\t\tchords.put(v.getId(), 0);\n\t\t\tchildren.put(v.getId(), new LinkedList<Integer>());\n\t\t}\n\n\t\t// determine outer face (randomly, use the first face)\n\t\tFace outerFace = null;\n\t\tfor (Face f : faces.values()) {\n\t\t\touterFace = f;\n\t\t\tbreak;\n\t\t}\n\t\tif (outerFace == null) {\n\t\t\t// there are no faces at all in the embedding\n\t\t\treturn;\n\t\t}\n\n\t\tEdge e = outerFace.getIncidentEdge();\n\t\tvertexOrder[1] = e.getSource();\n\t\tvertexOrder[0] = e.getTarget();\n\t\tonOuterCircle.add(e.getTarget());\n\t\tonOuterCircle.add(e.getNext().getTarget());\n\t\tonOuterCircle.add(e.getSource());\n\t\touterCircle.add(e.getNext().getNext().getTwin());\n\t\touterCircle.add(e.getNext().getTwin());\n\t\t\n\t\t//System.out.println(\"outerCircle 0 \" + outerCircle.get(0).getId() + \" - source: \" + outerCircle.get(0).getSource().getId() + \" - target: \" + outerCircle.get(0).getTarget().getId());\n\t\t//System.out.println(\"outerCircle 1 \" + outerCircle.get(1).getId() + \" - source: \" + outerCircle.get(1).getSource().getId() + \" - target: \" + outerCircle.get(1).getTarget().getId());\n\t\t\n\n\t\tfor (int k=vertexOrder.length-1; k>1; k--) {\n\t\t\t//System.out.println(\"k: \" + k + \" - outerCircle size: \" + outerCircle.size());\n\t\t\t// chose v != v_0,v_1 such that v on outer face, not considered yet and chords(v)=0\n\t\t\tVertex nextVertex = null;\n\t\t\tint nextVertexId = -1;\n\t\t\tfor (int i=0; i<onOuterCircle.size(); i++) {\n\t\t\t\tnextVertex = onOuterCircle.get(i);\n\t\t\t\tnextVertexId = nextVertex.getId();\n\t\t\t\tif (nextVertexId != vertexOrder[0].getId() && nextVertexId != vertexOrder[1].getId()\n\t\t\t\t\t\t&& chords.get(nextVertexId) == 0) {\n\t\t\t\t\t// remove from list\n\t\t\t\t\tonOuterCircle.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"nextVertexId: \" + nextVertexId);\n\n\t\t\t// found the next vertex; add it to the considered vertices\n\t\t\tvertexOrder[k] = nextVertex;\n\t\t\t\n\t\t\t// determine children\n\t\t\tList<Integer> childrenNextVertex = children.get(nextVertexId);\n\t\t\t\n\t\t\t// update edges of outer circle\n\t\t\tint index = 0;\n\t\t\t\n\t\t\twhile (outerCircle.get(index).getTarget().getId() != nextVertexId) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tEdge outofNextVertex = outerCircle.remove(index+1);\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"outOfNextVertex \" + outofNextVertex.getId() + \" - source: \" + outofNextVertex.getSource().getId() + \" - target: \" + outofNextVertex.getTarget().getId());\n\t\t\tEdge intoNextVertex = outerCircle.remove(index);\n\t\t\t//System.out.println(\"intoNextVertex \" + intoNextVertex.getId() + \" - source: \" + intoNextVertex.getSource().getId() + \" - target: \" + intoNextVertex.getTarget().getId());\n\t\t\tEdge current = intoNextVertex.getNext();\n\t\t\t//System.out.println(\"current \" + current.getId() + \" - source: \" + current.getSource().getId() + \" - target: \" + current.getTarget().getId());\n\t\t\t\n\t\t\tint endIndex = index;\n\t\t\t\n\t\t\twhile (current.getId() != outofNextVertex.getId()) {\n\t\t\t\tEdge onCircle = current.getNext().getTwin();\n\t\t\t\touterCircle.add(endIndex, onCircle);\n\t\t\t\t\n\t\t\t\tchildrenNextVertex.add(0, onCircle.getSource().getId());\n\t\t\t\t\n\t\t\t\tendIndex++;\n\t\t\t\tcurrent = current.getTwin().getNext();\n\t\t\t\tonOuterCircle.add(onCircle.getTarget());\n\t\t\t}\n\t\t\t\n\t\t\tEdge lastEdge = outofNextVertex.getNext().getTwin();\n\t\t\touterCircle.add(endIndex, lastEdge);\n\t\t\t\n\t\t\tchildrenNextVertex.add(0, lastEdge.getSource().getId());\n\t\t\tchildrenNextVertex.add(0, lastEdge.getTarget().getId());\n\n\t\t\t// update chords\n\t\t\tfor (Vertex v : onOuterCircle) {\n\t\t\t\tEdge incidentEdge = v.getOutEdge();\n\t\t\t\tint firstEdgeId = incidentEdge.getId();\n\t\t\t\tint chordCounter = -2; // the 2 neighbours are on the outer circle, but no chords\n\t\t\t\tdo {\n\t\t\t\t\tif (onOuterCircle.contains(incidentEdge.getTarget())) {\n\t\t\t\t\t\tchordCounter++;\n\t\t\t\t\t}\n\t\t\t\t\tincidentEdge = incidentEdge.getTwin().getNext();\n\t\t\t\t} while (incidentEdge.getId() != firstEdgeId);\n\t\t\t\tchords.put(v.getId(), chordCounter);\n\t\t\t}\n\t\t}\n\t}", "public Vector2f[] generatePatch(){\n\t\tVector2f[] vertices = new Vector2f[16];\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0);\n\t\tvertices[index++] = new Vector2f(0.333f,0);\n\t\tvertices[index++] = new Vector2f(0.666f,0);\n\t\tvertices[index++] = new Vector2f(1,0);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.333f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.333f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.333f);\n\t\tvertices[index++] = new Vector2f(1,0.333f);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.666f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.666f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.666f);\n\t\tvertices[index++] = new Vector2f(1,0.666f);\n\t\n\t\tvertices[index++] = new Vector2f(0,1);\n\t\tvertices[index++] = new Vector2f(0.333f,1);\n\t\tvertices[index++] = new Vector2f(0.666f,1);\n\t\tvertices[index++] = new Vector2f(1,1);\n\t\t\n\t\treturn vertices;\n\t}", "@Override\n\tpublic void create() {\n\t\tthis.mesh = new Mesh(VertexDataType.VertexArray, false, 4, 6, \n\t\t\t\tnew VertexAttribute(VertexAttributes.Usage.Position, 3, \"attr_position\"));\n\n\t\tmesh.setVertices(new float[] {\n\t\t\t\t-8192f, -512f, 0,\n\t\t\t\t8192f, -512f, 0,\n\t\t\t\t8192f, 512f, 0,\n\t\t\t\t-8192f, 512f, 0\n\t\t});\n\t\tmesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\n\n\t\t// creates the camera\n\t\tcamera = new OrthographicCamera(CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\n\t\t// Sets the positions of the camera\n\t\tcamera.position.set(CoordinateConverter.getCameraWidth()/2, CoordinateConverter.getCameraHeight()/2, 0);\n\t\tcamera.update();\n\n\t\t// Sets how much of the map that is shown on the screen\n\t\tglViewport = new Rectangle(0, 0, CoordinateConverter.getCameraWidth(), CoordinateConverter.getCameraHeight());\n\t\t\n\t}", "public void setup() {\n size(1280, 720, P3D); // use the P3D OpenGL renderer\n noStroke(); // turn off stroke (for the rest of the sketch)\n smooth(6); // set smooth level 6 (default is 2)\n // create all the shapes with a certain radius and height\n for (int i=0; i<NUMSHAPES; i++) {\n float r = random(25, 200);\n float f = random(2, 5);\n shapes.add( new Pyramid(f*r, r) );\n }\n}", "public void makeSphere(float radius, int slices, int stacks) {\n\t\tif (slices < 3)\n\t\t\tslices = 3;\n\n\t\tif (stacks < 3)\n\t\t\tstacks = 3;\n\n\t\tdouble phi = Math.PI / stacks;\n\t\tdouble theta = 2 * Math.PI / slices;\n\n\t\tloopingMethod(radius, slices, stacks, phi, theta);\n\t}", "public boolean intersectSphereTriangle(Triangle t, Vec3D result) {\n\t\t// Find Vec3D P on triangle ABC closest to sphere center\n\t\tresult.set(t.closestPointOnSurface(this));\n\n\t\t// Sphere and triangle intersect if the (squared) distance from sphere\n\t\t// center to Vec3D p is less than the (squared) sphere radius\n\t\tVec3D v = result.sub(this);\n\t\treturn v.magSquared() <= radius * radius;\n\t}", "protected SphereRayIntersection(Point3D point, double distance, boolean outer, Sphere sphere) {\n\t\t\tsuper(point, distance, outer);\n\t\t\tthis.sphere = sphere;\n\t\t}", "public void createPlanet(float radius, float orbitRadius, float axisTilt, Texture texture, List<Moon> moons,List<Float []> ringsSpecs, List<Float [] > ringsColors, float speed){\n\t\tPlanet planet = new Planet(radius,orbitRadius, axisTilt, ringsSpecs,ringsColors, speed);\n\t\tplanet.setTexture(texture);\n\n\t\tfor(Moon moon : moons)\n\t\t\tmoon.setCenter(planet);\n\t\t\n\t\tplanet.addMoons(moons);\n\n\t\tplanets.add(planet);\n\t}" ]
[ "0.73659265", "0.6895095", "0.6706584", "0.6666535", "0.66356397", "0.65258765", "0.6438559", "0.643035", "0.6427336", "0.6408753", "0.63298154", "0.63137585", "0.6279756", "0.6212963", "0.6166902", "0.61582", "0.615101", "0.61340296", "0.6121808", "0.60497683", "0.6045205", "0.60441786", "0.5940034", "0.58949596", "0.5890788", "0.587355", "0.5867763", "0.5838663", "0.5826701", "0.5814331", "0.57985514", "0.57977295", "0.57887685", "0.5780659", "0.57666206", "0.5733907", "0.56913525", "0.5682943", "0.56761825", "0.5633592", "0.56265783", "0.5618454", "0.5599557", "0.5582138", "0.5576135", "0.55415136", "0.552611", "0.5485087", "0.545191", "0.5448503", "0.54406095", "0.5434863", "0.5424582", "0.54154384", "0.5401783", "0.54002607", "0.5388309", "0.5385044", "0.5376233", "0.53677565", "0.5360125", "0.5354395", "0.534391", "0.5343193", "0.5333627", "0.5265275", "0.5253734", "0.52486753", "0.5242955", "0.52097744", "0.51963234", "0.5182901", "0.5171232", "0.5164091", "0.51625735", "0.51591164", "0.51512855", "0.51495326", "0.51431024", "0.51377", "0.5136206", "0.51154155", "0.5107845", "0.51071614", "0.5099153", "0.50929654", "0.5086562", "0.50836074", "0.5068396", "0.5042416", "0.5021355", "0.5018724", "0.50163317", "0.5013991", "0.5003439", "0.4995468", "0.4993513", "0.49889165", "0.49870828", "0.49828243" ]
0.7976449
0
Creates the vertices and faces that define the approximation of a cylinder of radius 1 and height 2 that has been cut in vertically in half
private void generateHalfCylinder() { int segments = 32; verts = new Vector[segments * 2]; faces = new int[4 * segments - 4][3]; double heading = 0; double headingIncrement = Math.PI / (segments - 1); // The increment in heading between segments of vertices for (int s = 0; s < segments; s++) { double x = Math.cos(heading); // x co-ordinate of points on the segment double z = Math.sin(heading); // z co-ordinate of points on the segment verts[s] = new Vector(3); verts[s].setElements(new double[] {x, -1, z}); // Vertex on the bottom semi-circle verts[s + segments] = new Vector(3); verts[s + segments].setElements(new double[] {x, 1, z}); // Vertex on the top semi-circle heading += headingIncrement; } for (int i = 0; i < segments - 1; i++) { // Vertical faces approximating the curved surface faces[i * 2] = new int[] {i, i + segments, i + segments + 1}; // Face involving a point on the bottom semi-circle, the point directly above it (top semi-circle and the same segment) and the point directly above and one segment across faces[i * 2 + 1] = new int[] {i, i + segments + 1, i + 1}; // Face involving a point on the bottom semi-circle, the point above and one segment across and the point one segment across on the bottom semi-circle } for (int i = 0; i < segments - 2; i++) { // Horizontal faces approximating the semi-circles at the top and bottom faces[segments * 2 - 2 + i] = new int[] {0, i + 1, i + 2}; // For the bottom semi-circle, the first vertex connected to the (i + 1)th vertex and the (i + 2)th vertex faces[segments * 2 - 2 + i + segments - 2] = new int[] {segments, segments + i + 2, segments + i + 1}; // The same as above but for the top semi-circle } // Faces representing the vertical square cross-section faces[4 * segments - 6] = new int[] {0, segments * 2 - 1, segments}; // The first vertex, the last vertex and the one above the first faces[4 * segments - 5] = new int[] {0, segments - 1, segments * 2 - 1}; // The first vertex, the last vertex on the bottom and the last vertex (on the top) }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void makeCylinder (float radius, int radialDivisions, int heightDivisions)\r\n {\r\n \t// Midpoint for top and bottom surfaces\r\n \tPoint midTop = new Point( 0f, 0.5f, 0f);\r\n \tPoint midBot = new Point( 0f, -0.5f, 0f );\r\n \t\r\n \tPoint upper[] = new Point[radialDivisions + 1];\r\n \tPoint lower[] = new Point[radialDivisions + 1];\r\n \t\r\n \t// Calculate x and z coordinates using parametric equations\r\n \t// Top circular surface\r\n \tfor(int i = 0; i <= radialDivisions; i ++)\r\n \t{\r\n \t\tupper[i] = new Point();\r\n \t\t\r\n \t\tupper[i].x = radius * (float)( Math.cos( Math.toRadians((360.0/radialDivisions ) * i ) ) );\r\n \t\tupper[i].z = radius * (float)( Math.sin( Math.toRadians((360.0/radialDivisions ) * i ) ) );\r\n \t\tupper[i].y = 0.5f;\r\n \t\t\r\n \t}\r\n \t\r\n \t// Bottom circle\r\n \tfor(int i = 0; i <= radialDivisions; i ++)\r\n \t{\r\n \t\tlower[i] = new Point();\r\n \t\t\r\n \t\tlower[i].x = radius * (float)( Math.cos( ( Math.toRadians(360.0/radialDivisions * ( i ) ) ) ) );\r\n \t\tlower[i].z = radius * (float)( Math.sin( ( Math.toRadians(360.0/radialDivisions * ( i ) ) ) ) );\r\n \t\tlower[i].y = -0.5f;\r\n \t\t\r\n \t}\r\n \t\r\n \t// Print both the top and bottom circular faces\r\n \tfor( int i = 0; i < radialDivisions; i ++ )\r\n \t{\r\n \t\tthis.addTriangle(midTop.x, midTop.y, midTop.z, upper[i + 1].x, upper[i + 1].y, upper[i + 1].z, upper[i].x, upper[i].y, upper[i].z);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i < radialDivisions; i ++ )\r\n \t{\r\n \t\tthis.addTriangle(midBot.x, midBot.y, midBot.z, lower[i].x, lower[i].y, lower[i].z, lower[i + 1].x, lower[i + 1].y, lower[i + 1].z);\r\n \t}\r\n \t\r\n \t\r\n \t\r\n \t// Curved Surface\r\n \tfloat v = -0.5f;\r\n \t\r\n \tfloat vert[] = new float[heightDivisions + 1];\r\n \t\r\n \tfor( int i = 0; i <= heightDivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)heightDivisions);\r\n \t}\r\n \t\r\n \t// Display the curved surface faces\r\n \tfor( int j = 0; j < heightDivisions; j ++ )\r\n \t\tfor(int k = 0; k < radialDivisions; k ++ )\r\n \t\t{\r\n \t\t\tif( k == radialDivisions - 1 )\r\n \t\t\t{\r\n \t\t\t\tPoint tempP1 = new Point(lower[k].x, vert[j], lower[k].z);\r\n \t\t\t\tPoint tempP2 = new Point(lower[0].x, vert[j], lower[0].z);\r\n \t\t\t\tPoint tempP3 = new Point(lower[0].x, vert[j + 1], lower[0].z);\r\n \t\t\t\tPoint tempP4 = new Point(lower[k].x, vert[j + 1], lower[k].z);\r\n \t\t\t\t\r\n \t\t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP4.x, tempP4.y, tempP4.z, tempP3.x, tempP3.y, tempP3.z );\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP2.x, tempP2.y, tempP2.z);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tPoint tempP1 = new Point(lower[k].x, vert[j], lower[k].z);\r\n \t\t\t\tPoint tempP2 = new Point(lower[k + 1].x, vert[j], lower[k + 1].z);\r\n \t\t\t\tPoint tempP3 = new Point(lower[k + 1].x, vert[j + 1], lower[k + 1].z);\r\n \t\t\t\tPoint tempP4 = new Point(lower[k].x, vert[j + 1], lower[k].z);\r\n \t\t\t\t\r\n \t\t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP4.x, tempP4.y, tempP4.z, tempP3.x, tempP3.y, tempP3.z );\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP2.x, tempP2.y, tempP2.z);\r\n \t\t\t}\r\n \t\t}\r\n }", "public void DrawCylinder(float radius, float height, int nSegments ) \n\t{\n\t\tGL11.glBegin(GL11.GL_TRIANGLES);\n\t\tPoint4f point4f7 = new Point4f();\n\t\tPoint4f point4f8 = new Point4f(0.0f, 0.0f, 1.0f, 0.0f);\n\t\tfor(float i=0.0f; i < nSegments; i += 1.0f) {\n\t\t\t//First, the origin is located at the center of the circle below. First, draw the triangle above the side.\n\t\t\tfloat angle = (float)Math.PI * i * 2.0f / nSegments;\n\t\t\tfloat nextAngle = (float)Math.PI * (i + 1.0f) * 2.0f / nSegments;\n\t\t\tfloat x1 = (float)Math.sin((double)angle)*radius, y1 = (float)Math.cos((double)angle)*radius;\n\t\t\tfloat x2 = (float)Math.sin((double)nextAngle)*radius, y2 = (float)Math.cos((double)nextAngle)*radius;\n\n\t\t\tPoint4f point4f1 = new Point4f(x1, y1, 0.0f, 0.0f);\n\t\t\tPoint4f point4f2 = new Point4f(x2, y2, 1.0f, 0.0f);\n\t\t\tPoint4f point4f3 = new Point4f(x1, y1, 1.0f, 0.0f);\n\t\t\tVector4f v = point4f2.MinusPoint(point4f1);\n\t\t\tVector4f w = point4f3.MinusPoint(point4f1);\n\t\t\tVector4f normal = v.cross(w).Normal();\n//\t\t\tGL11.glNormal3f( normal.x, normal.y, normal.z);\n\t\t\tGL11.glNormal3f( x1, y1, 0.0f);\n\t\t\tGL11.glVertex3f(x1, y1, 0.0f);\n\t\t\tGL11.glNormal3f( x2, y2, height);\n GL11.glVertex3f(x2, y2, height);\n GL11.glNormal3f( x1, y1, height);\n GL11.glVertex3f(x1, y1, height);\n \n //Draw the triangle on top of the lid according to the triangle on top of the side.\n Vector4f v2 = point4f2.MinusPoint(point4f8);\n Vector4f w2 = point4f3.MinusPoint(point4f8);\n Vector4f normal2 = v2.cross(w2).Normal();\n GL11.glNormal3f( normal2.x, normal2.y, normal2.z);\n GL11.glVertex3f(0.0f, 0.0f, height);\n GL11.glVertex3f(x2, y2, height);\n GL11.glVertex3f(x1, y1, height);\n \n //Draw the triangle below the sides.\n Point4f point4f4 = new Point4f(x1, y1, 0.0f, 0.0f);\n\t\t\tPoint4f point4f5 = new Point4f(x2, y2, 0.0f, 0.0f);\n\t\t\tPoint4f point4f6 = new Point4f(x1, y1, 1.0f, 0.0f);\n\t\t\tVector4f v1 = point4f5.MinusPoint(point4f4);\n\t\t\tVector4f w1 = point4f6.MinusPoint(point4f4);\n\t\t\tVector4f normal1 = v1.cross(w1).Normal();\n//\t\t\tGL11.glNormal3f( normal1.x, normal1.y, normal1.z);\n\t\t\tGL11.glNormal3f( x1, y1, 0.0f);\n\t\t\tGL11.glVertex3f(x1, y1, 0.0f);\n\t\t\tGL11.glNormal3f( x2, y2, 0.0f);\n GL11.glVertex3f(x2, y2, 0.0f);\n GL11.glNormal3f( x2, y2, height);\n GL11.glVertex3f(x2, y2, height);\n \n //Draw the triangle on the lower lid according to the triangle below the side.\n Vector4f v3 = point4f4.MinusPoint(point4f7);\n Vector4f w3 = point4f5.MinusPoint(point4f7);\n Vector4f normal3 = v3.cross(w3).Normal();\n GL11.glNormal3f( normal3.x, normal3.y, normal3.z);\n GL11.glVertex3f(0.0f, 0.0f, 0.0f);\n GL11.glVertex3f(x2, y2, 0.0f);\n GL11.glVertex3f(x1, y1, 0.0f);\n\t\t}\n\t\tGL11.glEnd();\n\t}", "public void makeCone (float radius, int radialDivisions, int heightDivisions)\r\n {\r\n \tPoint lower[][] = new Point[heightDivisions + 1][radialDivisions + 1];\r\n \t\r\n \tfloat rad[] = new float[heightDivisions + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for every subdivision along the height\r\n \tfor(int i = 0; i < heightDivisions; i ++)\r\n \t{\r\n \t\trad[i] = radius * ( 1.0f - ( 1f /(float)heightDivisions) * i );\r\n \t}\r\n \t\r\n \t// Calculate curved surface vertices for every subdivision along the height\r\n \tfor(int i = 0; i <= heightDivisions; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= radialDivisions; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)radialDivisions) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)radialDivisions) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for next iteration\r\n \t\tvert += (1f / (float)heightDivisions);\r\n \t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Print the bottom circular surface\r\n \tfor(int i = 0; i <= radialDivisions - 1; i ++)\r\n \t{\r\n \t\tthis.addTriangle(lower[0][i].x, vert, lower[0][i].z, 0f, vert, 0f, lower[0][i+1].x, vert, lower[0][i+1].z );\r\n \t}\r\n \t\r\n \t// Print the curved surface\r\n \tfor(int i = 0 ; i < heightDivisions; i++)\r\n \t\tfor(int j = 0 ; j < radialDivisions; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t\t\r\n \t\t}\r\n }", "private void generateSphere() {\n\t\tint segments = 14;\n\t\tint rings = 15; // Use an odd number of rings of faces so that halfway up the sphere is the middle of a ring and not a loop of edges\n\t\tverts = new Vector[segments * (rings - 1) + 2]; // There are rings + 1 rings of vertices, but the first and last of these are each a single vertex\n\t\tfaces = new int[2 * segments * (rings - 1)][3]; // Apart from the first and last, each ring has segments number of square faces, so 2 * segments triangular faces. The first and last each have segments triangular faces\n\t\tverts[0] = new Vector(3);\n\t\tverts[0].setElement(1, -1); // The lowest point of the sphere\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, 1}; // The last face involves the last vertex in the second ring and loops back to the first vertex in the second ring\n\t\t\t} else {\n\t\t\t\tfaces[i] = new int[] {0, i + 1, i + 2}; // Triangles involving the lowest vertex and two consecutive vertices in the second ring of vertices\n\t\t\t}\n\t\t}\n\t\tdouble pitchIncrement = Math.PI / rings; // The increment in pitch (angle above horizontal) between rings of vertices\n\t\tdouble pitch = pitchIncrement - Math.PI / 2; // The lowest point had a pitch of -pi/2\n\t\tdouble headingIncrement = Math.PI * 2.0 / segments; // The increment in heading between segments\n\t\tdouble heading = -Math.PI;\n\t\tfor (int r = 0; r < rings - 1; r++) { // Last ring is a single point and must be treated separately\n\t\t\tdouble y = Math.sin(pitch); // The y co-ordinate for each vertex in this ring\n\t\t\tdouble modulus = Math.cos(pitch); // The radius of the circle which this ring lies on\n\t\t\tfor (int s = 0; s < segments; s++) {\n\t\t\t\tdouble x = modulus * Math.cos(heading); // x co-ordinate for the next vertex\n\t\t\t\tdouble z = modulus * Math.sin(heading); // z co-ordinate for the next vertex\n\t\t\t\tverts[segments * r + s + 1] = new Vector(3);\n\t\t\t\tverts[segments * r + s + 1].setElements(new double[] {x, y, z});\n\t\t\t\theading += headingIncrement;\n\t\t\t}\n\t\t\t// Make faces between the vertices just added and the next ring of vertices to be added\n\t\t\tif (r != rings - 2) { // The second to last ring doesn't make faces with the next ring up in the same way because the last ring is a single vertex\n\t\t\t\tfor (int i = 0; i < segments; i++) {\n\t\t\t\t\tif (i == segments - 1) { // The last two faces make use of the first vertex in the next ring by looping back to the start\n\t\t\t\t\t\t// Two faces in the same plane\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, segments * r + 1 + segments};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, segments * r + 1 + segments, segments * r + 1};\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Two faces that are in the same plane and appear as a quadrilateral\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1)] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments, (segments * r + i + 1) + segments + 1};\n\t\t\t\t\t\tfaces[i * 2 + segments * (2 * r + 1) + 1] = new int[] {segments * r + i + 1, (segments * r + i + 1) + segments + 1, (segments * r + i + 1) + 1};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tpitch += pitchIncrement;\n\t\t}\n\t\tverts[verts.length - 1] = new Vector(3);\n\t\tverts[verts.length - 1].setElement(1, 1); // The last and highest vertex\n\t\tfor (int i = 0; i < segments; i++) {\n\t\t\tif (i == segments - 1) { // Last face completes the ring and includes the last vertex of the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1};\n\t\t\t} else { // Faces involving the last vertex and two consecutive vertices in the second to last ring\n\t\t\t\tfaces[2 * segments + segments * (2 * rings - 5) + i] = new int[] {segments * (rings - 2) + 1 + i, segments * (rings - 1) + 1, segments * (rings - 2) + 1 + i + 1};\n\t\t\t}\n\t\t}\n\t}", "private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "public Prism(int numSides, double radius, double height) {\n Vector3d toTop = new Vector3d(0.0, 0.0, height);\n double centralAngle = 2.0 * Math.PI / numSides;\n\n Face bottomFace = new Face(numSides);\n Face topFace = new Face(numSides);\n int vertexIndex = 0;\n for (int i = 0; i < numSides; i++) {\n double totalAngle = centralAngle * i;\n double x = radius * Math.cos(totalAngle);\n double y = radius * Math.sin(totalAngle);\n Vector3d bottomVertex = new Vector3d(x, y, -height / 2.0);\n\n Vector3d topVertex = new Vector3d();\n topVertex.add(bottomVertex, toTop);\n\n addVertexPositions(bottomVertex, topVertex);\n\n bottomFace.setVertexIndex(numSides - i - 1, vertexIndex);\n topFace.setVertexIndex(i, vertexIndex + 1);\n\n Face quad = new Face(4);\n int nextBottom = (vertexIndex + 2) % (2 * numSides);\n int nextTop = nextBottom + 1;\n quad.setAllVertexIndices(vertexIndex, nextBottom, nextTop,\n vertexIndex + 1);\n\n addFace(quad);\n\n vertexIndex += 2;\n }\n\n addFaces(bottomFace, topFace);\n\n setVertexNormalsToFaceNormals();\n }", "public static DeformableMesh3D createRectangleMesh(double width, double height, double depth, double segment_size){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n //For the complete length there will be n+1 nodes\n int nx = (int)(width/segment_size + 0.5) + 1;\n int ny = (int)(height/segment_size+0.5) + 1;\n int nz = (int)(depth/segment_size+0.5) + 1;\n double actual_w = (nx-1)*segment_size;\n double actual_h = (ny-1)*segment_size;\n double actual_z = (nz-1)*segment_size;\n\n int dex;\n\n //top face x-y @ actual_z/2\n int top_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n dex = top_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex-1\n });\n }\n }\n }\n\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n actual_z/2\n });\n //first\n int a_dex = top_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = top_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = top_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = top_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, a_dex, b_dex});\n triangles.add(new int[]{dex, b_dex, c_dex});\n triangles.add(new int[]{dex, c_dex, d_dex});\n triangles.add(new int[]{dex, d_dex, a_dex});\n\n }\n }\n\n\n //bottom face x-y @ -actual_z/2\n int bottom_starting_dex = pts.size();\n for(int i = 0; i<nx; i++){\n for(int j = 0; j<ny; j++){\n\n dex = bottom_starting_dex + i*ny + j;\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n j*segment_size - actual_h/2,\n -actual_z/2\n });\n\n //create a connection\n if(i>0){\n connections.add(new int[]{\n dex,\n dex - ny\n });\n }\n\n if(j>0){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n //bottom face\n for(int i = 1; i<nx; i++){\n for(int j = 1; j<ny; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n (j-0.5)*segment_size - actual_h/2,\n -actual_z/2\n });\n //first\n int a_dex = bottom_starting_dex + (i-1)*ny + (j-1);\n connections.add(new int[]{dex,a_dex});\n int b_dex = bottom_starting_dex + (i)*ny + (j-1);\n connections.add(new int[]{dex,b_dex});\n int c_dex = bottom_starting_dex + (i)*ny + (j);\n connections.add(new int[]{dex,c_dex});\n int d_dex = bottom_starting_dex + (i-1)*ny + (j);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n\n //left face y-z @ -actual_x/2\n int left_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = left_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n -actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n\n //left face connections\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i,\n left_starting_dex + i*(nz-2)\n });\n\n }\n\n //left face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = left_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = left_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = left_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = left_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //left face merging triangles\n for(int i = 1; i<ny; i++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i-1;\n int b_dex = bottom_starting_dex + i;\n int c_dex = left_starting_dex + i*(nz-2);\n int d_dex = left_starting_dex + (i-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n -actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i;\n b_dex = top_starting_dex + i-1;\n c_dex = left_starting_dex + (i-1)*(nz-2) + (nz-3);\n d_dex = left_starting_dex + (i)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //right face y-z @ actual_x/2\n int right_starting_dex = pts.size();\n for(int i = 0; i<ny; i++){\n for(int j = 1; j<nz-1; j++){\n dex = right_starting_dex + i*(nz-2) + (j-1);\n pts.add(new double[]{\n actual_w/2,\n i*segment_size - actual_h/2,\n j*segment_size - actual_z/2\n });\n\n //creates a connection\n if(i>0){\n //previous row\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n //previous column\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n }\n }\n\n for(int i = 0; i<ny; i++){\n connections.add(new int[]{\n top_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2) + (nz-3)\n });\n\n connections.add(new int[]{\n bottom_starting_dex + i + ny*(nx-1),\n right_starting_dex + i*(nz-2)\n });\n\n }\n\n //right face triangles\n for(int i = 1; i<ny; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = right_starting_dex + (i)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = right_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = right_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = right_starting_dex + (i)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //right face merging triangles\n for(int i = 1; i<ny; i++){\n /*\n connections.add(new int[]{\n top_starting_dex + i,\n left_starting_dex + i*(nz-2) + (nz-3)\n });\n */\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = bottom_starting_dex + i + ny*(nx-1);\n int b_dex = bottom_starting_dex + i-1 + ny*(nx-1);\n int c_dex = right_starting_dex + (i-1)*(nz-2);\n int d_dex = right_starting_dex + (i)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n dex = pts.size();\n\n pts.add(new double[]{\n actual_w/2,\n (i-0.5)*segment_size - actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = top_starting_dex + i-1 + ny*(nx-1);\n b_dex = top_starting_dex + i + ny*(nx-1);\n c_dex = right_starting_dex + (i)*(nz-2) + (nz-3);\n d_dex = right_starting_dex + (i-1)*(nz-2) + (nz-3);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n\n //front face x-z @ -actual_y/2\n int front_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n -actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny\n });\n\n connections.add(new int[]{\n front_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny\n });\n\n }\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n front_starting_dex + (j-1),\n left_starting_dex + j - 1\n });\n\n connections.add(new int[]{\n front_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1\n });\n }\n\n //front face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = front_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = front_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = front_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = front_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n //front face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (i-2)*(nz - 2);\n int b_dex = front_starting_dex + (i-1)*(nz - 2);\n int c_dex = bottom_starting_dex + i*ny;\n int d_dex = bottom_starting_dex + (i-1)*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n -actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = front_starting_dex + (i-1)*(nz - 2) + (nz-3);\n b_dex = front_starting_dex + (i-2)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i-1)*ny;\n d_dex = top_starting_dex + i*ny;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //front face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = front_starting_dex + (j-1);\n int b_dex = front_starting_dex + (j-2);\n int c_dex = left_starting_dex + j - 2;\n int d_dex = left_starting_dex + j - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = front_starting_dex + (j-2) + (nz-2)*(nx-3);\n b_dex = front_starting_dex + (j-1) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 1;\n d_dex = right_starting_dex + j - 2;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //front triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n -actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = front_starting_dex;\n b_dex = bottom_starting_dex + ny;\n c_dex = bottom_starting_dex;\n d_dex = left_starting_dex;\n } else{\n a_dex = front_starting_dex + nz-3;\n b_dex = left_starting_dex + nz-3;\n c_dex = top_starting_dex;\n d_dex = top_starting_dex + ny;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n -actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = front_starting_dex + (nx-3)*(nz - 2);\n b_dex = right_starting_dex;\n c_dex = bottom_starting_dex + (nx-1)*(ny);\n d_dex = bottom_starting_dex + (nx-2)*(ny);\n } else{\n a_dex = front_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = top_starting_dex + (nx-2)*(ny);\n c_dex = top_starting_dex + (nx-1)*(ny);\n d_dex = right_starting_dex + nz-3;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n\n //back plane\n int back_starting_dex = pts.size();\n for(int i = 1; i<nx-1; i++){\n for(int j = 1; j<nz-1; j++){\n dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n pts.add(new double[]{\n i*segment_size - actual_w/2,\n actual_h/2,\n j*segment_size - actual_z/2\n });\n\n if(i>1){\n connections.add(new int[]{\n dex,\n dex - (nz-2)\n });\n }\n\n if(j>1){\n connections.add(new int[]{\n dex,\n dex - 1\n });\n }\n\n\n }\n }\n\n\n //connect to top and bottom.\n for(int i = 1; i<nx-1; i++){\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2),\n bottom_starting_dex + i*ny + ny-1\n });\n\n connections.add(new int[]{\n back_starting_dex + (i-1)*(nz - 2) + (nz-3),\n top_starting_dex + i*ny + ny-1\n });\n\n }\n\n\n //connect to left and right\n for(int j = 1; j<nz-1; j++){\n connections.add(new int[]{\n back_starting_dex + (j-1),\n left_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n\n connections.add(new int[]{\n back_starting_dex + (j-1) + (nz-2)*(nx-3),\n right_starting_dex + j - 1 + (ny-1)*(nz-2)\n });\n }\n\n //back face triangles\n for(int i = 2; i<nx-1; i++){\n for(int j = 2; j<nz-1; j++){\n dex = pts.size();\n //add center\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n //first\n int a_dex = back_starting_dex + (i-2)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,a_dex});\n int b_dex = back_starting_dex + (i-1)*(nz-2) + (j-2) ;\n connections.add(new int[]{dex,b_dex});\n int c_dex = back_starting_dex + (i-1)*(nz-2) + (j-1);\n connections.add(new int[]{dex,c_dex});\n int d_dex = back_starting_dex + (i-2)*(nz-2) + (j-1);\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n }\n\n\n //back face triangles merging to top/bottom sans corners.\n for(int i = 2; i<nx-1; i++){\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n (0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (i-1)*(nz - 2);\n int b_dex = back_starting_dex + (i-2)*(nz - 2);\n int c_dex = bottom_starting_dex + (i-1)*ny + ny - 1;\n int d_dex = bottom_starting_dex + (i)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (i-0.5)*segment_size - actual_w/2,\n actual_h/2,\n -(0.5)*segment_size + actual_z/2\n });\n\n a_dex = back_starting_dex + (i-2)*(nz - 2) + (nz-3);\n b_dex = back_starting_dex + (i-1)*(nz - 2) + (nz-3);\n c_dex = top_starting_dex + (i)*ny + ny - 1;\n d_dex = top_starting_dex + (i-1)*ny + ny - 1;\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n }\n\n //back face triangles merging to left and right sans corners.\n for(int j = 2; j<nz-1; j++){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n int a_dex = back_starting_dex + (j-2);\n int b_dex = back_starting_dex + (j-1);\n int c_dex = left_starting_dex + j - 1 + (ny-1)*(nz-2);\n int d_dex = left_starting_dex + j - 2 + (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n a_dex = back_starting_dex + (j-1) + (nz-2)*(nx-3);\n b_dex = back_starting_dex + (j-2) + (nz-2)*(nx-3);\n c_dex = right_starting_dex + j - 2+ (ny-1)*(nz-2);\n d_dex = right_starting_dex + j - 1+ (ny-1)*(nz-2);\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n //back triangles four corners.\n for(int j = 1; j<nz; j+=nz-2){\n\n dex = pts.size();\n\n pts.add(new double[]{\n 0.5*segment_size - actual_w/2,\n actual_h/2,\n (j - 0.5)*segment_size - actual_z/2\n });\n\n\n\n int a_dex, b_dex, c_dex, d_dex;\n\n if(j==1){\n a_dex = back_starting_dex;\n b_dex = left_starting_dex + (ny-1)*(nz-2);\n c_dex = bottom_starting_dex + ny -1;\n d_dex = bottom_starting_dex + 2*ny - 1;\n } else{\n a_dex = back_starting_dex + nz-3;\n b_dex = top_starting_dex + 2*ny - 1;\n c_dex = top_starting_dex + ny - 1;\n d_dex = left_starting_dex + (ny)*(nz-2) - 1 ;\n }\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n dex = pts.size();\n\n pts.add(new double[]{\n (-0.5)*segment_size + actual_w/2,\n actual_h/2,\n (j-0.5)*segment_size - actual_z/2\n });\n\n\n if(j==1){\n a_dex = back_starting_dex + (nx-3)*(nz - 2);\n b_dex = bottom_starting_dex + (nx-1)*(ny) - 1;\n c_dex = bottom_starting_dex + (nx)*(ny) - 1;\n d_dex = right_starting_dex + (nz-2)*(ny-1);\n } else{\n a_dex = back_starting_dex + (nx-2)*(nz - 2) -1;\n b_dex = right_starting_dex + (nz-2)*(ny-1) + nz - 3;\n c_dex = top_starting_dex + (nx)*(ny) -1;\n d_dex = top_starting_dex + (nx-1)*(ny) -1;\n }\n\n connections.add(new int[]{dex,a_dex});\n connections.add(new int[]{dex,b_dex});\n connections.add(new int[]{dex,c_dex});\n connections.add(new int[]{dex,d_dex});\n\n triangles.add(new int[]{dex, b_dex, a_dex});\n triangles.add(new int[]{dex, c_dex, b_dex});\n triangles.add(new int[]{dex, d_dex, c_dex});\n triangles.add(new int[]{dex, a_dex, d_dex});\n\n\n }\n\n final DeformableMesh3D mesh = new DeformableMesh3D(pts, connections, triangles);\n\n return mesh;\n }", "public double getCylinderSurfaceArea();", "private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }", "@Override\n // public Map<Geometry, List<Point3D>> findIntersections(Ray myRay) {\n public List<Point3D> FindIntersections(Ray myRay) {\n\n List<Point3D> geometryListMap = new ArrayList<>();\n List<Point3D> listOfIntersections = new ArrayList<Point3D>();\n\n // the bottom base of the cylinder\n Plane plane1 = new Plane(orientation.getPOO(), orientation.getDirection());\n\n // the top base of the cylinder\n Plane plane2 = new Plane(top, orientation.getDirection());\n\n List<Point3D> temp1 = plane1.FindIntersections(myRay);\n\n List<Point3D> temp2 = plane2.FindIntersections(myRay);\n\n // removing all points that beyond the radius\n if (temp1 != null)\n for (Point3D p1 : temp1) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p1)).length() <= _radius && p1 != null)\n listOfIntersections.add(p1);\n\n }\n\n if (temp2 != null)\n for (Point3D p2 : temp2) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p2)).length() <= _radius && p2 != null)\n listOfIntersections.add(p2);\n\n }\n\n // using the infinity cylinder to find all the intersections in the body of the limited cylinder\n geometryListMap = super.FindIntersections(myRay);\n\n for (Point3D p : geometryListMap) {\n if (isOnCylinder(p))\n listOfIntersections.add(p);\n\n }\n if (listOfIntersections.isEmpty())\n return null;\n //geometryListMap.put(this, listOfIntersections);\n return geometryListMap;\n }", "private void generateCube() {\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElement(0, -1);\n\t\tverts[0].setElement(1, -1);\n\t\tverts[0].setElement(2, -1);\n\t\t\n\t\tverts[1].setElement(0, 1);\n\t\tverts[1].setElement(1, -1);\n\t\tverts[1].setElement(2, -1);\n\t\t\n\t\tverts[2].setElement(0, -1);\n\t\tverts[2].setElement(1, -1);\n\t\tverts[2].setElement(2, 1);\n\t\t\n\t\tverts[3].setElement(0, 1);\n\t\tverts[3].setElement(1, -1);\n\t\tverts[3].setElement(2, 1);\n\t\t\n\t\tverts[4].setElement(0, -1);\n\t\tverts[4].setElement(1, 1);\n\t\tverts[4].setElement(2, -1);\n\t\t\n\t\tverts[5].setElement(0, 1);\n\t\tverts[5].setElement(1, 1);\n\t\tverts[5].setElement(2, -1);\n\t\t\n\t\tverts[6].setElement(0, -1);\n\t\tverts[6].setElement(1, 1);\n\t\tverts[6].setElement(2, 1);\n\t\t\n\t\tverts[7].setElement(0, 1);\n\t\tverts[7].setElement(1, 1);\n\t\tverts[7].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 3, 2}, {0, 1, 3}, {0, 4, 5}, {0, 5, 1}, {0, 2, 6}, {0, 6, 4}, {2, 7, 6}, {2, 3, 7}, {3, 1, 5}, {3, 5, 7}, {4, 7, 5}, {4, 6, 7}}; // List the vertices of each face by index in verts. Vertices must be listed in clockwise order from outside of the shape so that the faces pointing away from the camera can be culled or shaded differently\n\t}", "public void makeCone(float radius, int radialDivisions, int heightDivisions) {\n\t\t// System.out.println(\"ram\");\n\t\tif (radialDivisions < 3)\n\t\t\tradialDivisions = 3;\n\n\t\tif (heightDivisions < 1)\n\t\t\theightDivisions = 1;\n\n\t\tif (heightDivisions > 65)\n\t\t\theightDivisions = 65;\n\n\t\tif (radialDivisions > 65)\n\t\t\tradialDivisions = 65;\n\t//\tSystem.out.println(radialDivisions + \" \" + heightDivisions);\n\t\t// coordinates for the triangle formation\n\t\tfloat x1 = 0;\n\t\tfloat y1 = 0;\n\t\tfloat z1 = 0;\n\t\tfloat x2 = 0;\n\t\tfloat y2 = 0;\n\t\tfloat z2 = 0;\n\t\tfloat x3 = 0;\n\t\tfloat y3 = 0;\n\t\tfloat z3 = 0;\n\t\tfloat theta = (float) (2 * Math.PI / radialDivisions);\n\t\tfloat refy = -0.5f;\n\t\tfloat nexty = 1f / heightDivisions;\n\t\tfor (int rD = 0; rD < radialDivisions; rD++) {\n\t\t\t//defining coordinates of first point\n\t\t\tx1 = 0f;\n\t\t\ty1 = refy;\n\t\t\tz1 = 0f;\n\t\t\t//defining coordinates of second point\n\t\t\tx2 = (float) (radius * Math.cos(theta * rD));\n\t\t\ty2 = y1;\n\t\t\tz2 = -(float) (radius * Math.sin(theta * rD));\n\t\t\t//defining coordinates of third point\n\t\t\tx3 = (float) (radius * Math.cos(theta * (rD + 1)));\n\t\t\ty3 = y1;\n\t\t\tz3 = -(float) (radius * Math.sin(theta * (rD + 1)));\n\n\t\t\t// tessellation for circle\n\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\n\t\t\t// tessellation for covering\n\t\t\tfor (int hD = 0; hD < heightDivisions; hD++) {\n\t\t\t\t//updating coordinates of first point\n\t\t\t\tx1 = (float) ((radius - (radius * hD / heightDivisions)) * Math\n\t\t\t\t\t\t.cos(theta * (rD + 1)));\n\t\t\t\ty1 = refy + (nexty * hD);\n\t\t\t\tz1 = -(float) ((radius - (radius * hD / heightDivisions)) * Math\n\t\t\t\t\t\t.sin(theta * (rD + 1)));\n\t\t\t\t//updating coordinates of first point\n\t\t\t\tx2 = (float) ((radius - (radius * hD / heightDivisions)) * Math\n\t\t\t\t\t\t.cos(theta * rD));\n\t\t\t\ty2 = refy + (nexty * hD);\n\t\t\t\tz2 = -(float) ((radius - (radius * hD / heightDivisions)) * Math\n\t\t\t\t\t\t.sin(theta * rD));\n\t\t\t\t//updating coordinates of first point\n\t\t\t\tx3 = (float) ((radius - (radius * (hD + 1) / heightDivisions)) * Math\n\t\t\t\t\t\t.cos(theta * rD));\n\t\t\t\ty3 = refy + (nexty * (hD + 1));\n\t\t\t\tz3 = -(float) ((radius - (radius * (hD + 1) / heightDivisions)) * Math\n\t\t\t\t\t\t.sin(theta * rD));\n\n\t\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\t\t\t\t//updating coordinates of first point\n\t\t\t\tx1 = (float) ((radius - (radius * (hD + 1) / heightDivisions)) * Math\n\t\t\t\t\t\t.cos(theta * (rD + 1)));\n\t\t\t\ty1 = refy + (nexty * (hD + 1));\n\t\t\t\tz1 = -(float) ((radius - (radius * (hD + 1) / heightDivisions)) * Math\n\t\t\t\t\t\t.sin(theta * (rD + 1)));\n\t\t\t\t//updating coordinates of first point\n\t\t\t\tx2 = (float) ((radius - (radius * hD / heightDivisions)) * Math\n\t\t\t\t\t\t.cos(theta * (rD + 1)));\n\t\t\t\ty2 = refy + (nexty * hD);\n\t\t\t\tz2 = -(float) ((radius - (radius * hD / heightDivisions)) * Math\n\t\t\t\t\t\t.sin(theta * (rD + 1)));\n\n\t\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\n\t\t\t}\n\n\t\t}\n\n\t}", "public Cylinder(double height, double radius) {\n\t\tsuper();\n\t\tthis.height = height;\n\t\tthis.radius = radius;\n\t\tthis.center = false;\n\t}", "public void calculate() {\n\t\t\n\t\tHashMap<Integer, Vertex> vertices = triangulation.getVertices();\n\t\tHashMap<Integer, Face> faces = triangulation.getFaces();\n\n\t\tHashMap<Integer, Integer> chords = new HashMap<Integer, Integer>();\n\t\tList<Vertex> onOuterCircle = new LinkedList<Vertex>();\n\t\tList<Edge> outerCircle = new LinkedList<Edge>();\n\n\t\tfor (Vertex v : vertices.values()) {\n\t\t\tchords.put(v.getId(), 0);\n\t\t\tchildren.put(v.getId(), new LinkedList<Integer>());\n\t\t}\n\n\t\t// determine outer face (randomly, use the first face)\n\t\tFace outerFace = null;\n\t\tfor (Face f : faces.values()) {\n\t\t\touterFace = f;\n\t\t\tbreak;\n\t\t}\n\t\tif (outerFace == null) {\n\t\t\t// there are no faces at all in the embedding\n\t\t\treturn;\n\t\t}\n\n\t\tEdge e = outerFace.getIncidentEdge();\n\t\tvertexOrder[1] = e.getSource();\n\t\tvertexOrder[0] = e.getTarget();\n\t\tonOuterCircle.add(e.getTarget());\n\t\tonOuterCircle.add(e.getNext().getTarget());\n\t\tonOuterCircle.add(e.getSource());\n\t\touterCircle.add(e.getNext().getNext().getTwin());\n\t\touterCircle.add(e.getNext().getTwin());\n\t\t\n\t\t//System.out.println(\"outerCircle 0 \" + outerCircle.get(0).getId() + \" - source: \" + outerCircle.get(0).getSource().getId() + \" - target: \" + outerCircle.get(0).getTarget().getId());\n\t\t//System.out.println(\"outerCircle 1 \" + outerCircle.get(1).getId() + \" - source: \" + outerCircle.get(1).getSource().getId() + \" - target: \" + outerCircle.get(1).getTarget().getId());\n\t\t\n\n\t\tfor (int k=vertexOrder.length-1; k>1; k--) {\n\t\t\t//System.out.println(\"k: \" + k + \" - outerCircle size: \" + outerCircle.size());\n\t\t\t// chose v != v_0,v_1 such that v on outer face, not considered yet and chords(v)=0\n\t\t\tVertex nextVertex = null;\n\t\t\tint nextVertexId = -1;\n\t\t\tfor (int i=0; i<onOuterCircle.size(); i++) {\n\t\t\t\tnextVertex = onOuterCircle.get(i);\n\t\t\t\tnextVertexId = nextVertex.getId();\n\t\t\t\tif (nextVertexId != vertexOrder[0].getId() && nextVertexId != vertexOrder[1].getId()\n\t\t\t\t\t\t&& chords.get(nextVertexId) == 0) {\n\t\t\t\t\t// remove from list\n\t\t\t\t\tonOuterCircle.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"nextVertexId: \" + nextVertexId);\n\n\t\t\t// found the next vertex; add it to the considered vertices\n\t\t\tvertexOrder[k] = nextVertex;\n\t\t\t\n\t\t\t// determine children\n\t\t\tList<Integer> childrenNextVertex = children.get(nextVertexId);\n\t\t\t\n\t\t\t// update edges of outer circle\n\t\t\tint index = 0;\n\t\t\t\n\t\t\twhile (outerCircle.get(index).getTarget().getId() != nextVertexId) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tEdge outofNextVertex = outerCircle.remove(index+1);\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"outOfNextVertex \" + outofNextVertex.getId() + \" - source: \" + outofNextVertex.getSource().getId() + \" - target: \" + outofNextVertex.getTarget().getId());\n\t\t\tEdge intoNextVertex = outerCircle.remove(index);\n\t\t\t//System.out.println(\"intoNextVertex \" + intoNextVertex.getId() + \" - source: \" + intoNextVertex.getSource().getId() + \" - target: \" + intoNextVertex.getTarget().getId());\n\t\t\tEdge current = intoNextVertex.getNext();\n\t\t\t//System.out.println(\"current \" + current.getId() + \" - source: \" + current.getSource().getId() + \" - target: \" + current.getTarget().getId());\n\t\t\t\n\t\t\tint endIndex = index;\n\t\t\t\n\t\t\twhile (current.getId() != outofNextVertex.getId()) {\n\t\t\t\tEdge onCircle = current.getNext().getTwin();\n\t\t\t\touterCircle.add(endIndex, onCircle);\n\t\t\t\t\n\t\t\t\tchildrenNextVertex.add(0, onCircle.getSource().getId());\n\t\t\t\t\n\t\t\t\tendIndex++;\n\t\t\t\tcurrent = current.getTwin().getNext();\n\t\t\t\tonOuterCircle.add(onCircle.getTarget());\n\t\t\t}\n\t\t\t\n\t\t\tEdge lastEdge = outofNextVertex.getNext().getTwin();\n\t\t\touterCircle.add(endIndex, lastEdge);\n\t\t\t\n\t\t\tchildrenNextVertex.add(0, lastEdge.getSource().getId());\n\t\t\tchildrenNextVertex.add(0, lastEdge.getTarget().getId());\n\n\t\t\t// update chords\n\t\t\tfor (Vertex v : onOuterCircle) {\n\t\t\t\tEdge incidentEdge = v.getOutEdge();\n\t\t\t\tint firstEdgeId = incidentEdge.getId();\n\t\t\t\tint chordCounter = -2; // the 2 neighbours are on the outer circle, but no chords\n\t\t\t\tdo {\n\t\t\t\t\tif (onOuterCircle.contains(incidentEdge.getTarget())) {\n\t\t\t\t\t\tchordCounter++;\n\t\t\t\t\t}\n\t\t\t\t\tincidentEdge = incidentEdge.getTwin().getNext();\n\t\t\t\t} while (incidentEdge.getId() != firstEdgeId);\n\t\t\t\tchords.put(v.getId(), chordCounter);\n\t\t\t}\n\t\t}\n\t}", "public TriangleBumper(Double x,Double y,Double orientation,List<Gadget>triggeredGadgets){\n this.x = x;\n this.y = y;\n this.collideCirc = new ArrayList<Circle>(); //corner that ball will collide with\n this.collideLine = new ArrayList<LineSegment>(); //side that ball will collide with\n this.orientation = orientation;\n this.triggeredGadgets = new ArrayList<>();\n for (Gadget gadget : triggeredGadgets){\n this.triggeredGadgets.add(gadget);\n }\n //circle at each corner\n //line segment at each side\n if(this.orientation == 0.0){\n this.circles = Arrays.asList(new Circle(x,y,0.0), new Circle(x, y+1, 0.0), new Circle(x+1, y, 0.0));\n this.lines = Arrays.asList(new LineSegment(x+1, y, x, y+1), new LineSegment(x, y, x, y+1), new LineSegment(x,y, x+1, y));\n }else if (this.orientation == 90.0){\n this.circles = Arrays.asList(new Circle(x,y,0.0), new Circle(x+1, y, 0.0), new Circle(x+1, y+1,0.0));\n this.lines = Arrays.asList(new LineSegment(x, y, x+1, y), new LineSegment(x+1, y, x+1, y+1), new LineSegment(x,y, x+1, y+1));\n }else if (this.orientation == 180.0){\n this.circles = Arrays.asList(new Circle(x,y+1, 0.0), new Circle(x+1, y, 0.0), new Circle(x+1, y+1, 0.0));\n this.lines = Arrays.asList(new LineSegment(x, y+1, x+1, y), new LineSegment(x+1, y, x+1, y+1), new LineSegment(x+1, y+1, x, y+1));\n }else{\n this.circles = Arrays.asList(new Circle(x,y,0.0), new Circle(x, y+1, 0.0), new Circle(x+1, y+1, 0.0));\n this.lines = Arrays.asList(new LineSegment(x,y,x, y+1), new LineSegment(x,y+1, x+1, y+1), new LineSegment(x+1, y+1, x, y));\n }\n checkRep();\n\n }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "private void setGeometryData() {\n // allocate vertices\n final int factorK = (innerRadius == 0 ? 1 : 2);\n final int verts = factorK * ((zSamples - 2) * (radialSamples) + 2); // rs + 1\n setVertexCoordsSize (verts);\n setNormalCoordsSize (verts);\n\n // generate geometry\n final double fInvRS = 1.0 / (radialSamples);\n final double fZFactor = 1.0 / (zSamples - 1); // 2.0 / (zSamples - 1);\n\n // Generate points on the unit circle to be used in computing the mesh\n // points on a sphere slice.\n final double[] afSin = new double[(radialSamples + 1)];\n final double[] afCos = new double[(radialSamples + 1)];\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fAngle = phi0 + dPhi * fInvRS * iR;\n afCos[iR] = Math.cos (fAngle);\n afSin[iR] = Math.sin (fAngle);\n }\n // afSin[radialSamples] = afSin[0];\n // afCos[radialSamples] = afCos[0];\n\n double radDiff = Math.abs (outerRadius - innerRadius);\n\n for ( int icnt = 0; icnt < 2; icnt++ ) {\n radius = (icnt == 0 ? innerRadius : outerRadius);\n if ( radius == 0.0 ) {\n continue;\n }\n double zNP = centerZ; // 0.0;\n double zSP = centerZ; // 0.0;\n\n // generate the sphere itself\n int i = 0;\n Vector3D tempVa;\n Vector3D kSliceCenter;\n\n for ( int iZ = 1; iZ < (zSamples - 1); iZ++ ) { // -1\n //final double fAFraction = 0.5 * Math.PI * (-1.0f + fZFactor * iZ); // in (-pi/2, pi/2)\n final double fAFraction = theta1 - iZ * fZFactor * dTheta;\n final double fZFraction = Math.sin (fAFraction); // in (-1,1)\n final double fZ = radius * fZFraction;\n\n // compute center of slice\n kSliceCenter = new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + fZ\n );\n\n // compute radius of slice\n final double fSliceRadius = Math.sqrt (\n Math.abs (\n radius * radius - fZ * fZ\n )\n );\n\n // compute slice vertices with duplication at end point\n Vector3D kNormal;\n final int iSave = i;\n for ( int iR = 0; iR < radialSamples; iR++ ) {\n final double fRadialFraction = iR * fInvRS; // in [0,1)\n final Vector3D kRadial = new Vector3D (\n afCos[iR],\n afSin[iR],\n 0\n );\n tempVa = new Vector3D (\n fSliceRadius * kRadial.getX (),\n fSliceRadius * kRadial.getY (),\n fSliceRadius * kRadial.getZ ()\n );\n\n zNP = Math.\n max (kSliceCenter.getZ (), zNP);\n zSP = Math.\n min (kSliceCenter.getZ (), zSP);\n\n putVertex (\n (kSliceCenter.getX () + tempVa.getX ()),\n (kSliceCenter.getY () + tempVa.getY ()),\n (kSliceCenter.getZ () + tempVa.getZ ())\n );\n tempVa = getVertexCoord (i);\n\n kNormal = new Vector3D (\n tempVa.getX () - center.getX (),\n tempVa.getY () - center.getY (),\n tempVa.getZ () - center.getZ ()\n );\n double mag = Math.sqrt (\n Math.pow (kNormal.getX (), 2) +\n Math.pow (kNormal.getY (), 2) +\n Math.pow (kNormal.getZ (), 2)\n );\n kNormal = new Vector3D (\n kNormal.getX () / mag,\n kNormal.getY () / mag,\n kNormal.getZ () / mag\n );\n if ( !viewInside ) {\n putNormal (\n kNormal.getX (),\n kNormal.getY (),\n kNormal.getZ ()\n );\n } else {\n putNormal (\n -kNormal.getX (),\n -kNormal.getY (),\n -kNormal.getZ ()\n );\n }\n i++;\n }\n\n// setVertexCoord(i, getVertexCoord(iSave));\n// setNormalCoord(i, getNormalCoord(iSave));\n putVertex (getVertexCoord (iSave));\n putNormal (getNormalCoord (iSave));\n i++;\n }\n\n // south pole\n if ( theta0 == -0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n (center.getZ () - radius)\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, -1));\n } else {\n putNormal (new Vector3D (0, 0, 1));\n }\n setNormalCount (i + 1);\n i++;\n }\n\n // north pole\n if ( theta1 == 0.5 * Math.PI ) {\n putVertex (new Vector3D (\n center.getX (),\n center.getY (),\n center.getZ () + radius\n ));\n setVertexCount (i + 1);\n if ( !viewInside ) {\n putNormal (new Vector3D (0, 0, 1));\n } else {\n putNormal (new Vector3D (0, 0, -1));\n }\n setNormalCount (i + 1);\n i++;\n }\n }\n\n }", "public Cylinder(double radius, double height) {\n\t\tthis.base = new Circle(radius);\n\t\tthis.height = height;\n\t}", "public static DeformableMesh3D createTestBlock(double w, double h, double depth){\n ArrayList<double[]> pts = new ArrayList<double[]>();\n ArrayList<int[]> connections = new ArrayList<int[]>();\n ArrayList<int[]> triangles = new ArrayList<int[]>();\n\n pts.add(new double[]{-w/2, -h/2, depth/2});\n pts.add(new double[]{-w/2, h/2, depth/2});\n pts.add(new double[]{w/2, h/2, depth/2});\n pts.add(new double[]{w/2, -h/2, depth/2});\n\n pts.add(new double[]{-w/2, -h/2, -depth/2});\n pts.add(new double[]{-w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, h/2, -depth/2});\n pts.add(new double[]{w/2, -h/2, -depth/2});\n\n //back face\n connections.add(new int[]{0, 4});\n connections.add(new int[]{0, 1});\n connections.add(new int[]{1, 5});\n connections.add(new int[]{5, 4});\n\n //front face\n connections.add(new int[]{3, 7});\n connections.add(new int[]{2, 3});\n connections.add(new int[]{2, 6});\n connections.add(new int[]{6, 7});\n\n //front-back connections.\n connections.add(new int[]{3, 0});\n connections.add(new int[]{1, 2});\n connections.add(new int[]{5, 6});\n connections.add(new int[]{7, 4});\n\n //top\n triangles.add(new int[]{0, 2, 1});\n triangles.add(new int[]{0,3,2});\n //top-diagonal\n connections.add(new int[]{0, 2});\n\n //back\n triangles.add(new int[]{0, 1, 5});\n triangles.add(new int[]{0,5,4});\n connections.add(new int[]{0, 5});\n\n //right\n triangles.add(new int[]{1,2,5});\n triangles.add(new int[]{5,2,6});\n connections.add(new int[]{5, 2});\n\n //front\n triangles.add(new int[]{2,3,6});\n triangles.add(new int[]{6,3,7});\n connections.add(new int[]{3, 6});\n\n //left\n triangles.add(new int[]{3,0,4});\n triangles.add(new int[]{3,4,7});\n connections.add(new int[]{3, 4});\n\n //bottom\n triangles.add(new int[]{4,5,6});\n triangles.add(new int[]{4,6,7});\n connections.add(new int[]{4, 6});\n return new DeformableMesh3D(pts, connections, triangles);\n\n }", "private void BC_cylinder(Grid gr){\r\n int i, j, j1, j2;\r\n NSmax = (int)(500.0/dt); repL=0.1;\r\n // Boundary conditions of lower side of computational domain\r\n for(i = 0; i<gr.mxL1; i++) BClow[i]=\"periodic\"; \r\n for(i =gr.mxL1; i<gr.mxL2; i++) BClow[i]=\"wall\";\r\n for(i =gr.mxL2; i<mx; i++) BClow[i]=\"periodic\";\r\n // Boundary conditions on upper side \r\n for(i = 0; i<gr.mxU1; i++) BCupp[i]=\"slip\";\r\n for(i =gr.mxU1; i<gr.mxU2; i++) BCupp[i]=\"in\";\r\n for(i =gr.mxU2; i<mx; i++) BCupp[i]=\"slip\";\r\n // Boundary conditions on left side\r\n for(j = 0; j<my; j++) BClef[j]=\"out\";\r\n // Boundary conditions of right side\r\n for(j = 0; j<my; j++) BCrig[j]=\"out\";\t\t\r\n\r\n // Initial conditions; \r\n for(i=0; i<mx; i++){ \r\n if(BClow[i]==\"wall\") j1=1; else j1=0;\r\n for(j=j1; j<my; j++) u[i][j]=Umean; \r\n }\r\n u[gr.mxL2][0]=0.0;\r\n xrange[0]=1.0f; yrange[0]=-4.5f; xrange[1]=10.0f; yrange[1]=4.5f; \r\n\r\n }", "private void createCube(float x, float y, float z){\r\n\t\tboolean[] sides = checkCubeSides((int)x,(int)y,(int)z);\r\n\t\tfloat[] color = BlockType.color(blocks[(int)x][(int)y][(int)z]);\r\n\t\t\r\n//\t\t gl.glNormal3f(0.0f, 1.0f, 0.0f);\r\n\t\tif(sides[0]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t \r\n//\t // Bottom-face\r\n//\t gl.glNormal3f(0.0f, -1.0f, 0.0f);\r\n\t\t\r\n\t\tif(sides[1]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Back-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, -1.0f);\r\n\t\tif(sides[2]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n//\t // Front-face\r\n//\t gl.glNormal3f(0.0f, 0.0f, 1.0f);\r\n\t\tif(sides[3]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t \r\n//\t // Left-face\r\n//\t gl.glNormal3f(-1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[4]){\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put(len*x);\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(-1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n//\t // Right-face\r\n//\t gl.glNormal3f(1.0f, 0.0f, 0.0f);\r\n\t\tif(sides[5]){\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put((len)*(y+1.0f));\r\n\t\t\tvertexData.put(len*z);\r\n\t\t\t\r\n\t\t\tvertexData.put((len)*(x+1.0f));\r\n\t\t\tvertexData.put(len*y);\r\n\t\t\tvertexData.put((len)*(z+1.0f));\r\n\t\t\t\r\n\t\t\tvertexCount += 6;\r\n\t\t\tfor(int i = 0; i < 6; i++){\r\n\t\t\t\tnormalData.put(1f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tnormalData.put(0f);\r\n\t\t\t\tcolorsData.put(color[0]);\r\n\t\t\t\tcolorsData.put(color[1]);\r\n\t\t\t\tcolorsData.put(color[2]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "public static List<Position> drawCylinder(Position origin, int radius, int height, boolean includeOrigin){\n\t\tList<Position> cylinder = new ArrayList<Position>();\n\t\tPosition pos = origin.get2DProjection();\n\t\tfor(int i = 0; i < height; i++){\n\t\t\tPosition sliceOrigin = vectorAdd(pos, scalarMultiply(Direction.UP.getPosVector(), i));\n\t\t\tList<Position> ring = drawCircle(sliceOrigin, i, true);\n\t\t\tcylinder.addAll(ring);\n\t\t}\n\t\tif(!includeOrigin){\n\t\t\tcylinder.remove(origin);\n\t\t}\n\t\treturn cylinder;\n\t}", "Car(int x, int y) {\n // ASSIGN ALL PARAMETERS TO THE CAR CLASS GLOBAL VARIABLES HERE\n xCord = x;\n yCord = y;\n targetCord = 0;\n // CREATE CAR PSHAPE HERE\n // ATTEMPT TO CREATE A CAR-LOOKING-THING USING YOUR OWN VERTICES\n\n //front of car\n //let's slam a bunch of vertices down and hope.\n car = createShape();\n fullCar = createShape(GROUP);\n car.beginShape();\n car.vertex(0, 20);\n car.vertex(2, 10);\n car.vertex(2.25f, 9);\n car.vertex(3, 7);\n car.vertex(4, 5);\n car.vertex(5, 3);\n car.vertex(6, 2);\n car.vertex(7, 1);\n car.vertex(8, .33f);\n car.vertex(9, .1f);\n car.vertex(10, 0);\n car.vertex(20, 0);\n\n car.vertex(21, .1f);\n car.vertex(22, .33f);\n car.vertex(23, 1);\n car.vertex(24, 2);\n car.vertex(25, 3);\n car.vertex(26, 5);\n car.vertex(27, 7);\n car.vertex(27.75f, 9);\n car.vertex(28, 10);\n car.vertex(30, 20);\n ////hood curve\n car.vertex(0, 20);\n car.vertex(0, 50);\n car.vertex(30, 50);\n car.vertex(30, 20);\n car.endShape(CLOSE);\n\n\n ////main body\n //have as three shape groups on top\n carTopLeft = createShape();\n carTopLeft.beginShape();\n carTopLeft.vertex(7, 24);\n carTopLeft.vertex(0, 50);\n carTopLeft.vertex(0, 20);\n carTopLeft.vertex(7, 24);\n carTopLeft.endShape(CLOSE);\n\n carTopRight = createShape();\n carTopRight.beginShape();\n carTopRight.vertex(23, 24);\n carTopRight.vertex(30, 50);\n carTopRight.vertex(30, 20);\n carTopRight.vertex(23, 24);\n carTopRight.endShape(CLOSE);\n\n carTop = createShape();\n carTop.beginShape();\n carTop.vertex(23, 24);\n\n carTop.vertex(15, 21);\n\n carTop.vertex(7, 24);\n carTop.vertex(0, 50);\n carTop.vertex(30, 50);\n carTop.vertex(23, 24);\n carTop.endShape(CLOSE);\n //car.vertex(23,24);\n //car.vertex(30,50);\n //car.vertex(30,20);\n //car.vertex(23,24);\n //car.vertex(22,23.25);\n //car.vertex(21,22.6);\n //car.vertex(20,22.1);\n //car.vertex(19,21.8);\n //car.vertex(18,21.4);\n //car.vertex(17,21.2);\n //car.vertex(16,21.1);\n //car.vertex(15,21);\n\n //car.vertex(14,21.1);\n //car.vertex(13,21.2);\n //car.vertex(12,21.4);\n //car.vertex(11,21.8);\n //car.vertex(10,22.1);\n //car.vertex(9,22.6);\n //car.vertex(8,23.25);\n //car.vertex(7,24);\n //car.vertex(0,50);\n //car.vertex(0,20);\n //car.vertex(7,24);\n //car.vertex(0,50);\n ////top details\n\n ////rear\n //test vertex\n carRear = createShape();\n carRear.beginShape();\n carRear.vertex(0, 50);\n carRear.vertex(0, 70);\n carRear.vertex(1, 71.2f);\n carRear.vertex(2, 72.33f);\n carRear.vertex(3, 73);\n carRear.vertex(4, 73.25f);\n carRear.vertex(5, 73.75f);\n carRear.vertex(6, 74);\n carRear.vertex(7, 74.2f);\n carRear.vertex(8, 74.4f);\n carRear.vertex(9, 74.6f);\n carRear.vertex(10, 74.8f);\n // carRear.vertex(11,74.85);\n // carRear.vertex(12,74.9);\n //carRear.vertex(14,74.95); \n carRear.vertex(15, 75);\n //carRear.vertex(16,74.95); \n //carRear.vertex(17,74.93);\n //carRear.vertex(18,74.9);\n carRear.vertex(19, 74.85f);\n carRear.vertex(20, 74.8f);\n carRear.vertex(21, 74.6f);\n carRear.vertex(22, 74.4f);\n carRear.vertex(23, 74.2f);\n carRear.vertex(24, 74);\n carRear.vertex(25, 73.75f);\n carRear.vertex(26, 73.25f);\n carRear.vertex(27, 73);\n carRear.vertex(28, 72.33f);\n carRear.vertex(29, 71.2f);\n carRear.vertex(30, 70);\n carRear.vertex(30, 50);\n carRear.endShape(CLOSE);\n //FINISH THE PSHAPE WITH YOUR CUSTOM VERTICES\n\n //it worked\n\n // ADD WHEELS TO THE CAR (ELLIPSES)\n //leftWheel = createShape(ELLIPSE, xCoord +10, yCoord + 25, 8, 8);\n // rightWheel = createShape(ELLIPSE, xCoord +45, yCoord + 25, 8, 8);\n\n //groups everything together\n fullCar.addChild(car);\n fullCar.addChild(carRear);\n fullCar.addChild(carTopLeft);\n fullCar.addChild(carTopRight);\n fullCar.addChild(carTop);\n // fullCar.addChild(leftWheel);\n // fullCar.addChild(rightWheel);\n }", "static void createCubes(double width, double height) {\n \t\r\n \tmaxY=f(startingBound);\r\n \tmaxX=startingBound;\r\n \t\r\n \t//need a function to find the max\r\n \tfor(double i=startingBound; i<=endingBound; i=i+dx) {\r\n \t\tif(f(i)>maxY)\r\n \t\t\tmaxY=f(i);\r\n \t\t\r\n \t\tif(i>maxX)\r\n \t\t\tmaxX=i;\r\n \t}\r\n \tdouble size=height/2-100;\r\n \tSystem.out.println(size);\r\n \tscaleY=maxY/(size);\r\n \tscaleX=(width-100)/maxX;\r\n \t\r\n \tfor(double x=startingBound; x<=endingBound; x=x+dx) {\r\n \t\t//System.out.println(x+\", \"+f(x));\r\n \t\tcubes.add(new Cube(x*scaleX, -f(x)/scaleY, 0, f(x)/scaleY, dx*scaleX));\r\n \t\t//cubes.add(new Cube(x, 100, 0, 100, 100));\r\n \t}\r\n \t\r\n \t\r\n }", "public CubeGL2(double width, double height, double depth) {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n\n for (int i = 0; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) width;\n }\n for (int i = 1; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) height;\n }\n for (int i = 2; i < mCubeVertexData.length; i += 3) {\n mCubeVertexData[i] = mCubeVertexData[i] * (float) depth;\n }\n\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public Cylinder(double height, double radius, boolean Center) {\n\t\tsuper();\n\t\tthis.height = height;\n\t\tthis.radius = radius;\n\t\tthis.center = Center;\n\t}", "public void makeSphere (float radius, int slices, int stacks)\r\n {\r\n \t\r\n \tPoint lower[][] = new Point[stacks + 1][slices + 1];\r\n \tfloat rad[] = new float[stacks + 1];\r\n \tfloat vert = -0.5f;\r\n \t\r\n \t// Calculate radius for each stack\r\n \tfor(int i = 0; i <= stacks; i ++)\r\n \t{\r\n \t\trad[i] = (float)Math.sqrt((0.5f * 0.5f) - (( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) * ( 0.5f - ( ( 1.0f/(float)stacks) * i ) ) ));\r\n\t\t}\r\n \t\r\n \tvert = -0.5f;\r\n \t\r\n \t// Calculate the vertices for each stack\r\n \tfor(int i = 0; i <= stacks; i ++ )\r\n \t{\r\n \t\tfor(int j = 0; j <= slices; j ++)\r\n \t\t{\r\n \t\t\tlower[i][j] = new Point();\r\n \t\t\tlower[i][j].x = rad[i] * (float)Math.cos(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].z = rad[i] * (float)Math.sin(Math.toRadians ( (360.0f / (float)slices) * j ) );\r\n \t\t\tlower[i][j].y = vert;\r\n \t\t}\r\n \t\t// Update the y coordinate for the next stack\r\n \t\tvert += (1.0f / (float)stacks);\r\n \t}\r\n \t\r\n \t\r\n \t// Print all the triangles using the vertices\r\n \tfor(int i = 0 ; i < stacks; i++)\r\n \t\tfor(int j = 0 ; j < slices; j++)\r\n \t\t{\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i][j+1].x, lower[i][j+1].y, lower[i][j+1].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z);\r\n \t\t\tthis.addTriangle(lower[i][j].x, lower[i][j].y, lower[i][j].z, lower[i+1][j+1].x, lower[i+1][j+1].y, lower[i+1][j+1].z, lower[i+1][j].x, lower[i+1][j].y, lower[i+1][j].z);\r\n \t\t}\r\n }", "public void draw() {\n\t\tapplyColors();\n\n\t\tfloat halfHeight = height / 2,\n\t\t\t\tdiameter = 2 * radius;\n\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\t\t// Draw top of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, -height);\n\t\t// Draw bottom of the cylinder\n\t\tRobotRun.getInstance().ellipse(0f, 0f, diameter, diameter);\n\t\tRobotRun.getInstance().translate(0f, 0f, halfHeight);\n\n\t\tRobotRun.getInstance().beginShape(RobotRun.TRIANGLE_STRIP);\n\t\t// Draw a string of triangles around the circumference of the Cylinders top and bottom.\n\t\tfor (int degree = 0; degree <= 360; ++degree) {\n\t\t\tfloat pos_x = RobotRun.cos(RobotRun.DEG_TO_RAD * degree) * radius,\n\t\t\t\t\tpos_y = RobotRun.sin(RobotRun.DEG_TO_RAD * degree) * radius;\n\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, halfHeight);\n\t\t\tRobotRun.getInstance().vertex(pos_x, pos_y, -halfHeight);\n\t\t}\n\n\t\tRobotRun.getInstance().endShape();\n\t}", "public DiscMesh(float radius, int numVertices) {\n Validate.nonNegative(radius, \"radius\");\n Validate.inRange(\n numVertices, \"number of vertices\", 3, Integer.MAX_VALUE);\n\n setMode(Mode.TriangleFan);\n\n float[] normals = new float[numAxes * numVertices];\n float[] positions = new float[numAxes * numVertices];\n float[] texCoords = new float[2 * numVertices];\n\n for (int vi = 0; vi < numVertices; ++vi) {\n normals[numAxes * vi] = 0f;\n normals[numAxes * vi + 1] = 0f;\n normals[numAxes * vi + 2] = 1f;\n\n float theta = FastMath.TWO_PI * vi / numVertices;\n float sin = FastMath.sin(theta);\n float cos = FastMath.cos(theta);\n positions[numAxes * vi] = radius * cos;\n positions[numAxes * vi + 1] = radius * sin;\n positions[numAxes * vi + 2] = 0f;\n\n texCoords[2 * vi] = (1f + cos) / 2f;\n texCoords[2 * vi + 1] = (1f + sin) / 2f;\n }\n\n setBuffer(Type.Normal, numAxes, normals);\n setBuffer(Type.Position, numAxes, positions);\n setBuffer(Type.TexCoord, 2, texCoords);\n\n updateBound();\n setStatic();\n }", "public Cylinder() {\n\t\tthis(1.0);\n\t}", "private void createTrackContour(ArrayList<double[]> contour, double radius) {\r\n // Create vertices for the left half circle\r\n for (int alpha = 90; alpha <= 270; alpha++) {\r\n // A contours vertex (coordinates, color, texture)\r\n double vertex[] = new double[9];\r\n\r\n // Apply color\r\n vertex[3] = trackColor.getRed();\r\n vertex[4] = trackColor.getGreen();\r\n vertex[5] = trackColor.getBlue();\r\n vertex[6] = trackColor.getAlpha();\r\n\r\n // Apply texture coordinates (no texture)\r\n vertex[7] = vertex[8] = 0;\r\n\r\n // Calculate the coordinates of a point lying on the half circle\r\n double u, v;\r\n\r\n u = Math.cos(alpha * (Math.PI / 180)) * radius;\r\n v = Math.sin(alpha * (Math.PI / 180)) * radius;\r\n\r\n // Apply coordinates\r\n vertex[0] = x1 + u;\r\n vertex[1] = y1 + v;\r\n vertex[2] = 0;\r\n\r\n // Add the vertex to the contour list\r\n contour.add(vertex);\r\n }\r\n\r\n // Create vertices for the right half circle\r\n for (int alpha = 270; alpha <= 450; alpha++) {\r\n // A contours vertex (coordinates, color, texture)\r\n double vertex[] = new double[9];\r\n\r\n // Apply color\r\n vertex[3] = trackColor.getRed();\r\n vertex[4] = trackColor.getGreen();\r\n vertex[5] = trackColor.getBlue();\r\n vertex[6] = trackColor.getAlpha();\r\n\r\n // Apply texture coordinates (no texture)\r\n vertex[7] = vertex[8] = 0;\r\n\r\n // Calculate the coordinates of a point lying on the half circle\r\n double u, v;\r\n\r\n u = Math.cos(alpha * (Math.PI / 180)) * radius;\r\n v = Math.sin(alpha * (Math.PI / 180)) * radius;\r\n\r\n // Apply coordinates\r\n vertex[0] = x2 + u;\r\n vertex[1] = y2 + v;\r\n vertex[2] = 0;\r\n\r\n // Add the vertex to the contour list\r\n contour.add(vertex);\r\n }\r\n }", "public Vector2f[] generatePatch(){\n\t\tVector2f[] vertices = new Vector2f[16];\n\t\t\n\t\tint index = 0;\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0);\n\t\tvertices[index++] = new Vector2f(0.333f,0);\n\t\tvertices[index++] = new Vector2f(0.666f,0);\n\t\tvertices[index++] = new Vector2f(1,0);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.333f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.333f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.333f);\n\t\tvertices[index++] = new Vector2f(1,0.333f);\n\t\t\n\t\tvertices[index++] = new Vector2f(0,0.666f);\n\t\tvertices[index++] = new Vector2f(0.333f,0.666f);\n\t\tvertices[index++] = new Vector2f(0.666f,0.666f);\n\t\tvertices[index++] = new Vector2f(1,0.666f);\n\t\n\t\tvertices[index++] = new Vector2f(0,1);\n\t\tvertices[index++] = new Vector2f(0.333f,1);\n\t\tvertices[index++] = new Vector2f(0.666f,1);\n\t\tvertices[index++] = new Vector2f(1,1);\n\t\t\n\t\treturn vertices;\n\t}", "public static double cylinderVolume(double radius, double height){\n return Math.PI * square(radius) * height;\n }", "public CylinderPanel() {\n\t\t\n\t\trInput = new JLabel(\"R = \");\n\t\trInput.setAlignmentX(JLabel.RIGHT_ALIGNMENT);\n\t rInput.setHorizontalAlignment(JLabel.RIGHT);\n\t\thInput = new JLabel(\"H = \");\n\t\thInput.setAlignmentX(JLabel.RIGHT_ALIGNMENT);\n\t hInput.setHorizontalAlignment(JLabel.RIGHT);\n\t\tvOutput = new JLabel(\"Volume: \");\n\t\tvOutput.setAlignmentX(JLabel.RIGHT_ALIGNMENT);\n\t vOutput.setHorizontalAlignment(JLabel.RIGHT);\n\t\tsaOutput = new JLabel(\"Surface Area: \");\n\t\tsaOutput.setAlignmentX(JLabel.RIGHT_ALIGNMENT);\n\t saOutput.setHorizontalAlignment(JLabel.RIGHT);\n\t\tvResult = new JLabel(\" --\");\n\t\tsaResult = new JLabel(\" --\");\n\t\t\n\t\trText = new JTextField(10);\n\t\thText = new JTextField(10);\n\t\t\n\t\tclear = new JButton(\"Clear\");\n\t\tcalculate = new JButton(\"Calculate\");\n\t\t\n\t\ts = new Cylinder();\n\t\t\n\t\tsetBorder(BorderFactory.createTitledBorder(\"Cylinder\"));\n\t\t\n\t\tadd(rInput);\n\t\tadd(rText);\n\t\tadd(hInput);\n\t\tadd(hText);\n\t\tadd(vOutput);\n\t\tadd(vResult);\n\t\tadd(saOutput);\n\t\tadd(saResult);\n\t\tadd(clear);\n\t\tadd(calculate);\n\t\t\n\t\tButtonListener listener = new ButtonListener();\n\t\t\n\t\tclear.addActionListener(listener);\n\t\tcalculate.addActionListener(listener);\n\t\t\n\t\t\n\t}", "public static double volumeCylinder( double radius, double height ) {\n return Math.PI * areaCircle(radius) * height;\n }", "public static double cylinderArea(double r, double h) {\r\n return 2 * Math.PI * r * h + 2 * Math.PI * r * r;\r\n }", "public abstract void constructHull();", "public static Cylinder buildRobotCylinder() {\n Cylinder robotCylinder = new Cylinder(\n ROBOT_CYLINDER_LENGTH,\n ROBOT_CYLINDER_RADIUS,\n CYLINDER_NUM_LENGTH_SEGMENTS,\n CYLINDER_NUM_CIRCLE_SEGMENTS\n );\n Material m = new Material(true);\n m.setColor(COLOR_BLUE_50_TRANSPARENT);\n robotCylinder.setMaterial(m);\n robotCylinder.setTransparent(true);\n robotCylinder.setDoubleSided(true);\n robotCylinder.rotate(Vector3.Axis.X, 90.0); // Vertical, like the Y-axis\n\n return robotCylinder;\n }", "public float[] makeVertices(float radius, float[] color)\n {\n int noOfComponents = 3 + 3 + 3; // 3 position coordinates, 3 color coordinates, 3 normal coordinates\n float[] vertices = new float[(verticalResolution+1) * horizontalResolution * noOfComponents];\n int vertexNumberInc = 3 + 3 + 3; // three position coordinates, three color values, three normal coordinates\n int vertexNumber = 0;\n\n float elevation = 0;\n float elevationInc = (float) (Math.PI / verticalResolution);\n float azimuth = 0;\n float azimuthInc = (float) (2* Math.PI / horizontalResolution);\n for(int elevationIndex = 0; elevationIndex <= verticalResolution; elevationIndex++) {\n azimuth = 0;\n for(int azimuthIndex = 0; azimuthIndex < horizontalResolution; azimuthIndex++) {\n // position coordinates in spherical coordinates\n float xPos = radius * (float) (Math.sin(elevation) * Math.cos(azimuth));\n float yPos = radius * (float) (Math.sin(elevation) * Math.sin(azimuth));\n float zPos = radius * (float) Math.cos(elevation);\n vertices[vertexNumber] = xPos;\n vertices[vertexNumber+1] = yPos;\n vertices[vertexNumber+2] = zPos;\n // color coordinates (for all vertices the same)\n vertices[vertexNumber+3] = color[0];\n vertices[vertexNumber+4] = color[1];\n vertices[vertexNumber+5] = color[2];\n // coordinates of normal vector\n // for a sphere this vector is identical to the normalizes position vector\n float normalizationFactor = 1 / (float) Math.sqrt((xPos * xPos) + (yPos * yPos) + (zPos * zPos));\n vertices[vertexNumber+6] = xPos * normalizationFactor;\n vertices[vertexNumber+7] = yPos * normalizationFactor;\n vertices[vertexNumber+8] = zPos * normalizationFactor;\n\n vertexNumber += vertexNumberInc;\n azimuth += azimuthInc;\n }\n elevation += elevationInc;\n }\n return vertices;\n }", "public CubeGL2() {\n // Define points for a cube.\n // X, Y, Z\n mCubeVertexData = new float[]\n {\n // Front face\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n // Right face\n 1.0f, 1.0f, 1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n 1.0f, -1.0f, -1.0f,\n 1.0f, 1.0f, -1.0f,\n // Back face\n 1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n 1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, -1.0f,\n // Left face\n -1.0f, 1.0f, -1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, 1.0f, 1.0f,\n // Top face\n -1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n -1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, 1.0f,\n 1.0f, 1.0f, -1.0f,\n // Bottom face\n 1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n 1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, 1.0f,\n -1.0f, -1.0f, -1.0f,\n };\n // R, G, B, A\n mCubeColourData = new float[]\n {\n // Front face\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n 1.0f, 0.0f, 0.0f, 1.0f,\n // Right face\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n // Back face\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n // Left face\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n 1.0f, 1.0f, 0.0f, 1.0f,\n // Top face\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n 0.0f, 1.0f, 1.0f, 1.0f,\n // Bottom face\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f,\n 1.0f, 0.0f, 1.0f, 1.0f\n };\n // X, Y, Z\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Right face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Left face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n // Bottom face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f\n };\n // X, Y\n // Texture coordinate data.\n mCubeTextureCoordinateData = new float[]\n {\n // Front face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Right face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Back face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Left face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Top face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f,\n // Bottom face\n 0.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 0.0f,\n 0.0f, 1.0f,\n 1.0f, 1.0f,\n 1.0f, 0.0f\n };\n // Initialize the buffers.\n mCubeVertices = ByteBuffer.allocateDirect(mCubeVertexData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeVertices.put(mCubeVertexData).position(0);\n mCubeColours = ByteBuffer.allocateDirect(mCubeColourData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeColours.put(mCubeColourData).position(0);\n mCubeNormals = ByteBuffer.allocateDirect(mCubeNormalData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeNormals.put(mCubeNormalData).position(0);\n mCubeTextureCoordinates = ByteBuffer.allocateDirect(mCubeTextureCoordinateData.length * 4)\n .order(ByteOrder.nativeOrder()).asFloatBuffer();\n mCubeTextureCoordinates.put(mCubeTextureCoordinateData).position(0);\n Matrix.setIdentityM(mModelMatrix, 0);\n }", "public SoCubeWithoutTop()\n//\n////////////////////////////////////////////////////////////////////////\n{\n nodeHeader.SO_NODE_CONSTRUCTOR();\n\n nodeHeader.SO_NODE_ADD_SFIELD(width,\"width\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(height,\"height\", (2.0f));\n nodeHeader.SO_NODE_ADD_SFIELD(depth,\"depth\", (2.0f));\n\n isBuiltIn = true;\n\n if (nodeHeader.SO_NODE_IS_FIRST_INSTANCE()) {\n // Initialize corner coordinate values\n coords[0].setValue(-1.0f, 1.0f, -1.0f); // Left Top Back\n coords[1].setValue( 1.0f, 1.0f, -1.0f); // Right Top Back\n coords[2].setValue(-1.0f, -1.0f, -1.0f); // Left Bottom Back\n coords[3].setValue( 1.0f, -1.0f, -1.0f); // Right Bottom Back\n coords[4].setValue(-1.0f, 1.0f, 1.0f); // Left Top Front\n coords[5].setValue( 1.0f, 1.0f, 1.0f); // Right Top Front\n coords[6].setValue(-1.0f, -1.0f, 1.0f); // Left Bottom Front\n coords[7].setValue( 1.0f, -1.0f, 1.0f); // Right Bottom Front\n\n // Initialize face vertices to point into coords. The order of\n // vertices around the faces is chosen so that the texture\n // coordinates match up: texture coord (0,0) is at the first\n // vertex and (1,1) is at the third. The vertices obey the\n // right-hand rule for each face.\n verts[1][2] = verts[2][3] = verts[4][3] = coords[0];\n verts[1][3] = verts[3][2] = verts[4][2] = coords[1];\n verts[1][1] = verts[2][0] = verts[5][0] = coords[2];\n verts[1][0] = verts[3][1] = verts[5][1] = coords[3];\n verts[0][3] = verts[2][2] = verts[4][0] = coords[4];\n verts[0][2] = verts[3][3] = verts[4][1] = coords[5];\n verts[0][0] = verts[2][1] = verts[5][3] = coords[6];\n verts[0][1] = verts[3][0] = verts[5][2] = coords[7];\n\n // Initialize texture coordinates. These are for the 4 corners of\n // each face, starting at the lower left corner\n texCoords[0].setValue(0.0f, 0.0f);\n texCoords[1].setValue(1.0f, 0.0f);\n texCoords[2].setValue(1.0f, 1.0f);\n texCoords[3].setValue(0.0f, 1.0f);\n\n // Initialize face normals\n normals[0].setValue( 0.0f, 0.0f, 1.0f); // Front\n normals[1].setValue( 0.0f, 0.0f, -1.0f); // Back\n normals[2].setValue(-1.0f, 0.0f, 0.0f); // Left\n normals[3].setValue( 1.0f, 0.0f, 0.0f); // Right\n normals[4].setValue( 0.0f, 1.0f, 0.0f); // Top\n normals[5].setValue( 0.0f, -1.0f, 0.0f); // Bottom\n\n }\n}", "void drawSphere(GL2 gl,GLU glu, double r, int lats, int longs) {\n\n\n\n GLUquadric qobj = glu.gluNewQuadric();\n\n gl.glColor4f(0.0f, 0.0f, 1.0f,0.01f);\n glu.gluQuadricDrawStyle(qobj, GLU.GLU_LINE);\n glu.gluQuadricNormals(qobj, GLU.GLU_SMOOTH);\n\n glu.gluSphere(qobj, r, 70, 70);\n\n /*\n int i, j;\n for(i = 0; i <= lats; i++) {\n float lat0 = (float) (Math.PI * (-0.5 + (double) (i - 1) / lats));\n float z0 = (float) (Math.sin(lat0));\n float zr0 = (float) (Math.cos(lat0));\n\n float lat1 = (float) (Math.PI * (-0.5 + (double) i / lats));\n float z1 = (float) (Math.sin(lat1));\n float zr1 = (float) (Math.expm1(lat1));\n\n gl.glBegin(GL_LINE_STRIP);\n gl.glColor3f(0.0f, 1.0f, 1.0f);\n for(j = 0; j <= longs; j++) {\n float lng = (float) (2. * Math.PI * (double) (j - 1) / longs);\n float x = (float) (r*Math.cos(lng));\n float y = (float) (r*Math.sin(lng));\n\n\n\n gl.glNormal3f(x * z0, y * z0,(float)r* zr0);\n gl.glVertex3f(x * z0, y * z0, (float) r*zr0);\n //gl.glNormal3f(x * zr1, y * zr1, (float) r*z1);\n //gl.glVertex3f(x * zr1, y * zr1, (float)r*z1);\n }\n gl.glEnd();\n }\n */\n }", "public double getCylinderBaseArea();", "@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\r\n\t}", "public static String buildCylinder(String controlPoints, String id, \n String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, \n SymbolModifiers attributes) {\n StringBuilder output = new StringBuilder(); \n String pointArrayStringList = \"\";\n\n // variables for the cylinder position\n double pivotx = 0.0D;\n double pivoty = 0.0D;\n\n try { \n \n // Get the points of the icons. For the cylinder we need only\n // one point. Ignore any more than the first point.\n String[] latlons = controlPoints.split(\" \");\n\n if (latlons.length > 0) {\n String[] pivot = latlons[0].split(\",\");\n\n if (pivot.length >= 2) {\n pivotx = Double.parseDouble(pivot[0]);\n pivoty = Double.parseDouble(pivot[1]);\n } else {\n throw new NumberFormatException();\n }\n } else {\n // throw an illegal number of points exception\n throw new InvalidNumberOfPointsException();\n }\n \n // Build the cylinder\n pointArrayStringList = XsltCoordinateWrapper.getCircleKml(pivotx,\n pivoty, id, name, description, lineColor, fillColor, altitudeMode,\n attributes.AM_DISTANCE.get(0),\n attributes.X_ALTITUDE_DEPTH.get(0),\n attributes.X_ALTITUDE_DEPTH.get(1)); \n } catch (Exception e) {\n pointArrayStringList = \"\"; \n }\n\n return pointArrayStringList;\n\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n if (bdhcHandler != null) {\n int[] slopes = bdhcHandler.getSelectedPlate().getSlope();\n float angle = (float) Math.atan2(slopes[indexSlope1], slopes[indexSlope2]);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n g.setColor(Color.magenta);\n final int angleRadius = (radius * 2) / 3;\n final int angleOffset = size / 2 - angleRadius;\n g2.setStroke(new BasicStroke(2));\n g.drawArc(angleOffset, angleOffset, 2 * angleRadius, 2 * angleRadius, 0, (int) (-(angle * 180) / Math.PI));\n\n g2.setStroke(new BasicStroke(2));\n if (frontView) {\n g.setColor(Color.red);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n } else {\n g.setColor(Color.green);\n //g.drawLine(size / 2, size / 2, size, size / 2);\n g.drawLine(size / 2, size / 2, size, size / 2);\n g.setColor(Color.blue);\n g.drawLine(size / 2, size / 2, size / 2, 0);\n }\n\n int circleOffset = size / 2 - radius;\n g.setColor(Color.black);\n g2.setStroke(new BasicStroke(1));\n g.drawOval(circleOffset, circleOffset, radius * 2, radius * 2);\n\n int x = (int) (Math.cos(angle) * radius);\n int y = (int) (Math.sin(angle) * radius);\n int lineOffset = size / 2;\n g.setColor(Color.orange);\n g2.setStroke(new BasicStroke(3));\n g.drawLine(lineOffset - x, lineOffset - y, lineOffset + x, lineOffset + y);\n\n }\n\n }", "private List<Double> createSkeletonOfDegree (int degree1, int degree2) {\n List<Double> skeleton = new ArrayList<Double>();\n \n if (degree1 < 0 || degree2 < 0) { return skeleton; }\n int totalDegree = degree1 + degree2;\n for (int i = 0; i <= totalDegree; ++i) {\n skeleton.add(0.0);\n }\n return skeleton;\n }", "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 void drawPolygon (int xC, int yC, int xP, int yP,int ribs, Graphics g){\r\n \r\n \tint n = ribs; \r\n \t//delta keep the the original delta , this size of delta will increase in delta size each time.\r\n \tdouble delta = (2* Math.PI)/ n;\r\n \tdouble deltaTemp = delta;\r\n \t//List of Points that I keep during n rotation.\r\n \tList <Point> points; \r\n \tfloat x,y,newX,newY;\r\n \t//First Sliding\r\n \tx = xP - xC;\r\n \ty = yP - yC;\r\n \tnewX = x; \t\r\n \tnewY = y; \t\r\n \tList <Point> vertexs = new ArrayList();\r\n \t//Follow delta angle rotation n times and write a list of vertices to vertexs list.\r\n \tfor (int i = 0; i < n ; i++)\r\n \t{\r\n \t\tnewX = (int) ((x*Math.cos(delta) - y*Math.sin(delta)));\r\n \t\tnewY = (int) ((x*Math.sin(delta) + y*Math.cos(delta))); \r\n \t\tvertexs.add(new Point(Math.round(newX),Math.round(newY))); \t\r\n \t\tSystem.out.println(vertexs.get(i).x+\",\"+vertexs.get(i).y);\r\n \t\tdelta = delta + deltaTemp;\r\n \t}\r\n \t//Sliding back\r\n \tfor (int i = 0; i < vertexs.size(); i++ ){\r\n \t\tvertexs.get(i).x = (int) (vertexs.get(i).getX() + xC);\r\n \t\tvertexs.get(i).y = (int) (vertexs.get(i).getY() + yC);\r\n \t\tg.drawRect(vertexs.get(i).x, vertexs.get(i).y ,1,1);\r\n \t}\r\n \t//draw line between the list of the points we got.\r\n \tfor (int z = 0 ; z < vertexs.size(); z++){\r\n \t\tif (z == vertexs.size()-1)\r\n \t\t\tdrawLine((int) Math.round(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(0).getX()), (int)(vertexs.get(0).getY()),g);\r\n \t\telse\r\n \t\t\tdrawLine((int)(vertexs.get(z).getX()), (int)(vertexs.get(z).getY()),(int)(vertexs.get(z+1).getX()), (int)(vertexs.get(z+1).getY()),g);\r\n\r\n \t\t}\r\n \t\r\n }", "Cube(int l, int b, int h)\r\n\t{\r\n\t\t//System.out.println(\"We are in constructor\");\r\n\t\tlength=l;\r\n\t\tbredth=b;\r\n\t\theight=h;\r\n\t}", "public static void main(String[] args) throws FileNotFoundException\n {\n File file = new File(System.getProperty(\"user.home\") + \"/Desktop\", \"lion.off\");\n Scanner s = new Scanner(file);\n s.nextLine(); // Skip first line of context\n\n // Create result file(mesh2C.off)\n try { fileManager.CreateResultFile(); }\n catch(IOException exc) { System.out.println(\"Error: \" + exc.getMessage()); }\n \n // Initializing PrintWriter instance for writing data to result file\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.home\") + \"/Desktop/mesh2C.off\");\n pw.println(\"OFF\"); // Write first line to mesh2C.off\n\n // Get number of vertices which lion.off has\n String str_num_of_vertices = s.next();\n String str_num_of_faces = s.next();\n int num_of_vertices = Integer.parseInt(str_num_of_vertices);\n int num_of_faces = Integer.parseInt(str_num_of_faces);\n pw.println(Integer.toString(num_of_vertices + 8) + \" \" + Integer.toString(num_of_faces + 6) + s.nextLine());\n\n // Extract max and min value of each axis(X, Y, Z) separately\n double minX = 0, maxX = 0;\n double minY = 0, maxY = 0;\n double minZ = 0, maxZ = 0;\n\n for(int i = 0; i < num_of_vertices; i++)\n {\n double x = Double.parseDouble(s.next());\n if(x < minX) { minX = x; }\n if(x > maxX) { maxX = x; }\n double y = Double.parseDouble(s.next());\n if(y < minY) { minY = y; }\n if(y > maxY) { maxY = y; }\n double z = Double.parseDouble(s.next());\n if(z < minZ) { minZ = z; }\n if(z > maxZ) { maxZ = z; }\n\n String tmp = Double.toString(x) + \" \" + Double.toString(y) + \" \" + Double.toString(z);\n pw.println(tmp); \n }\n\n // Calculate and create String arrays for Vertices and faces\n String vStr[] = new String[8];\n String fStr[] = new String[6];\n\n vStr[0] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[1] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[2] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[3] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[4] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n vStr[5] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[6] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[7] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n\n for(int i = 0; i < 8; i++) { pw.println(vStr[i]); }\n \n // Calculate face list and write into result file\n String id_quad_1 = Integer.toString(num_of_vertices);\n String id_quad_2 = Integer.toString(num_of_vertices + 1);\n String id_quad_3 = Integer.toString(num_of_vertices + 2);\n String id_quad_4 = Integer.toString(num_of_vertices + 3);\n String id_quad_5 = Integer.toString(num_of_vertices + 4);\n String id_quad_6 = Integer.toString(num_of_vertices + 5);\n String id_quad_7 = Integer.toString(num_of_vertices + 6);\n String id_quad_8 = Integer.toString(num_of_vertices + 7);\n\n fStr[0] = \"4 \" + id_quad_1 + \" \" + id_quad_4 + \" \" + id_quad_3 + \" \" + id_quad_2;\n fStr[1] = \"4 \" + id_quad_5 + \" \" + id_quad_6 + \" \" + id_quad_7 + \" \" + id_quad_8;\n fStr[2] = \"4 \" + id_quad_1 + \" \" + id_quad_5 + \" \" + id_quad_8 + \" \" + id_quad_4;\n fStr[3] = \"4 \" + id_quad_3 + \" \" + id_quad_7 + \" \" + id_quad_6 + \" \" + id_quad_2;\n fStr[4] = \"4 \" + id_quad_2 + \" \" + id_quad_6 + \" \" + id_quad_5 + \" \" + id_quad_1;\n fStr[5] = \"4 \" + id_quad_4 + \" \" + id_quad_8 + \" \" + id_quad_7 + \" \" + id_quad_3;\n\n // Copy face data from original lion.off file to result file\n s.nextLine();\n for(int i = 0; i < num_of_faces; i++) { pw.println(s.nextLine()); }\n \n // Add new face data at the bottom of result file\n for(int i = 0; i < 6; i++) { pw.println(fStr[i]); }\n\n // Terminate filestream\n s.close();\n pw.close();\n }", "@SuppressWarnings(\"unused\")\r\n private void makeSubcutaneousFat2DVOI() {\r\n\r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n \r\n VOIVector vois = abdomenImage.getVOIs();\r\n VOI theVOI = vois.get(0);\r\n\r\n // there should be only one VOI and one curve\r\n VOIContour curve = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals = new int [curve.size()];\r\n int[] yVals = new int [curve.size()];\r\n int[] zVals = new int [curve.size()];\r\n curve.exportArrays(xVals, yVals, zVals);\r\n \r\n int[] xValsSubcutaneousVOI = new int [curve.size()];\r\n int[] yValsSubcutaneousVOI = new int [curve.size()];\r\n \r\n \r\n // the intensity profile along a radial line for a given angle\r\n short[] profile;\r\n \r\n // the x, y location of all the pixels along a radial line for a given angle\r\n int[] xLocs;\r\n int[] yLocs;\r\n try {\r\n profile = new short[xDim];\r\n xLocs = new int[xDim];\r\n yLocs = new int[xDim];\r\n } catch (OutOfMemoryError error) {\r\n System.gc();\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT allocate profile\");\r\n return;\r\n }\r\n\r\n try {\r\n srcImage.exportData(0, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"JCATsegmentAbdomen2D(): Error exporting data\");\r\n return;\r\n }\r\n\r\n\r\n // find a subcutaneous fat contour point for each abdominal contour point\r\n // we know the abdominal contour points are located at three degree increments\r\n double angleRad;\r\n int count;\r\n int contourPointIdx = 0;\r\n for (int angle = 0; angle < 360; angle += angularResolution) {\r\n count = 0;\r\n int x = xcm;\r\n int y = ycm;\r\n int yOffset = y * xDim;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n // increment x each step\r\n scaleFactor = Math.tan(angleRad);\r\n while (x < xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk out in x and compute the value of y for the given radial line\r\n x++;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n\r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the abdomen VOI point\r\n // Find where the subcutaneous fat ends and the muscle starts\r\n \r\n // start at the end of the profile array since its order is from the\r\n // center-of-mass to the abdomen voi point\r\n \r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU && profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx <= 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n break;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n // decrement y each step\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n while (y > yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n // walk to the top of the image and compute values of x for the given radial line\r\n y--;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU&& profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n // decrement x each step\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n while (x > xVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n x--;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU&& profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n \r\n } else if (angle > 225 && angle <= 315) {\r\n // increment y each step\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n while (y < yVals[contourPointIdx]) {\r\n // store the intensity and location of each point along the radial line\r\n profile[count] = sliceBuffer[yOffset + x];\r\n xLocs[count] = x;\r\n yLocs[count] = y;\r\n count++;\r\n \r\n y++;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n \r\n // profile contains all the source image intensity values along the line from\r\n // the center-of-mass to the newly computed abdomen VOI point\r\n // Find where the subcutaneous fat ends\r\n int idx = count - 5; // skip over the skin\r\n while (idx >= 0 && profile[idx] < muscleThresholdHU&& profile[idx] > airThresholdHU) {\r\n idx--;\r\n }\r\n if (idx == 0) {\r\n MipavUtil.displayError(\"findAbdomenVOI(): Can NOT find visceral cavity in the intensity profile\");\r\n return;\r\n }\r\n xValsSubcutaneousVOI[contourPointIdx] = xLocs[idx];\r\n yValsSubcutaneousVOI[contourPointIdx] = yLocs[idx];\r\n\r\n }\r\n \r\n contourPointIdx++;\r\n } // end for (angle = 0; ...\r\n\r\n\r\n // make the VOI's and add the points to them\r\n subcutaneousVOI = new VOI((short)0, \"Subcutaneous area\");\r\n subcutaneousVOI.importCurve(xValsSubcutaneousVOI, yValsSubcutaneousVOI, zVals);\r\n\r\n }", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public Astrocylinders() {\r\n\t\tsuper(CompartmentType.ASTROCYLINDERS.numParams);\r\n\t}", "protected void skybox() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(0, 0, 0);\n pos2 = new Triple(100, 0, 0);\n pos3 = new Triple(100, 0, 100);\n pos4 = new Triple(0, 0, 100);\n pos5 = new Triple(0, 100, 0);\n pos6 = new Triple(100, 100, 0);\n pos7 = new Triple(100, 100, 100);\n pos8 = new Triple(0, 100, 100);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, .25, 0),\n new Vertex(pos3, .25, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, .25, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 21 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 1, 0),\n new Vertex(pos5, .75, 0),\n new Vertex(pos8, .75, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, .75, 1),\n new Vertex(pos4, 1, 1),\n new Vertex(pos1, 1, 0),\n 21 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, .25, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos3, .25, 1),\n new Vertex(pos2, .25, 0),\n 21 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, .75, 0),\n new Vertex(pos6, .5, 0),\n new Vertex(pos7, .5, 1),\n 21 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, .5, 1),\n new Vertex(pos8, .75, 1),\n new Vertex(pos5, .75, 0),\n 21 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public static List<Location> drawCube(Location location1, Location location2, Float density, boolean isBlock) {\n Location loc1 = location1.clone(), loc2 = location2.clone();\n\n loc1.setX(Math.min(location1.getX(),location2.getX()));\n loc1.setY(Math.min(location1.getY(),location2.getY()));\n loc1.setZ(Math.min(location1.getZ(),location2.getZ()));\n loc2.setX(Math.max(location1.getX(),location2.getX()));\n loc2.setY(Math.max(location1.getY(),location2.getY()));\n loc2.setZ(Math.max(location1.getZ(),location2.getZ()));\n\n if (isBlock) {\n loc1 = loc1.getBlock().getLocation();\n loc2 = loc2.getBlock().getLocation();\n loc2.add(1, 1, 1);\n }\n\n double deltaX = Math.abs(loc1.getX() - loc2.getX());\n double deltaY = Math.abs(loc1.getY() - loc2.getY());\n double deltaZ = Math.abs(loc1.getZ() - loc2.getZ());\n\n int dx = (int) Math.ceil(deltaX / density);\n int dy = (int) Math.ceil(deltaY / density);\n int dz = (int) Math.ceil(deltaZ / density);\n\n List<Location> collection = new ArrayList<>();\n int[][] var1 = {{0, 0}, {1, 0}, {0, 1}, {1, 1}};\n for (int[] i : var1) {\n Location locx = loc1.clone().add(i[0] * deltaX, 0, i[1] * deltaZ);\n collection.addAll(drawline(locx, locx.clone().add(0, deltaY, 0),dy));\n\n locx = loc1.clone().add(0, i[0] * deltaY, i[1] * deltaZ);\n collection.addAll(drawline(locx, locx.clone().add(deltaX, 0, 0),dx));\n\n locx = loc1.clone().add(i[0] * deltaX, i[1] * deltaY, 0);\n collection.addAll(drawline(locx, locx.clone().add(0, 0, deltaZ),dz));\n }\n return collection;\n }", "private RadiusSector() {}", "protected Geometry buildShape(\r\n CSGGeometry.CSGOperator\t\tpOperator1\r\n ,\tfloat\t\t\t\t\t\tpLength\r\n ,\tCSGGeometry.CSGOperator\t\tpOperator2\r\n ,\tboolean\t\t\t\t\t\tpRotate\r\n ) {\n Material mat_csg = new Material( assetManager, \"Common/MatDefs/Misc/ShowNormals.j3md\" );\r\n \t//mat_csg.getAdditionalRenderState().setFaceCullMode( FaceCullMode.Off );\r\n\r\n \tCSGGeometry aGeometry = new CSGGeometry();\r\n \taGeometry.setMaterial( mat_csg );\r\n\r\n \tCSGShape aCube = new CSGShape( \"Box\", new Box(1,1,1) );\r\n \tif ( pRotate ) aCube.rotate( 0.4f, 0.4f, 0f );\r\n \taGeometry.addShape( aCube, pOperator1 );\r\n\r\n \tCSGShape aCylinder = new CSGShape( \"Cylinder\", new Cylinder( 32, 32, 1.1f, pLength, true ) );\r\n \taGeometry.addShape( aCylinder, pOperator2 );\r\n \t\r\n \taGeometry.regenerate();\r\n \treturn( aGeometry );\r\n }", "public static void test1() {\n int n1 = 100, n2 = 100, n3 = 100;\n float v = 1.0f, d = 20.0f;\n float[][][] paint = new float[n3][n2][n1];\n /*\n for (int i3=0; i3<n3; ++i3) {\n for (int i2=0; i2<n2; ++i2) {\n for (int i1=0; i1<n1; ++i1) {\n if (i3<n3/2) cae.paint[i3][i2][i1] = 1.0f;\n }\n }\n }\n */\n Painting3Group p3g = new Painting3Group(paint);\n SphereBrush pb = new SphereBrush();\n Painting3 p3 = p3g.getPainting3();\n// p3.paintAt(50,60,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n// p3.paintAt(50,50,50,v,d,pb);\n p3.paintAt(50,50,50,v,d,pb);\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n sf.setSize(1250,900);\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 abstract Vector2[] getVertices();", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "protected void setupPiece() {\n double radius = (this.size * 2) / 5;\n double height = radius / 1.5;\n\n this.material = new PhongMaterial();\n this.material.setDiffuseMap(\n new Image(getClass().getResourceAsStream(\n team == Controller.Team.BLACK ? \"/assets/piece_black.jpg\" : \"/assets/piece_white.jpg\"\n ))\n );\n\n this.cylinder = new Cylinder(radius, height);\n this.cylinder.setMaterial(this.getMaterial());\n this.cylinder.setRotationAxis(Rotate.X_AXIS);\n this.cylinder.setRotate(90);\n this.cylinder.setTranslateZ(height / 2);\n\n this.cylinderContainer.getChildren().add(this.cylinder);\n }", "public void createMesh(GL2 gl){\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(y + pos[1]*chunkHeight <= ChunkManager.map2D(x + pos[0]*chunkSize, z + pos[2]*chunkSize)){\r\n\t\t\t\t\t\tblocks[x][y][z] = (byte) (2.7*(y+pos[1]*chunkHeight)/13+1); // Initialize each block\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tblocks[x][y][z] = 0;\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\tvertexCount = 0;\r\n\t\t// Allocate the buffers (Change to one buffer, or use short/byte buffer for normals and color)\r\n\t\tvertexData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tnormalData = Buffers.newDirectFloatBuffer(chunkSize*chunkHeight*chunkSize*18*3);\r\n\t\tcolorsData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(BlockType.isActive(blocks[x][y][z])){\r\n\t\t\t\t\t\tcreateCube(x, y, z); // If the cube is active, add it to the Buffer\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// correct the buffer size, and rewind\r\n\t\tnormalData.flip();\r\n\t\tvertexData.flip();\r\n\t\tcolorsData.flip();\r\n\t\tgl.glGenBuffers(3, buffer, 0); // allocate the buffers and get IDs\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[0]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, vertexData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[1]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, normalData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[2]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, colorsData, GL.GL_DYNAMIC_DRAW);\r\n\t\t// set buffer as null now that it's done being used, hope it will be garbage collected\r\n\t\tvertexData = null;\r\n\t\tnormalData = null;\r\n\t\tcolorsData = null;\t\t\r\n\t}", "public fillCylinders() {\n addParallel(new SetSolenoid(RobotMap.fillOne, false)); \n addParallel(new SetSolenoid(RobotMap.fillTwo, false));\n addParallel(new SetSolenoid(RobotMap.fillThree, false));\n addParallel(new SetSolenoid(RobotMap.fillFour, false));\n }", "Obj(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3){\t// CAMBIAR LAS COORDENADAS X,Y,Z CON 0,1 PARA CONSTRUIR PRISMA, CILINDRO, PIRAMIDE, CONO Y ESFERA.\n w\t= new Point3D[4];\n\tvScr\t= new Point2D[4];\n \n w[0]\t= new Point3D(0, 0, 0); // desde la base\n\tw[1]\t= new Point3D(x1, y1, z1);\n\tw[2]\t= new Point3D(x2, y2, z2);\n\tw[3]\t= new Point3D(x3, y3, z3);\n \n\tobjSize = (float) Math.sqrt(12F); \n rho\t= 5 * objSize;\n }", "public void render() {\n float theta = velocity.heading2D() + radians(90);\n\n\n fill(255, 0, 0);\n stroke(0, 0, 0);\n strokeWeight(0.5f);\n pushMatrix();\n translate(position.x, position.y);\n rotate(theta);\n beginShape(QUAD);\n fill(130);\n vertex(r, -r*2);\n\n vertex(-r, -r*2);\n vertex(-r, r*2);\n vertex(r, r*2);\n\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(r,-r*2);\n vertex(r*2.5f,r);\n vertex(r,r);\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(-r, -r*2);\n vertex(r, -r*2);\n vertex(0, -r*4);\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, r*5);\n vertex(r, r*5);\n vertex(0, r*2);\n endShape();\n strokeWeight(1.7f*r);\n stroke(255);\n fill(255);\n point(0, -r*2.5f);\n stroke(0);\n fill(0);\n strokeWeight(0.75f*r);\n point(0, -r*2.5f);\n popMatrix();\n }", "private void createRenderables()\n {\n this.gridElements = new ArrayList<GridElement>();\n\n ArrayList<Position> positions = new ArrayList<Position>();\n double step = sector.getDeltaLatDegrees() / this.divisions;\n\n // Generate meridians with labels\n double lon = sector.getMinLongitude().degrees + (this.level == 0 ? 0 : step);\n while (lon < sector.getMaxLongitude().degrees - step / 2)\n {\n Angle longitude = Angle.fromDegrees(lon);\n // Meridian\n positions.clear();\n positions.add(new Position(this.sector.getMinLatitude(), longitude, 0));\n positions.add(new Position(this.sector.getMaxLatitude(), longitude, 0));\n\n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n this.sector.getMinLatitude().degrees, this.sector.getMaxLatitude().degrees, lon, lon);\n String lineType = lon == this.sector.getMinLongitude().degrees ?\n GridElement.TYPE_LINE_WEST : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lon;\n this.gridElements.add(ge);\n\n // Increase longitude\n lon += step;\n }\n\n // Generate parallels\n double lat = this.sector.getMinLatitude().degrees + (this.level == 0 ? 0 : step);\n while (lat < this.sector.getMaxLatitude().degrees - step / 2)\n {\n Angle latitude = Angle.fromDegrees(lat);\n positions.clear();\n positions.add(new Position(latitude, this.sector.getMinLongitude(), 0));\n positions.add(new Position(latitude, this.sector.getMaxLongitude(), 0));\n \n Object polyline = createLineRenderable(positions, Polyline.LINEAR);\n Sector sector = Sector.fromDegrees(\n lat, lat, this.sector.getMinLongitude().degrees, this.sector.getMaxLongitude().degrees);\n String lineType = lat == this.sector.getMinLatitude().degrees ?\n GridElement.TYPE_LINE_SOUTH : GridElement.TYPE_LINE;\n GridElement ge = new GridElement(sector, polyline, lineType);\n ge.value = lat;\n this.gridElements.add(ge);\n\n // Increase latitude\n lat += step;\n }\n }", "public int drawV2(int x, int y, int z, int rotationX, int rotationY) {\n\n\t\t\t\tif (debug) {\n\t\t\t\t\tSystem.out.println(\"RotX\" + rotationX);\n\t\t\t\t\tSystem.out.println(\"RotY\" + rotationY);\n\t\t\t\t}\n\n\t\t\t\tint size = ob_size - z;\n\t\t\t\tdouble rotationX_double = (double) rotationX; // cast rotationX as a double (must be a double to do\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division)\n\t\t\t\tdouble rotation_X_rad = (rotationX_double / 180) * Math.PI; // convert rotation_X to radians\n\t\t\t\tdouble width_double = size * (Math.cos(rotation_X_rad));\n\t\t\t\tint width = (int) width_double;\n\n\t\t\t\tif (debug)\n\t\t\t\t\tSystem.out.println(\"Width: \" + width);\n\n\t\t\t\tdouble rotationY_double = (double) rotationY; // cast rotationY as a double (must be a double to do\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division)\n\t\t\t\tdouble rotation_Y_rad = (rotationY_double / 180) * Math.PI; // convert rotation_Y to radians\n\t\t\t\tdouble height_double = size * (Math.cos(rotation_Y_rad));\n\t\t\t\tint height = (int) height_double;\n\n\t\t\t\tif (debug)\n\t\t\t\t\tSystem.out.println(\"height: \" + height);\n\n\t\t\t\twidth = Math.abs(width);\n\t\t\t\theight = Math.abs(height);\n\n\t\t\t\tint rotate_deviation_X = size - width;\n\t\t\t\tint rotate_deviation_Y = size - height;\n\n\t\t\t\tif (debug) {\n\t\t\t\t\tSystem.out.println(\"RDEVX: \" + rotate_deviation_X);\n\t\t\t\t\tSystem.out.println(\"RDEVY: \" + rotate_deviation_Y);\n\t\t\t\t}\n\n\t\t\t\tpage.drawRect(x, y, width, height); // front edges\n\n\t\t\t\tpage.drawRect(x + rotate_deviation_X, y - rotate_deviation_Y, width, height); // back edges\n\n\t\t\t\tpage.drawLine(x, y, x + (rotate_deviation_X), y - (rotate_deviation_Y)); // top left edge\n\t\t\t\tpage.drawLine(x, y + height, x + (rotate_deviation_X), y - (rotate_deviation_Y) + height); // top right\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge\n\n\t\t\t\tpage.drawLine(x + width, y, x + (rotate_deviation_X) + width, y - (rotate_deviation_Y)); // bottom left\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// edge\n\t\t\t\tpage.drawLine(x + width, y + height, x + (rotate_deviation_X) + width,\n\t\t\t\t\t\ty - (rotate_deviation_Y) + height); // bottom right edge\n\n\t\t\t\t// ----------------------------------------\n\t\t\t\treturn rotate_deviation_X;\n\t\t\t}", "public void makeTriangleBox(int offsetX, int offsetY, int myWidth, int myHeight, int numTriHorizontal, int numTriVertical, int collRect, float[][] verts) {\n //Top Triangles\n for (int i = 0; i < numTriHorizontal; i++) {\n verts[i][0] = (i*myWidth/numTriHorizontal) + offsetX;\n verts[i][1] = offsetY;\n verts[i][2] = ((i+1)*(myWidth/numTriHorizontal)) + offsetX;\n verts[i][3] = offsetY;\n verts[i][4] = (myWidth/(2*numTriHorizontal)) + (i*myWidth/numTriHorizontal) + offsetX;\n if(i%2==0) {\n verts[i][5] = (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY;\n } else {\n verts[i][5] = (float)((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY;\n }\n\n }\n\n //Left Triangles\n\n for (int i = numTriHorizontal; i < (numTriVertical + numTriHorizontal); i++) {\n verts[i][0] = offsetX;\n verts[i][1] = offsetY + ((i-numTriHorizontal) * (myWidth/numTriHorizontal));\n verts[i][2] = offsetX;\n verts[i][3] = offsetY + ((i-(numTriHorizontal-1)) * (myWidth/numTriHorizontal));\n if(i%2==0) {\n verts[i][4] = offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal));\n } else {\n verts[i][4] = offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal));\n }\n verts[i][5] = offsetY + ((i-numTriHorizontal) * (myWidth/numTriHorizontal)) + myWidth/(2*numTriHorizontal);\n\n }\n\n\n //Right Triangles\n for(int i=numTriVertical+numTriHorizontal; i<(2*numTriVertical)+numTriHorizontal; i++) {\n verts[i][0] = width-offsetX;\n verts[i][1] = offsetY + ((i-(numTriVertical+numTriHorizontal)) * (myWidth/numTriHorizontal));\n verts[i][2] = width-offsetX;\n verts[i][3] = offsetY + ((i-(numTriVertical+(numTriHorizontal-1))) * (myWidth/numTriHorizontal));\n if(i%2==0) {\n verts[i][4] = width-(offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)));\n } else {\n verts[i][4] = width-(offsetX + (float) ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)));\n }\n verts[i][5] = offsetY + ((i-(numTriVertical+numTriHorizontal)) * (myWidth/numTriHorizontal)) + myWidth/(2*numTriHorizontal);\n\n }\n\n //Bottom Triangles\n for(int i=(2*numTriVertical)+numTriHorizontal; i<(2*numTriVertical)+(2*numTriHorizontal); i++) {\n verts[i][0] = ((i-((2*numTriVertical)+numTriHorizontal))*myWidth/numTriHorizontal) + offsetX;\n verts[i][1] = (height-100) - offsetY;\n verts[i][2] = ((i-((2*numTriVertical)+numTriHorizontal) +1)*(myWidth/numTriHorizontal)) + offsetX;\n verts[i][3] = (height-100) - offsetY;\n verts[i][4] = (myWidth/(2*numTriHorizontal)) + ((i-((2*numTriVertical)+numTriHorizontal))*myWidth/numTriHorizontal) + offsetX;\n if(i%2==0) {\n verts[i][5] = (float)((height-100) - ( ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY));\n } else {\n verts[i][5] = (float)((height-100) - ( ((Math.sqrt(3) / 2) * (myWidth / numTriHorizontal)) + offsetY));\n }\n\n }\n\n }", "public void makeSatellite(float radius, int radialDivisions,\n\t\t\tint heightDivisions) {\n\t\tif (radialDivisions < 3)\n\t\t\tradialDivisions = 3;\n\n\t\tif (heightDivisions < 1)\n\t\t\theightDivisions = 1;\n\n\t\tif (heightDivisions > 65)\n\t\t\theightDivisions = 65;\n\n\t\tif (radialDivisions > 65)\n\t\t\tradialDivisions = 65;\n\t//\tSystem.out.println(radialDivisions + \" \" + heightDivisions);\n\n\t\tfloat theta = (float) (2 * Math.PI / radialDivisions);\n\t\tfloat refy = 0.5f;\n\t\tfloat nxty = 1f / heightDivisions;\n\n\t\t// coordinates for the triangle formation\n\t\tfloat x1 = 0;\n\t\tfloat y1 = 0;\n\t\tfloat z1 = 0;\n\t\tfloat x2 = 0;\n\t\tfloat y2 = 0;\n\t\tfloat z2 = 0;\n\t\tfloat x3 = 0;\n\t\tfloat y3 = 0;\n\t\tfloat z3 = 0;\n\t\tfor (int rD = 0; rD < radialDivisions; rD++) {\n\t\t\t//defining coordinates of first point\n\t\t\tx1 = 0f;\n\t\t\ty1 = refy;\n\t\t\tz1 = 0f;\n\t\t\t//defining coordinates of second point\n\t\t\tx2 = (float) (radius * Math.cos(theta * rD));\n\t\t\ty2 = y1;\n\t\t\tz2 = -(float) (radius * Math.sin(theta * rD));\n\t\t\t//defining coordinates of third point\n\t\t\tx3 = (float) (radius * Math.cos(theta * (rD + 1)));\n\t\t\ty3 = y1;\n\t\t\tz3 = -(float) (radius * Math.sin(theta * (rD + 1)));\n\n\t\t\t// tesselation for bottom circle\n\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\n\t\t\ty1 = -y1;\n\n\t\t\tx2 = (float) (radius * Math.cos(theta * (rD + 1)));\n\t\t\ty2 = y1;\n\t\t\tz2 = -(float) (radius * Math.sin(theta * (rD + 1)));\n\n\t\t\tx3 = (float) (radius * Math.cos(theta * (rD)));\n\t\t\ty3 = y1;\n\t\t\tz3 = -(float) (radius * Math.sin(theta * (rD)));\n\n\t\t\t// tesselation for top circle\n\t\t\taddTriangle(x1, y1, z1, 0.0f, 0.0f, x2, y2, z2, 0.0f, 0.0f, x3, y3, z3, 0.0f, 0.0f);\n\n\t\t\ttesselationForCylinder(radius, heightDivisions, theta, refy, nxty,\n\t\t\t\t\trD);\n\t\t}\n\t\t\n\t}", "private void paint(int sideLength) {\n\n float fac = randomStart;\n while (sideLength >= 2) {\n\n for (int py = 0; py < _height; py += sideLength) {\n for (int px = 0; px < _width; px += sideLength) {\n // fetch corner colors\n float c1 = mono[repeat(px, py, _width, _height)];\n float c3 = mono[repeat(px + sideLength, py, _width, _height)];\n float c7 = mono[repeat(px, py + sideLength, _width, _height)];\n float c9 = mono[repeat(px + sideLength, py + sideLength, _width,\n _height)];\n\n int shortX = px / sideLength; \n int shortY = py / sideLength; \n \n \n float c2 = (c1 + c3) / 2 + calcFac(fac, shortX, shortY);\n float c4 = (c1 + c7) / 2 + calcFac(fac, shortX, shortY);\n float c5 = (c1 + c3 + c7 + c9) / 4 + calcFac(fac, shortX, shortY);\n\n mono[repeat(px + sideLength / 2, py, _width, _height)] = c2;\n mono[repeat(px, py + sideLength / 2, _width, _height)] = c4;\n mono[repeat(px + sideLength / 2, py + sideLength / 2, _width, _height)] = c5;\n }\n }\n\n fac = fac * randomFactor + randomSummand;\n\n sideLength /= 2;\n }\n }", "private static void breadcrumbArrow(int width, int height, int indent, int c1, int c2) {\n\n\t\tdouble x0 = 0, y0 = height / 2d;\n\t\tdouble x1 = indent, y1 = 0;\n\t\tdouble x2 = indent, y2 = height / 2d;\n\t\tdouble x3 = indent, y3 = height;\n\t\tdouble x4 = width, y4 = 0;\n\t\tdouble x5 = width, y5 = height / 2d;\n\t\tdouble x6 = width, y6 = height;\n\t\tdouble x7 = indent + width, y7 = 0;\n\t\tdouble x8 = indent + width, y8 = height;\n\n\t\tint fc1 = ColorHelper.mixAlphaColors(c1, c2, 0);\n\t\tint fc2 = ColorHelper.mixAlphaColors(c1, c2, (indent)/(width + 2f * indent));\n\t\tint fc3 = ColorHelper.mixAlphaColors(c1, c2, (indent + width)/(width + 2f * indent));\n\t\tint fc4 = ColorHelper.mixAlphaColors(c1, c2, 1);\n\n\t\tRenderSystem.disableTexture();\n\t\tRenderSystem.enableBlend();\n\t\tRenderSystem.disableAlphaTest();\n\t\tRenderSystem.defaultBlendFunc();\n\t\tRenderSystem.shadeModel(GL11.GL_SMOOTH);\n\n\t\tTessellator tessellator = Tessellator.getInstance();\n\t\tBufferBuilder bufferbuilder = tessellator.getBuffer();\n\t\tbufferbuilder.begin(GL11.GL_TRIANGLES, DefaultVertexFormats.POSITION_COLOR);\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x0, y0, 0).color(fc1 >> 16 & 0xFF, fc1 >> 8 & 0xFF, fc1 & 0xFF, fc1 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x2, y2, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x1, y1, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x3, y3, 0).color(fc2 >> 16 & 0xFF, fc2 >> 8 & 0xFF, fc2 & 0xFF, fc2 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x4, y4, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x7, y7, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\tbufferbuilder.vertex(x6, y6, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x5, y5, 0).color(fc3 >> 16 & 0xFF, fc3 >> 8 & 0xFF, fc3 & 0xFF, fc3 >> 24 & 0xFF).endVertex();\n\t\tbufferbuilder.vertex(x8, y8, 0).color(fc4 >> 16 & 0xFF, fc4 >> 8 & 0xFF, fc4 & 0xFF, fc4 >> 24 & 0xFF).endVertex();\n\n\t\ttessellator.draw();\n\t\tRenderSystem.shadeModel(GL11.GL_FLAT);\n\t\tRenderSystem.disableBlend();\n\t\tRenderSystem.enableAlphaTest();\n\t\tRenderSystem.enableTexture();\n\t}", "@SuppressWarnings(\"unused\")\r\n private void JCATsegmentVisceralFat2D01() {\r\n \r\n // get the VOI for the external boundary of the abdomen\r\n VOIVector vois = abdomenImage.getVOIs();\r\n if(vois.size() != 1) {\r\n System.err.println(\"segmentVisceralFat2D() Error, did not get 1 VOI\");\r\n return;\r\n }\r\n\r\n // abdomenImage has one VOI, lets get it\r\n VOI theVOI = vois.get(0);\r\n \r\n // find the center-of-mass of the contour\r\n VOIContour maxContour = ((VOIContour)theVOI.getCurves().get(0));\r\n int[] xVals = new int [maxContour.size()];\r\n int[] yVals = new int [maxContour.size()];\r\n int[] zVals = new int [maxContour.size()];\r\n maxContour.exportArrays(xVals, yVals, zVals);\r\n \r\n int xcm = 0, ycm = 0, zcm = 0;\r\n for (int idx = 0; idx < maxContour.size(); idx++) {\r\n xcm += xVals[idx];\r\n ycm += yVals[idx];\r\n zcm += zVals[idx];\r\n }\r\n \r\n xcm /= maxContour.size();\r\n ycm /= maxContour.size();\r\n zcm /= maxContour.size();\r\n \r\n ViewUserInterface.getReference().getMessageFrame().append(\"Xcm: \" +xcm +\" Ycm: \" +ycm +\" Zcm: \" +zcm+\"\\n\", ViewJFrameMessage.DEBUG);\r\n \r\n // This point should be inside the abdomen\r\n // walk right until you find the external border of the abdomen\r\n \r\n // update the volumeBitSet to match the closed abdomenImage\r\n short[] srcSliceBuffer = new short[sliceSize];\r\n short[] profile = new short[xDim];\r\n try {\r\n abdomenImage.exportData(0, sliceSize, sliceBuffer);\r\n srcImage.exportData(0, sliceSize, srcSliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"Error exporting data\");\r\n return;\r\n }\r\n\r\n int x = xcm;\r\n int elementCount = 0;\r\n int yOffset = ycm * xDim;\r\n while (x < xDim && sliceBuffer[x + yOffset] == abdomenTissueLabel) {\r\n profile[elementCount] = srcSliceBuffer[x + yOffset];\r\n x++;\r\n elementCount++;\r\n } // end while(...)\r\n \r\n // profile has an intensity profile of the pixels along the ray from the \r\n // contour CM to the external skin boundary. \r\n \r\n \r\n }", "private Vector combinationAlgorithm(Stroke theStroke){\n\t\tCurvatureBasedDetection cbd = new CurvatureBasedDetection();\n\t\tSpeedBasedDetection sbd = new SpeedBasedDetection();\n\t\tCommonSegmentPts = new Vector();\n\t\tCurvPts = cbd.getCurvatureData();\n\t\tdouble SpeedPts[][] = sbd.getSpeedData();\n\t\tCurvPtCount = cbd.getIndex();\n\t\tint SpeedPtCount = sbd.getIndex();\n\t\tint index ;\n\t\tCurvVector = new Vector();\n\t\t//copy the speed and curvature data in two vectors\n\t\tfor (index = 0; index < CurvPtCount ; index++){\n\t\t\tDouble obj = CurvPts[index][0];\n\t\t\tCurvVector.add(new Integer(obj.intValue()));\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Curvature Indices\");\n\t\tprintValues(CurvVector);\n\t\t\n\t\tSpeedVector = new Vector();\n\t\tfor (index = 0; index < SpeedPtCount ; index++){\n\t\t\tDouble obj = SpeedPts[index][0];\n\t\t\tSpeedVector.add(new Integer(obj.intValue()));\n\t\t}\n\t\tSystem.out.println(\"Speed Indices\");\n\t\tprintValues(SpeedVector);\n\t\tSort sort = new Sort();\n\t\tint ElementIndex;\n\t\t// find common points (intersection of speed and curvature) and put it in CommonSegmentPts vector\n\t\t\n\t\tboolean flag = false;\n\t\tfor(index = 0; index < SpeedVector.size(); index++ ){\n\t\t\t\n\t\t\tElementIndex = sort.linearSearch(CurvVector, (Integer)SpeedVector.elementAt(index));\n\t\t\t\n\t\t\tif(ElementIndex != -1){\n\t\t\t\tCommonSegmentPts.add((Integer)(CurvVector.elementAt(ElementIndex)));\n\t\t\t\tCurvVector.remove(ElementIndex);\n\t\t\t\tSpeedVector.remove(index --); // point is removed from vectors\n\t\t\t\t\n\t\t\t}\t\t\n\t\t}\n\t\tSystem.out.println(\"Common Points\");\n\t\tprintValues(CommonSegmentPts);\n\t\tint ElemAtIndex;\n\t\t// Find the curvature based segment points in the Tolerance Distance of speed based segment points \n\t\tfor(index = 0; index < SpeedVector.size(); index++ ){\n\t\t\tElementIndex = FindNearbyPts(CurvVector, (Integer)SpeedVector.elementAt(index), theStroke);\n\t\t\tif(ElementIndex != -1){\n\t\t\t\tElemAtIndex = ((Integer)CurvVector.elementAt(ElementIndex) + (Integer)SpeedVector.elementAt(index))/2;\n\t\t\t\tCommonSegmentPts.add(ElemAtIndex);\n\t\t\t\tCurvVector.remove(ElementIndex);\n\t\t\t\tSpeedVector.remove(index--);\n\t\t\t}\n\t\t}\n\t\t//printValues(CommonSegmentPts);\n\t\tremoveNearbyPixels(theStroke);\n\t\t//setNewScalingFactor(theStroke);\n\t\tCollections.sort(CommonSegmentPts);\n\t\tprintValues(CommonSegmentPts);\n\t\tdouble PrevIterError;\n\t\tdouble NewIterError;\n\t\tVector IterationPts = new Vector(); \n\t\t//System.out.println(\"Error \" + (PrevIterError = calculateError(CommonSegmentPts, theStroke)));\n\t\t// create a vector that stores segment points of each iteration\n\t\tIterWiseSegPts = new Vector();\n\t\t// for hybrid\n\t\tIterationPts = copyVector(IterationPts, CommonSegmentPts);\n\t\tdouble PrevError = calculateError(IterationPts, theStroke);\n\t\tif(PrevError > 10000.0){\t// if stroke consists of curves\n\t\t\terrorTolerance = 90.0;\n\t\t}\n\t\tIterationPts.add((double ) PrevError);\n\t\tIterWiseSegPts = appendVector(IterWiseSegPts,IterationPts);\n\t\tdouble NewError = -1;\n/*\t\tint vectorIndex = 0;\n\t\t\n\t\twhile(CurvVector.size()!=0 || SpeedVector.size()!=0){\n\t*/\t\t\n\t\t\t// code for accepting seg points uptil pts reduce the error by 100\n\t\t/*\n\t\t\tif(CurvVector.size()!=0){\n\t\t\t\tint CurvIndex = (Integer)CurvVector.get(0);\n\t\t\t\tCommonSegmentPts.add(CurvIndex);\n\t\t\t\tCurvVector.remove(0);\n\t\t\t\tCollections.sort(CommonSegmentPts);\n\t\t\t\tNewIterError = calculateError(CommonSegmentPts, theStroke);\n\t\t\t\tif((PrevIterError - NewIterError) > 100.0){\n\t\t\t\t\tvectorIndex++;\n\t\t\t\t\tIterWiseSegPts.add(CurvIndex);\n\t\t\t\t\tPrevIterError = NewIterError;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\twhile(CurvVector.size()!=0){\n\t\t\t\t\t\tCurvVector.remove(0);\n\t\t\t\t\t}\t\t\t\t\t//return IterWiseSegPts;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(SpeedVector.size()!=0){\n\t\t\t\tint SpeedIndex = (Integer)SpeedVector.get(0);\n\t\t\t\tCommonSegmentPts.add(SpeedIndex);\n\t\t\t\tSpeedVector.remove(0);\n\t\t\t\tCollections.sort(CommonSegmentPts);\n\t\t\t\tNewIterError = calculateError(CommonSegmentPts, theStroke);\n\t\t\t\tSystem.out.println(\"New Error = \" + NewIterError);\n\t\t\t//CommonSegmentPts.add((Double)NewIterError);\n\t\t\t\tif((PrevIterError - NewIterError) > 100.0 ){\n\t\t\t\t\tvectorIndex++;\n\t\t\t\t\tIterWiseSegPts.add(SpeedIndex);\n\t\t\t\t\tPrevIterError = NewIterError;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\twhile(SpeedVector.size()!=0){\n\t\t\t\t\t\tSpeedVector.remove(0);\n\t\t\t\t\t}\t\t\n\t\t\t\t\t//return IterWiseSegPts;\n\t\t\t\t}\n\t\t\t\n\t\t\t\t\n\t\t\t}*/\n\t\t\t// my approach\n\t/*\t\t\n\t\t\tif(CurvVector.size()!=0){\n\t\t\t\tint Index = findMinimumErrorIndex(CurvVector,CommonSegmentPts,theStroke);\n\t\t\t\tif(Index != -1){\n\t\t\t\tint CurvIndex = (Integer)CurvVector.get(Index);\n\t\t\t\tCommonSegmentPts.add((Integer)CurvIndex);\n\t\t\t\tCurvVector.remove(Index);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tCurvVector = clearVector(CurvVector);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(SpeedVector.size()!=0){\n\t\t\t\tint Index = findMinimumErrorIndex(SpeedVector,CommonSegmentPts,theStroke);\n\t\t\t\tif(Index != -1){\n\t\t\t\tint SpeedIndex = (Integer)SpeedVector.get(Index);\n\t\t\t\tCommonSegmentPts.add((Integer)SpeedIndex);\n\t\t\t\tSpeedVector.remove(Index);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSpeedVector = clearVector(SpeedVector);\n\t\t\t\t}\n\t\t\t}\n\t\t\tIterationPts = clearVector(IterationPts);\n\t\t\tIterationPts = copyVector(IterationPts, CommonSegmentPts);\n\t\t\tCollections.sort(IterationPts);\n\t\t\tIterError = calculateError(IterationPts, theStroke);\n\t\t\tIterationPts.add((double) IterError);\n\t\t\tIterWiseSegPts = appendVector(IterWiseSegPts,IterationPts);\n\t\t\tremoveNearbyPixels(theStroke);\n\n\t\t}\n\t\tCommonSegmentPts = clearVector(CommonSegmentPts);\n\t\tCommonSegmentPts = selectBestSegPtsSet(IterWiseSegPts);*/\n\t\t\n\t\t/*\tif(CurvVector.size()!=0){\n\t\tint Index = findMinimumErrorIndex(CurvVector,CommonSegmentPts,theStroke);\n\t\tif(Index != -1){\n\t\tint CurvIndex = (Integer)CurvVector.get(Index);\n\t\tCommonSegmentPts.add((Integer)CurvIndex);\n\t\tCurvVector.remove(Index);\n\t\t}\n\t\telse{\n\t\t\tCurvVector = clearVector(CurvVector);\n\t\t}\n\t}\n\tif(SpeedVector.size()!=0){\n\t\tint Index = findMinimumErrorIndex(SpeedVector,CommonSegmentPts,theStroke);\n\t\tif(Index != -1){\n\t\tint SpeedIndex = (Integer)SpeedVector.get(Index);\n\t\tCommonSegmentPts.add((Integer)SpeedIndex);\n\t\tSpeedVector.remove(Index);\n\t\t}\n\t\telse{\n\t\t\tSpeedVector = clearVector(SpeedVector);\n\t\t}\n\t}\n\tIterationPts = clearVector(IterationPts);\n\tIterationPts = copyVector(IterationPts, CommonSegmentPts);\n\tCollections.sort(IterationPts);\n\tIterError = calculateError(IterationPts, theStroke);\n\tIterationPts.add((double) IterError);\n\tIterWiseSegPts = appendVector(IterWiseSegPts,IterationPts);\n\tremoveNearbyPixels(theStroke);\n\n}\nCommonSegmentPts = clearVector(CommonSegmentPts);\nCommonSegmentPts = selectBestSegPtsSet(IterWiseSegPts);*/\n\t\t\n\t\t\n\t\t// hybrid fit approach\n\t\tint curvIndex = -1, speedIndex = -1;\n\t\tdouble curvError,speedError;\n\t\tVector curvPts = new Vector();\n\t\tVector speedPts = new Vector();\n\t\tVector changeInError = new Vector();\n\t\twhile((CurvVector.size() != 0) || (SpeedVector.size() != 0) ){\n\t\t\tcurvError = DEFAULT;\n\t\t\tspeedError = DEFAULT;\n\t\t\t\n\t\t\tif(CurvVector.size() != 0){\n\t\t\t\tclearVector(curvPts);\n\t\t\t\tcurvPts = copyVector(curvPts, CommonSegmentPts);\n\t\t\t\tcurvIndex = (Integer)CurvVector.get(0);\n\t\t\t\tcurvPts.add((Integer)curvIndex);\n\t\t\t\tCurvVector.remove(0);\n\t\t\t\tCollections.sort(curvPts);\n\t\t\t\tcurvError = calculateError(curvPts, theStroke);\n\t\t\t\tcurvPts.add((Double)curvError);\n\t\t\t}\n\t\t\t\n\t\t\tif(SpeedVector.size() != 0){\n\t\t\t\tclearVector(speedPts);\n\t\t\t\tspeedPts = copyVector(speedPts, CommonSegmentPts);\n\t\t\t\tspeedIndex = (Integer)SpeedVector.get(0);\n\t\t\t\tspeedPts.add((Integer)speedIndex);\n\t\t\t\tSpeedVector.remove(0);\n\t\t\t\tCollections.sort(speedPts);\n\t\t\t\tspeedError = calculateError(speedPts, theStroke);\n\t\t\t\tspeedPts.add((Double)speedError);\n\t\t\t}\n\t\t\t\n\t\t\tif((speedError <= curvError) || (curvError == DEFAULT)){\n\t\t\t\tNewError = speedError;\n\t\t\t\t//changeInError.add((Double)(NewError - PrevError));\n\t\t\t\tif((PrevError - NewError) > errorTolerance){\n\t\t\t\tIterWiseSegPts = appendVector(IterWiseSegPts, speedPts);\n\t\t\t\tCommonSegmentPts.add((Integer)speedIndex);\n\t\t\t\tchangeInError.add((Double)(PrevError - NewError));\n\t\t\t\tPrevError = NewError;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if((curvError < speedError) || (speedError == DEFAULT)){\n\t\t\t\tNewError = curvError;\n\t\t\t\tif((PrevError - NewError) > errorTolerance){\n\t\t\t\tIterWiseSegPts = appendVector(IterWiseSegPts, curvPts);\n\t\t\t\tCommonSegmentPts.add((Integer)curvIndex);\n\t\t\t\tchangeInError.add((Double)(PrevError - NewError));\n\t\t\t\tPrevError = NewError;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t\t\n\t\tCommonSegmentPts = clearVector(CommonSegmentPts);\n\t\tVector TempVect = new Vector();\n\t\tCommonSegmentPts = copyVectorIndex(IterWiseSegPts, TempVect, IterWiseSegPts.size() - 1);\n\t\t//TempVect = copyVectorIndex(IterWiseSegPts, TempVect, IterWiseSegPts.size() -1);\n\t\t/*index = 0;\n\t\twhile(index < (TempVect.size()-1)){\n\t\t\tCommonSegmentPts.add((Integer)TempVect.get(index++));\n\t\t}*/\n\t\t//CommonSegmentPts = selectBestSegPtsSet(IterWiseSegPts);\n\t\t\n\t\treturn CommonSegmentPts;\n\t}", "private void setCofR() {\n\t\t\n Vector3f pos_vec = new Vector3f();\n Point3f pos = new Point3f();\n Vector3f dir = new Vector3f();\n\t\tMatrix4f view_mtx = new Matrix4f();\n\t\tMatrix4f nav_mtx = new Matrix4f();\n Point3f cor = new Point3f();\n\t\t\n\t\tnavigationTransform.getTransform(nav_mtx);\n\t\t\n\t\tdata.viewpointTransform.getTransform(view_mtx);\n\t\tview_mtx.get(pos_vec);\n\t\t\n\t\t// the eye point\n\t\tpos.set(pos_vec);\n\t\t\n\t\t// the eye direction\n\t\tdir.x = view_mtx.m02;\n\t\tdir.y = view_mtx.m12;\n\t\tdir.z = view_mtx.m22;\n\t\tdir.negate();\n\t\tdir.normalize();\n\t\t\n\t\t// transform into world space\n\t\tnav_mtx.transform(pos);\n\t\tnav_mtx.transform(dir);\n\t\t\n\t\tArrayList pickResults = new ArrayList();\n\t\tPickRequest pickRequest = new PickRequest();\n\t\tpickRequest.pickGeometryType = PickRequest.PICK_RAY;\n\t\tpickRequest.pickSortType = PickRequest.SORT_ORDERED;\n\t\tpickRequest.pickType = PickRequest.FIND_GENERAL;\n\t\tpickRequest.useGeometry = false;\n\t\tpickRequest.foundPaths = pickResults;\n\t\t\n\t\t// initialize the pick request\n\t\tpickRequest.origin[0] = pos.x;\n\t\tpickRequest.origin[1] = pos.y;\n\t\tpickRequest.origin[2] = pos.z;\n\t\t\n\t\tpickRequest.destination[0] = dir.x;\n\t\tpickRequest.destination[1] = dir.y;\n\t\tpickRequest.destination[2] = dir.z;\n\t\t\n\t\trootGroup.pickSingle(pickRequest);\n\t\t\n\t\tif (pickRequest.pickCount > 0) {\n\t\t\t\n \tPoint3f intersectPoint = new Point3f();\n \tVector3f intersectVector = new Vector3f();\n\t\t\n\t\t\tfloat min_distance = Float.MAX_VALUE;\n\t\t\t// sort through the bounds intersections\n\t\t\tint num_pick = pickResults.size();\n\t\t\tfor (int i = 0; i < num_pick; i++) {\n\t\t\t\t\n\t\t\t\tSceneGraphPath sgp = (SceneGraphPath)pickResults.get(i);\n\t\t\t\tsgp.getTransform(view_mtx);\n\t\t\t\t\n\t\t\t\tShape3D shape = (Shape3D)sgp.getTerminalNode();\n\t\t\t\tVertexGeometry geom = (VertexGeometry)shape.getGeometry();\n\t\t\t\t\n\t\t\t\t//determine if there was an actual geometry intersection\n\t\t\t\tboolean intersect = iutils.rayUnknownGeometry(\n\t\t\t\t\tpos,\n\t\t\t\t\tdir,\n\t\t\t\t\t0,\n\t\t\t\t\tgeom,\n\t\t\t\t\tview_mtx,\n\t\t\t\t\tintersectPoint,\n\t\t\t\t\tfalse);\n\t\t\t\t\n\t\t\t\tif (intersect) {\n\t\t\t\t\tintersectVector.set(\n\t\t\t\t\t\tintersectPoint.x - pos.x,\n\t\t\t\t\t\tintersectPoint.y - pos.y,\n\t\t\t\t\t\tintersectPoint.z - pos.z);\n\n\t\t\t\t\tfloat distance = intersectVector.length();\n\t\t\t\t\tif (distance < min_distance) {\n\t\t\t\t\t\tmin_distance = distance;\n\t\t\t\t\t\tcor.set(intersectPoint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tnav_mtx.invert();\n\t\t\tnav_mtx.transform(cor);\n\t\t}\n\t\tcenterOfRotation.set(cor);\n\t}", "public BranchGroup cubo2(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.2,.05,.2);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(.5,.6,.5);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n // rotate.mul(objScale);\n TransformGroup objRotate = new TransformGroup(rotate);\n \n //objRotate.addChild(new ColorCube(0.4));\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n \n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\n\t \n\t // Set up the background\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "private boolean isOnCylinder(Point3D point) {\n // the vector from bottom to the point\n Vector vec1 = new Vector(Point3D.substract(orientation.getPOO(), point));\n\n // the vector from the top to point\n Vector vec2 = new Vector(Point3D.substract(top, point));\n\n // the vectors to the edges of cylinder\n Vector vec3 = new Vector(Point3D.substract(orientation.getPOO(), point));\n\n Vector vec4 = new Vector(Point3D.substract(top, point));\n\n double Vec3dot = Vector.dotProduct(vec3, orientation.getDirection());\n\n double Vec4dot = Vector.dotProduct(vec4, orientation.getDirection());\n if (Vec3dot == 0)\n if (_radius - vec3.length() >= 0)\n return true;\n if (Vec4dot == 0)\n if (_radius - vec4.length() >= 0)\n return true;\n\n if (Vector.dotProduct(vec1, orientation.getDirection()) > 0\n && Vector.dotProduct(vec2, orientation.getDirection()) < 0)\n return true;\n return false;\n }", "public void lungs(Graphics bbg, int n, int length, int x, int y, double angle){\n double r1 = angle + Math.toRadians(-45);\n double r2 = angle + Math.toRadians(45);\n double r3 = angle + Math.toRadians(135);\n double r4 = angle + Math.toRadians(-135);\n\n //length modifications of the different branches\n double l1 = length/1.3 + (l1I*5);\n double l2 = length/1.3 + (l2I*5);\n double l3 = length/1.3 + (l3I*5);\n double l4 = length/1.3 + (l4I*5);\n\n //x and y points of the end of the different branches\n int ax = (int)(x - Math.sin(r1)*l1)+(int)(l1I);\n int ay = (int)(y - Math.cos(r1)*l1)+(int)(l1I);\n int bx = (int)(x - Math.sin(r2)*l2)+(int)(l2I);\n int by = (int)(y - Math.cos(r2)*l2)+(int)(l2I);\n int cx = (int)(x - Math.sin(r3)*l3)+(int)(l3I);\n int cy = (int)(y - Math.cos(r3)*l3)+(int)(l3I);\n int dx = (int)(x - Math.sin(r4)*l4)+(int)(l4I);\n int dy = (int)(y - Math.cos(r4)*l4)+(int)(l4I);\n\n if(n == 0){\n return;\n }\n\n\n increment();\n Color fluidC = new Color(colorR,colorG,colorB);\n //bbg.setColor(new Color((int) (Math.random() * 255), (int) (Math.random() * 255), (int) (Math.random()*255)));\n bbg.setColor(fluidC);\n\n\n //draw different branches\n bbg.drawLine(x,y,ax,ay);\n bbg.drawLine(x,y,bx,by);\n bbg.drawLine(x,y,cx,cy);\n bbg.drawLine(x,y,dx,dy);\n\n\n\n //call recursively to draw fractal\n lungs(bbg, n - 1, (int)l1, ax,ay,r1);\n lungs(bbg, n - 1, (int)l2, bx,by,r2);\n lungs(bbg, n - 1, (int)l3, cx,cy,r3);\n lungs(bbg, n - 1, (int)l4, dx,dy,r4);\n\n\n }", "public void ignoreCreateArrayForVec2With6Position() {\r\n\r\n SXRMesh sxrMesh = TestDefaultSXRViewManager.mSXRContext.getAssetLoader().loadMesh(UtilResource.androidResource(TestDefaultSXRViewManager.mSXRContext,R.raw.cylinder3));\r\n float[] vec2 = {-0.5f, 0.5f, 0.0f, -0.5f, 0.5f, 0.0f};\r\n\r\n try {\r\n sxrMesh.setVec3Vector(\"ratio_r\", vec2);\r\n assertNotNull(sxrMesh.getVec4Vector(\"ratio_r\"));\r\n fail();\r\n } catch (Exception e) {\r\n assertEquals(e.getMessage(), \"setVec2Vector method support only three position array\");\r\n }\r\n }", "public CircularGrid(int ringCount, boolean verticalCut, boolean horizontalCut) {\r\n\t\tif (ringCount<0)\r\n\t\t\tthrow new IllegalArgumentException(\"The number of rings is illegal: \"+ringCount);\r\n\t\tint columnCount = 2*(ringCount-1) + ((verticalCut)?2:1);\r\n\t\tint rowCount = 2*(ringCount-1) + ((horizontalCut)?2:1);\r\n\t\tinit(columnCount, rowCount);\r\n\t}", "private static double[][] makeRegularPoly(double centerLat, double centerLon, double radiusMeters, int gons) {\n\n double[][] result = new double[2][];\n result[0] = new double[gons+1];\n result[1] = new double[gons+1];\n for(int i=0;i<gons;i++) {\n double angle = i*(360.0/gons);\n double x = Math.cos(Math.toRadians(angle));\n double y = Math.sin(Math.toRadians(angle));\n double factor = 2.0;\n double step = 1.0;\n int last = 0;\n\n //System.out.println(\"angle \" + angle + \" slope=\" + slope);\n // Iterate out along one spoke until we hone in on the point that's nearly exactly radiusMeters from the center:\n while (true) {\n double lat = centerLat + y * factor;\n GeoUtils.checkLatitude(lat);\n double lon = centerLon + x * factor;\n GeoUtils.checkLongitude(lon);\n double distanceMeters = SloppyMath.haversinMeters(centerLat, centerLon, lat, lon);\n\n //System.out.println(\" iter lat=\" + lat + \" lon=\" + lon + \" distance=\" + distanceMeters + \" vs \" + radiusMeters);\n if (Math.abs(distanceMeters - radiusMeters) < 0.1) {\n // Within 10 cm: close enough!\n result[0][i] = lat;\n result[1][i] = lon;\n break;\n }\n\n if (distanceMeters > radiusMeters) {\n // too big\n //System.out.println(\" smaller\");\n factor -= step;\n if (last == 1) {\n //System.out.println(\" half-step\");\n step /= 2.0;\n }\n last = -1;\n } else if (distanceMeters < radiusMeters) {\n // too small\n //System.out.println(\" bigger\");\n factor += step;\n if (last == -1) {\n //System.out.println(\" half-step\");\n step /= 2.0;\n }\n last = 1;\n }\n }\n }\n\n // close poly\n result[0][gons] = result[0][0];\n result[1][gons] = result[1][0];\n\n return result;\n }", "protected void building(double xCoord, double yCoord, double len, double width, double height)\n {\n double x1 = (xCoord - (width/2)); // Low x\n double x2 = (xCoord + (width/2)); // High x\n double y1 = (yCoord - (len/2)); // Low y\n double y2 = (yCoord + (len/2)); // High y\n\n Vertex vertex1, vertex2, vertex3;\n\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n Vertex vert1, vert2, vert3;\n\n pos1 = new Triple(x1, y1, 0); \n pos2 = new Triple(x2, y1, 0); \n pos3 = new Triple(x2, y1, height);\n pos4 = new Triple(x1, y1, height);\n pos5 = new Triple(x1, y2, 0); \n pos6 = new Triple(x2, y2, 0); \n pos7 = new Triple(x2, y2, height);\n pos8 = new Triple(x1, y2, height);\n\n col1 = new Triple(1, 0, 0); \n col2 = new Triple(0, 1, 0); \n col3 = new Triple(0, 0, 1); \n col4 = new Triple(1, 0, 1); \n \n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos2, 0, 1), \n new Vertex(pos3, 1, 1), \n\t\t\t\t 25 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 25 ) );\n \n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0), \n new Vertex(pos5, 0, 1), \n new Vertex(pos8, 1, 1),\n 26 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1), \n new Vertex(pos4, 1, 0), \n new Vertex(pos1, 0, 0),\n 26 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0), \n new Vertex(pos6, 0, 1), \n new Vertex(pos7, 1, 1),\n 24 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos3, 1, 0), \n new Vertex(pos2, 0, 0),\n 24 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0), \n new Vertex(pos6, 0, 1), \n new Vertex(pos7, 1, 1),\n 27 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos8, 1, 0), \n new Vertex(pos5, 0, 0),\n 27 ) );\n\n // Top Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0), \n new Vertex(pos3, 0, 1), \n new Vertex(pos7, 1, 1),\n 28 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1), \n new Vertex(pos8, 1, 0), \n new Vertex(pos4, 0, 0),\n 28 ) );\n }", "public DynamicModelPart addCuboids() {\n for (int i = 0; i < this.x.length; i++) {\n this.addCuboid(this.x[i], this.y[i], this.z[i], this.sizeX[i], this.sizeY[i],\n this.sizeZ[i], this.extra[i], this.u[i], this.v[i]);\n }\n return this;\n }", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "public Triangle (double x1,double y1,double x2, double y2)\r\n {\r\n v1 = new Point(x1,y1);\r\n v2 = new Point(x2,y2);\r\n v3 = new Point(0,0);\r\n }", "public void drawNearClippedFace(int face) {\n\t\tint centerX = Draw3D.centerX;\n\t\tint centerY = Draw3D.centerY;\n\t\tint elements = 0;\n\n\t\tint a = faceVertexA[face];\n\t\tint b = faceVertexB[face];\n\t\tint c = faceVertexC[face];\n\n\t\tint zA = vertexViewSpaceZ[a];\n\t\tint zB = vertexViewSpaceZ[b];\n\t\tint zC = vertexViewSpaceZ[c];\n\n\t\tif (zA >= 50) {\n\t\t\tclippedX[elements] = vertexScreenX[a];\n\t\t\tclippedY[elements] = vertexScreenY[a];\n\t\t\tclippedColor[elements++] = faceColorA[face];\n\t\t} else {\n\t\t\tint xA = vertexViewSpaceX[a];\n\t\t\tint yA = vertexViewSpaceY[a];\n\t\t\tint colorA = faceColorA[face];\n\n\t\t\tif (zC >= 50) {\n\t\t\t\tint scalar = (50 - zA) * reciprical16[zC - zA];\n\t\t\t\tclippedX[elements] = centerX + (((xA + (((vertexViewSpaceX[c] - xA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yA + (((vertexViewSpaceY[c] - yA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorA + (((faceColorC[face] - colorA) * scalar) >> 16);\n\t\t\t}\n\n\t\t\tif (zB >= 50) {\n\t\t\t\tint scalar = (50 - zA) * reciprical16[zB - zA];\n\t\t\t\tclippedX[elements] = centerX + (((xA + (((vertexViewSpaceX[b] - xA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yA + (((vertexViewSpaceY[b] - yA) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorA + (((faceColorB[face] - colorA) * scalar) >> 16);\n\t\t\t}\n\t\t}\n\n\t\tif (zB >= 50) {\n\t\t\tclippedX[elements] = vertexScreenX[b];\n\t\t\tclippedY[elements] = vertexScreenY[b];\n\t\t\tclippedColor[elements++] = faceColorB[face];\n\t\t} else {\n\t\t\tint xB = vertexViewSpaceX[b];\n\t\t\tint yB = vertexViewSpaceY[b];\n\t\t\tint colorB = faceColorB[face];\n\n\t\t\tif (zA >= 50) {\n\t\t\t\tint scalar = (50 - zB) * reciprical16[zA - zB];\n\t\t\t\tclippedX[elements] = centerX + (((xB + (((vertexViewSpaceX[a] - xB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yB + (((vertexViewSpaceY[a] - yB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorB + (((faceColorA[face] - colorB) * scalar) >> 16);\n\t\t\t}\n\n\t\t\tif (zC >= 50) {\n\t\t\t\tint scalar = (50 - zB) * reciprical16[zC - zB];\n\t\t\t\tclippedX[elements] = centerX + (((xB + (((vertexViewSpaceX[c] - xB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yB + (((vertexViewSpaceY[c] - yB) * scalar) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorB + (((faceColorC[face] - colorB) * scalar) >> 16);\n\t\t\t}\n\t\t}\n\n\t\tif (zC >= 50) {\n\t\t\tclippedX[elements] = vertexScreenX[c];\n\t\t\tclippedY[elements] = vertexScreenY[c];\n\t\t\tclippedColor[elements++] = faceColorC[face];\n\t\t} else {\n\t\t\tint xC = vertexViewSpaceX[c];\n\t\t\tint yC = vertexViewSpaceY[c];\n\t\t\tint colorC = faceColorC[face];\n\n\t\t\tif (zB >= 50) {\n\t\t\t\tint k6 = (50 - zC) * reciprical16[zB - zC];\n\t\t\t\tclippedX[elements] = centerX + (((xC + (((vertexViewSpaceX[b] - xC) * k6) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yC + (((vertexViewSpaceY[b] - yC) * k6) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorC + (((faceColorB[face] - colorC) * k6) >> 16);\n\t\t\t}\n\n\t\t\tif (zA >= 50) {\n\t\t\t\tint l6 = (50 - zC) * reciprical16[zA - zC];\n\t\t\t\tclippedX[elements] = centerX + (((xC + (((vertexViewSpaceX[a] - xC) * l6) >> 16)) << 9) / 50);\n\t\t\t\tclippedY[elements] = centerY + (((yC + (((vertexViewSpaceY[a] - yC) * l6) >> 16)) << 9) / 50);\n\t\t\t\tclippedColor[elements++] = colorC + (((faceColorA[face] - colorC) * l6) >> 16);\n\t\t\t}\n\t\t}\n\n\t\tint x0 = clippedX[0];\n\t\tint x1 = clippedX[1];\n\t\tint x2 = clippedX[2];\n\t\tint y0 = clippedY[0];\n\t\tint y1 = clippedY[1];\n\t\tint y2 = clippedY[2];\n\n\t\t// Back-face culling\n\t\tif ((((x0 - x1) * (y2 - y1)) - ((y0 - y1) * (x2 - x1))) <= 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tDraw3D.clipX = false;\n\n\t\t// It's possible for a single triangle to be clipped into two separate triangles.\n\n\t\tif (elements == 3) {\n\t\t\tif ((x0 < 0) || (x1 < 0) || (x2 < 0) || (x0 > Draw2D.boundX) || (x1 > Draw2D.boundX) || (x2 > Draw2D.boundX)) {\n\t\t\t\tDraw3D.clipX = true;\n\t\t\t}\n\n\t\t\tint type;\n\n\t\t\tif (faceInfo == null) {\n\t\t\t\ttype = 0;\n\t\t\t} else {\n\t\t\t\ttype = faceInfo[face] & 3;\n\t\t\t}\n\n\t\t\tif (type == 0) {\n\t\t\t\tDraw3D.fillGouraudTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2]);\n\t\t\t} else if (type == 1) {\n\t\t\t\tDraw3D.fillTriangle(y0, y1, y2, x0, x1, x2, palette[faceColorA[face]]);\n\t\t\t} else if (type == 2) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t} else if (type == 3) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t}\n\t\t} else if (elements == 4) {\n\t\t\tif ((x0 < 0) || (x1 < 0) || (x2 < 0) || (x0 > Draw2D.boundX) || (x1 > Draw2D.boundX) || (x2 > Draw2D.boundX) || (clippedX[3] < 0) || (clippedX[3] > Draw2D.boundX)) {\n\t\t\t\tDraw3D.clipX = true;\n\t\t\t}\n\n\t\t\tint type;\n\n\t\t\tif (faceInfo == null) {\n\t\t\t\ttype = 0;\n\t\t\t} else {\n\t\t\t\ttype = faceInfo[face] & 3;\n\t\t\t}\n\n\t\t\tif (type == 0) {\n\t\t\t\tDraw3D.fillGouraudTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2]);\n\t\t\t\tDraw3D.fillGouraudTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], clippedColor[0], clippedColor[2], clippedColor[3]);\n\t\t\t} else if (type == 1) {\n\t\t\t\tint colorA = palette[faceColorA[face]];\n\t\t\t\tDraw3D.fillTriangle(y0, y1, y2, x0, x1, x2, colorA);\n\t\t\t\tDraw3D.fillTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], colorA);\n\t\t\t} else if (type == 2) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, clippedColor[0], clippedColor[1], clippedColor[2], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], clippedColor[0], clippedColor[2], clippedColor[3], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t} else if (type == 3) {\n\t\t\t\tint texturedFace = faceInfo[face] >> 2;\n\t\t\t\tint tA = texturedVertexA[texturedFace];\n\t\t\t\tint tB = texturedVertexB[texturedFace];\n\t\t\t\tint tC = texturedVertexC[texturedFace];\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y1, y2, x0, x1, x2, faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t\tDraw3D.fillTexturedTriangle(y0, y2, clippedY[3], x0, x2, clippedX[3], faceColorA[face], faceColorA[face], faceColorA[face], vertexViewSpaceX[tA], vertexViewSpaceX[tB], vertexViewSpaceX[tC], vertexViewSpaceY[tA], vertexViewSpaceY[tB], vertexViewSpaceY[tC], vertexViewSpaceZ[tA], vertexViewSpaceZ[tB], vertexViewSpaceZ[tC], faceColor[face]);\n\t\t\t}\n\t\t}\n\t}", "private static double[] makePolygon() {\n double[] polygon = new double[POINTS*2];\n \n for (int i = 0; i < POINTS; i++) {\n double a = i * Math.PI * 2.0 / POINTS;\n polygon[2*i] = Math.cos(a);\n polygon[2*i+1] = Math.sin(a);\n }\n \n return polygon;\n }", "private Mesh createMesh(final int pTrianglesCount) {\n\t\tfinal int pSpeed \t\t\t= 20;\n\t\tfinal int pVertexCount\t \t= Mesh.VERTEX_SIZE * pTrianglesCount * 3; \t\n\t\tfinal float pColor \t\t\t= new Color(0f,0f,0f).getABGRPackedFloat();\n\t\tfinal float pSegmentWidth \t= CAMERA_WIDTH/pTrianglesCount;\n\t\tfinal float[] pBufferData \t= new float[pVertexCount];\t\n\t\t\n\t\tmHeightOffsetCurrent = new float[pVertexCount];\t\t\n\t\t\n\t\t//create triangles \n\t\t// A--B\n\t\t// \\ |\n\t\t// \\|\n\t\t// C\n\t\t//\n\t\tint i = 0;\n\t\tfloat x = 0f;\n\t\tfinal float pInitialHeight = 400;\n\t\tfor (int triangleIndex = 0;triangleIndex<pTrianglesCount;triangleIndex++){\n\t\t\t //first triangle \n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = 0;\t\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\t\n\t\t\t \n\t\t\t i = i+3;\n\t\t\t x = x+pSegmentWidth;\n\t\t }\n\t\t \n\t\tfinal VertexBufferObjectManager VBOM = getVertexBufferObjectManager();\n\t\tfinal HighPerformanceMeshVertexBufferObject pMeshVBO = new HighPerformanceMeshVertexBufferObject(VBOM, pBufferData, pBufferData.length, DrawType.DYNAMIC, true, Mesh.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT);\n\t\t\n//\t\tpMesh = new Mesh(0, 0,pVertexCount,DrawMode.TRIANGLES,pMeshVBO){\t\t\n//\t\t\t\n//\t\t\tfloat progress_x = 0;\n//\t\t\t\n//\t\t\t@Override\n//\t\t protected void onManagedUpdate(final float pSecondsElapsed) { \n//\t\t\t\tsuper.onManagedUpdate(pSecondsElapsed);\n//\t\t\t\tdrawBySine(pSecondsElapsed);\n//\t\t this.mMeshVertexBufferObject.setDirtyOnHardware(); // include this line\n//\t\t progress_x+=(pSpeed*pSecondsElapsed);\n//\t\t };\n//\t\t\t\n//\t\t\tvoid drawBySine(final float pSecondsElapsed){\n//\t\t\t\tfinal float[] pBuff = pMeshVBO.getBufferData();\n//\t\t\t\tfor (int i = 0;i<((pTrianglesCount)*3);i++){ //FIRST part of triangles \n//\t\t\t\t\tif (i%3==0||i==0||((i-1)%3==0)){\n//\t\t\t\t\t\t//every vertex (v0) of triangle must be connected to previous triangle at second vertex (v1) to prevent stairs\n//\t\t\t\t\t\tif (i%3==0&&i>0){ \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = mHeightOffsetCurrent[i-2];\n//\t\t\t\t\t\t} else { \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = getNormalizedSine(i+progress_x, mTouchY, pTrianglesCount*3);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} \n//\t\t\t\t\tpBuff[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = mHeightOffsetCurrent[i];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\tfloat getNormalizedSine(float x, float halfY, float maxX) {\t\n//\t\t\t double factor = (2 * Math.PI) / maxX;\n//\t\t\t return (float) ((Math.sin(x * factor) * halfY) + halfY);\n//\t\t\t}\n//\t\t\t\n//\t\t};\n\t\treturn pMesh;\n\t}", "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 void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }", "private Node createVirtualWorldBoundsShape() {\n \t\tPoint3d lower = new Point3d();\n \t\tPoint3d upper = new Point3d();\n \t\tmyVirtualWorldBounds.getLower(lower);\n \t\tmyVirtualWorldBounds.getUpper(upper);\n \t\t\n \t\tdouble[] coordinates = { lower.x, lower.y, lower.z, upper.x, lower.y,\n \t\t\t\tlower.z, upper.x, lower.y, upper.z, lower.x, lower.y, upper.z,\n \t\t\t\tlower.x, upper.y, lower.z, upper.x, upper.y, lower.z, upper.x,\n \t\t\t\tupper.y, upper.z, lower.x, upper.y, upper.z };\n \t\t\n \t\tint[] coordinateIndices = { 0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7,\n \t\t\t\t7, 4, 0, 4, 1, 5, 2, 6, 3, 7 };\n \t\t\n \t\tIndexedLineArray geometry = new IndexedLineArray(\n \t\t\t\tcoordinates.length / 3, IndexedLineArray.COORDINATES,\n \t\t\t\tcoordinateIndices.length);\n \t\t\n \t\tgeometry.setCoordinates(0, coordinates);\n \t\tgeometry.setCoordinateIndices(0, coordinateIndices);\n \t\t\n \t\treturn new Shape3D(geometry);\n \t}", "public QuadMesh\n (boolean isBeingSplit,\n Matrix4f cubeMatrix, \n\t\tVector3f color,\n\t\tboolean inAtmosphere, \n\t\tVector3f meshOffset, \n\t\tboolean inFrustum, \n\t\tfloat arcLengthOverSize, \n\t\tVector3f center, \n\t\tfloat intensity, \n\t\tTexture2D Heightmap, \n\t\tString f ,\n\t\tQuadMesh p, \n\t\tVector3f v1, \n\t\tVector3f v2, \n\t\tVector3f v3, \n\t\tVector3f v4,\n\t\tfloat size,\n\t\tint x, \n\t\tint y, \n\t\tboolean hasChildren, \n\t\tArrayList<QuadMesh> children, \n\t\tBoundingSphere sphere, \n\t\tGeometry mesh, \n\t\tVector3f faceIndex, \n\t\tfloat centerOff,\n\t\tGeometry bsp)\t\n{\n\t\tfirst = v1;\n\t\tsecond = v2;\n\t\tthird = v3;\n\t\tfourth = v4;\n\t\twidth = size;\n\t\tindex1 = x;\n\t\tindex2 = y;\n\t\tthis.hasChildren = hasChildren;\n\t\tthis.children = children;\n\t\tparent = p;\n\t\tface = f;\n\t\tthis.sphere = sphere;\n\t\tthis.mesh = mesh;\n\t\tthis.faceIndex = faceIndex;\n\t\tthis.centerOff = centerOff;\n\t\tthis.Heightmap = Heightmap;\n\t\tthis.intensity = intensity;\n\t\tthis.arcLengthOverSize = arcLengthOverSize;\n\t\tthis.center = center;\n\t\tthis.inFrustum = inFrustum;\n\t\tthis.meshOffset = meshOffset;\n\t\tthis.inAtmosphere = inAtmosphere;\n\t\tthis.color = color;\n\t\tthis.cubeMatrix = cubeMatrix;\n\t\tthis.bsp = bsp;\n\n\t\n\t}", "protected CylinderShade(String name) {\n\tsuper(name);\n }", "private void createVertices(int iX, int iY, int iXO, int iYO, int num, int increment) {\n int y = iY;\n if (num == 0 && increment == 0) {\n BracketNode last = new BracketNode(\"\", iX, y - 20, iXO, 20);\n nodes.add(last);\n getChildren().addAll(new Line(iX, iY, iX + iXO, iY), last);\n last.setName(currentBracket.getBracket().get(location));\n bracketMap.put(last, location);\n nodeMap.put(location, last);\n } else {\n ArrayList<BracketNode> aNodeList = new ArrayList<>();\n for (int i = 0; i < num; i++) {\n Point2D tl = new Point2D(iX, y);\n Point2D tr = new Point2D(iX + iXO, y);\n Point2D bl = new Point2D(iX, y + iYO);\n Point2D br = new Point2D(iX + iXO, y + iYO);\n BracketNode nTop = new BracketNode(\"\", iX, y - 20, iXO, 20);\n aNodeList.add(nTop);\n nodes.add(nTop);\n BracketNode nBottom = new BracketNode(\"\", iX, y + (iYO - 20), iXO, 20);\n aNodeList.add(nBottom);\n nodes.add(nBottom);\n Line top = new Line(tl.getX(), tl.getY(), tr.getX(), tr.getY());\n Line bottom = new Line(bl.getX(), bl.getY(), br.getX(), br.getY());\n Line right = new Line(tr.getX(), tr.getY(), br.getX(), br.getY());\n getChildren().addAll(top, bottom, right, nTop, nBottom);\n isTop = !isTop;\n y += increment;\n }\n ArrayList<Integer> tmpHelp = helper(location, num);\n for (int j = 0; j < aNodeList.size(); j++) {\n //System.out.println(currentBracket.getBracket().get(tmpHelp.get(j)));\n aNodeList.get(j).setName(currentBracket.getBracket().get(tmpHelp.get(j)));\n bracketMap.put(aNodeList.get(j), tmpHelp.get(j));\n nodeMap.put(tmpHelp.get(j), aNodeList.get(j));\n //System.out.println(bracketMap.get(aNodeList.get(j)));\n }\n }\n\n }", "public static void main(String[] args){\n Mesh3D box = Mesh3D.box(10, 20, 60);\n \n Line3D lineX = box.getLineX();\n Line3D lineY = box.getLineY();\n Line3D lineZ = box.getLineZ();\n lineX.show();\n lineY.show();\n lineZ.show();\n box.translateXYZ(100, 0.0, 0.0); \n box.show();\n Line3D line = new Line3D(); \n List<Point3D> intersects = new ArrayList<Point3D>();\n \n for(int p = 0; p < 100; p++){\n double r = 600;\n double theta = Math.toRadians(90.0);//Math.toRadians(Math.random()*180.0);\n double phi = Math.toRadians(Math.random()*360.0-180.0);\n line.set(0.0,0.0,0.0, \n Math.sin(theta)*Math.cos(phi)*r,\n Math.sin(theta)*Math.sin(phi)*r,\n Math.cos(theta)*r\n );\n intersects.clear();\n box.intersectionRay(line, intersects);\n System.out.println(\"theta/phi = \" + Math.toDegrees(theta) + \" \"\n + Math.toDegrees(phi) + \" intersects = \" + intersects.size());\n \n }\n }", "public void texturedSphere(float r, PGraphics t) {\n int v1,v11,v2;\n r = (r + 240 ) * 0.33f;\n beginShape(TRIANGLE_STRIP);\n texture(t);\n float iu=(float)(t.width-1)/(sDetail);\n float iv=(float)(t.height-1)/(sDetail);\n float u=0,v=iv;\n for (int i = 0; i < sDetail; i++) {\n vertex(0, -r, 0,u,0);\n vertex(sphereX[i]*r, sphereY[i]*r, sphereZ[i]*r, u, v);\n u+=iu;\n }\n vertex(0, -r, 0,u,0);\n vertex(sphereX[0]*r, sphereY[0]*r, sphereZ[0]*r, u, v);\n endShape(); \n \n // Middle rings\n int voff = 0;\n for(int i = 2; i < sDetail; i++) {\n v1=v11=voff;\n voff += sDetail;\n v2=voff;\n u=0;\n beginShape(TRIANGLE_STRIP);\n texture(t);\n for (int j = 0; j < sDetail; j++) {\n vertex(sphereX[v1]*r, sphereY[v1]*r, sphereZ[v1++]*r, u, v);\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2++]*r, u, v+iv);\n u+=iu;\n }\n \n // Close each ring\n v1=v11;\n v2=voff;\n vertex(sphereX[v1]*r, sphereY[v1]*r, sphereZ[v1]*r, u, v);\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2]*r, u, v+iv);\n endShape();\n v+=iv;\n }\n u=0;\n \n // Add the northern cap\n beginShape(TRIANGLE_STRIP);\n texture(t);\n for (int i = 0; i < sDetail; i++) {\n v2 = voff + i;\n vertex(sphereX[v2]*r, sphereY[v2]*r, sphereZ[v2]*r, u, v);\n vertex(0, r, 0,u,v+iv); \n u+=iu;\n }\n vertex(sphereX[voff]*r, sphereY[voff]*r, sphereZ[voff]*r, u, v);\n endShape();\n \n}" ]
[ "0.74141616", "0.7180983", "0.6534577", "0.6443094", "0.6325939", "0.62532634", "0.6214325", "0.61043334", "0.6033015", "0.5941839", "0.5917603", "0.5874169", "0.5848993", "0.5822796", "0.5736581", "0.5726616", "0.57251155", "0.56994885", "0.56539667", "0.56462157", "0.56400114", "0.5624602", "0.56207466", "0.5584326", "0.5580492", "0.55592334", "0.5490261", "0.54362816", "0.5420597", "0.5410426", "0.541011", "0.5403823", "0.53638786", "0.5322131", "0.5259929", "0.5258021", "0.5252837", "0.52526337", "0.5226144", "0.52191854", "0.5157948", "0.5156043", "0.51514643", "0.5144477", "0.5129782", "0.5112576", "0.5075971", "0.5066282", "0.5054151", "0.50246584", "0.50175697", "0.50041854", "0.5002203", "0.49955428", "0.49725747", "0.49715585", "0.49585602", "0.49533442", "0.4946527", "0.4945605", "0.49449176", "0.49327692", "0.4919726", "0.49065557", "0.48894283", "0.48743072", "0.48677507", "0.48677087", "0.4866206", "0.48491332", "0.48415592", "0.4840922", "0.48356208", "0.48341018", "0.48139796", "0.48090962", "0.48020086", "0.47966242", "0.47881123", "0.4785111", "0.47845647", "0.4782099", "0.47816843", "0.47790673", "0.47750837", "0.4769757", "0.47647396", "0.47645688", "0.47606674", "0.4759291", "0.47563857", "0.47537315", "0.47533187", "0.47438967", "0.47274634", "0.4715286", "0.47141683", "0.47140533", "0.4681698", "0.46786597" ]
0.7465177
0
Stretches the geometry parallel to the object space axes
public void scale(double xScale, double yScale, double zScale) { // Create a matrix that will transform vertices to their new positions Matrix scaleMatrix = new Matrix(3, 3); scaleMatrix.setElement(0, 0, xScale); scaleMatrix.setElement(1, 1, yScale); scaleMatrix.setElement(2, 2, zScale); for (int i = 0; i < verts.length; i++) { verts[i] = scaleMatrix.multiply(verts[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setSizeBox() {\n\t\t\tthis.leftX = pointsSubStroke.get(0).getX();\n\t\t\tthis.righX = pointsSubStroke.get(0).getX();\n\t\t\tthis.topY = pointsSubStroke.get(0).getY();\n\t\t\tthis.bottomY = pointsSubStroke.get(0).getY();\n\t\t\t\n\t\t\tfor(int i = 0; i < pointsSubStroke.size();i++) {\n\t\t\t\tdouble x = pointsSubStroke.get(i).getX();\n\t\t\t\tdouble y = pointsSubStroke.get(i).getX();\n\t\t\t\t\n\t\t\t\tthis.leftX = Math.min(x, leftX);\n\t\t\t\tthis.righX = Math.max(x, righX);\n\t\t\t\tthis.topY = Math.min(y, topY);\n\t\t\t\tthis.bottomY = Math.max(y, bottomY);\n\t\t\t}\n\t\t}", "public void updateTransform() {\n \t\tif (viewBox != null) {\n \t\t\tOMSVGRect bbox = ((SVGRectElement)viewBox.getElement()).getBBox();\n //\t\t\tGWT.log(\"bbox = \" + bbox.getDescription());\n \t\t\tfloat d = (float)Math.sqrt((bbox.getWidth() * bbox.getWidth() + bbox.getHeight() * bbox.getHeight()) * 0.25) * scale * 2;\n //\t\t\tGWT.log(\"d = \" + d);\n \t\t\n \t\t\t// Compute the actual canvas size. It is the max of the window rect\n \t\t\t// and the transformed bbox.\n \t\t\tfloat width = Math.max(d, windowRect.getWidth());\n \t\t\tfloat height = Math.max(d, windowRect.getHeight());\n //\t\t\tGWT.log(\"width = \" + width);\n //\t\t\tGWT.log(\"height = \" + height);\n \n \t\t\t// Compute the display transform to center the image in the\n \t\t\t// canvas\n \t\t\tOMSVGMatrix m = svg.createSVGMatrix();\n \t\t\tfloat cx = bbox.getCenterX();\n \t\t\tfloat cy = bbox.getCenterY();\n \t\t\tm = m.translate(0.5f * (width - bbox.getWidth()) -bbox.getX(), 0.5f * (height - bbox.getHeight()) -bbox.getY())\n \t\t\t.translate(cx, cy)\n \t\t\t.rotate(angle)\n \t\t\t.scale(scale)\n \t\t\t.translate(-cx, -cy);\n \t\t\t((ISVGTransformable)xformGroup).getTransform().getBaseVal().getItem(0).setMatrix(m);\n \t\t\t((ISVGTransformable)modelGroup.getTwinWrapper()).getTransform().getBaseVal().getItem(0).setMatrix(m);\n //\t\t\tGWT.log(\"m=\" + m.getDescription());\n \t\t\tsvg.getStyle().setWidth(width, Unit.PX);\n \t\t\tsvg.getStyle().setHeight(height, Unit.PX);\n \t\t}\n \t}", "public void transform() {\n final var bounds = getParentBounds();\n transform( bounds.width, bounds.height );\n }", "private void updateViewBounds() \r\n {\r\n assert !sim.getMap().isEmpty() : \"Visualiser needs simulator whose a map has at least one node\"; \r\n \r\n \r\n viewMinX = minX * zoomFactor;\r\n viewMinY = minY * zoomFactor;\r\n \r\n viewMaxX = maxX * zoomFactor;\r\n viewMaxY = maxY * zoomFactor;\r\n \r\n \r\n double marginLength = zoomFactor * maxCommRange;\r\n \r\n \r\n // Set the size of the component\r\n int prefWidth = (int)Math.ceil( (viewMaxX - viewMinX) + (marginLength * 2) );\r\n int prefHeight = (int)Math.ceil( (viewMaxY - viewMinY) + (marginLength * 2) );\r\n setPreferredSize( new Dimension( prefWidth, prefHeight ) );\r\n \r\n \r\n // Adjust for margin lengths \r\n viewMinX -= marginLength;\r\n viewMinY -= marginLength;\r\n \r\n viewMaxX += marginLength;\r\n viewMaxY += marginLength;\r\n }", "@Override\n public void componentResized(ComponentEvent e) {\n setShape(new Ellipse2D.Double(0,0,FRAME_WIDTH,FRAME_WIDTH));\n }", "public void updateBounds() {\n this.setBounds(left, top, width, height);\n }", "private void updateSize() {\n double width = pane.getWidth();\n double height = pane.getHeight();\n\n if(oldWidth == 0) {\n oldWidth = width;\n }\n if(oldHeight == 0) {\n oldHeight = height;\n }\n\n double oldHvalue = pane.getHvalue();\n double oldVvalue = pane.getVvalue();\n if(Double.isNaN(oldVvalue)) {\n oldVvalue = 0;\n }\n if(Double.isNaN(oldHvalue)) {\n oldHvalue = 0;\n }\n\n pane.setVmax(height);\n pane.setHmax(width);\n\n if(grow) {\n renderMapGrow(width, height, curZoom);\n } else {\n renderMap(width, height, curZoom);\n }\n\n pane.setVvalue((height/oldHeight)*oldVvalue);\n pane.setHvalue((width/oldWidth)*oldHvalue);\n\n oldWidth = width;\n oldHeight = height;\n }", "@Override\n\tpublic void componentResized(ComponentEvent e) {\n\t\twidthAttitude=e.getComponent().getSize().getWidth()/Width;\n\t\theightAttitude=e.getComponent().getSize().getHeight()/Height;\n\t}", "public void onBoundsResolved()\n {\n updateTransform();\n }", "public void expand(){\n\t\tsetBounds(getX()-getWidth()/4, getY(), getWidth() * 1.5f, getHeight());\n\t\tcollisionBounds.setWidth(getWidth());\n\t}", "public void setFrameSize(double aWidth, double aHeight)\n{\n // If shape not rotated, scaled or skewed, just set and return\n if(!isRSS()) {\n if(_width<0) { setX(_x + (aWidth+_width)); aWidth = -aWidth; }\n if(_height<0) { setY(_y + (aHeight+_height)); aHeight = -aHeight; }\n setSize(aWidth, aHeight); return;\n }\n \n // Convert X & Y axis to parent coords\n RMSize x_axis = convertVectorToShape(new RMSize(_width, 0), _parent);\n RMSize y_axis = convertVectorToShape(new RMSize(0, _height), _parent);\n\n // Scale widths of X & Y axes in parent coords by ratio of NewWidth/OldWidth\n double sizeByRatio1 = Math.abs(aWidth)/(Math.abs(x_axis.width) + Math.abs(y_axis.width));\n x_axis.width *= sizeByRatio1; y_axis.width *= sizeByRatio1;\n \n // Scale heights of X & Y axes in parent coords by ratio of NewHeight/OldHeight\n double sizeByRatio2 = Math.abs(aHeight)/(Math.abs(x_axis.height) + Math.abs(y_axis.height));\n x_axis.height *= sizeByRatio2; y_axis.height *= sizeByRatio2;\n\n // Cache current bounds origin (this shouldn't change)\n RMPoint origin = getFrameXY();\n \n // Reset current Skew and convert X & Y axis from parent coords\n setSkewXY(0, 0);\n convertVectorFromShape(x_axis, _parent);\n convertVectorFromShape(y_axis, _parent);\n\n // Set the size to compensate for the skew\n setSize(x_axis.width, y_axis.height);\n\n // Calculate new skew angles (or roll, if width or height is zero)\n if(width()==0)\n setRoll(getRoll() - Math.toDegrees(Math.atan(y_axis.width/y_axis.height)));\n else if(height()==0)\n setRoll(getRoll() - Math.toDegrees(Math.atan(x_axis.height/x_axis.width)));\n else {\n setSkewX(Math.toDegrees(Math.atan(x_axis.height/x_axis.width)));\n setSkewY(Math.toDegrees(Math.atan(y_axis.width/y_axis.height)));\n }\n\n // Reset original bounds origin (it may have been effected by skew changes)\n setFrameXY(origin);\n}", "private void reCalculateFullExtent(){\r\n\t\tif (graphics.size() > 0) {\r\n\t\t\tFGraphic g = (FGraphic) graphics.get(0);\r\n\t\t\tfullExtent = g.getGeom().getEnvelope();\r\n\t\t\tfor (int i = 1; i < graphics.size(); i++) {\r\n\t\t\t\tg = (FGraphic) graphics.get(i);\r\n\t\t\t\tEnvelope rAux = g.getGeom().getEnvelope();\r\n\r\n\t\t\t\tfullExtent.add(rAux);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ballParent\n box.set(0, 0, w, h);\n }", "@Override\npublic void basicDisplayBox(Point origin, Point corner) {\n // do nothing\n // we could transform all components proportionally\n}", "private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.getHeight(), 0);\n outer = new Rectangle(position, 1.0/zoomFactor * fo * canvas.getWidth(), 1.0/zoomFactor * fo * canvas.getHeight(), 0);\n }\n }", "public void zoomToAreaOfInterest() {\n Envelope aoe = context.getViewport().getBounds();\n if (aoe.getWidth() == 0) {\n aoe.expandBy(.001, 0);\n }\n\n if (aoe.getHeight() == 0) {\n aoe.expandBy(0, .001);\n }\n Rectangle2D rect = new Rectangle2D.Double(aoe.getMinX(), aoe.getMinY(),\n aoe.getWidth(), aoe.getHeight());\n getCamera().animateViewToCenterBounds(rect, true, 0);\n }", "Geometry getGeometry();", "@SuppressWarnings(\"unchecked\")\n public void centralizarComponente() {\n Dimension ds = Toolkit.getDefaultToolkit().getScreenSize();\n Dimension dw = getSize();\n setLocation((ds.width - dw.width) / 2, (ds.height - dw.height) / 2);\n }", "@Override\r\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tfloat xPad = getPaddingLeft() + getPaddingRight();\r\n\t\tfloat yPad = getPaddingTop() + getPaddingBottom();\r\n\t\tdimension = Math.min(w - xPad, (h - yPad) * 2);\r\n\t\tradius = 60;\r\n\t\tinsideLeft = w / 2 - radius;\r\n\t\tinsideRight = w / 2 + radius;\r\n\t\tinsideTop = dimension - getPaddingBottom() - radius;\r\n\t\tinsideBottom = dimension - getPaddingBottom();\r\n\t\t\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension - getPaddingBottom());\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension - getPaddingRight(), dimension/2);\r\n//\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), dimension, dimension);\r\n\t\toutRect = new RectF(getPaddingLeft(), getPaddingTop(), w-getPaddingRight(), h-getPaddingBottom());\r\n\t\tfloat insideRectDownH = dimension-getPaddingBottom()-getPaddingTop()+150;\r\n//\t\tinsideRect = new RectF(50, 300, 320, insideRectDownH);\r\n\t\tinsideRect = new RectF(w/2-radius, dimension-radius, w/2+radius, dimension+radius);\r\n\t}", "public void scaleAffine(){\n //Get the monitors size.\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n transform = new AffineTransform();\n double width = screenSize.getWidth();\n double height = screenSize.getHeight();\n\n //Set up the scale amount for our Affinetransform\n double xscale = width / model.getBbox().getWidth();\n double yscale = height / model.getBbox().getHeight();\n\n double scale = max(xscale, yscale);\n\n adjustZoomLvl(scale);\n transform.translate(-model.getBbox().getMinX(), -model.getBbox().getMaxY());\n\n bounds = new CanvasBounds(getBounds(), transform);\n adjustZoomFactor();\n }", "protected void resizePanel() {\n\t\tif (drawingAreaIsBlank) { // may have become blank after deleting the last node manually, so panel must still be shrunk\n\t\t\tsetPreferredSize(new Dimension(0,0)); // put back to small size so scrollbars disappear\n\t\t\trevalidate();\n\t\t\treturn;\n\t\t}\n\t\tgetMaxMin(); // get the extent of the tree to the left, right, bottom\n\t\tsetPreferredSize(new Dimension(maxX, maxY));\n\t\trevalidate();\n\t}", "@Override\n\tpublic void reshape(GLAutoDrawable glDrawable, int x, int y, int width, int height) {\n\t\tGL2 gl = glDrawable.getGL().getGL2();\n\t\t\n\t\t// resize the ortho view\n\t\t\n\t\t// set the matrix mode to projection\n\t\tgl.glMatrixMode(GL2.GL_PROJECTION);\n\t\t// initialize the matrix\n\t\tgl.glLoadIdentity();\n\t\t// set the view to a 2D view\n\t\tgl.glOrtho(-width / 2.0, width / 2.0, -height / 2.0, height / 2.0, 0, 1);\n\t\t\n\t\t// switch to the model view matrix\n\t\tgl.glMatrixMode(GL2.GL_MODELVIEW);\n\t\t// initialize the matrix\n\t\tgl.glLoadIdentity();\n\t\t\n\t\t// set the size\n\t\tthis.size = new Dimension(width, height);\n\t}", "@Override\n public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n GL2 gl = drawable.getGL().getGL2(); // get the OpenGL 2 graphics context\n\n if (height == 0) height = 1; // prevent divide by zero\n double aspect = (double)width / height;\n\n // Set the view port (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(GL_PROJECTION); // choose projection matrix\n gl.glLoadIdentity(); // reset projection matrix\n glu.gluPerspective(45.0, aspect, 0.1, 100.0); // fovy, aspect, zNear, zFar\n\n // Enable the model-view transform\n gl.glMatrixMode(GL_MODELVIEW);\n gl.glLoadIdentity(); // reset\n }", "public void zoomToFit(RTGraphComponent.RenderContext myrc) {\n RTGraphComponent.RenderContext original_myrc = myrc;\n // Get the render context\n if (myrc == null) myrc = (RTGraphComponent.RenderContext) (getRTComponent().getRTRenderContext()); if (myrc == null) return;\n // Go through the entities... may be faster to iterate over visible entities...\n Iterator<String> it = entity_to_wxy.keySet().iterator(); if (it.hasNext() == false) return;\n double x0 = Double.POSITIVE_INFINITY, y0 = Double.POSITIVE_INFINITY,\n x1 = Double.NEGATIVE_INFINITY, y1 = Double.NEGATIVE_INFINITY;\n // Check bounds for each one and adjust mins/maxes as appropriate\n while (it.hasNext()) { \n String str = it.next(); if (myrc.visible_entities.contains(str) == false) continue;\n if (x0 > entity_to_wxy.get(str).getX()) x0 = entity_to_wxy.get(str).getX();\n if (y0 > entity_to_wxy.get(str).getY()) y0 = entity_to_wxy.get(str).getY();\n if (x1 < entity_to_wxy.get(str).getX()) x1 = entity_to_wxy.get(str).getX();\n if (y1 < entity_to_wxy.get(str).getY()) y1 = entity_to_wxy.get(str).getY();\n }\n // Validate the output\n if (Double.isInfinite(x0) || Double.isInfinite(y0)) return;\n // Give it a border\n if (x1 == x0) x1 = x0 + 0.5; if (y1 == y0) y1 = y0 + 0.5;\n double xp = (x1 - x0)*0.05, yp = (y1 - y0)*0.05;\n // Transform and redraw\n if (getGraphBG() == GraphBG.GEO_OUT || getGraphBG() == GraphBG.GEO_FILL || getGraphBG() == GraphBG.GEO_TOUCH) {\n if (x0 > -180) { x0 = -180; xp = 0.0; }\n if (y0 > -90) { y0 = -90; yp = 0.0; }\n if (x1 < 180) { x1 = 180; xp = 0.0; }\n if (y1 < 90) { y1 = 90; yp = 0.0; }\n }\n extents = new Rectangle2D.Double(x0-xp,y0-yp,x1-x0+2*xp,y1-y0+2*yp);\n transform(); if (original_myrc == null) getRTComponent().render();\n }", "void setBounds(double x, double y, double scale) {\n double drawAspect = (double)width / (double)height;\n\n double halfPlotWidth = scale / 2.0;\n double halfPlotHeight = scale / 2.0;\n if (drawAspect > 1.0) {\n halfPlotWidth *= drawAspect;\n } else {\n halfPlotHeight /= drawAspect;\n }\n\n setBounds(x - halfPlotWidth, y - halfPlotHeight, x + halfPlotWidth, y + halfPlotHeight);\n }", "private void drag() {\n Point mousePosition = calculateMouseLocation();\n getArea().x = mousePosition.getX() - (mouseX - prevX);\n getArea().y = mousePosition.getY() - (mouseY - prevY);\n // Ensure that weird resizing stuff doesn't happen while moving the\n // window. Idfk why this works, but it does.\n resize();\n getLayout().resize(this, getChildren());\n getLayout().layout(this, getChildren());\n }", "public void reshape(int x, int y, int w, int h) {\n size.width = w;\n size.height = h;\n }", "protected Rectangle getSelectedElementFigureArea()\n {\n boolean anchored = false;\n\n // Use figures since they may be sized differently during dynamics\n // accumulate as unzoomed.\n Rectangle r = null;\n\n // Go through the list of selected widget figures, union the bounds.\n Iterator<FrameEltSelnFig<?>> iter = selection.getSelectedFigures();\n\n while (iter.hasNext()) {\n FrameEltSelnFig<?> fig = iter.next();\n\n if (fig instanceof GraphicalWidget<?>) {\n GraphicalWidget<?> gw = (GraphicalWidget<?>) fig;\n IWidget w = gw.getModel();\n SimpleWidgetGroup wg = w.getParentGroup();\n\n if (wg != null) {\n r = unionBounds(r, getGroupFigureBounds(wg));\n anchored = anchored || (w instanceof ChildWidget);\n }\n else {\n r = unionBounds(r, gw.getBounds());\n }\n }\n else if (fig instanceof FrameEltGroupHalo) {\n Rectangle haloBds = fig.getBounds(); // this is zoomed!\n double scale = frameUI.getZoom();\n\n double right = (haloBds.x + haloBds.width) / scale;\n double bottom = (haloBds.y + haloBds.height) / scale;\n double left = haloBds.x / scale;\n double top = haloBds.y / scale;\n\n haloBds =\n PrecisionUtilities.getDraw2DRectangle(left,\n top,\n right - left,\n bottom - top);\n\n r = unionBounds(r, haloBds);\n }\n }\n\n setTopLeftAnchored(anchored);\n\n return r;\n }", "protected void calculateBounds()\r\n {\r\n Toolkit DefaultToolkit = Toolkit.getDefaultToolkit();\r\n Dimension ScreenSize = DefaultToolkit.getScreenSize();\r\n int FrameWidth = ScreenSize.width - 100;\r\n int FrameHeight = ScreenSize.height - 100;\r\n setBounds(50, 50, FrameWidth, FrameHeight);\r\n }", "public void updateCoords() {\n line.setLine(parent.getFullBounds().getCenter2D(), child.getFullBounds().getCenter2D());\n Rectangle2D r = line.getBounds2D();\n // adding 1 to the width and height prevents the bounds from\n // being marked as empty and is much faster than createStrokedShape()\n setBounds(r.getX(), r.getY(), r.getWidth() + 1, r.getHeight() + 1);\n invalidatePaint();\n }", "@Override\n protected void onSizeChanged (int w, int h, int oldw, int oldh) {\n mXSize = w;\n mYSize = h;\n\n mZBoundOut = new RectF(w/2-w/2.5f, h/2-w/2.5f, w/2+w/2.5f, h/2+w/2.5f);\n mZBoundOut2 = new RectF(\n w/2-w/2.5f-ZRING_CURSOR_ADD, h/2-w/2.5f-ZRING_CURSOR_ADD,\n w/2+w/2.5f+ZRING_CURSOR_ADD, h/2+w/2.5f+ZRING_CURSOR_ADD);\n mZBoundIn = new RectF(\n w/2-w/2.5f+ZRING_WIDTH, h/2-w/2.5f+ZRING_WIDTH,\n w/2+w/2.5f-ZRING_WIDTH, h/2+w/2.5f-ZRING_WIDTH);\n mZBoundIn2 = new RectF(\n w/2-w/2.5f+ZRING_WIDTH+ZRING_CURSOR_ADD, h/2-w/2.5f+ZRING_WIDTH+ZRING_CURSOR_ADD,\n w/2+w/2.5f-ZRING_WIDTH-ZRING_CURSOR_ADD, h/2+w/2.5f-ZRING_WIDTH-ZRING_CURSOR_ADD);\n\n if (LOCAL_LOGV) Log.v(TAG, \"New view size = (\"+w+\", \"+h+\")\");\n }", "public void centerSelection() {\n RenderContext myrc = (RenderContext) rc; if (myrc == null) return;\n Set<String> sel = myrc.filterEntities(getRTParent().getSelectedEntities());\n if (sel != null && sel.size() > 0) {\n Iterator<String> it = sel.iterator();\n\twhile (it.hasNext()) { \n\t String ent = it.next(); Point2D point = entity_to_wxy.get(ent);\n\t if (last_shft_down) entity_to_wxy.put(ent, new Point2D.Double(point.getX(),m_wy)); \n\t else if (last_ctrl_down) entity_to_wxy.put(ent, new Point2D.Double(m_wx,point.getY()));\n\t else entity_to_wxy.put(ent, new Point2D.Double(m_wx,m_wy));\n\t transform(ent); \n\t}\n getRTComponent().render();\n }\n }", "public void updateBounds(){\r\n\t\tRectangle bounds = new Rectangle(super.getBounds());\r\n\t\tint preferredHeight = 0;\r\n\t\tfor(Object child : getChildren()){\r\n\t\t\tIFigure figure = (IFigure)child;\r\n\t\t\tpreferredHeight += figure.getPreferredSize().height;\r\n\t\t}\r\n\t\tif (preferredHeight == 0) preferredHeight = 200;\r\n\t\tbounds.setHeight(preferredHeight+20);\r\n\t\tsetBounds(bounds);\r\n\t}", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "public void componentResized(ComponentEvent e) {\n myReshape(getSize().width, getSize().height);\n display();\n repaint();\n }", "@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\r\n\t}", "@Override\n public void componentResized(ComponentEvent e) {\n window.setShape(new Ellipse2D.Double(0, 0, window.getWidth(), window.getHeight()));\n window.add(panel);\n window.setLocation((screenSize.width - window.getSize().width) / 2, (screenSize.height - window.getSize().height) / 2);\n window.setVisible(true);\n }", "public void updateRenderRect() {\n int i = 0;\n if (this.mTargetRatio == 2) {\n this.mTx = this.mRenderWidth == 0 ? 0 : (this.mRenderOffsetX * this.mSurfaceWidth) / this.mRenderWidth;\n int i2 = (this.mSurfaceHeight - this.mSurfaceWidth) / 2;\n if (this.mRenderHeight != 0) {\n i = (this.mRenderOffsetY * this.mSurfaceHeight) / this.mRenderHeight;\n }\n this.mTy = i2 + i;\n this.mTwidth = this.mSurfaceWidth;\n this.mTheight = this.mSurfaceWidth;\n this.mRenderLayoutRect.set(this.mRenderOffsetX, ((this.mRenderHeight - this.mRenderWidth) / 2) + this.mRenderOffsetY, this.mRenderWidth + this.mRenderOffsetX, ((this.mRenderHeight - this.mRenderWidth) / 2) + this.mRenderOffsetY + this.mRenderWidth);\n return;\n }\n this.mTx = this.mRenderWidth == 0 ? 0 : (this.mRenderOffsetX * this.mSurfaceWidth) / this.mRenderWidth;\n this.mTy = this.mRenderHeight == 0 ? 0 : (this.mRenderOffsetY * this.mSurfaceHeight) / this.mRenderHeight;\n this.mTwidth = this.mSurfaceWidth;\n this.mTheight = this.mSurfaceHeight;\n this.mRenderLayoutRect.set(0, 0, this.mRenderWidth, this.mRenderHeight);\n }", "public void update() {\n\t\tactSX=parent.actSX*scaleX;\n\t\tactSY=parent.actSY*scaleY;\n\t\tw=posW*actSX;\n\t\th=posH*actSY;\n\t\tswitch (align) {\n\t\tcase DEFAULT:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase TOPRIGHT:\n\t\t\tx=parent.x+parent.w-(posX+posW)*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase BOTTOMLEFT:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+parent.h-(posY+posH)*actSY;\n\t\t\tbreak;\n\t\tcase BOTTOMRIGHT:\n\t\t\tx=parent.x+parent.w-(posX+posW)*actSX;\n\t\t\ty=parent.y+parent.h-(posY+posH)*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDX:\n\t\t\tx=parent.x+parent.w/2-w/2+posX*actSX;\n\t\t\ty=parent.y+posY*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDY:\n\t\t\tx=parent.x+posX*actSX;\n\t\t\ty=parent.y+parent.h/2-h/2+posY*actSY;\n\t\t\tbreak;\n\t\tcase CENTEREDXY:\n\t\t\tx=parent.x+parent.w/2-w/2+posX*actSX;\n\t\t\ty=parent.y+parent.h/2-h/2+posY*actSY;\n\t\t\tbreak;\n\t\t}\n\t}", "protected void update(Rectangle r)\n {\n if ((r != null) &&\n (bottomRightResize != null) &&\n bottomRightResize.isVisible())\n {\n // Since the resize rects are not drawn in the zoomed area\n // calculate the positions in the unzoomed context\n double scale = frameUI.getZoom();\n\n // Center on corners. These figures are not \"scaled\" they must\n // be positioned in SCALED location, not in 1:1 location.\n double right = r.x + r.width;\n double bottom = r.y + r.height;\n\n int x = PrecisionUtilities.round(r.x * scale);\n int y = PrecisionUtilities.round(r.y * scale);\n int width = PrecisionUtilities.round(right * scale) - x;\n int height = PrecisionUtilities.round(bottom * scale) - y;\n\n // Trigger a redraw on all handles.\n if (topLeftResize.isVisible()) {\n topLeftResize.centerAt(x, y);\n topLeftResize.repaint();\n }\n\n bottomLeftResize.centerAt(x, y + height);\n bottomLeftResize.repaint();\n\n topRightResize.centerAt(x + width, y);\n topRightResize.repaint();\n\n bottomRightResize.centerAt(x + width, y + height);\n bottomRightResize.repaint();\n }\n }", "@Override\r\n\tpublic void onSizeChanged(int w, int h, int oldW, int oldH) {\r\n\t\t// Set the movement bounds for the ball\r\n\t\txMax = w - 1;\r\n\t\tyMax = h - 1;\r\n\t}", "public void mouseDragged(MouseEvent e) {\r\n Graphics g = view.getViewJComponent().getGraphics();\r\n rectangle.setSize(Math.abs(e.getX() - rectangle.x),\r\n Math.abs(e.getY() - rectangle.y));\r\n view.getViewJComponent().repaint();\r\n g.drawRect(rectangle.x, rectangle.y, rectangle.width,\r\n rectangle.height);\r\n }", "public void calculateWindow()\n {\n Vector2 windowBottomLeftBounds = new Vector2(1000000, 1000000);\n Vector2 windowTopRightBounds = new Vector2(-1000000, -1000000);\n for (Element<?> e : children())\n {\n if (e.id() != null && (e.id().startsWith(id() + \"hBar\") || e.id().startsWith(id() + \"vBar\")))\n {\n continue;\n }\n for (Element<?> child : e)\n {\n Vector2 alignmentVector = child.alignment().alignmentVector();\n Vector2 bottomLeftBounds = new Vector2(child.x() - (alignmentVector.x * child.width()), child.y()\n - (alignmentVector.y * child.height()));\n Vector2 topRightBounds = new Vector2(bottomLeftBounds.x + child.width(), bottomLeftBounds.y + child.height());\n // left\n if (windowBottomLeftBounds.x > bottomLeftBounds.x)\n {\n windowBottomLeftBounds.x = bottomLeftBounds.x;\n }\n // bottom\n if (windowBottomLeftBounds.y > bottomLeftBounds.y)\n {\n windowBottomLeftBounds.y = bottomLeftBounds.y;\n }\n // right\n if (windowTopRightBounds.x < topRightBounds.x)\n {\n windowTopRightBounds.x = topRightBounds.x;\n }\n // top\n if (windowTopRightBounds.y < topRightBounds.y)\n {\n windowTopRightBounds.y = topRightBounds.y;\n }\n }\n }\n \n content = new CRectangle(windowBottomLeftBounds.x, windowBottomLeftBounds.y, windowTopRightBounds.x - windowBottomLeftBounds.x,\n windowTopRightBounds.y - windowBottomLeftBounds.y);\n content.origin = new Vector2(0, 0);\n \n calculateScrollSize();\n }", "@Override\n\tpublic void mouseDragged(MouseEvent e) {\n\t\tif(scale != 1.0) {\n\t\t\tPoint2D.Double view = new Point2D.Double(e.getX(), e.getY());\n\t\t\tPoint2D.Double worldPoint = new Point2D.Double();\n\t\t\tAffineTransform viewToWorld = new AffineTransform(1.0 / scale, 0, 0, 1.0 / scale, worldUpperLeft.getX(), worldUpperLeft.getY());\n\t\t\tviewToWorld.transform(view, worldPoint);\n\t\t\t\n\t\t\twX = worldPoint.getX();\n\t\t\twY = worldPoint.getY();\n\t\n\t\t\tdouble diffX = wDragStartX - wX;\n\t\t\tdouble diffY = wDragStartY - wY;\n\t\t\tdouble wulX = worldUpperLeft.getX();\n\t\t\tdouble wulY = worldUpperLeft.getY();\n\t\t\tdouble newUpX = diffX + wulX;\n\t\t\tdouble newUpY = diffY + wulY;\n\t\t\t\n\t\t\tif(newUpX < 0)\n\t\t\t\tnewUpX = 0;\n\t\t\tif(newUpY < 0)\n\t\t\t\tnewUpY = 0;\n\t\t\tif(scale == 2.0 && newUpX > 512)\n\t\t\t\tnewUpX = 512;\n\t\t\tif(scale == 2.0 && newUpY > 512)\n\t\t\t\tnewUpY = 512;\n\t\t\tif(scale == 4.0 && newUpX > 768)\n\t\t\t\tnewUpX = 768;\n\t\t\tif(scale == 4.0 && newUpY > 768)\n\t\t\t\tnewUpY = 768;\n\t\t\t\n\t\t\tworldUpperLeft = new Point2D.Double(newUpX, newUpY);\n\t\t\t\n\t\t\tif(worldUpperLeft.getX() + scrollbarSize > MAXSCROLLBARSIZE) \n\t\t\t\tGUIFunctions.setHScrollBarPosit(MAXSCROLLBARSIZE - scrollbarSize);\n\t\t\telse \n\t\t\t\tGUIFunctions.setHScrollBarPosit((int) worldUpperLeft.getX());\n\t\t\t\n\t\t\tif(worldUpperLeft.getY() + scrollbarSize > MAXSCROLLBARSIZE) \n\t\t\t\tGUIFunctions.setVScrollBarPosit(MAXSCROLLBARSIZE - scrollbarSize);\n\t\t\telse \n\t\t\t\tGUIFunctions.setVScrollBarPosit((int) worldUpperLeft.getY());\n\t\t\tGUIFunctions.refresh();\n\t\t}\n\t}", "private void adjustEViewPosition() {\n double aVec[] = theRocket.getCoordSys().getPositionVec();\n CoordSys eViewSys = new CoordSys();\n eViewSys.setZAxis(VMath.normalize(aVec));\n\n aVec = VMath.vecMultByScalar(aVec, 2.5);\n eViewSys.setPositionAsVec(aVec);\n\n double[] zAxis = VMath.normalize(eViewSys.zAxis().getVectorForm());\n double[] yAxis = VMath.normalize(theRocket.getCoordSys().yAxis().getVectorForm());\n double[] xAxis = VMath.normalize(VMath.crossprd(yAxis, zAxis));\n yAxis = VMath.crossprd(zAxis, xAxis);\n eViewSys.setXAxis(xAxis);\n eViewSys.setYAxis(yAxis);\n eViewSys.setZAxis(zAxis);\n\n eViewSys.xRotate(180);\n eViewSys.zRotate(-90);\n eView.setViewingCoordSys(eViewSys);\n }", "@Override\n\tprotected void onSizeChanged(int w, int h, int oldw, int oldh) {\n\t\tsuper.onSizeChanged(w, h, oldw, oldh);\n\t\tif( mr > 0.1f*h ) {\n\t\t\tmr=0.1f*h;\n\t\t\tif( m != null ) {\n\t\t\t\t((CircleObjectKE)m).setR(mr);\n\t\t\t}\n\t\t}\n\t}", "public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n winW = width;\n winH = height;\n\n gl.glViewport(0, 0, width, height);\n}", "@Override\n public void setBounds(Rectangle bounds) {\n final Rectangle repaintBounds = new Rectangle(getBounds());\n\n final Rectangle newBounds = new Rectangle(ajustOnGrid(bounds.x),\n ajustOnGrid(bounds.y), ajustOnGrid(bounds.width), bounds.height);\n\n newBounds.width = newBounds.width < MINIMUM_SIZE.x ? MINIMUM_SIZE.x\n : newBounds.width;\n\n this.bounds = newBounds;\n\n parent.getScene().repaint(repaintBounds);\n parent.getScene().repaint(newBounds);\n\n // Move graphics elements associated with this component\n leftMovableSquare.setBounds(computeLocationResizer(0));\n rightMovableSquare.setBounds(computeLocationResizer(bounds.width));\n\n setChanged();\n notifyObservers();\n }", "@Override\n public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n // Get OpenGL context\n gl = drawable.getGL().getGL2();\n\n // Prevent zero height to stop divide by zero errors\n if (height == 0) {\n height = 1;\n }\n float aspect = (float) width / height;\n\n // Set the view port (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(GL_PROJECTION);\n gl.glLoadIdentity();\n glu.gluPerspective(45.0, aspect, 0.1, 100.0);\n\n // Enable the model-view transform\n gl.glMatrixMode(GL_MODELVIEW);\n gl.glLoadIdentity();\n }", "public void updateDisplayBounds() {\n if (display_.getDataSource().getBounds() != null) {\n int[] newBounds = display_.getDataSource().getBounds();\n int[] oldBounds = display_.getDisplayModel().getBounds();\n double xResize = (oldBounds[2] - oldBounds[0]) / (double) (newBounds[2] - newBounds[0]);\n double yResize = (oldBounds[3] - oldBounds[1]) / (double) (newBounds[3] - newBounds[1]);\n setImageBounds(newBounds);\n if (xResize < 1 || yResize < 1) {\n zoom(1 / Math.min(xResize, yResize), null);\n }\n }\n }", "@Override\n\tpublic void geometry(Geometry geometry) {\n\t\t\n\t}", "@As( \"figure with dimensions x: $, y: $, width: $, height: $\" )\n void figure(double x, double y, double width, double height) {\n figure = new SVGRectFigure(x,y,width,height);\n handles.clear();\n ResizeHandleKit.addEdgeResizeHandles(figure,handles);\n ResizeHandleKit.addCornerResizeHandles(figure, handles);\n setUpView();\n }", "public abstract Geometry computeGeometry();", "@Override\r\n public Dimension getPreferredSize() {\n \r\n return new Dimension((int) (this.getHeight() * 0.8), this.getHeight());\r\n }", "@Override\r\n\tprotected void pack() {\r\n\r\n\t\tRectangle displayarea = shell.getDisplay().getPrimaryMonitor().getBounds();\r\n\t\tRectangle windowarea = shell.getBounds();\r\n\t\tshell.setBounds((displayarea.width - windowarea.width) / 2,\r\n\t\t\t\t(displayarea.height - windowarea.height) / 2,\r\n\t\t\t\twindowarea.width, windowarea.height);\r\n\t}", "public void setPosicao() {\n Dimension d = this.getDesktopPane().getSize();\n this.setLocation((d.width - this.getSize().width) / 2, (d.height - this.getSize().height) / 2); \n}", "@Override\n public void updateCenter(int newX, int newY) {\n Point oldCenter = wrappedPolygon.getCenterPoint();\n wrappedPolygon.translate(newX - oldCenter.x, newY - oldCenter.y);\n }", "public Window() {\n // Creation de la fenetre\n super();\n\n // Creation du graphe de scene\n sceneGraph = new SceneGraph(\"Scene Graph\");\n origin = new int[2];\n\n // Proprietes generales de la fenetre\n // Titre de la fenetre\n this.setTitle(NOMFENETRE);\n /// Taille de la fenetre\n this.setSize(HTAILLE, VTAILLE);\n // Centre la fenetre a l'ecran\n this.setLocationRelativeTo(null);\n // Pour fermer la fenetre lorsqu'on clique sur la croix\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // Creation des composants de la fenetre\n infoBar = new InfoBar();\n treeZone = new TreePanel();\n drawZone = new DrawPanel(infoBar, treeZone);\n optionZone = new OptionPanel(drawZone);\n menuBar = new MenuBar();\n toolBar = new ToolBar(optionZone);\n\n split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, treeZone, drawZone);\n split.setDividerLocation(200);\n\n treeZone.initializeListeners(drawZone);\n menuBar.initializeListeners(drawZone);\n\n // Ajout de la barre de menu a la fenetre\n this.setJMenuBar(menuBar);\n // Ajout des differents sous-conteneurs au conteneur principal\n this.getContentPane().setLayout(new BorderLayout());\n this.add(optionZone, BorderLayout.NORTH);\n this.add(toolBar, BorderLayout.WEST);\n this.add(split, BorderLayout.CENTER);\n this.add(infoBar, BorderLayout.SOUTH);\n\n // Affiche la fenetre a l'ecran\n this.setVisible(true);\n\n this.addComponentListener(new ComponentAdapter() {\n\n @Override\n public void componentResized(ComponentEvent e) {\n drawZone.calculateOrigin();\n }\n });\n\n }", "public void updateOverviewCanvas() {\n\t\tif (m_mapImage.getImageHeight() == 0 || m_mapImage.getImageWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// What are the extents of a visible canvas in the ScrollPane/Pane?\n\n\t\t// The bound box changes with dragging\n\t\tBounds b = m_zoomPane.getCanvas().getBoundsInParent();\n\n\t\t// The bound box doesn't change with zoom\n\t\tdouble scale = m_zoomPane.getScale();\n\t\t\n\t\t// System.out.println(b.getMinX() + \" \" + b.getMinY() + \" \" + b.getMaxX() + \" \" + b.getMaxY() + \" \" + scale);\n\t\t\n\t\t// At start, 0.0 and 0.0 is the canvas translation, scale is 1.0\n\t\t// Other bounds describe the overall dimensions.\n\t\t\n\t\t// I need to know the size of the viewport\n\t\t// Then offset that viewport with b.getMinX() and b.getMinY()\n\t\t// And consider the scale factor!\n\t\tBounds sp = scrollPane.getBoundsInLocal();\n\n\t\t// Determine a scale based on what is needed to fit vertically or horizontally into the Canvas.\n\t\tdouble widthRatio = (double) MAX_OVERVIEW_WIDTH / (double) m_mapImage.getImageWidth();\n\t\tdouble heightRatio = (double) MAX_OVERVIEW_HEIGHT / (double) m_mapImage.getImageHeight();\n\t\t\n\t\tdouble scaleFactor = widthRatio < heightRatio ? widthRatio : heightRatio;\n\t\t\n\t\t// Set the transform\n\t\tAffine mat = new Affine(new Scale (scaleFactor, scaleFactor));\n\t\t\n\t\tGraphicsContext gc = m_navigationCanvas.getGraphicsContext2D();\n\t\tgc.clearRect(0, 0, m_navigationCanvas.getWidth(), m_navigationCanvas.getHeight());\n\t\t\n\t\t// Draw image\n\t\tm_mapImage.drawImage(m_navigationCanvas, mat, false);\n\t\t\n\t\t// Draw bounding box\n\t\t// TODO: ugh, this is almost correct but its behaving oddly with the left corner X/Y.\n\t\tdouble dx = (sp.getMaxX() - sp.getMaxX() / scale) / 2;\n\t\tdouble dy = (sp.getMaxY() - sp.getMaxY() / scale) / 2;\n\t\t\n\t\t// double box_xl = - b.getMinX();\n\t\t// double box_yl = - b.getMinY();\n\t\t// double box_xr = - b.getMinX() + sp.getMaxX() / scale;\n\t\t// double box_yr = - b.getMinY() + sp.getMaxY() / scale;\n\t\t\n\t\tdouble box_xl = - b.getMinX() + dx;\n\t\tdouble box_yl = - b.getMinY() + dy;\n\t\tdouble box_xr = - b.getMinX() + sp.getMaxX() / scale + dx;\n\t\tdouble box_yr = - b.getMinY() + sp.getMaxY() / scale + dy;\n\t\t\n\t\t// Clamp to limit the min/max view boxes.\n\t\t//if (box_xl < 0) box_xl = 0;\n\t\t//if (box_yl < 0) box_yl = 0;\n\t\t//if (box_xr > m_navigationCanvas.getWidth()) box_xr = m_navigationCanvas.getWidth();\n\t\t//if (box_yr > m_navigationCanvas.getHeight()) box_yr = m_navigationCanvas.getHeight();\n\t\t\n\t\t// Let's describe how the viewport would be in the canvas.\n\t\tVector3<Float> pt1 = m_zoomPane.getActualPixelPosition(box_xl, box_yl);\n\t\tVector3<Float> pt2 = m_zoomPane.getActualPixelPosition(box_xl, box_yr);\n\t\tVector3<Float> pt3 = m_zoomPane.getActualPixelPosition(box_xr, box_yr);\n\t\tVector3<Float> pt4 = m_zoomPane.getActualPixelPosition(box_xr, box_yl);\n\t\t\n\t\t// Save the transform state\n\t\tgc.save();\n gc.setTransform(mat);\n \n\t\tColor c = Color.RED;\n // Draw some lines.\n\t\tgc.beginPath();\n\t\tgc.setStroke(c);\n\t\tgc.setFill(c);\n\t\tgc.setLineWidth(1.0 / scaleFactor);\n\t\t\n gc.moveTo(pt1.x, pt1.y);\n gc.lineTo(pt2.x, pt2.y);\n gc.moveTo(pt2.x, pt2.y);\n gc.lineTo(pt3.x, pt3.y);\n \n gc.moveTo(pt3.x, pt3.y);\n gc.lineTo(pt4.x, pt4.y);\n gc.moveTo(pt4.x, pt4.y);\n gc.lineTo(pt1.x, pt1.y);\n \n gc.stroke();\n gc.closePath();\n \n gc.restore();\n\t}", "@Override\r\npublic void componentResized(ComponentEvent arg0) {\n\tsetSizeBackgr(getSize());\r\n\tsetSizeHat (getSize());\r\n\tsetSizeGift(getSize());\r\n}", "private void applyWindowToViewportTransformation(Graphics2D g2,\n double left, double right, double bottom, double top,\n boolean preserveAspect) {\n int width = getWidth();\n int height = getHeight();\n if (preserveAspect) {\n double displayAspect = Math.abs((double) height / width);\n double requestedAspect = Math.abs((bottom - top) / (right - left));\n if (displayAspect > requestedAspect) {\n double excess = (bottom - top) * (displayAspect / requestedAspect - 1);\n bottom += excess / 2;\n top -= excess / 2;\n } else if (displayAspect < requestedAspect) {\n double excess = (right - left) * (requestedAspect / displayAspect - 1);\n right += excess / 2;\n left -= excess / 2;\n }\n }\n g2.scale(width / (right - left), height / (bottom - top));\n g2.translate(-left, -top);\n double pixelWidth = Math.abs((right - left) / width);\n double pixelHeight = Math.abs((bottom - top) / height);\n pixelSize = (float) Math.max(pixelWidth, pixelHeight);\n }", "private void sendResizeEventToFX() {\n redraw();\n update();\n \n pWidth = getClientArea().width;\n pHeight = getClientArea().height;\n\n resizePixelBuffer(lastScaleFactor);\n\n if (scenePeer == null) {\n return;\n }\n\n stagePeer.setSize(pWidth, pHeight);\n scenePeer.setSize(pWidth, pHeight);\n }", "@objid (\"1b87bc2e-5e33-11e2-b81d-002564c97630\")\n private Point getViewAreaSize() {\n final Point controlSize = new Point(0, 0);\n // this has to be done in the display thread to avoid\n // InvalidThreadAccessException.\n getViewer().getControl().getDisplay().syncExec(new Runnable() {\n @Override\n public void run() {\n final Control control = BackgroundEditPart.this.getViewer().getControl();\n Point p = control.getSize();\n controlSize.x = p.x;\n controlSize.y = p.y;\n \n if (control instanceof Scrollable) {\n Scrollable c = (Scrollable) control;\n ScrollBar b = c.getHorizontalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.y -= b.getSize().y;\n }\n b = c.getVerticalBar();\n if (b != null /* && b.isVisible() */) {\n controlSize.x -= b.getSize().x;\n }\n }\n }\n });\n return controlSize;\n }", "public void updateBoundaries() {\n\t\t\n\t\tLOG.log(\"Updating boundaries.\");\n\t\t\n\t\tif (Program.WINDOW_MANAGER != null) {\n\t\t\t\n\t\t\tthis.setBounds(\n\t\t\t\tProgram.WINDOW_MANAGER.getScreenWidth() / 2 - this.getSize().width / 2,\n\t\t\t\tProgram.WINDOW_MANAGER.getScreenHeight() / 2 - this.getSize().height / 2,\n\t\t\t\tBOUNDS_LENGTH,\n\t\t\t\tBOUNDS_WIDTH\n\t\t\t);\n\t\t\tthis.setLocationRelativeTo(null);\n\t\t\t\n\t\t} else {\n\t\t\tthis.setBounds(10, 10, BOUNDS_LENGTH, BOUNDS_WIDTH);\n\t\t}\n\t}", "private void transformObject(int x, int y) {\n double sx, sy, l, r, nx, ny, tx, ty, alpha, origCX = 0, origCY = 0;\n Rectangle bnds;\n\n if(curr_obj == transformPointers[Action.ROTATE]) {\n /* the mouse vector 1 */\n GeoVector mouseVector = new GeoVector(x, y, this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n\n /* the rotation vector. i.e. the fixed vector that will be used as origin composed by the subtraction of the object center with the rotation point */\n GeoVector rotationVector = new GeoVector(this.lastPosition[0], this.lastPosition[1], this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n\n mouseVector.normalize();\n rotationVector.normalize();\n\n alpha = mouseVector.getAngleWith(rotationVector.getX(), rotationVector.getY());\n\n /** After passing the 180 degrees, the atan2 function returns a negative angle from 0 to PI. So this will convert the final gobal angle to 0-2PI */\n if(alpha < 0 ) {\n alpha = (2 * Math.PI) + alpha; \n }\n\n alpha -= this.currRotation;\n this.currRotation += alpha;\n\n Point c = new Point(this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n this.aux_obj.uRotate((float)(-1.0*(alpha*(180/Math.PI))), c);\n \n } else {\n alpha = this.aux_obj.getRotation();\n\n /** Here we rotate the selected Graphic Object, it's tranformation points and the mouse coordinates back to the zero angle, to permit a correct object scalling. */\n if(alpha != 0.0) {\n origCX = this.aux_obj.getCenterX();\n origCY = this.aux_obj.getCenterY();\n this.aux_obj.uRotate((float)(alpha*-1.0), this.aux_obj.getCenter());\n rotateTransformPoints(alpha);\n GeoVector mouseCoord = new GeoVector(x, y, this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n\n mouseCoord.rotate( ((alpha*-1.0) * (2.0*Math.PI))/360 );\n mouseCoord.addPoint(this.aux_obj.getCenterX(), this.aux_obj.getCenterY());\n x = (int)mouseCoord.getX();\n y = (int)mouseCoord.getY();\n\n }\n\n /** Tatami rotates the object from it's x and y point to the edges. So this means that sometimes we need to translate the object a few pixels to asure that it's upper left corner is on the same position. */\n if(curr_obj == transformPointers[Action.NORTHWEST]) {\n if(x < (transformPointers[Action.EAST].getX()-2) && y < (transformPointers[Action.SOUTH].getY()-2)) {\n l = aux_obj.getX() - (transformPointers[Action.WEST].getX()+2);\n r = (transformPointers[Action.EAST].getX()+2) - aux_obj.getX();\n nx = (transformPointers[Action.EAST].getX()+2) - x ;\n sx = nx / (l+r);\n tx = (sx*l-l) + (sx*r-r);\n\n l = aux_obj.getY() - (transformPointers[Action.NORTH].getY()+2);\n r = (transformPointers[Action.SOUTH].getY()+2) - aux_obj.getY();\n ny = (transformPointers[Action.SOUTH].getY()+2) - y;\n sy = ny / (l+r);\n ty = (sy*l-l) + (sy*r-r);\n\n aux_obj.uTranslate((int)-tx, (int)-ty);\n aux_obj.scale( (float)sx, (float)sy);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.NORTHWEST];\n }\n } else if(curr_obj == transformPointers[Action.NORTH]) {\n if(y < (transformPointers[Action.SOUTH].getY()-2)) {\n l = aux_obj.getY() - (transformPointers[Action.NORTH].getY()+2);\n r = (transformPointers[Action.SOUTH].getY()+2) - aux_obj.getY();\n ny = (transformPointers[Action.SOUTH].getY()+2) - y;\n sy = ny / (l+r);\n ty = (sy*l-l) + (sy*r-r);\n\n aux_obj.uTranslate(0, (int)-ty);\n aux_obj.scale( 1, (float)sy);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.NORTH];\n }\n } else if(curr_obj == transformPointers[Action.NORTHEAST]) {\n if(x > (transformPointers[Action.WEST].getX()+2) && y < (transformPointers[Action.SOUTH].getY()-2)) {\n l = aux_obj.getX() - (transformPointers[Action.WEST].getX()+2);\n r = (transformPointers[Action.EAST].getX()+2) - aux_obj.getX();\n nx = x - (transformPointers[Action.WEST].getX()+2);\n sx = nx / (l+r);\n tx = sx*l-l;\n\n l = aux_obj.getY() - (transformPointers[Action.NORTH].getY()+2);\n r = (transformPointers[Action.SOUTH].getY()+2) - aux_obj.getY();\n ny = (transformPointers[Action.SOUTH].getY()+2) - y;\n sy = ny / (l+r);\n ty = (sy*l-l) + (sy*r-r);\n\n aux_obj.uTranslate((int)tx, (int)-ty);\n aux_obj.scale( (float)sx, (float)sy);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.NORTHEAST];\n }\n\n } else if(curr_obj == transformPointers[Action.WEST]) {\n if(x < (transformPointers[Action.EAST].getX()-2) ) {\n l = aux_obj.getX() - (transformPointers[Action.WEST].getX()+2);\n r = (transformPointers[Action.EAST].getX()+2) - aux_obj.getX();\n nx = (transformPointers[Action.EAST].getX()+2) - x ;\n sx = nx / (l+r);\n tx = (sx*l-l) + (sx*r-r);\n\n aux_obj.uTranslate((int)-tx, 0);\n aux_obj.scale( (float)sx, 1);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.WEST];\n }\n } else if(curr_obj == transformPointers[Action.EAST]) {\n if(x > (transformPointers[Action.WEST].getX()+2) ) {\n l = aux_obj.getX() - (transformPointers[Action.WEST].getX()+2);\n r = (transformPointers[Action.EAST].getX()+2) - aux_obj.getX();\n nx = x - (transformPointers[Action.WEST].getX()+2);\n sx = nx / (l+r);\n tx = sx*l-l;\n\n aux_obj.uTranslate((int)tx, 0);\n aux_obj.scale( (float)sx, (float)1);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.EAST];\n }\n } else if(curr_obj == transformPointers[Action.SOUTHWEST]) {\n if(x < (transformPointers[Action.EAST].getX()-2) && y > (transformPointers[Action.NORTH].getY()+2)) {\n l = aux_obj.getX() - (transformPointers[Action.WEST].getX()+2);\n r = (transformPointers[Action.EAST].getX()+2) - aux_obj.getX();\n nx = (transformPointers[Action.EAST].getX()+2) - x ;\n sx = nx / (l+r);\n tx = (sx*l-l) + (sx*r-r);\n\n l = aux_obj.getY() - (transformPointers[Action.NORTH].getY()+2);\n r = (transformPointers[Action.SOUTH].getY()+2) - aux_obj.getY();\n ny = y - (transformPointers[Action.NORTH].getY()+2);\n sy = ny / (l+r);\n ty = sy*l-l;\n\n aux_obj.uTranslate((int)-tx, (int)ty);\n aux_obj.scale( (float)sx, (float)sy);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.SOUTHWEST];\n }\n } else if(curr_obj == transformPointers[Action.SOUTH]) {\n if(y > (transformPointers[Action.NORTH].getY()+2)) {\n l = aux_obj.getY() - (transformPointers[Action.NORTH].getY()+2);\n r = (transformPointers[Action.SOUTH].getY()+2) - aux_obj.getY();\n ny = y - (transformPointers[Action.NORTH].getY()+2);\n sy = ny / (l+r);\n ty = sy*l-l;\n\n aux_obj.uTranslate(0, (int)ty);\n aux_obj.scale( 1, (float)sy);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.SOUTH];\n }\n } else if(curr_obj == transformPointers[Action.SOUTHEAST]) {\n if(x > (transformPointers[Action.WEST].getX()+2) && y > (transformPointers[Action.NORTH].getY()+2)) {\n\n l = aux_obj.getX() - (transformPointers[Action.WEST].getX()+2);\n r = (transformPointers[Action.EAST].getX()+2) - aux_obj.getX();\n nx = x - (transformPointers[Action.WEST].getX()+2);\n sx = nx / (l+r);\n tx = sx*l-l;\n\n l = aux_obj.getY() - (transformPointers[Action.NORTH].getY()+2);\n r = (transformPointers[Action.SOUTH].getY()+2) - aux_obj.getY();\n ny = y - (transformPointers[Action.NORTH].getY()+2);\n sy = ny / (l+r);\n ty = sy*l-l;\n\n aux_obj.uTranslate((int)tx, (int)ty);\n aux_obj.scale( (float)sx, (float)sy);\n\n if(alpha != 0.0) {\n this.aux_obj.uTranslate((int)(origCX - this.aux_obj.getCenterX()), (int)(origCY - this.aux_obj.getCenterY()));\n this.aux_obj.rotate((float)alpha);\n }\n\n canvas.remove(transformPoints);\n transformPoints.clear();\n bnds = aux_obj.getBounds();\n createTransformPoints(bnds, aux_obj);\n curr_obj = transformPointers[Action.SOUTHEAST];\n }\n }\n\n\n }\n \n }", "private void updateBoundingBox()\n\t{\n\t\tif (this.facingDirection != null)\n\t\t{\n\t\t\tdouble d0 = (double) this.hangingPosition.getX() + 0.5D;\n\t\t\tdouble d1 = (double) this.hangingPosition.getY() + 0.5D;\n\t\t\tdouble d2 = (double) this.hangingPosition.getZ() + 0.5D;\n\t\t\tdouble d3 = 0.46875D;\n\t\t\tdouble d4 = this.someFunc(this.getWidthPixels());\n\t\t\tdouble d5 = this.someFunc(this.getHeightPixels());\n\t\t\td0 = d0 - (double) this.facingDirection.getFrontOffsetX() * 0.46875D;\n\t\t\td2 = d2 - (double) this.facingDirection.getFrontOffsetZ() * 0.46875D;\n\t\t\td1 = d1 + d5;\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\t\t\td0 = d0 + d4 * (double) enumfacing.getFrontOffsetX();\n\t\t\td2 = d2 + d4 * (double) enumfacing.getFrontOffsetZ();\n\t\t\tthis.posX = d0;\n\t\t\tthis.posY = d1;\n\t\t\tthis.posZ = d2;\n\t\t\tdouble d6 = (double) this.getWidthPixels();\n\t\t\tdouble d7 = (double) this.getHeightPixels();\n\t\t\tdouble d8 = (double) this.getWidthPixels();\n\n\t\t\tif (this.facingDirection.getAxis() == EnumFacing.Axis.Z)\n\t\t\t{\n\t\t\t\td8 = 1.0D;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\td6 = 1.0D;\n\t\t\t}\n\n\t\t\t// ???\n\n\t\t\td6 = d6 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td7 = d7 / (this.getHeightPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td8 = d8 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\tthis.setEntityBoundingBox(new AxisAlignedBB(d0 - d6, d1 - d7, d2 - d8, d0 + d6, d1 + d7, d2 + d8));\n\t\t}\n\t}", "public void centreModel(){\n\t\tcentreModel(modOffset);\n\t}", "public void normalizeCoordinates2D(Agent agent)\n {\n if (agent.x() < 0.5)\n {\n agent.getKinematic().setX(this.getWidth() - 0.5);\n }\n else if (agent.x() > this.getWidth() - 0.5)\n {\n agent.getKinematic().setX(0.5);\n }\n\n if (agent.y() < 0.5)\n {\n agent.getKinematic().setY(this.getHeight() - 0.5);\n }\n else if (agent.y() > this.getHeight() - 0.5)\n {\n agent.getKinematic().setY(0.5);\n }\n }", "public void resize() {\n\t\tsp.doLayout();\n\t}", "private void updateDimensions() {\r\n width = gui.getWidth();\r\n height = gui.getHeight();\r\n yLabelsMargin = (int) gui.getLabelWidth(Integer.toString(((int) maximumDB / 10) * 10), true) + 2;\r\n if (track != null)\r\n scaleXpx = ((float) width - yLabelsMargin) / track.getBufferCapacity();\r\n else\r\n scaleXpx = 1;\r\n scaleYpx = (float) ((height - 1) / (maximumDB - minimumDB));\r\n if (scaleYpx == 0)\r\n scaleYpx = 1;\r\n }", "private void geometry()\n\t\t{\n\t\tgridLayout = new GridLayout(2, -1);\n\n\t\tthis.setLayout(gridLayout);\n\n\t\tadd(component1);\n\t\tadd(component2);\n\t\t}", "public void onUpdate()\n\t{\n\t\tchunk.setModelBound(new BoundingBox());\n\t\tchunk.updateModelBound();\n\n\t}", "@Override\r\n public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n GL2 gl = drawable.getGL().getGL2();\r\n\r\n //evita a divisão por zero\r\n if (height == 0) {\r\n height = 1;\r\n }\r\n //calcula a proporção da janela (aspect ratio) da nova janela\r\n float aspect = (float) width / height;\r\n\r\n //seta o viewport para abranger a janela inteira\r\n gl.glViewport(0, 0, width, height);\r\n\r\n //ativa a matriz de projeção\r\n gl.glMatrixMode(GL2.GL_PROJECTION);\r\n gl.glLoadIdentity(); //lê a matriz identidade\r\n\r\n //Projeção ortogonal\r\n //true: aspect >= 1 configura a altura de -1 para 1 : com largura maior\r\n //false: aspect < 1 configura a largura de -1 para 1 : com altura maior\r\n if (width >= height) {\r\n gl.glOrtho(xMin * aspect, xMax * aspect, yMin, yMax, zMin, zMax);\r\n } else {\r\n gl.glOrtho(xMin, xMax, yMin / aspect, yMax / aspect, zMin, zMax);\r\n }\r\n\r\n //ativa a matriz de modelagem\r\n gl.glMatrixMode(GL2.GL_MODELVIEW);\r\n gl.glLoadIdentity(); //lê a matriz identidade\r\n System.out.println(\"Reshape: \" + width + \", \" + height);\r\n }", "public void setMovingBounds() {\r\n maxY = this.getParent().getYmax();\r\n minY = this.getParent().getYmin();\r\n maxX = this.getParent().getXmax();\r\n minX = this.getParent().getXmin();\r\n }", "public void adjustSize() {\r\n /*\r\n * Calculate target width: max of header, adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetWidth = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(headerBar.getOffsetWidth(),\r\n contentWidget.getOffsetWidth(), getWidth()\r\n - TOTAL_BORDER_THICKNESS);\r\n /*\r\n * Calculate target height: max of adjusted window, content\r\n * \r\n * TODO: restrict to available desktop space\r\n */\r\n int targetHeight = TOTAL_BORDER_THICKNESS\r\n + MathUtils.maxInt(contentWidget.getOffsetHeight(), getHeight()\r\n - TOTAL_BORDER_THICKNESS - headerBar.getOffsetHeight());\r\n\r\n setPixelSize(targetWidth, targetHeight);\r\n }", "public abstract Transformation updateTransform(Rectangle selectionBox);", "public void onSizeChanged(int w, int h, int oldw, int oldh) {\r\n super.onSizeChanged(w, h, oldw, oldh);\r\n returnDefualt();\r\n this.startWidth = (float)getWidth()/4;\r\n this.endWidth = (float)getWidth()-((float)getWidth()/4);\r\n this.startHeight = (float)getHeight()/12;\r\n this.endHeight = getHeight()-((float)getHeight()/12);\r\n this.oval = new RectF(this.startWidth,this.startHeight , this.endWidth, this.endHeight);\r\n }", "@Override\n protected void buildWorldRepresentation() {\n java.util.List<BasicModelEntity> worldModelEntityList = spaceExplorerModel.getWorldEntityList();\n java.util.List<CSysEntity> viewWorldEntityList = new ArrayList();\n for (int i = 0; i < worldModelEntityList.size(); i++) {\n\n BasicModelEntity basicModelEntity = worldModelEntityList.get(i);\n\n CSysEntity cSysEntity = null;\n if (basicModelEntity instanceof ModelLineEntity) {\n cSysEntity = new SeCSysLineEntity(this, (ModelLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(cSysLineEntity);\n } else if (basicModelEntity instanceof ModelPolyLineEntity) {\n cSysEntity = new SeCSysViewPolyLineEntity(this, (ModelPolyLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(seCSysViewPolylineEntity);\n }\n viewWorldEntityList.add(cSysEntity);\n }\n\n createAxis(viewWorldEntityList);\n viewWorldEntityArray = viewWorldEntityList.toArray(new BasicCSysEntity[viewWorldEntityList.size()]);\n updateCSysEntList(combinedRotatingMatrix);\n }", "private void centre() {\n Dimension localDimension = Toolkit.getDefaultToolkit().getScreenSize();\n int i2 = (int) Math.min(localDimension.width * WIDTH, localDimension.height * WIDTH);\n\n Rectangle localRectangle = new Rectangle();\n localRectangle.setBounds(((localDimension.width - i2) / TWO), \n ((localDimension.height - i2) / TWO), i2, i2);\n\n setBounds(localRectangle);\n\n }", "void resetRoundHitbox() {\n setRoundHitbox((_w+_h)/4);\n }", "@Override\n public void resize()\n {\n if (this.resizer != null)\n {\n this.resizer.apply(this.area);\n }\n\n if (this.children != null)\n {\n this.children.resize();\n }\n\n if (this.resizer != null)\n {\n this.resizer.postApply(this.area);\n }\n }", "public void updateBounds() {\n\t\tswitch (this.species){\n\t\tcase HOGCHOKER:\n\t\tcase SILVERSIDE:\n\t\tcase FLOUNDER:\n\t\t\tthis.topYBound = frameHeight / 3 * 2;\n\t\t\tthis.bottomYBound = frameHeight - imageHeight - frameBarSize;\n\t\t\tbreak;\n\t\tcase PERCH: \n\t\tcase MINNOW: \n\t\tcase WEAKFISH:\n\t\t\tthis.topYBound = frameHeight / 3;\n\t\t\tthis.bottomYBound = frameHeight / 3 * 2 - imageHeight;\n\t\t\tbreak;\n\n\t\tcase MENHADEN:\n\t\tcase MUMMICHOG:\n\t\t\tthis.topYBound = 0;\n\t\t\tthis.bottomYBound = frameHeight / 3 - imageHeight;\n\t\t\tbreak;\n\t\tcase GOLD:\n\t\tdefault:\n\t\t\ttopYBound = 0;\n\t\t\tbottomYBound = frameHeight;\n\t\t}\n\t}", "@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}", "private void setDimensions() {\n IPhysicalVolume physVol_parent = getModule().getGeometry().getPhysicalVolume();\n ILogicalVolume logVol_parent = physVol_parent.getLogicalVolume();\n ISolid solid_parent = logVol_parent.getSolid();\n Box box_parent;\n if (Box.class.isInstance(solid_parent)) {\n box_parent = (Box) solid_parent;\n } else {\n throw new RuntimeException(\"Couldn't cast the module volume to a box!?\");\n }\n _length = box_parent.getXHalfLength() * 2.0;\n _width = box_parent.getYHalfLength() * 2.0;\n\n }", "private void setGeometry() {\n this.setCullHint(Spatial.CullHint.Dynamic);\n this.setLocalTranslation(realPosition);\n //attach geometry to this object\n // mat.setColor(\"Color\", colors[r.nextInt(colors.length)]);\n if (!companyTextures.containsKey(this.company)) {\n mat.setTexture(\"ColorMap\", Colors.get(r.nextInt(Colors.size())));\n } else {\n mat.setTexture(\"ColorMap\", companyTextures.get(this.company));\n }\n geom.setMaterial(mat);\n this.attachChild(geom.clone());\n }", "protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }", "public Rectangle getPlotBounds();", "@Override\n\tpublic void renderGeometry(SvgRenderContext state) {\n\t\t\n\t}", "public void componentResized(ComponentEvent event) {\n // first, size the lights and corners\n double width = (double)getWidth() / ((double)maxHorizontalLights + 2); //< +2 for the corners!\n double height = (double)getHeight() / ((double)maxVerticalLights + 2); //< +2 for the corners!\n Dimension lightDimension = new Dimension((int)Math.round(width), (int)Math.round(height));\n \n // now set the locations and sizes of each light\n // top border location\n double x = width;\n double y = 0;\n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).setPosition(x, y);\n topBorder.get(i).setPreferredSize(lightDimension);\n topBorder.get(i).setSize(lightDimension);\n x += width;\n }\n \n // bottom border locations\n x = width;\n y = getHeight() - height;\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).setPosition(x, y);\n bottomBorder.get(i).setPreferredSize(lightDimension);\n bottomBorder.get(i).setSize(lightDimension);\n x += width;\n }\n bottomRight.setPosition(x, y);\n \n // left border locations\n x = 0;\n y = height;\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).setPosition(x, y);\n leftBorder.get(i).setPreferredSize(lightDimension);\n leftBorder.get(i).setSize(lightDimension);\n y += height;\n }\n \n // right border\n x = getWidth() - width;\n y = height;\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).setPosition(x, y);\n rightBorder.get(i).setPreferredSize(lightDimension);\n rightBorder.get(i).setSize(lightDimension);\n y += height;\n }\n \n // set the size and locations of the corners\n x = 0;\n y = 0;\n topLeft.setPosition(x, y);\n topLeft.setPreferredSize(lightDimension);\n topLeft.setSize(lightDimension);\n x = getWidth() - width;\n y = 0;\n topRight.setPosition(x, y);\n topRight.setPreferredSize(lightDimension);\n topRight.setSize(lightDimension);\n x = 0;\n y = getHeight() - height;\n bottomLeft.setPosition(x, y);\n bottomLeft.setPreferredSize(lightDimension);\n bottomLeft.setSize(lightDimension);\n x = getWidth() - width;\n y = getHeight() - height;\n bottomRight.setPosition(x, y);\n bottomRight.setPreferredSize(lightDimension);\n bottomRight.setSize(lightDimension);\n \n // set the location and size of the tumbler display\n width = getWidth() - (2 * width);\n height = getHeight() - (2 * height);\n Dimension tumblerDisplayDimension = new Dimension((int)Math.round(width), (int)Math.round(height));\n tumblerDisplay.setPreferredSize(tumblerDisplayDimension);\n tumblerDisplay.setSize(tumblerDisplayDimension);\n tumblerDisplay.setLocation(topLeft.getWidth(), topLeft.getHeight());\n }", "protected void layoutImpl()\n {\n // Set chart area height first, since height can effect yaxis label width\n double pw = getWidth(), ph = getHeight();\n double ah = _xaxis.isVisible()? _xaxis.getPrefHeight() : 0;\n _chartArea.setHeight(ph - ah);\n \n // Now set bounds of areay, xaxis and yaxis\n double aw = _yaxis.isVisible()? _yaxis.getPrefWidth(ph - ah) : 0;\n double cw = pw - aw, ch = ph - ah;\n _chartArea.setBounds(aw,0,cw,ch);\n _xaxis.setBounds(aw,ch,cw,ah);\n _yaxis.setBounds(0,0,aw,ch);\n }", "private void destroyBounds() {\n size -= 4;\n this.setBounds(bounds.left, bounds.top);\n if (size <= 0) models.remove(this);\n }", "@Override\n public void onSizeChanged(int w, int h, int oldW, int oldH) {\n // Set the movement bounds for the ball\n displayArea.setDisp(w-1, h-1);\n if (!isInitBackground) {\n isInitBackground = true;\n backgCalculating = new BackCalculating(0, 0, displayArea.xMax, displayArea.yMax, Color.BLACK, Color.YELLOW);\n }\n }", "@Override\n public void componentResized(ComponentEvent arg0) {\n width = jframe.getSize().getWidth();\n height = jframe.getSize().getHeight();\n baseBallCard.setLocation(0, (int) height - 175);\n gearbutton.setLocation((int) width - 79, (int) height - 99);\n settingspanel.setSize(new Dimension((int) (.6 * width), (int) (.6 * height)));\n settingspanel.setLocation((int) (.2 * width), (int) (.15 * height));\n int sx = (int) (.6 * width);\n int sy = (int) (.6 * height);\n storyPanel.setSize(new Dimension((int) (.6 * width), (int) (.6 * height)));\n storyPanel.setLocation((int) (.2 * width), (int) (.15 * height));\n storyPanel.setBackground(new Color(.8f, .8f, 1f, .75f));\n story.setSize(new Dimension(storyPanel.getWidth()-50, storyPanel.getHeight()-50));\n story.setBackground(new Color(.8f, .8f, 1f, .75f));\n story.setLocation(25,25);\n sphereSize.setSize((int) (.3 * sx), 20);\n bgColor.setSize((int) (.3 * sx), 20);\n sphereSize.setLocation((int) (.1 * sx), (int) (.25 * sy));\n bgColor.setLocation((int) (.1 * sx), (int) (.35 * sy));\n bgtext.setLocation((int) (.5 * sx), (int) (.35 * sy));\n sphsi.setLocation((int) (.5 * sx), (int) (.25 * sy));\n showall.setLocation((int) (.5 * sx), (int) (.8 * sy));\n points.setLocation((int) (.175 * sx), (int) (.7 * sy));\n debug.setLocation((int) (.175 * sx), (int) (.8 * sy));\n wireframe.setLocation((int) (.175 * sx), (int) (.9 * sy));\n close.setLocation(sx - 30, sy - (sy - 10));\n aboutpanel.setSize(new Dimension(461, 347));\n aboutpanel.setLocation((int) (.3 * width), (int) (.3 * height));\n aboutpanel.add(aboutclose);\n aboutclose.setLocation(440, 10);\n resetrestrictions.setLocation((int) (.025 * sx), 25);\n glcanvas.requestFocusInWindow();\n }", "@Override\r\n\t\tpublic void update(Rectangle2D r) {\r\n\t\t\t\r\n\t\t\tmakeDirty(r, false);\r\n\t\t\tif (_clipping != null) \r\n\t\t\t\trepaint(_clipping.getTransform().createTransformedShape(r).getBounds());\r\n\t\t}", "public RMRect getFrame() { return isRSS()? convertRectToShape(getBoundsInside(), _parent) : getBounds(); }", "private void expandDirtyRect(float historicalX, float historicalY) {\n if (historicalX < mDirtyRect.left) {\n mDirtyRect.left = historicalX;\n } else if (historicalX > mDirtyRect.right) {\n mDirtyRect.right = historicalX;\n }\n if (historicalY < mDirtyRect.top) {\n mDirtyRect.top = historicalY;\n } else if (historicalY > mDirtyRect.bottom) {\n mDirtyRect.bottom = historicalY;\n }\n }", "public void computeSRectangleBound()\n {\n this.savedSRectangleBound = getSRectangleBound();\n }", "private void updateBoundary() {\n //pos = _newPos ;\n heading = myRoute.getCurrentHeading() ;\n //System.out.println(\"heading=\"+heading);\n Point vertex = new Point(0,0) ;\n vertex.x = length/2 ;\n vertex.y = width/2 ;\n boundary[0] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = width/2 ;\n boundary[1] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = -width/2 ;\n boundary[2] = transform(vertex) ;\n \n vertex.x = length/2 ;\n vertex.y = -width/2 ;\n boundary[3] = transform(vertex) ;\n for (int i=0; i<4; i++) {\n xpoints[i] = boundary[i].x ;\n ypoints[i] = boundary[i].y ;\n }\n }", "private void recalculatePosition()\n {\n position.x = gridCoordinate.getCol()*(width+horizontal_spacing);\n position.y = gridCoordinate.getRow()*(heigh+vertical_spacing);\n }", "public void setGraphicalWidgetBounds(double tempOriginX,\n double tempOriginY,\n double tempWidth,\n double tempHeight,\n GraphicalWidget<?> gw)\n {\n frameUI.setGraphicalWidgetBounds(tempOriginX,\n tempOriginY,\n tempWidth,\n tempHeight,\n gw);\n }", "private void panelMouseReleased(java.awt.event.MouseEvent evt)\n throws Exception {\n\n /*This is the release point*/\n Point releasePoint = null;\n\n /*Check if something was selected and if the mouse was dragged*/\n if ((selectedShape != null)&& (mouseIsDragged)) {\n \n /*Get the current release Point*/\n releasePoint = evt.getPoint();\n\n /*Check if Shapes are within boundaries*/\n if (this.selectedShape instanceof ShapeConcept) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeConcept) selectedShape).getBounds());\n }//end ShapeConcept\n else if (this.selectedShape instanceof ShapeLinking) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeLinking) selectedShape).getBounds());\n }//end LinkingPhraze\n else if (this.selectedShape instanceof ShapeComment) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeComment) selectedShape).getBounds());\n }//end ShapeComment\n else if (this.selectedShape instanceof ShapeURL) {\n\n /*Check if the ShapeConcept is inside the canvas area*/\n offScreenShapeResize( ((ShapeURL) selectedShape).getBounds());\n }//end ShapeURL\n }//end if\n\n /**When mouse is released, finish dragging just reset values**/\n releasePoint = null;\n mouseIsDragged = false;\n //selectedShape = null;\n repaint();\n}" ]
[ "0.61038756", "0.5853969", "0.56565", "0.56296396", "0.54492897", "0.54189163", "0.5397656", "0.53879243", "0.5357473", "0.53415453", "0.53393626", "0.5327451", "0.53194404", "0.53066796", "0.52869606", "0.5266498", "0.5236394", "0.5231254", "0.5230797", "0.5214075", "0.52020305", "0.5189365", "0.5186487", "0.51777434", "0.5161228", "0.5160669", "0.5142432", "0.51148194", "0.5112278", "0.51108456", "0.5106249", "0.5098918", "0.50944036", "0.5076104", "0.5076104", "0.50573677", "0.5052604", "0.5047581", "0.502895", "0.5004526", "0.5002307", "0.5001043", "0.49984282", "0.4983798", "0.49803928", "0.49613196", "0.49598837", "0.49537396", "0.4950039", "0.49398547", "0.49380648", "0.49368146", "0.49310163", "0.49281386", "0.49246138", "0.49235088", "0.49218485", "0.49183768", "0.4916848", "0.49139997", "0.49113685", "0.49086076", "0.49001858", "0.48990306", "0.48863947", "0.48690322", "0.48667634", "0.48633122", "0.48625728", "0.48568764", "0.48491815", "0.4846777", "0.48426434", "0.48393714", "0.48346397", "0.4833387", "0.482215", "0.48167822", "0.48165205", "0.48141098", "0.48137861", "0.48065546", "0.4804021", "0.47919434", "0.47899556", "0.478826", "0.47851866", "0.47821203", "0.47770977", "0.47635442", "0.4762751", "0.47612417", "0.47603726", "0.4759991", "0.47598508", "0.4755794", "0.47540924", "0.47486988", "0.47476777", "0.47367367", "0.473037" ]
0.0
-1
Returns a list of the vertices for the mesh's arbitrarily orientated bounding box (AOBB)
public Vector[] getBoxVerts() { return boxVerts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String bboxVertices(){\n \treturn \"0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5\";\n }", "private void calcBoxVerts() {\n\t\tif (verts != null) {\n\t\t\tdouble minX = verts[0].getElement(0);\n\t\t\tdouble maxX = minX;\n\t\t\tdouble minY = verts[0].getElement(1);\n\t\t\tdouble maxY = minY;\n\t\t\tdouble minZ = verts[0].getElement(2);\n\t\t\tdouble maxZ = minZ;\n\t\t\tfor (int i = 1; i < verts.length; i++) {\n\t\t\t\tif (verts[i].getElement(0) < minX) {\n\t\t\t\t\tminX = verts[i].getElement(0);\n\t\t\t\t} else if (verts[i].getElement(0) > maxX) {\n\t\t\t\t\tmaxX = verts[i].getElement(0);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(1) < minY) {\n\t\t\t\t\tminY = verts[i].getElement(1);\n\t\t\t\t} else if (verts[i].getElement(1) > maxY) {\n\t\t\t\t\tmaxY = verts[i].getElement(1);\n\t\t\t\t}\n\t\t\t\tif (verts[i].getElement(2) < minZ) {\n\t\t\t\t\tminZ = verts[i].getElement(2);\n\t\t\t\t} else if (verts[i].getElement(2) > maxZ) {\n\t\t\t\t\tmaxZ = verts[i].getElement(2);\n\t\t\t\t}\n\t\t\t}\n\t\t\tVector[] boxVerts = new Vector[8];\n\t\t\tboxVerts[0] = new Vector(3);\n\t\t\tboxVerts[0].setElements(new double[] {minX, minY, minZ});\n\t\t\tboxVerts[1] = new Vector(3);\n\t\t\tboxVerts[1].setElements(new double[] {maxX, minY, minZ});\n\t\t\tboxVerts[2] = new Vector(3);\n\t\t\tboxVerts[2].setElements(new double[] {minX, minY, maxZ});\n\t\t\tboxVerts[3] = new Vector(3);\n\t\t\tboxVerts[3].setElements(new double[] {maxX, minY, maxZ});\n\t\t\tboxVerts[4] = new Vector(3);\n\t\t\tboxVerts[4].setElements(new double[] {minX, maxY, minZ});\n\t\t\tboxVerts[5] = new Vector(3);\n\t\t\tboxVerts[5].setElements(new double[] {maxX, maxY, minZ});\n\t\t\tboxVerts[6] = new Vector(3);\n\t\t\tboxVerts[6].setElements(new double[] {minX, maxY, maxZ});\n\t\t\tboxVerts[7] = new Vector(3);\n\t\t\tboxVerts[7].setElements(new double[] {maxX, maxY, maxZ});\n\t\t\tthis.boxVerts = boxVerts;\n\t\t} else {\n\t\t\tthis.boxVerts = null;\n\t\t}\n\t}", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "public ArrayList<Point3D> getVertex(Block bl) {\r\n\t\tArrayList<Point3D> pivot = new ArrayList<Point3D>();\r\n\t\tpivot.add(bl.getpoint_BlockTopLeft());\r\n\t\tpivot.add(bl.getpoint_BlockTopRight());\r\n\t\tpivot.add(bl.getPoint_BlockDownRight());\r\n\t\tpivot.add(bl.getpoint_BlockDownleft());\r\n\t\treturn pivot;\r\n\t}", "public java.util.List<V> getVertices();", "public abstract Vector2[] getVertices();", "DAABBC getAABB ();", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}", "public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }", "List<V> getVertexList();", "int getVertices();", "public Vector3f[] getVertices() {\n return vertices;\n }", "public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}", "public Collection<V> getVertices();", "private void generateBoxGeom()\n {\n // textures all share the same array, so process separately.\n textureBuffer = createBuffer(BOX_TEX_COORDS.length);\n textureBuffer.put(BOX_TEX_COORDS);\n textureBuffer.rewind();\n\n vertexBuffer = new FloatBuffer[6];\n normalBuffer = new FloatBuffer[6];\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i] = createBuffer(12);\n normalBuffer[i] = createBuffer(12);\n }\n\n vertexBuffer[POSITIVE_X].put(RIGHT_BOX_COORDS);\n normalBuffer[POSITIVE_X].put(RIGHT_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_X].put(LEFT_BOX_COORDS);\n normalBuffer[NEGATIVE_X].put(LEFT_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Y].put(TOP_BOX_COORDS);\n normalBuffer[POSITIVE_Y].put(TOP_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Y].put(BOTTOM_BOX_COORDS);\n normalBuffer[NEGATIVE_Y].put(BOTTOM_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Z].put(BACK_BOX_COORDS);\n normalBuffer[POSITIVE_Z].put(BACK_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Z].put(FRONT_BOX_COORDS);\n normalBuffer[NEGATIVE_Z].put(FRONT_BOX_NORMALS);\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i].rewind();\n normalBuffer[i].rewind();\n }\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }", "public Vertex[] getVertices() {\n return arrayOfVertices;\n }", "public List<wVertex> getVertices(){\r\n return vertices;\r\n }", "@Override\r\n\tpublic Vector2f[] getVertices() {\n\t\treturn null;\r\n\t}", "public static float[] getMeshVertices(GVRMesh mesh) {\n GVRVertexBuffer vertexBuffer = mesh.getVertexBuffer();\n FloatBuffer floatBuffer = vertexBuffer.getFloatVec(\"a_position\");\n int count = floatBuffer.remaining();\n float[] vertices = new float[count];\n floatBuffer.get(vertices);\n // For 3.3 this still works\n// float[] vertices = mesh.getVertices(); // Throws UnsupportedOperationException in 4.0\n return vertices;\n }", "godot.wire.Wire.AABB getAabbValue();", "private Coordinate[] generateBoundingBox(final Geometry geometry) {\n if (geometry == null || geometry.getCoordinates() == null || geometry.getCoordinates().length == 0) {\n return new Coordinate[]{new Coordinate(0,0),new Coordinate(0,0)};\n }\n final Coordinate firstPoint = geometry.getCoordinates()[0];\n double minLat = firstPoint.y;\n double minLon = firstPoint.x;\n double maxLat = firstPoint.y;\n double maxLon = firstPoint.x;\n for (final Coordinate coordinate : geometry.getCoordinates()) {\n if (coordinate.x < minLon) {\n minLon = coordinate.x;\n }\n if (coordinate.y < minLat) {\n minLat = coordinate.y;\n }\n if (coordinate.x > maxLon) {\n maxLon = coordinate.x;\n }\n if (coordinate.y > maxLat) {\n maxLat = coordinate.y;\n }\n }\n return new Coordinate[]{\n new Coordinate(minLon, minLat),\n new Coordinate(maxLon, maxLat)\n };\n }", "public Enumeration vertices();", "public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }", "public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}", "godot.wire.Wire.AABBOrBuilder getAabbValueOrBuilder();", "public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }", "public E3DVector3F getVertexPosB(){\r\n return vertices[1].getVertexPos();\r\n }", "public int[] getVertices() {\n long cPtr = RecastJNI.rcContour_verts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfVertices() * 4);\n }", "private E3DTexturedVertex getVertexA(){\r\n\t\treturn vertices[0];\r\n\t}", "public native Point [] getAllocationVertices(Actor ancestor);", "private static native long createEdgeBoxes_0(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma, float kappa);", "public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}", "public ArrayList<Triangle> getOccluderVertexData();", "public int[] getBoxes() { return boxes; }", "protected Envelope[] getBoundingBoxes( Element element, CoordinateSystem defaultCoordinateSystem )\n throws XMLParsingException,\n InvalidParameterValueException {\n\n List<Node> boundingBoxList = XMLTools.getNodes( element, PRE_OWS + \"BoundingBox\", nsContext );\n\n List<Envelope> bboxesList = new ArrayList<Envelope>( boundingBoxList.size() );\n\n for ( int i = 0; i < boundingBoxList.size(); i++ ) {\n bboxesList.add( parseBoundingBox( (Element) boundingBoxList.get( i ), defaultCoordinateSystem ) );\n }\n\n // The ogc_wpvs schema says: wgs84 is mandatory therefore-> not checking parents to use it's\n // bboxes.\n\n // if ( parent != null ) {\n // Envelope[] boundingBoxes = parent.getBoundingBoxes();\n // for ( int i = 0; i < boundingBoxes.length; i++ ) {\n // bboxesList.add( boundingBoxes[i] );\n // }\n // }\n\n Envelope[] boxes = bboxesList.toArray( new Envelope[bboxesList.size()] );\n return boxes;\n }", "public void calculateBoundsAABB() {\n\t\tsuper.minY = 0;\n\t\tradius = 0;\n\t\tmaxY = 0;\n\t\tminX = 999999;\n\t\tmaxX = -999999;\n\t\tmaxZ = -99999;\n\t\tminZ = 99999;\n\t\tfor (int j = 0; j < vertexCount; j++) {\n\t\t\tint x = vertexX[j];\n\t\t\tint y = vertexY[j];\n\t\t\tint z = vertexZ[j];\n\t\t\tif (x < minX) {\n\t\t\t\tminX = x;\n\t\t\t}\n\t\t\tif (x > maxX) {\n\t\t\t\tmaxX = x;\n\t\t\t}\n\t\t\tif (z < minZ) {\n\t\t\t\tminZ = z;\n\t\t\t}\n\t\t\tif (z > maxZ) {\n\t\t\t\tmaxZ = z;\n\t\t\t}\n\t\t\tif (-y > super.minY) {\n\t\t\t\tsuper.minY = -y;\n\t\t\t}\n\t\t\tif (y > maxY) {\n\t\t\t\tmaxY = y;\n\t\t\t}\n\t\t\tint radiusSqr = (x * x) + (z * z);\n\t\t\tif (radiusSqr > radius) {\n\t\t\t\tradius = radiusSqr;\n\t\t\t}\n\t\t}\n\t\tradius = (int) Math.sqrt(radius);\n\t\tminDepth = (int) Math.sqrt((radius * radius) + (super.minY * super.minY));\n\t\tmaxDepth = minDepth + (int) Math.sqrt((radius * radius) + (maxY * maxY));\n\t}", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "public IntPoint[] getVertices() {\n\t\treturn PointArrays.copy(vertices);\n\t}", "public Set<V> getVertices();", "public Set<V> getVertices();", "public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}", "public Vertice[] getSelectedVertices(){\n\t\tVertice selectedVertice;\n\t\tVertice[] vertices = new Vertice[getSelectedModelVerticeCount()];\n\t\tint index = 0;\n\t\tfor(int i = 0; i < getModelVerticesCount(); i++){\n\t\t\tselectedVertice = getModelVertice(i);\n\t\t\tif(selectedVertice.isSelected)\n\t\t\t\tvertices[index++] = selectedVertice;\n\t\t}\n\t\treturn vertices;\n\t}", "public static Mesh[] getObjmesh() {\n return objmesh;\n }", "public Vector2f[] getNormalisedVertexPositions() {\n Vertex3D[] vertices = mesh.getModel().getVertices();\n // Get Array of X and Y offsets for all vertices\n Vector2f[] vertexPositions = new Vector2f[vertices.length];\n for (int i = 0; i < vertices.length; i++) {\n Vector3f vertexPosition = vertices[i].getPosition();\n vertexPositions[i] = new Vector2f(vertexPosition.getX(), vertexPosition.getY());\n }\n\n // Add vertex positions to position in order to get their OpenGl coordinates\n for (int i = 0; i < vertexPositions.length; i++) {\n vertexPositions[i] = Vector2f.add(position, vertexPositions[i]);\n vertexPositions[i] = Vector2f.divide(\n vertexPositions[i],\n new Vector2f(Window.getSpanX(), Window.getSpanY()));\n }\n\n return vertexPositions;\n }", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public boolean isBoxInBox(BBox BBox)\n {\n Vec3 sizeA = extents;\n Vec3 sizeB = BBox.extents;\n// System.out.println(\"sizeA: \" + sizeA);\n// System.out.println(\"mA: \" + m);\n// System.out.println(\"sizeB: \" + sizeB);\n// System.out.println(\"mB: \" + BBox.m);\n Vec3[] rotA, rotB;\n rotA = getInvRot();\n rotB = BBox.getInvRot();\n\n float[][] r = new float[3][3]; // Rotation from B to A\n float[][] ar = new float[3][3]; // absolute values of R matrix, to use with box extents\n float extentA, extentB, separation;\n int i, k;\n\n // Calculate B to A rotation matrix\n for (i = 0; i < 3; i++)\n {\n for (k = 0; k < 3; k++)\n {\n r[i][k] = rotA[i].dot(rotB[k]);\n ar[i][k] = abs(r[i][k]);\n }\n }\n\n // Vector separating the centers of Box B and of Box A\t\n Vec3 vSepWS = BBox.getCenterPoint().subtract(getCenterPoint());\n // Rotated into Box A's coordinates\n Vec3 vSepA = new Vec3(\n vSepWS.dot(rotA[0]),\n vSepWS.dot(rotA[1]),\n vSepWS.dot(rotA[2]));\n\n // Test if any of A's basis vectors separate the box\n for (i = 0; i < 3; i++)\n {\n extentA = sizeA.get(i);\n extentB = sizeB.dot(new Vec3(ar[i][0], ar[i][1], ar[i][2]));\n separation = abs(vSepA.get(i));\n\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n\n // Test if any of B's basis vectors separate the box\n for (k = 0; k < 3; k++)\n {\n extentA = sizeA.dot(new Vec3(ar[0][k], ar[1][k], ar[2][k]));\n extentB = sizeB.get(k);\n separation = abs(vSepA.dot(new Vec3(r[0][k], r[1][k], r[2][k])));\n\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n\n // Now test Cross Products of each basis vector combination ( A[i], B[k] )\n for (i = 0; i < 3; i++)\n {\n for (k = 0; k < 3; k++)\n {\n int i1 = (i + 1) % 3, i2 = (i + 2) % 3;\n int k1 = (k + 1) % 3, k2 = (k + 2) % 3;\n extentA = sizeA.get(i1) * ar[i2][k] + sizeA.get(i2) * ar[i1][k];\n extentB = sizeB.get(k1) * ar[i][k2] + sizeB.get(k2) * ar[i][k1];\n separation = abs(vSepA.get(i2) * r[i1][k] - vSepA.get(i1) * r[i2][k]);\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n }\n\n // No separating axis found, the boxes overlap\t\n return true;\n }", "public int getVertices() {\n return mPolygonShapeSpec.getNumVertex();\n }", "public int[] boxCoords(Vector3d v) {\r\n\t\t/* Check the bounds are valid */\r\n\t\tint x = (int)(v.x/box[0]);\r\n\t\tint y = (int)(v.y/box[1]);\r\n\t\tint z = (int)(v.z/box[2]);\r\n\t\tx = (x >= boxes[0] ? boxes[0]-1 : x);\r\n\t\ty = (y >= boxes[1] ? boxes[1]-1 : y);\r\n\t\tz = (z >= boxes[2] ? boxes[2]-1 : z);\r\n\t\tif (x < 0) x = 0;\r\n\t\tif (y < 0) y = 0;\r\n\t\tif (z < 0) z = 0;\r\n\t\treturn new int[] {x, y, z};\t\r\n\t}", "public Iterable<Vertex> getVertices() {\n return mVertices.values();\n }", "@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}", "public E3DVector3F getVertexPosA(){\r\n return vertices[0].getVertexPos();\r\n }", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public Vertex[] getVertices() {\n return new Vertex[]{v1, v2};\n }", "Set<Vertex> getVertices();", "@Override\r\n public List<INavMeshAtom> getNeighbours(NavMesh mesh) { \r\n List<INavMeshAtom> neighbours = new ArrayList<INavMeshAtom>();\r\n \r\n if(pId > 0) neighbours.add(new NavMeshPolygon(pId));\r\n \r\n for(OffMeshEdge oe : outgoingEdges) {\r\n neighbours.add(oe.getTo());\r\n }\r\n \r\n return neighbours;\r\n }", "@NonNull JavaBoundingBox[] collision();", "public List<Float> getBoundingsOfCell() {\n\n\t\tfloat minXPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxXPoint = Float.NEGATIVE_INFINITY;\n\t\tfloat minYPoint = Float.POSITIVE_INFINITY;\n\t\tfloat maxYPoint = Float.NEGATIVE_INFINITY;\n\n\t\tfor (int i = 0; i < face.edges().size(); i++) {\n\n\t\t\tDCEL_Edge e = (DCEL_Edge) face.edges().get(i);\n\n\t\t\tArc2_Sweep arc = (Arc2_Sweep) e.reference;\n\n\t\t\t// Looking for most left located point of cell\n\t\t\tif (minXPoint > arc.minX().x) {\n\t\t\t\tminXPoint = arc.minX().x;\n\t\t\t}\n\t\t\t// Looking for most right located point of cell\n\t\t\tif (maxXPoint < arc.maxX().x) {\n\t\t\t\tmaxXPoint = arc.maxX().x;\n\t\t\t}\n\t\t\t// Looking for highest located point of cell\n\t\t\tif (minYPoint > arc.minY().y) {\n\t\t\t\tminYPoint = arc.minY().y;\n\t\t\t}\n\t\t\t// Looking for lowest located point of cell\n\t\t\tif (maxYPoint < arc.maxY().y) {\n\t\t\t\tmaxYPoint = arc.maxY().y;\n\t\t\t}\n\n\t\t}\n\n\t\tList<Float> boundings = new ArrayList<Float>();\n\t\tboundings.add(minXPoint);\n\t\tboundings.add(maxXPoint);\n\t\tboundings.add(minYPoint);\n\t\tboundings.add(maxYPoint);\n\t\treturn boundings;\n\n\t}", "public GeographicBoundingBox getBoundingBox()\r\n {\r\n return myBoundingBox;\r\n }", "public double[] getBox() { return box; }", "Rectangle getBoundingBox(Rectangle rect);", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "public Box[][] getBoxes() {\n \treturn boxes;\n }", "public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }", "public Position[] getVertexPosition() {\n Position[] positions = new Position[4];\n positions[0] = position;\n positions[1] = new Position(position.getX(), position.getY()+sizeL);\n positions[2] = new Position(position.getX()+sizeL, position.getY()+sizeL);\n positions[3] = new Position(position.getX()+sizeL, position.getY());\n\n return positions;\n }", "@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }", "PVector[] _getPoints() {\n PVector cen = _getCenter();\n \n PVector[] points = new PVector[_hitbox.length];\n float angle = _rotVector.heading();\n for(int i = 0; i < _hitbox.length; i++) {\n points[i] = new PVector(_hitbox[i].x, _hitbox[i].y);\n points[i].rotate(angle);\n points[i].x += cen.x;\n points[i].y += cen.y;\n }\n return points;\n }", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "public Position[] getBoundary() {\n\t\treturn boundary.clone();\n\t}", "private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}", "public int[] getRawVertices() {\n long cPtr = RecastJNI.rcContour_rverts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfRawVertices() * 4);\n }", "public ByteBuffer getVertexBuffer() {\n \treturn vertBuf;\n }", "@Override\n public VertexCollection getVertexCollection() {\n return this.vertices.copy();\n }", "public BoundingBox3d() {\n reset();\n }", "public AxisAlignedBB getBoundingBox()\r\n {\r\n return null;\r\n }", "public int getVertices() {\n return verticesNumber;\n }", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "Iterator<Vertex<V, E, M>> getVertices() {\n return this.vertices.values().iterator();\n }", "public ArrayList<float []> getObjectPos(){\n ArrayList<float []> o_pos = new ArrayList<>();\n float [] pos = new float [3];\n for (int i = 0; i < field.length; i++){\n pos[0] = field[i].x;\n pos[1] = field[i].y;\n pos[2] = field[i].z;\n o_pos.add(pos);\n }\n return o_pos;\n }", "public List<Vertex> getVertices() {\n\t\treturn AdjacencyMatrixGraph.cloneList(vertexList);\n\t}", "int getNumberOfVertexes();", "private double[] getExtents(){\n return new double[] { -90, -180, 90, 180 };\n }", "public List<Vector3D> getConvexCellsInsidePoints() {\n return convexCellsInsidePoints;\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }", "protected int[] getParticlesByIndexInside( ArrayList<Object> geomObjects,PointXY[] boundingBox ){\r\n\t\t\r\n\t\tArrayList<Integer> pset = new ArrayList<Integer>() ;\r\n\t\tPoint2D testP2D;\r\n\t\tRepulsionFieldParticle particle;\r\n\t\tObject geomObject;\r\n\t\t\r\n\t\tboolean covered;\r\n\t\t\r\n\t\t\r\n\r\n\t\tfor (int i= 0; i<particles.size() ;i++){\r\n\t\t\t\r\n\t\t\tparticle = particles.get(i) ;\r\n\t\t\t\r\n\t\t\t// within bounding box? no? skip the rest , -> next particle by index value\r\n\t\t\tif ((particle.x<boundingBox[0].x-averageDistance*1.1) || (particle.x>boundingBox[1].x+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif ((particle.y<boundingBox[0].y-averageDistance*1.1) || (particle.y>boundingBox[3].y+averageDistance*1.1)){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t \r\n\t\t\t\r\n\t\t\ttestP2D = new Point2D( particle.x, particle.y);\r\n\t\t\t\r\n\t\t\t// test particle across all ellipses\r\n\t\t\tfor (int s=0;s<geomObjects.size();s++){\r\n\t\t\t\t\r\n\t\t\t\tgeomObject = geomObjects.get(s) ;\r\n\t\t\t\t \r\n\t\t\t\tcovered = isInsideGeomObject(geomObject,testP2D);\r\n\t\t\t\t\r\n\t\t\t\tif (covered) {\r\n\t\t\t\t\tif (pset.contains(i)==false){\r\n\t\t\t\t\t\tpset.add(i) ;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// out.print(2, \"+++ particle added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" +++\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// out.print(2, \"--- particle NOT added, index:\"+i+\", location x,y:\" + df.format(particle.x)+\",\" + df.format(particle.y)+\" ---\");\r\n\t\t\t\t}\r\n\t\t\t} // s->\r\n\t\t\t\r\n\t\t} // i->\r\n\t\t\r\n\t\t\r\n\t\tint[] particleIndexes = new int[pset.size()] ;\r\n\t\t\r\n\t\tfor (int i=0;i< pset.size();i++){\r\n\t\t\tparticleIndexes[i] = pset.get(i) ;\r\n\t\t}\r\n\t\treturn particleIndexes;\r\n\t}", "public HashSet<Town> getVertices() {\r\n\t\treturn (HashSet<Town>) vertices;\r\n\t}", "public Vertex [] getSortedVertexArray() {\n\t\tVertex [] array = new Vertex[_vertices.size()];\n\t\tint index = 0;\n\t\tfor (Vertex v : _vertices) {\n\t\t\tarray[index++] = v;\n\t\t}\n\t\t// sort\n\t\tArrays.sort(array);\n\t\treturn array;\n\t}", "private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }", "public OrientedBox getObox() {\n\t\treturn obox;\n\t}", "Iterable<Long> vertices() {\n return nodes.keySet();\n }", "public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}", "@Override\n public Iterable<E> getAllVertices() {\n return dictionary.keySet();\n }", "private void calculateMinMaxPositions() {\n boundingVolume = null;\n if ( minMax == null ) {\n minMax = new double[6];\n\n double minX = Double.MAX_VALUE;\n double minY = Double.MAX_VALUE;\n double minZ = Double.MAX_VALUE;\n double maxX = -Double.MAX_VALUE;\n double maxY = -Double.MAX_VALUE;\n double maxZ = -Double.MAX_VALUE;\n int i;\n\n for ( i = 0; i < getNumVertices(); i++ ) {\n double x = vertexPositions[3*i+0];\n double y = vertexPositions[3*i+1];\n double z = vertexPositions[3*i+2];\n\n if ( x < minX ) minX = x;\n if ( y < minY ) minY = y;\n if ( z < minZ ) minZ = z;\n if ( x > maxX ) maxX = x;\n if ( y > maxY ) maxY = y;\n if ( z > maxZ ) maxZ = z;\n }\n minMax[0] = minX;\n minMax[1] = minY;\n minMax[2] = minZ;\n minMax[3] = maxX;\n minMax[4] = maxY;\n minMax[5] = maxZ;\n }\n }", "@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }", "private void addBlocksVertices() {\n\n for (Block block :game.getBlocks()) {\n Point3D[] points = block.getPoints();\n for (int i = 0; i < points.length; i++) {\n GraphNode blockNode = new GraphNode(points[i]);\n vertices.add(blockNode);\n }\n }\n }", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "@Override\r\n public int size() {\r\n return vertices.size();\r\n }" ]
[ "0.7128893", "0.6682696", "0.66774225", "0.62033165", "0.61741674", "0.6001924", "0.5957094", "0.59271306", "0.59174734", "0.5902069", "0.5880878", "0.5858688", "0.5822355", "0.5774547", "0.57655567", "0.57447094", "0.57215506", "0.56921357", "0.5664265", "0.5650674", "0.5641049", "0.56221294", "0.5606241", "0.56019294", "0.55983025", "0.5567744", "0.55410117", "0.5540918", "0.55377966", "0.54748183", "0.54701155", "0.54694194", "0.54684377", "0.54634875", "0.54259855", "0.5421042", "0.54092515", "0.53705317", "0.53560734", "0.5355675", "0.534662", "0.534662", "0.53444993", "0.5340791", "0.52817273", "0.52610296", "0.5216584", "0.5200055", "0.5199357", "0.5198006", "0.5183617", "0.51805514", "0.517415", "0.51739997", "0.5171398", "0.5165406", "0.51542723", "0.51528656", "0.51286334", "0.51264167", "0.512456", "0.51219267", "0.51084197", "0.5095589", "0.50925785", "0.5078085", "0.50675076", "0.50660205", "0.5063268", "0.50621444", "0.5062144", "0.50598055", "0.5058643", "0.5057629", "0.5057569", "0.5056039", "0.5055375", "0.5051052", "0.50438946", "0.50315136", "0.5024668", "0.50212854", "0.50166184", "0.5015265", "0.5011064", "0.5010325", "0.5004831", "0.5003077", "0.49970198", "0.49853185", "0.49774113", "0.49762547", "0.49695456", "0.49685445", "0.49646625", "0.49628127", "0.49508893", "0.49460533", "0.49425814", "0.49392274" ]
0.6930304
1
Calculates the vertices for the mesh's AOBB
private void calcBoxVerts() { if (verts != null) { double minX = verts[0].getElement(0); double maxX = minX; double minY = verts[0].getElement(1); double maxY = minY; double minZ = verts[0].getElement(2); double maxZ = minZ; for (int i = 1; i < verts.length; i++) { if (verts[i].getElement(0) < minX) { minX = verts[i].getElement(0); } else if (verts[i].getElement(0) > maxX) { maxX = verts[i].getElement(0); } if (verts[i].getElement(1) < minY) { minY = verts[i].getElement(1); } else if (verts[i].getElement(1) > maxY) { maxY = verts[i].getElement(1); } if (verts[i].getElement(2) < minZ) { minZ = verts[i].getElement(2); } else if (verts[i].getElement(2) > maxZ) { maxZ = verts[i].getElement(2); } } Vector[] boxVerts = new Vector[8]; boxVerts[0] = new Vector(3); boxVerts[0].setElements(new double[] {minX, minY, minZ}); boxVerts[1] = new Vector(3); boxVerts[1].setElements(new double[] {maxX, minY, minZ}); boxVerts[2] = new Vector(3); boxVerts[2].setElements(new double[] {minX, minY, maxZ}); boxVerts[3] = new Vector(3); boxVerts[3].setElements(new double[] {maxX, minY, maxZ}); boxVerts[4] = new Vector(3); boxVerts[4].setElements(new double[] {minX, maxY, minZ}); boxVerts[5] = new Vector(3); boxVerts[5].setElements(new double[] {maxX, maxY, minZ}); boxVerts[6] = new Vector(3); boxVerts[6].setElements(new double[] {minX, maxY, maxZ}); boxVerts[7] = new Vector(3); boxVerts[7].setElements(new double[] {maxX, maxY, maxZ}); this.boxVerts = boxVerts; } else { this.boxVerts = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVertices();", "private E3DTexturedVertex getVertexA(){\r\n\t\treturn vertices[0];\r\n\t}", "public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}", "int getNumberOfVertexes();", "public abstract Vector2[] getVertices();", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "public Vector3f[] getVertices() {\n return vertices;\n }", "public ArrayList<Point3D> getVertex(Block bl) {\r\n\t\tArrayList<Point3D> pivot = new ArrayList<Point3D>();\r\n\t\tpivot.add(bl.getpoint_BlockTopLeft());\r\n\t\tpivot.add(bl.getpoint_BlockTopRight());\r\n\t\tpivot.add(bl.getPoint_BlockDownRight());\r\n\t\tpivot.add(bl.getpoint_BlockDownleft());\r\n\t\treturn pivot;\r\n\t}", "public Vertex[] getVertices() {\n return arrayOfVertices;\n }", "@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}", "public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }", "public static float[] getMeshVertices(GVRMesh mesh) {\n GVRVertexBuffer vertexBuffer = mesh.getVertexBuffer();\n FloatBuffer floatBuffer = vertexBuffer.getFloatVec(\"a_position\");\n int count = floatBuffer.remaining();\n float[] vertices = new float[count];\n floatBuffer.get(vertices);\n // For 3.3 this still works\n// float[] vertices = mesh.getVertices(); // Throws UnsupportedOperationException in 4.0\n return vertices;\n }", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "public List<wVertex> getVertices(){\r\n return vertices;\r\n }", "public E3DVector3F getVertexPosB(){\r\n return vertices[1].getVertexPos();\r\n }", "public int numVertices() { return numV; }", "public E3DVector3F getVertexPosA(){\r\n return vertices[0].getVertexPos();\r\n }", "public static String bboxVertices(){\n \treturn \"0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5\";\n }", "public void recalculateVertices() {\n\t\tfinal Image image = this.image.get();\n\t\tvertices[0].setSample(image.getWidth() * 1 / 2,\n\t\t image.getHeight() * 3 / 10,\n\t\t image.getWidth() / 10,\n\t\t image.getHeight() / 10,\n\t\t image.getWidth(), image.getHeight());\n\t\tvertices[1].setSample(image.getWidth() * 3 / 10,\n\t\t image.getHeight() * 7 / 10,\n\t\t image.getWidth() / 10,\n\t\t image.getHeight() / 10,\n\t\t image.getWidth(), image.getHeight());\n\t\tvertices[2].setSample(image.getWidth() * 7 / 10,\n\t\t image.getHeight() * 7 / 10,\n\t\t image.getWidth() / 10,\n\t\t image.getHeight() / 10,\n\t\t image.getWidth(), image.getHeight());\n\t}", "public void setVertexes(Vertex[] vertexes) {\n int n, i;\n\n n = vertexes.length;\n\n initVertexPositionsArray(n);\n initVertexNormalsArray();\n //initVertexBinormalsArray();\n //initVertexTangentsArray();\n\n for ( i = 0; i < n; i++ ) {\n vertexPositions[3*i] = vertexes[i].position.x;\n vertexPositions[3*i+1] = vertexes[i].position.y;\n vertexPositions[3*i+2] = vertexes[i].position.z;\n vertexNormals[3*i] = vertexes[i].normal.x;\n vertexNormals[3*i+1] = vertexes[i].normal.y;\n vertexNormals[3*i+2] = vertexes[i].normal.z;\n //vertexBinormals[3*i] = vertexes[i].binormal.x;\n //vertexBinormals[3*i+1] = vertexes[i].binormal.y;\n //vertexBinormals[3*i+2] = vertexes[i].binormal.z;\n //vertexTangents[3*i] = vertexes[i].tangent.x;\n //vertexTangents[3*i+1] = vertexes[i].tangent.y;\n //vertexTangents[3*i+2] = vertexes[i].tangent.z;\n //vertexUvs[2*i] = vertexes[i].u;\n //vertexUvs[2*i+1] = vertexes[i].v;\n }\n\n boundingVolume = null;\n }", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}", "public ArrayList<Triangle> getOccluderVertexData();", "public int getVertexCount();", "public abstract void updateVertices();", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "List<V> getVertexList();", "public int getVertices() {\n return verticesNumber;\n }", "private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }", "private Mesh createMesh(final int pTrianglesCount) {\n\t\tfinal int pSpeed \t\t\t= 20;\n\t\tfinal int pVertexCount\t \t= Mesh.VERTEX_SIZE * pTrianglesCount * 3; \t\n\t\tfinal float pColor \t\t\t= new Color(0f,0f,0f).getABGRPackedFloat();\n\t\tfinal float pSegmentWidth \t= CAMERA_WIDTH/pTrianglesCount;\n\t\tfinal float[] pBufferData \t= new float[pVertexCount];\t\n\t\t\n\t\tmHeightOffsetCurrent = new float[pVertexCount];\t\t\n\t\t\n\t\t//create triangles \n\t\t// A--B\n\t\t// \\ |\n\t\t// \\|\n\t\t// C\n\t\t//\n\t\tint i = 0;\n\t\tfloat x = 0f;\n\t\tfinal float pInitialHeight = 400;\n\t\tfor (int triangleIndex = 0;triangleIndex<pTrianglesCount;triangleIndex++){\n\t\t\t //first triangle \n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[(i * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = pInitialHeight;\n\t\t\t pBufferData[((i+1) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\n\t\t\t \n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_X] = x+pSegmentWidth;\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = 0;\t\n\t\t\t pBufferData[((i+2) * Mesh.VERTEX_SIZE) + Mesh.COLOR_INDEX] = pColor;\t\n\t\t\t \n\t\t\t i = i+3;\n\t\t\t x = x+pSegmentWidth;\n\t\t }\n\t\t \n\t\tfinal VertexBufferObjectManager VBOM = getVertexBufferObjectManager();\n\t\tfinal HighPerformanceMeshVertexBufferObject pMeshVBO = new HighPerformanceMeshVertexBufferObject(VBOM, pBufferData, pBufferData.length, DrawType.DYNAMIC, true, Mesh.VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT);\n\t\t\n//\t\tpMesh = new Mesh(0, 0,pVertexCount,DrawMode.TRIANGLES,pMeshVBO){\t\t\n//\t\t\t\n//\t\t\tfloat progress_x = 0;\n//\t\t\t\n//\t\t\t@Override\n//\t\t protected void onManagedUpdate(final float pSecondsElapsed) { \n//\t\t\t\tsuper.onManagedUpdate(pSecondsElapsed);\n//\t\t\t\tdrawBySine(pSecondsElapsed);\n//\t\t this.mMeshVertexBufferObject.setDirtyOnHardware(); // include this line\n//\t\t progress_x+=(pSpeed*pSecondsElapsed);\n//\t\t };\n//\t\t\t\n//\t\t\tvoid drawBySine(final float pSecondsElapsed){\n//\t\t\t\tfinal float[] pBuff = pMeshVBO.getBufferData();\n//\t\t\t\tfor (int i = 0;i<((pTrianglesCount)*3);i++){ //FIRST part of triangles \n//\t\t\t\t\tif (i%3==0||i==0||((i-1)%3==0)){\n//\t\t\t\t\t\t//every vertex (v0) of triangle must be connected to previous triangle at second vertex (v1) to prevent stairs\n//\t\t\t\t\t\tif (i%3==0&&i>0){ \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = mHeightOffsetCurrent[i-2];\n//\t\t\t\t\t\t} else { \n//\t\t\t\t\t\t\tmHeightOffsetCurrent[i] = getNormalizedSine(i+progress_x, mTouchY, pTrianglesCount*3);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} \n//\t\t\t\t\tpBuff[(i * Mesh.VERTEX_SIZE) + Mesh.VERTEX_INDEX_Y] = mHeightOffsetCurrent[i];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\t\n//\t\t\tfloat getNormalizedSine(float x, float halfY, float maxX) {\t\n//\t\t\t double factor = (2 * Math.PI) / maxX;\n//\t\t\t return (float) ((Math.sin(x * factor) * halfY) + halfY);\n//\t\t\t}\n//\t\t\t\n//\t\t};\n\t\treturn pMesh;\n\t}", "public Vector2f[] getNormalisedVertexPositions() {\n Vertex3D[] vertices = mesh.getModel().getVertices();\n // Get Array of X and Y offsets for all vertices\n Vector2f[] vertexPositions = new Vector2f[vertices.length];\n for (int i = 0; i < vertices.length; i++) {\n Vector3f vertexPosition = vertices[i].getPosition();\n vertexPositions[i] = new Vector2f(vertexPosition.getX(), vertexPosition.getY());\n }\n\n // Add vertex positions to position in order to get their OpenGl coordinates\n for (int i = 0; i < vertexPositions.length; i++) {\n vertexPositions[i] = Vector2f.add(position, vertexPositions[i]);\n vertexPositions[i] = Vector2f.divide(\n vertexPositions[i],\n new Vector2f(Window.getSpanX(), Window.getSpanY()));\n }\n\n return vertexPositions;\n }", "private void parseVertex(String line) {\n\n String first_float = line.substring(2);\n first_float = first_float.trim();\n int second_space_index = first_float.indexOf(' ') + 1;\n String second_float = first_float.substring(second_space_index);\n second_float = second_float.trim();\n int third_space_index = second_float.indexOf(' ') + 1;\n String third_float = second_float.substring(third_space_index);\n third_float = third_float.trim();\n\n float vx = parseFloat(first_float.substring(0, second_space_index - 1));\n float vy = parseFloat(second_float.substring(0, third_space_index - 1));\n float vz = parseFloat(third_float);\n\n mMaxX = Math.max(mMaxX, vx);\n mMaxY = Math.max(mMaxY, vy);\n mMaxZ = Math.max(mMaxZ, vz);\n\n mMinX = Math.min(mMinX, vx);\n mMinY = Math.min(mMinY, vy);\n mMinZ = Math.min(mMinZ, vz);\n\n mVertices.add(vx);\n mVertices.add(vy);\n mVertices.add(vz);\n mLastVertexNumber++;\n\n if (mHaveMaterialColor) {\n mColors.add(mMaterialColor[0]);\n mColors.add(mMaterialColor[1]);\n mColors.add(mMaterialColor[2]);\n }\n }", "private void addBlocksVertices() {\n\n for (Block block :game.getBlocks()) {\n Point3D[] points = block.getPoints();\n for (int i = 0; i < points.length; i++) {\n GraphNode blockNode = new GraphNode(points[i]);\n vertices.add(blockNode);\n }\n }\n }", "public int getNumberOfVertices();", "public abstract int getVertexCount();", "public Mesh() {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n }", "public java.util.List<V> getVertices();", "public void onUpdateVertices() {\n getVertexBufferObject().onUpdateVertices(this);\n }", "public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}", "public Polygon getPolygon(double eyeDistance){\n //define the front two verticies of the currentTrack\n Point3D track_vertex0 = currentTrack.getVertex(0);\n Point3D track_vertex1 = currentTrack.getVertex(1);\n //use center point to define the center of the sphape\n int cubeSize = 3;\n\n Point3D front_up_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_left = new Point3D (centerPoint.x-cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_down_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y+cubeSize, centerPoint.z-cubeSize);\n Point3D front_up_right = new Point3D (centerPoint.x+cubeSize, centerPoint.y-cubeSize, centerPoint.z-cubeSize);\n\n Point3D back_up_left = new Point3D (front_up_left.x, front_up_left.y, centerPoint.z+cubeSize);\n Point3D back_down_left = new Point3D (front_down_left.x, front_down_left.y, centerPoint.z+cubeSize);\n Point3D back_down_right = new Point3D (front_down_right.x, front_down_right.y, centerPoint.z+cubeSize);\n Point3D back_up_right = new Point3D (front_up_right.x, front_up_right.y, centerPoint.z+cubeSize);\n\n //aranges verticies in the order they will be drawn\n Point3D[] cube_verticies = {front_up_left, front_down_left, front_down_right, front_up_right,\n front_up_left, back_up_left, back_up_right, front_up_right,\n front_down_right, back_down_right, back_up_right, back_down_right,\n back_down_left, back_up_left, back_down_left, front_down_left};\n\n int[] x_points = new int[16];\n int[] y_points = new int[16];\n //convert 3D points to 2D points\n for(int i=0;i<16;i++){\n if(cube_verticies[i].z <= 200){ //same fix as for the track positioning\n x_points[i] = (int) -cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n else{\n x_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getX();\n y_points[i] = (int) cube_verticies[i].projectPoint3D(eyeDistance).getY();\n }\n }\n Polygon polygon = new Polygon(x_points, y_points, 16);\n return polygon;\n }", "public void getVertices (float[] vertices) {\r\n \t\tif (vertices.length < getNumVertices() * getVertexSize() / 4)\r\n \t\t\tthrow new IllegalArgumentException(\"not enough room in vertices array, has \" + vertices.length + \" floats, needs \"\r\n \t\t\t\t+ getNumVertices() * getVertexSize() / 4);\r\n \t\tint pos = getVerticesBuffer().position();\r\n \t\tgetVerticesBuffer().position(0);\r\n \t\tgetVerticesBuffer().get(vertices, 0, getNumVertices() * getVertexSize() / 4);\r\n \t\tgetVerticesBuffer().position(pos);\r\n \t}", "public abstract int getNumberOfVertices();", "public int numVertices();", "public int numVertices();", "public Vertex[] getVertices() {\n return new Vertex[]{v1, v2};\n }", "public void addVertex();", "public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Right face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Left face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n // Bottom face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f\n };\n mCubeNormals.put(mCubeNormalData).position(0);\n\n }", "private void setUpVAO() {\n\t\tfloat[] vertices = { -1, -1, -1, 1, 1, -1, 1, -1, -1, 1, 1, 1 };\n\t\tquad = Loader.loadToVAO(vertices, 2);\n\t}", "public void calculate() {\n\t\t\n\t\tHashMap<Integer, Vertex> vertices = triangulation.getVertices();\n\t\tHashMap<Integer, Face> faces = triangulation.getFaces();\n\n\t\tHashMap<Integer, Integer> chords = new HashMap<Integer, Integer>();\n\t\tList<Vertex> onOuterCircle = new LinkedList<Vertex>();\n\t\tList<Edge> outerCircle = new LinkedList<Edge>();\n\n\t\tfor (Vertex v : vertices.values()) {\n\t\t\tchords.put(v.getId(), 0);\n\t\t\tchildren.put(v.getId(), new LinkedList<Integer>());\n\t\t}\n\n\t\t// determine outer face (randomly, use the first face)\n\t\tFace outerFace = null;\n\t\tfor (Face f : faces.values()) {\n\t\t\touterFace = f;\n\t\t\tbreak;\n\t\t}\n\t\tif (outerFace == null) {\n\t\t\t// there are no faces at all in the embedding\n\t\t\treturn;\n\t\t}\n\n\t\tEdge e = outerFace.getIncidentEdge();\n\t\tvertexOrder[1] = e.getSource();\n\t\tvertexOrder[0] = e.getTarget();\n\t\tonOuterCircle.add(e.getTarget());\n\t\tonOuterCircle.add(e.getNext().getTarget());\n\t\tonOuterCircle.add(e.getSource());\n\t\touterCircle.add(e.getNext().getNext().getTwin());\n\t\touterCircle.add(e.getNext().getTwin());\n\t\t\n\t\t//System.out.println(\"outerCircle 0 \" + outerCircle.get(0).getId() + \" - source: \" + outerCircle.get(0).getSource().getId() + \" - target: \" + outerCircle.get(0).getTarget().getId());\n\t\t//System.out.println(\"outerCircle 1 \" + outerCircle.get(1).getId() + \" - source: \" + outerCircle.get(1).getSource().getId() + \" - target: \" + outerCircle.get(1).getTarget().getId());\n\t\t\n\n\t\tfor (int k=vertexOrder.length-1; k>1; k--) {\n\t\t\t//System.out.println(\"k: \" + k + \" - outerCircle size: \" + outerCircle.size());\n\t\t\t// chose v != v_0,v_1 such that v on outer face, not considered yet and chords(v)=0\n\t\t\tVertex nextVertex = null;\n\t\t\tint nextVertexId = -1;\n\t\t\tfor (int i=0; i<onOuterCircle.size(); i++) {\n\t\t\t\tnextVertex = onOuterCircle.get(i);\n\t\t\t\tnextVertexId = nextVertex.getId();\n\t\t\t\tif (nextVertexId != vertexOrder[0].getId() && nextVertexId != vertexOrder[1].getId()\n\t\t\t\t\t\t&& chords.get(nextVertexId) == 0) {\n\t\t\t\t\t// remove from list\n\t\t\t\t\tonOuterCircle.remove(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"nextVertexId: \" + nextVertexId);\n\n\t\t\t// found the next vertex; add it to the considered vertices\n\t\t\tvertexOrder[k] = nextVertex;\n\t\t\t\n\t\t\t// determine children\n\t\t\tList<Integer> childrenNextVertex = children.get(nextVertexId);\n\t\t\t\n\t\t\t// update edges of outer circle\n\t\t\tint index = 0;\n\t\t\t\n\t\t\twhile (outerCircle.get(index).getTarget().getId() != nextVertexId) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tEdge outofNextVertex = outerCircle.remove(index+1);\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"outOfNextVertex \" + outofNextVertex.getId() + \" - source: \" + outofNextVertex.getSource().getId() + \" - target: \" + outofNextVertex.getTarget().getId());\n\t\t\tEdge intoNextVertex = outerCircle.remove(index);\n\t\t\t//System.out.println(\"intoNextVertex \" + intoNextVertex.getId() + \" - source: \" + intoNextVertex.getSource().getId() + \" - target: \" + intoNextVertex.getTarget().getId());\n\t\t\tEdge current = intoNextVertex.getNext();\n\t\t\t//System.out.println(\"current \" + current.getId() + \" - source: \" + current.getSource().getId() + \" - target: \" + current.getTarget().getId());\n\t\t\t\n\t\t\tint endIndex = index;\n\t\t\t\n\t\t\twhile (current.getId() != outofNextVertex.getId()) {\n\t\t\t\tEdge onCircle = current.getNext().getTwin();\n\t\t\t\touterCircle.add(endIndex, onCircle);\n\t\t\t\t\n\t\t\t\tchildrenNextVertex.add(0, onCircle.getSource().getId());\n\t\t\t\t\n\t\t\t\tendIndex++;\n\t\t\t\tcurrent = current.getTwin().getNext();\n\t\t\t\tonOuterCircle.add(onCircle.getTarget());\n\t\t\t}\n\t\t\t\n\t\t\tEdge lastEdge = outofNextVertex.getNext().getTwin();\n\t\t\touterCircle.add(endIndex, lastEdge);\n\t\t\t\n\t\t\tchildrenNextVertex.add(0, lastEdge.getSource().getId());\n\t\t\tchildrenNextVertex.add(0, lastEdge.getTarget().getId());\n\n\t\t\t// update chords\n\t\t\tfor (Vertex v : onOuterCircle) {\n\t\t\t\tEdge incidentEdge = v.getOutEdge();\n\t\t\t\tint firstEdgeId = incidentEdge.getId();\n\t\t\t\tint chordCounter = -2; // the 2 neighbours are on the outer circle, but no chords\n\t\t\t\tdo {\n\t\t\t\t\tif (onOuterCircle.contains(incidentEdge.getTarget())) {\n\t\t\t\t\t\tchordCounter++;\n\t\t\t\t\t}\n\t\t\t\t\tincidentEdge = incidentEdge.getTwin().getNext();\n\t\t\t\t} while (incidentEdge.getId() != firstEdgeId);\n\t\t\t\tchords.put(v.getId(), chordCounter);\n\t\t\t}\n\t\t}\n\t}", "public int getNumVertices() {\n return num_vertices;\n }", "public Enumeration vertices();", "public static void main(String args[]) {\n\n\t\tBufferedReader objFileBR;\n\t\tString line, tempstr;\n\t\tStringTokenizer st;\n\n\t\tString objfName = args[0]; // get the object file name from first command line parameter\n\n\t\tfinal int MAX_VERTICES = 400;\n\t\tfinal int MAX_POLYS = 200;\n\t\tfinal int MAX_EDGES = 7;\n\n\t\tv = new Vertex[MAX_VERTICES];\n\t\t/* index is the vertex number,\n\t\t and the Vertex is (x, y, z, 1) coordinates of a vertex of the object */\n\n\t\tpolyColor= new double[MAX_POLYS][3];\n\t\t/* first index is the polygon number, the next index goes from 0 to 2\n\t\t representing the RGB values of that polygon */\n\n\t\tpolygon = new int[MAX_POLYS][MAX_EDGES + 1];\n\t\t/* polygon[i][0] stores the number of vertices that describes \n\t\t the polygon i.\n\t\t polygon[i][1] through polygon[i][polygon[i][0]] store the \n\t\t vertex numbers in counter clockwise order\n\t\t */\n\n\t\tnumVs = 0;\n\t\tnumPolys = 0;\n\n\t\ttry {\n\t\t\tobjFileBR = new BufferedReader(new FileReader(objfName));\n\n\t\t\tline = objFileBR.readLine(); // should be the VERTICES line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VERTICES\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tnumVs = Integer.parseInt(tempstr);\n\t\t\t} else {\n\t\t\t\tnumVs = 0;\n\t\t\t\tSystem.out.println(\"Expecting VERTICES line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = objFileBR.readLine(); // should be the POLYGONS line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"POLYGONS\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tnumPolys = Integer.parseInt(tempstr);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting POLYGONS line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = objFileBR.readLine(); // should be the VERTEX LIST line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VERTEX\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tif (!tempstr.equals(\"LIST\")) {\n\t\t\t\t\tSystem.out.println(\"Expecting VERTEX LIST line in file \"\n\t\t\t\t\t\t\t+ objfName);\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VERTEX LIST line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t// if we get here we successfully processed the VERTEX LIST line\n\n\t\t\t// reads each of the vertex coordinates and creates a Vertex object for each one \n\t\t\tfor (int i = 0; i < numVs; i++) {\n\t\t\t\tline = objFileBR.readLine();\n\t\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tv[i] = new Vertex(x1,y1,z1,1.0);\n\t\t\t}\n\n\t\t\tline = objFileBR.readLine(); // should be the POLYGON LIST line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"POLYGON\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tif (!tempstr.equals(\"LIST\")) {\n\t\t\t\t\tSystem.out.println(\"Expecting POLYGON LIST line in file \"\n\t\t\t\t\t\t\t+ objfName);\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting POLYGON LIST line in file \"\n\t\t\t\t\t\t+ objfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t// if we get here we successfully processed the POLYGON LIST line\n\n\t\t\tfor (int i = 0; i < numPolys; i++) {\n\t\t\t\tline = objFileBR.readLine();\n\t\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\t\tst.nextToken(); // ignore the string COUNT \n\t\t\t\ttempstr = st.nextToken(); // this is the value of count (number of vertices for this poly)\n\t\t\t\tint numVsForThisPoly = Integer.parseInt(tempstr);\n\t\t\t\tpolygon[i][0] = numVsForThisPoly;\n\t\t\t\tst.nextToken(); // ignore the string VERTICES \n\n\t\t\t\t//example line: COUNT 5 VERTICES 5 4 3 2 1 COLOR .4 .2 .4\n\n\t\t\t\tfor (int j = 1; j <=numVsForThisPoly; j++) {\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tpolygon[i][j] = Integer.parseInt(tempstr) - 1;\n\t\t\t\t}\n\n\t\t\t\tst.nextToken(); // ignore the string COLOR\n\n\t\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tpolyColor[i][j] = Double.parseDouble(tempstr);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tobjFileBR.close();\n\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"couldn't read from file\");\n\t\t}\n\n\t\t// loops to print out the information just read ...\n\t\t// ******************************************************\n // ******************************************************\n // remove this printing before you submit the program\n // ******************************************************\n // ******************************************************\n\t\t\n\t\t// write code here to print out the vertices \n\n\t\tfor (int i = 0; i < numPolys; i++) {\n\t\t\tSystem.out.print(\"Polygon number \" + i + \" vertices:\");\n\t\t\tfor (int j = 1; j <= polygon[i][0]; j++)\n\t\t\t\tSystem.out.print(\" \" + polygon[i][j]);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\tfor (int i = 0; i < numPolys; i++) {\n\t\t\tSystem.out.print(\"Polygon number \" + i + \" RGB:\");\n\t\t\tfor (int j = 0; j < 3; j++)\n\t\t\t\tSystem.out.print(\" \" + polyColor[i][j]);\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// ================================================================\n\t\t// ------READ VIEWING PARAMETER FILE \n\t\t// ================================================================\n\n\t\tString viewfName = args[1]; // second command line arg\n\t\tBufferedReader viewFileBR;\n\t\t/* Viewing parameters */\n\t\n\n\t\ttry {\n\t\t\tviewFileBR = new BufferedReader(new FileReader(viewfName));\n\n\t\t\tline = viewFileBR.readLine(); // should be the VRP line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VRP\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tvrp = new Vertex(x1,y1,z1,1.0);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VRP line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the VPN line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VPN\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tvpn = new Vector(x1,y1,z1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VPN line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the VUP line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"VUP\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tvup = new Vector(x1,y1,z1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting VUP line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the PRP line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"PRP\")) {\n\t\t\t\tdouble x1=0, y1=0, z1=0;\t\t\t\t\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tx1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\ty1 = Double.parseDouble(tempstr);\n\t\t\t\t\ttempstr = st.nextToken();\n\t\t\t\t\tz1 = Double.parseDouble(tempstr);\n\t\t\t\tprp = new Vertex(x1,y1,z1,1.0);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting PRP line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tline = viewFileBR.readLine(); // should be the WINDOW line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"WINDOW\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tumin = Double.parseDouble(tempstr);\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tumax = Double.parseDouble(tempstr);\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tvmin = Double.parseDouble(tempstr);\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tvmax = Double.parseDouble(tempstr);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting WINDOW line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tline = viewFileBR.readLine(); // should be the FRONT line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"FRONT\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tfrontClip = Double.parseDouble(tempstr);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting FRONT line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\tline = viewFileBR.readLine(); // should be the BACK line\n\t\t\tst = new StringTokenizer(line, \" \");\n\t\t\ttempstr = st.nextToken();\n\t\t\tif (tempstr.equals(\"BACK\")) {\n\t\t\t\ttempstr = st.nextToken();\n\t\t\t\tbackClip = Double.parseDouble(tempstr);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Expecting BACK line in file \"\n\t\t\t\t\t\t+ viewfName);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tviewFileBR.close();\n\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"couldn't read from file\");\n\t\t}\n\n\n\t\t// write code here to print out the VRP, PRP, VUP and VPN\n\t\t\n\t\tSystem.out.print(\"WINDOW =\");\n\t\tSystem.out.println(\" \" + umin + \" \" + umax + \" \" + vmin + \" \" + vmax);\n\n\t\tSystem.out.print(\"FRONT =\");\n\t\tSystem.out.println(\" \" + frontClip);\n\n\t\tSystem.out.print(\"BACK =\");\n\t\tSystem.out.println(\" \" + backClip);\n\n\t}", "public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}", "@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}", "public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }", "public static void main(String[] args) throws FileNotFoundException\n {\n File file = new File(System.getProperty(\"user.home\") + \"/Desktop\", \"lion.off\");\n Scanner s = new Scanner(file);\n s.nextLine(); // Skip first line of context\n\n // Create result file(mesh2C.off)\n try { fileManager.CreateResultFile(); }\n catch(IOException exc) { System.out.println(\"Error: \" + exc.getMessage()); }\n \n // Initializing PrintWriter instance for writing data to result file\n PrintWriter pw = new PrintWriter(System.getProperty(\"user.home\") + \"/Desktop/mesh2C.off\");\n pw.println(\"OFF\"); // Write first line to mesh2C.off\n\n // Get number of vertices which lion.off has\n String str_num_of_vertices = s.next();\n String str_num_of_faces = s.next();\n int num_of_vertices = Integer.parseInt(str_num_of_vertices);\n int num_of_faces = Integer.parseInt(str_num_of_faces);\n pw.println(Integer.toString(num_of_vertices + 8) + \" \" + Integer.toString(num_of_faces + 6) + s.nextLine());\n\n // Extract max and min value of each axis(X, Y, Z) separately\n double minX = 0, maxX = 0;\n double minY = 0, maxY = 0;\n double minZ = 0, maxZ = 0;\n\n for(int i = 0; i < num_of_vertices; i++)\n {\n double x = Double.parseDouble(s.next());\n if(x < minX) { minX = x; }\n if(x > maxX) { maxX = x; }\n double y = Double.parseDouble(s.next());\n if(y < minY) { minY = y; }\n if(y > maxY) { maxY = y; }\n double z = Double.parseDouble(s.next());\n if(z < minZ) { minZ = z; }\n if(z > maxZ) { maxZ = z; }\n\n String tmp = Double.toString(x) + \" \" + Double.toString(y) + \" \" + Double.toString(z);\n pw.println(tmp); \n }\n\n // Calculate and create String arrays for Vertices and faces\n String vStr[] = new String[8];\n String fStr[] = new String[6];\n\n vStr[0] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[1] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[2] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(maxZ);\n vStr[3] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(maxZ);\n vStr[4] = Double.toString(minX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n vStr[5] = Double.toString(minX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[6] = Double.toString(maxX) + \" \" + Double.toString(minY) + \" \" + Double.toString(minZ);\n vStr[7] = Double.toString(maxX) + \" \" + Double.toString(maxY) + \" \" + Double.toString(minZ);\n\n for(int i = 0; i < 8; i++) { pw.println(vStr[i]); }\n \n // Calculate face list and write into result file\n String id_quad_1 = Integer.toString(num_of_vertices);\n String id_quad_2 = Integer.toString(num_of_vertices + 1);\n String id_quad_3 = Integer.toString(num_of_vertices + 2);\n String id_quad_4 = Integer.toString(num_of_vertices + 3);\n String id_quad_5 = Integer.toString(num_of_vertices + 4);\n String id_quad_6 = Integer.toString(num_of_vertices + 5);\n String id_quad_7 = Integer.toString(num_of_vertices + 6);\n String id_quad_8 = Integer.toString(num_of_vertices + 7);\n\n fStr[0] = \"4 \" + id_quad_1 + \" \" + id_quad_4 + \" \" + id_quad_3 + \" \" + id_quad_2;\n fStr[1] = \"4 \" + id_quad_5 + \" \" + id_quad_6 + \" \" + id_quad_7 + \" \" + id_quad_8;\n fStr[2] = \"4 \" + id_quad_1 + \" \" + id_quad_5 + \" \" + id_quad_8 + \" \" + id_quad_4;\n fStr[3] = \"4 \" + id_quad_3 + \" \" + id_quad_7 + \" \" + id_quad_6 + \" \" + id_quad_2;\n fStr[4] = \"4 \" + id_quad_2 + \" \" + id_quad_6 + \" \" + id_quad_5 + \" \" + id_quad_1;\n fStr[5] = \"4 \" + id_quad_4 + \" \" + id_quad_8 + \" \" + id_quad_7 + \" \" + id_quad_3;\n\n // Copy face data from original lion.off file to result file\n s.nextLine();\n for(int i = 0; i < num_of_faces; i++) { pw.println(s.nextLine()); }\n \n // Add new face data at the bottom of result file\n for(int i = 0; i < 6; i++) { pw.println(fStr[i]); }\n\n // Terminate filestream\n s.close();\n pw.close();\n }", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public void makeCube (int subdivisions)\r\n {\r\n \tfloat horz[] = new float[subdivisions + 1];\r\n \tfloat vert[] = new float[subdivisions + 1];\r\n \t\r\n \t\r\n \t// Front face\r\n \tPoint p1 = new Point(-0.5f, -0.5f, 0.5f);\r\n \tPoint p2 = new Point(0.5f, -0.5f, 0.5f);\r\n \tPoint p3 = new Point(0.5f, 0.5f, 0.5f);\r\n \tPoint p4 = new Point(-0.5f, 0.5f, 0.5f);\r\n \t\r\n \tfloat h = p1.x;\r\n \tfloat v = p1.y;\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], 0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], 0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], 0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], 0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Back face\r\n \tp1.y = p1.z = -0.5f;\r\n \tp1.x = 0.5f;\r\n \tp2.x = p2.y = p2.z = -0.5f;\r\n \tp3.x = p3.z = -0.5f;\r\n \tp3.y = 0.5f;\r\n \tp4.x = p4.y = 0.5f;\r\n \tp4.z = -0.5f;\r\n \t\r\n \th = p1.x;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], vert[j], -0.5f);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], vert[j], -0.5f);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], vert[j + 1], -0.5f);\r\n \t\t\tPoint tempP4 = new Point(horz[k], vert[j + 1], -0.5f);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Left face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.x = p2.y = -0.5f;\r\n \tp2.z = 0.5f;\r\n \tp3.x = -0.5f;\r\n \tp3.y = p3.z = 0.5f;\r\n \tp4.y = 0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(-0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(-0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(-0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(-0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Right face\r\n \tp1.x = p1.z = 0.5f;\r\n \tp1.y = -0.5f;\r\n \tp2.y = p2.z = -0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.y = p4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.z;\r\n \tv = p1.y;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(0.5f, vert[j], horz[k]);\r\n \t\t\tPoint tempP2 = new Point(0.5f, vert[j], horz[k + 1]);\r\n \t\t\tPoint tempP3 = new Point(0.5f, vert[j + 1], horz[k + 1]);\r\n \t\t\tPoint tempP4 = new Point(0.5f, vert[j + 1], horz[k]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Top face\r\n \tp1.x = -0.5f;\r\n \tp1.y = p1.z = 0.5f;\r\n \tp2.x = p2.y = p2.z = 0.5f;\r\n \tp3.x = p3.y = 0.5f;\r\n \tp3.z = -0.5f;\r\n \tp4.x = p4.z = -0.5f;\r\n \tp4.y = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v - (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], 0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], 0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], 0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], 0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n \t// Bottom face\r\n \tp1.x = p1.y = p1.z = -0.5f;\r\n \tp2.y = p2.z = 0.5f;\r\n \tp2.x = 0.5f;\r\n \tp3.x = p3.z = 0.5f;\r\n \tp3.y = -0.5f;\r\n \tp4.x = p4.y = -0.5f;\r\n \tp4.z = 0.5f;\r\n \t\r\n \t\r\n \th = p1.x;\r\n \tv = p1.z;\r\n \t\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++ )\r\n \t{\r\n \t\thorz[i] = h;\r\n \t\th = h + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int i = 0; i <= subdivisions; i++)\r\n \t{\r\n \t\tvert[i] = v;\r\n \t\tv = v + (float)(1/(float)subdivisions);\r\n \t}\r\n \t\r\n \tfor( int j = 0; j < vert.length - 1; j ++)\r\n \t\tfor( int k = 0; k < horz.length - 1; k ++)\r\n \t\t{\r\n \t\t\tPoint tempP1 = new Point(horz[k], -0.5f, vert[j]);\r\n \t\t\tPoint tempP2 = new Point(horz[k + 1], -0.5f, vert[j]);\r\n \t\t\tPoint tempP3 = new Point(horz[k + 1], -0.5f, vert[j + 1]);\r\n \t\t\tPoint tempP4 = new Point(horz[k], -0.5f, vert[j + 1]);\r\n \t\t\t\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP3.x, tempP3.y, tempP3.z, tempP4.x, tempP4.y, tempP4.z);\r\n \t\t\taddTriangle(tempP1.x, tempP1.y, tempP1.z, tempP2.x, tempP2.y, tempP2.z, tempP3.x, tempP3.y, tempP3.z);\r\n \t\t\t\r\n \t\t}\r\n \t\r\n }", "public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}", "private void generatePrism() {\n\t\tdouble halfAltitude = Math.sin(Math.PI / 3); // The cross-section is an equilateral triangle with sides of length 2 units. The altitude is the height of the triangle with one edge horizontal\n\t\tverts = new Vector[] {new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3), new Vector(3)};\n\t\tverts[0].setElements(new double[] {-1, -halfAltitude, -1});\n\t\tverts[1].setElements(new double[] {0, halfAltitude, -1});\n\t\tverts[2].setElements(new double[] {1, -halfAltitude, -1});\n\t\t// Use the same triangle of vertices but offset by 2 units along the z-axis\n\t\tverts[3].setElements(verts[0]);\n\t\tverts[4].setElements(verts[1]);\n\t\tverts[5].setElements(verts[2]);\n\t\tverts[3].setElement(2, 1);\n\t\tverts[4].setElement(2, 1);\n\t\tverts[5].setElement(2, 1);\n\t\t\n\t\tfaces = new int[][] {{0, 1, 2}, {0, 5, 3}, {0, 2, 5}, {0, 3, 4}, {0, 4, 1}, {1, 4, 5}, {1, 5, 2}, {3, 5, 4}};\n\t}", "public Vector[] getBoxVerts() {\n\t\treturn boxVerts;\n\t}", "public Mesh(final float[] vertices) {\n vertexCount = vertices.length / COORDS_PER_VERTEX;\n vertexBuffer = Core.arrayAsBuffer(vertices);\n }", "public int getNumVertices();", "public Mesh(String Path) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = new ArrayList<Vertex>();\r\n tris = new ArrayList<Triangle>();\r\n \r\n ReadFile reader = new ReadFile(Path);\r\n String[] text = new String[0];\r\n try {\r\n text = reader.OpenFile();\r\n } catch (IOException ex) {\r\n Logger.getLogger(Mesh.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n for (String text1 : text) {\r\n if (text1.length() > 0) {\r\n if (text1.charAt(0) == 'v') {\r\n text1 = text1.replaceAll(\"v\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n vertices.add(new Vertex(Double.valueOf(tmp[0]), Double.valueOf(tmp[1]), Double.valueOf(tmp[2])));\r\n }\r\n } else if (text1.charAt(0) == 'f') {\r\n text1 = text1.replaceAll(\"f\", \"\");\r\n text1 = text1.trim();\r\n String[] tmp = text1.split(\" \");\r\n if (tmp.length != 3) {\r\n System.out.println(\"Error\");\r\n } else {\r\n tris.add(new Triangle(vertices.get(Integer.valueOf(tmp[0]) - 1), vertices.get(Integer.valueOf(tmp[1]) - 1), vertices.get(Integer.valueOf(tmp[2]) - 1)));\r\n }\r\n }\r\n } else {\r\n //do nothing\r\n }\r\n }\r\n }", "private Vertex getVertexFor(Agent ag) {\n return getDataFor(ag).vertex;\n }", "Vertex getVertex();", "public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "void computeTriangleNormals();", "public void setVertices(float x0, float y0, float z0,\n float x1, float y1, float z1,\n float x2, float y2, float z2) {\n x_array[0] = x0;\n x_array[1] = x1;\n x_array[2] = x2;\n \n y_array[0] = y0;\n y_array[1] = y1;\n y_array[2] = y2;\n \n z_array[0] = z0;\n z_array[1] = z1;\n z_array[2] = z2;\n }", "final protected void prepareVertexBuffer() {\n vertexReference = new VectorQD[calculateVertexNumber()];\n vertexBuffer = new VectorQD[vertexReference.length];\n for (int i = 0; i < vertexBuffer.length; i++) {\n vertexBuffer[i] = new VectorQD();\n }\n }", "public int getNumVertices(){\n return numVertices;\n }", "@Nullable\n public abstract Vertex process(Point position, MeshDetails elements, int floorNumber, Graph graph, int id);", "@Test\n\tpublic void verticesTest() {\n\t\tgraph.addVertex(A);\n\t\tgraph.addVertex(B);\n\t\tgraph.addVertex(C);\n\t\tgraph.addVertex(D);\n\t\tassertEquals(4, graph.vertices().size());\n\t\tassertTrue(graph.vertices().contains(A));\n\t\tassertTrue(graph.vertices().contains(D));\n\t}", "private void addVertexPositionConstraint(){\n for (int vertex=0; vertex < vertexCount; vertex++){\n addExactlyOne(variables[vertex]);\n }\n }", "private void process(ArrayList<Float> points) {\n downsample(3, points);\n vertices = new Vector3f[nrows * ncols];\n texcoord = BufferUtils.createFloatBuffer(2 * nrows * ncols);\n indexes = BufferUtils.createIntBuffer(6 * (nrows - 1) * (ncols - 1));\n Vector3f[][][] fnormals = new Vector3f[nrows - 1][ncols - 1][2];\n normals = new Vector3f[nrows * ncols];\n float x, z;\n\n System.out.println(\"Processing \" + nrows + \"x\" + ncols + \" terrain...\");\n\n // First make vertices + texcoords\n x = 0.0f;\n for (int row = 0; row < nrows; row++) {\n z = 0.0f;\n for (int col = 0; col < ncols; col++) {\n vertices[(row * ncols) + col] = new Vector3f(x, data[row][col], z);\n texcoord.put(col / (float) ncols);\n texcoord.put(row / (float) nrows);\n z += cellsize;\n }\n x += cellsize;\n }\n // Indexes + face normals\n System.out.println(\"Populating faces...\");\n for (int row = 0; row < (nrows - 1); row++) {\n for (int col = 0; col < (ncols - 1); col++) {\n int base = 6 * ((row * (ncols - 1)) + col);\n // Triangle 1\n indexes.put((row * ncols) + col); // a\n indexes.put((row * ncols) + col + 1); // b\n indexes.put(((row + 1) * ncols) + col); // c\n // Triangle 2\n indexes.put(((row + 1) * ncols) + col); // c\n indexes.put((row * ncols) + col + 1); // b\n indexes.put(((row + 1) * ncols) + col + 1); // d\n // Faces\n base = (row * ncols) + col;\n Vector3f a = vertices[base];\n Vector3f b = vertices[base + 1];\n Vector3f c = vertices[base + ncols];\n Vector3f d = vertices[base + ncols + 1];\n Vector3f ba = b.subtract(a);\n Vector3f ca = c.subtract(a);\n Vector3f bc = b.subtract(c);\n Vector3f dc = d.subtract(c);\n // ormal.subtractLocal(pointa).crossLocal(pointc.x - pointa.x,\n // pointc.y - pointa.y, pointc.z - pointa.z);\n fnormals[row][col][0] = ba.crossLocal(ca).normalizeLocal();\n fnormals[row][col][1] = bc.crossLocal(dc).normalizeLocal();\n // Triangle ta = new Triangle(a,b,c);\n // Triangle tb = new Triangle(c,b,d);\n }\n }\n System.out.println(\"Calculating face normals...\");\n // Vector normals\n Vector3f t;\n // Corners\n // TL\n t = fnormals[0][0][0].add(fnormals[0][0][1]);\n t.normalizeLocal();\n normals[0] = t;\n // TR\n t = fnormals[0][ncols - 2][0].add(fnormals[0][ncols - 2][1]);\n t.normalizeLocal();\n normals[ncols - 1] = t;\n // BL\n t = fnormals[nrows - 2][0][0].add(fnormals[nrows - 2][0][1]);\n t.normalizeLocal();\n normals[(nrows - 1) * ncols] = t;\n // BR\n t = fnormals[nrows - 2][ncols - 2][0].add(fnormals[nrows - 2][ncols - 2][1]);\n t.normalizeLocal();\n normals[(nrows * ncols) - 1] = t;\n // Do first row and last row\n for (int col = 1; col < (ncols - 1); col++) {\n // First row\n t = fnormals[0][col - 1][0].add(fnormals[0][col - 1][1]);\n t.addLocal(fnormals[0][col][0]);\n t.addLocal(fnormals[0][col][1]);\n t.normalizeLocal();\n normals[col] = t;\n // Last row\n t = fnormals[nrows - 2][col - 1][0].add(fnormals[nrows - 2][col - 1][1]);\n t.addLocal(fnormals[nrows - 2][col][0]);\n t.addLocal(fnormals[nrows - 2][col][1]);\n t.normalizeLocal();\n normals[((nrows - 1) * ncols) + col] = t;\n }\n // Do first and last column\n for (int row = 1; row < (nrows - 1); row++) {\n // First col\n t = fnormals[row - 1][0][0].add(fnormals[row - 1][0][1]);\n t.addLocal(fnormals[row][0][0]);\n t.addLocal(fnormals[row][0][1]);\n t.normalizeLocal();\n normals[row * ncols] = t;\n // Last col\n t = fnormals[row - 1][ncols - 2][0].add(fnormals[row - 1][ncols - 2][1]);\n t.addLocal(fnormals[row][ncols - 2][0]);\n t.addLocal(fnormals[row][ncols - 2][1]);\n t.normalizeLocal();\n normals[(row * ncols) + (ncols - 1)] = t;\n // Centre cols\n for (int col = 1; col < (ncols - 1); col++) {\n t = fnormals[row - 1][col - 1][0].add(fnormals[row - 1][col - 1][1]);\n t.addLocal(fnormals[row - 1][col][0]);\n t.addLocal(fnormals[row - 1][col][1]);\n t.addLocal(fnormals[row][col - 1][0]);\n t.addLocal(fnormals[row][col - 1][1]);\n t.addLocal(fnormals[row][col][0]);\n t.addLocal(fnormals[row][col][1]);\n t.normalizeLocal();\n normals[(row * ncols) + col] = t;\n }\n }\n System.out.println(\"Processing finished...\");\n setBuffer(VertexBuffer.Type.Position, 3, BufferUtils.createFloatBuffer(vertices));\n setBuffer(VertexBuffer.Type.TexCoord, 2, texcoord);\n setBuffer(VertexBuffer.Type.Index, 3, indexes);\n setBuffer(VertexBuffer.Type.Normal, 3, BufferUtils.createFloatBuffer(normals));\n updateBound();\n System.out.println(\"NE corner: \" + vertices[vertices.length - 1].mult(0.006f));\n // Hint to renderer that we don't plan on modifying the terrain.\n this.setStatic();\n }", "public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}", "private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }", "protected void processVertex(Vertex w){\n\t}", "ArrayList<ArrayList<Vertex>> generateInitVertices() {\n ArrayList<ArrayList<Vertex>> vertices = new ArrayList<ArrayList<Vertex>>();\n for (int x = 0; x < width; x++) {\n ArrayList<Vertex> temp = new ArrayList<Vertex>();\n for (int y = 0; y < height; y++) {\n temp.add(new Vertex(x, y));\n }\n vertices.add(temp);\n }\n Random r = new Random();\n for (ArrayList<Vertex> vList : vertices) {\n for (Vertex v : vList) {\n if (v.x != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x - 1).get(v.y), r.nextInt(1000)));\n }\n if (v.x != width - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x + 1).get(v.y), r.nextInt(1000)));\n }\n if (v.y != 0) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y - 1), r.nextInt(1000)));\n }\n if (v.y != height - 1) {\n v.outEdges.add(new Edge(v, vertices.get(v.x).get(v.y + 1), r.nextInt(1000)));\n }\n }\n }\n return vertices;\n }", "public MPolygon computeVertex_xyz(FOV f) {\r\n\r\n\t\tMPolygon mpolygon = new MPolygon();\r\n\r\n\t\tdouble radian1 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 2));\r\n\t\tdouble radian2 = MPolygon.toRadian(450 - (f.getDirection() - f.gethAngle() / 4));\r\n\t\tdouble radian3 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 4));\r\n\t\tdouble radian4 = MPolygon.toRadian(450 - (f.getDirection() + f.gethAngle() / 2));\r\n\t\tdouble radianD = MPolygon.toRadian(450 - f.getDirection());\r\n\r\n\t\tMPoint p1 = new MPoint();\r\n\t\tp1.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\t\tp1.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian1 * Math.PI / 180));\r\n\r\n\t\tMPoint p2 = new MPoint();\r\n\t\tp2.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\t\tp2.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian2 * Math.PI / 180));\r\n\r\n\t\tMPoint p3 = new MPoint();\r\n\t\tp3.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\t\tp3.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian3 * Math.PI / 180));\r\n\r\n\t\tMPoint p4 = new MPoint();\r\n\t\tp4.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\t\tp4.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radian4 * Math.PI / 180));\r\n\r\n\t\tMPoint D = new MPoint();\r\n\t\tD.x = f.getLatitude() + Math.cos(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\t\tD.y = f.getLongitude() + Math.sin(f.getVeiwDist() * (radianD * Math.PI / 180));\r\n\r\n\t\tMPoint location = new MPoint();\r\n\t\tlocation.x = f.getLatitude();\r\n\t\tlocation.y = f.getLongitude();\r\n\t\tmpolygon.setP1(p1);\r\n\t\tmpolygon.setP2(p2);\r\n\t\tmpolygon.setP3(p2);\r\n\t\tmpolygon.setP4(p4);\r\n\t\tmpolygon.setD(D);\r\n\t\tmpolygon.setLocation(location);\r\n\r\n\t\treturn mpolygon;\r\n\r\n\t}", "public void setVertexB(E3DTexturedVertex vertex){\r\n\t\tthis.vertices[1] = vertex;\r\n\t\tneedNormalRecalc = true;\r\n\t\tneedPlaneEquationRecalc = true;\r\n\t}", "public int getVertexCount() {\n return vertexCount;\n }", "public void calculateNormals() {\n // TODO!\n }", "public long getVertexCount(){\n return vertexCount;\n }", "public Mesh(ArrayList<Vertex> inputVertices, ArrayList<Triangle> inputFaces) {\r\n \tthis.surfaceAreaMethods.add(Object3D.MESH_SA);\r\n \tthis.volumeMethods.add(Object3D.MESH_VOL);\r\n \t\r\n vertices = inputVertices;\r\n tris = inputFaces;\r\n }", "public int getNumVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\treturn numVertices;\n\t}", "private void createVertices(int iX, int iY, int iXO, int iYO, int num, int increment) {\n int y = iY;\n if (num == 0 && increment == 0) {\n BracketNode last = new BracketNode(\"\", iX, y - 20, iXO, 20);\n nodes.add(last);\n getChildren().addAll(new Line(iX, iY, iX + iXO, iY), last);\n last.setName(currentBracket.getBracket().get(location));\n bracketMap.put(last, location);\n nodeMap.put(location, last);\n } else {\n ArrayList<BracketNode> aNodeList = new ArrayList<>();\n for (int i = 0; i < num; i++) {\n Point2D tl = new Point2D(iX, y);\n Point2D tr = new Point2D(iX + iXO, y);\n Point2D bl = new Point2D(iX, y + iYO);\n Point2D br = new Point2D(iX + iXO, y + iYO);\n BracketNode nTop = new BracketNode(\"\", iX, y - 20, iXO, 20);\n aNodeList.add(nTop);\n nodes.add(nTop);\n BracketNode nBottom = new BracketNode(\"\", iX, y + (iYO - 20), iXO, 20);\n aNodeList.add(nBottom);\n nodes.add(nBottom);\n Line top = new Line(tl.getX(), tl.getY(), tr.getX(), tr.getY());\n Line bottom = new Line(bl.getX(), bl.getY(), br.getX(), br.getY());\n Line right = new Line(tr.getX(), tr.getY(), br.getX(), br.getY());\n getChildren().addAll(top, bottom, right, nTop, nBottom);\n isTop = !isTop;\n y += increment;\n }\n ArrayList<Integer> tmpHelp = helper(location, num);\n for (int j = 0; j < aNodeList.size(); j++) {\n //System.out.println(currentBracket.getBracket().get(tmpHelp.get(j)));\n aNodeList.get(j).setName(currentBracket.getBracket().get(tmpHelp.get(j)));\n bracketMap.put(aNodeList.get(j), tmpHelp.get(j));\n nodeMap.put(tmpHelp.get(j), aNodeList.get(j));\n //System.out.println(bracketMap.get(aNodeList.get(j)));\n }\n }\n\n }", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "public Object getVertex(){\r\n return this.vertex;\r\n }", "private static void criaListaDeVertices(Graph graph) {\r\n\t\tfor (int i = 0; i < graph.getArestas().size(); i++) {\r\n\t\t\tif (!graph.getArestas().get(i).getV1().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV1() );\r\n\t\t\t\tgraph.getArestas().get(i).getV1().alteraStatusVertice(true);\r\n\t\t\t}\r\n\r\n\t\t\tif (!graph.getArestas().get(i).getV2().statusVertice()) {\r\n\t\t\t\tgraph.getVerticesGraph().add( graph.getArestas().get(i).getV2() );\r\n\t\t\t\tgraph.getArestas().get(i).getV2().alteraStatusVertice(true);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setVertices(E3DTexturedVertex[] vertices) {\r\n\t\tthis.vertices = vertices;\r\n\t\tneedNormalRecalc = true;\r\n\t\tneedPlaneEquationRecalc = true;\r\n\r\n\t}", "Set<Vertex> getVertices();", "@Override\r\n public int size() {\r\n return vertices.size();\r\n }", "public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}", "public void createMesh(GL2 gl){\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(y + pos[1]*chunkHeight <= ChunkManager.map2D(x + pos[0]*chunkSize, z + pos[2]*chunkSize)){\r\n\t\t\t\t\t\tblocks[x][y][z] = (byte) (2.7*(y+pos[1]*chunkHeight)/13+1); // Initialize each block\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tblocks[x][y][z] = 0;\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\tvertexCount = 0;\r\n\t\t// Allocate the buffers (Change to one buffer, or use short/byte buffer for normals and color)\r\n\t\tvertexData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tnormalData = Buffers.newDirectFloatBuffer(chunkSize*chunkHeight*chunkSize*18*3);\r\n\t\tcolorsData = Buffers.newDirectFloatBuffer(chunkSize*chunkSize*chunkSize*18*3);\r\n\t\tfor(int x = 0; x < chunkSize; x++){\r\n\t\t\tfor(int y = 0; y < chunkHeight; y++){\r\n\t\t\t\tfor(int z = 0; z < chunkSize; z++){\r\n\t\t\t\t\tif(BlockType.isActive(blocks[x][y][z])){\r\n\t\t\t\t\t\tcreateCube(x, y, z); // If the cube is active, add it to the Buffer\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// correct the buffer size, and rewind\r\n\t\tnormalData.flip();\r\n\t\tvertexData.flip();\r\n\t\tcolorsData.flip();\r\n\t\tgl.glGenBuffers(3, buffer, 0); // allocate the buffers and get IDs\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[0]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, vertexData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[1]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, normalData, GL.GL_DYNAMIC_DRAW);\r\n\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, buffer[2]);\r\n\t\tgl.glBufferData(GL.GL_ARRAY_BUFFER, vertexCount*3*4, colorsData, GL.GL_DYNAMIC_DRAW);\r\n\t\t// set buffer as null now that it's done being used, hope it will be garbage collected\r\n\t\tvertexData = null;\r\n\t\tnormalData = null;\r\n\t\tcolorsData = null;\t\t\r\n\t}", "public Collection<V> getVertices();", "public IntPoint[] getVertices() {\n\t\treturn PointArrays.copy(vertices);\n\t}", "private void setVertices(Vertex[] vs){\n\t\t\n\t\tvertices = new ArrayList<>();\n\t\toriginalVertices = new ArrayList<>();\n\t\tdouble scalar = ViewSettings.getScalar4();\n\n\t\tfor(Vertex v : vs){\n\t\t\tvertices.add(new Vertex(v.getX() * scalar, v.getY() * scalar, v.getZ() * scalar, v.getW() * scalar));\n\t\t\toriginalVertices.add(new Vertex(v.getX(), v.getY(), v.getZ(), v.getW()));\n\t\t}\n\t}", "private void initMesh() {\n\t\tfloat[] vertices = { -1, -1, 0, 1, -1, 0, -1, 1, 0, 1, 1, 0 };\n\t\tfloat[] texCoords = { 0, 0, 1, 0, 0, 1, 1, 1 };\n\t\tint[] indices = { 0, 1, 2, 3 };\n\t\tmesh = new StaticMesh(gl, vertices, null, texCoords, indices);\n\t\tmesh.setPositionIndex(shader.getAttributeLocation(\"aVertexPosition\"));\n\t\tmesh.setNormalIndex(-1);\n\t\tmesh.setTexCoordIndex(shader.getAttributeLocation(\"aTextureCoord\"));\n\t\tmesh.setBeginMode(BeginMode.TRIANGLE_STRIP);\n\t}" ]
[ "0.6272297", "0.61520696", "0.6100609", "0.603955", "0.60072947", "0.60034573", "0.5987499", "0.5962561", "0.5950289", "0.5947953", "0.5940264", "0.5918363", "0.5874135", "0.58434397", "0.5831181", "0.5825421", "0.5819282", "0.57931364", "0.57726556", "0.5768122", "0.5755573", "0.57485074", "0.5744253", "0.5732672", "0.57235307", "0.57109004", "0.57036793", "0.56966025", "0.56567615", "0.56534374", "0.5650109", "0.56488425", "0.56336814", "0.56224227", "0.5614269", "0.5610682", "0.5602322", "0.5587041", "0.558629", "0.5582668", "0.557791", "0.5557583", "0.5557583", "0.55540985", "0.5552457", "0.55470014", "0.554242", "0.55334026", "0.55318046", "0.5527264", "0.5525267", "0.5519416", "0.55086917", "0.54891276", "0.54853445", "0.5477738", "0.5477722", "0.5468436", "0.5463992", "0.545068", "0.54368407", "0.54322636", "0.5428311", "0.5421163", "0.5412741", "0.5407199", "0.5384599", "0.53750765", "0.53725356", "0.5367594", "0.53571236", "0.5355483", "0.53539264", "0.5353047", "0.5346705", "0.53357327", "0.5335714", "0.53347605", "0.5334322", "0.53331715", "0.53321826", "0.5331446", "0.53292555", "0.532775", "0.53225225", "0.53158724", "0.5311328", "0.53092587", "0.53045446", "0.5296817", "0.5296506", "0.529302", "0.52877694", "0.528597", "0.5284251", "0.5280483", "0.5279759", "0.52602905", "0.52602524", "0.5254727" ]
0.6198718
1
Returns the list of faces
public int[][] getFaces() { return this.faces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Face[] getFaces() {\n return faces;\n }", "static FaceSegment[] allFaces() {\n FaceSegment[] faces = new FaceSegment[6];\n for (int i = 0; i < faces.length; i++) {\n faces[i] = new FaceSegment();\n }\n return faces;\n }", "public int faces() { \n return this.faces; \n }", "public int getFaces() {\n return this.faces;\n }", "public int[] getFace() {\n\t\treturn this.face;\n\t}", "public Rect[] getFaceRects()\n {\n final String funcName = \"getFaceRects\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n return faceRects;\n }", "java.util.List getSurfaceRefs();", "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 getFace() {\r\n return face;\r\n }", "public String getFace() {\r\n return face;\r\n }", "private Face chooseFace(ArrayList<Face> faces) {\n return faces.get(0);\n }", "public Face getFaceVitoriosa() {\n return faceVitoriosa;\n }", "public int getFaceCount() {\r\n return faceCount;\r\n\t}", "public String getFace() {\n\t\treturn face;\n\t}", "public int getFace() {\n\t\treturn face;\n\t}", "public FaceLandmarks faceLandmarks() {\n return this.faceLandmarks;\n }", "public Observable<FoundFacesInner> findFacesAsync() {\n return findFacesWithServiceResponseAsync().map(new Func1<ServiceResponse<FoundFacesInner>, FoundFacesInner>() {\n @Override\n public FoundFacesInner call(ServiceResponse<FoundFacesInner> response) {\n return response.body();\n }\n });\n }", "List<IFeature> getFeatureList();", "protected int getFace() {\n return face;\n }", "public int getFace(){\n return face;\n }", "public Observable<ServiceResponse<FoundFacesInner>> findFacesWithServiceResponseAsync() {\n if (this.client.baseUrl() == null) {\n throw new IllegalArgumentException(\"Parameter this.client.baseUrl() is required and cannot be null.\");\n }\n final Boolean cacheImage = null;\n String parameterizedHost = Joiner.on(\", \").join(\"{baseUrl}\", this.client.baseUrl());\n return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<FoundFacesInner>>>() {\n @Override\n public Observable<ServiceResponse<FoundFacesInner>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<FoundFacesInner> clientResponse = findFacesDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "public String getFace()\r\n {\r\n face = \"[\";\r\n if (color != \"none\")\r\n {\r\n face += this.color + \" \";\r\n }\r\n // Switch sttements to set diffrent faces \r\n switch(this.value)\r\n {\r\n default: face += String.valueOf(this.value); \r\n break;\r\n case 10: face += \"Skip\"; \r\n break;\r\n case 11: face += \"Reverse\"; \r\n break;\r\n case 12: face += \"Draw 2\"; \r\n break;\r\n case 13: face += \"Wild\"; \r\n break;\r\n case 14: face += \"Wild Draw 4\"; \r\n break;\r\n }\r\n face += \"]\";\r\n return face;\r\n }", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return SurfaceImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { SurfaceImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = SurfaceImpl.this.getFeatureArray(i);\r\n SurfaceImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "private List<Bitmap> processFaceResult(List<FirebaseVisionFace> faces, FirebaseVisionImage image, boolean keepOriginal) {\n final int FACE_IMG_WIDTH = 160;\n final int FACE_IMG_HEIGHT = 160;\n\n List<Bitmap> facesInFrame = new ArrayList<>();\n for (FirebaseVisionFace face : faces) {\n Rect bounds = face.getBoundingBox();\n Bitmap bitmap = cropBitmap(image.getBitmap(), bounds);\n if(keepOriginal == false) {\n bitmap = Bitmap.createScaledBitmap(bitmap, FACE_IMG_WIDTH, FACE_IMG_HEIGHT, true);\n }\n facesInFrame.add(bitmap);\n\n }\n return facesInFrame;\n }", "public interface FaceInterface {\n List<PointF> getFacePoints();\n\n List<PointF> getLeftEyePoints();\n\n List<PointF> getRightEyePoints();\n\n public List<PointF> transformPoints(DrawingViewConfig config, boolean mirrorPoints);\n\n public RectF getEyesRect();\n public Emotions getEmotions();\n Emojis getEmojis();\n Appearance getAppearance();\n}", "public FaceAttributes faceAttributes() {\n return this.faceAttributes;\n }", "public int getFace(){\n\t\treturn this.verdi;\n\t}", "private static List<ImgDescriptor> getDescriptors(Mat[] faces, String name) {\n \tList<ImgDescriptor> ret = new ArrayList<ImgDescriptor>();\n\t\tfor(int i = 0; i < faces.length; i++){\n \t\t// define a copy of the image in order to prevent extract method to modify the original properties\n \t\tMat tmpImg = new Mat(faces[i]);\n \t\tString id = i + \"_\" + name;\n \t\tfloat[] features = extractor.extract(tmpImg, ExtractionParameters.DEEP_LAYER);\n \t\tImgDescriptor tmp = new ImgDescriptor(features, id);\n \t\tret.add(tmp);\n \t\tSystem.out.println(\"Extracting features for \" + id);\n \t}\n\t\t\n\t\treturn ret;\n\t}", "public final Face getFace() {\n\t\treturn this.face;\n\t}", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "public int getFaceCount() {\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < getSegmentCount(); i++) {\n\t\t\tcount += getIndexCountInSegment(i);\n\t\t}\n\n\t\treturn count;\n\t}", "java.util.List<uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdge> \n getEdgeList();", "List<Feature> getFeatures();", "public java.util.List<V> getVertices();", "public List<Facet> facets() {\n return this.facets;\n }", "public ArrayList<Integer> getOutsideFaceIndices()\n\t{\n\t\t// now collect the indices of all faces that are referenced only once, i.e. the outside faces\n\t\tArrayList<Integer> outsideFaceIndices = new ArrayList<Integer>();\n\t\tfor(int i=0; i<faces.size(); i++)\n\t\t\t// is there exactly one reference to the face with index i?\n\t\t\tif(getFace(i).getNoOfFacesToOutside() == 0)\n\t\t\t\t// yes; add i to the list of outside-face indices\n\t\t\t\toutsideFaceIndices.add(i);\n\t\t\n\t\t// return the list of outside-face indices\n\t\treturn outsideFaceIndices;\n\t}", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "public ArrayList<DetectInfo> getAllDetects(){\n return orderedLandingPads;\n }", "public FaceRectangle faceRectangle() {\n return this.faceRectangle;\n }", "public Fence[] getFences() {\n/* 601 */ if (this.fences != null)\n/* 602 */ return (Fence[])this.fences.values().toArray((Object[])new Fence[this.fences.size()]); \n/* 603 */ return emptyFences;\n/* */ }", "java.util.List<org.stu.projector.Orientation> \n getOrientationsList();", "public interface FaceFinder {\n\n public CvFace[] detectFace(Bitmap bitmap);\n\n}", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "boolean allFacesPainted() {\n\n\n for (int i = 0; i < s; i ++){\n if (the_cube[i] == false){\n return false;\n\n }\n }\n return true;\n }", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "public int getFaceCount() {\n \tif (indicesBuf == null)\n \t\treturn 0;\n \tif(STRIPFLAG){\n \t\treturn indicesBuf.asShortBuffer().limit();\n \t}else{\n \t\treturn indicesBuf.asShortBuffer().limit()/3;\n \t}\n }", "static Bitmap detectfaces(Context context, Bitmap bitmap){\n Timber.d(\" timber start building DETECTOR\");\n FaceDetector detector=new FaceDetector.Builder(context)\n .setTrackingEnabled(false)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n .build();\n// detector.setProcessor(\n// new MultiProcessor.Builder<>(new GraphicFaceTrackerFactory())\n// .build());\n Timber.d(\" timber END building DETECTOR\");\n Bitmap resultBitmap = bitmap;\n if(detector.isOperational()) {\n Frame frame = new Frame.Builder().setBitmap(bitmap).build();\n Timber.d(\" timber START DETECTING FACES DETECTOR\");\n SparseArray<Face> faces = detector.detect(frame);\n Timber.d(\" timber END DETECTING FACES DETECTOR\");\n\n\n Timber.d(\"size of faces\" + faces.size());\n // Toast.makeText(context,\"number of faces detected = \"+faces.size(),Toast.LENGTH_LONG).show();\n if (faces.size() == 0) {\n Toast.makeText(context, \"No faces detected\", Toast.LENGTH_SHORT).show();\n } else {\n for (int i = 0; i < faces.size(); i++) {\n Face face = faces.valueAt(i);\n // getProbability(face);\n Emoji emo = whichEmoji(face);\n Bitmap emojibitmap;\n switch (emo) {\n case SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.smile);\n break;\n\n case RIGHT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwink);\n break;\n\n case LEFT_WINK:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwink);\n break;\n\n case CLOSED_EYE_SMILE:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_smile);\n break;\n\n case FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.frown);\n break;\n\n case LEFT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.leftwinkfrown);\n break;\n\n case RIGHT_WINK_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.rightwinkfrown);\n break;\n\n case CLOSED_EYE_FROWN:\n emojibitmap = BitmapFactory.decodeResource(context.getResources(), R.drawable.closed_frown);\n break;\n default:\n emojibitmap = null;\n Toast.makeText(context, R.string.no_emoji, Toast.LENGTH_LONG).show();\n }\n\n resultBitmap = addBitmapToFace(resultBitmap, emojibitmap, face);\n }\n }\n }else{\n Toast.makeText(context,\"detector failed\",Toast.LENGTH_SHORT).show();\n }\n detector.release();\n return resultBitmap;\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "public Figure[] getFigures() {\n return figures;\n }", "protected abstract void setFaces();", "public ArrayList<Edge> getListEdges(){\r\n return listEdges;\r\n }", "public ArrayList<String[]> getFavoritePairs() {\n ArrayList<String[]> favPairs = new ArrayList<>();\n for(Landmark landmark : landmarks.getFavorites()) {\n favPairs.add(new String[]{landmark.getName(), landmark.getLocation().toString(), landmark.getDescription()});\n }\n return favPairs;\n }", "java.util.List<? extends org.stu.projector.OrientationOrBuilder> \n getOrientationsOrBuilderList();", "private void faceDetection(){\n\n String haarPath = resToFile(R.raw.haarcascade_frontalface_default, \"haarcascade_frontalface_default.xml\");\n String testPicPath = resToFile(R.drawable.test_me, \"test_me.jpg\");\n\n CascadeClassifier faceDetector = new CascadeClassifier();\n Mat image = imread(testPicPath);\n boolean isEmpty = image.empty();\n\n faceDetector = new CascadeClassifier(haarPath);\n if(faceDetector.empty())\n {\n Log.v(\"MyActivity\",\"--(!)Error loading A\\n\");\n return;\n }\n else\n {\n Log.v(\"MyActivity\", \"Loaded cascade classifier from \" + haarPath);\n }\n\n //My Code\n MatOfRect faceDetections = new MatOfRect();\n faceDetector.detectMultiScale(image, faceDetections);\n\n System.out.println(String.format(\"Detected %s faces\", faceDetections.toArray().length));\n\n for (Rect rect : faceDetections.toArray()) {\n Imgproc.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n new Scalar(0, 255, 0));\n// Core.rectangle(image, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height),\n// new Scalar(0, 255, 0));\n }\n\n Bitmap bm = Bitmap.createBitmap(image.cols(), image.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(image, bm);\n\n ImageView imageView = (ImageView) findViewById(R.id.imageView);\n imageView.setImageBitmap(bm);\n }", "public void FPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(color);\r\n }", "public static void detectFaces(File file) throws Exception, IOException {\r\n\t\t List<AnnotateImageRequest> requests = new ArrayList<>();\r\n System.out.println(file.getPath());\r\n\r\n \r\n //convert picture file into original ByteString object and set values to request for google vision API\r\n\t\t ByteString imgBytes = ByteString.readFrom(new FileInputStream(file));\r\n\r\n\t\t Image img = Image.newBuilder().setContent(imgBytes).build();\r\n\t\t Feature feat = Feature.newBuilder().setType(Type.FACE_DETECTION).build();\r\n\t\t AnnotateImageRequest request =\r\n\t\t AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\r\n\t\t requests.add(request);\r\n\r\n //call google vision API engine and returns annotations of the image\r\n\t\t try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\r\n\t\t BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\r\n\t\t List<AnnotateImageResponse> responses = response.getResponsesList();\r\n\r\n\t\t for (AnnotateImageResponse res : responses) {\r\n\t\t if (res.hasError()) {\r\n\t\t System.out.printf(\"Error: %s\\n\", res.getError().getMessage());\r\n\t\t return;\r\n\t\t }\r\n\r\n\t\t // retrieve annotation value of each emotion\r\n\t\t for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\r\n\t\t int[] emoValue = {annotation.getAngerLikelihoodValue(),\r\n annotation.getJoyLikelihoodValue(),\r\n annotation.getSorrowLikelihoodValue(),\r\n annotation.getSurpriseLikelihoodValue(),\r\n };\r\n \r\n //choose highest annotation value of each emotion\r\n int max = 0;\r\n for (int i = 0; i < emoValue.length; i++){\r\n System.out.print(emoValue[i] + \" \");\r\n if (max < emoValue[i]){\r\n max = emoValue[i];\r\n index = i;\r\n }\r\n }\r\n //if all of emotion likelihood balue = 1, no expression\r\n if (max == 1){index = emotion.length-1;}\r\n System.out.println();\r\n System.out.println(emotion[index]);\r\n }\r\n\r\n\t\t }\r\n \r\n\t\t }catch (Exception e){\r\n System.out.println(e);\r\n }\r\n\r\n\t\t}", "java.util.List<? extends uk.ac.cam.acr31.features.javac.proto.GraphProtos.FeatureEdgeOrBuilder> \n getEdgeOrBuilderList();", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public boolean getFace() {\n return this.faceUp;\n }", "public void FEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE7, l1 = CUBE9, r1 = CUBE1, b1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t} \r\n \r\n \tColor color = faces.get(FRONT).get(CUBE1).getColor();\r\n \tfaces.get(FRONT).get(CUBE1).changeColor(faces.get(FRONT).get(CUBE7).getColor());\r\n \tfaces.get(FRONT).get(CUBE7).changeColor(faces.get(FRONT).get(CUBE9).getColor());\r\n \tfaces.get(FRONT).get(CUBE9).changeColor(faces.get(FRONT).get(CUBE3).getColor());\r\n \tfaces.get(FRONT).get(CUBE3).changeColor(color);\r\n \tcolor = faces.get(FRONT).get(CUBE2).getColor();\r\n \tfaces.get(FRONT).get(CUBE2).changeColor(faces.get(FRONT).get(CUBE4).getColor());\r\n \tfaces.get(FRONT).get(CUBE4).changeColor(faces.get(FRONT).get(CUBE8).getColor());\r\n \tfaces.get(FRONT).get(CUBE8).changeColor(faces.get(FRONT).get(CUBE6).getColor());\r\n \tfaces.get(FRONT).get(CUBE6).changeColor(color);\r\n }", "@Override\r\n public void onSuccess(List<Face> faces) {\n detectFaces(faces, mutableImage);\r\n hideProgress();\r\n bottom_sheet_recycler.getAdapter().notifyDataSetChanged();\r\n bottomSheetBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);\r\n\r\n faceDetectionCameraView.stop();\r\n\r\n imageView.setVisibility(View.VISIBLE);\r\n imageView.setImageBitmap(mutableImage);\r\n }", "List<IShape> getVisibleShapes();", "@Override\n public String[][] splitFaces( byte[] chars, boolean isUTF8 )\n {\n ArrayList<String[]> faces = new ArrayList<>();\n ByteArrayInputStream bais = new ByteArrayInputStream( chars );\n InputStreamReader isr;\n try {\n isr = new InputStreamReader( bais, isUTF8? \"UTF8\" : \"ISO8859_1\" );\n } catch( java.io.UnsupportedEncodingException uee ) {\n Log.i( TAG, \"splitFaces: %s\", uee.toString() );\n isr = new InputStreamReader( bais );\n }\n\n int[] codePoints = new int[1];\n\n // \"A aB bC c\"\n boolean lastWasDelim = false;\n ArrayList<String> face = null;\n for ( ; ; ) {\n int chr = -1;\n try {\n chr = isr.read();\n } catch ( java.io.IOException ioe ) {\n Log.w( TAG, ioe.toString() );\n }\n if ( -1 == chr ) {\n addFace( faces, face );\n break;\n } else if ( SYNONYM_DELIM == chr ) {\n Assert.assertNotNull( face );\n lastWasDelim = true;\n continue;\n } else {\n String letter;\n if ( chr < 32 ) {\n letter = String.format( \"%d\", chr );\n } else {\n codePoints[0] = chr;\n letter = new String( codePoints, 0, 1 );\n }\n // Ok, we have a letter. Is it part of an existing\n // one or the start of a new? If the latter, insert\n // what we have before starting over.\n if ( null == face ) { // start of a new, clearly\n // do nothing\n } else {\n Assert.assertTrue( 0 < face.size() );\n if ( !lastWasDelim ) {\n addFace( faces, face );\n face = null;\n }\n }\n lastWasDelim = false;\n if ( null == face ) {\n face = new ArrayList<>();\n }\n face.add( letter );\n }\n }\n\n String[][] result = faces.toArray( new String[faces.size()][] );\n return result;\n }", "public List<wVertex> getVertices(){\r\n return vertices;\r\n }", "public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}", "public void inferFacesFromEdges()\n\tthrows InconsistencyException\n\t{\n\t\t// first empty the list of faces\n\t\tif(faces == null)\n\t\t\tfaces = new ArrayList<Face>();\n\t\telse\n\t\t\tfaces.clear();\n\n\t\t// go through all vertices\n\t\tfor(int v=0; v<vertices.size(); v++)\n\t\t{\n\t\t\t// first find all edges with vertex #v and other vertex #w, where w>v\n\t\t\t// (if w<v, then that face will already have been detected earlier)...\n\t\t\t\n\t\t\t// ... by creating an array that will hold the edge indices...\n\t\t\tArrayList<Integer> indicesOfEdgesAtVertex = new ArrayList<Integer>();\n\t\t\t\n\t\t\t// ... and populating it by going through all the edges\n\t\t\tfor(int e=0; e<edges.size(); e++)\n\t\t\t{\n\t\t\t\t// does edge #e start or finish at vertex #v, and if so is the index of the other vertex >v?\n\t\t\t\tif(edges.get(e).getOtherVertexIndex(v) > v)\n\t\t\t\t{\n\t\t\t\t\t// yes\n\t\t\t\t\t\n\t\t\t\t\t// add it to the list of edges that start or finish at this vertex\n\t\t\t\t\tindicesOfEdgesAtVertex.add(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// System.out.println(\"SimplicialComplex::inferFacesFromEdges: indices of edges meeting at vertex #\"+v+\": \" + indicesOfEdgesAtVertex.toString());\n\t\t\t\n\t\t\t// second, go through all pairs of edges that start or finish at vertex #v;\n\t\t\t// each such pair represents two of the three edges of a face that meets at vertex #v\n\t\t\tfor(int e1=0; e1<indicesOfEdgesAtVertex.size(); e1++)\n\t\t\t\tfor(int e2=e1+1; e2<indicesOfEdgesAtVertex.size(); e2++)\n\t\t\t\t{\n\t\t\t\t\t// create an empty face\n\t\t\t\t\tFace face = new Face(this);\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: e1=\" + e1 + \", e2=\" + e2);\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: edges: \"+edges.get(indicesOfEdgesAtVertex.get(e1)) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)));\n//\t\t\t\t\tSystem.out.println(\"SimplicialComplex::inferFacesFromEdges: other vertex indices: \"+edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v) + \", \" + edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\n\t\t\t\t\t// set the face's vertex indices...\n\t\t\t\t\tface.setVertexIndices(v, edges.get(indicesOfEdgesAtVertex.get(e1)).getOtherVertexIndex(v), edges.get(indicesOfEdgesAtVertex.get(e2)).getOtherVertexIndex(v));\n\t\t\t\t\t\n\t\t\t\t\t// ... and from these infer the edge indices\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// see if it is possible to infer the edges...\n\t\t\t\t\t\tface.inferEdgeIndices();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// ... and if it is, add the face to the list of faces\n\t\t\t\t\t\tfaces.add(face);\n\t\t\t\t\t} catch (InconsistencyException e) {}\n\t\t\t\t}\n\t\t}\n\t}", "@DISPID(1610940431) //= 0x6005000f. The runtime will prefer the VTID if present\n @VTID(37)\n Collection userSurfaces();", "public int getFaceValue ()\n {\n return faceValue;\n }", "public final native GEFeatureContainer getFeatures() /*-{\r\n\t\treturn this.getFeatures();\r\n\t}-*/;", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "public double getFaceValue(){\n\t\t\n\t\treturn face ;\n\t}", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public Iterable<Floor> getFloors() {\n return mFloors;\n }", "public Set<VCube> getSupportedCubes();", "@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}", "public Enumeration vertices();", "List<F> getChunks();", "public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }", "public static String detectFacesGcs(String gcsPath) throws IOException {\n \tSystem.out.println(\"Enter Face detection\");\n List<AnnotateImageRequest> requests = new ArrayList<AnnotateImageRequest>();\n StringBuilder sb = new StringBuilder();\n ImageSource imgSource = ImageSource.newBuilder().setGcsImageUri(gcsPath).build();\n Image img = Image.newBuilder().setSource(imgSource).build();\n Feature feat = Feature.newBuilder().setType(Feature.Type.FACE_DETECTION).build();\n \n AnnotateImageRequest request =\n AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();\n requests.add(request);\n try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {\n \t\tSystem.out.println(\" Face detection request sent\");\n BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);\n List<AnnotateImageResponse> responses = response.getResponsesList();\n System.out.println(\" Face detection response recieved\");\n for (AnnotateImageResponse res : responses) {\n if (res.hasError()) {\n System.out.format(\"Error: %s%n\", res.getError().getMessage());\n return \"\";\n }\n sb.append(\"{\");\n for (FaceAnnotation annotation : res.getFaceAnnotationsList()) {\n \t sb.append(\"\\\"anger\\\":\");sb.append('\"');\n \t sb.append(annotation.getAngerLikelihood().toString());\n \t sb.append('\"');sb.append(\",\");sb.append(\"\\\"joy\\\":\"); sb.append('\"');\n \t sb.append( annotation.getJoyLikelihood().toString());\n \t sb.append('\"'); sb.append(\",\");sb.append(\"\\\"suprise\\\":\");sb.append('\"');\n \t sb.append(annotation.getSurpriseLikelihood().toString());\n \t sb.append('\"');\n }\n sb.append(\"}\");}}return sb.toString();}", "public UUID faceId() {\n return this.faceId;\n }", "public Vector<Edge> getEdges(){\n\t\treturn this.listOfEdges;\n\t}", "java.util.List<java.lang.String> getFeaturesList();", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public Vector3f[] getVertices() {\n return vertices;\n }", "public void LPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1, backCube = CUBE9;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(BOTTOM).get(cube).getColor());\r\n \tfaces.get(BOTTOM).get(cube).changeColor(faces.get(BACK).get(backCube).getColor());\r\n \tfaces.get(BACK).get(backCube).changeColor(faces.get(TOP).get(cube).getColor());\r\n \tfaces.get(TOP).get(cube).changeColor(color);\r\n \tcube += SHIFT_ROW;\r\n \tbackCube -= SHIFT_ROW;\r\n \t\r\n \t} \r\n \r\n \tColor color = faces.get(LEFT).get(CUBE1).getColor();\r\n \tfaces.get(LEFT).get(CUBE1).changeColor(faces.get(LEFT).get(CUBE3).getColor());\r\n \tfaces.get(LEFT).get(CUBE3).changeColor(faces.get(LEFT).get(CUBE9).getColor());\r\n \tfaces.get(LEFT).get(CUBE9).changeColor(faces.get(LEFT).get(CUBE7).getColor());\r\n \tfaces.get(LEFT).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(LEFT).get(CUBE2).getColor();\r\n \tfaces.get(LEFT).get(CUBE2).changeColor(faces.get(LEFT).get(CUBE6).getColor());\r\n \tfaces.get(LEFT).get(CUBE6).changeColor(faces.get(LEFT).get(CUBE8).getColor());\r\n \tfaces.get(LEFT).get(CUBE8).changeColor(faces.get(LEFT).get(CUBE4).getColor());\r\n \tfaces.get(LEFT).get(CUBE4).changeColor(color);\r\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "public ArrayList<FraisHF> getListFraisH() {\n return listeFraisHf;\n }", "FaceListAdapter(Face[] detectionResult) {\n faces = new ArrayList<>();\n faceThumbnails = new ArrayList<>();\n mIdentifyResults = new ArrayList<>();\n\n if (detectionResult != null) {\n faces = Arrays.asList(detectionResult);\n for (Face face: faces) {\n try {\n // Crop face thumbnail with five main landmarks drawn from original image.\n faceThumbnails.add(ImageHelper.generateFaceThumbnail(\n mBitmap, face.faceRectangle));\n } catch (IOException e) {\n // Show the exception when generating face thumbnail fails.\n setInfo(e.getMessage());\n }\n }\n }\n }", "public Collection<V> getVertices();", "public Set<Frage> getAlleFragen() {\r\n Set<Frage> result = new HashSet<Frage>();\r\n Set<FrageDTO> fragen = dataStore.getAlleFragen();\r\n for (FrageDTO dto : fragen) {\r\n int frageId = dto.getId();\r\n List<String> antworten = dataStore.getAntwortenById(frageId);\r\n List<Integer> votes = dataStore.getVotings(frageId);\r\n Frage frage = new Frage(dto.getId(), dto.getText(),\r\n dto.getStatus(), antworten, votes);\r\n result.add(frage);\r\n }\r\n return result;\r\n }", "public void DPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE7;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(RIGHT).get(cube).getColor());\r\n \tfaces.get(RIGHT).get(cube).changeColor(faces.get(BACK).get(cube).getColor());\r\n \tfaces.get(BACK).get(cube).changeColor(faces.get(LEFT).get(cube).getColor());\r\n \tfaces.get(LEFT).get(cube).changeColor(color);\r\n \tcube++;\r\n \t} \r\n \r\n \tColor color = faces.get(BOTTOM).get(CUBE1).getColor();\r\n \tfaces.get(BOTTOM).get(CUBE1).changeColor(faces.get(BOTTOM).get(CUBE3).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE3).changeColor(faces.get(BOTTOM).get(CUBE9).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE9).changeColor(faces.get(BOTTOM).get(CUBE7).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(BOTTOM).get(CUBE2).getColor();\r\n \tfaces.get(BOTTOM).get(CUBE2).changeColor(faces.get(BOTTOM).get(CUBE6).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE6).changeColor(faces.get(BOTTOM).get(CUBE8).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE8).changeColor(faces.get(BOTTOM).get(CUBE4).getColor());\r\n \tfaces.get(BOTTOM).get(CUBE4).changeColor(color);\r\n }", "java.util.List<org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Camera> \n getCameraList();", "public List<FacetRequest> facets() {\n return this.facets;\n }", "public Iterable<Vertex> getVertices() {\n return mVertices.values();\n }", "public void BPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint u1 = CUBE1, l1 = CUBE7, b1 = CUBE9, r1 = CUBE3;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(TOP).get(u1).getColor();\r\n \tfaces.get(TOP).get(u1).changeColor(faces.get(LEFT).get(l1).getColor());\r\n \tfaces.get(LEFT).get(l1).changeColor(faces.get(BOTTOM).get(b1).getColor());\r\n \tfaces.get(BOTTOM).get(b1).changeColor(faces.get(RIGHT).get(r1).getColor());\r\n \tfaces.get(RIGHT).get(r1).changeColor(color);\r\n \tu1++;\r\n \tl1 -= SHIFT_ROW;\r\n \tb1--;\r\n \tr1 += SHIFT_ROW;\r\n \t\r\n \t} \r\n \r\n \tColor color = faces.get(BACK).get(CUBE1).getColor();\r\n \tfaces.get(BACK).get(CUBE1).changeColor(faces.get(BACK).get(CUBE3).getColor());\r\n \tfaces.get(BACK).get(CUBE3).changeColor(faces.get(BACK).get(CUBE9).getColor());\r\n \tfaces.get(BACK).get(CUBE9).changeColor(faces.get(BACK).get(CUBE7).getColor());\r\n \tfaces.get(BACK).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(BACK).get(CUBE2).getColor();\r\n \tfaces.get(BACK).get(CUBE2).changeColor(faces.get(BACK).get(CUBE6).getColor());\r\n \tfaces.get(BACK).get(CUBE6).changeColor(faces.get(BACK).get(CUBE8).getColor());\r\n \tfaces.get(BACK).get(CUBE8).changeColor(faces.get(BACK).get(CUBE4).getColor());\r\n \tfaces.get(BACK).get(CUBE4).changeColor(color);\r\n }", "List<String> getFeatures();", "public void UPrimeEvent(ArrayList<ArrayList<Shape>> faces) {\r\n \tint cube = CUBE1;\r\n \tfor(int i = 0; i < 3; i++) {\r\n \t\tColor color = faces.get(FRONT).get(cube).getColor();\r\n \tfaces.get(FRONT).get(cube).changeColor(faces.get(LEFT).get(cube).getColor());\r\n \tfaces.get(LEFT).get(cube).changeColor(faces.get(BACK).get(cube).getColor());\r\n \tfaces.get(BACK).get(cube).changeColor(faces.get(RIGHT).get(cube).getColor());\r\n \tfaces.get(RIGHT).get(cube).changeColor(color);\r\n \tcube++;\r\n \t} \r\n \r\n \tColor color = faces.get(TOP).get(CUBE1).getColor();\r\n \tfaces.get(TOP).get(CUBE1).changeColor(faces.get(TOP).get(CUBE3).getColor());\r\n \tfaces.get(TOP).get(CUBE3).changeColor(faces.get(TOP).get(CUBE9).getColor());\r\n \tfaces.get(TOP).get(CUBE9).changeColor(faces.get(TOP).get(CUBE7).getColor());\r\n \tfaces.get(TOP).get(CUBE7).changeColor(color);\r\n \tcolor = faces.get(TOP).get(CUBE2).getColor();\r\n \tfaces.get(TOP).get(CUBE2).changeColor(faces.get(TOP).get(CUBE6).getColor());\r\n \tfaces.get(TOP).get(CUBE6).changeColor(faces.get(TOP).get(CUBE8).getColor());\r\n \tfaces.get(TOP).get(CUBE8).changeColor(faces.get(TOP).get(CUBE4).getColor());\r\n \tfaces.get(TOP).get(CUBE4).changeColor(color);\r\n }" ]
[ "0.8220528", "0.7658844", "0.7405497", "0.7400151", "0.68536735", "0.6538878", "0.6307922", "0.6165371", "0.60908055", "0.60908055", "0.6036322", "0.60187143", "0.60085726", "0.5968117", "0.5942875", "0.590417", "0.590194", "0.5883003", "0.5882622", "0.5879941", "0.58714074", "0.58530545", "0.5790284", "0.5753748", "0.5745413", "0.5742044", "0.57076144", "0.5687871", "0.56716824", "0.5645874", "0.5601913", "0.55689657", "0.55588764", "0.55371076", "0.5514792", "0.5508931", "0.55038846", "0.5502922", "0.5486301", "0.5467396", "0.5460953", "0.5411552", "0.53995234", "0.53987014", "0.5342768", "0.5317501", "0.5316694", "0.53146064", "0.5313561", "0.5313561", "0.5300341", "0.5284073", "0.5274583", "0.5265885", "0.5260204", "0.5247809", "0.5236141", "0.5226798", "0.5226064", "0.52177036", "0.5206656", "0.51832986", "0.5181501", "0.51629734", "0.5158907", "0.5154997", "0.51511675", "0.51480573", "0.51466876", "0.514429", "0.5137372", "0.51344526", "0.5132561", "0.51303893", "0.51293695", "0.51259875", "0.5124311", "0.5118333", "0.5114012", "0.51125205", "0.5109302", "0.51050836", "0.51003504", "0.51002055", "0.5098002", "0.5097001", "0.50947577", "0.50946367", "0.5085937", "0.5084094", "0.5084088", "0.5083785", "0.5082017", "0.5075609", "0.5071823", "0.50534093", "0.5052539", "0.5050816", "0.5047949", "0.5043512" ]
0.7683649
1
Returns the list of vertices
public Vector[] getVerts() { return this.verts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<V> getVertices();", "List<V> getVertexList();", "public List<Vertex> vertices() {\n return Collections.unmodifiableList(this.vertices);\n }", "Set<Vertex> getVertices();", "@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}", "public Collection<V> getVertices();", "public Vertex[] getVertices() {\n return arrayOfVertices;\n }", "public Vertex[] getVertices() {\n\t\treturn this._vertices.toArray(new Vertex[0]);\n\t}", "public Iterable<Vertex> getVertices() {\n return mVertices.values();\n }", "public List<Vertex> findAllVertices() throws SQLException {\n\t\treturn rDb.findAllVertices();\n\t}", "public Vector3f[] getVertices() {\n return vertices;\n }", "public List<wVertex> getVertices(){\r\n return vertices;\r\n }", "public Set<V> getVertices();", "public Set<V> getVertices();", "public List<Vertex> getVertices() {\n\t\treturn AdjacencyMatrixGraph.cloneList(vertexList);\n\t}", "public Set<String> getVertices() {\n\t\treturn vertices;\n\t}", "public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}", "@Override public Set<L> vertices() {\r\n return new HashSet<L>(vertices);//防御式拷贝\r\n }", "public Collection<GJPoint2D> vertices() {\n\t\tArrayList<GJPoint2D> vertices = new ArrayList<GJPoint2D>(this.segments.size());\n\t\t\n\t\t// iterate on segments, and add the control points of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\tvertices.add(p);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// return the set of vertices\n\t\treturn vertices;\n\t}", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n return world.keySet();\n }", "Iterable<Long> vertices() {\n return nodes.keySet();\n }", "@Override\r\n public List<Vertex> getVertices() {\r\n List<Vertex> verticesList = new LinkedList<>(adjacencyList.keySet()); //getting the key set of adjacencyList i.e, a list of all vertices\r\n Collections.sort(verticesList, Comparator.comparing(Vertex::getLabel));\r\n return verticesList;\r\n }", "@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }", "public E[] verticesView ()\n {\n E[] allVertices = (E[]) new Object[lastIndex + 1];\n for (int index = 0; index < allVertices.length; index++)\n allVertices[index] = this.vertices[index];\n\n return allVertices;\n }", "public Vertex[] getVertices() {\n return new Vertex[]{v1, v2};\n }", "public HashMap<Integer, Vertex> getVertices() {\n\t\treturn vertices;\n\t}", "@Override\n public Set<Vertex> getVertices() {\n Set<Vertex> vertices = new HashSet<Vertex>();\n vertices.add(sourceVertex);\n vertices.add(targetVertex);\n return vertices;\n }", "public Collection<Vertex> vertices() { \n //return myGraph.keySet(); OLD\n //create a copy of all the vertices in the map to restrict any reference\n //to the interals of this class\n Collection<Vertex> copyOfVertices = new ArrayList<Vertex>();\n copyOfVertices.addAll(myGraph.keySet());\n return copyOfVertices;\n }", "Iterable<Long> vertices() {\n //YOUR CODE HERE, this currently returns only an empty list.\n ArrayList<Long> verticesIter = new ArrayList<>();\n verticesIter.addAll(adj.keySet());\n return verticesIter;\n }", "public IntPoint[] getVertices() {\n\t\treturn PointArrays.copy(vertices);\n\t}", "public Set<GeographicPoint> getVertices()\n\t{\n\t\t//TODO: Implement this method in WEEK 3\n\t\tSet<GeographicPoint> ans = new HashSet<GeographicPoint> ();\n\t\tfor (GeographicPoint curr : map.keySet()) {\n\t\t\tif (!ans.contains(curr)) {\n\t\t\t\tans.add(curr);\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "Iterator<Vertex<V, E, M>> getVertices() {\n return this.vertices.values().iterator();\n }", "protected LinkedList<Vertex> getVertexList() {\n\t\tLinkedList<Vertex> returnList = new LinkedList<Vertex>();\n\n\t\t// Add family\n\t\tif (this.getFamily() != null) {\n\t\t\treturnList = this.getFamily().getFamilyVertexList();\n\t\t}\n\t\treturnList.add(this);\n\t\treturn returnList;\n\t}", "public Set<String> getVertices()\r\n\t{\r\n\t\treturn this.dataMap.keySet();\r\n\t}", "public ArrayList< Vertex > adjacentVertices( ) {\n return adjacentVertices;\n }", "private List<Integer> vertices(int num) {\n List<Integer> list = new LinkedList<>();\n for (int i = 0; i < num; i++) {\n list.add(i);\n }\n return list;\n }", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "@Override\n\tpublic List<Location> getVertices() {\n\t\treturn locations;\n\t}", "public Collection<LazyNode2> getVertices() {\n List<LazyNode2> l = new ArrayList();\n \n for(Path p : getActiveTraverser())\n //TODO: Add cache clearing\n l.add(new LazyNode2(p.endNode().getId()));\n \n return l;\n }", "List<V> getAdjacentVertexList(V v);", "int getVertices();", "public HashSet<Town> getVertices() {\r\n\t\treturn (HashSet<Town>) vertices;\r\n\t}", "public Enumeration vertices();", "public int[] getVertices() {\n long cPtr = RecastJNI.rcContour_verts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfVertices() * 4);\n }", "public int getVertices() {\n return verticesNumber;\n }", "public abstract Vector2[] getVertices();", "public Vertice[] getSelectedVertices(){\n\t\tVertice selectedVertice;\n\t\tVertice[] vertices = new Vertice[getSelectedModelVerticeCount()];\n\t\tint index = 0;\n\t\tfor(int i = 0; i < getModelVerticesCount(); i++){\n\t\t\tselectedVertice = getModelVertice(i);\n\t\t\tif(selectedVertice.isSelected)\n\t\t\t\tvertices[index++] = selectedVertice;\n\t\t}\n\t\treturn vertices;\n\t}", "@Override\n public VertexCollection getVertexCollection() {\n return this.vertices.copy();\n }", "public Set<Integer> getVertexKeys() {\n\t\treturn vertices.keySet();\n\t}", "public Collection<V> getOtherVertices(V v);", "public List<FactoryArrayStorage<?>> getVertices() {\n return mFactoryVertices;\n }", "public Collection< VKeyT > vertexKeys();", "private List<Vertice> pegaVerticesFolha() {\n List<Vertice> verticesFolha = new ArrayList<Vertice>();\n\n for (Vertice vertice : this.pegaTodosOsVerticesDoGrafo()) {\n if (this.getGrauDeSaida(vertice) == 0) {\n verticesFolha.add(vertice);\n }\n }\n\n return verticesFolha;\n }", "@Override\r\n\tpublic Vector2f[] getVertices() {\n\t\treturn null;\r\n\t}", "public Collection< VDataT > vertexData();", "public Collection<Set<V>> getVertexPartitions() {\n\t\tif (vertex_sets == null) {\n\t\t\tthis.vertex_sets = new HashSet<Set<V>>();\n\t\t\tthis.vertex_sets.addAll(vertex_partition_map.values());\n\t\t}\n\t\treturn vertex_sets;\n\t}", "public Vertex [] getSortedVertexArray() {\n\t\tVertex [] array = new Vertex[_vertices.size()];\n\t\tint index = 0;\n\t\tfor (Vertex v : _vertices) {\n\t\t\tarray[index++] = v;\n\t\t}\n\t\t// sort\n\t\tArrays.sort(array);\n\t\treturn array;\n\t}", "@Override\n public Iterable<E> getAllVertices() {\n return dictionary.keySet();\n }", "public ArrayList<Triangle> getOccluderVertexData();", "public List<Vertice> get_list_roots() {\n\t\tList<Vertice> list_roots = new ArrayList<Vertice>();\n\t\tfor (Vertice v1 : vertices.values()) {\n\t\t\tif (v1.parent == null)\n\t\t\t\tlist_roots.add(v1);\n\t\t}\n\t\treturn list_roots;\n\t}", "public Iterator<Integer> getVertexIterator() {\n\t\treturn vertices.keySet().iterator();\n\t}", "void getVertices() {\r\n\t\tSystem.out.println(\"Enter your vertices:\");\r\n\t\tarrIndexToVertexMap = new HashMap<>();\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < numberOfVertices; i++) {\r\n\t\t\t\tarrIndexToVertexMap.put(i, sc.next());\r\n\t\t\t}\r\n\t\t\tsc.close();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tSystem.out.println(\"Error at method:: getVertices || Description:\" + re);\r\n\t\t}\r\n\t}", "public void setVertices(){\n\t\tvertices = new ArrayList<V>();\n\t\tfor (E e : edges){\n\t\t\tV v1 = e.getOrigin();\n\t\t\tV v2 = e.getDestination();\n\t\t\tif (!vertices.contains(v1))\n\t\t\t\tvertices.add(v1);\n\t\t\tif (!vertices.contains(v2))\n\t\t\t\tvertices.add(v2);\n\t\t}\n\t}", "public Collection<V> getOtherVertices(Collection<V> vs);", "@Override\r\n\tpublic int getOrder() {\r\n\t\treturn vertices.size();\r\n\t}", "public Position[] getVertexPosition() {\n Position[] positions = new Position[4];\n positions[0] = position;\n positions[1] = new Position(position.getX(), position.getY()+sizeL);\n positions[2] = new Position(position.getX()+sizeL, position.getY()+sizeL);\n positions[3] = new Position(position.getX()+sizeL, position.getY());\n\n return positions;\n }", "@Override\n\tpublic Iterator<E> iterator() {\n\t\treturn vertices.iterator();\n\t}", "public int getNumVertices() {\n\t\treturn vertices.size();\n\t}", "public int getNumVertices() {\n return num_vertices;\n }", "public int getVertices() {\n return mPolygonShapeSpec.getNumVertex();\n }", "public Vector3f[] getFaceVertices(int faceNumber) {\n\n\t\tint segmentNumber = 0;\n\n\t\tint indexNumber = faceNumber;\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\twhile (indexNumber >= getIndexCountInSegment(segmentNumber)) {\n\t\t\tindexNumber -= getIndexCountInSegment(segmentNumber);\n\t\t\tsegmentNumber++;\n\t\t}\n\n\t\t// debug.println(\"segmentNumber, indexNumber = \" + segmentNumber + \" \" +\n\t\t// indexNumber);\n\n\t\tint[] vertindexes = getModelVerticeIndicesInSegment(segmentNumber, indexNumber);\n\n\t\t// parent.println(vertindexes);\n\n\t\tVector3f[] tmp = new Vector3f[vertindexes.length];\n\n\t\tfor (int i = 0; i < tmp.length; i++) {\n\t\t\ttmp[i] = new Vector3f();\n\t\t\ttmp[i].set(getModelVertice(vertindexes[i]));\n\t\t}\n\n\t\treturn tmp;\n\t}", "public void displayAsList()\n\t{\n\t\tSystem.out.println(\"Printing all vertices\");\n\t\tvertices.show();\n\t}", "Vertex getVertex();", "public int numVertices() { return numV; }", "private static ImmutableList<WorldCoord> generateVertexList()\r\n {\n\t return ShapeReader.getWorldCoordsFromResource(RESOURCE);\r\n }", "@Override\r\n public int size() {\r\n return vertices.size();\r\n }", "public int getVertexCount();", "public ArrayList<ArrayList<Double>> parseVertices() {\n\t\tArrayList<ArrayList<Double>> ret = new ArrayList<ArrayList<Double>>();\n\t\tString file = getFilepath();\n\t\ttry {\n\t\t\tFile myObj = new File(file);\n\t\t\tScanner myReader = new Scanner(myObj);\n\t\t\twhile (myReader.hasNextLine()) {\n\t\t\t\tString data = myReader.nextLine();\n\t\t\t\tif (data.length() > 2 && data.substring(0,2).equals(\"v \")) {\n\t\t\t\t\tString[] s = data.split(\" \");\n\t\t\t\t\tArrayList<Double> v = new ArrayList<Double>();\n\t\t\t\t\tv.add(Double.parseDouble(s[1]));\n\t\t\t\t\tv.add(Double.parseDouble(s[2]));\n\t\t\t\t\tv.add(Double.parseDouble(s[3]));\n\t\t\t\t\tret.add(v);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmyReader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"An error occurred.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn ret;\n\n\t}", "public int getVertexCount() {\n\t\treturn this._vertices.size();\n\t}", "List<Edge<V>> getEdgeList();", "public PosicionVertice[] getVertices(PosicionVertice rpv[]) {\n \n // inicializacion\n rpv = (rpv == null) ? new PosicionVertice[2] : rpv;\n for (int i=0; i<rpv.length; i++) {\n rpv[i] = (rpv[i] == null) ? new PosicionVertice() : rpv[i];\n }\n normaliza();\n \n switch(getOrientacion()) {\n case Este:\n rpv[0].setPos(getX(), getY()-1);\n rpv[0].setOrientacion(OrientacionVertice.Sur);\n rpv[1].setPos(getX()+1, getY());\n rpv[1].setOrientacion(OrientacionVertice.Norte);\n break;\n case NorEste:\n rpv[0].setPos(getX(), getY());\n rpv[0].setOrientacion(OrientacionVertice.Norte);\n rpv[1].setPos(getX(), getY()-1);\n rpv[1].setOrientacion(OrientacionVertice.Sur);\n break; \n case NorOeste:\n rpv[0].setPos(getX(), getY());\n rpv[0].setOrientacion(OrientacionVertice.Norte);\n rpv[1].setPos(getX()-1, getY());\n rpv[1].setOrientacion(OrientacionVertice.Sur);\n break; \n }\n return rpv;\n }", "public static ArrayList<Vertex> initializeGraph() {\n\t\tVertex uVertex = new Vertex('u');\n\t\tVertex vVertex = new Vertex('v');\n\t\tVertex wVertex = new Vertex('w');\n\t\tVertex xVertex = new Vertex('x');\n\t\tVertex yVertex = new Vertex('y');\n\t\tVertex zVertex = new Vertex('z');\n\t\t\n\t\tVertex[] uAdjacencyList = {xVertex, vVertex};\n\t\tuVertex.setAdjacencyList(createArrayList( uAdjacencyList ));\n\t\t\n\t\tVertex[] vAdjacencyList = {yVertex};\n\t\tvVertex.setAdjacencyList(createArrayList( vAdjacencyList ));\n\t\t\n\t\tVertex[] wAdjacencyList = {zVertex, yVertex};\n\t\twVertex.setAdjacencyList(createArrayList( wAdjacencyList ));\n\t\t\n\t\tVertex[] xAdjacencyList = {vVertex};\n\t\txVertex.setAdjacencyList(createArrayList( xAdjacencyList ));\n\t\t\n\t\tVertex[] yAdjacencyList = {xVertex};\n\t\tyVertex.setAdjacencyList(createArrayList( yAdjacencyList ));\n\t\t\n\t\tVertex[] zAdjacencyList = {zVertex};\n\t\tzVertex.setAdjacencyList(createArrayList( zAdjacencyList ));\n\n\t\tVertex[] graph = { uVertex, vVertex, wVertex, xVertex, yVertex, zVertex};\n\t\treturn createArrayList( graph );\n\n\t}", "public ArrayList<Point3D> getVertex(Block bl) {\r\n\t\tArrayList<Point3D> pivot = new ArrayList<Point3D>();\r\n\t\tpivot.add(bl.getpoint_BlockTopLeft());\r\n\t\tpivot.add(bl.getpoint_BlockTopRight());\r\n\t\tpivot.add(bl.getPoint_BlockDownRight());\r\n\t\tpivot.add(bl.getpoint_BlockDownleft());\r\n\t\treturn pivot;\r\n\t}", "public String getVertex() {\n\t\treturn vertices.get(0);\n\t}", "public int getNumberOfVertices();", "public Vertex<V>[] getEndpoints() { return endpoints; }", "public Vertex[] getVertexOrder() {\n\t\treturn vertexOrder;\n\t}", "int getNumberOfVertexes();", "public Set<V> getNeighbours(V vertex);", "public Object getVertex(){\r\n return this.vertex;\r\n }", "@Override\n\tpublic int graphOrder() {\n\t\treturn vertices.size();\n\t}", "public ArrayList<Integer> visitAll(int startVertex) {\n ArrayList<Integer> result = new ArrayList<Integer>();\n Iterator<Integer> iter = new DFSIterator(startVertex);\n while (iter.hasNext()) {\n result.add(iter.next());\n }\n return result;\n }", "public static Vec2[] verticesOfPath2D(Path2D.Float p, int n) {\n Vec2[] result = new Vec2[n];\n float[] values = new float[6];\n PathIterator pi = p.getPathIterator(null);\n int i = 0;\n while (!pi.isDone() && i < n) {\n int type = pi.currentSegment(values);\n if (type == PathIterator.SEG_LINETO) {\n result[i++] = new Vec2(values[0], values[1]);\n }\n pi.next();\n }\n return result;\n }", "public static float[] getMeshVertices(GVRMesh mesh) {\n GVRVertexBuffer vertexBuffer = mesh.getVertexBuffer();\n FloatBuffer floatBuffer = vertexBuffer.getFloatVec(\"a_position\");\n int count = floatBuffer.remaining();\n float[] vertices = new float[count];\n floatBuffer.get(vertices);\n // For 3.3 this still works\n// float[] vertices = mesh.getVertices(); // Throws UnsupportedOperationException in 4.0\n return vertices;\n }", "public int getNumVertices();", "public int getNumVertices(){\n return numVertices;\n }", "public V getVertex(int index);", "public ArrayList<Integer> visitAll(int startVertex) {\n ArrayList<Integer> result = new ArrayList<Integer>();\n Iterator<Integer> iter = new DFSIterator(startVertex);\n\n while (iter.hasNext()) {\n result.add(iter.next());\n }\n return result;\n }", "private ArrayList<Vertex> getProjectedVertices4(){\n\t\t\n\t\tArrayList<Vertex> projectedVertices = new ArrayList<>(); // To store the projection of each vertex\n\t\t\n\t\t// Transform each vertex from world coordinates to eye coordinates\n\t\tfor(Vertex v : vertices){\n\t\t\tprojectedVertices.add(v.transform4());\n\t\t}\n\t\t\n\t\tfor(Vertex v : projectedVertices){\n\n\t\t\t// Get perspective projection onto 3D region\n\t\t\tVertex projection = v.perspectiveProjection4();\n\t\t\tv.setX(projection.getX());\n\t\t\tv.setY(projection.getY());\n\t\t\tv.setZ(projection.getZ());\n\t\t\t\n\t\t\t// Map to viewbox\n\t\t\tprojection = v.mapToViewbox();\n\t\t\tv.setX(projection.getX());\n\t\t\tv.setY(projection.getY());\n\t\t\tv.setZ(projection.getZ());\n\t\t}\n\t\t\n\t\treturn projectedVertices;\n\t}", "public int[] getRawVertices() {\n long cPtr = RecastJNI.rcContour_rverts_get(swigCPtr, this);\n if (cPtr == 0) {\n return null;\n }\n return Converter.convertToInts(cPtr, getNumberOfRawVertices() * 4);\n }" ]
[ "0.867833", "0.8463351", "0.83876854", "0.82238406", "0.8214296", "0.80935305", "0.8004439", "0.7995259", "0.79060954", "0.7890604", "0.78856665", "0.78736824", "0.78621477", "0.78621477", "0.7859628", "0.7762643", "0.77407455", "0.7714698", "0.7706783", "0.7689764", "0.7658129", "0.7633414", "0.7596252", "0.7593918", "0.75698066", "0.75628495", "0.7510215", "0.7454506", "0.7448729", "0.740904", "0.7398104", "0.73810196", "0.736592", "0.7355592", "0.7269041", "0.72678304", "0.7243741", "0.72390544", "0.71550494", "0.71513486", "0.71328723", "0.7120529", "0.71049935", "0.7080239", "0.7078796", "0.70650506", "0.704584", "0.6991119", "0.6908774", "0.69052994", "0.68726003", "0.68377215", "0.6776579", "0.67748076", "0.6774578", "0.6728686", "0.6722504", "0.6715183", "0.6686874", "0.663263", "0.6586264", "0.655976", "0.6541064", "0.65185714", "0.6456184", "0.64210385", "0.63722104", "0.6342917", "0.6309487", "0.63018054", "0.6297669", "0.6280278", "0.6246981", "0.62435204", "0.62323636", "0.62318045", "0.6214804", "0.620652", "0.61963344", "0.6195533", "0.6186726", "0.6185825", "0.61636215", "0.614139", "0.614019", "0.61367023", "0.612648", "0.61231554", "0.6092432", "0.6087557", "0.60790026", "0.6076087", "0.60721856", "0.60679144", "0.6047962", "0.6034446", "0.60300905", "0.6027219", "0.6021228", "0.601793" ]
0.70970047
43
Returns the list of normals
public Vector[] getNormals() { return this.normals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float[] getNormals() {\r\n\t\treturn normals;\r\n\t}", "public Vector2f[] getNormals() {\n\t\treturn normals.clone();\n\t}", "private void calculateNormals() {\n int i;\n float[] l_vect1 = new float[3];\n float[] l_vect2 = new float[3];\n float[] l_vect3 = new float[3];\n float[] l_vect_b1;\n float[] l_vect_b2;\n float[] l_normal;\n\n normals = new float[faces.length*3];\n int normalIndex = 0;\n\n for (i=0; i<faces.length; i=i+3) {\n\n l_vect1[0] = vertices[faces[i] * 3];\n l_vect1[1] = vertices[faces[i] * 3 + 1];\n l_vect1[2] = vertices[faces[i] * 3 + 2];\n l_vect2[0] = vertices[faces[(i + 1)] * 3];\n l_vect2[1] = vertices[faces[(i + 1)] * 3 + 1];\n l_vect2[2] = vertices[faces[(i + 1)] * 3 + 2];\n l_vect3[0] = vertices[faces[(i + 2)] * 3];\n l_vect3[1] = vertices[faces[(i + 2)] * 3 + 1];\n l_vect3[2] = vertices[faces[(i + 2)] * 3 + 2];\n\n l_vect_b1 = VectorCreate(l_vect1, l_vect2);\n l_vect_b2 = VectorCreate(l_vect1, l_vect3);\n\n l_normal = VectorDotProduct(l_vect_b1, l_vect_b2);\n l_normal = VectorNormalize(l_normal);\n\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n normals[normalIndex++]+=l_normal[0];\n normals[normalIndex++]+=l_normal[1];\n normals[normalIndex++]+=l_normal[2];\n }\n }", "public float[] getNormals(float[] input) {\n\t\tVector<Float> result = new Vector<Float>();\n\t\t//get the three vertices of the triangle and calculate vector normal\n\t\tfor (int i = 0; i < input.length; i += 9) {\n\t\t\tPoint3D a = new Point3D(input[i], input[i + 1], input[i + 2]);\n\t\t\tPoint3D b = new Point3D(input[i + 3], input[i + 4], input[i + 5]);\n\t\t\tPoint3D c = new Point3D(input[i + 6], input[i + 7], input[i + 8]);\n\t\t\tPoint3D p1 = a.minus(b);\n\t\t\tPoint3D p2 = a.minus(c);\n\n\t\t\tVector3D e1 = new Vector3D(p1);\n\t\t\tVector3D e2 = new Vector3D(p2);\n\t\t\tVector3D n = e1.cross(e2).normalize();\n\t\t\t//add normal's components to the result array\n\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\tresult.add((float) n.getX());\n\t\t\t\t// System.out.print(n.getX());\n\t\t\t\tresult.add((float) n.getY());\n\t\t\t\t// System.out.print(n.getY());\n\t\t\t\tresult.add((float) n.getZ());\n\t\t\t\t// System.out.print(n.getZ());\n\t\t\t\t// System.out.println();\n\t\t\t}\n\n\t\t}\n\t\treturn ArrayUtils.toPrimitive(result.toArray(new Float[0]));\n\n\t}", "public void calculateNormals() {\n // TODO!\n }", "void computeTriangleNormals();", "public Vector2f[] getNormalisedVertexPositions() {\n Vertex3D[] vertices = mesh.getModel().getVertices();\n // Get Array of X and Y offsets for all vertices\n Vector2f[] vertexPositions = new Vector2f[vertices.length];\n for (int i = 0; i < vertices.length; i++) {\n Vector3f vertexPosition = vertices[i].getPosition();\n vertexPositions[i] = new Vector2f(vertexPosition.getX(), vertexPosition.getY());\n }\n\n // Add vertex positions to position in order to get their OpenGl coordinates\n for (int i = 0; i < vertexPositions.length; i++) {\n vertexPositions[i] = Vector2f.add(position, vertexPositions[i]);\n vertexPositions[i] = Vector2f.divide(\n vertexPositions[i],\n new Vector2f(Window.getSpanX(), Window.getSpanY()));\n }\n\n return vertexPositions;\n }", "public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Right face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Left face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n // Bottom face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f\n };\n mCubeNormals.put(mCubeNormalData).position(0);\n\n }", "public double[] getNormal(int index){\n Node3D node = mesh.nodes.get(index);\n return calculateMeanNormal(node, node_to_triangle.get(node));\n }", "public int getNormalVerticesCount() {\n\t\treturn this.normalVertices.size();\n\t}", "public Vector3f getNormalVertice(int i) {\n\t\treturn normalVertices.get(i);\n\t}", "public static final List<Vector3f> generateNormals(List<Vector3f> vertices, int[] indices) {\r\n\t\t\r\n\t\tList<Vector3f> normals = new ArrayList<>();\r\n\t\t\r\n\t\tfor(int index = 0; index < vertices.size(); index++) {\r\n\t\t\t\r\n\t\t\tnormals.add(new Vector3f());\r\n\t\t}\r\n\t\t\r\n\t\tfor(int index = 0; index < indices.length; index += 3) {\r\n\t\t\t\r\n\t\t\tVector3f v1 = vertices.get(indices[index]);\r\n\t\t\tVector3f v2 = vertices.get(indices[index + 1]);\r\n\t\t\tVector3f v3 = vertices.get(indices[index + 2]);\r\n\t\t\t\r\n\t\t\tVector3f faceNormal = generateFaceNormal(v1, v2, v3);\r\n\t\t\t\r\n\t\t\tnormals.get(indices[index]).add(faceNormal);\r\n\t\t\tnormals.get(indices[index + 1]).add(faceNormal);\r\n\t\t\tnormals.get(indices[index + 2]).add(faceNormal);\r\n\t\t}\r\n\t\t\r\n\t\tnormals.forEach(normal -> {\r\n\t\t\t\r\n\t\t\tnormal.normalize();\r\n\t\t\tnormal.negate();\r\n\t\t});\r\n\t\t\r\n\t\treturn normals;\r\n\t}", "private void appendNormals(ZipOutputStream out) throws IOException {\n\t\tfor (Vertex norm : exportNormals)\n\t\t{\n\t\t\tBigDecimal xRound = new BigDecimal(norm.x).setScale(3, RoundingMode.HALF_UP);\n\t\t\tBigDecimal yRound = new BigDecimal(norm.y).setScale(3, RoundingMode.HALF_UP);\n\t\t\tBigDecimal zRound = new BigDecimal(norm.z).setScale(3, RoundingMode.HALF_UP);\n\t\t\tout.write((\"vn \" + xRound.toPlainString() + \" \" + yRound.toPlainString() + \" \" + zRound.toPlainString() + \"\\n\").getBytes(\"UTF-8\"));\n\t\t}\n\t}", "@java.lang.Override\n public godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder() {\n return getNormal();\n }", "@java.lang.Override\n public godot.wire.Wire.Vector3 getNormal() {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }", "public boolean hasNormals() {\n if (normals != null) {\n return normals.length > 0;\n }\n return false;\n }", "public float[] getNormalCoordinates(VisuVector3f coordinates) {\r\n //Assume we are in 1.0\r\n Float[] limits = limitedGroundCoordinates.get(\"0.1.0\");\r\n float y = (coordinates.x - limits[0]) / (limits[1] - limits[0]);\r\n limits = limitedGroundCoordinates.get(\"1.1.0\");\r\n float x = (coordinates.z - limits[0]) / (limits[1] - limits[0]);\r\n float[] finalCoordinates = new float[]{checkDistance(x), checkDistance(y)};\r\n return finalCoordinates;\r\n }", "private void parseNormal(String line) {\n\n String first_float = line.substring(2);\n int second_space_index = first_float.indexOf(' ') + 1;\n String second_float = first_float.substring(second_space_index);\n int third_space_index = second_float.indexOf(' ') + 1;\n\n float vx = parseFloat(first_float.substring(0, second_space_index - 1));\n float vy = parseFloat(second_float.substring(0, third_space_index - 1));\n float vz = parseFloat(second_float.substring(third_space_index));\n\n mNormals.add(vx);\n mNormals.add(vy);\n mNormals.add(vz);\n }", "private static Vector3f getNormal(double[] a, double[] b)\n\t{\n\t\tfloat vectorX = (float)(a[FTContour.X] - b[FTContour.X]);\n\t\tfloat vectorY = (float)(a[FTContour.Y] - b[FTContour.Y]);\n\n\t\tfloat length = (float)Math.sqrt(vectorX * vectorX + vectorY * vectorY);\n\n\t\tif (length > 0.0f)\n\t\t{\n\t\t\tlength = 1 / length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlength = 0.0f;\n\t\t}\n\n\t\treturn new Vector3f((float)vectorY * length, (float)-vectorX * length, 0.0f);\n\t}", "public boolean usesNormals() {\r\n return false;\r\n }", "private Vector3f calcNormal(int loopStart) throws IOException {\n\t\t// calculating the normal of the polygon using the first 3 vertices \n\t\t// of the planar face:\n\t\t//\t\t\tvec3 ab = b - a;\n\t\t// vec3 ac = c - a;\n\t\t// vec3 normal = normalize(cross(ab, ac));\n\t\tMLoop loop = loops[loopStart + 0];\n\t\tCArrayFacade<Float> a = vertices[loop.getV()].getCo();\n\t\tloop = loops[loopStart + 1];\n\t\tCArrayFacade<Float> b = vertices[loop.getV()].getCo();\n\t\tloop = loops[loopStart + 2];\n\t\tCArrayFacade<Float> c = vertices[loop.getV()].getCo();\n\t\t\n\t\tVector3f ab = new Vector3f(b.get(0)-a.get(0), b.get(1)-a.get(1), b.get(2)-a.get(2));\n\t\tVector3f ac = new Vector3f(c.get(0)-a.get(0), c.get(1)-a.get(1), c.get(2)-a.get(2));\n\t\t\n\t\treturn ab.cross(ac);\n\t}", "public godot.wire.Wire.Vector3 getNormal() {\n if (normalBuilder_ == null) {\n return normal_ == null ? godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n } else {\n return normalBuilder_.getMessage();\n }\n }", "public float[] getHitNormal();", "public void normal(PointType n)\r\n {\r\n\t //System.out.println(\"norm: \"+n.x+\", \"+n.y+\", \"+n.z);\r\n\t\tgl.glNormal3d(n.x, n.y, n.z);\t\t\r\n\t}", "@Test\n\tpublic void testGetLayerNormals() throws GeoTessException\n\t{\n\t\t// set global active region\n\t\tmodel.setActiveRegion();\n\n\t\t// pick a location\n int layerId = 4;\n int vertexIndex = 0;\n int pointIndex = 94;\n\n // compute unit weighted normals ... validate against the true result\n\t\tmodel.computeLayerNormals(false);\n\t\tdouble[] normTrue = {0.003866655017722743, -0.009437102685152304, 0.9999479936836134};\n\t\tdouble[] normp = model.getLayerNormal(vertexIndex, layerId);\n\t\tdouble[] normvl = model.getLayerNormal(pointIndex);\n\t\tassertEquals(normp[0], normTrue[0], 1e-12);\n\t\tassertEquals(normp[0], normvl[0], 1e-12);\n\n // compute area weighted normals ... validate against the true result\n\t\tmodel.computeLayerNormals(true);\n\t\tdouble[] normTrueA = {0.003844847699526512, -0.00938031231004458, 0.9999486121232097};\n\t\tnormp = model.getLayerNormal(vertexIndex, layerId);\n\t\tnormvl = model.getLayerNormal(pointIndex);\n\t\tassertEquals(normp[0], normTrueA[0], 1e-12);\n\t\tassertEquals(normp[0], normvl[0], 1e-12);\n\t}", "public String getNormal() {\r\n return normal;\r\n }", "public Point4 getNormal();", "public godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder() {\n if (normalBuilder_ != null) {\n return normalBuilder_.getMessageOrBuilder();\n } else {\n return normal_ == null ?\n godot.wire.Wire.Vector3.getDefaultInstance() : normal_;\n }\n }", "godot.wire.Wire.Vector3 getNormal();", "public Vector3 getNormal() {\n\t\tdouble mag = this.magnitude();\n\t\tif (mag > 0) {\n\t\t\treturn new Vector3(\n\t\t\t\t\tthis.x/mag,\n\t\t\t\t\tthis.y/mag,\n\t\t\t\t\tthis.z/mag\n\t\t\t\t\t);\n\t\t} else {\n\t\t\treturn new Vector3();\n\t\t}\n\t}", "public SbVec3f getNormal() { return worldNormal; }", "private void processExtractData_N() {\n\n this.normalCollection = new VertexCollection();\n\n Map<Integer, float[]> definedNormals = new HashMap<>();\n\n int n = 0;int count = 1;\n while(n < extract.getNormals().size()){\n\n float thisNormValues[] = {extract.getNormals().get(n),\n extract.getNormals().get(n+1),\n extract.getNormals().get(n+2)};\n\n definedNormals.put(count, thisNormValues);\n\n n = n+3;\n count++;\n }\n\n for(Integer nId : extract.getDrawNormalOrder()){\n float[] pushThese = definedNormals.get(nId);\n this.normalCollection.push(pushThese[0], pushThese[1], pushThese[2]);\n }\n }", "public SbVec3f\ngetObjectNormal() {\n\treturn getObjectNormal(null);\n}", "public void calculateAlbedoAndSurfaceNormals() {\n\t\tRealMatrix STranspose = this.S.transpose();\n\t\tdouble[][] p = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\tdouble[][] nx = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\tdouble[][] ny = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\tdouble[][] nz = new double[I1.getColumnDimension()][I1.getRowDimension()];\n\t\t\n\t\tRealMatrix gMatrix = null;\n\t\tfor(int i=0; i < I1.getColumnDimension(); i++) {\n\t\t\tfor (int j=0; j < I1.getRowDimension(); j++) {\n\t\t\t\t\n\t\t\t\t// Stacking our 'I's.\n\t\t\t\tdouble[][] intensityMatrixData = { {I1.getEntry(i, j)},\n\t\t\t\t\t\t \t\t\t \t\t{I2.getEntry(i, j)},\n\t\t\t\t\t\t \t\t\t \t\t{I3.getEntry(i, j)},\n\t\t\t\t\t\t \t\t\t \t\t{I4.getEntry(i, j)}\n\t\t\t\t\t\t \t\t\t \t };\n\t\t\t\tRealMatrix intensityMatrix = MatrixUtils.createRealMatrix(intensityMatrixData);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Pseudo-Inverse step multiplied by 'I'.\n\t\t\t\tgMatrix = new LUDecomposition(STranspose.multiply(scalarMultiplication(intensityMatrix, this.S)))\n\t\t\t\t\t.getSolver()\n\t\t\t\t\t.getInverse()\n\t\t\t\t\t.multiply(STranspose)\n\t\t\t\t\t.multiply(scalarMultiplication(intensityMatrix, intensityMatrix));\n\t\t\t\t\n\t\t\t\t// Calculating the albedo.\n\t\t\t\tp[i][j] = (Math.sqrt(Math.pow(gMatrix.getEntry(0, 0), 2)+\n\t\t\t\t\t\t Math.pow(gMatrix.getEntry(1, 0), 2)+\n\t\t\t\t\t\t Math.pow(gMatrix.getEntry(2, 0), 2)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (p[i][j] > 1) {\n\t\t\t\t\tSystem.out.println(\"wrong!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Calculating the surface normals.\n\t\t\t\tnx[i][j] = gMatrix.getEntry(0, 0) / p[i][j];\n\t\t\t\tny[i][j] = gMatrix.getEntry(1, 0) / p[i][j];\n\t\t\t\tnz[i][j] = gMatrix.getEntry(2, 0) / p[i][j];\n\t\t\t}\n\n\t\t}\n\t\tthis.P = MatrixUtils.createRealMatrix(p);\n\t\tthis.Nx = MatrixUtils.createRealMatrix(nx).transpose();\n\t\tthis.Ny = MatrixUtils.createRealMatrix(ny).transpose();\n\t\tthis.Nz = MatrixUtils.createRealMatrix(nz).transpose();\t\n\t}", "private Vector normal(int[] face) {\n\t\tVector point0 = verts[face[0]];\n\t\tVector point1 = verts[face[1]];\n\t\tVector point2 = verts[face[2]];\n\t\treturn point1.subtract(point0).crossProduct(point2.subtract(point0)).normalise();\n\t}", "public java.util.Set<jkt.hms.masters.business.DgNormalValue> getDgNormalValues() {\n\t\treturn dgNormalValues;\n\t}", "private void computeNormal() {\n normal = getDirection();\r\n\r\n // Rotate by -90 degrees to get normal of line\r\n float oldY = normal.y;\r\n normal.y = -normal.x;\r\n normal.x = oldY;\r\n }", "boolean getNormal();", "private void getNormalVector(Conformer conformer, int[] atom, double[] n) {\n\t\t// calculate the three vectors leading from atom[0] to the other three atoms\n\t\tdouble[][] coords = new double[2][3];\n\t\tfor (int i=0; i<2; i++) {\n\t\t\tcoords[i][0] = conformer.getX(atom[i+1]) - conformer.getX(atom[0]);\n\t\t\tcoords[i][1] = conformer.getY(atom[i+1]) - conformer.getY(atom[0]);\n\t\t\tcoords[i][2] = conformer.getZ(atom[i+1]) - conformer.getZ(atom[0]);\n\t\t\t}\n\n\t\t// calculate the normal vector (vector product of coords[0] and coords[1])\n\t\tn[0] = coords[0][1]*coords[1][2]-coords[0][2]*coords[1][1];\n\t\tn[1] = coords[0][2]*coords[1][0]-coords[0][0]*coords[1][2];\n\t\tn[2] = coords[0][0]*coords[1][1]-coords[0][1]*coords[1][0];\n\n\t\tdouble l = Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);\n\t\tn[0] /= l;\n\t\tn[1] /= l;\n\t\tn[2] /= l;\n\t\t}", "public Vector2D normal()\n\t{\n\t\treturn this.mul(1/this.length());\n\t}", "private double[] getNormalVector(Conformer conformer, int[] atom) {\n\t\tdouble[] n = new double[3];\n\t\tgetNormalVector(conformer, atom, n);\n\t\treturn n;\n\t\t}", "public VectorA normal()\n {\n return new VectorA(this.x/this.mag(), this.y/this.mag());\n }", "public Point4 getNormal(int pointNr);", "public Vector[] getVerts() {\n\t\treturn this.verts;\n\t}", "boolean hasNormal();", "public boolean getNormal() {\n return normal_;\n }", "public boolean getNormal() {\n return normal_;\n }", "public void flipNormal() {\n int i, j;\n\n for (i = 0; i < nr_of_segments; i++) {\n for (j = 0; j < points_per_segment; j++) {\n points[i][j].z = -points[i][j].z;\n }\n }\n\n for (i = 0; i < (int) ((double) nr_of_segments / step); i++) {\n for (j = 0; j < (int) ((double) points_per_segment / step); j++) {\n evaluated_points[i][j].z = -evaluated_points[i][j].z;\n }\n }\n\n }", "public int[] getNormalVerticeIndicesInSegment(int i, int num) {\n\t\treturn ((segments.get(i)).getFace(num)).getNormalIndices();\n\t}", "godot.wire.Wire.Vector3OrBuilder getNormalOrBuilder();", "public int getNormalCount() {\n \tif (normBuf == null)\n \t\treturn 0;\n \treturn normBuf.asFloatBuffer().limit()/3;\n }", "public ByteBuffer getNormalBuffer() {\n return normBuf;\n }", "public INormalizer getNormalizer();", "public void updateNormals(int x, int z)\n\t{\n\t\t\n\t\tfloat c = map[x > 0 ? x - 1 : x][z];\n\t\tfloat d = map[x < size - 1 ? x + 1 : x][z];\n\t\tfloat a = map[x][z > 0 ? z - 1 : z];\n\t\tfloat b = map[x][z < size - 1 ? z + 1 : z];\n\t\t\n\t\t// Calculate normals for M ===\n\t\t\n\t\tfloat cd_d = c - d;\n\t\tif(x == 0 || x == size - 1)\n\t\t{\n\t\t\tcd_d *= 2;\n\t\t}\n\t\t\n\t\tfloat ab_d = a - b;\n\t\tif(z == 0 || z == size - 1)\n\t\t{\n\t\t\tab_d *= 2;\n\t\t}\n\n\t\tmapNormals[x][z].set(cd_d * vertu, 2 * horzu, ab_d * vertu);\n\t\tmapNormals[x][z].normalise();\n\t}", "public double[] getNormalizedOutputValues(){\r\n\t\tdouble [] norm = new double[realValues[1].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[1][i])\r\n\t\t\t\tnorm[i] = Attributes.getOutputAttribute(i).normalizeValue(realValues[1][i]);\r\n\t\t\telse\r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "public boolean isNormal()\n {\n return Native.fpaIsNumeralNormal(getContext().nCtx(), getNativeObject());\n }", "public godot.wire.Wire.Vector3.Builder getNormalBuilder() {\n \n onChanged();\n return getNormalFieldBuilder().getBuilder();\n }", "float[][] getCameraVectorsNormal(int resX, int resY){\n float vectors[][]=new float[resX*resY][3];//first vector index, second the components of the vector\n float[] vect2=rotateYVector(dir);\n vect2[1]=0;\n vect2=normalize(vect2);\n float[] vect3=normalize(vectorProduct(dir, vect2));//dir, vect2, vect3 base vectors\n float[] x={0,0,0};\n float[] y={0,0,0};\n float[] temp={0,0,0};\n for(int i=0;i<3;i++){\n x[i]=(vect2[i])/(resX/2);\n y[i]=(vect3[i])/(resY/2);\n temp[i]=vect2[i];\n }\n \n for(int j=0;j<resY;j++){\n for(int i=0;i<resX;i++){\n vectors[j*resX+i][0]=dir[0]+vect2[0]+vect3[0];\n vectors[j*resX+i][1]=dir[1]+vect2[1]+vect3[1];\n vectors[j*resX+i][2]=dir[2]+vect2[2]+vect3[2];\n vectors[j*resX+i]=normalize(vectors[j*resX+i]);\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n if((vectorLength(vect2)>(-0.0001)&&vectorLength(vect2)<0.0001)&&(resX%2)==0){\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n }\n }\n //printVector(temp);\n vect2[0]=temp[0];\n vect2[1]=temp[1];\n vect2[2]=temp[2];\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n if((vectorLength(vect3)>(-0.0001)&&vectorLength(vect3)<0.0001)&&(resY%2)==0){\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n }\n }\n \n return vectors;\n }", "public float[] getVertices() {\n/* 793 */ COSBase base = getCOSObject().getDictionaryObject(COSName.VERTICES);\n/* 794 */ if (base instanceof COSArray)\n/* */ {\n/* 796 */ return ((COSArray)base).toFloatArray();\n/* */ }\n/* 798 */ return null;\n/* */ }", "public double[] getVentasXVendedor() {\r\n double vVendedores[] = new double[nv];\r\n int i;\r\n for (i = 0; i < nv; i++) {\r\n vVendedores[i] = getVentasVendedor(i);\r\n }\r\n return vVendedores;\r\n }", "public void calcNormal() {\n nx = y2 - y1;\n ny = x1 - x2;\n }", "private void process(ArrayList<Float> points) {\n downsample(3, points);\n vertices = new Vector3f[nrows * ncols];\n texcoord = BufferUtils.createFloatBuffer(2 * nrows * ncols);\n indexes = BufferUtils.createIntBuffer(6 * (nrows - 1) * (ncols - 1));\n Vector3f[][][] fnormals = new Vector3f[nrows - 1][ncols - 1][2];\n normals = new Vector3f[nrows * ncols];\n float x, z;\n\n System.out.println(\"Processing \" + nrows + \"x\" + ncols + \" terrain...\");\n\n // First make vertices + texcoords\n x = 0.0f;\n for (int row = 0; row < nrows; row++) {\n z = 0.0f;\n for (int col = 0; col < ncols; col++) {\n vertices[(row * ncols) + col] = new Vector3f(x, data[row][col], z);\n texcoord.put(col / (float) ncols);\n texcoord.put(row / (float) nrows);\n z += cellsize;\n }\n x += cellsize;\n }\n // Indexes + face normals\n System.out.println(\"Populating faces...\");\n for (int row = 0; row < (nrows - 1); row++) {\n for (int col = 0; col < (ncols - 1); col++) {\n int base = 6 * ((row * (ncols - 1)) + col);\n // Triangle 1\n indexes.put((row * ncols) + col); // a\n indexes.put((row * ncols) + col + 1); // b\n indexes.put(((row + 1) * ncols) + col); // c\n // Triangle 2\n indexes.put(((row + 1) * ncols) + col); // c\n indexes.put((row * ncols) + col + 1); // b\n indexes.put(((row + 1) * ncols) + col + 1); // d\n // Faces\n base = (row * ncols) + col;\n Vector3f a = vertices[base];\n Vector3f b = vertices[base + 1];\n Vector3f c = vertices[base + ncols];\n Vector3f d = vertices[base + ncols + 1];\n Vector3f ba = b.subtract(a);\n Vector3f ca = c.subtract(a);\n Vector3f bc = b.subtract(c);\n Vector3f dc = d.subtract(c);\n // ormal.subtractLocal(pointa).crossLocal(pointc.x - pointa.x,\n // pointc.y - pointa.y, pointc.z - pointa.z);\n fnormals[row][col][0] = ba.crossLocal(ca).normalizeLocal();\n fnormals[row][col][1] = bc.crossLocal(dc).normalizeLocal();\n // Triangle ta = new Triangle(a,b,c);\n // Triangle tb = new Triangle(c,b,d);\n }\n }\n System.out.println(\"Calculating face normals...\");\n // Vector normals\n Vector3f t;\n // Corners\n // TL\n t = fnormals[0][0][0].add(fnormals[0][0][1]);\n t.normalizeLocal();\n normals[0] = t;\n // TR\n t = fnormals[0][ncols - 2][0].add(fnormals[0][ncols - 2][1]);\n t.normalizeLocal();\n normals[ncols - 1] = t;\n // BL\n t = fnormals[nrows - 2][0][0].add(fnormals[nrows - 2][0][1]);\n t.normalizeLocal();\n normals[(nrows - 1) * ncols] = t;\n // BR\n t = fnormals[nrows - 2][ncols - 2][0].add(fnormals[nrows - 2][ncols - 2][1]);\n t.normalizeLocal();\n normals[(nrows * ncols) - 1] = t;\n // Do first row and last row\n for (int col = 1; col < (ncols - 1); col++) {\n // First row\n t = fnormals[0][col - 1][0].add(fnormals[0][col - 1][1]);\n t.addLocal(fnormals[0][col][0]);\n t.addLocal(fnormals[0][col][1]);\n t.normalizeLocal();\n normals[col] = t;\n // Last row\n t = fnormals[nrows - 2][col - 1][0].add(fnormals[nrows - 2][col - 1][1]);\n t.addLocal(fnormals[nrows - 2][col][0]);\n t.addLocal(fnormals[nrows - 2][col][1]);\n t.normalizeLocal();\n normals[((nrows - 1) * ncols) + col] = t;\n }\n // Do first and last column\n for (int row = 1; row < (nrows - 1); row++) {\n // First col\n t = fnormals[row - 1][0][0].add(fnormals[row - 1][0][1]);\n t.addLocal(fnormals[row][0][0]);\n t.addLocal(fnormals[row][0][1]);\n t.normalizeLocal();\n normals[row * ncols] = t;\n // Last col\n t = fnormals[row - 1][ncols - 2][0].add(fnormals[row - 1][ncols - 2][1]);\n t.addLocal(fnormals[row][ncols - 2][0]);\n t.addLocal(fnormals[row][ncols - 2][1]);\n t.normalizeLocal();\n normals[(row * ncols) + (ncols - 1)] = t;\n // Centre cols\n for (int col = 1; col < (ncols - 1); col++) {\n t = fnormals[row - 1][col - 1][0].add(fnormals[row - 1][col - 1][1]);\n t.addLocal(fnormals[row - 1][col][0]);\n t.addLocal(fnormals[row - 1][col][1]);\n t.addLocal(fnormals[row][col - 1][0]);\n t.addLocal(fnormals[row][col - 1][1]);\n t.addLocal(fnormals[row][col][0]);\n t.addLocal(fnormals[row][col][1]);\n t.normalizeLocal();\n normals[(row * ncols) + col] = t;\n }\n }\n System.out.println(\"Processing finished...\");\n setBuffer(VertexBuffer.Type.Position, 3, BufferUtils.createFloatBuffer(vertices));\n setBuffer(VertexBuffer.Type.TexCoord, 2, texcoord);\n setBuffer(VertexBuffer.Type.Index, 3, indexes);\n setBuffer(VertexBuffer.Type.Normal, 3, BufferUtils.createFloatBuffer(normals));\n updateBound();\n System.out.println(\"NE corner: \" + vertices[vertices.length - 1].mult(0.006f));\n // Hint to renderer that we don't plan on modifying the terrain.\n this.setStatic();\n }", "@Test\n void getNormal() {\n Plane pl = new Plane(new Point3D(-1,2,1), new Point3D(0,-3,2), new Point3D(1,1,-4)\n );\n\n assertEquals(new Vector(26,7,9).normalize(),\n pl.getNormal(),\n \"Bad normal to trinagle\");\n\n }", "protected void setForceNormalVector() {\n\t\tvn = forceNormalVector(v1, v2);\n\t}", "private List<Float> nucleotideFrequencies() {\n\t\tList<Float> freqs = new ArrayList<Float>();\n\t\tfreqs.add((float) 0.3);\n\t\tfreqs.add((float) 0.5);\n\t\tfreqs.add((float) 0.8);\n\t\tfreqs.add((float) 1.0);\n\t\treturn freqs;\n\t}", "public Point3D getNormal(Point3D p){\n\t\treturn this.n;\n\t}", "public Optional<String> getNormal()\n {\n return m_normal;\n }", "public Vector3 normalized() {\n float length = length();\n return new Vector3(x / length, y / length, z / length);\n }", "float norm();", "@java.lang.Override\n public boolean hasNormal() {\n return normal_ != null;\n }", "private com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector3, godot.wire.Wire.Vector3.Builder, godot.wire.Wire.Vector3OrBuilder> \n getNormalFieldBuilder() {\n if (normalBuilder_ == null) {\n normalBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n godot.wire.Wire.Vector3, godot.wire.Wire.Vector3.Builder, godot.wire.Wire.Vector3OrBuilder>(\n getNormal(),\n getParentForChildren(),\n isClean());\n normal_ = null;\n }\n return normalBuilder_;\n }", "@Override\r\n\tpublic ArrayList<E> getVertices() {\r\n\t\tArrayList<E> verts = new ArrayList<>();\r\n\t\tvertices.forEach((E t, Vertex<E> u) -> {\r\n\t\t\tverts.add(t);\r\n\t\t});\r\n\t\treturn verts;\r\n\t}", "@Override\n public Vector getNormal(Point3D p) {\n Vector O_P= p.subtract(_center);\n return O_P.normalize();\n // return null;\n }", "public List<OrderLine> getLignes() {\n\t\treturn _lignes;\n\t}", "public double[] calcNormHistogram()\r\n {\r\n\tdouble [] normHistogram = new double[histogram.length];\r\n\t\r\n\t//Find the normalized histogram by dividing each element of\r\n\t//the histogram by sum\r\n\tfor( int n = 0; n < histogram.length; n++ )\r\n\t normHistogram[n] = (double)histogram[n]/sum;\r\n\t\r\n\treturn normHistogram;\r\n }", "public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}", "public double norm() {\n\t\thomogenize();\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z);\n\t}", "public void triangulate() {\n // Save the outline and calculate normals\n outline = new Vector<PlanarEdge>();\n for (PlanarEdge e : subdivision.getEdges()) {\n if (e.isRealEdge()) {\n outline.add(e);\n }\n }\n // Calculate outline normals\n outline_normals = new Vector3f[outline.size()];\n for (PlanarEdge e : outline) {\n TriangulationVertex vert = (TriangulationVertex) e.getDestination();\n // Normal 1\n Vector3f normal1 = new Vector3f(vert.getOutGoingEdge()\n .getDestination().getPoint())\n .subtractLocal(vert.getPoint()).normalizeLocal();\n // Vector3f normal1 = new\n // Vector3f(vert.getOutGoingEdge().getDestination().getPoint()).subtractLocal(vert.getPoint());\n normal1.z = -normal1.x;\n normal1.x = normal1.y;\n normal1.y = normal1.z;\n normal1.z = 0;\n // Normal 2\n Vector3f normal2 = new Vector3f(vert.getPoint()).subtractLocal(\n vert.getInGoingEdge().getOrigin().getPoint())\n .normalizeLocal();\n // Vector3f normal2 = new\n // Vector3f(vert.getPoint()).subtractLocal(vert.getInGoingEdge().getOrigin().getPoint());\n normal2.z = -normal2.x;\n normal2.x = normal2.y;\n normal2.y = normal2.z;\n normal2.z = 0;\n normal1.addLocal(normal2).normalizeLocal();\n\n outline_normals[vert.getIndex()] = normal1;\n }\n\n // Calculate the triangulation of the surface.\n surface = subdivision.triangulate();\n }", "public static final Vector3f generateFaceNormal(Vector3f vert1, Vector3f vert2, Vector3f vert3) {\r\n\t\t\r\n\t\tVector3f v1 = new Vector3f(vert2);\r\n\t\tv1.sub(vert1);\r\n\t\t\r\n\t\tVector3f v2 = new Vector3f(vert3);\r\n\t\tv2.sub(vert1);\r\n\t\tv2.cross(v2, v1);\r\n\t\tv2.normalize();\r\n\t\t\r\n\t\treturn v2;\r\n\t}", "public Vector3f[] getVertices() {\n return vertices;\n }", "public void normaliseVertexColors()\r\n\t{\r\n\t for(int i=0; i<3; i++)\r\n vertices[i].normaliseVertexColor();\r\n\t}", "public float[] computeNormalMatrix(float[] modelMatrix) {\n\t\tfloat[] tmpMatrix = new float[16];\n\t\tfloat[] tmp2Matrix = new float[16];\n\t\tMatrix.multiplyMM(tmpMatrix, 0, viewMatrix, 0, modelMatrix, 0);\n\t\tMatrix.invertM(tmp2Matrix, 0, tmpMatrix, 0);\n\t\tMatrix.transposeM(tmpMatrix, 0, tmp2Matrix, 0);\n\t\t\n\t\treturn tmpMatrix;\n\t}", "public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }", "@Override\r\n\tprotected Ray normalAt(double xx, double yy, double zz) {\n\t\treturn null;\r\n\t}", "public Shape(Vector2f[] points, Vector2f[] normals) {\n\t\tthis.points = points.clone();\n\t\tthis.normals = normals.clone();\n\t\n\t\tcalculateBPRange();\n\t}", "protected float[] getGenes() {\n\t\t\treturn genes;\n\t\t}", "public double[] getNormalizedInputValues(){\r\n\t\tdouble [] norm = new double[realValues[0].length];\r\n\t\tfor (int i=0; i<norm.length; i++){\r\n\t\t\tif (!missingValues[0][i])\r\n\t\t\t\tnorm[i] = Attributes.getInputAttribute(i).normalizeValue(realValues[0][i]);\r\n\t\t\telse \r\n\t\t\t\tnorm[i] = -1.;\r\n\t\t}\r\n\t\treturn norm;\r\n\t}", "public double[] getVentasXMes() {\r\n double vMes[] = new double[nm];\r\n int j;\r\n for (j = 0; j < nm; j++) {\r\n vMes[j] = getVentasMes(j);\r\n }\r\n return vMes;\r\n }", "public Vector3D getNormal(Vector3D hitPos) {\n\t\tVector3D n = Vector3D.sub(pos, hitPos);\n\t\t//n.div(radius);\n\t\tn.normalize();\n\t\treturn n;\n\t}", "@Override\n Vector calculate_normal_vector(Point hitPoint, int surface) {\n Point origin = new Point(0, 0, 0);\n return getInternalTransformer().substraction_to_vector(hitPoint, origin);\n }", "public float[] getVertices() {\r\n\t\treturn vertices;\r\n\t}", "public Normalizer getNormalizer() {\n return null;\n }", "public String [ ] getNombresIngredientes() {\n String arreglo[] = new String[this.ingredientes.size()];\n \n for(int i = 0; i < this.ingredientes.size(); i++) {\n arreglo[i] = this.ingredientes.get(i).toString();\n }\n \n return arreglo;\n }", "public Iterable<String> nouns() {\n\t\treturn nounToId.keySet();\n\t}", "@Override\n public Vector getNormal(Point3D P) {\n Point3D O = _center;\n Vector n = P.subtract(O);\n return n.normalized();\n }", "private void renderToNormalMap() {\n\t\tGL11.glColorMask(true, true, true, true);\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT\n\t\t\t\t| GL11.GL_STENCIL_BUFFER_BIT);\n\n\t\tfor (PhysicsEntity<? extends RenderEntity> e : entities) {\n\t\t\tRenderEntity re = e.getWorldEntity();\n\t\t\tre.render(screenSpaceNormalDepthContext);\n\t\t}\n\n\t\tnormalBuffer.copyPixels();\n\t}", "final public Normal3 asNormal(){\n return new Normal3(x, y, z);\n }", "public Shape(Vertex2D[] points, Vector2f[] normals) {\n\t\tthis.points = new Vector2f[points.length];\n\t\tfor (int i = 0; i < points.length; i++) {\n\t\t\tthis.points[i] = new Vector2f(points[i].getData(0));\n\t\t}\n\t\t\n\t\tcalculateBPRange();\n\t\t\n\t\tthis.normals = normals.clone();\n\t}", "public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }", "final public Vector3 normalized(){\n return new Vector3(x/magnitude, y/magnitude, z/magnitude);\n }" ]
[ "0.83938307", "0.8063396", "0.75577503", "0.7032056", "0.6860664", "0.6728076", "0.64994115", "0.6318355", "0.6246937", "0.62195194", "0.6183342", "0.61391085", "0.60550493", "0.6025265", "0.5986916", "0.5983889", "0.5953668", "0.59266055", "0.5883857", "0.5847084", "0.58328056", "0.58030033", "0.5753653", "0.57452774", "0.5737864", "0.5728611", "0.5728091", "0.5725181", "0.5706553", "0.5687037", "0.5655866", "0.5635908", "0.5635883", "0.5612044", "0.55723", "0.55615634", "0.5559121", "0.5530495", "0.55265415", "0.5505296", "0.55041987", "0.54972446", "0.5491811", "0.5479626", "0.54180956", "0.5393895", "0.53905034", "0.5322609", "0.5314172", "0.52216226", "0.5217046", "0.51759934", "0.5134869", "0.51223636", "0.51160014", "0.5110567", "0.51028883", "0.50722563", "0.5050749", "0.50504863", "0.50420547", "0.504104", "0.5035575", "0.5010059", "0.50073975", "0.50068074", "0.49921447", "0.49496257", "0.4947973", "0.49331748", "0.49304995", "0.49297786", "0.49230292", "0.49218783", "0.49165583", "0.4908627", "0.49046305", "0.49022922", "0.48933265", "0.48794058", "0.48774981", "0.48772556", "0.48769683", "0.48720118", "0.48687476", "0.48672935", "0.4864466", "0.48520318", "0.4845348", "0.4843359", "0.484245", "0.48393822", "0.48373103", "0.48334426", "0.4833172", "0.48297423", "0.4827353", "0.4818106", "0.48142067", "0.48102" ]
0.7951869
2